Script reverse view problem

Next
 From:  noskule
8625.1 
Hi all
I have trouble with the script below

script:if ( moi.ui.mainWindow.viewpanel.mode != 'left' ) { moi.ui.mainWindow.viewpanel.mode = 'left' } else { moi.ui.mainWindow.viewpanel.reverseView( 'left' ) };

it works for "top" and "fornt" but not for left/right view.

Has anyone an idea what's the problem
Best Benji
  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:  bemfarmer
8625.2 In reply to 8625.1 
Hi Benji

I always wonder where a script writer finds their code?
Must be in the code for the view buttons.

.mode seems to be left out?

- Brian
  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:  Max Smirnov (SMIRNOV)
8625.3 In reply to 8625.1 
Hi Benji,

this script reverts view under a mouse cursor
code:
script:var viewport = moi.ui.getViewportUnderMouse(); viewport.viewpanel.reverseView(viewport.name);
  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
8625.4 In reply to 8625.1 
Hi Benji, the default name for that view is 'right', and viewpanel.mode is meant to control which of the bottom 5 tabs are active, it returns one of 'split', '3d', 'top', 'front', or 'right'. So for your script there you'd need to put in 'right' instead of 'left', like this:

script:if ( moi.ui.mainWindow.viewpanel.mode != 'right' ) { moi.ui.mainWindow.viewpanel.mode = 'right' } else { moi.ui.mainWindow.viewpanel.reverseView( 'right' ) };

- 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