Skin Morph Scripted Creation

Skin Morph Scripted Creation

adnanmg
Advocate Advocate
435 Views
0 Replies
Message 1 of 1

Skin Morph Scripted Creation

adnanmg
Advocate
Advocate

Hi,

 

I am trying to script the creation of a Skin Morph. It seems that I need to create the skin morph and add the bone.

 

$Obj.modifiers[#Skin_Morph].skinMorphOps.addBone $Bone
$Obj.modifiers[#Skin_Morph].skinMorphOps.selectBone $Bone ""
$Obj.modifiers[#Skin_Morph].skinMorphOps.createMorph $Bone		
$Obj.modifiers[#Skin_Morph].skinMorphOps.setExternalNode $Bone "Name" $MorphTarget

What I get is the skinmorph with  the bone added, but a morph with a 0 value and no sign of the external Morph Target.

 

If I want to get a working skinmorph, I can go in manually after this, add another morph so under the same bone, we have one morph at 0% and the other comes in at 100%.

 

Then I can manually add the external morph target and it does what I want the script to do.

 

I can't get this to work via script. I have not been able to find any examples of this in usage. I saw some code on the forum from years ago, that was essentially what I wrote above, but nothing else.

 

Any thoughts?

 

Thanks,

 

Adnan

0 Likes
436 Views
0 Replies
Replies (0)