fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 9 Jul 2013 13:50:22 +0000 (13:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 9 Jul 2013 13:50:22 +0000 (13:50 +0000)
source/blender/makesrna/intern/rna_object.c

index 3a5869c8300167b600713d365d935f81d7be6602..d48dbbb130046f496988fc8eddb01842f797a2db 100644 (file)
@@ -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);
                }