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,342 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static char *rna_SpaceSequencerTimelineOverlay_path(PointerRNA *UNUSED(ptr)) | static char *rna_SpaceSequencerTimelineOverlay_path(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| return BLI_strdup("timeline_overlay"); | return BLI_strdup("timeline_overlay"); | ||||
| } | } | ||||
| /* Space Node Editor */ | /* Space Node Editor */ | ||||
| static PointerRNA rna_SpaceNode_overlay_get(PointerRNA *ptr) | |||||
| { | |||||
| return rna_pointer_inherit_refine(ptr, &RNA_SpaceNodeOverlay, ptr->data); | |||||
| } | |||||
| static char *rna_SpaceNodeOverlay_path(PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| return BLI_strdup("overlay"); | |||||
| } | |||||
| static void rna_SpaceNodeEditor_node_tree_set(PointerRNA *ptr, | static void rna_SpaceNodeEditor_node_tree_set(PointerRNA *ptr, | ||||
| const PointerRNA value, | const PointerRNA value, | ||||
| struct ReportList *UNUSED(reports)) | struct ReportList *UNUSED(reports)) | ||||
| { | { | ||||
| SpaceNode *snode = (SpaceNode *)ptr->data; | SpaceNode *snode = (SpaceNode *)ptr->data; | ||||
| ED_node_tree_start(snode, (bNodeTree *)value.data, NULL, NULL); | ED_node_tree_start(snode, (bNodeTree *)value.data, NULL, NULL); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,640 Lines • ▼ Show 20 Lines | static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| parm = RNA_def_pointer(func, "node", "Node", "Node", "Group node linking to this node tree"); | parm = RNA_def_pointer(func, "node", "Node", "Node", "Group node linking to this node tree"); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| func = RNA_def_function(srna, "pop", "rna_SpaceNodeEditor_path_pop"); | func = RNA_def_function(srna, "pop", "rna_SpaceNodeEditor_path_pop"); | ||||
| RNA_def_function_ui_description(func, "Remove the last node tree from the path"); | RNA_def_function_ui_description(func, "Remove the last node tree from the path"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| } | } | ||||
| static void rna_def_space_node_overlay(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "SpaceNodeOverlay", NULL); | |||||
| RNA_def_struct_sdna(srna, "SpaceNode"); | |||||
| RNA_def_struct_nested(brna, srna, "SpaceNodeEditor"); | |||||
| RNA_def_struct_path_func(srna, "rna_SpaceNodeOverlay_path"); | |||||
| RNA_def_struct_ui_text( | |||||
| srna, "Overlay Settings", "Settings for display of overlays in the Node Editor"); | |||||
| prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SN_OVERLAY_SHOW_OVERLAYS); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like colored or dashed wires"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); | |||||
| prop = RNA_def_property(srna, "show_wire_color", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SN_OVERLAY_SHOW_WIRE_COLORS); | |||||
| RNA_def_property_boolean_default(prop, true); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Show Wire Colors", "Color node links based on their connected sockets"); | |||||
HooglyBoogly: Maybe it's subjective, but I find `"Color node links based on their connected sockets"` reads a… | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); | |||||
| } | |||||
| static void rna_def_space_node(BlenderRNA *brna) | static void rna_def_space_node(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem texture_id_type_items[] = { | static const EnumPropertyItem texture_id_type_items[] = { | ||||
| {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, | {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"}, | ||||
| {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, | {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"}, | ||||
| ▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | # endif | ||||
| prop = RNA_def_property(srna, "insert_offset_direction", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "insert_offset_direction", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "insert_ofs_dir"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "insert_ofs_dir"); | ||||
| RNA_def_property_enum_items(prop, insert_ofs_dir_items); | RNA_def_property_enum_items(prop, insert_ofs_dir_items); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Auto-offset Direction", "Direction to offset nodes on insertion"); | prop, "Auto-offset Direction", "Direction to offset nodes on insertion"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | ||||
| /* Overlays */ | |||||
| prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | |||||
| RNA_def_property_struct_type(prop, "SpaceNodeOverlay"); | |||||
| RNA_def_property_pointer_funcs(prop, "rna_SpaceNode_overlay_get", NULL, NULL, NULL); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Overlay Settings", "Settings for display of overlays in the Node Editor"); | |||||
Done Inline ActionsDescription needs updating HooglyBoogly: Description needs updating | |||||
| rna_def_space_node_overlay(brna); | |||||
| RNA_api_space_node(srna); | RNA_api_space_node(srna); | ||||
| } | } | ||||
| static void rna_def_space_clip(BlenderRNA *brna) | static void rna_def_space_clip(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 660 Lines • Show Last 20 Lines | |||||
Maybe it's subjective, but I find "Color node links based on their connected sockets" reads a little better.