Yes, it's a solution. But it's can not to orbiting the scene or transforming the model.
I think i need to make a desktop application, and make sure the window always on top.
However, this will lead to more work for me.
And thanks to your reply!
Actually, i developed a simple model viewer using PyOpenGL and GLFW(for the window).
And i don't know if i can use CINEMA 4D VIEWPORT(replace the GLFW) to show my own OpenGL things.
So , clearly i need a dockable opengl window. is that possible?
is that posible to attach an OpenGL window to Cinema 4D GUI using python?
if posible , how can i do that?
Wow! you perfectly solved my problem!
I try to get an image from website, And ShowBitmap() in C4D python.
This is my simple code:
from c4d import gui, bitmaps
img = "https://images.pexels.com/photos/10204089/pexels-photo-10204089.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
bmp = bitmaps.BaseBitmap()
a,b = bmp.InitWith(img)
if a == c4d.IMAGERESULT_OK:
# Execute main()
Sometimes it can ShowBitmap() correctly like this:
Sometimes it's can show bitmap but the image is not loaded correctly:
And sometimes it's faild! And the InitWith() result is -6
Is there have some right way to show an image from the URL?
Hi @ferdinand , Thank you very much for your detailed reply. I think it is very helpful to me.
I try to register a CommandDataPlugin with PLUGINFLAG_COMMAND_HOTKE flags,
and i assign a shortcut key like this ; .
But when i press the shortcut key anything doesn't happen.
I don't know is i did something is wrong?
How can i do it's work correctly?
And the examle code like this:
def Execute(self, doc):
if __name__ == '__main__':
I see the "hotkey" plugin in cinema 4d like "Move Parent", and the shortcut is "7", and i need to press and hold down the shortcut key to execute the plugin.
(You can see the Type is Hotkey)
So how do i register the "hotkey" plugin in python?
Actually i find some hotkey stuf like Command plugin flag in SDK;
But i am not sure it's what i want, if it's what i want, how do i use it ? and how do i bind the shortcut key for the plugin ?
@ferdinand Thanks to your replay, Some of the features I wanted seemed to be addressed in the R25!
Let's rock and roll for R25!