Damien Picard 7f0d15b31f Python: Add new APIs to collection.exporters
Add three new RNA functions to `bpy.types.CollectionExports`:
- `collection.exporters.new('IO_FH_alembic', name="Alembic")`
- `collection.exporters.remove(exporter)`
- `collection.exporters.move(0, 1)`

which allow to respectively create, remove, and reorder collection
exporters. Previously, they were only achievable using operators and
not the Python data API.

Example usage:

```python
C.collection.exporters.new("test")
# Traceback (most recent call last):
#   File "<blender_console>", line 1, in <module>
# TypeError: CollectionExports.new(): error with argument 1, "type" -
#   enum "test" not found in ('IO_FH_alembic', 'IO_FH_usd',
#   'IO_FH_obj', 'IO_FH_ply', 'IO_FH_stl', 'IO_FH_fbx')

usd_exporter = C.collection.exporters.new('IO_FH_usd')
usd_exporter.filepath = "//exp.usd"

stl_exporter = C.collection.exporters.new('IO_FH_stl')

C.collection.exporters.move(0, 1)
C.collection.exporters.remove(stl_exporter)
```

The exporter UIList was updated to add arrows calling the move
operator.

Co-authored-by: Pratik Borhade <pratikborhade302@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141076
2025-07-03 11:58:07 +02:00
2025-06-30 17:21:10 +10:00
2023-12-08 13:28:13 +11:00
2025-05-12 11:34:32 +02:00
2025-03-12 21:55:59 +11:00
2025-06-12 10:37:47 +02: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%