[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38742] branches/vgroup_modifiers/source/ blender: vgroup_modifiers: Addressed most ideasman?\226?\128? \153s remarks and suggestions in his last review.
Bastien Montagne
montagne29 at wanadoo.fr
Tue Jul 26 20:51:35 CEST 2011
Revision: 38742
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38742
Author: mont29
Date: 2011-07-26 18:51:35 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
vgroup_modifiers: Addressed most ideasman?\226?\128?\153s remarks and suggestions in his last review.
*Removed curve init code in readfile (no more needed since the split broke anyway compatibility with earlier WeightVGroup files?\226?\128?\166).
*Updated get_ob2ob_distance() code (much simpler ?\226?\128?\147?\194?\160I?\226?\128?\153m not a matrices?\226?\128?\153 god!).
*Enhanced a few RNA names (Campbell has others in mind here, though, I think).
Modified Paths:
--------------
branches/vgroup_modifiers/source/blender/blenloader/intern/readfile.c
branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c
branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c
Modified: branches/vgroup_modifiers/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/vgroup_modifiers/source/blender/blenloader/intern/readfile.c 2011-07-26 18:28:43 UTC (rev 38741)
+++ branches/vgroup_modifiers/source/blender/blenloader/intern/readfile.c 2011-07-26 18:51:35 UTC (rev 38742)
@@ -11714,24 +11714,8 @@
/* put compatibility code here until next subversion bump */
{
- Object *ob;
- ModifierData *md;
-
- /* WeightVGEdit modifier: CurveMapping pointer… */
- for(ob = main->object.first; ob; ob = ob->id.next) {
- for(md = ob->modifiers.first; md; md = md->next) {
- if(md->type == eModifierType_WeightVGEdit) {
- WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
- if (wmd->cmap_curve == NULL) {
- wmd->cmap_curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
- curvemapping_initialize(wmd->cmap_curve);
- }
- }
- }
- }
-
}
-
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
Modified: branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c 2011-07-26 18:28:43 UTC (rev 38741)
+++ branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c 2011-07-26 18:51:35 UTC (rev 38742)
@@ -2728,8 +2728,10 @@
static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
{
static EnumPropertyItem weightvg_proximity_modes_items[] = {
- {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "O2O Distance", ""},
- {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "O2V Distance", ""},
+ {MOD_WVG_PROXIMITY_OBJ2OBJDIST, "OBJ2OBJDIST", 0, "Object Distance",
+ "Use distance between affected and target objects."},
+ {MOD_WVG_PROXIMITY_OBJ2VERTDIST, "OBJ2VERTDIST", 0, "Verts Distance",
+ "Use distance between affected object’s vertices and target object, or target object’s geometry."},
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;
@@ -2755,19 +2757,19 @@
prop= RNA_def_property(srna, "obj2vert_verts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_VERTS);
- RNA_def_property_ui_text(prop, "Use Target Vertices",
+ RNA_def_property_ui_text(prop, "Verts as Target",
"Use shortest distance to target object’s vertices as weight.");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "obj2vert_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_EDGES);
- RNA_def_property_ui_text(prop, "Use Target Edges",
+ RNA_def_property_ui_text(prop, "Edges as Target",
"Use shortest distance to target object’s edges as weight.");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "obj2vert_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_O2VD_FACES);
- RNA_def_property_ui_text(prop, "Use Target Faces",
+ RNA_def_property_ui_text(prop, "Faces as Target",
"Use shortest distance to target object’s faces as weight.");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c
===================================================================
--- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-07-26 18:28:43 UTC (rev 38741)
+++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-07-26 18:51:35 UTC (rev 38742)
@@ -197,20 +197,7 @@
*/
static float get_ob2ob_distance(const Object* ob, const Object* obr)
{
- /* Both objects coordinates. */
- float o_wco[3],
- o_wro[3][3], /*unused*/
- o_wsz[3], /*unused*/
- or_wco[3],
- or_wro[3][3],/*unused*/
- or_wsz[3]; /*unused*/
- /* Get world-coordinates of both objects (constraints and anim included).
- * We also get rotation and scale, even though we do not want them…
- */
- mat4_to_loc_rot_size(o_wco, o_wro, o_wsz, (float (*)[4])ob->obmat);
- mat4_to_loc_rot_size(or_wco, or_wro, or_wsz, (float (*)[4])obr->obmat);
- /* Return distance between both coordinates. */
- return len_v3v3(o_wco, or_wco);
+ return len_v3v3(ob->obmat[3], obr->obmat[3]);
}
/**************************************
More information about the Bf-blender-cvs
mailing list