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:
authorMatt Ebb <matt@mke3.net>2009-11-11 12:11:21 +0300
committerMatt Ebb <matt@mke3.net>2009-11-11 12:11:21 +0300
commitc0fae59c99fdcb802b055c81d51ece6cf9ce5518 (patch)
treee6bb9f3a302e3e222a4fc84b2c1ca746946a9199
parentb2bb9ca39a687efc5dd1014e78650e39452d7cbf (diff)
* Fixed nodetree animation by giving nodes unique names
Now the rna path to nodes happens via the node name, which is ensured to be unique via RNA. As part of this, the node->username string has been removed, upon renaming the node itself it takes care of making sure it's unique (like bones, constraints, etc). There's currently no interactive rename tool, but you can do it via the datablocks editor. - plus a few notifier tweaks, using the newer NC_NODE notifier to refresh graph editor etc.
-rw-r--r--source/blender/blenkernel/BKE_node.h1
-rw-r--r--source/blender/blenkernel/intern/node.c12
-rw-r--r--source/blender/blenloader/intern/readfile.c14
-rw-r--r--source/blender/editors/space_action/space_action.c7
-rw-r--r--source/blender/editors/space_graph/space_graph.c7
-rw-r--r--source/blender/editors/space_nla/space_nla.c7
-rw-r--r--source/blender/editors/space_node/node_draw.c31
-rw-r--r--source/blender/editors/space_node/node_edit.c4
-rw-r--r--source/blender/makesdna/DNA_node_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c588
-rw-r--r--source/blender/windowmanager/WM_types.h6
11 files changed, 380 insertions, 299 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 4c872fb247c..f9130e24a08 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -162,6 +162,7 @@ void nodeVerifyType(struct bNodeTree *ntree, struct bNode *node);
void nodeAddToPreview(struct bNode *, float *, int, int);
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
+void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
void nodeAddSockets(struct bNode *node, struct bNodeType *ntype);
struct bNode *nodeAddNodeType(struct bNodeTree *ntree, int type, struct bNodeTree *ngroup, struct ID *id);
void nodeRegisterType(struct ListBase *typelist, const struct bNodeType *ntype) ;
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 708ef9829e1..1b0f1f28d2c 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -32,6 +32,7 @@
#endif
#include <stdlib.h>
+#include <stddef.h>
#include <string.h>
#include "DNA_ID.h"
@@ -903,7 +904,11 @@ void nodeAddSockets(bNode *node, bNodeType *ntype)
}
}
}
-
+/* Find the first available, non-duplicate name for a given node */
+void nodeUniqueName(bNodeTree *ntree, bNode *node)
+{
+ BLI_uniquename(&ntree->nodes, node, "Node", '.', offsetof(bNode, name), 32);
+}
bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id)
{
@@ -937,6 +942,9 @@ bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id)
}
else
BLI_strncpy(node->name, ntype->name, NODE_MAXSTR);
+
+ nodeUniqueName(ntree, node);
+
node->type= ntype->type;
node->flag= NODE_SELECT|ntype->flag;
node->width= ntype->width;
@@ -989,6 +997,8 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node, int internal)
bNodeSocket *sock, *oldsock;
*nnode= *node;
+ nodeUniqueName(ntree, nnode);
+
BLI_addtail(&ntree->nodes, nnode);
BLI_duplicatelist(&nnode->inputs, &node->inputs);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b6ec8376b12..b164b2aa404 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10037,6 +10037,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
sce= sce->id.next;
}
}
+ {
+ /* ensure all nodes have unique names */
+ bNodeTree *ntree= main->nodetree.first;
+ while(ntree) {
+ bNode *node=ntree->nodes.first;
+
+ while(node) {
+ nodeUniqueName(ntree, node);
+ node= node->next;
+ }
+
+ ntree= ntree->id.next;
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 870a67de330..59b690002d2 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -341,6 +341,13 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_NODE:
+ switch(wmn->action) {
+ case NA_EDITED:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
default:
if(wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index f076bb5549e..157202190bb 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -417,6 +417,13 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_NODE:
+ switch(wmn->action) {
+ case NA_EDITED:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
default:
if(wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 743f6e24d05..1e35e9122e6 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -432,6 +432,13 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_NODE:
+ switch(wmn->action) {
+ case NA_EDITED:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
default:
if(wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 4ac6fbebea1..1cdad0b746c 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -719,12 +719,14 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
else
UI_ThemeColor(TH_TEXT);
- if(node->flag & NODE_MUTED)
- sprintf(showname, "[%s]", node->name);
- else if(node->username[0])
- sprintf(showname, "(%s) %s", node->username, node->name);
+ if(node->flag & NODE_CUSTOM_NAME)
+ BLI_strncpy(showname, node->name, 32);
else
- BLI_strncpy(showname, node->name, 128);
+ /* todo: auto name display for node types */
+ BLI_strncpy(showname, node->name, 32);
+
+ //if(node->flag & NODE_MUTED)
+ // sprintf(showname, "[%s]", showname);
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(rct->ymax-NODE_DY),
(int)(iconofs - rct->xmin-18.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
@@ -878,12 +880,15 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
if(node->miniwidth>0.0f) {
- if(node->flag & NODE_MUTED)
- sprintf(showname, "[%s]", node->name);
- else if(node->username[0])
- sprintf(showname, "(%s)%s", node->username, node->name);
+
+ if(node->flag & NODE_CUSTOM_NAME)
+ BLI_strncpy(showname, node->name, 128);
else
+ /* todo: auto name display */
BLI_strncpy(showname, node->name, 128);
+
+ //if(node->flag & NODE_MUTED)
+ // sprintf(showname, "[%s]", showname);
uiDefBut(node->block, LABEL, 0, showname, (short)(rct->xmin+15), (short)(centy-10),
(int)(rct->xmax - rct->xmin-18.0f -12.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
@@ -1021,12 +1026,8 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* backdrop title */
UI_ThemeColor(TH_TEXT_HI);
- if(gnode->username[0]) {
- strcpy(showname,"(");
- strcat(showname, gnode->username);
- strcat(showname,") ");
- strcat(showname, ngroup->id.name+2);
- }
+ if (gnode->flag & NODE_CUSTOM_NAME)
+ strcat(showname, gnode->name);
else
strcpy(showname, ngroup->id.name+2);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 81c6490fda6..70c47a67761 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1251,6 +1251,8 @@ void NODE_OT_resize(wmOperatorType *ot)
/* ******************** rename ******************* */
+
+/* should go through RNA */
void node_rename(SpaceNode *snode)
{
bNode *node, *rename_node;
@@ -1266,7 +1268,7 @@ void node_rename(SpaceNode *snode)
if(found_node) {
rename_node= nodeGetActive(snode->edittree);
- node_rename_but((char *)rename_node->username);
+ node_rename_but((char *)rename_node->name);
// allqueue(REDRAWNODE, 1);
}
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index ab7277ee840..7ca8cea0763 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -110,7 +110,6 @@ typedef struct bNode {
struct bNode *next, *prev, *new_node;
char name[32];
- char username[32]; /* custom name defined by user */
short type, flag;
short done, level; /* both for dependency and sorting */
short lasty, menunr; /* lasty: check preview render status, menunr: browse ID blocks */
@@ -152,6 +151,7 @@ typedef struct bNode {
#define NODE_TEST 256
/* composite: don't do node but pass on buffer(s) */
#define NODE_MUTED 512
+#define NODE_CUSTOM_NAME 1024
typedef struct bNodeLink {
struct bNodeLink *next, *prev;
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 2aef756bc8e..b856e35cf4c 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -36,90 +36,13 @@
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
+#include "BKE_animsys.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_image.h"
#include "BKE_texture.h"
-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 prop_image_layer_items[] = {
- { 0, "PLACEHOLDER", 0, "Placeholder", ""},
- {0, NULL, 0, NULL, NULL}};
-
-static EnumPropertyItem prop_scene_layer_items[] = {
- { 0, "PLACEHOLDER", 0, "Placeholder", ""},
- {0, NULL, 0, NULL, NULL}};
-
-static EnumPropertyItem prop_tri_channel_items[] = {
- { 1, "R", 0, "R", ""},
- { 2, "G", 0, "G", ""},
- { 3, "B", 0, "B", ""},
- {0, NULL, 0, NULL, NULL}};
+#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -163,14 +86,9 @@ static StructRNA *rna_NodeSocketType_refine(struct PointerRNA *ptr)
static char *rna_Node_path(PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
bNode *node= (bNode*)ptr->data;
- int index = BLI_findindex(&ntree->nodes, node);
-
- /* XXX: node index (and therefore path) gets changed around depending on order of nodetree!
- * This means that node animation can switch from one node to another if you rearrange them.
- * Needs a fix to make the path based on unique names/ids! */
- return BLI_sprintfN("nodes[%d]", index);
+
+ return BLI_sprintfN("nodes[\"%s\"]", node->name);
}
static char *rna_NodeSocket_path(PointerRNA *ptr)
@@ -178,24 +96,19 @@ static char *rna_NodeSocket_path(PointerRNA *ptr)
bNodeTree *ntree= (bNodeTree*)ptr->id.data;
bNodeSocket *sock= (bNodeSocket*)ptr->data;
bNode *node;
+ int socketindex;
- int socketindex, nodeindex;
-
- if (!nodeFindNode(ntree, sock, &node, NULL)) return;
-
- /* XXX: node index (and therefore path) gets changed around depending on order of nodetree!
- * This means that node animation can switch from one node to another if you rearrange them.
- * Needs a fix to make the path based on unique names/ids! */
- nodeindex = BLI_findindex(&ntree->nodes, node);
-
+ if (!nodeFindNode(ntree, sock, &node, NULL)) return NULL;
+
socketindex = BLI_findindex(&node->inputs, sock);
if (socketindex != -1)
- return BLI_sprintfN("nodes[%d].inputs[%d]", nodeindex, socketindex);
-
+ return BLI_sprintfN("nodes[\"%s\"].inputs[%d]", node->name, socketindex);
+
socketindex = BLI_findindex(&node->outputs, sock);
if (socketindex != -1)
- return BLI_sprintfN("nodes[%d].outputs[%d]", nodeindex, socketindex);
+ return BLI_sprintfN("nodes[\"%s\"].outputs[%d]", node->name, socketindex);
+ return NULL;
}
static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
@@ -267,43 +180,70 @@ static void rna_Node_update(bContext *C, PointerRNA *ptr)
static void rna_Node_update_name(bContext *C, PointerRNA *ptr)
{
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+ bNode *node= (bNode*)ptr->data;
+ char oldname[32];
+
+ /* make a copy of the old name first */
+ BLI_strncpy(oldname, node->name, sizeof(oldname));
+
+ 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);
+
+ node_update(C, ntree, node);
+}
+
+/* this should be done at display time! if no custom names are set */
+#if 0
+static void rna_Node_update_username(bContext *C, PointerRNA *ptr)
+{
bNode *node= (bNode*)ptr->data;
const char *name;
- if(node->id) {
- BLI_strncpy(node->name, node->id->name+2, NODE_MAXSTR);
- }
- else {
- switch(node->typeinfo->type) {
- case SH_NODE_MIX_RGB:
- case CMP_NODE_MIX_RGB:
- case TEX_NODE_MIX_RGB:
- if(RNA_enum_name(node_blend_type_items, node->custom1, &name))
- BLI_strncpy(node->name, name, NODE_MAXSTR);
- break;
- case CMP_NODE_FILTER:
- if(RNA_enum_name(node_filter_items, node->custom1, &name))
- BLI_strncpy(node->name, name, NODE_MAXSTR);
- break;
- case CMP_NODE_FLIP:
- if(RNA_enum_name(node_flip_items, node->custom1, &name))
- BLI_strncpy(node->name, name, NODE_MAXSTR);
- break;
- case SH_NODE_MATH:
- case CMP_NODE_MATH:
- case TEX_NODE_MATH:
- if(RNA_enum_name(node_math_items, node->custom1, &name))
- BLI_strncpy(node->name, name, NODE_MAXSTR);
- break;
- case SH_NODE_VECT_MATH:
- if(RNA_enum_name(node_vec_math_items, node->custom1, &name))
- BLI_strncpy(node->name, name, NODE_MAXSTR);
- break;
+
+ /*
+ if (!node->username[0]) {
+ if(node->id) {
+ BLI_strncpy(node->username, node->id->name+2, NODE_MAXSTR);
+ }
+ else {
+
+ switch(node->typeinfo->type) {
+ case SH_NODE_MIX_RGB:
+ case CMP_NODE_MIX_RGB:
+ case TEX_NODE_MIX_RGB:
+ if(RNA_enum_name(node_blend_type_items, node->custom1, &name))
+ BLI_strncpy(node->username, name, NODE_MAXSTR);
+ break;
+ case CMP_NODE_FILTER:
+ if(RNA_enum_name(node_filter_items, node->custom1, &name))
+ BLI_strncpy(node->username, name, NODE_MAXSTR);
+ break;
+ case CMP_NODE_FLIP:
+ if(RNA_enum_name(node_flip_items, node->custom1, &name))
+ BLI_strncpy(node->username, name, NODE_MAXSTR);
+ break;
+ case SH_NODE_MATH:
+ case CMP_NODE_MATH:
+ case TEX_NODE_MATH:
+ if(RNA_enum_name(node_math_items, node->custom1, &name))
+ BLI_strncpy(node->username, name, NODE_MAXSTR);
+ break;
+ case SH_NODE_VECT_MATH:
+ if(RNA_enum_name(node_vec_math_items, node->custom1, &name))
+ BLI_strncpy(node->username, name, NODE_MAXSTR);
+ break;
+ }
+ */
}
}
rna_Node_update(C, ptr);
}
+#endif
static void rna_NodeSocket_update(bContext *C, PointerRNA *ptr)
{
@@ -362,11 +302,12 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
EnumPropertyItem tmp = {0, "", 0, "", ""};
int i=0, totitem=0;
- for (rl; rl; rl=rl->next) {
+ while (rl) {
tmp.identifier = rl->name;
tmp.name= rl->name;
tmp.value = i++;
RNA_enum_item_add(&item, &totitem, &tmp);
+ rl=rl->next;
}
RNA_enum_item_end(&item, &totitem);
@@ -396,7 +337,6 @@ static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *C, PointerRNA *ptr
bNode *node= (bNode*)ptr->data;
Scene *sce = (Scene *)node->id;
EnumPropertyItem *item= NULL;
- EnumPropertyItem tmp = {0, "", 0, "", ""};
RenderLayer *rl;
if (!sce) return NULL;
@@ -462,6 +402,87 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *C, PointerRNA *ptr, in
#else
+static EnumPropertyItem prop_image_layer_items[] = {
+{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
+{0, NULL, 0, NULL, NULL}};
+
+static EnumPropertyItem prop_scene_layer_items[] = {
+{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
+{0, NULL, 0, NULL, NULL}};
+
+static EnumPropertyItem prop_tri_channel_items[] = {
+{ 1, "R", 0, "R", ""},
+{ 2, "G", 0, "G", ""},
+{ 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}};
+
+
#define MaxNodes 1000
enum
@@ -575,7 +596,7 @@ static void def_math(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, node_math_items);
RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_vector_math(StructRNA *srna)
@@ -586,7 +607,7 @@ static void def_vector_math(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, node_vec_math_items);
RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_rgb_curve(StructRNA *srna)
@@ -597,7 +618,7 @@ static void def_rgb_curve(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_vector_curve(StructRNA *srna)
@@ -608,7 +629,7 @@ static void def_vector_curve(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_time(StructRNA *srna)
@@ -619,17 +640,17 @@ static void def_time(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Curve", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_ui_text(prop, "End Frame", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_colorramp(StructRNA *srna)
@@ -640,7 +661,7 @@ static void def_colorramp(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_mix_rgb(StructRNA *srna)
@@ -651,12 +672,12 @@ static void def_mix_rgb(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, node_blend_type_items);
RNA_def_property_ui_text(prop, "Blend Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1);
RNA_def_property_ui_text(prop, "Alpha", "Include alpha of second input in this operation");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_texture(StructRNA *srna)
@@ -668,12 +689,12 @@ static void def_texture(StructRNA *srna)
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "node_output", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_ui_text(prop, "Node Output", "For node-based textures, which output node to use");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -688,22 +709,22 @@ static void def_sh_material(StructRNA *srna)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_DIFF);
RNA_def_property_ui_text(prop, "Diffuse", "Material Node outputs Diffuse");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Material Node outputs Specular");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "invert_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_NEG);
RNA_def_property_ui_text(prop, "Invert Normal", "Material Node uses inverted normal");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_sh_mapping(StructRNA *srna)
@@ -716,41 +737,41 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "Location offset for the input coordinate");
RNA_def_property_ui_range(prop, -10.f, 10.f, 0.1f, 2);
- RNA_def_property_update(prop, 0, "rna_Node_mapping_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_mapping_update");
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "Rotation offset for the input coordinate");
RNA_def_property_ui_range(prop, -360.f, 360.f, 1.f, 2);
- RNA_def_property_update(prop, 0, "rna_Node_mapping_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_mapping_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "Scale adjustment for the input coordinate");
RNA_def_property_ui_range(prop, -10.f, 10.f, 0.1f, 2);
- RNA_def_property_update(prop, 0, "rna_Node_mapping_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_mapping_update");
prop = RNA_def_property(srna, "clamp_minimum", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Clamp Minimum", "Clamp the output coordinate to a minimum value");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum", "Minimum value to clamp coordinate to");
RNA_def_property_ui_range(prop, -10.f, 10.f, 0.1f, 2);
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "clamp_maximum", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Clamp Maximum", "Clamp the output coordinate to a maximum value");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum", "Maximum value to clamp coordinate to");
RNA_def_property_ui_range(prop, -10.f, 10.f, 0.1f, 2);
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_sh_geometry(StructRNA *srna)
@@ -762,12 +783,12 @@ static void def_sh_geometry(StructRNA *srna)
prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_ui_text(prop, "UV Layer", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "color_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "colname");
RNA_def_property_ui_text(prop, "Vertex Color Layer", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -781,7 +802,7 @@ static void def_cmp_alpha_over(StructRNA *srna)
prop = RNA_def_property(srna, "convert_premul", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
RNA_def_property_ui_text(prop, "Convert Premul", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeTwoFloats", "storage");
@@ -789,7 +810,7 @@ static void def_cmp_alpha_over(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Premul", "Mix Factor");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_hue_saturation(StructRNA *srna)
@@ -802,19 +823,19 @@ static void def_cmp_hue_saturation(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "hue");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Hue", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "sat", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sat");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Saturation", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "val", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "val");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_blur(StructRNA *srna)
@@ -838,52 +859,52 @@ static void def_cmp_blur(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "sizex");
RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size X", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "sizey", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizey");
RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size Y", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
RNA_def_property_ui_text(prop, "Relative", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percentx");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size X", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percenty");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size Y", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, filter_type_items);
RNA_def_property_ui_text(prop, "Filter Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "bokeh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bokeh", 1);
RNA_def_property_ui_text(prop, "Bokeh", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "gamma", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gamma", 1);
RNA_def_property_ui_text(prop, "Gamma", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -895,7 +916,7 @@ static void def_cmp_filter(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, node_filter_items);
RNA_def_property_ui_text(prop, "Filter Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_map_value(StructRNA *srna)
@@ -909,38 +930,38 @@ static void def_cmp_map_value(StructRNA *srna)
RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Offset", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Size", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Use Minimum", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Use Maximum", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_array(prop, 1);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_vector_blur(StructRNA *srna)
@@ -952,27 +973,27 @@ static void def_cmp_vector_blur(StructRNA *srna)
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
RNA_def_property_ui_text(prop, "Samples", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "min_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
RNA_def_property_ui_text(prop, "Min Speed", "Minimum speed for a pixel to be blurred; used to separate background from foreground");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "max_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspeed");
RNA_def_property_ui_text(prop, "Max Speed", "Maximum speed, or zero for none");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_ui_text(prop, "Blur Factor", "Scaling factor for motion vectors; actually 'shutter speed' in frames");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "curved", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curved", 1);
RNA_def_property_ui_text(prop, "Curved", "Interpolate between frames in a bezier curve, rather than linearly");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_levels(StructRNA *srna)
@@ -991,7 +1012,7 @@ static void def_cmp_levels(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, channel_items);
RNA_def_property_ui_text(prop, "Channel", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_image(StructRNA *srna)
@@ -1012,7 +1033,7 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "ImageUser", "storage");
@@ -1020,36 +1041,36 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "frames");
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Number of images used in animation");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 1);
RNA_def_property_ui_text(prop, "Cyclic", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
RNA_def_property_ui_text(prop, "Auto-Refresh", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop= RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "layer");
RNA_def_property_enum_items(prop, prop_image_layer_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_image_layer_itemf");
RNA_def_property_ui_text(prop, "Layer", "");
- RNA_def_property_update(prop, 0, "rna_Node_image_layer_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_image_layer_update");
}
static void def_cmp_render_layers(StructRNA *srna)
@@ -1061,20 +1082,20 @@ static void def_cmp_render_layers(StructRNA *srna)
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop= RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, prop_scene_layer_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_scene_layer_itemf");
RNA_def_property_ui_text(prop, "Layer", "");
- RNA_def_property_update(prop, 0, "rna_Node_scene_layer_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_scene_layer_update");
/* TODO: comments indicate this might be a hack */
prop = RNA_def_property(srna, "re_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom2", 1);
RNA_def_property_ui_text(prop, "Re-render", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_output_file(StructRNA *srna)
@@ -1107,37 +1128,42 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Image Type", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "exr_half", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
RNA_def_property_ui_text(prop, "Half", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "codec");
RNA_def_property_enum_items(prop, openexr_codec_items);
RNA_def_property_ui_text(prop, "Codec", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Quality", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, MINFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "efra");
RNA_def_property_range(prop, MINFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "End Frame", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_dilate_erode(StructRNA *srna)
@@ -1148,7 +1174,7 @@ static void def_cmp_dilate_erode(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Distance", "Distance to grow/shrink (number of iterations)");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_scale(StructRNA *srna)
@@ -1165,7 +1191,7 @@ static void def_cmp_scale(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, space_items);
RNA_def_property_ui_text(prop, "Space", "Coordinate space to scale relative to");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_diff_matte(StructRNA *srna)
@@ -1179,14 +1205,14 @@ static void def_cmp_diff_matte(StructRNA *srna)
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_color_matte(StructRNA *srna)
@@ -1199,19 +1225,19 @@ static void def_cmp_color_matte(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "H", "Hue tolerance for colors to be considered a keying color");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "s", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "S", "Saturation Tolerance for the color");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "v", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "V", "Value Tolerance for the color");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_distance_matte(StructRNA *srna)
@@ -1225,14 +1251,14 @@ static void def_cmp_distance_matte(StructRNA *srna)
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_color_spill(StructRNA *srna)
@@ -1249,7 +1275,7 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, channel_items);
RNA_def_property_ui_text(prop, "Channel", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
@@ -1257,7 +1283,7 @@ static void def_cmp_color_spill(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "t1");
RNA_def_property_range(prop, 0.0f, 0.5f);
RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_luma_matte(StructRNA *srna)
@@ -1271,14 +1297,14 @@ static void def_cmp_luma_matte(StructRNA *srna)
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_chroma_matte(StructRNA *srna)
@@ -1292,32 +1318,32 @@ static void def_cmp_chroma_matte(StructRNA *srna)
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
RNA_def_property_range(prop, 1.0f, 80.0f);
RNA_def_property_ui_text(prop, "Acceptance", "Tolerance for a color to be considered a keying color");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "cutoff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 30.0f);
RNA_def_property_ui_text(prop, "Cutoff", "Tolerance below which colors will be considered as exact matches");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Lift", "Alpha lift");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adjust", "Adjusts the brightness of any shadows captured");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_channel_matte(StructRNA *srna)
@@ -1335,7 +1361,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, color_space_items);
RNA_def_property_ui_text(prop, "Color Space", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop= RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
@@ -1343,7 +1369,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_enum_items(prop, prop_tri_channel_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_channel_itemf");
RNA_def_property_ui_text(prop, "Channel", "Channel used to determine matte");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
@@ -1352,14 +1378,14 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t1_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
RNA_def_property_float_funcs(prop, NULL, "rna_Matte_t2_set", NULL);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_flip(StructRNA *srna)
@@ -1370,7 +1396,7 @@ static void def_cmp_flip(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, node_flip_items);
RNA_def_property_ui_text(prop, "Axis", "");
- RNA_def_property_update(prop, 0, "rna_Node_update_name");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_splitviewer(StructRNA *srna)
@@ -1386,13 +1412,13 @@ static void def_cmp_splitviewer(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom2");
RNA_def_property_enum_items(prop, axis_items);
RNA_def_property_ui_text(prop, "Axis", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "factor", PROP_INT, PROP_FACTOR);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_id_mask(StructRNA *srna)
@@ -1403,7 +1429,7 @@ static void def_cmp_id_mask(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_map_uv(StructRNA *srna)
@@ -1414,7 +1440,7 @@ static void def_cmp_map_uv(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Alpha", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_defocus(StructRNA *srna)
@@ -1437,60 +1463,60 @@ static void def_cmp_defocus(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "bktype");
RNA_def_property_enum_items(prop, bokeh_items);
RNA_def_property_ui_text(prop, "Bokeh Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
/* TODO: angle in degrees */
prop = RNA_def_property(srna, "angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rotation");
RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset in degrees");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "gamma_correction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gamco", 1);
RNA_def_property_ui_text(prop, "Gamma Correction", "Enable gamma correction before and after main process");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
/* TODO */
prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstop");
RNA_def_property_range(prop, 0.0f, 128.0f);
RNA_def_property_ui_text(prop, "fStop", "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "max_blur", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxblur");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Max Blur", "blur limit, maximum CoC radius, 0=no limit");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bthresh");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Threshold", "CoC radius threshold, prevents background bleed on in-focus midground, 0=off");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "preview", 1);
RNA_def_property_ui_text(prop, "Preview", "Enable sampling mode, useful for preview when using low samplecounts");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
RNA_def_property_range(prop, 16, 256);
RNA_def_property_ui_text(prop, "Samples", "Number of samples (16=grainy, higher=less noise)");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "no_zbuf", 1);
RNA_def_property_ui_text(prop, "Use Z-Buffer", "Disable when using an image as input instead of actual zbuffer (auto enabled if node not image based, eg. time node)");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "z_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Z-Scale", "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_invert(StructRNA *srna)
@@ -1500,12 +1526,12 @@ static void def_cmp_invert(StructRNA *srna)
prop = RNA_def_property(srna, "rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_CHAN_RGB);
RNA_def_property_ui_text(prop, "RGB", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_CHAN_A);
RNA_def_property_ui_text(prop, "Alpha", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_crop(StructRNA *srna)
@@ -1515,7 +1541,7 @@ static void def_cmp_crop(StructRNA *srna)
prop = RNA_def_property(srna, "crop_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
RNA_def_property_ui_text(prop, "Crop Image Size", "Whether to crop the size of the input image");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
RNA_def_struct_sdna_from(srna, "NodeTwoXYs", "storage");
@@ -1523,25 +1549,25 @@ static void def_cmp_crop(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "x1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X1", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "x2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x2");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X2", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "y1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y1");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y1", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "y2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y2");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y2", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_dblur(StructRNA *srna)
@@ -1554,48 +1580,48 @@ static void def_cmp_dblur(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Iterations", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wrap", 1);
RNA_def_property_ui_text(prop, "Wrap", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_x");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center X", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_y");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center Y", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Distance", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Angle", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "spin", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spin");
RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Spin", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Zoom", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_bilateral_blur(StructRNA *srna)
@@ -1608,19 +1634,19 @@ static void def_cmp_bilateral_blur(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "sigma_color", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_color");
RNA_def_property_range(prop, 0.01f, 3.0f);
RNA_def_property_ui_text(prop, "Color Sigma", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "sigma_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_space");
RNA_def_property_range(prop, 0.01f, 30.0f);
RNA_def_property_ui_text(prop, "Space Sigma", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_premul_key(StructRNA *srna)
@@ -1636,7 +1662,7 @@ static void def_cmp_premul_key(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Mapping", "Conversion between premultiplied alpha and key alpha");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -1663,66 +1689,66 @@ static void def_cmp_glare(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Glare Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "quality");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Quality", "If not set to high quality, the effect will be applied to a low-res copy of the source image");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 2, 5);
RNA_def_property_ui_text(prop, "Iterations", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "color_modulation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colmod");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Modulation", "Amount of Color Modulation, modulates colors of streaks and ghosts for a spectral dispersion effect");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "mix", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mix");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Mix", "-1 is original image only, 0 is exact 50/50 mix, 1 is processed image only");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "threshold");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Threshold", "The glare filter will only be applied to pixels brighter than this value");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "streaks", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, 2, 16);
RNA_def_property_ui_text(prop, "Streaks", "Total number of streaks");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "angle_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle_ofs");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Angle Offset", "Streak angle offset in degrees");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fade");
RNA_def_property_range(prop, 0.75f, 1.0f);
RNA_def_property_ui_text(prop, "Fade", "Streak fade-out factor");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "rotate_45", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "angle", 1);
RNA_def_property_ui_text(prop, "Rotate 45", "Simple star filter: add 45 degree rotation offset");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 6, 9);
RNA_def_property_ui_text(prop, "Size", "Glow/glare size (not actual size; relative to initial size of bright area of pixels)");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
/* TODO */
}
@@ -1742,49 +1768,49 @@ static void def_cmp_tonemap(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Tonemap Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "key");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Offset", "Normally always 1, but can be used as an extra control to alter the brightness curve");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gamma");
RNA_def_property_range(prop, 0.001f, 3.0f);
RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_range(prop, -8.0f, 8.0f);
RNA_def_property_ui_text(prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "m");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "a");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "c");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_lensdist(StructRNA *srna)
@@ -1796,17 +1822,17 @@ static void def_cmp_lensdist(StructRNA *srna)
prop = RNA_def_property(srna, "projector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proj", 1);
RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode. Effect is applied in horizontal direction only.");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jit", 1);
RNA_def_property_ui_text(prop, "Jitter", "Enable/disable jittering; faster, but also noisier");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "fit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "fit", 1);
RNA_def_property_ui_text(prop, "Fit", "For positive distortion factor only: scale image such that black areas are not visible");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -1822,7 +1848,7 @@ static void def_tex_output(StructRNA *srna)
prop = RNA_def_property(srna, "output_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Output Name", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_tex_image(StructRNA *srna)
@@ -1833,7 +1859,7 @@ static void def_tex_image(StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "storage");
RNA_def_property_struct_type(prop, "ImageUser");
RNA_def_property_ui_text(prop, "Settings", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_tex_bricks(StructRNA *srna)
@@ -1844,25 +1870,25 @@ static void def_tex_bricks(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "custom3");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Offset Amount", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Offset Frequency", "Offset every N rows");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom4");
RNA_def_property_range(prop, 0.0f, 99.0f);
RNA_def_property_ui_text(prop, "Squash Amount", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Squash Frequency", "Squash every N rows");
- RNA_def_property_update(prop, 0, "rna_Node_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
/* -------------------------------------------------------------------------- */
@@ -1956,7 +1982,7 @@ static void rna_def_node_socket_value(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 1);
RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
- RNA_def_property_update(prop, 0, "rna_NodeSocket_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -1980,7 +2006,7 @@ static void rna_def_node_socket_vector(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
- RNA_def_property_update(prop, 0, "rna_NodeSocket_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -2004,7 +2030,7 @@ static void rna_def_node_socket_rgba(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "ns.vec");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached.");
- RNA_def_property_update(prop, 0, "rna_NodeSocket_update");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
}
@@ -2025,10 +2051,12 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, -10000.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Location", "");
+ RNA_def_property_update(prop, NC_NODE, "rna_Node_update");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Node name.");
RNA_def_struct_name_property(srna, prop);
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update_name");
prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 3d31341c66a..891ed8358fb 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -133,8 +133,8 @@ typedef struct wmNotifier {
#define NC_WORLD (13<<24)
#define NC_ANIMATION (14<<24)
#define NC_SPACE (15<<24)
-#define NC_NODE (15<<24)
#define NC_GEOM (16<<24)
+#define NC_NODE (17<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
@@ -211,6 +211,10 @@ typedef struct wmNotifier {
#define ND_SELECT (80<<16)
#define ND_DATA (81<<16)
+ /* NC_NODE Nodes */
+#define ND_NODE_SELECT (1<<16)
+
+
/* NC_SPACE */
#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */