Copy-paste (or quick import) meshes between Rhino<>Modo

Hi Nerds,

Has anyone come up with an elegant way to copy/paste meshes between Rhino <> Modo?

We go back and forth a lot, and I’d love to see a quick way to bring a mesh to the active layer (rhino)/ Mesh item (modo) between the two apps. Is there such a thing out there?

Thanks,

G

Hi Gustavo - elegant, not, but you can make a sort of bucket file that you export to

! _-Export _Pause "Path to Export.obj inside double quotes" _Enter

and a similar one for importing. At the Modo end, I do not know if that is convenient at all.

-Pascal

Hi Pascal, Yeah lack of elegance is the problem. But don’t leave just yet… I can tell you what the problem is, maybe we can get there at least on the Rhino side…

When I import an OBJ I get this dialogue:
image

How do I hard code in the macro those options?

Hi Gustavo - use the -Export (dash) command like in my mock-macro above. You’ll get the options at the command line (try it with macroEditor first) that you can put in the macro all filled in as you like.

-Pascal

cool! I’ll try that. Ok I see that .obj import does bring the objects to the active layer, so that solves the problem when I need to bring a/some new mesh object/s to an existing layer.

Now that you took my easy bait… next level problem… we do a lot of quick design variants/iteration by duplicating layer/object, making modeling changes and so on. So in this case I’m working now I have these extra new options in Modo:

image

I can right click on them and export each as .obj to a project folder and the result looks like this:

Can I import each (or all at once!) .obj and have them show up in a new layer called ‘filename’ (without the ‘.obj’?

No rush, but having this would be really useful, now that I play with this, even more useful that just one mesh at a time to active layer.

  • From Modo I can also generate a single OBJ with all those objects, if that makes things easier, but I played with all options and the only thing I can get Rhino to do at import is reading each of the Modo mesh items (layers) as object name, not as a layer.

Thanks,

G

Hi Gustavo - yep, with a, you know, script. I’ll take a look.

-Pascal

1 Like

@gustojunk - it’s raining, so here’s a start - none of the obj options are set here - if you import an obj first it will use the same options, and once I know what they all are they can be set in the script. Let me know if this is on the right track.

BatchOBJToLayers.py (1.4 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

1 Like

It’s late here but I had to check it. It’s beautiful! This saves us a lot of manual work!

Thanks so much Pascal.

Gustavo

1 Like