HitchHiker Update v4.4

Oct 9, 2010 by     29 Comments    Posted under: 3dsMax, DotNet, User Controls

hh-new

I’ve been so swamped with work this last year, my planned update to Hitchhiker had to be stalled. It’s a shame really, as I have had a working version of the updated assembly for a while but no time to update the help files to show how to use it. However I’ve been pleased with the progress made in it’s place – I’ve been able to write RigStudio, Digit and Character Silo which I’m really proud of. Hopefully I will get a bit of breathing space to allow me to concentrate on next generation 3dsMax UI stuff, namely learning WPF.

There are a few updates – mainly from great feedback I’ve had from the community. I am glad people are using HitchHiker in any way to augment their Asset Browsing scripts. With the new additions that I’ve made, I am hoping this will be even better.

Please let me know if you like Hitchhiker and use it for anything useful. You feedback is critical as my time tends to be limited. So if i feel people are using the control I can spend my time improving it. I’d love to spend all my time refining this control but there are so many other project that I have to work on! But feedback on any level will always motivate me to fix and improve!

Recent Updates/Fixes –

v4.4 – 19th January 2011

Added the .buttonborder <boolean> property. If you set this to false, Hitchhiker will not render the black border around each control. If used with the .gap <integer> property set to 0, Hitchhiker will render like a seamless section of tiles.

buttonborder

Instantiating HitchHiker

I had to have a re-organisation of my namespaces as they were getting confusing. Since HitchHiker isn’t really anything to do with characters, i decided to change the default namespace to lonerobot.ui.controls. If you have any scripts that were written with the previous release of this assembly, you can just do a search and replace of ‘character’ for ‘controls’

make sure that you call dotnet.loadassembly <hitchhiker dll location> in your script before using.

if using on a dotnetform or maxform – dotNetobject “lonerobot.ui.controls.hitchhiker”

if using on a maxrollout – dotNetcontrol “lonerobot.ui.controls.hitchhiker” width:<int> height:<int>

please refer to the hitchhiker tab at the top of this site for more detailed help, all these are still valid

Additions to Version 4.4 of HitchHiker

Max file support –

Hitchiker will now support the searching of the Maxfile type. Not only this, you can render an associated thumbnail directly from the assembly to be displayed with the file when previewing it in HitchHiker.

Additional populate methods –

Hitchhiker was always designed to operate on a folder level, whatever was inside with the designated filetype was displayed. Now you have two options.

populate (by directory string)

populate (by file array)

This means you can now pass an array of filepath strings to be displayed in the hitchhiker window.

This can also be utilised with the enhanced search parameters –  PopulateFilterSearch

Hitchhiker will now allow you to display files that start with, end with or contain certain characters. So if you are doing a recursive search population of many folders, you can tell it to only display those with a particular character’s name for example.

Other options is that you could prefix or suffix a filename “Approved” or “Unapproved” and allow the showing of approved files only.

Fast Cache Display Mode

Hitchhiker is reasonably fast in realtime mode, but (like most asset browsers) can slow down when loading multiple hi-resolution images inside folders. Hitchhiker has a display state that  can be set to cache – meaning the thumbnails are stored locally on the user’s machine, meaning that the slowdown only exists the first time the populate method is called. Subsequent calls result in the control being populated very fast!

hh.cache =  (dotnetclass “lonerobot.ui.controls.hitchhiker+cachestate”).cache

Store Favourites of your commonly used directories

Hitchhiker can now add locations that you use to populate from to save specifying the folder each time

Fully integrated toolbar

Hitchhiker can be run without the toolbar and it’s behaviour controlled entirely by script, but setting the toolbar to true allows you to do everything from the menu system, set thumbnail sizes, search parameters etc, meaning it really is a pretty comprehensive asset browser straight out of the box.

A few caveats I have noticed about this release –

Occasionally the keyboard focus can be stolen by HitchHiker if you close the dialog. Make sure you call the housekeeping function in your close handler, as this will make sure max gets it’s shortcuts back.

Feel free to download at the link below. If you find any issues with using this version of Hitchhiker, please let me know and I’ll do my best to fix it. I would ordinarily like to test a release more than this one has been – But didn’t want to delay the release this to the community any longer. I hope it helps you make great utilities with minimum effort.

download

29 Comments + Add Comment

  • avatar

    I am using this example;

    if dotNet.getType “Lonerobot.ui.controls.hitchhiker” == undefined do (dotnet.loadassembly “C:\\hh\\HitchHiker.dll”)
    rollout HitchHikerRollout “” width:800 height:490
    (
    dotNetControl HitchHiker “Lonerobot.ui.controls.hitchhiker” pos:[0,0] width:800 height:490
    on HitchHikerRollout open do
    (
    HitchHikerRollout.HitchHiker.cache = (dotnetclass “lonerobot.ui.controls.hitchhiker+cachestate”).cache
    HitchHikerRollout.HitchHiker.filetype = (dotnetclass “lonerobot.ui.controls.hitchhiker+filetypes”).max
    HitchHikerRollout.HitchHiker.gap = 3
    HitchHikerRollout.HitchHiker.SelectedBorderWidth=1
    HitchHikerRollout.HitchHiker.SelectedHighlight = (dotnetclass “system.drawing.color”).red
    HitchHikerRollout.HitchHiker.ShowMenu= true
    HitchHikerRollout.HitchHiker.RecursiveSearch=false
    HitchHikerRollout.HitchHiker.showtoolbar = true
    HitchHikerRollout.HitchHiker.ShowTooltips= true
    HitchHikerRollout.HitchHiker.DisplayStyle = (dotnetclass “Lonerobot.ui.controls.hitchhiker+displaystyles”).imagetext
    HitchHiker.ImageAlign = (dotnetclass “System.Drawing.ContentAlignment”).MiddleCenter
    HitchHikerRollout.HitchHiker.ButtonBackColor=(dotnetclass “system.drawing.color”).white
    HitchHiker.ThumbPanelBackColor = (dotnetclass “system.drawing.color”).black
    Hitchhiker.Thumbnails = (dotnetclass “lonerobot.ui.controls.hitchhiker+ThumbNailSize”).ExtraLarge
    theArr= getFiles “C:\\Temp\Proxy\\*.max” — the folder that contain array of image file that supported by hitch hiker
    HitchHiker.populate theArr
    )

    on HitchHikerRollout close do HitchHiker.housekeeping()
    on HitchHiker thumbpicked sender args do
    (

    mergeMAXFile args.FileName #select #mergeDups #neverReparent #useMergedMtlDups quiet:on

    )
    )
    createdialog HitchHikerRollout

  • avatar

    Hello good day
    I am using this very good system.
    However I’m having trouble with the bar to search.
    I’m using max 2014 sp5

    When typing, I can not use letters and then use it does not behave so

    expected.

    Can someone help me?

    Thank U

  • avatar

    I Find how to instal, but i’m using 3ds max Design 2013, and it doesn’t work :/

  • avatar

    Hi LoneRobot!

    How to instal it :V ?
    looks like a awesome tool.

  • avatar

    Thanks for the info Martijn.

  • avatar

    Hi Pete,

    Thanks for the great tool, it works very well.

    A note for people having trouble getting it to work: if the control throws an unexpected error, update your Microsoft Visual C++ Redistributable and possibly Microsoft .Net Framework.

  • avatar

    uhmm Lone robot may i give little light for who new to use the tool you made


    if dotNet.getType "Lonerobot.ui.controls.hitchhiker" == undefined do (dotnet.loadassembly "C:\\hh") -- this is the folder where hitch hiker.dll placed.

    rollout HitchHikerRollout "" width:490 height:490
    (

    dotNetControl HitchHiker "Lonerobot.ui.controls.hitchhiker" pos:[0,0] width:490 height:490
    on HitchHikerRollout open do
    (
    HitchHikerRollout.HitchHiker.cache = (dotnetclass "lonerobot.ui.controls.hitchhiker+cachestate").cache
    HitchHikerRollout.HitchHiker.filetype = (dotnetclass "lonerobot.ui.controls.hitchhiker+filetypes").jpg
    --HitchHikerRollout.HitchHiker.thumbsize = dotnetobject "system.drawing.size" 90 90
    HitchHikerRollout.HitchHiker.gap = 2
    HitchHikerRollout.HitchHiker.SelectedBorderWidth=1
    HitchHikerRollout.HitchHiker.SelectedHighlight = (dotnetclass "system.drawing.color").red
    HitchHikerRollout.HitchHiker.ShowMenu= true
    HitchHikerRollout.HitchHiker.RecursiveSearch=true
    HitchHikerRollout.HitchHiker.showtoolbar = true
    HitchHikerRollout.HitchHiker.ShowTooltips= true
    HitchHikerRollout.HitchHiker.DisplayStyle = (dotnetclass "Lonerobot.ui.controls.hitchhiker+displaystyles").images
    HitchHiker.ImageAlign = (dotnetclass "System.Drawing.ContentAlignment").MiddleCenter
    HitchHikerRollout.HitchHiker.ButtonBackColor=(dotnetclass "system.drawing.color").white
    HitchHiker.ThumbPanelBackColor = (dotnetclass "system.drawing.color").black
    Hitchhiker.Thumbnails = (dotnetclass "lonerobot.ui.controls.hitchhiker+ThumbNailSize").ExtraLarge

    theArr= getFiles "D:\\try\\*.jpg" -- the folder that contain array of image file that supported by hitch hiker
    HitchHiker.populate theArr
    )
    on HitchHikerRollout close do HitchHiker.housekeeping()
    on HitchHiker thumbpicked sender args do
    (
    print args.FileName
    --print args.Image
    )
    )
    createdialog HitchHikerRollout

  • avatar

    Thank you lone robot for this powerfull dll,, i found it handier to control, I just want to give an advice for future development

    1. accept multi select
    2. maybe some more costumization about the extension, user can input just any type they want to add, such ies, vrmesh,mrProxy …..just put unknow [blank white icon] for it.
    3. if I can render ies using this i would more grateful

    Thank you very much for your great effort.

  • avatar

    Hi, this is a dotnet dll. You have to load the assembly and host it on winform/maxform or as a dotnetcontrol on a max rollout.

  • avatar

    How to find it in the Max itself? (I already put the.dll file in the plugins folder).
    Thanks.

  • avatar

    hey Magnus, which version of max are you using?

  • avatar

    He everyone.
    Anyone that knows what I am doing wrong??
    Updated the dll and changed all “character” to “controls” but all I get is :

    >> MAXScript Rollout Handler Exception:
    — Unknown system exception <<

    PLEASE HELP!!

  • avatar

    Thanks,
    The drag and drop is now working well!
    Another question. Is there a method I can use to select, via maxscript, a displayed thumnail?
    I give the user a list of files in a treeview and want to highlight the associated hh thumbnail when they click on an item in the tree. What does the hh.Select() Method do?
    Idealy i want to pass an index to hh. ie hh.Select( idx_4th_thubnail). Is this possible?

    Thanks in advance,
    Simon

  • avatar

    Hi Simon,

    If Hitchhiker is set to the max filetype, then drag and drop is enabled by default. You just need to hold down shift and perfom the dragdrop operation.

    regards

    LoneRobot

  • avatar

    I am trying to get drag and drop working from hitchhicker. Ie I am wanting to drag a thumbnail into a max viewport to insert a vray proxy. However i cannot get hitchhiker to respond to any of the drag events (or even mouse events) other than thumbpicked. How can I go about using the dodragdrop method from a thumbnail?

  • avatar

    Hi Nick, glad you are enjoying using it. Let me know what you build with it.

    the property that you are looking for is .populatefilter

    it is expecting a Populatefilterlogic enumeration and can be set as follows –

    hh.PopulateFilter
    .All : #LoneRobot.UI.Controls.HitchHiker+PopulateFilterLogic#, read-only, static
    .Excludes : #LoneRobot.UI.Controls.HitchHiker+PopulateFilterLogic#, read-only, static
    .Includes : #LoneRobot.UI.Controls.HitchHiker+PopulateFilterLogic#, read-only, static

    Set it one of two ways –

    hh.PopulateFilter = (dotNetclass “LoneRobot.UI.Controls.HitchHiker+PopulateFilterLogic”).excludes
    hh.PopulateFilter = hh.PopulateFilter.all

    I appreciate the naming of these properties aren’t great, but the idea was with the toolbar you wouldn’t need to interface them directly, but since you’re building your own you can still invoke these parts. hope this helps

    LoneRobot

  • avatar

    One last piece to get the search feature working. There is a button in the menu that toggles Include/exclude/All search features. What is the command for that enumeration?
    Thanks.
    I’m really enjoying using HitchHiker by the way. It’s so clean and simple and does exactly what I need.

  • avatar

    Hi Nick,

    The commands that you need to invoke the search via code are –

    to specify searching for characters at the start of the filename –
    hitchhiker_instance.populatesearchpart = (dotnetclass “lonerobot.ui.controls.hitchhiker+PopulateFilterSearch”).startingwith

    to specify searching for characters at the end of the filename –
    hitchhiker_instance.populatesearchpart = (dotnetclass “lonerobot.ui.controls.hitchhiker+PopulateFilterSearch”).endingwith

    Then, you need to tell HH the search parameters. This is according to standard wildcard methods eg –

    hitchhiker_instance.PopulateFilterPattern = “*Image”

    There isn’t a way of disabling sections of the toolbar that you dont like, but with these commands, along with others you could easily re-create a toolbar above with the functionality you need. Hope this helps!

    As soon as I get 5 I will be doing a mainainance release of HH including a few bug fixes (TGA and PSD still has a debugging message for example) and I’ll see about all the requests I’ve had recently. Sorry for the dealy everyone and thanks for your patience.

    LoneRobot

  • avatar

    I’m trying to utilize the searching capabilities of HH through script. I was wondering, what are the methods/properties that access the searching feature of the tool bar?
    Or if it is possible, is there a way to disable the directory menu option in the tool bar? I like all the other features on the tool bar but I have a preset directory that is loaded and don’t want the user to be able to select their own.
    Thanks
    Nick

  • avatar

    Hi Thion, thanks for your feedback – Multiple file selection is something scheduled for the next version of Hitchhiker. However, with some simple maxscript coding, It would be possible I think. You could store each selected files in a variable in the script, using HH to add to the selection each time (probably with control.pressed as the indication that it is different to a normal HH thumbpick) You could have a listbox to show the current selection array state if needed and then a button on the max rollout to perform whatever script action you needed. Not as good as having it all in the control, but possible i would think!

  • avatar

    Hi LoneRobot,

    I think HitchHiker could be a big timesaver for my tools. I lack only one feature for it to be useful in most of the tools. Is it possible to select multiple images, so I can use Hitchhiker to make a selection of images/maxfiles and do something all of those? For example, it would be useful if I could browse through renders of art assets, and merge my selection into the current maxfile. I don’t think it’s allowed to select multiple thumbnails at once right now?

    Anyways, this is a very powerful tool, and yet so easy to implement. Life as it should be 😉 Keep up the great work!

    Thion

  • avatar

    Hi Sam,

    Thanks for your comments. The border is in fact the style of a default windows flat button.

    I have updated the assembly to version 4.4 with an option to disable this. Please see the update notes at the start of the article for instructions on how to use it.

    Regards,

    LoneRobot

  • avatar

    Hello LoneRobot,

    HitchHiker is amazingly great to use!
    However, is there anyway to remove or color the 1px size black border around the control? I tried border and other possible properties but none of them work 🙁

    Thanks a lot once again!!

    Keep it up!

    Sam

  • avatar

    Hi Dave,

    thanks for your comments and for using the control. The thumbsizes like ‘extraLarge’ are just a few convenient sizes stored as enumerations, and are just there for convenience. If you check the help for the ‘thumbsize’ property (there’s an example with some ‘flight of the conchords’ videos) you’ll see this –

    Thumbsize –
    Property Type : System.Drawing.Size
    Maxscript : HitchHiker.thumbsize = dotnetobject “system.drawing.size” 200 60

    this will allow you to set a custom thumb to whatever you like. Make sure you remove any code that refers to the .thumbnails property, otherwise it will set them back again.

    I have used Hitchhiker with some large folders of images of over 200 images, but I’m not sure if I have got to the 750 mark yet. I inherit a flowlayoutpanel, in the control, so it may be down to that. If you want to send me the screenshots, contact me through the tab at the top and i’ll be glad to take a look at them.

    As for setting the text on the control when in image text mode, Hitchhiker automatically sets this from the name of the image it is displaying. There isnt a way of changing this, unless there was something specific. do you mean the font/fontsize/colour of the text? Either way if you let me know what you need it to do I can add it to the assembly and release an improved version.

    Again, if anyone is using Hitchhiker in their scripts, it’s nice for me to hear of what people are doing with it. Please feel free to send me any details via the contact tab and I can feature them on this blog in the future.

    Regards,

    LoneRobot

  • avatar

    Hi,

    This is a great library I had a couple quick comments:

    Is there a way to specifically set the text on the thumbnail when displayStyle is set to imagetext? \

    Is there a way to display thumbnails at a larger size other than the extraLarge option?

    Have you had any issue with the rendering of the control when displaying large numbers of thumbnails for example around the 750 mark? I ask that because I have I can provide screen shots if you like. I have had a similar problem which I believed was cause by TableLayoutPanel(), I am not sure if you are using that under the hood.

    I apologise if some of the answers to these are in the docs, I must have missed them.

    Nice work, very well developed.

    Cheers,
    Dave

  • avatar

    hey,
    nice tool, thaks for sharing!

    a question… how to install it?
    must I put the dll file into plugin directory in max root?

    thank you

  • avatar

    Oh well, too bad for us, it seems like an awesome tool, but unfortunately we are still on 2009. Thanks anyways, keep up the great work.

  • avatar

    Hi Rotem,

    Many thanks and I hope you find it useful. This is indeed for max 2010 as it uses the managedservices.dll that was released with 2010. It uses this to pass information between max and the dotnet assembly.

  • avatar

    congratulations on the release. I am wondering if this version is also only for 3dsmax2010 and up?

Got anything to say? Go ahead and leave a comment!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>