This replaces the older dynamic c array macros with blender::Vector in
bmesh_polygon_edgenet. This is the only remaining use of the old array
machinery and removal of `BLI_array.h / .c` can happen immediately
afterwards.
See #103343
Pull Request: https://projects.blender.org/blender/blender/pulls/119975
Documentation of the `gpu.state.active_framebuffer_get` is inconsistent.
It mentions `framebuffer_active_get`. I believe the cause is that the
C methods in the Python wrapper are named inconsistently.
This PR fixes this by making the wrapper + documentation consistent
with the top level API.
Pull Request: https://projects.blender.org/blender/blender/pulls/127677
Disable dynamic SDL loading as well as disable SDL for release builds.
This was only used for audio output which can already use OpenAL
if there are back-ends not natively supported by Blender.
- Remove extern/sdlew/
- Remove the WITH_SDL_DYNLOAD build option.
- Remove `bpy.app.sdl.available`.
Ref !127554
Accessing `bl_rna` for type defined in `scripts/modules/bpy_types.py`
could return their parent-classes RNA when accessed via their parent
types __subclasses__() method.
The type of an RNA types "bl_rna" should be `bpy.types.Struct`,
it was being set to the type it represented so:
`type(bpy.types.Object.bl_rna) == bpy.types.Object`
which wasn't correct.
Ref !126877
Co-authored-by: Bastien Montagne <bastien@blender.org>
This is just not supported, and typically not doable from Blender UI
(since embedded IDs won't be listed in ID template list).
Add asserts to IDProp code itself, and checks & error reports in
relevant BPY and RNA setters.
Use snake style naming for all the kernel nodes functions.
Omit kernel prefix in the names since of the using namespace.
Use full forms of the terms
('iter' -> 'iterator', 'ntree' -> 'node_tree', 'rem' -> 'remove', ...).
Pull Request: https://projects.blender.org/blender/blender/pulls/126416
API: merged IMB_scalefastImBuf, IMB_scaleImBuf, IMB_scaleImBuf_threaded
into one function IMB_scale with enum IMBScaleFilter {Nearest, Bilinear, Box}
and bool "threaded" param.
Performance:
- Box filtering (nee IMB_scaleImBuf) can be multi-threaded now.
- Nearest filtering (nee IMB_scalefastImBuf) can be multi-threaded now.
Also fix performance regression on float images caused by fix in #126234
- Bilinear filtering (nee IMB_scaleImBuf_threaded) is several times faster now.
Correctness:
- Nearest and Box filtering: no longer loses half of edge pixels when scaling
up.
- Box: fixed garbage results (and possible out of bounds reads) for non-4
channel float images.
- Bilinear: no longer shifts image when scaling up.
- Bilinear: properly filters when scaling down by 2x2.
Test coverage:
- Add gtest coverage for various IMB_scale modes.
- Add a IMB_performance_test performance test, ran manually.
More details, images and performance numbers in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/126390
Previously, values for `ID.flag` and `ID.tag` used the prefixes `LIB_` and
`LIB_TAG` respectively. This was somewhat confusing because it's not really
related to libraries in general. This patch changes the prefix to `ID_FLAG_` and
`ID_TAG_`. This makes it more obvious what they correspond to, simplifying code.
Pull Request: https://projects.blender.org/blender/blender/pulls/125811
Expose arguments to use when creating a Python sub-process.
Python could fail to start when loaded in a customized environment,
with PYTHONPATH set for e.g. Blender ignores these and loads but a
Python sub-process attempts to use these environment variables which
may point to incompatible Python versions.
Resolve the root cause of #124731.
Calling `foreach_get/set` on a collection property did not trigger
a property update. In the attribute API, this lead to missing
updates after e.g. setting the values of an attribute.
This adds a call to `RNA_property_update` for the getter/setter
bpy rna function and adds a property update callback to all the
different attribute collection properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/125518
Match function and declaration names, picking names based on
consistency with related code & clarity.
Also changes for old conventions, missed in previous cleanups:
- name -> filepath
- tname -> newname
- maxlen -> maxncpy
No functional changes intended.
This simplifies the arguments for the `delete_keyframe` function.
The `bAction *` was always a `nullptr` so I just removed it.
The rna path char array and the array index were merged into the `RNAPath` struct.
Pull Request: https://projects.blender.org/blender/blender/pulls/125479
Regression from [0], drivers were tagged as being disabled with a flag
that was never cleared. Causing the label to be displayed for files
where the expressions were enabled and in use.
Resolve by clearing this flag on file load and when re-compiling
expressions - since an expressions block flag may be cleared if it
becomes a simple expression.
[0]: 1a8053939b
This commit moves generated `RNA_blender.h`, `RNA_prototype.h` and
`RNA_blender_cpp.h` headers to become C++ header files.
It also removes the now useless `RNA_EXTERN_C` defines, and just
directly use the `extern` keyword. We do not need anymore `extern "C"`
declarations here.
Pull Request: https://projects.blender.org/blender/blender/pulls/124469
When using a python expression, its execution is disabled by
default unless specified differently in the user preferences.
Previously this only produced the error
"Error: Invalid Python expression". However that isn't really the correct error.
Now the error reads "Python restricted for security".
I've added a new flag to the driver `DRIVER_FLAG_PYTHON_BLOCKED` that is set
if the driver can't run because python is blocked
Co-authored by Phillip Oeser
Pull Request: https://projects.blender.org/blender/blender/pulls/124587