Question about extended scripting (Where do I start?)

   3489   3   0
User Avatar
Member
8 posts
Joined: March 2009
Offline
Hi everyone,

I started messing around with Houdini Apprentice a couple of days, and I'm loving it. But I'm having some trouble grasping the whole scripting part.

I have looked at some tutorials, but have yet to find any basic information about how to start experimenting with scripting (I'm guessing I'm talking about Hscript) in Houdini, I've understood and tried some very simple tasks in various parameters (like matching the y position to the $T variable and using stamps in some different ways.) But well, the main question to get me started is:

When I'm putting some code in a parameter of an object (like the rotate Y of a box) there is only a single line of input, how do I .. euhmm.. “link” a larger chunk of code to a single property, or range of properties?

Example:
I have a box, if $T is less than 30 then the box should be placed at 0 2 1 (x y z) and if it is more than 30 it should be placed at 3 1 2.

First of all, writing an if/else statement on a single line can be confusing, and I'm guessing you're not supposed to (if it even works at all), secondly, instead of running this code on all the translate parameters (x, y and z) individually, can I run a chunk of code that calls each parameter separately but from the same line.

I hope I'm making sense to you here.
User Avatar
Member
8 posts
Joined: March 2009
Offline
I just realised I had made a double-post here, sorry.
Edited by - March 4, 2009 09:55:44
User Avatar
Member
606 posts
Joined: May 2007
Offline
RMB on the parameter, and choose Expressions -> Edit Expression.
Hotkey is alt-e

eetu.
User Avatar
Member
8 posts
Joined: March 2009
Offline
eetu
RMB on the parameter, and choose Expressions -> Edit Expression.
Hotkey is alt-e

eetu.

Thanks, I just found out and thought I'd check back here to solve my own, pretty stupid, question. haha
  • Quick Links