Fix move for RAII objects
- Fix all
isCurrent()checks for RAII objects, which failed if the object has been moved before - Port texture generation script to Python 3
isCurrent() checks for RAII objects, which failed if the object has been moved before