tyFlow Forum
tyPreview Overlay MAXScript - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: Feature Requests (https://forum.tyflow.com/forum-4.html)
+--- Thread: tyPreview Overlay MAXScript (/thread-2571.html)



tyPreview Overlay MAXScript - Moe - 08-10-2021

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.


RE: tyPreview Overlay MAXScript - tyFlow - 08-11-2021

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?


RE: tyPreview Overlay MAXScript - Moe - 08-11-2021

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 :/


RE: tyPreview Overlay MAXScript - tyFlow - 08-11-2021

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?


RE: tyPreview Overlay MAXScript - Moe - 08-11-2021

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).