Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,306 Lines • ▼ Show 20 Lines | |||||
| static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr, | static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr, | ||||
| const char **UNUSED(r_info)) | const char **UNUSED(r_info)) | ||||
| { | { | ||||
| FSMenuEntry *fsm = ptr->data; | FSMenuEntry *fsm = ptr->data; | ||||
| return fsm->save ? PROP_EDITABLE : 0; | return fsm->save ? PROP_EDITABLE : 0; | ||||
| } | } | ||||
| static int rna_FileBrowser_FSMenuEntry_icon_get(PointerRNA *ptr) | |||||
| { | |||||
| FSMenuEntry *fsm = ptr->data; | |||||
| return ED_fsmenu_entry_get_icon(fsm); | |||||
| } | |||||
| static void rna_FileBrowser_FSMenuEntry_icon_set(PointerRNA *ptr, int value) | |||||
| { | |||||
| FSMenuEntry *fsm = ptr->data; | |||||
| ED_fsmenu_entry_set_icon(fsm, value); | |||||
| } | |||||
| static bool rna_FileBrowser_FSMenuEntry_use_save_get(PointerRNA *ptr) | static bool rna_FileBrowser_FSMenuEntry_use_save_get(PointerRNA *ptr) | ||||
| { | { | ||||
| FSMenuEntry *fsm = ptr->data; | FSMenuEntry *fsm = ptr->data; | ||||
| return fsm->save; | return fsm->save; | ||||
| } | } | ||||
| static bool rna_FileBrowser_FSMenuEntry_is_valid_get(PointerRNA *ptr) | static bool rna_FileBrowser_FSMenuEntry_is_valid_get(PointerRNA *ptr) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 3,245 Lines • ▼ Show 20 Lines | static void rna_def_filemenu_entry(BlenderRNA *brna) | ||||
| RNA_def_property_string_funcs(prop, | RNA_def_property_string_funcs(prop, | ||||
| "rna_FileBrowser_FSMenuEntry_name_get", | "rna_FileBrowser_FSMenuEntry_name_get", | ||||
| "rna_FileBrowser_FSMenuEntry_name_length", | "rna_FileBrowser_FSMenuEntry_name_length", | ||||
| "rna_FileBrowser_FSMenuEntry_name_set"); | "rna_FileBrowser_FSMenuEntry_name_set"); | ||||
| RNA_def_property_editable_func(prop, "rna_FileBrowser_FSMenuEntry_name_get_editable"); | RNA_def_property_editable_func(prop, "rna_FileBrowser_FSMenuEntry_name_get_editable"); | ||||
| RNA_def_property_ui_text(prop, "Name", ""); | RNA_def_property_ui_text(prop, "Name", ""); | ||||
| RNA_def_struct_name_property(srna, prop); | RNA_def_struct_name_property(srna, prop); | ||||
| prop = RNA_def_property(srna, "icon", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_funcs( | |||||
| prop, "rna_FileBrowser_FSMenuEntry_icon_get", "rna_FileBrowser_FSMenuEntry_icon_set", NULL); | |||||
| RNA_def_property_ui_text(prop, "Icon", ""); | |||||
| prop = RNA_def_property(srna, "use_save", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_save", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_use_save_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_use_save_get", NULL); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Save", "Whether this path is saved in bookmarks, or generated from OS"); | prop, "Save", "Whether this path is saved in bookmarks, or generated from OS"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_is_valid_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_is_valid_get", NULL); | ||||
| ▲ Show 20 Lines • Show All 783 Lines • Show Last 20 Lines | |||||