diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-30 09:07:07 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-30 09:07:07 +0300 |
commit | a58592885c3e75831148238331fa65119c7456bf (patch) | |
tree | cbad035d669793264e939be218a8c0f7a3cedb9d /source/blender/blenkernel | |
parent | 0c5a9a0e776eeb724f7266694153f98721e34fde (diff) |
Cleanup: Remove modifier type hair callback
This is similar to e032ca2e25bf2e305b66 which removed the
callback for volumes. Now that we have geometry sets, there is
no need to define a callback for every data type, and this wasn't
used. Procedural curves/hair editing will use nodes rather than new
modifier types anyway.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_modifier.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/hair.cc | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.cc | 5 |
3 files changed, 1 insertions, 24 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 80889813b34..14305323db9 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -245,10 +245,6 @@ typedef struct ModifierTypeInfo { const struct ModifierEvalContext *ctx, struct Mesh *mesh); - struct Hair *(*modifyHair)(struct ModifierData *md, - const struct ModifierEvalContext *ctx, - struct Hair *hair); - /** * The modifier has to change the geometry set in-place. The geometry set can contain zero or * more geometry components. This callback can be used by modifiers that don't work on any diff --git a/source/blender/blenkernel/intern/hair.cc b/source/blender/blenkernel/intern/hair.cc index b7ba159f631..976e75822bc 100644 --- a/source/blender/blenkernel/intern/hair.cc +++ b/source/blender/blenkernel/intern/hair.cc @@ -380,22 +380,6 @@ static Hair *hair_evaluate_modifiers(struct Depsgraph *depsgraph, /* Created deformed coordinates array on demand. */ mti->deformVerts(md, &mectx, nullptr, hair->co, hair->totpoint); } - else if (mti->modifyHair) { - /* Ensure we are not modifying the input. */ - if (hair == hair_input) { - hair = BKE_hair_copy_for_eval(hair, true); - } - - Hair *hair_next = mti->modifyHair(md, &mectx, hair); - - if (hair_next && hair_next != hair) { - /* If the modifier returned a new hair, release the old one. */ - if (hair != hair_input) { - BKE_id_free(nullptr, hair); - } - hair = hair_next; - } - } } return hair; diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index e177b1ce29e..403b9d353ec 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -1486,10 +1486,7 @@ bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type) } /* Only geometry objects should be able to get modifiers T25291. */ - if (ob->type == OB_HAIR) { - return (mti->modifyHair != nullptr) || (mti->flags & eModifierTypeFlag_AcceptsVertexCosOnly); - } - if (ELEM(ob->type, OB_POINTCLOUD, OB_VOLUME)) { + if (ELEM(ob->type, OB_POINTCLOUD, OB_VOLUME, OB_HAIR)) { return (mti->modifyGeometrySet != nullptr); } if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) { |