Digital Art Zone

 
     
Exporting selected object
Posted: 25 September 2012 04:55 PM   [ Ignore ]
Power Member
Avatar
RankRankRank
Total Posts:  1319
Joined  2009-10-27

DzExporter will export all the objects avaiable in the scene except the hidden ones. If I’d like to export only the primary selection, I could loop all the nodes and hide everything except the currently selected one. But I’d like to know if there is already an option or a way to do it in the SDK…

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 25 September 2012 08:32 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRank
Total Posts:  365
Joined  2003-10-09

DAZ Studio > v4.x > Reference Guide > Scripting > API Reference > Samples > File Input/Output > Silent OBJ Export provides a sample script that will show you the logic and available settings for the Wavefront Object (OBJ) exporter. The same code could be translated to a C++ function, fairly easily.

Each exporter is responsible for providing its own settings. DAZ Studio > v4.x > Reference Guide > Scripting > API Reference > Samples > File Input/Output > Exporter Settings will allow you see what settings are available for a given exporter, if any.

-Rob

 Signature 

- Documentation Center
- Install Manager
- DAZ Studio 4.x
- DSON Importer
- DSON File Format Specification

Profile
 
 
Posted: 26 September 2012 01:25 AM   [ Ignore ]   [ # 2 ]
Power Member
Avatar
RankRankRank
Total Posts:  1319
Joined  2009-10-27

Hi Rob, I indeed had that sample already converted to C++, and after studying the options (which are the same “offered” buy the Studio interface export command), I realized that indeed there was not a way to export only the selected object.
That’s why I decided to ask.

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 26 September 2012 02:51 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1319
Joined  2009-10-27

Darn me… I just took a closer look at the code and there is a:

        // Do not limit export to selection - only available in 4.1.x
        oSettings->setBoolValue( “SelectedOnly”, false );

Sorry…

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile
 
 
Posted: 26 September 2012 10:17 PM   [ Ignore ]   [ # 4 ]
Member
Rank
Total Posts:  124
Joined  2004-10-23

yes, since these were added you should also add a version check to your script to ensure that older versions dont have conflict with unsupported terms.

Profile
 
 
Posted: 27 September 2012 01:32 AM   [ Ignore ]   [ # 5 ]
Power Member
Avatar
RankRankRank
Total Posts:  1319
Joined  2009-10-27
Tugpsx - 26 September 2012 10:17 PM

yes, since these were added you should also add a version check to your script to ensure that older versions dont have conflict with unsupported terms.

Thanks, will do that!

 Signature 

Alessandro’s Store
Blog
LAMH FB

Profile