LukeA opened this issue on Jul 01, 2009 · 6 posts
LukeA posted Wed, 01 July 2009 at 1:46 PM
I am working on creating DS3 compatible versions of my products and I can open the scenes and everything looks great but I can't for the life of me figure out how to save one prop as a prop in the prop library.
L
LukeA
Pret-a-3D posted Wed, 01 July 2009 at 1:49 PM
What format is the prop? Are you importing an .OBJ or you have the Poser file?
Paolo
https://www.preta3d.com
FB: https://www.facebook.com/RealityPlugIn
Tw: @preta3d
G+:
https://plus.google.com/106625816153304163119
The
Reality Gallery: https://reality-plug-in.deviantart.com
LukeA posted Wed, 01 July 2009 at 1:50 PM
Both. I can open the Poser file or import the OBJ.
Thanks for the quick reply.
LukeA
Pret-a-3D posted Wed, 01 July 2009 at 2:01 PM
Well, if you have a Poser file then it works in Studio, you don't have to do anything. Or am I missing something here?
Paolo
https://www.preta3d.com
FB: https://www.facebook.com/RealityPlugIn
Tw: @preta3d
G+:
https://plus.google.com/106625816153304163119
The
Reality Gallery: https://reality-plug-in.deviantart.com
mishamcm posted Wed, 01 July 2009 at 2:11 PM
I take it you want to adjust the surface settings for D|S and then save it for D|S? You can just save it as a .daz scene file, or you can save a material preset. If you want to be able to click the .pp2 file and have it automatically load with D|S mat settings in D|S, save the material preset to the Props library with the same name as the .pp2 file, then open the .ds/.dsa file in a text editor and make the following change:
function collectNodes( bSelected, bRecurse, bFromRoot ){
var aRootNodes = new Array;
var nNodes = bSelected ? Scene.getNumSelectedNodes() : Scene.getNumNodes();
if( bSelected && nNodes < 1 ){
MessageBox.warning( "This action requires an item within the scene to be selected.",
"Selection Error", "OK", "" );
}
var oNode;
for( var n = 0; n < nNodes; n++ ){
oNode = bSelected ? Scene.getSelectedNode( n ) : Scene.getNode( n );
if( oNode == undefined ){
continue;
}
if( oNode.inherits( "DzBone" ) ){
if( bFromRoot ){
oNode = oNode.getSkeleton();
}
else if( bRecurse ){
var oTopNode = oNode;
while( !oTopNode.inherits( "DzSkeleton" ) ){
oTopNode = oTopNode.getNodeParent();
if( oTopNode.isSelected() ){
oNode = oTopNode;
}
}
}
}
aRootNodes = addToArray( aRootNodes, oNode );
}
return aRootNodes;
}
======================
function collectNodes( bSelected, bRecurse, bFromRoot ){
var origNodes, ourNode;
var n , m;
if ( getArguments().length == 0 )
return [];
origNodes = Scene.getNodeList();
if ( App.getImportMgr().readFile( getArguments()[0] ) == 0 ) {
var newNodes = Scene.getNodeList();
ourNode = undefined;
for( n = 0; n < newNodes.length && !ourNode ; n++ ) {
ourNode = newNodes[ n ];
for ( m = 0 ; m < origNodes.length && ourNode ; m++ ) {
if ( ourNode == origNodes[ m ] )
ourNode = undefined;
}
}
if ( ourNode )
return [ ourNode ];
}
return [];
}
=========================================
RHaseltine posted Wed, 01 July 2009 at 2:22 PM
I'm not sure that will work with DS3 - I haven't tried dissecting a preset saved from there, and the scripting engine has changed so the code will have changed at least somewhat.