- To enable Nodes for Materials, you have to set the "Use Nodes" button, in the new Material buttons "Nodes" Panel or in header of the Node editor. Doing this will disable Material-Layers.

- Nodes now execute materials ("shaders"), but still only using the previewrender quote.

- Nodes have (optional) previews for rendered images.

- Node headers allow to hide buttons and/or preview image

- Nodes can be dragged larger/smaller (right-bottom corner)

- Nodes can be hidden (minimized) with hotkey H

- CTRL+click on an Input Socket gives a popup with default values.

- Changing Material/Texture or Mix node will adjust Node title.

- Click-drag outside of a Node changes cursor to "Knife' and allows to draw a rect where to cut Links.

- Added new node types RGBtoBW, Texture, In/Output, ColorRamp

- Material Nodes have options to ouput diffuse or specular, or to use a negative normal. The input socket 'Normal' will force the material to use that normal, otherwise it uses the normal from the Material that has the node tree.

- When drawing a link between two not-matching sockets, Blender inserts a converting node (now only for value/rgb combos)

- When drawing a link to an input socket that's already in use, the old link will either disappear or flip to another unused socket.

- A click on a Material Node will activate it, and show all its settings in the Material Buttons. Active Material Nodes draw the material icon in red.

- A click on any node will show its options in the Node Panel in the Material buttons.

- Multiple Output Nodes can be used, to sample contents of a tree, but only one Output is the real one, which is indicated in a different color and red material icon.

- Added ThemeColors for node types

- ALT+C will convert existing Material-Layers to Node... this currently only adds the material/mix nodes and connects them. Dunno if this is worth a lot of coding work to make perfect?

- Press C to call another "Solve order", which will show all possible cyclic conflicts (if there are).

- Technical: nodes now use "Type" structs which define the structure of nodes and in/output sockets. The Type structs store all fixed info, callbacks, and allow to reconstruct saved Nodes to match what is required by Blender.

- Defining (new) nodes now is as simple as filling in a fixed Type struct, plus quote some callbacks. A doc will be made!

- Node preview images are by default float

********* Icon drawing:

- Cleanup of how old icons were implemented in new system, making them 16x16 too, correctly centered *and* scaled.

- Made drawing Icons use float coordinates

- Moved BIF_calcpreview_image() into interface_icons.c, renamed it icon_from_image(). Removed a lot of unneeded Imbuf magic here!

- Skipped scaling and imbuf copying when icons are OK size

********* Preview render:

- Huge cleanup of quote....

- renaming BIF_xxx calls that only were used internally

- BIF_previewrender() now accepts an argument for rendering method, so it supports icons, buttonwindow previewrender and node editor

- Only a single BIF_preview_changed() call now exists, supporting all signals as needed for buttos and node editor

First note; this is a WIP project, some commits might change things that make formerly saved situations not to work identically... like now!

------ New Material integration ------

Until now, the Node system worked on top of the 'current' Material, just like how the Material Layers worked. That's quite confusing in practice, especially to see what Material is a Node, or what is the "base material"

Best solution is to completely separate the two. This has been implemented as follows now;

- The confusing "Input" node has been removed. - When choosing a Material in Blender, you can define this Material to be either 'normal' (default) or be the root of a Node tree. - If a Material is a Node tree, you have to add Nodes in the tree to see something happen. An empty Node tree doesn't do anything (black). - If a Material is a Node Tree, the 'data browse' menus show it with an 'N' mark before the name. The 'data block' buttons display it with the suffix 'NT' (instead of 'MA'). - In a Node Tree, any Material can be inserted, including itself. Only in that case the Material is being used itself for shading.

UI changes:

Added a new Panel "Links", which shows: - where the Material is linked to (Object, Mesh, etc) - if the Material is a NodeTree or not - the actual active Material in the Tree

The "Node" Panel itself now only shows buttons from the other nodes, when they are active.

Further the Material Nodes themselves allow browsing and renaming or adding new Materials now too.

Second half of today's work was cleaning up selection when the Nodes overlap... it was possible to drag links from invisible sockets, or click headers for invisible nodes, etc. This because the mouse input code was not checking for visibility yet.

ton (Ton Roosendaal) 2005/12/29 20:07:00 CET

Log: To make learning how NodeTree Materials work easier; changed the default when you turn a Material into NodeTree.

It now doesn't link own Material to the first added Material Node, but allows you to do it, or create a new one.

hos (Chris Want) 2005/12/30 00:26:49 CET

Log: With the royal blessing of guitarGeek, I commit the sharp/flat mesh editmode selection tools. The documentation can (currently) be found here: