How to set default value for transform parameter?

   2440   4   0
User Avatar
Member
683 posts
Joined: 11月 2013
Offline
Hi,

I noticed that the Light Object has a non-trivial default transform parameter value.
How to make it in my Object HDA?

Thanks!
Edited by jerry7 - 2023年5月20日 19:11:26

Attachments:
lock.png (19.0 KB)

User Avatar
Member
9687 posts
Joined: 7月 2007
Offline
similarly to storing the literal default value, just change from Literal to Hscript in this case, or optionally Python if you want it to default to Python expression

Attachments:
hscript_default_value.gif (32.8 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
683 posts
Joined: 11月 2013
Offline
I saw the Light Object HDA's transform parameters are greyed out and can't be edited.
How does it set the expression?

Attachments:
light.png (83.2 KB)

User Avatar
Member
23 posts
Joined: 11月 2022
Online
jerry7
I saw the Light Object HDA's transform parameters are greyed out and can't be edited.
How does it set the expression?

Did you end up figuring this out? I'm running into the same issue.
User Avatar
Member
23 posts
Joined: 11月 2022
Online
Ended up just using the OnCreate script to inject the default values every time the node is created. No idea why the locked down tx ty tz and rx ry rz so that you can't just create defaults like any other parameter.
  • Quick Links