Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Creating a custom MZP file:

Creating a custom MZP file:

darawork
Advisor Advisor
1,136 Views
1 Reply
Message 1 of 2

Creating a custom MZP file:

darawork
Advisor
Advisor

Hi all,

I'm just trying to make an MZP that installs, by drag and drop into the interface. The end result should be a custom button for our company that launches Scriptlist.ms ( http://www.scriptspot.com/3ds-max/scripts/scripts-list )
I have the INI file all set and ready to go, with all the correct paths to contain 30 different shareware scripts.
But now I'm a bit lost. There does not seem to be a mention anywhere in this tutorial how to compile it.

Has anyone sucessfully done anything like this before? I would post in the scripting forum but it's a bit out of my depth and it seems people scarcely look there. I already have the Scriptlist routine running on my own workstation for a few years now, and it works fine... after manually setting it all up. But I want to refine the process for new employees to the company. E.g. Drag 'n' Drop the company MZP into the viewport and then create a new toolbar button as per the usual way. It would be great if it created a new toolbar button automatically, as an extra step, but I'm not quite there yet in terms of coding.

https://www.klaasnienhuis.nl/2012/11/building-mzp-scripts-for-3dsmax/
http://www.scriptspot.com/3ds-max/scripts/mzp-builder

Any tips on how to tie the package together? We all have workstations that have minimal user permissions, so lots of root directories are un-writable, and the execution of exe files is completely prohibited.

 

 

                [About] installMessage=*** Scripts Button.
			license=Creative Commons Licencing.
			support=***email***@gmail.com
			contact=***email****	
		[Header] Name=*** Scripts Button V1
			description=*** 3DSMax Custom Scripts
			version=V1.0
		[config]
			sourcerootpath=C:\*** Scripts
			buildfilename=***ScriptsButtonV1.mzp
			buildfilepath=C:\*** Scripts
		[Source] 
			1="bip_mixerio_i.bmp"
                        2="collect_asset_v2.099b.mzp"
                        3="*** Clear Render Paths.ms"
                        4="*** Collapse Stack.ms"
                        5="*** Collect Assets.ms"
                        6="*** Copy Paste Material UVW.ms"
                        7="*** Corona Light Lister.ms"
                        8="*** Corona Material Library.ms"
                        9="*** Corona Proxy Lister.ms"
                        10="*** Create Elements.ms"
                        11="*** Dashed Lines Generator.ms"
                        12="*** Denoise Elements.ms"
                        13="*** Detach By ID.ms"
                        14="*** Find Large Bitmaps.ms"
                        15="*** Golden Ratio Script.ms"
                        16="*** Make Blinds.mse"
                        17="*** Make Instances.ms"
                        18="*** Mass Randomizer.ms"
                        19="*** Move To Layer.ms"
                        20="*** Move To Surface.ms"
                        21="*** Populate Terrain.ms"
                        22="*** Relink Bitmaps.ms"
                        23="*** Scene Cleaner.ms"
                        24="*** Set Pivot To Base.ms"
                        25="*** Set Pivot To Center.ms"
                        26="*** Slice Tool.ms"
                        27="*** STR Tools.ms"
                        28="CollectAsset_16i.bmp"
                        29="CollectAsset_24i.bmp"
                        30="head.png"

		[Destination]
			1="bip_mixerio_i.bmp"
                        2="collect_asset_v2.099b.mzp"
                        3="*** Clear Render Paths.ms"
                        4="*** Collapse Stack.ms"
                        5="*** Collect Assets.ms"
                        6="*** Copy Paste Material UVW.ms"
                        7="*** Corona Light Lister.ms"
                        8="*** Corona Material Library.ms"
                        9="*** Corona Proxy Lister.ms"
                        10="*** Create Elements.ms"
                        11="*** Dashed Lines Generator.ms"
                        12="*** Denoise Elements.ms"
                        13="*** Detach By ID.ms"
                        14="*** Find Large Bitmaps.ms"
                        15="*** Golden Ratio Script.ms"
                        16="*** Make Blinds.mse"
                        17="*** Make Instances.ms"
                        18="*** Mass Randomizer.ms"
                        19="*** Move To Layer.ms"
                        20="*** Move To Surface.ms"
                        21="*** Populate Terrain.ms"
                        22="*** Relink Bitmaps.ms"
                        23="*** Scene Cleaner.ms"
                        24="*** Set Pivot To Base.ms"
                        25="*** Set Pivot To Center.ms"
                        26="*** Slice Tool.ms"
                        27="*** STR Tools.ms"
                        28="CollectAsset_16i.bmp"
                        29="CollectAsset_24i.bmp"
                        30="head.png"
		[DropIndices]
			1=30
		[RunIndices]
			1=30
                [Encrypt]
		encryptscripts=false
		theArray=#()

 

 

*The instances of "***" are where I have removed the company name, for privacy reasons.
** I have removed the header top lines of code in each .ms so as the scripts will run without class separation as they all reside in the same folder.
*** In an ideal world, Max should have this capability In-House within the Software. But that's for another day.
Thanks peeps 🙂

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

0 Likes
1,137 Views
1 Reply
Reply (1)
Message 2 of 2

Swordslayer
Advisor
Advisor

The tutorial linked is for a custom tool that builds .mzp given the files and an .ini file used by the tool to create the .mzp. You can just as well create the mzp.run file instead of the .ini file (the .run file pretty much says what files to copy to what folders) and zip the script files plus the .run file together and rename to .mzp (mzp is also just a zip file with different extension). See the topic Zip-file Script Packages in MAXScript reference for more info.