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
2016-11-19Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.Bastien Montagne
Another nice crasher - in this case, we just want to nuke all sockets... Related to T49991.
2016-09-19UI Messages: Consistent spelling of term "data-block"Julian Eisel
Was using a bunch of different spellings, mostly "data-block" though, so went with that one (would have been my #1 choice anyway ;) )
2015-12-03Node callback for handling link insertion and swapping of occupied inputs.Lukas Tönne
Nodes have a feature for moving existing links to unoccupied sockets when connecting to an already used input. This is based on the standard legacy socket types (value/float, vector, color/rgba) and works reasonably well for shader, compositor and texture nodes. For new pynode systems, however, the hardcoded nature of that feature has major drawbacks: * It does not take different type systems into account, leading to meaningless connections when sockets are swapped and making the feature useless or outright debilitating. * Advanced socket behaviors would be possible with a registerable callback, e.g. creating extensible input lists that move existing connections down to make room for a new link. Now any handling of new links is done via the 'insert_links' callback, which can also be registered through the RNA API. For the legacy shader/compo/tex nodes the behavior is the same, using a C callback. Note on the 'use_swap' flag: this has been removed because it was meaningless anyway: It was disabled only for the insert-node-on-link feature, which works only for completely unconnected nodes anyway, so there would be nothing to swap in the first place.
2015-11-23Cleanup: use `rna_enum_` prefix for RNA enumsCampbell Barton
Definitions could shadow local vars.
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-06-08Fix T44979: Crash when rendering with more threads than the system onesSergey Sharybin
Revert "Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads" This reverts commit fdc653e8ce77a188138dc707207139c3d1e6b166. The threads override is not affected by the scene, and hence the limit of the threads was not giving correct result. Need to re-consider some things here.
2015-05-06Patch D1283 by Alexander Romanov fixes reroute node type update notAntony Riakiotakis
correct when root reroute node is plugged in a different type of input
2015-04-13Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threadsSergey Sharybin
Use actual available number of threads now, which will make it easier to increase max number of threads, without having some sloppy memory usage and without doing some redundant checks on thread data which was never used.
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2014-11-29Cleanup: unused headersCampbell Barton
2014-09-24Fix T41885, muting broken for Blender Internal nodes in rendering.Lukas Tönne
Nodes don't have muting callbacks any more, so now have to check the flag to prevent overwriting values on the stack that they share with inputs.
2014-09-17Fix T41761, muting not working with texture nodesAntony Riakiotakis
This was disabled to fix T41349, however seems that if we don't pass delegates for muted nodes everything work fine.
2014-08-12Fix T41349: Muting texture nodes can cause crashes.Lukas Tönne
Problem is that setup of stack indices which refer to the same stack entry can lead to cyclic TexDelegate node pointers, causing an infinite loop. Fixing this would take too much time and require recoding large parts of the texnodes system, which is earmarked for scrapping anyway ... So for now just disabled muting in texnodes to avoid crashes.
2014-07-23Bake-API: Test for cyclic node connectionDalai Felinto
If the active image node contributes to the final material shader (meaning it's either directly or indirectly connected to an Output Node) the user will receive an alert about circular dependency. Similar to what we do for Blender internal the baking will still happen, but the user will receive the alert which should prevent the image saving to happen if the result was not intentional. Core function to check for node output written by Lukas Toenne. Reviewers: lukastoenne, campbellbarton Differential Revision: https://developer.blender.org/D673
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-23Fix T39849: Adding links directly between node group input/outputLukas Tönne
extension sockets would create additional extension sockets instead of simply ignoring them.
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