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
This commit is contained in:
@@ -416,6 +416,7 @@ Scene *add_scene(char *name)
|
||||
pset->brushtype= PE_BRUSH_NONE;
|
||||
pset->draw_step= 2;
|
||||
pset->fade_frames= 2;
|
||||
pset->selectmode= SCE_SELECT_PATH;
|
||||
for(a=0; a<PE_TOT_BRUSH; a++) {
|
||||
pset->brush[a].strength= 50;
|
||||
pset->brush[a].size= 50;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -341,9 +341,9 @@ static void rna_def_particle_edit(BlenderRNA *brna)
|
||||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem select_mode_items[] = {
|
||||
{SCE_SELECT_PATH, "PATH", ICON_EDGESEL, "Path", ""}, // XXX icon
|
||||
{SCE_SELECT_POINT, "POINT", ICON_VERTEXSEL, "Point", ""}, // XXX icon
|
||||
{SCE_SELECT_END, "END", ICON_FACESEL, "End", "E"}, // XXX icon
|
||||
{SCE_SELECT_PATH, "PATH", ICON_PARTICLE_PATH, "Path", "Path edit mode"},
|
||||
{SCE_SELECT_POINT, "POINT", ICON_PARTICLE_POINT, "Point", "Point select mode"},
|
||||
{SCE_SELECT_END, "TIP", ICON_PARTICLE_TIP, "Tip", "Tip select mode"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem puff_mode[] = {
|
||||
|
||||
@@ -756,6 +756,12 @@ static void rna_def_space_3dview(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "occlude_geometry", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ZBUF_SELECT);
|
||||
RNA_def_property_ui_text(prop, "Occlude Geometry", "Limit selection to visible (clipped with depth buffer)");
|
||||
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_View3D_display_background_image_set");
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPIC);
|
||||
|
||||
Reference in New Issue
Block a user