The settings for the resetTerrain command.
@example:
# optional settings giving additional control over the behaviour of resetTerrain
se = ResetTerrainSettings()
# add a small border ot the selected shapes
se.setAddBorder(True)
heightmap = ce.getObjectsFrom(ce.scene, ce.isMapLayer, ce.withName('Heightmap'))[0]
se.setTerrainLayer(heightmap)
# call reset terrain with the current selection and new options
shapes = ce.getObjectsFrom(ce.scene, ce.isShape)
ce.resetTerrain(shapes,se)
此处定义的方法如下:
getAddBorder
getAddBorder(self):
Gets AddBorder field. If enabled, a small border region around the shapes is reset, too.
@return: Value of AddBorder field. [True/False]
getConstraint
getConstraint(self):
Gets Constraint field.
@return: Value of Constraint field. ["EVERYWHERE", "SELECTION"] [str]
getTerrain
getTerrain(self):
Gets Terrain field.
@deprecated: Only for legacy scripts, use getTerrainLayer instead.
@return: Value of Terrain field. [str]
getTerrainLayer
getTerrainLayer(self):
Gets TerrainLayer field.
@return: Value of TerrainLayer field.
setAddBorder
setAddBorder(self, booleanValue):
Sets AddBorder field. If enabled, a small border region around the shapes is reset, too.
@param booleanValue: the new value. [True/False]
setConstraint
setConstraint(self, enumValue):
Sets Constraint field.
@param enumValue: the new value ["EVERYWHERE", "SELECTION"]. [str]
setTerrain
setTerrain(self, stringValue):
Sets Terrain field.
@deprecated: Only for legacy scripts, use setTerrainLayer instead.
@param stringValue: the new value. [str]
setTerrainLayer
setTerrainLayer(self, objectValue):
Sets TerrainLayer field.
@param objectValue: the new value.
常量
此类用于定义以下常量:
EVERYWHERE = 'EVERYWHERE'
SELECTION = 'SELECTION'