Learning Expressions intro lesson 5

   2643   4   1
User Avatar
Member
112 posts
Joined: 2月 2016
Offline
Having a headache with this expression.

This works, padzero((2,($F-1)/$FPS))

this doesn't, padzero((2,($F-1)/$FPS)):padzero((2,$F%$FPS))

If I use the ticks ` which is in the tutorial, the first section won't work either.

Can anyone explain what is going on?
Is H15 now different to H12 and H13 when it comes to expressions?

Thanks :?
User Avatar
Member
2555 posts
Joined: 6月 2008
Online
Are you trying to put a colon symbol between two zero padded values?

If so, the second padzero has a syntax error. Look at your parenthesis. padzero requires two values. Your comma is on the inside of the parenthesis when it should be on the outside. The parenthesis surrounding $F-1 are only needed to insure that the subtraction from $F occurs before division by $FPS. In the second padzero there is only one operation, modulus, so no second set of parenthesis are needed.

Here would be my guess.
`padzero(2,($F-1)/$FPS)`:`padzero(2,$F%$FPS)`
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
112 posts
Joined: 2月 2016
Offline
Hi thanks for the reply.

Yes, I am putting a colon between the padded numbers.
I copied and pasted your version but still not working.
The first section works without the ` either side of the string.
Screenshot Example. attached

Thanks

Attachments:
Your expression.jpg (363.0 KB)
First section without `.jpg (336.2 KB)

User Avatar
Member
702 posts
Joined:
Offline
I think that your issue is that you have a key on the text parmameter

if delete the key and just use the expression it will work

here is a working file

Attachments:
workingExpression.hip (49.7 KB)

User Avatar
Member
112 posts
Joined: 2月 2016
Offline
Cheers
  • Quick Links