diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-28 20:30:56 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-28 20:30:56 +0300 |
commit | 4780f89370d31d3afd2ec19df3ddd1f68306e5da (patch) | |
tree | 71306cd8429d4e6543ec5abad8346160b67993e5 /source/blender/editors/space_view3d/view3d_header.c | |
parent | 1c4150f21138ad0ab6e8b1a41688074e8a87e64c (diff) |
UI:
* Convert pose buttons in the 3dview header to uiItems. Fixes the spacing between pose buttons and opengl render buttons.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 701e9a43f1b..9dbe95d5c0e 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -2253,27 +2253,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) row= uiLayoutRow(layout, 1); uiItemO(row, "", ICON_RENDER_STILL, "SCREEN_OT_opengl_render"); uiItemBooleanO(row, "", ICON_RENDER_ANIMATION, "SCREEN_OT_opengl_render", "animation", 1); - - if (ob && (ob->mode & OB_MODE_POSE)) { - PointerRNA *but_ptr; - uiBut *but; - - xco+= XIC*2; - uiBlockBeginAlign(block); - - uiDefIconButO(block, BUT, "POSE_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco,yco,XIC,YIC, NULL); - uiBlockSetButLock(block, object_data_is_libdata(ob), "Can't edit external libdata"); - xco+= XIC; - - uiDefIconButO(block, BUT, "POSE_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco,yco,XIC,YIC, NULL); - xco+= XIC; - but=uiDefIconButO(block, BUT, "POSE_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEFLIPDOWN, xco,yco,XIC,YIC, NULL); - but_ptr= uiButGetOperatorPtrRNA(but); - RNA_boolean_set(but_ptr, "flipped", 1); - uiBlockEndAlign(block); - header_xco_step(ar, &xco, &yco, &maxco, XIC); - + if(ob && (ob->mode & OB_MODE_POSE)) { + row= uiLayoutRow(layout, 1); + uiItemO(row, "", ICON_COPYDOWN, "POSE_OT_copy"); + uiItemO(row, "", ICON_PASTEDOWN, "POSE_OT_paste"); + uiItemBooleanO(row, "", ICON_PASTEFLIPDOWN, "POSE_OT_paste", "flipped", 1); } } } |