ObjectTool
Description
The tool used to edit objects.
Accessed by Global.Editor.Tools["ObjectTool"]
.
Properties
Texture | texture |
Prop | Preview |
Range | Rotation |
Range | Scale |
OptionButton | LayerMenu |
int | ActiveLayer |
int | Sorting |
bool | Shadow |
bool | BlockLight |
GridMenu | GridMenu |
Dictionary | LibraryMemory |
Methods
void | Record ( Prop obj ) |
void | Next ( ) |
void | SetLayer ( int index ) |
void | SetShadow ( bool value ) |
void | ChangeColor ( Color color, String name ) |
void | Confirm ( ) |
void | PromoteCustomColor ( ) |
void | SetSorting ( int sorting ) |
void | EmbebObject ( String file ) |
void | SetBlockLight ( bool value ) |
Property Descriptions
- Texture texture:
Texture of the asset 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.
- 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.
- bool Shadow:
Gets and sets whether the tool will place objects with shadows. Read only. Set with SetShadow() instead.
- bool BlockLight:
Gets and sets whether the tool will place objects that block light. Read only. Set with SetBlockLight() 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.
Method Descriptions
- void Record ( Prop obj ):
Change this link:Prop
from preview to real, assign it an NodeID, and then record the action to undo history.
- void Next ( ):
Create a new preview link:Prop
using the last known options and texture selected.
- void ChangeColor ( Color color, String name ):
Change the custom color if it applies. Update the Object Library Panel icons to reflect it as well if enabled.
- void Confirm ( ):
Finalize the preview into the map and create a new preview Prop. Calls Record() and Next() internally.
- 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.
- void EmbebObject ( String file ):
Embed a PNG file directly into the map. Bloats the file size, use wisely.
- void SetBlockLight ( bool value ):
Set the preview Prop to block light.