Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-23 23:31:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 23:31:49 +0400
commitf77405356aa5e1816287b1afe6b6546f518cc1f1 (patch)
tree3f4404610a8afde49c9b60c59db30900e815739f /source/blender
parent8ef3b51325c39dcf18cf340d41f6e847c902dfbd (diff)
remove use_relative option from simple deform,
all modifiers should be using object transformations relatively.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h9
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
-rw-r--r--source/blender/modifiers/intern/MOD_simpledeform.c11
3 files changed, 2 insertions, 23 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 98469102cb0..65e5c4e347a 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -720,8 +720,7 @@ typedef struct SimpleDeformModifierData {
char mode; /* deform function */
char axis; /* lock axis (for taper and strech) */
- char originOpts; /* originOptions */
- char pad;
+ char pad[2];
} SimpleDeformModifierData;
@@ -733,12 +732,6 @@ typedef struct SimpleDeformModifierData {
#define MOD_SIMPLEDEFORM_LOCK_AXIS_X (1<<0)
#define MOD_SIMPLEDEFORM_LOCK_AXIS_Y (1<<1)
-/* indicates whether simple deform should use the local
- * coordinates or global coordinates of origin */
-/* XXX, this should have never been an option, all other modifiers work relatively
- * (so moving both objects makes no change!) - Campbell */
-#define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0)
-
#define MOD_UVPROJECT_MAX 10
typedef struct ShapeKeyModifierData {
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index d5bd44dc9d3..cd6067fb7e8 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2581,11 +2581,6 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
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, "use_relative", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
- RNA_def_property_ui_text(prop, "Relative", "Set the origin of deform space to be relative to the object");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 1, 3);
diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c
index 588c98c9827..d6dc8482ee2 100644
--- a/source/blender/modifiers/intern/MOD_simpledeform.c
+++ b/source/blender/modifiers/intern/MOD_simpledeform.c
@@ -166,14 +166,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
/* Calculate matrixs do convert between coordinate spaces */
if (smd->origin) {
transf = &tmp_transf;
-
- if (smd->originOpts & MOD_SIMPLEDEFORM_ORIGIN_LOCAL) {
- space_transform_from_matrixs(transf, ob->obmat, smd->origin->obmat);
- }
- else {
- copy_m4_m4(transf->local2target, smd->origin->obmat);
- invert_m4_m4(transf->target2local, transf->local2target);
- }
+ space_transform_from_matrixs(transf, ob->obmat, smd->origin->obmat);
}
/* Setup vars,
@@ -252,7 +245,6 @@ static void initData(ModifierData *md)
SimpleDeformModifierData *smd = (SimpleDeformModifierData *) md;
smd->mode = MOD_SIMPLEDEFORM_MODE_TWIST;
- smd->originOpts = MOD_SIMPLEDEFORM_ORIGIN_LOCAL;
smd->axis = 0;
smd->origin = NULL;
@@ -269,7 +261,6 @@ static void copyData(ModifierData *md, ModifierData *target)
tsmd->mode = smd->mode;
tsmd->axis = smd->axis;
tsmd->origin = smd->origin;
- tsmd->originOpts = smd->originOpts;
tsmd->factor = smd->factor;
memcpy(tsmd->limit, smd->limit, sizeof(tsmd->limit));
BLI_strncpy(tsmd->vgroup_name, smd->vgroup_name, sizeof(tsmd->vgroup_name));