initial script

   6164   4   1
User Avatar
Member
18 posts
Joined: Nov. 2012
Offline
Hi, i'm new in houdini, and currently viewing the Ari Danesh's tutorials of Light Shade and render, i saw that he uses a script to create the directories of every new project.
My question is, if i can download, or is this script available in any place?
Thanks in advance.
Esteban.
User Avatar
Member
3 posts
Joined: Dec. 2012
Offline
I found something like it on the Ari Danesh website from 2011:
http://aridaneshvfx.com/files/archive-oct-2011.html [aridaneshvfx.com]

I created this powershell script based on it and the slide image from the first lesson. The text can be copied to a ps1 file to run it(HoudiniShotDirectory.ps1). The easiest way seems to be to right click and choose “run with powershell”
# HoudiniShotDirectory

# original applescript by Ari Danesh
# adapted for Windows Powershell
# http://aridaneshvfx.com/files/archive-oct-2011.html [aridaneshvfx.com]
#
# powershell version by Clinton Reese
#
# the following command can be used to enable script execution in powershell
# first run powershell as an administrator
#
# Set-ExecutionPolicy Unrestricted
#
# that is the easy unsafe way to do it
# do an internet search for more secure methods of running powershell scripts
#
$folderNames = @(“geo”, “img”, “hdri”, “render”, “ref”, “notes”, “scripts”, “otls”, “lsystems”, “part”, “dyn”)

$projectName = Read-Host “What is the Project Name?”

if($projectName -eq “”) { return }

$objShell = new-object -com shell.application

# BrowseForFolder information links
# http://msdn.microsoft.com/en-us/library/windows/desktop/bb774065%28v=vs.85%29.aspx [msdn.microsoft.com]
# http://msdn.microsoft.com/en-us/library/windows/desktop/bb773205%28v=vs.85%29.aspx [msdn.microsoft.com]
# http://msdn.microsoft.com/en-us/library/windows/desktop/bb774096%28v=vs.85%29.aspx [msdn.microsoft.com]
$Hwnd = 0
$iOptions = 0
$vRootFolder = 0

$projFolder = $objShell.BrowseForFolder($Hwnd, “Where To Save Project”, $iOptions, $vRootFolder)

if(!$projFolder) { return }

$fullpath = New-Item -path $projFolder.self.path -name $projectName -type directory

foreach ($i in $folderNames)
{
New-Item -path $fullpath -name $i -type directory
}

# script sub-folders

$scriptFolderNames = @(“chop”, “cop2”, “obj”, “out”, “sop”)
$scriptpath = $fullpath.ToString() + “/scripts”

foreach ($i in $scriptFolderNames)
{
New-Item -path $scriptpath -name $i -type directory
}
Write-Host “Project folders complete.”
User Avatar
Member
18 posts
Joined: Nov. 2012
Offline
Thank you very much!
User Avatar
Member
1 posts
Joined: Oct. 2013
Offline
Many thanks clintonman!!!!!!
User Avatar
Member
19 posts
Joined: July 2013
Offline
thank you very much for posting this
  • Quick Links