diff options
author | Bastien Montagne <bastien@blender.org> | 2021-11-03 18:12:13 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-11-03 18:13:46 +0300 |
commit | ec5d2e687232887acde5cda9352828c59438da35 (patch) | |
tree | d10761dee5e261f8247362a28892091402c14fe3 /source | |
parent | ef30a876b5ef02ec875eba14683b9751abc71381 (diff) |
Add documentation for some 'hidden' RNA properties.
Even never-shown RNA properties should have at least a description, as
this is used by API doc generation scripts.
NOTE: this is more of an opportunistic set of changes than a proper
complete fix of that loack of documentation.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 12 |
3 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 6a36ef07dee..01889a1b0a9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -12773,6 +12773,8 @@ static void rna_def_nodetree(BlenderRNA *brna) prop = RNA_def_property(srna, "view_center", PROP_FLOAT, PROP_XYZ); RNA_def_property_array(prop, 2); RNA_def_property_float_sdna(prop, NULL, "view_center"); + RNA_def_property_ui_text( + prop, "", "The current location (offset) of the view for this Node Tree"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* AnimData */ diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 7f997109920..186222d2ca0 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -985,10 +985,12 @@ static void rna_def_pointcache_common(StructRNA *srna) prop = RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKED); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "", "The cache is baked"); prop = RNA_def_property(srna, "is_baking", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKING); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "", "The cache is being baked"); prop = RNA_def_property(srna, "use_disk_cache", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_DISK_CACHE); @@ -999,11 +1001,13 @@ static void rna_def_pointcache_common(StructRNA *srna) prop = RNA_def_property(srna, "is_outdated", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_OUTDATED); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Cache is outdated", ""); + RNA_def_property_ui_text(prop, "Cache Is Outdated", ""); prop = RNA_def_property(srna, "is_frame_skip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_FRAMES_SKIPPED); RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text( + prop, "", "Some frames were skipped while baking/saving that cache"); prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 21ffba074fa..c73599c19ac 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -1451,6 +1451,11 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); RNA_def_property_string_default(prop, BLT_I18NCONTEXT_DEFAULT_BPYRNA); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text(prop, + "", + "Specific translation context, only define when the label needs to be " + "disambiguated from others using the exact same label"); + RNA_define_verify_sdna(true); prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); @@ -1460,14 +1465,21 @@ static void rna_def_panel(BlenderRNA *brna) // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_clear_flag(prop, PROP_NEVER_NULL); /* check for NULL */ + RNA_def_property_ui_text(prop, "", "The panel tooltip"); prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->category"); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text( + prop, + "", + "The category (tab) in which the panel will be displayed, when applicable"); prop = RNA_def_property(srna, "bl_owner_id", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->owner_id"); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text( + prop, "", "The ID owning the data displayed in the panel, if any"); prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); |