Age | Commit message (Collapse) | Author |
|
Wrong type of enum was used for factor mode in rna_nodetree.c
No functional change, thankfully the correct enum had the same value.
|
|
This patch implements the dilate/erode node for the realtime compositor.
Differential Revision: https://developer.blender.org/D15790
Reviewed By: Clement Foucault
|
|
|
|
This patch is a response to T92588 and is implemented
as a Function/Shader node.
This node has support for Float, Vector and Color data types.
For Vector it supports uniform and non-uniform mixing.
For Color it now has the option to remove factor clamping.
It replaces the Mix RGB for Shader and Geometry node trees.
As discussed in T96219, this patch converts existing nodes
in .blend files. The old node is still available in the
Python API but hidden from the menus.
Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht
Maniphest Tasks: T92588
Differential Revision: https://developer.blender.org/D13749
|
|
Those strings were at least partly disambiguated:
- Area
- Zone
- Measurement
- Ease
- BBone Ease In / Out
- Back
- Camera BG image depth
- GP interpolate sequence
- Edge Crease
- Theme
- Jitter
- Brush
- GPencil
- Lens distorsion compositing node
- Cineon color management
- Black
- Gamma
- White
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15791
|
|
|
|
Main motivation is from T54314 where there was no way to read from a
Viewer image datablock after setting another viewer node active.
Part of the problem was addressed in rB16d329da284c (where handlers for
the compositing background job were added so that you can act after the
compositor has run), however there was still the remaining issue that
setting another viewer node active would not properly tag the node
NODE_DO_OUTPUT. This forced users into a complicated workaround (using
switch nodes feeding into a single viewer node).
Now handle NODE_DO_OUTPUT properly in RNA, too, and do proper updates so
that behavior from RNA matches that of the Node Editor when setting a
viewer node active.
ref T54314.
Reviewed By: JacquesLucke
Maniphest Tasks: T54314
Differential Revision: https://developer.blender.org/D15203
|
|
Conflicts:
release/scripts/startup/bl_ui/space_userpref.py
|
|
- Keying (keyframe insertion)
- Roughness (particle children)
- New image, collection, text (in menus)
- Parents (particles)
- Wrap (text)
- Light (add menu)
- Empty (volume add menu)
- Empty (empty add menu)
- Cycles (f-curve modifier)
- Drag (workspace tool type)
- Power (light intensity)
- Power (math nodes)
This last change also moves all math operations in nodes to the
ID_nodetree context. It's needed only for some operations, but we
can't be more granular here.
Also...
- Fix context extraction for interpolation mode headers in F-Curves
and GPencil interpolation operator
- Enable new translation: "Slot %d" in image editor
- Fix an English message in the node editor:
"Replace the input image's alpha channels by..." -> channel
Ref. T43295
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15694
|
|
|
|
This name doesn't require understanding of fields, and
is phrased as an action which is consistent with other nodes.
Discussed in the latest geometry nodes sub-module meeting.
|
|
|
|
This now use default angle precision which matches the sun rotation.
Feeling is much more natural.
|
|
The Nishita sky texture currently only allows moving the sun to the zenith.
The problem is if you want to animate the passing of a full night-day-night
cycle. Currently it's not easy to do due to this limitation.
The patch makes it so users can easily animate the sun moving from sunrise
to sunset by expanding the max sun elevation to go 360° instead of 90°.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13724
|
|
This reverts commit 9bb2afb55e50f9353cfc76cf2d8df7521b0b5feb.
Oops, did not intend to commit this to master.
|
|
This is the start of a geometry node to do edge, vertex, and face
bevels.
It doesn't yet do anything but analyze the "Vertex cap" around
selected vertices for vertex bevel.
|
|
This commit adds new Unwrap and Pack Islands nodes, with equivalent
functionality to the existing Unwrap and Pack Islands operators. The
Unwrap node uses generic boolean attributes to determine seams instead
of looking at the seam flags in the mesh geometry.
Unlike the Unwrap operator, the Unwrap node doesn't perform aspect
ratio correction, because this is trivial for the user to implement
with a Vector Math node if it is desired.
The Unwrap node implicitly performs a Pack Islands operation upon
completion, because the results may not be generally useful otherwise.
This matches the behaviour of the Unwrap operator.
The nodes use the existing Vector socket type, and do not introduce a
new 2D Vector type (see T92765).
Differential Revision: https://developer.blender.org/D14389
|
|
This adds a Mesh To Volume Node T86838 based on the existing modifier.
The mesh to volume conversion is implemented in the geometry module,
and shared between the node and the modifier.
Currently the node outputs a grid with the name "density". This may
change in the future depending on the decisions made in T91668.
The original patch was by Kris (@Metricity), further implementation
by Geramy Loveless (@GeramyLoveless), then finished by Erik Abrahamsson
(@erik85).
Differential Revision: https://developer.blender.org/D10895
|
|
As described in T98943, this commit adds a node that can
evaluate a field on a separate domain in a larger field context.
This is potentially useful in many cases, to avoid relying on
a separate capture attribute node, which can make it easier
to build reusable fields that don't need geometry inputs.
Internally, the node just evaluates the input field in the larger
field context and then uses the generic domain interpolation,
so the code is simple. One future optimization might be using
the input selection to only evaluate part of the input field, but
then the selection has to be interpolated as well, and that might
not always be worth it.
Differential Revision: https://developer.blender.org/D15289
|
|
Refactor the code, and optimize it slightly (no need e.g. to check for
nodes when the nodetree is of a type that cannot have image user nodes).
|
|
This commit ports the "Set Spline Type" node to the new curves type.
Performance should be improved in similar ways to the other refactors
from the conversion task (T95443). Converting to and from Catmull Rom
curves is now supported. There are a few cases where a lot of work can
be skipped: when the number of points doesn't change, and when the
types already match the goal type.
The refactor has a few other explicit goals as well:
- Don't count on initialization of attribute arrays when they are
first allocated.
- Avoid copying the entire data-block when possible.
- Make decisions about which attributes to copy when changing curves
more obvious.
- Use higher-level methods to copy data between curve points.
- Optimize for the common cases of single types and full selections.
- Process selected curves of the same types in the same loop.
The Bezier to NURBS conversion is written by Piotr Makal (@pmakal).
Differential Revision: https://developer.blender.org/D14769
|
|
Add the following macros for enums as support for these features wasn't
all that obvious and there were some inconsistencies in their use.
- RNA_ENUM_ITEM_HEADING(name, description)
- RNA_ENUM_ITEM_SEPR
- RNA_ENUM_ITEM_SEPR_COLUMN
|
|
Differential Revision: https://developer.blender.org/D14878
|
|
This commit makes PointerRNA passed to RNA path API const.
Main change was in the `path` callback for RNA structs, and indirectly
the `getlength` callback of properties.
|
|
Geometry Nodes (new) icon. So far we were using the generic node-tree
icon for geometry nodes, not anymore.
The new icon is composed of 4 spheres that is a reference to the
original pebbles demo. Scattering points was also the turning point for
the project (which originally was focusing on dynamic effects), and to
this day is one of the first steps for everything procedural such as
hair.
Note that the modifier icon is still showing as white in the outliner.
The alternative is to be blue everywhere.
Patch review and feedback by Hans Goudey.
Icon creation in collaboration with Pablo Vazquez.
|
|
Inspired by D12936 and D12929, this patch adds general purpose
"Combine Color" and "Separate Color" nodes to Geometry, Compositor,
Shader and Texture nodes.
- Within Geometry Nodes, it replaces the existing "Combine RGB" and
"Separate RGB" nodes.
- Within Compositor Nodes, it replaces the existing
"Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA"
nodes.
- Within Texture Nodes, it replaces the existing "Combine RGBA" and
"Separate RGBA" nodes.
- Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and
"Separate RGB/HSV" nodes.
Python addons have not been updated to the new nodes yet.
**New shader code**
In node_color.h, color.h and gpu_shader_material_color_util.glsl,
missing methods hsl_to_rgb and rgb_to_hsl are added by directly
converting existing C code. They always produce the same result.
**Old code**
As requested by T96219, old nodes still exist but are not displayed in
the add menu. This means Python scripts can still create them as usual.
Otherwise, versioning replaces the old nodes with the new nodes when
opening .blend files.
Differential Revision: https://developer.blender.org/D14034
|
|
- Fix default_value initialization of custom node tree interface:
This was crashing when adding a custom interface socket to a tree.
The node_socket_set_typeinfo function was called too early, creating a
default float socket, which then doesn't match the socket type after
changing to the custom type.
The node_socket_set_typeinfo only allocates and initializes
default_value when it isn't already set. That is because the function is
used either when creating new sockets or to initialize typeinfo after
loading files. So default_value has to be either null or has to be
matching the current type already.
- Fix RNA flag for string return value of the valid_socket_type callback:
String return values of registerable RNA functions need a
PROP_THICK_WRAP flag since they don't have a fixed buffer to write into.
|
|
Geometry node group inputs and outputs get a new property that controls
the attribute name used for that field input/output when assigning the
node group to a modifier for the first time. If the default name is assigned
to an input, the default "Use attribute name" is true .
In order to properly detect when a node group is first assigned,
the modifier now clears its properties when clearing the node group.
Ref T96707
Differential Revision: https://developer.blender.org/D14761
|
|
Since {rBeae36be372a6b16ee3e76eff0485a47da4f3c230} the distinction
between float and byte colors is more explicit in the ui. So far, geometry
nodes couldn't really deal with byte colors in general. This patch fixes that.
There is still only one color socket, which contains float colors. Conversion
to and from byte colors is done when read from or writing to attributes.
* Support writing to byte color attributes in Store Named Attribute node.
* Support converting to/from byte color in attribute conversion operator.
* Support propagating byte color attributes.
* Add all the implicit conversions from byte colors to the other types.
* Display byte colors as integers in spreadsheet.
Differential Revision: https://developer.blender.org/D14705
|
|
Previously this would silently return `None`.
Now the behavior is similar to when new sockets are added to a node.
|
|
Expose the "Connected" mode from the weld modifier in the
"Merge by Distance" geometry node. This method only merges
vertices along existing edges, but it can be much faster
because it doesn't have to build a KD Tree of all selected
points.
Differential Revision: https://developer.blender.org/D14321
|
|
color attribute system.
This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors. Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.
Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).
Note: this commit does not include vertex paint mode,
which is a separate patch, see:
https://developer.blender.org/D14179
Differential Revision: https://developer.blender.org/D12587
Ref D12587
|
|
`RNA_def_struct_ui_text(srna, ...)` was reused for `is_valid` and `is_muted`
which would set the documentation to theirs (actually to that of the last
call).
`RNA_def_property_ui_text(prop, ...)` should be used for the properties.
|
|
This commit removes the implementations of legacy nodes,
their type definitions, and related code that becomes unused.
Now that we have two releases that included the legacy nodes,
there is not much reason to include them still. Removing the
code means refactoring will be easier, and old code doesn't
have to be tested and maintained.
After this commit, the legacy nodes will be undefined in the UI,
so 3.0 or 3.1 should be used to convert files to the fields system.
The net change is 12184 lines removed!
The tooltip for legacy nodes mentioned that we would remove
them before 4.0, which was purposefully a bit vague to allow
us this flexibility. In a poll in a devtalk post showed that the
majority of people were okay with removing the nodes.
https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199
Differential Revision: https://developer.blender.org/D14353
|
|
This commit adds three nodes:
- `Remove Attribute`: Removes an attribute with the given name
- `Named Attribute`: A field input node
- `Store Named Attribute`: Puts results of a field in a named attribute
They are added behind a new experimental feature flag, because further
development of attribute search and name dependency visualization will
happen as separate steps.
Ref T91742
Differential Revision: https://developer.blender.org/D12685
|
|
This is essentially the same fix as in rB22a341d9d8d3d337f79df228ab2e4e0726f81430.
|
|
Differential Revision: https://developer.blender.org/D14301
|
|
I've had trouble finding this node a few times now,
it's simpler if the file name matches the name in the UI.
|
|
This adds a node which copies part of a geometry a dynamic number
of times.
Different parts of the geometry can be copied differing amounts
of times, controlled by the amount input field. Geometry can also
be ignored by use of the selection input.
The output geometry contains only the copies created by the node.
if the amount input is set to zero, the output geometry will be
empty. The duplicate index output is an integer index with the copy
number of each duplicate.
Differential Revision: https://developer.blender.org/D13701
|
|
This commit renames enums related the "Curve" object type and ID type
to add `_LEGACY` to the end. The idea is to make our aspirations clearer
in the code and to avoid ambiguities between `CURVE` and `CURVES`.
Ref T95355
To summarize for the record, the plans are:
- In the short/medium term, replace the `Curve` object data type with
`Curves`
- In the longer term (no immediate plans), use a proper data block for
3D text and surfaces.
Differential Revision: https://developer.blender.org/D14114
|
|
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
|
|
Added a new "Sharpen Less" kernel to the filter compositor node. The intent here is to provide a much less aggressive sharpening filter that can't simply be solved by toning down the factor on the existing sharpen filter.
The existing "Sharpen" filter uses a "box" kernel:
```
-1 -1 -1
-1 9 -1
-1 -1 -1
```
The new "Sharpen Less" filter uses a "diamond" kernel:
```
0 -1 0
-1 5 -1
0 -1 0
```
The difference between the two is clear to see in the following side-by-side:
{F12847431}
Below shows the difference between the filtering kernels as applied to a B&W render of Suzanne with the UV grid as a texture. The left side of the render using the existing "Sharpen" filter, and the right side showing the new "Sharpen Less" filter. Notice that the left side is more aggressive in accentuating localized contrasts across the image. This can lead to what appears to be aliasing or striations in the resulting image:
{F12847429}
https://developer.blender.org/T95275
https://blender.community/c/rightclickselect/57Kq/?sorting=hot
{F12847428}
Reviewed By: #compositing, jbakker
Differential Revision: https://developer.blender.org/D14019
|
|
The geometry nodes modifier currently always adds a dependency
relation from the evaluated geometry to the object transform. However,
that can be avoided unless there is a collection or object info node in
"Relative" mode.
In order to avoid requiring dependency graph relations updates often
when editing a node tree, this patch doesn't check if the node is muted
or if the data-block sockets are empty before adding the dependency.
Fixes T95265
Differential Revision: https://developer.blender.org/D13973
|
|
Adds two new attribute outputs:
"Line" outputs the line number of the character.
"Pivot Point" outputs the selected pivot point position per char.
Some refactoring of the text layout code.
Differential Revision: https://developer.blender.org/D13694
|
|
Currently the Boolean Math node only has 3 basic logic gates:
AND, OR, and NOT. This commit adds 6 additional logic gates
for convenience and ease of use.
- **Not And (NAND)** returns true when at least one input is false.
- **Nor (NOR)** returns true when both inputs are false.
- **Equal (XNOR)** returns true when both inputs are equal.
- **Not Equal (XOR)** returns true when both inputs are different.
- **Imply (IMPLY)** returns true unless the first input is true and
the second is false.
- **Subtract (NIMPLY)** returns true when the first input is true and
the second is false.
Differential Revision: https://developer.blender.org/D13774
|
|
Currently there are many function declarations in `BKE_node.h` that
don't actually have implementations in blenkernel. This commit moves
the declarations to `NOD_composite.h`, `NOD_texture.h`, and
`NOD_shader.h` instead. This helps to clarify the purpose of the
different modules.
Differential Revision: https://developer.blender.org/D13869
|
|
This patch introduces an extrude node with three modes. The vertex mode
is quite simple, and just attaches new edges to the selected vertices.
The edge mode attaches new faces to the selected edges. The faces mode
extrudes patches of selected faces, or each selected face individually,
depending on the "Individual" boolean input.
The default value of the "Offset" input is the mesh's normals, which
can be scaled with the "Offset Scale" input.
**Attribute Propagation**
Attributes are transferred to the new elements with specific rules.
Attributes will never change domains for interpolations. Generally
boolean attributes are propagated with "or", meaning any connected
"true" value that is mixed in for other types will cause the new value
to be "true" as well. The `"id"` attribute does not have any special
handling currently.
Vertex Mode
- Vertex: Copied values of selected vertices.
- Edge: Averaged values of selected edges. For booleans, edges are
selected if any connected edges are selected.
Edge Mode
- Vertex: Copied values of extruded vertices.
- Connecting edges (vertical): Average values of connected extruded
edges. For booleans, the edges are selected if any connected
extruded edges are selected.
- Duplicate edges: Copied values of selected edges.
- Face: Averaged values of all faces connected to the selected edge.
For booleans, faces are selected if any connected original faces
are selected.
- Corner: Averaged values of corresponding corners in all faces
connected to selected edges. For booleans, corners are selected
if one of those corners are selected.
Face Mode
- Vertex: Copied values of extruded vertices.
- Connecting edges (vertical): Average values of connected selected
edges, not including the edges "on top" of extruded regions.
For booleans, edges are selected when any connected extruded edges
were selected.
- Duplicate edges: Copied values of extruded edges.
- Face: Copied values of the corresponding selected faces.
- Corner: Copied values of corresponding corners in selected faces.
Individual Face Mode
- Vertex: Copied values of extruded vertices.
- Connecting edges (vertical): Average values of the two neighboring
edges on each extruded face. For booleans, edges are selected
when at least one neighbor on the extruded face was selected.
- Duplicate edges: Copied values of extruded edges.
- Face: Copied values of the corresponding selected faces.
- Corner: Copied values of corresponding corners in selected faces.
**Differences from edit mode**
In face mode (non-individual), the behavior can be different than the
extrude tools in edit mode-- this node doesn't handle keeping the back-
faces around in the cases that the edit mode tools do. The planned
"Solidify" node will handle that use case instead. Keeping this node
simpler and faster is preferable at this point, especially because that
sort of "smart" behavior is not that predictable and makes less sense
in a procedural context.
In the future, an "Even Offset" option could be added to this node
hopefully fairly simply. For now it is left out in order to keep
the patch simpler.
**Implementation**
For the implementation, the `Mesh` data structure is used directly
rather than converting to `BMesh` and back like D12224. This optimizes
for large extrusion operations rather than many sequential extrusions.
While this is potentially more verbose, it has some important benefits:
First, there is no conversion to and from `BMesh`. The code only has
to fill arrays and it can do that all at once, making each component of
the algorithm much easier to optimize. It also makes the attribute
interpolation more explicit, and likely faster. Only limited topology
maps must be created in most cases.
While there are some necessary loops and allocations with the size of
the entire mesh, I tried to keep everything I could on the order of the
size of the selection rather than the size of the mesh. In that respect,
the individual faces mode is the best, since there is no topology
information necessary, and the amount of work just depends on the size
of the selection.
Modifying an existing mesh instead of generating a new one was a bit
of a toss-up, but has a few potential benefits:
- Avoids manually copying over attribute data for original elements.
- Avoids some overhead of creating a new mesh.
- Can potentially take advantage of future ammortized mesh growth.
This could be changed easily if it turns out to be the wrong choice.
Differential Revision: https://developer.blender.org/D13709
|
|
This node can scale individual edges and faces. When multiple selected
faces/edges share the same vertices, they are scaled together.
The center and scaling factor is averaged in this case.
For some examples see D13757.
Differential Revision: https://developer.blender.org/D13757
|
|
This adds a new curve primitive to generate arcs.
Radius mode (default): Generates a fixed radius arc on XY plane
with controls for Angle, Sweep and Invert.
Points mode: Generates a three point curve arc from Start to End
via Middle with an Angle Offset and option to invert the arc.
There are also outputs for arc center, radius and normal direction
relative to the Z-axis.
This patch is based on previous patches
D11713 and D13100 from @guitargeek. Thank you.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13640
|
|
This node allows accessing data of other elements in the context geometry.
It is similar to the Transfer Attribute node in Index mode. The main difference
is that this node does not require a geometry input, because the context
is used.
The node can e.g. be used to generalize what the Edge Vertices node is doing.
Instead of only being able to get the position of the vertices of an edge,
any field/attribute can be accessed on the vertices.
Differential Revision: https://developer.blender.org/D13825
|