diff options
author | Julian Eisel <julian@blender.org> | 2022-08-04 16:39:36 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-04 16:57:08 +0300 |
commit | 8e3eea372d4a6973dc700fafb3feed2cda511b25 (patch) | |
tree | b7d0885d990c591f5992385cc20df57bf4c248d1 /source/blender/makesrna/intern | |
parent | 735b26053eecd3df7679c16b69910f3c65cfc808 (diff) |
UI: Pass modifier & constraint icon to the corresponding RNA base type
This basically lets the UI use the constraint or modifier icon, whenever
refering to constraints/modifiers via RNA pointers. Used by D15606, so
that the "Modifiers" tree element to group the individual modifiers
together gets the right icon without hardcoded handling.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 986de0930ed..719c7441174 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -3450,6 +3450,7 @@ void RNA_def_constraint(BlenderRNA *brna) RNA_def_struct_refine_func(srna, "rna_ConstraintType_refine"); RNA_def_struct_path_func(srna, "rna_Constraint_path"); RNA_def_struct_sdna(srna, "bConstraint"); + RNA_def_struct_ui_icon(srna, ICON_CONSTRAINT); /* strings */ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 4810784b3f7..0e420f7556f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -7243,6 +7243,7 @@ void RNA_def_modifier(BlenderRNA *brna) RNA_def_struct_refine_func(srna, "rna_Modifier_refine"); RNA_def_struct_path_func(srna, "rna_Modifier_path"); RNA_def_struct_sdna(srna, "ModifierData"); + RNA_def_struct_ui_icon(srna, ICON_MODIFIER); /* strings */ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); |