Hi Antonio, I am glad to see you continue improving that script! I like it much, even if it doesn’t work completely well now, I think one of these days it will become very useful, especially with all the new things blender has for doing architecture work, exporting things in true and accurate 2D will be a key feature soon… at least for me!
The new version (vrm-0.3.beta-2007-02-24.py) works out of the box with 2.43 (CVS) on Ubuntu Edgy, WinXp (2.43 Release), but not on OS X 10.4 (2.43 Release or CVS).
I get this error:
jupiter:~/Desktop/blender-2.43-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS anders$ ./blender -w
guessing './blender' == '/Users/anders/Desktop/blender-2.43-OSX-10.3-py2.3-powerpc/blender.app/Contents/MacOS/./blender'
Compiled with Python version 2.3.
Checking for installed Python... got it!
vrm-0.3.beta-2007-02-:2986: SyntaxWarning: name 'outputfile' is assigned to before global declaration
vrm-0.3.beta-2007-02-:0: SyntaxWarning: name 'progress' is assigned to before global declaration
Outputting to: /Users/anders/Desktop/4.svg
Start Rendering of 1 frames
Frame: 340
Total Objects: 3
-------
Rendering Object: 0
Only Mesh supported! - Skipping type: Camera
-------
Rendering Object: 1
Only Mesh supported! - Skipping type: Lamp
-------
Rendering Object: 2
Rendering: RawMesh_Cube.001
There was an error! Aborting.
Traceback (most recent call last):
File "vrm-0.3.beta-2007-02-", line 1941, in doRendering
File "vrm-0.3.beta-2007-02-", line 2021, in doRenderScene
File "vrm-0.3.beta-2007-02-", line 2479, in _doViewFrustumClipping
File "vrm-0.3.beta-2007-02-", line 689, in splitOn
TypeError: iterable argument required
None
OS X is linked against Python 2.3, could that be the issue?
I use a trick to remove duplicated elements in a list, maybe it is supported only from python-2.4.
Can you run the following code with python-2.3, please?
#!/usr/bin/env python
posVertList = [1,2,3,4,5,6,5,6,7,1,1,1,2,3,4,5,4,6]
# uniq
posVertList = [ u for u in posVertList if u not in locals()['_[1]'] ]
print posVertList
jupiter:~ anders$ ./pos.py
Traceback (most recent call last):
File “./pos.py”, line 6, in ?
posVertList = [ u for u in posVertList if u not in locals()[‘_[1]’] ]
TypeError: iterable argument required
#!/usr/bin/env python
# If python version is less than 2.4, try to get set stuff from module
try:
set
except:
from sets import Set as set
posVertList = [1,2,3,4,5,6,5,6,7,1,1,1,2,3,4,5,4,6]
# uniq
posVertList_uniq2 = list(set(posVertList))
print posVertList_uniq2
Very interesting, and the site looks nice too :eyebrowlift: .
I was thinking about something like this for a while, but this is something to check out too.
Too bad I can’t download the script? at least not via the official site, or the projects.blender website.
I’ve gone to the ming site but I’m struggling to get this working. I’m running XP and OS10.4 can anyone point me in the right direction to get SWF option working?
Excuse me anders_gud, the previous method did not preserve the original order of elements, can you test this on python 2.3?
#!/usr/bin/env python
def uniq(alist):
set = {}
return [set.setdefault(e,e) for e in alist if e not in set]
posVertList = [6,6,6,5,7,2,4,6,1,2,3,4,5,6,5,6,7,1,1,1,2,3,4,5,4,6]
print uniq(posVertList)