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
2021-08-20Functions: remove multi-function networkJacques Lucke
The multi-function network system was able to compose multiple multi-functions into a new one and to evaluate that efficiently. This functionality was heavily used by the particle nodes prototype a year ago. However, since then we only used multi-functions without the need to compose them in geometry nodes. The upcoming "fields" in geometry nodes will need a way to compose multi-functions again. Unfortunately, the code removed in this commit was not ideal for this different kind of function composition. I've been working on an alternative that will be added separately when it becomes needed. I've had to update all the function nodes, because their interface depended on the multi-function network data structure a bit. The actual multi-function implementations are still the same though.
2021-08-20Cleanup: remove duplicate lineJacques Lucke
2021-08-19Cleanup: correction to unused warning removalCampbell Barton
This broke building without opensubdiv
2021-08-19Cleanup: unused warningCampbell Barton
2021-08-18Geometry Nodes: Add shader Color Mix nodeCharlie Jolly
Port color mix shader node to Geometry Nodes. Differential Revision: https://developer.blender.org/D10585
2021-08-17Cleanup: clang-formatCampbell Barton
2021-08-16Geometry Nodes: Add UV Smooth, Boundary Smooth options to subdivision nodeEitan
Replaces the boolean option with enum menus for consistency with the subdivision modifier (rB66151b5de3ff,rB3d3b6d94e6e). Adds all UV interpolation options. Original patch by Eitan. Updated by Himanshi Kalra <calra>. {F9883204} Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D10417
2021-08-14Cleanup: Variable names, formatting, reduce indentationHans Goudey
2021-08-11Fix T88033: Python reference memory leaks for non main data-blocksCampbell Barton
ID data-blocks that could be accessed from Python and weren't freed using BKE_id_free_ex did not release the Python reference count. Add BKE_libblock_free_data_py function to clear the Python reference in this case. Add asserts to ensure no Python reference is held in situations when ID's are copied for internal use (not exposed through the RNA API), to ensure these kinds of leaks don't go by unnoticed again.
2021-08-10Geometry Nodes: Add labels for switch node texture socketsWannes Malfait
This makes texture sockets have a label by default. This can be changed by adding the SOCK_HIDE_LABEL flag to the socket. With this change the switch node now shows the labels "True" and "False" like for the other types of sockets.
2021-08-09Fix T90547: Add node errors when compiled without OpenVDB or BulletHans Goudey
These were added in other places but were overlooked here.
2021-08-06Geometry Nodes: Select by Handle Type NodeHans Goudey
Just like the "Select by Material" node, this node outputs a boolean attribute for control points that have a matching handle type. By default left and right handles are considered, but it's possible to only check one side with the toggle in the node. Differential Revision: https://developer.blender.org/D12135
2021-08-06Fix: Avoid floating point error in some mesh primitive nodesMattias Fredriksson
Some mesh primitives created using geometry nodes use loops to create vertices and accumulates positions/angles in FP variables. This allows rounding errors to accumulate and can introduce significant errors. To minimize changes from original implementation, variables allowing errors to accumulate are replaced by: delta * index. Affected Mesh Primitives nodes are Line, Grid, Cylinder, Circle, Cone, and UV-Sphere. Differential Revision: https://developer.blender.org/D12136
2021-08-05Geometry Nodes: Add more warnings for out of bounds parametersEitan
Add warning(info) to nodes that don't work when an input value is out of range. For example, the grid node doesn't work with Vertices X or Verices Y less than 2. These are purposefully added as "Info" warnings, because they don't show in the modifier and they aren't printed to the terminal. Differential Revision: https://developer.blender.org/D11923
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-05Cleanup: license headersCampbell Barton
These were removed globally in 65ec7ec524e667ec95ce947a95f6273088dffee6. Some files re-introduced these conventions since.
2021-08-04Fix T87635: Rename shader node "Specular" to "Specular BSDF"Pratik Borhade
Node name edited in Specular node definition Reviewed By: fclem Maniphest Tasks: T87635 Differential Revision: https://developer.blender.org/D11022
2021-08-04Geometry Nodes: Curve Set Spline TypeJohnny Matthews
This node sets the selected (or all) splines in curve to a chosen target spline type. Poly, Bezier, and NURB splines can be converted to any of the other types. This is meant to be a building block node, useful in many procedural situations. In the future the node could be optimized with multi-threading, or by avoiding copying in many cases, either by retrieving the curve for write access or by passing the raw vectors to the new splines where possible. With edits from Hans Goudey (@HooglyBoogly) Differential Revision: https://developer.blender.org/D12013
2021-08-02Mesh: Tag normals dirty instead of calculatingHans Goudey
Because mesh vertex and face normals are just derived data, they can be calculated lazily instead of eagerly. Often normal calculation is a relatively expensive task, and the calculation is often redundant if the mesh is deformed afterwards anyway. Instead, normals should be calculated only when they are needed. This commit moves in that direction by adding a new function to tag a mesh's normals dirty and replacing normal calculation with it in some places. Differential Revision: https://developer.blender.org/D12107
2021-08-02Cleanup: separate base and geometry nodes specific socket cpp typeJacques Lucke
This simplifies changing how geometry nodes handles different socket types without affecting other systems.
2021-08-01Cleanup: Sort node types alphabeticallyHans Goudey
2021-07-31Cleanup: Remove unecessary helper functionHans Goudey
Retrieving a mesh's looptris now take's a const mesh after rB5f8969bb4b4, which removes the need for this function. Since it's only two lines, avoiding the use of a separate function in this case is simpler.
2021-07-30Cleanup: headers, use 'pragma once', remove argument to '\file'Campbell Barton
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-27Geometry Nodes: Add node labels to Attribute maths nodesCharlie Jolly
This adds the operator name to the node label which is consistent with the shading nodes. The vector node has `Vector` as a prefix. The Attribute nodes already have a different coloured header. The same label is used when collapsing nodes, this helps readability. Reviewed By: pablovazquez Differential Revision: https://developer.blender.org/D10749
2021-07-26Cleanup: missed comment in D12029Charlie Jolly
No functional change.
2021-07-26Geometry Nodes: Fix vector math project bugCharlie Jolly
Implementation is incorrect compared to Cycles/Eevee. Reported by @DrDubosc in comments of T88922. Differential Revision: https://developer.blender.org/D12029
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-23Geometry Nodes: Display Node Warnings in ModifierHans Goudey
With this commit, node warnings added to nodes during evaluation (not "Info" warnings) will also draw in the modifier. In the future there could be a "search for this node" button as well. Differential Revision: https://developer.blender.org/D11983
2021-07-23Fix: "Bake" automatically calculated handles in set handle nodeHans Goudey
Because these handles are calculated lazily, we need to make sure they are calculated before switching to a manually positioned mode. I doubt it would ever be necessary, but theoretically this could happen on a per-point level, to avoid calculating handles not in the selection.
2021-07-22Geometry Nodes: Set Bezier Handle Type NodeJohnny Matthews
This node takes a curve and a point selection and allows you to set the specified (or all) points left/right or both handles to a given type. Differential Revision: https://developer.blender.org/D11992
2021-07-21Fix T89881: ignore unavailable sockets when searching for link cyclesJacques Lucke
2021-07-21Cleanup: replace NB with NOTE in commentsCampbell Barton
2021-07-20Fix T89827: Attribute transfer node crash on mesh with no facesHans Goudey
Just add a check for whether the mesh has faces when retrieving an attribute on the corner domain. In the future there could be an info message in the node in this case, since maybe it's not intuitive.
2021-07-20Fix T89687: Curve to mesh node incorrect face orientationHans Goudey
The new faces should have a winding direction that points them outward, the fix was swapping the order of each face's edge and vertex indices.
2021-07-20Cleanup: Use const arguments and less sequential iterationHans Goudey
Using const indexes and offsets helps to make the logic less sequential, which is hopefully easier to understand and possibly easier to parallelize in the future. Also order return arguments last.
2021-07-20Fix: Bezier segment node adds handles incorrectlyJohnny Matthews
This caused the "cyclic" attribute to appear dysfunctional.
2021-07-20Cleanup: reserve C++ comments for disabled codeCampbell Barton
Use C comments for plain text.
2021-07-20Cleanup: spellingCampbell Barton
2021-07-19Fix: memcpy overlapping region ASAN warning in curve trim nodeHans Goudey
2021-07-19Cleanup: Make curve trim node code more semantically correctHans Goudey
The code used `Spline::LookupResult` in a way that referred to evaluated points and control points interchangeably. That didn't affect the logic, but the code became harder to read. Instead, introduce a local struct to contain the data in a more obvious way.
2021-07-18Geometry Nodes: Curve Trim NodeAngus Stanton
This node implements shortening each spline in the curve based on either a length from the start of each spline, or a factor of the total length of each spline, similar to the "Start & End Mapping" panel of curve properties. For Bezier curves, the first and last control points are adjusted to maintain the shape of the curve, but NURB splines are currently implicitly converted to poly splines. The node is implemented to avoid copying where possible, so it outputs a changed version of the input curve rather than a new one. Differential Revision: https://developer.blender.org/D11901
2021-07-15Fix T49944: Compositor ID Mask Anti-Aliasing not workingAidan Haile
Replaces current ID Mask node Anti-Aliasing operation by SMAA operations with default settings as proposed by Jeroen Bakker. SMAA produces smoother edges. Reviewed By: manzanilla Differential Revision: https://developer.blender.org/D11881
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-15Cleanup: ensure one newline at end of file, strip trailing spaceCampbell Barton
2021-07-14Bezier Spline: Add a more generalized insertion utilityHans Goudey
This logic is from the curve sundivide node, used to add points with proper handles in between two existing points. However, the same logic is used for trimming of Bezier splines, and possibly interactive point insertion in the future, so it's helpful as a general utility. The logic is converted to depend on a bezier spline instead of being static. A temporary segment spline can be used for the latter use case.
2021-07-14Fix T89851: Geometry nodes: wrongly detected "Node group has unidentifiedPhilipp Oeser
nodes or sockets" error rBfe22635bf664 introduced a utility to check for this (but it was always returning true). This wasnt a problem in master (since it is unused there), but in the 2.93 branch, this utility is actually used and the error results in all geometry nodetrees to appear with the "Node group has unidentified nodes or sockets" message (and being unusable). Now return false in has_undefined_nodes_or_sockets if all nodes and sockets have been successfully checked. This commit then needs to end up in the 2.93 branch. Maniphest Tasks: T89851 Differential Revision: https://developer.blender.org/D11911
2021-07-14Geometry Nodes: initial socket inspectionJacques Lucke
Socket inspection helps with debugging a geometry node group. Now, when hovering over a socket, a tooltip will appear that provides information about the data in the socket. Note, socket inspection only works for sockets that have been computed already. Nodes that are not connected to an output are not computed. Future improvements can include ui changes to make the tooltip look more like in the original design (T85251). Furthermore, additional information could be shown if necessary. Differential Revision: https://developer.blender.org/D11842
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-13Cleanup: Use C++ float3 type, use prefix for return argumentHans Goudey