Script 3D view

Next
 From:  Zooen
11296.1 
Hi there,
I have a script to switch to front view while staying in 3D view. I can make a copy of the script and modify it to switch to top view and yet another to switch to right view. But (I may have dreamed it) it seems to me that Michael has created a single script to switch to either front or top or right view, while remaining in the 3D view. My research has turned up nothing...

EDITED: 18 Dec 2023 by ZOOEN

  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
11296.2 In reply to 11296.1 
Hi Zooen, does this help? :
http://moi3d.com/forum/index.php?webtag=MOI&msg=7898.2

- 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:  Michael Gibson
11296.3 In reply to 11296.1 
That sets the 3D view direction using spherical type coordinates:



So up/down angle is like the θ labeled there and left/right angle is φ.

- Michael
Attachments:

  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:  Zooen
11296.4 In reply to 11296.3 
Hi Mikael,
Yes, thank you, that's exactly it.

So I have my three scripts .js:
script:/* Vue de face dans la vue 3D */ moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 90, 0, 0 );
script:/* Vue de Dessus dans la vue 3D */ moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 0, 90, 90 );
script:/* Vue de Droite dans la vue 3D */ moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 90, 90, 0 );

Best regards

EDITED: 18 Dec 2023 by ZOOEN

  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