cvex refresh

   2316   8   0
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
in Houdini 18,
I have made a vex CVEXVOP.
I put down a node in /mat
I append an attribvop SOP, and set it's source to shop, and select my node in the shop path.
It cooks my vex code.

Now, if I go and edit the vex code in my /mat cvex node, how do I get it to recook the attribvop SOP?
Edited by ivan - 2020年6月12日 21:47:49
User Avatar
Member
7762 posts
Joined: 9月 2011
Online
There's no reliable way, other than delete-undo that I know of.
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
so, working in vex is now like working in the HDK, you need to save your hipfile, quit, and restart after every compile?
User Avatar
Member
7762 posts
Joined: 9月 2011
Online
no, only if you use an external shop source. building inside the attribvop will reliably update.
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
but, in order to do that, you cannot use vex code, only wire together vop nodes.
Therefore, to use vex code, is now like working in the HDK, you need to save your hipfile, quit, and restart after every compile, correct?
I guess I could use an inline vex vop, kinda awkward….
User Avatar
Member
7762 posts
Joined: 9月 2011
Online
Are you using a vfl file, or compiling it with vcc? You could try editing the vop source in the code section of a vex type hda. I think the problem with attrib vop not knowing its shader has changed will persist regardless of how the source shader is defined.

The preferred way to define a node with code these days is with a snippet vop, or a wrangle. You won't see any built-in nodes using external shaders for attrib vops. Writing the shader directly as vfl source is all but a deprecated workflow unfortunately.

You could try putting the meat of you code in shader source headers, and invoke them with function calls in snippets/wrangles. This might still cause issues with the node's not dirtying when the header changes, (it's not like it monitors external files), however making a trivial change to the snippet/wrangles code such as inserting a new line is usually enough to get it to recook.
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
it's not external code. in H18.0, these are my steps:

1. click file->new asset…
2. set definition to vex, and choose network type->CVEX VOP
3. set the name and path and click accept
4. edit vex code an paramaters in the type properties window that opens, and apply or accept.
5. go to the /mat context and drop a newly created node
6. go to the SOP context, put down an attributevop SOP
7. set it to vex source->shop andselect the /mat node you put down, and let the SOP cook.

now, if you edit type properties on your /mat shop node, there is no method to get the SOP to cook your edited code.

Maybe if there was a “force update” button on the attributevop SOP when it's source is set to shop?
User Avatar
Member
7762 posts
Joined: 9月 2011
Online
ivan
it's not external code. in H18.0, these are my steps:

1. click file->new asset…
2. set definition to vex, and choose network type->CVEX VOP
3. set the name and path and click accept
4. edit vex code an paramaters in the type properties window that opens, and apply or accept.
5. go to the /mat context and drop a newly created node
6. go to the SOP context, put down an attributevop SOP
7. set it to vex source->shop andselect the /mat node you put down, and let the SOP cook.

now, if you edit type properties on your /mat shop node, there is no method to get the SOP to cook your edited code.

Maybe if there was a “force update” button on the attributevop SOP when it's source is set to shop?

I think it's a bug that it doesn't cook automatically. My work around for that bug and other cooking ones, until they are fixed is to delete the node and then undo the delete. Feel free to report that cooking issue as a bug.
User Avatar
Member
83 posts
Joined: 7月 2005
Offline
cool. I'll set up a sample scene file and send it in
  • Quick Links