Toggle Zoom/FoV
All  1  2-6

Previous
Next
 From:  Michael Gibson
11306.2 In reply to 11306.1 
Hi Moi3dFan,

re:
> Question, is it possible to implement in MoI3d script execution on holding hotkey and script
> execution on releasing hotkey? It would be very convenient!

Not as a regular shortcut key, but when a dialog has focus it is possible for script on the dialog box to get keydown and keyup events when the dialog has keyboard focus.

There's an example of that in ShortcutKeyDialog.htm,


> And if not, is it possible to implement script execution on repeated pressing of the same key?

I'm not entirely sure if I've understood this question properly but yes if you hold down a key and there is a shortcut key assigned to it, the key will repeat while you have it held down.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Moi3dFan
11306.3 In reply to 11306.2 
The active window solution doesn't work for me. You need an interactive solution to do it quickly.
I have attached a GD video where I clearly show how I want the script to do it. That is, without any windows you can quickly reduce the FOV and then quickly return it back.

https://drive.google.com/file/d/1r1UDO2dwU1083vV03Z1zPNPq9_MoEQWE/view?usp=sharing
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11306.4 In reply to 11306.3 
Hi Moi3d fan, something like this on a shortcut key maybe? :

script: var vp = moi.ui.mainWindow.viewpanel.getViewport('3D'); if ( Math.abs(vp.fieldOfViewAngle - 27.5) < 0.01 ) { vp.fieldOfViewAngle = 7; } else { vp.fieldOfViewAngle = 27.5; }

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Moi3dFan
11306.5 In reply to 11306.4 
Yes! That's what it's all about. Thank you!

And can the camera focus on the cursor position?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
11306.6 In reply to 11306.5 
Hi Moi3dFan,

re:
> And can the camera focus on the cursor position?

Sorry no there isn't any way set up for field of view changes to focus on the cursor position.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-6