Asset Pipeline v2 #145
@ -41,7 +41,11 @@ def transfer_vertex_group(
|
|||||||
if target_obj.vertex_groups.get(vertex_group_name):
|
if target_obj.vertex_groups.get(vertex_group_name):
|
||||||
target_obj.vertex_groups.remove(target_obj.vertex_groups.get(vertex_group_name))
|
target_obj.vertex_groups.remove(target_obj.vertex_groups.get(vertex_group_name))
|
||||||
|
|
||||||
source_obj.vertex_groups.active = source_obj.vertex_groups[vertex_group_name]
|
if not source_obj.vertex_groups.get(vertex_group_name):
|
||||||
|
print(f"ERROR Vertex Group {vertex_group_name} not found in {source_obj.name}")
|
||||||
|
return
|
||||||
|
|
||||||
|
source_obj.vertex_groups.active = source_obj.vertex_groups.get(vertex_group_name)
|
||||||
# TODO Debug crashing / use context.temp_override(object=obj) style
|
# TODO Debug crashing / use context.temp_override(object=obj) style
|
||||||
context = bpy.context
|
context = bpy.context
|
||||||
override = context.copy()
|
override = context.copy()
|
||||||
@ -57,6 +61,11 @@ def transfer_vertex_group(
|
|||||||
layers_select_dst="NAME",
|
layers_select_dst="NAME",
|
||||||
mix_mode="REPLACE",
|
mix_mode="REPLACE",
|
||||||
)
|
)
|
||||||
|
if not target_obj.vertex_groups.get(vertex_group_name):
|
||||||
|
print(
|
||||||
|
f"FAILED to Transfer Vertex Group {vertex_group_name} to {target_obj.name}"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
# VERTEX COLORS
|
# VERTEX COLORS
|
||||||
|
Loading…
Reference in New Issue
Block a user