Asset Pipeline v2 #145
@ -2,7 +2,7 @@ import bpy
|
||||
|
||||
from pathlib import Path
|
||||
from .merge.transfer_data.transfer_ui import draw_transfer_data
|
||||
from . import constants
|
||||
from .merge.task_layer import draw_task_layer_selection
|
||||
|
||||
|
||||
class ASSETPIPE_sync(bpy.types.Panel):
|
||||
@ -53,15 +53,21 @@ class ASSETPIPE_ownership_inspector(bpy.types.Panel):
|
||||
def draw(self, context: bpy.types.Context) -> None:
|
||||
layout = self.layout
|
||||
asset_pipe = context.scene.asset_pipeline
|
||||
scene = context.scene
|
||||
if not asset_pipe.is_asset_pipeline_file:
|
||||
layout.label(text="Open valid 'Asset Pipeline' file", icon="ERROR")
|
||||
return
|
||||
|
||||
if context.collection in list(asset_pipe.asset_collection.children):
|
||||
layout.label(
|
||||
text=f"{context.collection.name} : '{context.collection.asset_id_owner}' (Active Collection)",
|
||||
col = context.collection
|
||||
row = layout.row()
|
||||
row.label(
|
||||
text=f"{col.name}: ",
|
||||
icon="OUTLINER_COLLECTION",
|
||||
)
|
||||
draw_task_layer_selection(
|
||||
row, scene, col, col.asset_id_owner, "asset_id_owner"
|
||||
)
|
||||
|
||||
if not context.active_object:
|
||||
layout.label(text="Set an Active Object to Inspect", icon="OBJECT_DATA")
|
||||
@ -69,8 +75,9 @@ class ASSETPIPE_ownership_inspector(bpy.types.Panel):
|
||||
obj = context.active_object
|
||||
transfer_data = obj.transfer_data_ownership
|
||||
layout = layout.box()
|
||||
owner_tl_ui_name = constants.TASK_LAYER_TYPES[obj.asset_id_owner]
|
||||
layout.label(text=f"{obj.name}: '{owner_tl_ui_name}'", icon="OBJECT_DATA")
|
||||
row = layout.row()
|
||||
row.label(text=f"{obj.name}: ", icon="OBJECT_DATA")
|
||||
draw_task_layer_selection(row, scene, obj, obj.asset_id_owner, "asset_id_owner")
|
||||
draw_transfer_data(transfer_data, layout)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user