[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33349] branches/particles-2010/source/ blender/editors/space_node/drawnode.c: Fix for SetData node button functions.
Lukas Toenne
lukas.toenne at googlemail.com
Sat Nov 27 11:08:02 CET 2010
Revision: 33349
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33349
Author: lukastoenne
Date: 2010-11-27 11:08:02 +0100 (Sat, 27 Nov 2010)
Log Message:
-----------
Fix for SetData node button functions.
Modified Paths:
--------------
branches/particles-2010/source/blender/editors/space_node/drawnode.c
Modified: branches/particles-2010/source/blender/editors/space_node/drawnode.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/drawnode.c 2010-11-27 02:39:51 UTC (rev 33348)
+++ branches/particles-2010/source/blender/editors/space_node/drawnode.c 2010-11-27 10:08:02 UTC (rev 33349)
@@ -1482,7 +1482,6 @@
// uiItemR(col, ptr, "type", 0, NULL, 0);
row= uiLayoutRow(col, 0);
- uiLayoutSetContextPointer(row, "node", ptr);
uiItemL(row, "Type:", 0);
node_data_type_search(row, C, ptr);
@@ -1492,16 +1491,14 @@
uiItemL(col, "Property Sockets", 0);
row= uiLayoutRow(col, 0);
- uiLayoutSetContextPointer(row, "node", ptr);
uiItemL(row, "Add:", 0);
node_data_add_property_search(row, C, ptr);
for (sock=node->outputs.first; sock; sock=sock->next) {
- row= uiLayoutRow(col, 0);
RNA_pointer_create((ID*)ptr->id.data, &RNA_NodeSocket, sock, &sockptr);
- uiLayoutSetContextPointer(row, "socket", &sockptr);
args.sock = sock;
-
+
+ row= uiLayoutRow(col, 0);
ntreeSocketTypeInfo(sock->type, NULL, &ticon, &tname);
uiItemMenuF(row, (char*)tname, ticon, node_data_property_socket_type_menu, &args);
uiItemR(row, &sockptr, "name", 0, "", 0);
@@ -1521,6 +1518,7 @@
static void node_simulation_detailbuts_setdata(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
+ static NodeDataArgs args;
bNode *node= ptr->data;
bNodeSocket *sock;
PointerRNA sockptr;
@@ -1528,12 +1526,14 @@
const char *tname;
int ticon;
+ args.ntree = (bNodeTree*)ptr->id.data;
+ args.node = (bNode*)ptr->data;
+ args.sock = NULL;
+
col= uiLayoutColumn(layout, 0);
- uiLayoutSetContextPointer(col, "node", ptr);
// uiItemR(col, ptr, "type", 0, NULL, 0);
row= uiLayoutRow(col, 0);
- uiLayoutSetContextPointer(row, "node", ptr);
uiItemL(row, "Type:", 0);
node_data_type_search(row, C, ptr);
@@ -1543,17 +1543,16 @@
uiItemL(col, "Property Sockets", 0);
row= uiLayoutRow(col, 0);
- uiLayoutSetContextPointer(row, "node", ptr);
uiItemL(row, "Add:", 0);
node_data_add_property_search(row, C, ptr);
for (sock=node->inputs.first; sock; sock=sock->next) {
- row= uiLayoutRow(col, 0);
RNA_pointer_create((ID*)ptr->id.data, &RNA_NodeSocket, sock, &sockptr);
- uiLayoutSetContextPointer(row, "socket", &sockptr);
+ args.sock = sock;
+ row= uiLayoutRow(col, 0);
ntreeSocketTypeInfo(sock->type, NULL, &ticon, &tname);
- uiItemMenuF(row, (char*)tname, ticon, node_data_property_socket_type_menu, sock);
+ uiItemMenuF(row, (char*)tname, ticon, node_data_property_socket_type_menu, &args);
uiItemR(row, &sockptr, "name", 0, "", 0);
uiItemO(row, "", ICON_X, "NODE_OT_property_socket_remove");
}
More information about the Bf-blender-cvs
mailing list