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