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

Method onMultipleKeyframesSetOnTrackCenter

Gui/TrackerPanel.cpp:1658–1694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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