Announcement

Collapse
No announcement yet.

Possible bug in MorphNodeMultiPose AddMorphTarget (needs to be set twice).

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Possible bug in MorphNodeMultiPose AddMorphTarget (needs to be set twice).

    Hi, I have problems to assign morphs targets to a MorphNodeMultiPose, I need to set twice to work properly.

    I have this test script:

    Code:
    exec function testmorphnode()
    {
    	local morphnodebase N;
    	local morphnodemultiPose P;
    	local int i;
    
    	
    	N = Mesh.FindMorphNode('multimorph');
    	P = morphnodemultiPose(N);
    
    	P.AddMorphTarget('morph_name', 1);
    //	P.AddMorphTarget('morph_name', 1); //with this line works
    	
    
    //     List targets in the node
    
    	for (i=0; i < P.Morphnames.length; i++) 
    	{
    		`log("names"@i@P.Morphnames[i]@" - "@P.Weights[i]);
    	}
    }
    The first part assign the target, the second part list the content of the node. Doing a unique "addmorphtarget", the result is this:

    names 0 morph_name - 0.0000

    the target is added, but the weight is 0. It's incorrect.

    doing twice the addmorph, the result is the correct:

    names 0 morph_name - 1.0000


    Seems to be neccesary some node update after adding targets. I have tried with forceskelupdate, but no result.

    Works correctly using two addmorphtarget, but there is a way to do correctly, or is a bug?
Working...
X