Creat a new HUD element
On 21/02/2016 at 14:12, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
i want to add a HUD Textbox to the editorview.
I found out that i need the lib_viewport.h and the ViewportHUD class to do this, but there is zero Documentation how to use it.
A quick example how to add a HUD element would be realy great.
On 22/02/2016 at 09:25, xxxxxxxx wrote:
I'm sorry, we currently have neither documentation nor examples for lib_viewport. Actually it is not made to be used by 3rd party developers.
Perhaps you can tell us, what exactly you are trying to achieve? Maybe we can find some other solution or a workaround.
On 22/02/2016 at 11:25, xxxxxxxx wrote:
Ok , i am currently doing my A levels with a focus on math and informatics.In this context i need to make a custom Software project and present it .So its a rather educational Project . I like the C4D sdk and thought that it would be nice to creat and implement a particle system for C4D. So far everything works quite good. But now i need some nice way to show the audience (My class) ,the enormous amount of particles processed by my plugin.Also the current thread count + the thread usage would be very nice.
I could use a Parameter for this and add it manual to the viewport.But since its a programming/math projekt it is not good to do it this way.
First i thought of using a the BaseDraw method DrawTexture with number bitmaps.But this is ugly to write and to understand.
So at the end a HUD element would be the perfect solution to make my persentation good and shiny.
I think X-Particls also does it this way so there is way to do it .
On 22/02/2016 at 12:14, xxxxxxxx wrote:
Originally posted by xxxxxxxx
So at the end a HUD element would be the perfect solution to make my persentation good and shiny.I think X-Particls also does it this way so there is way to do it .
I'm afraid X-Particles does not use the ViewportHUD class. You'll have to go back to basics and write to the viewport yourself to emulate the inbuilt HUD.
On 22/02/2016 at 12:42, xxxxxxxx wrote:
You will need to Draw() into the viewport through the BaseDraw. Here is a tutorial/code from c4d-jack about drawing text into the viewport:
Best of luck with your A levels!
On 22/02/2016 at 12:47, xxxxxxxx wrote:
Thanks for the support.