WM: document some options of the `bpy.ops.wm.read_homefile` operator

Add documentation for `bpy.ops.wm.read_homefile` options
`use_factory_startup` and `use_empty`.
This commit is contained in:
Sybren A. Stüvel 2024-01-02 15:39:32 +01:00
parent bb7468260c
commit 631da7a475
1 changed files with 14 additions and 2 deletions

View File

@ -2661,7 +2661,14 @@ static void read_homefile_props(wmOperatorType *ot)
prop = RNA_def_string(ot->srna, "app_template", "Template", sizeof(U.app_template), "", "");
RNA_def_property_flag(prop, PropertyFlag(PROP_HIDDEN | PROP_SKIP_SAVE));
prop = RNA_def_boolean(ot->srna, "use_empty", false, "Empty", "");
prop = RNA_def_boolean(
ot->srna,
"use_empty",
false,
"Empty",
"After loading, remove everything except scenes, windows, and workspaces. This makes it "
"possible to load the startup file with its scene configuration and window layout intact, "
"but no objects, materials, animations, ...");
RNA_def_property_flag(prop, PropertyFlag(PROP_HIDDEN | PROP_SKIP_SAVE));
}
@ -2695,7 +2702,12 @@ void WM_OT_read_homefile(wmOperatorType *ot)
/* So scripts can load factory-startup without resetting preferences
* (which has other implications such as reloading all add-ons).
* Match naming for `--factory-startup` command line argument. */
prop = RNA_def_boolean(ot->srna, "use_factory_startup", false, "Factory Startup", "");
prop = RNA_def_boolean(ot->srna,
"use_factory_startup",
false,
"Factory Startup",
"Load the default ('factory startup') blend file. This is independent of "
"the normal start-up file that the user can save");
RNA_def_property_flag(prop, PropertyFlag(PROP_HIDDEN | PROP_SKIP_SAVE));
read_factory_reset_props(ot);