Dear mister Pasumansky,
The project contains a large number of airborne images with known orientation- and rotation parameters. I'm using the Belgian national coordinate system for this (EPSG:31370), which is explicitly defined in the Ground Control settings.
The idea is to import a third party model, texture it and export it again:
model = PhotoScan.Model()
model.load("D:/modelPath_IN/modelName.obj", "obj")
doc.activeChunk.model = model
doc.activeChunk.buildTexture(mapping="adaptive orthophoto", blending="average", size=1000, count=1)
model = doc.activeChunk.model
model.save("D:/modelPath_OUT/modelName.wrl", format="vrml", texture_format="jpg", export_texture=True)
It seems that the model is loaded, but the export returns a black model, transformed in a very strange coordinate system. I double checked the coordinates of the obj-file to be imported, and they are correct. Moreover, when I perform this procedure manually via Tools -> Import -> Import Mesh and after selecting my coordinate system, it works fine.
Re-assigning the (same) coordinate system using Python by
cs = PhotoScan.CoordinateSystem()
cs.init("EPSG:31370")
doc.activeChunk.projection = cs
puts the project in a weird viewpoint and still does not load the models correctly.
I hope you have a solution.
Thanks again for your assistance