How to return a string from a Python expression

   987   1   1
User Avatar
Member
134 posts
Joined: Sept. 2021
Offline
In an integer field, I can write a Python expression like
bob = 312
return bob



which evaluates to 312.

However, if I do:
my_test = "cool_string"
return my_test

It doesn't evaluate to `cool_string`

Any thoughts? What am I doing wrong?

Thanks!
Anson
Edited by AnsonSavage - Aug. 24, 2023 17:37:41

Attachments:
error.png (287.5 KB)

User Avatar
Member
9384 posts
Joined: July 2007
Offline
one of the ways is in your Alt+E edit window, to set String Value dropdown to Python Expression and then apply
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links