CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-13-2005, 06:23 PM
Lim Chee Beng's Avatar
Lim Chee Beng Lim Chee Beng is offline
Registered User
 
Join Date: Nov 2002
Location: Malaysia
Posts: 210
mouse shortcut

In OSD Modeling, can we customize mouse shortcut button1+button3 reacting exactly like ctrl-button2, let user holding buttons to rotate model?
Reply With Quote
  #2  
Old 10-14-2005, 08:17 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Re: mouse shortcut

In Modeling click Help, Help Topics. Under the left frame of the Contents tab, open Customization/Windows/Other customizing options. See the section "Assigning actions to the mouse buttons".

I haven't tried it, but I assume you can copy the all_mouse_defs.lsp file to the main corp, site, or user customization folder and modify it if you don't want to edit the original.
__________________
John Scheffel
Reply With Quote
  #3  
Old 10-19-2005, 02:33 AM
Lim Chee Beng's Avatar
Lim Chee Beng Lim Chee Beng is offline
Registered User
 
Join Date: Nov 2002
Location: Malaysia
Posts: 210
Re: mouse shortcut

Thanks, John. I copied "all_mouse_defs.lsp" into user customization folder and modify for mouse shortcuts. I has also read the section "Assigning actions to the mouse buttons", but it doesn't give me the solution.... I wonder whether we can customize mouse shortcut button1+button3 reacting exactly like ctrl-button2, let user holding the buttons and moving mouse simultaneously to rotate model?
Reply With Quote
  #4  
Old 10-19-2005, 05:11 AM
Mad_Scientist's Avatar
Mad_Scientist Mad_Scientist is offline
Registered User
 
Join Date: Oct 2005
Posts: 20
Re: mouse shortcut

Something of this sort would be nice to see.
Reply With Quote
  #5  
Old 10-19-2005, 05:51 AM
Thom Ivancso's Avatar
Thom Ivancso Thom Ivancso is offline
Registered User
 
Join Date: Oct 2002
Location: Connecticut, USA
Posts: 212
Re: mouse shortcut

Lim,

I have a 3 button mouse (2 buttons and wheel) and if I hold down the two outside buttons at the same time and the Ctrl key I can rotate the model in OSDM. This is an out of the box function and required no customizations.

What kind of mouse are you running are you trying to eliminate the use of the Ctrl key for this action?


Cheers
Thom
Reply With Quote
  #6  
Old 10-19-2005, 06:04 AM
Lim Chee Beng's Avatar
Lim Chee Beng Lim Chee Beng is offline
Registered User
 
Join Date: Nov 2002
Location: Malaysia
Posts: 210
Re: mouse shortcut

Hi, Thom.
I'm using 3-button mouse too. Yes, as what you guess, I'm trying to elimintate the use of ctrl key for the action. Is this possible?
Reply With Quote
  #7  
Old 10-19-2005, 08:17 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Re: mouse shortcut

In order to do this you would need to know the command that is executed when you click Ctrl-Middle-Mouse to do dynamic rotation. Unfortunately the all_mouse_defs.lsp file does not list the commands for most of the button options. I assume "(declare (ignore args))" means use the default Modeling behavior.

I tried using the recorder but it does not capture the what happens when you click Ctrl-Middle-Mouse. It only captures the command issued to specifiy the new position once rotation is complete. Unless someone from CoCreate is willing to provide the command for dynamic rotation I don't know how you could make this customization.
__________________
John Scheffel
Reply With Quote
  #8  
Old 10-19-2005, 10:55 AM
Mad_Scientist's Avatar
Mad_Scientist Mad_Scientist is offline
Registered User
 
Join Date: Oct 2005
Posts: 20
Re: mouse shortcut

Do the CoCreate engineers view and interact with us end users here? Where are all the .lsp files you guys keep mentioning when you want to modify something? Is there a .lsp file for every command? Excuse my computer ignorance, and sorry for being off topic.
Reply With Quote
  #9  
Old 10-19-2005, 06:19 PM
Lim Chee Beng's Avatar
Lim Chee Beng Lim Chee Beng is offline
Registered User
 
Join Date: Nov 2002
Location: Malaysia
Posts: 210
Re: mouse shortcut

Hi, Mad.
The mouse customization file, "all_mouse_defs.lsp" is kept in [OSD Modeling folder]/personality/sd_customize folder. There are basically shortcut definitions (in LISP) for combinations of mouse buttons. For example,
;--------------------------
(defun Button2 (&rest args)
(declare (ignore args))
(put-buffer "complete")
(values))
;--------------------------
It defines mouse middle button as "complete" command.

Hi, John.
As what you said, I also do not know how to define Button1+Button3 to react exactly like Ctrl-Button2, because it is not defined in the file. I could only achieve ctrl key elimination by the following code.
;--------------------------------------------
(defun Button1Button3 (&rest args)
(declare (ignore args))
(LISP::IF
(LISP::EQL (FRAME2::PRIM-VP-GET-EXPLICIT-DYNAMIC-MODE)
:EXPLICIT_DYNAMIC_NONE)
(FRAME2::PUT-BUFFER "frame2-ui::explicit_dynamic_vp :rotate")
(FRAME2::PUT-BUFFER ":rotate"))
)
;---------------------------------------------
which let Button1+Button3 to start the "rotate" mode. Then, holding Button1 coupled with mouse movement will rotate the 3D model in viewport. To cancel the rotate mode, press middle button once. Ctrl button is eliminated but more clicks are needed.
Reply With Quote
  #10  
Old 10-19-2005, 11:16 PM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: mouse shortcut

Quote:
Originally Posted by John Scheffel
I assume "(declare (ignore args))" means use the default Modeling behavior.
That's just a hint for the LISP compiler that the arguments for a function are intentionally not used. (Not that the LISP compiler ever processes this customization file, but it's good LISP programming style to do this anyway; see http://www.lisp.org/HyperSpec/Body/dec_ignorecm_ignorable.html for details.)

Mad_Scientist: LISP is OSDM's main customization language, and it is also used for parts of our development. Therefore, you'll find that many of our customization files use LISP syntax (or at least LISP-ish syntax). There is extensive online documentation on how you can extend and customize OSDM; the docs will also explain where you find which kind of customization files.

Lim Chee Beng: I'm not an expert here, and I'd have to look up the details before I can be sure, but I don't think you can really "eliminate" the CTRL button. It is checked for internally in our code, which (if I'm not mistaken) you cannot influence through customization files. This is probably also why the definition for ControlButton2 in all_mouse_defs.lsp has an explicit comment which says "not available for customization".

Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #11  
Old 10-20-2005, 09:45 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Re: mouse shortcut

Quote:
Originally Posted by clausb
Lim Chee Beng: I'm not an expert here, and I'd have to look up the details before I can be sure, but I don't think you can really "eliminate" the CTRL button. It is checked for internally in our code, which (if I'm not mistaken) you cannot influence through customization files. This is probably also why the definition for ControlButton2 in all_mouse_defs.lsp has an explicit comment which says "not available for customization".
If I understand correctly, what Lim wants to do is make the Button1Button3 combination (without Ctrl) do the same thing as ControlButton2. So the user could press and hold the left and right mouse buttons simultaneously (without Ctrl) and rotate the model. If we knew which command ControlButton2 executes by default, maybe we could set Button1Button3 to do the same thing.
__________________
John Scheffel
Reply With Quote
  #12  
Old 10-20-2005, 09:49 AM
John Scheffel's Avatar
John Scheffel John Scheffel is offline
Administrator
 
Join Date: Sep 2002
Location: San Jose, CA
Posts: 1,288
Re: mouse shortcut

Quote:
Originally Posted by Mad_Scientist
Do the CoCreate engineers view and interact with us end users here?
There are several people from CoCreate who follow this forum and sometimes answer the most difficult questions. Some are in the lab and others in support. However, there is no way to tell who they are unless they indicate that they work for CoCreate in their public profile or signature. You can view someone's profile by clicking on their name in any post. I know who some of them are, but they may prefer to remain anonymous so their posts are not perceived as official statements from CoCreate.
__________________
John Scheffel
Reply With Quote
  #13  
Old 10-20-2005, 10:08 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: mouse shortcut

Quote:
Originally Posted by John Scheffel
If we knew which command ControlButton2 executes by default, maybe we could set Button1Button3 to do the same thing.
If I'm not mistaken, CTRL-Button2 is directly handled by internal code written in C++, i.e. it bypasses the LISP-based customization mechanism. But then, I didn't really check the code. I'd recommend to check with support, and they will dig into the question for you.

Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #14  
Old 10-20-2005, 11:22 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: mouse shortcut

BTW, OSDM 2005 has an alternative rotation mode anyway. Simply press
the rotation icon in the "View" toolbar, then press the left mouse button and move the mouse to rotate the model. No need to hold the CTRL key down anymore.

It's also trivial to assign a keyboard shortcut to the icon (see screenshot), which reduces mouse movements. You'd simply use the keyboard shortcut, then move the model with the mouse.

HTH,

Claus
Attached Thumbnails
Click image for larger version

Name:	customize.jpg
Views:	463
Size:	26.4 KB
ID:	557  
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #15  
Old 10-20-2005, 11:44 AM
Mad_Scientist's Avatar
Mad_Scientist Mad_Scientist is offline
Registered User
 
Join Date: Oct 2005
Posts: 20
Re: mouse shortcut

That's definetly one way to do it. But I think he want's to get rid of keyboard strokes all together.

Last edited by Mad_Scientist; 10-20-2005 at 01:17 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:26 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.