Page MenuHome

DocumentImpoerted.cpp uses new OpenCollada library
Closed, ArchivedPublicPATCH

Description

I noticed, that OpenCollada in Blender was built from sources revision 641, but now revision 721 is avaliable. API in new sources was changed a bit:

* Classes TextureCoordinateBinding, MaterialBinding, TextureCoordinateBindingArray and MaterialBindingArray were moved from namespace COLLADAFW::InstanceGeometry to COLLADAFW.
* TextureCoordinateBinding and MaterialBinding are now classes (not structures), so we shouldn't use direct field accessing.
* InstanceController is not the same as InstanceGeometry now. This classes are inherited from InstanceBindingBase<ClassId classId> with different classId.
* There is no more Texture::Texture() constructor. New constructor get's the UniqueId parameter.

I made changed in source/blender/collada/DocumentImporter.cpp and it could be compiled with new version of Collada.

I need Collada libraries made by MinGW under Win32 platoform, but I was unable to do it with exising SCons rules. So I'm also made some changes to the Collada:

* Added `tools` option to SCons scripts. Now you could specify tool you want to use for building.
* Changed usage StaticLibrary and Program to env.StaticLibrary and env.Program (without this tools option, passed to Environment, will be ignored).
* Dixes usage of MSVC-specific headers and namespaces for Windows platform. Now, if there is __MINGW32__ is defined, GCC-specific headers will be used.
* I also had linking error when very long command tried to be executed by `cmd.exe /C` command. I found solution at SCons's wiki and added SetupSpawn to SConstruct.
Maybe this will be helpful.

Event Timeline

I updated patch for OpenCollada with which I've got success compiling with MinGW and MSVC2005.

Here is new patch. I've compiled OpenCollada by MSVC and MinGW in release/debug targets with expat and libxml parsers.

Tom Musgrove (letterrip) changed the task status from Unknown Status to Unknown Status.Feb 26 2010, 6:59 AM