MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / onMultipleKeyframesSetOnTrackCenter

Method onMultipleKeyframesSetOnTrackCenter

Gui/TrackerPanel.cpp:1661–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1659}
1660
1661void
1662TrackerPanel::onMultipleKeyframesSetOnTrackCenter(const TrackMarkerPtr& marker,
1663 const std::list<double>& keys)
1664{
1665 TrackKeysMap::iterator found = _imp->keys.find(marker);
1666
1667 if ( found == _imp->keys.end() ) {
1668 TrackKeys k;
1669 for (std::list<double>::const_iterator it = keys.begin(); it != keys.end(); ++it) {
1670 k.centerKeys.insert(*it);
1671 }
1672 _imp->keys[marker] = k;
1673 } else {
1674 std::list<int> reallyInserted;
1675 for (std::list<double>::const_iterator it = keys.begin(); it != keys.end(); ++it) {
1676 std::pair<std::set<double>::iterator, bool> ret = found->second.centerKeys.insert(*it);
1677 if (ret.second) {
1678 reallyInserted.push_back(*it);
1679 }
1680 }
1681 if (!reallyInserted.empty() && found->second.visible) {
1682 NodeGuiPtr node = _imp->node.lock();
1683 if (!node) {
1684 return;
1685 }
1686 NodePtr internalNode = node->getNode();
1687 if (!internalNode) {
1688 return;
1689 }
1690 AppInstancePtr app = internalNode->getApp();
1691 if (!app) {
1692 return;
1693 }
1694 app->addMultipleKeyframeIndicatorsAdded(reallyInserted, true);
1695 }
1696 }
1697}
1698
1699void
1700TrackerPanelPrivate::setVisibleItemKeyframes(const std::list<int>& keyframes,

Callers

nothing calls this directly

Calls 10

emptyMethod · 0.80
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
insertMethod · 0.45
push_backMethod · 0.45
lockMethod · 0.45
getNodeMethod · 0.45
getAppMethod · 0.45

Tested by

no test coverage detected