Commit: 46ac288a930673af3cf2a253a933f2663566295d
Author: Campbell Barton
Date:   Fri Feb 8 15:14:54 2019 +1100
Branches: master
https://developer.blender.org/rB46ac288a930673af3cf2a253a933f2663566295d

Cleanup: rename V3D_MANIP_* -> V3D_ORIENT_*

Wasn't obvious it's related to orientation,
also term manipulator is no longer in use.

===================================================================

M       source/blender/blenkernel/intern/constraint.c
M       source/blender/blenkernel/intern/scene.c
M       source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
M       source/blender/editors/mesh/editmesh_select.c
M       source/blender/editors/transform/transform.c
M       source/blender/editors/transform/transform.h
M       source/blender/editors/transform/transform_constraints.c
M       source/blender/editors/transform/transform_generics.c
M       source/blender/editors/transform/transform_gizmo_3d.c
M       source/blender/editors/transform/transform_gizmo_extrude_3d.c
M       source/blender/editors/transform/transform_ops.c
M       source/blender/editors/transform/transform_orientations.c
M       source/blender/makesdna/DNA_view3d_types.h
M       source/blender/makesrna/intern/rna_scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/constraint.c 
b/source/blender/blenkernel/intern/constraint.c
index 5aa96b1168e..8d0db7578bf 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -464,7 +464,7 @@ static void contarget_get_mesh_mat(Object *ob, const char 
*substring, float mat[
 
        /* derive the rotation from the average normal:
         * - code taken from transform_gizmo.c,
-        *   calc_gizmo_stats, V3D_MANIP_NORMAL case
+        *   calc_gizmo_stats, V3D_ORIENT_NORMAL case
         */
        /*      we need the transpose of the inverse for a normal... */
        copy_m3_m4(imat, ob->obmat);
diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index 71a9c12e99b..18e2135f947 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1359,19 +1359,19 @@ TransformOrientationSlot 
*BKE_scene_orientation_slot_get(Scene *scene, int flag)
 /**
  * Activate a transform orientation in a 3D view based on an enum value.
  *
- * \param orientation: If this is #V3D_MANIP_CUSTOM or greater, the custom 
transform orientation
- * with index \a orientation - #V3D_MANIP_CUSTOM gets activated.
+ * \param orientation: If this is #V3D_ORIENT_CUSTOM or greater, the custom 
transform orientation
+ * with index \a orientation - #V3D_ORIENT_CUSTOM gets activated.
  */
 void BKE_scene_orientation_slot_set_index(TransformOrientationSlot 
*orient_slot, int orientation)
 {
-       const bool is_custom = orientation >= V3D_MANIP_CUSTOM;
-       orient_slot->type = is_custom ? V3D_MANIP_CUSTOM : orientation;
-       orient_slot->index_custom = is_custom ? (orientation - 
V3D_MANIP_CUSTOM) : -1;
+       const bool is_custom = orientation >= V3D_ORIENT_CUSTOM;
+       orient_slot->type = is_custom ? V3D_ORIENT_CUSTOM : orientation;
+       orient_slot->index_custom = is_custom ? (orientation - 
V3D_ORIENT_CUSTOM) : -1;
 }
 
 int BKE_scene_orientation_slot_get_index(const TransformOrientationSlot 
*orient_slot)
 {
-       return (orient_slot->type == V3D_MANIP_CUSTOM) ? (orient_slot->type + 
orient_slot->index_custom) : orient_slot->type;
+       return (orient_slot->type == V3D_ORIENT_CUSTOM) ? (orient_slot->type + 
orient_slot->index_custom) : orient_slot->type;
 }
 
 /** \} */
@@ -2216,7 +2216,7 @@ void BKE_scene_transform_orientation_remove(
                TransformOrientationSlot *orient_slot = 
&scene->orientation_slots[i];
                if (orient_slot->index_custom == orientation_index) {
                        /* could also use orientation_index-- */
-                       orient_slot->type = V3D_MANIP_GLOBAL;
+                       orient_slot->type = V3D_ORIENT_GLOBAL;
                        orient_slot->index_custom = -1;
                }
        }
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c 
b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index b39efd2b49c..bd156ef03df 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -242,7 +242,7 @@ static void gizmo_mesh_spin_init_draw_prepare(
                Scene *scene = CTX_data_scene(C);
                const TransformOrientationSlot *orient_slot = 
BKE_scene_orientation_slot_get(scene, SCE_GIZMO_SHOW_ROTATE);
                switch (orient_slot->type) {
-                       case V3D_MANIP_VIEW:
+                       case V3D_ORIENT_VIEW:
                        {
                                if (!equals_m3m3(viewinv_m3, 
ggd->prev.viewinv_m3)) {
                                        /* Take care calling refresh from 
draw_prepare,
diff --git a/source/blender/editors/mesh/editmesh_select.c 
b/source/blender/editors/mesh/editmesh_select.c
index fd9e635f5e3..e963771cc66 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -4446,7 +4446,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       RNA_def_enum(ot->srna, "orientation", 
rna_enum_transform_orientation_items, V3D_MANIP_LOCAL, "Axis Mode", "Axis 
orientation");
+       RNA_def_enum(ot->srna, "orientation", 
rna_enum_transform_orientation_items, V3D_ORIENT_LOCAL, "Axis Mode", "Axis 
orientation");
        RNA_def_enum(ot->srna, "sign", axis_sign_items, SELECT_AXIS_POS, "Axis 
Sign", "Side to select");
        RNA_def_enum(ot->srna, "axis", rna_enum_axis_xyz_items, 0, "Axis", 
"Select the axis to compare each vertex on");
        RNA_def_float(ot->srna, "threshold", 0.0001f, 0.000001f, 50.0f,  
"Threshold", "", 0.00001f, 10.0f);
diff --git a/source/blender/editors/transform/transform.c 
b/source/blender/editors/transform/transform.c
index 6ab8d55abeb..2327ead4770 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -985,7 +985,7 @@ static void transform_event_xyz_constraint(TransInfo *t, 
short key_type, char cm
                                stopConstraint(t);
                        }
                        else {
-                               setUserConstraint(t, V3D_MANIP_GLOBAL, 
constraint_axis, msg1);
+                               setUserConstraint(t, V3D_ORIENT_GLOBAL, 
constraint_axis, msg1);
                        }
                }
                else if (!edit_2d) {
@@ -993,7 +993,7 @@ static void transform_event_xyz_constraint(TransInfo *t, 
short key_type, char cm
                                /* First press, constraint to an axis. */
                                t->orientation.index = 0;
                                const short *orientation_ptr = 
t->orientation.types[t->orientation.index];
-                               const short  orientation = orientation_ptr ? 
*orientation_ptr : V3D_MANIP_GLOBAL;
+                               const short  orientation = orientation_ptr ? 
*orientation_ptr : V3D_ORIENT_GLOBAL;
                                if (is_plane == false) {
                                        setUserConstraint(t, orientation, 
constraint_axis, msg2);
                                }
@@ -1010,7 +1010,7 @@ static void transform_event_xyz_constraint(TransInfo *t, 
short key_type, char cm
                                }
                                else {
                                        const short *orientation_ptr = 
t->orientation.types[t->orientation.index];
-                                       const short  orientation = 
orientation_ptr ? *orientation_ptr : V3D_MANIP_GLOBAL;
+                                       const short  orientation = 
orientation_ptr ? *orientation_ptr : V3D_ORIENT_GLOBAL;
                                        if (is_plane == false) {
                                                setUserConstraint(t, 
orientation, constraint_axis, msg2);
                                        }
@@ -1153,7 +1153,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
                                if (ELEM(t->mode, TFM_ROTATION, 
TFM_TRANSLATION, TFM_TRACKBALL, TFM_EDGE_SLIDE, TFM_VERT_SLIDE)) {
 
                                        /* Scale isn't normally very useful 
after extrude along normals, see T39756 */
-                                       if ((t->con.mode & CON_APPLY) && 
(t->con.orientation == V3D_MANIP_NORMAL)) {
+                                       if ((t->con.mode & CON_APPLY) && 
(t->con.orientation == V3D_ORIENT_NORMAL)) {
                                                stopConstraint(t);
                                        }
 
@@ -2138,7 +2138,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator 
*op)
                if (t->spacetype == SPACE_VIEW3D) {
                        if ((prop = RNA_struct_find_property(op->ptr, 
"constraint_orientation")) &&
                            !RNA_property_is_set(op->ptr, prop) &&
-                           (t->orientation.user != V3D_MANIP_CUSTOM_MATRIX))
+                           (t->orientation.user != V3D_ORIENT_CUSTOM_MATRIX))
                        {
                                TransformOrientationSlot *orient_slot = 
&t->scene->orientation_slots[SCE_ORIENT_DEFAULT];
                                orient_slot->type = t->orientation.user;
@@ -2172,20 +2172,20 @@ void saveTransform(bContext *C, TransInfo *t, 
wmOperator *op)
                 * so use the orientation in the constraint if set */
                short orientation = (t->con.mode & CON_APPLY) ? 
t->con.orientation : t->orientation.user;
 
-               if (orientation == V3D_MANIP_CUSTOM) {
+               if (orientation == V3D_ORIENT_CUSTOM) {
                        const int orientation_index_custom = 
BKE_scene_transform_orientation_get_index(
                                t->scene, t->orientation.custom);
 
                        /* Maybe we need a t->con.custom_orientation?
                         * Seems like it would always match 
t->orientation.custom. */
-                       orientation = V3D_MANIP_CUSTOM + 
orientation_index_custom;
-                       BLI_assert(orientation >= V3D_MANIP_CUSTOM);
+                       orientation = V3D_ORIENT_CUSTOM + 
orientation_index_custom;
+                       BLI_assert(orientation >= V3D_ORIENT_CUSTOM);
                }
 
                RNA_float_set_array(op->ptr, "constraint_matrix", 
&t->spacemtx[0][0]);
 
                /* Use 'constraint_matrix' instead. */
-               if (orientation != V3D_MANIP_CUSTOM_MATRIX) {
+               if (orientation != V3D_ORIENT_CUSTOM_MATRIX) {
                        RNA_enum_set(op->ptr, "constraint_orientation", 
orientation);
                }
 
diff --git a/source/blender/editors/transform/transform.h 
b/source/blender/editors/transform/transform.h
index 51a69c952c4..e72075dde21 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -611,7 +611,7 @@ typedef struct TransInfo {
                short           user_alt;
                short           index;
                short           *types[2];
-               /* this gets used when custom_orientation is V3D_MANIP_CUSTOM */
+               /* this gets used when custom_orientation is V3D_ORIENT_CUSTOM 
*/
                TransformOrientation *custom;
        } orientation;
        /** backup from view3d, to restore on end. */
diff --git a/source/blender/editors/transform/transform_constraints.c 
b/source/blender/editors/transform/transform_constraints.c
index 7a67c3cfb32..b0ce411ca23 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -658,7 +658,7 @@ void setUserConstraint(TransInfo *t, short orientation, int 
mode, const char fte
        char text[256];
 
        switch (orientation) {
-               case V3D_MANIP_GLOBAL:
+               case V3D_ORIENT_GLOBAL:
                {
                        float mtx[3][3];
                        BLI_snprintf(text, sizeof(text), ftext, 
IFACE_("global"));
@@ -666,11 +666,11 @@ void setUserConstraint(TransInfo *t, short orientation, 
int mode, const char fte
                        setConstraint(t, mtx, mode, text);
                        break;
                }
-               case V3D_MANIP_LOCAL:
+               case V3D_ORIENT_LOCAL:
                        BLI_snprintf(text, sizeof(text), ftext, 
IFACE_("local"));
                        setLocalConstraint(t, mode, text);
                        break;
-               case V3D_MANIP_NORMAL:
+               case V3D_ORIENT_NORMAL:
                        BLI_snprintf(text, sizeof(text), ftext, 
IFACE_("normal"));
                        if (checkUseAxisMatrix(t)) {
                                setAxisMatrixConstraint(t, mode, text);
@@ -679,23 +679,23 @@ void setUserConstraint(TransInfo *t, short orientation, 
int mode, const char fte
                                setConstraint(t, t->spacemtx, mode, text);
                        }
                        break;
-               case V3D_MANIP_VIEW:
+               case V3D_ORIENT_VIEW:
                        BLI_snprintf(text, sizeof(text), ftext, IFACE_("view"));
                        setConstraint(t, t->spacemtx, mode, text);
                        break;
-               case V3D_MANIP_CURSOR:
+               case V3D_ORIENT_CURSOR:
                        BLI_snprintf(text, sizeof(text), ftext, 
IFACE_("cursor"));
                        setConstraint(t, t->spacemtx, mode, text);
                        break;
-               case V3D_MANIP_GIMBAL:
+               case V3D_ORIENT_GIMBAL:
                        BLI_snprintf(text, sizeof(text), ftex

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to