racer_theme_export Namespace Reference

Export meshes in a scene to a racer theme. More...


Functions

def write
 Write the theme in the current scene to a file.
def write_mesh
 Write an indvidual mesh's data to an open file.
def write_vert
 Write the output for a particular vertex.
def format_string
 Convert a string so it can be loaded by string_from_stream().


Detailed Description

Export meshes in a scene to a racer theme.

There are four blender meshes required for each segment. They each need to have the same base name in order to be linked, and a tail to specify which of the 4 meshes they are.

The points where edges can be connected are given by the positions of curves objects with a name ending in _0 to _9. The same prefix as the other meshes must be used to link them. The curve data should be shared and used for each different cross section. The positions and angles of the curve objects relative to the graphics mesh object is used to find where the connections should be.

The positive y direction is treated as forwards, the positive x direction is sideways across the track to the right, and the positive z direction is vertically up from the track. This is important when you want to use a mesh along an edge.

The objects used for an edge will be bent into a curve to fit the edge's path. You must not place faces in such a way that holes appear when this happens. A normal corner will be OK when the mesh is well subdivided along the y direction, but the road surface should also be divided in the x direction if the road twists around the y axis.

The physics floor mesh can be more subdivided than the graphical mesh to reduce wobbly / slow patches in twisted road.


Function Documentation

def racer_theme_export::write (   filename  ) 

Write the theme in the current scene to a file.

Parameters:
filename The filename to write to.

Definition at line 59 of file racer_theme_export.py.

def racer_theme_export::write_mesh (   out,
  ob 
)

Write an indvidual mesh's data to an open file.

Parameters:
out The output file.
ob The object to write about.

Definition at line 164 of file racer_theme_export.py.

def racer_theme_export::write_vert (   out,
  vert_index,
  face,
  faceUV 
)

Write the output for a particular vertex.

If the vertex's face does not have texture coordinates, set faceUV to false. Texture coordinates will be written as if they were (0,0) in this case.

Parameters:
out the opened file to write to
vert_index an index within the a face
face the face that contains the vertex.
faceUV a boolean value indicating if the face has UV coordinates.

Definition at line 201 of file racer_theme_export.py.

def racer_theme_export::format_string (   string  ) 

Convert a string so it can be loaded by string_from_stream().

Version 1. Writes 1, the length, and the characters, seperated by spaces.

Parameters:
string string to write.

Definition at line 220 of file racer_theme_export.py.


Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.