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 28 Lines | |||||
| #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 "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 "DNA_action_types.h" | #include "DNA_action_types.h" | ||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_key_types.h" | #include "DNA_key_types.h" | ||||
| ▲ Show 20 Lines • Show All 2,987 Lines • ▼ Show 20 Lines | |||||
| static void rna_SpaceFileBrowser_browse_mode_update(Main *UNUSED(bmain), | static void rna_SpaceFileBrowser_browse_mode_update(Main *UNUSED(bmain), | ||||
| Scene *UNUSED(scene), | Scene *UNUSED(scene), | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| ScrArea *area = rna_area_from_space(ptr); | ScrArea *area = rna_area_from_space(ptr); | ||||
| ED_area_tag_refresh(area); | ED_area_tag_refresh(area); | ||||
| } | } | ||||
| static void rna_SpaceSpreadsheet_pinned_id_set(PointerRNA *ptr, | |||||
| PointerRNA value, | |||||
| struct ReportList *UNUSED(reports)) | |||||
| { | |||||
| SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data; | |||||
| sspreadsheet->pinned_id = value.data; | |||||
| } | |||||
| static void rna_SpaceSpreadsheet_geometry_component_type_update(Main *UNUSED(bmain), | static void rna_SpaceSpreadsheet_geometry_component_type_update(Main *UNUSED(bmain), | ||||
| Scene *UNUSED(scene), | Scene *UNUSED(scene), | ||||
| PointerRNA *ptr) | PointerRNA *ptr) | ||||
| { | { | ||||
| SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data; | SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data; | ||||
| if (sspreadsheet->geometry_component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) { | if (sspreadsheet->geometry_component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) { | ||||
| sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT; | sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT; | ||||
| } | } | ||||
| } | } | ||||
| const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *C, | const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *ptr, | PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data; | SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data; | ||||
| GeometryComponentType component_type = sspreadsheet->geometry_component_type; | GeometryComponentType component_type = sspreadsheet->geometry_component_type; | ||||
| if (sspreadsheet->object_eval_state == SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL) { | if (sspreadsheet->object_eval_state == SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL) { | ||||
| Object *active_object = CTX_data_active_object(C); | ID *used_id = ED_spreadsheet_get_current_id(sspreadsheet); | ||||
| Object *used_object = (sspreadsheet->pinned_id && GS(sspreadsheet->pinned_id->name) == ID_OB) ? | if (used_id != NULL) { | ||||
| (Object *)sspreadsheet->pinned_id : | if (GS(used_id->name) == ID_OB) { | ||||
| active_object; | Object *used_object = (Object *)used_id; | ||||
| if (used_object != NULL) { | |||||
| if (used_object->type == OB_POINTCLOUD) { | if (used_object->type == OB_POINTCLOUD) { | ||||
| component_type = GEO_COMPONENT_TYPE_POINT_CLOUD; | component_type = GEO_COMPONENT_TYPE_POINT_CLOUD; | ||||
| } | } | ||||
| else { | else { | ||||
| component_type = GEO_COMPONENT_TYPE_MESH; | component_type = GEO_COMPONENT_TYPE_MESH; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| static EnumPropertyItem mesh_vertex_domain_item = { | static EnumPropertyItem mesh_vertex_domain_item = { | ||||
| ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"}; | ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"}; | ||||
| EnumPropertyItem *item_array = NULL; | EnumPropertyItem *item_array = NULL; | ||||
| int items_len = 0; | int items_len = 0; | ||||
| for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL; | for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL; | ||||
| item++) { | item++) { | ||||
| Show All 19 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, | |||||
| int type) | |||||
| { | |||||
| SpreadsheetContext *context = ED_spreadsheet_context_new(type); | |||||
| BLI_addtail(&sspreadsheet->context_path, context); | |||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | |||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | |||||
| return context; | |||||
| } | |||||
| static void rna_SpaceSpreadsheet_context_path_clear(SpaceSpreadsheet *sspreadsheet) | |||||
| { | |||||
| 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(); | |||||
| 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_spreadsheet_set_geometry_node_context(SpaceSpreadsheet *sspreadsheet, | |||||
| SpaceNode *snode, | |||||
| bNode *node) | |||||
| { | |||||
| ED_spreadsheet_set_geometry_node_context(sspreadsheet, snode, node); | |||||
| ED_spreadsheet_context_path_update_tag(sspreadsheet); | |||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | |||||
| } | |||||
| #else | #else | ||||
| static const EnumPropertyItem dt_uv_items[] = { | static const EnumPropertyItem dt_uv_items[] = { | ||||
| {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Display white edges with black outline"}, | {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Display white edges with black outline"}, | ||||
| {SI_UVDT_DASH, "DASH", 0, "Dash", "Display dashed black-white edges"}, | {SI_UVDT_DASH, "DASH", 0, "Dash", "Display dashed black-white edges"}, | ||||
| {SI_UVDT_BLACK, "BLACK", 0, "Black", "Display black edges"}, | {SI_UVDT_BLACK, "BLACK", 0, "Black", "Display black edges"}, | ||||
| {SI_UVDT_WHITE, "WHITE", 0, "White", "Display white edges"}, | {SI_UVDT_WHITE, "WHITE", 0, "White", "Display white edges"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| ▲ Show 20 Lines • Show All 3,690 Lines • ▼ Show 20 Lines | static void rna_def_node_tree_path(BlenderRNA *brna) | ||||
| RNA_def_struct_sdna(srna, "bNodeTreePath"); | RNA_def_struct_sdna(srna, "bNodeTreePath"); | ||||
| RNA_def_struct_ui_text(srna, "Node Tree Path", "Element of the node space tree path"); | RNA_def_struct_ui_text(srna, "Node Tree Path", "Element of the node space tree path"); | ||||
| prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); | RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context"); | RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context"); | ||||
| } | } | ||||
HooglyBoogly: Do you want this to be editable?
Actually, is this even used? I didn't find anything with… | |||||
Done Inline ActionsAh right, that is a leftover from when I was doing some stuff in Python that is now in C++. JacquesLucke: Ah right, that is a leftover from when I was doing some stuff in Python that is now in C++. | |||||
| static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop, *parm; | PropertyRNA *prop, *parm; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| RNA_def_property_srna(cprop, "SpaceNodeEditorPath"); | RNA_def_property_srna(cprop, "SpaceNodeEditorPath"); | ||||
| srna = RNA_def_struct(brna, "SpaceNodeEditorPath", NULL); | srna = RNA_def_struct(brna, "SpaceNodeEditorPath", NULL); | ||||
| ▲ Show 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | static void rna_def_space_clip(BlenderRNA *brna) | ||||
| /* pivot point */ | /* pivot point */ | ||||
| prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "around"); | RNA_def_property_enum_sdna(prop, NULL, "around"); | ||||
| RNA_def_property_enum_items(prop, pivot_items); | RNA_def_property_enum_items(prop, pivot_items); | ||||
| RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); | RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| } | } | ||||
| static void rna_def_space_spreadsheet(BlenderRNA *brna) | static const EnumPropertyItem spreadsheet_context_type_items[] = { | ||||
| {SPREADSHEET_CONTEXT_OBJECT, "OBJECT", ICON_NONE, "Object", ""}, | |||||
| {SPREADSHEET_CONTEXT_MODIFIER, "MODIFIER", ICON_NONE, "Modifier", ""}, | |||||
| {SPREADSHEET_CONTEXT_NODE, "NODE", ICON_NONE, "Node", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static void rna_def_space_spreadsheet_context(BlenderRNA *brna) | |||||
| { | { | ||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetContext", NULL); | |||||
| RNA_def_struct_ui_text(srna, "Spreadsheet Context", "Element of spreadsheet context path"); | |||||
| RNA_def_struct_refine_func(srna, "rna_spreadsheet_context_refine"); | |||||
| prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, spreadsheet_context_type_items); | |||||
| RNA_def_property_ui_text(prop, "Type", "Type of the context"); | |||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| } | |||||
| static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "SpreadsheetContextObject", "SpreadsheetContext"); | |||||
| prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "Object"); | |||||
| 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) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "SpreadsheetContextModifier", "SpreadsheetContext"); | |||||
| prop = RNA_def_property(srna, "modifier_name", PROP_STRING, PROP_NONE); | |||||
| 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) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "SpreadsheetContextNode", "SpreadsheetContext"); | |||||
| prop = RNA_def_property(srna, "node_name", PROP_STRING, PROP_NONE); | |||||
| 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) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *parm; | |||||
| FunctionRNA *func; | |||||
| RNA_def_property_srna(cprop, "SpreadsheetContextPath"); | |||||
| srna = RNA_def_struct(brna, "SpreadsheetContextPath", NULL); | |||||
| RNA_def_struct_sdna(srna, "SpaceSpreadsheet"); | |||||
| 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"); | |||||
| RNA_def_function_ui_description(func, "Clear entire context path"); | |||||
| } | |||||
| static void rna_def_space_spreadsheet(BlenderRNA *brna) | |||||
| { | |||||
| PropertyRNA *prop, *parm; | |||||
| StructRNA *srna; | |||||
| FunctionRNA *func; | |||||
| static const EnumPropertyItem geometry_component_type_items[] = { | static const EnumPropertyItem geometry_component_type_items[] = { | ||||
| {GEO_COMPONENT_TYPE_MESH, | {GEO_COMPONENT_TYPE_MESH, | ||||
| "MESH", | "MESH", | ||||
| ICON_MESH_DATA, | ICON_MESH_DATA, | ||||
| "Mesh", | "Mesh", | ||||
| "Mesh component containing point, corner, edge and face data"}, | "Mesh component containing point, corner, edge and face data"}, | ||||
| {GEO_COMPONENT_TYPE_POINT_CLOUD, | {GEO_COMPONENT_TYPE_POINT_CLOUD, | ||||
| "POINTCLOUD", | "POINTCLOUD", | ||||
| ICON_POINTCLOUD_DATA, | ICON_POINTCLOUD_DATA, | ||||
| "Point Cloud", | "Point Cloud", | ||||
| "Point cloud component containing only point data"}, | "Point cloud component containing only point data"}, | ||||
| {GEO_COMPONENT_TYPE_INSTANCES, | {GEO_COMPONENT_TYPE_INSTANCES, | ||||
| "INSTANCES", | "INSTANCES", | ||||
| ICON_EMPTY_AXIS, | ICON_EMPTY_AXIS, | ||||
| "Instances", | "Instances", | ||||
| "Instances of objects or collections"}, | "Instances of objects or collections"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem object_eval_state_items[] = { | static const EnumPropertyItem object_eval_state_items[] = { | ||||
| {SPREADSHEET_OBJECT_EVAL_STATE_FINAL, | {SPREADSHEET_OBJECT_EVAL_STATE_EVALUATED, | ||||
| "FINAL", | "EVALUATED", | ||||
| ICON_NONE, | ICON_NONE, | ||||
| "Final", | "Evaluated", | ||||
| "Use data from object with all modifiers applied"}, | "Use data from fully or partially evaluated object"}, | ||||
Not Done Inline Actionsfull -> fully HooglyBoogly: `full` -> `fully` | |||||
| {SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL, | {SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL, | ||||
| "ORIGINAL", | "ORIGINAL", | ||||
| ICON_NONE, | ICON_NONE, | ||||
| "Original", | "Original", | ||||
| "Use data from original object without any modifiers applied"}, | "Use data from original object without any modifiers applied"}, | ||||
| {SPREADSHEET_OBJECT_EVAL_STATE_NODE, | |||||
| "NODE", | |||||
| ICON_NONE, | |||||
| "Node", | |||||
| "Use data from the first geometry output of the node tagged for preview"}, | |||||
| {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(srna, (1 << RGN_TYPE_FOOTER)); | rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_FOOTER)); | ||||
| prop = RNA_def_property(srna, "pinned_id", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SPREADSHEET_FLAG_PINNED); | ||||
| RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceSpreadsheet_pinned_id_set", NULL, NULL); | RNA_def_property_ui_text(prop, "Is Pinned", "Context path is pinned"); | ||||
| RNA_def_property_ui_text(prop, "Pinned ID", "Data-block whose values are displayed"); | |||||
| 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); | |||||
| 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_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | |||||
| prop = RNA_def_property(srna, "context_path", PROP_COLLECTION, PROP_NONE); | |||||
| RNA_def_property_struct_type(prop, "SpreadsheetContext"); | |||||
| RNA_def_property_ui_text(prop, "Context Path", "Context path to the data being displayed"); | |||||
| 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_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| prop = RNA_def_property(srna, "geometry_component_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "geometry_component_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, geometry_component_type_items); | RNA_def_property_enum_items(prop, geometry_component_type_items); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Geometry Component", "Part of the geometry to display data from"); | prop, "Geometry Component", "Part of the geometry to display data from"); | ||||
| RNA_def_property_update(prop, | RNA_def_property_update(prop, | ||||
| NC_SPACE | ND_SPACE_SPREADSHEET, | NC_SPACE | ND_SPACE_SPREADSHEET, | ||||
| "rna_SpaceSpreadsheet_geometry_component_type_update"); | "rna_SpaceSpreadsheet_geometry_component_type_update"); | ||||
| prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, rna_enum_attribute_domain_items); | RNA_def_property_enum_items(prop, rna_enum_attribute_domain_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceSpreadsheet_attribute_domain_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceSpreadsheet_attribute_domain_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Attribute Domain", "Attribute domain to display"); | RNA_def_property_ui_text(prop, "Attribute Domain", "Attribute domain to display"); | ||||
| 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, "object_eval_state", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "object_eval_state", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, object_eval_state_items); | RNA_def_property_enum_items(prop, object_eval_state_items); | ||||
| RNA_def_property_ui_text(prop, "Object Evaluation State", ""); | RNA_def_property_ui_text(prop, "Object Evaluation State", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, NULL); | ||||
| func = RNA_def_function( | |||||
| srna, "set_geometry_node_context", "rna_spreadsheet_set_geometry_node_context"); | |||||
| RNA_def_function_ui_description( | |||||
| func, "Update context_path to point to a specific node in a node editor"); | |||||
| parm = RNA_def_pointer( | |||||
| func, "node_editor", "SpaceNodeEditor", "", "Editor to take the context from"); | |||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | |||||
| parm = RNA_def_pointer(func, "node", "Node", "", ""); | |||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | |||||
| } | } | ||||
| void RNA_def_space(BlenderRNA *brna) | void RNA_def_space(BlenderRNA *brna) | ||||
| { | { | ||||
| rna_def_space(brna); | rna_def_space(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); | ||||
| Show All 23 Lines | |||||
Do you want this to be editable?
Actually, is this even used? I didn't find anything with search.