BPY-Docs: Add missing file context members documentation

Context members of the file space would not be shown in the context API
docs.
This commit is contained in:
Julian Eisel 2021-09-01 16:27:29 +02:00
parent 2aad8fc7bc
commit f62eb8ac16
3 changed files with 8 additions and 1 deletions

View File

@ -1039,6 +1039,7 @@ context_type_map = {
# context_member: (RNA type, is_collection)
"active_annotation_layer": ("GPencilLayer", False),
"active_bone": ("EditBone", False),
"active_file": ("FileSelectEntry", False),
"active_gpencil_frame": ("GreasePencilLayer", True),
"active_gpencil_layer": ("GPencilLayer", True),
"active_node": ("Node", False),
@ -1077,6 +1078,7 @@ context_type_map = {
"gpencil_data": ("GreasePencil", False),
"gpencil_data_owner": ("ID", False),
"hair": ("Hair", False),
"id": ("ID", False),
"image_paint_object": ("Object", False),
"lattice": ("Lattice", False),
"light": ("Light", False),
@ -1105,6 +1107,7 @@ context_type_map = {
"selected_editable_keyframes": ("Keyframe", True),
"selected_editable_objects": ("Object", True),
"selected_editable_sequences": ("Sequence", True),
"selected_files": ("FileSelectEntry", True),
"selected_nla_strips": ("NlaStrip", True),
"selected_nodes": ("Node", True),
"selected_objects": ("Object", True),
@ -1201,6 +1204,7 @@ def pycontext2sphinx(basepath):
"text_context_dir",
"clip_context_dir",
"sequencer_context_dir",
"file_context_dir",
)
unique = set()

View File

@ -92,6 +92,9 @@ void file_sfile_to_operator(struct Main *bmain, struct wmOperator *op, struct Sp
void file_operator_to_sfile(struct Main *bmain, struct SpaceFile *sfile, struct wmOperator *op);
/* space_file.c */
extern const char *file_context_dir[]; /* doc access */
/* filesel.c */
void fileselect_refresh_params(struct SpaceFile *sfile);
void fileselect_file_set(SpaceFile *sfile, const int index);

View File

@ -871,7 +871,7 @@ static void file_space_subtype_item_extend(bContext *UNUSED(C),
RNA_enum_items_add(item, totitem, rna_enum_space_file_browse_mode_items);
}
static const char *file_context_dir[] = {
const char *file_context_dir[] = {
"active_file",
"selected_files",
"asset_library_ref",