Question

There is a feature in 3ds Max called "Add Pop-up Note". The feature works perfectly if I follow the manual process described in Tudor Nita's post here , but I'm having a hard time finding the correct API calls in the MAXScript Documentation .

Can someone tell me which MAXScript function(s) I should call to embed a Pop-up Note in a *.max file programmatically?

This trivial code seems to allow me to programmatically set the Author and Comments file properties, but it does not seem to display the cool dialog box that Nita demonstrated:

loadMaxFile "d:\\3DSTestBed\fileToProcess.max" 
fileProperties.addProperty #summary "Author" "Shawn Eary"
fileProperties.addProperty #summary "Comments" "Rendered on an Amiga 5000 (I Wish...)"
saveMaxFile "d:\\3DSTestBed\processedFile.max"

It would be really neat if I could not only programmatically update the file properties, but also have them display in the dialog box that Nita mentioned when a *.max file was loaded.

Was it helpful?

Solution

The 'Add Pop-up Note' functionality is a MacroScript which you can freely examine. When you go to Customize User Interface, right-click the 'Add Pop-Up Note' command and select Edit Macro Script.

You can then see exactly how it's done.

In this case it is done with a persistent #filePostOpen callback:

callbacks.addscript #filepostopen "Execute Note_NoteString" id:#SceneNote persistent:true

A persistent callback is one which is saved inside the scene file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top