A quick (and dirty) Script Palette script
 1-20  21-40  41-44

Next
 From:  dinos
5993.1 
I know that Michael is working on a proper solution, but i had some free time a few weeks ago and decided to have a go at a simple Script Palette.
I find it useful for all those scripts that are good to have, but don't use often enough to remember their shortcuts.
I meant to improve it a bit but i didn't have much time available, so here it is.

Please note that i'm reading the shortcuts & scripts definitions from the moi.ini file, so after you choose the commands you want to add to the palette you MUST quit and relaunch Moi before they appear in the palette.
This is a major limitation, but i cant see a way around it at the moment. Perhaps Michael can point me in the right direction.


Installation.
Copy the file ScriptPalette.htm from the zip into your ui folder.

Then create a shortcut (i used Z):
code:
script:moi.ui.createDialog( 'moi://ui/ScriptPalette.htm' );


Usage.
It works with both scripts in the commands folder and inline scripts.
To make a script appear in the palette you have to modify it in Options/Shortcut Keys and edit it to include a comment beginning with an !

So if /*Script Comment*/ is edited to /*!Script Comment*/ then a command with the name "Script Comment" will appear in the palette.
The comment can be anywhere in the script.

For example (inline script):
code:
Shift+I | script: /*Isolate selection */ moi.geometryDatabase.isolate();

must be edited to:
code:
Shift+I | script: /*!Isolate selection */ moi.geometryDatabase.isolate();



or if its a command in the commands folder:
code:
Shift+U | UnwrapCurve  /*Unwrap Curve*/

it must be edited to:
code:
Shift+U | UnwrapCurve  /*!Unwrap Curve*/




Then quit Moi, relaunch and press Z (or whatever shortcut you used).


I've updated the script to automatically close the popup window after a command is selected. (ScriptPalette.htm.zip)



The original version with the close button is still available (ScriptPalette_Close.zip)





I hope you find it useful.
Please post any bugs you find.

Dinos

EDITED: 6 Feb 2014 by DINOS


  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:  dinos
5993.2 
A small update to sort the scripts alphabetically.

EDITED: 6 Feb 2014 by DINOS

  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:  Andrei Samardac
5993.3 In reply to 5993.2 
Thanx, really cool feature)

-----------------------------------------
Portfolio: www.samardac.tumblr.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:  Mauro (M-DYNAMICS)
5993.4 
Thanks Dinos !
  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:  Andrei Samardac
5993.5 
Does not work, just enpty small window appears, wha tit can be?

____________________________________________________________________
My Portfolio: www.samardac.tumblr.com
A lot of my Tutorials!
Subscribe to my youtube channel: http://www.youtube.com/samardac
Russian community of MOI 3D: www.vk.com/moi3d
  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
5993.6 In reply to 5993.5 
HI Andrei, did you possibly put the file in your "commands" folder instead of the "ui" folder like this particular mod is expecting?

- 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:  Andrei Samardac
5993.7 In reply to 5993.6 
yep I put it in command folder, thanks!

____________________________________________________________________
My Portfolio: www.samardac.tumblr.com
A lot of my Tutorials!
Subscribe to my youtube channel: http://www.youtube.com/samardac
Russian community of MOI 3D: www.vk.com/moi3d
  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)
5993.8 
Missing this one!
Seems very cool for my old memory!

EDITED: 6 Feb 2014 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:  Frenchy Pilou (PILOU)
5993.9 
Bravo! Works fine!

What file must have to edit for have French "Fermer" against the English "Close" button?

EDITED: 6 Feb 2014 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:  Andrei Samardac
5993.10 In reply to 5993.9 
May be you have to search for this woard "close" in .htm file?

____________________________________________________________________
My Portfolio: www.samardac.tumblr.com
A lot of my Tutorials!
Subscribe to my youtube channel: http://www.youtube.com/samardac
Russian community of MOI 3D: www.vk.com/moi3d
  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)
5993.11 In reply to 5993.10 
yes...but it's no so simple for me to find the good file! :)
  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:  Andrei Samardac
5993.12 In reply to 5993.11 
I am not so strong in this things))) This plugin consist from one file ScriptPalette.htm , if this close word is in that file search in it :) But may be this word is in another file do not know, but try :)

____________________________________________________________________
My Portfolio: www.samardac.tumblr.com
A lot of my Tutorials!
Subscribe to my youtube channel: http://www.youtube.com/samardac
Russian community of MOI 3D: www.vk.com/moi3d
  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)
5993.13 In reply to 5993.12 
Of course I can try some files of different arborescences but I prefere than an expert tell me the good file directly, it's more prudent! :)

French Version! (before the French version of the button! :)

http://moiscript.weebly.com/palette-de-scripts.html


Ps Does it possible to make several palettes ?

EDITED: 6 Feb 2014 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:  bemfarmer
5993.14 
Finally got the script to work, after following the directions :-)
Note, there cannot be a space before the !

- 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:  dinos
5993.15 
Hi Frenchy.

Thanks for the french version! :-)

There is no easy way to make than one palette. You could make a copy of the script with a different name and change the ! in the code to something else for the second palette, but it would make it an even bigger hack than it already is.

The close button is just the standard moi:DialogClose tag. I'm not sure if this localized along with the rest of Moi3D if you are using a different language.

I remember looking for a way to close the Dialog window after a command is selected, but i couldn't find one. That would eliminate the close button altogether and improve the operation of the script.
  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
5993.16 In reply to 5993.11 
Frenchy,
It is working from the English strings "; Common dialog buttons Dialog close button=Close".

I don't know why it is not translating with the French strings. It could be the way the filesystem is called in the script? I think Michael will have to look at this.
  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
5993.17 In reply to 5993.9 
Hi Pilou,

> What file must have to edit for have French "Fermer" against
> the English "Close" button?

Just make sure you have your Language set to French (Options > General > Language), then the dialog should show this (screenshot from my system with MoI language set to French):



This was with the current v3 version, are you maybe using an older version Pilou?

- 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
5993.18 In reply to 5993.16 
Hi Burr,

> I don't know why it is not translating with the French strings. It could be the way the filesystem
> is called in the script? I think Michael will have to look at this.

It's working fine for me over here - when I set Options > General > Language to French, I get a French language close button, as shown above.

You can even have the dialog open when you change the language and it updates dynamically as the current language is switched...

Do you see something different than that over there?

I was testing using the current v3 beta - Pilou are you using an old version maybe?

- 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
5993.19 In reply to 5993.15 
Hi dinos,

> The close button is just the standard moi:DialogClose tag. I'm not sure if this localized
> along with the rest of Moi3D if you are using a different language.

Yup, it is localized and the localization seems to be working fine for me over here...


> I remember looking for a way to close the Dialog window after a command is selected, but
> i couldn't find one. That would eliminate the close button altogether and improve the
> operation of the script.

Buttons or menu items on a flyout will automatically dismiss the flyout when pushed, but that built in default auto closing won't happen if they are on a dialog instead of a flyout menu.

You can add an onclick="" handler to make the dialog close though, you'd want to do the same thing as the button inside of the DialogClose.htm template, which is: onclick="moiWindow.endDialog(0);"

So modifying line #26 of ScriptPalette.htm to be this should do it:

code:
				html += '<moi:MenuItem onclick="moiWindow.endDialog(0);" command="' + cmd + '">' + title + '</moi:MenuItem>';



For some people it might be good to have a separate close button if they are using it repeatedly though...

- 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
5993.20 In reply to 5993.18 
No. I just did a test by changing the English strings text and didn't switch my system to French.

I just assumed Frenchy new this and it wasn't working for him, and wanted to point him at the area that controlled that dialogue text.
  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-44