using Python in attribute create with string type

   3348   3   1
User Avatar
Member
230 posts
Joined: 10月 2009
オフライン
I have wrote a code in python where I have a list of sentences and assign one sentence to each random point in an attribute. But it seems that in attribcreateSOP you cant use python when you are using string type, you cant use python even inside `` but you can use hscript. Am I missing something? Even when you RMB over the string parameter the “Change Language to…” is disabled.

P.S. is it possible to create a list in hscript?
User Avatar
Member
230 posts
Joined: 10月 2009
オフライン
nothing?
User Avatar
Member
1926 posts
Joined: 11月 2006
オフライン
Python expressions need to be done using a keyframe and contain a return statement. They aren't compatible with the ``

For example, to create something like this you would do something like Alt + LMB on the parm to create a dummy key/expression, LMB to toggle the expression to the raw text mode (label is dark, “” appears in the parameter) and then edit it to your hearts content.

See attached.

Attachments:
python_str_attrib_create.hip (54.3 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
230 posts
Joined: 10月 2009
オフライン
Thanks graham, I was hoping for your reply.
  • Quick Links