Handles

Introduction

Handles allow users to edit the value of the selected object's attributes in the 3D view. They are created by adding a @Handle annotation to an attribute.


Handles that control the size of a box.

The handles are positioned so that they are always visible, whichever camera angle is used.

Handles can be turned on and off in the 3D View toolbar under View Settings:


You can also enable handles in Edit→Preferences→Scene.

Using Handles

If the mouse cursor is placed over a handle, CityEngine highlights both the attribute in the inspector, and the associated scope in the view.

Small handles, or handles attached to small parts of the model are sometimes now shown. To show these handles, press the command key (OS X) or control (PC / Linux).

There are several different types of handles for editing different types of attributes, such as linear distances, angles, Boolean switches, multiple choice or colors. They are manipulated by dragging, or clicking, the colored (orange) elements.

Linear Handles

Linear handles adjust distance attributes. They are edited by dragging the colored markers. When dragging the handle, the value of the attribute is shown. If the value of the attribute is different to the length of the linear handle, the length of the handle is shown in parenthesis.


The orange arrow marker can be dragged up or down (red arrows). The attibute value, 15.91, is shown while dragging the handle, and the length of the handle, (31.82m), is given in parenthesis.

Some linear handles can be dragged from either end. These handles have two colored arrows:

Move Handles

Move handles adjust position or offset attributes. They are similar to linear handles, however the length of the move handles is always constant, and dragging one end also moves the opposite end by the same amount.

Rotational Handles

Rotational handles adjust angle attributes. They are edited by dragging the colored sphere.


The arm angle attribute is edited by dragging the sphere clockwise or anticlockwise (red arrows).

Toggle Handles

Toggle handles adjust Boolean (on/off) attributes. They are edited by clicking the colored square, or dragging the square up and down.


The attribute schematic can be toggled on and off by clicking and dragging up or down (red arrow).

Selector Handles

Selector handles edit multiple choice values. They are edited by clicking the colored circle, or by dragging in a clockwise or anticlockwise direction around the circle.


Dragging from the center of the selector handle and then around the handle (red arrow) sets the meshPath attribute.

Color Handles

Color handles edit color attributes. The are edited by clicking and dragging on the colored triangle. When a drag starts, the hue circle appears. Dragging within (or outside) the hue circle adjusts the hue, while dragging inside the trangle adjusts the saturation and brightness. The selected color is shown by a circle within the triangle.

Alternately, clicking the triangle, and dragging to a swatch selects that color.


Left: A color handle when it isn't being dragged. Right: Dragging in the hue circle (red arrow) changes the hue of the color, while dragging in the triangle (black circle) changes the saturation and brightness. The swatches (red rectangle) provide either previously selected colors, or preset colors.

The range of handles may be limited by the rule (using @Range and @Enum annotations). In this case the values of the handles are constrained when editing.

Creating Handles

Information about writing the annotations that create handles can be found here.

 

Copyright ©2008-2017 Esri R&D Center Zurich. All rights reserved.