Page Menu
Home
Search
Configure Global Search
Log In
Files
F3555
armature_layer.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Diego Borghetti (bdiego)
Nov 13 2013, 1:10 PM
Size
2 KB
Subscribers
None
armature_layer.txt
View Options
? user-config.py
? tools/Blender.pyc
? tools/__init__.pyc
? tools/bcolors.pyc
? tools/btools.pyc
Index: source/blender/src/drawview.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawview.c,v
retrieving revision 1.274
diff -u -r1.274 drawview.c
--- source/blender/src/drawview.c 26 Feb 2007 20:36:03 -0000 1.274
+++ source/blender/src/drawview.c 28 Feb 2007 23:20:37 -0000
@@ -2140,6 +2140,16 @@
}
}
+static void panel_armature_layer_cb (void *lay_v, void *value_v)
+{
+ short *layer= lay_v;
+ int value= (int)value_v;
+
+ if(*layer==0 || G.qual==0) *layer= value;
+ allqueue(REDRAWBUTSEDIT, 0);
+ allqueue(REDRAWACTION, 0);
+ allqueue(REDRAWNLA, 0);
+}
static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
{
@@ -2149,6 +2159,8 @@
TransformProperties *tfp;
float lim;
static char hexcol[128];
+ bArmature *arm;
+ int a;
if(ob==NULL) return;
@@ -2162,9 +2174,11 @@
uiSetPanelHandler(VIEW3D_HANDLER_OBJECT); // for close and esc
if((G.f & G_SCULPTMODE) && !G.obedit) {
- if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 425, 234)) return;
- } else {
+ if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 425, 314)) return;
+ } else if ((G.f & G_SCULPTMODE) || (ob->type != OB_ARMATURE)) {
if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 204)) return;
+ } else {
+ if(!uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 284)) return;
}
if(ob->id.lib) uiSetButLock(1, "Can't edit library data");
@@ -2273,6 +2287,38 @@
uiBlockEndAlign(block);
}
}
+
+ if ((ob->type != OB_ARMATURE) || (G.f & G_SCULPTMODE))
+ {
+ uiClearButLock ();
+ return;
+ }
+
+ uiDefBut (block, LABEL, 0, "Armature Layers:", 10, -20, 150, 19, 0, 0, 0, 0, 0, "");
+ arm = ob->data;
+
+ /* layers */
+ uiBlockBeginAlign (block);
+
+ for (a = 0; a < 8; a++)
+ {
+ bt = uiDefButBitS (block, BUT_TOGDUAL, 1<<a, REDRAWVIEW3D, "", 10 + 19 * a, -40, 19, 19, &arm->layer, 0, 0, 0, 0, "");
+ uiButSetFunc (bt, panel_armature_layer_cb, &arm->layer, (void *)(1<<a));
+ }
+
+ uiBlockBeginAlign (block);
+
+ for (a = 8; a < 16; a++)
+ {
+ bt = uiDefButBitS (block, BUT_TOGDUAL, 1<<a, REDRAWVIEW3D, "", 10 + 19 * (a-8), -60, 19, 19, &arm->layer, 0, 0, 0, 0, "");
+ uiButSetFunc (bt, panel_armature_layer_cb, &arm->layer, (void *)(1<<a));
+ }
+
+ /* quite bad here, but I don't know a better place for copy... */
+ if(ob->pose)
+ ob->pose->proxy_layer= arm->layer;
+
+ uiBlockEndAlign (block);
uiClearButLock();
}
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6f/c1/14f1059e5b853356d3d7ac9d8ee4
Event Timeline
Log In to Comment