PDA

View Full Version : Biped Figure Mode


JackStephen
03-29-2007, 09:57 PM
Does anybody know how to activate the Figure Mode on a Biped?
This is what i've tried but it doesn't work.




bool BipedFigureMode(INode* node, bool state) {

if (node->IsRootNode()) return false;

Control* c = node->GetTMController();

if ((c->ClassID() == BIPSLAVE_CONTROL_CLASS_ID) ||
(c->ClassID() == BIPBODY_CONTROL_CLASS_ID) ||
(c->ClassID() == FOOTPRINT_CLASS_ID)) {

IBipedExport *iBiped =(IBipedExport *)c->GetInterface(I_BIPINTERFACE);

if (iBiped) {

if (state) iBiped->BeginFigureMode(1);
else iBiped->EndFigureMode(1);

Control* iMaster = (Control *) c->GetInterface(I_MASTER);
iMaster->NotifyDependents(FOREVER, PART_TM, REFMSG_CHANGE);

c->ReleaseInterface(I_MASTER,iMaster);
c->ReleaseInterface(I_BIPINTERFACE,iBiped);

return true;
}
}
return false;
}

chewbacca007
03-30-2007, 03:21 PM
Hope this helps.

-Chris

-- Creates a Biped and sets it in Figue Mode

(
myBiped = biped.CreateNew 72 -90 [0,0,69] neckLinks:2 spineLinks:5 fingers:5 \
fingerLinks:3 toes:5 toeLinks:3 forearmTwistLinks:4
newBip = myBiped.transform.controller
newBip.figureMode = True --Figure Mode On
newBip.bodyType = 3
max motion mode
select myBiped
)

CGTalk Moderation
03-30-2007, 03:21 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.