Merge of the PyNodes branch (aka "custom nodes") into trunk.
authorLukas Toenne <lukas.toenne@googlemail.com>
Mon, 18 Mar 2013 16:34:57 +0000 (16:34 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Mon, 18 Mar 2013 16:34:57 +0000 (16:34 +0000)
commit4638e5f99a9ba59ad0b8a1fd52b12e876480b9e8
tree2444f12b4612440f44cf02835cdf5951b6564e92
parent7bfef29f2f2a1b262d28abdc6e30fcd9c1f1caad
Merge ... the PyNodes branch (aka "custom nodes") into trunk.

PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
293 files changed:
doc/python_api/examples/bpy.types.NodeTree.py [new file with mode: 0644]
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_util.h
intern/cycles/render/graph.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
release/scripts/modules/bpy_types.py
release/scripts/startup/bl_operators/node.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/templates_py/custom_nodes.py [new file with mode: 0644]
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/mask.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/texture.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/readfile.h
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/writefile.c
source/blender/compositor/intern/COM_CompositorContext.cpp
source/blender/compositor/intern/COM_CompositorContext.h
source/blender/compositor/intern/COM_Converter.cpp
source/blender/compositor/intern/COM_ExecutionSystem.cpp
source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
source/blender/compositor/intern/COM_ExecutionSystemHelper.h
source/blender/compositor/intern/COM_InputSocket.cpp
source/blender/compositor/intern/COM_InputSocket.h
source/blender/compositor/intern/COM_Node.cpp
source/blender/compositor/intern/COM_Node.h
source/blender/compositor/intern/COM_NodeBase.h
source/blender/compositor/intern/COM_Socket.cpp
source/blender/compositor/intern/COM_Socket.h
source/blender/compositor/intern/COM_compositor.cpp
source/blender/compositor/nodes/COM_BlurNode.cpp
source/blender/compositor/nodes/COM_BokehBlurNode.cpp
source/blender/compositor/nodes/COM_ColorCurveNode.cpp
source/blender/compositor/nodes/COM_ColorNode.cpp
source/blender/compositor/nodes/COM_GroupNode.cpp
source/blender/compositor/nodes/COM_LensDistortionNode.cpp
source/blender/compositor/nodes/COM_NormalNode.cpp
source/blender/compositor/nodes/COM_SocketProxyNode.cpp
source/blender/compositor/nodes/COM_ValueNode.cpp
source/blender/compositor/operations/COM_PreviewOperation.cpp
source/blender/compositor/operations/COM_PreviewOperation.h
source/blender/editors/include/ED_node.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_resources.h
source/blender/editors/include/UI_view2d.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/object/object_add.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_node/space_node.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_define.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_world.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_common.h [new file with mode: 0644]
source/blender/nodes/NOD_composite.h
source/blender/nodes/NOD_shader.h
source/blender/nodes/NOD_socket.h
source/blender/nodes/NOD_static_types.h [moved from source/blender/makesrna/intern/rna_nodetree_types.h with 91% similarity]
source/blender/nodes/NOD_texture.h
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/node_composite_util.c [new file with mode: 0644]
source/blender/nodes/composite/node_composite_util.h
source/blender/nodes/composite/nodes/node_composite_alphaOver.c
source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
source/blender/nodes/composite/nodes/node_composite_blur.c
source/blender/nodes/composite/nodes/node_composite_bokehblur.c
source/blender/nodes/composite/nodes/node_composite_bokehimage.c
source/blender/nodes/composite/nodes/node_composite_boxmask.c
source/blender/nodes/composite/nodes/node_composite_brightness.c
source/blender/nodes/composite/nodes/node_composite_channelMatte.c
source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
source/blender/nodes/composite/nodes/node_composite_colorMatte.c
source/blender/nodes/composite/nodes/node_composite_colorSpill.c
source/blender/nodes/composite/nodes/node_composite_colorbalance.c
source/blender/nodes/composite/nodes/node_composite_colorcorrection.c
source/blender/nodes/composite/nodes/node_composite_common.c
source/blender/nodes/composite/nodes/node_composite_composite.c
source/blender/nodes/composite/nodes/node_composite_crop.c
source/blender/nodes/composite/nodes/node_composite_curves.c
source/blender/nodes/composite/nodes/node_composite_defocus.c
source/blender/nodes/composite/nodes/node_composite_despeckle.c
source/blender/nodes/composite/nodes/node_composite_diffMatte.c
source/blender/nodes/composite/nodes/node_composite_dilate.c
source/blender/nodes/composite/nodes/node_composite_directionalblur.c
source/blender/nodes/composite/nodes/node_composite_displace.c
source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
source/blender/nodes/composite/nodes/node_composite_filter.c
source/blender/nodes/composite/nodes/node_composite_flip.c
source/blender/nodes/composite/nodes/node_composite_gamma.c
source/blender/nodes/composite/nodes/node_composite_glare.c
source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
source/blender/nodes/composite/nodes/node_composite_huecorrect.c
source/blender/nodes/composite/nodes/node_composite_idMask.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_inpaint.c
source/blender/nodes/composite/nodes/node_composite_invert.c
source/blender/nodes/composite/nodes/node_composite_keying.c
source/blender/nodes/composite/nodes/node_composite_keyingscreen.c
source/blender/nodes/composite/nodes/node_composite_lensdist.c
source/blender/nodes/composite/nodes/node_composite_levels.c
source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
source/blender/nodes/composite/nodes/node_composite_mapRange.c
source/blender/nodes/composite/nodes/node_composite_mapUV.c
source/blender/nodes/composite/nodes/node_composite_mapValue.c
source/blender/nodes/composite/nodes/node_composite_mask.c
source/blender/nodes/composite/nodes/node_composite_math.c
source/blender/nodes/composite/nodes/node_composite_mixrgb.c
source/blender/nodes/composite/nodes/node_composite_movieclip.c
source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
source/blender/nodes/composite/nodes/node_composite_normal.c
source/blender/nodes/composite/nodes/node_composite_normalize.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c
source/blender/nodes/composite/nodes/node_composite_pixelate.c
source/blender/nodes/composite/nodes/node_composite_premulkey.c
source/blender/nodes/composite/nodes/node_composite_rgb.c
source/blender/nodes/composite/nodes/node_composite_rotate.c
source/blender/nodes/composite/nodes/node_composite_scale.c
source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
source/blender/nodes/composite/nodes/node_composite_setalpha.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
source/blender/nodes/composite/nodes/node_composite_switch.c
source/blender/nodes/composite/nodes/node_composite_texture.c
source/blender/nodes/composite/nodes/node_composite_tonemap.c
source/blender/nodes/composite/nodes/node_composite_trackpos.c
source/blender/nodes/composite/nodes/node_composite_transform.c
source/blender/nodes/composite/nodes/node_composite_translate.c
source/blender/nodes/composite/nodes/node_composite_valToRgb.c
source/blender/nodes/composite/nodes/node_composite_value.c
source/blender/nodes/composite/nodes/node_composite_vecBlur.c
source/blender/nodes/composite/nodes/node_composite_viewer.c
source/blender/nodes/composite/nodes/node_composite_zcombine.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/intern/node_common.h
source/blender/nodes/intern/node_exec.c
source/blender/nodes/intern/node_exec.h
source/blender/nodes/intern/node_socket.c
source/blender/nodes/intern/node_util.c
source/blender/nodes/intern/node_util.h
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/node_shader_util.h
source/blender/nodes/shader/nodes/node_shader_add_shader.c
source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c
source/blender/nodes/shader/nodes/node_shader_attribute.c
source/blender/nodes/shader/nodes/node_shader_background.c
source/blender/nodes/shader/nodes/node_shader_brightness.c
source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c
source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
source/blender/nodes/shader/nodes/node_shader_bump.c
source/blender/nodes/shader/nodes/node_shader_camera.c
source/blender/nodes/shader/nodes/node_shader_common.c
source/blender/nodes/shader/nodes/node_shader_curves.c
source/blender/nodes/shader/nodes/node_shader_emission.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_gamma.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/nodes/shader/nodes/node_shader_geometry.c
source/blender/nodes/shader/nodes/node_shader_hair_info.c
source/blender/nodes/shader/nodes/node_shader_holdout.c
source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
source/blender/nodes/shader/nodes/node_shader_invert.c
source/blender/nodes/shader/nodes/node_shader_layer_weight.c
source/blender/nodes/shader/nodes/node_shader_light_falloff.c
source/blender/nodes/shader/nodes/node_shader_light_path.c
source/blender/nodes/shader/nodes/node_shader_mapping.c
source/blender/nodes/shader/nodes/node_shader_material.c
source/blender/nodes/shader/nodes/node_shader_math.c
source/blender/nodes/shader/nodes/node_shader_mixRgb.c
source/blender/nodes/shader/nodes/node_shader_mix_shader.c
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_normal_map.c
source/blender/nodes/shader/nodes/node_shader_object_info.c
source/blender/nodes/shader/nodes/node_shader_output.c
source/blender/nodes/shader/nodes/node_shader_output_lamp.c
source/blender/nodes/shader/nodes/node_shader_output_material.c
source/blender/nodes/shader/nodes/node_shader_output_world.c
source/blender/nodes/shader/nodes/node_shader_particle_info.c
source/blender/nodes/shader/nodes/node_shader_rgb.c
source/blender/nodes/shader/nodes/node_shader_script.c
source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
source/blender/nodes/shader/nodes/node_shader_squeeze.c
source/blender/nodes/shader/nodes/node_shader_tangent.c
source/blender/nodes/shader/nodes/node_shader_tex_brick.c
source/blender/nodes/shader/nodes/node_shader_tex_checker.c
source/blender/nodes/shader/nodes/node_shader_tex_coord.c
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
source/blender/nodes/shader/nodes/node_shader_tex_image.c
source/blender/nodes/shader/nodes/node_shader_tex_magic.c
source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
source/blender/nodes/shader/nodes/node_shader_tex_noise.c
source/blender/nodes/shader/nodes/node_shader_tex_sky.c
source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
source/blender/nodes/shader/nodes/node_shader_tex_wave.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/shader/nodes/node_shader_valToRgb.c
source/blender/nodes/shader/nodes/node_shader_value.c
source/blender/nodes/shader/nodes/node_shader_vectMath.c
source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
source/blender/nodes/shader/nodes/node_shader_volume_transparent.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/nodes/texture/node_texture_util.c
source/blender/nodes/texture/node_texture_util.h
source/blender/nodes/texture/nodes/node_texture_at.c
source/blender/nodes/texture/nodes/node_texture_bricks.c
source/blender/nodes/texture/nodes/node_texture_checker.c
source/blender/nodes/texture/nodes/node_texture_common.c
source/blender/nodes/texture/nodes/node_texture_compose.c
source/blender/nodes/texture/nodes/node_texture_coord.c
source/blender/nodes/texture/nodes/node_texture_curves.c
source/blender/nodes/texture/nodes/node_texture_decompose.c
source/blender/nodes/texture/nodes/node_texture_distance.c
source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
source/blender/nodes/texture/nodes/node_texture_image.c
source/blender/nodes/texture/nodes/node_texture_invert.c
source/blender/nodes/texture/nodes/node_texture_math.c
source/blender/nodes/texture/nodes/node_texture_mixRgb.c
source/blender/nodes/texture/nodes/node_texture_output.c
source/blender/nodes/texture/nodes/node_texture_proc.c
source/blender/nodes/texture/nodes/node_texture_rotate.c
source/blender/nodes/texture/nodes/node_texture_scale.c
source/blender/nodes/texture/nodes/node_texture_texture.c
source/blender/nodes/texture/nodes/node_texture_translate.c
source/blender/nodes/texture/nodes/node_texture_valToNor.c
source/blender/nodes/texture/nodes/node_texture_valToRgb.c
source/blender/nodes/texture/nodes/node_texture_viewer.c
source/blender/python/intern/bpy_rna.c
source/blender/render/intern/source/render_texture.c
source/blenderplayer/bad_level_call_stubs/stubs.c