void ControlPanel::initBoneControllerChoices() { CStudioHdr *hdr = models->GetActiveStudioModel()->GetStudioHdr(); if (hdr) { cController->setEnabled (hdr->numbonecontrollers() > 0); slController->setEnabled (hdr->numbonecontrollers() > 0); cController->removeAll(); for (int i = 0; i < hdr->numbonecontrollers(); i++) { mstudiobonecontroller_t *pbonecontroller = hdr->pBonecontroller(i); char str[32]; sprintf (str, "Controller %d", pbonecontroller->inputfield); cController->add (str); } if (hdr->numbonecontrollers() > 0) { mstudiobonecontroller_t *pbonecontrollers = hdr->pBonecontroller(0); cController->select (0); slController->setRange (pbonecontrollers->start, pbonecontrollers->end); slController->setValue (0); } } }
void ControlPanel::setModelInfo() { static char str[2048]; CStudioHdr *hdr = models->GetActiveStudioModel()->GetStudioHdr(); if (!hdr) return; int hbcount = 0; for ( int s = 0; s < hdr->numhitboxsets(); s++ ) { hbcount += hdr->iHitboxCount( s ); } sprintf (str, "Bones: %d\n" "Bone Controllers: %d\n" "Hit Boxes: %d in %d sets\n" "Sequences: %d\n", hdr->numbones(), hdr->numbonecontrollers(), hbcount, hdr->numhitboxsets(), hdr->GetNumSeq() ); lModelInfo1->setLabel (str); sprintf (str, "Textures: %d\n" "Skin Families: %d\n" "Bodyparts: %d\n" "Attachments: %d\n", hdr->numtextures(), hdr->numskinfamilies(), hdr->numbodyparts(), hdr->GetNumAttachments()); lModelInfo2->setLabel (str); }