Fix T40447: Creating Rigid Bodies is rejected for meshes without polys.

This check prevents using empty (no faces) meshes as rigid bodies.
While the idea makes sense, it also prevents using modifier-constructed
meshes, where faces are added only by the modifiers.

Further the check is very easy to circumvent, by removing faces after
making the rigid body, or by assigning a different mesh datablock
afterward.

Suggested by Fabian Emmes (@der_fab).
This commit is contained in:
Lukas Tönne 2014-06-01 15:54:58 +02:00
parent 682b949d0f
commit 7674ebf340
Notes: blender-bot 2023-06-26 11:58:59 +02:00
Referenced by issue #40447, Creating Rigid Bodies is rejected for some meshes
1 changed files with 0 additions and 4 deletions

View File

@ -100,10 +100,6 @@ bool ED_rigidbody_object_add(Scene *scene, Object *ob, int type, ReportList *rep
BKE_report(reports, RPT_ERROR, "Can't add Rigid Body to non mesh object");
return false;
}
if (((Mesh *)ob->data)->totpoly == 0) {
BKE_report(reports, RPT_ERROR, "Can't create Rigid Body from mesh with no polygons");
return false;
}
/* Add rigid body world and group if they don't exist for convenience */
if (rbw == NULL) {