def setTexIfNoShaders(obj):
 if (hasattr(obj, 'useShaders') and (not obj.useShaders)):
  if hasattr(obj, '_needTextureUpdate'):
   obj._needTextureUpdate = True

def setTexIfNoShaders ( obj ) : if ( hasattr ( obj , 'useShaders' ) and ( not obj . useShaders ) ) : if hasattr ( obj , '_needTextureUpdate' ) : obj . _needTextureUpdate = True
useful decorator for classes that need to update texture after other properties .