[Bf-committers] Removing and using modules for importing .obj and exporting to .fbx

Rasmus Siljedahl rassi149 at student.liu.se
Mon Oct 12 13:55:36 CEST 2015


Hi, thanks for your reply. I have found the WM_operator functions which are
the functions such as "new file", "open file", "save" and a lot of other
functions.
But I cannot find any functions about the import and export which is weird
because they are on the same tab under file.

My goal is to write a .obj to .fbx converter. I know that the FBX export
might not be the best place to begin with but the importer for OBJ should
be around the same place.
I guess the converting part is not going to be easy either. Do you know
where that operation is located?

Thanks again for your answer
Rasmus

2015-10-10 13:21 GMT+02:00 Bastien Montagne <montagne29 at wanadoo.fr>:

> Hi Rasmus,
>
> I’m not *that* sure using Blender sources for a school assignment is the
> best idea ever (unless you have months for it?), this is a huge and
> quite complex codebase, which needs time to be grasped.
>
> That said, FBX exporter is an operator, so it gets called by Blender
> (windowmanager/ source area, search for 'WM_operator_' functions),
> usually from our UI code (editors/interface/ area of source). And
> context is merely an API container which gives access (through RNA) to
> blender's data currently available in current context (defined by active
> scene, active editor, active mode, etc.).
>
> Also, FBX exporter is **really complex** code, it also have no firm
> basis (there are no publicly-available specs for this format), so
> porting it to C++ is obviously possible, but it won't be easy (just
> consider the size of this code in py, which is a very expressive and
> compact language…).
>
> Finally, I’m not sure what exactly is your goal? Simply to convert the
> exporter code in C++? Or to hook it up with Blender too?
>
> Regards,
> Bastien
>
> Le 09/10/2015 15:00, Rasmus Siljedahl a écrit :
> > I have a school assignment to extract and use code from a open source
> > program and write a new one in C++. I have located the python scripts
> used
> > for doing what i want but I do not know where to go from that.
> > I dont know much about Python or scripting and I cant grasp where the
> data
> > for the export is coming from. Inside the init file for
> > FBX(Blender\release\scripts\addons\io_scene_fbx) there is this execute
> > operator with context as parameter. I dont know what is calling this init
> > function or how the data gets to the file through the context parameter.
> >
> > Is the "only" step left to start translating what I've got to C++? I
> found
> > the exportation of the FBX file very confusing and complex and I guess
> the
> > conversion is gonna be even harder. Is this even possible?
> >
> > Any feedback to what I should do or ideas is very helpful
> >
> > regards,
> > Rasmus
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
> >
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list