TonyL Posted March 25, 2010 Share Posted March 25, 2010 I'm trying to put some Python code into the tx parameter box of a point SOP, but I'm getting a syntax error, even when the code is super-simple (x = 1, return x). When I changed the expression language for the Point SOP from Hscript to Python all the parameter boxes turned red. Does that maybe mean I can't use Python in a Point SOP? All of the boxes in the Point SOP already had text in them, I wonder if that means anything, like as soon as you enter text in a box it gets branded with that particular expression language and won't let you use the other even if you change it. I just tried entering some Python code in another SOP, and when I changed the language from Python to Hscript that box with the code turned red too. Any ideas? Quote Link to comment Share on other sites More sharing options...
edward Posted March 25, 2010 Share Posted March 25, 2010 I think the red just means that there are hscript expressions in there that are now different from the now default python. Quote Link to comment Share on other sites More sharing options...
TonyL Posted March 25, 2010 Author Share Posted March 25, 2010 OK, I figured it out. First, red does indeed mean there's a problem with the parameter box. To get rid of the problem, you have to delete everything from that box, even if the Python code is fine (or Hscript code if you've switched the language for the box from Python to Hscript). The box should now have a black background (and maybe a default 0 inserted), at which point you can now go back in and enter in the code for your new language. That's what worked for me, it seems if you already have code in your parameter box (or text is in there by default like it is for a point SOP) and you switch languages, the box still thinks it's supposed to use the old language until you clear it. Quote Link to comment Share on other sites More sharing options...
TonyL Posted March 25, 2010 Author Share Posted March 25, 2010 Actually, I wasn't clear with that last post. You've got to choose delete channels, then add your code. Quote Link to comment Share on other sites More sharing options...
edward Posted March 26, 2010 Share Posted March 26, 2010 Or, you could have just right-clicked on the that red box and changed your expression language. 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.