[Bf-blender-cvs] [63729bc11f9] master: UI: use same light icon for all light types in properties editor tabs.

Joep Peters noreply at git.blender.org
Tue Jan 22 17:05:56 CET 2019


Commit: 63729bc11f9f99fe4e00cae0ddcbff6220b9715b
Author: Joep Peters
Date:   Tue Jan 22 15:35:51 2019 +0100
Branches: master
https://developer.blender.org/rB63729bc11f9f99fe4e00cae0ddcbff6220b9715b

UI: use same light icon for all light types in properties editor tabs.

Differential Revision: https://developer.blender.org/D4237

===================================================================

M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/makesrna/intern/rna_lightprobe.c

===================================================================

diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 72457ce079c..35a07e41844 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -653,7 +653,10 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
 				ptr = &path->ptr[path->len - 1];
 
 				if (ptr->type) {
-					sbuts->dataicon = RNA_struct_ui_icon(ptr->type);
+					if(RNA_struct_is_a(ptr->type, &RNA_Light))
+						sbuts->dataicon = ICON_OUTLINER_DATA_LIGHT;
+					else
+						sbuts->dataicon = RNA_struct_ui_icon(ptr->type);
 				}
 				else {
 					sbuts->dataicon = ICON_EMPTY_DATA;
diff --git a/source/blender/makesrna/intern/rna_lightprobe.c b/source/blender/makesrna/intern/rna_lightprobe.c
index ee8f2be39ee..45c775476b5 100644
--- a/source/blender/makesrna/intern/rna_lightprobe.c
+++ b/source/blender/makesrna/intern/rna_lightprobe.c
@@ -74,7 +74,7 @@ static void rna_def_lightprobe(BlenderRNA *brna)
 
 	srna = RNA_def_struct(brna, "LightProbe", "ID");
 	RNA_def_struct_ui_text(srna, "LightProbe", "Light Probe data-block for lighting capture objects");
-	RNA_def_struct_ui_icon(srna, ICON_LIGHTPROBE_CUBEMAP);
+	RNA_def_struct_ui_icon(srna, ICON_OUTLINER_OB_LIGHTPROBE);
 
 	prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_items(prop, lightprobe_type_items);



More information about the Bf-blender-cvs mailing list