def getLDmodelParameterList(model):
	l = []
	for p in range(tde4.getLDModelNoParameters(model)):
		l.append(tde4.getLDModelParameterName(model, p))
	return l
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
    path = tde4.getWidgetValue(req, "file_browser")
    frame0 = float(tde4.getWidgetValue(req, "startframe_field"))
def getLDmodelParameterList(model):
	l = []
	for p in range(tde4.getLDModelNoParameters(model)):
		l.append(tde4.getLDModelParameterName(model, p))
	return l
Example #4
0
 def distortion_model_parameter_names(self):
     return [
         tde4.getLDModelParameterName(self.distortion_model_name, i)
         for i in range(
             tde4.getLDModelNoParameters(self.distortion_model_name))
     ]