def getLDmodelParameterList(model): l = [] for p in range(tde4.getLDModelNoParameters(model)): l.append(tde4.getLDModelParameterName(model, p)) return l
FootageHeight = tde4.getCameraImageHeight(cam) lens = tde4.getFirstLens() CameraApertureWidth = tde4.getLensFBackWidth(lens) / 2.54 CameraApertureHeight = tde4.getLensFBackHeight(lens) / 2.54 #about lens distortion. LensDistortionValid = False camList = tde4.getCameraList() for cam in camList: lens = tde4.getCameraLens(cam) for id in tde4.getLensList(): focus = tde4.getLensFocalLength(id) lensmodel = tde4.getLensLDModel(id) focallength = tde4.getLensFocalLength(id) paraNumber = tde4.getLDModelNoParameters(lensmodel) for i in range(paraNumber): paraName = tde4.getLDModelParameterName(lensmodel, i) currentValue = tde4.getLensLDAdjustableParameter( id, paraName, focus, focallength) defaultValue = tde4.getLDModelParameterDefault(lensmodel, paraName) if currentValue != defaultValue: LensDistortionValid = True break ret = tde4.postCustomRequester(req, "Export Maya (MEL-Script)...", 600, 0, "Ok", "Cancel") if ret == 1: # yup = tde4.getWidgetValue(req,"mode_menu") # if yup==2: yup = 0 yup = 1
def distortion_model_parameter_names(self): return [ tde4.getLDModelParameterName(self.distortion_model_name, i) for i in range( tde4.getLDModelNoParameters(self.distortion_model_name)) ]