void TorusObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next ) { SimpleObject::EndEditParams(ip,flags,next); this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { if (pmapCreate) DestroyCPParamMap(pmapCreate); if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn); DestroyCPParamMap(pmapParam); pmapParam = NULL; pmapTypeIn = NULL; pmapCreate = NULL; } else { pmapTypeIn->SetUserDlgProc(nullptr); pmapParam->SetUserDlgProc(nullptr); pmapCreate->SetParamBlock(nullptr); pmapTypeIn->SetParamBlock(nullptr); pmapParam->SetParamBlock(nullptr); } // Save these values in class variables so the next object created will inherit them. pblock->GetValue(PB_SIDES,ip->GetTime(),dlgSides,FOREVER); pblock->GetValue(PB_SEGMENTS,ip->GetTime(),dlgSegments,FOREVER); pblock->GetValue(PB_SMOOTH,ip->GetTime(),dlgSmooth,FOREVER); pblock->GetValue(PB_RADIUS2,ip->GetTime(),dlgRadius2,FOREVER); }
void CExtObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next ) { SimpleObject::EndEditParams(ip,flags,next); this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { if (pmapCreate) DestroyCPParamMap(pmapCreate); if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn); DestroyCPParamMap(pmapParam); pmapParam = NULL; pmapTypeIn = NULL; pmapCreate = NULL; } else { pmapTypeIn->SetUserDlgProc(nullptr); pmapParam->SetUserDlgProc(nullptr); pmapCreate->SetParamBlock(nullptr); pmapTypeIn->SetParamBlock(nullptr); pmapParam->SetParamBlock(nullptr); } // Save these values in class variables so the next object created will inherit them. pblock->GetValue(PB_TSEGS,ip->GetTime(),dlgTSegs,FOREVER); pblock->GetValue(PB_SSEGS,ip->GetTime(),dlgSSegs,FOREVER); pblock->GetValue(PB_BSEGS,ip->GetTime(),dlgBSegs,FOREVER); pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER); pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER); }
void SWrapObject::BeginEditParams( IObjParam *ip,ULONG flags,Animatable *prev) { this->ip = ip; if (flags&BEGIN_EDIT_CREATE) { creating = TRUE; } else { creating = FALSE; } if (pmapParam) { // Left over pmapParam->SetParamBlock(pblock); } else { hSot = ip->AddRollupPage( hInstance, MAKEINTRESOURCE(IDD_SW_DESC), DefaultSOTProc, GetString(IDS_AP_TOP), (LPARAM)ip,APPENDROLL_CLOSED); // Gotta make a new one. pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_AP_SURFWRAP), GetString(IDS_AP_PARAMETERS), 0); } if (pmapParam) pmapParam->SetUserDlgProc(new SWrapObjectDlgProc(this)); }
void PBombObject::BeginEditParams( IObjParam *ip,ULONG flags,Animatable *prev) { SimpleWSMObject::BeginEditParams(ip,flags,prev); this->ip = ip; if (pmapParam) { // Left over pmapParam->SetParamBlock(pblock); } else { hSot = ip->AddRollupPage( hInstance, MAKEINTRESOURCE(IDD_SW_DESC_BOTH), DefaultSOTProc, GetString(IDS_RB_TOP), (LPARAM)ip,APPENDROLL_CLOSED); // Gotta make a new one. pmapParam = CreateCPParamMap( descParamBomb,BOMBPARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_SW_PARTICLEBOMB), GetString(IDS_RB_PARAMETERS), 0); } if (pmapParam) pmapParam->SetUserDlgProc(new PBombDlgProc(this)); }
RefResult MatMod::NotifyRefChanged( const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { switch (message) { case REFMSG_CHANGE: if (pmapParam && pmapParam->GetParamBlock()==pblock) { pmapParam->Invalidate(); } break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case 0: default: gpd->dim = defaultDim; break; } return REF_HALT; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; switch (gpn->index) { case PB_MATID: gpn->name = GetString(IDS_RB_MATERIALID); break; default: gpn->name = TSTR(_T("")); break; } return REF_HALT; } } return REF_SUCCEED; }
// This is called by the system to terminate the editing of the // parameters in the command panel. void ChBoxObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next ) { SimpleObject::EndEditParams(ip,flags,next); this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { // Remove the rollup pages from the command panel. if (pmapCreate) DestroyCPParamMap(pmapCreate); if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn); DestroyCPParamMap(pmapParam); pmapParam = NULL; pmapTypeIn = NULL; pmapCreate = NULL; } else { pmapTypeIn->SetUserDlgProc(nullptr); pmapParam->SetUserDlgProc(nullptr); pmapCreate->SetParamBlock(nullptr); pmapTypeIn->SetParamBlock(nullptr); pmapParam->SetParamBlock(nullptr); } // Save these values in class variables so the next object // created will inherit them. pblock->GetValue(PB_LSEGS,ip->GetTime(),dlgLSegs,FOREVER); pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER); pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER); pblock->GetValue(PB_CSEGS,ip->GetTime(),dlgCSegs,FOREVER); }
RefResult SpherifyMod::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: if (pmap && pmap->GetParamBlock()==pblock) { pmap->Invalidate(); } break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case PB_PERCENT: gpd->dim = defaultDim; break; }; return REF_STOP; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; switch (gpn->index) { case PB_PERCENT: gpn->name = PERCENT_PARAM_NAME; break; }; return REF_STOP; } } return REF_SUCCEED; }
void PrismObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev) { SimpleObject::BeginEditParams(ip,flags,prev); this->ip = ip; if (pmapCreate && pmapParam) { // Left over from last Prism ceated pmapCreate->SetParamBlock(this); pmapTypeIn->SetParamBlock(this); pmapParam->SetParamBlock(pblock); } else { // Gotta make a new one. if (flags&BEGIN_EDIT_CREATE) { pmapCreate = CreateCPParamMap( descCreate,CREATEDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_PRISM1), GetString(IDS_RB_CREATE_DIALOG), 0); pmapTypeIn = CreateCPParamMap( descTypeIn,TYPEINDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_PRISM2), GetString(IDS_RB_KEYBOARDENTRY), APPENDROLL_CLOSED); } pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_PRISM3), GetString(IDS_AP_PARAMETERS), 0); } if(pmapTypeIn) { // A callback for the type in. pmapTypeIn->SetUserDlgProc(new PrismTypeInDlgProc(this)); } if(pmapParam) { pmapParam->SetUserDlgProc(new PrismSideDlgProc(this)); } }
RefResult OptMod::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: { if (pmapParam && pmapParam->GetParamBlock()==pblock) { pmapParam->Invalidate(); } int man = FALSE; if (pblock) pblock->GetValue(PB_MANUPDATE,0,man,FOREVER); if (man) return REF_STOP; break; } case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case PB_FACETHRESH1: case PB_FACETHRESH2: case PB_EDGETHRESH1: case PB_EDGETHRESH2: gpd->dim = stdAngleDim; break; case PB_MAXEDGE1: case PB_MAXEDGE2: 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_FACETHRESH1: gpn->name = GetString(IDS_RB_FACETHRESHL1); break; case PB_FACETHRESH2: gpn->name = GetString(IDS_RB_FACETHRESHL2); break; case PB_EDGETHRESH1: gpn->name = GetString(IDS_RB_EDGETHRESHL1); break; case PB_EDGETHRESH2: gpn->name = GetString(IDS_RB_EDGETHRESHL2); break; case PB_BIAS1: gpn->name = GetString(IDS_RB_BIASL1); break; case PB_BIAS2: gpn->name = GetString(IDS_RB_BIASL2); break; case PB_MAXEDGE1: gpn->name = GetString(IDS_RB_MAXEDGE1); break; case PB_MAXEDGE2: gpn->name = GetString(IDS_RB_MAXEDGE2); break; default: gpn->name = TSTR(_T("")); break; } return REF_STOP; } } return REF_SUCCEED; }
void RectangleObject::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev) { SimpleSpline::BeginEditParams(ip,flags,prev); this->ip = ip; if (pmapCreate && pmapParam) { // Left over from last shape ceated pmapCreate->SetParamBlock(this); pmapTypeIn->SetParamBlock(this); pmapParam->SetParamBlock(pblock); } else { // Gotta make a new one. if (flags&BEGIN_EDIT_CREATE) { pmapCreate = CreateCPParamMap( descCreate,CREATEDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_RECTANGLEPARAM1), GetString(IDS_TH_CREATION_METHOD), 0); pmapTypeIn = CreateCPParamMap( descTypeIn,TYPEINDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_RECTANGLEPARAM3), GetString(IDS_TH_KEYBOARD_ENTRY), APPENDROLL_CLOSED); } pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_RECTANGLEPARAM2), GetString(IDS_TH_PARAMETERS), 0); } if(pmapTypeIn) { // A callback for the type in. pmapTypeIn->SetUserDlgProc(new RectangleTypeInDlgProc(this)); } }
void WaveObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev) { SimpleWSMObject::BeginEditParams(ip,flags,prev); this->ip = ip; if (pmapParam) { // Left over from last SinWave ceated pmapParam->SetParamBlock(pblock); } else { hSot = ip->AddRollupPage( hInstance, MAKEINTRESOURCE(IDD_SINWAVE_SOT), DefaultSOTProc, GetString(IDS_RB_SOT), (LPARAM)ip,APPENDROLL_CLOSED); // Gotta make a new one. pmapParam = CreateCPParamMap( descParamObj,OBJPARAMDESC_LENGH, pblock, ip, hInstance, MAKEINTRESOURCE(DialogID()), GetString(IDS_RB_PARAMETERS), 0); } }
void ForceObject::EndEditParams(IObjParam *ip,ULONG flags,Animatable *next) { SimpleWSMObject::EndEditParams(ip,flags,next); this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { DestroyCPParamMap(pmapParam); ip->DeleteRollupPage(hSot); pmapParam = NULL; } else { pmapParam->SetUserDlgProc(nullptr); pmapParam->SetParamBlock(nullptr); } }
void ChBoxObject::UpdateUI() { if (ip == NULL) return; ChBoxParamDlgProc* dlg = static_cast<ChBoxParamDlgProc*>(pmapParam->GetUserDlgProc()); dlg->Update(); }
RefResult AFRMod::NotifyRefChanged( Interval changeInt,RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: if (editMod==this && pmapParam) pmapParam->Invalidate(); break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case PB_FALLOFF: gpd->dim = stdWorldDim; break; case PB_PINCH: case PB_BUBBLE: gpd->dim = stdNormalizedDim; break; } return REF_STOP; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; switch (gpn->index) { case PB_FALLOFF: gpn->name = GetString(IDS_AFR_FALLOFF); break; case PB_PINCH: gpn->name = GetString(IDS_AFR_PINCH); break; case PB_BUBBLE: gpn->name = GetString(IDS_AFR_BUBBLE); break; } return REF_STOP; } } return REF_SUCCEED; }
void ChCylinderObject::BuildMesh(TimeValue t) { int segs, smooth, hsegs, capsegs,fsegs; float radius,height,pie1, pie2,fillet; int doPie, genUVs; FixFillet(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate); // Start the validity interval at forever and widdle it down. ivalid = FOREVER; pblock->GetValue(PB_FSEGS,t,fsegs,ivalid); pblock->GetValue(PB_SIDES,t,segs,ivalid); pblock->GetValue(PB_HSEGS,t,hsegs,ivalid); pblock->GetValue(PB_CSEGS,t,capsegs,ivalid); pblock->GetValue(PB_RADIUS,t,radius,ivalid); pblock->GetValue(PB_HEIGHT,t,height,ivalid); pblock->GetValue(PB_FILLET,t,fillet,ivalid); pblock->GetValue(PB_SMOOTHON,t,smooth,ivalid); pblock->GetValue(PB_SLICEFROM,t,pie1,ivalid); pblock->GetValue(PB_SLICETO,t,pie2,ivalid); pblock->GetValue(PB_SLICEON,t,doPie,ivalid); pblock->GetValue(PB_GENUVS,t,genUVs,ivalid); LimitValue(radius, MIN_RADIUS, MAX_RADIUS); LimitValue(height, MIN_HEIGHT, MAX_HEIGHT); LimitValue(fsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(hsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(capsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(segs, MIN_SIDES, MAX_SIDES); LimitValue(smooth, 0, 1); BuildChCylinderMesh(mesh, segs, smooth, hsegs, capsegs, fsegs,doPie, radius, fillet, height, pie1, pie2, genUVs); }
void ScubaObject::BuildMesh(TimeValue t) { int segs, smooth, hsegs; float radius,height,pie1, pie2,r2; int doPie, genUVs,con; // Start the validity interval at forever and widdle it down. FixHeight(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate); ivalid = FOREVER; pblock->GetValue(PB_RADIUS,t,radius,ivalid); pblock->GetValue(PB_CENTERS,t,con,ivalid); pblock->GetValue(PB_HEIGHT,t,height,ivalid); r2=2.0f*radius; if (con) height+=(height<0.0f?-r2:r2); pblock->GetValue(PB_SIDES,t,segs,ivalid); pblock->GetValue(PB_HSEGS,t,hsegs,ivalid); pblock->GetValue(PB_SMOOTHON,t,smooth,ivalid); pblock->GetValue(PB_SLICEFROM,t,pie1,ivalid); pblock->GetValue(PB_SLICETO,t,pie2,ivalid); pblock->GetValue(PB_SLICEON,t,doPie,ivalid); pblock->GetValue(PB_GENUVS,t,genUVs,ivalid); LimitValue(radius, MIN_RADIUS, MAX_RADIUS); LimitValue(height, MIN_HEIGHT, MAX_HEIGHT); LimitValue(hsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(segs, MIN_SIDES, MAX_SIDES); LimitValue(smooth, 0, 1); // sides, smooth, cylrad BuildScubaMesh(mesh, segs, smooth, hsegs, doPie,radius, height, pie1, pie2, genUVs, GetUsePhysicalScaleUVs()); }
void TorusObject::UpdateUI() { if (ip == NULL) return; TorusParamDlgProc* dlg = static_cast<TorusParamDlgProc*>(pmapParam->GetUserDlgProc()); dlg->Update(ip->GetTime()); }
void CExtObject::UpdateUI() { if (ip == NULL) return; CExtWidthDlgProc* dlg = static_cast<CExtWidthDlgProc*>(pmapParam->GetUserDlgProc()); dlg->Update(); }
RefResult ExtrudeMod::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: if ((editMod==this) && pmapParam) pmapParam->Invalidate(); break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; gpd->dim = GetParameterDim(gpd->index); return REF_HALT; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; gpn->name = GetParameterName(gpn->index); return REF_HALT; } } return(REF_SUCCEED); }
void PyramidObject::UpdateUI() { if (ip == NULL) return; PyramidParamDlgProc* dlg = static_cast<PyramidParamDlgProc*>(pmapParam->GetUserDlgProc()); dlg->Update(); }
RefResult FExtrudeMod::NotifyRefChanged( Interval changeInt,RefTargetHandle hTarget, PartID& partID, RefMessage message) { switch (message) { case REFMSG_CHANGE: if (editMod==this && pmapParam) pmapParam->Invalidate(); break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; switch (gpd->index) { case PB_AMOUNT: gpd->dim = stdWorldDim; break; case PB_SCALE: gpd->dim = defaultDim; break; } return REF_HALT; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; switch (gpn->index) { case PB_AMOUNT: gpn->name = GetString(IDS_EXT_AMOUNT); break; case PB_SCALE: gpn->name = GetString(IDS_EXT_SCALE); break; } return REF_HALT; } } return REF_SUCCEED; }
RefResult NormalMod::NotifyRefChanged( const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate) { switch (message) { case REFMSG_CHANGE: if (pmapParam && pmapParam->GetParamBlock()==pblock) { pmapParam->Invalidate(); } break; } return REF_SUCCEED; }
void ScubaObject::UpdateUI() { if (ip == NULL) return; ScubaHeightDlgProc* dlg = static_cast<ScubaHeightDlgProc*>(pmapParam->GetUserDlgProc()); dlg->Update(); }
void ExtrudeMod::UpdateUI() { if (ip == NULL) return; ExtrudeDlgProc* dlg = static_cast<ExtrudeDlgProc*>(pmapParam->GetUserDlgProc()); dlg->UpdateRWS(); }
void CExtObject::BuildMesh(TimeValue t) { int hsegs,tsegs,ssegs,bsegs,wsegs; float height,toplen,sidelen,botlen,topwidth,sidewidth,botwidth; int genUVs; // Start the validity interval at forever and widdle it down. FixTopWidth(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate); FixBotWidth(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate); FixSideWidth(pblock,t,(pmapParam?pmapParam->GetHWnd():NULL),increate); ivalid = FOREVER; pblock->GetValue(PB_HSEGS,t,hsegs,ivalid); pblock->GetValue(PB_TSEGS,t,tsegs,ivalid); pblock->GetValue(PB_SSEGS,t,ssegs,ivalid); pblock->GetValue(PB_BSEGS,t,bsegs,ivalid); pblock->GetValue(PB_WSEGS,t,wsegs,ivalid); pblock->GetValue(PB_TOPLENGTH,t,toplen,ivalid); pblock->GetValue(PB_SIDELENGTH,t,sidelen,ivalid); pblock->GetValue(PB_BOTLENGTH,t,botlen,ivalid); pblock->GetValue(PB_TOPWIDTH,t,topwidth,ivalid); pblock->GetValue(PB_SIDEWIDTH,t,sidewidth,ivalid); pblock->GetValue(PB_BOTWIDTH,t,botwidth,ivalid); pblock->GetValue(PB_HEIGHT,t,height,ivalid); pblock->GetValue(PB_GENUVS,t,genUVs,ivalid); LimitValue(height, MIN_HEIGHT, BMAX_HEIGHT); LimitValue(toplen, MIN_HEIGHT, BMAX_LENGTH); LimitValue(sidelen, MIN_HEIGHT,BMAX_WIDTH); LimitValue(botlen, MIN_HEIGHT, BMAX_HEIGHT); LimitValue(topwidth, BMIN_LENGTH,BMAX_LENGTH); LimitValue(sidewidth, BMIN_WIDTH,BMAX_WIDTH); LimitValue(botwidth, BMIN_HEIGHT,BMAX_HEIGHT); LimitValue(hsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(tsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(ssegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(bsegs, MIN_SEGMENTS, MAX_SEGMENTS); LimitValue(wsegs, MIN_SEGMENTS, MAX_SEGMENTS); BuildCExtMesh(mesh,hsegs,tsegs,ssegs,bsegs,wsegs,height, toplen,sidelen,botlen,topwidth,sidewidth,botwidth, genUVs,createmeth,GetUsePhysicalScaleUVs()); }
void TriPatchObject::EndEditParams( IObjParam *ip, ULONG flags, Animatable *next ) { editOb = NULL; this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn); DestroyCPParamMap(pmapParam); pmapParam = NULL; pmapTypeIn = NULL; } else { pmapTypeIn->SetUserDlgProc(nullptr); pmapTypeIn->SetParamBlock(nullptr); pmapParam->SetParamBlock(nullptr); } // Save these values in class variables so the next object created will inherit them. pblock->GetValue(PB_TEXTURE,ip->GetTime(),dlgTexture,FOREVER); }
void TriPatchObject::BeginEditParams( IObjParam *ip, ULONG flags, Animatable *prev ) { editOb = this; this->ip = ip; if (pmapTypeIn && pmapParam) { // Left over from last shape ceated pmapTypeIn->SetParamBlock(this); pmapParam->SetParamBlock(pblock); } else { // Gotta make a new one. if (flags&BEGIN_EDIT_CREATE) { pmapTypeIn = CreateCPParamMap( descTypeIn,TYPEINDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_TRIPATCHPARAM2), GetString(IDS_TH_KEYBOARD_ENTRY), APPENDROLL_CLOSED); } pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_TRIPATCHPARAM), GetString(IDS_TH_PARAMETERS), 0); } if(pmapTypeIn) { // A callback for the type in. pmapTypeIn->SetUserDlgProc(new TriPatchTypeInDlgProc(this)); } }
void CExtObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev) { SimpleObject::BeginEditParams(ip,flags,prev); if (pmapCreate && pmapParam) { // Left over from last CExt ceated pmapCreate->SetParamBlock(this); pmapTypeIn->SetParamBlock(this); pmapParam->SetParamBlock(pblock); CExtWidthDlgProc* dlg = static_cast<CExtWidthDlgProc*>(pmapParam->GetUserDlgProc()); if (dlg != NULL) { BOOL rws = dlg->GetRWSState(); SetUsePhysicalScaleUVs(rws); } } else { // Gotta make a new one. if (flags&BEGIN_EDIT_CREATE) { pmapCreate = CreateCPParamMap( descCreate,CREATEDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_UEXTRUSIONS1), GetString(IDS_RB_CREATE_DIALOG), 0); pmapTypeIn = CreateCPParamMap( descTypeIn,TYPEINDESC_LENGTH, this, ip, hInstance, MAKEINTRESOURCE(IDD_C_EXTRUSION2), GetString(IDS_RB_KEYBOARDENTRY), APPENDROLL_CLOSED); } pmapParam = CreateCPParamMap( descParam,PARAMDESC_LENGTH, pblock, ip, hInstance, MAKEINTRESOURCE(IDD_C_EXTRUSION3), GetString(IDS_AP_PARAMETERS), 0); } this->ip = ip; if(pmapTypeIn) { // A callback for the type in. pmapTypeIn->SetUserDlgProc(new CExtTypeInDlgProc(this)); } if(pmapParam) { // A callback for the type in. pmapParam->SetUserDlgProc(new CExtWidthDlgProc(this)); } }
void DonutObject::EndEditParams( IObjParam *ip,ULONG flags,Animatable *next ) { SimpleSpline::EndEditParams(ip,flags,next); this->ip = NULL; if (flags & END_EDIT_REMOVEUI ) { if (pmapCreate) DestroyCPParamMap(pmapCreate); if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn); DestroyCPParamMap(pmapParam); pmapParam = NULL; pmapTypeIn = NULL; pmapCreate = NULL; } else { pmapTypeIn->SetUserDlgProc(nullptr); pmapCreate->SetParamBlock(nullptr); pmapTypeIn->SetParamBlock(nullptr); pmapParam->SetParamBlock(nullptr); } // Save these values in class variables so the next object created will inherit them. }
void PinObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev) { SimpleWSMObject::BeginEditParams(ip,flags,prev); this->ip = ip; if (pmapParam) { // Left over pmapParam->SetParamBlock(pblock); } else { hSot = ip->AddRollupPage(hInstance,MAKEINTRESOURCE(IDD_SW_DESC_DYNONLY),DefaultSOTProc,GetString(IDS_AP_TOP),(LPARAM)ip,APPENDROLL_CLOSED); // Gotta make a new one. pmapParam = CreateCPParamMap(descParamPin,PINPARAMDESC_LENGTH,pblock,ip,hInstance,MAKEINTRESOURCE(IDD_SW_DYNPIN),GetString(IDS_AP_PARAMETERS),0); } }