[Bf-python] a direct x importer addon for 2.6x

jerome jerome.le.chat at free.fr
Thu Nov 24 08:52:12 CET 2011


oh ok Campbell,

this should be alright then, at least for objs, meshes and mats. (tex 
slots / img not supported yet but will be)
I though you talked about python module namespaces, 'import / from bpy 
import' etc stuffs :)

bpy.data.materials.new(name="MyMat").name = name
:)

J.


Le 23/11/2011 11:52, Campbell Barton a écrit :
> Hi Jerome, good to see quick progress, for getting this ready for blender.
>
> regarding the namespace issue, consider that someone might have d
> DirectX files both having the same material name (but each material
> being completely different&  referencing different images).
>
> If you want to export these into the same blend file the first import
> will work fine.
>
>>>> bpy.data.materials.new(name="MyMat")
> bpy.data.materials['MyMat']
>
> later this works ok
>>>> mat = bpy.data.materials['MyMat']
>
> On the second import however, this happens...
>>>> bpy.data.materials.new(name="MyMat")
> bpy.data.materials['MyMat.001']
>
> later on when getting the material, it will get the one from the
> initial import, which is a bug since they may have nothing else in
> common then the name.
>>>> mat = bpy.data.materials['MyMat']
>
> So bottom line - use bpy.data.*.new but never use it to get data back
> during import.
> You can have a dictionary which stores an (orig_name: data) mapping
> for each import, this way you dont care if there are collisions and
> you dont care if the name happens to be already used.
>
>
> On Wed, Nov 23, 2011 at 9:02 PM, jerome<jerome.le.chat at free.fr>  wrote:
>> Hi,
>>
>> here is an update :
>> https://github.com/littleneo/directX_blender
>> (last mods are in the readme)
>>
>> Hi Campbell,
>> thanks for your feedback :)
>> I modified the addon according to your requests and added a parenting
>> and a naming methods features, please let me know what you think.
>> I didn't get it about the namespaces issues between dx and bpy.. where
>> is there a mix ?
>>
>> Jerome
>>
>>
>> Le 21/11/2011 08:04, Campbell Barton a écrit :
>>> Hi jerome, good work with the script!
>>>
>>> I've left a review on google code review for git # eb6deca3cb
>>>
>>> --- Basically once the DirectX<vs>Blender namespace issues are
>>> addressed, +1 for adding the script into blender, see codereview for
>>> details.
>>>
>>> http://codereview.appspot.com/5416057/
>>>
>>> - Campbell
>>>
>>> On Wed, Nov 16, 2011 at 11:57 PM, jerome<jerome.le.chat at free.fr>    wrote:
>>>> hi,
>>>>
>>>> I published an addon to import stuff from direct .x files :
>>>>
>>>> blender projects :
>>>> http://projects.blender.org/tracker/index.php?func=detail&aid=29291&group_id=153&atid=467
>>>>
>>>> community feedback :
>>>> http://blenderartists.org/forum/showthread.php?236401-a-directX-importer
>>>>
>>>> project page :
>>>> https://github.com/littleneo/directX_blender
>>>>
>>>> bugtracker for now :
>>>> https://github.com/littleneo/directX_blender/issues
>>>>
>>>> there's no support yet for armatures but this is on the way. (weight groups step)
>>>>
>>>> thanks for your feedback, please note the code is not very clean, as I'm still adding features, but I think it's reliable enough to be reviewed by you. thanks to send me .x files that would cause a bug :)
>>>>
>>>> Jerome
>>>>
>>>>
>>>> _______________________________________________
>>>> Bf-python mailing list
>>>> Bf-python at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-python
>>>>
>>>
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-python
>>
>
>




More information about the Bf-python mailing list