Meaningful Shortcut Keys Listing.
 1-5  6-25  26-45  46-50

Previous
Next
 From:  Michael Gibson
2134.6 In reply to 2134.5 
Hi Brian, I think I sort of understand what you mean but there are an infinite variety of possible custom scripts that can be created...

I'm frequently creating new ones to help someone with some particular task.

So it isn't really particularly possible for me to have a predefined list of every single possible script that could be used and have a "friendly name" assigned to it already.


I guess it would be possible to have a friendly name if there was a separate "script editor" type list where you could enter in scripts and assign a "friendly name" or label to them, then you could reference that "friendly name" inside of the shortcut list.

But that adds some complexity - now there would be 2 editors that you would have to work with when you wanted to add in a new script, instead of being able to do it all in one place like you currently can in the shortcut key editor.


There are actually already a set of friendly names available for a certain number of scripts - these are what are referred to in MoI as a "command".

For example look at this part of your screenshot:




Notice how those do not have any kind of script code showing, it just says: "New", or "Copy", "Save", ...

I guess that is the kind of simple setup that you want? You already have it for those entries, right?

If you'd like to have only names like that you can do that if you only set up shortcuts that use the predefined commands in them instead of custom scripts.

Of course there is a lot of flexibility and new things that come as custom scripts - that is part of the nature of being able to create new things and not only relying exclusively on predefined commands...

Part of the price that is paid for that power and flexibility is having some code show up in that shortcut key editor.


There is another possibility as well - you could also copy each of those scripts to a .js file in a \scripts subfolder underneath MoI's main installation folder. Then instead of the actual script code in the shortcut key editor, you can put the .js filename in there instead. Now you have an additional file that you have to move in between installations but you would get to have a shorter name in that shortcut key dialog if having short names in there is your primary focus.


Maybe in the future I can come up with an alternate way to install a script, like drag/drop the .js file onto the MoI window to add it, and pop up a prompt to let you enter a shortcut key right then instead of going to the shortcut key editor. I think that would probably be a lot more aligned with what you want, but it will probably be a while before I will get a chance to set that 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:  Frenchy Pilou (PILOU)
2134.7 In reply to 2134.6 
Cool trick the /* Change light direction */ !
---
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:  steve (STEEVE)
2134.8 In reply to 2134.6 
Basically this problem arises with any software...how to remember the shortcut keys. Especially if you use a few different applications.

A lot of apps do not have any simple way of looking up the shortcuts, and even fewer display the code behind the shortcuts. So it is pretty normal to rely on a list, printed or otherwise, provided either by the developers or by the community or by oneself.

Being able to assign shortcut keys is really important. What I generally try to do is keep the same set of shortcuts no matter what app I am using.

Imo being able to view the code and even better to be able to tweak it is a great advantage. I'm just waiting for that tutorial explaining the ins and outs of simple coding in MoI :)
  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
2134.9 
Talking about custom shortcut I think sillo implementation is very smart ... just move your mouse cursor over a command from the menu, and hit a key.
Never saw something that easy. That said it's just a cosmetic stuff, the actual moi system is cool, except that you have to check the command folder to actual know the exact command name, like planer is in fact PlanarSrf, etc.
  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.10 In reply to 2134.9 
Hi PaQ,

> except that you have to check the command folder to actual
> know the exact command name, like planer is in fact PlanarSrf, etc.

Eventually I would like to have something like a list of commands that you can optionally pop up there so you don't have to know or look up the name. (the names are listed in the documentation here).

But it would have to be incorporated as a kind of optional helper thing, it would not be so good if you could only pick off a predefined list because then you couldn't enter in totally custom script macros.

MoI's current system could definitely use some improving.

But it is all a matter of priorities. I could spend a month working on refining the shortcut key editor to be much nicer but then that is a month of work that is not happening on basic modeling tools.

Right now I've put a higher priority on refining other areas of the software that will be used much more frequently.

I haven't prioritized work on refining the shortcut key editor very much because it tends to be something that you go in and set up once and then don't have to worry about much more after that. That makes it kind of a bad payback for the amount of effort involved in enhancing 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:  Brian (BWTR)
2134.11 In reply to 2134.9 
Michael
"I guess that is the kind of simple setup that you want? You already have it for those entries, right?"

Yes! The script as such is meaningless to me, and either writing or modifying is unlikely to ever be in my work flow. (Same for many/most? MoI users!)

Now I would suggest the opposite approach in that the scripting list should be on a separate or user made panel!

The default inbuilt shortcuts lists should only be in the clear and simple action descriptive format!

Anyway, I have made my point. Thanks.

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:  PaQ
2134.12 In reply to 2134.10 
>> But it is all a matter of priorities. I could spend a month working on refining the shortcut key editor to be much nicer but then that is a month of work that is not happening on basic modeling tools.

Right now I've put a higher priority on refining other areas of the software that will be used much more frequently.




Hi Michael, I get you loud and clear, I defenitively prefer to see modeling improvement that an enhanced shortcut system, which works quite well allready, I really don't have any problem with that. Be able to assign script on the fly save me a lot of boring tasks allready !!!

That's why a call the Silo shortcut stuff a 'cosmetic' feature :) (but I still think it's the first time I see something that simple and easy :)).
  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.13 In reply to 2134.12 
Hi PaQ,

> That's why a call the Silo shortcut stuff a 'cosmetic' feature :)
> (but I still think it's the first time I see something that
> simple and easy :)).

Sometimes making certain things too easy can actually cause problems of its own too...

With that system I would worry somewhat about unintentionally assigning a key.

Like say you have E for extrude. Then one time after finishing some other work where you happen to have the mouse over top of some other UI, you then hit E to want to launch extrude. Does it re-assign E to the UI that your mouse happened to be over?

Or what if you were expecting to type in a sequence of characters into a text input box, like when you are making Text objects with the Draw solid / Text tool . What if you accidentally did not have focus in the input box? It seems like you could possibly accidentally assign a whole bunch of shortcut keys with that... (although actually in MoI's case it puts focus in there automatically if you start typing, but I could foresee someone typing a sequence of characters and then getting them all assigned...)

- 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.14 In reply to 2134.11 
Hi Brian,

> Yes! The script as such is meaningless to me, and either
> writing or modifying is unlikely to ever be in my work flow.
> (Same for many/most? MoI users!)

Right, but there is one thing that you do seem to want to do with scripts which is take one that has been written by someone else and install it to use it on your local copy of MoI.

Right now it is possible to do this by copy and paste using only one editor in MoI - the shortcut key editor.

Being able to have script code inside of that editor is what makes that kind of "one place setup" possible.


> Now I would suggest the opposite approach in that the scripting list
> should be on a separate or user made panel!

If I did that, then if you wanted to install a script that I had posted here, you would have a more complex procedure to follow instead of just copy/paste in one spot, you would have to go to that separate panel to set up the script, and after that go to the shortcut key editor to assign a shortcut key.


It would make the shortcut key list look prettier, but at the expense of making it a more difficult procedure to install a piece of script that has been posted in a message here.


The one thing that I can think of that could possibly improve this without making things more complicated would be to change the way that I distribute scripts, and distribute them as a file attachment rather than as a snippet of inline code that you copy/paste. It may be possible for me to set that up in the future.

- 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:  PaQ
2134.15 In reply to 2134.13 
Hi Michael,

Yes I understand this unintentionnaly assigning problem, Silo manage this by only allow this shortcut creation when browsing the top menu.



So typing text/numeric stuff while open the menu should not happends quiete often. That's said ,MoI don't have this kind of 'double' command menu, and more over
there are not so many commands to assign compared to a poly modeler. As you said, actually in MoI you take some time to create you shorcuts once and you don't come back to it often.

EDITED: 3 Feb 2010 by PAQ

  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.16 In reply to 2134.14 
Thanks Michael.

That last sentence gets to the point nicely for me.

I just think the current way goes against the simplicity/friendly usage that is the beauty of MoI
(

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.17 In reply to 2134.14 
with regard to a script line being in a js file.

If you just put "script:var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == (.....continued....)" into a file named "fred.js" does it run by calling that file or does the js file need "other" properly formatted syntax to be functional?
  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.18 In reply to 2134.15 
Hi PaQ, that makes more sense to only do it for drop-down menu items.

But yeah that does not apply very well to MoI since it has been a major effort of MoI's UI to try and eliminate that kind of drop-down menu UI as much as possible.

There will be some more instances of it happening in MoI, like the "Tools" button that I want to add in the object properties panel will probably end up being a big drop-down menu like that. But I hope to only place less frequently used or special purpose things in there.

- 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.19 In reply to 2134.17 
pardon! Answered my own question. Yes it works this way with no additional code.
  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.20 In reply to 2134.17 
Hi Burr,

> If you just put "script:var dir = moi.view.lightDirection; if ( dir.x == 1
> && dir.y == (.....continued....)" into a file named "fred.js" does it run
> by calling that file or does the js file need "other" properly formatted
> syntax to be functional?

To use the separate .js file style, you just need to remove the script: label at the front there.

That initial script: label is something special for the shortcut key editor to clarify whether the stuff typed there is an inline script or the name of a command. Actually there is a new experimental thing in the current v2 beta where you can eliminate that label if you want even from inline scripts because it will assume that the contents are inline script if it does not match a command name and does not end in a script file extension (like .js). But the script: label is required for inline scripts to work with version 1.0 though.

Also when you have the script in the separate .js file you don't need to jam it all on a single line like the inline script, and you can use an #include "library_filename.js" directive in the .js file to combine other script libraries into the current script file when it is executed. (the #include does not work with inline scripts, only with separate-file scripts).

Other than that all the syntax and stuff that is available to it is all the same as the inline script.


Then to use the separate script file there are 2 options - you can either place the full path to the script file in the Command part of the keyboard shortcut, like:
c:\scripts\MyScript.js or you can put just the file name itself, like: MyScript.js in which case it will look in a \scripts subfolder inside of MoI's main installation folder for it. This folder is not created by default, just create it if you want to place scripts there.

But you may want to use the full path method because then you won't need to move files around when you get new betas, etc...


Oh yeah one other thing is that it should be theoretically possible to make a script using the VBScript language instead of JavaScript, if you use a .vbs file extension for the script file instead of .js but I have not really tested that. Inline scripts are assumed to be JavaScript.


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.

- 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:  steve (STEEVE)
2134.21 In reply to 2134.19 
That's a useful discovery you've made, 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:  Brian (BWTR)
2134.22 In reply to 2134.20 
Michael/Burr

You are talking a foreign language to me in those last posts.
For me, lifes too short! (It's bad enough that the computer wants to use US spelling in place of English!!)

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

Reply to All Reply to All

 

 
Show messages:  1-5  6-25  26-45  46-50