SteveNi Posted September 9, 2016 Share Posted September 9, 2016 (edited) Hi In my scene I have a null node called "Precise_Clipping "where I edited the parameter interface and added a toggle called "precise_clip" then In the voxel size channel of a vdb node I have written the following: if (ch("../Precise_Clipping/precise_clip") == 1) { return 0.01; } else { return 0.2; } The problem here is that it gives this error: http://prntscr.com/cg15f2 Its not the first time I write expression in channel fields, and to me the syntax looks correct...so whats the error? Thanks Edited September 9, 2016 by SteveNi Quote Link to comment Share on other sites More sharing options...
j00ey Posted September 9, 2016 Share Posted September 9, 2016 (edited) I think you have to enclose the whole lot in curly brackets for a multi line expression in a channel field. You can write it like this { float clip = 0.2; clip = if(ch("../Precise_Clipping/precise_clip"), clip, 0.01); return clip; } Edited September 9, 2016 by j00ey typo in expression 1 Quote Link to comment Share on other sites More sharing options...
SteveNi Posted September 9, 2016 Author Share Posted September 9, 2016 1 minute ago, j00ey said: I think you have to enclose the whole lot in curly brackets for a multi line expression in a channel field. You can write it like this { float clip = 0.2; value = if(ch("../Precise_Clipping/precise_clip"), clip, 0.01); return clip; } Oh Yea I forgot that...dumb me. Thanks a lot for the reminder 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.