This is different from applying effects to regular "source media" strips
like images or movies; an effect "hides" the input strip when it is
below itself in the channel.
Apply the same treatment to Color & Text strips. Fixes#118213.
If someone wants previous behavior for some reason, they can drag
the effect applied on Color/Text to be below the input strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/118269
If there is no mask attribute yet and hidden vertices, the values for those
vertices wouldn't be initialized. Fix by simply initializing the entire array
when it's allocated.
So this happens on curves with only a single point in them.
If these are converted to the old particle system, we would end up with
a particle with only one key (invalid hair), then going to particle
editmode would crash.
The old particle system took care of this (e.g. when deleting keys in
`PARTICLE_OT_delete`)
See the following comment:
`/* We can't have elements with less than two keys. */`
So to resolve, only convert curves with multiple (>1) points in the
process.
Pull Request: https://projects.blender.org/blender/blender/pulls/118392
Dragging any other object type to the Bone Collections List results in
a null dereference. This PR adds check that the drag type is
WM_DRAG_BONE_COLLECTION.
Pull Request: https://projects.blender.org/blender/blender/pulls/118393
fa6384eb39 introduced explicit setting of operator context as argument for
function `ED_region_panels_ex()`. However, this did not work correctly, because
`UiLayout` did not exist when `uiLayoutSetOperatorContext()` was called. This
has to be done in `ed_panel_draw()`.
Another issue is, that panel may be drawn, when mouse is over tool region,
which means, that `sequencer_tools_region_draw()` must look for whether
this is happening in preview or timeline region.
Pull Request: https://projects.blender.org/blender/blender/pulls/118292
This is generally more flexible and less error prone. The struct
implements a proper descructorfor this anyway. That also makes the
separate free function unnecessary-- it's redundant with the destructor.
Crash when dragging tree-item from one window to other instance of tree
view, with drop_target then nullptr. Returning null in this case lets
the process proceed normally and tooltip display correctly.
Pull Request: https://projects.blender.org/blender/blender/pulls/116892
This converts the "Layer Adjustments" from GPv2 into modifier setups in GPv3.
They include:
* Layer tint
* Layer thickness offset
* Thickness factor (for the entire object)
Both the "layer tint" and the "thickness factor" are converted using the existing modifiers.
Because the thickness modifier uses a factor instead of an offset, the "layer thickness offset" is converted to a geometry nodes modifier setup for each layer that adds an offset value to the radii instead of multiplying by a factor.
Pull Request: https://projects.blender.org/blender/blender/pulls/118149
It should not be possible to end up with an asset representation that
does not have a valid pointer/reference to the asset library owning it,
it's injected via all constructors. So reflect that by using a reference
instead of a (possibly null) pointer.
In GPv2, strokes could be edited using bézier curve handles. This was implemented by creating an `editcurve` for a stroke that would store the handles and other attributes.
In GPv3, we can directly make use of the `CURVE_TYPE_BEZIER` and store the curve as a bézier curve.
Note: This PR only handles conversion. Not rendering or anything else.
Pull Request: https://projects.blender.org/blender/blender/pulls/118386
Essentially move the Object-handling logic also into
`bke::greasepencil::convert::`. This code will also be needed for
automatic conversion on fileread etc.
It also helps to keep all the conversion logic in one place (especially
since there is going to be way more done at object level - modifiers,
animation, etc.).
Pull Request: https://projects.blender.org/blender/blender/pulls/118384
The CPU and GPU implementations of the compositor Texture node sample
the texture at different locations, producing differences. This is
primarly an issue with half pixel offsets to evaluate the texture at the
center of the pixels.
The CPU compositor only adds the offsets if interpolation is disabled,
regardless if the texture is of type image or not. Further the offset
was wrong, since it was not a half pixel offset, but a full pixel one.
The offsets should always be added, since it won't make a difference in
the non interpolated case, and it should always be added especially if
interpolation is enabled. A comment in the old code mentions something
about artifacts, but it is possible that this is a consequence of the
wrong offset that was used.
This patch always adds a half pixel offset, following the GPU code.
Pull Request: https://projects.blender.org/blender/blender/pulls/118377
A layer cannot be created e.g. when creating a reserved-name attributes
with the wrong domain/type.
Caused by 101d04f41f [which just did not
check if the layer creation was successful].
This should go into 3.6 LTS as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/118378
Currently, some compositor operations produce en empty output buffer by
specifying a COM_AREA_NONE canvas to indicate an invalid output, for
instance, when the Mask operation references an invalid mask. The
intention is that this buffer would signal that a fallback value should
fill the canvas of consumer operations.
The aforementioned behavior is currently implemented in a rather hacky
way, where it is implemented using the Translate operation as part of
canvas conversion in COM_convert_canvas, where the operation would clear
the entire buffer with zeros since out of bounds checking would always
take the out of bound case due to the empty buffer.
This behavior is problematic because we can't control the fallback
value, which would ideally be an opaque black color. Moreover, since
implicit type conversion happen before canvas conversion by design,
value typed buffers would eventually become transparent, which is rather
unexpected to the end user since float/value outputs can't have
transparency.
This is not a good design or implementation, but a redesign will be too
complex for now. So to fix this, we workaround it by handling the empty
buffer case explicitly in the Translate operation and fill the output
using a fallback black color, which works for both value and color typed
buffers, since this would also be the output of the value to color
implicit conversion.
Pull Request: https://projects.blender.org/blender/blender/pulls/118340
This reverts commit 31b8323b93.
Allocating memory in parallel is fine as long as each threads only
writes to the memory it allocates, which is the case here.
`BKE_lib_override_library_validate` used on fileread to ensure all
liboverrides are valid was using direct call to
`BKE_lib_override_library_free`. However, this was lacking the handling
of embedded dependencies (from liboverride PoV), in particular
ShapeKeys.
Since these shapekeys were still tagged as embedded liboverrides,
liboverride code would later assume their owner (mesh etc.) was also a
valid liboverride, leading to various potential issues.
Use instead `BKE_lib_override_library_make_local`, which also ensures
that embedded dependencies are handled properly.
The intend in the report was to rename a linked object in the NLA
channels. The operator to rename actually does everything right, it
detects that the object is linked and passes through to other operators.
The crash then happens in the attempt to select keyframes of channels
(also doubleclick n the keymap) -- in `select_anim_channel_keys`.
The problem is that `bAnimListElem` `key_data` cannot be expected to be
an `FCurve` in all cases. Code does though, it always casts, but this is
unreliable, basically this would fail for all of the "summary" channels
or any channel type (e.g. mask layers etc.), either it is NULL or
garbage data.
So to resolve, we just check the `bAnimListElem` type -- if it is not
ALE_FCURVE we can early out (preventing the crash).
NOTE: this changes behavior of double clicking on a summary channel that
cannot be renamed slightly in that it will not deselect its keys anymore
(it was not selecting any keys anyways, this is actually more in line of
what would happen if you just select another channel -- this also leaves
key selection alone -- so this is actually an improvement as well imho)
Pull Request: https://projects.blender.org/blender/blender/pulls/118251
Specialization constants was always switching shader even when the
constants were not changed. An early exit path was never taken.
The performance improvement should not be noticable to end users.
But would match with the intention of the design of specialization
constants.
Pull Request: https://projects.blender.org/blender/blender/pulls/118315
The File Output node crashes if it has no image input. That's because we
would be attempting to save a zero sized image. So ensure that the node
has a non zero canvas before saving anything.
The `FILE_PT_operator` panel used in the file browser does not correctly
allow the new UI layout panels to be drawn correctly.
The layout panels depend on drawing the background so that different
colors can denote each panel section. In the case of `FILE_PT_operator`,
this background drawing is skipped entirely leading to a situation where
there's no panel delineation at all.
Forcing the background to be drawn leads to a second problem where
the "typical" panel colors are not used in this part of the file
browser. We need to match the surrounding area otherwise a much
lighter shade of gray will be used and look out of place.
The fix is to extend the processing for PANEL_TYPE_NO_HEADER to account
for both of the above situations.
Pull Request: https://projects.blender.org/blender/blender/pulls/118231
This patch adds support for canceling compositor evaluations for the
realtime compositor. Only the canceling of the Denoise operation is
supported for now. That's because inter-operation canceling is not
feasible since all work will have been submitted to the GPU driver
before the user is able to cancel. So some kind of blocking operations
would need to used to actually allow canceling, which is not something
we are going to investigate as part of this patch.
Pull Request: https://projects.blender.org/blender/blender/pulls/117725