Full Version: Script reverse view problem

From: noskule [#1]
 12 Oct
To: ALL

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


From: bemfarmer [#2]
 12 Oct
To: ALL

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


From: Max Smirnov (SMIRNOV) [#3]
 12 Oct
To: ALL

Hi Benji,

this script reverts view under a mouse cursor
code:
script:var viewport = moi.ui.getViewportUnderMouse(); viewport.viewpanel.reverseView(viewport.name);

Reply


From: Michael Gibson [#4]
 12 Oct
To: ALL

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 to All

Back to thread list | Login

© 2017 Project Beehive Forum