[Sidefx-houdini-list] Exporting deep rasters from VEX Layered Surface SHOP

Olex P hoknamahn at gmail.com
Thu Jun 24 06:48:18 EDT 2010


Useful info Rangi! What can I say - it's really bad. Would be cool if VEX
compiler was raising an error every time when function was trying to modify
it's inputs which don't have an export keyword.
Anyhow export keyword still makes sense from the readability point of view
:)

On Thu, Jun 24, 2010 at 11:21 AM, Rangi Sutton <rangi.sutton at gmail.com>wrote:

> On 24 June 2010 19:14, Olex P <hoknamahn at gmail.com> wrote:
>
> > Just a small addition to what the guys where saying - export keyword is
> not
> > tied to the body of a shader nor to deep rasters. It's a general way of
> > exporting the values from any function, similar to C++ references.
> > For instance function that does addition of two numbers could be written
> > as:
> >
> > void add(float a; float b; export float c) { c = a + b }
> >
>
>
> Important to note that the export isn't necessary there, so be careful
> because modifying any function param variables will alter the calling
> variable!! Actually, thats's better worded in the docs:
>
> As in RenderMan Shading Language, parameters to user functions are always
> passed *by reference*, so modifications in a user function affect the
> variable the function was called with.
>
>
> http://www.sidefx.com/docs/houdini10.0/vex/lang
>
> Beers,
> r.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list