Notifications
Clear all

[Closed] retrieving progressive morph targets

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?

Cheers,

Cg.

2 Replies

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.

Martijn

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

Enjoy