Asset Pipeline v2 #145
@ -56,8 +56,7 @@ def import_data_from_lib(
|
||||
|
||||
|
||||
## EXECUTION
|
||||
task_layer_name = Path(bpy.data.filepath).name.split(".")[1]
|
||||
task_layer_col = bpy.data.collections[task_layer_name]
|
||||
task_layer_name = "Modeling"
|
||||
external_file = (
|
||||
Path(bpy.data.filepath)
|
||||
.parent.parent.parent.joinpath("resources")
|
||||
@ -66,8 +65,12 @@ external_file = (
|
||||
appended_col = import_data_from_lib(
|
||||
external_file, "collections", f"sky.{task_layer_name.lower()}"
|
||||
)
|
||||
asset_collection = bpy.context.scene.asset_pipeline.asset_collection
|
||||
bpy.context.scene.collection.children.link(appended_col)
|
||||
|
||||
task_layer_col = bpy.data.collections.new(task_layer_name)
|
||||
asset_collection.children.link(task_layer_col)
|
||||
|
||||
for obj in appended_col.objects:
|
||||
task_layer_col.objects.link(obj)
|
||||
|
||||
|
@ -114,8 +114,10 @@ def transfer_vertex_groups(context, target_obj, source_obj):
|
||||
|
||||
|
||||
## EXECUTION
|
||||
task_layer_name = Path(bpy.data.filepath).name.split(".")[1]
|
||||
task_layer_col = bpy.data.collections[task_layer_name]
|
||||
task_layer_name = "Rigging"
|
||||
task_layer_col = bpy.data.collections.new(task_layer_name)
|
||||
asset_collection = bpy.context.scene.asset_pipeline.asset_collection
|
||||
asset_collection.children.link(task_layer_col)
|
||||
external_file = (
|
||||
Path(bpy.data.filepath)
|
||||
.parent.parent.parent.joinpath("resources")
|
||||
|
@ -95,9 +95,8 @@ def transfer_attribute(
|
||||
setattr(target_data, key, getattr(source_data, key))
|
||||
|
||||
|
||||
## EXECUTION
|
||||
task_layer_name = Path(bpy.data.filepath).name.split(".")[1]
|
||||
task_layer_col = bpy.data.collections[task_layer_name]
|
||||
## EXECUTION"
|
||||
task_layer_name = "Shading"
|
||||
external_file = (
|
||||
Path(bpy.data.filepath)
|
||||
.parent.parent.parent.joinpath("resources")
|
||||
|
Loading…
Reference in New Issue
Block a user