MoI discussion forum
MoI discussion forum

Full Version: CustomUI

Show messages:  1-15  16-35  36-55  56-75  76-95  96-115  116-135  …  516-522

From: Michael Gibson
10 Feb 2014   [#56] In reply to [#55]
Hi Tom, basically the main goal behind MoI is to make it quick and simple to draw basic models, not really to be a big accumulation of a whole bunch of different tools just gathered together swiss army knife fashion...

That's why a "script organizer" just has not been a big priority so far. I do expect to get it to something along those lines in the future though, but there are only so many hours in the day and there are much more basic fundamental tools that I'm focused on first since they have a wider application to MoI's main goal.


> I would be happy with an "expert view" I guess.

Well, I guess you have exactly that with Max's CustomUI extension right here, don't you?


Basically I'm still right now in the process of working more on the fundamental tools in MoI, I just have not yet had the time to focus a lot of effort on extensions and scriptability, although as you can see from Max's work there is a lot you can do with scripting already right now. At some point in the future I should be able to focus a lot more attention on the general area of scripting and make a lot of improvements geared towards that, including stuff for helping both script authors and also consumers of scritps as well. But only once I've got more of the fundamentals covered to a greater degree.

- Michael
From: DannyT (DANTAS)
10 Feb 2014   [#57] In reply to [#54]
Hi Max,

>You can change the path manually.

Thanks for that, I knew where to find it I just didn't know how it should be formatted, all clear now.

Cheers
~Danny~
From: BurrMan
10 Feb 2014   [#58] In reply to [#57]
Hi Max,
So I created a copy of the 82 ExtScripts file in the customui folder so I can set a second path/menu option for scripts I store in the MoI scripts folder, outside of the commands folder.

Everything works great. I cant find the name for the commandbar item. The original produces a name of "Ext.Scripts". I thought it was from the base64 icon, but I decoded that to change and it was only the gears.

Can you describe where that name is derived, or how to get it to read Ext.Scripts_B or something like that?

Thanks
From: Max Smirnov (SMIRNOV)
10 Feb 2014   [#59] In reply to [#58]
Hi BurrMan
:) The name is right after the icon code.
code:
<moi:CommandMenuButton menu="customui/mods/ExtScriptsFull.menu.htm" icon="data:image/png;base64,...icon....">Ext.scripts</moi:CommandMenuButton>

From: BurrMan
10 Feb 2014   [#60] In reply to [#59]
Thanks Max.
Sorry about that. I don't know how I missed it....
From: BurrMan
10 Feb 2014   [#61] In reply to [#41]
Hi Shayno,

"""""""""Can I change the snapshot.htm to save as a jpg rather than a png ?""""""""""""""

Open the "84 Snapshot.htm" from the customui folder, file in notepad and look for this line towards the bottom:

vp.render(w, h).save(Path+time+"-["+vp.name+"].png");

Change the png to jpg and save the file.
From: BurrMan
10 Feb 2014   [#62] In reply to [#61]
So I did an experiment with creating some sub folders to organize my scripts and commands. It's not exactly what you would think it should be, but it works.

I've basically got "every command and script there is".... (lol)

What I would like is more of a set of categories than one huge list with 200 commands in it.

Since the script isn't reading "folders" and such (it may change later) I just used "added buttons" on the command bar, each pointing to sub folders, where I can organize my scripts into categories.

The only pitfall is you have to leave copies of all the commands and scripts in the original places also, if you want to access them from "MoI" to, and not just Max's plug.

It involves creating copies of the 2 script ui files and making a couple hand edits, then creating your sub folders and putting copies of your group of scripts in there.

If anyone was interested, I'd make a short video to explain it.
From: BurrMan
10 Feb 2014   [#63] In reply to [#62]
Hi Michael,
I was wondering what this does to MoI's "run commands and scripts differently" mechanism....

I know there needs to be a difference in running inline scripts and commands etc, but was wondering what happens to this when things are run through Max's plugin? Like, are the inline scripts in my scripts folder being run as commands now, when launched with Max's plug? Or, if I put commands, in a subfolder system, which Max's plug can access, are they then run out of commands control and only running as inline scripts?

Thanks for any help you have on this.
From: DannyT (DANTAS)
11 Feb 2014   [#64] In reply to [#54]
Hi Max,

> to this (for example)
code:
var Path =  "D:\\My photo gallery\\3D\\Snapshots\\"


Thanks for that...perfect!

Cheers
From: Michael Gibson
11 Feb 2014   [#65] In reply to [#63]
Hi Burr,

> I was wondering what this does to MoI's "run commands and scripts differently" mechanism....

It shouldn't really do anything to it... the plugin uses the same controls that MoI's regular UI uses, so it should behave the same as other things.


> but was wondering what happens to this when things are run through Max's plugin?

Which part of the plug-in are you asking about? Which particular module I mean.


> Like, are the inline scripts in my scripts folder being run as commands now, when launched with Max's plug?

I wouldn't think so... But which part of the plug-in runs scripts from your scripts folder?

Normally only things in the commands folder are run as a command.


> Or, if I put commands, in a subfolder system, which Max's plug can access, are they then
> run out of commands control and only running as inline scripts?

I guess I'm not really sure of the details here... can you maybe be a little more specific about the exact subfolder that you're talking about (under "commands" ? Or under somewhere else? and what part of the plug-in handles this piece that you're asking about?

- Michael
From: BurrMan
11 Feb 2014   [#66] In reply to [#65]
Hi Michael,
I reefing to this part of the plug here:
""""""""""""""ExtScripts
--------------
This addon dynamically generates list of all external scripts. Also it adds to the list some "hidden" MoI commands.
There is another version of this addon - ExtScriptsFull. It works exactly as ExtScripts, but It loads all MoI commands.
You can open ExtScripts.menu.htm(ExtScriptsFull.menu.htm) with Notepad and edit "maxlines" value ( default 50 ) to change the maximum number of lines."""""""""""""""""

THis is the one that generates a flyout with commands listed in it. It traverses the MoI commands folder for this.

I keep my inline scripts in the MoI "Scripts" folder, which MoI looks in also, but you had mentioned before that scripts in there will be handled differently.

I altered Max's plug to also grab my inline scripts from MoI's Scripts folder, and also did some experiments with generating some extra sub folders in there too. Max's plug will actually grab them from my "my documents" folder if I direct it to.

So I guess I was just wondering if they run in the context they would normally be run as if MoI was running them with it's default behavior..
From: Michael Gibson
11 Feb 2014   [#67] In reply to [#66]
Hi Burr,

> I altered Max's plug to also grab my inline scripts from MoI's Scripts folder, and also did some
> experiments with generating some extra sub folders in there too. Max's plug will actually grab
> them from my "my documents" folder if I direct it to.

The only thing to be aware of with other directories is that if the name that is eventually set as the command="" attribute on the does not have a full path on it, like if it's just the plain command name itself, MoI will only find it if it's under the commands or scripts folders. So if you want to put a script somewhere else other than under scripts you can do that but the thing that eventually gets passed to moi.command.execCommand() should be have the full path and file extension on it and not just the plain name.


> So I guess I was just wondering if they run in the context they would normally be
> run as if MoI was running them with it's default behavior..

Yeah, if you haven't modified anything else in that, it looks like it extracts just the plain name and that goes into a command="" attribute on a menu item and so whatever's in there will get passed to moi.command.execCommand() - it will behave the same as if you put that same thing into a keyboard shortcut or typed-in command name. If it finds a matching file of that name inside the commands folder, it will run it as a command. It will also check in the scripts folder, if it finds it there it will load that file and run it as an inline script. If it was passed in a full path it loads it and runs it as inline script. If instead of a file name it starts with "script:" then that text is itself run as inline script instead of being taken as a file name to load, this is all the same as what you get for keyboard shortcuts.

Hope this helps...

- Michael
From: bemfarmer
13 Feb 2014   [#68]
Several scripts of my shortcut key options are missing from the Ext. Scripts.
They are Ctrl-C, Ctrl-S, Ctrl-O, Ctrl-N, Ctrl-G, and Ctrl-I.
I have not checked everything yet.

Any idea of why this would be?

- Brian

So the Ext. Scripts list was made by scanning "commands" folder, which explains why pipe and rotateobjects are not capitalized,
and why the oneliner scripts are not included.

Checked through all of my shortcuts. _FxGraph and _cMorph are not in the Ext. Scripts list.
ArrayCurve is missing.
ArrayGrid is missing.
IncrementalSave is missing.
PastePart is missing.
CopyClipboard is missing.
Intersect is missing.
Cut is missing.

Nudge is present. Does it do anything? (The six Nudge commands are not present, which is OK.)

New, Open, Paste, and Save are missing, but they do not have htm files.
From: BurrMan
13 Feb 2014   [#69] In reply to [#68]
Hey Brian,
It looks like you're listing MoI's default commands...Not custom ones... There is the ext.scripts FULL that will include MoI's commands in the list. But if you don't want "all the commands listed", If you open the extscripts htm file in notepad, at the top a couple lines down there is an entry for "add command", where you can add just a few that you want. This is the separated list at the top...
From: bemfarmer
13 Feb 2014   [#70] In reply to [#69]
Thank you Burrman.

- Brian
From: Frenchy Pilou (PILOU)
13 Feb 2014   [#71]
Amazing again!
must try it before French translation manual of this new Max opus!
From: Frenchy Pilou (PILOU)
14 Feb 2014   [#72]
French Manual! ;)

http://moiscript.weebly.com/customiser-lui.html
From: Frenchy Pilou (PILOU)
17 Feb 2014   [#73]
Can you put an image of the arborescence ?

Ok I have some results :)

No problem with the scripts :) but for save objects Snapshots!

For the moment I have all in the Moi Folder!

The + appears, i can enter a name, but objects selected don't go on the Folder Objects! (is this the Library Object ?

I see the 3 objects examples from this folder and can load them but not save new!
must I initialize some path even this is yet existing?

Idem for Snaphot : screen don't go on the Snapshot folder!

And I must install the Dinos Lighting Options for run your Light icon?

PS Same result with the CustomInitUAC !


From: DannyT (DANTAS)
17 Feb 2014   [#74] In reply to [#73]
Hi Pilou,

I avoided storing things in the MoI application directory so I store Snapshots and Objects in My Documents, just make directories where you like and point to them as I did in the .htm files below...





-

Image Attachments:
84 Snapshot.JPG  ObjLibrary.JPG 


From: Frenchy Pilou (PILOU)
17 Feb 2014   [#75] In reply to [#74]
Not better! :(

Maybe because I am on Vista 32 bits ?

I have believed that the error was from "Moi" and not "MoI 3.0 beta Nov-19-2013" that I have on my arborescence
Object Library;MoI\objects original should be

Object Library;MoI 3.0 beta Nov-19-2013\objects
or
Object Library;C:\Program Files\MoI 3.0 beta Nov-19-2013\objects


Edit!
Ok I erase all and reload all and now that works fine! :)

It was that I suspected: Object Library;C:\Program Files\MoI 3.0 beta Nov-19-2013\objects
against
Object Library;MoI\objects !!!


Show messages:  1-15  16-35  36-55  56-75  76-95  96-115  116-135  …  516-522