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:
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py11
-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
4 files changed, 7 insertions, 29 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 89e90618383..861d64382ef 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -715,9 +715,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Origin:")
col.prop(md, "origin", text="")
- sub = col.column()
- sub.active = (md.origin is not None)
- sub.prop(md, "use_relative")
+
+ if md.deform_method in {'TAPER', 'STRETCH', 'TWIST'}:
+ col.label(text="Lock:")
+ col.prop(md, "lock_x")
+ col.prop(md, "lock_y")
col = split.column()
col.label(text="Deform:")
@@ -726,9 +728,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
else:
col.prop(md, "angle")
col.prop(md, "limits", slider=True)
- if md.deform_method in {'TAPER', 'STRETCH', 'TWIST'}:
- col.prop(md, "lock_x")
- col.prop(md, "lock_y")
def SMOKE(self, layout, ob, md):
layout.label(text="Settings can be found inside the Physics context")
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));