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,833 Lines • ▼ Show 20 Lines | static void def_geo_separate_geometry(StructRNA *srna) | ||||
| prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, rna_enum_attribute_domain_without_corner_items); | RNA_def_property_enum_items(prop, rna_enum_attribute_domain_without_corner_items); | ||||
| RNA_def_property_enum_default(prop, ATTR_DOMAIN_POINT); | RNA_def_property_enum_default(prop, ATTR_DOMAIN_POINT); | ||||
| RNA_def_property_ui_text(prop, "Domain", "Which domain to separate on"); | RNA_def_property_ui_text(prop, "Domain", "Which domain to separate on"); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | ||||
| } | } | ||||
| static void def_geo_trace_image(StructRNA *srna) | |||||
| { | |||||
| static const EnumPropertyItem turn_policy_items[] = { | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_BLACK, | |||||
| "BLACK", | |||||
| 0, | |||||
| "Black", | |||||
| "Prioritizes to connect black (foreground) components."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_WHITE, | |||||
| "WHITE", | |||||
| 0, | |||||
| "White", | |||||
| "Prioritizes to connect white (background) components."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_LEFT, "LEFT", 0, "Left", "Always take a left turn."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_RIGHT, "RIGHT", 0, "Right", "Always take a right turn."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_MINORITY, | |||||
| "MINORITY", | |||||
| 0, | |||||
| "Minority", | |||||
| "Prioritizes to connect the color (black or white) that occurs least frequently in the " | |||||
| "local neighborhood of the current position."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_MAJORITY, | |||||
| "MAJORITY", | |||||
| 0, | |||||
| "Majority", | |||||
| "Prioritizes to connect the color (black or white) that occurs least frequently in the " | |||||
| "local neighborhood of the current position."}, | |||||
| {GEO_NODE_TRACE_IMAGE_TURN_POLICY_RANDOM, "RANDOM", 0, "Random", "Choose pseudo-randomly."}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| PropertyRNA *prop; | |||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryTraceImage", "storage"); | |||||
| prop = RNA_def_property(srna, "turn_policy", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, turn_policy_items); | |||||
| RNA_def_property_enum_default(prop, GEO_NODE_TRACE_IMAGE_TURN_POLICY_BLACK); | |||||
| RNA_def_property_ui_text( | |||||
| prop, | |||||
| "Turn Policy", | |||||
| "Determines how to resolve ambiguities during decomposition of an image into paths."); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | |||||
| } | |||||
| static void def_geo_viewer(StructRNA *srna) | static void def_geo_viewer(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryViewer", "storage"); | RNA_def_struct_sdna_from(srna, "NodeGeometryViewer", "storage"); | ||||
| 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); | ||||
| ▲ Show 20 Lines • Show All 2,214 Lines • Show Last 20 Lines | |||||