| 478 | } |
| 479 | |
| 480 | bool ShadingControl_Impl::removeSubSurface(const SubSurface& subSurface) { |
| 481 | boost::optional<unsigned> idx = subSurfaceIndex(subSurface); |
| 482 | if (!idx) { |
| 483 | LOG(Warn, "For " << briefDescription() << " cannot remove SubSurface " << subSurface.nameString() << " since it is not part of it."); |
| 484 | return false; |
| 485 | } |
| 486 | |
| 487 | return removeSubSurface(idx.get()); |
| 488 | } |
| 489 | |
| 490 | bool ShadingControl_Impl::removeSubSurface(unsigned index) { |
| 491 | bool result = false; |