# # # 3DE4.script.name: Photoscan... # # 3DE4.script.version: v1.0 # # 3DE4.script.gui: Main Window::3DE4::Export Project # # 3DE4.script.comment: Creates a py script file that contains all project data, which can be imported into Photoscan to build Point Cloud. # # Giovanni Di Grezia 2016 # http://www.xgiovio.com # # Some functions are from 3de export scripts from vl_sdv import * def convertToAngles(r3d): rot = rot3d(mat3d(r3d)).angles(VL_APPLY_ZXY) rx = (rot[0]*180.0)/3.141592654 ry = (rot[1]*180.0)/3.141592654 rz = (rot[2]*180.0)/3.141592654 return(rx,ry,rz) #maybe this function is not correct def rot_matrix_for_photoscan (r3d): rot3d_old = rot3d(mat3d(r3d)).angles(VL_APPLY_ZXY) rot3d_new = rot3d(rot3d_old[1],rot3d_old[0],rot3d_old[2],VL_APPLY_ZXY) return rot3d_new.mat() def prepareImagePath(path,startframe): path = path.replace("\\","/") i = 0 n = 0 i0 = -1 while(i