Michael,
I thought it was better to split this topic out from the general V5 wishlist.
So I've re-pasted my original request - and your initial script below. While the script swaps out images for the alternative view, I still have the issue of the 'auto reversal' of the image itself. MOI seems to flip the image when it's loaded.
It should be noted at this point that I set up my models so a car, for example, is facing negative Z, ie you'd see the front of the car in the default front view.
Looking at the default MOI layout I'd assume MOI uses 'third angle projection'. So 'Right view' is looking ** from the right ** - back towards to origin. So from that view you'd actually be viewing the ** left side ** of the car in my case.
So...
In right view I would load an image of the left side of the vehicle, facing left.
In left view I would load an image of the right side of the vehicle, facing right.
The issue I'm still having is the the program seems to want to 'auto-flip' the reverse view image. Is there a way to switch that off?
======================
Here's my original request:
======================
Suggestion: auto swap of template images for ortho views - top/bottom, left/right, front/back.
----------------------------------------------------------------------------------------------------------------------------------------
I'm currently working on a model for which I have 2D drawings. I have image planes set up for top, left/right, front/back.
It would be super helpful if, when switching ortho views - left/right or front/back - the relevant image plane was shown and the 'reverse view' image plane was hidden.
Currently the same image just gets automatically reversed in direction ('auto-flipped'). That's pretty confusing and an invitation to make mistakes when your object is not symmetric.
The current set up makes working round this problem equally confusing, because if you set up drawings for left/right, front/back you have to reverse one of them because of the 'auto-flip'.
It's a flippin' nuisance : )
Thanks for any consideration this may get : )
=================================
Here's your original response and script
=================================
re: images and view reversing, please try setting up the following script on a keyboard shortcut. Then when you push the shortcut key, the view under the mouse will reverse and it will also handle hiding and showing the associated images at the same time:
script: /* Reverse view under mouse and switch images */ var vp = moi.ui.getActiveViewport(); if ( vp && vp.name != '3D' ) { var toshow = ''; switch( vp.name ) { case 'Top': toshow = 'bottom'; break; case 'Bottom': toshow = 'top'; break; case 'Left': toshow = 'right'; break; case 'Right': toshow = 'left'; break; case 'Front': toshow = 'back'; break; case 'Back' : toshow = 'front'; break; } var images = moi.view.getBackgroundImages(); for ( var i = 0; i < images.length; ++i ) { var img = images.item(i); var imgname = moi.filesystem.getFileNameFromPath(img.fileName).toLowerCase(); if ( imgname.indexOf( toshow ) != -1 ) img.hidden = false; if ( imgname.indexOf( vp.name.toLowerCase() ) != -1 ) img.hidden = true; } moi.ui.mainWindow.viewpanel.reverseView( vp.name ); }
It seems that this is only an issue when images are set to display above objects with transparency. Maybe I should look for images stacked directly on top of each other in the view in this case and not draw the one further away.
==================================
PS: There is a definite possibility this is brain fade / user error on my part! So if that;s the case, please excuse me.
I'm in the middle of a high pressure project and am not an experienced MOI user.
Many thanks for your assistance and work on this! It's very much appreciated.
|