Local edits

With handles, you can edit attributes of a selected CGA model in the Viewport window. When an attribute is edited, the change globally affects all occurrences of the attribute in the CGA model. While this behavior is useful in many cases, sometimes a more granular control is needed. With local edits, you can edit the value of an attribute for each occurrence. This increases the artistic control over a CGA model significantly.

For example, the window height of all windows in a building is defined by the windowHeight attribute. Editing this attribute using handles, or the Inspector, changes all the windows in the same way. Using the Local Edits tool Local edits tool, you can set the window height for each window independently.

Left: initial building, middle global edits, right: local edits
From left to right, building windows are shown with no edits, with global edits, and with local edits.

Activate local edits

To do this, first activate the Local Edits tool Local edits tool, and then click a building window in the Viewport window. Changing an attribute in the Inspector window or using handles will now only affect this window. To exit the Local Edit tool, switch to the Selection tool Selection tool.

To use the Local Edits tool, complete the following steps:

  1. Generate a building using a rule file with handles, for example:
    @Handle(shape=Block, axis=y)
    attr bldgHeight = 10
    @Handle(shape=Floor, axis=y)
    attr floorHeight = 2
    @Handle(shape=Window, axis=y)
    attr windowHeight = 1
    @Handle(shape=Window, axis=x)
    attr windowWidth = 1
    Init --> extrude(bldgHeight) Block
    Block --> split(y) { ~floorHeight : Floor }*
    Floor --> comp(f) { side : Facade }
    Facade --> split(x) { ~0.5 : Wall. | windowWidth : Tile | ~0.5 : Wall. }*
    Tile --> split(y) { ~0.5 : Wall. | windowHeight : Window | ~0.5 : Wall. }
    Window --> color(0.4, 0.4, 0.75)

    There are handles for windowHeight, windowWidth, and floorHeight that allow for local edits.

  2. Activate the Local Edits tool Local edits tool.
  3. Select the building.

    The global handles appear.

  4. Select a part of the CGA model or use the handles to make global edits.

    The global handles of the selected part disappear. Handles for local edits are displayed instead.

Keep the following in mind when using the Local Edits tool:

  • The Local Edits tool Local edits tool is available automatically for all attributes that have a handle annotation. For more information, see Create handles.
  • Press Shift and click to select multiple parts of a building. For more information, see Multiple selections.
  • You can right-click to use the context menu for select higher/lower level and next/previous pattern to select logical groups such as rows and columns of parts. For more information, see Local edits on patterns.
  • Attributes with local edits are marked orange in the Inspector. For more information, see Manage local edits.

In this topic
  1. Activate local edits