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 4,834 Lines • ▼ Show 20 Lines | |||||
| static void def_math(StructRNA *srna) | static void def_math(StructRNA *srna) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "custom1"); | RNA_def_property_enum_sdna(prop, NULL, "custom1"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_node_math_items); | RNA_def_property_enum_items(prop, rna_enum_node_math_items); | ||||
| RNA_def_property_ui_text(prop, "Operation", ""); | RNA_def_property_ui_text(prop, "Operation", ""); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_NODETREE); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update"); | ||||
| prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_MATH_CLAMP); | RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_MATH_CLAMP); | ||||
| RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0.0 to 1.0 range"); | RNA_def_property_ui_text(prop, "Clamp", "Clamp result of the node to 0.0 to 1.0 range"); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,881 Lines • ▼ Show 20 Lines | static const EnumPropertyItem mode_items[] = { | ||||
| "APPLY", | "APPLY", | ||||
| 0, | 0, | ||||
| "Apply Mask", | "Apply Mask", | ||||
| "Multiply the input image's RGBA channels by the alpha input value"}, | "Multiply the input image's RGBA channels by the alpha input value"}, | ||||
| {CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA, | {CMP_NODE_SETALPHA_MODE_REPLACE_ALPHA, | ||||
| "REPLACE_ALPHA", | "REPLACE_ALPHA", | ||||
| 0, | 0, | ||||
| "Replace Alpha", | "Replace Alpha", | ||||
| "Replace the input image's alpha channels by the alpha input value"}, | "Replace the input image's alpha channel by the alpha input value"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| RNA_def_struct_sdna_from(srna, "NodeSetAlpha", "storage"); | RNA_def_struct_sdna_from(srna, "NodeSetAlpha", "storage"); | ||||
| prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, mode_items); | RNA_def_property_enum_items(prop, mode_items); | ||||
| RNA_def_property_ui_text(prop, "Mode", ""); | RNA_def_property_ui_text(prop, "Mode", ""); | ||||
| ▲ Show 20 Lines • Show All 6,172 Lines • Show Last 20 Lines | |||||