Figures and Props

Hello,

In the Daz Studio FBX exporter, I see that it distinguishes between Figures and Props.  Just out of curiosity, what specific information is it using to identify a prop?  Is there a specific node class for props, or is the FBX exporter simply saying, everything that isn't a Figure, must be a prop?

 

 

Comments

  • I believe it's the latter - a figure has bone, a prop is just a static object.

  • BoltBolt Posts: 21
    edited September 2016

    I believe it's the latter - a figure has bone, a prop is just a static object.

    That must be so.  I know I can do this to filter out all figures:

     

     if(node->inherits("DzFigure")) { ... }

     

    but nothing specific like that for props.

    Post edited by Bolt on
  • Maybe you can do somthing like this...  Just add all filters, DzLight DzCameraif( node->inherits("DzFigure") || node->inherits("DzSkeleton") ) {} else {//It must be prop!}
  • Maybe you can do somthing like this...  Just add all filters, DzLight DzCameraif( node->inherits("DzFigure") || node->inherits("DzSkeleton") ) {} else {//It must be prop!}

    Sorry, I didn't realise which forum this was in and thought it was a geenral question. I thought DzSkeleton was all that you needed to test to identify a figure, but not everything that isn't a derivative of that will be a prop - at the very least you need to check to see if the node has geometry and isn't a figure.

  • rbtwhizrbtwhiz Posts: 2,250
    edited September 2016

    C++ : (FYI, qobject_cast<> is faster than ->inherits(); i.e., pointer compare vs string compare. qobject_cast<> also gives you a pointer of the correct type so you can begin calling methods on that class, whereas ->inherits() is typically followed by static_cast<>)

    DzNode *node = dzScene-&gt;getPrimarySelection();if( DzSkeleton *skeleton = qobject_cast&lt;DzSkeleton*&gt;(node) ){	if( DzFigure *figure = qobject_cast&lt;DzFigure*&gt;(node) )	{		// node is a weight mapped figure...	}	else if( DzLegacyFigure *legacyFig = qobject_cast&lt;DzLegacyFigure*&gt;(node) )	{		// node is a parametric figure...	}}else if( DzBone *bone = qobject_cast&lt;DzBone*&gt;(node) ){	// node is part of a figure...}else if( node ){	if( DzObject *object = node-&gt;getObject() )	{		// node is a prop...	}	else	{		// node is a geometry-less avatar/helper of some sort...	}}

     

    Daz Script : (no casting, .inherits() and/or .className() are what you've got)

    var oNode = Scene.getPrimarySelection();if( oNode &amp;&amp; oNode.inherits("DzSkeleton") ){	if( oNode.inherits("DzFigure") ){		print( "node is a weight mapped figure" );	} else if( oNode.inherits("DzLegacyFigure") ){		print( "node is a parametric figure" );	}} else if( oNode &amp;&amp; oNode.inherits("DzBone") ){	print( "node is part of a figure" );} else if( oNode &amp;&amp; oNode.getObject() ){	print( "node is a prop" );} else if( oNode ){	print( "node is a geometry-less avatar/helper of some sort :", oNode.className() );}

     

    -Rob

    Post edited by rbtwhiz on
  • BoltBolt Posts: 21

    Thanks for the post!  Very informative.

Sign In or Register to comment.