[Bf-blender-cvs] [ec5d2e68723] blender-v3.0-release: Add documentation for some 'hidden' RNA properties.

Bastien Montagne noreply at git.blender.org
Wed Nov 3 16:13:55 CET 2021


Commit: ec5d2e687232887acde5cda9352828c59438da35
Author: Bastien Montagne
Date:   Wed Nov 3 16:12:13 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBec5d2e687232887acde5cda9352828c59438da35

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.

===================================================================

M	release/scripts/startup/bl_operators/file.py
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/makesrna/intern/rna_object_force.c
M	source/blender/makesrna/intern/rna_ui.c

===================================================================

diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py
index 672a4170325..4c53279427a 100644
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@ -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",
     )
 
     # -----------
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");



More information about the Bf-blender-cvs mailing list