Syntax
- float assetInfo(string assetName, attributeSelector)
Parameters
- assetNameInput asset.
- attributeSelector{ sx | sy | sz | tx | ty | tz }—specified asset dimension or translation.
Returns
Returns asset sizes or translation.
The assetInfo function returns the sizes or translations of the asset defined in the assetName, depending on the specified attributeSelector.
Examples
The translation values are calculated by the CityEngine based on the corner of the asset's bounding box, by using the corner with the lowest possible x, y and z coordinates (XYZmin).
Note:
Any specific 3d transformations (in this example maya's translations X = 0.6, Y = 0.7, Z = 0.8) are not to be confused accidentally with the translations the CityEngine computes.
print(assetInfo("assets/unitCube.obj", sx))
print(assetInfo("assets/unitCube.obj", sy))
print(assetInfo("assets/unitCube.obj", sz))
print(assetInfo("assets/unitCube.obj", tx))
print(assetInfo("assets/unitCube.obj", ty))
print(assetInfo("assets/unitCube.obj", tz))
# results =
# 0.2
# 0.3
# 0.4
# 0.5
# 0.55
# 0.6