How to discover if a property is Modifier/Pose or Modifier/Shape

I'd like to manipulate modifier/pose properties on nodes.  How can I discover which they are?

function Adjust_Pose_Morphs(node)
{
    var properties = node.getPropertyList();
    
    for (i = 0; i < properties.length; i++)
    {        
        var property = properties[i];
        
        if(??? Modifier/Pose || Modifier/Shape)
        {
            
        }
    }
}

 

 

Comments

  • PraxisPraxis Posts: 254

    Try this:

    var Node = Scene.getPrimarySelection();if( !Node ) {  print( 'Select a Node first.' );} else {  var GeomObj = Node.getObject();  if( GeomObj ) {    var Count = GeomObj.getNumModifiers();    for( var J = 0; J &lt; Count; J++ ) {      var Mod = GeomObj.getModifier( J );      if( Mod ) {        if( Mod.inherits( 'DzMorph' ) ) {          ValueProperty = Mod.getValueChannel();                  // DzFloatProperty    (from v3 docs)          if( ValueProperty ) {            var Presentation  = ValueProperty.getPresentation();  // DzPresentation            if( Presentation ) {              var TypeStr = Presentation.type;                    // String (e.g. 'Modifier/Shape' )              print( J                   //  , Mod.className()                   , Mod.getName()                   , TypeStr                   //  , Mod.getNumProperties()                   //  , Mod.getNumDataItems()                   //  , Mod.getNumElementChildren()                   );            }          }        }      }    }  }}

    And see: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/presentation_dz#a_1a0b86e44425dbe3c9d866aa273f87828a

     

  • RobinsonRobinson Posts: 751

    Seemed to give me a list of Morph/Shape but no Morph/Pose. 

Sign In or Register to comment.