本文整理汇总了C++中KnobIPtr::getCurrentTime方法的典型用法代码示例。如果您正苦于以下问题:C++ KnobIPtr::getCurrentTime方法的具体用法?C++ KnobIPtr::getCurrentTime怎么用?C++ KnobIPtr::getCurrentTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KnobIPtr
的用法示例。
在下文中一共展示了KnobIPtr::getCurrentTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QUndoCommand
MultipleKnobEditsUndoCommand::MultipleKnobEditsUndoCommand(const KnobIPtr& knob,
const QString& commandName,
ValueChangedReasonEnum reason,
ValueChangedReturnCodeEnum setValueRetCode,
bool createNew,
bool setKeyFrame,
const PerDimViewVariantMap& oldValue,
const Variant & newValue,
DimSpec dimension,
double time,
ViewSetSpec view)
: QUndoCommand()
, knobs()
, createNew(createNew)
, firstRedoCalled(false)
{
assert(knob);
std::list<ValueToSet>& vlist = knobs[knob];
vlist.push_back(ValueToSet());
// Add the new value to set to the list (which may be not empty)
ValueToSet &v = vlist.back();
v.newValue = newValue;
v.dimension = dimension;
assert(dimension != -1);
if (!setKeyFrame) {
// Ensure the time is correct in case auto-keying is on and we add a keyframe
v.time = knob->getCurrentTime();
} else {
v.time = time;
}
v.setKeyFrame = setKeyFrame;
v.view = view;
v.setValueRetCode = setValueRetCode;
v.reason = reason;
v.oldValues = oldValue;
KnobHolderPtr holder = knob->getHolder();
EffectInstancePtr effect = toEffectInstance(holder);
QString holderName;
if (effect) {
holderName = QString::fromUtf8( effect->getNode()->getLabel().c_str() );
}
// Set the command name in the Edit menu
if (!commandName.isEmpty()) {
setText(QString::fromUtf8("%1: ").arg(holderName) + commandName);
} else {
// If no command name passed, make up a generic command name
setText( tr("%1: Multiple Parameters Edits").arg(holderName) );
}
}