[Bf-python] [bundle scripts ] svg/paths import
Campbell Barton
cbarton at metavr.com
Wed Dec 27 16:24:00 CET 2006
jean-michel soler wrote:
> jean-michel soler a écrit :
>
>> The script has been updated . Tested with Blender 2.42a and the
>> current CVS , it works fine
>> and it just waits for somebody to be committed :
>> http://jmsoler.free.fr/util/blenderfile/py/svg2obj_052.py
>
>
> Improvment : 35% faster now . 30254 points loaded in 11 seconds .
> http://jmsoler.free.fr/util/blenderfile/py/svg2obj_053.py
>
> Best regards,
> jms
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
Hi, had a look at the latest code,
Can you do some dict optimizations?
instead of
len(foo.keys())
just to len(foo) - saves making a new list just to check the dict length.
Your doing too many dict lookups in places where you can quickly get the
value without a lookup
for k in courbes.ITEM.keys():
t.append("%s\n"%courbes.ITEM[k].type)
with
for k, val in courbes.ITEM.iteritems():
t.append("%s\n"% val.type)
if 'rx' in prp.keys()
with
if 'rx' in prp
Minor issue, Scene.getCurrent() - should be GetCurrent
More information about the Bf-python
mailing list