void FExtrudeMod::ActivateSubobjSel(int level, XFormModes& modes) { switch (level) { case 1: // Points modes = XFormModes(mp_moveMode,NULL,NULL,NULL,NULL,NULL); break; } NotifyDependents(FOREVER,PART_DISPLAY,REFMSG_CHANGE); }
void SymmetryMod::ActivateSubobjSel(int level, XFormModes& modes) { switch (level) { case 1: // Mirror center modes = XFormModes (mp_moveMode, mp_rotMode, mp_scaleMode, mp_nuScaleMode, mp_squashMode, NULL); break; } NotifyDependents(FOREVER,PART_DISPLAY,REFMSG_CHANGE); }
void EditFaceDataMod::ActivateSubobjSel(int level, XFormModes& modes) { // Set the meshes level selLevel = level; // Fill in modes with our sub-object modes if (level!=SEL_OBJECT) { modes = XFormModes(NULL,NULL,NULL,NULL,NULL,selectMode); } // Update UI UpdateDialog (); ip->PipeSelLevelChanged(); NotifyDependents(FOREVER, SELECT_CHANNEL|DISP_ATTRIB_CHANNEL|SUBSEL_TYPE_CHANNEL, REFMSG_CHANGE); }
void EditPatchMod::ActivateSubobjSel(int level, XFormModes& modes) { ModContextList mcList; INodeTab nodes; int old = selLevel; if (!ip) return; ip->GetModContexts(mcList, nodes); selLevel = level; // 3-10-99 watje if (level != EP_PATCH) { if (ip->GetCommandMode() == bevelMode) ip->SetStdCommandMode(CID_OBJMOVE); if (ip->GetCommandMode() == extrudeMode) ip->SetStdCommandMode(CID_OBJMOVE); if (inBevel) { ISpinnerControl *spin; spin = GetISpinner(GetDlgItem(hOpsPanel, IDC_EP_OUTLINESPINNER)); if (spin) { HWND hWnd = spin->GetHwnd(); SendMessage(hWnd, WM_LBUTTONUP, 0, 0); ReleaseISpinner(spin); } } if (inExtrude) { ISpinnerControl *spin; spin = GetISpinner(GetDlgItem(hOpsPanel, IDC_EP_EXTRUDESPINNER)); if (spin) { HWND hWnd = spin->GetHwnd(); SendMessage(hWnd, WM_LBUTTONUP, 0, 0); ReleaseISpinner(spin); } } } if (level != EP_VERTEX) { if (ip->GetCommandMode() == bindMode) ip->SetStdCommandMode(CID_OBJMOVE); } switch (level) { case EP_OBJECT: // Not imp. break; case EP_PATCH: modes = XFormModes(moveMode, rotMode, nuscaleMode, uscaleMode, squashMode, selectMode); break; case EP_EDGE: modes = XFormModes(moveMode, rotMode, nuscaleMode, uscaleMode, squashMode, selectMode); break; case EP_VERTEX: modes = XFormModes(moveMode, rotMode, nuscaleMode, uscaleMode, squashMode, selectMode); break; case EP_TILE: modes = XFormModes(NULL, NULL, NULL, NULL, NULL, selectMode); break; } if (selLevel != old) { SetSubobjectLevel(level); // Modify the caches to reflect the new sel level. for (int i = 0; i < mcList.Count(); i++) { EditPatchData *patchData =(EditPatchData*)mcList[i]->localData; if (!patchData) continue; if (patchData->tempData && patchData->TempData(this)->PatchCached(ip->GetTime())) { RPatchMesh *rpatch; PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(), rpatch); if (patch) { if (selLevel == EP_VERTEX) patch->dispFlags = DISP_VERTS; else patch->dispFlags = 0; if (displayLattice) patch->SetDispFlag(DISP_LATTICE); patch->SetDispFlag(patchLevelDispFlags[selLevel]); patch->selLevel = patchLevel[selLevel]; rpatch->SetSelLevel (selLevel); } } } NotifyDependents(FOREVER, PART_SUBSEL_TYPE | PART_DISPLAY, REFMSG_CHANGE); ip->PipeSelLevelChanged(); // Update selection UI display, named sel SelectionChanged(); } nodes.DisposeTemporary(); }