Where is Descriptions documented
-
On 25/05/2013 at 10:08, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :---------
I have a RES file for my tag plugin. (A tag type of plugin).
In the res file I decide how the user interfaces is going to look. Is there a place where I can find info on this, so that I do not have to such high and low to find it?Two things I spent much (unneeded) time on:
-
I have a few checkboxes. One would expect those to be called CHECKBOX, because buttons are called BUTTON. And indeed, I find the word CHECKBOX being used in plugins, in res files. But it does not work for me. So I finally found out it has to be called BOOL, for it to work.. guess what..
-
Now, I see in other tags that buttons are nicely aligned and have equal with. But my buttons are of the short kind. How do I make the longer?
All in all - if I could find a document explaining all GUI controls and their names, and possible properties regarding how they appear in C4D, it would be the ultimate time saver..
-Ingvar
-
-
On 25/05/2013 at 11:03, xxxxxxxx wrote:
Do you have the ResEdit plugin?
Playing around with that plugin will help you a lot with the .res files syntax.Other than that. Check the docs. "Description Resource" is a good place to start.
If you can't find it in there you'll have to search through all of the .res files in the Maxon folder for examples on how to write them.-ScottA
-
On 25/05/2013 at 11:06, xxxxxxxx wrote:
In the documentation, Index under "Description resource".
- A checkbox is described by the BOOL description element type.
There are two distinct GUI interfaces in Cinema 4D: Dialog and Description. They do not overlap and there are not always equivalences. You have much less control over the layout of descriptions. Mainly, grouping and columns within a group.
-
On 26/05/2013 at 13:26, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Do you have the ResEdit plugin?
Playing around with that plugin will help you a lot with the .res files syntax.Yes, but I am writing tag plugins. And the ResEdit is a dialog and for example uses CHECKBOX which in tags is called BOOL, so I assume I will run into other surprises too..
-
On 27/05/2013 at 00:32, xxxxxxxx wrote:
In Descriptions, every element type is called like the data type it returns; and if there are different element types for the same data type, they are usually invoked using the CUSTOMGUI property.
BUTTON is the only element that is not named after a data type, since it does not return any data, but just fires a command message.
But as Robert states, that's described in the "Description Resource" chapter of the C++ SDK.
-
On 27/05/2013 at 06:49, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Yes, but I am writing tag plugins. And the ResEdit is a dialog and for example uses CHECKBOX which in tags is called BOOL, so I assume I will run into other surprises too..
Note that ResEdit _only_ creates resources for dialogs. It can't be used for descriptions. And it's a dog anyway.
Best to learn how to write resource files by hand, whether it's for a dialog or a description (since you'll have to write descriptions manually anyway). It soon becomes second nature, but Cinema is very unforgiving of resource errors - the slightest mistake will cause it to throw up a resource error alert when you try to use the plugin.
-
On 27/05/2013 at 07:32, xxxxxxxx wrote:
olight.res is a pretty good way to learn descriptions if you need an example in addition the
description documentation. it does contain examples for most of the common and not so
common typs and flags. at least i used it a lot. for more specific (not so common) types
you will need a file text search program as AgentRansack as many customguis are not
documented at all.while generally c4ds possibilities regarding the control over the gui are great, the process
of creating such guis can be a bit clumsy. a proper syntax highlighting does help to keep
tack on more complex resource files. -
On 27/05/2013 at 13:24, xxxxxxxx wrote:
Thanks, Description Resource is the answer to my initial question. It is not that easy to find thoug, in the SDK I downloaded, Google search is a bit better..
And the olight.res is definitely worth looking into, thanks for the tip.
As you see in the image, buttons are stretched to fill the space. My buttons are not. And I still have not found out how to do it like the constraint tag does it. Stretching buttons that is. I found no flags to set in the SDK.. -
On 27/05/2013 at 13:55, xxxxxxxx wrote:
I think SCALE_H; flag on the button does this.
-
On 27/05/2013 at 14:03, xxxxxxxx wrote:
Laying out things is mostly done with the groups. Not the individual gizmos.
Take a look at the way they used the groups in the .res file to lay out the constraints GUI.
You can find it here: MAXON\YOUR VERSION HERE\resource\modules\ca\res\description caconstraint.resIt's not like the modern design tools you've probably used in VS, QT, JavaFX, etc...
It's a little bit like laying out tables in HTML to position things without having any CSS to help.
I often think of it like the bumper cars ride at the amusement park. You push and bump the gizmos around using a bunch of groups, within groups, within groups.... Until you get all of the gizmos arranged where, and how you want them.-ScottA
-
On 28/05/2013 at 15:51, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I often think of it like the bumper cars ride at the amusement park. You push and bump the gizmos around using a bunch of groups, within groups, within groups.... Until you get all of the gizmos arranged where, and how you want them.
-ScottA
Isn't that the truth? Sometimes I need three levels of groups just to get the layout that I want. Keep it simple, don't bother enumerating and naming them - just consider them style groups. It requires so much time to do but at least it doesn't require a recompile unless you are doing them in GetDDescription(), then it is a downright pita.