Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-11-28 21:19:34 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2009-11-28 21:19:34 +0300
commitda442c1d43c6a0077d13dbf11acd1c4de5feca78 (patch)
tree604a9efaa33f21f0dcdc890b76c4c9a7d9260863 /source/blender/editors/space_view3d/view3d_header.c
parentbaa4a9c7d4dd2da81e74331889475e13eb62cd14 (diff)
UI/RNA:
* Set default particleedit selection mode in add scene (TODO: not yet changed in the default blend) * Corrected names for particleedit selection mode in RNA, added icons * Added occlude geometry flag to view3d RNA * Converted particleedit buttons to uiItems in view3d header
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 9dbe95d5c0e..997a031e605 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -1993,6 +1993,7 @@ static int object_mode_icon(int mode)
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
{
+ bScreen *screen= CTX_wm_screen(C);
ARegion *ar= CTX_wm_region(C);
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
@@ -2232,21 +2233,17 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
BKE_mesh_end_editmesh(obedit->data, em);
}
else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
- uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_PARTICLE_PATH, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Path edit mode");
- xco+= XIC;
- uiDefIconButBitI(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_PARTICLE_POINT, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Point select mode");
- xco+= XIC;
- uiDefIconButBitI(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_PARTICLE_TIP, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Tip select mode");
- xco+= XIC;
- uiBlockEndAlign(block);
-
- if(v3d->drawtype > OB_WIRE) {
- uiDefIconButBitS(block, TOG, V3D_ZBUF_SELECT, B_REDR, ICON_ORTHO, xco,yco,XIC,YIC, &v3d->flag, 1.0, 0.0, 0, 0, "Limit selection to visible (clipped with depth buffer)");
- xco+= XIC;
- }
- uiBlockEndAlign(block);
- header_xco_step(ar, &xco, &yco, &maxco, XIC);
+ PointerRNA v3dptr;
+ PointerRNA particleptr;
+
+ RNA_pointer_create(&screen->id, &RNA_Space3DView, v3d, &v3dptr);
+ RNA_pointer_create(&scene->id, &RNA_ParticleEdit, &ts->particle, &particleptr);
+
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, "", 0, &particleptr, "selection_mode", UI_ITEM_R_EXPAND+UI_ITEM_R_ICON_ONLY);
+
+ if(v3d->drawtype > OB_WIRE)
+ uiItemR(layout, "", 0, &v3dptr, "occlude_geometry", UI_ITEM_R_ICON_ONLY);
}
/* OpenGL Render */