Merge pull request #78563 from bitsawer/fix_skeleton_error_spam
Fix error spam when a mesh with bone weights has an invalid skeleton
This commit is contained in:
commit
d87bdef2a4
3 changed files with 7 additions and 1 deletions
|
@ -3738,6 +3738,8 @@ void RenderForwardClustered::_geometry_instance_update(RenderGeometryInstance *p
|
||||||
if (ginstance->data->dirty_dependencies) {
|
if (ginstance->data->dirty_dependencies) {
|
||||||
mesh_storage->skeleton_update_dependency(ginstance->data->skeleton, &ginstance->data->dependency_tracker);
|
mesh_storage->skeleton_update_dependency(ginstance->data->skeleton, &ginstance->data->dependency_tracker);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ginstance->transforms_uniform_set = RID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2667,6 +2667,8 @@ void RenderForwardMobile::_geometry_instance_update(RenderGeometryInstance *p_ge
|
||||||
if (ginstance->data->dirty_dependencies) {
|
if (ginstance->data->dirty_dependencies) {
|
||||||
mesh_storage->skeleton_update_dependency(ginstance->data->skeleton, &ginstance->data->dependency_tracker);
|
mesh_storage->skeleton_update_dependency(ginstance->data->skeleton, &ginstance->data->dependency_tracker);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ginstance->transforms_uniform_set = RID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -690,7 +690,9 @@ public:
|
||||||
_FORCE_INLINE_ RID skeleton_get_3d_uniform_set(RID p_skeleton, RID p_shader, uint32_t p_set) const {
|
_FORCE_INLINE_ RID skeleton_get_3d_uniform_set(RID p_skeleton, RID p_shader, uint32_t p_set) const {
|
||||||
Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
|
Skeleton *skeleton = skeleton_owner.get_or_null(p_skeleton);
|
||||||
ERR_FAIL_COND_V(!skeleton, RID());
|
ERR_FAIL_COND_V(!skeleton, RID());
|
||||||
ERR_FAIL_COND_V(skeleton->size == 0, RID());
|
if (skeleton->size == 0) {
|
||||||
|
return RID();
|
||||||
|
}
|
||||||
if (skeleton->use_2d) {
|
if (skeleton->use_2d) {
|
||||||
return RID();
|
return RID();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue