本文整理汇总了C++中Control::GetInterface方法的典型用法代码示例。如果您正苦于以下问题:C++ Control::GetInterface方法的具体用法?C++ Control::GetInterface怎么用?C++ Control::GetInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Control
的用法示例。
在下文中一共展示了Control::GetInterface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetBipedScale
// ============================================================================
// Set the scaling of a biped bone object
void SetBipedScale(INode *pNode, BOOL bUniform)
{
if(IsNodeBipedBone(pNode))
{
Control *pCont = pNode->GetTMController();
IBipedExport *pBipExp = (IBipedExport*)pCont->GetInterface(I_BIPINTERFACE);
pBipExp->RemoveNonUniformScale(bUniform);
Control *pMaster = (Control*)pCont->GetInterface(I_MASTER);
pMaster->NotifyDependents(FOREVER, PART_TM, REFMSG_CHANGE);
pCont->ReleaseInterface(I_MASTER, pMaster);
pCont->ReleaseInterface(I_BIPINTERFACE, pBipExp);
}
}
示例2: SetValue
void BaseLimitCtrl::SetValue(TimeValue in_t, void *in_val, int in_commit, GetSetMethod in_method)
{
if(GetLocked()==false)
{
if (IsEnabled()) {
if (in_method == CTRL_RELATIVE)
GetTypedValueAbsolute(in_t, in_val);
ClampTypedValue(in_t, in_val);
}
// Check if we have a controller assigned. If so, SetValue on it, if it's not locked!
Control *limitedCtrl = GetLimitedControl();
if (limitedCtrl) {
limitedCtrl->SetValue(in_t, in_val, in_commit, IsEnabled()? CTRL_ABSOLUTE: in_method);
}
else {
// If in AutoKey or SetKey mode, ParamBlock::SetValue() and ParamBlock2::SetValue()
// create a default controller (an fcurve) and then set key on that
// controller. So if there is no limited controller, I'll do the same:
// create one, and set key on it.
if (GetSetKeyMode() || (Animating() && GetCOREInterface10()->GetAutoKeyDefaultKeyOn() && (in_t!=0) && (in_t!=GetCOREInterface10()->GetAutoKeyDefaultKeyTime()))) {
// Create the proper default controller according to type
Control *newLimitedCtrl = GetDefaultControlForDataType();
if (newLimitedCtrl) {
void* ptrVal = CreateTempValue();
GetStaticValue(ptrVal, in_method);
SetLimitedControl(newLimitedCtrl);
if (GetSetKeyMode()) {
ISetKey *skey = (ISetKey *)newLimitedCtrl->GetInterface(I_SETKEYCONTROL);
if (skey)
skey->SetCurrentValue(ptrVal);
newLimitedCtrl->SetValue(in_t, in_val);
}
else {
newLimitedCtrl->SetValue(TimeValue(GetCOREInterface10()->GetAutoKeyDefaultKeyTime()), ptrVal);
newLimitedCtrl->SetValue(in_t, in_val);
}
DeleteTempValue(ptrVal);
}
}
// Set the limit controller static value
SetStaticValue(in_val, CTRL_ABSOLUTE);
}
}
}