feat: snap user not set same user view
This commit is contained in:
@ -15,6 +15,7 @@ class BlUser(BlDatablock):
|
||||
target.name = data['name']
|
||||
target.location = data['location']
|
||||
target.selected_objects = data['selected_objects']
|
||||
|
||||
utils.dump_anything.load(target, data)
|
||||
|
||||
def apply(self):
|
||||
@ -34,6 +35,8 @@ class BlUser(BlDatablock):
|
||||
data['location'] = pointer.location
|
||||
data['color'] = pointer.color
|
||||
data['selected_objects'] = pointer.selected_objects
|
||||
data['view_matrix'] = pointer.view_matrix
|
||||
|
||||
return data
|
||||
|
||||
def update(self):
|
||||
|
Submodule multi_user/libs/replication updated: 35b21f3083...8adfb31874
@ -261,8 +261,8 @@ class SessionSnapUserOperator(bpy.types.Operator):
|
||||
|
||||
target_client = client.get(uuid=self.target_client)
|
||||
if target_client:
|
||||
rv3d.view_location = target_client.data['location'][0]
|
||||
rv3d.view_distance = 30.0
|
||||
rv3d.view_matrix = mathutils.Matrix(target_client.data['view_matrix'])
|
||||
# rv3d.view_distance = 30.0
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
@ -108,6 +108,7 @@ class User():
|
||||
self.location = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]
|
||||
self.selected_objects = []
|
||||
self.last_select_objects = []
|
||||
self.view_matrix = None
|
||||
|
||||
def update_location(self):
|
||||
current_coords = get_client_cam_points()
|
||||
@ -117,6 +118,11 @@ class User():
|
||||
if current_coords and self.location != current_coords:
|
||||
self.location = current_coords
|
||||
|
||||
matrix_dumper = utils.dump_anything.Dumper()
|
||||
current_vm = matrix_dumper.dump(rv3d.view_matrix)
|
||||
if self.view_matrix != current_vm:
|
||||
self.view_matrix = current_vm
|
||||
|
||||
def update_selected_objects(self, context):
|
||||
self.selected_objects = utils.get_selected_objects(context.scene)
|
||||
|
||||
|
Reference in New Issue
Block a user