Blender Git Loki
Git Commits -> Revision 01b3deb
Revision 01b3deb by Lukas Toenne (master) May 2, 2012, 07:18 (GMT) |
A number of changes to node RNA and the file output node, to simplify socket types and make node code more robust for future nodes with extra socket data. * Removed the struct_type identifier from sockets completely. Any specialization of socket types can be done by using separate collections in RNA and customized socket draw callbacks in node type. Sockets themselves are pure data inputs/outputs now. Possibly the sock->storage data could also be removed, but this will change anyway with id properties in custom nodes. * Replaced the direct socket button draw calls by extra callbacks in node types. This allows nodes to draw sockets in specialized ways without referring to the additional struct_type identifier. Default is simply drawing the socket default_value button, only file output node overrides this atm. * File output node slots now use a separate file sub-path in their storage data, instead of using the socket name. That way the path is an actual PROP_FILEPATH property and it works better with the UI list template (name property is local to the data struct). * Node draw contexts for options on the node itself and detail buttons in the sidebar now have an extra context pointer "node" (uiLayoutSetContextPointer). This can be used to bind operator buttons to a specific node, instead of having to rely on the active/selected node(s) or making weak links via node name. Compare to modifiers and logic bricks, they use the same feature. * Added another operator for reordering custom input slots in the file output node. |
Commit Details:
Full Hash: 01b3deb680f7e3b34adaad5b5a888e7bd44cfaa4
SVN Revision: 46175
Parent Commit: 7f86438
Lines Changed: +308, -203
11 Modified Paths:
/source/blender/blenkernel/BKE_node.h (+3, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+34, -4) (Diff)
/source/blender/editors/space_node/drawnode.c (+130, -118) (Diff)
/source/blender/editors/space_node/node_buttons.c (+5, -1) (Diff)
/source/blender/editors/space_node/node_draw.c (+5, -21) (Diff)
/source/blender/editors/space_node/node_edit.c (+78, -6) (Diff)
/source/blender/editors/space_node/node_intern.h (+1, -0) (Diff)
/source/blender/editors/space_node/node_ops.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+3, -6) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+41, -42) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+7, -5) (Diff)
/source/blender/blenloader/intern/readfile.c (+34, -4) (Diff)
/source/blender/editors/space_node/drawnode.c (+130, -118) (Diff)
/source/blender/editors/space_node/node_buttons.c (+5, -1) (Diff)
/source/blender/editors/space_node/node_draw.c (+5, -21) (Diff)
/source/blender/editors/space_node/node_edit.c (+78, -6) (Diff)
/source/blender/editors/space_node/node_intern.h (+1, -0) (Diff)
/source/blender/editors/space_node/node_ops.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+3, -6) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+41, -42) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+7, -5) (Diff)