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.
This commit is contained in:
Bastien Montagne 2021-11-03 16:12:13 +01:00
parent ef30a876b5
commit ec5d2e6872
4 changed files with 27 additions and 1 deletions

View File

@ -43,22 +43,30 @@ class WM_OT_previews_batch_generate(Operator):
files: CollectionProperty(
type=OperatorFileListElement,
options={'HIDDEN', 'SKIP_SAVE'},
name="",
description="Collection of file paths with common `directory` root",
)
directory: StringProperty(
maxlen=1024,
subtype='FILE_PATH',
options={'HIDDEN', 'SKIP_SAVE'},
name="",
description="Root path of all files listed in `files` collection",
)
# Show only images/videos, and directories!
filter_blender: BoolProperty(
default=True,
options={'HIDDEN', 'SKIP_SAVE'},
name="",
description="Show Blender files in the File Browser",
)
filter_folder: BoolProperty(
default=True,
options={'HIDDEN', 'SKIP_SAVE'},
name="",
description="Show folders in the File Browser",
)
# -----------

View File

@ -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 */

View File

@ -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");

View File

@ -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");