Home Technical Talk

Modo - Moving relative to view plane

This is going to be a little tricky, I know, but I think OH SO WORTH IT. I'm trying to set up some keys so I can nudge things (items, UVs, whatever) and I have it working like so:
<hash type="Region" key=".global+(contextless)/(stateless)+.anywhere@numeric4">@{D:\Dropbox\WarrenModo\MyScripts\TransformNudge.pl} TX -0.01</hash>
            <hash type="Region" key=".global+(contextless)/(stateless)+.anywhere@numeric6">@{D:\Dropbox\WarrenModo\MyScripts\TransformNudge.pl} TX 0.01</hash>

And the script looks like this:
#perl

# arg0 - axis to nudge (X, Y or Z)
# arg1 - amount to nudge

lx( "tool.set TransformMove on" );

lx( "tool.reset" );

lx( "tool.attr xfrm.transform @ARGV[0] @ARGV[1]" );

# Apply
lx( "tool.doApply" );

lx( "select.nextMode" );

Now ... It's great that 4 and 6 will nudge along the X axis but I would LOVE if it I could set it up so that they always nudged along the most parallel axis to the screen. Know what I mean? So that left would always be left, and right would always be right.

I'm not seeing an easy way to do this so I fear I may have to get really complicated by passing in the camera viewing angle and doing a bunch of math ... but I was hoping that there might be some working plane trick I could use or something.

Any thoughts?

Replies

  • Farfarer
    Options
    Offline / Send Message
    The work plane will snap to whichever plane is closest to the camera's view. Might be able to use that to figure out which axis to work on?

    Or you could set the action centre to Screen and it will move it perpendicular to the camera?
  • WarrenM
    Options
    Offline / Send Message
    Farfarer wrote: »
    The work plane will snap to whichever plane is closest to the camera's view. Might be able to use that to figure out which axis to work on?
    That's what I was hoping. The work plane seems to automatically have the right answer, I just need to access it somehow.
    Or you could set the action centre to Screen and it will move it perpendicular to the camera?
    I thought of that but I don't necessarily want it aligned to the screen ... I just want to know which of the major axis ... X or Z ... is most parallel to the screen. I still want to move in cardinal directions, but not have to think about which axis is which and whether it should be positive or negative.

    I think what I want is something like in 3D Max where you can align the widget to the "View". This works well for the ortho viewports since it ensures that X always runs left/right and Y always runs up/down ...
Sign In or Register to comment.