Table of Contents

Module: ms3d_ascii_importer urdpyg/converters/ms3d_ascii_importer.py

Copyright (C) 2002 by Rene Dudfield.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Imported modules   
import cPickle
import md5
from middle_obj import *
import operator
import os
import re
import string
from string import split, join
import time
Functions   
chomp
convert_array_shape2
convert_array_shape3
convert_milkshape
str_parse
test_MS3dImporter
  chomp 
chomp ( s )

  convert_array_shape2 
convert_array_shape2 ( verts )

  convert_array_shape3 
convert_array_shape3 ( verts )

Converts a [[1,1,1,1], [1,1,1,1]] into [1,1,1,1,1,1]

  convert_milkshape 
convert_milkshape ( a_file )

Returns a list of [points, indices, texcoords] Only converts one mesh.

  str_parse 
str_parse (
        string_to_parse,
        conversion_list,
        seperator=" ",
        )

returns a list of formated converted variables based on the string_to_parse - um.. conversion_list - list of functions, to convert parts of the string. Use str for strings, int for ints, floats for floats etc :) seperator - string to use to seperate the elements of the string.

Will raise exceptions if string not correctly set up. Or if data fails to convert.

Exceptions   
"wrong number of converters, or string doesn't match."
  test_MS3dImporter 
test_MS3dImporter ( file_name )

points,indices,texcoords = convert_milkshape(file_name)

Classes   

MS3dImporter

milk_bones

milk_material

milk_mesh


Table of Contents

This document was automatically generated on Sat Jul 30 12:45:44 2005 by HappyDoc version 2.1