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.
3 changed files with 27 additions and 12 deletions
Showing only changes of commit d06322e777 - Show all commits

View File

@ -1,5 +1,6 @@
import bpy
from ... import constants
from ..task_layer import get_local_task_layers
def draw_transfer_data_type(
@ -11,9 +12,29 @@ def draw_transfer_data_type(
name, icon = constants.TRANSFER_DATA_TYPES[transfer_data[0].type]
box = layout.box()
box.label(text=name, icon=icon)
scene = bpy.context.scene
for transfer_data_item in transfer_data:
owner_tl_ui_name = constants.TASK_LAYER_TYPES[transfer_data_item.owner]
box.label(text=f"{transfer_data_item.name}: '{owner_tl_ui_name}'")
row = layout.row()
row.label(text=f"{transfer_data_item.name}: ")
if transfer_data_item.owner not in [
tl.name for tl in scene.asset_pipeline.local_task_layers
]:
row.enabled = False
row.prop_search(
transfer_data_item,
'owner',
scene.asset_pipeline,
'all_task_layers',
text="",
)
else:
row.prop_search(
transfer_data_item,
'owner',
scene.asset_pipeline,
'local_task_layers',
text="",
)
def draw_transfer_data(

View File

@ -1,6 +1,6 @@
import bpy
from ..naming import get_basename
from ..task_layer import get_transfer_data_owner
from ..task_layer import get_transfer_data_owner, get_local_task_layers
def check_transfer_data_entry(
@ -40,7 +40,7 @@ def transfer_data_add_entry(
"""
transfer_data_item = transfer_data.add()
transfer_data_item.name = name
transfer_data_item.owner = task_layer_name.upper()
transfer_data_item.owner = task_layer_name
transfer_data_item.type = td_type_key
return transfer_data_item

View File

@ -10,10 +10,7 @@ avaliable task layers from the task_layer_defaults.json file that needs to be cr
class AssetTransferData(bpy.types.PropertyGroup):
"""Properties to track transferable data on an object"""
owner: bpy.props.EnumProperty(
name="Transfer Data Owner",
items=constants.TASK_LAYER_TYPES_ENUM_ITEMS,
)
owner: bpy.props.StringProperty()
type: bpy.props.EnumProperty(
name="Transfer Data Type",
items=constants.TRANSFER_DATA_TYPES_ENUM_ITEMS,
@ -24,10 +21,7 @@ class AssetTransferDataTemp(bpy.types.PropertyGroup):
"""Class used when finding new ownership data so it can be drawn
with the same method as the existing ownership data from ASSET_TRANSFER_DATA"""
owner: bpy.props.EnumProperty(
name="Transfer Data Owner",
items=constants.TASK_LAYER_TYPES_ENUM_ITEMS,
)
owner: bpy.props.StringProperty()
type: bpy.props.EnumProperty(
name="Transfer Data Type",
items=constants.TRANSFER_DATA_TYPES_ENUM_ITEMS,