Viewport Render Settings.
此处定义的方法如下:
getAmbientOcclusion
getAmbientOcclusion(self):
Gets AmbientOcclusion field. If true ambient occlusion will be rendered.
@return: Value of AmbientOcclusion field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getAmbientOcclusion()
getAxesVisible
getAxesVisible(self):
Gets AxesVisible field. If true the axes will be rendered.
@return: Value of AxesVisible field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getAxesVisible()
getBackFaceCulling
getBackFaceCulling(self):
Gets BackFaceCulling field. If true faces seen from the back will not be rendered. If false the rendering for models is defined by the CGA material.doubleSided attribute. All other scene objects are rendered as double-sided.
@return: Value of BackFaceCulling field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getBackFaceCulling()
getCompassVisible
getCompassVisible(self):
Gets CompassVisible field. If true the compass will be rendered.
@return: Value of CompassVisible field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getCompassVisible()
getGizmosVisible
getGizmosVisible(self):
Gets GizmosVisible field. If true the bookmark gizmos will be rendered.
@return: Value of GizmosVisible field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getGizmosVisible()
getGridVisible
getGridVisible(self):
Gets GridVisible field. If true the grid will be rendered.
@return: Value of GridVisible field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getGridVisible()
getInfoDisplayVisible
getInfoDisplayVisible(self):
Gets InfoDisplayVisible field. If true the info display will be rendered.
@return: Value of InfoDisplayVisible field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getInfoDisplayVisible()
getMode
getMode(self):
Gets Mode field. Describes how the viewport is rendered.
@return: Value of Mode field. ["MODE_WIREFRAME", "MODE_SHADED", "MODE_TEXTURED"] [str]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getMode()
getOnCameraLight
getOnCameraLight(self):
Gets OnCameraLight field. If true the light will be coming from the camera instead of the sun.
@return: Value of OnCameraLight field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getOnCameraLight()
getShadows
getShadows(self):
Gets Shadows field. If true shadows will be rendered.
@return: Value of Shadows field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getShadows()
getSingleSidedLighting
getSingleSidedLighting(self):
Gets SingleSidedLighting field. If true the lighting will be single sided.
@return: Value of SingleSidedLighting field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getSingleSidedLighting()
getTerrainMasking
getTerrainMasking(self):
Gets TerrainMasking field. If true overlapping terrains will be masked.
@return: Value of TerrainMasking field. [True/False]
getWireframeOnShaded
getWireframeOnShaded(self):
Gets WireframeOnShaded field. If true the wireframe will be rendered on shaded models.
@return: Value of WireframeOnShaded field. [True/False]
@example:
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
renderSettings = view.getRenderSettings()
print renderSettings.getWireframeOnShaded()
setAmbientOcclusion
setAmbientOcclusion(self, booleanValue):
Sets AmbientOcclusion field. If true ambient occlusion will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setAmbientOcclusion(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setAxesVisible
setAxesVisible(self, booleanValue):
Sets AxesVisible field. If true the axes will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setAxesVisible(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setBackFaceCulling
setBackFaceCulling(self, booleanValue):
Sets BackFaceCulling field. If true faces seen from the back will not be rendered. If false the rendering for models is defined by the CGA material.doubleSided attribute. All other scene objects are rendered as double-sided.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setBackFaceCulling(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setCompassVisible
setCompassVisible(self, booleanValue):
Sets CompassVisible field. If true the compass will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setCompassVisible(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setGizmosVisible
setGizmosVisible(self, booleanValue):
Sets GizmosVisible field. If true the bookmark gizmos will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setGizmosVisible(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setGridVisible
setGridVisible(self, booleanValue):
Sets GridVisible field. If true the grid will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setGridVisible(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setInfoDisplayVisible
setInfoDisplayVisible(self, booleanValue):
Sets InfoDisplayVisible field. If true the info display will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setInfoDisplayVisible(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setMode
setMode(self, enumValue):
Sets Mode field. Describes how the viewport is rendered.
@param enumValue: the new value ["MODE_WIREFRAME", "MODE_SHADED", "MODE_TEXTURED"]. [str]
@example:
renderSettings = RenderSettings()
renderSettings.setMode(RenderSettings.MODE_SHADED)
renderSettings.setMode(RenderSettings.MODE_WIREFRAME)
renderSettings.setMode(RenderSettings.MODE_TEXTURED)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setOnCameraLight
setOnCameraLight(self, booleanValue):
Sets OnCameraLight field. If true the light will be coming from the camera instead of the sun.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setOnCameraLight(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setShadows
setShadows(self, booleanValue):
Sets Shadows field. If true shadows will be rendered.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setShadows(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setSingleSidedLighting
setSingleSidedLighting(self, booleanValue):
Sets SingleSidedLighting field. If true the lighting will be single sided.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setSingleSidedLighting(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
setTerrainMasking
setTerrainMasking(self, booleanValue):
Sets TerrainMasking field. If true overlapping terrains will be masked.
@param booleanValue: the new value. [True/False]
setWireframeOnShaded
setWireframeOnShaded(self, booleanValue):
Sets WireframeOnShaded field. If true the wireframe will be rendered on shaded models.
@param booleanValue: the new value. [True/False]
@example:
renderSettings = RenderSettings()
renderSettings.setWireframeOnShaded(True)
view = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0]
view.setRenderSettings(renderSettings)
常量
此类用于定义以下常量:
MODE_SHADED = 'MODE_SHADED'
MODE_TEXTURED = 'MODE_TEXTURED'
MODE_WIREFRAME = 'MODE_WIREFRAME'