CGTalk > Software > The Foundry Modo
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 09-25-2004, 04:23 AM   #1
lougandidas
Veteran
 
Join Date: Sep 2004
Posts: 43
Making/Combining tools through the command history

I'm trying to make a universal "drop" or kill everything tool. I want to make a tool that drops the selection, and drops the current tool, regardless of the tool and the situation.

Playing in the command history and looking through the list of commands, I've found:

select.drop works well, but I want to add to this to kill the current tool. I can't seem to get a command for every tool to drop.

tool.drop only drops the current tool so I can't enter it to just drop everything, so it's hard to make it a universal drop.

Help is much appreciated.
 
Old 09-25-2004, 04:58 AM   #2
kursad_pileksuz
çok oturgaçli götürgeç
 
kursad_pileksuz's Avatar
kursad
USA
 
Join Date: Sep 2004
Posts: 612
press your escape button. pressing 2 times will drop operation and selection
 
Old 09-25-2004, 05:33 AM   #3
lougandidas
Veteran
 
Join Date: Sep 2004
Posts: 43
Kursad, thanks. Actually, I found that I have to hit it 3 times to get to the point I want. For example, I have some polygons selected and select the element tool. If I want to drop the operation, selection and the tool, I have to hit it 3 times.

The escape button doesn't show up in the command history, history list. Is there anyway to combine this to one operation? So instead of clicking escape 3 times, just to hit it once? From there, I could move it to any key. How can I combine the operation into one button push?
 
Old 09-25-2004, 05:46 AM   #4
kursad_pileksuz
çok oturgaçli götürgeç
 
kursad_pileksuz's Avatar
kursad
USA
 
Join Date: Sep 2004
Posts: 612
the tool is called escape itself

i tried to make a simple macro, which i call escape 3 times, but you just run the macro one time through a shortcut, but unfrotunately with current build i have it is crashing (when macro run when a tool is active) . so i reported it as a bug. but you can try it on your own . goto scripts and make a new script, enter "escape" 3 times in the script in every script line, that basically runs escape 3 times. it may crash on you or not, so do it test scenes first


i think that when you hit escape command history shows only the end result of it.

Quote:
Originally Posted by lougandidas
Kursad, thanks. Actually, I found that I have to hit it 3 times to get to the point I want. For example, I have some polygons selected and select the element tool. If I want to drop the operation, selection and the tool, I have to hit it 3 times.

The escape button doesn't show up in the command history, history list. Is there anyway to combine this to one operation? So instead of clicking escape 3 times, just to hit it once? From there, I could move it to any key. How can I combine the operation into one button push?
 
Old 09-25-2004, 06:10 AM   #5
lougandidas
Veteran
 
Join Date: Sep 2004
Posts: 43
I'm not following you totally. I thought everything was supposed to show up in the history. From there, I would just like to select the result from pushing it 3 times and assign to a key. Even when I make a macro, and select record macro, escape, escape, escape and stop recording macro, I only get the record and stop operations.
 
Old 09-25-2004, 06:22 AM   #6
kursad_pileksuz
çok oturgaçli götürgeç
 
kursad_pileksuz's Avatar
kursad
USA
 
Join Date: Sep 2004
Posts: 612
well everything shows up, except couple of items i guess, they may want to keep some stuff invisible due to their own coding or patent . the other thing is that "escape" can be a macro itself, so it wont show as escape! if there are conditional scripting in that macro, it is quite natural that it wont show up. i am not a programmer or luxology spokesperson i am just trying to help here, so i cannot know all the technical details. or it may simply be a bug. but in its definition, it says "escape from current operation" , so it is escaping from current operation and it is showing what it is escaping from. it is logical, but again ti would have been nicer if it showed the escape first and the result. you need to think about different possiblities of matters

i found the command from list of commands. i do not have release version here, so i am not sure what commands listed in your commands tab, but you can check out yourself.
as i said , you do not create macro for that kinda operation by recording, because it does not show up in the history. you basically need to go to macro window and enter as 3 line simple macro.
 
Old 09-25-2004, 06:44 AM   #7
lougandidas
Veteran
 
Join Date: Sep 2004
Posts: 43
Hi. Thanks for your help. I figured out the scripting thing and adding lines. I combined escape, escape and escape and mapped them to the escape key. Got a crash too.
 
Old 09-25-2004, 06:58 AM   #8
kursad_pileksuz
çok oturgaçli götürgeç
 
kursad_pileksuz's Avatar
kursad
USA
 
Join Date: Sep 2004
Posts: 612
i figured the crash was a bug, hopefully it will be fixed with the next patch.

Last edited by kursad_pileksuz : 09-25-2004 at 07:01 AM.
 
Old 09-25-2004, 11:30 AM   #9
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by kursad_pileksuz
the tool is called escape itself

i tried to make a simple macro, which i call escape 3 times, but you just run the macro one time through a shortcut, but unfrotunately with current build i have it is crashing (when macro run when a tool is active) . so i reported it as a bug. but you can try it on your own . goto scripts and make a new script, enter "escape" 3 times in the script in every script line, that basically runs escape 3 times. it may crash on you or not, so do it test scenes first


i think that when you hit escape command history shows only the end result of it.


There is a bug where QUIET commands, such as tool.drop, would crash when used in scripts. QUIET commands are UI constructs and aren't usable in scripts, and are supposed to throw errors when used as such.

I understand the request to be able to drop any tool with a keypress and geometry selection via a keypress. I'll look into writing a script to resolve it.


To elaborate, QUIET commands like tool.drop are wrappers that execute other commands, such as the one that specifically drops that tool.

-- Joe

Last edited by jangell : 09-25-2004 at 11:33 AM.
 
Old 09-25-2004, 11:47 AM   #10
CB_3D
Lord of the posts
 
CB_3D's Avatar
C Ferreira
Architecture, Engine, Germany
 
Join Date: Dec 2002
Posts: 860
In other word, for now scripts can´t execute scripts?!
__________________

 
Old 09-25-2004, 11:52 AM   #11
lougandidas
Veteran
 
Join Date: Sep 2004
Posts: 43
Thanks Joe. I'm looking forward to a script or just stick something in the next build. Until then, it looks like I have to get used to hitting escape 3 times. Thanks for the explanation.

I also hope that you guys decide to publish what bug fixes were resolved between updates. I think this is something that users would want, especially when they take the time to report a bug and it is found to be a bug.
 
Old 09-25-2004, 12:11 PM   #12
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by CB_3D
In other word, for now scripts can´t execute scripts?!


No, scripts should be able to execute scripts without problems (scripts are not QUIET commands; only a small subset of commands are QUIET, such as tool.drop. If you execute a QUIET command, it doesn't show up in the history, but the commands that it executes show up in the history instead). That said, there might be an issue executing a perl script from within another perl script in the current version.

-- Joe
 
Old 09-25-2004, 01:09 PM   #13
CoolDuck
Poly Addict
 
CoolDuck's Avatar
Benny Chew
Freelance web/interface designer
BENZAI
Rotterdam, Netherlands
 
Join Date: Sep 2002
Posts: 447
Send a message via MSN to CoolDuck
Good idea! I'd also like a tool that kills all selection and selected tool. I'm used to the maya way where u don't have to drop tools and such. Just click outside the mesh and selection is dropped.
 
Old 09-26-2004, 02:12 AM   #14
kursad_pileksuz
çok oturgaçli götürgeç
 
kursad_pileksuz's Avatar
kursad
USA
 
Join Date: Sep 2004
Posts: 612
thnx Joe, i hope we will get a solution to the matter soon through another script maybe.
can you also list those quiet commands? so we would know what not to call within macro?

thnx
 
Old 09-27-2004, 04:55 PM   #15
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by kursad_pileksuz
thnx Joe, i hope we will get a solution to the matter soon through another script maybe.


Here's a perl script that effectively issues "escapes" twice. First it the deselects all vertices, polygons edges and materials, then drops the tool by using select.nextMode, then goes back into whatever geometric selection mode you were previously in. Note that the geometric selection dropping is different than that of the escape command which, only drops the current selection type. Of course it is possible to change the script to operate more like escape if desired.

I wasn't able to get a case where I needed to hit escape 3 times. If you give me specific repro steps I can see about modifying the script to support the third hit as well.


--------------- CUT HERE --------------
#! perl
#
# EscapeAll.pl
# Written by Joe Angell, Luxology LLC, September 2004
#
# Drops the current tool and all geometric selections.
#

# Remember the current selection type
my $type;
if( lxq( "select.typeFrom {edge;vertex;polygon;item} ?" ) ) {
$type = "edge";
} elsif( lxq( "select.typeFrom {vertex;edge;polygon;item} ?" ) ) {
$type = "vertex";
} elsif( lxq( "select.typeFrom {polygon;vertex;edge;item} ?" ) ) {
$type = "polygon";
} elsif( lxq( "select.typeFrom {item;vertex;edge;polygon} ?" ) ) {
$type = "item";
}

# Drop all of the geometric selections
lx( "select.drop edge" );
lx( "select.drop polygon" );
lx( "select.drop vertex" );
lx( "select.drop item" );

# Drop the current tool by hackily using select.nextMode
lx( "select.nextMode" );

# Switch the the previous geometric selection type
lx( "select.type {$type}" );

# Done
--------------- CUT HERE --------------

Quote:
can you also list those quiet commands? so we would know what not to call within macro?


Sure. All QUIET commands still show the commands they execute in the history. Note that some of these quiet commands have loud counterparts.

attr.formPopover
attr.formPopoverSelected
layout.saveQuiet (try layout.save)
viewport.setScheme (try viewport.scheme)
clip.load (try clip.addStill)
clip.loadSequence (try clip.addSequence)
openHelp
tool.activate (try tool.set)
escape
tool.drop (try tool.set for each specific tool)
eval
scene.export (try scene.saveAs)
scene.load (try scene.open)
plugin.load (try plugin.add)
config.export (try config.exportDialog)
config.load (try config.import)
falloff.axisAutoSize (try tool.setAttr)
falloff.autoSize (try tool.setAttr)
falloff.reverse (try tool.setAttr)

-- Joe
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:21 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.