Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space_api.c
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | void RNA_api_space_filebrowser(StructRNA *srna) | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_boolean( | parm = RNA_def_boolean( | ||||
| func, | func, | ||||
| "deferred", | "deferred", | ||||
| 0, | 0, | ||||
| "", | "", | ||||
| "Whether to activate the ID immediately (false) or after the file browser refreshes (true)"); | "Whether to activate the ID immediately (false) or after the file browser refreshes (true)"); | ||||
| /* Select file by relative path. */ | |||||
| func = RNA_def_function( | |||||
| srna, "activate_file_by_relative_path", "ED_fileselect_activate_by_relpath"); | |||||
| RNA_def_function_ui_description(func, | |||||
Severin: Better remove the empty line so parameter definitions are visually grouped with the function… | |||||
| "Set active file and add to selection based on relative path to " | |||||
Done Inline ActionsNo need to assign to parm, it's not used. Severin: No need to assign to `parm`, it's not used. | |||||
Done Inline ActionsSub-type should be PROP_FILEPATH, otherwise Unicode characters won't be handled properly. Severin: Sub-type should be `PROP_FILEPATH`, otherwise Unicode characters won't be handled properly. | |||||
| "current File Browser directory"); | |||||
Done Inline ActionsShould be: "... to the current File Browser directory" Severin: Should be: "... to the current File Browser directory" | |||||
| RNA_def_property(func, "relative_path", PROP_STRING, PROP_FILEPATH); | |||||
| /* Deselect all files. */ | |||||
| func = RNA_def_function(srna, "deselect_all", "ED_fileselect_deselect_all"); | |||||
| RNA_def_function_ui_description(func, "Deselect all files"); | |||||
| } | } | ||||
| #endif | #endif | ||||
Better remove the empty line so parameter definitions are visually grouped with the function they are for.
Ignore the fact that the code above doesn't follow that.