Interface: EditRenderRegion

Interfaces > Core Interfaces > EditRenderRegion

The EditRenderRegion Interface exposes the Render Region rubber band gizmo feature in 3ds Max 2009 and higher and provides the following properties and methods:

Properties:

EditRenderRegion.IsEditing : boolean : Read

Get/set whether the region is being edited. While you can set the value without an error, the setting will have no effect. Use the method EditRenderRegion.EditRegion() described below to toggle the value.

   

EditRenderRegion.IsEditable : boolean : Read

Get/set whether the region is editable. It is true when the renderer is set to Region, Crop or Blowup mode.

   

Methods:

<void>EditRenderRegion.EditRegion() 

Toggles the Region Editing mode on and off. You can check the value in EditRenderRegion.IsEditing to see whether the region editing is on or off.

Calling this method will set the renderer to Region mode automatically if it is not in Region mode yet.

   

<void>EditRenderRegion.UpdateRegion() 

Updates the region after changes using the viewport.setRegionRect() method documented under Viewport Regions.

EXAMPLE:

EditRenderRegion.IsEditing --see if the region is being edited
false
EditRenderRegion.IsEditable --see if it is editable (Region render mode)
false
viewport.activeViewport = 1 --set the viewport 1 as the current one
1
viewport.getRegionRect 1 --get the current region rectangle of view 1
(Box2 64 48 512 384)
EditRenderRegion.EditRegion() --enable editing the region
OK
EditRenderRegion.IsEditing --see if it is in editing mode
true
EditRenderRegion.IsEditable --see if it is in Region mode
true
viewport.setRegionRect 1 (Box2 200 50 300 300) --set to a new region
OK
EditRenderRegion.UpdateRegion() --and update the rubbed-band gizmo
OK
EditRenderRegion.EditRegion() --toggle the editing off again
OK
EditRenderRegion.IsEditing --see if still in editing mode
false
EditRenderRegion.IsEditable --see if still in Region render mode
true

See Also