Jump to content

VEXpression Problem


Recommended Posts

Hi everyone,

 

I have a big issue about exporting data from vexpression context.

 

I used vexpression to set the velblend parameter in the "popadvectbyvolume" node. So I can advect particles differently along time.

But I'm not sure what result number I have, so I want to export this value to check it out in the geometrie spreadsheet.

 

I found this line in Houdini Help: export float @mytest = 0;

 

So here is my code:

 

#use a parameter to set the velblend

velblend = @activate;

 

#use a count to set the velblend differently when I want to
if(@count >= 3) { velblend = 1/((@count/3)*5); }

 

#want to export the final result to debug
export float @velblend;

 

 

My popnetwork works fine (my particles get different vel along time) and I don't have any error.

But when I check the velblend attribut in spreadsheet, it stay to 0.0

 

 

So I tried different syntax like:

 

export float @debug = velblend;

export float @debug = @velblend;

export float @parm_velblend;

 

But each time I had an error : "velblend" is not a valid default for this prototype...

 

 

 

I'm getting crazy right now!! :wacko:

If someone could have an idea, it could be great! :D

 

Thx a lot.

 

Cheers

Link to comment
Share on other sites

you need to initialize export variable to constant value, it can't be another variable

and then later you can assign a varying value to it

export float @velblend = 0;

velblend = @activate;
if(@count >= 3) { velblend = 1/((@count/3)*5); }

@velblend = velblend;

in a cleaner example:

export float @debug = 0;

f@debug = rand(@id);
Edited by anim
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...