The issue was that the `merge_layers` function assumed that the
`src_grease_pencil` always returns a drawing when calling
`get_eval_drawing` which can return `nullptr`.
The fix makes sure to check that the `src_drawing` exists.
Pull Request: https://projects.blender.org/blender/blender/pulls/129074
The problem was that when removing FCurve modifiers via the python API
the Depsgraph wasn't notified.
Fixed by tagging the owner ID of the fcurve modifier for an update.
Pull Request: https://projects.blender.org/blender/blender/pulls/128984
When duplicating a bone (has to be done in edit mode)
the pose bone colors were not copied.
This adds the code to do just that
This also fixes it for symmetrising because that uses the
same code path
Pull Request: https://projects.blender.org/blender/blender/pulls/129007
We cannot do this for the MSL files. Also
they are written in MSL which should not be
processed. So use datatoc for them.
Also add quote linting for GLSL files.
Regression in [0] although prior to this the `deformed_only` was not
being set, caused by a separate regression.
[0]: 80fa49f24ae768c5869065363e116b51175fb2df
- Add TreeViewContext::layer_collection.
- Remove the context argument for outliner drawing,
use TreeViewContext instead.
- Pass the TreeViewContext to outliner_sync_selection instead of
initializing again from the context.
Two issues were present in code that was resetting CRF quality level
to "do not use CRF, use bitrate settings" mode:
- It did not include AV1 codec, so whenever you switched to AV1 the CRF
was changing to constant bitrate.
- It wrongly included DNxHD codec. That seemed like it was trying to
fix#100079 in 06a01168f6, but it was doing exactly the opposite
of what a fix should have been? I don't understand it :/ In any case,
now with DNxHD removed the CRF properly switches to constant bitrate
when changing codec to DNxHD.
Factored the actual logic into BKE_ffmpeg_codec_supports_crf function.
Pull Request: https://projects.blender.org/blender/blender/pulls/129050
Regression in [0] caused the outliner not to draw at the clamped scroll
position. This meant searching in the outliner could show no results
even when results were found. It also meant deleting objects could show
nothing until the user manually forced the outliner to redraw.
Workaround the problem by detecting when outliner drawing changes the
scroll position and draw again. While inelegant this doesn't happen
often in practice.
Fixing without a second draw likely involves resolving the order of
initialization problem by separating bounds calculating from drawing.
[0]: a63ac425d0
The goal is to reduce the startup time cost of
all of these parsing and string replacement.
All comments are now stripped at compile time.
This comment check added noticeable slowdown at
startup in debug builds and during preprocessing.
Put all metadatas between start and end token.
Use very simple parsing using `StringRef` and
hash all identifiers.
Move all the complexity to the preprocessor that
massagess the metadata into a well expected input
to the runtime parser.
All identifiers are compile time hashed so that no string
comparison is made at runtime.
Speed up the source loading:
- from 10ms to 1.6ms (6.25x speedup) in release
- from 194ms to 6ms (32.3x speedup) in debug
Follow up #129009
Pull Request: https://projects.blender.org/blender/blender/pulls/128927
The `u_scale` should be given a default value of `1.0f` so that newly drawn
strokes with the drawing already having `u_scale` attributes will have
correct texture mapping size instead of a default of `0.0f`.
Pull Request: https://projects.blender.org/blender/blender/pulls/129060
This avoid cmake shenanigans to try to make proper
dependency tracking.
The previous code was not tracking changes inside
the create info files.
There is no real benefit for having these headers listed in
the cmakefile itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/129027
This commit takes the 'Slotted Actions' out of the experimental phase.
As a result:
- All newly created Actions will be slotted Actions.
- Legacy Actions loaded from disk will be versioned to slotted Actions.
- The new Python API for slots, layers, strips, and channel bags is
available.
- The legacy Python API for accessing F-Curves and Action Groups is
still available, and will operate on the F-Curves/Groups for the first
slot only.
- Creating an Action by keying (via the UI, operators, or the
`rna_struct.keyframe_insert` function) will try and share Actions
between related data-blocks. See !126655 for more info about this.
- Assigning an Action to a data-block will auto-assign a suitable Action
Slot. The logic for this is described below. However, There are cases
where this does _not_ automatically assign a slot, and thus the Action
will effectively _not_ animate the data-block. Effort has been spent
to make Action selection work both reliably for Blender users as well
as keep the behaviour the same for Python scripts. Where these two
goals did not converge, reliability and understandability for users
was prioritised.
Auto-selection of the Action Slot upon assigning the Action works as
follows. The first rule to find a slot wins.
1. The data-block remembers the slot name that was last assigned. If the
newly assigned Action has a slot with that name, it is chosen.
2. If the Action has a slot with the same name as the data-block, it is
chosen.
3. If the Action has only one slot, and it has never been assigned to
anything, it is chosen.
4. If the Action is assigned to an NLA strip or an Action constraint,
and the Action has a single slot, and that slot has a suitable ID
type, it is chosen.
This last step is what I was referring to with "Where these two goals
did not converge, reliability and understandability for users was
prioritised." For regular Action assignments (like via the Action
selectors in the Properties editor) this rule doesn't apply, even though
with legacy Actions the final state ("it is animated by this Action")
differs from the final state with slotted Actions ("it has no slot so is
not animated"). This is done to support the following workflow:
- Create an Action by animating Cube.
- In order to animate Suzanne with that same Action, assign the Action
to Suzanne.
- Start keying Suzanne. This auto-creates and auto-assigns a new slot
for Suzanne.
If rule 4. above would apply in this case, the 2nd step would
automatically select the Cube slot for Suzanne as well, which would
immediately overwrite Suzanne's properties with the Cube animation.
Technically, this commit:
- removes the `WITH_ANIM_BAKLAVA` build flag,
- removes the `use_animation_baklava` experimental flag in preferences,
- updates the code to properly deal with the fact that empty Actions are
now always considered slotted/layered Actions (instead of that relying
on the user preference).
Note that 'slotted Actions' and 'layered Actions' are the exact same
thing, just focusing on different aspects (slot & layers) of the new
data model.
The "Baklava phase 1" assumptions are still asserted. This means that:
- an Action can have zero or one layer,
- that layer can have zero or one strip,
- that strip must be of type 'keyframe' and be infinite with zero
offset.
The code to handle legacy Actions is NOT removed in this commit. It will
be removed later. For now it's likely better to keep it around as
reference to the old behaviour in order to aid in some inevitable
bugfixing.
Ref: #120406
When grease pencil has no actions (ale->adt), id data block channel is
still added due to `ANIMFILTER_ANIMDATA`. This would lead to crash if
operator is accessing the AnimData (ale->adt). To fix this, make sure
adt exists before creating an animchannel.
Pull Request: https://projects.blender.org/blender/blender/pulls/128841
The build modifier crashes when getting lengths of cyclic curves because `evaluated_points_by_curve`
was previously always called with `cyclic` parameter set to `false`.
The `cyclic` parameter necessary for `curves::segments_num` to return correct number of segments.
Pull Request: https://projects.blender.org/blender/blender/pulls/128955
Caused by 364d62e59b.
In draw mode, we want to make sure to show vertex colors by default
because users can draw with them. Otherwise this can lead to unexpected
behavior in solid shading mode when vertex colors used to not be
rendered in draw mode.
The previous fix tried to do this by enforcing the `V3D_SHADING_VERTEX_COLOR`
mode in draw mode. But this has the side effect that the material
stroke and fill color are overriden with pure white.
To fix the issue correctly, simply ensure that `vert_col_opacity` in
`grease_pencil_layer_cache_add` is set to 1.0f. This means that
vertex colors and material colors are shown just like in the render.
Also resolves#128680.
Pull Request: https://projects.blender.org/blender/blender/pulls/129054
WITH_VULKAN_GUARDEDALLOC is a development option to use Blenders guarded
allocator when allocating internal vulkan driver resources. It does not provide any benefits
as this should be covered by vulkan validation and drivers are often ignoring this. This
change will remove the option from cmake and source code.
Pull Request: https://projects.blender.org/blender/blender/pulls/129039
Intel Windows drivers for 10th gen and lower has some strange behavior
when using dynamic rendering. It requires pipeline conditions to be met,
when beginning a new rendering scope. This is strange as specs + VVL
notes that these conditions should be met during vkCmdDraw* commands.
Pull Request: https://projects.blender.org/blender/blender/pulls/129055
This change makes unused attachments extension optional.
This extension is fairly new and not all drivers have support for it.
The workaround will create additional pipelines when attachments are
not set.
Pull Request: https://projects.blender.org/blender/blender/pulls/129046
This patch adjusts the GLSL compositor code to avoid writing to
inputting as variables. This is to make it easier to port the code to
CPU. Also, write to the output directly instead of per channel.
Previous fix to make VP9 lossless work (98689f51c0) applied it to
all videos that happen to be in WebM containers. While it is typical
that WebM would be used for VP9, it is not necessarily so (WebM can
have H.264 or really any other video). Do the check based on video
codec being VP9.
Pull Request: https://projects.blender.org/blender/blender/pulls/129045
For Texture baking, there is a CPU-bound preparation step needed to
establish a mapping between the Hi-Res and Low-Res Meshes before the
rendering engine can take over and start the bake.
Part of this process is now taking advantage of parallel_for,
speeding up this step of the Bake process for many/large textures almost
linearly to the number of CPU-cores.
Pull Request: https://projects.blender.org/blender/blender/pulls/128964
The versioning code that upgrades legacy actions to new slotted actions
also needs to properly assign slots to the IDs that use those upgraded
actions. It was doing this correctly except for not traversing into and
assigning slots to embedded IDs.
This commit adds the code to handle embedded IDs as well.
Additionally, this changes how mismatched `id_type`s are handled when upgrading
actions. Rather than refusing to assign the slot created during the upgrade if
the `id_type` doesn't match the ID, we assign it anyway with a warning. The
rationale is that this represents a case where the Action `idroot` was already
mismatched, and it turns out that has always been possible. So we now opt to
simply preserve that state of affairs rather than attempt to "fix" it.
Pull Request: https://projects.blender.org/blender/blender/pulls/129002
It looks like this specific case never really worked. This wasn't found before,
because in the large majority of cases, execution uses a more optimized code
path instead of this general one.
Pull Request: https://projects.blender.org/blender/blender/pulls/128993