Modifiers: Only allow geometry nodes for curves and point cloud

Effectively this disables two volume modifiers for the new curves
object and the point cloud object types. The aim is to simplify the
process of using these object types to prove out a node-group-based
workflow integrated with the asset browser. We're making the assumption
that these two modifiers were used very rarely on the new curves type
since that wasn't its purpose, so this breaks backwards compatibility.
This commit is contained in:
Hans Goudey 2023-01-13 14:20:08 -06:00
parent cb92ff7b2d
commit 2c910cb70a
1 changed files with 5 additions and 3 deletions

View File

@ -1425,9 +1425,11 @@ bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type)
return false;
}
/* Only geometry objects should be able to get modifiers T25291. */
if (ELEM(ob->type, OB_POINTCLOUD, OB_VOLUME, OB_CURVES)) {
return (mti->modifyGeometrySet != nullptr);
if (ELEM(ob->type, OB_POINTCLOUD, OB_CURVES)) {
return modifier_type == eModifierType_Nodes;
}
if (ob->type == OB_VOLUME) {
return mti->modifyGeometrySet != nullptr;
}
if (ELEM(ob->type, OB_MESH, OB_CURVES_LEGACY, OB_SURF, OB_FONT, OB_LATTICE)) {
if (ob->type == OB_LATTICE && (mti->flags & eModifierTypeFlag_AcceptsVertexCosOnly) == 0) {