- Add a custom Iterator, so it can be iterated as a 1D list.
- Add missing functions like `first`, `is_empty`, `clear`, and
subscript operator.
- Add a `size_` member variable for faster `size` calls.
- Add compile-time asserts to ensure the Capacity sizes are valid.
- Add unit tests.
See #138947 for the motivation behind this.
Pull Request: https://projects.blender.org/blender/blender/pulls/139102
Caused by 4bf34d9591.
Quite a bit of complexity used to avoid moving both nodes and their
frame parents is redundant now, since all connected nodes should
be moved and moving frames doesn't also affect the nodes inside
anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/139306
This probably have occured after migration from UIList. When nodetree ID
is linked form another file, disable the layout for individual rows and
the add/remove operator. Also tweak `supports_renaming()` function so that
individual tree element cannot be renamed when linked.
Pull Request: https://projects.blender.org/blender/blender/pulls/139269
How solid/faded the edges of a Grease Pencil stroke is
controlled by the `softness` attribute. This change adds a
node that exposes that attribute, allowing the user to
control it via Geometry Nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/138939
When strip is added, operator first finds "best" channel to place a
strip in, then adds new strip to that channel and finally does check if
the strip is overlapping other strips. If it does, it handles the
overlap.
To prevent adding strip to locked or muted channel, fix has to be done
at 2 places:
- `sequencer_generic_invoke_xy_guess_channel` which finds the "best"
channel
- `transform_seqbase_shuffle_ex` which handles overlap.
Further check for free channels was added to all strip add operators.
If there is no space above channel, that user selected, error is
displayed and operator is cancelled.
Note, that `transform_seqbase_shuffle_ex` is used only for resolving
overlaps where strip position in time must stay constant, so it moves
the strips in Y axis. This PR does not affect user selectable
`overlap_mode`.
Pull Request: https://projects.blender.org/blender/blender/pulls/136016
Node sockets have many different aspects that affect their visibility and
whether they are grayed out. This patch cleans up the methods used to check if
sockets are visible and adds descriptions that should make it more obvious which
ones should be used.
This also fixes a few places where the wrong method was used which is more
obvious now.
Pull Request: https://projects.blender.org/blender/blender/pulls/139251
The main goal of this patch is that the column widths and ordering is not reset
every time one switches between different contexts.
It does that by keeping track of multiple `SpreadsheetTable`. There is one for
each table that is viewed (so e.g. the point and edge domain of the same mesh
are two different tables). Each table has an identifier and an array of columns.
There is some garbage collection in place so that the number of stored tables
does not increase unbounded.
This also comes with an updated Python API:
```python
import bpy
spreadsheet = bpy.context.screen.areas[...].spaces.active
active_table = spreadsheet.tables.active
print(active_table.id.type)
print(active_table.id.attribute_domain)
print(active_table.columns[0].id.name)
```
In the future, we might add some smarter logic to keep tables with different
identifiers more in sync. We don't have a great heuristic for that yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/139205
Compositor node sockets should be updated when toggling grease pencil
pass in the pass list. It was missing a `rna_ViewLayer_pass_update`, now
it will work as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/139215
Reduces the number of parameters passed in `sculpt_undo.cc`,
additionally the `const` specifier is misleading here, as the
`SculptSession` is modified via the `Object` reference.
Pull Request: https://projects.blender.org/blender/blender/pulls/139252
The topology automask setting uses the active vertex when precomputing
the cache at the beginning of a stroke. This value can be invalid when
the brush stroke doesn't start on the mesh.
For example, this can happen with brush strokes that use a projected
instead of spherical falloff due to more BVH nodes being included in the
initial coarse check.
To fix this, simply check for the existence of the active vertex and
early exit if it is not valid.
Pull Request: https://projects.blender.org/blender/blender/pulls/139234
This was an alternative way to write properties for layout operator buttons,
for the most cases are more than enough to use the returned pointer.
There were just 2 cases where this was useful, the quick access menu
that reuses operator property values, this now overrides the id property group
data pointer generated for the operator, also for `uiItemsFullEnumO_items`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139242
Cleanup and simplification of GPUMaterial and GPUPass compilation.
See #133674 for details/goals.
- Remove the `draw_manage_shader` thread.
Deferred compilation is now handled by the gpu::ShaderCompiler
through the batch compilation API.
Batch management is handled by the `GPUPassCache`.
- Simplify `GPUMaterial` status tracking so it just queries the
`GPUPass` status.
- Split the `GPUPass` and the `GPUCodegen` code.
- Replaced the (broken) `GPU_material_recalc_flag_get` with the new
`GPU_pass_compilation_timestamp`.
- Add the `GPU_pass_cache_wait_for_all` and
`GPU_shader_batch_wait_for_all`, and remove the busy waits from
EEVEE.
- Remove many unused functions, properties, includes...
Pull Request: https://projects.blender.org/blender/blender/pulls/135637
Use a similar convention for struct member identifiers,
(the identifiers without surrounding spaces). This allows the values
to be scanned and validated.
When enabled, this normalize the strength by the light area, to keep
the total output the same regardless of shape or size. This is the
existing behavior.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA.
For add-ons, an API function to compute the area is added for conversion,
in case there is no native support for normalization.
area = light.area(matrix_world=ob.matrix_world)
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/136958
Similar to other renderers, this adds a temperature property to set the
light color using blackbody emission. This can be more convenient than
using nodes, and can improve interop with other software.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.
Pull Request: https://projects.blender.org/blender/blender/pulls/134303
Similar to other renderers, this adds an exposure property to multiply
the light power by 2^exposure. This can be more convenient to control
a wide range of values.
This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.
Pull Request: https://projects.blender.org/blender/blender/pulls/134528
This has been causing some confusion because it is in radiometric units
rather than photometric, which is how real world lights are typically
specified. With the addition of exposure and normalize options this
also becomes less clear.
Ref #134528
As noted in the removed comment, python has better
syntax for assigning operator properties values, as:
``` py
op = layout.operator('my_operator')
op.string_prop = "value"
```
Code has been unused since e0fc6d0c33
Pull Request: https://projects.blender.org/blender/blender/pulls/139243
Previously, we were drawing the context path in the header of the spreadsheet.
However, that had some problems:
* When using a viewer that's somewhere deep in a node group, the viewer path
wouldn't fit.
* Standard editor menus didn't fit in. Also we wanted to add spreadsheet
specific operators that should be in a new menu.
* Couldn't fit more useful data for the context path (like the inspection index
for repeat zones).
This patch solves this by moving the entire context path to the left side bar.
This frees up the header for menus.
The new context panel information is added at the top of the side bar because
then there is a proper hierarchy: `Object > Evaluation State > Viewer Path
(optional) > Instance Selection > Domain Selection`
This patch also adds information about the current inspection index for for-each
and repeat zones. They are not editable yet, but that can be implemented
separately as it might require a few more changes for everything to update
correctly.
The new Viewer Path panel is only displayed when actually showing viewer data.
Pull Request: https://projects.blender.org/blender/blender/pulls/138477
The stencil value was also considered and could lead to out of range
depth values. These were ignored by operators and could lead to
printing errors, canceling operators, or inaccurate depth
selection.
This is a NVIDIA only issue as these GPU support DEPTH24S8 textures.
We should consider defaulting to DEPTH32FS8.
Pull Request: https://projects.blender.org/blender/blender/pulls/139272
If the `transdata_check_local_islands` check does not succeed, we end up
with `CTX_NO_PET` for scaling/rotation.
For `Grease Pencil`, this was lost in the transition from GPv2 > GPv3
(type was renamed to "legacy", then removed from
`transdata_check_local_islands` in a804320138, but the new type was
never added).
Curves never specified support for this, but both types are (in theory)
taking into account `V3D_AROUND_LOCAL_ORIGINS` in
`curve_populate_trans_data_structs` (logic from 9d86fada03 might be a
bit broken for proportional editing "islands" without anything selected
as reported in #139101, but that will be corrected in another PR).
So to resolve, add `Grease Pencil` and `Curves` as supported object
types in `transdata_check_local_islands`
NOTE: `transdata_check_local_center` already has these two types as
well.
Part of #139101
Pull Request: https://projects.blender.org/blender/blender/pulls/139209
Add back the deprecated format to avoid asserts.
GPU backends should still have the code to support them.
Also add deprecation warnings as these types will be
removed for 5.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/139213
This promotes any INT_TO_FLOAT attribute to F32 and
to the float promotion inside python `attr_fill`.
We issue a deprecation warning when hitting this path.
Raise an error is the component type is not integer.
Pull Request: https://projects.blender.org/blender/blender/pulls/139206
It can happen that the previous context drew with a different
colorspace. In the case where the new context is drawing with
the same shader that was previously bound (shader binding
optimization), the uniform would not be set again because the
dirty flag would not have been set (since the color space of
this new context never changed). The shader would reuse the same
colorspace as the previous context framebuffer (see #137855).
Fix#137855
Pull Request: https://projects.blender.org/blender/blender/pulls/139226
Support parsing C style comments such as:
`char filepath[/*FILE_MAX*/ 1024]`
This is done by skipping white-space inside square brackets
so the value is read as:
`char filepath[1024]`.
Ref: !139196