Search code examples
maxscript

Rebuild morph targets in Maxscript


Am I right in thinking that WM3_MC_Rebuild reloads a morph target (on it's specified channel)?

In which case, why doesn't the following seem to have the desired effect?

    for i = 1 to 12 do
(
    WM3_MC_Rebuild myObj.morpher i
)

Solution

  • Yes, the WM3_MC_Rebuild function triggers a rebuild as specified. I don't know why your not getting your desired effect but the issue is probably not with the function being called (some condition is not being met to allow the rebuild, perhaps).

    If you have a version of Visual Studio, you can actually view the source code for this function at samples\modifiers\morpher\MorpherMXS\mcfunc.cpp, called wm3_mc_rebuild_cf(Value** arg_list, int count)

    You can rebuild this project, copy the dll into stdplugs, and then put a breakpoint in the function and step through the code. Very very handy!