vex scripting ..

   3024   1   0
User Avatar
Member
1 posts
Joined: July 2005
Offline
i tried to write some vex scripts .. therefor i wrote a windows cmd file to create all directories, files and entries in the depending houdini files .. but sadly i cant find my shader in houdini and im really not sure whats going wrong .. so perhaps someone can have a look or test my cmd file .. and check if everything is placed where it should be ..

.. heres the source ..

rem valid types are vex | shop
set TYPE=shop
rem valid contexts are sop | surface | fog | shadow | light | displace
set CONTEXT=surface
set HOME=..
set HFS=D\Programme\Grafik\Houdini4.04

IF %CONTEXT% EQU sop set VEX_DES_PATH=Sop
IF %CONTEXT% EQU surface set VEX_DES_PATH=Surface

cd %HOME%\houdini
mkdir .\vex
IF %TYPE% EQU vex (set DS_DES_PATH=vex/Dialogs/%VEX_DES_PATH%) ELSE set DS_DES_PATH=shop/%VEX_DES_PATH%
mkdir ./%DS_DES_PATH%
cd vex
mkdir ./%VEX_DES_PATH%
cd %VEX_DES_PATH%

rem CREATE VFL SOURCE FILE
del %NAME%.vfl
echo // Does nothing >> %NAME%.vfl
echo #pragma help "This source does nothing. It simply makes a copy of the input" >> %NAME%.vfl
echo %CONTEXT% >> %NAME%.vfl
echo %NAME% () >> %NAME%.vfl
echo { >> %NAME%.vfl
echo } >> %NAME%.vfl

cd ../../
rem CREATE COMPILE COMAND FILE
set COMPILE_FILE_NAME=VEXcompile_%NAME%.cmd
del %COMPILE_FILE_NAME%
echo %HFS%/bin/vcc -u ./vex/%VEX_DES_PATH%/%NAME%.vfl >> %COMPILE_FILE_NAME%
echo move ./%NAME%.vex ./vex/%VEX_DES_PATH%/ >> %COMPILE_FILE_NAME%
echo move ./%NAME%.ds %DS_DES_PATH%/ >> %COMPILE_FILE_NAME%
echo pause >> %COMPILE_FILE_NAME%

IF %TYPE% EQU vex set PREFIX=VEX
IF %TYPE% EQU shop set PREFIX=SHOP

set OPERATOR_FILE_NAME=./%TYPE%/%PREFIX%%CONTEXT%
echo v_%NAME% %DS_DES_PATH%/%NAME%.ds -label "NEW VEX %NAME%" >> %OPERATOR_FILE_NAME%

rem exec VEXcompile

%COMPILE_FILE_NAME%

pause

thx .. would be greate to get some help ..
User Avatar
Member
4140 posts
Joined: July 2005
Offline
I strongly recommend that you work in csh scripting rather than DOS. I know this doesn't help you now, and not everyone can drop everything and learn a whole new language, but I wouldn't put a lot of energy into struggling to get DOS playing nicely with Houdini, when Houdini ships with a csh and is designed to work in a unix-y environment. Besides, lets face it, DOS is just so plain *awful*.

Again, this isn't a suggestion that can help you *now*, more like in the future…

Cheers,

J.C.
John Coldrick
  • Quick Links