tan (fov_y / 2 ) ) # The view-angle of the bounding sphere rendered onscreen.īsphere_angle = math. Screen_ratio = float (pixelsize ) / float (screenheight ) getPortFieldOfView (screenwidth, screenheight ) # Calculates screen ratio active3dView ( )ĬurCam = Camera (curCamPath. getMaxDeviation ( object ) # Calculates the pixel size (OnScreenSize)ĬurView = OpenMayaUI. getSceneRadius ( object ) # Reads the MaxDeviation attributeĭeviation = SimplygonWrapper. SimplygonQuery (gpm = True ) # Calculates the recommended distance to start showing the incoming object def calculateLODSwitchDistance ( object ) : # Object is the mesh transform # Reads the. Simplygon (ri = True, sf =settingsFile ,įmn = '' ) return cmds. # Processes the current selection using the specified settings file. getAttr ( object + ".SceneRadius" ) except : print ( "Warning: SceneRadius attribute does not exist on this object." ) return sceneRadius # Retrieves the scene radius of the incoming object def getSceneRadius ( object ) : getAttr ( object + ".MaxDeviation" ) except : print ( "Warning: MaxDeviation attribute does not exist on this object." ) return maxDeviation """ # Retrieves the deviation of the incoming object def getMaxDeviation ( object ) : nodetypes import CameraĬlass that contains all the Simplygon specificities in order to make it easy to update as Simplygon changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |