Eidolon
Public Member Functions | Public Attributes | List of all members
ScriptWriter Class Reference

Inherits object.

Collaboration diagram for ScriptWriter:
Collaboration graph

Public Member Functions

def __init__ (self, target=None, scriptdir=None)
 
def addVar (self, name, val)
 
def convertPath (self, path)
 
def writeLine (self, line='')
 
def writeObjectComment (self, label, obj)
 
def writeCreateObject (self, obj)
 
def writeSetupObject (self, obj)
 
def writeMaterial (self, mgr, mat)
 
def writeObjects (self, mgr, objs)
 
def writeScene (self, mgr)
 

Public Attributes

 scriptHeader
 
 writeComments
 
 namemap
 
 includedObjs
 
 scriptdir
 
 target
 

Detailed Description

This class generates Python code to recreate the current scene as defined by the SceneManager object passed to it.
This relies on plugins implementing getScriptCode() correctly to generate plugin-specific loading and setup code 
when requested by this type. 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  target = None,
  scriptdir = None 
)
Initialize the writer with `target' being the file-like object to write text into, or an instance of StringIO
if this isn't provided. The `scriptdir' path is directory the script file being written will be in, this is
None if writing non-script code. If `scriptdir' is present then all paths should be written relative to it.

Member Function Documentation

◆ addVar()

def addVar (   self,
  name,
  val 
)

◆ convertPath()

def convertPath (   self,
  path 
)
Here is the caller graph for this function:

◆ writeCreateObject()

def writeCreateObject (   self,
  obj 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLine()

def writeLine (   self,
  line = '' 
)
Here is the caller graph for this function:

◆ writeMaterial()

def writeMaterial (   self,
  mgr,
  mat 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeObjectComment()

def writeObjectComment (   self,
  label,
  obj 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeObjects()

def writeObjects (   self,
  mgr,
  objs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScene()

def writeScene (   self,
  mgr 
)
Here is the call graph for this function:

◆ writeSetupObject()

def writeSetupObject (   self,
  obj 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ includedObjs

includedObjs

◆ namemap

namemap

◆ scriptdir

scriptdir

◆ scriptHeader

scriptHeader

◆ target

target

◆ writeComments

writeComments

The documentation for this class was generated from the following file: