Hi Rage,
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?
WP.
Hi Rage,
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?
WP.
Hi gogeta,
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).
WP.
Hi folks,
Might be nice to have a convenience link (icon) to the online docs up in the header area. Somewhere here where the red circle is:
Maybe to the high-level docs starting page? Or one to each of the main programming starting pages (C++, Python, Cineware).
Just a thought.
WP.
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.
WP.
Hi folks,
I'm wanting to get various CTRL+X key presses in my dialog. I can get keys without the ctrl, and I can get the ctrl without keys, but I can't get any ctrl+key presses. In the dialog's Message() function I've tried variations like:
case BFM_INPUT:
{
BaseContainer KB;
GetInputState(BFM_INPUT_KEYBOARD,BFM_INPUT_CHANNEL,KB);
LONG qualifier = KB.GetLong(BFM_INPUT_QUALIFIER,NULL);
String input = msg.GetString(BFM_INPUT_ASC,"");
}
but none work. They key is always blank if control is pressed.
I've seen a couple of older posts that gave some suggestions, but nothing seemed to work.
Is there a particular way we have to do this? Or does it just not work for our own dialogs?
WP.
Thanks @ferdinand,
Agree. I've avoided using OS-specific calls up until now. But for this one I've had to make an exception. Not an ideal solution, but it seems to work:
To get around the lost window focus issue, I'm using the first dialog's Timer() to poll and check if any dialog in the menu has window focus. If none do, e.g., a user has clicked away, the system self-destructs. If a menu selection is made, it sends a Message() back to the calling object with details, and then self-destructs.
It's all a bit of a hack. But it works.
WP.
Update: I'll mark this thread as solved. If I have any further questions I'll pop back in.
Thanks @ferdinand, this seems to have solved my problem.
Apologies if it came across a bit abrupt, I was trying to get to the crux of it. Just seemed strange that there wasn't a way to rationally relate the zoom to any meaningful size for an orthographic camera. In other software I recall being able to set the camera as a width and height, not some factor of zoom. Made much more sense, kind of like setting it as a size. Also curious to know why they choose 1024 to underpin the zoom and not a rounded number, like 1000 (or something that can work off C4D's base unit).
But all good here - it's working now. Solved.
WP.
Hi Folks,
How does the camera zoom work with Pparallel? It feels really unituitive without knowing what the number means. How can I set the 'zoom' so that it covers a particular unit area of the viewport?
As an example, if I have an object - say a plane that's width and height are the same in units as HD resolution (so width 1920 and height 1080), how can I set the 'zoom' so that the parallel camera covers the precise width (or height) of the plane (assume everything lines up)?
This viewport capture might help to visualise:
I want to know what 'zoom' means in terms of viewport unit size, so that I can set the 'zoom' to a size that reflects an object unit size in the scene.
WP.
Thanks Ferdinand, I thought it was something like that, but wasn't completely sure. Seems I should keep a count perhaps and just override any previously existing one with a default container again.
Cheers,
WP.
Hi Folks,
I've stumped myself. I have a dynamic GetDDescription in an object plugin, which adds some customgui descriptions (customguidata is a BaseContainer, my own registered one). The display works fine and the data is saved/loaded etc with the object.
I want to remove one of the containers, but bc->RemoveData(id) returns false (as does bc->RemoveIndex(index)). Are we not able to remove data from the underlying container?
Sudo code:
BaseNode *node = Get();
BaseObject *op........
BaseContainer *bc = op->GetDataInstance();
if(bc->GetContainerInstance(id) != nullptr) <-- passes
{
bc->RemoveData(id); <-- returns false
/* Check container again */
if(bc->GetContainerInstance(id) != nullptr) <-- fails
}
// The customgui is removed from the AM.
// Add new item, container reappears along with new one.
Apologies for the lack of code - but it's pretty much as is above. Can someone open my eyes on this?
Cheers,
WP.
Hi @merkvilson
This may not help, I'm not a python coder, but for the padding, it might be worth trying to set the BITMAPBUTTON_NOBORDERDRAW flag. I can't tell from the screen shot if that's happening here, but it might be the button border? See if that helps.
I'll let others help you with your other queries.
WP.
Hi @m_adam,
No probs. I can work without it.
I'm more after the font file, I only mentioned the directory thinking it might help.
I'm using a library to help with draw functions for a user interface, and I'd like to set the font to the same as Cinema's so there's consistency in the look. The library allows you to set a font via a path to the font file.
Perhaps if the fonts data container could include a Filename/String to the file itself in future? Just a thought.
Cheers,
WP.
Hi Folks,
Is there a way to get the font file/directory that Cinema4D uses? I can't see how to in the SDK.
Would like it because I'm leveraging a library that takes a font file as an input, and I'd like to pass it the same as Cinema's in an effort to try and keep the look of the draws as close to C4D as possible, for consistency.
WP.
Is there any way to get around the apparent hard-coded maximum frame rate limit?
WP.
Hi folks,
I have a document in memory and I need to evaluate data to a sub-frame time value. The issue I'm getting is that when I do this:
BaseTime time = doc->GetTime();
// adjust time numerator here
doc->SetTime(time);
//SetDocumentTime(doc,time);
doc->ExecutePasses(...);
the document time is floored to the nearest frame, and does not take on the sub-frame value. I can see this, because straight after I execute the document and pull the time again, it's reverted back to the original floored frame. I can however, change to the next full frame.
I've tried other methods like SetDocumentTime() to no avail.
Is there a trick I'm missing to this?
WP.
Thanks @ferdinand,
Conversion is in memory only. I may output at a later stage, though I do save using BaseBitmap->Save() for those times.
This episode turned out to be quite more than I bargained for in the end. Had to make some serious project changes. But I do believe I've now solved my image problems (albeit, for now!).
WP.