magneto Posted February 14, 2015 Share Posted February 14, 2015 (edited) Hi, I made a simple shader that uses pcopen VOP, but when rendering I get this error: VEX error - pcopen() requires a constant argument for the 'preload' keyword argument It's not very descriptive but I assume this is a bug in H14? Any idea how to fix it as I don't use the preload argument? I couldn't find any info in the forums. Thanks Edited February 14, 2015 by magneto Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 14, 2015 Share Posted February 14, 2015 There are no bugs in H14. Period. Quote Link to comment Share on other sites More sharing options...
crunch Posted February 14, 2015 Share Posted February 14, 2015 Hi, I made a simple shader that uses pcopen VOP, but when rendering I get this error: VEX error - pcopen() requires a constant argument for the 'preload' keyword argument The pcopen() function in VEX has a variadic argument "preload" which tells the run-time engine to preload the point cloud file. The argument to the "preload" keyword must be a constant value (i.e. not an expression). For example, this is good: int pc = pcopen(geo, "P", pos, radius, 1000, "preload", 1); While this would generate the warning (the argument to "preload" is not a constant value, it's the result of an expression). int pc = pcopen(geo, "P", pos, radius, 1000, "preload", npoints(geo) > 100); Quote Link to comment Share on other sites More sharing options...
magneto Posted February 14, 2015 Author Share Posted February 14, 2015 Thanks guys, but I am using the Point Cloud Open VOP so it shouldn't do this, right? I am not using any expression for the preload. Quote Link to comment Share on other sites More sharing options...
SSFX Posted February 19, 2015 Share Posted February 19, 2015 Hey Magneto, I have a solution for you, it's more like a work around, but I haven't found any better way of having it to work. I basically created a snippet inside of my shop node which is doing the point cloud lookup. Here's a file so you can see how it works. You will need to cache the point cloud before rendering, tell me if there's anything unclear. It should do the job until sidefx fix the bug. Cheers! pcopenSnippet.hip 1 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.