Age | Commit message (Collapse) | Author |
|
Issue is that external engine uses the gpu info. but overwrote the
instance data. The draw manager would then detect instance data and
required the engine type to have a instance free callback.
The solution is to save some space in the engine data to hold an empty
and unused instance_data attribute to comply with `ViewportEngineData`
struct.
|
|
In the original design draw engines had to copy with a limitation that
they were not allowed to reuse complex data structures between drawing
calls. Data that could be reused were limited to:
- GPUFramebuffers
- GPUTextures
- Memory that could be removed calling MEM_freeN (storage list)
- DRWPass
This is fine when the storage list contains arrays or structs but when
more complex data types (vectors, maps) etc wasn't possible.
This patch adds instance_data that can be reused between drawing calls.
The instance_data is controlled by the draw engine and doesn't need to
be limited as described above.
When an engines stores instance_data it must implement the
`DrawEngineType.instance_free` callback to free the data.
The patch originates from eevee rewrite. But was added to master as the
image engine rewrite also has a need for it.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13425
|
|
Dirty regions when painting are not using rcti. Meaning less
understandable code. Found issue when refactoring the image_gpu partial
update. In a future change gpu partial update API will be using rcti
also what makes the code even cleaner.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D13260
|
|
|
|
No longer needed as the temporary directory is cleared on exit.
|
|
Add note at the beginning & end so it's not overlooked.
|
|
|
|
|
|
|
|
|
|
- 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
|
|
Source typos corrected
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D13462
|
|
Fixes T93773
|
|
|
|
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.
|
|
Fix typos in the variables of the Xxf86vm libray to fix link failure
with bfd. These variables are defined in platform_unix.cmake.
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D12911
|
|
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.
|