Jump to content

Houdini project directory setup


Stremik

Recommended Posts

While I don't work in production, (or anywhere for that matter <_<), I setup my projects based on the $JOB variable. By using the $JOB variable I save all my textures, hipnc's, etc relative to it. So instead of using P:/project folder/funproject/textures/fun.rat, I can just use $JOB/textures/fun.rat. That way if I move my project it still finds all the assets. As for starting a session I don't start Houdini directly, I start it through a Perl/Tk script called HJob. :ph34r:

hjob.jpg

I tried to mimic the feel of Maya's Project Manger. The top part is the history of my recent projects. I can either select an older project or create a new one. When I create a new one, the perl script automatically generates the project directory and a bunch of directories inside that one. A generic project layout that I use is.

$JOB/ <- Project Root

$JOB/houdini <- Houdini configuration, vex shaders, scripts, optypes, just like in $HFS/houdini

$JOB/tmp <- tmp stuff

$JOB/pics <- render outputs

$JOB/geo <- .bgeo files

$JOB/hip <- all my hipnc files

$JOB/map <- materials/textures

$JOB/scripts <- shell scripts that are specific to the projects

$JOB/chan <- chan data

Besides the default shaders/scripts that come with Houdini I keep everything (possible) inside $JOB, that way when I'm done with the project or I need to back up I just archive the entire directory and know that I can extract anywhere and not have a problem. In order to keep everything encapsulated, part of my script moves some of my home brewed vex files, desktops, scripts to the corresponding $JOB/houdini directories. Even though some of the files are duplicates between projects it keeps me from having to hunt for things later.

Once my directories are setup I start cranking out the variables.

(BTW, I'm using Apprentice on Windows 2000, with cgywin replacing as much as it can :P)

as an example my project folder is P:/Projects/Stikfas

$JOB = P:/Projects/Stikfas

$HOUDINI_PATH = ".;$JOB;$JOB/houdini;&"

I setup all the same variables that get set when you run Command Line Tools. Plus a bunch of other ones like EDITOR, SHELL, etc.

I can run HJob in a couple of modes. One mode is to read from the .job_hist file the last project opened and lanch Houdini. Another mode brings up the above GUI, and the third mode sets up all the variables and stuff but instead of launching Houdini it just starts a bash shell. So that way I can have different shells open that have env. variables setup from different projects.

jim.

Ps. If anyone wants Hjob let me know. I can clean it up a tad and post it somewhere for everyone.

Link to comment
Share on other sites

Word. B)

I'll clean it up tomorrow morning, make a readme and add some comments to the code.

It runs fine on Window 2000, with ActiveState's ActivePerl 5.6.? (Perl for Win32), using the Tk module and another free module that is used as a directory browser.

I'll test it on a Linux box too. Because if it runs on windows its gotta run on Linux...maybe... :unsure:

jim.

Link to comment
Share on other sites

Funny!

The reason I wanted to to learn how people set their project directory is, that, I'm learning Tcl/Tk and I wanted to try and create exactly the same type of thing. A "Project directory" builder of some sort.

It actually can be very usefull for a newcomers because there is so much confusion with Houdini variables when people are new to Houdini.

Link to comment
Share on other sites

I'll have it all cleaned up shortly. I got distracted by .gif encoding. :P

Once its done I'll put it on my webhost. That way I can keep updating it with bug fixes and improvements. Once all the kinks have been worked out I'll give it to Marc to put on Odforce.

jim.

Link to comment
Share on other sites

Word.

Ok, I added some stuff to my little Job Manger which is why it took me longer than I thought. And I forgot how much I hate writing help docs :P

Anyway you can snag it at www.stickylight.com/Hjob/index.htm

Feel free to try it out, make changes, bug me to improve/fix it. I'll get right back to you unless I'm playing Command & Conquer: Generals :D .

jim.

Link to comment
Share on other sites

well this is pretty cool :)

thanks Jim...

didn't have too many problems...just some fiddling 'cause I'm a dumb-ass :)

it's all good now though, this will come in handy, and yeah - the perl script isn't super complicated so even I can read through it and make changes if I need to...

re the help files:

I don't know what "Getopt::Std" is but I guess I don't need it...

I'm running ActiveState perl 5.8.0 build 805

and cygwin

needed DirSelect though...

Link to comment
Share on other sites

As for DirSelect I don't think anyone will have that one. I have it on my site, I hope the author doesn't mind. You can also get it from CPAN. DirSelect's homepage is http://www.kristi.ca/programming/dirselect.html

Getopts::Std

Actually I think this is a standard module in Perl.

Anyway Getopts provides a handy function called getopts()

Which basically gets the command line options that are used when the script is run. It stores each of the options in a hash. So to test if a command line option like -g is used you would do something like,

exists($OPT{"g"})

Where %OPT is my hash.

Since you have ActiveState, from the root of your installed Perl directory you can go to ./html/lib/Getopt/Std.hml

jim.

Link to comment
Share on other sites

cool...just getting into perl so I have lots of docs to read :)

just a minor question about the GUI mode...

is there a way to change the color of the text that is used to list the projects in the Recent Projects listing?..I'm using a dark windows color scheme and white text, so I don't see anything in the listing unless I select it...not a big deal but it's something I'd like to change if I can...

thanks again for the great script

Link to comment
Share on other sites

You people now a days with your ultra super fancy desktops... back when I was a kid I had to use a terminal, barefoot in the snow. :P

To change the colors is really easy. Just change the following line from this

$historyList = $main-&gt;Listbox(	-width=&gt; 400, -height=&gt; 135, -bg=&gt;"white")

to this

$historyList = $main-&gt;Listbox(	-width=&gt; 400, -height=&gt; 135, -bg=&gt;"black", -fg=&gt;"white")

In fact all widgets have the standard options of -fg and -bg (-foreground and -background respectively) So for any widget you can change the color by simply changing or adding the option to the method that creates widget.

So if you wanted to turn the main window's background green you would change the following.

$main = MainWindow-&gt;new(-width =&gt; 440,-height =&gt; 450,-title=&gt;"Houdini Job Manager", -bg=&gt;"green");

Of if you wanted to make the second browse button's text blue you would change this.

$browseBtnF = $main-&gt;Button(-fg=&gt;"blue",-text =&gt; "Browse",

I hope that helps.

jim.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...