本文整理汇总了C++中IParamMap2类的典型用法代码示例。如果您正苦于以下问题:C++ IParamMap2类的具体用法?C++ IParamMap2怎么用?C++ IParamMap2使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IParamMap2类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: Set
void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
{
VRayCamera *cam = (VRayCamera*)owner;
IParamMap2* pmap = cam->pblock->GetMap();
TSTR p, f, e, name;
switch (id) {
case pb_separation_map: {
if (pmap) {
TSTR sepname(v.bm->bi.Name());
SplitFilename(sepname, &p, &f, &e);
name = f + e;
pmap->SetText(pb_separation_map, name.data());
} break;
}
case pb_head_turn_map: {
if (pmap) {
TSTR sepname(v.bm->bi.Name());
SplitFilename(sepname, &p, &f, &e);
name = f + e;
pmap->SetText(pb_head_turn_map, name.data());
} break;
}
case pb_head_tilt_map: {
if (pmap) {
TSTR sepname(v.bm->bi.Name());
SplitFilename(sepname, &p, &f, &e);
name = f + e;
pmap->SetText(pb_head_tilt_map, name.data());
} break;
}
default: break;
}
}
示例3: 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));
}
示例4: switch
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;
}
示例5: 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;
}
示例6: plStealthMouseOverrideProc
static INT_PTR CALLBACK plStealthMouseOverrideProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
IParamMap2 *map = (IParamMap2 *)GetWindowLongPtr( hWnd, GWLP_USERDATA );
switch( msg )
{
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
{
// We don't want the COREInterface to process our mouse messages with RollupMouseMessage;
// rather, we want IMtlParams to do it just like it would if we could actually call
// CreateChildMParamMap2
IParamBlock2 *pb = map->GetParamBlock();
if( pb != nil )
{
plAnimStealthNode *stealth = (plAnimStealthNode *)pb->GetOwner();
if( stealth != nil )
{
plPassMtlBase *mtl = (plPassMtlBase *)stealth->GetParentMtl();
mtl->fIMtlParams->RollupMouseMessage( hWnd, msg, wParam, lParam );
}
}
return 0;
}
}
if( sOldStealthDlgProc != nil )
return CallWindowProc( sOldStealthDlgProc, hWnd, msg, wParam, lParam );
else
return 0;
}
示例7: 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);
}
}
}
示例8: Set
void Set(PB2Value& v, ReferenceMaker* owner, ParamID id, int tabIndex, TimeValue t)
{
if (id == kConeAngleUseSquare)
{
IParamMap2* pmap = ((IParamBlock2*)((ConeAngleManipulator*)owner)->GetReference(PBLOCK_REF_NO))->GetMap();
if (pmap) pmap->Enable(kConeAngleAspect, v.i);
}
}
示例9: 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);
}
}
}
示例10: GetPViewParamMap
void PFTestGoToRotation::UpdatePViewUI(ParamID updateID) const
{
for(int i=0; i<NumPViewParamMaps(); i++) {
IParamMap2* map = GetPViewParamMap(i);
map->Invalidate(updateID);
Interval currentTimeInterval;
currentTimeInterval.SetInstant(GetCOREInterface()->GetTime());
map->Validity() = currentTimeInterval;
}
}
示例11: GetPViewParamMap
//+--------------------------------------------------------------------------+
//| From ReferenceMaker |
//+--------------------------------------------------------------------------+
void PFOperatorForceSpaceWarp::UpdatePViewUI(IParamBlock2* pblock, ParamID updateID)
{
for(int i=0; i<NumPViewParamMaps(); i++) {
IParamMap2* map = GetPViewParamMap(i);
if (pblock != map->GetParamBlock()) continue;
map->Invalidate(updateID);
Interval currentTimeInterval;
currentTimeInterval.SetInstant(GetCOREInterface()->GetTime());
map->Validity() = currentTimeInterval;
}
}
示例12:
void plAnimStealthNode::SwitchDlg( plAnimStealthNode *toSwitchTo )
{
IParamMap2 *map = fParamBlock->GetMap();
fParamBlock->SetMap( nil );
toSwitchTo->fParamBlock->SetMap( map );
map->SetParamBlock( toSwitchTo->fParamBlock );
map->SetThing( (ReferenceTarget *)toSwitchTo );
map->Invalidate();
map->UpdateUI( 0 );
}
示例13: SetLeaderNodeText
void FormationBhvr::SetLeaderNodeText()
{
if (!editing) return;
IParamMap2 *pmap = pblock->GetMap();
if (!pmap) return;
INode *node;
node = pblock->GetINode(leader,0,0);
if(node)
pmap->SetText(leader,node->GetName());
else
pmap->SetText(leader,GetString(IDS_NONE));
}
示例14: SetFollowerNodeText
void FormationBhvr::SetFollowerNodeText()
{
if (!editing) return;
IParamMap2 *pmap = pblock->GetMap();
if (!pmap) return;
if (pblock->Count(follower) == 0)
pmap->SetText(follower_single,GetString(IDS_NONE));
else if (pblock->Count(follower) == 1)
{
INode *node;
node = pblock->GetINode(follower,0,0);
if (node) pmap->SetText(follower_single,node->GetName());
}
else pmap->SetText(follower_single,GetString(IDS_MULTIPLE));
}
示例15:
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);
}
}
}