Cleans up codes and forces PBR shader when switching to painting tool