jonp Posted March 25, 2009 Share Posted March 25, 2009 I'm a bit lost on how to set the default value of a string parameter in a HDA to be a python command. Typing my script command into the default value just gets it interpreted as a regular string value. Any advice? Quote Link to comment Share on other sites More sharing options...
jonp Posted March 25, 2009 Author Share Posted March 25, 2009 I'm a bit lost on how to set the default value of a string parameter in a HDA to be a python command. Typing my script command into the default value just gets it interpreted as a regular string value. Any advice? I got around it by using `pythonexprs` in the parameter default, which works well enough for me... solved! Quote Link to comment Share on other sites More sharing options...
graham Posted March 25, 2009 Share Posted March 25, 2009 Setting default parameter values/strings to be python isn't currently possible. Your pythonexprs method is one of the alternatives. Another way it could be done is using an OnCreated script that would set that parameters expression type to being Python when the node is instantiated. This way you could just leave the default value as your python script and when the node is created that expression is set to being Python. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.