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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-29 13:37:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-29 13:37:23 +0400
commitd8d3a6455f73f4e2fe9d8413004144da0295ac97 (patch)
tree9b05dd1562ef5f9ce7fee10d1896bc8b7fd6ad1c /source/blender/editors/space_node
parente0c2ddb8863c90b46725afaca0dce99b463c13d6 (diff)
remove pynodes, were not working in 2.5, not ported to py3.x
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c101
-rw-r--r--source/blender/editors/space_node/node_header.c19
2 files changed, 0 insertions, 120 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index c6a652921fd..97e7cff6f09 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -417,37 +417,6 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr = 0;
}
#endif
-static void node_dynamic_update_cb(bContext *C, void *UNUSED(ntree_v), void *node_v)
-{
- Main *bmain = CTX_data_main(C);
- Material *ma;
- bNode *node = (bNode *)node_v;
- ID *id = node->id;
- int error = 0;
-
- if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) error = 1;
-
- /* Users only have to press the "update" button in one pynode
- * and we also update all others sharing the same script */
- for (ma = bmain->mat.first; ma; ma = ma->id.next) {
- if (ma->nodetree) {
- bNode *nd;
- for (nd = ma->nodetree->nodes.first; nd; nd = nd->next) {
- if ((nd->type == NODE_DYNAMIC) && (nd->id == id)) {
- nd->custom1 = 0;
- nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_REPARSE);
- nd->menunr = 0;
- if (error)
- nd->custom1 = BSET(nd->custom1, NODE_DYNAMIC_ERROR);
- }
- }
- }
- }
-
- // allqueue(REDRAWBUTSSHADING, 0);
- // allqueue(REDRAWNODE, 0);
- // XXX BIF_preview_changed(ID_MA);
-}
static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
@@ -1107,34 +1076,6 @@ static void node_common_set_butfunc(bNodeType *ntype)
}
/* ****************** BUTTON CALLBACKS FOR SHADER NODES ***************** */
-
-static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
-{
- Main *bmain = CTX_data_main(C);
- bNodeTree *ntree = ntree_v;
- bNode *node = node_v;
- /* ID *oldid; */ /* UNUSED */
-
- if (node->menunr < 1) return;
-
- if (node->id) {
- node->id->us--;
- }
- /* oldid= node->id; */ /* UNUSED */
- node->id = BLI_findlink(&bmain->text, node->menunr - 1);
- id_us_plus(node->id);
- BLI_strncpy(node->name, node->id->name + 2, sizeof(node->name));
-
- node->custom1 = BSET(node->custom1, NODE_DYNAMIC_NEW);
-
- nodeSetActive(ntree, node);
-
- // allqueue(REDRAWBUTSSHADING, 0);
- // allqueue(REDRAWNODE, 0);
-
- node->menunr = 0;
-}
-
static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node = ptr->data;
@@ -1254,45 +1195,6 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(layout, ptr, "distribution", 0, "", ICON_NONE);
}
-static void node_shader_buts_dynamic(uiLayout *layout, bContext *C, PointerRNA *ptr)
-{
- Main *bmain = CTX_data_main(C);
- uiBlock *block = uiLayoutAbsoluteBlock(layout);
- bNode *node = ptr->data;
- bNodeTree *ntree = ptr->id.data;
- rctf *butr = &node->butr;
- uiBut *bt;
- // XXX SpaceNode *snode= curarea->spacedata.first;
- short dy = (short)butr->ymin;
- int xoff = 0;
-
- /* B_NODE_EXEC is handled in butspace.c do_node_buts */
- if (!node->id) {
- const char *strp;
- IDnames_to_pupstring(&strp, NULL, "", &(bmain->text), NULL, NULL);
- node->menunr = 0;
- bt = uiDefButS(block, MENU, B_NODE_EXEC /*+node->nr*/, strp,
- butr->xmin, dy, 19, 19,
- &node->menunr, 0, 0, 0, 0, "Browses existing choices");
- uiButSetFunc(bt, node_browse_text_cb, ntree, node);
- xoff = 19;
- if (strp) MEM_freeN((void *)strp);
- }
- else {
- bt = uiDefBut(block, BUT, B_NOP, "Update",
- butr->xmin + xoff, butr->ymin + 20, 50, 19,
- &node->menunr, 0.0, 19.0, 0, 0, "Refresh this node (and all others that use the same script)");
- uiButSetFunc(bt, node_dynamic_update_cb, ntree, node);
-
- if (BTST(node->custom1, NODE_DYNAMIC_ERROR)) {
- // UI_ThemeColor(TH_REDALERT);
- // XXX ui_rasterpos_safe(butr->xmin + xoff, butr->ymin + 5, snode->aspect);
- // XXX snode_drawstring(snode, "Error! Check console...", butr->xmax - butr->xmin);
- ;
- }
- }
-}
-
/* only once called */
static void node_shader_set_butfunc(bNodeType *ntype)
{
@@ -1370,9 +1272,6 @@ static void node_shader_set_butfunc(bNodeType *ntype)
case SH_NODE_BSDF_GLASS:
ntype->uifunc = node_shader_buts_glossy;
break;
- case NODE_DYNAMIC:
- ntype->uifunc = node_shader_buts_dynamic;
- break;
}
}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index bb52c1570aa..0d03df2298f 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -157,22 +157,6 @@ static void do_node_add_group(bContext *C, void *UNUSED(arg), int event)
do_node_add(C, &ntemp);
}
-#if 0 /* disabled */
-static void do_node_add_dynamic(bContext *C, void *UNUSED(arg), int event)
-{
- Main *bmain = CTX_data_main(C);
- Scene *scene = CTX_data_scene(C);
- bNodeTemplate ntemp;
-
- ntemp.type = NODE_DYNAMIC;
-
- ntemp.main = bmain;
- ntemp.scene = scene;
-
- do_node_add(C, &ntemp);
-}
-#endif
-
static int node_tree_has_type(int treetype, int nodetype)
{
bNodeTreeType *ttype= ntreeGetType(treetype);
@@ -228,9 +212,6 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
}
}
}
- else if (nodeclass==NODE_DYNAMIC) {
- /* disabled */
- }
else {
bNodeType *ntype;