"Disable When" not working

   2762   11   1
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
Hi, I am following not so old tutorial and I've a condition to use in Disable When:

{condition == 0}

it is a toggle, but it does not work, has in Houdini 17 changed any syntax?
User Avatar
Member
37 posts
Joined: March 2014
Offline
Try adding spaces after the first and before last brace.

{ condition == 0 }

I think it also says so in the documentation :-)
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
gotchee
Try adding spaces after the first and before last brace.

{ condition == 0 }

I think it also says so in the documentation :-)

Thx gotchee for reply.

Yes, there should be spaces after the first and before the last brace. But the actual problem is not related with this. Because the same expression works with “Hide When” field with no problem (even without that space). I think this functionality is no more active (deprecated). I follow the tutorial step by step and the guy does it in previous version (I think it is Houdini 14 or 15).
User Avatar
Member
106 posts
Joined: June 2011
Offline
It's working in Houdini 16.5. Which version of Houdini are you using ?

Along with space after the first brace and before the last brace as gotchee suggested, please make sure that there's space in your condition.

{ condition == 0}

Please note that { condition== 0 } won't work.
Hope it helps

Cheers
-J
User Avatar
Member
37 posts
Joined: March 2014
Offline
Hey there again,

I just tried adding the functionality of disabling and hiding a parameter in H17.

Works here…see attached hip-file.

Cheers

Attachments:
DisableWhen_interface_v001.hip (109.3 KB)

User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
Thank you jjayakumar and gotchee for replies. Yes, with your file it is ok gotchee, but with mine not so much).

Interesting thing is that it works with Hide When but not with Disable When. I attach the file, please see it.

It is in MAT context > MyMat node. I have there a Checkerboard toggle, when on, should disable the Main Color parameter and enable Color A, Color B and Frequency parameters.

Attachments:
06_Shaders.hipnc (1.1 MB)

User Avatar
Member
37 posts
Joined: March 2014
Offline
Hey Emil,

I can confirm the problem in your scene as well. I then tried rebuilding it from scratch in h17 and h16.5 and it also didn't work.
I also rebuild the functionality in a VOP-SOP and to my surprise it works there as expected. So it seems to be a bug relatet to VOP-Parameters in the /mat conext.
You should contact support or log an RFE for that, I think.

Best, gotchee
User Avatar
Member
37 posts
Joined: March 2014
Offline
What works however, is when you create your Color and Toggle Parameters via Edit Parameter Interface and then use Expressions to drive the values inside the VOPnet. Of course this is not as convenient
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
gotchee
Hey Emil,

I can confirm the problem in your scene as well. I then tried rebuilding it from scratch in h17 and h16.5 and it also didn't work.
I also rebuild the functionality in a VOP-SOP and to my surprise it works there as expected. So it seems to be a bug relatet to VOP-Parameters in the /mat conext.
You should contact support or log an RFE for that, I think.

Best, gotchee


Thank you gotchee,

I sent SideFX a bug report and hope the soon resolution)
User Avatar
Member
48 posts
Joined: Sept. 2016
Offline
I got answer from SideFX concerning this problem and I want to share it with all of you. They said “it will not work in material networks, as parameters in vops are live connections to the code”.

So I copied all what I had inside MAT > Material Builder to SHOP > vopmaterial, and it works now just as expected. But I think it would be convenient if MATs work at least the same way as SHOPs. It breaks the flow of workflow so for such a reason to use SHOPs.
User Avatar
Member
37 posts
Joined: March 2014
Offline
What a pitty…but thanks for following up :-)
User Avatar
Member
106 posts
Joined: June 2011
Offline
ah! that's a bummer. thanks for sharing this info
  • Quick Links