rename lattice influence to strength from r45144 (other deform modifiers call it...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 26 Mar 2012 00:42:21 +0000 (00:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 26 Mar 2012 00:42:21 +0000 (00:42 +0000)
release/scripts/startup/bl_ui/properties_data_modifier.py
source/blender/blenkernel/intern/lattice.c
source/blender/blenlib/intern/math_vector.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/intern/rna_modifier.c
source/blender/modifiers/intern/MOD_lattice.c

index cbf354b20780e62cc647a1168361b9bc9cf5c2c9..50b4a575383c6bcefcad70114d2ec4091ec7580f 100644 (file)
@@ -320,7 +320,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         
         layout.separator()
-        layout.prop(md, "influence", slider=True)
+        layout.prop(md, "strength", slider=True)
 
     def MASK(self, layout, ob, md):
         split = layout.split()
index a02f2cc1c5d274c37ed71ef153fa2bb96b76b8a8..f182d7bcb7cb26273da12b12e8ec13b713d4dd73 100644 (file)
@@ -785,7 +785,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target,
 }
 
 void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
-                          float (*vertexCos)[3], int numVerts, const char *vgroup, float influence)
+                          float (*vertexCos)[3], int numVerts, const char *vgroup, float fac)
 {
        int a;
        int use_vgroups;
@@ -824,13 +824,13 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
                                weight= defvert_find_weight(dvert, index);
 
                                if (weight > 0.0f)
-                                       calc_latt_deform(laOb, vertexCos[a], weight*influence);
+                                       calc_latt_deform(laOb, vertexCos[a], weight * fac);
                        }
                }
        }
        else {
                for (a = 0; a < numVerts; a++) {
-                       calc_latt_deform(laOb, vertexCos[a], influence);
+                       calc_latt_deform(laOb, vertexCos[a], fac);
                }
        }
        end_latt_deform(laOb);
index e7c96ce3dc339dd3af8f6066da03f6e709108545..65600a31042c1ab07353fb2c13bd9e013618b2b3 100644 (file)
@@ -293,7 +293,7 @@ void project_v3_plane(float v[3], const float n[3], const float p[3])
        float mul;
 
        sub_v3_v3v3(vector, v, p);
-       mul = dot_v3v3(vector, n)/len_squared_v3(n);
+       mul = dot_v3v3(vector, n) / len_squared_v3(n);
 
        mul_v3_v3fl(vector, n, mul);
 
index 30ae9b6af52b0bb6869e47c6a03619dc6561fac6..502ffbd15b8f5bea39b72f722439e1f8df7ba3ba 100644 (file)
@@ -13339,7 +13339,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                        for(md=ob->modifiers.first; md; md=md->next) {
                                if(md->type == eModifierType_Lattice) {
                                        LatticeModifierData *lmd = (LatticeModifierData *)md;
-                                       lmd->influence = 1.0f;
+                                       lmd->strength = 1.0f;
                                }
                        }
                }
index 3cd764d2eb3523ed8f7e3184e74cca5fdb0dd19c..20111fc66b259b0219c68cc3dd28999d67bd0df4 100644 (file)
@@ -1611,8 +1611,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
        /* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
         * setting the relevant values in context at each step, then applying
         */
-       RNA_BEGIN(op->ptr, itemptr, "stroke") 
-       {
+       RNA_BEGIN(op->ptr, itemptr, "stroke") {
                float mousef[2];
                
                //printf("\t\tGP - stroke elem \n");
index d26d6f2cbfec08312a006a9b922355b48aa97265..6046a468aed721350b397e5c76e7cc2c55c80716 100644 (file)
@@ -2970,7 +2970,6 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
 
        /* get the cut curve */
        RNA_BEGIN(op->ptr, itemptr, "path") {
-               
                RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]);
                len++;
                if (len >= MAX_CUTS) {
index bb2d320aa0443df3e7762c4f0986185a79861f99..6c1d9892ba260ff2e0e1fd46d88859322829675c 100644 (file)
@@ -135,7 +135,7 @@ typedef struct LatticeModifierData {
 
        struct Object *object;
        char name[64];                  /* optional vertexgroup name, MAX_VGROUP_NAME */
-       float influence;
+       float strength;
        char pad[4];
 } LatticeModifierData;
 
index dae9c0ca0448980b2fad913989573dcb30fc03d5..1782d075c16f2510e275de3a9cf85313b79c88fc 100644 (file)
@@ -961,10 +961,10 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
        RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
        
-       prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
+       prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
        RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
        RNA_def_property_ui_range(prop, 0, 1, 10, 2);
-       RNA_def_property_ui_text(prop, "Influence", "Strength of modifier effect");
+       RNA_def_property_ui_text(prop, "Strength", "Strength of modifier effect");
        RNA_def_property_update(prop, 0, "rna_Modifier_update");
 }
 
index 5732fee7826ff48a68767bc667a590a510a96790..ca700d4d8f255c2869e49fb2a0ba145a3f384496 100644 (file)
@@ -51,7 +51,7 @@
 static void initData(ModifierData *md)
 {
        LatticeModifierData *lmd = (LatticeModifierData*) md;
-       lmd->influence = 1.0f;
+       lmd->strength = 1.0f;
 }
 
 static void copyData(ModifierData *md, ModifierData *target)
@@ -119,7 +119,7 @@ static void deformVerts(ModifierData *md, Object *ob,
        modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
        
        lattice_deform_verts(lmd->object, ob, derivedData,
-                            vertexCos, numVerts, lmd->name, lmd->influence);
+                            vertexCos, numVerts, lmd->name, lmd->strength);
 }
 
 static void deformVertsEM(