Age | Commit message (Collapse) | Author |
|
If making liboverride of an empty collection, this (root of override
hierarchy) collection would get untagged in code when checking for
collections that do not need to be overridden, leading to not overriding
this root collection, and later in code to using NULL pointer.
|
|
The problem is that depsgraph evaluation happens before the OpenGL context
is initialized, and so modifier evaluation happens without GPU subdivision.
Later the BKE_subsurf_modifier_can_do_gpu_subdiv test in the draw code gives
a different result.
This just checks if the mesh has information for GPU subdivision in the draw
code, and if so uses it. This is only set if the test for supported GPU
subdivision passes in the modifier evaluation.
Additionally it may be good to perform OpenGL context initialization earlier
so background render can take advantage of GPU subdivision, but this is more
complicated.
Differential Revision: https://developer.blender.org/D14969
|
|
Moving Text.as_string() from Python to C [0] added an extra new-line
causing a round-trip from_string/to_string to add a new-line,
this also broke the undo test `test_undo.text_editor_simple` in
`../lib/tests/ui_simulate/run.py`.
[0]: 231eac160ee394d41c84e0cc36845facb7594ba5
|
|
The 'OVERRIDE_HIDDEN' extra collection would often be mistakenly added
to a linked collection, which is totally forbidden and guaranteed to
crash on undo/redo.
Reworked the code instantiating that extra collection in a more generic
and hopefully robust way now.
|
|
|
|
We really need to fix how unprojected radius (scene unit) works.
What happened is the paint code updates the brush's normal radius
with the current unprojected pixel radius, which was then
used by texture brush tiled mode.
To fix this I just cached the pixel radius at stroke start in
UnifiedPaintSettings->start_pixel_radius.
|
|
excluded get instanced into Current Scene.
This was due to using `BKE_scene_has_object` function, which uses the
cache of bases of the viewlayers, which do not have entries for the
content of excluded collections... Now use
`BKE_collection_has_object_recursive` instead.
|
|
Differential Revision: https://developer.blender.org/D14917
|
|
GLSL has different max number of ssbo per glsl stage.
This patch checks if the number of compute ssbo blocks matches
our requirements for the GPU Subdiv, before enabling it.
Some platforms allow more ssbo bindings then blocks per stage.
|
|
|
|
Followup to rB6c679aca1770c37.
|
|
Code was not really designed to hanlde corrupted (e.g. local ID) root
hierarchies, now it should handle better those invalid cases and restore
proper sane situation as best as possible.
Fixes crashes with some corrupted files from Blender studio.
|
|
acceleration, lens length, and power
`TEMPERATURE` type was also missing, not only the new-ish
`TIME_ABSOLUTE` one...
Added a static assert on the size of the `bpyunits_ucategories_items`
array, and a comment on anonymous enum of `B_UNIT_`, in the hope this
won't happen again in the future.
|
|
|
|
Support merging UV's that share the same vertex and are very close when
applying modifiers.
This is needed to prevent UV's becoming "detached" which can happen when
applying the subdivision surface modifier.
This regression was caused by [0] which removed selection threshold for
nearby coordinates. While restoring the UV selection threshold could be
done - some selection operations that walk around connected UV fans
wouldn't behave in a deterministic way (such as select shortest path).
There are also other cases where UV's may be compared without a
threshold such as tangent calculation and exporters which have their own
logic to handling UV's.
Also resolves T86896, T89903.
[0]: b88dd3b8e7b9c02ae08d4679bb427963c5d21250
Reviewed By: sergey
Ref D14841
|
|
This index is not meant for the point cache data array, it's already offset.
|
|
copy.
Similar issue/solution as in rB5188c14718c5 from this Monday actually,
there may be more of those still lurking around... Quite surprising they
all get reported now, this behavior has been in Blender since years.
|
|
Fix regression described in T97799.
Apply layer transform and layer parenting to all visible frames, i.e. active frame + onion skinning frames.
Reviewed By: #grease_pencil, antoniov
Maniphest Tasks: T97799
Differential Revision: https://developer.blender.org/D14829
|
|
When the profile only has one control point, its segment count was
determined incorrectly. There needs to be a special case for a single
control point, when there are no segments even if the curve is cyclic.
|
|
These kinds of depsgraph evaluations should not be marked as low priority as
this could negatively affect playback performance. Low priority should mainly
be used for background tasks.
|
|
Regression from rB1a7757b0bc69/rBa0acb9bd0cc0. Special handling
(averaging) of weights on merged center vertices also requires to be
'reversed' when new correct merge order is used, compared to previous
behavior.
|
|
This commit implements copying of materials and material indices from
all of the boolean node's input meshes. The materials are added to the
final mesh in the order that they appear when looking through the
materials of the input meshes in the same order of the multi-socket
input node.
All material remapping is done with mesh-level materials. Object-level
materials are not considered, since the meshes don't come from objects.
Merging all materials rather than just the materials on the first mesh
requires a change to the boolean-mesh conversion. This subtly changes
the behavior for object linked materials, but in a good way I think;
now the material remap arrays are respected no matter the number
of materials on the first mesh input.
Differential Revision: https://developer.blender.org/D14788
|
|
8e4c3c6a2414 mistakenly used the `vec` argument
of `BKE_where_on_path` like it was optional. Fix by
making that argument optional too.
|
|
to have zero users
Relinking code would weirdly enough allow clearing of extra/fake user
status on IDs used by affected ID, which would be utterly wrong.
Fairly unclear why this was working OK in reported case before rBa71a513def20,
could not spot any obvious reason just from reading code...
Also, in `libblock_remap_data_update_tags`, only transfer fake user
status if `new_id` is not NULL (otherwise that would have removed that
falg from `old_id`, without actually transferring it to anything).
|
|
This patch adds allows the user to select the initial fill color when
adding a new color attribute layer.
---
{F13035372}
Reviewed By: JulienKaspar, joeedh
Differential Revision: https://developer.blender.org/D14743
|
|
* BLENDER_VERSION_CYCLE set to beta
* Update pipeline_config.yaml to point to 3.2 branches and svn tags
* Update and uncomment BLENDER_VERSION in download.cmake
|
|
- 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.
|
|
While code deleting old (relocated to new ones) IDs would work fine in
typical cases, it would fail badly in others, when e.g. drivers would
create 'reversed' dependency from the obdata ID to the object ID.
This commit uses a less efficient, but much safer method. It also
ensures no relocated old IDs is left over in the file (previous version
could easily leave some old IDs from the old library until a full
save/reload cycle happened).
|
|
While this only had minor potential effect, both code incrementing
usercount of newly remapped IDs were wrong.
Original one would by-pass any 'ensured user' handling, newer one would
systematically make the ID directly linked...
`id_us_plus_no_lib` is to be used here.
|
|
Fact that those options are only used in a specific case, and that the
same behavior is ensured in a different part of the code in other cases,
is fairly confusing and unfortunate... At least document it.
|
|
When pushing down an Action onto an NLA track, set the new Strip's
influence to the Action's influence. This is done by setting a key due
to the way the NLA Strip influence works (it's either animated, or
ignored).
Reviewed By: sybren, RiggingDojo
Differential Revision: https://developer.blender.org/D14719
|
|
For a single day in 2015 between rBff3d535bc2a6309 and rB945f32e66d6ada,
custom data structs could be written with an incorrect maxlayer field.
This means that custom data structs read from those files would think
they have more space to add new layers than they actually did, causing
a crash if more layers were added. This was found while investigating
a crash from D14365 which adds new face corner layers in versioning.
The fix is to reset all maxlayer integers to totlayer, which is
done when writing files in current Blender anyway.
The file tests/render/motion_blur/camera_zoom_blur_perspective.blend
has this problem as it was added on 2015-07-21, right between the two
commits. Adding three custom data layers in versioning code would crash.
The problem was originally found and investigated by Martijn Versteegh
(@Baardaap), thanks!
Differential Revision: https://developer.blender.org/D14786
|
|
|
|
When the object's position depends on the geometry and the geometry
depends on the object's position, we can't count on the object's
evaluated geometry to be available. Lattices and mesh objects have
equivalent checks in this vertex parenting function.
Differential Revision: https://developer.blender.org/D14781
|
|
|
|
Thanks to Germano Cavalcante for finding the solution.
|
|
When height is limited, it is defined by space occupied by strips,
but at least channels 1 to 7 will be always visible. This allows it to
easily overview timeline content by zooming out to maximum extent in Y
axis and panning in X axis.
More channels can be "created" on demand by moving strip to higher
channel. When strip is removed and highest channel becomes empty, view
will stay as is until it is moved down. Then new highest point is
remembered and it is not possible to pan upwards until strip is moved to
higher channel.
Limiting takes into account height of scrubbing and markers area as
well as scrollers. This means that when zoomed out to maximum extent,
no strips are obstructed by fixed UI element.
Fixes T57976
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D14263
|
|
|
|
Caused by not using the proper duplicated `MVert` array.
Error in b0aaf6ff4a9731e9142d8.
|
|
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
|
|
|
|
|
|
|
|
Use "transform" instead of "obmat", because the meshes
don't necessarily come from objects.
|
|
The PBVH draw cache wasn't being invalidated in
all cases. It is now invalidated whenever a PBVH
node's draw buffers are freed.
|
|
rB08731d70bf66 was not properly checking if subdivision needs to be
evaluated on the CPU.
Thanks Ray Molenkamp for noticing.
|
|
The crash is caused as the subdivision wrapper does not have loop
normals, which are generally computed at the end of the modifier stack
evaluation via `mesh_calc_modifier_final_normals`. (Note that they are
initially computed, but deleted by the subdivision wrapper creation.)
This records in the mesh runtime whether loop normals should have been
computed and computes them alongside the subdivision wrapper.
Differential Revision: https://developer.blender.org/D14489
|
|
It was possible to set context pointers for buttons via the layout, but
not for buttons in places where the layout system wasn't used (where
buttons are placed manually). This is needed for buttons in the
Outliner, see D14653.
|
|
Goals:
* Better high level control over where devirtualization occurs. There is always
a trade-off between performance and compile-time/binary-size.
* Simplify using array devirtualization.
* Better performance for cases where devirtualization wasn't used before.
Many geometry nodes accept fields as inputs. Internally, that means that the
execution functions have to accept so called "virtual arrays" as inputs. Those
can be e.g. actual arrays, just single values, or lazily computed arrays.
Due to these different possible virtual arrays implementations, access to
individual elements is slower than it would be if everything was just a normal
array (access does through a virtual function call). For more complex execution
functions, this overhead does not matter, but for small functions (like a simple
addition) it very much does. The virtual function call also prevents the compiler
from doing some optimizations (e.g. loop unrolling and inserting simd instructions).
The solution is to "devirtualize" the virtual arrays for small functions where the
overhead is measurable. Essentially, the function is generated many times with
different array types as input. Then there is a run-time dispatch that calls the
best implementation. We have been doing devirtualization in e.g. math nodes
for a long time already. This patch just generalizes the concept and makes it
easier to control. It also makes it easier to investigate the different trade-offs
when it comes to devirtualization.
Nodes that we've optimized using devirtualization before didn't get a speedup.
However, a couple of nodes are using devirtualization now, that didn't before.
Those got a 2-4x speedup in common cases.
* Map Range
* Random Value
* Switch
* Combine XYZ
Differential Revision: https://developer.blender.org/D14628
|
|
The large call stack can be slightly annoying, and it's possible that
invoking TBB in this case corresponds to some overhead like
e1309030603980c6b.
|