www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Derelict Assimp RemoveComponent

reply "Lemonfiend" <lemon fie.nd> writes:
This might be OT, or missing in Derelict's Assimp bindings, I'm 
not sure.

The aiPostProcessSteps.RemoveComponent flag signals that I want 
Assimp to skip importing certain components.
But where/how do I specify these?

The docs only mention 
http://assimp.sourceforge.net/lib_html/config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637
which is less than helpful..

--
uint flags = aiPostProcessSteps.GenNormals;
flags |= aiPostProcessSteps.RemoveComponent;
// And now for the components?

auto scene = aiImportFile(path, flags);
--

Any ideas?
Sep 25 2013
next sibling parent "Mike Parker" <aldacron gmail.com> writes:
On Wednesday, 25 September 2013 at 15:32:08 UTC, Lemonfiend wrote:
 This might be OT, or missing in Derelict's Assimp bindings, I'm 
 not sure.

 The aiPostProcessSteps.RemoveComponent flag signals that I want 
 Assimp to skip importing certain components.
 But where/how do I specify these?

 The docs only mention 
 http://assimp.sourceforge.net/lib_html/config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637
 which is less than helpful..

 --
 uint flags = aiPostProcessSteps.GenNormals;
 flags |= aiPostProcessSteps.RemoveComponent;
 // And now for the components?

 auto scene = aiImportFile(path, flags);
 --

 Any ideas?
I think this is a question more likely to be answered in whatever Assimp community is out there. If it turns out there is a function missing from the Derelict binding, I'll be happy to add it. I have no knowledge of the usage of the Assimp API, though.
Sep 25 2013
prev sibling parent reply "David Nadlinger" <code klickverbot.at> writes:
On Wednesday, 25 September 2013 at 15:32:08 UTC, Lemonfiend wrote:
 The docs only mention 
 http://assimp.sourceforge.net/lib_html/config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637
 which is less than helpful..
I'm not sure what the problem is here. Just as the docs say, you have to set the (integer) AI_CONFIG_PP_RVC_FLAGS config option to a bitwise combination of aiComponent members. I think the corresponding C API function is aiSetImportPropertyInteger. David
Sep 26 2013
parent "Lemonfiend" <lemon fie.nd> writes:
On Thursday, 26 September 2013 at 23:08:15 UTC, David Nadlinger 
wrote:
 On Wednesday, 25 September 2013 at 15:32:08 UTC, Lemonfiend 
 wrote:
 The docs only mention 
 http://assimp.sourceforge.net/lib_html/config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637
 which is less than helpful..
I'm not sure what the problem is here. Just as the docs say, you have to set the (integer) AI_CONFIG_PP_RVC_FLAGS config option to a bitwise combination of aiComponent members. I think the corresponding C API function is aiSetImportPropertyInteger. David
I could not figure out which function was required, so that is exactly what I needed. Thanks! Sidenote: Seems like the derelict assimp bindings are missing the constants defined in config.h.
Oct 01 2013