diff options
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 338d4b574e0..80d1e0bb34f 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -71,6 +71,7 @@ #include "BKE_armature.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" +#include "BKE_editstrands.h" #include "BKE_fcurve.h" #include "BKE_lattice.h" #include "BKE_nla.h" @@ -893,6 +894,12 @@ static void recalcData_objects(TransInfo *t) } flushTransParticles(t); } + else if (base && (base->object->mode & OB_MODE_HAIR_EDIT) && BKE_editstrands_from_object(base->object)) { + if (t->state != TRANS_CANCEL) { + applyProject(t); + } + flushTransStrands(t); + } else { int i; @@ -1184,10 +1191,16 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve t->view = v3d; t->animtimer = (animscreen) ? animscreen->animtimer : NULL; - + + if (op && ((prop = RNA_struct_find_property(op->ptr, "use_widget_input")) && + RNA_property_is_set(op->ptr, prop))) + { + if (RNA_property_boolean_get(op->ptr, prop)) + t->flag |= T_USE_WIDGET; + } + /* turn manipulator off during transform */ - // FIXME: but don't do this when USING the manipulator... - if (t->flag & T_MODAL) { + if ((t->flag & T_MODAL) && !(t->flag & T_USE_WIDGET)) { t->twtype = v3d->twtype; v3d->twtype = 0; } @@ -1468,7 +1481,7 @@ void postTrans(bContext *C, TransInfo *t) else if (t->spacetype == SPACE_VIEW3D) { View3D *v3d = t->sa->spacedata.first; /* restore manipulator */ - if (t->flag & T_MODAL) { + if ((t->flag & T_MODAL) && !(t->flag & T_USE_WIDGET)) { v3d->twtype = t->twtype; } } |