Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-03-07Code cleanup: styleCampbell Barton
2014-03-02Fix for own mistake: arc diff swallowed a commit somehow, breakingLukas Tönne
compilation.
2014-03-02Fix T37334: Better "internal links" function for muting and node disconnect.Lukas Tönne
Implements a more flexible internal connect function for standard nodes (compositor, shader, texture). Allow feasible datatype connections by priority. The priorities for common datatypes in compositor, shader and texture nodes are encoded in a simple function. Certain impossible connections (e.g. color -> cycles shader) are excluded by giving them -1 priority. Priority overrides link status: If a higher priority input can be found, this will be used regardless of link status. Link status only comes into play for inputs with same priority. Reviewers: brecht CC: sebastian_k Differential Revision: https://developer.blender.org/D356
2014-02-14Code cleanup: duplicate headersCampbell Barton
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-01-10Fix T38142: socket interface 'type' enums are not initialized. These areLukas Tönne
not really needed anyway, but need to be adjusted to make use of the socket value copy methods.
2014-01-07Fix T38075, crash from shader node add/replace tree view template.Lukas Tönne
The sanity check for copying socket default value was using the socket idname for type compatibility checks, which is too strict. Subtypes would not be recognized as copyable, but since only the plain data type is needed below this is all that needs to be checked. That alone would not cause crash (just missing default value copy), but the tree view template was messing with the default_value DNA directly by freeing it in advance, which is not necessary and should be left to blenkernel when freeing the node. Otherwise this would leave the node invalid without a default_value if the copy function bails out.
2013-11-12Make dynamic node labels possible as a registerable function 'draw_label' ↵Lukas Toenne
(simple 'label' identifier is already in use, need to avoid API breakage). This should simply return a string. The dynamic label can still be overridden by the user-defined node.label string.
2013-11-12Instead of requiring a const char* return from the (optional) node label ↵Lukas Toenne
callback function, let it write into a mutable string buffer. This will allow actual dynamic labels for nodes using the python API.
2013-10-29Fix #37192, Rendered preview causes crash when deleting a material node in ↵Lukas Toenne
shader node editor. The 'free' callback for node execution data was accessed from the node->typeinfo, but this pointer can become invalid because the render database is not immediately freed after the job finishes. To avoid access to dangling node pointers, store the function callback in the exec data itself. The node pointer must not be accessed in the free function (wasn't used before either), these functions are purely for the execution data.
2013-09-12another fix for [#36694], user submitted a new testfile that crashes without ↵Campbell Barton
pointer lists being cleared.
2013-09-02Fix #36628, Muting bump node alters material visibility.Lukas Toenne
The internal connections used for muted nodes are a "best guess" only. The algorithm would connect linked input/output sockets first, regardless of sensible connections. Replaced this by a more strict connection method now which only uses matching types, so that Normal outputs won't get input from values, etc. This is still far from perfect though. Eventually it may be necessary to implement dedicated methods for certain types of nodes to respect different semantics - using the plain socket type is just not enough information. Also the value used for connections from muted nodes with no matching input will currently be the hidden(!) socket input values, this can lead to unexpected results. Needs further thought ...
2013-07-31Fix #36267 part 2 of 2: Fix for reroute node values in old shader node stack ↵Lukas Toenne
system. They were overwriting stack values from their input nodes, because the system would not detect that these sockets actually just point to existing defined stack values. To make the link check work, set the socket->link pointer if internal node connections exist, this works for both muted and reroute nodes.
2013-07-31Fix #36267, part 1 of 2: fix for reroute node type updates. The reroute ↵Lukas Toenne
nodes change their socket type based on what they are connected to, to work as pass-through nodes with as little conversion as necessary. Problem was/is that the nodes can set the 'type' property, but in order to actually change the data type they would also need to update the typeinfo pointer (and idname), which is strongly discouraged. Solution is to just replace the input/output sockets of the reroute node with new sockets of the desired type and port all links over.
2013-07-19code cleanup: case & brace placementCampbell Barton
2013-06-23Fix #35847: cycles group nodes did not work well exposing inputs like normal orBrecht Van Lommel
texture coordinate that should automatically use the default normal or texture coordinate appropriate for that node, rather than some fixed value specified by the user.
2013-06-10Fix for crash when assigning NULL pointer to node group node_tree property. ↵Lukas Toenne
This is generally allowed (though operators usually would prevent it).
2013-06-01Extended max size for group node types from 200 to 400, in case users need ↵Lukas Toenne
long socket names visible.
2013-05-29Cleanup: Removed all NODE_OPTIONS flags from C node type definitions, these ↵Lukas Toenne
are no longer required and have no effect. Whether or not a node supports additional options buttons is now determined by the existence of a draw callback (uifunc and/or uifuncbut).
2013-05-27fix error in own recent commit, also other minor changes.Campbell Barton
2013-05-27style cleanup: nodesCampbell Barton
2013-05-07Fix #35122: Blenderplayer crashes when loading levelSergey Sharybin
Issue was caused by ntreeUpdateTree calling for a ntree which is not in G.main. This lead to issues in ntreeVerifyNodes (which is called from ntreeUpdateTree). Made is so ntreeUpdateTree now accepts main as an argument. Will work for the release, later we could either solve the TODO mentioned in ntreeUpdateTree which will eliminate need in main there or make it so context's main is used from all over where ntreeUpdateTree is called (currently there're still some usages of G.main).
2013-04-08Exposed the bNodeSocket->limit value in RNA, so it can be redefined by ↵Lukas Toenne
pynodes. All sockets will have strict n-to-1 connectivity by default, which is fine for data sockets, but things like geometry nodes with a more data-flow based connectivity for certain socket types will need to change this.
2013-04-03Fix #33628, Segmentation fault after pasting a closed group of nodes into an ↵Lukas Toenne
open group. Finally now there is a proper check for pasting nodes into groups. It uses the poll_instance callback of node types to determine if a node can be added into a specific node tree. Currently this is only implemented for group nodes and does a recursive check to avoid pasting a node group into itself (on any level, also nested groups).
2013-04-03Fix for missing integer 'type' of the virtual extension socket in group ↵Lukas Toenne
nodes. This could lead to crash in node groups when trying to undefined stack values of the extension socket. type just needs to be set to SOCK_CUSTOM==-1, so the BI execution knows not to look for a stack entry.
2013-03-31style cleanupCampbell Barton
2013-03-28Fix for node groups, now exposing a socket will copy the default value from ↵Lukas Toenne
internal nodes again. Also this value can be changed in the node group Interface panel.
2013-03-19Nicer handling of undefined node, tree and socket types.Lukas Toenne
When nodes are loaded from a .blend file they can potentially have undefined types. This can happen if a type has been deprecated and removed, or if node types were defined in a python script that has not been loaded correctly. Previously all such nodes would automatically be removed from a node tree, assuming that their types were deprecated and no longer in use (more commonly caused by loading new nodes in an older Blender version). Due to the possibility of dynamic registration it is no longer feasible to simply delete such nodes. Display and handling of node trees was simply disabled before this patch, so that a node tree where any node or socket type was undefined would not be displayed at all. To give more information and avoid problems caused by necessary checks for the typeinfo pointer, there is now a 'Undefined' fallback type for trees, nodes and sockets. These types are used as placeholders in case the real type is not registered and can provide useful visual feedback on undefined nodes.
2013-03-19Fix for GLSL shader nodes when using Cycles nodes with shader sockets. These ↵Lukas Toenne
did not get a stack index assigned, but for GLSL they are simply replaced by colors.
2013-03-18Node poll_instance callback is optional, check if it exists before executing.Lukas Toenne
2013-03-18code cleanupCampbell Barton
2013-03-18Fix for stupid MSVC compiler, float array cast not supported.Lukas Toenne
2013-03-18Merge of the PyNodes branch (aka "custom nodes") into trunk.Lukas Toenne
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/
2013-02-27Bug fix #34436Ton Roosendaal
Two example files that crashed texture nodes. - On delete texture nodes, it should free the exec cache (because this cache stores the node pointer. - On redo, nodes can exist can exist without typeinfo set. Exec (free) code was not checking for that. Don't ask me why this happens... tex nodes are weird.
2013-02-02style cleanupCampbell Barton
2013-01-25header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTreeCampbell Barton
2013-01-24Disabled commit that was rendering Blender Internal for Cycles nodes.Ton Roosendaal
Apparently Material nodes allow a mix of Cycles and BI Materials. Nifty! I should read more docs, like this cool tutorial: http://urchn.org/post/combining-blender-internal-and-cycles-in-one-render
2013-01-24Logic mistake in previous commit, broke node materials for Internal render.Ton Roosendaal
Stupid!
2013-01-24UsabilityTon Roosendaal
- Cycles materials now render in Blender Internal too, skipping the nodes. Not very useful, but at least things then show up on renders and in previews. - Node editor: if wrong shader nodes are in a tree, they draw with thene color RED ALERT headers now. (Switching render engine will show it).
2013-01-15Code cleanup: remove some remaining code from the old compositor.Brecht Van Lommel
2013-01-12patch from Harley Acheson to remove multiple inline defines.Campbell Barton
2012-12-28style cleanupCampbell Barton
2012-11-28Fix normal compositing/shader node not showing normal widget.Brecht Van Lommel
It would actually show after save and reload, the subtype and min/max were not properly initialized for node output sockets.
2012-11-07support for string parameters in OSL nodesDalai Felinto
for now subtype is not defined, but once we start parsing the metadata we can set texture inputs as FILEPATH also, it takes relative strings and convert to absolute for all strings (which is arguably a good solution, but should work for now)
2012-10-26style cleanupCampbell Barton
2012-10-25Internal node links are now cached in a per-node list, instead of being ↵Lukas Toenne
generated as a transient list that is returned from the callback and had to be freed by the caller. These internal links are used for muted nodes, disconnect operators and reroute nodes, to effectively replace the node with direct input-to-output links. Storing this list in the node has the advantage of requiring far fewer calls to the potentially expensive internal_connect callback. This was called on every node redraw ... Also it will allow Cycles to properly use the internal links for muted nodes, which ensures consistent behavior. The previous method was not applicable in Cycles because transient list return values are not supported well in the RNA and particularly the C++ API implementation.
2012-10-25Cycles UI: keep node input sockets collapsed by default in the properties ↵Brecht Van Lommel
editor, when doing the linking in the node editor, to keep the properties editor more clean in this case.
2012-10-24Fix #32835, Reroute node on shading nodes connection gives wrong renders.Lukas Toenne
Problem here is that muted nodes and reroute nodes are supposed to be removed from the execution node tree during the localize function. However, this is function is apparently only used during preview renders and must be considered a hack (is there anything that is not a hack in BI?) Now the mute/reroute check happens in the node tree exec functions still used by BI and the legacy compositor and texture nodes. It uses the same internal_connect function from nodes to assign input stack indices directly to outputs (which also avoids overhead). Localize function also still does this. Cycles/Tile should also implement muting/reroute in their intermediate node layers by using this function, then it could be removed from localize too.
2012-10-24Removed the experimental (and commented-out) code for FOR and WHILE loops in ↵Lukas Toenne
nodes. This was a feature i tested a while back but was only partially supported by Blender Internal renderer and the old compositor. The main idea was to have nodes that automatically mirror input and output sockets to support incremental changes of "internal variables". It is not a well-supported feature of the primary node systems (shader, compositor, texture) in Blender. If anybody wants to create a node system that has actual use for loops, they can do so much more elegantly with Python nodes, but it does not have to be a core node type in Blender. Removing this should ease node code maintenance a bit.