Copy-paste from Rhino 7 to MoI3d
 1-8  9-28  29-48  49-51

Previous
Next
 From:  BurrMan
9890.29 In reply to 9890.28 
Hi Michael,
Thanks for the help, i'm pretty sure it's sorted. Again i was confused.

I didn't read the "it looks for v7" part. I was using v6. Just wanted to test if i had it installed and working correctly. I most likely won't be moving to v7. It was a "Just in case" installation...

The helper app may be a good way to handle it going forward, (hopefully that was easier to cook up) so you don't have to mess with the base much... may not be enough guys using the copy/paste functionality to warrant the work...

Thanks again. Sorry about the extra work from my end...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.30 In reply to 9890.29 
Hi Burr, yes a standalone utility like this is definitely easier to cook up than updating the library built in to MoI.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shane (SHANE_W)
9890.31 
Hi Michael, any chance we could have a similar option for Mac users?

Thanks,

-Shane

rendering . animation . oddlyeven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.32 In reply to 9890.31 
Hi Shane,

re:
> Hi Michael, any chance we could have a similar option for Mac users?

Yes I should be able to make a Mac version as well.

Is the Mac Rhino 7 working for copy/paste from MoI into Rhino like the Rhino 7 Windows version? Or is it not working in both directions?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shane (SHANE_W)
9890.33 In reply to 9890.32 
Hi Michael, it will not work in either direction for me.

Thanks,

-Shane

rendering . animation . oddlyeven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  feirui445
9890.34 In reply to 9890.16 
I found that one step can be successful:

1. Select the overall model in rhino v7 and press Ctrl + C

2. Select one face of the model in rhino v7 and press Ctrl + C

3. Back to moi3d and press Ctrl + V,Ctrl + V, the model in rhino v7 will be copied

It's a little cumbersome

Note: the subdivision model in rhino v7 needs to be converted to Nurbs model, which can be copied

EDITED: 6 Jan 2021 by FEIRUI445

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.35 In reply to 9890.33 
Hi Shane, a Mac version of the clipboard helper app is attached here.

The way it should work is to unzip it somewhere on your system, if you want to put it with some other MoI files you could put it in the moi appdata directory which is:
/Users/<your username>/Library/Application Support/Moi (note Library folder is hidden by default).

Then to enable copy/paste from Rhino v7 into MoI, modify the Cmd+V shortcut in MoI under Options > Shortcut keys, and put in this:

script: moi.filesystem.shellExecute( '/Path/UpdateRhinoClipboard', 'target=moi', true /*wait for finish*/ ); moi.command.execCommand( 'paste' );

Let me know if that makes the Rhinov7 to Moi direction work ok, if not maybe I don't have the right id value for the v7 clipboard format and we can dig into that some more.

Then if that direction is working ok we can figure out the next step for doing a similar modification to the Rhino Cmd+V shortcut key to get the other direction working too.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shane (SHANE_W)
9890.36 In reply to 9890.35 
Hi Michael, I could not get your clipboard helper to work.

I placed the helper in my:

/Users/shane/Library/Application Support/Moi



I added the following text in my Cmd+V:

script: moi.filesystem.shellExecute( '/Users/shane/Library/Application Support/Moi/UpdateRhinoClipboard', 'target=moi', true /*wait for finish*/ ); moi.command.execCommand( 'paste' );

I also launched the app to make sure it had permission to run.

-Shane

rendering . animation . oddlyeven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.37 In reply to 9890.36 
Hi shane, re: clipboard helper, it appears that the space in the path when using the "Application Support" folder gums things up.

Please try placing the UpdateRhinoClipboard binary in some path without any spaces in it, and then update the Cmd+V script to have that path in it. Does it work ok then?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.38 In reply to 9890.36 
Hi shane, or a path with spaces in it will probably work if you add double quotes around it, like:

script: moi.filesystem.shellExecute( '"/Users/shane/Library/Application Support/Moi/UpdateRhinoClipboard"', 'target=moi', true /*wait for finish*/ ); moi.command.execCommand( 'paste' );

So that's got single quotes ' ' around the outside, and then double quotes " " inside of that.

I'll see about updating moi.filesystem.shellExecute() to handle that automatically when there are any spaces in the path.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shane (SHANE_W)
9890.39 In reply to 9890.38 
Thanks Michael, the double quotes did the trick! I tried it on some larger files and it seems to be working great.

-Shane

rendering . animation . oddlyeven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.40 In reply to 9890.39 
Hi Shane,

re:
> Thanks Michael, the double quotes did the trick! I tried it on some larger files and it seems to be working great.

That's great!

So for the other direction going from MoI into Rhino, you'll need to set up a Python script like the attached one. It appears that Rhino v7 Mac uses the Rhino v6 Mac clipboard format so put target=Rhinov6 as the command-line parameter to the UpdateRhinoClipboard executable inside the .py file.

Then for your paste into Rhino you'll need it set up something like:

RunPythonScript /Applications/RhinoPasteFromMoi.py Paste

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  shane (SHANE_W)
9890.41 In reply to 9890.40 
Thanks Michael for working on this! I haven't tried the MOI > Rhino yet as I rarely go that way. Once my workload lightens up I will give it a try.

-Shane

rendering . animation . oddlyeven.com

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mdesign
9890.42 In reply to 9890.41 
I`ve tried today and MoI3d -> Rhino v7 went ok without any additional plugin. Thanks Michael for making possible again copy-paste between Rhino->MoI with your additional plugin. It`s very useful.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mdesign
9890.43 
Hi, after this Copy-Paste tweak I have problem copy-paste inside of MoI3d. Because when I hit copy-paste inside MoI3d then nothing happen (pasted mesh is not pasting). I have to click "save as" and after hitting that button pasting is finishing properly. So I cancel saving and I have pasted mesh. Is there any simpler way to copy-paste inside Moi3d without clicking on "Save As" button to finish pasting operation?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.44 In reply to 9890.43 
Hi mdesign, so this is happening when you modify the Paste command in MoI to run the helper program for enabling copy/paste to Rhino v7?

What operating system are you running on and what version of Moi are you using?

Can you show what you have for your paste keyboard shortcut now?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mdesign
9890.45 In reply to 9890.44 
Sorry for late reply.

https://www.youtube.com/watch?v=h4njmGKkPKI

Windows x64

1) create cube
2) ctrl-c cube (copy cube)
3) del cube
4) ctrl-v cube (paste cube). Nothing happen. There is no cube in the scene.
5) Click save as - cube will paste properly.

This is very annoying on bigger projects.

Cheers!!!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.46 In reply to 9890.45 
Hi mdesign, so this is happening when you modify the Paste command in MoI to run the helper program for enabling copy/paste to Rhino v7?

Or have you not done any modification to the paste keyboard shortcut ?

If you have modified it can you show what you have in the keyboard shortcut now for Ctrl+V ?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mdesign
9890.47 In reply to 9890.46 
I`ve done modification on ctrl-V shortcut as you adviced before to have copy-paste feature between MoI and Rhino 7.

And it works well. But after doing that it broke my pasting inside MoI (with using ctrl-v). Maybe I should give other shortcut for Rhino paste not ctrl-v because I broke paste functionality inside MoI (when I use only MoI and I don`t use MoI-Rhino coop).


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9890.48 In reply to 9890.47 
Hi mdesign, it looks like the shortcut key is not quite right, there's a description for how it needs to be set up earlier in this thread here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9890.22

The key thing that you're missing:
quote:

One thing to note is the path name in the script code needs doubled backslash characters. Instead of just one \ as the path separator it needs 2 like \\. That's because in JavaScript a single \ is an escape character for special characters like \t means tab or \n means newline. The \\ means make a single backslash in the actual string.

So where you have "c:\UpdateRhinoClipboard.exe", you instead need it to be "c:\\UpdateRhinoClipboard.exe" - note the doubled backslash.

There is probably a bug where if you give an invalid path to moi.filesystem.shellExecute() with the "wait for finished" enabled it ends up getting stuck waiting for a non-existent program to finish running and then running some other command cancels out from that wait. I'll see if I can fix that up.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-8  9-28  29-48  49-51