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:
authorMartin Poirier <theeth@yahoo.com>2010-07-31 23:26:21 +0400
committerMartin Poirier <theeth@yahoo.com>2010-07-31 23:26:21 +0400
commit327b4d588bf87c2f3aa5dc3891a75ade7f55d737 (patch)
tree200e80c2cb7ac16619c81c289a6800b31889751b /source/blender/editors/transform
parenta5e4fc782afefae0c2ab5fea48661f686b28b068 (diff)
Separate proportional edit setting between edit and object mode. They are now used and toggled independently.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c13
-rw-r--r--source/blender/editors/transform/transform_generics.c21
2 files changed, 23 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 9743a4ef0f5..926d8ffd007 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1367,17 +1367,17 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
}
- /* XXX convert stupid flag to enum */
+ /* convert flag to enum */
switch(t->flag & (T_PROP_EDIT|T_PROP_CONNECTED))
{
case (T_PROP_EDIT|T_PROP_CONNECTED):
- proportional = 2;
+ proportional = PROP_EDIT_CONNECTED;
break;
case T_PROP_EDIT:
- proportional = 1;
+ proportional = PROP_EDIT_ON;
break;
default:
- proportional = 0;
+ proportional = PROP_EDIT_OFF;
}
// If modal, save settings back in scene if not set as operator argument
@@ -1385,7 +1385,10 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
/* save settings if not set in operator */
if (RNA_struct_find_property(op->ptr, "proportional") && !RNA_property_is_set(op->ptr, "proportional")) {
- ts->proportional = proportional;
+ if (t->obedit)
+ ts->proportional = proportional;
+ else
+ ts->proportional_objects = (proportional != PROP_EDIT_OFF);
}
if (RNA_struct_find_property(op->ptr, "proportional_size") && !RNA_property_is_set(op->ptr, "proportional_size")) {
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 8d98255d3d9..920c5c12ea1 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -38,6 +38,7 @@
#include "DNA_armature_types.h"
#include "DNA_lattice_types.h"
#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
@@ -1033,9 +1034,9 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
{
switch(RNA_enum_get(op->ptr, "proportional"))
{
- case 2: /* XXX connected constant */
+ case PROP_EDIT_CONNECTED:
t->flag |= T_PROP_CONNECTED;
- case 1: /* XXX prop on constant */
+ case PROP_EDIT_ON:
t->flag |= T_PROP_EDIT;
break;
}
@@ -1045,11 +1046,19 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* use settings from scene only if modal */
if (t->flag & T_MODAL)
{
- if ((t->options & CTX_NO_PET) == 0 && (ts->proportional != PROP_EDIT_OFF)) {
- t->flag |= T_PROP_EDIT;
+ if ((t->options & CTX_NO_PET) == 0)
+ {
+ if (t->obedit && ts->proportional != PROP_EDIT_OFF)
+ {
+ t->flag |= T_PROP_EDIT;
- if(ts->proportional == PROP_EDIT_CONNECTED)
- t->flag |= T_PROP_CONNECTED;
+ if(ts->proportional == PROP_EDIT_CONNECTED)
+ t->flag |= T_PROP_CONNECTED;
+ }
+ else if (t->obedit == NULL && ts->proportional_objects)
+ {
+ t->flag |= T_PROP_EDIT;
+ }
}
}
}