Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_enum_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c121
2 files changed, 65 insertions, 61 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 70c63b99d71..722facf4ea8 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -96,6 +96,11 @@ extern EnumPropertyItem property_unit_items[];
extern EnumPropertyItem viewport_shade_items[];
+extern EnumPropertyItem node_blend_type_items[];
+extern EnumPropertyItem node_math_items[];
+extern EnumPropertyItem node_vec_math_items[];
+extern EnumPropertyItem node_filter_items[];
+
struct bContext;
struct PointerRNA;
EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 5c962145c55..8ce2489f286 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -47,6 +47,66 @@
#include "MEM_guardedalloc.h"
+EnumPropertyItem node_blend_type_items[] = {
+{ 0, "MIX", 0, "Mix", ""},
+{ 1, "ADD", 0, "Add", ""},
+{ 3, "SUBTRACT", 0, "Subtract", ""},
+{ 2, "MULTIPLY", 0, "Multiply", ""},
+{ 4, "SCREEN", 0, "Screen", ""},
+{ 9, "OVERLAY", 0, "Overlay", ""},
+{ 5, "DIVIDE", 0, "Divide", ""},
+{ 6, "DIFFERENCE", 0, "Difference", ""},
+{ 7, "DARKEN", 0, "Darken", ""},
+{ 8, "LIGHTEN", 0, "Lighten", ""},
+{10, "DODGE", 0, "Dodge", ""},
+{11, "BURN", 0, "Burn", ""},
+{15, "COLOR", 0, "Color", ""},
+{14, "VALUE", 0, "Value", ""},
+{13, "SATURATION", 0, "Saturation", ""},
+{12, "HUE", 0, "Hue", ""},
+{16, "SOFT_LIGHT", 0, "Soft Light", ""},
+{17, "LINEAR_LIGHT", 0, "Linear Light",""},
+{0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem node_math_items[] = {
+{ 0, "ADD", 0, "Add", ""},
+{ 1, "SUBTRACT", 0, "Subtract", ""},
+{ 2, "MULTIPLY", 0, "Multiply", ""},
+{ 3, "DIVIDE", 0, "Divide", ""},
+{ 4, "SINE", 0, "Sine", ""},
+{ 5, "COSINE", 0, "Cosine", ""},
+{ 6, "TANGENT", 0, "Tangent", ""},
+{ 7, "ARCSINE", 0, "Arcsine", ""},
+{ 8, "ARCCOSINE", 0, "Arccosine", ""},
+{ 9, "ARCTANGENT", 0, "Arctangent", ""},
+{10, "POWER", 0, "Power", ""},
+{11, "LOGARITHM", 0, "Logarithm", ""},
+{12, "MINIMUM", 0, "Minimum", ""},
+{13, "MAXIMUM", 0, "Maximum", ""},
+{14, "ROUND", 0, "Round", ""},
+{15, "LESS_THAN", 0, "Less Than", ""},
+{16, "GREATER_THAN", 0, "Greater Than", ""},
+{0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem node_vec_math_items[] = {
+{0, "ADD", 0, "Add", ""},
+{1, "SUBTRACT", 0, "Subtract", ""},
+{2, "AVERAGE", 0, "Average", ""},
+{3, "DOT_PRODUCT", 0, "Dot Product", ""},
+{4, "CROSS_PRODUCT", 0, "Cross Product", ""},
+{5, "NORMALIZE", 0, "Normalize", ""},
+{0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem node_filter_items[] = {
+{0, "SOFTEN", 0, "Soften", ""},
+{1, "SHARPEN", 0, "Sharpen", ""},
+{2, "LAPLACE", 0, "Laplace", ""},
+{3, "SOBEL", 0, "Sobel", ""},
+{4, "PREWITT", 0, "Prewitt", ""},
+{5, "KIRSCH", 0, "Kirsch", ""},
+{6, "SHADOW", 0, "Shadow", ""},
+{0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BLI_linklist.h"
@@ -230,7 +290,6 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(node->name, value, sizeof(node->name));
nodeUniqueName(ntree, node);
- node->flag |= NODE_CUSTOM_NAME;
/* fix all the animation data which may link to this */
BKE_all_animdata_fix_paths_rename("nodes", oldname, node->name);
@@ -567,72 +626,12 @@ static EnumPropertyItem prop_tri_channel_items[] = {
{ 3, "B", 0, "B", ""},
{0, NULL, 0, NULL, NULL}};
-static EnumPropertyItem node_blend_type_items[] = {
-{ 0, "MIX", 0, "Mix", ""},
-{ 1, "ADD", 0, "Add", ""},
-{ 3, "SUBTRACT", 0, "Subtract", ""},
-{ 2, "MULTIPLY", 0, "Multiply", ""},
-{ 4, "SCREEN", 0, "Screen", ""},
-{ 9, "OVERLAY", 0, "Overlay", ""},
-{ 5, "DIVIDE", 0, "Divide", ""},
-{ 6, "DIFFERENCE", 0, "Difference", ""},
-{ 7, "DARKEN", 0, "Darken", ""},
-{ 8, "LIGHTEN", 0, "Lighten", ""},
-{10, "DODGE", 0, "Dodge", ""},
-{11, "BURN", 0, "Burn", ""},
-{15, "COLOR", 0, "Color", ""},
-{14, "VALUE", 0, "Value", ""},
-{13, "SATURATION", 0, "Saturation", ""},
-{12, "HUE", 0, "Hue", ""},
-{16, "SOFT_LIGHT", 0, "Soft Light", ""},
-{17, "LINEAR_LIGHT", 0, "Linear Light",""},
-{0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem node_flip_items[] = {
{0, "X", 0, "Flip X", ""},
{1, "Y", 0, "Flip Y", ""},
{2, "XY", 0, "Flip X & Y", ""},
{0, NULL, 0, NULL, NULL}};
-static EnumPropertyItem node_math_items[] = {
-{ 0, "ADD", 0, "Add", ""},
-{ 1, "SUBTRACT", 0, "Subtract", ""},
-{ 2, "MULTIPLY", 0, "Multiply", ""},
-{ 3, "DIVIDE", 0, "Divide", ""},
-{ 4, "SINE", 0, "Sine", ""},
-{ 5, "COSINE", 0, "Cosine", ""},
-{ 6, "TANGENT", 0, "Tangent", ""},
-{ 7, "ARCSINE", 0, "Arcsine", ""},
-{ 8, "ARCCOSINE", 0, "Arccosine", ""},
-{ 9, "ARCTANGENT", 0, "Arctangent", ""},
-{10, "POWER", 0, "Power", ""},
-{11, "LOGARITHM", 0, "Logarithm", ""},
-{12, "MINIMUM", 0, "Minimum", ""},
-{13, "MAXIMUM", 0, "Maximum", ""},
-{14, "ROUND", 0, "Round", ""},
-{15, "LESS_THAN", 0, "Less Than", ""},
-{16, "GREATER_THAN", 0, "Greater Than", ""},
-{0, NULL, 0, NULL, NULL}};
-
-static EnumPropertyItem node_vec_math_items[] = {
-{0, "ADD", 0, "Add", ""},
-{1, "SUBTRACT", 0, "Subtract", ""},
-{2, "AVERAGE", 0, "Average", ""},
-{3, "DOT_PRODUCT", 0, "Dot Product", ""},
-{4, "CROSS_PRODUCT", 0, "Cross Product", ""},
-{5, "NORMALIZE", 0, "Normalize", ""},
-{0, NULL, 0, NULL, NULL}};
-
-static EnumPropertyItem node_filter_items[] = {
-{0, "SOFTEN", 0, "Soften", ""},
-{1, "SHARPEN", 0, "Sharpen", ""},
-{2, "LAPLACE", 0, "Laplace", ""},
-{3, "SOBEL", 0, "Sobel", ""},
-{4, "PREWITT", 0, "Prewitt", ""},
-{5, "KIRSCH", 0, "Kirsch", ""},
-{6, "SHADOW", 0, "Shadow", ""},
-{0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem node_ycc_items[] = {
{ 0, "ITUBT601", 0, "ITU 601", ""},
{ 1, "ITUBT709", 0, "ITU 709", ""},