Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_gpencil_modifier.c
| Show First 20 Lines • Show All 2,010 Lines • ▼ Show 20 Lines | |||||
| static void rna_def_modifier_gpencilopacity(BlenderRNA *brna) | static void rna_def_modifier_gpencilopacity(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "OpacityGpencilModifier", "GpencilModifier"); | srna = RNA_def_struct(brna, "OpacityGpencilModifier", "GpencilModifier"); | ||||
| RNA_def_struct_ui_text(srna, "Opacity Modifier", "Opacity of Strokes modifier"); | RNA_def_struct_ui_text(srna, "Opacity Modifier", "Opacity of Strokes modifier"); | ||||
| RNA_def_struct_sdna(srna, "OpacityGpencilModifierData"); | RNA_def_struct_sdna(srna, "OpacityGpencilModifierData"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_MOD_OPACITY); | RNA_def_struct_ui_icon(srna, ICON_MOD_OPACITY); | ||||
pioverfour: Object Offset is already the name of the boolean prop which activates object-based offsetting. | |||||
Done Inline ActionsThe property should be called "Offset Object" and the UI text should be overwritten in the modifier UI to be "Object". I'm not totally sure about this, but I think the boolean property can be called "Use Object Offset" in RNA, and just use the "Object Offset" text in the UI, where the context of the checkbox implies the "Use" HooglyBoogly: The property should be called "Offset Object" and the UI text should be overwritten in the… | |||||
| RNA_define_lib_overridable(true); | RNA_define_lib_overridable(true); | ||||
| prop = RNA_def_property(srna, "modify_color", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "modify_color", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, modifier_modify_opacity_items); | RNA_def_property_enum_items(prop, modifier_modify_opacity_items); | ||||
| RNA_def_property_ui_text(prop, "Mode", "Set what colors of the stroke are affected"); | RNA_def_property_ui_text(prop, "Mode", "Set what colors of the stroke are affected"); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | ||||
| ▲ Show 20 Lines • Show All 234 Lines • ▼ Show 20 Lines | static void rna_def_modifier_gpencilarray(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Count", "Number of items"); | RNA_def_property_ui_text(prop, "Count", "Number of items"); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | ||||
| /* Offset parameters */ | /* Offset parameters */ | ||||
| prop = RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "object"); | RNA_def_property_pointer_sdna(prop, NULL, "object"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Object Offset", | "Offset Object", | ||||
| "Use the location and rotation of another object to determine the distance and " | "Use the location and rotation of another object to determine the distance and " | ||||
| "rotational change between arrayed items"); | "rotational change between arrayed items"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update"); | ||||
| prop = RNA_def_property(srna, "constant_offset", PROP_FLOAT, PROP_TRANSLATION); | prop = RNA_def_property(srna, "constant_offset", PROP_FLOAT, PROP_TRANSLATION); | ||||
| RNA_def_property_float_sdna(prop, NULL, "offset"); | RNA_def_property_float_sdna(prop, NULL, "offset"); | ||||
| RNA_def_property_ui_text(prop, "Constant Offset", "Value for the distance between items"); | RNA_def_property_ui_text(prop, "Constant Offset", "Value for the distance between items"); | ||||
| ▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | static void rna_def_modifier_gpencilarray(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_OFFSET); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_OFFSET); | ||||
| RNA_def_property_ui_text(prop, "Offset", "Enable offset"); | RNA_def_property_ui_text(prop, "Offset", "Enable offset"); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | ||||
| prop = RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_OB_OFFSET); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_OB_OFFSET); | ||||
| RNA_def_property_ui_text(prop, "Object Offset", "Enable object offset"); | RNA_def_property_ui_text(prop, "Use Object Offset", "Enable object offset"); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | ||||
| prop = RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_RELATIVE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_ARRAY_USE_RELATIVE); | ||||
| RNA_def_property_ui_text(prop, "Shift", "Enable shift"); | RNA_def_property_ui_text(prop, "Shift", "Enable shift"); | ||||
| RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); | ||||
| prop = RNA_def_property(srna, "use_uniform_random_scale", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_uniform_random_scale", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 2,260 Lines • Show Last 20 Lines | |||||
Object Offset is already the name of the boolean prop which activates object-based offsetting. There is no need to clarify that the object is for the offset, it’s very clear from the UI:
More importantly, this is an issue with translation because Object Offset can be translated either “[Do] offset by object” or “Object to use to offset”, and it’s easier and cleaner to fix the message than add a disambiguation.
Also, the equivalent modifier for non-GP objects uses “Object”, so it’s better to use the same name for consistency.