Meaningful Shortcut Keys Listing.
 1-20  21-40  41-50

Next
 From:  Brian (BWTR)
2134.1 
Is there a possibility of making the shortcuts listings more meaningful please?
Just listing the script along side a keystroke, in a majority of items, does not explain the actions involved.
See attached examples
As MoI is/as MoI might look?
Brian

EDITED: 30 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:  Michael Gibson
2134.2 In reply to 2134.1 
Hi Brian, it would probably be possible for me to do that if I disallowed having custom script code on a shortcut key and only allowed you to pick from a fixed list of actions that a key could possibly do.

But so far I have put more of a priority on not making restrictions like that.


It is possible to put a comment into the start of a piece of script, you can do that by putting a description inside of a /* */ comment block just after the script: keyword, for example:

script: /* Place a comment here */ moi.geometryDatabase.deselectAll();


- 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.3 In reply to 2134.2 
Michael---Are you saying that, putting a name at the end of a script will bring that naming to the beginning?

Would not what I am suggesting be, at least, a common/normal necessary approach to be added to the great work in Petr's listings on the Wikki?

(Sorry if I am showing my age!)

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:  Michael Gibson
2134.4 In reply to 2134.3 
Hi Brian,

> Michael---Are you saying that, putting a name at the end of a script
> will bring that naming to the beginning?

No - what I mean is that you can alter a script to put a description near the front of it if you wish. That would probably make it easier to remember later on what that script does.

To do that, enter your description inside of a /* */ block just after the script: label at the front.

For example, in the screenshot that you posted, it looks like you have a script under Ctrl+L that changes the light direction. The script currently reads like this:

script:var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == (.....continued....)

Instead if you wish to add a comment to it, you can edit that script and place your comment in like so:

script:/* Change light direction */ var dir = moi.view.lightDirection; if ( dir.x == 1 && dir.y == (...continued...)


Maybe I am totally misunderstanding what you are asking for though.


> Would not what I am suggesting be, at least, a common/normal
> necessary approach to be added to the great work in Petr's
> listings on the Wikki?

Actually, taking a second look at what you posted I'm not quite exactly clear on what you are suggesting.

At first I thought that the thing from Carrara that you posted was of its shortcut key editor. But taking a closer look, it seems to actually be a piece of printed documentation with a list of predefined shortcut keys on it?

Is your request to eliminate the ability to have custom shortcut keys in MoI and instead have a larger number of hard coded predefined ones?

- 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.5 In reply to 2134.4 
"Is your request to eliminate the ability to have custom shortcut keys in MoI and instead have a larger number of hard coded predefined ones?"

Sorry Michael, again a problem of understanding. I don't understand a difference between the two parts of the above---I thought that your system simply allowed us to nominate our own particular key stroke to the script involved--to whatever/by whom script.

A shortcut requires a script>and a key to activate
A shortcut Key requires a clear description of the action involved--in my world!

(What interest is there needed, by the user, me, in the actual detail of the "script"?)

The script should, I feel, be say hidden within the "Name of the Action", it could still then allow each to allocate a key stoke to it of our choice---IF that is important to anyone.

Am I sounding stupid?---sorry if so.

Currently I print out a listof the shortcuts (MoI screen shot) and write my explanation alongside it on the left. Something that does not seem "good practice"?

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

Reply to All Reply to All

 

 
Show messages:  1-20  21-40  41-50