Solved ShowBitmap() and image name

Hi folks,

How do I set a name for an image sent to the picture viewer? This bit here:

93084c00-cd80-473f-96e0-6d0be847f487-image.png

I tried setting the bitmap data like this:

bmp->SetData(BASEBITMAP_DATA_NAME,"My name");
ShowBitmap(bmp);

but it does nothing.

WP.

Hello @WickedP,

thank you for reaching out to us. I noticed this too a while ago, and there is a ticket for that in the SDK task pool. It, however, has low priority.

  • ShowBitmap has a backend implementation of the same name which takes in a string to name the bitmap.
  • The backend ignores all bitmap metadata and the frontend version of ShowBitmap does not support the name argument.

There is also the file lib_pictureviewer.h in frameworks/cinema.framework/source/c4d_libs/ which deliberately has been hidden from the C++ documentation. It contains an interface for the picture viewer which provides more control, including displaying a bitmap with a user chosen name, PictureViewer::ShowImage.

So, you will not find this file in our online- or offline documentation, and instead must read the header file yourself. I frankly have no clue why that file has been hidden in the first place. Long story short, tread with care here, lib_pictureviewer.h is not officially supported. But I do not see what here should be going wrong for you as this interface just wraps an internal interface which is used all the time by us. And I also know of quite a few third parties using this (semi) public interface.

PS: I gave the ShowBitmap task a little nudge by adding this topic as a ressource, but it is still low priority, so it might take a while before we get to it.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hi @ferdinand,

I seem to have something working with the lib_pictureviewer.h library. Thanks for this. Maybe in future the standard ShowBitmap() could have a default empty string argument with it. Just a thought.

Thanks again,

WP.

@ferdinand, By the way, just a small forum issue I'm seeing, I noticed my 'Mark as solved' doesn't look right in the menu. Don't know if it's just me or if the css might need some attention?

1ebc9c69-f3f7-47c0-b13f-bb5a184c9f58-image.png

Thanks again.

WP.

Hey @WickedP,

Thank you for pointing it out. There was a problem with how the CSS of the plugin providing the solved feature, the forum CSS, and our styling CSS did mesh in the light skin. I fixed it by putting even more CSS on top of things - because who doesn't love a solid mess in the CSS :P

PS: I am aware that the search feature could also still use some work under the dark skin. It is just not the highest priority when things are ugly but readable.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net