Fix #128746: SequenceCache modifier not available in dropdown for Curves

In a Curves (not Curve) object, the MeshSequenceCache modifier is not
available from the "Add Modifier" dropdown.

However, the Alembic importer adds such a modifier onto the Curves
objects it creates. It is also possible to transfer such a modifier from
another object, regardless of its type.
Thus, this seems not to be an issue of compatibility of the modifier
with the Curves object type, but an UI/UX oversight.

`BKE_object_support_modifier_type_check` already has a correct check for
this, so just adding CURVES support to the appropriate menu.

Same is true for the POINTCLOUD type, so adding that as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/128756
This commit is contained in:
Philipp Oeser
2024-10-09 13:02:15 +02:00
committed by Philipp Oeser
parent 738dc431eb
commit 3b9a07d49a

View File

@@ -76,7 +76,7 @@ class OBJECT_MT_modifier_add(ModifierAddMenu, Menu):
if geometry_nodes_supported:
self.operator_modifier_add(layout, 'NODES')
layout.separator()
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE', 'GREASEPENCIL'}:
if ob_type in {'MESH', 'CURVE', 'CURVES', 'FONT', 'SURFACE', 'LATTICE', 'GREASEPENCIL', 'POINTCLOUD'}:
layout.menu("OBJECT_MT_modifier_add_edit")
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'VOLUME', 'GREASEPENCIL'}:
layout.menu("OBJECT_MT_modifier_add_generate")
@@ -104,7 +104,7 @@ class OBJECT_MT_modifier_add_edit(ModifierAddMenu, Menu):
self.operator_modifier_add(layout, 'DATA_TRANSFER')
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
self.operator_modifier_add(layout, 'MESH_CACHE')
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
if ob_type in {'MESH', 'CURVE', 'CURVES', 'FONT', 'SURFACE', 'POINTCLOUD'}:
self.operator_modifier_add(layout, 'MESH_SEQUENCE_CACHE')
if ob_type == 'MESH':
self.operator_modifier_add(layout, 'UV_PROJECT')