[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33168] trunk/blender: [#24802] Invert vertex group not inverting armature modifier influence

Campbell Barton ideasman42 at gmail.com
Fri Nov 19 04:09:52 CET 2010


Revision: 33168
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33168
Author:   campbellbarton
Date:     2010-11-19 04:09:51 +0100 (Fri, 19 Nov 2010)

Log Message:
-----------
[#24802] Invert vertex group not inverting armature modifier influence
the armature vertex group options only apply to Multi-Modifier, rename and edit the UI to make this clear.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_data_modifier.py
    trunk/blender/source/blender/editors/space_script/script_edit.c
    trunk/blender/source/blender/makesrna/intern/rna_modifier.c

Modified: trunk/blender/release/scripts/ui/properties_data_modifier.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_modifier.py	2010-11-19 02:14:18 UTC (rev 33167)
+++ trunk/blender/release/scripts/ui/properties_data_modifier.py	2010-11-19 03:09:51 UTC (rev 33168)
@@ -52,25 +52,23 @@
         col = split.column()
         col.label(text="Object:")
         col.prop(md, "object", text="")
+        col.prop(md, "use_deform_preserve_volume")
 
         col = split.column()
-        col.label(text="Vertex Group::")
-        col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
-        sub = col.column()
-        sub.active = bool(md.vertex_group)
-        sub.prop(md, "invert_vertex_group")
-
-        split = layout.split()
-
-        col = split.column()
         col.label(text="Bind To:")
         col.prop(md, "use_vertex_groups", text="Vertex Groups")
         col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
 
+        split = layout.split()
+        
         col = split.column()
-        col.label(text="Deformation:")
-        col.prop(md, "use_deform_preserve_volume")
         col.prop(md, "use_multi_modifier")
+        col = col.split()
+        col.active = md.use_multi_modifier
+        col.prop_search(md, "vertex_group_multi_modifier", ob, "vertex_groups", text="")
+        sub = col.column()
+        sub.active = bool(md.vertex_group_multi_modifier)
+        sub.prop(md, "invert_vertex_group_multi_modifier")
 
     def ARRAY(self, layout, ob, md):
         layout.prop(md, "fit_type")

Modified: trunk/blender/source/blender/editors/space_script/script_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_script/script_edit.c	2010-11-19 02:14:18 UTC (rev 33167)
+++ trunk/blender/source/blender/editors/space_script/script_edit.c	2010-11-19 03:09:51 UTC (rev 33168)
@@ -90,6 +90,7 @@
 	WM_cursor_wait(1);
 	BPY_eval_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
 	WM_cursor_wait(0);
+	WM_event_add_notifier(C, NC_WINDOW, NULL);
 	return OPERATOR_FINISHED;
 #else
 	(void)C; /* unused */

Modified: trunk/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2010-11-19 02:14:18 UTC (rev 33167)
+++ trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2010-11-19 03:09:51 UTC (rev 33168)
@@ -992,36 +992,36 @@
 	RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
 	RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
 
-	prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
-	RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
-	RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
-	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
+	prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
+	RNA_def_property_ui_text(prop, "Use Bone Envelopes", "");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
-	prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
-	RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
 	prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
 	RNA_def_property_ui_text(prop, "Use Vertex Groups", "");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-	prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
-	RNA_def_property_ui_text(prop, "Use Bone Envelopes", "");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
+	
 	prop= RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
-	RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions");
+	RNA_def_property_ui_text(prop, "Preserve Volume", "Deform rotation interpolation with quaternions");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
 	prop= RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
 	RNA_def_property_ui_text(prop, "Multi Modifier",  "Use same input as previous modifier, and mix results using overall vgroup");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
+	
+	prop= RNA_def_property(srna, "vertex_group_multi_modifier", PROP_STRING, PROP_NONE);
+	RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
+	RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
+	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
+	RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+	prop= RNA_def_property(srna, "invert_vertex_group_multi_modifier", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
+	RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
+	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 }
 
 static void rna_def_modifier_hook(BlenderRNA *brna)





More information about the Bf-blender-cvs mailing list