THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/03/2011 at 10:15, xxxxxxxx wrote:
To put something inside the link field use the same method as UserData:
def Execute(self, tag, doc, op, bt, priority, flags) :
firstobj = doc.GetFirstObject()
tag[10001] = firstobj
And here's what the other external files need for the link attribute to work:
This is the link data in the res/description/ *.res file:
LINK MY_LINK { ACCEPT{ }; }
This is the link data in the res/description/ *.h file:
MY_LINK = 10001,
This is the link data in the res/strings_us/description/ *.str file
MY_LINK "My Link";
As far as using the description names instead of their ID values goes. I'm having a lot of trouble with them.
You should be able to something like this. Assuming you have a description entry of "rotx" in the .res, .h and .str files:
tag[c4d.rotx] = 0.0
instead of
tag[1001] = 0.0
However...Even though it technically works without errors. I'm getting lots of problems with this method. For example if I do this in the Init function. I cannot override it in the execute function.
However it all works fine if I use the ID values.
I'm probably just not using it the correct way. But it should work something similar to that way.
-ScottA