本文整理汇总了C++中NodeGuiPtr::getSettingPanel方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeGuiPtr::getSettingPanel方法的具体用法?C++ NodeGuiPtr::getSettingPanel怎么用?C++ NodeGuiPtr::getSettingPanel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeGuiPtr
的用法示例。
在下文中一共展示了NodeGuiPtr::getSettingPanel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: anim
void
AnimationModule::addNode(const NodeGuiPtr& nodeGui)
{
// Check if it already exists
for (std::list<NodeAnimPtr>::const_iterator it = _imp->nodes.begin(); it != _imp->nodes.end(); ++it) {
if ((*it)->getNodeGui() == nodeGui) {
(*it)->refreshVisibility();
return;
}
}
// Determinate the node type
// It will be useful to identify and sort tree items
AnimatedItemTypeEnum nodeType = eAnimatedItemTypeCommon;
NodePtr node = nodeGui->getNode();
assert(node && node->getGroup());
if ( !node || !node->getGroup() ) {
return;
}
EffectInstancePtr effectInstance = node->getEffectInstance();
// Don't add an item for this node if it doesn't have any knob that may animate
//if ( !getNodeCanAnimate(node) ) {
// return;
//}
std::string pluginID = node->getPluginID();
NodeGroupPtr isGroup = toNodeGroup(effectInstance);
if (effectInstance->isReader()) {
nodeType = eAnimatedItemTypeReader;
} else if (isGroup) {
nodeType = eAnimatedItemTypeGroup;
} else if (pluginID == PLUGINID_OFX_RETIME) {
nodeType = eAnimatedItemTypeRetime;
} else if (pluginID == PLUGINID_OFX_TIMEOFFSET) {
nodeType = eAnimatedItemTypeTimeOffset;
} else if (pluginID == PLUGINID_OFX_FRAMERANGE) {
nodeType = eAnimatedItemTypeFrameRange;
}
// The NodeAnim should not be created if there's no settings panel.
assert(nodeGui->getSettingPanel());
NodeAnimPtr anim(NodeAnim::create(toAnimationModule(shared_from_this()), nodeType, nodeGui) );
_imp->nodes.push_back(anim);
Q_EMIT nodeAdded(anim);
} // AnimationModule::addNode