NHÓM STEAM
Blender Tutorial Community BlenderTuts
NHÓM STEAM
Blender Tutorial Community BlenderTuts
20
ĐANG CHƠI
238
TRÊN MẠNG
Thành lập
16 Tháng 10, 2012
Ngôn ngữ
Tiếng Anh
Địa điểm
United States 
Tất cả thảo luận > General Discussion > Chi tiết chủ đề
protatoguy 10 Thg11, 2019 @ 5:13pm
How do I add multiple modifers that also modifies the options?
I'm trying to make a script that adds multiple VertexWeightMixes with the first vertex group as bone_01D2 and the vertex B as the list. However, it does not work out as expected, as it adds the modifiers, but does not change the others added after it.
import bpy namelist = [("bone_0200"),("bone_01C8"),("bone_01CE"),"bone_01CC","bone_01C9","bone_01D0","bone_01C1","bone_01CF","bone_01BA", "bone_01BC","bone_01BD","bone_01BB","bone_01D4","bone_01C7","bone_01D3","bone_01C0","bone_0206","bone_0204"] for vertex_b in namelist: vertex_a = "bone_01D2" vertexA = bpy.context.object.vertex_groups.get(vertex_a) vertexB = bpy.context.object.vertex_groups.get(vertex_b) if vertexA is None: print("Vertex " + vertex_a + " Does not Exist!") continue if vertexB is None: print("Vertex " + vertex_b + " Does not Exist!") continue bpy.ops.object.modifier_add(type='VERTEX_WEIGHT_MIX') bpy.context.object.modifiers["VertexWeightMix"].vertex_group_a = vertex_a bpy.context.object.modifiers["VertexWeightMix"].vertex_group_b = vertex_b bpy.context.object.modifiers["VertexWeightMix"].mix_mode = 'ADD' bpy.context.object.modifiers["VertexWeightMix"].mix_set = 'B'
Tất cả thảo luận > General Discussion > Chi tiết chủ đề