Age | Commit message (Collapse) | Author |
|
Box, Circle and Lasso select were not taking into account if a
mask(point) was parented; selection was only succeeding in the original
place.
Now check coordinates from evaluated mask (points) instead while
setting selection flags and DEG tagging still happens on the original ID.
Maniphest Tasks: T97135
Differential Revision: https://developer.blender.org/D14651
|
|
Extremely subttle bug that would only appear in some specific
circumstances, would cause memfile undo writing code to falsely detect
some ID as changed because it would get the wrong 'starting point' of
comparison with existing previous memfile step.
See T85756 for detailed explanation and reproducible case.
|
|
This adds a new node editor overlay that helps users to see where
named attributes are used. This is important, because named
attributes can have name collisions between independent node
groups which can lead to hard to find issues.
Differential Revision: https://developer.blender.org/D14618
|
|
When GPU subdivision is enabled the mesh objects remain unsubdivided on
the CPU side, and subdivision should be requested somewhat manually (via
`BKE_object_get_evaluated_mesh`).
When referencing an object, the Object Info node calls
`bke::object_get_evaluated_geometry_set` which first checks if a Geometry
Set is present on the object (unless we have a mesh in edit mode). If so
it will return it, if not, the object type is discriminated, which will
return a properly subdivided mesh object via `add_final_mesh_as_geometry_component`.
The unsubdivided mesh is returned because apparently the check on the
Geometry Set always succeeds (as it is always set in `mesh_build_data`).
However, the mesh inside this Geometry Set is not subdivided.
This adds a check for a MeshComponent in this Geometry Set, and if one
exists, calls `add_final_mesh_as_geometry_component` which will ensure
that the mesh is subdivided on the CPU side as well.
Differential Revision: https://developer.blender.org/D14643
|
|
Originally was noticed when using a linked background scene and a scene
camera from another (local) scene.
The root issue was that relation from view layer to object's base flags
evaluation was using wrong view layer. This is because the relation was
created between object and currently built view layer, and it only was
happening once (since the object-level relations are only built once).
Depending on order in which `build_object` was called it was possible
that relation from a wrong view layer was used.
Now the code is better split to indicate which parts of object relations
are built when object comes from a base in the view layer, and which ones
are built on indirect linking of object to the dependency graph.
This patch makes relations correct in the cases when the same object is
used as a base in both active and set scenes. But, the operation which
handles object-level flags might not behave correctly as there is no
known design of what is the proper thing to do in this case. Making a
clear design and implementation of case when object is shared between
active and set scene is outside of the scope of this patch.
Differential Revision: https://developer.blender.org/D14626
|
|
Ref T97171.
Differential Revision: https://developer.blender.org/D14637
|
|
Prefer using immVertex3f when 3D shaders are used for 2D rendering due to overhead of vertex padding in hardware. CPU overhead is negligible.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14494
|
|
MSL follows C++ standard convention, and such variable declarations within switch statements must have their scope localised within each case. Adding braces in all cases ensures correct behaviour and avoids 'case ... bypass initialization of local variable' compilation error.
struct initialisation to follow C++ rules for Metal. Implicit constructors replaced with either explicit constructors or list-initialization where appropriate.
Ref T96261
Authored by Apple: Michael Parkin-White
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14451
|
|
Add a new operator, "Start Tweaking Strip Actions (Full Stack)", which
allows you to insert keyframes and preserve the pose that you visually
keyed while upper strips are evaluating,
The old operator has been renamed from "Start Tweaking Strip Actions" to
"Start Tweaking Strip Actions (Lower Stack)" and remains the default for
the hotkey {key TAB}.
**Limitations, Keyframe Remapping Failure Cases**:
1. For *transitions* above the tweaked strip, keyframe remapping will
fail for channel values that are affected by the transition. A work
around is to tweak the active strip without evaluating the upper NLA
stack.
It's not supported because it's non-trivial and I couldn't figure it
out for all transition combinations of blend modes. In the future, it
would be nice if transitions (and metas) supported nested tracks
instead of using the left/right strips for the transitions. That
would allow the transitioned strips to overlap in time. It would also
allow N strips to be part of the (previously) left and right strips,
or perhaps even N strips being transitioned in sequence (similar to a
blend tree). Proper keyframe remapping through all that is currently
beyond my mathematical ability. And even if I could figure it out,
would it make sense to keyframe remap through a transition?
//This case is reported to the user for failed keyframe insertions.//
2. Full replace upper strip that contains the keyed channels.
//This case is reported to the user for failed keyframe insertions.//
3. When the same action clip occurs multiple times (colored Red to
denote it's a linked strip) and vertically overlaps the tweaked
strip, then the remapping will generally fail and is expected to
fail.
I don't plan on adding support for this case as it's also non-trivial
and (hopefully) not a common or expected use case so it shouldn't be
much of an issue to lack support here.
For anyone curious on the cases that would work, it works when the
linked strips aren't time-aligned and when we can insert a keyframe
into the tweaked strip without modifying the current frame output of
the other linked strips. Having all frames sampled and the strip
non-time aligned leads to a working case. But if all key handles are
AUTO, then it's likely to fail.
//This case is not reported to the user for failed keyframe
insertions.//
4. When using Quaternions and a small strip influence on the tweaked
Combine strip. This was an existing failure case before this patch
too but worth a mention in case it causes confusion. D10504 has an
example file with instructions.
//This case is not reported to the user for failed keyframe insertions. //
5. When an upper Replace strip with high influence and animator keys to
Quaternion Combine (Replace is fine). This case is similar to (4)
where Quaternion 180 degree rotation limitations prevent a solution.
//This case is not reported to the user for failed keyframe insertions.//
Reviewed By: sybren, RiggingDojo
Differential Revision: https://developer.blender.org/D10504
|
|
Undefined behaviour for divergent control-flow fixes, replacement for partial vector references, and resolution of a number of calculation precision issues occuring on macOS.
Authored by Apple: Michael Parkin-White
Ref: T96261
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D14437
|
|
This patch fixes a typo in commit e59f754c169d which incorrectly uses `GPU_TEXTURE_ARRAY` instead of `GPU_FORMAT_COMPRESSED`.
`GPU_FORMAT_COMPRESSED` and `GPU_TEXTURE_ARRAY` both currently evaluate to 16, so this patch does not change anything functionally; however, this patch will prevent issues from arising in the future.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D14384
|
|
Add operator to select markers left/right of the current frame
(including the current frame).
`bpy.ops.marker.select_leftright(mode='LEFT', extend=False)`
`mode` can be either 'LEFT' or 'RIGHT'.
The naming and defaults of the above variables match similar operators
(e.g., `bpy.ops.nla.select_leftright`)
This also adds a new sub-menu to the Marker menu found in animation
editors, exposing both the new `bpy.ops.marker.select_leftright`
operator as well as the `bpy.ops.marker.select_all` operator.
Despite the name "Before Current Frame" and "After Current Frame", it
also selects a marker that falls on the current from for both of the
modes. This is to match the behavior found in the `nla.select_leftright`
operator.
RCS: https://blender.community/c/rightclickselect/OgmG/
Reviewed by: sybren, looch
Differential Revision: https://developer.blender.org/D14176
|
|
Unlike regular selection cycling that is activated when clicking again
in the same location, object mode would cycle to another object
if the object that was selected happened to already be active.
This made it impossible to click-drag to tweak the active object
if there were other objects behind it as those would be activated first.
Resolves T96752.
|
|
Was adding 1 to dietime twice in init_particle_interpolation.
|
|
Particles baked into memory would never load the final frame because
of an off-by-one error calculating the particles `dietime`.
This value indicates the frame which the particle ceases to exist but
was being set to the end-frame which caused this bug as the scenes
end-frame is inclusive.
While the last frame was properly written and read from memory,
the `dietime` was set to the last frame causing all the particles to be
considered dead when calculating the cached particle system.
|
|
|
|
These were missed in previous passes. Also remove some logic
in `draw_hair.c` that was redundant after f31c3f8114616bb8964c8e7.
|
|
The GPU evaluation for curves will have to change significantly from the
current particle hair drawing code, due to its more general use cases
and support for more curve types. To simplify that process and avoid
introducing regressions for the rendering of hair particle systems,
this commit splits drawing functions for the curves object and
particle hair.
The changes are just inlining of functions and copying code
where necessary.
Differential Revision: https://developer.blender.org/D14576
|
|
When tangent are computed from generated coordinates, the result for GPU
subdivision would be compressed to 16-bit when it shouldn't.
|
|
Problem is that the orco layer was not taken care of by the GPU
subdivision routines. This only handles the issues for EEVEE/Workbench.
For Cycles, this would need to be handled at the wrapper level somehow.
|
|
Recent addition to the Python API [0] didn't follow this convention.
See [1] for the rationale behind this change.
[0]: 9bc678969aaef5e2343d9362648e9a633d1b6e5e
[1]: 982aea88e0d74020c62c2054a45eeafa56c8ca30
|
|
Use Alt-Slash to remove objects from local-view (was M prior to [0]),
following the convention of using Alt to perform the reverse of an
action. Also remove the confirmation menu as this key as it can be
undone and it's not likely to be pressed by accident.
This can be useful to quickly subtract items from a complex selection
with items that only become visible when entering local-view.
The M key was originally used in 2.4x since moving between layers wasn't
possible. Now moving between collections is possible in local-view
the keys collided.
[0]: cf5d582b77fbb7bf392a94248228846bfb774a15
|
|
edges
When wireframe mode is turned on, the subdivision edges not originating
from coarse edges were also drawn as regular edges, which would confuse
users trying to select them. These should not be drawn in edit mode,
only in object mode when optimal display is turned off (matching the CPU
subdivision case).
|
|
Fix word-wrapped tooltip text not showing by aligning to pixel grid.
See D14639 for more details.
Differential Revision: https://developer.blender.org/D14639
Reviewed by Campbell Barton
|
|
The "dir" argument to `BKE_where_on_path` was only actually
used in a few places. It's easier to see where those are if there
isn't always a dummy argument.
|
|
When displaying a deform modifier in edit mode, a cached
array of positions is used. Parallelizing bounds calculation when
that array exists can improve the framerate when editing slightly
(a few percent). I observed an improvement of the min/max itself
of about 10x (4-5ms to 0.4ms).
|
|
Also adjust comment formatting and use nullptr
where the previous commit missed.
|
|
|
|
This will allow easier interaction with other areas also using C++
features, and a potential optimization to edit mesh bounding box
calculation.
|
|
If all of the curves are poly curves, the evaluated positions are the
same as the original positions. In this case just reuse the original
positions span as the evaluated positions.
|
|
|
|
An 8 bit integer should be enough for now. We can change this if we ever
want to allow increasing the order past 256.
|
|
Just return early in that case to keep the rest of the function simpler.
|
|
Addresses T97257, to make it consistent with regular attributes tab
Review by: Julian Kaspar
Differential Revision: https://developer.blender.org/D14631
Ref D14631
|
|
Similar issue as e22fd7247adc.
|
|
Revert change from 3da84d8b that incorrectly used M_PI_4.
Differential Revision: https://developer.blender.org/D14636
|
|
`GPU_shader_get_uniform_block` is marked as deprecated and the value
returned does not match what `GPU_uniformbuf_bind` expects.
Also, small typo fix in python error message.
Differential Revision: https://developer.blender.org/D14638
|
|
Caused by previous DNA change.
|
|
|
|
|
|
The BKE part is needed for the 3d texture paiting brush to be part of blender
kernel.
|
|
|
|
This behaviour was introduced in a687d98e6782 to bring the old obscure
"M" operator to remove objects from the local view. In order to avoid
the keymap clash with the Move to Collection operator, the Move to
Collection was artificially restricted to work in local view.
In retrospect, the "Remove from Local View" operator is in the menu anyways,
so it didn't even need to have a shortcut (back in 2.79 the operator was
not in a menu).
The changes introduced here are:
* No shortcut for "Remove from Local View"
* No more restrictions to "Move/Link to Collection" from local view.
Thanks for Philipp Oeser for digging the old commit that introduced this
and for the rationale on the changes.
|
|
Print it as a "%s" so that possible percentage symbols in the
error message does not cause issues.
Use proper assert (assert(true) is a no-op).
Also use `empty()` instead of `length()`.
Reviewed with Clement in real life.
|
|
|
|
Solves compilation warning with Clang, and moves manipulation with
DNA structures to the designed way for C++.
The tests and few other places are update to the new code by Jacques.
Ref T96847
Maniphest Tasks: T96847
Differential Revision: https://developer.blender.org/D14625
|
|
Related to T97289, appending collections would never re-use already
appended one, since the flag was not set for this ID type...
|
|
After appending, new link/append code would delete linked IDs, even if
those where pre-existing. Note that this would actually lead to invalid
memory access later in append code (ASAN crash).
|
|
color attributes.
Voxel remesher now supports all color attribute
types.
|
|
This was one of multiple placeholder brushes to simplify development.
Having it is not necessary anymore.
It was a brush that could add new curves according to a specific density.
This functionality will be brought back as a new brush later.
Ref T97255.
|