01-31-2019, 12:45 PM
(This post was last modified: 01-31-2019, 01:30 PM by Rick Johnson.)
Thanks, Garrett. It took some tinkering, but I found some interesting nuances with the viewable art that weren't there when I last used pluginArt with the SDK about 15 years ago.
- hdi::core::draw can't create art there.
- hdi::core::Art::reorder() can't move art there.
- art can only be duplicated there or built from scratch.
No additional grouping is needed.
I hope this approach to coercing an auto_ptr to plain pointer is correct for creating art there:
Now that I can create the art, it's time to delve into the message data to respond appropriately when the art is moved or modified. It helps that each of the 11 or so customArt message types can register its own callback with the Dispatcher. hdi::core:ispatcher::lastMessage() returns a message pointer, but how can I obtain a CustomArtMessage to get the relevant customArt() pointer?
- hdi::core::draw can't create art there.
- hdi::core::Art::reorder() can't move art there.
- art can only be duplicated there or built from scratch.
No additional grouping is needed.
I hope this approach to coercing an auto_ptr to plain pointer is correct for creating art there:
Code:
hdi::core::Art newArt = hdi::core::Art(hdi::core::ArtTypePath, hdi::core::PlaceInsideOnTop,custObj.customArt()->viewableArt().get());
Now that I can create the art, it's time to delve into the message data to respond appropriately when the art is moved or modified. It helps that each of the 11 or so customArt message types can register its own callback with the Dispatcher. hdi::core:ispatcher::lastMessage() returns a message pointer, but how can I obtain a CustomArtMessage to get the relevant customArt() pointer?