Home Technical Talk

quick way to generate objects in view? (maya script?)

polycounter lvl 13
Offline / Send Message
artquest polycounter lvl 13
So Something that has been bugging me lately in maya is that when working it's very rare that I'm actually on the origin for any gven shape (gotta see relationships in context of the actual location) So this has given rise to me creating a cube and snapping it to the nearest vertext I in the area I'm working in. The problem is that for some reason maya has decided that it wont let you middle mouse + vert snap if your object is off screen. So I have to zoom out and go hunting for my cube.

So my question to all of you guys is... What's your solutions for quickily generating objects in the space you're currently working on? The interactive creation works with live objects but that is just as disruptive to the workflow imo. Does anyone know of a script that creates a primitive and automatically moves it to the currently selected vertex?

Anyone have any thoughts on this?

Replies

  • Klaudio2U
    Offline / Send Message
    Klaudio2U polycounter lvl 8
    The workflow with middle mouse + snap works here for me on Maya 2016 when i create a cube way off the screen (created at world origin - Interactive Creation turned off)) and then press and hold "V" and middle mouse snap over the vert.
    The problem you might getting is because Maya remembers last selected pivot axis so if your last selected is not that middle small box of the pivot, when you create new primitive, it will snap in selected pivot axis direction instead. If you know what i mean.

    Try this if it works and just to check if that is the problem:
    1. Zoom in on your model somewhere in the scene
    2. Create new cube
    3.  While new cube still selected, run this MEL line:  
              dR_setActiveTransformAxis 3;
    4. Try now to hold "V" key and middle mouse snap cube to vert on the model. 


    If that works you can then add shelf button to create any primitive (or it's size/division variations with right mouse button on shelf button - as pop up menu items) then you can just use press "V" and middle mouse button snap to vert: 

    polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;  // Create Cube
    dR_setActiveTransformAxis 3;  // Reset Pivot selection constraints


  • artquest
    Offline / Send Message
    artquest polycounter lvl 13
    Ohhh snap! (lol) that works perfectly :pleased: Honestly the last remembered axis thing has bit me in the ass on more then one occasion. Does anyone find it useful? I get stuck in a single axis with the tweak mode instead of being free pretty often.
  • Klaudio2U
    Offline / Send Message
    Klaudio2U polycounter lvl 8
    I think there is in Preferences somewhere for Manipulator to set whether you want it to remember last active handle or not....
Sign In or Register to comment.