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

Campbell Barton cbarton at metavr.com
Sat Jun 24 00:55:31 CEST 2006


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


Open_GEOfile - looks suspicious
Loading  a object and assuming it will be last is probably OK for now 
but it might not always work.

Blender.Load(dir+nom+'OOO.obj', 1)
BO=Blender.Object.Get()

BO[-1].....

Ideal would be to load it and make sure the object you get is the right 
one though maybe Im being pedantic here.

- Cam


Willian Padovani Germano wrote:
> Hi Campbell,
>
> No, svg2obj is one of Jean-Michel's modules (in scripts/bpymodules) 
> used by his paths import script. BTW, the updated versions of svg2obj 
> and the hotkeys script are already in cvs.
>
> -- 
> Willian
>
> Campbell Barton wrote:
>> So this replaces the script path_import.py in Blender CVS?
>> would you be able to fix the indenting, Your funtions use use 1 to 3 
>> spaces for indenting and it makes it hard for me to read.
>>
>>
>> jmsoler at free.fr wrote:
>>
>>> In fact, this patch is older .
>>>
>>> Selon Campbell Barton <cbarton at metavr.com>:
>>>
>>>  
>>>
>>>> Does this file fix the bug...
>>>>
>>>>     
>>>
>>> https://projects.blender.org/tracker/index.php?func=detail&aid=4289&group_id=9&atid=125 
>>>
>>>  
>>>
>>>>
>>>> jean-michel soler wrote:
>>>>   
>>>>> http://jmsoler.free.fr/util/blenderfile/py/svg2obj_048.py
>>>>>
>>>>> Regards
>>>>> jms
>>>>>
>>>>> _______________________________________________
>>>>> Bf-python mailing list
>>>>> Bf-python at projects.blender.org
>>>>> http://projects.blender.org/mailman/listinfo/bf-python
>>>>>
>>>>>       
>>>>
>>>> -- 
>>>> Campbell J Barton
>>>>
>>>> 133 Hope Street
>>>> Geelong West, Victoria 3218 Australia
>>>>
>>>> URL:    http://www.metavr.com
>>>> e-mail: cbarton at metavr.com
>>>> phone: AU (03) 5229 0241
>>>> _______________________________________________
>>>> Bf-python mailing list
>>>> Bf-python at projects.blender.org
>>>> http://projects.blender.org/mailman/listinfo/bf-python
>>>>
>>>>     
>>>
>>>
>>>
>>>
>>>   
>>
>>
>>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list