Home Technical Talk

MZP Rucksack

1
sublime tool
Offline / Send Message
renderhjs sublime tool
what?
MZP_rucksack_installation.jpg

download
mzpRucksack.mzp download link

________________________________________
original first message:

from my last GUI research in the texTools thread this little project evolved:
MZP_rucksack_splash.jpg

What is a *.MZP file?
NZP is simply a zip archive but renamed to MZP that can be evaluated in 3dsmax (e.g drag and drop, or run script).
It's nice if you are annoyed by specific file/ folder installation instructions, because the whole archive gets treated as a local folder structure.

Quick Overview
its a toolbar that appears as soon as you drop the *.MZP file in your viewport. The toolbar is like a swiss army knife that can be filled with custom maxscripts so that if you once have to work on a different computer you can take all your scripts sorted in one single file with you without needing to install anything on the computer.

features
while I am still about to close some elements before I can post a first release I can already promise this:
- single *.mzp file (no installation forced, runs also without administrative rights)
- easy extend able through dropping maxscript files in a folder (in the mzp file)
- or by editing the XML where you can also tweak colors, tool tips, names, custom icons all UTF-8 supported (e.g chinese) and heck even maxscripts in the XML itself that will be evaluated at runtime :D
- liquid layout (not done there yet, some auto stuff for more harmonics will be added)
- tabs for grouping stuff (can setup filters for the scripts/ folder to assign script files to categories)

here is a smal demo of how it works at the moment:
[ame]http://www.youtube.com/watch?v=GwLjVH27P9s[/ame]
all the scripts are executed from within the Flash object but parsed from a XML file. So you dont need flash at all except you would like to change specifics in the visuals.


i post a first release as soon as I solved some stuff (like local swf url lookup), because for example I dont know yet for sure if it will run on 64 bit.
If this turnes out nicely it would be cool to release different versions (at least I will) some for just UV, or just modeling letting you combine the best of several int one.

Replies

  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    Looks really nice! pretty cool GUI!
  • rollin
    Offline / Send Message
    rollin polycounter
    cool idear.. looking forward to it!
  • nrek
    Offline / Send Message
    nrek polycounter lvl 14
    Great idea Render! This will come in so handy when I have to go back and forth between working at home and school. Look forward to the first release.
  • [HP]
    Offline / Send Message
    [HP] polycounter lvl 13
    Man, this is so awesome!

    makes me remember the concept of the xmarks plugins for firefox! Which is great!

    Can't wait!
  • mLichy
    Awesome, I can't wait either!!!!
  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 16
    delightful sir. :::tips hat:::
  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    bloody hell, renderhjs

    you're a champ, this sounds and looks fantastic!
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    ah yess!! finally got my way through passing over maxscript values to flash and the other way around.
    Now I can really send data back and forth :D I need this so that maxscript reads out the files in the customizeable /scripts (int the MZP file you can customize) and sends it as array to flash
    passing_over_maxvars_to_flash.gif

    besides this I finally got a dropable MZP version working so listing automatically script files that are dropped in the /scripts folder and not yet assigned in the XML will be auto added to the panel.
    I now think that a first release can be released in the next few days so you guys can give me feedback or try it for your stuff.



    in case someone is interested some usefull links and snippets to this that I found and discovered:

    excellent video tutorial on how to get to know about all activeX controls in maxscript:
    http://www.scriptspot.com/tutorials/gavinb/3dsmax.adv.ui.with.activex.rar

    adobe tech note on FlashVars (the method I used to send vars to flash)
    http://kb2.adobe.com/cps/164/tn_16417.html

    AS3 on how to read flasVars
    http://blogs.adobe.com/pdehaan/2006/07/using_flashvars_with_actionscr.html

    my snippets
    AS3 snippet for reading flashVars
    var txt:TextField = new TextField();
    addChild(txt);
    var obj:Object = (LoaderInfo(this.root.loaderInfo).parameters);
    var s:String;
    for (s in obj ){
    	txt.appendText(s+"="+String(obj[s])+"n");
    }
    

    maxscript snippet for sending flashVars
    rollout myRollout "renderhjs"( 
    	activeXControl flash "{D27CDB6E-AE6D-11CF-96B8-444553540000}" pos:[0,0] width:96 height:220  align:#left
    	on myRollout open do( 
    		swf = "c:gui.swf";
    		flash.movie = swf
    		flash.movie = swf -- need to load 2nd time sometimes
    		flash.FlashVars = "var1=banana";
    		flash.FlashVars = "val2=star wars";
    	)
    )
    CreateDialog myRollout 96 220 pos:[320,100];
    
  • mLichy
    yeeeeeeeeeees, can't wait for the release :D
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    first release:
    download link
    (I'd like to know if it runs in 64bit xp/vista/win7 so if someone could confirm that it would be nice)

    stupid proof usage:
    MZP_rucksack_installation.jpg
    just drag it into your viewport and it should startup. Alternativly you can also run the MZP as a script or put it into your scripts/startup folder, really stupid proof installation.

    As for customization: like I mentioned before the MZP is nothing more than a zip file. Inside the archive drop your scripts in the ./scripts/ folder. They will then appear in the last tab "./scripts"


    regarding the zoom changes, simply use the mouse wheel after you've got focus on the GUI
    MZP_rucksack_zoom_use.jpg

    I tested it on
    - max9
    - max2009
    - max2010
    all32bit and they all work flawless
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    ok some technical details that might be important to some people

    configuration.xml
    - defines the default colors in a sequence where each color is stored as hex value without the # sign just the 6 characters. The order of the colors is:
    window background, buttons background, button text color, highlight background color, highlight text color
    <shortcuts	colors="403e40,606060,c7baa4,99e63a,3d5c17">
    
    - lets you define tabs/ groups:
    <group name="Edit">
    </group>
    
    those tabs are executed/ read in linear order

    - lets you define buttons only in groups/ tabs!!
    <cmd name="myFirstScript"	ico="icons/script.gif"	tooltip="not yet supported"><![CDATA[
    		print("hello world");
    ]]></cmd>
    
    you can define any maxscript bewteen the <![CDATA[ ]]> elements. If you want to call a script here use the maxscript:
    filein "scripts/myCustomScript.ms";
    
    this will load the script file and evaluate it (its actually just maxscript)



    /scripts folder
    1.) every script file (*.ms, *.mxs, *.ds, *.mzp) you put in here will be compared against the already defined elements in the configuration.xml. Which means that if a maxscript was already used before in other tabs it wont show up in the last ./scripts tab. It checks actually the scripts on the existing buttons in the other tabs if the script is used there.

    2.) you can auto assign icon files to buttons by dropping a image file (*.PNG, *.JPEG, *.GIF) with the very same filename except the extention in the /scripts/ folder. Once done it should show up as mapped icon to that particular button within the ./scripts tab.
  • Pedro Amorim
    fucking hell dude!
    just wanted to say thanks for sharing with the community :D
  • Mark Dygert
    Hendrik you kick serious ass! Rucksack is awesome. Thanks so much for all the awesome tools and now this!
  • mLichy
    oooooooh snap! Tested on Vista 64bit in Max 2010 64 bit and got Error:

    Cannot create the ActiveX Control: {D27CDB6E-AE6D-11CF-96B8-444553540000}

    Tried it on Max 2009 64bit SP1 and got the same error :(..... damnit.

    Edit: I'll try it on Monday on Max 2010 64bit on XP 64bit and see if it works. Hopefully you can get it to work on Vista 64bit :D.

    Edit: Ha, ok, so It works fine in 32bit Max 2009 and probably 2010 on Vista 64bit. So it's just a max 64bit issue... but if it's not hard to fix, please do!
  • mLichy
    Oh, could you also possibly post the script you made for the checker pattern stuff, or build that into the toolbar again?
  • Yozora
    Offline / Send Message
    Yozora polycounter lvl 11
    This is what happens for me, using vista 64 and max 2009 SP1 64;
    (tried dragging into viewport and putting in startup folder, just in case it matters)

    mzperror.jpg
  • Michael Knubben
    If you're ever in Amsterdam, I'll have to buy you a beer or something. Your scripts have been invaluable! (but I still value them at only one beer, because I'm cheap)
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    thats what I feared with 64bit , that the 64bit active X control for 64bit is not compiled or the same one. I read about it before on other threads :(
    {D27CDB6E-AE6D-11CF-96B8-444553540000} is the ID or signature for the Flash activeX plugin.
    Maybe 64bit has another one? , or simply has no support at all. The other way of doing it would be using .NET but I cant find at all an example with Shockwave flash. Apparently dotNet is the way to go with booth 64bit and 32 bit.

    maybe one of you 64bit guys has frontpage, dreamweaver maybe even msWord on his 64bit machine and can create a simple HTML document with a shockwave Flash activeX object in it. Simply add a AX control in either of those applications and choose shockwave flash. It should then create a Serial or ID in the HTML code similar to the 32bit compatilble version:
    {D27CDB6E-AE6D-11CF-96B8-444553540000}
    if it returns a different number (because it should only return whats installed on your system) I might then know if there is a way with 64bit and active X shockwave.
    mLichy wrote: »
    Oh, could you also possibly post the script you made for the checker pattern stuff, or build that into the toolbar again?
    its just a experimental release- until I know it runs well on 90% of all users (like 64bit) I wont go much into specifics regarding the scripts or releases. But yeah once it runs better or with the next version I can add it.
  • Yozora
    Offline / Send Message
    Yozora polycounter lvl 11
    renderhjs wrote: »
    maybe one of you 64bit guys has frontpage, dreamweaver maybe even msWord on his 64bit machine and can create a simple HTML document with a shockwave Flash activeX object in it. Simply add a AX control in either of those applications and choose shockwave flash.

    I dont have frontpage or dreamweave but I tried it in MS word... at least I tried to find out how to do this simple task using the help files and google, but failed :(

    Closest I got was finding a "AddFlow 4 ActiveX Control" in the "insert object" menu, but couldnt insert it because I dont have the "AddFlow" program installed.

    Need a step by step :p
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    well thanks anyway, I will research today a little bit on this topic, maybe I can come up with something
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    hahaha man you are a beast!

    thanks for this!
  • Peris
    Offline / Send Message
    Peris polycounter lvl 17
    really awesome! Thanks a lot :D. I'm really impressed that you can implement flash menus in max.. makes me want to play around with it as well :D
  • rasmus
    Looks fantastic, thanks!
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    a last concept work on the GUI after some feedback:
    mzpRucksack_gui_containers_concept.gif
    if I want to port the TexTools project to this I need a general part of the GUI that is always visible e.g not changing like the resolution settings, open/close UV editor and other things that are very often accessed.
    So I thought maybe tabs are not enough but I need another functionality to stick elements that are often needed - so I added the containers a higher heirachial order.

    Some other additions in the concept are:
    - open, see multi tabs simultaneously (with color coding not sure on the detail though)
    - add a 2nd type {Variables} as either 1d, 2d or triplet 3d values that support numeric input as well as sliding/spinning the values.
    - a zoom state indicator in each container bar
    - shortcut indicator: this is actually rather something for the future because I haven't yet completely figured out the KBD file format and how to read out the current used one from max- but its something I want for the future. Just like silo it would then also possible to assign shortcuts on the fly.



    as for the 64bit,- I have read up some information so I see a few options to try out

    1.)hosting ActiveX in dotNet using Component Object Model (COM)
    http://msdn.microsoft.com/en-us/library/aa446515.aspx
    but I dont have that kind of IT background so I will ask at some forums if someone knows more about this and perhaps some example code in mxs.
    I already tried extracting the SWF dll from the IE plugin for XP/Vista/Win7 plugin that should be booth 32 and 64 bit - but I cant load it as assembly using
    DotNet.LoadAssembly[URL="http://dll-repair-tools.com/dll/npswf32dll-the-flash-plug-in"] "NPSWF32.dll"[/URL]
    
    so it probably needs more research
    2.) dotNet.Windows.Forms.WebBrowser component
    this one is actually rather well explained with sample code in mxs so in a way (though complex) it might be possible to pass over some dynamic HTML page that embeds the SWF file that receives the FlashVars:
    http://www.scriptspot.com/bobo/mxs9/dotNet/dotNetObject_System.Windows.Forms.WebBrowser.html
    http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx
  • mLichy
    Yeah, I was showing James Haywood your script and told him about the 64bit issue. He also said you should be using DotNet.
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    Sweet awesomeness man!~!
    *I'm running Vista Ultimate 64bit SP1 with 3Ds Max 2009 SP1 and it works fine.
    i'm not 100% sure if max is 32 or 64 bit. - where can i find this info out for sure?
  • mLichy
    Yeah, it's prob. 32bit. I think it says 64bit if your using 64 and it doesn't say if your using 32.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    well it should have nothing to do with max, its rather Microsoft who does not want to dig any deeper into the activeX security hell, instead they introduced dotNet another way of doing similar things. In help files Autodesk states several times that it still supports activeX in 64bit releases of 3dsmax and there are a few custom activeX components from autodesk that are still available in max 64bit and used fro example the Particle Flow GUI.
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    Yea, its 32 bit Max. If its 64 bit, it will display x64 in the top information bar thingy.

    tried it on my home machine:
    vista home premium 64 bit
    3dsmax 2009 sp1 x64

    ** got the same error as the others.
  • mLichy
    Yep.... sad face.... :(. I'm just using the old text tools yet, there working fine for now.
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    alright, back at work - playin around with the tool and I've been getting a lot of random fatal crashes. the most obvious one is when i load up the tool, close it - then try to open it again.

    MZP_error_01.jpg

    is this useful information or am i just flappin my jaw?
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    hmm I had that before too,- when the mzp.run instructions would not work propper. Inside the rucksack.mzp there is a file called mzp.run and for 3dsmax its like a index.htm file, the file to run first before anything else gets touched.
    And whenever max for whatever reason did not understood those instructions written there it crashed here the very same way your screenshot shows. I did however see not any Panel at all - so that seems to be very different.

    will check it out once I have a little bit more time (close to semester finals here, got some bachelor project to finish)
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    update time

    got a proof of concept for the dotNet working (meaning this should work under 64bit) thanks to this post
    mzp_html_js_poc.gif
    I can already send strings to maxscript and from maxscript to Javascript. Now I just have to connect Flash with the JS so that Flash gets back in control instead of the InternetExplorer.
    its a bit more tricky but once figured out its not that much more code - and once running it might be a interesting research for future projects :poly121:

    apart from that I am trying to simplify the folder structure,
    mzp_html_js_poc_folder.gif
    maybe even some auto read folders as tabs except the "sys" one which is for system purposes (flash menu, maxscripts to run the interface,...).
    In that case only the
    - configuration.xml
    - mzp.run
    - ./sys

    would be vital, anything else would be tried to interpret as functions/ tabs


    on a sidenote:
    recently I saw this thread at cgsociety
    http://forums.cgsociety.org/showthread.php?f=98&t=779832
    menuak.jpg
    its a maya alike pie/hot menu for 3dsmax that is customizeable and extendable
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    so I got it finally working with no activeX

    mzp_html_js_results.gif

    i hope that I can pack a release within the next few days so that people with 64bit can hopefully give me a OK :)

    something I added meanwhile:
    - multi folder/tab support from the root MZP archive directory

    I can now really simply drop any maxscript folder inside it and it will list automatically upon launch the files within it and display it in a own tab.
  • Michael Knubben
    Great work you're doing here, HJ. I haven't yet tried this because of the problems on 64-bit os, so I'm glad to see you've tackled those. I was wondering though, would it be possible to extend this system to other things, such as having a library of little bits and pieces, with thumbnails? Things like rivets, bolts etc...
  • mLichy
    awesome!!! I'll test it as soon as you put up the download. :D:D
  • Mark Dygert
    WOO-HOO! nice going!
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    still meaning to try this out, looks ace
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    I have been working on a new skinning feature:
    mzprucksack_skinning.jpg

    the advantage is that the whole skin can be defined in a single eye-readable PNG or GIF image. As long as the reading order (top/down left/right) is the same it will work. This also means that you can basically define the size of each tile element the way you want and the GUI will adopt to that.

    Just to clarify: this for example is a skin image: (specifications are not yet done)
    skin_sample_design.gif
    so all it would take to tweak the GUI would be to edit this image in PS or whatever.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    got already tabs and the containers working with the new skin system:
    mzp_new_skin_max_test_01.gif
    the sample screenshot is with a windows skin because thats easier to work with at the beginning when I need to design the tiles I need. Once I am done with the specifications I will create some more modern looking GUI's.
    Though this windows classic look is very minimalistic and very readable.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    another screenshot update:
    mzp_new_skin_max_test_02.gif
    buttons in the containers work already somewhat
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    last post for this morning ;)
    mzp_new_skin_max_test_03.gif
    buttons come now with icons
    you might have noticed that containers with just 1 tab don't display the tab at all so there is more space for the buttons
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    sweet progress. I will be looking forward to your next release!
  • Funky Bunnies
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    you're a champ, buddy!
    this looks great :D

    i'd love to see you take a crack at a more adventurous skin to show the versatility of that setup
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    I have some online demos of the GUI. They are basicly all the same but differ in skin file. Resize your browser window to see the liquid layout in action.

    windows style:
    http://www.renderhjs.net/bbs/polycount/mzp_rucksack/online_gui_test/win/sys/
    modo style:
    http://www.renderhjs.net/bbs/polycount/mzp_rucksack/online_gui_test/modo/sys/
    debug mode:
    http://www.renderhjs.net/bbs/polycount/mzp_rucksack/online_gui_test/debug/sys/
    it behaves now a bit better with the resorting of the size and amount of buttons in each container.
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    Works great so far, but I might be having issues with the UI?
    Perhaps I'm missing something in the thread, but I don't have any way to changing the color theme, nor do the layouts change as described. As a matter of fact if I scroll it out horizontally the text magically cuts itself in half =\

    I used the drag>mzp method for installation.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    well its all very early alpha stuff + you can change the colors only in the XML file thats within the MZP archive.

    GUI update
    texTools_3.0_interface_preview.gif
    each container now can have its view/scale mode and can be tweaked by sliding on the container bars (black ones in the ss)
    Variables (1d,2d,3d) are making their way slowly into the interface and tabs can be switched.

    but there is still lots to do till I can release it with TexTools and here
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    bloody awesome
  • rollin
    Offline / Send Message
    rollin polycounter
    this is realy great!
1
Sign In or Register to comment.