Sybren A. Stüvel 815337a7da Anim: add ensure parameter to KeyframeStrip.channels(...) RNA function
Add `ensure` boolean parameter to the `ActionKeyframeStrip.channels()` RNA
function. Passing `ensure=True` will ensure the channelbag for the given
action slot handle exists. This makes it more straight-forward to create
F-Curves for a slot regardless of whether there already was a channelbag
for those F-Cuves:

```python
strip = action.layers[0].strips[0]
slot = action.slots[0]

# Old:
channelbag = strip.channels(slot.handle)
if not channelbag:
    channelbag = strip.channelbags.new(action_slot)
ob_loc_x = channelbag.fcurves.new('location', index=0)

# New:
channelbag = strip.channels(slot.handle, ensure=True)
ob_loc_x = channelbag.fcurves.new('location', index=0)
```

Pull Request: https://projects.blender.org/blender/blender/pulls/133678
2025-01-31 15:16:10 +01:00
2025-01-31 15:07:11 +11:00
2023-12-08 13:28:13 +11:00
2025-01-08 16:42:50 +01:00
2025-01-31 15:07:11 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%