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
2022-10-12Cleanup: Convert two nodes files to C++Hans Goudey
2022-10-03CMake: add missing headersCampbell Barton
2022-09-18Build: limit Py_ENABLE_SHARED to modules using Python headersBrecht Van Lommel
And remove Python flags from nodes, no longer needed.
2022-09-13Geometry Nodes: new evaluation systemJacques Lucke
This refactors the geometry nodes evaluation system. No changes for the user are expected. At a high level the goals are: * Support using geometry nodes outside of the geometry nodes modifier. * Support using the evaluator infrastructure for other purposes like field evaluation. * Support more nodes, especially when many of them are disabled behind switch nodes. * Support doing preprocessing on node groups. For more details see T98492. There are fairly detailed comments in the code, but here is a high level overview for how it works now: * There is a new "lazy-function" system. It is similar in spirit to the multi-function system but with different goals. Instead of optimizing throughput for highly parallelizable work, this system is designed to compute only the data that is actually necessary. What data is necessary can be determined dynamically during evaluation. Many lazy-functions can be composed in a graph to form a new lazy-function, which can again be used in a graph etc. * Each geometry node group is converted into a lazy-function graph prior to evaluation. To evaluate geometry nodes, one then just has to evaluate that graph. Node groups are no longer inlined into their parents. Next steps for the evaluation system is to reduce the use of threads in some situations to avoid overhead. Many small node groups don't benefit from multi-threading at all. This is much easier to do now because not everything has to be inlined in one huge node tree anymore. Differential Revision: https://developer.blender.org/D15914
2022-08-31Nodes: move NodeTreeRef functionality into node runtime dataJacques Lucke
The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Not that we have runtime data in nodes and sockets, we can also store the result of some queries there. This has some benefits: * No need for a read-only separate node tree data structure which increased complexity. * Makes it easier to reuse cached queries in more parts of Blender that can benefit from it. A downside is that we loose some type safety that we got by having different types for input and output sockets, as well as internal and non-internal links. This patch also refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore, but uses `bNodeTree` directly instead. To provide a convenient API (that is also close to what `NodeTreeRef` has), a new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink` now have C++ methods declared in `DNA_node_types.h` which are implemented in `BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when parsing dna header files. No user visible changes are expected. Differential Revision: https://developer.blender.org/D15491
2022-08-15GPU: replace GLEW with libepoxyChristian Rauch
With libepoxy we can choose between EGL and GLX at runtime, as well as dynamically open EGL and GLX libraries without linking to them. This will make it possible to build with Wayland, EGL, GLVND support while still running on systems that only have X11, GLX and libGL. It also paves the way for headless rendering through EGL. libepoxy is a new library dependency, and is included in the precompiled libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed. Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton and Sergey Sharybin. Ref T76428 Differential Revision: https://developer.blender.org/D15291
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929
2022-01-14Fix: Compilation error caused by missing target relationRay Molenkamp
bf_nodes/bf_nodes_composite depend on DNA headers
2022-01-12DNA: Add space clip editor defaultsSimon Lenz
This is my attempt of adding defaults for the space clip editor struct (in line with https://developer.blender.org/T80164). It adds the default allocation for `SpaceClip` and `node_composite_movieclip.cc`. This also solves the error below (for C++ files using the DNA_default_alloc), which was put forward by Sergey Sharybin. Differential Revision: https://developer.blender.org/D13367 Reviewed by: Julian Eisel
2022-01-07Cleanup: Add `bf_nodes_texture` libraryAaron Carlisle
For sake of consistencey with other node tree types, create its own cmake module. This change helps keep `bf_nodes` focused on generic nodes files. Texture nodes are end of life and hopefully for Blender 4.0 they can be removed. It is not expected that these will see the updates that the other nodes are getting. This change also helps isolate the end of life files, we may move some texture specific node tree execution code out of `node_exec` and into a `node_texture_exec` files. Differential Revision: https://developer.blender.org/D13743
2022-01-06Cleanup: sort cmake file listsCampbell Barton
2022-01-06Cleanup: remove unnecessary slashes and quotes from paths in CMakeCampbell Barton
2021-12-28Nodes: Add bf_nodes_function moduleAaron Carlisle
In the future this will be used to support unity builds for function nodes Differential Revision: https://developer.blender.org/D13682
2021-12-28Nodes: Add bf_nodes_composite moduleAaron Carlisle
In the future this will be used to support unity builds for composite nodes Differential Revision: https://developer.blender.org/D13678
2021-12-18Fix T94215: compositer denoise node UI wrongly shows as disabledBrecht Van Lommel
After recent refactoring in 4e98d974b596.
2021-12-15Node Editor: Link Drag Search MenuHans Goudey
This commit adds a search menu when links are dragged above empty space. When releasing the drag, a menu displays all compatible sockets with the source link. The "main" sockets (usually the first) are weighted above other sockets in the search, so they appear first when you type the name of the node. A few special operators for creating a reroute or a group input node are also added to the search. Translation is started after choosing a node so it can be placed quickly, since users would likely adjust the position after anyway. A small "+" is displayed next to the cursor to give a hint about this. Further improvements are possible after this first iteration: - Support custom node trees. - Better drawing of items in the search menu. - Potential tweaks to filtering of items, depending on user feedback. Thanks to Juanfran Matheu for developing an initial patch. Differential Revision: https://developer.blender.org/D8286
2021-12-07Shader Nodes: Create a new bf_nodes_shader libraryAaron Carlisle
Re commits rBf72cc47d8edf849af98e196f721022bacf86a5e7 but without the unity build
2021-12-07Geometry Nodes: move type conversions to blenkernelJacques Lucke
The type conversions do not depend on other files in the nodes module. Furthermore we want to use the conversions in the geometry module without creating a dependency to the nodes module there.
2021-12-07Revert moving all shader nodes to c++Jacques Lucke
This reverts to following commits: * rB5cad004d716da02f511bd34983ac7da820308676 * rB97e3a2d935ba9b21b127eda7ca104d4bcf4e48bd * rBf60b95b5320f8d6abe6a629fe8fc4f1b94d0d91c * rB0bd3cad04edf4bf9b9d3b1353f955534aa5e6740 * rBf72cc47d8edf849af98e196f721022bacf86a5e7 * rB3f7014ecc9d523997062eadd62888af5fc70a2b6 * rB0578921063fbb081239439062215f2538a31af4b * rBc20098e6ec6adee874a12e510aa4a56d89f92838 * rBd5efda72f501ad95679d7ac554086a1fb18c1ac0 The original move to c++ that the other commits depended upon had some issues that should be fixed before committing it again. The issues were reported in T93797, T93809 and T93798. We should also find a better rule for not using c-style casts going forward, although that wouldn't have been reason enough to revert the commits. Introducing something like a `MEM_new<T>` and `MEM_delete<T>` function might help with the the most common case of casting the return type of `MEM_malloc`. Going forward, I recommend first committing the changes that don't require converting files to c++. Then convert the shading node files in smaller chunks. Especially don't mix fairly low risk changes like moving some simple nodes, with higher risk changes.
2021-12-06Shader Nodes: Unity BuildAaron Carlisle
- Create a new `bf_nodes_shader` library - Enable unity builds for `bf_nodes_shader`, gives abount a 2.7x speed up for compile times Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13484
2021-12-06Cleanup: remove unnecessary extern template implementationsJacques Lucke
This technique isn't really necessary anymore, because unity builds avoid instantiating the same template too many times already.
2021-12-05Cleanup: Migrate all shader nodes to c++Aaron Carlisle
This will be useful in the future to use the new socket builder API Aditional changes: - Declare variables where initialized - Do not use relative includes Differential Revision: https://developer.blender.org/D13465
2021-12-01Cleanup: Move node_shader_util.c to C++Hans Goudey
This will allow using a function I've declared in a C++ header.
2021-12-01Geometry Nodes: Generalized Compare NodeJohnny Matthews
Replace compare floats node with a generalized compare node. The node allows for the comparison of float, int, string, color, and vector. The datatypes support the following operators: Float, Int: <, >, <=, >=, ==, != String: ==, != Color: ==, !=, lighter, darker (using rgb_to_grayscale value as the brightness value) Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >= Average: The average of the components of the vectors are compared. Dot Product: The dot product of the vectors are compared. Direction: The angle between the vectors is compared to an angle Element-wise: The individual components of the vectors are compared. Length: The lengths of the vectors are compared. Differential Revision: https://developer.blender.org/D13228
2021-11-19Nodes: add bf_nodes_geometry libraryJacques Lucke
Separating geometry nodes into a new library will make it easier to improve compile times with features like unity builds and precompiled headers. Differential Revision: https://developer.blender.org/D13261
2021-11-05Cleanup (UI): Add/use type for operator context enumJulian Eisel
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton
2021-10-26Geometry Nodes: Get and set nodes for ID attributeHans Goudey
These nodes allow accessing and changing the stable/random ID used for motion blur with instances and stable randomness. Since rB40c3b8836b7a, the stable ID is a built-in attribute, so to be consistent and allow changing it in the node tree like other built-in attributes, it has get and set nodes.
2021-10-26Cleanup: Restore alphabetical orderHans Goudey
2021-10-26Geometry Nodes: geometry component type warning systemJacques Lucke
Previously, every node had to create warnings for unsupported input geometry manually. Now this is automated. Nodes just have to specify the geometry types they support in the node declaration. Differential Revision: https://developer.blender.org/D12899
2021-10-26Geometry Nodes: Handle multiple grids in the volume to mesh nodeHans Goudey
In future use cases, a volume can contain many grids that represent the density information. In this case, it's better if the volume to mesh node creates a mesh based on all of the grids in the volume. This is also a benefit to share-ability, since one doesn't have to specify the grid name in the node. Instead, in the future we can have a way to split particular grids into separate volumes, if only one grid should be considered. The code changes are relatively simple: - Move the old volume to mesh node to the legacy folder. - Run the volume to mesh node on all instance geometry, like elsewhere. - Make the blenkernel's volume to mesh API a bit more specific. Differential Revision: https://developer.blender.org/D12997
2021-10-25Geometry Nodes: new Image Texture nodeJacques Lucke
This adds a new image texture node for geometry nodes. It does not reuse the same node that is used in shading, because we want to be able to expose the image and frame as sockets. There is a known update issue when a movie or image sequence is used. That will be fixed separately (also see D12957). Currently, the image socket is just a pointer to an Image ID data block. This can contain single images but also movies and image sequences. In the future, the definition of an image socket can be expanded to include images that are generated from scratch in the node tree. For more details read the discussion in D12827. Some of the code is a direct port from cycles and should be cleaned up a bit in the future. For example `image_cubic_texture_lookup`. For still images, the frame input is ignored. Otherwise, the frame has to be in a valid range for the node to work. In the future we may add e.g. automatic looping functionality. Differential Revision: https://developer.blender.org/D12827
2021-10-24Geometry Nodes: Rename node "String Substring"Erik Abrahamsson
This patch renames the node "String Substring" to "Slice String" to conform to the "verb first" naming convention. Default length is also changed to 10 to make it easier for users to understand what the node does. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12931
2021-10-23Geometry Nodes: Add Instances to Points NodeJarrett Johnson
This node takes a geometry set with instances as input and outputs points located on the origins of the top level of instances in the geometry set (not nested instances). It also has position and radius inputs to allow overriding the default, and a selection input to only generate points for some instances. The use case for this node is a method to use geometry proximity on instance origins, but in a more generic way that is flexible and useful in other situations. Differential Revision: https://developer.blender.org/D12893
2021-10-22Geometry Nodes: add Boolean and Integer Input nodesDorian
These nodes just output a single value of their respective types, making it possible to control multiple inputs with the same value. Differential Revision: https://developer.blender.org/D12932
2021-10-20Geometry Nodes: Fields version of Curve to Points nodeHans Goudey
This commit adds an updated version of the curve to points that supports fields. Only the position and radius are transferred by default now, which should improve performance. The other outputs like tangent and rotation are outputted with anonymous attributes. I took the opportunity to change a few other small things: - Name geometry sockets "Curve" and "Points" like other nodes. - Remove the radius multiple of 0.1, which was confusing. Thanks to @Johnny Matthews (guitargeek) for an initial patch. Differential Revision: https://developer.blender.org/D12887
2021-10-20Cleanup: sort cmake file listsCampbell Barton
2021-10-20Cleanup: trailing space, use single quotes for enumsCampbell Barton
2021-10-19Geometry Nodes: Replace String nodeErik Abrahamsson
This commit adds a node that can be used to find and replace strings inside of the input string. One initial use case is to have an easier way to add line breaks to strings to the string to curves node. Differential Revision: https://developer.blender.org/D12721
2021-10-19Geometry Nodes: Fields version of the raycast nodeHans Goudey
This patch includes an updated version of the raycast node that uses fields instead of attributes for inputs instead of outputs. This makes the node's UI much clearer. It should be faster too, since the evaluation system for fields provides multi-threading. The source position replaces the input geometry (since this node is evaluated in the context of a geometry like the other field nodes). Thanks to @guitargeek for an initial version of this patch. Differential Revision: https://developer.blender.org/D12638
2021-10-18Geometry Nodes: Endpoint Selection NodesJohnny Matthews
The Endpoint Selection node allows for the Selection of an aribitrary number of endpoints from each spline in a curve. The start and end inputs are evaluated on the spline domain. The result is outputted as a boolean field on the point domain. Differential Revision: https://developer.blender.org/D12846
2021-10-15Geometry Nodes: Updated Subdivision Surface NodeJarrett Johnson
Replaces the old Subdivision Surface Node. Changes: - Removes implicit instance realization, instead the node runs once per unique instance. - "Use Creases" becomes a crease field input applied to edges. The values are clamped between zero and one. Addresses T91763 Differential Revision: https://developer.blender.org/D12830
2021-10-15Geometry Nodes: Fields transfer attribute nodeHans Goudey
This commit adds an updated version of the old attribute transfer node. It works like a function node, so it works in the context of a geometry, with a simple data output. The "Nearest" mode finds the nearest element of the specified domain on the target geometry and copies the value directly from the target input. The "Nearest Face Interpolated" finds the nearest point on anywhere on the surface of the target mesh and linearly interpolates the value on the target from the face's corners. The node also has a new "Index" mode, which can pick data from specific indices on the target geometry. The implicit default is to do a simple copy from the target geometry, but any indices could be used. It is also possible to use a single value for the index to to retrieve a single value from an attribute at a certain index. Differential Revision: https://developer.blender.org/D12785
2021-10-14Geometry Nodes: Field version of mesh to curve nodeHans Goudey
This commit adds a fields version of the mesh to curve node, with a field for the input selection. In order to reduce code duplication, it adds the mesh to curve conversion to the new geometry module and calls that implementation from both places. More details on the geometry module can be found here: T86869 Differential Revision: https://developer.blender.org/D12579
2021-10-13Geometry Nodes: Fields version of edge split nodeHans Goudey
This changes the edge split node to have a selection input, which is more aligned with the other design changes. This loses the ability to split edges based on an angle, but the edge angle can be added as a field input node in the future, which will make for a much more flexible system. Differential Revision: https://developer.blender.org/D12829
2021-10-13Geometry Nodes: Rotate Instances NodeErik Abrahamsson
Adds a node that can rotate each of a geometry's instances in global (to the modifier object) or local space (of each point) by a specified angle around a pivot point. In the future, separating the local-global choice for the pivot and the rotation might be useful. However, for now the node is kept simple. Differential Revision: https://developer.blender.org/D12682
2021-10-13Geometry Nodes: Scale Instances NodeErik Abrahamsson
Adds a node that can scale a geometry's instances. With "Local" turned on, the instance is scaled individually from the center point input, while when local space is turned off, it's more like the transform node, except it scales outward from the center point instead of only from the origin. Differential Revision: https://developer.blender.org/D12681
2021-10-13Geometry Nodes: Translate Instances NodeErik Abrahamsson
Adds a node that can translate instances in the transform space of the modifier object, or the local space of their original transform. One reason to have a special node for instances is that they always have the existing transform, unlike mesh or point cloud points. Differential Revision: https://developer.blender.org/D12679
2021-10-13Geometry Nodes: Material Index, Set MaterialJohnny Matthews
Add Get/Set Nodes for Material Index Rename Assign Material to Set Material Differential Revision: https://developer.blender.org/D12837