http://kyticka.webzdarma.cz/3d/moi/#SetView
All  1  2-6

Previous
Next
 From:  Michael Gibson
7898.2 In reply to 7898.1 
Hi GonzoRus, I think it has to do with the order that these rotation values are processed internally - in the function that processes the view angles it rotates by the up/down angle first and so I think the script also needs to do that one first as well.

Try these instead, here I've just moved the upDownAngles to be first:

Alt+W=script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 0; v.leftRightAngle = 0; v.tiltAngle = 0;

Alt+D=script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 85; v.leftRightAngle = 90; v.tiltAngle = 0;

Alt+Q=script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 45; v.leftRightAngle = 45; v.tiltAngle = 0;

Alt+E=script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 85; v.leftRightAngle = 0; v.tiltAngle = 0;


Or also there's a method that takes all 3 numbers in one call, v.setAngles( updown, leftright, tilt ) , I think that would also solve the problem and would look like this:


Alt+W=script:moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 0, 0, 0 );

Alt+D=script:moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 85, 90, 0 );

Alt+Q=script:moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 45, 45, 0 );

Alt+E=script:moi.ui.mainWindow.viewpanel.getViewport('3D').setAngles( 85, 0, 0 );


Do these versions behave better for you?

- 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:  GonzoRus
7898.3 In reply to 7898.2 
Thank you, Michael!

Method "upDown Angles to be first" works great!

All views are switched from the first time!
  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:  shayno
7898.4 
Hi Michael

Can this be added to the scripts above to reset the view first

script:moi.view.resetAll();

thanks
shayne
  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
7898.5 In reply to 7898.4 
Hi shayne,

re:
> Can this be added to the scripts above to reset the view first

Yes, you can add that if you want. Just insert moi.view.resetAll(); into any of the previous scripts, like so:

script: moi.view.resetAll(); var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 0; v.leftRightAngle = 0; v.tiltAngle = 0;

- 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
 From:  GonzoRus
7898.6 In reply to 7898.5 
Unfortunately when viewed from above "Alt + W" not visible EditFrame. ( v.upDownAngle = 0 )


But when set the minimum angle of 0.1 it works ( v.upDownAngle = 0.1 )


Alt + W = script: var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.upDownAngle = 0.1; v.leftRightAngle = 0; v.tiltAngle = 0;



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
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-6