[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11510] branches/2-44-stable/blender: branches/2-44-stable
Diego Borghetti (Plumiferos)
bdiego at gmail.com
Tue Aug 7 04:16:37 CEST 2007
Revision: 11510
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11510
Author: bdiego
Date: 2007-08-07 04:15:42 +0200 (Tue, 07 Aug 2007)
Log Message:
-----------
branches/2-44-stable
Merge from trunk:
revision 11487
revision 11491
revision 11493
revision 11494
revision 11498
revision 11499
revision 11500
revision 11502
revision 11504
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11487
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11491
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11493
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11494
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11498
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11499
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11500
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11502
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11504
Modified Paths:
--------------
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/collada.py
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cstartup.py
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cutils.py
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/helperObjects.py
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/translator.py
branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/xmlUtils.py
branches/2-44-stable/blender/release/scripts/colladaExport14.py
branches/2-44-stable/blender/release/scripts/colladaImport14.py
branches/2-44-stable/blender/release/text/BlenderQuickStart.pdf
branches/2-44-stable/blender/source/blender/ftfont/CMakeLists.txt
branches/2-44-stable/blender/source/blender/python/api2_2x/Mathutils.c
branches/2-44-stable/blender/source/blender/python/api2_2x/doc/Blender.py
branches/2-44-stable/blender/source/blender/src/drawimage.c
branches/2-44-stable/blender/source/blender/src/editface.c
branches/2-44-stable/blender/source/blender/src/editseq.c
branches/2-44-stable/blender/source/blender/src/edittime.c
Modified: branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/collada.py
===================================================================
--- branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/collada.py 2007-08-06 20:21:40 UTC (rev 11509)
+++ branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/collada.py 2007-08-07 02:15:42 UTC (rev 11510)
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------
-# Illusoft Collada 1.4 plugin for Blender version 0.3.146
+# Illusoft Collada 1.4 plugin for Blender
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -559,7 +559,7 @@
def SaveToXml(self, daeDocument):
node = super(DaeSkin, self).SaveToXml(daeDocument)
- SetAttribute(node, DaeSyntax.SOURCE, "#" + self.source)
+ SetAttribute(node, DaeSyntax.SOURCE, "#" + StripString(self.source));
AppendTextChild(node, DaeSyntax.BIND_SHAPE_MATRIX, MatrixToString(self.bindShapeMatrix,ROUND))
AppendChilds(daeDocument, node, self.sources)
AppendChild(daeDocument,node,self.joints)
@@ -1016,13 +1016,13 @@
class DaeSpot(DaeTechniqueCommon):
def __init__(self):
super(DaeLight.DaeSpot,self).__init__()
- self.defConstantAttenuation = 0.0
+ self.defConstantAttenuation = 1.0
self.defLinearAttenuation = 0.0
self.defQuadraticAttenuation = 0.0
self.defFalloffAngle = 180.0
self.defFalloffExponent = 0.0
- self.constantAttenuation = 0.0
+ self.constantAttenuation = 1.0
self.linearAttenuation = 0.0
self.quadraticAttenuation = 0.0
self.falloffAngle = 180.0
@@ -1069,7 +1069,7 @@
class DaePoint(DaeTechniqueCommon):
def __init__(self):
super(DaeLight.DaePoint,self).__init__()
- self.constantAttenuation = 0.0
+ self.constantAttenuation = 1.0
self.linearAttenuation = 0.0
self.quadraticAttenuation = 0.0
self.syntax = DaeSyntax.POINT
@@ -1201,7 +1201,7 @@
node = super(DaeNode, self).SaveToXml(daeDocument)
if self.type == DaeSyntax.TYPE_JOINT:
SetAttribute(node, DaeSyntax.TYPE, self.type)##DaeNode.GetType(self.type))
- SetAttribute(node, DaeSyntax.SID, self.sid)
+ SetAttribute(node, DaeSyntax.SID, StripString(self.sid))
@@ -2151,7 +2151,6 @@
def SaveToXml(self, daeDocument):
node = super(DaeFxMaterialInstance,self).SaveToXml(daeDocument)
- print "x"
SetAttribute(node, DaeFxSyntax.TARGET, StripString('#'+self.object.id))
SetAttribute(node, DaeFxSyntax.SYMBOL, StripString(self.object.id))
AppendChild(daeDocument,node,self.bind);
@@ -2236,8 +2235,8 @@
self.maxfilter = DaeMaxFilter();
def LoadFromXml(self, daeDocument, xmlNode):
- super(DaeFxSampler2D, self).LoadFromXml(daeDocument, xmlNode)
- self.source = xmlUtils.ReadContents(xmlNode);
+ super(DaeFxSampler2D, self).LoadFromXml(daeDocument, xmlNode)
+ self.source = str(xmlUtils.ReadContents(xmlUtils.FindElementByTagName(xmlNode, DaeSyntax.SOURCE)))
self.minfilter = CreateObjectFromXml(daeDocument, xmlNode, "minfilter", DaeMinFilter);
self.maxfilter = CreateObjectFromXml(daeDocument, xmlNode, "maxfilter", DaeMaxFilter);
@@ -3463,7 +3462,10 @@
return True
def StripString(text):
- return text.replace(' ','_').replace('.','_')
+ if text != None:
+ return text.replace(' ','_').replace('.','_')
+ else:
+ return text;
def CreateExtra(colladaInstance):
if isinstance(colladaInstance, DaeEntity):
Modified: branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cstartup.py
===================================================================
--- branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cstartup.py 2007-08-06 20:21:40 UTC (rev 11509)
+++ branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cstartup.py 2007-08-07 02:15:42 UTC (rev 11510)
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
-# Illusoft Collada 1.4 plugin for Blender version 0.3.146
+# Illusoft Collada 1.4 plugin for Blender
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -34,7 +34,7 @@
print "Error! Could not find Blender modules!"
_ERROR = True
-__version__ = '0.3.146'
+__version__ = '0.3.159'
# Show the wait cursor in blender
Blender.Window.WaitCursor(1)
@@ -237,6 +237,35 @@
colladaReg = Blender.Registry.GetKey('collada',True)
if not (colladaReg is None):
fileButton.val = colladaReg.get('path', '')
+ fileParts = []
+ filePath = "";
+ fileParts = fileButton.val.split("\\");
+ partCount = len(fileParts);
+ if partCount > 0 :
+ for i in range(partCount):
+ if i == 0:
+ filePath = fileParts[i];
+ else :
+ if i != partCount - 1:
+ filePath = filePath + "\\" + fileParts[i];
+ else:
+ filePath = filePath + "\\";
+
+ blenderFilename = Blender.Get('filename');
+ fileParts = []
+ fileParts = blenderFilename.split("\\");
+ partCount = len(fileParts);
+ if partCount > 0 :
+ blenderFileOnlyName = fileParts[partCount -1];
+ blenderFileOnlyName = blenderFileOnlyName.replace(".blend", ".dae");
+ filePath = filePath + blenderFileOnlyName;
+ else :
+ filePath = filePath + "untitled.dae";
+
+
+ if len(filePath) > 0 :
+ fileButton.val = filePath;
+
if doImport:
toggleOnlyMainScene.val = colladaReg.get('onlyMainScene', False)
toggleNewScene.val = colladaReg.get('newScene', False)
@@ -394,7 +423,7 @@
else:
toggleUseUVVal = 0
- toggleUseUV = Blender.Draw.Toggle('Use UV Image',15,45, yval, 150, 20, toggleUseUVVal, 'Use UV Image instead of materials.')
+ toggleUseUV = Blender.Draw.Toggle('Use UV Image Mats',15,45, yval, 150, 20, toggleUseUVVal, 'Use UV Image instead of the material textures. Use this if you did not use the Material Textures window. Note: If you reimport this file, they will have moved to the materials section!!')
# Create Lookat Option
if not (toggleLookAt is None):
Modified: branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cutils.py
===================================================================
--- branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cutils.py 2007-08-06 20:21:40 UTC (rev 11509)
+++ branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/cutils.py 2007-08-07 02:15:42 UTC (rev 11510)
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
-# Illusoft Collada 1.4 plugin for Blender version 0.3.146
+# Illusoft Collada 1.4 plugin for Blender
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
Modified: branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/helperObjects.py
===================================================================
--- branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/helperObjects.py 2007-08-06 20:21:40 UTC (rev 11509)
+++ branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/helperObjects.py 2007-08-07 02:15:42 UTC (rev 11510)
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
-# Illusoft Collada 1.4 plugin for Blender version 0.3.146
+# Illusoft Collada 1.4 plugin for Blender
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -33,7 +33,9 @@
def __init__(self, armatureBObject, daeNode):
self.armatureBObject = armatureBObject
- self.blenderArmature = armatureBObject.data
+ self.blenderArmature = Blender.Armature.New ();
+ self.armatureBObject.link(self.blenderArmature);
+ print self.armatureBObject;
self.boneInfos = dict()
self.rootBoneInfos = dict()
# The real blender name of this armature
@@ -115,8 +117,8 @@
# Factory method
def CreateArmature(cls,objectName,armatureName, realArmatureName, daeNode):
- armatureBObject = Blender.Object.New('Armature',objectName)
- armatureBObject.data.name = str(realArmatureName)
+ armatureBObject = armature_obj = Blender.Object.New ('Armature', objectName)
+ armatureBObject.name = str(realArmatureName)
armature = Armature(armatureBObject, daeNode)
armature.name = armatureName
cls._armatures[armatureName] = armature
@@ -259,4 +261,3 @@
return None
GetAnimationInfo = classmethod(GetAnimationInfo)
-
\ No newline at end of file
Modified: branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/translator.py
===================================================================
--- branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/translator.py 2007-08-06 20:21:40 UTC (rev 11509)
+++ branches/2-44-stable/blender/release/scripts/bpymodules/colladaImEx/translator.py 2007-08-07 02:15:42 UTC (rev 11510)
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
-# Illusoft Collada 1.4 plugin for Blender version 0.3.146
+# Illusoft Collada 1.4 plugin for Blender
# --------------------------------------------------------------------------
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -46,14 +46,15 @@
clearScene = _clearScene
lookAt = _lookAt
exportPhysics = _exportPhysics
+ usePhysics = _exportPhysics
exportCurrentScene = _exportCurrentScene
useRelativePaths = _exportRelativePaths
useUV = _useUV
sampleAnimation = _sampleAnimation
onlyMainScene= _onlyMainScene
-
+
replaceNames = clearScene
-
+
self.isImporter = isImporter
self.fileName = ''
if self.isImporter:
@@ -150,9 +151,7 @@
self.filePath = ''
-
-
- self.currentBScene = Blender.Scene.getCurrent()
+ self.currentBScene = Blender.Scene.GetCurrent()
self.progressCount = 0.4
self.progressField = (1.0 - self.progressCount)
@@ -229,7 +228,7 @@
self.currentBScene = Blender.Scene.New('Scene')
self.currentBScene.makeCurrent()
else:
- self.currentBScene = Blender.Scene.getCurrent()
+ self.currentBScene = Blender.Scene.GetCurrent()
# Create a new Collada document
Blender.Window.DrawProgressBar(0.1, 'Get Collada Document')
@@ -305,7 +304,7 @@
return matrix
def Export(self, fileName):
- global __version__, filename
+ global __version__, filename, usePhysics
filename = fileName
self.ids = []
self.isImport = False
@@ -338,13 +337,15 @@
if not exportCurrentScene or self.currentBScene == bScene:
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list