Asset Pipeline v2 #145
@ -7,6 +7,8 @@ TASK_LAYER_ITEMS = [
|
|||||||
("SHADE", "Shading", ""),
|
("SHADE", "Shading", ""),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
TASK_LAYER_KEYS = [item[0] for item in TASK_LAYER_ITEMS]
|
||||||
|
|
||||||
TRANSFER_DATA_TYPES = [
|
TRANSFER_DATA_TYPES = [
|
||||||
("NONE", "None", ""),
|
("NONE", "None", ""),
|
||||||
("VERTEX_GROUP", "Vertex Group", ""),
|
("VERTEX_GROUP", "Vertex Group", ""),
|
||||||
|
@ -12,8 +12,10 @@ class ASSETPIPE_OT_update_ownership(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
obj = context.active_object
|
obj = context.active_object
|
||||||
file_name = bpy.path.basename(bpy.context.blend_data.filepath)
|
file_name = bpy.path.basename(bpy.context.blend_data.filepath)
|
||||||
# TODO check if exists in task_layer_constants
|
|
||||||
task_layer_name = file_name.split(".")[-2]
|
task_layer_name = file_name.split(".")[-2]
|
||||||
|
if task_layer_name not in constants.TASK_LAYER_KEYS:
|
||||||
|
self.report({'ERROR'}, "Current File Name doesn't contain valid task layer")
|
||||||
|
return {'CANCELLED'}
|
||||||
transferable_data.vertex_groups_update(obj, task_layer_name)
|
transferable_data.vertex_groups_update(obj, task_layer_name)
|
||||||
transferable_data.modifiers_update(obj, task_layer_name)
|
transferable_data.modifiers_update(obj, task_layer_name)
|
||||||
transferable_data.material_slot_update(obj, task_layer_name)
|
transferable_data.material_slot_update(obj, task_layer_name)
|
||||||
@ -35,7 +37,7 @@ class ASSETPIPE_OT_push_test(bpy.types.Operator):
|
|||||||
bpy.ops.wm.open_mainfile(filepath=pub_file_path)
|
bpy.ops.wm.open_mainfile(filepath=pub_file_path)
|
||||||
|
|
||||||
local_tls = [
|
local_tls = [
|
||||||
item[0] for item in constants.TASK_LAYER_ITEMS if item[0] != task_layer_name
|
item for item in constants.TASK_LAYER_KEYS if item != task_layer_name
|
||||||
]
|
]
|
||||||
|
|
||||||
core.merge_task_layer(
|
core.merge_task_layer(
|
||||||
|
Loading…
Reference in New Issue
Block a user