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:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_space.c8
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c21
2 files changed, 8 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 13ea2dd436e..c886f19d134 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -766,6 +766,9 @@ static const EnumPropertyItem *rna_View3DShading_studio_light_itemf(
const int flags = (STUDIOLIGHT_EXTERNAL_FILE | STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
LISTBASE_FOREACH(StudioLight *, sl, BKE_studiolight_listbase()) {
+ if ((sl->flag & STUDIOLIGHT_DISABLED)){
+ continue;
+ }
int icon_id = (v3d->shading.flag & V3D_SHADING_MATCAP_FLIP_X) ? sl->icon_id_matcap_flipped: sl->icon_id_matcap;
if ((sl->flag & flags) == flags) {
EnumPropertyItem tmp = {sl->index, sl->name, icon_id, sl->name, ""};
@@ -775,10 +778,13 @@ static const EnumPropertyItem *rna_View3DShading_studio_light_itemf(
}
else {
LISTBASE_FOREACH(StudioLight *, sl, BKE_studiolight_listbase()) {
+ if ((sl->flag & STUDIOLIGHT_DISABLED)){
+ continue;
+ }
int icon_id = sl->icon_id_irradiance;
bool show_studiolight = false;
- if ((sl->flag & STUDIOLIGHT_INTERNAL)) {
+ if (sl->flag & STUDIOLIGHT_INTERNAL) {
/* always show internal lights */
show_studiolight = true;
}
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 215db672e02..6e0f95a33b7 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -703,24 +703,9 @@ static int rna_UserDef_studiolight_index_get(PointerRNA *ptr)
static int rna_UserDef_studiolight_is_user_defined_get(PointerRNA *ptr)
{
StudioLight *sl = (StudioLight *)ptr->data;
- return (sl->flag & STUDIOLIGHT_USER_DEFINED) > 0;
+ return (sl->flag & STUDIOLIGHT_USER_DEFINED) > 0 && (sl->flag & STUDIOLIGHT_DISABLED) == 0;
}
-/* StudioLight.show_expanded */
-static int rna_UserDef_studiolight_show_expanded_get(PointerRNA *ptr)
-{
- StudioLight *sl = (StudioLight *)ptr->data;
- return (sl->flag & STUDIOLIGHT_UI_EXPANDED) > 0;
-}
-
-static void rna_UserDef_studiolight_show_expanded_set(PointerRNA *ptr, const bool value)
-{
- StudioLight *sl = (StudioLight *)ptr->data;
- sl->flag ^= STUDIOLIGHT_UI_EXPANDED;
- sl->flag |= value ? STUDIOLIGHT_UI_EXPANDED : 0;
-}
-
-
/* StudioLight.orientation */
static int rna_UserDef_studiolight_orientation_get(PointerRNA *ptr)
@@ -3269,10 +3254,6 @@ static void rna_def_userdef_studiolight(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "User Defined", "");
- prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_UserDef_studiolight_show_expanded_get", "rna_UserDef_studiolight_show_expanded_set");
- RNA_def_property_ui_text(prop, "Show Expanded", "");
-
prop = RNA_def_property(srna, "orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rna_enum_studio_light_orientation_items);
RNA_def_property_enum_funcs(prop, "rna_UserDef_studiolight_orientation_get", "rna_UserDef_studiolight_orientation_set", NULL);