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-08-13Fix T49082: Intermediate update call when making links can change group ↵Lukas Tönne
socket layout. Node tree update calls in the middle of a socket loop are dangerous, they can change sockets on group nodes and link instances in particular. Updates should only happen after the operator has finished. Simply removed the extra convenience check for validity now. Worst case an invalid (red) link is created which can be removed by the user as well and should simply be ignored by node systems. The update system in nodes needs a complete rewrite to handle complex cases like this, where an operator may need to react to changes during its execution.
2016-07-21Fix crash w/ auto-insert offsetCampbell Barton
2016-05-14Fix T48426: Use same length for all header message strings.Bastien Montagne
Some languages like Chinese or Japanese take three or four bytes per char... Also fixed some missing translation markers for UI header messages.
2016-04-29Fix crash (segfault) in node editor.Bastien Montagne
In some cases, we can have nodegroups without attached nodetree, this case is checked in top `node_group_has_output()` entry point, but not in recursive `node_group_has_output_dfs()`. Issue appeared after rB42824f4403db3a35, presumably because check on node flag itself was skipping that case, which is no more possible when using ID tags. Reported by sebastian_k over IRC, thanks.
2016-04-06Fix missing viewport update when tree output is in a nodeSergey Sharybin
There was already an attempt to do it, but it worked incorrect because of wrong recursion check.
2016-03-23Fix T47870: Missing viewport update when material output is inside of the groupSergey Sharybin
2016-03-09Fix T47729: Linking node sockets using shortcut failsJulian Eisel
Could also have swapped nodes to assign instead of swapping after assigning, but this way it's easier to see whats going on.
2016-03-02Avoid node tree update tag when changed nodes which are not affecting resultSergey Sharybin
This was we don't have re-compo or viewport re-rendering happening when changing nodes which are not connected to the output at all (for example when adding new nodes or changing settings for unconnected nodes). Only basic operations are covered for now. checks could be added to more tools when needed. Currently it's not fully optimal implementation, but seems to work fast enough. Don't see reliable alternative to that -- keeping tag in the node wouldn't work because of the node groups (which are probably already broken, but should be easy to solve with current approach). So guess it's more matter of optimizing path search from a node to output. Before processing forward let's check whether it's indeed something we want and whether the approach is indeed not fully bad. Reviewers: campbellbarton, mont29 Subscribers: sebastian_k Differential Revision: https://developer.blender.org/D1765
2015-12-04Disable node updates while applying links from the dragging operator.Lukas Tönne
This prevents issues with reentrant update callbacks and modification of the node tree while the operator still holds pointers to it.
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-12Cleanup: rename line to segments, avoids confusionCampbell Barton
Differentiate between lines and segments.
2015-11-12Fix error cutting node linksCampbell Barton
Accessing theme from outside drawing code isn't reliable, pass space-type.
2015-09-25Fix node auto-offset to left brokenJulian Eisel
Own, really stupid mistake in rBc653077bf56 :| Kids, don't commit at night!
2015-09-21Fix node auto-offset failing during heavy compositing (sometimes)Julian Eisel
Compositing might make main thread so busy that animation is considered done due to duration before final position is reached. Also added check to avoid unnecessary redraws.
2015-09-17Fix hidden auto-offset glitchJulian Eisel
Steps to reproduce were: Open F233831, insert floating node into nearby link (so that it's not attached to frame).
2015-09-13Cleanup: spellingCampbell Barton
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-08-05Fix dereference before NULL checkCampbell Barton
2015-08-04Nodes: Make method to detect hovered link during transform more ↵Julian Eisel
predictable/responsive The old method: The "old" method used the node dimensions to get a number of lines and checked if they intersect with the node link. Issue with this is that only a small part of the actual node surface is checked, making the method a bit unpredictable or unresponsive. The new method: The new method checks for intersections within the entire node surface. If multiple links are intersected, the node with the smallest distance from the *upper left corner* to the link is chosen. Reviewed by @campbellbarton (tm)
2015-08-01Note Editor: Auto-offset nodes on insertionJulian Eisel
Implements "Auto-offset" (called "insert offset" in code) feature for Node Editor, developed during and after LSOC :) Idea and sponsoring by Sebastian König, blendFX, Mathias Eimann, Mikavaa, Knick Design When you drop a node with at least one input and one output socket onto a an existing connection between two nodes, Auto-offset will, depending on the direction setting, automatically and animated move the left or right and all of its following nodes away to make room for the new node. The direction for offsetting can be toggled while you are moving the node by pressing „T“. The auto-offset is enabled by default but can be disabled in the header of the node-editor. The offset margin can be changed in the editing section of the User Preferences. Thanks a lot to the sponsors, and especially to Sebastian who helped *a lot* with this. That's how users can help developing Blender!
2015-04-07Revert Sticky Keys (and everything related to that)Julian Eisel
Our current keymap doesn't give us enough room to make such changes in the event system. To fix small issues caused by this, we would need to do drastic changes in Blender's keymaps and internal handling. It was worth a try, but it didn't work. I can write down a more descriptive statement in a few days, but for now I need a break of this stuff.
2015-04-03Sticky Keys backendJulian Eisel
Design task: T42339 Differential Revision: D840 Initial implementation proposal: T41867 Short description: With this we can distinguish between holding and tabbing a key. Useful is this if we want to assign to operators to a single shortcut. If two operators are assigned to one shortcut, we call this a sticky key. More info is accessible through the design task and the diff. A few people that were involved with this: * Sean Olson for stressing me with this burden ;) - It is his enthusiasm that pushed me forward to get this done * Campbell and Antony for the code and design review * Ton for the design review * All the other people that gave feedback on the patch and helped to make this possible A big "Thank You" for you all!
2014-11-28Cleanup: unused headersCampbell Barton
2014-11-18Make it possible to use preview/viewport render job kill without contextSergey Sharybin
2014-11-16Cleanup: use BLI_listbase_*** prefix for count,sort,sort_rCampbell Barton
2014-11-05Simplify node frame detach operators, based on T34670 by @julien.Lukas Tönne
* The `NODE_OT_parent_clear` operator has been removed. This was a very simplistic operator that detached every selected node, which is not very useful in case of hierarchical frames. The `NODE_OT_detach` operator only detaches the top parent nodes in the selection, keeping the hierarchy of selected nodes intact. * The `ALT+P` shortcut has been reassigned to the `NODE_OT_detach` operator which replaces the previous `NODE_OT_clear` mapping with similar behavior (also gives a menu entry shortcut now). * Shortcuts for `NODE_OT_detach_translate_attach` have been removed, due to crowded and messy keymap and unintuitive shortcut `ALT+F`. This macro operator is still registered, in case hardcore users want to make their own keymaps, but not mapped by default. Node keymaps may need some redesign in the future for these things.
2014-09-24Cleanup: const correctness for BLI_sortlistCampbell Barton
2014-05-13Tweak for node socket swapping: don't un-hide sockets automatically.Lukas Tönne
This was suggested by @zanqdo on IRC. Hiding sockets is a user choice (not to be confused with "unavailable" disabled sockets). Hidden sockets suddenly popping up when linking is confusing and intransparent, better just ignore them for the swapping.
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-29Code cleanup: quiet warningsCampbell Barton
2014-04-29Reimplemented the earlier feature of swapping existing links toLukas Tönne
neighboring sockets when connecting to an occupied input. This now works based on socket names rather than types, which helps to avoid unwanted connections to arbitrary sockets. Sockets are considered swappable when their names match, based on an alphabetic prefix followed by non-alphabetic suffix. For example: Image - Image : matches Color1 - Color2 : matches (used e.g. in cycles mix nodes) Roughness - Rotation : does not match (suffix is still alphabetic)
2014-04-11Code cleanup: use boolCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-02-05Code cleanup: use bool for static methodsCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2013-11-15Fix for own mistake in r61178: bNodeTree->links ListBase was being modified ↵Lukas Tönne
while iterating ...
2013-11-07Fix for node link highlighting not getting reset if a transform operator is ↵Lukas Toenne
cancelled and the node removed. Pass the 'test' option in node link insert testing on to the conditions function, so that at least the highlight flags get cleared before exiting the link insert function, even if there is no actual selected node to insert.
2013-11-07Cleanup: nice bool return value from ed_node_link_conditions function ↵Lukas Toenne
instead of using the space pointer for this.
2013-11-07Removed the automatic "link swapping" feature from the node link operator: ↵Lukas Toenne
When a link was being dragged to an already connected input, the existing links were shifted to the next free socket. This was originally intended as a way to speed up workflow for math and mix nodes, but more often than not it just gets in the way. Most binary (or n-ary) functions are not even commutative, i.e. changing the order of sockets does not usually produce the correct result. Also this includes the more common case where one actually wants to replace a socket, which then requires a second click to remove the shifted connection. All in all this is not a helpful feature.
2013-11-06Removed the "Show Cyclic Dependencies" operator for nodes. This operator is ↵Lukas Toenne
an old relic implemented for showing cyclic node connections as red links. This is not necessary any more, the operator simply called the generic node tree update function, which is happening anyway after all relevant node operators (if it doesn't that has to be considered a bug). It has been suggested to better use the C key for circle select, this remains to be discussed.
2013-10-31remove return argument from wmOperatorType->cancel, was only ever returning ↵Campbell Barton
OPERATOR_CANCELLED.
2013-09-05Bugfix #35920Ton Roosendaal
Adding a new node in Node Editor failed for "High DPI" (Only Mac retina now). - Py script for adding nodes was doing dpi magic, which it shouldn't. It has been replaced with a (temporary) API call to set the correct cursor location. (Thanks to Lukas T for helping here) - The SpaceNode->cursor[2] property now is *only* storing the coordinate in "adding new node space". Use of this has been removed from the code where possible, with as only exception the code to draw noodles while adding them. Special coder note: Nodes should respect the DPI value, and draw larger with larger buttons if you increase this size. The hack here is that this can only work nice if also the node positions are scaled accordingly. A better fix could be to check on scaling the node view itself for it. That then would also remove this Python API call that was added in this commit. However, that again might fight with how buttons layout code works now... needs some careful checking.
2013-08-24style cleanup: space around for loop wrappersCampbell Barton
2013-07-28use '_exec' suffix for operator execute callbacks, also picky change to ↵Campbell Barton
sizeof() use in BLI_array.h
2013-06-05Fix #35640, part 2. Check id.lib in poll functions for operators which do ↵Lukas Toenne
critical modification of node trees (create nodes, link, etc.). Transform operators and hide/show type operators are still allowed, this does not modify actual behavior of the nodes and can be useful for inspecting linked nodes.
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-29Fix for #35134.Lukas Toenne
The node link operator had a feature to automatically expose sockets in node groups when ctrl+shift+clicking on a node socket, which would create a node group input/output node. This was intended as a shortcut but conflicts with other features such as socket selection and viewer creation. It is also hardly necessary now that input/output nodes have an extension socket, which is much easier to use. Removed this expose functionality completely.
2013-04-02Fix for #34756 and #34810, crashes when dropping nodes onto noodles and a ↵Lukas Toenne
related forward compatibility bug. Added a sanity check to the ED_node_link_insert function to ensure it exits gracefully if no suitable sockets can be found. This was the problem with custom pynodes, which don't define the 'type' DNA of old sockets. The operator will have to be generalized for future nodes, but for now just not crashing seems good enough. Script node crashes in #34810 were caused by uninitialized 'type' integer as well. This is now done in the set_typeinfo function for sockets (like for trees and nodes too), to avoid any potential remaining issues of this kind. Note that new files need to be loaded and saved again once to be forward compatible again.
2013-03-18code cleanupCampbell Barton