[Closed] assign mocap data
change the path contained in the line:
iMocapImporterStruct.mCurRigPath = "C:/Shared/MaxMayaPipe/TestCharacters/MaxCharacters/skin_k0402_A.max";
to the path of your rig, and
iMocapImporterStruct.mCrowdCount = 3;
to the number of copies you need …
ok, thanks a million for your work…its works quite well!
but I am still having a few questions…so I want to understand the stuff and not only copy-paste it.
so could you please have a look on my code snippet and answer my questions corresponding to it (how to loop through all biped-roots) That would be great
So…I will continue going through your script and understand the lines.
Thanks!
Oli
ok, thanks a million for your work…its works quite well!
glad to be of help, Oli…
Am at work now, may not have time to comment/explain my code now, will do so after reaching home tonite. You could collect your questioon s and post them here …
so could you please have a look on my code snippet and answer my questions corresponding to it (how to loop through all biped-roots) That would be great
allBipRoots = for obj in $* where (try(classof obj.controller == Vertical_Horizontal_Turn)catch(false)) collect obj;
for obj in allBipRoots do
(
-- do your stuff here, eg. loading .bip files
print obj.name
)
cheers
shibu
great…its working! here is my current code:
macroscript makeClone
category: “myScripts”
(
for i = 1 to 1 do (maxOps.cloneNodes $ cloneType:#copy newNodes:&nnl
select #($Bip02,$Zeb_LR01) mod_result = mod i 2 if (mod_result == 0) then move $ [20,20,0] else move $ [-20,20,0] )
)
macroscript assignMocap
category: “myScripts”
(
allBipRoots = for obj in $* where (try(classof obj.controller == Vertical_Horizontal_Turn)catch(false)) collect obj;
for obj in allBipRoots do
(
biped.loadBipFile obj.controller “C:\Users\Oli\Videos\Documents\3dsmax\mocap\walk-normal-takiguchi.bip”
)
)
Everything works fine (a bit slow, but it works ;))
But there appeared a new problem with the mocap data. as you see I move my clones in the background. but after assigning the mocap data all models are moved back to 0,0,0 (which is quite logically).
So I think I have to take all the keyframes of the different models and move them to their new position…is that right? How can I achieve that?
Thanks for your great help!
Oli
You’ll find all biped key manipulation stuff in :
Biped Keys &
bipedkey:MaxObject
in the Maxscript reference…
You could also think of using biped layers, moving the biped COM, and then collapsing the layer.
Biped Layers in Maxscript reference.
thanks again! you are a good man
i checked the reference for the functions, but didn`t get further with them…when i tried this code (only for testing):
key = biped.getKey $Bip01.controller 1
i got the following error: “Key index out of range:1”
so…the key wasnt found. but there are keys on the biped. when i select it, i can see them.
so…i got my clones with the motion-capture data and now i need to move and rotate them to their positions in the scene. i also checked the layer-stuff but i didnt understand that. unfortunatly there are nearly no free tutorials or forums about maxscript…so google isnt a big help.
i hope, you have some seconds for answering my questions
thanks a million!
Oli
EDIT: i found out how to move an animated biped (moveAllMode)…i know how to switch in this mode, but not how to set the values and collapse it with maxscript.
EDIT2: got it
d = dummy()
obj.parent = d
move d [20,20,0]
delete d