Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-09 17:50:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-09 17:50:22 +0400
commit8491814a107f3b90bddfbe296d32d1564f3455ea (patch)
tree8d743de8b50cf953d7882b3bf27f5460c5b0e30e /source/blender/makesrna/intern/rna_object.c
parent79f264bd6925d8c13e75d0a103734557faec7357 (diff)
fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child object
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c9
1 files changed, 6 insertions, 3 deletions
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);
}