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 27 additions and 24 deletions
Showing only changes of commit 7b6a6ca5dc - Show all commits

View File

@ -83,27 +83,33 @@ class AssetTransferMapping:
continue
external_obj = self._get_external_object(local_obj)
if not external_obj:
print(f"Couldn't find external obj for {local_obj}")
continue
self._check_id_conflict(external_obj, local_obj)
# IF ITEM IS OWNED BY LOCAL TASK LAYERS
if (
external_obj.asset_id_surrender
and not local_obj.asset_id_surrender
and local_obj.asset_id_owner != external_obj.asset_id_owner
):
print(f"Skipping {external_obj} is surrendered")
object_map[external_obj] = local_obj
continue
if (
local_obj.asset_id_surrender
and not external_obj.asset_id_surrender
and local_obj.asset_id_owner != external_obj.asset_id_owner
):
print(f"Skipping {local_obj} is surrendered")
object_map[local_obj] = external_obj
continue
if local_obj.asset_id_owner in self._local_tls:
if (
local_obj.asset_id_surrender
and not external_obj.asset_id_surrender
and local_obj.asset_id_owner != external_obj.asset_id_owner
):
self.surrendered_obj_to_remove.add(local_obj)
continue
object_map[external_obj] = local_obj
# IF ITEM IS NOT OWNED BY LOCAL TASK LAYERS
else:
if (
external_obj.asset_id_surrender
and not local_obj.asset_id_surrender
and local_obj.asset_id_owner != external_obj.asset_id_owner
):
self.surrendered_obj_to_remove.add(external_obj)
continue
object_map[local_obj] = external_obj
# Find new objects to add to local_col

View File

@ -467,15 +467,12 @@ class ASSETPIPE_OT_update_surrendered_object(bpy.types.Operator):
bl_label = "Update Surrendered"
bl_description = """Update Surrended Object Owner"""
# TODO This is throwing an error
obj: bpy.props.PointerProperty(type=bpy.types.Object)
_surrendered_transfer_data = None
_obj = None
_old_onwer = ""
def invoke(self, context: bpy.types.Context, event: bpy.types.Event):
self.obj = context.active_object
self._old_onwer = self.obj.asset_id_owner
self._obj = context.active_object
self._old_onwer = self._obj.asset_id_owner
return context.window_manager.invoke_props_dialog(self, width=400)
def draw(self, context: bpy.types.Context):
@ -485,21 +482,21 @@ class ASSETPIPE_OT_update_surrendered_object(bpy.types.Operator):
draw_task_layer_selection(
row,
context.scene,
self.obj,
self.obj.asset_id_owner,
self._obj,
self._obj.asset_id_owner,
"asset_id_owner",
False,
True,
)
def execute(self, context: bpy.types.Context):
if self.obj.asset_id_owner == self._old_onwer:
if self._obj.asset_id_owner == self._old_onwer:
self.report(
{'ERROR'},
f"Object Owner was not updated",
)
return {'CANCELLED'}
self.obj.asset_id_surrender = False
self._obj.asset_id_surrender = False
return {'FINISHED'}