91
Python and Java API / Export textures only
« on: February 17, 2017, 06:07:41 PM »
Hello,
I'm currently trying to export textures from my model, the "hard" way as I did not find a way of doing it smoothly: I'm extracting the model then I have my texture.
Is there any smoother way to do it? Maybe directly, and I missed it?
Current code:
I'm currently trying to export textures from my model, the "hard" way as I did not find a way of doing it smoothly: I'm extracting the model then I have my texture.
Is there any smoother way to do it? Maybe directly, and I missed it?
Current code:
Code: [Select]
import os
import sys
import PhotoScan
doc = PhotoScan.app.document
chunk = PhotoScan.Chunk()
chunk.label = "New Chunk"
doc.chunks.add(chunk)
nbTrous = int(sys.argv[1])
path_photos = PhotoScan.app.getExistingDirectory("""Spécifiez le dossier
contenant les photos : """)
path_photos += "/"
path_export = PhotoScan.app.getExistingDirectory("""Spécifiez le dossier
contenant les exports en fin de traitement : """)
path_export += "/"
for chunk in doc.chunks
# Export Texture
exportModel(path_export, binary = False, texture_format = "jpg",
texture = True, normals = False, colors = False, cameras = False,
strip_extensions = False, format = "obj", projection = "EPSG::3948")