forked from bartvdbraak/blender
fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child object
This commit is contained in:
parent
79f264bd69
commit
8491814a10
@ -460,17 +460,20 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), Point
|
|||||||
if (ob->parent) {
|
if (ob->parent) {
|
||||||
Object *par = 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);
|
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 */
|
/* special hack: prevents this overriding others */
|
||||||
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[4], PARSKEL);
|
RNA_enum_items_add_value(&item, &totitem, &parent_type_items[4], PARSKEL);
|
||||||
|
}
|
||||||
else if (par->type == OB_ARMATURE) {
|
else if (par->type == OB_ARMATURE) {
|
||||||
/* special hack: prevents this being overrided */
|
/* 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[3], PARSKEL);
|
||||||
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
|
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, PARVERT1);
|
||||||
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT3);
|
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT3);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user