void RotoItem::setGloballyActivated_recursive(bool a) { { QMutexLocker l(&itemMutex); _imp->globallyActivated = a; RotoLayer* layer = dynamic_cast<RotoLayer*>(this); if (layer) { const RotoItems & children = layer->getItems(); for (RotoItems::const_iterator it = children.begin(); it != children.end(); ++it) { (*it)->setGloballyActivated_recursive(a); } } } }
void RotoItem::setLocked_recursive(bool locked,RotoItem::SelectionReasonEnum reason) { { { QMutexLocker m(&itemMutex); _imp->locked = locked; } getContext()->onItemLockedChanged(shared_from_this(),reason); RotoLayer* layer = dynamic_cast<RotoLayer*>(this); if (layer) { const RotoItems & children = layer->getItems(); for (RotoItems::const_iterator it = children.begin(); it != children.end(); ++it) { (*it)->setLocked_recursive(locked,reason); } } } }