Fix #135071: Vertex Parenting: Provide Index Access Options

When using vertex parenting, an option for using the parent object
final evaluated indices is exposed in the Object Properties: Relations
panel. This allows the calculation of the parent vertex position to
ignore the the CD_ORIGINDEX layer and instead use the final indices
that may have been altered by the node tree evaluation.

The indices that will be used for the vertex parenting are also exposed
to the UI in the same panel, allowing them to be altered after the
vertex parent has been created.
This commit is contained in:
Johnny Matthews
2025-03-21 23:43:48 +01:00
parent 61783caa7f
commit 633b8d30db
4 changed files with 25 additions and 7 deletions

View File

@@ -126,6 +126,12 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
parent = ob.parent
if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE':
sub.prop_search(ob, "parent_bone", parent.data, "bones")
elif ob.parent_type == 'VERTEX':
col.prop(ob, "parent_vertices", text="Parent Vertex", index=0)
sub.prop(ob, "use_parent_final_indices")
elif ob.parent_type == 'VERTEX_3':
col.prop(ob, "parent_vertices", text="Parent Vertices")
sub.prop(ob, "use_parent_final_indices")
sub.active = (parent is not None)
sub.prop(ob, "use_camera_lock_parent")