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.
Showing only changes of commit b73166e379 - Show all commits

View File

@ -6,7 +6,9 @@ avaliable task layers from the task_layer_defaults.json file that needs to be cr
""" """
class NEW_ASSET(bpy.types.PropertyGroup): class ASSET_NEW(bpy.types.PropertyGroup):
"""Properties needed to create new asset file/folders"""
dir: bpy.props.StringProperty( dir: bpy.props.StringProperty(
name="Directory", name="Directory",
description="Target Path for new asset files", description="Target Path for new asset files",
@ -15,7 +17,9 @@ class NEW_ASSET(bpy.types.PropertyGroup):
name: bpy.props.StringProperty(name="Name", description="Name for new Asset") name: bpy.props.StringProperty(name="Name", description="Name for new Asset")
class ASSET_STATUS(bpy.types.PropertyGroup): class ASSET_FILE_STATUS(bpy.types.PropertyGroup):
"""Properties to manage the status of asset pipeline files"""
is_asset_pipeline_file: bpy.props.BoolProperty( is_asset_pipeline_file: bpy.props.BoolProperty(
name="Asset Pipeline File", name="Asset Pipeline File",
description="Asset Pipeline Files are used in the asset pipeline, if file is not asset pipeline file user will be prompted to create a new asset", description="Asset Pipeline Files are used in the asset pipeline, if file is not asset pipeline file user will be prompted to create a new asset",
@ -32,7 +36,9 @@ class ASSET_STATUS(bpy.types.PropertyGroup):
from . import constants from . import constants
class ASSETOWNERSHIP(bpy.types.PropertyGroup): class ASSET_TRANSFER_DATA(bpy.types.PropertyGroup):
"""Properties to track transferable data on an object"""
owner: bpy.props.EnumProperty( owner: bpy.props.EnumProperty(
name="Transfer Data Owner", name="Transfer Data Owner",
items=constants.TASK_LAYER_TYPES, items=constants.TASK_LAYER_TYPES,
@ -43,9 +49,9 @@ class ASSETOWNERSHIP(bpy.types.PropertyGroup):
) )
class TEMP_ASSETOWNERSHIP(bpy.types.PropertyGroup): class ASSET_TRANSFER_DATA_TEMP(bpy.types.PropertyGroup):
"""Class used when finding new ownership data so it can be drawn """Class used when finding new ownership data so it can be drawn
with the same method as the existing ownership data from ASSETOWNERSHIP""" with the same method as the existing ownership data from ASSET_TRANSFER_DATA"""
owner: bpy.props.EnumProperty( owner: bpy.props.EnumProperty(
name="Transfer Data Owner", name="Transfer Data Owner",
@ -59,10 +65,10 @@ class TEMP_ASSETOWNERSHIP(bpy.types.PropertyGroup):
classes = ( classes = (
ASSETOWNERSHIP, ASSET_TRANSFER_DATA,
ASSET_STATUS, ASSET_FILE_STATUS,
TEMP_ASSETOWNERSHIP, ASSET_TRANSFER_DATA_TEMP,
NEW_ASSET, ASSET_NEW,
) )
@ -70,17 +76,17 @@ def register():
for i in classes: for i in classes:
bpy.utils.register_class(i) bpy.utils.register_class(i)
bpy.types.Object.transfer_data_ownership = bpy.props.CollectionProperty( bpy.types.Object.transfer_data_ownership = bpy.props.CollectionProperty(
type=ASSETOWNERSHIP type=ASSET_TRANSFER_DATA
) )
bpy.types.Scene.temp_transfer_data_ownership = bpy.props.CollectionProperty( bpy.types.Scene.temp_transfer_data_ownership = bpy.props.CollectionProperty(
type=TEMP_ASSETOWNERSHIP type=ASSET_TRANSFER_DATA_TEMP
) )
bpy.types.Scene.asset_status = bpy.props.PointerProperty(type=ASSET_STATUS) bpy.types.Scene.asset_status = bpy.props.PointerProperty(type=ASSET_FILE_STATUS)
bpy.types.Object.asset_id_owner = bpy.props.EnumProperty( bpy.types.Object.asset_id_owner = bpy.props.EnumProperty(
name="ID Owner", name="ID Owner",
items=constants.TASK_LAYER_TYPES, items=constants.TASK_LAYER_TYPES,
) )
bpy.types.Scene.asset_new = bpy.props.PointerProperty(type=NEW_ASSET) bpy.types.Scene.asset_new = bpy.props.PointerProperty(type=ASSET_NEW)
def unregister(): def unregister():