Annotations are used to add additional information to a rule or an attribute. Annotations are optional and do not affect the semantics of a rule and thus have no influence on the model generation. Annotations are mostly used to give additional hints for user interface elements such as the Inspector on how to present attributes or rules.
- @Enum(value_1, value_2, ..., restricted=true)
- @File("ext_1", ..., "ext_n")
- @Group("level_1-group", ..., "level_n-group")
- @Group("level_1-group", ..., "level_n-group", order)
- @Handle(handle params)
- @Range(min=value1, max=value2, stepsize=0, restricted=true)
Adds a ° (degree) unit in Inspector and a [0;360] range by default with slider.
Mark an attribute as a color attribute which will present a color picker in the inspector.
Adds a description to an attribute or rule which will be displayed as tool tip in the inspector or as description in the start rule chooser or style manager. Use \n for line breaks.
Mark an attribute as a directory name. The inspector will present a directory chooser.
Adds a meter of foot unit (depending on the Coordinate System used by the scene) in Inspector.
@Enum(value_1, value_2, ..., restricted=true)
Sets an enum with specific values. Values can be numeric or string. Parameter restricted is optional (default is true). If true no other values can be entered in the inspector or set by a handle.
Mark an attribute as a file name. The inspector will present a file chooser.
@File("ext_1", ..., "ext_n")
Mark an attribute as a file name. The inspector will present a file chooser for the given file extensions ("ext_1", ... , "ext_n")
@Group("level_1-group", ..., "level_n-group")
Set the group of the following attributes (the inspector will group attributes accordingly). The current group is maintained across imports. To leave the current group, use @Group.
@Group("level_1-group", ..., "level_n-group", order)
Set the group and the sort order for groups/subgroups in the inspector (similar to @Order for attributes). Where order is a numeric value.
Adds an interactive handle to the following attribute.
Mark an attribute or rule as hidden. Hidden attributes won't appear in the CityEngine inspector or start rule chooser, but they will be connected to matching object attributes automatically. @Hidden can also be used to hide a set of attributes (as in its second form with a list of attribute names) before an import statement. Without explicitly naming the attributes, @Hidden before an import statement will hide all imported attributes in the inspector; the hidden annotation will be recusively propagated to the imports of the hidden import.
These annotations can be used to communicate the expected geometry type of the start shape. While these annotations currently have no effect in CityEngine, ArcGIS Pro expects each start rule (see above) to be annotated with the expected input type (as of ArcGIS Pro 1.1, only InPolygon and InMesh are supported). If there is none, it defaults to @InPolygon. So if you export a rpk to be used with different geometry types in ArcGIS Pro, make sure you add one of these annotations.
Sets the sort order for an attribute in the inspector. Where order is a numeric value.
This annotation can be used to communicate the suggested granularity of the output geometry. The default is combinedShape. While this annotation currently has no effect in CityEngine, it is essential to trigger leaf shape generation in ArcGIS Pro. Add it to the start rule in that case.
Adds a % unit in Inspector and a [0;100] range. In the CGA File, the value has to be initialized to the real value (e.g. 0.1 for 10%). The Inspector will display the vale in percent (e.g. 10%). The user has to enter the value in percent in the inspector.
@Range(min=value1, max=value2, stepsize=0, restricted=true)
Sets the numeric range of an attribute by paramters min and max (inclusive). Parameter stepsize is optional (default is 0). If set to >0 possible values are set in respective steps starting from the minimum value. Both sliders in the inspector and handles respect the step size. Parameter restricted is optional (default is true). If set to true any numerical input value is set to the nearest possible value in the inspector.
Mark a rule as a start rule for the start rule chooser