Description ID to String
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/10/2008 at 08:57, xxxxxxxx wrote:
Howdy,
Have a look at this thread:
Debug console printingThere toward the end, Mikael Sterner has some debugging routines that print other types to the console. One of the types to print is: DescIDToString()
Maybe that's what you're looking to do?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/10/2008 at 14:58, xxxxxxxx wrote:
Hi!
Thank you. I used the function but it does not return the name of it.
What can I do?
Bye..
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/10/2008 at 15:34, xxxxxxxx wrote:
Howdy,
Oh, you want the "name" of the description, is that what's listed here in the SDK documentation:
To get the name of a description, for example "Landscape Object", you do like this:
String GetTypeName(C4DAtom* op)
{
if (op)
{
AutoAlloc<Description> desc; if (!desc) return String();
if (!op->GetDescription(desc,0)) return String();
const BaseContainer *bc = desc->GetParameterI(DESCID_ROOT,NULL);
if (bc) return bc->GetString(DESC_NAME);
}
return String();
}is that what you were looking to do?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2008 at 13:05, xxxxxxxx wrote:
Hi!
Thank you. Here is a screenshot what I want to get. Drag and drop the element of the AM into the console.
Thank you...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2008 at 14:37, xxxxxxxx wrote:
Howdy,
Hmmmm, that looks like the ID's label from enum in the object's header file. You may have to access the .h, and search for the ID number and then see what string of characters is on the same line. I don't know if the parameter's ID label is stored anywhere in memory when it's loaded. :o(
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2008 at 02:54, xxxxxxxx wrote:
Hm... so you think there is no other way to do it?
Matthias, do you know? Is it the right way?
Thx.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2008 at 06:15, xxxxxxxx wrote:
Howdy,
Well, I noticed that even the command line won't print the label if the description is created in GetDDescription(), for example if a tag has the ability to add target links. The .h file may have an ID label of "TARGETS" but if it's not laid out in the .res, and instead created in GetDDescription(), then the command line only prints the ID number. So maybe it's getting the label from the .res file? if that's the case, I think the .res file is loaded into memory, but I don't know how to access that.
But you've got me curious about it, though, and I'm wondering why you would need to get the label of the ID, anyway?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2008 at 06:27, xxxxxxxx wrote:
Heyho^,
well, I've written a console for my plugin because the normal one does not support a feature I want to use.
I wanted to support exactly the feature from the original console (drag and drop) and I prefered to use this labels instead of the ID's.
It seems I have to use the normal IDs.
Bye bye...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2008 at 06:32, xxxxxxxx wrote:
Howdy,
AH, your own console? That's cool! ;o)
But anyway, when Matthias gets back, he can find out if that is accessible to us 3rd party developers. If Cinema can do it, then there is a way. It's just a matter of whether or not we have access to that way. :o(
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/10/2008 at 00:38, xxxxxxxx wrote:
Here a little example that prints out all the ID names of an object's description. Basically you access it through the DESC_IDENT container element.
>
\> Bool MenuTest::Execute(BaseDocument \*doc) \> { \> StopAllThreads(); \> \> BaseObject \*op = doc->GetActiveObject(); \> if(!op) return TRUE; \> \> AutoAlloc<Description> desc; \> if(!desc) return FALSE; \> \> if(!op->GetDescription(desc, 0)) return FALSE; \> \> void \*bh = NULL; \> bh = desc->BrowseInit(); \> if(!bh) return FALSE; \> \> const BaseContainer \*bc = NULL; \> DescID id, groupid; \> GeData data; \> \> while(desc->GetNext(bh, &bc;, id, groupid)) \> { \> String id; \> \> if(bc) id = bc->GetString(DESC_IDENT); \> \> if(id.Content()) GePrint(id); \> } \> \> desc->BrowseFree(bh); \> \> return TRUE; \> } \>
cheers,
Matthias