Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nodetree.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 10,797 Lines • ▼ Show 20 Lines | static void def_geo_viewer(StructRNA *srna) | ||||
| prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, rna_enum_attribute_type_items); | RNA_def_property_enum_items(prop, rna_enum_attribute_type_items); | ||||
| RNA_def_property_enum_funcs( | RNA_def_property_enum_funcs( | ||||
| prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_with_socket_itemf"); | prop, NULL, NULL, "rna_GeometryNodeAttributeType_type_with_socket_itemf"); | ||||
| RNA_def_property_enum_default(prop, CD_PROP_FLOAT); | RNA_def_property_enum_default(prop, CD_PROP_FLOAT); | ||||
| RNA_def_property_ui_text(prop, "Data Type", ""); | RNA_def_property_ui_text(prop, "Data Type", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update"); | ||||
| prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_enum_attribute_domain_with_auto_items); | |||||
| RNA_def_property_enum_default(prop, ATTR_DOMAIN_POINT); | |||||
| RNA_def_property_ui_text(prop, "Domain", "Domain to evaluate the field on"); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | |||||
| } | } | ||||
| static void def_geo_realize_instances(StructRNA *srna) | static void def_geo_realize_instances(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "legacy_behavior", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "legacy_behavior", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "custom1", GEO_NODE_REALIZE_INSTANCES_LEGACY_BEHAVIOR); | RNA_def_property_boolean_sdna(prop, NULL, "custom1", GEO_NODE_REALIZE_INSTANCES_LEGACY_BEHAVIOR); | ||||
| ▲ Show 20 Lines • Show All 1,844 Lines • ▼ Show 20 Lines | static void rna_def_nodetree(BlenderRNA *brna) | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Inputs", "Node tree inputs"); | RNA_def_property_ui_text(prop, "Inputs", "Node tree inputs"); | ||||
| rna_def_node_tree_sockets_api(brna, prop, SOCK_IN); | rna_def_node_tree_sockets_api(brna, prop, SOCK_IN); | ||||
| prop = RNA_def_property(srna, "active_input", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "active_input", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_funcs( | RNA_def_property_int_funcs( | ||||
| prop, "rna_NodeTree_active_input_get", "rna_NodeTree_active_input_set", NULL); | prop, "rna_NodeTree_active_input_get", "rna_NodeTree_active_input_set", NULL); | ||||
| RNA_def_property_ui_text(prop, "Active Input", "Index of the active input"); | RNA_def_property_ui_text(prop, "Active Input", "Index of the active input"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_NODE, NULL); | RNA_def_property_update(prop, NC_NODE, NULL); | ||||
| prop = RNA_def_property(srna, "outputs", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "outputs", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL); | RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL); | ||||
| RNA_def_property_struct_type(prop, "NodeSocketInterface"); | RNA_def_property_struct_type(prop, "NodeSocketInterface"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Outputs", "Node tree outputs"); | RNA_def_property_ui_text(prop, "Outputs", "Node tree outputs"); | ||||
| rna_def_node_tree_sockets_api(brna, prop, SOCK_OUT); | rna_def_node_tree_sockets_api(brna, prop, SOCK_OUT); | ||||
| prop = RNA_def_property(srna, "active_output", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "active_output", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_funcs( | RNA_def_property_int_funcs( | ||||
| prop, "rna_NodeTree_active_output_get", "rna_NodeTree_active_output_set", NULL); | prop, "rna_NodeTree_active_output_get", "rna_NodeTree_active_output_set", NULL); | ||||
| RNA_def_property_ui_text(prop, "Active Output", "Index of the active output"); | RNA_def_property_ui_text(prop, "Active Output", "Index of the active output"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_NODE, NULL); | RNA_def_property_update(prop, NC_NODE, NULL); | ||||
| /* exposed as a function for runtime interface type properties */ | /* exposed as a function for runtime interface type properties */ | ||||
| func = RNA_def_function(srna, "interface_update", "rna_NodeTree_interface_update"); | func = RNA_def_function(srna, "interface_update", "rna_NodeTree_interface_update"); | ||||
| RNA_def_function_ui_description(func, "Updated node group interface"); | RNA_def_function_ui_description(func, "Updated node group interface"); | ||||
| parm = RNA_def_pointer(func, "context", "Context", "", ""); | parm = RNA_def_pointer(func, "context", "Context", "", ""); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| ▲ Show 20 Lines • Show All 320 Lines • Show Last 20 Lines | |||||