Age | Commit message (Collapse) | Author |
|
`<some_id>.keyframe_insert()` now sends a notifier that animation data
was changed, so that animation-related editors can properly refresh.
Since this function is quite high-level (if necessary it creates the
Action and FCurves), I thought this would be a suitable location for the
notifier. If high keyframing speed is required, it is still recommended
to use `FCurveKeyframePoints.insert(options={'FAST'})` instead.
|
|
Also add groups in some files.
|
|
Use "filepath" which is the current convention for naming full paths.
- Main use "name" which isn't obviously a file path.
- BlendFileData & FileGlobal used "filename" which is often
used for the name component of a path (without the directory).
|
|
These arguments must be non-null for useful functionality,
there is no need for paranoid checks.
The return value in case of invalid input for BPY_run_string_as_number
was also wrong (casting -1 to a bool, when false was expected).
|
|
Also add ATTR_NONNULL function attributes.
|
|
Ref T92709
|
|
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
|
|
|
|
`BKE_blendfile_link_append` module.
Note that this fully replaces the 'PyCapsule' storage of linked/appended items
in the python API code by the generic storage of items in the
`BlendfileLinkAppendContext` data.
Maniphest Tasks: T91414
Differential Revision: https://developer.blender.org/D13331
|
|
|
|
|
|
The main goal of this refactor is to make BPath module use `IDTypeInfo`,
and move each ID-specific part of the `foreach_path` looper into their
own IDTypeInfo struct, using a new `foreach_path` callback.
Additionally, following improvements/cleanups are included:
* Attempt to get better, more consistent namings.
** In particular, move from `path_visitor` to more standard `foreach_path`.
* Update and extend documentation.
** API doc was moved to header, according to recent discussions on this
topic.
* Remove `BKE_bpath_relocate_visitor` from API, this is specific
callback that belongs in `lib_id.c` user code.
NOTE: This commit is expected to be 100% non-behavioral-change. This
implies that several potential further changes were only noted as
comments (like using a more generic solution for
`lib_id_library_local_paths`, addressing inconsistencies like path of
packed libraries always being skipped, regardless of the
`BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value,
etc.).
NOTE: basic unittests were added to master already in
rBdcc500e5a265093bc9cc.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D13381
|
|
|
|
Collection property only accepts PropertyGroup type, not ID ones.
Reported on IRC by @frameshift, thanks.
|
|
|
|
Reviewed By: fclem
Differential Revision: D13235
|
|
Allow the use of floating-point values for font point sizes, which
allows greater precision and flexibility for text output.
See D8960 for more information, details, and justification.
Differential Revision: https://developer.blender.org/D8960
Reviewed by Campbell Barton
|
|
|
|
rB60fee69682ac39 only partially fixed the issue, `BlendFileReadReport
bf_reports` was now properly stored in `BPy_Library` `self` for the
lifetime of the context, but its `reports` member was still referencing
local variable to `bpy_lib_enter` function.
|
|
Expose a new function in `bpy.utils.flip_name(name, strip_number=False)
that allows flipping bone names, eg "Bone.L" -> "Bone.R".
Useful for add-ons to avoid re-implementing Blender's name flipping.
Ref D12322
|
|
|
|
Caused by 4e09fd76bcab.
|
|
Python isn't doing any conversion here. We just do a regular lookup of
the given enum identifier in the RNA enum definition.
|
|
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX`
operator context enum. This adds type safety, allows the compiler to
produce better warnings and helps understanding what a variable is for.
Differential Revision: https://developer.blender.org/D13113
Reviewed by: Campbell Barton
|
|
|
|
Non integer types raised an OverflowError, even when non-number
types were passed in.
Now the error from Python is kept.
|
|
Calling it with a None argument, or no arguments, or with a property
that is missing UI data for some reason would fail. There is no
particular reason why ensuring those things don't happen is helpful,
so just add null checks for safety.
Differential Revision: https://developer.blender.org/D13024
|
|
|
|
Fixes several notable mistakes and missing information
regarding the API documentation (*.rst).
This will allow API stub generators like bpystubgen or
fake-bpy-module to produce more accurate result.
Differential Revision: https://developer.blender.org/D12639
|
|
|
|
The lead only occurred when Python references were leaking as well.
|
|
Raise an exception when target properties have not been set.
|
|
|
|
|
|
|
|
Document that `bpy.msgbus.subscribe_rna()`-registered messagebus
subscriptions will be cleared whenever a new blend file is loaded.
Passing `options={'PERSISTENT'}` has no influence on this behaviour.
|
|
|
|
|
|
|
|
|
|
Added optional `name` argument to `GPUShader` constructor
(defaults to `pyGPUShader`), and added `name` getter to `GPUShader`.
Ref D12393
Reviewed By: campbellbarton, jbakker
|
|
Use `_PyThreadState_UncheckedGet()` to check that the current thread is
tracked by Python before checking whether it has the GIL. The latter
will abort when the former is false.
|
|
Evaluating the dependency graph potentially executes Python code when
evaluating drivers. In specific situations (see T91046) this could
deadlock Blender entirely. Temporarily releasing the GIL when evaluating
the depsgraph resolves this.
This is an improved version of
rBfc460351170478e712740ae1917a2e24803eba3b, thanks @brecht for the diff!
Manifest task: T91046
|
|
No functional changes.
|
|
Line endings are already added.
|
|
Error in format passed in `PyArg_Parse`
|
|
Another typo in this section of code.
|
|
Add a version of RNA_path_resolve_full that returns true
when the path resolves to a NULL RNA pointer.
|
|
There was no convenient way to check if the owner
of a mathutils type was valid.
Added to support issue reported in T91111.
|
|
This reverts commit 2aad8fc7bc2a45d5f749430c7cb9b82b9f6c9e49.
It was a commit without proper review.
A better API needs to be discussed.
|