diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 7d121f76016..01d7ba4d0a3 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -216,17 +216,6 @@ static const EnumPropertyItem buttons_context_items[] = { {0, NULL, 0, NULL, NULL} }; -/* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */ -static const EnumPropertyItem buttons_texture_context_items[] = { - {SB_TEXC_MATERIAL, "MATERIAL", ICON_MATERIAL, "", "Show material textures"}, - {SB_TEXC_WORLD, "WORLD", ICON_WORLD, "", "Show world textures"}, - {SB_TEXC_LAMP, "LAMP", ICON_LAMP, "", "Show lamp textures"}, - {SB_TEXC_PARTICLES, "PARTICLES", ICON_PARTICLES, "", "Show particles textures"}, - {SB_TEXC_LINESTYLE, "LINESTYLE", ICON_LINE_DATA, "", "Show linestyle textures"}, - {SB_TEXC_OTHER, "OTHER", ICON_TEXTURE, "", "Show other data textures"}, - {0, NULL, 0, NULL, NULL} -}; - static const EnumPropertyItem buttons_collection_context_items[] = { {SB_COLLECTION_CTX_VIEW_LAYER, "VIEW_LAYER", ICON_RENDERLAYERS, "", "Show material textures"}, {SB_COLLECTION_CTX_GROUP, "GROUP", ICON_GROUP, "", "Show world textures"}, @@ -1147,50 +1136,6 @@ static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value) sbuts->re_align = 1; } -static const EnumPropertyItem *rna_SpaceProperties_texture_context_itemf( - bContext *C, PointerRNA *UNUSED(ptr), - PropertyRNA *UNUSED(prop), bool *r_free) -{ - EnumPropertyItem *item = NULL; - int totitem = 0; - - if (ED_texture_context_check_world(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_WORLD); - } - - if (ED_texture_context_check_lamp(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_LAMP); - } - else if (ED_texture_context_check_material(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_MATERIAL); - } - - if (ED_texture_context_check_particles(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_PARTICLES); - } - - if (ED_texture_context_check_linestyle(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_LINESTYLE); - } - - if (ED_texture_context_check_others(C)) { - RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_OTHER); - } - - RNA_enum_item_end(&item, &totitem); - *r_free = true; - - return item; -} - -static void rna_SpaceProperties_texture_context_set(PointerRNA *ptr, int value) -{ - SpaceButs *sbuts = (SpaceButs *)(ptr->data); - - /* User action, no need to keep "better" value in prev here! */ - sbuts->texture_context = sbuts->texture_context_prev = value; -} - /* Space Console */ static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value) { @@ -2773,18 +2718,6 @@ static void rna_def_space_buttons(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL); - prop = RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, buttons_texture_context_items); - RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_texture_context_set", - "rna_SpaceProperties_texture_context_itemf"); - RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit"); - RNA_def_property_update(prop, NC_TEXTURE, NULL); - - prop = RNA_def_property(srna, "use_limited_texture_context", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_TEX_USER_LIMITED); - RNA_def_property_ui_text(prop, "Limited Texture Context", - "Use the limited version of texture user (for 'old shading' mode)"); - prop = RNA_def_property(srna, "collection_context", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, buttons_collection_context_items); RNA_def_property_ui_text(prop, "Collection Context", "Which collection we want to show"); @@ -4148,7 +4081,6 @@ static void rna_def_space_node(BlenderRNA *brna) PropertyRNA *prop; static const EnumPropertyItem texture_id_type_items[] = { - {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"}, {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, #ifdef WITH_FREESTYLE |