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

Bastien Montagne montagne29 at wanadoo.fr
Sat Oct 10 13:21:04 CEST 2015


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
>



More information about the Bf-committers mailing list