Dice3DS.dom3ds Namespace Reference

Classes

class  AMBIENT_LIGHT
 
class  AMBIENT_NODE_TAG
 
class  ArrayChunk
 
class  BIT_MAP
 
class  BOUNDBOX
 
class  CAM_RANGES
 
class  CAM_SEE_CONE
 
class  CAMERA_NODE_TAG
 
class  ChunkBase
 
class  ChunkMetaclass
 
class  COL_TRACK_TAG
 
class  Color24Chunk
 
class  COLOR_24
 
class  COLOR_F
 
class  DCUE_BGND
 
class  DEFAULT_VIEW
 
class  DISTANCE_CUE
 
class  DL_ATTENUATE
 
class  DL_EXCLUDE
 
class  DL_INNER_RANGE
 
class  DL_LOCAL_SHADOW2
 
class  DL_MULTIPLIER
 
class  DL_OFF
 
class  DL_OUTER_RANGE
 
class  DL_RAY_BIAS
 
class  DL_RAYSHADE
 
class  DL_SEE_CONE
 
class  DL_SHADOWED
 
class  DL_SPOT_ASPECT
 
class  DL_SPOT_OVERSHOOT
 
class  DL_SPOT_PROJECTOR
 
class  DL_SPOT_RECTANGULAR
 
class  DL_SPOT_ROLL
 
class  DL_SPOTLIGHT
 
class  DUMMY
 
class  ErrorChunk
 
class  FACE_ARRAY
 
class  FALL_TRACK_TAG
 
class  FBufError
 
class  File3dsFormatError
 
class  FileLikeBuffer
 
class  FLOAT_PERCENTAGE
 
class  FOG
 
class  FOG_BGND
 
class  FOV_TRACK_TAG
 
class  HI_SHADOW_BIAS
 
class  HIDE_TRACK_TAG
 
class  HOT_TRACK_TAG
 
class  INSTANCE_NAME
 
class  INT_PERCENTAGE
 
class  KFCURTIME
 
class  KFDATA
 
class  KFHDR
 
class  KFSEG
 
class  L_TARGET_NODE_TAG
 
class  LAYER_FOG
 
class  LIGHT_NODE_TAG
 
class  LIN_COLOR_24
 
class  LIN_COLOR_F
 
class  LMAGIC
 
class  LO_SHADOW_BIAS
 
class  M3D_VERSION
 
class  M3DMAGIC
 
class  MARKER
 
class  MASTER_SCALE
 
class  MAT_ACUBIC
 
class  MAT_ADDITIVE
 
class  MAT_AMBIENT
 
class  MAT_BUMP_PERCENT
 
class  MAT_BUMPMAP
 
class  MAT_BUMPMASK
 
class  MAT_DECAL
 
class  MAT_DIFFUSE
 
class  MAT_ENTRY
 
class  MAT_FACEMAP
 
class  MAT_MAP_ANG
 
class  MAT_MAP_BCOL
 
class  MAT_MAP_COL1
 
class  MAT_MAP_COL2
 
class  MAT_MAP_GCOL
 
class  MAT_MAP_RCOL
 
class  MAT_MAP_TEXBLUR
 
class  MAT_MAP_TEXBLUR_OLD
 
class  MAT_MAP_TILING
 
class  MAT_MAP_TILING_OLD
 
class  MAT_MAP_UOFFSET
 
class  MAT_MAP_USCALE
 
class  MAT_MAP_VOFFSET
 
class  MAT_MAP_VSCALE
 
class  MAT_MAPNAME
 
class  MAT_NAME
 
class  MAT_OPACMAP
 
class  MAT_OPACMASK
 
class  MAT_PHONGSOFT
 
class  MAT_REFBLUR
 
class  MAT_REFLMAP
 
class  MAT_REFLMASK
 
class  MAT_SELF_ILLUM
 
class  MAT_SELF_ILPCT
 
class  MAT_SELFIMAP
 
class  MAT_SELFIMASK
 
class  MAT_SHADING
 
class  MAT_SHIN2PCT
 
class  MAT_SHIN3PCT
 
class  MAT_SHININESS
 
class  MAT_SHINMAP
 
class  MAT_SHINMASK
 
class  MAT_SPECMAP
 
class  MAT_SPECMASK
 
class  MAT_SPECULAR
 
class  MAT_SUPERSMP
 
class  MAT_SXP_BUMP_DATA
 
class  MAT_SXP_BUMP_MASKDATA
 
class  MAT_SXP_OPAC_DATA
 
class  MAT_SXP_OPAC_MASKDATA
 
class  MAT_SXP_REFL_MASKDATA
 
class  MAT_SXP_SELFI_DATA
 
class  MAT_SXP_SELFI_MASKDATA
 
class  MAT_SXP_SHIN_DATA
 
class  MAT_SXP_SHIN_MASKDATA
 
class  MAT_SXP_SPEC_DATA
 
class  MAT_SXP_SPEC_MASKDATA
 
class  MAT_SXP_TEXT2_DATA
 
class  MAT_SXP_TEXT2_MASKDATA
 
class  MAT_SXP_TEXT_DATA
 
class  MAT_SXP_TEXT_MASKDATA
 
class  MAT_TEX2MAP
 
class  MAT_TEXMAP
 
class  MAT_TEXMASK
 
class  MAT_TEXT2MASK
 
class  MAT_TRANSPARENCY
 
class  MAT_TWO_SIDE
 
class  MAT_USE_REFBLUR
 
class  MAT_USE_XPFALL
 
class  MAT_WIRE
 
class  MAT_WIREABS
 
class  MAT_WIRESIZE
 
class  MAT_XPFALL
 
class  MAT_XPFALLIN
 
class  MATMAGIC
 
class  MatrixChunk
 
class  MDATA
 
class  MESH_COLOR
 
class  MESH_MATRIX
 
class  MESH_TEXTURE_INFO
 
class  MESH_VERSION
 
class  MLIBMAGIC
 
class  MORPH_SMOOTH
 
class  MORPH_TRACK_TAG
 
class  MSH_BOXMAP
 
class  MSH_MAT_GROUP
 
class  N_CAMERA
 
class  N_DIRECT_LIGHT
 
class  N_TRI_OBJECT
 
class  NAMED_OBJECT
 
class  NETWORK_VIEW
 
class  NODE_HDR
 
class  NODE_ID
 
class  O_CONSTS
 
class  OBJ_DOESNT_CAST
 
class  OBJ_DONT_RCVSHADOW
 
class  OBJ_FAST
 
class  OBJ_FROZEN
 
class  OBJ_HIDDEN
 
class  OBJ_MATTE
 
class  OBJ_PROCEDURAL
 
class  OBJ_VIS_LOFTER
 
class  OBJECT_NODE_TAG
 
class  OLD_MAT_GROUP
 
class  OneColorChunk
 
class  OneFloatValueChunk
 
class  OnePercentageChunk
 
class  OneShortValueChunk
 
class  PIVOT
 
class  POINT_ARRAY
 
class  POINT_FLAG_ARRAY
 
class  POS_TRACK_TAG
 
class  PRJMAGIC
 
class  PROC_DATA
 
class  PROC_NAME
 
class  RAW_BIAS
 
class  ROLL_TRACK_TAG
 
class  ROT_TRACK_TAG
 
class  SCL_TRACK_TAG
 
class  SHADOW_FILTER
 
class  SHADOW_MAP_SIZE
 
class  SHADOW_RANGE
 
class  SHADOW_SAMPLES
 
class  SMAGIC
 
class  SMOOTH_GROUP
 
class  SOLID_BGND
 
class  SPOTLIGHT_NODE_TAG
 
class  TARGET_NODE_TAG
 
class  TEX_VERTS
 
class  TextureChunk
 
class  TextureMaskChunk
 
class  TrackChunk
 
class  UndefinedChunk
 
class  UndefinedChunkMetaclass
 
class  UnknownChunk
 
class  USE_BIT_MAP
 
class  USE_DISTANCE_CUE
 
class  USE_FOG
 
class  USE_LAYER_FOG
 
class  USE_SOLID_BGND
 
class  USE_V_GRADIENT
 
class  V_GRADIENT
 
class  VIEW_BACK
 
class  VIEW_BOTTOM
 
class  VIEW_CAMERA
 
class  VIEW_FRONT
 
class  VIEW_LEFT
 
class  VIEW_RIGHT
 
class  VIEW_TOP
 
class  VIEW_USER
 
class  VIEW_WINDOW
 
class  ViewChunk
 
class  VIEWPORT_DATA
 
class  VIEWPORT_DATA_3
 
class  VIEWPORT_DATA_OLD
 
class  VIEWPORT_LAYOUT
 
class  VIEWPORT_LAYOUT_OLD
 
class  VIEWPORT_SIZE
 
class  ViewportDataChunk
 

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
 

Function Documentation

◆ array_to_string()

def Dice3DS.dom3ds.array_to_string (   a)
Convert a numpy array to data block for a 3DS file.

◆ array_to_string_destructive()

◆ dump_3ds_chunk()

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().

◆ 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().

◆ read_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().

◆ read_3ds_mem()

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().

◆ remove_errant_chunks()

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().

◆ string_to_array()

def Dice3DS.dom3ds.string_to_array (   s,
  typ 
)

◆ write_3ds_file()

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().

◆ write_3ds_mem()

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().

Variable Documentation

◆ tag

Dice3DS.dom3ds.tag

◆ xrange