void TriObject::RescaleWorldUnits(float f) { if (TestAFlag(A_WORK1)) return; SetAFlag(A_WORK1); for (int i=0; i<mesh.numVerts; i++) mesh.verts[i] *= f; mesh.buildBoundingBox(); NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE); }
BOOL BonesDefMod::EndStroke() { theHold.Restore(); ApplyPaintWeights(painterData[0].alt, NULL); theHold.Accept(GetString(IDS_PW_WEIGHTCHANGE)); NotifyDependents(FOREVER, GEOM_CHANNEL, REFMSG_CHANGE); RebuildPaintNodes(); return TRUE; }
void MirrorMod::ActivateSubobjSel(int level, XFormModes& modes) { switch (level) { case 1: // Mirror center modes = XFormModes(moveMode,rotMode,nuscaleMode,uscaleMode,squashMode,NULL); break; } NotifyDependents(FOREVER,PART_DISPLAY,REFMSG_CHANGE); }
void PFOperatorMaterialFrequency::SetReference(int i, RefTargetHandle rtarg) { bool doUIRefresh = false; switch (i) { case kMaterialFrequency_reference_pblock: _pblock() = (IParamBlock2*)rtarg; break; case kMaterialFrequency_reference_material: _material() = (Mtl *)rtarg; if (updateFromRealMtl()) { NotifyDependents(FOREVER, PART_MTL, kPFMSG_UpdateMaterial, NOTIFY_ALL, TRUE); NotifyDependents(FOREVER, 0, kPFMSG_DynamicNameChange, NOTIFY_ALL, TRUE); } break; } }
void SymmetryMod::BeginEditParams (IObjParam *ip, ULONG flags,Animatable *prev) { mp_ip = ip; // Create sub object editing modes. mp_moveMode = new MoveModBoxCMode(this,ip); mp_rotMode = new RotateModBoxCMode(this,ip); mp_scaleMode = new UScaleModBoxCMode (this, ip); mp_nuScaleMode = new NUScaleModBoxCMode (this, ip); mp_squashMode = new SquashModBoxCMode (this, ip); TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON); SetAFlag(A_MOD_BEING_EDITED); // For PB2 we ask the ClassDesc2 to take care of the BeginEditParams symDesc.BeginEditParams(ip,this,flags,prev); }
int BlobMesh::RenderEnd(TimeValue t) { ClearAFlag(A_RENDER); inRender = FALSE; ivalid.SetEmpty(); NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE); return 0; }
void FExtrudeMod::ActivateSubobjSel(int level, XFormModes& modes) { switch (level) { case 1: // Points modes = XFormModes(moveMode,NULL,NULL,NULL,NULL,NULL); break; } NotifyDependents(FOREVER,PART_DISPLAY,REFMSG_CHANGE); }
void SolidifyPW::ActivateSubobjSel(int level, XFormModes& modes) { if (ip) { ip->PipeSelLevelChanged(); NotifyDependents(FOREVER, PART_SELECT|PART_DISPLAY|PART_SUBSEL_TYPE, REFMSG_CHANGE); } }
int ParticleMesherObject::RenderEnd(TimeValue t) { ClearAFlag(A_RENDER); lastTime = t - 99999; ivalid.SetEmpty(); NotifyDependents(FOREVER,PART_ALL,REFMSG_CHANGE); return 0; }
void FExtrudeMod::EndEditParams (IObjParam *ip,ULONG flags,Animatable *next) { mp_ip = NULL; TimeValue t = ip->GetTime(); // NOTE: This flag must be cleared before sending the REFMSG_END_EDIT ClearAFlag(A_MOD_BEING_EDITED); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF); ip->DeleteMode(mp_moveMode); if (mp_moveMode) delete mp_moveMode; mp_moveMode = NULL; // For PB2 we ask the ClassDesc2 to take care of the EndEditParams - NH fextrudeDesc.EndEditParams(ip,this,flags,next); }
void RelaxMod::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) { this->ip = ip; editMod = this; TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON); SetAFlag(A_MOD_BEING_EDITED); pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_RELAX), GetString (IDS_PARAMETERS), 0); }
BOOL BaseLimitCtrl::AssignController(Animatable *in_control, int in_subAnim) { if(GetLocked()==false) { if (in_subAnim == BASELIMIT_LIMITEDCTRL_SUBANIM) { Animatable *cont = SubAnim(in_subAnim); if(cont&&GetLockedTrackInterface(cont)&&GetLockedTrackInterface(cont)->GetLocked()==true)//the control is locked, don't assign over it. return FALSE; // Accept and replace the previous limited controller with the new one ReplaceReference(SubNumToRefNum(in_subAnim), (RefTargetHandle)in_control); NotifyDependents(FOREVER, 0, REFMSG_CHANGE); NotifyDependents(FOREVER, 0, REFMSG_SUBANIM_STRUCTURE_CHANGED); return TRUE; } return TRUE; } return FALSE; }
void ApplyVCMod::BeginEditParams(IObjParam *ip, ULONG flags,Animatable *prev) { this->ip = ip; TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON); SetAFlag(A_MOD_BEING_EDITED); hPanel = ip->AddRollupPage( hInstance, MAKEINTRESOURCE(IDD_VCMOD_PANEL), panelDlgProc, GetString(IDS_AVCM_PANELTITLE), 0); iValid.SetEmpty(); }
// This is called as the user ends a strokes when the users has it set to always update BOOL PainterTextureSample::EndStroke() { texHandleValid.Empty(); DiscardTexHandle(); NotifyDependents(FOREVER, PART_TEXMAP, REFMSG_CHANGE); return TRUE; }
void LinkTimeControl::MapKeys(TimeMap *map,DWORD flags) { int n = NumKeys(); BOOL changed = FALSE; if (n) { fOwner->ActivateSort(false); if (flags&TRACK_DOALL) { for (int i = 0; i < n; i++) { ChangeKeyTime( i, map->map( GetKeyTime(i) ) ); changed = TRUE; } } else if (flags&TRACK_DOSEL) { BOOL slide = flags&TRACK_SLIDEUNSEL; TimeValue delta = 0, prev; int start, end, inc; if (flags&TRACK_RIGHTTOLEFT) { start = n-1; end = -1; inc = -1; } else { start = 0; end = n; inc = 1; } for (int i = start; i != end; i += inc) { if ( IsKeySelected(i) ) { prev = GetKeyTime(i); ChangeKeyTime( i, map->map( GetKeyTime(i) ) ); delta = GetKeyTime(i) - prev; changed = TRUE; static int a=2; if (i!=a) { int b =0; b++; } } else if (slide) { ChangeKeyTime( i, GetKeyTime(i) + delta ); changed = TRUE; } } } fOwner->ActivateSort(true); if (changed) { fOwner->LinkTimeChanged(); NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); } } StdControl::MapKeys(map,flags); }
void MorphByBone::fnSetExternalNode(INode *node, const TCHAR *name,INode *exnode) { int whichBone = this->GetBoneIndex(node); int whichMorph = this->GetMorphIndex(node,name); SetNode(exnode,whichBone,whichMorph); NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); GetCOREInterface()->RedrawViews(GetCOREInterface()->GetTime()); UpdateLocalUI(); }
void Jiggle::SetMass(float mass, bool update) { partsys->GetParticle(0)->SetMass(mass); partsys->Invalidate(); if (update) { NotifyDependents(FOREVER, (PartID)PART_ALL, REFMSG_CHANGE); if(ip) ip->RedrawViews(ip->GetTime()); } }
void UnwrapMod::fnShowVertexConnectionList() { if (showVertexClusterList) showVertexClusterList = FALSE; else showVertexClusterList = TRUE; NotifyDependents(FOREVER,PART_SELECT,REFMSG_CHANGE); InvalidateView(); }
void RendSpline::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) { this->ip = ip; ip->EnableShowEndResult(FALSE); TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON); SetAFlag(A_MOD_BEING_EDITED); RendSplineDesc.BeginEditParams(ip, this, flags, prev); // pointcache_param_blk.SetUserDlgProc(new PointCacheParamsMapDlgProc(this)); paramDlgProc = new RendSplineParamsMapDlgProc(this); rendspline_param_blk.SetUserDlgProc(paramDlgProc); }
// This is called as the user ends a strokes when the users has it set to always update BOOL PaintDeformTest::EndStroke() { //accept hold NotifyDependents(FOREVER, PART_GEOM, REFMSG_CHANGE); theHold.Accept(_T(GetString(IDS_PW_PAINT))); //since this changes the mesh we need to update the mesh pPainter->UpdateMeshes(TRUE); return TRUE; }
void ConvertToPoly::BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev) { this->ip = ip; editMod = this; // throw up all the appropriate auto-rollouts convertToPolyDesc.BeginEditParams(ip, this, flags, prev); // Necessary? NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); }
// Neil Hazzard's clever approach to surviving a stack collapse: void FaceDataToColorMod::NotifyPreCollapse(INode *node, IDerivedObject *derObj, int index) { BOOL collapsable; mpParams->GetValue (pb_collapsable, TimeValue(0), collapsable, FOREVER); if (collapsable) return; // Reevaluate with modifier turned off. mDisabled = true; TimeValue t = GetCOREInterface()->GetTime(); NotifyDependents(Interval(t,t),PART_ALL,REFMSG_CHANGE); }
BOOL MorphObject::AssignController(Animatable *control,int subAnim) { if (subAnim==morphCont->NumMorphTargs()) { ReplaceReference(0,(ReferenceTarget*)control); NotifyDependents(FOREVER,0,REFMSG_SUBANIM_STRUCTURE_CHANGED); if (editOb==this) SetupTargetList(); return TRUE; } return FALSE; }
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 XModifier::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next) { // aszabo|feb.05.02 This flag must be cleared before sending the REFMSG_END_EDIT ClearAFlag(A_MOD_BEING_EDITED); TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT); //NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF); XModifierDesc.EndEditParams(ip, this, flags, next); this->ip = NULL; }
void XModifier::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev ) { this->ip = ip; XModifierDesc.BeginEditParams(ip, this, flags, prev); // aszabo|feb.05.02 TimeValue t = ip->GetTime(); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT); //NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON); SetAFlag(A_MOD_BEING_EDITED); }
void AFRMod::EndEditParams( IObjParam *ip,ULONG flags,Animatable *next) { this->ip = NULL; editMod = NULL; TimeValue t = ip->GetTime(); // NOTE: This flag must be cleared before sending the REFMSG_END_EDIT ClearAFlag(A_MOD_BEING_EDITED); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT); NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF); ip->DeleteMode(moveMode); if (moveMode) delete moveMode; moveMode = NULL; DestroyCPParamMap(pmapParam); }
void plComponentBase::DeleteAllTargets() { while (fTargsPB->Count(kTargs) > 0) { INode *node = fTargsPB->GetINode(kTargs); if (node) NotifyDependents(FOREVER, (PartID)node, REFMSG_USER_TARGET_DELETE); fTargsPB->Delete(kTargs, 0, 1); } }
void AlembicVisibilityController::BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev) { this->ip = ip; editMod = this; sAlembicVisibilityControllerClassDesc.BeginEditParams(ip, this, flags, prev); // Necessary? NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); }
// Public access function. void ApplyVCMod::SetMixedColors(ColorTab& colorTab) { ResetColTab(); for (int i=0; i<colorTab.Count(); i++) { Color* col = new Color(*colorTab[i]); mixedVertexColors.Append(1, &col, 25); } NotifyDependents(FOREVER, PART_VERTCOLOR & PART_EXCLUDE_RADIOSITY, REFMSG_CHANGE); }