Script help?
 1-8  9-28  29-32

Previous
Next
 From:  Michael Gibson
952.9 In reply to 952.8 
Hi Pilou, there can be only one command or script attached to one particular key combination.

If you try to add more than one into the editor, you will find that only one of them has been actually used when you open the editor again - the one that was defined first in the editor list will be the one that is kept.

If you want to use the arrow keys to do different things, you can use some modifier keys.

Like for instance you can use just the plain arrow keys for rotation, and then use Ctrl+Arrow keys for nudging.

You can use Shift, Alt, or Ctrl either alone or in combination with one another as modifiers.

- 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:  Jesse
952.10 In reply to 952.9 
Hi Michael,

I installed the Nudge script and added some shortcut keys.
It worked, but I couldn't move objects up or down in Z in any viewport.

Then I took the Nudge script out of the command folder
so I could try the NudgeViewAxis script, using the same
shortcut keys, but it would not work at all.

Are there a different set of commands needed for the NudgeViewAxis script?

I'd prefer to use the the Nudge script, but I couldn't get either one
to move things in the Z axis...maybe I'm missing something?

Perhaps I could assign PageUp and PageDown for the Z axis if there's
a special command for it.

Thanks,

Jesse
  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
952.11 In reply to 952.10 
Hi Jesse - that Nudge script was just never set up to handle moving in the z direction.

I've tweaked the attached version to support it. If you use this new version, you can set PageUp and PageDown for z nudging, like:

PageDownNudge zdown
PageUpNudge zup


You should also be able to set up Ctrl+PageUp/down and Alt+PageUp/down for larger or smaller steps same as mentioned here: http://moi3d.com/forum/index.php?webtag=MOI&msg=952.3

Please let me know if you have any problems setting it up!

- 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:  tyglik
952.12 In reply to 952.10 
Hi Jesse,


I prefer to use a Paul's script - NudgeViewAxis. From my point of view, it makes more sense to me to move a points in "cplane coordinate system" than world one...

>>I could try the NudgeViewAxis script, using the same
>>shortcut keys, but it would not work at all.

You must define a shortcut like:
LeftArrow NudgeViewAxis Left

or rename the file from "NudgeViewAxis.js" to "Nudge.js" if you don't want to change the command part of shortcuts.

I guess I should rename the js file in zip file itself and let only the different name of zip file on my webpage....

Petr
  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:  Jesse
952.13 In reply to 952.11 
Thanks Michael,

I'll give it a try.

Jesse
  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:  Jesse
952.14 In reply to 952.12 
Hi Petr,

I'll try this one too... for some reason I've always set up
Nudge in Rhino to work from the world view, so I guess I'm
just used to that way.

Either script really helps...

Thanks,

Jesse
  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:  Dymaxion
952.15 
The nudge script is nice, but it'd be nice to have it default to move by the smallest snap step, instead of 1 unit. How do you get at the current snap step sizes? Altering the script looks trivial, given that.
  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
952.16 In reply to 952.15 
Hi Dymaxion,

If you want to set your arrow keys to go by the smallest step size when you push them without any modifiers (like Alt or Ctrl) , then that should be possible by modifying your keyboard shortcut.

Put in keyboard shortcuts like this:

LeftArrow Nudge Left Small
RightArrow Nudge Right Small
UpArrow Nudge Up Small
DownArrow Nudge Down Small

By adding that parameter "Small" at the end there, that should cause the plain arrow keys to move by the small increment amount.

If that doesn't do what you want, can you please describe it a bit more, and maybe attach or show a link to which version of the Nudge script you are using? (because there are a few variations of it).

- 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
952.17 In reply to 952.15 
Or do you mean you want to move it by the current grid size setting, the one that is set under Options / Grid?

You can retrieve that value in a script by using this: moi.grid.snapSize

- 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:  Dymaxion
952.18 In reply to 952.17 
Great! That's exactly what I was hoping for -- works just fine. I'm using the global-axis version from Petr's page. Petr, if you read this, you might think about making the change -- just change the fixed value of 1.0 on line 17 to "moi.grid.snapSize".

One more question -- I know you haven't had time to write docs for the scripting APIs (and believe me, you've got my sympathy there), but do you have a list of them? I've been pondering messing around with reflection and generating a list, but it seems like a waste of time if you already have one. If so, it'd be great if you could, say, toss it up on the wiki -- I know I'd be happy to at least document things piecemeal as I find my way around.

/Ella
  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
952.19 In reply to 952.18 
Hi Ella,

There is a list of all the stuff available to scripts, check out the moi_idl.zip file attached to this post: http://moi3d.com/forum/index.php?webtag=MOI&msg=1078.13

When you unzip that you will get the moi.idl file which is the definition of all the scripting interfaces for MoI. It's basically a list of all the properties and methods available.

I've been meaning to put up something for this in the wiki for a while, I'll see if I can figure out a good spot to carve out for that tomorrow.

- 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:  wheel
952.20 
Hi, I quite like the idea of changing the nudge distance to whatever the "grid snap" is set to, but am having problems getting it to work. I have tired setting the " var dist = moi.grid.snapSize; " in both Petr and Michaels nudge script versions. Should the hotkey settings be the same for Petrs and Michaels versions , the four arrow keys and page up and down ?
  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
952.21 In reply to 952.20 
Hi Wheel,

> but am having problems getting it to work.

Could you please post your modified scripts here as an attachment? That will make it easier to take a look at them and see what is not working in it.


> Should the hotkey settings be the same for Petrs and Michaels
> versions , the four arrow keys and page up and down ?

Yeah, if I remember right I think that the shortcut key settings were the same.

- 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:  wheel
952.22 
Hi, here is the tweaked version of your script . Thanks for looking.
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:  Michael Gibson
952.23 In reply to 952.22 
Hi Wheel - your modified script seems to work ok for me over here.

Maybe it's a setup problem?

That Nudge.js file should be copied into the \commands sub-folder underneath MoI's main installation folder (like C:\Program Files\MoI 1.0\commands).

Then under Options / Shortcut keys, you'll need settings like this:


KeyCommand
DownArrow  Nudge Down
UpArrowNudge Up
LeftArrowNudge Left
RightArrowNudge Right
PageUpNudge ZUp
PageDownNudge ZDown


Note one subtle thing here is that the left-side "Key" part does not have a space in it, like DownArrow is all one word with no spaces inside it. While the "Command" part does have a space between Nudge and the second word.

- 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:  Frenchy Pilou (PILOU)
952.24 In reply to 952.23 
sorry what is a "Nudge" and his function?
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
952.25 In reply to 952.24 
Hi Pilou - Nudge means to move by a small amount.

The Nudge command allows you to set up keys such as the arrow keys to move around objects or points by a small amount on every key press.

- 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:  Frenchy Pilou (PILOU)
952.26 In reply to 952.25 
Thx because my dico has given me somthing like that "a knock elbow" :)
  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:  PaQ
952.27 
Sorry if it was allready asked, but is it possible to know which viewport the mouse is over, and modify the direction of the nudge according to it.
I mean if:

- the mouse is over the top view, right and left arrow 'nudge' on the x axis, up and down arrow on the z axis
- the mouse is over the front view, right and left arrow 'nudge' on the x axis, up and down arrow on the y axis
- the mouse is over right view, right and left arrow 'nudge' on the z axis, up and down arrow on the y axis

do you see the idea ... looks more natural for me, but maybe I'm alone :P

of course the perspective view require the 6 keys, like it is mapped now (page up page down for y move)
  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
952.28 In reply to 952.27 
Hi PaQ,

> but is it possible to know which viewport the mouse is over, and
> modify the direction of the nudge according to it.

I think the version attached to this message should do that:
http://moi3d.com/forum/index.php?webtag=MOI&msg=952.6

- 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-32