$YMAX not working

   5067   10   1
User Avatar
Member
6 posts
Joined: April 2017
Offline
Hello,

I can't find an answer to this anywhere. I can't use $BBY, $YMAX, $ZMIN, etc. It gives me this error:


Unable to evaluate expression (

SyntaxError: ('invalid syntax', ('', 1, 1, ‘$YMAX’))

(/obj/grid1/transform2/ty)).


Thanks
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Can you attach a HIP file where this is happening?
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
6 posts
Joined: April 2017
Offline
ndickson
Can you attach a HIP file where this is happening?

Yep! I just placed a box in the scene with a transform.
Edited by AustinDrozin - May 28, 2017 21:42:59

Attachments:
YMAXProblem.hipnc (51.1 KB)

User Avatar
Member
6 posts
Joined: April 2017
Offline
I am still having this problem sadly.
User Avatar
Member
1743 posts
Joined: March 2012
Offline
I get a load warning when opening that HIP file, and it doesn't load in an expression for /obj/grid1/transform2/ty . What expression did you have there? It works if I put $YMAX there.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
6 posts
Joined: April 2017
Offline
ndickson
I get a load warning when opening that HIP file, and it doesn't load in an expression for /obj/grid1/transform2/ty . What expression did you have there? It works if I put $YMAX there.

Yeah I just put $YMAX and it gives me that error I listed in the original post.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
$YMAX is HScript not Python. Set it in the top right of the parameter panel
Edited by anon_user_37409885 - May 30, 2017 19:18:03
User Avatar
Member
6 posts
Joined: April 2017
Offline
aRtey
$YMAX is HScript not Python. Set it in the top right of the parameter panel

Is it possible to switch in the middle of working? Because I tried that before but it didn't remove the error. Now I try $YMAX after setting both nodes to HScript before hand, and it works. I set it back to Python and it still works…

I have no idea how this is happening..
User Avatar
Member
326 posts
Joined: Jan. 2013
Offline
No, it does not work properly. In a python, you can not just write $YMAX and get the result of a local variable. For these purposes, there is a function called hou.lvar(“YMAX”) which will return any local variable for this node.
User Avatar
Member
6 posts
Joined: April 2017
Offline
hou.alex.get
No, it does not work properly. In a python, you can not just write $YMAX and get the result of a local variable. For these purposes, there is a function called hou.lvar(“YMAX”) which will return any local variable for this node.

Using both versions with both HScript and Python gave me an error. Not every time though. If I start a new project and do it again it'll work sometimes. It's not consistent.
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Just sounds like a non-standard workflow that we aren't familiar with - perhaps post a screen recording or exact steps so we can see what's happening.
  • Quick Links