Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 13 additions and 4 deletions
Showing only changes of commit dd796d812d - Show all commits

View File

@ -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,7 +759,8 @@ 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
filter_owner_row.prop(self, "filter_owners") if advanced_mode:
filter_owner_row.prop(self, "filter_owners")
if self.data_type == "TRANSFER_DATA": if self.data_type == "TRANSFER_DATA":
layout.prop(self, "transfer_data_type") layout.prop(self, "transfer_data_type")
@ -781,7 +787,9 @@ 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",
) )
owner_row.prop(self, "avaliable_owners", text="")
if advanced_mode:
owner_row.prop(self, "avaliable_owners", text="")
if self.data_type == "TRANSFER_DATA": if self.data_type == "TRANSFER_DATA":
layout.prop(self, "surrender_selection", expand=True) layout.prop(self, "surrender_selection", expand=True)

View File

@ -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")