Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Tue, 29 Aug 2017 06:06:26 +0000 (16:06 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 29 Aug 2017 06:06:26 +0000 (16:06 +1000)
1  2 
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index 5fd34cde3d63b430eef144b4469d4e918b3c343b,179b68dd270e143ceb4f0d9df1d2aa90492e1047..215be83abf4930b99fdfa63fb941dc7ca017d77c
@@@ -1339,29 -1325,13 +1339,24 @@@ 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)))
        {