[Bf-blender-cvs] [d30f701e84c] master: Cleanup: Turn some 'eTFlag' into macros

Germano Cavalcante noreply at git.blender.org
Mon Apr 25 17:36:11 CEST 2022


Commit: d30f701e84ccc521caca80f6c9876b6746c49f5f
Author: Germano Cavalcante
Date:   Mon Apr 25 12:35:43 2022 -0300
Branches: master
https://developer.blender.org/rBd30f701e84ccc521caca80f6c9876b6746c49f5f

Cleanup: Turn some 'eTFlag' into macros

Some of the enum values are a mixture of others and make it difficult
for the IDE to identify them.

Separating these values makes debugging easier.

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

M	source/blender/editors/transform/transform.h

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

diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index ea0e3708672..68c9a1c23c3 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -92,12 +92,10 @@ typedef enum {
   /** restrictions flags */
   T_NO_CONSTRAINT = 1 << 2,
   T_NULL_ONE = 1 << 3,
-  T_ALL_RESTRICTIONS = T_NO_CONSTRAINT | T_NULL_ONE,
 
   T_PROP_EDIT = 1 << 4,
   T_PROP_CONNECTED = 1 << 5,
   T_PROP_PROJECTED = 1 << 6,
-  T_PROP_EDIT_ALL = T_PROP_EDIT | T_PROP_CONNECTED | T_PROP_PROJECTED,
 
   T_V3D_ALIGN = 1 << 7,
   /** For 2D views such as UV or f-curve. */
@@ -138,12 +136,15 @@ typedef enum {
   T_AUTOSPLIT = 1 << 21,
 
   /** Use drag-start position of the event, otherwise use the cursor coordinates (unmodified). */
-  T_EVENT_DRAG_START = (1 << 22),
+  T_EVENT_DRAG_START = 1 << 22,
 
   /** No cursor wrapping on region bounds */
   T_NO_CURSOR_WRAP = 1 << 23,
 } eTFlag;
 
+#define T_ALL_RESTRICTIONS (T_NO_CONSTRAINT | T_NULL_ONE)
+#define T_PROP_EDIT_ALL (T_PROP_EDIT | T_PROP_CONNECTED | T_PROP_PROJECTED)
+
 /** #TransInfo.modifiers */
 typedef enum {
   MOD_CONSTRAINT_SELECT_AXIS = 1 << 0,



More information about the Bf-blender-cvs mailing list