Document¶
- 
class guerilla.Document¶
- Bases: - guerilla.Node- The guerilla document singleton - >>> d = Document(); currentTime = d.Time.get() >>> d = Document(); d.Preferences <guerilla.Preferences object at ...> - 
FirstFrame¶
- The first frame of the project - Type: - float 
 - 
LastFrame¶
- The last frame of the project - Type: - float 
 - 
Time¶
- The current frame number - Type: - float 
 - 
filename¶
- retrieve current scene name - Returns: - scene name or an empty string if file has never been saved - Return type: - str 
 - 
getpreferences()¶
- Get the Document preferences node - Returns: - The preferences of the document - Return type: - Node 
 - 
getreferences(topref=None)¶
- Returns the references in the document sorted depth first. - Parameters: - topref ( - Reference) – an optional top reference- Returns: - references - Return type: - list 
 - 
haschanged()¶
- Return true if the document has been modified since the last save. 
 - 
load(filename, warn=True, discardmissingref=True, loadrefs=None, loadasbox=False)¶
- Load a guerilla project file (.gproject) - Parameters: - Returns: - True if the file was loaded - Return type: 
 - 
loadBakedData(node, name)¶
- Load the data from the baked file of the - SceneGraphNode(.ghostdata).- Parameters: - node (SceneGraphNode) – The node to use to load the data
- name (str) – The attribute name to load
 - Returns: - The data - Return type: - transformor geometry or float
- node (
 - 
merge(filename)¶
- Merge a .gproject file into the current project. - Parameters: - filename (str) – The file name to merge - Returns: - The merged root nodes. - Return type: - { - Node}
 - 
static new(warn=True, nodefault=False)¶
- Create an empty new document - Parameters: 
 - 
save(filename=None, warn=False, addtorecent=True)¶
- Save scene - Parameters: - Returns: - True if the file was properly saved - Return type: 
 - 
selectedpaths()¶
- Get the list of currently selected paths - Return type: - list of str - >>> with Modifier() as mod: ... mod.select(['RenderPass', 'RenderGraph']) >>> d = Document(); print d.selectedpaths() ['RenderPass', 'RenderGraph'] 
 - 
selection()¶
- Get the current selection - Return type: - list of Node - >>> with Modifier() as mod: ... mod.select([pynode('RenderPass'), pynode('RenderGraph')]) >>> d = Document(); print d.selection() [<guerilla.RenderPass object at ...>, <guerilla.RenderGraph object at ...>] 
 
-