tyPreview Overlay MAXScript
#1
Hello there Smile

I would like to suggest the possibility to constantly evaluate/calculate a variable in the overlay MAXScript string.
For example, I want to add the the lens focal length ("mycamera.curFov"), it works, but when I got an animated focal length the string get stuck on the first value Undecided

Thanks you.
  Reply
#2
The MAXScript overlay does execute every frame and I just tried it now on a test scene with a camera that has an animated FOV and the tyPreview overlay updated without issue.

What's the exact script that you're using?
  Reply
#3
Sorry you are right the MAXScript overlay work properly with normal cameras.
In my case, I'm using typreview through MAXScript and scene with xref camera.
For example, I have this simple script : 

Code:
fn preview =
(
rgx = dotnetObject "System.Text.RegularExpressions.Regex" ""
previewpath =  (pathConfig.GetDir #preview) +"\\"+ (rgx.replace (getFilenameFile maxfilename) "_[0-9]+" "")+"_"+(dotNetClass "System.DateTime").now.ToString("MMddHHmm")+".mp4"

tyPreview displayFilter_grid:false \
displayFilter_shapes:false \
displayFilter_bones:false \
displayFilter_spacewarps:false \
displayFilter_helpers:false \
displayFilter_lights:false \
displayFilter_background:true \
appearance_antiAliasing:true \
appearance_textures:true \
appearance_transparency:true \
appearance_safeFrames:false \
appearance_mode:1 \
appearance_style:0 \
resolution_width: renderWidth \
resolution_height: renderHeight \
output_filename: (previewpath as string) \
overlay_camera: false \
output_version: 0 \
output_type: 0 \
overlay_frame:true \
overlay_maxscript:true \
overlay_maxscript_script:("\""+(getActiveCamera()).fov as string+"\" as string")
)

preview()


With this configuration the fov doesn't seem to update. Maybe a limitation du to xref cameras :/
  Reply
#4
Hmm yes that seems like it could be an xref limitation....do you have the same issue with the MAXScript overlay of the legacy preview tool?
  Reply
#5
We are still using max 2019 at work so we don't have the preview overlay but I tried "(getActiveCamera()).fov" in the MXS snippet on max 2020 and it works (even with xref cameras).
  Reply


Forum Jump: