Age | Commit message (Collapse) | Author |
|
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
|
|
This is a continuation of D13462 to clean up source typos.
Differential Revision: https://developer.blender.org/D13471
|
|
|
|
No functional changes, tests passed and I double checked the nodes by hand.
|
|
The line that sets the factor_prop in graph_slider_ops.c
has been left in the common invoke function by accident.
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D13477
Ref: D13477
|
|
rename percentage_prop to factor_prop
rename remove_ratio to factor
remove "graphkeys" prefix from functions
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D13476
Ref: D13476
|
|
The algorithm used is still quite inefficient, but at least the code
is easier to read and a little bit simpler now.
|
|
|
|
|
|
|
|
Instead of essentially hashing a bool, just use a ternary operator.
Differential Revision: https://developer.blender.org/D13494
|
|
Remove unneeded recent static_cast attempt.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13492
|
|
This improves both code finding, for example "color ramp" now has its own file.
And now each node has its own namespace so function names can be simplified
similar to rBfab39440e94
This commit also makes all file names use snake case instead of camel case.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13482
|
|
The `Map::items()` iterator does not return references.
|
|
|
|
This flag is currently only used for vector sockets
so the function is limited to the vector builder.
The flag is only used by two shader nodes at the moment
and this is needed to port them over to the new socket declaration API.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D13490
|
|
Most of our field inputs are currently specific to geometry. This patch introduces
a new `GeometryFieldInput` that reduces the overhead of adding new geometry
field input.
Differential Revision: https://developer.blender.org/D13489
|
|
Creates 4 new nodes which provide topology information
for the mesh. Values are interpolated from the primary
domain in each case using basic attribute interpolation.
Vertex Neighbors
- Vertex Count
- Face Count
Face Neighbors
- Vertex Count
- Neighboring Face Count
Edge Vertices
- Vertex Index 1
- Vertex Index 2
- Position 1
- Position 2
Face Area
- Face Area
Differential Revision: https://developer.blender.org/D13343
|
|
The resample node didn't handle the case of when a spline didn't have
any evaluated points. For poly and Bezier splines we should never hit
this case, but it is expected when the number of NURBS control points
is smaller than its order, so we have to handle the case here.
It's not that obvious what to do in this case, there are a few options:
- Remove the bad splines from the result
- Generate empty splines for those inputs
- Skip resampling the bad splines, copy them to the result
- Arbitrarily generate single point splines
I chose option three, just skipping the "bad" splines. Since the node
already has a selection input, this can be described by just extending
that. "Splines with no evaluated points are implicitly deselected."
The first option would probably be valid too though.
Differential Revision: https://developer.blender.org/D13434
|
|
This commit adds the shader socket type to the new socket builder api.
As a test, this commit also converts the Add Shader node to the new API
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D13485
|
|
- 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
|
|
Asset indexing should be disabled, but this was overlooked in the
asset list (used for the pose library in the 3D View).
|
|
Use fixed-length string to convert `char[2]` to `std::string`. Otherwise
`strlen()` is called, which is problematic as the `char[2]` is not
zero-terminated.
|
|
This technique isn't really necessary anymore, because unity builds
avoid instantiating the same template too many times already.
|
|
Decrease threshold for drawing thumbnails.
This was unintended change in daaa43232d34 that was overlooked.
|
|
Set `ibuf->planes` to `R_IMF_PLANES_RGBA` because mask modifier adds
transparent areas to image.
|
|
Earlier code assumed that the active strip was on the active track. This
commit detects when this assumption doesn't hold, and adds a more thorough
search of the active strip.
|
|
Caused by {rB3b6ee8cee708}
Above commit was trying to get the vertexgroup from the mesh that is
passed into `deformVertsEM` (but that can be NULL).
When can it be NULL, when is is non-NULL?
`editbmesh_calc_modifiers` only passes in a non-NULL mesh to
`deformVertsEM` under certain conditions:
- a non-deform-only modifier is handled currently
- a non-deform-only modifier preceeds the current modifier
- a deform-only modifier preceeds the current modifier (and the current
one depends on normals)
So the passed-in mesh cannot be relied on, now get the vertex group from
the context object data (like it was before the culprit commit).
Related commit: rB8f22feefbc20
Maniphest Tasks: T93611
Differential Revision: https://developer.blender.org/D13487
|
|
No longer needed now that all code uses that new
BKE_blendfile_link_append module, and that instantiation code in
BLO_readfile has been removed.
|
|
`ED_view3d_win_to_3d_on_plane` does not use the `clip_start` and
`clip_end` values of the scene, so the `do_clip` option can be misleading
especially in the orthographic view where the `clip_start` is negative.
For now, don't use the `do_clip` option in orthographic view.
|
|
`g_data_intern.state_default.gzgrp_type` is a very specific member and
cannot be set to default.
|
|
Follow up on rB1df8abff257030ba79bc23dc321f35494f4d91c5
This puts all static functions in geometry node files into a new
namespace. This allows using unity build which can improve
compile times significantly
- The namespace name is derived from the file name.
That makes it possible to write some tooling that checks the names later on.
The filename extension (cc) is added to the namespace name as well.
This also possibly simplifies tooling but also makes it more obvious that this namespace is specific to a file.
- In the register function of every node, I added a namespace alias namespace `file_ns = blender::nodes::node_shader_*_cc`;.
This avoids some duplication of the file name and may also simplify tooling, because this line is easy to detect.
The name `file_ns` stands for "file namespace" and also indicates that this namespace corresponds to the current file.
In the future some nodes will be split up to separate files and given their own namespace
This will allow function names to be simplified similar to rBfab39440e94
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13480
|
|
|
|
As a followup to 338c1060d5d7, apply the same change to the node
drawing callback. This helps to simplify code when the complexity
of a callback isn't necessary right now.
|
|
Currently there are a few callbacks on `bNodeType` that do the same
thing for every node type except reroutes and frame nodes. Having a
callback for basic things complicates code and makes it harder to
understand, and reroutes and frames are special cases in larger way.
Arguably frame nodes shouldn't even be drawn like regular nodes,
given that it adds a case of O(N^2) looping through all nodes.
"Unrolling" the callbacks makes it easier to see what's happening,
and therefore easier to optimize.
Differential Revision: https://developer.blender.org/D13463
|
|
This change follows up on recent c --> c++ conversions
|
|
Fixes compilation errors after rBd5efda72f501
Re sorted some includes.
|
|
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
|
|
`GeometrySet` contains at most one component of each type.
Previously, a map was used to make sure that each component
type only exists once. The overhead of a map (especially with
inline storage) is rather large though. Since all component types
are known at compile time and the number of types is low,
a simple `std::array` works as well.
Some benefits of using `std::array` here:
* Looking up the component of a specific type is a bit faster.
* The size of `GeometrySet` becomes much smaller from 192 to 40 bytes.
* Debugging a `GeometrySet` in many tools becomes simpler because
one can easily see which components exists and which don't
|
|
The problem is that `current_mask` can become `selection.size()`.
The loop could also be refactored to break out of it when the end
of the selection is reached. This can be done separately.
|
|
This patch leaves a out a few nodes:
- Group Nodes
- Image input node
- File output node
- Switch View
- Cryptomatte
These nodes above are a bit more complicated and should be worked on individually.
Differential Revision: https://developer.blender.org/D13266
|
|
This patch extracts the modal functions from GRAPH_OT_decimate
and makes them generic so they can be reused by future operators
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9326
Ref: D9326
|
|
|
|
This helps to tell when a pointer is expected to be null, and avoid
overly verbose code when dereferencing. This commit also includes
a few other cleanups in this area:
- Use const in a few places
- Use `float2` instead of `float[2]`
- Remove some unnecessary includes and old code
The change can be continued further in the future.
|
|
This is very old and is unlikely to be useful in the near future.
|
|
Also remove some unnecessary includes
|
|
|
|
|
|
`IMB_transform` is used in VSE. It had a required crop parameter
for cropping the source buffer. This is not always needed.
In the image engine we want to use the use the `IMB_transform`
with wrap repeat. Both options are mutual exclusive and due
to performance reasons the wrap repeat is only available when
performing a nearest interpolation.
|
|
Some minor improvements to doc-strings too.
Ref T92709
|