Revert 7142b970853f209f6c43319b7f862bcbdbea3728 (transform toggle node hiding)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 17 Feb 2014 03:44:49 +0000 (14:44 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 17 Feb 2014 03:46:16 +0000 (14:46 +1100)
D187 was committed without review and later rejected by Brecht and myself.

source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c

index a7d2ee35be337b98b70539959ffe1ee12063180b..4269e18734eb788e969e004f4ced7c9b804490bc 100644 (file)
@@ -1438,13 +1438,6 @@ int transformEvent(TransInfo *t, const wmEvent *event)
                                        handled = true;
                                }
                                break;
-                       case HKEY:
-                               if (t->spacetype == SPACE_NODE) {
-                                       t->flag ^= T_TOGGLE_HIDDEN;
-                                       t->redraw |= TREDRAW_HARD;
-                                       handled = true;
-                               }
-                               break;
                        default:
                                break;
                }
index 5bd1e27980c9c0bec0a50d828b6dbe4a8855c534..5cac49aff3427723a46547d31c8b8c094f3e8e0f 100644 (file)
@@ -424,7 +424,6 @@ typedef struct TransInfo {
 
        /* alternative transformation. used to add offset to tracking markers */
 #define T_ALT_TRANSFORM                (1 << 24)
-#define T_TOGGLE_HIDDEN                (1 << 25)       /* node editor: toggle state of the hidden flags */
 
 /* TransInfo->modifiers */
 #define        MOD_CONSTRAINT_SELECT   0x01
@@ -478,7 +477,6 @@ typedef struct TransInfo {
 #define TD_MOVEHANDLE2         (1 << 18)
 #define TD_PBONE_LOCAL_MTX_P (1 << 19) /* exceptional case with pose bone rotating when a parent bone has 'Local Location' option enabled and rotating also transforms it. */
 #define TD_PBONE_LOCAL_MTX_C (1 << 20) /* same as above but for a child bone */
-#define TD_HIDDEN              (1 << 21)       /* for hide toggling node editor */
 
 /* transsnap->status */
 #define SNAP_FORCED            1
index 053a69faaaf0262f1ca7da3ae45828d488a982ec..95fe8beb76a52115b58276585d4f5022c61c9a43 100644 (file)
@@ -2374,7 +2374,6 @@ cleanup:
 void flushTransNodes(TransInfo *t)
 {
        const float dpi_fac = UI_DPI_FAC;
-       bool hidden_state;
        int a;
        TransData *td;
        TransData2D *td2d;
@@ -2393,18 +2392,6 @@ void flushTransNodes(TransInfo *t)
                node->locx = td2d->loc[0] / dpi_fac;
                node->locy = td2d->loc[1] / dpi_fac;
 #endif
-               /* update node hidden state with transform data TD_HIDDEN + transformInfo T_TOGGLE_HIDDEN */
-               hidden_state = (td->flag & TD_HIDDEN) != 0;
-               if (t->state != TRANS_CANCEL) {
-                       hidden_state ^= (t->flag & T_TOGGLE_HIDDEN) > 0;
-               }
-
-               if (hidden_state) {
-                       node->flag |= NODE_HIDDEN;
-               }
-               else {
-                       node->flag &= ~NODE_HIDDEN;
-               }
        }
        
        /* handle intersection with noodles */
@@ -6023,9 +6010,6 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node, const
        td->ext = NULL; td->val = NULL;
 
        td->flag |= TD_SELECTED;
-       if (node->flag & NODE_HIDDEN) {
-               td->flag |= TD_HIDDEN;
-       }
        td->dist = 0.0;
 
        unit_m3(td->mtx);
@@ -6060,8 +6044,6 @@ static void createTransNodeData(bContext *UNUSED(C), TransInfo *t)
 
        /* nodes dont support PET and probably never will */
        t->flag &= ~T_PROP_EDIT_ALL;
-       /* initial: do not toggle hidden */
-       t->flag &= ~T_TOGGLE_HIDDEN;
 
        /* set transform flags on nodes */
        for (node = snode->edittree->nodes.first; node; node = node->next) {