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
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-21Particles: initial object socket and emitter node supportJacques Lucke
Object sockets work now, but only the new Object Transforms and the Particle Mesh Emitter node use it. The emitter does not actually use the mesh surface yet. Instead, new particles are just emitted around the origin of the object. Internally, handles to object data blocks are passed around in the network, instead of raw object pointers. Using handles has a couple of benefits: * The caller of the function has control over which handles can be resolved and therefore limit access to specific data. The set of data blocks that is accessed by a node tree should be known statically. This is necessary for a proper integration with the dependency graph. * When the pointer to an object changes (e.g. after restarting Blender), all handles are still valid. * When an object is deleted, the handle is invalidated without causing crashes. * The handle is just an integer that can be stored per particle and can be cached easily. The mapping between handles and their corresponding data blocks is stored in the Simulation data block.
2020-07-17Nodes: move some code from blenkernel directory to nodesJacques Lucke
This also introduces the `blender::nodes` namespace. Eventually, we want to move most/all of the node implementation files into this namespace. The reason for this file-move is that the code fits much better into the `nodes` directory than in the `blenkernel` directory.
2020-07-07Nodes: Generate multi-function network from node treeJacques Lucke
This adds new callbacks to `bNodeSocketType` and `bNodeType`. Those are used to generate a multi-function network from a node tree. Later, this network is evaluated on e.g. particle data. Reviewers: brecht Differential Revision: https://developer.blender.org/D8169
2020-06-28Use const in nodeFindSocketAnkit
Since the function only iterates over the input members, and matches their identifiers, `bNode *`can be `const`. All other usages of the `nodeFindSocket` use it with other functions that modify the node. (e.g.: ``nodeAddLink` ) But an exporter needs the node to be a `const`, so this creates unnecessary and slightly unsafe design changes. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D8142
2020-05-04Nodes: add Combine Strings and Group Instance ID node UIsJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7494
2020-05-01Cleanup: pass const arguments to texture functionsCampbell Barton
2020-04-20Cleanup: rename "nested" to "embedded"Jacques Lucke
Reviewers: mont29 Differential Revision: https://developer.blender.org/D7476
2020-04-20Simulations: Add Boolean Math, Switch and Float Compare node UIJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7424
2020-04-20Simulations: UI for core particle nodesJacques Lucke
This commit adds the initial set of particles nodes. These are fairly low level and are expected to be put into groups that we ship with Blender. See D7384 for a description of the individual nodes. Reviewers: brecht Differential Revision: https://developer.blender.org/D7384
2020-04-20Simulations: Embed simulation node tree in simulation data blockJacques Lucke
This adds an embedded node tree to the simulation data block dna. The UI in the `Simulation Editor` has been updated to show a list of simulation data blocks, instead of individual node trees. The new `SpaceNodeEditor.simulation` property wraps the existing `SpaceNodeEditor.id` property. It allows scripts to get and set the simulation data block that is being edited. Reviewers: brecht, mont29 Differential Revision: https://developer.blender.org/D7301
2020-04-03Cleanup: Rename ExtensionRNA variables from ext to rna_extJulian Eisel
Makes it more clear that code using this is related to the RNA integration of a type. Part of T74432. Also ran clang-format on affected files.
2020-03-17Cleanup: Fix warnings about function signature of register passRay Molenkamp
RE_engine_register_pass is sometimes in the headers with type as an integer parameter, sometimes as eNodeSocketDatatype. This caused warnings, the root cause was makesrna was not able to generate the proper type for enums and defaulted to int. makesrna has been extended with the RNA_def_property_enum_native_type that allows telling makesrna the native type of an enum, if set it will be used otherwise it will still fall back to int. Differential Revision: https://developer.blender.org/D7117 Reviewed By: brecht
2020-03-12Cleanup: remove unused node tree user counting functionsJacques Lucke
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: bNodeTree: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-06Nodes: Support storing socket link limits in bNodeSocketTypeJacques Lucke
Currently the link limit of sockets is stored in bNodeSocket->limit. This allows for a lot of flexibility, but is also very redundant. In every case I've had to deal with so far, it would have "more correct" to set the link limit per socket type and not per socket. I did not enforce this constraint yet, because the link limit is exposed in the Python API, which I did not want to break here. In the future it might even make sense to only support only three kinds of link limits: a) no links, b) at most one link, c) an arbitrary number links links. The other link limits usually don't work well with tools (e.g. which link should be removed when a new one is connected?) and is not used in practice. However, that is for another day. Eventually, I would like to get rid of bNodeSocket->limit completely and replace it either with fixed link limits or a callback in bNodeSocketType. This patch consists of three parts: **1. Support defining link limit in socket type** This introduces a new `nodeSocketLinkLimit` function that serves as an indirection to hide where the link limit of a socket is defined. **2. Define link limits for builtin sockets on socket type** Data sockets: one input, many outputs Virtual sockets: one input, one output Undefined sockets: many inputs, many outputs (to avoid that links are removed when the type of the socket is not known) **3. Remove `bNodeSocketTemplate->limit`** This wasn't used anymore after the second commit. Removing it simplifies socket definitions in hundreds of places and removes a lot of redundancy. Differential Revision: https://developer.blender.org/D7038 Reviewers: brecht
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-04Cleanup: ID make local: remove `id_in_bmain` argument.Bastien Montagne
This info is now stored in ID tags themselves, so no need to pass an extra anonymous boolean parameter around, yay!
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-28Nodes: Use destructor callbacks for bNodeSocketType and bNodeTypeJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D6963
2020-02-17Cycles: Vector Rotate Node using Axis and Angle methodCharlie Jolly
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods. Reviewed By: #cycles, brecht Differential Revision: https://developer.blender.org/D3789
2020-02-15Cleanup: comment unused node definesCampbell Barton
2020-02-11Nodes: Add dynamic label support for Math NodesCharlie Jolly
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6375
2020-02-06NodeTree: Add access to the address of an ID's nodetree pointer.Bastien Montagne
2020-01-16Fix T70766 EEVEE: Performance drop with node tree in 2.81Clément Foucault
2019-12-10Cycles: support for custom shader AOVsLukas Stockner
Custom render passes are added in the Shader AOVs panel in the view layer settings, with a name and data type. In shader nodes, an AOV Output node is then used to output either a value or color to the pass. Arbitrary names can be used for these passes, as long as they don't conflict with built-in passes that are enabled. The AOV Output node can be used in both material and world shader nodes. Implemented by Lukas, with tweaks by Brecht. Differential Revision: https://developer.blender.org/D4837
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-10-10Fix T70614 EEVEE: Bump with texture connected to other branches don't workClément Foucault
Was caused by the bump node not being evaluated because the other branch was evaluated before. To fix this, we use fromnode instead of tonode. Also we fix a potential issue with recursiveness because ntree_shader_copy_branch() also use nodeChainIterBackwards() which would reset the iter_flag in the middle of the parent iteration. Use iter_flag as a bitflag for each iteration to fix this.
2019-10-01Fix T70325 EEVEE: Performance regression with large nodetreesClément Foucault
This was caused by nodeChainIter which is not linear complexity. Introduce nodeChainIterBackwards to iterate backwards faster.
2019-09-12Shading: Add Vertex Color node.OmarSquircleArt
This patch adds a new Vertex Color node. The node also returns the alpha of the vertex color layer as an output. Reviewers: brecht Differential Revision: https://developer.blender.org/D5767
2019-09-07Cleanup: includes in headersCampbell Barton
Forward declare structs where possible.
2019-08-28Fix T68971: Copy As New Driver from Material node creates a bad reference.Alexander Gavrilov
NodeTree structures of materials and some other data blocks are effectively node group datablock objects that are contained inside the parent block. Thus, direct references to them are only valid while blender is running, and are lost on save. Fix Copy As New Driver to create a reference that goes through the owner datablock, by adding a new ID flag to mark private pseudo-datablocks. Also fix functions that return full paths to structures and properties, e.g. used in python tooltips. Functions for paths from ID to struct or property can't be changed because of Animation Data related code. Reviewers: mont29 Differential Revision: https://developer.blender.org/D5559
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-22Revert "Fix T68971: Copy As New Driver from Material node creates a bad ↵Bastien Montagne
reference." This reverts commits 54fd8176d7e91, 4c5becb6b1 and 8f578150e. Those kind of commits must be reviewed and approved by project owners. That one: * Broke Collada building by not properly updating all calls to modified function. * Broke *whole* ID management by not properly updating library_query.c. And in general, I am strongly against backward ID pointers, those are *always* a serious PITA for ID management. Sometimes they cannot be avoided, but in general other ways to get that kind of info should be investigated first.
2019-08-22NodeTree: also assign the owner pointer when copying.Alexander Gavrilov
2019-08-22Fix T68971: Copy As New Driver from Material node creates a bad reference.Alexander Gavrilov
NodeTree structures of materials and some other data blocks are effectively node group data block objects that are contained inside the parent block. Thus, direct references to them are only valid while blender is running, and are lost on save. Fix Copy As New Driver to create a reference that goes through the owner data block, by adding a new runtime field to bNodeTree.
2019-08-21Shading: Add Volume Info node.OmarSquircleArt
The Volume Info node provides the Color, Desnity, Flame, and Temperature of smoke domains. Reviewers: brecht Differential Revision: https://developer.blender.org/D5551
2019-08-21Shading: Add White Noise node.OmarSquircleArt
The White Noise node hashes the input and returns a random number in the range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5550
2019-08-21Shading: Add more operators to Vector Math node.OmarSquircleArt
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap, Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators to the Vector Math node. The Value output has been removed from operators whose output is a vector, and the other way around. All of those removals has been handled properly in versioning code. The patch doesn't include tests for the new operators. Tests will be added in a later patch. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5523
2019-08-18Shading: Refactor Math node and use dynamic inputs.OmarSquircleArt
- Implement dynamic inputs. The second input is now unavailable in single operand math operators. - Reimplemenet the clamp option using graph expansion for Cycles. - Clean up code and unify naming between Blender and Cycles. - Remove unused code. Reviewers: brecht Differential Revision: https://developer.blender.org/D5481
2019-08-14Compositor: Added denoising nodeBrecht Van Lommel
This node is built on Intel's OpenImageDenoise library. Other denoisers could be integrated, for example Lukas' Cycles denoiser. Compositor: Made OpenImageDenoise optional, added CMake and build_env files to find OIDN Compositor: Fixed some warnings in the denoising operator build_environment: Updated OpenImageDenoise to 0.8.1 build_environment: Updated OpenImageDenoise in `make deps` for macOS Reviewers: sergey, jbakker, brecht Reviewed By: brecht Subscribers: YAFU, LazyDodo, Zen_YS, slumber, samgreen, tjvoll, yeus, ponomarovmax, getrad, coder.kalyan, vitos1k, Yegor, DeepBlender, kumaran7, Darkfie9825, aliasguru, aafra, ace_dragon, juang3d, pandrodor, cdog, lordodin, jtheninja, mavek, marcog, 5k1n2, Atair, rawalanche, 0o00o0oo, filibis, poor, lukasstockner97 Tags: #compositing Differential Revision: https://developer.blender.org/D4304
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-13Shading: Add Clamp node to Cycles and EEVEE.OmarSquircleArt
This patch adds a new node that clamps a value between a maximum and a minimum values. Reviewers: brecht Differential Revision: https://developer.blender.org/D5476
2019-08-13Shading: Add Map Range node to Cycles and EEVEE.OmarSquircleArt
This patch adds a new Map Range node that linearly remaps an input value from a range to another. This node is similar to the compositor's Map Range node. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5471
2019-06-07Fix T65612: Ungroup in Node Editor CrashesSergey Sharybin
2019-06-04Fix T64247: Crash on playback with special shader node treeSergey Sharybin
The root of the problem goes to the fact that node tree copying uses source tree and nodes for a temporary storage. This makes it so multiple dependency graphs can not be reliably evaluated from different threads if they are using same original node tree. Solved by doing the following: - Commonly used tree copying function (which is used by library manager) keeps source tree, nodes and sockets untouched. - All the related areas (like node tree's callback) now have const qualifier on the input. - Areas which needs to have those temporary pointers assigned are now using explicit function. Would be really cool to get rid of those temporary pointers completely, but this is a bit tricky due to hairy nature of the code. Can happen any time now though: is easy enough to generalize the new pointers mapping. Note that this change is only intended to solve the crash. The fact that icons shouldn't be updated on playback will be fixed as a separate change. Reviewers: brecht, fclem Reviewed By: brecht, fclem Subscribers: brecht, fclem Differential Revision: https://developer.blender.org/D5002
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-24Nodes: avoid slow and unecessary node group updates on file readBrecht Van Lommel
On file read we need to update group nodes in case the group they refer to has changed its inputs and outputs. This had O(n^2) time complexity and was updating all datablocks even if they did not change.
2019-04-20Cleanup: quiet extra-semicolon warningCampbell Barton