[Bf-blender-cvs] [6ea01dc509f] master: UI: Use the 3D cursor icon for the RNA struct

Hans Goudey noreply at git.blender.org
Wed Jan 6 21:00:52 CET 2021


Commit: 6ea01dc509f82458b2e7f1d040dc4d2f0e7820fe
Author: Hans Goudey
Date:   Wed Jan 6 14:00:44 2021 -0600
Branches: master
https://developer.blender.org/rB6ea01dc509f82458b2e7f1d040dc4d2f0e7820fe

UI: Use the 3D cursor icon for the RNA struct

Since there is a specific icon to represent the 3D cursor it makes sense
to add it to the RNA struct. This struct's icon is only displayed in the
Data API section of the outliner.

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

M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 265d9c5b98e..af31f16f4e0 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2821,6 +2821,7 @@ static void rna_def_view3d_cursor(BlenderRNA *brna)
   RNA_def_struct_sdna(srna, "View3DCursor");
   RNA_def_struct_path_func(srna, "rna_View3DCursor_path");
   RNA_def_struct_ui_text(srna, "3D Cursor", "");
+  RNA_def_struct_ui_icon(srna, ICON_CURSOR);
 
   prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ_LENGTH);
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);



More information about the Bf-blender-cvs mailing list