[Bf-python] Openingen DXF files with python

Campbell Barton cbarton at metavr.com
Tue Jun 29 16:19:54 CEST 2004


Another option is to convert dxf to OBJ or some other external 
converter- 3dto3d I think is okay.

Then you could import the obj automaticly.
This wouldent require any modifications to blender. of you can compile 
blender then have a look into the code, you might be able to make the 
hook yourself.
All you need to do is base your C/Python on another similar function and 
then find the function call that loads DXF files and put it in.

Of course there will always be errors that crop up but you can useually 
nut them out.

- Cam

Campbell Barton wrote:

> What you want is a hook to blenders open dxf function, none exist 
> right now but its useually trivial to add hooks like this.
> If I wasnt busy Id do it.
> - Cam
>
> blender at universalgrid.nl wrote:
>
>> Well, I want to open the file, just like pressing F1, automatically 
>> parsed to a model in Blender. If that isn't possible, I could write 
>> my own import script using this.
>>
>> On Tuesday 29 June 2004 15:01, Stephen Swaney wrote:
>>  
>>
>>> blender at universalgrid.nl wrote:
>>>   
>>>
>>>> Hi,
>>>> Just started Python scripting...
>>>> Is there any way to open a dxf file with python scripting in blender?
>>>>     
>>>
>>> The obvious answer to this question is to use
>>> the 'file' built-in command.  If your file is binary,
>>> you will want the 'struct' module which means a full
>>> python install.
>>>
>>> import struct
>>> f = file('my_file', 'rb') # open my_file in binary mode
>>>
>>> The obviousnes of this answer makes me suspect I have
>>> missed something implied by the question.
>>>   
>>
>>
>>  
>>
>
>


-- 
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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4851 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20040630/0ace8fce/attachment.bin>


More information about the Bf-python mailing list