void MorphByBone::PasteToMirror() { //get current sel int whichBone = GetMirrorBone(); if (whichBone != currentBone) this->MirrorMorph(currentBone,whichBone,TRUE); /* if (multiSelectMode) { for (int i = 0; i < boneData.Count(); i++) { if (boneData[i]->IsMultiSelected()) { CopyCurrent(i); int whichBone = GetMirrorBone(i); //make sure it is a valid node if ((whichBone < 0) || (whichBone >= boneData.Count()) ) { return; } float threshold = 0.0f; pblock->GetValue(pb_mirrorthreshold,0,threshold,FOREVER); BOOL flipTM=TRUE; pblock->GetValue(pb_mirrortm,0,flipTM,FOREVER); DebugPrint(_T("paste to buffer %d\n"),whichBone); copyBuffer.PasteToBuffer(this,boneData[whichBone],mirrorTM,threshold,flipTM); } } } else { CopyCurrent(); int whichBone = GetMirrorBone(); //make sure it is a valid node if ((whichBone < 0) || (whichBone >= boneData.Count()) ) { return; } float threshold = 0.0f; pblock->GetValue(pb_mirrorthreshold,0,threshold,FOREVER); BOOL flipTM=TRUE; pblock->GetValue(pb_mirrortm,0,flipTM,FOREVER); DebugPrint(_T("paste to buffer %d\n"),whichBone); copyBuffer.PasteToBuffer(this,boneData[whichBone],mirrorTM,threshold,flipTM); } */ }
void MorphByBone::fnMirrorPaste(INode *node) { int whichBone = this->GetBoneIndex(node); int whichMirrorBone = GetMirrorBone(); this->MirrorMorph(whichBone,whichMirrorBone,TRUE); UpdateLocalUI(); NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime()); }
void BonesDefMod::SetMirrorBone() { mirrorIndex = -1; if (pPainterInterface->GetMirrorEnable()) { Point3 center = pPainterInterface->GetMirrorPlaneCenter(); int dir = pPainterInterface->GetMirrorAxis(); float offset = pPainterInterface->GetMirrorOffset(); center[dir] += offset; mirrorIndex = GetMirrorBone(center, dir); } if (mirrorIndex == -1) mirrorIndex = ModeBoneIndex; }