Blender Git Commit Log

Git Commits -> Revision ea7538d

Revision ea7538d by Ton Roosendaal (master)
January 2, 2006, 13:06 (GMT)
Orange: more noodle updates!

**** NEW: Group Nodes

Node trees usually become messy and confusing quickly, so we need
not only a way to collapse Nodes into single 'groups', but also a
way to re-use that data to create libraries of effects.

This has been done by making a new Library data type, the NodeTree.
Everything that has been grouped is stored here, and available for
re-use, appending or linking. These NodeTrees are fully generic,
i.e. can store shader trees, composit trees, and so on. The 'type'
value as stored in the NodeTree will keep track of internal type
definitions and execute/drawing callbacks. Needless to say, re-using
shader trees in a composit tree is a bit useless, and will be
prevented in the browsing code. :)

So; any NodeTree can become a "Goup Node" inside in a NodeTree. This
Group Node then works just like any Node.
To prevent the current code to become too complex, I've disabled
the possibility to insert Groups inside of Groups. That might be
enabled later, but is a real nasty piece of code to get OK.

Since Group Nodes are a dynamic Node type, a lot of work has been
done to ensure Node definitions can be dynamic too, but still allow
to be stored in files, and allow to be verified for type-definition
changes on reloading. This system needs a little bit maturing still,
so the Python gurus should better wait a little bit! (Also for me to
write the definite API docs for it).

What works now:

- Press CTRL+G to create a new Group. The grouping code checks for
impossible selections (like an unselected node between selected nodes).
Everthing that's selected then gets removed from the current tree, and
inserted in a new NodeTree library data block. A Group Node then is
added which links to this new NodeTree.

- Press ALT+G to ungroup. This will not delete the NodeTree library
data, but just duplicate the Group into the current tree.

- Press TAB, or click on the NodeTree icon to edit Groups. Note that
NodeTrees are instances, so editing one Group will also change the
other users.
This also means that when removing nodes in a Group (or hiding sockets
or changing internal links) this is immediately corrected for all users
of this Group, also in other Materials.

- While editing Groups, only the internal Nodes can be edited. A single
click outside of the Group boundary will close this 'edit mode'.

What needs to be done:

- SHIFT+A menu in toolbox style, also including a list of Groups
- Enable the single-user button in the Group Node
- Displaying all (visible) internal group UI elements in the Node Panel
- Enable Library linking and prevent editing of Groups then.


**** NEW: Socket Visibility control

Node types will be generated with a lot of possible inputs or outputs,
and drawing all sockets all the time isn't very useful then.

A new option in the Node header ('plus' icon) allows to either hide all
unused sockets (first keypress) or to reveil them (when there are hidden
sockets, the icon displays black, otherwise it's blended).

Hidden sockets in Nodes also are not exported to a Group, so this way
you can control what options (in/outputs) exactly are available.

To be done:
- a way to hide individual sockets, like with a RMB click on it.

**** NEW: Nodes now render!

This is still quite primitive, more on a level to replace the (now
obsolete and disabled) Material Layers.

What needs to be done:

- make the "Geometry" node work properly, also for AA textures
- make the Texture Node work (does very little at the moment)
- give Material Nodes all inputs as needed (like Map-to Panel)
- find a way to export more data from a Material Node, like the
shadow value, or light intensity only, etc

Very important also to separate from the Material Buttons the
"global" options, like "Ztransp" or "Wire" or "Halo". These can not
be set for each Material-Node individually.

Also note that the Preview Render (Buttons window) now renders a bit
differently. This was a horrid piece of antique code, using a totally
incompatible way of rendering. Target is to fully re-use internal
render code for previews.

OK... that's it mostly. Now test!

Commit Details:

Full Hash: ea7538dca60ffb2d913d0600d8f0692109b4195f
SVN Revision: 6268
Parent Commit: 9710d4c
Lines Changed: +3298, -2080

27 Modified Paths:

/source/blender/blenkernel/BKE_library.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_main.h (+3, -2) (Diff)
/source/blender/blenkernel/BKE_material.h (+5, -3) (Diff)
/source/blender/blenkernel/BKE_node.h (+29, -4) (Diff)
/source/blender/blenkernel/intern/library.c (+23, -17) (Diff)
/source/blender/blenkernel/intern/material.c (+44, -16) (Diff)
/source/blender/blenkernel/intern/node.c (+627, -41) (Diff)
/source/blender/blenkernel/intern/node_shaders.c (+3, -1) (Diff)
/source/blender/blenloader/intern/readblenentry.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+136, -86) (Diff)
/source/blender/blenloader/intern/writefile.c (+21, -10) (Diff)
/source/blender/include/BIF_resources.h (+2, -2) (Diff)
/source/blender/include/BSE_node.h (+2, -0) (Diff)
/source/blender/makesdna/DNA_ID.h (+1, -0) (Diff)
/source/blender/makesdna/DNA_node_types.h (+28, -6) (Diff)
/source/blender/makesdna/DNA_space_types.h (+2, -2) (Diff)
/source/blender/render/extern/include/render.h (+2, -0) (Diff)
/source/blender/render/intern/source/rendercore.c (+37, -60) (Diff)
/source/blender/renderconverter/intern/convertBlenderScene.c (+3, -0) (Diff)
/source/blender/src/blenderbuttons.c (+1544, -1535) (Diff)
/source/blender/src/drawnode.c (+402, -152) (Diff)
/source/blender/src/editnode.c (+345, -90) (Diff)
/source/blender/src/filesel.c (+3, -1) (Diff)
/source/blender/src/previewrender.c (+27, -46) (Diff)
/source/blender/src/resources.c (+3, -3) (Diff)
/source/blender/src/toets.c (+2, -0) (Diff)
/source/blender/src/usiblender.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021