modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs.

This commit is contained in:
2006-12-25 09:17:23 +00:00
parent dd5077060e
commit 859b7f207e
25 changed files with 406 additions and 421 deletions

View File

@@ -251,11 +251,11 @@ class VRML2Export:
def writeNavigationInfo(self, scene):
allObj = []
allObj = scene.getChildren()
allObj = list(scene.objects)
headlight = "TRUE"
vislimit = 0.0
for thisObj in allObj:
objType=thisObj.getType()
objType=thisObj.type
if objType == "Camera":
vislimit = thisObj.data.getClipEnd()
elif objType == "Lamp":
@@ -731,21 +731,21 @@ class VRML2Export:
self.proto = 0
allObj = []
if ARG == 'selected':
allObj = Blender.Object.GetSelected()
allObj = list(scene.objects.context)
else:
allObj = scene.getChildren()
allObj = list(scene.objects)
self.writeInline()
for thisObj in allObj:
try:
objType=thisObj.getType()
objName=thisObj.getName()
objType=thisObj.type
objName=thisObj.name
self.matonly = 0
if objType == "Camera":
self.writeViewpoint(thisObj)
elif objType == "Mesh":
self.writeIndexedFaceSet(thisObj, normals = 0)
elif objType == "Lamp":
lmpName=Lamp.Get(thisObj.data.getName())
lmpName= thisObj.data
lmpType=lmpName.getType()
if lmpType == Lamp.Types.Lamp:
self.writePointLight(thisObj, lmpName)