Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This function returns the PLAData of a Cinema 4D object. Returned
- * pointer is owned by the passed geData object and is freed with its
- * destruction.
- *
- * @param op The object to get the PLAData from.
- * @param geData This GeData object must stay alive as long as the
- * returned PLAData object is in use.
- * @return A pointer to the PLAData of the object or nullptr if it
- * could not be obtained (eg. there is not PLA animation track)
- */
- _melange_::PLAData* GetPLAData(_melange_::BaseObject* op, _melange_::GeData& geData);
- PLAData* GetPLAData(BaseObject* op, GeData& geData) {
- CTrack* track = op->FindCTrack(DescID(CTpla));
- if (!track)
- return nullptr;
- if (!track->GetParameter(CK_PLA_DATA, geData))
- return nullptr;
- // TODO: Why is geData.GetType() == 0?
- return static_cast<PLAData*>(geData.GetCustomDataType(CUSTOMDATATYPE_PLA));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement