本文整理汇总了C++中LLFloaterAnimPreview::childSetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterAnimPreview::childSetValue方法的具体用法?C++ LLFloaterAnimPreview::childSetValue怎么用?C++ LLFloaterAnimPreview::childSetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLFloaterAnimPreview
的用法示例。
在下文中一共展示了LLFloaterAnimPreview::childSetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validateLoopOut
//-----------------------------------------------------------------------------
// validateLoopOut()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
if (!previewp->getEnabled())
return FALSE;
F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
if (loop_out_value < 0.f)
{
loop_out_value = 0.f;
}
else if (loop_out_value > 100.f)
{
loop_out_value = 100.f;
}
else if (loop_out_value < loop_in_value)
{
loop_out_value = loop_in_value;
}
previewp->childSetValue("loop_out_point", LLSD(loop_out_value));
return TRUE;
}
示例2: onCommitLoopOut
//-----------------------------------------------------------------------------
// onCommitLoopOut()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
if (!previewp->getEnabled())
return;
LLVOAvatar* avatarp;
if (previewp->mInWorld)
{
if (!gAgent.getAvatarObject())
{
return;
}
avatarp = gAgent.getAvatarObject();
}
else
{
if (!previewp->mAnimPreview)
{
return;
}
avatarp = previewp->mAnimPreview->getDummyAvatar();
}
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
if (motionp)
{
motionp->setLoopOut((F32)previewp->childGetValue("loop_out_point").asReal() * 0.01f * motionp->getDuration());
previewp->resetMotion();
previewp->childSetValue("loop_check", LLSD(TRUE));
onCommitLoop(ctrl, data);
}
}
示例3: validateEaseOut
//-----------------------------------------------------------------------------
// validateEaseOut()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
if (!previewp->getEnabled())
return FALSE;
LLVOAvatar* avatarp;
if (previewp->mInWorld)
{
if (!gAgent.getAvatarObject())
{
return FALSE;
}
avatarp = gAgent.getAvatarObject();
}
else
{
if (!previewp->mAnimPreview)
{
return FALSE;
}
avatarp = previewp->mAnimPreview->getDummyAvatar();
}
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
if (!motionp->getLoop())
{
F32 new_ease_out = llclamp((F32)previewp->childGetValue("ease_out_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseInDuration());
previewp->childSetValue("ease_out_time", LLSD(new_ease_out));
}
return TRUE;
}
示例4: validateEaseIn
//-----------------------------------------------------------------------------
// validateEaseIn()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
if (!previewp->getEnabled())
return FALSE;
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
if (!motionp->getLoop())
{
F32 new_ease_in = llclamp((F32)previewp->childGetValue("ease_in_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseOutDuration());
previewp->childSetValue("ease_in_time", LLSD(new_ease_in));
}
return TRUE;
}
示例5: onCommitLoopIn
//-----------------------------------------------------------------------------
// onCommitLoopIn()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
{
LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
if (!previewp->getEnabled())
return;
LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
if (motionp)
{
motionp->setLoopIn((F32)previewp->childGetValue("loop_in_point").asReal() / 100.f);
previewp->resetMotion();
previewp->childSetValue("loop_check", LLSD(TRUE));
onCommitLoop(ctrl, data);
}
}