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 All 13 Lines | |||||
| #include "BKE_attribute.h" | #include "BKE_attribute.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_geometry_set.h" | #include "BKE_geometry_set.h" | ||||
| #include "BKE_image.h" | #include "BKE_image.h" | ||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_movieclip.h" | #include "BKE_movieclip.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_studiolight.h" | #include "BKE_studiolight.h" | ||||
| #include "BKE_viewer_path.h" | |||||
| #include "ED_asset.h" | #include "ED_asset.h" | ||||
| #include "ED_spreadsheet.h" | #include "ED_spreadsheet.h" | ||||
| #include "ED_text.h" | #include "ED_text.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| ▲ Show 20 Lines • Show All 3,244 Lines • ▼ Show 20 Lines | for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL; | ||||
| } | } | ||||
| } | } | ||||
| RNA_enum_item_end(&item_array, &items_len); | RNA_enum_item_end(&item_array, &items_len); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item_array; | return item_array; | ||||
| } | } | ||||
| static SpreadsheetContext *rna_SpaceSpreadsheet_context_path_append(SpaceSpreadsheet *sspreadsheet, | static StructRNA *rna_viewer_path_elem_refine(PointerRNA *ptr) | ||||
| int type) | |||||
| { | { | ||||
| SpreadsheetContext *context = ED_spreadsheet_context_new(type); | ViewerPathElem *elem = ptr->data; | ||||
| BLI_addtail(&sspreadsheet->context_path, context); | switch (elem->type) { | ||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | case VIEWER_PATH_ELEM_TYPE_ID: | ||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | return &RNA_IDViewerPathElem; | ||||
| return context; | case VIEWER_PATH_ELEM_TYPE_MODIFIER: | ||||
| } | return &RNA_ModifierViewerPathElem; | ||||
| case VIEWER_PATH_ELEM_TYPE_NODE: | |||||
| static void rna_SpaceSpreadsheet_context_path_clear(SpaceSpreadsheet *sspreadsheet) | return &RNA_NodeViewerPathElem; | ||||
| { | |||||
| ED_spreadsheet_context_path_clear(sspreadsheet); | |||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | |||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | |||||
| } | |||||
| static StructRNA *rna_spreadsheet_context_refine(PointerRNA *ptr) | |||||
| { | |||||
| SpreadsheetContext *context = ptr->data; | |||||
| switch (context->type) { | |||||
| case SPREADSHEET_CONTEXT_OBJECT: | |||||
| return &RNA_SpreadsheetContextObject; | |||||
| case SPREADSHEET_CONTEXT_MODIFIER: | |||||
| return &RNA_SpreadsheetContextModifier; | |||||
| case SPREADSHEET_CONTEXT_NODE: | |||||
| return &RNA_SpreadsheetContextNode; | |||||
| } | } | ||||
| BLI_assert_unreachable(); | BLI_assert_unreachable(); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| static void rna_spreadsheet_context_update(Main *UNUSED(bmain), | |||||
| Scene *UNUSED(scene), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| bScreen *screen = (bScreen *)ptr->owner_id; | |||||
| LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | |||||
| SpaceLink *sl = area->spacedata.first; | |||||
| if (sl->spacetype == SPACE_SPREADSHEET) { | |||||
| SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)sl; | |||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | |||||
| } | |||||
| } | |||||
| } | |||||
| static void rna_SpaceSpreadsheet_context_path_guess(SpaceSpreadsheet *sspreadsheet, bContext *C) | |||||
| { | |||||
| ED_spreadsheet_context_path_guess(C, sspreadsheet); | |||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | |||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | |||||
| } | |||||
| static void rna_FileAssetSelectParams_catalog_id_get(PointerRNA *ptr, char *value) | static void rna_FileAssetSelectParams_catalog_id_get(PointerRNA *ptr, char *value) | ||||
| { | { | ||||
| const FileAssetSelectParams *params = ptr->data; | const FileAssetSelectParams *params = ptr->data; | ||||
| BLI_uuid_format(value, params->catalog_id); | BLI_uuid_format(value, params->catalog_id); | ||||
| } | } | ||||
| static int rna_FileAssetSelectParams_catalog_id_length(PointerRNA *UNUSED(ptr)) | static int rna_FileAssetSelectParams_catalog_id_length(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,108 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d_overlay(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Wireframe Opacity", | "Wireframe Opacity", | ||||
| "Opacity of the displayed edges " | "Opacity of the displayed edges " | ||||
| "(1.0 for opaque)"); | "(1.0 for opaque)"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "show_viewer_attribute", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_VIEWER_ATTRIBUTE); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_ui_text(prop, "Viewer Node", "Show attribute overlay for active viewer node"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "viewer_attribute_opacity", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "overlay.viewer_attribute_opacity"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Viewer Attribute Opacity", "Opacity of the attribute that is currently visualized"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "show_paint_wire", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_paint_wire", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "overlay.paint_flag", V3D_OVERLAY_PAINT_WIRE); | RNA_def_property_boolean_sdna(prop, NULL, "overlay.paint_flag", V3D_OVERLAY_PAINT_WIRE); | ||||
| RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes"); | RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "show_wpaint_contours", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_wpaint_contours", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "overlay.wpaint_flag", V3D_OVERLAY_WPAINT_CONTOURS); | RNA_def_property_boolean_sdna(prop, NULL, "overlay.wpaint_flag", V3D_OVERLAY_WPAINT_CONTOURS); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| ▲ Show 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| /* Helper for drawing the icon. */ | /* Helper for drawing the icon. */ | ||||
| prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_funcs( | RNA_def_property_int_funcs( | ||||
| prop, "rna_SpaceView3D_icon_from_show_object_viewport_get", NULL, NULL); | prop, "rna_SpaceView3D_icon_from_show_object_viewport_get", NULL, NULL); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Visibility Icon", ""); | RNA_def_property_ui_text(prop, "Visibility Icon", ""); | ||||
| prop = RNA_def_property(srna, "show_viewer", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_VIEWER); | |||||
| RNA_def_property_ui_text(prop, "Show Viewer", "Display non-final geometry from viewer nodes"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, NULL); | |||||
| /* Nested Structs */ | /* Nested Structs */ | ||||
| prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_struct_type(prop, "View3DShading"); | RNA_def_property_struct_type(prop, "View3DShading"); | ||||
| RNA_def_property_ui_text(prop, "Shading Settings", "Settings for shading in the 3D viewport"); | RNA_def_property_ui_text(prop, "Shading Settings", "Settings for shading in the 3D viewport"); | ||||
| prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| ▲ Show 20 Lines • Show All 2,760 Lines • ▼ Show 20 Lines | static void rna_def_spreadsheet_row_filter(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| prop = RNA_def_property(srna, "value_boolean", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "value_boolean", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_ROW_FILTER_BOOL_VALUE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_ROW_FILTER_BOOL_VALUE); | ||||
| RNA_def_property_ui_text(prop, "Boolean Value", ""); | RNA_def_property_ui_text(prop, "Boolean Value", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| } | } | ||||
| static const EnumPropertyItem spreadsheet_context_type_items[] = { | static const EnumPropertyItem viewer_path_elem_type_items[] = { | ||||
| {SPREADSHEET_CONTEXT_OBJECT, "OBJECT", ICON_NONE, "Object", ""}, | {VIEWER_PATH_ELEM_TYPE_ID, "ID", ICON_NONE, "ID", ""}, | ||||
| {SPREADSHEET_CONTEXT_MODIFIER, "MODIFIER", ICON_NONE, "Modifier", ""}, | {VIEWER_PATH_ELEM_TYPE_MODIFIER, "MODIFIER", ICON_NONE, "Modifier", ""}, | ||||
| {SPREADSHEET_CONTEXT_NODE, "NODE", ICON_NONE, "Node", ""}, | {VIEWER_PATH_ELEM_TYPE_NODE, "NODE", ICON_NONE, "Node", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static void rna_def_space_spreadsheet_context(BlenderRNA *brna) | static void rna_def_viewer_path_elem(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContext", NULL); | srna = RNA_def_struct(brna, "ViewerPathElem", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Spreadsheet Context", "Element of spreadsheet context path"); | RNA_def_struct_ui_text(srna, "Viewer Path Element", "Element of a viewer path"); | ||||
| RNA_def_struct_refine_func(srna, "rna_spreadsheet_context_refine"); | RNA_def_struct_refine_func(srna, "rna_viewer_path_elem_refine"); | ||||
| prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, spreadsheet_context_type_items); | RNA_def_property_enum_items(prop, viewer_path_elem_type_items); | ||||
| RNA_def_property_ui_text(prop, "Type", "Type of the context"); | RNA_def_property_ui_text(prop, "Type", "Type of the path element"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| rna_def_space_generic_show_region_toggles(srna, | |||||
| (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER)); | |||||
| } | } | ||||
| static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna) | static void rna_def_id_viewer_path_elem(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContextObject", "SpreadsheetContext"); | srna = RNA_def_struct(brna, "IDViewerPathElem", "ViewerPathElem"); | ||||
| prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "Object"); | RNA_def_property_ui_text(prop, "ID", ""); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update"); | |||||
| } | } | ||||
| static void rna_def_space_spreadsheet_context_modifier(BlenderRNA *brna) | static void rna_def_modifier_viewer_path_elem(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContextModifier", "SpreadsheetContext"); | srna = RNA_def_struct(brna, "ModifierViewerPathElem", "ViewerPathElem"); | ||||
| prop = RNA_def_property(srna, "modifier_name", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "modifier_name", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_ui_text(prop, "Modifier Name", ""); | RNA_def_property_ui_text(prop, "Modifier Name", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update"); | |||||
| } | } | ||||
| static void rna_def_space_spreadsheet_context_node(BlenderRNA *brna) | static void rna_def_node_viewer_path_elem(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContextNode", "SpreadsheetContext"); | srna = RNA_def_struct(brna, "NodeViewerPathElem", "ViewerPathElem"); | ||||
| prop = RNA_def_property(srna, "node_name", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "node_name", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_ui_text(prop, "Node Name", ""); | RNA_def_property_ui_text(prop, "Node Name", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update"); | |||||
| } | } | ||||
| static void rna_def_space_spreadsheet_context_path(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_viewer_path(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *parm; | PropertyRNA *prop; | ||||
| FunctionRNA *func; | |||||
| RNA_def_property_srna(cprop, "SpreadsheetContextPath"); | rna_def_viewer_path_elem(brna); | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContextPath", NULL); | rna_def_id_viewer_path_elem(brna); | ||||
| RNA_def_struct_sdna(srna, "SpaceSpreadsheet"); | rna_def_modifier_viewer_path_elem(brna); | ||||
| rna_def_node_viewer_path_elem(brna); | |||||
| func = RNA_def_function(srna, "append", "rna_SpaceSpreadsheet_context_path_append"); | |||||
| RNA_def_function_ui_description(func, "Append a context path element"); | |||||
| parm = RNA_def_property(func, "type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | |||||
| RNA_def_property_enum_items(parm, spreadsheet_context_type_items); | |||||
| parm = RNA_def_pointer( | |||||
| func, "context", "SpreadsheetContext", "", "Newly created context path element"); | |||||
| RNA_def_function_return(func, parm); | |||||
| func = RNA_def_function(srna, "clear", "rna_SpaceSpreadsheet_context_path_clear"); | srna = RNA_def_struct(brna, "ViewerPath", NULL); | ||||
| RNA_def_function_ui_description(func, "Clear entire context path"); | RNA_def_struct_ui_text(srna, "Viewer Path", "Path to data that is viewed"); | ||||
| func = RNA_def_function(srna, "guess", "rna_SpaceSpreadsheet_context_path_guess"); | prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_function_ui_description(func, "Guess the context path from the current context"); | RNA_def_property_struct_type(prop, "ViewerPathElem"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_property_ui_text(prop, "Viewer Path", NULL); | ||||
| } | } | ||||
| static void rna_def_space_spreadsheet(BlenderRNA *brna) | static void rna_def_space_spreadsheet(BlenderRNA *brna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| static const EnumPropertyItem object_eval_state_items[] = { | static const EnumPropertyItem object_eval_state_items[] = { | ||||
| Show All 10 Lines | static const EnumPropertyItem object_eval_state_items[] = { | ||||
| {SPREADSHEET_OBJECT_EVAL_STATE_VIEWER_NODE, | {SPREADSHEET_OBJECT_EVAL_STATE_VIEWER_NODE, | ||||
| "VIEWER_NODE", | "VIEWER_NODE", | ||||
| ICON_NONE, | ICON_NONE, | ||||
| "Viewer Node", | "Viewer Node", | ||||
| "Use intermediate data from viewer node"}, | "Use intermediate data from viewer node"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| rna_def_space_spreadsheet_context(brna); | |||||
| rna_def_space_spreadsheet_context_object(brna); | |||||
| rna_def_space_spreadsheet_context_modifier(brna); | |||||
| rna_def_space_spreadsheet_context_node(brna); | |||||
| srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space"); | srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space"); | ||||
| RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data"); | RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data"); | ||||
| rna_def_space_generic_show_region_toggles( | rna_def_space_generic_show_region_toggles( | ||||
| srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER)); | srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER)); | ||||
| prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_PINNED); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_PINNED); | ||||
| RNA_def_property_ui_text(prop, "Is Pinned", "Context path is pinned"); | RNA_def_property_ui_text(prop, "Is Pinned", "Context path is pinned"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", SPREADSHEET_FILTER_ENABLE); | RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", SPREADSHEET_FILTER_ENABLE); | ||||
| RNA_def_property_ui_text(prop, "Use Filter", ""); | RNA_def_property_ui_text(prop, "Use Filter", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| prop = RNA_def_property(srna, "display_context_path_collapsed", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "display_viewer_path_collapsed", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_CONTEXT_PATH_COLLAPSED); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_CONTEXT_PATH_COLLAPSED); | ||||
| RNA_def_property_ui_text(prop, "Display Context Path Collapsed", ""); | RNA_def_property_ui_text(prop, "Display Context Path Collapsed", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| prop = RNA_def_property(srna, "context_path", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "viewer_path", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "SpreadsheetContext"); | RNA_def_property_ui_text( | ||||
| RNA_def_property_ui_text(prop, "Context Path", "Context path to the data being displayed"); | prop, "Viewer Path", "Path to the data that is displayed in the spreadsheet"); | ||||
| rna_def_space_spreadsheet_context_path(brna, prop); | |||||
| prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", SPREADSHEET_FILTER_SELECTED_ONLY); | RNA_def_property_boolean_sdna(prop, NULL, "filter_flag", SPREADSHEET_FILTER_SELECTED_ONLY); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Show Only Selected", "Only include rows that correspond to selected elements"); | prop, "Show Only Selected", "Only include rows that correspond to selected elements"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| Show All 31 Lines | static void rna_def_space_spreadsheet(BlenderRNA *brna) | ||||
| RNA_def_property_struct_type(prop, "SpreadsheetRowFilter"); | RNA_def_property_struct_type(prop, "SpreadsheetRowFilter"); | ||||
| RNA_def_property_ui_text(prop, "Row Filters", "Filters to remove rows from the displayed data"); | RNA_def_property_ui_text(prop, "Row Filters", "Filters to remove rows from the displayed data"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| } | } | ||||
| void RNA_def_space(BlenderRNA *brna) | void RNA_def_space(BlenderRNA *brna) | ||||
| { | { | ||||
| rna_def_space(brna); | rna_def_space(brna); | ||||
| rna_def_viewer_path(brna); | |||||
| rna_def_space_image(brna); | rna_def_space_image(brna); | ||||
| rna_def_space_sequencer(brna); | rna_def_space_sequencer(brna); | ||||
| rna_def_space_text(brna); | rna_def_space_text(brna); | ||||
| rna_def_fileselect_entry(brna); | rna_def_fileselect_entry(brna); | ||||
| rna_def_fileselect_params(brna); | rna_def_fileselect_params(brna); | ||||
| rna_def_fileselect_asset_params(brna); | rna_def_fileselect_asset_params(brna); | ||||
| rna_def_fileselect_idfilter(brna); | rna_def_fileselect_idfilter(brna); | ||||
| rna_def_fileselect_asset_idfilter(brna); | rna_def_fileselect_asset_idfilter(brna); | ||||
| Show All 19 Lines | |||||