PDA

View Full Version : New Tool for Scripters: Supra?


Light
03-26-2006, 10:43 PM
Hi all,

I always wanted to write a browser to edit scripts, but never found the time till now. You can get it at orionflame.com/scripts.

Simply put the script into your stdscripts folder. It remembers all the settings and can be loaded automatically for each max session. There are 2 things that are not in the menus, ctrl + click a folder to open, ctrl + click a script to delete.




Good luck,
Light

Myanko
03-27-2006, 08:43 PM
Nice, I really like it. Can browse scripts much faster. Really helpfull. Ho yeah, ctl + RMB or left mouse bouton make you delete. By clicking on it, you open the file in maxscript editor.

Thx, for this nice browser.

Light
03-28-2006, 10:56 PM
Hi,

Thanks for your kind words. I am glad you liked it.

Btw I have just updated it to v0.3:

-- Development History
-- v0.2: Better sorting algorithm, Expand All doesn't randomize the scroll
-- v0.3: Better data handling




Thanks,
Light

erilaz
03-28-2006, 11:15 PM
Ah, so that's why I couldn't download it last time! You changed the name from ice! :D

Thanks for the update!

Light
03-29-2006, 06:06 AM
sorry double post

Light
03-29-2006, 06:40 AM
Yeah Martin, I changed the name. I think Supra sounds better.:thumbsup: I hope you find it useful.




Thanks,
Light

robinb
03-29-2006, 09:50 AM
Except Supra sounds like the Supra keys (the opposite of sticky keys) in XSI. Where you hold a key down and can use the function on it (move for instance) then when you let go it restores the previous function (say select). I thought it was something to emulate that functionality. Might cause confusion.

PEN
03-29-2006, 11:13 AM
Thanks a million. I have been using one that I have had for years and it is OK but I always wanted to rewrite it using ax controls. Now I don't, thanks.

Light
03-29-2006, 04:55 PM
Hi robinb,

There is a picture of the UI in my website, where you can see it when you move your mouse over the icon on left side.

Thanks Paul, I am glad you find it useful. I plan to add a few more features like searching a string inside script files, which I think would be after rewriting Mass!ve.




Thanks,
Light

Light
03-31-2006, 01:59 AM
I have just updated the code with:

-- v0.4 Bold style for directories, fast access to scripts & stdscripts folders, ability to search inside scripts




Good luck,
Light

Light
04-03-2006, 09:30 PM
Hi all,

I have updated the code again:

-- v0.5: Docks faster, remembers dialog size correctly




Good luck,
Light

Light
10-09-2006, 03:54 PM
Hi all,

Just rewrote my script browser from scratch and thought I should share.

Here is the screenshot:

http://www.orionflame.com/images/S03x.png

You can get it here (http://www.orionflame.com/) > Light > Production Tools > Supra

Don't forget to get the required C4 function library.

It only comes with a single code file, which should be placed under stdscripts. Creates macroscript itself when not present.

Quick help:

Click a script to edit
Ctrl click a script to delete (with confirmation)

Click a directory to expand/collapse
Ctrl click a directory to open it
Shift click a directory to expand/collapse all subdirectories

Right click inside the treeview to expand/collapse all nodes.
Shift right click to reset the dialog size
Ctrl right click to refresh scripts

Drag inside the treeview to move the dialog.

Filter shows the scripts whose name matches the provided string (case-insensitive)
Search allows you to search for a string inside the scripts (case-sensitive)

If you decide to use both of them, optionally first use the filter then the search feature, because filtering is faster than searching.

The rest is obvious.

Feedback, ideas, and the like are always welcome.




Light

LoneRobot
10-10-2006, 09:05 AM
Hi light,

That's a great little utility. I had been using scriptman but i like yours more. Thanks very much!

Light
10-10-2006, 11:03 AM
Thanks alot Peter. I am glad you liked it. :)




Light

LoneRobot
10-10-2006, 11:20 AM
hey Light, after a morning's use of your script, i dont know if something like this is useful or not, but i find myself having lots of scripts and functions that i manually run each time, (I know I could just create macros but i guess it's a case of not having my UI cluttered with too many.)

Would there be a way of taking the listbox functionality that you already have and applying a way of running the selected script with, say CTRL+click?, that way i can leave your window up the whole time and run my scripts to my hearts desire!

Also, at the mo, i've put it in the .ms file in the startup>script folder. When i restart max, it resets the position to 0,0. Can it remember it's last screen pos even after a restart, or is this something to do with the pos variable in the macro? (reason i use the .ms and not the macro is i want it to start each time i load max!)

Thanks again Light, i wouldn't ask for any changes normally ,except for the fact that your script is going to be so useful!

Light
10-10-2006, 12:19 PM
Hey Peter,

Thanks for the idea. I think it makes alot of sense to simply run a script without opening it.

I have now added that functionality, and ctrl click now runs the selected script, while shift click deletes it.

As for the last pos, the dialog remembers every setting, including that. So I recommend doing 2 things:

1. Place the script file into stdscripts folder, along with C4 function library
2. Evaluate this line in the listener:

getINISetting (getMAXINIFile()) "Light" "Supra"

I store the settings inside the 3dsmax.ini file, so the script should be able to write into it.

Thanks again for your idea. If you have more from where it is coming, please don't hesitate.




Light

LoneRobot
10-10-2006, 12:23 PM
Crikey, that was swift! :) great stuff Light, will let you know if i think of anything else.

antonv
10-10-2006, 02:46 PM
Hi Light,

One other useful thing would be to have the possibility to add paths to different scripts locations. When I develop new scripts I usually keep them on a different location on the network and only whemn they're done I'll get them in the max's directory. Also would be nice to have the option to backup the scripts to a different location...

Thanks,
Anton

Light
10-10-2006, 04:01 PM
Hey vasilescu_anton,

Great idea. Now I will think on how I could best put it into the tool.




Thanks alot,
Light

ofer_z
10-10-2006, 05:21 PM
Hey Light,

This looks cool!

All you need now is favorites (for folders and/or scripts), and as suggested before, the ability to select a different path, and there's no more need for my scriptMan :)

Thanks for sharing this.

Cheers,
o

Light
10-10-2006, 06:18 PM
Hey Ofer,

Thanks man. ScriptMan is a great tool, used it myself alot. :thumbsup:

You can select different paths using the options button > Set Directory. There is no way to save your favourite paths, which I am currently working on, and I got an a great idea after reading your post.

Keep the ideas flowing.:)




Thanks again,
Light

LoneRobot
10-10-2006, 11:08 PM
Hey Light, I was looking at the code in the C4 struct and i like how you generate the small triangular button image on the fly. I posted something here (http://forums.cgsociety.org/showthread.php?t=401303) about this a while ago. Could you explain a bit more about your method of doing it?

Light
10-11-2006, 01:04 AM
For sure.




Light

Light
10-11-2006, 02:02 PM
New version:

-- v0.8 improved sorting algorithm
-- groups similar scripts based on version & prefix

Here is the new screenshot:

http://www.orionflame.com/light/supra2.png

Feedback and ideas are welcome. Now I will work on directory features.




Thanks,
Light

sethwolford
10-11-2006, 04:39 PM
Hey thanks for the script this is really usefull. I have a small prob I somehow put this where I cant recover it. I evaluated the line getINISetting (getMAXINIFile()) "Light" "Supra" and got



"#(false, false, 0, [103,313], [200,431], false, "C:\Program Files\Autodesk\3dsMax8\scripts", false, false, 25)"

I cant figure out how to get the dialog back on the screen. I know I am a noob but any help would be appreciated

Light
10-11-2006, 06:45 PM
Hey Seth,

From the ini, it looks like it should show up on screen. But you can try evaluating this line:

setDialogPos supra [0,0]

Please let me know if this fixes your problem.




Light

sethwolford
10-11-2006, 07:10 PM
I evaluated and got ok but no dialog box. I have the c4 and supra in stdplugs>stdscripts folder. Its kinda weird that I had it for a while and then it went away. I didnt open it up or anything.

Light
10-11-2006, 07:26 PM
Ok, please tell me what this line returns: getDialogPos supra?




Light

sethwolford
10-11-2006, 07:30 PM
it returns [0,0]

Light
10-11-2006, 07:34 PM
Ok, that means it's closed. So are you using the macro?




Light

sethwolford
10-11-2006, 07:39 PM
No I am not using as a macro I must have closed it on accident. I guess my next question then is how to open back up cause when I go to run it nothing happens.

Light
10-11-2006, 07:41 PM
It looks like you are running the source code, which only opens the dialog if Auto Load is turned on. It automatically creates a macroscript for you, when not present. So try using that (in Production Tools category).




Light

sethwolford
10-11-2006, 07:50 PM
Awesome thanks for the help that was it. I wanted to say also that I loved the DVD it was well worth the investment.

Light
10-11-2006, 07:59 PM
You mean loocas' modeling dvd?




Light

erilaz
10-12-2006, 01:08 AM
Light,
Ctrl+Click seems to be set to delete script, not run script as you stated, whereas shift-click just opens as normal. Just thought i'd let you know.

Thanks for the updates. :)

Light
10-12-2006, 02:22 AM
Thanks Martin. :thumbsup:I have changed the shortcuts but forgot posting it.

New shortcuts:

Click a script to edit
Right click a script to run (if a script launched with this method fails, you don't need to reopen the tool as it isn't the one that gives the error, but the ran script itself)
Ctrl click a script to delete (with confirmation)

Click a directory to expand/collapse
Right click a directory to open it
Shift click a directory to expand/collapse all its subdirectories

Shift right click inside the treeview to expand/collapse all nodes.
Alt right click to reset the dialog size
Ctrl right click to refresh scripts

Drag inside the treeview to move the dialog.




Light

Light
10-12-2006, 08:53 PM
New version:

-- v0.9 ability to save favourite folders

Right click inside the directory treeview to expand/collapse
Click options > New Folder to add a new folder
Click a directory node to scan for scripts
Ctrl click to delete (without confirmation)




Light

erilaz
10-13-2006, 12:46 AM
Ctrl click to delete (without confirmation)

Light


Hmmm... you might want to set that as a preference. Non-confirmation sounds like an accident waiting to happen! :)

Light
10-13-2006, 02:15 AM
You are right Martin. But do you know it is for removing the folder name from the list? Just checking if you are confused with removing scripts/folders physically?:)




Thanks,
Light

Light
10-16-2006, 07:03 PM
New version:

-- v1.0 improved sorting algorithm for version & prefix features
-- more streamlined saving of favourite folders
-- code cleanup & speed optimizations
-- max 9 compatible




Light

antonv
12-04-2006, 05:33 PM
It seems like I have some issues running the script. I've placed the supra and C4 in stdscripts and run the ini stuff but everytime I run iot from the mcr I get this error: "-- Argument count error: toggleDialog wanted 2, got 3" in this line: fn toggleSupra override = C4.toggleDialog "Supra" supraRC override
I'm in max 8.

Thanks,
Anton

Light
12-04-2006, 06:07 PM
Thanks vasilescu_anton.:)

I have changed the C4 library and Supra to a greater degree, and might probably only uploaded C4. It should work as expected now.

-- v1.1 redesigned code for faster performance and clarity




Thanks again,
Light

antonv
12-04-2006, 06:43 PM
The link on your page is still to 1.0. Did you get the chance to update it?

Thanks,
Anton

Light
12-04-2006, 07:39 PM
Yeah the code is updated. It's only the pic that needs an update.:)




Light

antonv
12-04-2006, 08:22 PM
This is the link from your site and it goes to 1.0 which still doesn't work: http://www.orionflame.com/light/Light%20-%20Supra.ms
I've cleaned up my Iexplorer of all the saved pages and etc. and still loads the 1.0. Is that the right link or am I looking in the wrong place?

Anton

Light
12-04-2006, 08:27 PM
Yeah, it's correct. Have you got the newest C4 library?




Light

antonv
12-04-2006, 09:02 PM
I've downloaded both just now, saved them in "3dsMax8\stdplugs\stdscripts" and started max.
When starting I get the error I've told you earlier. Am I missing something?

I was ewondering if the files you have on your website are the newest ones. The C4 is v0.2 from 21.09.2006 and Supra is v1.0 from 24.03.2006. Are these the latest ones?

Light
12-04-2006, 09:07 PM
Interesting. Can you please check if you have convertValue2Integers fn in C4? Also delete the macro file and evaluate the source code again.




Light

antonv
12-04-2006, 09:11 PM
There is no convertValue2Integers function in C4 and it still has the error after I've deleted the mcr.

Light
12-04-2006, 09:17 PM
It's great! I like it. :)

The problem seems like you have the old C4. I just downloaded it and it has convertValue2Integers fn.




Light

antonv
12-04-2006, 09:33 PM
I've cleared all my Iexporer history and cache again but the link from your site goes to this file: http://www.orionflame.com/light/Light%20-%20C4.ms which still doesn't have the function in it...
Also, Supra doesn't call for that function either, is this corect?

Light
12-04-2006, 10:56 PM
Yeah that's correct. Supra doesn't use that fn. It's just a fn that only exist in the new C4 library. That's why I wanted you to look for it.

I have tried the link you have posted, which is the correct link, and when I open the file, it contains this line:

fn convertValue2Integers val = for i = 24 to 8 by -8 collect (local a = bit.shift val -i; val -= a * (2 ^ i); a),

Can anyone please check if it really does?




Light

luigi
12-05-2006, 01:24 PM
Im trying to make it wprk too on my machine and have max8 with service pack3 .

I have put supra and the fuctions in stdplugins/stdscripts

copy light - C4.ms and supra nad massive

massive work but give me and error with
theDialog.ops.dialogPos = pos
unknow propertie "dialogPos" in true

and supra give me this error:
and doesnt work:

on the line
local original = deepCopy scripts


should i been using max 9 or is another error.

love massive , and for sure wil love supra wen i realize how o make it work :).

Light
12-05-2006, 05:39 PM
Yeah I remember now. I have used some max 9 fns in Supra. Will release the max 8 version today.

As for Mass!ve, the one on the website doesn't work as when I update C4 function library, I update the scripts using it too, but not always on the website,

Will try to upload both today.

Thanks for your interest.:)




Light

Light
12-05-2006, 06:24 PM
I uploaded a modified version of Supra to the website that should work with max 8.

Please let me know if it does.




Thanks,
Light

luigi
12-06-2006, 09:56 AM
Thanks for the quick reply and upload of the script.

starting ti use it and i love it :).

quite quick question what are the s and f on top useful for?

i been reading about favorites in this thread but i can found it on the script , what is this favourite about.


im trying to ad a external folder than is not inside max folder, one i have on my desktop where I save my work in progress scripts. use add folder but give me and error on this line.

on addFolder picked doif (ops.dirPath = getSavePath initialDir:(C4.replaceString supra.ops.dirs[2][supra.ops.currentDirectory] "/""\\")) != undefined do (ops.dirPath = C4.replaceString ops.dirPath "\\""/"; supra.ops.addNewDir str ops.dirPath)

can supra has folder that are not inlude in max folder or in places in the network.


can you notify hear when you update mass!ve too , is realy handy too.

thanks for sharing the tool :thumbsup:

wil continue using supra for give proper advice.

Light
12-06-2006, 06:28 PM
Thanks alot for your kind words Luigi.

S is for searching inside scripts, and F is filtering script names which only shows scripts that have the input string in their names.

Supra has the ability to add custom folders using the top line. Right click there to see the complete list of your folders, and another right click will roll it up. Add folder should work correctly. Can you please show me the error message?

I will post here when I update Mass!ve too.




Thanks again,
Light

luigi
12-12-2006, 11:11 AM
I tried in this case to ad a UI/macroscript folder to be able to edit and see al the macros.

got the same error when i try to add a folder in my c: drive

I got :

-unknown properties: "dirPath" in undefined

this is the line that high lights on the script when i do that.

on addFolder picked do if (ops.dirPath = getSavePath initialDir:(C4.replaceString supra.ops.dirs[2][supra.ops.currentDirectory] "/" "\\")) != undefined do (ops.dirPath = C4.replaceString ops.dirPath "\\" "/"; supra.ops.addNewDir str ops.dirPath)

Sorry for the late reply

Light
12-12-2006, 04:03 PM
Thanks for the feedback. I have fixed it now.




Light

luigi
12-12-2006, 05:05 PM
Hi light download the last version 0f Supra from orionflame and got a error when i try to launch it. i removed the one in UI/Macroscript before i copy thr new script on stdplugin/stdsripts.


I coudnt make it work i give me an error when i launch it via a quad.

this is the error.

type error: call needs function or class, got: undefined

on the fn initializeScripts
on the line:
local original = deepCopy scripts

Light
12-12-2006, 05:31 PM
Hi,

Sorry about that.

I forgot to replace the deepCopy fn (that comes with max 9) with I have been using before. Should work now as expected.




Light

luigi
12-12-2006, 06:01 PM
Know works really smooth thanks for the time to fix little bugs on a free version.

is saving me alot of time of travelling true the network to see scripts.


last question know have two new folder .
One for my script in the network and the one for the macro folder.

but both called new folder (1) and newfolder(2)
is any way of remaning them, so it have the name i want on to it.

last question:

how do I get read of new folder . i worried if a delete the new folder with the control will get rig of my folder with script inside.


thanks for the good work :).

Light
12-12-2006, 09:01 PM
I think it doesn't have renaming function for now, but it lets you to type a new name as soon as a new folder is added.

To delete a folder, hold down ctrl and click on a folder name in the directory view.

Do you wonder if deleting a folder in directory view, would cause your scripts to be deleted? If so, then no. It simply removes the bookmark.




Thanks,
Light

CGTalk Moderation
12-12-2006, 09:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.