Age | Commit message (Collapse) | Author |
|
|
|
|
|
Use correct text color when syntax highlighting is off but line numbers are on.
Differential Revision: https://developer.blender.org/D7337
Reviewed by Hans Goudey
|
|
Display negative zero floats as regular zero. Does not alter underlying value.
Differential Revision: https://developer.blender.org/D4795
Reviewed by Brecht Van Lommel
|
|
|
|
At first sight this code should not build at all
but due to the use of macro's that look like functions
this seemingly has no issues building.
Clang-format alerted me to this strange bit of code
by placing the `if` on it's own line for some reason.
added the missing brackets, and clang-format is happy
again.
|
|
|
|
`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.
|
|
|
|
This is for design task T67744, Boolean Redesign.
It adds a choice of solver to the Boolean modifier and the
Intersect (Boolean) and Intersect (Knife) tools.
The 'Fast' choice is the current Bmesh boolean.
The new 'Exact' choice is a more advanced algorithm that supports
overlapping geometry and uses more robust calculations, but is
slower than the Fast choice.
The default with this commit is set to 'Exact'. We can decide before
the 2.91 release whether or not this is the right choice, but this
choice now will get us more testing and feedback on the new code.
|
|
|
|
This is needed to move direct_link_packedfile out of readfile.c for T76372.
|
|
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 CPP Shader class does not initialize the interface attribute.
What will crash when deleting the shader.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8740
|
|
This reverts commit c28432680971f54ebe95cc953606a3a4d3bc5c7c.
|
|
The new BKE_rigidbody_is_affected_by_simulation function was in side the
WITH_BULLET ifdef guard.
|
|
|
|
Sometimes, this generated file is included more than once,
so it should have an include 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
|
|
A test case that compiles all the GLSL shaders for workbench, gpencil, overlay and some
of eevee. Compilation is still platform dependent, but when run on a test-farm
with different hardware we will be able to detect GLSL compilation
errors early on.
The test will be compiled when `WITH_GTEST` and `WITH_OPENGL_DRAW_TESTS`
are On.
For eevee only the shaders inside eevee_shaders.c are included. EEVEE has some shaders
located inside the submodule. They aren't accessible to the outside and aren't added
to the test case. We should see how we want to add them. For the test cases it is better
to move them to eevee_shaders.c, but for eevee perspective it is better to keep them in
the submodule. Keeping them in the submodule could lead to situations that is harder to test.
as the shader could already have been initialized.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8667
|
|
Default mesa driver for ubuntu 20.04 fails when a name is defined twice.
M_PI is defined in both `common_workbench_lib` and `common_math_lib`. This patch
remove the define out of common_workbench_lib
For reference it fails on https://github.com/mesa3d/mesa/blob/mesa-20.0.8/src/compiler/glsl/glcpp/glcpp-parse.y#L1186
during the check if the macros are the same.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8741
|
|
There were some missing UBO bindings, what asserted in debug mode.
This patch fixes this by binding the missing UBO's
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8742
|
|
In recent refactoring {a9f2ebb21508} an issue was introduced that the
opengl rasterizer would be disabled when only writing to a stencil
buffer.
This fix adds stencil writing to the write mask and set it. This makes
the write map not evaluate to GPU_WRITE_NONE and the rasterizer will be
enabled in `GLStateManager::set_write_mask`.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8743
|
|
|
|
The CPP Shader class does not initialize the interface attribute.
What will crash when deleting the shader.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8740
|
|
This is part of T76372.
|
|
This is part of T76372.
|
|
Caused by rB49f59092e7c8: Curves: Implement Handles for selected points
only
Changes from deselecting all were not considered as changes anymore.
Maniphest Tasks: T80182
Differential Revision: https://developer.blender.org/D8744
|
|
|
|
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
|
|
We forgot to update this code as part of D3108. I'd like to include this in 2.90,
it's entirely broken now so can't really get any worse.
Differential Revision: https://developer.blender.org/D8738
|
|
More localized variables, avoid ugly 'offset by one' index usage in
favor of explicit `INDEX_UNSET` define, etc.
No behavior change expected from this commit.
|
|
|
|
Checks to preserve the active spline on duplication
required an active vertex too.
Now having no active vertex doesn't prevent duplicate
from keeping the spline active.
Reviewed by: @mano-wii
Ref D8729
|
|
|
|
|
|
Left walk navigation while the scene collection is active would collapse
the subtree which shouldn't be allowed. This adds another check to
`outliner_item_openclose` to prevent collapsing the scene collection.
Introduced in rBb077de086e14.
|
|
Because the subtrees in Data API mode are empty for performance reasons,
it was impossible to move through the tree with walk navigation. This
adds an exception to allow walk navigation to expand subtrees in that
mode.
|
|
custom split normals data
Clearing custom split normals would get rid of the CD_CUSTOMLOOPNORMAL
layer - but editing data `lnor_spacearr` would be kept.
Adding a CD_CUSTOMLOOPNORMAL layer (if none exists yet) should be done
in `edbm_average_normals_exec` / `BKE_editmesh_lnorspace_update` /
`BM_lnorspace_update` / `BM_lnorspacearr_store`. The thing is that if
the editing data `lnor_spacearr` would still be valid after `Clear
Custom Split Normals Data`, blender would happily call
`BM_lnorspace_rebuild` instead. Doing that without a CD_CUSTOMLOOPNORMAL
layer is asking for trouble.
Now clear lnor_spacearr on `Clear Custom Split Normals Data` as well.
Thx @mont29 for feedback here.
Maniphest Tasks: T80159
Differential Revision: https://developer.blender.org/D8730
|
|
Currently the panel handler loops through every block and every button
for every single panel. This commit moves that check to happen a single
time at the beginning.
|
|
We need to only collapse or expand the first panel under the cursor
rather than all of them. Note that whether the parent panel or
the subpanel is first depends on the order of the uiBlocks in the
region's list.
|
|
Fix readability-static-definition-in-anonymous-namespace in new code
|
|
The code for handling panel events was much more complicated than it
needed to be. This commit removes some unecessary function calls and
variables, reduces indentation levels by returning early, and does
some other general cleanup.
|
|
The color is linear, so the conversion is breaking the real color.
|