DocumentΒΆ
class Document
The guerilla document singleton
local currentFrame = Document.Time:Get ()
Hierarchy
Members
float | FirstFrame | RW | The first frame of the project |
float | LastFrame | RW | The last frame of the project |
float | Time | RW | The current frame number |
| getfilename | ( ) | Get the Document file name |
| getmodifier | ( ) | Get a document modifier. |
| getpreferences | ( ) | Get the Document preferences node |
| getselection | ( ) | Get the current selection as a table |
| haschanged | ( ) | Return true if the document has been modified since the last save. |
| loadBakedData | (
|
Load the data from the baked file of the SceneGraphNode (.ghostdata). |
| modify | ( ) | Start a document modification context. |
Inherited from class Node
string | Name | RW | The node name |
| onpathchanged | ( ) | Called by the framework when the name of this node or of one of its parent is modified |
| eval | (
|
Called by the framework when plug (a node's plug) must be evaluated |
| isselected | ( ) | Tell if the node is selected |
| getparent | ( ) | Get the parent Node of this Node |
| isparent | (
|
Tells if this node is parent of the potential child |
| findparent | (
|
Find the first parent Node of this Node of a specific class |
| getpath | ( ) | Returns the node path as a string that can be reused with findchild |
| findchild | (
|
Find a child node or plug using a path |
| move | (
|
Move a node to a new parent |
| delete | ( ) | Delete a node |
| rename | (
|
Rename a node |
| getname | ( ) | Get the Node name in its parent |
| getchild | (
|
Get a child node by its name |
| isreference | ( ) | Tells if a node comes from a reference project |
| getreference | ( ) | Returns the reference node it is connected to |
| gettopreference | ( ) | Returns the top reference node it is connected to |
| belongstoreference | (
|
Tells if the node belongs to the reference, or a sub reference |
| loadfile | (
|
load a file content in this node. |
| loadtemplate | (
|
load a template file |
| savefile | (
|
load a node to a file |
| getstringcopy | ( ) | Return a copy of the node and its content as a string to be pasted |
| setflags | ( ) | Set the node flags |
| ismoveable | ( ) | Tells if the node can be moved |
| pastestringcopy | (
|
Paste a string copy into this node |
| getreferences | (
[
|
Returns the references in the document sorted depth first. |
| iseditable | ( ) | Indicates if the node can be edited by the user in the UI |
| seteditable | (
|
Change the editable state of the node |
Documentation
The first frame of the project
The last frame of the project
The current frame number
Get the Document file name
filename The document filename
Get a document modifier.
modifier
Get the Document preferences node
preferences The preferences of the document
Get the current selection as a table
selection the current selection or nil if no selection
Return true if the document has been modified since the last save.
Load the data from the baked file of the SceneGraphNode (.ghostdata).
node The node to use to load the dataname The attribute name to load
data The data
Start a document modification context.
When operating in a command or whatever context that might require undo stacking, it is needed to
create a modification context in which all actions are stacked. Note that not all actions require stacking,
such as UI handling, object or plug creation or connection inside a constructor. Document undoable
modifications are strictly reserved for UI interaction with the document, such as commands, controls, gizmos.
This method opens a new modification context, in which actions are stacked. This method returns a modifier table
that contains all actions that can be performed on the document.
See also Modifier for more documentation.
modifier