本文整理汇总了C++中IParamBlock2::GetMap方法的典型用法代码示例。如果您正苦于以下问题:C++ IParamBlock2::GetMap方法的具体用法?C++ IParamBlock2::GetMap怎么用?C++ IParamBlock2::GetMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IParamBlock2
的用法示例。
在下文中一共展示了IParamBlock2::GetMap方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckAspectLock
void RendSpline::CheckAspectLock(TimeValue t)
{
ParamID lengthID;
ParamID widthID;
ParamID aspectlockID;
float length, width, aspect = 1.0f;
BOOL aspectlocked = FALSE;
if(UseViewOrRenderParams(t) == rbViewport)
{
widthID = rnd_v2_vpt_width;
lengthID = rnd_v2_vpt_length;
aspectlockID = rnd_v2_vpt_aspect_lock;
}
else
{
widthID = rnd_v2_width;
lengthID = rnd_v2_length;
aspectlockID = rnd_v2_aspect_lock;
}
pblock->GetValue(lengthID,t,length,FOREVER);
pblock->GetValue(widthID,t,width,FOREVER);
pblock->GetValue(aspectlockID,t,aspectlocked,FOREVER);
IParamMap2 *map = pblock->GetMap(0);
if(map)
{
ISpinnerControl *iSpin = GetISpinner(GetDlgItem(map->GetHWnd(), IDC_ASPECTSPIN));
aspect = iSpin->GetFVal();
}
pblock->GetMap()->Enable(aspectlockID,((length != 0.0f && width != 0.0f && aspect != 0.0f) || aspectlocked));
}
示例2: Set
void Set(PB2Value& val, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
{
if (!owner)
return;
plStaticEnvLayer* layer = (plStaticEnvLayer*)owner;
IParamBlock2 *pb = layer->GetParamBlockByID(plStaticEnvLayer::kBlkBitmap);
switch (id)
{
case plStaticEnvLayer::kBmpFrontBitmap:
case plStaticEnvLayer::kBmpBackBitmap:
case plStaticEnvLayer::kBmpLeftBitmap:
case plStaticEnvLayer::kBmpRightBitmap:
case plStaticEnvLayer::kBmpTopBitmap:
case plStaticEnvLayer::kBmpBottomBitmap:
// Set up the enums so these would match...
if (pb->GetMap())
pb->GetMap()->Invalidate( id );
// Update the bitmap saved by the layer
//layer->SetBitmap( id, &val.bm->bi );
break;
case plStaticEnvLayer::kBmpBaseFilename:
if( pb->GetMap() )
{
pb->GetMap()->Enable( plStaticEnvLayer::kBmpGenerateFaces, ( val.s == NULL || val.s[ 0 ] == 0 ) ? FALSE : TRUE );
ICustButton *bmSelectBtn = GetICustButton( GetDlgItem( pb->GetMap()->GetHWnd(), IDC_GENERATE_FACES ) );
bmSelectBtn->SetText( _T( "Generate From Node" ) );
ReleaseICustButton( bmSelectBtn );
}
break;
}
}
示例3: NotifyRefChanged
//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;
}
示例4: NotifyRefChanged
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;
}
示例5: EnableStuff
void Matte::EnableStuff() {
if (pblock) {
IParamMap2 *map = pblock->GetMap();
if (map) {
map->Enable(matte_reflection_amount, reflmap?TRUE:FALSE);
map->Enable(matte_affect_alpha, opaque?FALSE:TRUE);
}
}
}
示例6: EnableStuff
void Gradient::EnableStuff() {
if (pblock) {
IParamMap2 *map = pblock->GetMap();
pblock->GetValue( grad_noise_type, 0, noiseType, FOREVER );
if (map) {
map->Enable(grad_levels, noiseType==NOISE_REGULAR?FALSE:TRUE);
}
}
}
示例7:
void RendSpline::ParamAccessor::Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
{
if (owner != NULL && RendSpline::paramDlgProc != NULL)
{
RendSpline* mod = static_cast<RendSpline*>(owner);
IParamBlock2* pb = owner->GetParamBlock(0);
if (pb != NULL)
{
IParamMap2* pm = pb->GetMap(0);
if (pm != NULL)
RendSpline::paramDlgProc->Update(pm->GetHWnd(), t, id);
}
}
}
示例8: EndEditParams
void OrientConstRotation::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
if(editCont!=NULL)
{
editCont = NULL;
IParamMap2* pmap = pblock->GetMap();
if (pmap != NULL)
{
if (next && next->ClassID() == ClassID() && ((OrientConstRotation*)next)->pblock&&((OrientConstRotation*)next)->GetLocked()==false)
{
pmap->SetParamBlock(((OrientConstRotation*)next)->pblock);
ip->ClearPickMode();
}
else
orientCD.EndEditParams(ip, this, flags | END_EDIT_REMOVEUI, next);
}
else
{
int index = aprops.FindProperty(PROPID_INTERPUI);
if (index>=0) {
InterpCtrlUI *ui = (InterpCtrlUI*)aprops[index];
if (ui->hParams) {
ip->UnRegisterDlgWnd(ui->hParams);
ip->DeleteRollupPage(ui->hParams);
}
index = aprops.FindProperty(PROPID_INTERPUI);
if (index>=0) {
delete aprops[index];
aprops.Delete(index,1);
}
}
}
ip->UnRegisterTimeChangeCallback(&orientConstTimeChangeCallback);
ip->ClearPickMode(); // need this, otherwise will crash on undo, while pickmode is active.
this->ip = NULL;
hWnd = NULL;
}
}
示例9: BeginEditParams
void OrientConstRotation::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
if(GetLocked()==false)
{
this->ip = ip;
editCont = this;
if (flags & BEGIN_EDIT_HIERARCHY) {
InterpCtrlUI *ui;
ui = new InterpCtrlUI(NULL,ip,this);
DWORD f=0;
SetProperty(PROPID_INTERPUI,ui);
}
else {
orientCD.BeginEditParams(ip, this, flags, prev);
}
ip->RegisterTimeChangeCallback(&orientConstTimeChangeCallback);
orientConstTimeChangeCallback.orient_controller = this;
IParamMap2* pmap = pblock->GetMap();
if (pmap) hWnd = pmap->GetHWnd();
if (last_selection < 0){
RedrawListbox(GetCOREInterface()->GetTime());
}
else {
RedrawListbox(GetCOREInterface()->GetTime(), last_selection);
ISpinnerControl* spin = GetISpinner(GetDlgItem(hWnd, IDC_ORIENT_CONS_WEIGHT_SPINNER));
if (spin != NULL){
float value = pblock->GetFloat(orientation_target_weight, GetCOREInterface()->GetTime(), last_selection);
spin->SetValue(value, FALSE);
}
ReleaseISpinner(spin);
}
}
}