you could try CallCommand() with id 1019951 - calling this should delete all selected objects without deleting their children. Might also do what you're after?
I'm not sure on ScaleBicubic(), but I noticed in your commented line:
//bitmap->ScaleIt(scaledBitmap, defaultBrightness, true, false);
That last 'false' flag, try changing that to true. If you're scaling in a non-proportional way that should be true (might fix your non 'squeeze' issue).
Do the GeUserArea sections display anything? Or are they just spacers?
A mock-up picture might help others to visualise.
How about a 'global' drag and drop function? So, make separate iCustomGui/GeUserAreas for each section. Then just point each of these to the same function held in the parent dialog? That way you only have to write the main drag/catch routine once, in the parent dialog.
Just a thought.
Thanks @Filip and @kbar, I've setup a simple message system that I'm experimenting with.
Just a question (for anyone) regarding the start up procedures for Cinema, will my plugin receive PluginMessage() messages if my main plugin is not registered yet? Asking to make sure I can receive a message from another plugin that Cinema might try to register before mine.
Thanks both of you. I'm still thinking this one through.
@C4DS I hadn't thought of SpecialEventAdd, thanks for the suggestion. This had me looking into, and finding, GePluginMessage(). I'm wondering if I could call this in PluginStart(). This does seem to work. I could maybe avoid Cinema's Register system with this.
@PluginStudent can I register a custom type using GeRegistryAdd()? Or does it have to be one of the listed types? E.g. can I register a type under my main plugin id?
just doing some brainstorming and hoping someone may be able to suggest/contribute some ideas.
I have a dialog plugin with a graphical interface. I'd like to be able to register plugins for my plugin, so that I can build them separately if needed, or perhaps so others in the future may be able to.
Is it possible to register a custom plugin type? Or, could I piggyback off one of the Register*() functions and grab the registration in my plugin somewhere?
Thanks @C4DS, that's what I'm after!
I want to get the editor viewport colours, so I can colour things using the same as the viewport. I'm guessing this is in the preferences.
E.g. how do I get the viewport background colour? How about the grid and world axis colours? Selected point colours... etc.
Just some further thought here. I tried to return a pointer via a function so that I wasn't having to create a copy everywhere and everytime I needed to access it. Upon reflecting yesterday evening, I realised that returning it like this, the container might be going out of scope at the function return, and is therefore destroyed. I.e.
// let's say parent is class level container somewhere
BaseContainer *bc = Get_ContainerP();
if(bc == nullptr)
// bc passes nullptr check because the address was valid
if(bc->GetBool(MY_CHILD_BOOL,FALSE) == TRUE)
// crashes here with an access violation because the container was destroyed when the scope stopped after the Get_ContainerP() return.
I'm wondering if GetContainer() makes a copy itself. I was trying to use a pointer so that I wasn't creating copies of the nested container everywhere and everytime I wanted to access it (which will be frequently). But it looks I have to. Would this be right?
is it safe to access a BaseContainer held inside another BaseContainer by pointer? E.g.:
// then somewhere else
BaseContainer *bc = &parent.GetContainer(MY_CHILD_ID);
// read from bc...
variable value = bc->etc...
Are there any issues with doing this?
can anyone tell me if it's possible to draw a texture that already exists on the graphics card, without having to transfer it to the CPU-side, when in a GeUserArea()?
Currently, I pull the texture, then transfer the data to a BaseBitmap, then do this in DrawMsg():
void MyUserArea::DrawMsg(LONG x1,LONG y1,LONG x2,LONG y2,const BaseContainer &msg)
but it's very slow once the texture gets above HD desktop size. Is there a hack I can use to just draw what I've already got in GPU memory? Is there something like a BaseDraw object I can tap into here from inside the DrawMsg() method?
sounds like it won't be available for me (I'm pre-s22). I can live with the GeUserArea, but good to know it's available for more recent releases.
Two other things. Firstly, congrats on becoming a Maxon support member!
Secondly, I can't seem to mark any topics of mine as solved. Has this changed?
is there a flag to prevent the change in background colour when you hover over a BitmapButtonCustomGui with a transparent image on it? I want just a static image that does nothing when you mouse over. I'm currently using a GeUserArea, which works fine, but seems a little cumbersome to make just for a static image.
Or is the user area the only way?