From 8491814a107f3b90bddfbe296d32d1564f3455ea Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 9 Jul 2013 13:50:22 +0000 Subject: fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child object --- source/blender/makesrna/intern/rna_object.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_object.c') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 3a5869c8300..d48dbbb1300 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -460,17 +460,20 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), Point if (ob->parent) { Object *par = ob->parent; - if (par->type == OB_CURVE) + if (par->type == OB_CURVE) { RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARCURVE); - else if (par->type == OB_LATTICE) + } + else if (par->type == OB_LATTICE) { /* special hack: prevents this overriding others */ RNA_enum_items_add_value(&item, &totitem, &parent_type_items[4], PARSKEL); + } else if (par->type == OB_ARMATURE) { /* special hack: prevents this being overrided */ RNA_enum_items_add_value(&item, &totitem, &parent_type_items[3], PARSKEL); RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE); } - else if (par->type == OB_MESH) { + + if (ELEM4(par->type, OB_MESH, OB_CURVE, OB_SURF, OB_LATTICE)) { RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT1); RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT3); } -- cgit v1.2.3