diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 928ed15755a..db4db299f92 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -102,7 +102,8 @@ EnumPropertyItem viewport_shade_items[] = { {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"}, {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"}, {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"}, - {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Textured", "Display the object solid, with face-assigned textures"}, + {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Texture", "Display the object solid, with a texture"}, + {OB_MATERIAL, "MATERIAL", ICON_MATERIAL_DATA, "Material", "Display objects solid, with GLSL material"}, {OB_RENDER, "RENDERED", ICON_SMOOTH, "Rendered", "Display render preview"}, {0, NULL, 0, NULL, NULL}}; @@ -114,13 +115,14 @@ EnumPropertyItem viewport_shade_items[] = { #include "BLI_math.h" -#include "BKE_screen.h" #include "BKE_animsys.h" #include "BKE_brush.h" #include "BKE_colortools.h" #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_paint.h" +#include "BKE_scene.h" +#include "BKE_screen.h" #include "ED_image.h" #include "ED_node.h" @@ -461,10 +463,12 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_WIRE); RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID); RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE); + + if(scene_use_new_shading_nodes(scene)) + RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL); - if(type->view_draw) { + if(type->view_draw) RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_RENDER); - } RNA_enum_item_end(&item, &totitem); *free= 1; |