2a56403cb0 changed the way bevel weights are stored in 4.0.
Add versioning for reading the new files that replaces the new generic
attributes with the old non-generic custom data layers. The code is
paranoid with lots fo checks I expect will typically not be necessary.
For emitter particle systems, these were never rendered anyways, Path is
kept for hair systems of course.
As a consequence, the new default for particle systems is:
- render as None (users have to explicitly set this to object/
collection)
- display as point
When changing to Hair type, this automatically gets set back to
- render as Path
- display as Render
Changing back to emitter, will use points as display again (and render
as None -- same here, users have to explicitly set this to object/
collection)
Not sure if this is still for 3.6, patch is for 4.0 for now.
"Fixes" #80197
Pull Request: https://projects.blender.org/blender/blender/pulls/108231
The code which was preventing this originated to an early days of the
light linking project where bits accumulation was done as part of the
graph evaluation. Since then it was changed to be pre-calculated at
the graph build time.
The updates of the receivers is ensured via the HIERARCHY nodes and
relations between them.
Also made it explicit that the emitter is updated with the tag of
the collection: before it was relying on implicit Copy-on-Write
component tag.
Pull Request: https://projects.blender.org/blender/blender/pulls/108425
Small correction to word selection in Console. Start and end of
selection were in incorrect order so it displayed correctly but
did not copy to clipboard as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/108434
A missing `CONSTRAINT_OFF` check in `transform_convert.c` causes the
inverse matrix of that constraint to be added on top of the translation,
causing weird translation response in the viewport. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/108217
* Fix image rendering.
* Fix AOV rendering.
* Merge all render passes and AOV textures into 2 arrays (one for colors and one for values).
* Make AOVsInfoData std140 compliant.
* Remove surface color from Diffuse Light and Specular Light passes.
* Add Environment pass support.
* Add Shadow pass support.
Pull Request: https://projects.blender.org/blender/blender/pulls/108239
MakesRNA uses WITH_VULKAN_BACKEND, but it wasn't included in the
CMakeLists.txt. Also added WITH_METAL_BACKEND. Metal is currently
included as a global compilation directive. We might want to sanitize
that according in a different patch.
This PR makes sure that Vulkan backend can be selected via the PythonAPI.
Note that the changes to user preference UI isn't added to this patch as
the Vulkan backend isn't usable to end users.
`bpy.context.preferences.system.gpu_backend = 'VULKAN' should now be
possible. After saving the user preference and restarting Blender it should
initialize the Vulkan backend.
Pull Request: https://projects.blender.org/blender/blender/pulls/108414
When a descriptor pool cannot allocate a descriptor set in stead
of resulting `VK_ERROR_OUT_OF_POOL_MEMORY` it is adviced that
drivers will return `VK_ERROR_FRAGMENTED_POOL`.
Before this PR the Vulkan Backend crashed as it only checked the
out of pool memory. According to the Vulkan specification it is
adviced to driver developers to report fragmented pool.
The crash happened as no new pool was allocated and no descriptor
set could be allocated anymore.
This change improved the reliability of the vulkan backend to be
able draw an animation in the 3d viewport for half an hour without
crashing. Before this change Blender would crash in a few seconds.
Pull Request: https://projects.blender.org/blender/blender/pulls/108416
This PR adds the ability to only read back an area of a framebuffer
texture. It also adds the ability to read back from the depth
attachment.
Also reduces the amount of needed memory and reduces the CPU cycles
by reading back directly into the memory provided by the user. The
previous implementation wasn't able to do so as the `VKTexture::read`
function always returned a new buffer. The introduced
`VKTexture::read_sub` works on a pre-allocated buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/108418
Current implementation of the Color Blend State worked for framebuffers
with a single attachment. This PR adds support for Color Blend State for
multiple attachments. It is assumed that the Blend State is the same for
all attachments.
NOTE: Integer based attachments aren't yet supported. In OpenGL it is
assumed that Integer based attachments aren't blended. It is currently
to early to tell if this is also the case for Vulkan. If this assumption
is incorrect we should use multi blend state.
Pull Request: https://projects.blender.org/blender/blender/pulls/108419
This PR adds support for restart indices. Restart indices are for
example used during hair rendering where an index buffer contains
multiple hair strands. When in the index buffer a restart index is
added, a new line will start, instead of continuing extending the
previous line.
Pull Request: https://projects.blender.org/blender/blender/pulls/108421
Baking simulations for an object with more than one geonodes modifier
creates cache folders for _all_ modifiers, even if some of them do not
actually have simulation zones. The simulations zones also don't need to
be connected to the output to generate cache folders.
This patch restricts cache folder generation to modifiers which actually
have simulation zones and use them.
Extra cache folders were created because executed modifiers were only
checking if a simulation state exists and not whether it contains actual
zone data (`sim_state->zone_states_.is_empty()`). The modifiers are
always executed if the object is evaluated by the depsgraph, which
happens if _any_ of the modifiers is time-dependent. Time dependency in
turn is enabled if a simulation zone exists in the tree, regardless of
whether it is used.
Checking for zone states in the cache output during baking lets us
decide if a cache folder is needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/108278
Adds the initial stage for the grease pencil 3.0 project.
This patch includes:
* New ID and new object type.
* New DNA structures.
* New drawing engine for grease pencil (gpencil-next).
* Tests for the new grease pencil data-type.
* A few operators for conversion, switching modes and (simple) drawing.
Exposed to the user:
* An experimental option to switch to the new grease pencil.
* This will switch the grease pencil render engine to gpencil-next which can only render the new object type.
Current grease pencil objects will no longer render.
* Changing this option currently requires a restart of blender (for the keymap to update).
* A conversion setting in the `Object` > `Convert To` operator.
* A drawing operator in `Draw Mode`.
Pull Request: https://projects.blender.org/blender/blender/pulls/106848
The library is used by OBJ/PLY exporters, and asset_catalog_tree_view.
Performance of OBJ/PLY export seems to be the same. Blender executable
gets a tiny bit smaller (-5kb) on windows.
- Pasting a material would free the materials local node-tree,
leaving it in the depsgraph which would then tag the freed ID
(from deg_graph_clear_id_recalc_flags).
- texpaintslot, gp_style pointers were copied into the clipboard without
being cleared or duplicated, allowing for freed memory access later on.
- A shallow copy from the cliboard into the material could also cause
these pointers to be overwritten and leak memory.
Resolve by calling material_free_data before performing a shallow copy
and adding material_clear_data which ensures these pointers aren't
copied into the clipboard.
Commented [0] (2.5x refactor that disabled many free functions),
for some reason this call was never re-enabled.
Add back the free call along with other clipboard buffers.
[0]: a1c8543f2a
When a file passed in from the command line failed to load,
blender would exit & save the quit.blend.
Resolve by adding a `do_user_exit_actions` to WM_exit_ex which is
false in backgrounds mode or when an error has occurred.
Callers to WM_exit needed to set G.is_break for a predictable exit-code.
This is error prone as G.is_break may be set based on the user having
pressed escape during event handling.
Instead, pass the exit code as an argument.
WM_exit calls `exit(G.is_break == true)` which only makes sense in
background mode, pressing escape sets `is_break` which isn't cleared,
causing an error exit-code of 1 on exit.
This would print whenever 'bpy' was imported, because in this case
Blender's Python integration loads all modules immediately because it
can't import modules as needed via the inittab mechanism.
Also correct code-comments for why inittab can't be used.
Own regression caused by [0] made to ensure the string was initialized,
without accounting for it being static & reused between calls.
Replace static variables with a struct that's passed to the function,
this explicitly shares state between calls as this static variable use
depended on BKE_scene_multiview_view_prefix_get always clearing prefix
variables with a zero view_id so future calls would also be cleared.
While this non-obvious behavior could be documented,
use more straightforward logic.
[0]: bdad2c0595