KhronosGroup / OpenCOLLADA

652 stars 252 forks source link

Python API for OpenCollada ? #436

Closed gaiaclary closed 8 years ago

gaiaclary commented 8 years ago

Hi; I am currently maintaining the Collada module in Blender. This has turned out to have become a real pain over the years, mostly because it is not so easy to move the data around inside Blender. Also not many people are capable (or want to take the time) to do this sort of work on C++ level inside Blender.

So... after a long long time of endless discussions there is a strong tendency to replace the c-based collada module by a Python based Blender Addon. The main reason for this approach is that its much easier (and has more capable developers) to implement and maintain a python based Addon for import/export. Any ongoing development can then also be fully decoupled from the blender main development. But ...

I know that Collada is huge and creating our own Blender Python library for Collada is sort of an insane idea. I am not sure if the already available python modules (e.g. pycollada ) are anywhere near to what OpenCollada provides. But i believe that using OpenCollada as a basis is actually a good decision. So this leads to the idea of creating an OpenCollada Python API.

Do you guys think this is feasible and doable? Can we expect to get some help/support on this possible project? I personally believe that the Python API for OpenCollada should be part of the OpenCollada distribution...

So what do you think ?

RemiArnaud commented 8 years ago

I think we could even go further in sharing / helping each other:

What about including Blender openCOLLADA based import/export plugin in this github/KhronosGroup/OpenCOLLADA repository ? Sibling to the Max and Maya plugins

This would make sure that Blender plugins are built and compiled and distributed with each change of openCOLLADA. In the near future some automatic testing would also be run during the PR process. We would have to decide on the subset of blender targets (windows, osx, unix*, and what version to support), but this could be a great help in general for developing and maintaining quality Collada support for Blender community?

This could also help with interoperability between tools, Blender can redistribute all the openCOLLADA plugins to avoid users suffering with Autodesk limited Collada import/export. Also we'd have one place to share extensions for sure, so that the Collada pipeline can provide advanced features for Blender users - for example physics support.

The openCOLLADA project could then become a physical location for collaboration between Blender community and Khronos group.

What do you think?

jesterKing commented 8 years ago

I think what @gaiaclary is after is a Python API on top of OpenCOLLADA to start with. So a way to write importers and exporters using Python rather than with C++.

With such an API in place in OpenCOLLADA it could very much be a good idea to have a Blender exporter/importer plug-in part of the OpenCOLLADA repository. The current OpenCOLLADA integration in Blender isn't currently very pluggable and as such doesn't lend itself yet for inclusion into other repositories.

RemiArnaud commented 8 years ago

Make sense.

We just have to get a contribution agreement in place betwee Khronos and Blender and we can get this going.

I would make sure this is part of build and distribution. And in the near future also allow full Blender plugin added to project

If you agree lets get a email thread going, will include Ton and Neil and make it happen? Remi (at) ACM (dot) org

gaiaclary commented 8 years ago

I was thinking of a system with 3 ingredients:

1.) The OpenCollada Library as we have it today 2.) The Python Api module which can be imported into python like any other python module 3.) The Blender Collada Addon for Import and Export which uses the OpenCollada Python API

I guess that the first 2 parts of the list above should be fully maintained in the OpenCollada repository, so that it is guaranteed the API always reflects the capabilities of the Library.

The third part (the Blender Addon) would just use the OpenCollada library and its API but is otherwise fully decoupled from the OpenCollada development, so that Blender developers can choose to update to a new Collada library version whenever necessary.

From the practical part i guess that we could for example simply deliver the OpenColladaLibrary plus the Python API together with the Blender distribution (as third party library) and then let the Python developers just use the library to create their Addons.

And of course it would be a nice extra benefit to have the Blender default Collada module also in the list of OpenCollada plugins.

Does that make sense?

RemiArnaud commented 8 years ago

Yes, this make sense. We need to discuss this over email thread and include the right people.

This is a Khronos repository, and contributions need to respect specific licensing agreements from contributor so we can guarantee right of use for end user.

gaiaclary commented 8 years ago

Hi, RemiArnaud

So maybe it is time now to find some experts who can actually tell how this API can possibly be implemented in a convenient way. How would the email thread be started?

I have 2 more remarks:

RemiArnaud commented 8 years ago

I don't know anything about Python or Blender, and the contribution I have offered would be limited to run build on various platforms, test and PR process for this new 'product' or openCOLLADA. Making sure that the python API pass its tests as the openCOLLADA project evolves.

The email I mentioned was not about finding python expert, but about allowing Blender community direct contribution to Khronos open-source repository.

gaiaclary commented 8 years ago

Hi, Remi;

I basically asked for 2 things (see last chapter of my initial post above):

You added that you would allow us to provide a Blender Addon on the OpenCollada repository and you would help by providing a build environment that ensures that the Python API always uses the newest OPenCollada library version.

So my basic questions have been answered. Now i have to think about the next steps. Thanks for now :)

RemiArnaud commented 8 years ago

questions answered, so closing issue for now. reopen or open new one if needed