Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 28 Aug 2017 06:04:42 +0000 (16:04 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 28 Aug 2017 06:04:42 +0000 (16:04 +1000)
1  2 
source/blender/editors/include/ED_transform.h
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index a0eee4296c1b92b7373d39701f840ba110f0a151,65c8f70c06d04f9c8276a8350b0da183b505c501..c8f7c6f30102ab72e6ba319c06802e883b6e47bc
@@@ -1339,24 -1325,18 +1339,29 @@@ void initTransInfo(bContext *C, TransIn
        if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) &&
                   RNA_property_is_set(op->ptr, prop)))
        {
 -              t->current_orientation = RNA_property_enum_get(op->ptr, prop);
 +              short orientation = RNA_property_enum_get(op->ptr, prop);
 +              TransformOrientation *custom_orientation = NULL;
  
 -              if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C)) {
 -                      t->current_orientation = V3D_MANIP_GLOBAL;
 +              if (orientation >= V3D_MANIP_CUSTOM) {
 +                      if (orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C)) {
 +                              orientation = V3D_MANIP_GLOBAL;
 +                      }
 +                      else {
 +                              custom_orientation = BKE_workspace_transform_orientation_find(
 +                                                       CTX_wm_workspace(C), orientation - V3D_MANIP_CUSTOM);
 +                              orientation = V3D_MANIP_CUSTOM;
 +                      }
                }
 +
 +              t->current_orientation = orientation;
 +              t->custom_orientation = custom_orientation;
        }
  
+       if (op && (prop = RNA_struct_find_property(op->ptr, "center_override")) && RNA_property_is_set(op->ptr, prop)) {
+               RNA_property_float_get_array(op->ptr, prop, t->center);
+               t->flag |= T_OVERRIDE_CENTER;
+       }
        if (op && ((prop = RNA_struct_find_property(op->ptr, "release_confirm")) &&
                   RNA_property_is_set(op->ptr, prop)))
        {