02-03-2019, 12:13 AM
Yeah, your usage of the auto-pointer is right, but this is a smidge shorter:
Cast the Message pointer returned by hdi::core:ispatcher::lastMessage() to a CustomArtMessage pointer; just make sure you're doing so from within a callback registered as the handler for a custom art message type.
Code:
hdi::core::Art newArt(hdi::core::ArtTypePath, hdi::core::PlaceInsideOnTop, custObj.customArt()->viewableArt().get());
Cast the Message pointer returned by hdi::core:ispatcher::lastMessage() to a CustomArtMessage pointer; just make sure you're doing so from within a callback registered as the handler for a custom art message type.