Message 1 of 8
How to pass a MaxScript bitmap to C++ using function-publishing

Not applicable
11-26-2018
12:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings,
I have a question regarding how to pass a MaxScript bitmap to C++ using function-publishing?
I use the following definition for my function-published interface
void SetImage(PBBitmap &bmap);
PBBitmap& GetImage();
PROP_FNS(IFP_OpenVINO::em_getBmap, GetImage, IFP_OpenVINO::em_setBmap, SetImage, TYPE_BITMAP_BV)
And on the MaxScript side I use
myBitmap = openBitmap <some-path to an image>
fp.Image = myBitmap
showproperties myBitmap
My expectation is that on the C++ side my GetImage has received by-value a MXS Bitmap object that I can work with. This is not working as I am getting trash. Might anyone be so kind as to pointing me to working samples or how-tos that demonstrate proper usage of function-publishing and bitmaps?