| 168 | } |
| 169 | |
| 170 | void pythonModifySelectedMesh( MR::Mesh mesh ) |
| 171 | { |
| 172 | MR::CommandLoop::runCommandFromGUIThread( [&] |
| 173 | { |
| 174 | auto selected = MR::getAllObjectsInTree<MR::ObjectMesh>( &MR::SceneRoot::get(), MR::ObjectSelectivityType::Selected ); |
| 175 | if ( selected.size() != 1 ) |
| 176 | throw std::runtime_error( fmt::format( "Exactly one mesh must be selected, but have {}.", selected.size() ) ); |
| 177 | if ( !selected[0] ) |
| 178 | throw std::runtime_error( "Internal error (the object is null?)." ); |
| 179 | selected[0]->setMesh( std::make_shared<MR::Mesh>( std::move( mesh ) ) ); |
| 180 | selected[0]->setDirtyFlags( MR::DIRTY_ALL ); |
| 181 | } ); |
| 182 | } |
| 183 | |
| 184 | template <typename T, auto M> |
| 185 | auto pythonGetSelectedBitset() |
nothing calls this directly
no test coverage detected