Skip to content

Commit

Permalink
Merged work (qLab#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyquest committed Jul 29, 2018
2 parents 34ce7f6 + ee315cb commit 6e294f0
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 1 deletion.
59 changes: 59 additions & 0 deletions bin/houbatchrender
@@ -0,0 +1,59 @@
#!/bin/bash
#
# hr.sh
#
# Batch render a Houdini file.
# Usage:
#
# hr <houdini file name> <rop name> <take> [<houdini render arguments>]
#
# Example render arguments:
#
# -f <start> <end> Set render range
# -i <increment> Set render by-frame increment
# -o <filename> Output file name
# -I Render ROPs frame-by-frame instead of ROP-by-ROP
#
#


if (( $# < 2 )); then
echo -e "Usage: $0 <houdini .hip file> <ROP render node> <take> [<options>]"
echo -e "\t[<options>] example: -f <start> <end> -i <increment> -o <outfilename>"
exit 1
fi


CMDFILE=`mktemp`
HIPFILE=$1
ROPNAME=$2
TAKENAME=$3

if [[ -f $HIPFILE ]]; then

echo -e "\nHoudini file:" $HIPFILE " ROP Name:" $ROPNAME "temp cmd:" $CMDFILE

shift 3
echo "Render arguments:" "$@"

cat >$CMDFILE <<EOF
#echo Trying to run pre-render setup.
#python -c 'import xy; xy.preRenderSetup(force=True)'
echo Setting take to $TAKENAME.
takeset $TAKENAME
echo The following ROPs/frames will be rendered:
render -p -F -c $ROPNAME
echo Proceeding with render.
render -V $@ $ROPNAME
quit
EOF

hbatch <$CMDFILE 2>&1 $HIPFILE | gawk '{ print strftime("[%y%m%d %H:%M.%S]"), $0; fflush(); }' | tee `basename $HIPFILE .hip`_`date +%m%d%H%M`.log
rm $CMDFILE

else
echo "file" $1 "doesn't exist"
fi



27 changes: 26 additions & 1 deletion toolbar/qLib.shelf
Expand Up @@ -741,7 +741,21 @@ qlibutils.do_crash_recovery()
*version 1*
"""Toggles time dependency badge display in all network editors."""
"""Toggles time dependency badge display in all network editors.
----
LMB: Toggle time dependency display
Shift-LMB: Turn on
Ctrl-LMB: Turn off
"""
@usage Usage
((LMB)):
Toggle time dependency display
((Shift + LMB)):
Turn on display
((Ctrl + LMB)):
Turn off display
@bugs Limitations
Expand All @@ -752,19 +766,30 @@ qlibutils.do_crash_recovery()
_version 1_ ---
2018-07-22:
- Added shift/ctrl-click functions
2018-05-27:
- First version.
]]></helpText>
<script scriptType="python"><![CDATA[# toggle time-dependency display in network editor(s)
# in H16.5 the relevant preference is called "badgetimedep", which can be set to "hide", "normal" or "large". "showtimedep" is no longer used
shift = kwargs['shiftclick']
ctrl = kwargs['ctrlclick']
D = 'badgetimedep'
ns = [ t for t in hou.ui.paneTabs() if type(t) is hou.NetworkEditor ]
try:
b = ns[0].getPref(D) # hide/large
b = 'hide' if b=='large' else 'large'
if shift:
b = 'large'
if ctrl:
b = 'hide'
for n in ns:
n.setPref('showtimedep', '1') # make it compatible w/ 16.0
n.setPref(D, b) # use the 16.5+ way
Expand Down

0 comments on commit 6e294f0

Please sign in to comment.