Age | Commit message (Collapse) | Author |
|
Support a way to temporarily override the context from Python.
- Added method `Context.temp_override` context manager.
- Special support for windowing variables "window", "area" and "region",
other context members such as "active_object".
- Nesting context overrides is supported.
- Previous windowing members are restored when the context exists unless
they have been removed.
- Overriding context members by passing a dictionary into operators in
`bpy.ops` has been deprecated and warns when used.
This allows the window in a newly loaded file to be used, see: T92464
Reviewed by: mont29
Ref D13126
|
|
These functions can be used with PyArg_ParseTupleAndKeywords
(and related functions) to take typed RNA arguments without
having to extract and type-check them separately.
No functional changes, extracted from D13126.
|
|
|
|
|
|
|
|
There's a small typo in the tool tip for applying the Parent Inverse. This patch fixes that typo
old:
{F13010751}
new:
{F13010749}
Reviewed By: Blendify
Maniphest Tasks: T97437
Differential Revision: https://developer.blender.org/D14693
|
|
This is mostly a cleanup to avoid hardcoding the eager calculation of
normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals`
and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh
is newly created and already has dirty normals anyway. This reduces
boilerplate code and makes the "dirty by default" state more clear.
Any regressions from this commit should be easy to fix, though the
lazy calculation is solid enough that none are expected.
|
|
Normals are not read from files anymore, calculating them in versioning
is unnecessary and wasteful.
|
|
The node does have support for curves since c4f7f59c659f7d986e.
|
|
|
|
|
|
This uses refcounter instead of double thread mutexes. This should be
more robust and avoir use after free situation.
Also remove redundant structures and the use of scene as the job owner.
|
|
This reverts commit de3b10abb66b1fe341df133986c2dd51a02daa88.
|
|
Previous method consisted on using another thread and another GL context
to compile in a non blocking way. However this proved to not be a huge
gain and was even making some implementation buggy.
Trying to revert back to a more simplistic approach where we only compile
a handfull of shaders per redraw untill we empty a time budget for shader
compilation.
This approach provides more updates during the compilation process and
avoids all the complexity added by the threading system.
This might be a downside because interleaving many redraw with
compilations could theoreticaly lead to longer wait time until scene wide
compilation is finished. But this still has to be measured.
|
|
|
|
|
|
This adds support for rendering motion blur for volumes, using their
velocity field. This works for fluid simulations and imported VDB
volumes. For the latter, the name of the velocity field can be set per
volume object, with automatic detection of velocity fields that are
split into 3 scalar grids.
A new parameter is also added to scale velocity for more artistic control.
Like for Alembic and USD caches, a parameter to set the unit of time in
which the velocity vectors are expressed is also added. For Blender gas
simulations, the velocity unit should always be in seconds, so this is
only exposed for volume objects which may come from external OpenVDB
files.
These parameters are available under the `Render` panels for the fluid
domain and the volume object data properties respectively.
Credits: kernel advection code from Tangent Animation's Blackbird based
on earlier work by Geraldine Chua
Differential Revision: https://developer.blender.org/D14629
|
|
|
|
The fix ensures that the reference count for `IShellItem *pSI` is decremented,
preventing a memory leak. For `IFileOperation *pfo` the decrement of the
reference count is only attempted when `CoCreateInstance` is successful.
Additionally, the gotos have been replaced with nested if/else statements.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D14681
|
|
Since shader sources are now parsed on demand via `GPUShaderCreateInfo`,
sources are not available to be read via
`GPU_shader_get_builtin_shader_code`.
Currently this results in a crash as the code tries to read `NULL`
pointers.
`GPU_shader_get_builtin_shader_code` was created with the intention of
informing the user how a builtin shader works, thus "replacing"
detailed documentation.
Therefore this function doesn't really have a practical use in an addon.
So, instead of updating the function (which would require several
changes to the gpu module), remove it and improve the documentation.
Release Notes: https://wiki.blender.org/wiki/Reference/Release_Notes/3.2/Python_API#Breaking_Changes
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D14678
|
|
|
|
Noted as part of T94775 investigation by Wayde Moss (@GuiltyGhost),
thanks!
NOTE: this mistake probably did not have any pratical impact in current
code, at least for overrides.
|
|
|
|
This is a fix for the 3d texturing brush.
|
|
|
|
This is to make the codegen and shading nodes object type agnostic. This
is essential for flexibility of the engine to use the nodetree as it see
fits.
The essential volume attributes struct properties are moved to the
`GPUMaterialAttribute` which see its final input name set on creation.
The binding process is centralized into `draw_volume.cc` to avoid
duplicating the code between multiple engines. It mimics the hair attributes
process.
Volume object grid transforms and other per object uniforms are packed into
one UBO per object. The grid transform is now based on object which simplify
the matrix preparations.
This also gets rid of the double transforms and use object info orco factors
for volume objects.
Tagging @brecht because he did the initial implementation of Volume Grids.
|
|
Improve debugging experience.
|
|
|
|
This code was duplicated in multiple engines. Now it is the draw manager
responsability to manage the throwaway fluid textures.
|
|
Noticed while looking into oneAPI patch.
Seems to be unused, without clear indication why/when it might be
needed. Removing the function simplifies adding the new backend.
Differential Revision: https://developer.blender.org/D14652
|
|
|
|
|
|
Continuing the refactors described in T93602, this commit moves
the face dot tag set by the subdivision surface modifier out of
`MVert` to `MeshRuntime`. This clarifies its status as runtime data
and allows further refactoring of mesh positions in the future.
Before, `BKE_modifiers_uses_subsurf_facedots` was used to check
whether subsurf face dots should be drawn, but now we can just check
if the tags exist on the mesh. Modifiers that create new new geometry
or modify topology will already remove the array by clearing mesh
runtime data.
Differential Revision: https://developer.blender.org/D14680
|
|
The following methods weren't included in API docs.
- BlendDataLibraries.load
- BlendDataLibraries.write
- Text.region_as_string
- Text.region_from_string
|
|
|
|
This doesn't cause any functional change as the RNA property
of Bone wasn't overridden by the _GenericBone's property,
however the `children` property was documented twice, causing a warning.
|
|
Literal text from examples could be included directly after function
arguments, this caused a warning with mis-matching indentation.
|
|
|
|
The UI description for the `bpy.types.ActionFCurves.remove` was incorrect;
seemingly a copy-paste typo from the `rna_Action_groups_remove` function.
Reviewed By: sybren, Blendify
Differential Revision: https://developer.blender.org/D14659
|
|
Error in 5da02548e99ac67338cbdf2a5088261408f5e7bf
|
|
The `BMEditMesh` pointer is the same in the original or evaluated mesh.
Also a clang-format was missed.
|
|
In some cases, selected elements do not contribute to snapping.
So ignore these elements when creating the edit meshes bound box.
|
|
Meshes without loops are still valid for snapping.
|
|
Preserve multi socket link order when copying nodes or adding a new
group input sockets by linking directly to multi inputs from the group
input node's extension socket.
This is done by also copying the `multi_input_socket_index` when
the new links are created by copying existing or temporary links.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D14535
|
|
|
|
This allows using C++ only APIs/data structures, and potentially
simplifies adding support to apply modifiers for the Curves object.
|
|
- Inconsistent parameter names
- Else after return
- Braces around statements
- Qualified auto
- Also (not clang tidy): Pass StringRef by value, unused parameter
|
|
In preparation of upcoming SDL upgrade, which uses these.
|
|
|
|
Keep the existing Rec.709 fit and convert to other colorspace if needed, it
seems accurate enough in practice, and keeps the same performance for the
default case.
|