Removed references to modules that do not exist. The python interface is

broken, but it should give 0 errors when building.

Michel
This commit is contained in:
2003-01-06 17:27:43 +00:00
parent fa45a02295
commit c95d631b83
27 changed files with 46 additions and 41 deletions

View File

@@ -330,9 +330,9 @@ class ModuleFinder:
return m return m
def find_module(self, name, path): def find_module(self, name, path):
if name in self.excludes: # if name in self.excludes:
self.msgout(3, "find_module -> Excluded") # self.msgout(3, "find_module -> Excluded")
raise ImportError, name # raise ImportError, name
if path is None: if path is None:
if name in sys.builtin_module_names: if name in sys.builtin_module_names:

View File

@@ -1 +1 @@
from _Blender.BGL import * #from _Blender.BGL import *

View File

@@ -15,7 +15,7 @@ Example::
""" """
import shadow import shadow
import _Blender.Camera as _Camera #import _Blender.Camera as _Camera
class Camera(shadow.hasIPO): class Camera(shadow.hasIPO):

View File

@@ -1 +1 @@
from _Blender.Draw import * #from _Blender.Draw import *

View File

@@ -8,7 +8,7 @@
im = Image.Load('dead-parrot.jpg') im = Image.Load('dead-parrot.jpg')
""" """
import _Blender.Image as _Image #import _Blender.Image as _Image
import shadow import shadow
class Image(shadow.shadow): class Image(shadow.shadow):

View File

@@ -31,7 +31,7 @@ Example::
ob.setIpo(ipo) # assign ipo to object ob.setIpo(ipo) # assign ipo to object
""" """
import _Blender.Ipo as _Ipo #import _Blender.Ipo as _Ipo
import shadow import shadow

View File

@@ -11,7 +11,7 @@ Example::
ob.link(l) ob.link(l)
""" """
import _Blender.Lamp as _Lamp #import _Blender.Lamp as _Lamp
import shadow import shadow
_validBufferSizes = [512, 768, 1024, 1536, 2560] _validBufferSizes = [512, 768, 1024, 1536, 2560]

View File

@@ -14,7 +14,7 @@
Scene.getCurrent().link(ob) # link object to current scene Scene.getCurrent().link(ob) # link object to current scene
""" """
import _Blender.Material as _Material #import _Blender.Material as _Material
import shadow import shadow
#import Blender.Curve as Curve #import Blender.Curve as Curve

View File

@@ -51,7 +51,7 @@
from Blender.Types import NMFaceType from Blender.Types import NMFaceType
import Blender.Material as Material import Blender.Material as Material
from _Blender import NMesh as _NMesh #from _Blender import NMesh as _NMesh
FACEFLAGS = _NMesh.Const FACEFLAGS = _NMesh.Const
DEFAULTFLAGS = FACEFLAGS.LIGHT + FACEFLAGS.DYNAMIC DEFAULTFLAGS = FACEFLAGS.LIGHT + FACEFLAGS.DYNAMIC
@@ -66,7 +66,7 @@ def makeFace(f):
return face return face
def toTriangles(ngon): def toTriangles(ngon):
from utils import tesselation #from utils import tesselation
# This should be a Publisher only feature...once the tesselation # This should be a Publisher only feature...once the tesselation
# is improved. The GLU tesselator of Mesa < 4.0 is crappy... # is improved. The GLU tesselator of Mesa < 4.0 is crappy...
if len(ngon.uv) == len(ngon.v): if len(ngon.uv) == len(ngon.v):

View File

@@ -6,7 +6,7 @@
most probably limited. Use the 'Mesh' module instead. most probably limited. Use the 'Mesh' module instead.
""" """
import _Blender.NMesh as _NMesh #import _Blender.NMesh as _NMesh
import shadow import shadow
class Mesh(shadow.shadow): class Mesh(shadow.shadow):

View File

@@ -17,7 +17,7 @@
ob.makeParent([actobj]) # make ob the parent of actobj ob.makeParent([actobj]) # make ob the parent of actobj
""" """
import _Blender.Object as _Object #import _Blender.Object as _Object
import shadow import shadow
reload(shadow) # XXX reload(shadow) # XXX
@@ -98,7 +98,7 @@ class Object(shadow.hasIPO):
the Object's type, so you cannot link a Lamp to a mesh type Object. the Object's type, so you cannot link a Lamp to a mesh type Object.
'data' can also be an Ipo object (IpoBlock) 'data' can also be an Ipo object (IpoBlock)
""" """
from _Blender import Types #from _Blender import Types
# special case for NMesh: # special case for NMesh:
if type(data) == Types.NMeshType: if type(data) == Types.NMeshType:
return self._object.link(data) return self._object.link(data)
@@ -146,7 +146,7 @@ original. The returned object is *free*, meaning, not linked to any scene."""
def getDeformData(self): def getDeformData(self):
"""Returns the Datablock object containing the object's deformed data. """Returns the Datablock object containing the object's deformed data.
Currently, this is only supported for a Mesh""" Currently, this is only supported for a Mesh"""
import _Blender.NMesh as _NMesh #import _Blender.NMesh as _NMesh
t = self._object.getType() t = self._object.getType()
if t == self.Types['Mesh']: if t == self.Types['Mesh']:
data = _NMesh.GetRawFromObject(self.name) data = _NMesh.GetRawFromObject(self.name)

View File

@@ -14,7 +14,7 @@
newscene.link(cam) newscene.link(cam)
newscene.makeCurrent() # make current Scene newscene.makeCurrent() # make current Scene
""" """
import _Blender.Scene as _Scene #import _Blender.Scene as _Scene
from Object import Object from Object import Object
import shadow import shadow

View File

@@ -11,7 +11,7 @@
Text.unlink(text) # delete Text.unlink(text) # delete
""" """
import _Blender.Text as _Text #import _Blender.Text as _Text
class Text: class Text:
"""Wrapper for Text DataBlock""" """Wrapper for Text DataBlock"""

View File

@@ -1 +1 @@
from _Blender.Types import * #from _Blender.Types import *

View File

@@ -4,7 +4,7 @@ This module currently only supports redrawing commands of windows.
Later on, it will allow screen manipulations and access to Window Later on, it will allow screen manipulations and access to Window
properties""" properties"""
import _Blender.Window as _Window #import _Blender.Window as _Window
t = _Window.Types t = _Window.Types
Const = t # emulation Const = t # emulation

View File

@@ -1,4 +1,4 @@
import _Blender.World as _World #import _Blender.World as _World
import shadow import shadow

View File

@@ -6,7 +6,7 @@ __all__ = ["Object", "Image", "NMesh", "Window", "Mesh", "sys",
"Lamp", "Scene", "Draw", "Camera", "Material", "Types", "Ipo", "Lamp", "Scene", "Draw", "Camera", "Material", "Types", "Ipo",
"BGL"] "BGL"]
import _Blender #import _Blender
Get = _Blender.Get Get = _Blender.Get
Redraw = _Blender.Redraw Redraw = _Blender.Redraw

View File

@@ -1,4 +1,4 @@
from _Blender.sys import * #from _Blender.sys import *
sep = dirsep # path separator ('/' or '\') sep = dirsep # path separator ('/' or '\')

View File

@@ -956,7 +956,7 @@ def importfile(name):
global options global options
global DEFAULTFLAGS global DEFAULTFLAGS
from Blender import Get # XXX # from Blender import Get # XXX
options = Get('vrmloptions') options = Get('vrmloptions')
DEFAULTFLAGS = FACEFLAGS.LIGHT + FACEFLAGS.DYNAMIC DEFAULTFLAGS = FACEFLAGS.LIGHT + FACEFLAGS.DYNAMIC
if options['twoside']: if options['twoside']:

View File

@@ -10,7 +10,7 @@ import string,types
# import the C module and the version number # import the C module and the version number
# #
from mxTextTools import * from mxTextTools import *
from mxTextTools import __version__ #from mxTextTools import __version__
# #
# import the symbols needed to write tag tables # import the symbols needed to write tag tables

View File

@@ -4,8 +4,8 @@
See the documentation for further information on copyrights, See the documentation for further information on copyrights,
or contact the author (mal@lemburg.com). or contact the author (mal@lemburg.com).
""" """
from mxTextTools import * #from mxTextTools import *
from mxTextTools import __version__ #from mxTextTools import __version__
# #
# Make BMS take the role of FS in case the Fast Search object was not built # Make BMS take the role of FS in case the Fast Search object was not built

View File

@@ -67,12 +67,13 @@ class shadowNMesh:
self.flags = flags self.flags = flags
self.smooth = 0 self.smooth = 0
self.faces = [] self.faces = []
try: # #try:
import tess # import tess
self.tess = tess.Tess(256, beginPolygon, endPolygon, error, addVertex) # self.tess = tess.Tess(256, beginPolygon, endPolygon, error, addVertex)
except: # except:
#print "couldn't import tesselator" # #print "couldn't import tesselator"
self.tess = None # self.tess = None
self.tess = None
self.curface = None self.curface = None
self.tessfaces = [] self.tessfaces = []
self.recalc_normals = 1 self.recalc_normals = 1
@@ -93,7 +94,7 @@ class shadowNMesh:
# is improved. The GLU tesselator of Mesa < 4.0 is crappy... # is improved. The GLU tesselator of Mesa < 4.0 is crappy...
if not self.tess: if not self.tess:
return [] # no faces converted return [] # no faces converted
import tess # import tess
i = 0 i = 0
global tessfaces global tessfaces
tessfaces = [] tessfaces = []

View File

@@ -10,7 +10,8 @@ flattened copy of the hierarchy)
97-03-17 Added ability to pass arguments to hier_rapply and hier_rreturn. 97-03-17 Added ability to pass arguments to hier_rapply and hier_rreturn.
97-10-31 Removed dependencies on mcf.store 97-10-31 Removed dependencies on mcf.store
''' '''
import copy,types #import copy,types
import types
import singletonlist, hier_rx import singletonlist, hier_rx
class Hierobj: class Hierobj:

View File

@@ -2,7 +2,8 @@
# Wed Oct 31 16:18:35 CET 2001 # Wed Oct 31 16:18:35 CET 2001
'''Prototype2 -- VRML 97 sceneGraph/Node/Script/ROUTE/IS implementations''' '''Prototype2 -- VRML 97 sceneGraph/Node/Script/ROUTE/IS implementations'''
import copy, types # extern #import copy, types # extern
import types # extern
import strop as string # builtin import strop as string # builtin
from utils import typeclasses, err, namespace # XXX from utils import typeclasses, err, namespace # XXX
## TODO: namespace must go ## TODO: namespace must go
@@ -15,7 +16,7 @@ class baseProto:
passed arguments for the linearisation object passed arguments for the linearisation object
see lineariser4.Lineariser see lineariser4.Lineariser
''' '''
import lineariser4 # import lineariser4
lineariser = apply( lineariser4.Lineariser, (), namedargs ) lineariser = apply( lineariser4.Lineariser, (), namedargs )
return apply( lineariser.linear, ( self, ), namedargs ) return apply( lineariser.linear, ( self, ), namedargs )

View File

@@ -11,7 +11,8 @@ Destructive Functions for "collapsing" Sequences into single levels
[1, 2, 3, 4, 5, 6] # note is the same root list [1, 2, 3, 4, 5, 6] # note is the same root list
''' '''
import copy, types, sys #import copy, types, sys
import types, sys
from types import ListType, TupleType # this now only supports the obsolete stuff... from types import ListType, TupleType # this now only supports the obsolete stuff...
def hyperCollapse( inlist, allowedmap, type=type, list=list, itype=types.InstanceType, maxint= sys.maxint): def hyperCollapse( inlist, allowedmap, type=type, list=list, itype=types.InstanceType, maxint= sys.maxint):

View File

@@ -64,7 +64,8 @@ will likely want to do: from mcf.utils import extpkl, copy_extend
98.03.15 -- Fixed bug in items, values, etceteras with module-type 98.03.15 -- Fixed bug in items, values, etceteras with module-type
base objects. base objects.
''' '''
import copy, types, string #import copy, types, string
import types, string
from mcf.utils import hierobj from mcf.utils import hierobj

View File

@@ -36,7 +36,7 @@ def regnumpy():
if globals().has_key('Numeric'): if globals().has_key('Numeric'):
return 1 return 1
try: try:
import Numeric # import Numeric
SequenceTypes.append( Numeric.ArrayType ) SequenceTypes.append( Numeric.ArrayType )
MutableTypes.append( Numeric.ArrayType ) MutableTypes.append( Numeric.ArrayType )
MutableSequenceTypes.append( Numeric.ArrayType ) MutableSequenceTypes.append( Numeric.ArrayType )
@@ -47,4 +47,4 @@ def regnumpy():
# for now, I'm going to always register these, if the module becomes part of the base distribution # for now, I'm going to always register these, if the module becomes part of the base distribution
# it might be better to leave it out so numpy isn't always getting loaded... # it might be better to leave it out so numpy isn't always getting loaded...
regarray() regarray()
regnumpy() regnumpy()