Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_curve.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| struct ReportList *UNUSED(reports)) | struct ReportList *UNUSED(reports)) | ||||
| { | { | ||||
| Curve *cu = (Curve *)ptr->owner_id; | Curve *cu = (Curve *)ptr->owner_id; | ||||
| Object *ob = (Object *)value.data; | Object *ob = (Object *)value.data; | ||||
| if (ob) { | if (ob) { | ||||
| /* If bevel object has got the save curve, as object, for which it's set as bevobj, | /* If bevel object has got the save curve, as object, for which it's set as bevobj, | ||||
| * there could be infinity loop in #DispList calculation. */ | * there could be infinity loop in #DispList calculation. */ | ||||
| if (ob->type == OB_CURVE && ob->data != cu) { | if (ob->type == OB_CURVES_LEGACY && ob->data != cu) { | ||||
| cu->bevobj = ob; | cu->bevobj = ob; | ||||
| id_lib_extern((ID *)ob); | id_lib_extern((ID *)ob); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| cu->bevobj = NULL; | cu->bevobj = NULL; | ||||
| } | } | ||||
| } | } | ||||
| Show All 28 Lines | |||||
| } | } | ||||
| static bool rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value) | static bool rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value) | ||||
| { | { | ||||
| Curve *cu = (Curve *)ptr->owner_id; | Curve *cu = (Curve *)ptr->owner_id; | ||||
| Object *ob = (Object *)value.data; | Object *ob = (Object *)value.data; | ||||
| if (ob) { | if (ob) { | ||||
| if (ob->type == OB_CURVE && ob->data != cu) { | if (ob->type == OB_CURVES_LEGACY && ob->data != cu) { | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr) | static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr) | ||||
| Show All 13 Lines | |||||
| struct ReportList *UNUSED(reports)) | struct ReportList *UNUSED(reports)) | ||||
| { | { | ||||
| Curve *cu = (Curve *)ptr->owner_id; | Curve *cu = (Curve *)ptr->owner_id; | ||||
| Object *ob = (Object *)value.data; | Object *ob = (Object *)value.data; | ||||
| if (ob) { | if (ob) { | ||||
| /* If taper object has got the save curve, as object, for which it's set as bevobj, | /* If taper object has got the save curve, as object, for which it's set as bevobj, | ||||
| * there could be infinity loop in #DispList calculation. */ | * there could be infinity loop in #DispList calculation. */ | ||||
| if (ob->type == OB_CURVE && ob->data != cu) { | if (ob->type == OB_CURVES_LEGACY && ob->data != cu) { | ||||
| cu->taperobj = ob; | cu->taperobj = ob; | ||||
| id_lib_extern((ID *)ob); | id_lib_extern((ID *)ob); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| cu->taperobj = NULL; | cu->taperobj = NULL; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||