Jump to: Board index » General » Fusion

how to get integer?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

ashkan.b

  • Posts: 3
  • Joined: Thu Oct 18, 2018 2:24 pm
  • Real Name: Ashkan Bakhtiar

how to get integer?

PostThu Oct 18, 2018 2:55 pm

hello.
i need to make an expression i used costume tools make slider with a value but it has float points. but i only need the integer number like pushing slider and i get 1 ,2 ,3 , ... .

for example if the input number is 1.34 or 1.98 i need it to be round to 1 or 3.75 returns 3 back and removes the float points.

i used int (x) from nuke but didn't work.
plz help, thanks.
Offline

David_Cox

  • Posts: 108
  • Joined: Thu Aug 03, 2017 11:20 pm
  • Location: London UK

Re: how to get integer?

PostThu Oct 18, 2018 3:43 pm

If you are using the custom tool for your slider, you can right click the tool and select Edit Controls. Then find the slider you want to change from the ID drop down and click the "Integer" option.

Or in expressions you can use math.floor(number)
DC
Showreels: vimeo.com/davidcoxtv
Website: www.davidcox.tv
Offline

ashkan.b

  • Posts: 3
  • Joined: Thu Oct 18, 2018 2:24 pm
  • Real Name: Ashkan Bakhtiar

Re: how to get integer?

PostThu Oct 18, 2018 5:47 pm

thanks! floor did the thing i wanted!!! thanks a lot!! :D

Return to Fusion

Who is online

Users browsing this forum: No registered users and 29 guests