feat: affect dependencies option in change owner

This commit is contained in:
Swann 2020-10-15 17:48:04 +02:00
parent ff35e34032
commit 7db3c18213
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -398,6 +398,7 @@ class SessionPropertyRightOperator(bpy.types.Operator):
bl_options = {"REGISTER"} bl_options = {"REGISTER"}
key: bpy.props.StringProperty(default="None") key: bpy.props.StringProperty(default="None")
recursive: bpy.props.BoolProperty(default=True)
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
@ -413,12 +414,17 @@ class SessionPropertyRightOperator(bpy.types.Operator):
col = layout.column() col = layout.column()
col.prop(runtime_settings, "clients") col.prop(runtime_settings, "clients")
row = col.row()
row.label(text="Affect dependencies")
row.prop(self, "recursive", text="")
def execute(self, context): def execute(self, context):
runtime_settings = context.window_manager.session runtime_settings = context.window_manager.session
if session: if session:
session.change_owner(self.key, runtime_settings.clients) session.change_owner(self.key,
runtime_settings.clients,
recursive=self.recursive)
return {"FINISHED"} return {"FINISHED"}