ScatterTool
Description
The tool used to scatter objects. Inherits from Tool.
Accessed by Global.Editor.Tools["ScatterTool"]
.
Properties
Texture[] | textures |
Texture | texture |
Prop | Preview |
Range | MinRotation |
Range | MaxRotation |
Range | MinScale |
Range | MaxScale |
Color[] | Colors |
Range | Spread |
bool | Shadow |
OptionButton | LayerMenu |
int | ActiveLayer |
int | Sorting |
GridMenu | GridMenu |
Dictionary | LibraryMemory |
bool | isDrawing |
Prop[] | currentStroke |
Methods
void | Next ( bool cycle ) |
void | SetLayer ( int index ) |
void | SetShadow ( bool value ) |
void | PromoteCustomColor ( ) |
void | SetSorting ( int sorting ) |
Property Descriptions
- Texture texture:
Texture of the asset selected (when only 1 is selected). Used automatically by the UI controls. Does not update the preview link:Prop
automatically.
- Prop Preview:
Gets the preview Prop. This is the object that follows the user's cursor before it is actually placed. Call confirm to force it to place.
- Color[] Colors:
The collection of custm colors to use (if applicable) randomly for the objects placed.
- bool Shadow:
Gets and sets whether the tool will place objects with shadows. Read only. Set with SetShadow() instead.
- OptionButton LayerMenu:
The reference to the layer menu in the Object Tool when it is active.
- int ActiveLayer:
The layer the next object will be placed. Read only. Set with SetLayer() instead.
- int Sorting:
Where the next object will be sorted. Underlying type is an enum. 0 = Over, 1 = Under. Read only. Set with SetSorting() instead.
- GridMenu GridMenu:
The menu in the Object Library Panel that selects textures for this tool. DO NOT MODIFY.
- Dictionary LibraryMemory:
The data that represents the last loaded state of the library panel.
- bool isDrawing:
Whether the user is actively drawing.
- Prop[] currentStroke:
The current collection of Props that represented the latest brush stroke from the user.
Method Descriptions
- void Next ( bool cycle ):
Create a new preview link:Prop
using the last known options and texture selected. The param cycle is used to prevent creating a new Prop, but instead update the current one when a user cycles the selection without placing any.
- void PromoteCustomColor ( ):
Update the preview Prop to reflect the custom color. Better to call ChangeColor() than this function directly.
- void SetSorting ( int sorting ):
Sets the sorting of the tool, and updates the preview Prop to reflect it. 0 = Over, 1 = Under.