TexturingSettings

The interface for scripting the CityEngine.

@example:
# The settings which control textureShapeTool, as per the user interface menu
ta = TexturingSettings()
ta.setTextureFile("maps/map.png")
ta.setFlipHorizontally(True)
ta.setVerticalRepetitions(3)
ta.setHorizontalRepetitions(5)
ta.setArbitraryRotation(12)
shapes = ce.getObjectsFrom(ce.scene, ce.isShape, ce.withName("'Block 1'"))
ce.textureShapeTool(shapes, ta)

 

Methods defined here:

getAbsoluteTextureHeight

getAbsoluteTextureHeight(self):

Gets AbsoluteTextureHeight field. Absolute texture height.

@return: Value of AbsoluteTextureHeight field.  [float]

getAbsoluteTextureWidth

getAbsoluteTextureWidth(self):

Gets AbsoluteTextureWidth field. Absolute texture width.

@return: Value of AbsoluteTextureWidth field.  [float]

getAlignTo

getAlignTo(self):

Gets AlignTo field. Align to.

@return: Value of AlignTo field.  ["BL", "BR", "TR", "TL"] [str]

getArbitraryRotation

getArbitraryRotation(self):

Gets ArbitraryRotation field. The Arbitrary Rotation is measured in degrees. It is incompatible with setNumberOfHorizontal or Vertical tiles.

@return: Value of ArbitraryRotation field.  [float]

getFlipHorizontally

getFlipHorizontally(self):

Gets FlipHorizontally field. Flip horizontally.

@return: Value of FlipHorizontally field.  [True/False]

getFlipVertically

getFlipVertically(self):

Gets FlipVertically field. Flip vertically.

@return: Value of FlipVertically field.  [True/False]

getHorizontalRepetitions

getHorizontalRepetitions(self):

Gets HorizontalRepetitions field. Horizontal repetitions. Incompatible with arbitrary rotations.

@return: Value of HorizontalRepetitions field.  [float]

getMode

getMode(self):

Gets Mode field. Choose the general texturing type.

@return: Value of Mode field.  ["Leave", "Stretch", "Dimension", "Projection"] [str]

getOrientationAlignment

getOrientationAlignment(self):

Gets OrientationAlignment field. Orientation alignment.

@return: Value of OrientationAlignment field.  ["GLOBAL", "LOCAL"] [str]

getRotation

getRotation(self):

Gets Rotation field. Rotation.

@return: Value of Rotation field.  ["ROT_0", "ROT_90", "ROT_180", "ROT_270", "ROT_ARB"] [str]

getSnapHorizontallyToBounds

getSnapHorizontallyToBounds(self):

Gets SnapHorizontallyToBounds field. Snap horizontally to bounds.

@return: Value of SnapHorizontallyToBounds field.  [True/False]

getSnapVerticallyToBounds

getSnapVerticallyToBounds(self):

Gets SnapVerticallyToBounds field. Snap vertically to bounds.

@return: Value of SnapVerticallyToBounds field.  [True/False]

getTextureFile

getTextureFile(self):

Gets TextureFile field. Set the image file.

@return: Value of TextureFile field.  [str]

getVerticalRepetitions

getVerticalRepetitions(self):

Gets VerticalRepetitions field. Vertical repetitions. Incompatible with arbitrary rotations.

@return: Value of VerticalRepetitions field.  [float]

setAbsoluteTextureHeight

setAbsoluteTextureHeight(self, floatValue):

Sets AbsoluteTextureHeight field. Absolute texture height.

@param floatValue: the new value. [float]

setAbsoluteTextureWidth

setAbsoluteTextureWidth(self, floatValue):

Sets AbsoluteTextureWidth field. Absolute texture width.

@param floatValue: the new value. [float]

setAlignTo

setAlignTo(self, enumValue):

Sets AlignTo field. Align to.

@param enumValue: the new value ["BL", "BR", "TR", "TL"]. [str]

setArbitraryRotation

setArbitraryRotation(self, floatValue):

Sets ArbitraryRotation field. The Arbitrary Rotation is measured in degrees. It is incompatible with setNumberOfHorizontal or Vertical tiles.

@param floatValue: the new value. [float]

setFlipHorizontally

setFlipHorizontally(self, booleanValue):

Sets FlipHorizontally field. Flip horizontally.

@param booleanValue: the new value. [True/False]

setFlipVertically

setFlipVertically(self, booleanValue):

Sets FlipVertically field. Flip vertically.

@param booleanValue: the new value. [True/False]

setHorizontalRepetitions

setHorizontalRepetitions(self, floatValue):

Sets HorizontalRepetitions field. Horizontal repetitions. Incompatible with arbitrary rotations.

@param floatValue: the new value. [float]

setMode

setMode(self, enumValue):

Sets Mode field. Choose the general texturing type.

@param enumValue: the new value ["Leave", "Stretch", "Dimension", "Projection"]. [str]

setOrientationAlignment

setOrientationAlignment(self, enumValue):

Sets OrientationAlignment field. Orientation alignment.

@param enumValue: the new value ["GLOBAL", "LOCAL"]. [str]

setRotation

setRotation(self, enumValue):

Sets Rotation field. Rotation.

@param enumValue: the new value ["ROT_0", "ROT_90", "ROT_180", "ROT_270", "ROT_ARB"]. [str]

setSnapHorizontallyToBounds

setSnapHorizontallyToBounds(self, booleanValue):

Sets SnapHorizontallyToBounds field. Snap horizontally to bounds.

@param booleanValue: the new value. [True/False]

setSnapVerticallyToBounds

setSnapVerticallyToBounds(self, booleanValue):

Sets SnapVerticallyToBounds field. Snap vertically to bounds.

@param booleanValue: the new value. [True/False]

setTextureFile

setTextureFile(self, stringValue):

Sets TextureFile field. Set the image file.

@param stringValue: the new value. [str]

setVerticalRepetitions

setVerticalRepetitions(self, floatValue):

Sets VerticalRepetitions field. Vertical repetitions. Incompatible with arbitrary rotations.

@param floatValue: the new value. [float]

Constants

This class defines the following constants:

BL = 'BL'
BR = 'BR'
DIMENSION = 'Dimension'
GLOBAL = 'GLOBAL'
LOCAL = 'LOCAL'
LEAVE = 'Leave'
PROJECTION = 'Projection'
ROT_0 = 'ROT_0'
ROT_180 = 'ROT_180'
ROT_270 = 'ROT_270'
ROT_90 = 'ROT_90'
ROT_ARB = 'ROT_ARB'
STRETCH = 'Stretch'
TL = 'TL'
TR = 'TR'