XaiJu
entagma
entagma

patreon


VEX101 - If-Statements

The last basic control structure we'll be discussing is ubiquitous when writing code: it is the if-statement.

In this tutorial we'll use it to improve our simple point connector setup to take into account a minimum point distance and to only connect points in a rectangular fashion.

VEX101 - If-Statements

Comments

Finally took the dive into this series. SO good and rewarding, thank you.

Philipp Welsing

Hi Vismo, foreach looping over points in VEX sounds like a slow'ish solution. In essence the pointwrangle does the same thing by default (iterating over individual points). So if you'd like to reapply what a point wrangle does to a geo over and over again, it'd be more straightforward to use the for-loop with feedback: <a href="https://www.dropbox.com/s/a1xcgavrl0qndq7/for_loop_feedback_01.hip?dl=1" rel="nofollow noopener" target="_blank">https://www.dropbox.com/s/a1xcgavrl0qndq7/for_loop_feedback_01.hip?dl=1</a> If there's any chance you can build your setup to use the point wrangle directly instead of the foreach loop - I highly recommend doing it. It's gonna speed up your setup by an order of amgnitude. Cheers, Mo

Entagma

Fantastic, I have a small question: When you used the delete vex code, some times I have a complex setup with a foreach looping over points and deleting them using nearpoint for example, which depends on an input geo, and my problem is when it calls the geo it uses the original one with all the points not the result of my foreach with deleted points. So is there a way to make nearpoints or any function that depends on an input geo to just grab it the first time and then iterate on it.

Acroyear

It would be really nice if you could name scene files as the lessons are named. Other than that, great work again!

Doca Mladenovic

Here they are! thanks Mo.

Florian

They are hidden away here in Houdini's docs: <a href="http://www.sidefx.com/docs/houdini/vex/lang.html" rel="nofollow noopener" target="_blank">http://www.sidefx.com/docs/houdini/vex/lang.html</a>#comparisons Cheers, Mo :)

Entagma

Hi Mo, thanks a lot! One question, where can I find a list of all these commands you're using? (ie : &&, ==, || etc..)

Florian


More Creators