new wcNodeStorageGlobal(parent, pos)
References a global property on the script.
When inheriting, make sure to include 'this._super(parent, pos);' at the top of your init function.
Parameters:
| Name | Type | Description |
|---|---|---|
parent |
string | The parent object of this node. |
pos |
wcPlay~Coordinates | The position of this node in the visual editor. |
- Source:
Methods
-
function onGlobalInitialPropertyChanged(name, oldValue, newValue) -
Event that is called when a global property initial value has changed.
Overload this in inherited nodes.
Note: Do not call 'this._super(..)' for this function, as the parent does not implement it.Parameters:
Name Type Description namestring The name of the global property. oldValueObject The old value of the global property. newValueObject The new value of the global property. - Source:
-
function onGlobalPropertyChanged(name, oldValue, newValue) -
Event that is called when a global property value has changed.
Overload this in inherited nodes.
Note: Do not call 'this._super(..)' for this function, as the parent does not implement it.Parameters:
Name Type Description namestring The name of the global property. oldValueObject The old value of the global property. newValueObject The new value of the global property. - Source:
-
function onGlobalPropertyRemoved(name) -
Event that is called when a global property has been removed.
Overload this in inherited nodes.
Note: Do not call 'this._super(..)' for this function, as the parent does not implement it.Parameters:
Name Type Description namestring The name of the global property. - Source:
-
function onGlobalPropertyRenamed(oldName, newName) -
Event that is called when a global property has been renamed.
Overload this in inherited nodes.
Note: Do not call 'this._super(..)' for this function, as the parent does not implement it.Parameters:
Name Type Description oldNamestring The old name of the global property. newNamestring The new name of the global property. - Source:
-
function onInitialPropertyChanging(name, oldValue, newValue) -> Object -
Any changes to the 'value' property will also change the global property.
Event that is called when a property initial value is about to be changed.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Parameters:
Name Type Description namestring The name of the property. oldValueObject The current value of the property. newValueObject The new, proposed, value of the property. - Source:
Returns:
- Return the new value of the property (usually newValue unless you are proposing restrictions). If no value is returned, newValue is assumed.- Type
- Object
-
function onInitialPropertyGet(name) -> Object | undefined -
Always redirect property gets on 'value' to the referenced global property.
Event that is called when the property initial value is being asked its value, before the value is actually retrieved.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Parameters:
Name Type Description namestring The name of the property. - Source:
Returns:
- If a value is returned, that value is what will be retrieved from the get.- Type
- Object | undefined
-
function onNameChanged(oldName, newName [, undo]) -
Event that is called when the name of this node has changed.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Parameters:
Name Type Argument Description oldNamestring The current name. newNamestring The new name. undoexternal:wcUndoManager <optional>
If the change is triggered by the user and undo management is enabled, this will be the undo manager. Note: The value change is already recorded, use this only if you have other things to record. - Source:
-
function onNameEditSuggestion() -> Array.<wcNode~SelectItem> | Array.<string> | undefined -
Event that is called when the node's name is about to be edited by the user.
You can use this to suggest a list of names that the user can conveniently choose from.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Returns:
- An option list of options to display for the user as suggestions.- Type
- Array.<wcNode~SelectItem> | Array.<string> | undefined
-
function onPropertyChanged(name, oldValue, newValue) -
Any changes to the 'value' property will also change the global property.
Event that is called when a property has changed.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Parameters:
Name Type Description namestring The name of the property. oldValueObject The old value of the property. newValueObject The new value of the property. - Source:
-
function onPropertyGet(name) -> Object | undefined -
Always redirect property gets on 'value' to the referenced global property.
Event that is called when the property is being asked its value, before the value is actually retrieved.
Overload this in inherited nodes, be sure to call 'this._super(..)' at the top.Parameters:
Name Type Description namestring The name of the property. - Source:
Returns:
- If a value is returned, that value is what will be retrieved from the get.- Type
- Object | undefined