Improve handling of runtime defined python RNA properties. Mainly:
* Add `get_transform` and `set_transform` new callbacks.
These allow to edit the value, while still using the default
(IDProperty-based) storage system.
* Read-only properties should now be defined using a new `options` flag,
`READ_ONLY`.
* `get`/`set` should only be used when storing data outside of the
default system now.
* Having a `get` without a `set` defined forces property to be
read-only (same behavior as before).
* Having a `set` without a `get` is now an error.
* Just like with existing `get/set` callbacks, `get_/set_transform`
callbacks must always generate values matching the constraints defined
by their `bpy.props` property definition (same type, within required
range, same dimensions/sizes for the `Vector` properties, etc.).
* To simplify handling of non-statically sized strings, the relevant
RNA API has been modified, to use `std::string` instead of
(allocated) char arrays.
Relevant unittests and benchmarking have been added or updated as part
of this project.
Note: From initial benchmarking, 'transform' versions of get/set are
several times faster than 'real' get/set.
Implements #141042.
Pull Request: https://projects.blender.org/blender/blender/pulls/141303
Maintenance4 contains the maxBufferSize property that contains the
maximum allowed buffer allocation.
This PR uses this property to precheck if allocations will fail. It
was an attempt to improve the reliability of failing allocations but
currently they fail at the driver side.
Pull Request: https://projects.blender.org/blender/blender/pulls/145555
No functional changes intended.
This removes the unused function `UI_view2d_draw_scale_y__block`
and renames the functions that are `static` to follow the conventions.
Pull Request: https://projects.blender.org/blender/blender/pulls/145342
This node is really just a function node. The main thing that's somewhat special about
it is the implicit input for the id, but that's supported for function nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/145549
Raytracing pipeline in EEVEE interpolates in time for better results.
But depending on the interpolation could try to load a sample that isn't
available.
This PR fixies this for planar probes and screen tracing. In screen
tracing the issue wasn't visible as it the background samples are
always cleared.
This has an expected performance penalty but it could require an
overhaul of EEVEE raytracing for a more efficient solution.
Pull Request: https://projects.blender.org/blender/blender/pulls/145508
Currently, `InferenceValue` contains either a primitive value or is in the
"unknown" state. Previously, all code had the assumption that when the value is
not unknown, it is a primitive value. However, that may not be true anymore when
we support inferencing through e.g. bundles and closures as those are not
"primitive". This assumption is removed now, non-primitive values have not been
added yet though.
Pull Request: https://projects.blender.org/blender/blender/pulls/145532
The code to find output-to-input edge matching missed a case where
both vertices of the output edge existed in the input, but were in
different input meshes.
Value and usage inferencing can be done independently. Usage-inferencing uses
the value-inferencing but not the other way around. Extracting value-inferencing
makes the separation more clear and also simplifies potentially reusing the
value-inferencing code later on.
Pull Request: https://projects.blender.org/blender/blender/pulls/145492
When instanced meshes were using FBX geometric transforms, the code
was not telling ufbx to create proper adjustment helper nodes due to
UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY_NO_FALLBACK flag.
That flag was put in earlier, before import of armatures was solidified,
turns out using the proper flag (UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY)
is not a problem anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/145527
Underlying reason here is just that whenever a region gets too large to
still be displayed in an area, it simply gets hidden.
This is expected (but also reported elsewhere, see #122277).
It has seen some reports though and it seems we can actually prevent the
AssetShelf from getting too high (and thus being hidden) in case many
rows are used and preview size is increased by automatically decreasing
row count.
Pull Request: https://projects.blender.org/blender/blender/pulls/145117
This applies an OpenColorIO display, view and look transform on a color
in the scene_linear colorspace.
In general, OpenColorIO configurations do not contain a colorspace for
every view + display, especially if they are modern configs using the
display colorspace and shared view mechanisms. Nor do they include looks.
So the Convert Colorspace node is not sufficient.
Additionally, we would like to avoid making the colorspace list too long
in the default config, as we are adding many new views and transforms.
Exposure, gamma curves and white point functionality are not included
in this node, as there are native ways of doing that in the compositor.
These settings are marked non-editable in the Python API.
Pull Request: https://projects.blender.org/blender/blender/pulls/145069
How to reproduce:
- Load an image with random values
- Set sampler size to 1 (default)
- Sample a random image on a pixel
- Set sampler size to 64 (max)
- Sample the same image on the same pixel
- Notice how the value doesn't change
Pull Request: https://projects.blender.org/blender/blender/pulls/145318
Mistake in refactor of Relocate code in a1abf9a64e, the handling of
cases where a valid (exisitng, missing linked placeholder ID) was not
found in the searched library(-ies) was not handled properly in the new
code.
These need to be ignored by remapping from old to new (relocated) IDs,
since it's better to keep the placeholder 'empty reference' IDs, than
remap to null!
Multiple previous changes made resource pools obsolete. Resource
pools were used to keep track of resources when the frame is rendered.
Multiple frames can be rendered at the same time and resources could
overlap.
This has been replaced (not this commit) to be part of the render graph
and when an submission has completed the resources are recycled.
Continuation of: https://projects.blender.org/blender/blender/pulls/145408
Pull Request: https://projects.blender.org/blender/blender/pulls/145511
Add the `SKIP_SAVE` option to the 'Paste Global Transform' operator
properties.
This fixes a bug with following repro steps:
- Specify a relative object
- Use relative copy/paste
- Try to use non-relative copy/paste
- It will fail because after you used the relative paste operator, the
`use_relative` property is saved for ever as True.
Pull Request: https://projects.blender.org/blender/blender/pulls/145262
Previously, if a user extruded a curve with the Pen tool and held down
the `Ctrl` modifier key, the right handle would always be moved
independently. This should not happen when extruding a curve from
the beginning.
This pull request adds a check that will determine if the left handle
is currently selected when extruding a curve. This is the case, when
extruding a curve from the beginning. Then, the left handle will be
moved independently, instead of the right handle.
Pull Request: https://projects.blender.org/blender/blender/pulls/145235
When baking to textures, bake only to selected (and active) images, as
opposed to all active images. previously the targets were all active
images in all materials. This made it very unclear which images were
baked to, as images can be active without being selected. It also made
it impossible to *not* bake to any image in a material since there is
always an active image as long as an image texture node exists. This
often lead to accidentally overwriting images of existing PBR materials.
Baking only to selected images fixes the workflow where you have a model
with multiple materials where you only want to bake some of them. For
example a model with a PBR material for the roof and a procedural bricks
material for the walls. On export you want to bake the procedural
bricks, but not the PBR roof.
This is an API breaking change.
Pull Request: https://projects.blender.org/blender/blender/pulls/137389
This PR adds code for setting the Quality of Service (QoS) level of the
process on Windows. This can, e.g., make sure that on hybrid systems
P-cores are utilized even when the app window is out of focus.
In the following cases, it is adjusted from the default behavior:
- In wm_jobs.cc the QoS level is raised while a priority job is running.
- The command line option `--qos [high|eco|default]` can be used to
change the QoS level of the process.
- By default, the QoS level is raised for the EEVEE performance tests,
as they check viewport rendering performance and would otherwise be
reliant on never going out of focus to not get a downgraded QoS level.
By default, they are created with an out of focus window at the time
of landing this PR. This PR makes sure that they actually measure the
animation replay performance attainable during real-world use.
Pull Request: https://projects.blender.org/blender/blender/pulls/144224
Errors produces by the viewport compositor always persists even after
their cause is fixed. That's because the error message is not cleared
before execution, which this patch fixes.
Multiple previous changes made resource pools obsolete. Resource
pools were used to keep track of resources when the frame is rendered.
Multiple frames can be rendered at the same time and resources could
overlap.
This has been replaced (not this commit) to be part of the render graph
and when an submission has completed the resources are recycled.
Pull Request: https://projects.blender.org/blender/blender/pulls/145408
The material slot index check in `add_single_point_and_curve` in
`grease_pencil_pen.cc` would check if the selected material slot index
was not 0.
I think the idea was to check if there isn't any active material slot
selected, in which case
`const int material_index = this->vc.obact->actcol - 1;`
would return -1.
This PR just changes the check value from 0 to -1.
Pull Request: https://projects.blender.org/blender/blender/pulls/145473
The Clay and Clay Strips brush have a built-in hardcoded Plane Offset of
0.40m and 0.18m, respectively. This value is added to the displacement
scalar after the pressure sensitivity is factored into the calculation,
leading to the pre-bundled essential assets not responding to tablet
pressure when enabled and potentially confusing behavior otherwise.
Pull Request: https://projects.blender.org/blender/blender/pulls/144382
Caused by #143974.
Allow `use_sequence_detection` and `use_placeholders` to be
automatically drawn by `sequencer_add_draw_check_fn` when applicable
instead of unconditionally adding it to the UI.
Ordering of these two can be preserved by swapping the original
`RNA_def_boolean` calls.
Pull Request: https://projects.blender.org/blender/blender/pulls/145431