Functions | |
def | array_to_string (a) |
def | array_to_string_destructive (a) |
def | dump_3ds_chunk (chunk, flo, arraylines=10, indent='') |
def | dump_3ds_file (filename, flo, arraylines=10, tight=False, recover=True) |
def | read_3ds_file (filename, check_magic=True, tight=False, recover=True) |
def | read_3ds_mem (membuf, check_magic=True, tight=False, recover=True) |
def | remove_errant_chunks (chunk) |
def | string_to_array (s, typ) |
def | write_3ds_file (filename, dom, check_magic=True) |
def | write_3ds_mem (dom, check_magic=True) |
Variables | |
tag | |
xrange = range | |
def Dice3DS.dom3ds.array_to_string | ( | a | ) |
Convert a numpy array to data block for a 3DS file.
def Dice3DS.dom3ds.array_to_string_destructive | ( | a | ) |
Destructively convert a numpy array to data block for a 3DS file.
Referenced by Dice3DS.dom3ds.MatrixChunk.write_array(), Dice3DS.dom3ds.POINT_ARRAY.write_array(), Dice3DS.dom3ds.POINT_FLAG_ARRAY.write_array(), Dice3DS.dom3ds.FACE_ARRAY.write_array(), Dice3DS.dom3ds.MSH_MAT_GROUP.write_array(), Dice3DS.dom3ds.TEX_VERTS.write_array(), and Dice3DS.dom3ds.SMOOTH_GROUP.write_array().
def Dice3DS.dom3ds.dump_3ds_chunk | ( | chunk, | |
flo, | |||
arraylines = 10 , |
|||
indent = '' |
|||
) |
Dump a 3DS DOM to a file stream. dump_3ds_chunk(filename,flo,arraylines=10,indent='') chunk: The 3DS chunk to dump flo: The file-like-object to dump output to (for example, sys.stdout) arraylines: Max number of lines of array data to dump. If negative, dump the whole array. indent: Prefix string to all lines dumped; used to indent.
References Dice3DS.dom3ds.dump_3ds_chunk().
Referenced by Dice3DS.dom3ds.dump_3ds_chunk(), and Dice3DS.dom3ds.dump_3ds_file().
def Dice3DS.dom3ds.dump_3ds_file | ( | filename, | |
flo, | |||
arraylines = 10 , |
|||
tight = False , |
|||
recover = True |
|||
) |
Dump a text representation of 3DS DOM to a file stream. dump_3ds_file(filename,flo,arraylines=2,tight=False, recover=True) filename: The 3DS file to dump flo: The file-like-object to dump output to (for example, sys.stdout) arraylines: Max number of lines of array data to dump. If negative, dump the whole array. tight: Whether to use tighter error checking. Try disabling if getting 3DS format errors. recover: Whether to emit an Error chunk when an error is found; otherwise raise an exception.
References Dice3DS.dom3ds.dump_3ds_chunk(), Dice3DS.dom3ds.dump_3ds_file(), and Dice3DS.dom3ds.read_3ds_file().
Referenced by Dice3DS.dom3ds.dump_3ds_file().
def Dice3DS.dom3ds.read_3ds_file | ( | filename, | |
check_magic = True , |
|||
tight = False , |
|||
recover = True |
|||
) |
Create a 3DS DOM from a file. dom = read_3ds_file(filename,check_magic=True,tight=False, recover=True) filename: name of a 3DS file. check_magic: If true, this function checks that the top level chunk is the 3DS magic chunk (0x4D4D), and raises an exception if it is not. tight: Whether to use tighter error checking. Try disabling if getting 3DS format errors. recover: Whether to emit an Error chunk when an error is found; otherwise raise an exception.
References Dice3DS.dom3ds.read_3ds_file(), and Dice3DS.dom3ds.read_3ds_mem().
Referenced by Dice3DS.dom3ds.dump_3ds_file(), and Dice3DS.dom3ds.read_3ds_file().
def Dice3DS.dom3ds.read_3ds_mem | ( | membuf, | |
check_magic = True , |
|||
tight = False , |
|||
recover = True |
|||
) |
Create a 3DS DOM from a memory buffer. dom = read_3ds_mem(buffer,check_magic=True,tight=False, recover=True) buffer: is an image of the 3DS file in memory. It could be a string, a mapped file, or something else. check_magic: If true, this function checks that the top level chunk is the 3DS magic chunk (0x4D4D), and raises an exception if it is not. tight: Whether to use tighter error checking. Try disabling if getting 3DS format errors. recover: Whether to emit an Error chunk when an error is found; otherwise raise an exception.
References Dice3DS.dom3ds.read_3ds_mem().
Referenced by Dice3DS.dom3ds.read_3ds_file(), and Dice3DS.dom3ds.read_3ds_mem().
def Dice3DS.dom3ds.remove_errant_chunks | ( | chunk | ) |
Recursively remove any errant chunks. remove_errant_chunks(chunk) This recursively removes chunks that might prevent successfully writing the DOM.
References Dice3DS.dom3ds.remove_errant_chunks().
Referenced by Dice3DS.dom3ds.remove_errant_chunks().
def Dice3DS.dom3ds.string_to_array | ( | s, | |
typ | |||
) |
Convert data block from a 3DS file to a numpy array.
Referenced by Dice3DS.dom3ds.MatrixChunk.read_array(), Dice3DS.dom3ds.POINT_ARRAY.read_array(), Dice3DS.dom3ds.FACE_ARRAY.read_array(), and Dice3DS.dom3ds.TEX_VERTS.read_array().
def Dice3DS.dom3ds.write_3ds_file | ( | filename, | |
dom, | |||
check_magic = True |
|||
) |
Write a 3DS file. buf = write_3ds_file(filename,dom,check_magic=True) filename: name of a 3DS file to write. dom: the 3DS dom check_magic: If true, this function checks that the top level chunk is the 3DS magic chunk (0x4D4D), and raises an exception if it is not.
References Dice3DS.dom3ds.write_3ds_file(), and Dice3DS.dom3ds.write_3ds_mem().
Referenced by Dice3DS.dom3ds.write_3ds_file().
def Dice3DS.dom3ds.write_3ds_mem | ( | dom, | |
check_magic = True |
|||
) |
Output a 3DS DOM as a string. buf = write_3ds_mem(dom,check_magic=True) dom: the 3DS dom check_magic: If true, this function checks that the top level chunk is the 3DS magic chunk (0x4D4D), and raises an exception if it is not.
References Dice3DS.dom3ds.write_3ds_mem().
Referenced by Dice3DS.dom3ds.write_3ds_file(), and Dice3DS.dom3ds.write_3ds_mem().
Dice3DS.dom3ds.tag |
Dice3DS.dom3ds.xrange = range |
Referenced by Dice3DS.dom3ds.MatrixChunk.dump_array(), Dice3DS.dom3ds.TrackChunk.dump_array(), Dice3DS.dom3ds.POINT_ARRAY.dump_array(), Dice3DS.dom3ds.FACE_ARRAY.dump_array(), Dice3DS.dom3ds.MSH_MAT_GROUP.dump_array(), Dice3DS.dom3ds.TEX_VERTS.dump_array(), and Dice3DS.dom3ds.SMOOTH_GROUP.dump_array().