[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15730] trunk/blender/source/blender/src/ outliner.c: * Added the ability to toggle visibility/ renderability for bones in edit mode or pose mode, in the outliner

Matt Ebb matt at mke3.net
Thu Jul 24 08:21:36 CEST 2008


Revision: 15730
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15730
Author:   broken
Date:     2008-07-24 08:21:33 +0200 (Thu, 24 Jul 2008)

Log Message:
-----------
* Added the ability to toggle visibility/renderability for bones in edit mode or pose mode, in the outliner

Modified Paths:
--------------
    trunk/blender/source/blender/src/outliner.c

Modified: trunk/blender/source/blender/src/outliner.c
===================================================================
--- trunk/blender/source/blender/src/outliner.c	2008-07-24 06:04:03 UTC (rev 15729)
+++ trunk/blender/source/blender/src/outliner.c	2008-07-24 06:21:33 UTC (rev 15730)
@@ -3539,6 +3539,13 @@
 	allqueue(REDRAWBUTSOBJECT, 0);
 }
 
+static void restrictbutton_bone_cb(void *poin, void *poin2)
+{
+	allqueue(REDRAWOOPS, 0);
+	allqueue(REDRAWVIEW3D, 0);
+	allqueue(REDRAWBUTSEDIT, 0);
+}
+
 static void namebutton_cb(void *tep, void *oldnamep)
 {
 	SpaceOops *soops= curarea->spacedata.first;
@@ -3723,6 +3730,25 @@
 				uiButSetFunc(bt, restrictbutton_modifier_cb, ob, NULL);
 				uiButSetFlag(bt, UI_NO_HILITE);
 			}
+			else if(tselem->type==TSE_POSE_CHANNEL)  {
+				bPoseChannel *pchan= (bPoseChannel *)te->directdata;
+				Bone *bone = pchan->bone;
+				
+				uiBlockSetEmboss(block, UI_EMBOSSN);
+				bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
+						(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+				uiButSetFunc(bt, restrictbutton_bone_cb, ob, NULL);
+				uiButSetFlag(bt, UI_NO_HILITE);
+			}
+			else if(tselem->type==TSE_EBONE)  {
+				EditBone *ebone= (EditBone *)te->directdata;
+				
+				uiBlockSetEmboss(block, UI_EMBOSSN);
+				bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
+						(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+				uiButSetFunc(bt, restrictbutton_bone_cb, ob, NULL);
+				uiButSetFlag(bt, UI_NO_HILITE);
+			}
 		}
 		
 		if((tselem->flag & TSE_CLOSED)==0) outliner_draw_restrictbuts(block, soops, &te->subtree);





More information about the Bf-blender-cvs mailing list