View Full Version : retrieving progressive morph targets

3rd Dimentia
09-17-2009, 05:56 AM
Hi, this is long shot but I thought I'd ask anyway.

I have a scene that has a character's head with a morpher with targets assigned to the morpher. Some of these targets are progressive. The target objects themselves have been deleted from the scene so there is no list in the progressive morph section of the dialog. I can get the number of progressive morphs targets in each slot by using WM3_NumberOfProgressiveMorphs. But I can't seem to be able to tell at what target% each of the progressive targets are set to. I don't need the actual target objects, I just need to find out what % each progressive target is set to and I can extract from there. I can find everything I need and more if alll the progressive targets still exist in the scene, but I'm writing this script to hopefully work without having then still in the scene.

Has anyone had any experience with this kind of thing?



09-17-2009, 08:19 AM
Afaik, you need the original nodes to still exist in the scene to be able to get this information.. Both WM3_GetProgressiveMorphWeight and WM3_SetProgressiveMorphWeight require a node as the last parameter, and I don't think there's a way around this.


09-17-2009, 05:24 PM
You have then "out of scene" by using an Xref Scene. Save all your Morph Targets in an max file, create an "Xref Scene" of it and run this... It will build the Morph Target object. You need to enable the Xref Scene when building it, but after that you can disabled it and check it not visible and never see it again!

A robust version of this would sort by names in the Xref Scene and add missing ones.. ect.. this is just to show the concept..

XMorphScene = xrefs.getXRefFile 1

tnBaseMorph = Editable_Mesh()
tnBaseMorph.mesh = XMorphScene.tree.children[1].mesh
tnBaseMorph.name = XMorphScene.tree.children[1].name
createMorphObject tnBaseMorph

for i=2 to XMorphScene.tree.children.count do
addMorphTarget tnBaseMorph.Morph XMorphScene.tree.children[i] 1


CGTalk Moderation
09-17-2009, 05:24 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.