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
2012-08-03code cleanup: remove unused includesCampbell Barton
2012-08-01Do not highlight non-selected active node with active outlineSergey Sharybin
This would match other areas in Blender.
2012-07-29code cleanup: replace MIN2/MAX2 with minf/maxfCampbell Barton
2012-07-17fix for building without the compositorCampbell Barton
2012-07-14header comment cleanup, explain whats the difference between confusingly ↵Campbell Barton
named drarnode.c and node_draw.c.
2012-07-13Fix #32087: Crash while changing values in comp editor (bt and blender included)Sergey Sharybin
Issue was caused by threading conflict between compositor output node which is freeing buffers used by render result image and image draw code which could use buffers at the same time as compositor frees this buffers. Solved by adding adding lock around viewer image invalidation and image drawing. Use renamed LOCK_PREVIEW mutex for this, which si not called LOCK_DRAW_IMAGE. With new compositor locking for preview is not needed so it could be removed. Added the same lock around viewer operation which also frees buffers used by viewer image. It's actually quite difficult to check whether this is indeed needed. This code seems to be using acquire/release technique, but somehow acquiring ImBuf before invalidating it in compositor operation doesn't resolve the issue, so probably it's not actually locking acquire and things should be checked deeper.
2012-07-10Tag ununsed variable and make function real explicit prototype.Sergey Sharybin
2012-07-10refactor node highlight code. New implementation will not write toJeroen Bakker
uninitialized memory. it happened when you delete a node that was being executed. in the compostor
2012-07-10style cleanup: line length, also comment some unused codeCampbell Barton
2012-07-09style cleanup: node drawingCampbell Barton
2012-07-09improve node text alignment with different zoom levelsCampbell Barton
2012-07-09code cleanup: remove pointless casts (int -> short -> int)Campbell Barton
2012-07-09fix node drawing glitch where text alignment for output sockets would move ↵Campbell Barton
the text X axis twice as much as it should have.
2012-07-04Highlight nodes that are being processedJeroen Bakker
2012-06-29Extended modes for snapping in the node editor.Lukas Toenne
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction. For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
2012-06-28Basic snapping in node transform operator.Lukas Toenne
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping. Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better. Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
2012-06-11Code cleanup - Removing/commenting out various bits of legacy cruft related toJoshua Leung
old Grease Pencil stuff
2012-06-01Theme color for frame nodes. The alpha value from this theme color is also ↵Lukas Toenne
used when drawing frames with a custom color (which is just RGB).
2012-06-01Reroute nodes, by Jeroen Bakker (patch #28443).Lukas Toenne
By holding shift and "cutting" a node link a new reroute helper node can be inserted. This consists of a single socket that can be used to insert additional connection points into a link. This can be used to keep a connection point in the tree when deleting a node, or to control the path of long connections for layout cleanup.
2012-05-22A number of new features for the node editor in general and the Frame node ↵Lukas Toenne
in particular. For an detailed user-level description of new features see the following blogpost: http://code.blender.org/index.php/2012/05/node-editing-tweaks/ TL;DR: * Frame node gets more usable bounding-box behavior * Node resizing has helpful mouse cursor indicators and works on all borders * Node selection/active colors are themeable independently * Customizable background colors for nodes (useful for frames visual distinction).
2012-05-15A generalization of the modal node linking operator (for dragging from ↵Lukas Toenne
socket to socket). This operator still had some built-in assumptions about the connectivity of input/output sockets (1-to-n in all current node systems). For future node systems (e.g. flow-based particles) and for general customizable nodes the operator is now fully symmetric and supports all kinds of connectivity limits (1:1, 1:n, m:1, m:n). The operator data can also store a list of node links as opposed to a single link now, so that multiple links can be redirected at once. Holding the CTRL key when clicking a socket, all links from/to that socket are detached and can be moved to a different socket. This is useful for quickly appending a node without moving every individual link.
2012-05-02A number of changes to node RNA and the file output node, to simplify socket ↵Lukas Toenne
types and make node code more robust for future nodes with extra socket data. * Removed the struct_type identifier from sockets completely. Any specialization of socket types can be done by using separate collections in RNA and customized socket draw callbacks in node type. Sockets themselves are pure data inputs/outputs now. Possibly the sock->storage data could also be removed, but this will change anyway with id properties in custom nodes. * Replaced the direct socket button draw calls by extra callbacks in node types. This allows nodes to draw sockets in specialized ways without referring to the additional struct_type identifier. Default is simply drawing the socket default_value button, only file output node overrides this atm. * File output node slots now use a separate file sub-path in their storage data, instead of using the socket name. That way the path is an actual PROP_FILEPATH property and it works better with the UI list template (name property is local to the data struct). * Node draw contexts for options on the node itself and detail buttons in the sidebar now have an extra context pointer "node" (uiLayoutSetContextPointer). This can be used to bind operator buttons to a specific node, instead of having to rely on the active/selected node(s) or making weak links via node name. Compare to modifiers and logic bricks, they use the same feature. * Added another operator for reordering custom input slots in the file output node.
2012-04-29style cleanup: function calls & whitespace.Campbell Barton
2012-04-29style cleanup: whitespace / commasCampbell Barton
2012-04-21style cleanupCampbell Barton
2012-03-24style cleanup: follow style guide for formatting of if/for/while loops, and ↵Campbell Barton
else if's
2012-03-24style cleanup: mainly for mesh code, also some WM function use.Campbell Barton
2012-03-18spelling cleanupCampbell Barton
2012-03-17Big step forward nodes UI translation:Bastien Montagne
*Add menu is now translated. *Nodes' title is now translated. *Nodes' sockets' labels are now translated. However, about the last point, and unless I’m mistaking, we’ll have to add the "i18n tag" N_() to all sockets' names, in the input/ouput templates declaration, in all nodes' files, as those sockets are collections created at runtime, I think po-generating script has no way to access that from bpy.types... Quite a piece of (borring) work. :/
2012-03-09Node socket selection feature reimplemented from 2.49. Sockets can be ↵Lukas Toenne
selected as a sub-selection of nodes and are then preferred by the auto-connect operator. This makes it easier to create precise links over long distances as an alternative to the click & hold operator. Socket selection is indicated by a simple white highlight circle. Multiple inputs can be selected by holding SHIFTKEY (just like regular node select). Only one output socket can be selected at a time for each node, but several outputs in different nodes are allowed. The auto-connect operator will prefer selected sockets on nodes for creating links. If either the output or input side have no selected sockets it will fall back to the previous behavior of chosing 'best' sockets first (colors, then vectors, then values). This could be improved in the future, but is out of scope here.
2012-03-03style cleanup - use aligned * prefixed blocks for descriptive comments (was ↵Campbell Barton
already used a lot and part of proposed style guide).
2012-02-27Implements a new operator for detaching nodes. In the process i overhauled ↵Lukas Toenne
the node muting system as well. There are a number of features that use a kind of "internal linking" in nodes: 1. muting 2. delete + reconnect (restore link to/from node after delete) 3. the new detach operator (same as 2, but don't delete the node) The desired behavior in all cases is the same: find a sensible mapping of inputs-to-outputs of a node. In the case of muting these links are displayed in red on the node itself. For the other operators they are used to relink connections, such that one gets the best possible ongoing link between previous up- and downstream nodes. Muting previously used a complicated callback system to ensure consistent behavior in the editor as well as execution in compositor, shader cpu/gpu and texture nodes. This has been greatly simplified by moving the muting step into the node tree localization functions. Any muted node is now bypassed using the generalized nodeInternalRelink function and then removed from the local tree. This way the internal execution system doesn't have to deal with muted nodes at all, as if they are non-existent. The same function is also used by the delete_reconnect and the new links_detach operators (which work directly in the editor node tree). Detaching nodes is currently keymapped as a translation variant (macro operator): pressing ALTKEY + moving node first detaches and then continues with regular transform operator. The default key is ALT+DKEY though, instead ALT+GKEY, since the latter is already used for the ungroup operator.
2012-02-22Adds a new node type for saving multiple image files from a single node.Lukas Toenne
Unlike the existing file output node this node has an arbitrary number of possible input slots. It has a base path string that can be set to a general base folder. Every input socket then uses its name as an extension of the base path for file organization. This can include further subfolders on top of the base path. Example: Base path: '/home/user/myproject' Input 1: 'Compo' Input 2: 'Diffuse/' Input 3: 'details/Normals' would create output files in /home/user/myproject: Compo0001.png, Compo0002.png, ... in /home/user/myproject/Diffuse: 0001.png, 0002.png, ... (no filename base given) in /home/user/myproject/details: Normals0001.png, Normals0002.png, ... Most settings for the node can be found in the sidebar (NKEY). New input sockets can be added with the "Add Input" button. There is a list of input sockets and below that the details for each socket can be changed, including the sub-path and filename. Sockets can be removed here as well. By default each socket uses the render settings file output format, but each can use its own format if necessary. To my knowledge this is the first node making use of such dynamic sockets in trunk. So this is also a design test, other nodes might use this in the future. Adding operator buttons on top of a node is a bit unwieldy atm, because all node operators generally work on selected and/or active node(s). The operator button would therefore either have to make sure the node is activated before the operator is called (block callback maybe?) OR it has to store the node name (risky, weak reference). For now it is only used in the sidebar, where only the active node's buttons are displayed. Also adds a new struct_type value to bNodeSocket, in order to distinguish different socket types with the same data type (file inputs are SOCK_RGBA color sockets). Would be nicer to use data type only for actual data evaluation, but used in too many places, this works ok for now.
2012-01-11dynamicpaint had some incorrect string sizes for layers names, use BLI ↵Campbell Barton
string functions in more places too.
2012-01-11minor cleanup for string use - no functional changesCampbell Barton
- use more logical names for strings, noticed too many strings called `str` when reviewing name patch. - pass __func__ macro to uiBeginBlock(), quite a few names were wrong (copy/paste error).
2012-01-08Improved auto-hiding of unused sockets for collapsed nodes.Lukas Toenne
Instead of generally hiding all unused sockets in collapsed mode, the sockets now have a new explicit flag SOCK_AUTO_HIDDEN, which is only toggled when the hide_toggle operator is called. This way the auto-hidden sockets stay as they are when nodes are duplicated etc. The new flag is necessary to distinguish between manually hidden sockets (via hide_sockets_toggle operator) and automatically hidden sockets and restore the node state when unhiding a node.
2011-12-19Automatically hide unused (=unlinked) node sockets in collapsed ("hidden") ↵Lukas Toenne
nodes. This is to make nodes with many sockets cleaner and simpler, which is the purpose of collapsing nodes in the first place. The hiding code uses the SOCK_IN_USE flags already present. These were only temporarily set by the shader node code for determining needed texture coordinate types. Now they are used persistently and updated along with the sock->link pointers.
2011-12-18Removed buttons in node headers for hiding unused sockets and for hiding the ↵Lukas Toenne
(non-socket) option buttons. These are rarely used buttons that only complicate the UI. Alternatively these operators can still be accessed in the Node menu of the node editor window, "Toggle Hidden Node Sockets" and "Toggle Node Options" respectively.
2011-12-18Fix for toggle buttons in node headers.Lukas Toenne
The buttons for "hiding" (collapsing) a node, hiding unlinked sockets, additional options, the preview and for opening a node group were all using a custom mouse test function, which was broken. They now use actual buttons instead of just displaying icons. Before executing the respective operators the button's node has to be selected and activated, so the buttons use an intermediate handle function, which selects the node and then calls the operator.
2011-12-06Fix related to #29513: materials using nodes will output passes from the activeBrecht Van Lommel
material node. This is a confusing system, but two features were missing from 2.4x that made this at least a bit more clear: * The top right icon in the node now shows brighter again for the active node. * Setting a material datablock in a node makes that node active.
2011-11-24Fix for wrong event clipping in open node groups (bug #29383). The internal ↵Lukas Toenne
node blocks of the group were created before the group node block itself, so the node group block clips events for internal nodes. Generally, blocks should be created just like the drawing order.
2011-11-22Fix for long-standing TODO item: Clicking on overlapping nodes would ↵Lukas Toenne
activate buttons below. This patch adds a new CLIP_EVENTS flag for uiBlock, which will prevent the ui_but_find_mouse_over search function from looking into "lower" uiBlocks (i.e. those further back in the list). The order of block creation for nodes has also been updated to use the z-ordering (just the nodetree->nodes list). In order for this to work, the bounding box values of the uiBlocks have to be set explicitely to fit the node size, those are usually either zero or calculated from the internal buttons.
2011-11-20Muting node patch: second part. Also fix [#27636] Muting shading nodes is ↵Bastien Montagne
ignored Now, compositing, shading and texture nodes have a consistent muting system, with default behaving as previous (for compo), and which can be optionaly customized by each node. Shader nodes are also GLSL muted. However, Cycles is currently unaware of muted nodes, will try to address this…
2011-11-11correct indentation and some whitespace edits (no functional changes)Campbell Barton
2011-11-07Nodes: add socket option to hide the default value in the UI, to be used forBrecht Van Lommel
sockets that get their default value if no node is connected from elsewhere, e.g. a texture coordinate.
2011-11-02Nodes: add support for shader nodes on world and lamps, in addition to ↵Brecht Van Lommel
materials. The internal render engine does not support them, and they are not accesible in the UI yet, but cycles will use them.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-19Adds an update flag to the bNode struct (similar to bNodeTree->update).Lukas Toenne
This prevents access to non-existent typeinfo during type initialization, when node types have been removed and such nodes are deleted from older files. All blenkernel functions now only set the node->update flag instead of directly calling the update function. All operators, etc. calling blenkernel functions to modify nodes should make a ntreeUpdate call afterward (they already did that anyway). Editor/RNA/renderer/etc. high-level functions still can do immediate updates by using nodeUpdate and nodeUpdateID (replacing NodeTagChanged/NodeTagIDChanged respectively). These old functions were previously used only for setting compositor node needexec flags and clearing cached data, but have become generic update functions that require type-specific functionality (i.e. a valid typeinfo struct).
2011-09-15svn merge -r39834:40222 https://svn.blender.org/svnroot/bf-blender/trunk/blenderSergey Sharybin
2011-09-11replace magic numbers for flags for uiSetRoundBox();Campbell Barton