MaxScript Deprecated Function Replacements?

MaxScript Deprecated Function Replacements?

Anonymous
Not applicable
1,259 Views
1 Reply
Message 1 of 2

MaxScript Deprecated Function Replacements?

Anonymous
Not applicable

My coworker gave me some scripts he used to export MD5 meshes, however, when I tried to load them, l'm getting undefined identifier errors. I'm using 3ds Max 2019 SDK, and the scripts were written with the 2015 SDK.

 

The identifiers/functions are:

save_current_frames

restore_current_frames

pop_value_locals

 

It looks like they're deprecated now, but I'm having trouble finding what I should use instead. Anyone have any ideas? I've considered just defining my own macros using the old definitions, but I wasn't sure if there was something "better"/why they were deprecated in the first place.

0 Likes
Accepted solutions (1)
1,260 Views
1 Reply
Reply (1)
Message 2 of 2

drew_avis
Autodesk
Autodesk
Accepted solution

If you look in maxsdk\include\maxscript\macros\value_locals.h, you'll see the deprecation notes indicate what you should use instead:

 

//! \deprecated Deprecated as of 3ds Max 2017. Use ScopedSaveCurrentFrames instead. 
#pragma deprecated("save_current_frames")
#pragma deprecated("restore_current_frames")

I'm not sure about pop_local_values, the note is:

//! \deprecated Deprecated as of 3ds Max 2017. value local storage handled by MXS_Exit_ValueLocal_Scope instances
#pragma deprecated("pop_value_local_array_tls")
#pragma deprecated("pop_value_locals_tls")

Hope that helps,

Drew



Drew Avis
Content Experience Designer