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.
This commit is contained in:
parent
735b26053e
commit
8e3eea372d
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue