Asset Pipeline v2 #145
@ -738,9 +738,14 @@ class ASSETPIPE_OT_batch_ownership_change(bpy.types.Operator):
|
|||||||
return self._filter_by_name(context, objs)
|
return self._filter_by_name(context, objs)
|
||||||
|
|
||||||
def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
|
def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
|
||||||
|
if not get_addon_prefs().is_advanced_mode:
|
||||||
|
self.filter_owners = 'LOCAL'
|
||||||
|
self.avaliable_owners = 'LOCAL'
|
||||||
return context.window_manager.invoke_props_dialog(self, width=500)
|
return context.window_manager.invoke_props_dialog(self, width=500)
|
||||||
|
|
||||||
def draw(self, context: bpy.types.Context):
|
def draw(self, context: bpy.types.Context):
|
||||||
|
prefs = get_addon_prefs()
|
||||||
|
advanced_mode = prefs.is_advanced_mode
|
||||||
grey_out = True
|
grey_out = True
|
||||||
if self.surrender_selection and self.data_type == "TRANSFER_DATA":
|
if self.surrender_selection and self.data_type == "TRANSFER_DATA":
|
||||||
grey_out = False
|
grey_out = False
|
||||||
@ -754,6 +759,7 @@ class ASSETPIPE_OT_batch_ownership_change(bpy.types.Operator):
|
|||||||
|
|
||||||
filter_owner_row = layout.row()
|
filter_owner_row = layout.row()
|
||||||
filter_owner_row.enabled = grey_out
|
filter_owner_row.enabled = grey_out
|
||||||
|
if advanced_mode:
|
||||||
filter_owner_row.prop(self, "filter_owners")
|
filter_owner_row.prop(self, "filter_owners")
|
||||||
|
|
||||||
if self.data_type == "TRANSFER_DATA":
|
if self.data_type == "TRANSFER_DATA":
|
||||||
@ -781,6 +787,8 @@ class ASSETPIPE_OT_batch_ownership_change(bpy.types.Operator):
|
|||||||
show_local_task_layers=show_local,
|
show_local_task_layers=show_local,
|
||||||
text="Set To",
|
text="Set To",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if advanced_mode:
|
||||||
owner_row.prop(self, "avaliable_owners", text="")
|
owner_row.prop(self, "avaliable_owners", text="")
|
||||||
|
|
||||||
if self.data_type == "TRANSFER_DATA":
|
if self.data_type == "TRANSFER_DATA":
|
||||||
|
@ -59,8 +59,10 @@ class ASSETPIPE_PT_sync(bpy.types.Panel):
|
|||||||
layout.operator(
|
layout.operator(
|
||||||
"assetpipe.sync_pull", text="Pull from Publish", icon="TRIA_DOWN"
|
"assetpipe.sync_pull", text="Pull from Publish", icon="TRIA_DOWN"
|
||||||
)
|
)
|
||||||
|
layout.separator()
|
||||||
layout.operator("assetpipe.publish_new_version", icon="PLUS")
|
layout.operator("assetpipe.publish_new_version", icon="PLUS")
|
||||||
|
layout.separator()
|
||||||
|
layout.operator("assetpipe.batch_ownership_change")
|
||||||
# TODO Find new way to determine if we are in a published file more explicitly
|
# TODO Find new way to determine if we are in a published file more explicitly
|
||||||
# if asset_pipe.is_asset_pipeline_file and asset_pipe.task_layer_name == "NONE":
|
# if asset_pipe.is_asset_pipeline_file and asset_pipe.task_layer_name == "NONE":
|
||||||
# asset_pipe = context.scene.asset_pipeline
|
# asset_pipe = context.scene.asset_pipeline
|
||||||
@ -87,7 +89,6 @@ class ASSETPIPE_PT_sync_advanced(bpy.types.Panel):
|
|||||||
box = layout.box()
|
box = layout.box()
|
||||||
box.operator("assetpipe.update_ownership", text="Update Ownership")
|
box.operator("assetpipe.update_ownership", text="Update Ownership")
|
||||||
box.operator("assetpipe.reset_ownership", icon="LOOP_BACK")
|
box.operator("assetpipe.reset_ownership", icon="LOOP_BACK")
|
||||||
box.operator("assetpipe.batch_ownership_change")
|
|
||||||
box = layout.box()
|
box = layout.box()
|
||||||
box.operator("assetpipe.fix_prefixes", icon="CHECKMARK")
|
box.operator("assetpipe.fix_prefixes", icon="CHECKMARK")
|
||||||
box.operator("assetpipe.revert_file", icon="FILE_TICK")
|
box.operator("assetpipe.revert_file", icon="FILE_TICK")
|
||||||
|
Loading…
Reference in New Issue
Block a user