feat: expose commit to the user

This commit is contained in:
Swann Martinez
2019-08-28 13:13:32 +02:00
parent b3435eae56
commit da58346517
3 changed files with 27 additions and 2 deletions

View File

@ -273,6 +273,25 @@ class SessionApply(bpy.types.Operator):
return {"FINISHED"}
class SessionCommit(bpy.types.Operator):
bl_idname = "session.commit"
bl_label = "commit and push the target to other clients"
bl_description = "commit and push the target to other clients"
bl_options = {"REGISTER"}
target = bpy.props.StringProperty()
@classmethod
def poll(cls, context):
return True
def execute(self, context):
global client
client.commit(uuid=self.target)
client.push(uuid=self.target)
return {"FINISHED"}
classes = (
SessionStartOperator,
@ -281,6 +300,7 @@ classes = (
SessionSnapUserOperator,
SessionPropertyRightOperator,
SessionApply,
SessionCommit,
)