Empty morph deltas

var node = Scene.getPrimarySelection();var obj = node.getObject();var morph = obj.findModifier("PHMBrowWidth");var deltas = morph.getDeltas();print("Num deltas: "+deltas.getNumDeltas ());

If I run the previous lines of code (on G8F), I get 0 as result of number of deltas by default. But if I dial up the "Brow Width" morph on the character to any value, I get the correct number of deltas of the morph. 

Then if I analyze the figure by script, create an array of morphs from it, and try to get the deltas from all of the morphs one by one, the number of deltas returned is always 0, even if the morphs are all dialed up on the figure. 

Any idea? I'm trying to edit the geometry of all morphs on a figure by script in order to save tons of time...

Comments

  • meipemeipe Posts: 101
    var node = Scene.getPrimarySelection();	var oObject = node.getObject();	if( oObject != null ){			for( var i = 0; i < oObject.getNumModifiers(); i++ ){				var oMod = oObject.getModifier( i );				if( oMod.className() == "DzMorph" ){				var	oProp = oMod.getProperty( 0 );										var oDeltas = oMod.getDeltas();					var nNumDeltas = oDeltas.getNumDeltas();					print("Num deltas: "+nNumDeltas);									}			}		}

    I tried to access to all the deltas of all morphs with this code.

    If the selected node in the scene is a figure, all deltas numbers are 0.

    If the selected node in the scene is a prop, all deltas numbers are correct...

  • meipemeipe Posts: 101

    Turns out it's because of geometry subdivision. If I remove it from the figure geometry, all works fine.

Sign In or Register to comment.