fix: snap user
This commit is contained in:
21
operators.py
21
operators.py
@ -243,11 +243,11 @@ class SessionSnapUserOperator(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
area, region, rv3d = presence.view3d_find()
|
||||
global client
|
||||
|
||||
target_client = client.get(
|
||||
"Client/{}".format(self.target_client))
|
||||
target_client = client.get(self.target_client)
|
||||
if target_client:
|
||||
rv3d.view_location = target_client[0][1]['location'][0]
|
||||
rv3d.view_location = target_client.buffer['location'][0]
|
||||
rv3d.view_distance = 30.0
|
||||
|
||||
return {"FINISHED"}
|
||||
@ -257,20 +257,6 @@ class SessionSnapUserOperator(bpy.types.Operator):
|
||||
pass
|
||||
|
||||
|
||||
class SessionSaveConfig(bpy.types.Operator):
|
||||
bl_idname = "session.save"
|
||||
bl_label = "Save session configuration"
|
||||
bl_description = "Save session configuration"
|
||||
bl_options = {"REGISTER"}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return True
|
||||
|
||||
def execute(self, context):
|
||||
context.window_manager.session.save()
|
||||
|
||||
|
||||
class SessionApply(bpy.types.Operator):
|
||||
bl_idname = "session.apply"
|
||||
bl_label = "apply the target item into the blender data"
|
||||
@ -297,7 +283,6 @@ classes = (
|
||||
SessionPropertyRemoveOperator,
|
||||
SessionSnapUserOperator,
|
||||
SessionPropertyRightOperator,
|
||||
SessionSaveConfig,
|
||||
SessionApply,
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user