Package pyffi :: Package formats :: Package cgf :: Class CgfFormat
[hide private]
[frames] | no frames]

Class CgfFormat

source code

              object --+        
                       |        
object_models.FileFormat --+    
                           |    
object_models.xml.FileFormat --+
                               |
                              CgfFormat

Stores all information about the cgf file format.
Nested Classes [hide private]
  __metaclass__
Metaclass which constructs the chunk map during class creation.
  int
Basic implementation of a 32-bit signed integer type.
  uint
Implementation of a 32-bit unsigned integer type.
  byte
Implementation of a 8-bit signed integer type.
  ubyte
Implementation of a 8-bit unsigned integer type.
  short
Implementation of a 16-bit signed integer type.
  ushort
Implementation of a 16-bit unsigned integer type.
  char
Implementation of an (unencoded) 8-bit character.
  float
Implementation of a 32-bit float.
  bool
Simple bool implementation.
  String
String of variable length (null terminated).
  SizedString
Basic type for strings.
  String16
String of fixed length 16.
  String32
String of fixed length 32.
  String64
String of fixed length 64.
  String128
String of fixed length 128.
  String256
String of fixed length 256.
  FileSignature
The CryTek file signature with which every cgf file starts.
  Ref
Reference to a chunk, up the hierarchy.
  Ptr
Reference to a chunk, down the hierarchy.
  CgfError
Exception for CGF specific errors.
  Data
A class to contain the actual cgf data.
  Chunk
  ChunkTable
  BoneInitialPosChunk
  DataStreamChunk
  Matrix33
  Matrix44
  MeshChunk
  MeshMorphTargetChunk
  MeshSubsetsChunk
  MtlChunk
  NodeChunk
  SourceInfoChunk
  TimingChunk
  Vector3
  AbstractMtlChunk
Common parent for MtlChunk and MtlNameChunk.
  AbstractObjectChunk
Common parent for HelperChunk and MeshChunk.
  BoneAnimChunk
  BoneEntity
  BoneLightBinding
  BoneLightBindingChunk
  BoneLink
A bone link.
  BoneMeshChunk
  BoneNameListChunk
  BonePhysics
  BonesBoxesChunk
  BreakablePhysicsChunk
  ChunkHeader
A CGF chunk header.
  ChunkType
An unsigned 32-bit integer, describing the chunk type.
  ChunkVersion
The version of a particular chunk, or the version of the chunk table.
  CompiledBonesChunk
  CompiledExt2IntMapChunk
  CompiledIntFacesChunk
  CompiledIntSkinVerticesChunk
  CompiledMorphTargetsChunk
  CompiledPhysicalBonesChunk
  CompiledPhysicalProxiesChunk
  ControllerChunk
  CtrlFlags
  CtrlType
  DataStreamType
  ExportFlags
  ExportFlagsChunk
Export information.
  FRGB
R32G32B32 (float).
  Face
A mesh face.
  FaceMapChunk
  FileOffset
Points to a position in a file.
  FileType
An unsigned 32-bit integer, describing the file type.
  FootPlantInfoChunk
  GeomNameListChunk
Obsolete, not decoded.
  Header
The CGF header.
  HelperChunk
  HelperType
  IRGB
R8G8B8.
  IRGBA
R8G8B8A8.
  InitialPosMatrix
A bone initial position matrix.
  Key
  LightChunk
  LightType
  MRMChunk
Obsolete, not decoded.
  MeshBoneIds
  MeshPhysicsDataChunk
  MeshSubset
  MeshSubsetsFlags
  MorphVertex
  MtlFlags
  MtlListChunk
Obsolete, not decoded.
  MtlNameChunk
  MtlNameFlags
  MtlNamePhysicsType
  MtlType
  PatchMeshChunk
Obsolete, not decoded.
  PhysicsCube
  PhysicsCylinder
  PhysicsData
  PhysicsDataType0
  PhysicsDataType1
  PhysicsDataType2
  PhysicsPolyhedron
  PhysicsPrimitiveType
  PhysicsShape6
  PhysicsStruct1
  PhysicsStruct2
  PhysicsStruct50
  Quat
A quaternion (x,y,z,w).
  RangeEntity
  ScenePropsChunk
Not decoded.
  SpeedInfoChunk
  Tangent
Tangents.
  TextureMap
  TextureMappingFlags
  TextureMappingType
  UV
Texture coordinate.
  UVFace
A texture face (vertex indices).
  UnknownAAFC0005Chunk
Unknown.
  VertAnimChunk
  Vertex
  VertexWeight
  _BoneInitialPosChunk
  _Chunk
Base class for all chunks.
  _ChunkTable
List of all chunks in the CGF file.
  _DataStreamChunk
Contains data such as vertices, normals, etc.
  _Matrix33
A 3x3 transformation matrix.
  _Matrix44
A 4x4 transformation matrix.
  _MeshChunk
Geometry.
  _MeshMorphTargetChunk
  _MeshSubsetsChunk
  _MtlChunk
  _NodeChunk
  _SourceInfoChunk
  _TimingChunk
  _Vector3
A vector in 3D space (x,y,z).
Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from object_models.xml.FileFormat: vercondFilter

Inherited from object_models.FileFormat: name_attribute, name_class, name_parts, walk, walkData

Static Methods [hide private]
 
version_number(version_str)
Converts version string into an integer.
source code
Class Variables [hide private]
  xml_file_name = 'cgf.xml'
Override.
  xml_file_path = [None, '/usr/lib/python2.7/site-packages/pyffi...
Override.
  EPSILON = 0.0001
  RE_FILENAME = re.compile(r'(?i)^.*\.(cgf|ga|hr|af)$')
Override this with a regular expression (the result of a re.compile call) for the file extension of the format you are implementing.
  VER_FARCRY = 1860
  UVER_FARCRY = 1
  VER_CRYSIS = 1860
  UVER_CRYSIS = 2
  CHUNK_MAP = {2868641792: <class 'pyffi.formats.cgf.BreakablePh...
  games = {'Aion': [1872], 'Crysis': [1860], 'Far Cry': [1860]}
  versions = {'0': 0, '1': 1, '290': 656, '351': 849, '362': 866...
  xml_alias = [<class 'pyffi.formats.cgf.ChunkVersion'>, <class ...
  xml_bit_struct = [<class 'pyffi.formats.cgf.TextureMappingFlag...
  xml_enum = [<class 'pyffi.formats.cgf.FileType'>, <class 'pyff...
  xml_struct = [<class 'pyffi.formats.cgf._Vector3'>, <class 'py...

Inherited from object_models.xml.FileFormat: logger

Inherited from object_models.FileFormat: ARCHIVE_CLASSES

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

version_number(version_str)
Static Method

source code 

Converts version string into an integer.

>>> hex(CgfFormat.version_number('744'))
'0x744'
Parameters:
  • version_str (str) - The version string.
Returns:
A version integer.
Overrides: object_models.FileFormat.version_number

Class Variable Details [hide private]

xml_file_path

Override.
Value:
[None, '/usr/lib/python2.7/site-packages/pyffi/formats/cgf']

CHUNK_MAP

Value:
{2868641792: <class 'pyffi.formats.cgf.BreakablePhysicsChunk'>,
 2868641793: <class 'pyffi.formats.cgf.FaceMapChunk'>,
 2868641794: <class 'pyffi.formats.cgf.SpeedInfoChunk'>,
 2868641795: <class 'pyffi.formats.cgf.FootPlantInfoChunk'>,
 2868641796: <class 'pyffi.formats.cgf.BonesBoxesChunk'>,
 2868641797: <class 'pyffi.formats.cgf.UnknownAAFC0005Chunk'>,
 2900099072: <class 'pyffi.formats.cgf.CompiledBonesChunk'>,
 2900099073: <class 'pyffi.formats.cgf.CompiledPhysicalBonesChunk'>,
...

versions

Value:
{'0': 0,
 '1': 1,
 '290': 656,
 '351': 849,
 '362': 866,
 '623': 1571,
 '744': 1860,
 '745': 1861,
...

xml_alias

Value:
[<class 'pyffi.formats.cgf.ChunkVersion'>,
 <class 'pyffi.formats.cgf.FileOffset'>]

xml_bit_struct

Value:
[<class 'pyffi.formats.cgf.TextureMappingFlags'>,
 <class 'pyffi.formats.cgf.MtlFlags'>,
 <class 'pyffi.formats.cgf.MtlNameFlags'>,
 <class 'pyffi.formats.cgf.CtrlFlags'>,
 <class 'pyffi.formats.cgf.MeshSubsetsFlags'>,
 <class 'pyffi.formats.cgf.ExportFlags'>]

xml_enum

Value:
[<class 'pyffi.formats.cgf.FileType'>,
 <class 'pyffi.formats.cgf.ChunkType'>,
 <class 'pyffi.formats.cgf.HelperType'>,
 <class 'pyffi.formats.cgf.TextureMappingType'>,
 <class 'pyffi.formats.cgf.MtlType'>,
 <class 'pyffi.formats.cgf.MtlNamePhysicsType'>,
 <class 'pyffi.formats.cgf.LightType'>,
 <class 'pyffi.formats.cgf.CtrlType'>,
...

xml_struct

Value:
[<class 'pyffi.formats.cgf._Vector3'>,
 <class 'pyffi.formats.cgf._Matrix33'>,
 <class 'pyffi.formats.cgf._Matrix44'>,
 <class 'pyffi.formats.cgf.Quat'>,
 <class 'pyffi.formats.cgf.Vertex'>,
 <class 'pyffi.formats.cgf.Face'>,
 <class 'pyffi.formats.cgf.Key'>,
 <class 'pyffi.formats.cgf.UV'>,
...