Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_context.c
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static PointerRNA rna_Context_window_get(PointerRNA *ptr) | static PointerRNA rna_Context_window_get(PointerRNA *ptr) | ||||
| { | { | ||||
| bContext *C = (bContext *)ptr->data; | bContext *C = (bContext *)ptr->data; | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_Window, CTX_wm_window(C)); | return rna_pointer_inherit_refine(ptr, &RNA_Window, CTX_wm_window(C)); | ||||
| } | } | ||||
| static PointerRNA rna_Context_workspace_get(PointerRNA *ptr) | |||||
| { | |||||
| bContext *C = (bContext *)ptr->data; | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_WorkSpace, CTX_wm_workspace(C)); | |||||
| } | |||||
| static PointerRNA rna_Context_screen_get(PointerRNA *ptr) | static PointerRNA rna_Context_screen_get(PointerRNA *ptr) | ||||
| { | { | ||||
| bContext *C = (bContext *)ptr->data; | bContext *C = (bContext *)ptr->data; | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_Screen, CTX_wm_screen(C)); | return rna_pointer_inherit_refine(ptr, &RNA_Screen, CTX_wm_screen(C)); | ||||
| } | } | ||||
| static PointerRNA rna_Context_area_get(PointerRNA *ptr) | static PointerRNA rna_Context_area_get(PointerRNA *ptr) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | void RNA_def_context(BlenderRNA *brna) | ||||
| RNA_def_property_struct_type(prop, "WindowManager"); | RNA_def_property_struct_type(prop, "WindowManager"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Context_manager_get", NULL, NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_Context_manager_get", NULL, NULL, NULL); | ||||
| prop = RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_struct_type(prop, "Window"); | RNA_def_property_struct_type(prop, "Window"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL, NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL, NULL, NULL); | ||||
| prop = RNA_def_property(srna, "workspace", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_struct_type(prop, "WorkSpace"); | |||||
| RNA_def_property_pointer_funcs(prop, "rna_Context_workspace_get", NULL, NULL, NULL); | |||||
| prop = RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_struct_type(prop, "Screen"); | RNA_def_property_struct_type(prop, "Screen"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Context_screen_get", NULL, NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_Context_screen_get", NULL, NULL, NULL); | ||||
| prop = RNA_def_property(srna, "area", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "area", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_struct_type(prop, "Area"); | RNA_def_property_struct_type(prop, "Area"); | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||