Merge pull request #42750 from lawnjelly/pouley_skin_visible

Change per frame software skinning check to is_visible
This commit is contained in:
Rémi Verschelde 2020-10-12 21:59:04 +02:00 committed by GitHub
commit 0a2a93b165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -370,7 +370,11 @@ void MeshInstance::_initialize_skinning(bool p_force_reset) {
void MeshInstance::_update_skinning() {
ERR_FAIL_COND(!_is_software_skinning_enabled());
#if defined(TOOLS_ENABLED) && defined(DEBUG_ENABLED)
ERR_FAIL_COND(!is_visible_in_tree());
#else
ERR_FAIL_COND(!is_visible());
#endif
ERR_FAIL_COND(!software_skinning);
Ref<Mesh> software_skinning_mesh = software_skinning->mesh_instance;