Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 1,061 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *ptr, | PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| View3DShading *shading = (View3DShading *)ptr->data; | View3DShading *shading = (View3DShading *)ptr->data; | ||||
| int totitem = 0; | int totitem = 0; | ||||
| if (shading->type == OB_SOLID) { | if (shading->type == OB_WIRE) { | ||||
| r_free = false; | |||||
| return rna_enum_shading_color_type_items; | |||||
| } | |||||
| else if (shading->type == OB_WIRE) { | |||||
| EnumPropertyItem *item = NULL; | EnumPropertyItem *item = NULL; | ||||
| RNA_enum_items_add_value( | RNA_enum_items_add_value( | ||||
| &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR); | &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR); | ||||
| RNA_enum_items_add_value( | RNA_enum_items_add_value( | ||||
| &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_OBJECT_COLOR); | &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_OBJECT_COLOR); | ||||
| RNA_enum_items_add_value( | RNA_enum_items_add_value( | ||||
| &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_RANDOM_COLOR); | &item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_RANDOM_COLOR); | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item; | return item; | ||||
| } | } | ||||
| else { | else { | ||||
| *r_free = false; | /* Solid mode, or lookdev mode for worbench engine. */ | ||||
sergey: `workbench`. | |||||
| return NULL; | r_free = false; | ||||
| return rna_enum_shading_color_type_items; | |||||
| } | } | ||||
| } | } | ||||
| /* Studio light */ | /* Studio light */ | ||||
| static int rna_View3DShading_studio_light_get(PointerRNA *ptr) | static int rna_View3DShading_studio_light_get(PointerRNA *ptr) | ||||
| { | { | ||||
| View3DShading *shading = (View3DShading *)ptr->data; | View3DShading *shading = (View3DShading *)ptr->data; | ||||
| char *dna_storage = shading->studio_light; | char *dna_storage = shading->studio_light; | ||||
| ▲ Show 20 Lines • Show All 5,140 Lines • Show Last 20 Lines | |||||
workbench.