MetaHopper

Welcome to Metahopper - a tool for controlling Grasshopper with Grasshopper :)

This library contains a number of components and commands for querying and manipulating Grasshopper components dynamically. You can retrieve components and objects based on their type, their library, the group they're in, or by selecting them directly - or even get all the objects in a document at once. You can then retrieve information about these components + parameters, the libraries they belong to. You can also manipulate objects directly: enabling/disabling, turning preview on and off, changing the color of groups, the text and size of scribbles, and the shape of sketch objects.


MetaHopper also adds a new menu to the Grasshopper document editor, that wraps up several functions:

BestPracticize Selection lets you pick a group and auto-insert params for all the inputs and outputs coming into/out of the group. This makes for nice, tidy functional groupings that make your Grasshopper code easier to read. 

Save Snippet improves on an earlier script I released - it lets you select any group of components + objects and save them as a single user object - without needing to cluster them. This is useful when you want things saved that have internal UI elements - like a graph mapper or slider for instance - that you want to be able to manipulate with the reusable chunk of code you're saving.

Bottleneck Navigator opens up a window that lets you see all the components in your definition, sorted by their "Runtime" - how long it took them to execute. You can click on any item in the list and zoom to it instantly - so that you can find opportunities for optimization in your definition.

Download it here!

  • Bennett Bossert

    Nice one Andrew!
  • Voronich Vladimir

    Great stuff!

  • Mostafa R. A. Khalifa

    Awesome ..... good job Andrew

  • Pablogomez

    great work Andrew! thanks for sharing!

  • Ortler Mark

    Very intressting tool...
    I like the bestpractice-thingy... very cool...

    But, I have to report a bug... I guess its a null-reference error...
    If I open a new defintion, and I go to the menuitem 'best practice', Rhino crashes...
    Furthermore, it would be nice if the command either detects if the group is allready in "best-practice-mode" OR if the command only modifies he selected groups... (to avoid duplicate parameter-components in a row).

    If I would have a free wish ;) it would be nice to expand the command with a form that asks for proper nameing of the inserted parameter-components...

    Greets
    Mark

  • Carlos Pérez

    Very cool! Do you want to add it to food4Rhino?: http://www.food4rhino.com/faq/developer/

    Regards,

  • djordje

    Needless to say: great plugin!!

  • Andrew Heumann

    I've updated the download link with a slightly new release - I believe it fixes the crash Ortler reports as well as another bug. If you downloaded before yesterday, use the link up top to get an updated version! 

  • phillip

    Nice one Andrew, thanks!

    The Bottlenecknavigator is really useful. What do you think about the often discussed heatmap display?

    I also like Best Practicizer. Could you imagine it would not also take over the name of in- and outputs, but also their type?

    phillip

  • Martin Siegrist

    Great idea, unfortunately I can't get the Enable / Disable to work. It does fade a component but data is still going through

  • Andrew Heumann

    Good catch Martin - this is now fixed. I've updated this and fixed a couple other bugs in the latest release - available from the link above!

  • Martin Siegrist

    Thanks, this works now.

  • Andrew Heumann

    @phillip - I thought about interpreting the type from the param it comes from. My only frustration with this - mostly in the context of clusters - is that maybe I'm doing some generic operation on geometry, and I'm testing it on meshes - now because the cluster input thinks it only accept meshes, I get an error feeding in surfaces where I wouldn't have if I haven't clustered. With that said, it might be nice to just do it anyway and let the user handle it... especially for those users who live in icon-land instead of text-land :D

  • phillip

    Now I see. Only thought of it "from inside the cluster looking out". Totally clear in that way. Thanks.

  • Andrew Heumann

    @philip you've given me an idea though - what might work is if I check from each new param both backwards and forewards - if it's mesh going in, and it feeds into another mesh input, chances are it's safe for me to make it a mesh param. 

  • Martin Siegrist

    It would be great to have a one click possibility in order to enable / disable whatever is inside a group. Your plugin is a great work around but I wish to have this as a standard option in the next GH version. A flip flop button would be even better. Same as the boolean toggle, however one click instead of double click.

    Any thoughts?

  • Andrew Heumann

    Hi Martin - something like this?

  • Andrew Heumann

    made it a little cuter. 

  • Martin Siegrist

    Yes, that's exactly what my friend and I were looking for. Will this be available in the next update of metahopper?

  • Andrew Heumann

    Hi Martin - the new build with this component is now available from the download link.

  • Martin Siegrist

    Awesome! Thank you

  • Rafat Ahmed

    Thanks Andrew, that's So Great and useful

  • Andrew Heumann

    hey all... new version for download with some goodies :D

  • Rémy Maurcot

    Great job Andrew !

  • Martin Siegrist

    How does the Set Object Value command work? I can't figure it out

  • Andrew Heumann

    Martin - feed it a reference to an object (use "get selected objects" for instance) - and then supply a value. Here are the currently supported types:

    Sliders - number values

    Toggles / Buttons - Boolean values

    Color swatches - color values 

    Panels - text content as a string or as a "Wrapped list" of strings if you want to supply a list

    Human Item Selectors / Value Lists - a single item to be selected or a "wrapped list" of items to select

    Data Dams - a boolean value (true to "pass" data)

    MD Slider - coordinates between 0,0 and 1,1

  • Jo Kamm

    Thank you, Andrew.  This plugin is fantastic! The Hide/Faint toggle alone is priceless.  All the controls for groups makes them functional, rather than merely aesthetic/organizational units.

    I seem to be having a small issue with the Set Group Properties component - selections seem to accumulate, rather than being replaced successively.  This doesn't happen with Set Wires, Hide/Show, or Enable/Disable, but the same issue is present with Set Scribble Properties.  Is this an inherent problem, or might there be a local setting that is affecting this?

  • Andrew Heumann

    Good catch Jo - I see this bug, never noticed that before. Will try to issue a fix today!

  • Andrew Heumann

    Jo - was an easy fix. download an updated version from the link above. Let me know if you run into any other issues. Thanks for catching this bug!!

  • Jo Kamm

    Thank you!  No other issues at this time.  

    Have you looked into making a component to control/edit Panels?  It seems not entirely different from Set Scribble and Set Group.  It would be potentially useful for setting formatting and color, since it's already possible to set contents using Set Object Value.  

  • Andrew Heumann

    Hey Jo - try the latest version for download above for control over panel attributes :)

  • Jo Kamm

    Amazing.  

  • Andrew Heumann

    Nope - GH scribbles don't have a color property. 

  • Jo Kamm

    Fun with coloring Panels. There's a lot of potential here for collecting and editing named or otherwise keyed components.  

    Would it be possible to set the location of components on the canvas when they are edited?  Like set value, but with location?

    ColorPanels Snippet

  • Martin Siegrist

    Tried again to set a sliders value, with no success.

  • Andrew Heumann

    Martin - you cannot connect the object directly - this would create an infinite loop (metahopper triggers slider, triggers update of metahopper, triggers update of slider, triggers update of metahopper etc.) You must use one of the selection components like "Components in Group" or "Get Selected Objects" to get a reference to the slider. Most metahopper components work on this principle.

  • Martin Siegrist

    ok, understood :-)

    Any chance this could be used to set the domain of a slider?

  • Andrew Heumann

    Martin - not currently but this has been a common feature request. Stay tuned!

  • Andrew Heumann

    More goodies - Martin, I made a component to set slider properties for you, and Jo, there's one to let you reposition objects on the canvas as well. Download from the link above! 

  • Martin Siegrist

    Thanks Andrew, it comes handy in my latest definition where I'm referencing rhino geometry for an animation. I can now create additional geometry in rhino to refine the animation and the slider in GH automatically adapts.

  • Martin Siegrist

    Sometimes it would be useful to have the option to control a slider through the keyboard. Lets say '-' key moves the value down, '+' key moves the value up. Any idea how to achieve that? Firefly has the 'Is key pressed' component, but it seems a bit complicated...