Meaningful Shortcut Keys Listing.
 1-2  3-22  23-42  43-50

Previous
Next
 From:  BurrMan
2134.23 In reply to 2134.20 
>>>And actually come to think of it, you probably do not need to even remove that script: label at the front of the content for the separate file method, because it will actually be parsed by the script parser as a label and is legal JavaScript syntax I think. But you would normally remove it.>>>

I found most of it worked without change, however, one script which was the "keep construction lines" script, didnt work. The "remove kept construction lines" worked yet I had to use petr's script with all the other syntax to keep construction lines (but that is what I'm after anyway! The friendly name thing for brian.)

I'm always trying to confuse him!

Coming back with a post for Brian in a minute.
  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:  BurrMan
2134.24 In reply to 2134.23 
Here's a file for you brian.

What is in this zip are all the scripts from the "custom" shortcuts file I sent you awhile back made into js files for moi to read. A breif description of each script will jog your memory on what they do. The names are anything you want them to be, I just tried to keep them simple and descriptive for you to know what they are before you rename them.

So for instance solids.js is the script for selecting any solids. You could rename this to "jim.js" if thats what you want to call it, place it in a folder in your moi directory named scripts and assign any shortcut key to "jim.js" that you want.

It's a way for you to get the "friendly name" thing you want.

Here is a video of how it is done so you can do it to any of the other "long scripts" that you want a friendly name for.

http://www.exeink.com/caps/update4b.htm

Keep these around as when a new beta release comes out, you'll need to copy these into it's scripts folder also to go along with your shortcuts you set up for them.

Let me know if it's just to much for you or if you want clarification on anything else.
Rest assured that when the flux of beta releasing is over, a solution to acheive what you want will be easy.

Burr

EDITED: 19 Jun 2012 by BURRMAN

  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
2134.25 In reply to 2134.23 
Hi Burr,

> I found most of it worked without change, however, one script
> which was the "keep construction lines" script, didnt work.

I gave that one a try in a separate .js file, and it seemed to work ok for me over here, even including the script: at the start...

The ones that will be a bit different are the ones that are not inline script but instead the name of a custom command. Like for example in addition to the "keep construction lines" inline script (http://kyticka.webzdarma.cz/3d/moi/#KeepCLine), there is also a construction lines command (http://moi3d.com/forum/index.php?webtag=MOI&msg=1029.1).

To trigger that custom command one, you would have the command name in the shortcut keys, it would say something like "ConstructionLine" in the shortcut key instead of "script:moi.xxx.yy.zzz etc... "

You can't move a command name into a separate .js file, only actual script code.

Not sure if that is the problem you ran into?

Let me know if you need more details!

- 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
2134.26 In reply to 2134.24 
Very cool Burr!

Brian - just to clarify - Burr has converted those scripts that you don't like to see into separate .js files.

That will allow you to use a more simple name (the name of the .js file) inside of the shortcut key editor like you were asking for, rather than seeing the code directly in there.

Thanks Burr!

- 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:  BurrMan
2134.27 In reply to 2134.25 
I understand.

For some reason the "keep construction lines" inline script works for me if I use moi's shortcut editor, but if I just place it in a js file, it doesnt work. I'm still going to try to remove some things as per your post a bit ago, but there really is no need to try and figure this out as I also have petr's command of the same which works fine.
I'll post back if tinkering produces any answer. All the others worked....It's just this one???
  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
2134.28 In reply to 2134.27 
Hi Burr, can you please post the script that doesn't work here so I can check it out? Maybe there is a bug in there or something, it may be good to know why that one is not 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:  Brian (BWTR)
2134.29 In reply to 2134.27 
Is it any wonder that I LOVE the MoI users!

Burr/Michael----
allmost speachless in appreciation.

Brian
  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:  BurrMan
2134.30 In reply to 2134.28 
Its the one from the petr page. I tried copying it from many places to make sure.

It looks like this:

script:moi.geometryDatabase.getObjects().getConstructionLines().setProperty( "isTemporary", false );

I just put it in a text file like all the rest and it deletes the construction lines.

Heres a file also. If you make a shortcut to this "command" it fails.

EDITED: 19 Jun 2012 by BURRMAN

  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
2134.31 In reply to 2134.30 
Hi Burr - strange - I tested your exact same testlines.js file over here and it is working for me...

Maybe double check what your shortcut key definition is for that one, are you possibly missing the .js file extension or something on that one particular shortcut key?

- 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:  BurrMan
2134.32 In reply to 2134.31 
I put no extenion in moi. So if I create a file called test, it kills the selected command ie; if I select line tool and press shortcut, line tool exits! If I add extension to command, I get error.



EDITED: 19 Jun 2012 by BURRMAN

  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:  steve (STEEVE)
2134.33 In reply to 2134.32 
Very nice Burr, this will be 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:  BurrMan
2134.34 In reply to 2134.31 
I pretty much did, redid, checked and looked. Tried to remove the script tag. Tried to add the var gd that the "remove construction lines" script uses with no avail. Some kind of anomoly on "MY" system.

Just to recap, it works if I add it as inline to the command of the shortcut editor. All the others work also as js files. Just that one acts up.

But since it is not re-creatable and it's not an issue for me lets not waste your time.

If others do this and experience issues, we can re-visit it and pursue the answer.

Thanks again,
Burr
  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
2134.35 In reply to 2134.32 
Hi Burr - I see. But it looks like you're trying to put those scripts inside the \commands folder.

Running those as commands will basically work for many cases, but commands get some special processing and cannot currently be nested. If you try to run a command while an existing one is running, the running command is canceled and then the new command is started. That's what you are seeing in this construction line case.

To enable something to run without canceling the current command, it needs to be run as an "immediate script" instead of as a "command".

To do that, make a new folder called \scripts that is underneath the main MoI installation folder (so it is a sibling to \commands). Then put your testlines.js file into that \scripts folder (not \commands !), then put testlines.js including the file .js file extension part into the keyboard shortcut, and then it should work for you.

That will run the contents of that file as an immediate script instead of running it as a command.

Many of the things that you can set up as keyboard shortcuts that are inline scripts (with the script: prefix) can normally be run while a command is going, so you'll probably want to have most of the things like this in the \scripts folder instead of \commands.

Check out the message earlier in this thread:
http://moi3d.com/forum/index.php?webtag=MOI&msg=2134.20 again for some of the details about the \scripts folder.

- 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:  BurrMan
2134.36 In reply to 2134.35 
That was it... Thanks!

Must make a new video for brian!

I'll be back.
  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:  Brian (BWTR)
2134.37 In reply to 2134.36 
Several posts that made me cry---what is that all about! (Double Dutch was the word in my times!)

Burr, look forward to the new "Brian" movie mate.
Jeeze, I am so spoilt!

Brian
  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:  BurrMan
2134.38 In reply to 2134.37 
Here's the updated vid that reflects michaels input.

http://www.exeink.com/caps/update4b.htm

Also here is an updated file to download which unzips into a scripts folder to go with the video.

I'll go back and change the old post also.

Again, let me know if you need any help Brian.

Burr

EDITED: 19 Jun 2012 by BURRMAN

  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)
2134.39 
Seems very easy!!!

Just be careful than a Michael's name of scripts ".js" don't yet exist! ;)

PS can you put a space inside the name file?
like "erase line.js" ?
Or "erase_line.js" is only right?

Edited!
Cool you can put space and accents!!! (very cool for French people) :) (Inverse light here)

EDITED: 4 Nov 2008 by PILOU

  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:  Anis
2134.40 In reply to 2134.30 
Wow....

Burr's tips is very useful... :)

Thanks !
  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:  Brian (BWTR)
2134.41 In reply to 2134.40 
Burr
Sorry if this sounds a bit thick in the head--or even if I can explain clearly.

Just in relation to the lights in the js scripts folder from the zip.

In My shortcuts I have Ctrl+L Add Light. I presume these are additions.

From my Z key I get the Plugins Gallery which shows, I presume, the lights in your zip?
A. Should that item be in the plugins list? The suggested key strokes do not work any way!
B. However, I presume those keystroke suggestions (by Petr?) would be the best ones to use (with the items in your list) as I guess he is trying to keep a non duplicating list of keystroke allocations.

It's all just so complicated.

Brian

ps
And I just saw this, also nominated for the z key? It really is all out of logical control as far as I can logically work with!

ZoomArea – trigger the area zoom on the viewport that the mouse is over.
Z script:var v = moi.ui.getActiveViewport(); if ( v ) v.interactiveViewChange('zoomarea');

EDITED: 31 Dec 2008 by BWTR

  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:  BurrMan
2134.42 In reply to 2134.41 
Brian,
There is nothing different with those scripts in the zip file. You already have all of those and use them. For instance. The light scripts are the same as the f1 f2 f3 f4 from the plug in gallery.

Lets seperate a couple of things first.

Without thinking of the plugin gallery......Here is a description of 2 things. A "Script" and a "Command"

a "script" is when you see Michael write one of those long custom things that do something specific that someone requested. Like "how do I change the light direction?" Michael wrote a script to do this:

script:var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == 1 && dir.z == -1 ) { dir.set(1,1,-1); } else { dir.set(1,1,-1); } moi.view.lightDirection = dir;

A "command" is a more complicated operation bundled up into a single file. Most likely sevral lines of stuff like you see above in the script example. Petr wrote one called Nudge.js

The shortcut key is fully customizable for either of these. They are "whatever you want!"

This is done in MoI-options-shortcut keys. (I know you know this so follow here)

The difference is:
1. when you set a shortcut key for a "script", in the right side called command you have to type the big long script string michael posts in the forum.

2. When you set a shortcut key for a "command" the only thing you have to type in the right side is the name of the file. "Nudge"

What I provided is a way for you to put a "script" (the big long horrible looking thing that nobody understands) into a command that can be named anything you want! to type into that right side area of the shortcut editor.

Anytime a "shortcut key" is provided by me or petr it is only there for setup reasons. you can change it to whatever you want.

The "plugin Gallery" is a tool that is used to bypass all of this and work with whats called a GUI ( Graphical User Interface) All the code and shortcut key stuff is hidden inside of one file and you can just click on a picture to do what you want.

So just to answer specifically:
["From my Z key I get the Plugins Gallery which shows, I presume, the lights in your zip?"] YES

["A. Should that item be in the plugins list? The suggested key strokes do not work any way!"] NO, These are all duplicates of what you already have. They are just a means for you to name the command whatever you want.

["B. However, I presume those keystroke suggestions (by Petr?) would be the best ones to use (with the items in your list) as I guess he is trying to keep a non duplicating list of keystroke allocations."] The keystokes are totally customized by YOU! We all use whatever we like. You make your keystrokes anything you want without regard to what I may think. Does that make sense?

I will make a video that trys to clarify this as I can speak in my video.

To recap:
There are no new scripts in the files I sent you. Just a "method" to use your existing and future scripts. So the next time you see Michael post something cool for someone that you may want, say a script that makes "pudding", you can refer to this video and copy that script into a file and name it whatever you want, like "pudding.js" then refer to that file when you make a shortcut for the new script ( instead of having to type the big long ugly thing that he posts)

I just bought a new microphone today that I need to try out. I'll make a short demo later and post it for you to see what I mean.

Hang in there.
  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-2  3-22  23-42  43-50