PDA

View Full Version : Some toggle scripts


Srek
03-20-2006, 01:15 PM
Hi,
JDPs Toggle Grid script lead me to having a look at what else might be usefull.

Toggle Isoline Editing
doc->GetActiveBaseDraw()#BASEDRAW_DATA_SDSEDIT= !doc->GetActiveBaseDraw()#BASEDRAW_DATA_SDSEDIT;

Toggle Deformed Editing
doc->GetActiveBaseDraw()#BASEDRAW_DATA_DEFORMEDEDIT= !doc->GetActiveBaseDraw()#BASEDRAW_DATA_DEFORMEDEDIT;

Show Normals
doc->GetActiveBaseDraw()#BASEDRAW_DATA_SHOWNORMALS= !doc->GetActiveBaseDraw()#BASEDRAW_DATA_SHOWNORMALS;

A zip file with the scripts can be found here (http://www.bonkers.de/download/scripts.zip)

Cheers
Björn

edfenner
03-21-2006, 03:18 PM
Thanks for the scripts - I have written a bunch of little ones like this myself.

I have a question though and I can't figure it out from the SDK - can all of the GUI elements be accessed from a script? I assume yes because I can easily use TextDialog.

I would like to take something like these three toggles and put them into one script with checkboxes, buttons or pulldowns to reduce the number of scripts in the menu and to combine similar functions. Can it be done?
Any example scripts showing the GUI elements?

ed

Srek
03-21-2006, 03:43 PM
Can it be done?
Any example scripts showing the GUI elements?
No idea, i would ask this on plugincafe.
Cheers
Björn

Per-Anders
03-21-2006, 06:04 PM
you can give any script a button or put them in any menu as it is without adding a gui. they'll appear in the command maanger and menu manager as they're made. also you can just drag & drop the icon from the script manager directly into any palette.

if you wanted to make your own gui you can. you can find out more by looking at the coffee SDK docs section on user interface.

JDP
03-22-2006, 01:06 PM
Thanks for the scripts - I have written a bunch of little ones like this myself.

I have a question though and I can't figure it out from the SDK - can all of the GUI elements be accessed from a script? I assume yes because I can easily use TextDialog.

I would like to take something like these three toggles and put them into one script with checkboxes, buttons or pulldowns to reduce the number of scripts in the menu and to combine similar functions. Can it be done?
Any example scripts showing the GUI elements?

ed

I've posted a script with a dialog. Download the attachment called TransferByName.zip from this (http://forums.cgsociety.org/showthread.php?t=280091) thread. Creating a dialog for a script is the same as doing one for a Coffee plugin. If you're not sure how to create dialogs for those just do the calculator tutorial in the sdk. Also make sure you understand classes, there is also a small tutorial on this subject within the sdk. If you need any help just ask.

JDP

edfenner
03-28-2006, 03:14 PM
Thanks for the info. I will take a look at it JDP. I don't know what it is about the COFFEE SDK, I just seem to struggle with it. I program Java, actionscript and other languages that are similar, but just can't seem to find the pieces I need to really get rolling with COFFEE.

Thanks again

edfenner
03-29-2006, 03:53 PM
JDP - a big thanks! that did the trick, I was able to take 7 simple scripts, lump them into one with a GUI of 7 buttons - perfect! I really appreciate the help. I have several others I will work on now. Some might be better as actual plug-ins, I might try and tackle that again on those.

ed

JDP
03-29-2006, 05:32 PM
You're more than welcome ed.

cheers
JDP

Jorge Arango
04-03-2006, 09:01 PM
Could anyone post a script to toggle the axis?

TIA


Jorge Arango

Per-Anders
04-04-2006, 12:36 AM
hit ALT+D (as standard, you could always remap it).

Jorge Arango
04-04-2006, 11:46 AM
hit ALT+D (as standard, you could always remap it).


Thank you Per-Anders.



Jorge Arango

ThirdEye
04-09-2006, 07:52 AM
I think "use isolines editing" already existed in the command manager, dunno if it's got a shortcut by default.

JDP
04-09-2006, 08:02 AM
I think "use isolines editing" already existed in the command manager, dunno if it's got a shortcut by default.


It's ALT+A by default.

CGTalk Moderation
04-09-2006, 08:02 AM
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.