GRUPO DE STEAM
Blender Tutorial Community BlenderTuts
GRUPO DE STEAM
Blender Tutorial Community BlenderTuts
13
JUGANDO
180
ONLINE
Fundado
16 de octubre de 2012
Idioma
Inglés
Ubicación
United States 
protatoguy 10 NOV 2019 a las 17:13
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'