| 2422 | } |
| 2423 | |
| 2424 | void |
| 2425 | TrackerNode::onInteractViewportSelectionUpdated(const RectD& rectangle, |
| 2426 | bool onRelease) |
| 2427 | { |
| 2428 | if (!onRelease) { |
| 2429 | return; |
| 2430 | } |
| 2431 | |
| 2432 | |
| 2433 | bool trackingPageSecret = getNode()->getTrackerContext()->getTrackingPageKnob()->getIsSecret(); |
| 2434 | if (trackingPageSecret) { |
| 2435 | return; |
| 2436 | } |
| 2437 | |
| 2438 | std::vector<TrackMarkerPtr> allMarkers; |
| 2439 | std::list<TrackMarkerPtr> selectedMarkers; |
| 2440 | TrackerContextPtr context = getNode()->getTrackerContext(); |
| 2441 | context->getAllMarkers(&allMarkers); |
| 2442 | for (std::size_t i = 0; i < allMarkers.size(); ++i) { |
| 2443 | if ( !allMarkers[i]->isEnabled( allMarkers[i]->getCurrentTime() ) ) { |
| 2444 | continue; |
| 2445 | } |
| 2446 | KnobDoublePtr center = allMarkers[i]->getCenterKnob(); |
| 2447 | double x, y; |
| 2448 | x = center->getValue(0); |
| 2449 | y = center->getValue(1); |
| 2450 | if ( (x >= rectangle.x1) && (x <= rectangle.x2) && (y >= rectangle.y1) && (y <= rectangle.y2) ) { |
| 2451 | selectedMarkers.push_back(allMarkers[i]); |
| 2452 | } |
| 2453 | } |
| 2454 | |
| 2455 | context->beginEditSelection(TrackerContext::eTrackSelectionInternal); |
| 2456 | context->clearSelection(TrackerContext::eTrackSelectionInternal); |
| 2457 | context->addTracksToSelection(selectedMarkers, TrackerContext::eTrackSelectionInternal); |
| 2458 | context->endEditSelection(TrackerContext::eTrackSelectionInternal); |
| 2459 | } |
| 2460 | |
| 2461 | void |
| 2462 | TrackerNode::refreshExtraStateAfterTimeChanged(bool isPlayback, |
nothing calls this directly
no test coverage detected