Age | Commit message (Collapse) | Author |
|
|
|
Blender tried to free objects twice from the bullet world sometime.
First we would implicity remove all objects when recreating the bullet
world and then explicity try to remove them again from the now empty
world.
This would wouldn't crash older bullet versions, but the recent versions
will as we will try to free objects that no longer exists in the bullet
world.
Also clear the cache on deletion as the object order changes.
Fix T77181: The cache clearing will fix this issue.
|
|
- reduce variable scope
- use bool instead of int
- use LISTBASE_FOREACH
|
|
The animated objects was not updated for each internal substep for the rigidbody sim.
This would lead to unstable simulations or very annoying clipping artifacts.
Updated the code to use explicit substeps and tie it to the scene frame rate.
Fix T47402: Properly updating the animated objects fixes the reported issue.
Reviewed By: Brecht, Jacques
Differential Revision: http://developer.blender.org/D8762
|
|
|
|
Exit early in some functions to reduce indentation level, declare
variables where they are initialized, and also clean up some
comment formatting.
|
|
Calling: bpy.ops.wm.read_homefile(use_empty=True)
exposes invalid user-counts in versioning code.
Simplified logic for assigning materials in versioning code.
Caused by 29f3af9527259.
|
|
- Direct assignment caused ID user counts to be invalid.
- The first palette would always be used,
even when the named palette searched for was found.
Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
|
|
|
|
|
|
|
|
Use this utility function for render-shading & weight paint modes.
This adds support for edit-mode & pose-mode where all objects in the
mode are used in this case instead of the selected objects.
|
|
Useful for similar situations as BKE_view_layer_array_from_bases_in_mode_params
without depending on the active objects mode.
|
|
|
|
|
|
This was added in 1cb7267a9f9f1, however the behavior before this
would have failed on negative values already.
Also negative values here would fail in many other places.
|
|
This reverts commit b78a439e9071f83baf296d52c0c1a458aecd2938.
This was committed by mistake, and including BLI_winstuff.h on non-windows
platforms results in an error.
|
|
|
|
`ssize_t` is not a standardized type (it's a posix type)
given the line in question here is calculating the size
of a memory allocation there's no logical way this
should ever be negative.
I do not know this code too well and was unsure if
`mdverts->totweight` could ever be < 0, so I protected
it with a clamp, just in case.
|
|
|
|
Problem is again with the embedded data, we want to make those local
together with their owner ID, but sometimes we are actually dealing with
copies here, which are inheritently already local.
Code did not considered that possibility before, leading to access to a
NULL `lib` pointer.
This should also be back-ported to 2.83 LTS release.
Maniphest Tasks: T80104
Differential Revision: https://developer.blender.org/D8731
|
|
|
|
I'm also adding `BKE_id_blend_write`, so that it can be accessed
outside of `readfile.c`.
|
|
The new BKE_rigidbody_is_affected_by_simulation function was in side the
WITH_BULLET ifdef guard.
|
|
|
|
We need to have transforms from passive objects if they are animated or
driven by parent relations. This is not immediately obvious as the
object transform matrix will still be available, it is just one frame
behind in some cases.
Fixed dependency cycles if there is a constraint between two rigid
bodies. Because bullet keeps track of its simulated bodies, we do not
need to supply objects transforms as bullet should already have them.
I need combine these two fixes because otherwise we will get depsgraph
warnings that nodes are missing that it expects to be there.
Reviewed By: Sergey, Jacques
Differential Revision: http://developer.blender.org/D8732
|
|
Issue was with our dear posebones again... when applying overrides we
keep the same address/pointer for the IDs themselves, (which avoids us
the need to remap their usages), but their inner data is often
re-allocated.
Therefore, we need once again to go over armature objects and invalidate
their posebone pointers.
This should also be back-ported to Blender LTS 2.83.
Maniphest Tasks: T80078
Differential Revision: https://developer.blender.org/D8734
|
|
This is part of T76372.
|
|
This is part of T76372.
|
|
With this change, the three .blend read operations: data reading, lib reading
and expanding are more grouped together.
|
|
This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D8670
|
|
The color is linear, so the conversion is breaking the real color.
|
|
This is in preparation for https://developer.blender.org/D8665.
|
|
Added in 2007, it doesn't seem useful to support alternate behavior.
|
|
|
|
These were missed in 70500121b457d which caused reformatting.
|
|
|
|
|
|
Fix T80016
Caused by a typo in rB7b1c406b5431ce65d84ddb5f2c53977c25c18373
Reviewed By: mont29, dfelinto
Maniphest Tasks: T80016
Differential Revision: https://developer.blender.org/D8693
|
|
This implements Snake Hook as a deform type for the cloth brush. This
brush changes the strength of the deformation constraints per brush step
to avoid affecting the results of the simulation as much as possible. It
allows to grab the cloth without producing any artifacts in the surface
and create more natural looking folds than any of the other deformation
modes.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8621
|
|
In 2.83 and previous versions there was a bug that was causing boundary
vertices to be detected incorrectly that was preventing the smooth brush
to work on boundaries if there was a pole on them.
In 2.90 the boundary vertex detection was fixed, but it was still using a
simplified version of the algorithm without any boundary smoothing. This
patch implements a similar smoothing algorithm to what I think it was
the intention of 2.83 and previous versions, but working correctly.
Reviewed By: sergey
Maniphest Tasks: T80008
Differential Revision: https://developer.blender.org/D8680
|
|
|
|
This skips the subdivision operation if the mesh has no loops, avoiding
the crash.
Reviewed By: sergey
Maniphest Tasks: T80039
Differential Revision: https://developer.blender.org/D8696
|
|
No functional changes expected.
|
|
|
|
Since stone age of lib_query, the code would iterate over the current
list of active sequences (from a meta strip e.g.), and not over the
whole list of those.
This is a critical issue as it means in some cases (editing a meta strip
typically), some ID pointers would be missed/ignored by this foreach
looper, which is now at the center of most of our ID management code.
This caused a bug here at the studio, leading to loss of all sound IDs
used by sound strips when editing and undoing inside a meta strip, since
ID refcounting would not happen properly on strips using sounds outside
the meta-strip context during file reading of the undo steps.
To be backported to 2.83.
Differential Revision: https://developer.blender.org/D8671
|
|
|
|
|
|
|
|
|