Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

Creating a morph via script, and getting clothing to conform

$
0
0

So I've been able to create new morphs for G3F via script. The dials show up under Parameters -> Morphs with the figure selected, and they dial in the morph as expected. Aces.

However, when I fit clothing to the figure, it ignores the morphs. Anybody have any experience with such things, or care to venture any guesses as to what I need to do, or might try to get this working?

Below is the snippet of code that actually creates the morph (note: newMorphDeltas has already been filled at this point):

        var newMorph = new DzMorph( newMorphDeltas );
        oObject.addModifier (newMorph, -1);
        var curModifier = oObject.getModifier(oObject.getNumModifiers()-1);
        curModifier.setName( morphPrefix + " " + partialName );
        
        var curProperty = newMorph.getValueChannel();
        curProperty.setValue( 0.0 );
        curProperty.setMin( -1.0 );
        curProperty.setMax( 1.0 );
        curProperty.setIsClamped ( true );

Thanks in advance for any ideas that anyone may have!

- Greg

 


Viewing all articles
Browse latest Browse all 1036

Trending Articles