RefResult Composite::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: if (paramDlg) paramDlg->Invalidate(); if (pblock->LastNotifyParamID() == comptex_tex && pblock->Count(comptex_tex) != subTex.Count()) SetNumMaps(pblock->Count(comptex_tex)); else if (pblock->LastNotifyParamID() == comptex_ons && pblock->Count(comptex_ons) != subTex.Count()) SetNumMaps(pblock->Count(comptex_ons)); DiscardTexHandles(); // DS 5/4/00 ivalid.SetEmpty(); if (paramDlg&&Active()) paramDlg->ip->MtlChanged(); break; case REFMSG_GET_PARAM_DIM: return REF_STOP; case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; gpn->name= GetSubTexmapSlotName(gpn->index); return REF_STOP; } } return(REF_SUCCEED); }
RefResult plParticleMtl::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: fIValid.SetEmpty(); // see if this message came from a changing parameter in the pblock, // if so, limit rollout update to the changing item if (hTarget == fBasicPB) { IParamBlock2 *pb = (IParamBlock2*)hTarget; ParamID changingParam = pb->LastNotifyParamID(); pb->GetDesc()->InvalidateUI(changingParam); // And let the SceneWatcher know that the material on some of it's // referenced objects changed. NotifyDependents(FOREVER, PART_ALL, REFMSG_USER_MAT); } break; } return REF_SUCCEED; }
RefResult Noise::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: ivalid.SetEmpty(); cacheValid.SetEmpty(); if (hTarget == pblock) { // see if this message came from a changing parameter in the pblock, // if so, limit rollout update to the changing item and update any active viewport texture ParamID changing_param = pblock->LastNotifyParamID(); // if (hTarget != xyzGen && hTarget != texout ) noise_param_blk.InvalidateUI(changing_param); // notify our dependents that we've changed // NotifyChanged(); //DS this is redundant #ifdef SHOW_3DMAPS_WITH_2D if (changing_param != -1) DiscardTexHandle(); #endif } #ifdef SHOW_3DMAPS_WITH_2D else if (hTarget == xyzGen) { DiscardTexHandle(); } #endif break; } return(REF_SUCCEED); }
// This method is responsible for responding to the change notification // messages sent by the texmap dependants. RefResult Water::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: texValidity.SetEmpty(); if (hTarget == pblock) { ParamID changing_param = pblock->LastNotifyParamID(); water_param_blk.InvalidateUI(changing_param); #ifdef SHOW_3DMAPS_WITH_2D if (changing_param != -1) DiscardTexHandle(); #endif } #ifdef SHOW_3DMAPS_WITH_2D else if (hTarget == xyzGen) { DiscardTexHandle(); } #endif // One of the texmap dependants have changed. We set our // validity interval to empty and invalidate the dialog // so it gets redrawn. // texValidity.SetEmpty(); // if (hTarget != xyzGen) { // if (paramDlg) // paramDlg->pmap->Invalidate(); // } break; /* case REFMSG_GET_PARAM_DIM: { // This returns the 'dimension' of the parameter. This is // the type and order of magnitude of the parameter. GetParamDim *gpd = (GetParamDim *)partID; switch (gpd->index) { case PB_LEN_MIN: case PB_LEN_MAX: case PB_SIZE: gpd->dim = stdWorldDim; break; case PB_AMP: case PB_NUM: case PB_PHASE: gpd->dim = defaultDim; break; case PB_COL1: case PB_COL2: gpd->dim = stdColor255Dim; break; } return REF_STOP; } case REFMSG_GET_PARAM_NAME: { // This returns the name that will appear in track view // of the parameter. GetParamName *gpn = (GetParamName *)partID; gpn->name = GetString(nameIDs[gpn->index]); return REF_STOP; } */ } return(REF_SUCCEED); }
RefResult SymmetryMod::NotifyRefChanged( const Interval& changeInt,RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { ParamID pid; int weld; IParamMap2 *pPMap; HWND hDialog, hThreshLabel; switch (message) { case REFMSG_CHANGE: if (hTarget != mp_pblock) break; pid = mp_pblock->LastNotifyParamID (); if (pid != kSymWeld) break; pPMap = mp_pblock->GetMap(kSymmetryParams); if (!pPMap) break; hDialog = pPMap->GetHWnd(); if (!hDialog) break; mp_pblock->GetValue (kSymWeld, TimeValue(0), weld, FOREVER); hThreshLabel = GetDlgItem (hDialog, IDC_SYM_THRESH_LABEL); if (hThreshLabel) EnableWindow (hThreshLabel, weld); break; } return REF_SUCCEED; }
RefResult Gradient::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: { ivalid.SetEmpty(); if (hTarget == pblock) { // see if this message came from a changing parameter in the pblock, // if so, limit rollout update to the changing item and update any active viewport texture ParamID changing_param = pblock->LastNotifyParamID(); if (hTarget != uvGen && hTarget != texout) grad_param_blk.InvalidateUI(changing_param); if (changing_param != -1) DiscardTexHandle(); } // notify our dependents that we've changed // NotifyChanged(); //DS this is redundant break; } case REFMSG_UV_SYM_CHANGE: DiscardTexHandle(); break; } return(REF_SUCCEED); }
//From ReferenceMaker RefResult RendSpline::NotifyRefChanged( const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { if(hTarget == pblock && message == REFMSG_CHANGE) { ParamID changing_param = pblock->LastNotifyParamID(); IParamMap2 *map = pblock->GetMap(); if(!map) return REF_SUCCEED; switch(changing_param) { case rnd_v2_width: OnSetWidthLength(map->GetHWnd(), rnd_v2_length, rnd_v2_width, GetCOREInterface()->GetTime(), TRUE); break; case rnd_v2_vpt_width: OnSetWidthLength(map->GetHWnd(), rnd_v2_vpt_length, rnd_v2_vpt_width, GetCOREInterface()->GetTime(), TRUE); break; case rnd_v2_length: OnSetWidthLength(map->GetHWnd(), rnd_v2_length, rnd_v2_width, GetCOREInterface()->GetTime(), FALSE); break; case rnd_v2_vpt_length: OnSetWidthLength(map->GetHWnd(), rnd_v2_vpt_length, rnd_v2_vpt_width, GetCOREInterface()->GetTime(), FALSE); break; } } return REF_SUCCEED; }
RefResult SmoothMod::NotifyRefChanged (const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { switch (message) { case REFMSG_CHANGE: if (hTarget == pblock) { ParamID idToUpdate = pblock->LastNotifyParamID(); smooth_param_desc.InvalidateUI (idToUpdate); switch (idToUpdate) { case -1: case sm_smoothbits: case sm_autosmooth: if (smoothDesc.NumParamMaps() > 0) { IParamMap2 *pmap = smoothDesc.GetParamMap(0); if (pmap) { HWND hWnd = pmap->GetHWnd(); if (hWnd) theSmoothDlgProc.Invalidate (hWnd); } } break; } } break; } return REF_SUCCEED; }
RefResult Matte::NotifyRefChanged( const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { switch (message) { case REFMSG_CHANGE: if (hTarget == pblock) { ivalid.SetEmpty(); // see if this message came from a changing parameter in the pblock, // if so, limit rollout update to the changing item and update any active viewport texture ParamID changing_param = pblock->LastNotifyParamID(); matte_param_blk.InvalidateUI(changing_param); if( (changing_param == matte_receive_shadows) ||(changing_param == matte_shadow_brightness) ||(changing_param == matte_color) ||(changing_param == matte_reflection_amount) ||(changing_param == matte_use_reflection_map)) { mReshadeRQ = RR_NeedReshade; } else if (changing_param == -1) mReshadeRQ = RR_NeedPreshade; else mReshadeRQ = RR_None; } if (hTarget != NULL) { switch (hTarget->SuperClassID()) { case TEXMAP_CLASS_ID: { mReshadeRQ = RR_NeedPreshade; } break; // default: // mReshadeRQ =RR_NeedReshade; // break; } } break; case REFMSG_SUBANIM_STRUCTURE_CHANGED: // if (partID == 0) // mReshadeRQ = RR_None; // else { // mReshadeRQ = RR_NeedPreshade; // NotifyChanged(); // } break; } return REF_SUCCEED; }
RefResult bhkRigidBodyModifier::NotifyRefChanged(const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) #endif { switch (message) { case REFMSG_CHANGE: ParamID changing_param = pblock->LastNotifyParamID(); havok_param_blk.InvalidateUI(changing_param); break; } return REF_SUCCEED; }
RefResult ConvertToPoly::NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: if (editMod!=this) break; // if this was caused by a NotifyDependents from pblock, LastNotifyParamID() // will contain ID to update, else it will be -1 => inval whole rollout if (pblock->LastNotifyParamID() == turn_sel_level) { // Notify stack that subobject info has changed: NotifyDependents(changeInt, partID, message); NotifyDependents(FOREVER, 0, REFMSG_NUM_SUBOBJECTTYPES_CHANGED); return REF_STOP; } turn_param_desc.InvalidateUI(pblock->LastNotifyParamID()); break; } return REF_SUCCEED; }
RefResult SampleEffect::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: // JBW: ask the block to update its UI if ( pblock ) // > 11/12/02 - 3:38pm --MQM-- #417502, need "if (pblock)" sampleEff_pbDesc.InvalidateUI( pblock->LastNotifyParamID() ); // NotifyChanged(); break; } return REF_SUCCEED; }
RefResult CompositeMat::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: if (hTarget == pblock2) { ivalid.SetEmpty(); // compmat_param_blk.InvalidateUI(); ParamID changing_param = pblock2->LastNotifyParamID(); compmat_param_blk.InvalidateUI(changing_param); if( (changing_param == compmat_amount ) ||(changing_param == compmat_map_on ) ||(changing_param == compmat_type )) { mReshadeRQ = RR_NeedReshade; } else if( changing_param == compmat_mtls ) { mReshadeRQ = RR_NeedPreshade; // really want to get from mtl, but dont have it // NotifyChanged(); } } else { ivalid.SetEmpty(); NotifyChanged(); } if (hTarget != NULL) { switch (hTarget->SuperClassID()) { case MATERIAL_CLASS_ID: { // never hit for this mtl ???? IReshading* r = static_cast<IReshading*>(hTarget->GetInterface(IID_IReshading)); mReshadeRQ = r == NULL ? RR_None : r->GetReshadeRequirements(); } break; } } break; case REFMSG_SUBANIM_STRUCTURE_CHANGED: if ((hTarget!=this)) return REF_SUCCEED; mReshadeRQ = RR_NeedPreshade; NotifyChanged(); break; } return REF_SUCCEED; }
RefResult OrenNayarBlinnShader::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: ivalid.SetEmpty(); if (hTarget == pblock){ // update UI if paramblock changed, possibly from scripter ParamID changingParam = pblock->LastNotifyParamID(); // reload the dialog if present if (paramDlg){ paramDlg->UpdateDialog( changingParam ); } } break; } return(REF_SUCCEED); }
RefResult Mask::NotifyRefChanged(const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate ) { switch (message) { case REFMSG_CHANGE: ivalid.SetEmpty(); mapValid.SetEmpty(); if (hTarget == pblock) { //if (paramDlg&&!paramDlg->isActive) ParamID changing_param = pblock->LastNotifyParamID(); mask_param_blk.InvalidateUI(changing_param); } // if (paramDlg) // paramDlg->Invalidate(); break; } return(REF_SUCCEED); }
//From ReferenceMaker RefResult SolidifyPW::NotifyRefChanged( const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { //TODO: Add code to handle the various reference changed messages if (message == REFMSG_CHANGE) { if (hTarget == pblock) { ParamID changing_param = pblock->LastNotifyParamID(); if (changing_param == pb_bevelshape) { if ((partID & (PART_TOPO | PART_GEOM)) || (partID == PART_ALL)) return REF_SUCCEED; else return REF_STOP; } } } return REF_SUCCEED; }
RefResult UVtex::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: ivalid.SetEmpty(); if (hTarget == pblock) { // see if this message came from a changing parameter in the pblock, // if so, limit rollout update to the changing item and update any active viewport texture ParamID changing_param = pblock->LastNotifyParamID(); uvtexpb.InvalidateUI();//changing_param DiscardTexHandle(); // notify our dependents that we've changed // NotifyChanged(); //DS this is redundant } break; } return REF_SUCCEED; }
RefResult OrientConstRotation::NotifyRefChanged ( const Interval& iv, RefTargetHandle hTarg, PartID& partID, RefMessage msg, BOOL propagate) { // INode* orient_targ; switch (msg) { case REFMSG_CHANGE: { if (hTarg == pblock){ ParamID changing_param = pblock->LastNotifyParamID(); switch (changing_param) { // CAL-09/10/02: need to redraw the list box specifically. // TODO: Most of the other calls to RedrawListbox() should be removed with this addition. case orientation_target_weight: RedrawListbox(GetCOREInterface()->GetTime()); break; default: orient_const_paramblk.InvalidateUI(changing_param); break; } ivalid.SetEmpty(); } } break; case REFMSG_OBJECT_CACHE_DUMPED: return REF_STOP; break; } return REF_SUCCEED; }
void VRayCamera::InvalidateUI(void) { camera_param_blk.InvalidateUI(pblock->LastNotifyParamID()); }
void PointHelpObject::InvalidateUI() { pointobj_param_blk.InvalidateUI(pblock2->LastNotifyParamID()); }
RefResult CellTex::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: ivalid.SetEmpty(); if (hTarget == pblock) { ParamID changing_param = pblock->LastNotifyParamID(); cellular_param_blk.InvalidateUI(changing_param); #ifdef SHOW_3DMAPS_WITH_2D if (changing_param != -1) DiscardTexHandle(); #endif } #ifdef SHOW_3DMAPS_WITH_2D else if (hTarget == xyzGen) { DiscardTexHandle(); } #endif break; /* case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case PB_CELLCOL: case PB_DIVCOL1: case PB_DIVCOL2: gpd->dim = stdColor255Dim; break; case PB_SIZE: gpd->dim = stdWorldDim; break; default: gpd->dim = defaultDim; break; } return REF_STOP; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; switch (gpn->index) { case PB_CELLCOL: gpn->name = GetString(IDS_RB_CELLCOLOR); break; case PB_DIVCOL1: gpn->name = GetString(IDS_RB_DIVCOLOR1); break; case PB_DIVCOL2: gpn->name = GetString(IDS_RB_DIVCOLOR2); break; case PB_VAR: gpn->name = GetString(IDS_RB_VARIATION); break; case PB_SIZE: gpn->name = GetString(IDS_RB_SIZE); break; case PB_SPREAD: gpn->name = GetString(IDS_RB_SPREAD); break; case PB_LOW: gpn->name = GetString(IDS_RB_LOW); break; case PB_MID: gpn->name = GetString(IDS_RB_MID); break; case PB_HIGH: gpn->name = GetString(IDS_RB_HIGH); break; case PB_TYPE: gpn->name = GetString(IDS_RB_TYPE); break; case PB_FRACT: gpn->name = GetString(IDS_RB_FRACTAL); break; case PB_ITER: gpn->name = GetString(IDS_RB_ITERATIONS); break; case PB_ROUGH: gpn->name = GetString(IDS_RB_ROUGHNESS); break; case PB_SMOOTH: gpn->name = GetString(IDS_RB_BUMPSMOOTHING); break; default: gpn->name = GetString(IDS_RB_PARAMETER); break; } return REF_STOP; } */ } return REF_SUCCEED; }
// This method is responsible for responding to the change notification // messages sent by the texmap dependants. RefResult Planet::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: texValidity.SetEmpty(); if (hTarget == pblock) { ParamID changing_param = pblock->LastNotifyParamID(); // MM: 2/99, If the seed changed update the noise table if (changing_param == planet_seed) { pblock->GetValue(planet_seed, 0, seed, texValidity); init_noise(seed); } planet_param_blk.InvalidateUI(changing_param); #ifdef SHOW_3DMAPS_WITH_2D if (changing_param != -1) DiscardTexHandle(); #endif } #ifdef SHOW_3DMAPS_WITH_2D else if (hTarget == xyzGen) { DiscardTexHandle(); } #endif // One of the texmap dependants have changed. We set our // validity interval to empty and invalidate the dialog // so it gets redrawn. // texValidity.SetEmpty(); // if (hTarget == pblock) { // if (paramDlg) // paramDlg->pmap->Invalidate(); // } break; /* case REFMSG_GET_PARAM_DIM: { // This returns the 'dimension' of the parameter. This is // the type and order of magnitude of the parameter. GetParamDim *gpd = (GetParamDim *)partID; switch (gpd->index) { case PB_PERCENT: gpd->dim = stdPercentDim; break; case PB_SIZE: gpd->dim = stdWorldDim; break; case PB_ISLAND: case PB_SEED: gpd->dim = defaultDim; break; case PB_COL1: case PB_COL2: case PB_COL3: case PB_COL4: case PB_COL5: case PB_COL6: case PB_COL7: case PB_COL8: gpd->dim = stdColor255Dim; break; } return REF_STOP; } case REFMSG_GET_PARAM_NAME: { // This returns the name that will appear in track view // of the parameter. GetParamName *gpn = (GetParamName *)partID; gpn->name = GetString(nameIDs[gpn->index]); return REF_STOP; } */ } return(REF_SUCCEED); }