Asset Pipeline v2 #145
@ -59,6 +59,7 @@ class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
|
||||
asset_col = bpy.data.collections.get(self._name)
|
||||
context.scene.collection.children.link(asset_col)
|
||||
asset_status.asset_collection = asset_col
|
||||
asset_pipe = context.scene.asset_pipeline
|
||||
|
||||
for task_layer_name in constants.TASK_LAYER_NAMES:
|
||||
if task_layer_name == "None":
|
||||
@ -71,9 +72,11 @@ class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
|
||||
continue
|
||||
name = self._name + "." + task_layer_key + ".blend"
|
||||
task_layer_file = os.path.join(asset_path, name)
|
||||
asset_pipe.task_layer_name = task_layer_key
|
||||
bpy.ops.wm.save_as_mainfile(filepath=task_layer_file, copy=True)
|
||||
|
||||
# Creata intial publish based on task layers
|
||||
asset_pipe.task_layer_name = "NONE"
|
||||
publish_path = os.path.join(asset_path, constants.ACTIVE_PUBLISH_KEY)
|
||||
name = self._name + "." + "v001" + ".blend"
|
||||
publish_file = os.path.join(publish_path, name)
|
||||
|
@ -51,6 +51,9 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
||||
|
||||
temp_transfer_data: bpy.props.CollectionProperty(type=AssetTransferDataTemp)
|
||||
|
||||
task_layer_name: bpy.props.EnumProperty(
|
||||
name="Task Layer Name", items=constants.TASK_LAYER_TYPES
|
||||
)
|
||||
## NEW FILE
|
||||
|
||||
dir: bpy.props.StringProperty(
|
||||
|
Loading…
Reference in New Issue
Block a user