forked from bartvdbraak/blender
rename lattice influence to strength from r45144 (other deform modifiers call it strength too)
This commit is contained in:
parent
df4a8a4dab
commit
94b8b8913e
@ -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()
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user