1
Python and Java API / Exporting a JPG texture after a succesfull buildTexture seems failing
« on: April 12, 2014, 02:51:02 AM »
Hi,
This is my very first entry.
I get a RuntimeError: Model.exportTexture(): model has no texture
when I try to export after a successful buildTexture command.
It works fine from the menu, but the python saveTexture gives me error.
Please help.
thanks
James
This is my very first entry.
I get a RuntimeError: Model.exportTexture(): model has no texture
when I try to export after a successful buildTexture command.
It works fine from the menu, but the python saveTexture gives me error.
Please help.
thanks
James
Code: [Select]
import PhotoScan
doc = PhotoScan.app.document
doc.open('C:/Users/User/Desktop/ref/001/scene.psz')
model = PhotoScan.Model()
model.load('C:/Users/User/Desktop/ref/001/uvedGeo.obj','obj')
chunk = doc.activeChunk
chunk.model = model
chunk.buildTexture(mapping="current", blending="average",size=2048,count=1)
# executing the following line ends with error
model.saveTexture('C:/Users/User/Desktop/testing.jpg')
# RuntimeError: Model.exportTexture(): model has no texture