[Bf-python] [bundle scripts] svg path module has been updated for a while but it is not currently in the 2.42 cvs

jmsoler at free.fr jmsoler at free.fr
Sat Jun 24 01:47:07 CEST 2006


Selon Campbell Barton <cbarton at metavr.com>:

> Can this be closed then?
>
https://projects.blender.org/tracker/index.php?func=detail&aid=4289&group_id=9&atid=125
>
> JMS, some changes  to make to svg2obj
>
> is  test_egalitedespositions used? - L357m only script I found that uses
> it defines it again anyway- if you used a tuple rather then a list I
> think you could avoid this function altogether.
>
> as long as you know your dealing with lists not list vs None or something
>
> replace if    a==[]:     with     if not a:
>
> if a in dict.keys()     can be    if a in iterkeys()    -  saves making
> a list only to search through. L491, 493, 511,  515, 518, 519, 617...
> lots more
>
> for k in dict.keys(): dict[k].foobar[0] = someval
> # This is unnecessary dict lookup - L402, 1294
> # use for val in dict.values(): val.foobar[0]= somefal
>
> # Dont use len(dict.keys()) since its converting all the items to a list
> only to get their length - L 1293, 1306
> len(dict) works fine
>

ok, i will test all this .
regards



More information about the Bf-python mailing list