chadd chkey
eharetea

Add channels and keyframes in Hscript.

chadd and chkey in action.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 01:40 AM

chadd and chkey are useful when putting expressions into parameters.


 	    if ($str==j||$str==p||$str==q||$str==y)
                set yfix=\$YMAX-ch\(\"yspace\"\)-.2
                chadd -t 0 0 0 text$count/xform1 ty
                chkey -t 0 -v 0 -m 0 -A 0 -F "$yfix" text$count/xform1/ty
            endif


            if ($str==g)
                set yfix=\$YMAX-ch\(\"yspace\"\)-.5
                chadd -t 0 0 0 text$count/xform1 ty
                chkey -t 0 -v 0 -m 0 -A 0 -F "$yfix" text$count/xform1/ty
            endif

Notice the commenting with "\" is before spaces, quotations, dollar signs, and begining parenthesis(to get rid of a space)



set SOP = `oppwf()`

chblockbegin
chadd -t 0 0 $SOP lookat_tx

# used extra single quotes to take $SOP out of the '', so it is evaluated

chkey -t 0 -v 0 -m 0 -a 0 -A 0 -T a  -'centroid("'$SOP'/dent_obj/dop_dent_object",D_X)' $SOP/lookat_tx
chadd -t 0 0 $SOP lookat_ty
chkey -t 0 -v 0 -m 0 -a 0 -A 0 -T a  -'centroid("'$SOP'/dent_obj/dop_dent_object",D_Y)' $SOP/lookat_ty
chadd -t 0 0 $SOP lookat_tz
chkey -t 0 -v 0 -m 0 -a 0 -A 0 -T a  -'centroid("'$SOP'/dent_obj/dop_dent_object",D_Z)' $SOP/lookat_tz
chblockend