[Bf-committers] Split Collada into a python frontend and a C++ backend
Gaia
gaia.clary at machinimatrix.org
Sun May 20 12:47:34 CEST 2012
Hi.
I'd like to propose and offer the implementation of a simple change
to the Collada module:
* I want to replace the user interface of the Collada module by a
python based io addon and then simply call the internal Collada
module from that addon. (I have this addon already finished)
This allow us to enable/disable Collada like all other io modules.
* I want to add the ability to export a collection of Mesh instances
for special purposes like:
- add target specific checks
- modify objects to satisfy constraints of the target system
===================================
The implementation is straight forward:
===================================
- Make the existing COLLADA entries invisible
I can get them out of the way by removing these lines from
wm:operators.c
#ifdef WITH_COLLADA
/* XXX: move these */
WM_operatortype_append(WM_OT_collada_export);
WM_operatortype_append(WM_OT_collada_import);
#endif
My problem here: When i remove these lines, then i no longer
know how i can access the Collada Importer/Exporter
from a Python script since the operators are no longer available.
- Create the python based "Blender Collada" addon
Just for the GUI. The addon does nothing else (at the moment)
than calling the Blender importer/exporter (works for me as long
as the "official" Collada exporter is also available, see above)
- auto enable the "Blender Collada" addon
I think this is just done by modifying the default start blend file ?
- Also allow to export Mesh instances instead of Objects:
Mesh new_mesh = object.to_mesh()
# manipulate the new_mesh
export it to collada (here we need an access function which
allows to feed the collada exporter with Mesh objects from python )
========
I would only need some help when it comes to defining the
access functions from Python to the internal Collada module.
I can do all the rest by myself.
Opinions ?
thanks,
Gaia
More information about the Bf-committers
mailing list