Home Technical Talk

[Maya] Quick Pipe : Curve-Edge Based Path Creation Tool

13
sublime tool
Offline / Send Message
Pinned
Fansub sublime tool



Hey there,it's Fansub !

You can grab the Beta right here !

https://gum.co/QPipe1a


I've been working for the past three months on my first and biggest MEL script yet,and today i can finally talk a bit more about it !

Quick Pipe is a curve-edge based path creation tool for Maya.With it’s selection-based formula,Quick Pipe lets you create multiple shapes like tubes,pipes,ropes,corrugated pipes,floating bevels,welds,caves,corridors,etc...

http://i.giphy.com/l3V0qii9ogYOimUVy.gif

You can choose to stay in the tool’s comfort zone and prototype with it as much as you want to see the results happening in real-time,or go crazy and play with different profiles to get some weirdly unexpected results.
Quick Pipe comes with a relatively small documentation and a dozen of videos to show you how to create multiple shapes with it.

https://www.youtube.com/watch?v=x0WDjqNE4EA

The tool is developed completely with MEL scripting and i used Sublime as my IDE.Quick Pipe is currently compatible with Maya 2015,2016 and 2016.5.
Maya 2014 and Maya LT support will be added in the coming weeks !

Quick Pipe is currently being beta tested but you can already get it on Gumroad for 8$ !






Replies

  • Zelfit
    Offline / Send Message
    Zelfit polycounter lvl 8
    Hey @Fansub I think I found the problem. It happens when your animation slider not on 1st frame. If quickpipe created not on a first frame it wont work properly.
  • bitinn
    Offline / Send Message
    bitinn polycounter lvl 6
    Hi @Fansub,

    Once again I am testing your script on the Mac platform (I know you don't currently support it), but let me report back on some findings:

    -----

    - First of all, it works. But not without some troubleshooting myself.

    - The main problem being the Main UI doesn't launch. I mean I am able to get through the welcome window. But somewhere this check fails:
    <div>// Open the Quick Pipe window if the current selection is set to component selection without
    
    </div><div>// any component being selected.
    
    </div>} else if ((size($CurrentHilite) == 1) && (size($CurrentSel) == 0)) {
        string $SaveHLSel[] = `ls -hl -o -fl`;
    
        QuickPipeUserMenu;
    
    So QuickPipeUserMenu() is never called. Even if I am specifically in Component mode, and have nothing selected, I still end up in this clause:
    <div>// Start the CleanPipe operation that cleans all pipes in the scene if nothing is selected,
    
    </div><div>// clean selected pipe if it's selected in vertex mode, or cleaning all pipes except the
    
    </div><div>// selected pipe(s) that is in face mode.
    
    </div><div>} else if ((size($CurrentHilite) == 0) && (size($CurrentSel) == 0)</div><div>&nbsp; &nbsp; || ( $IsFace >= 1) || ( $IsVertex >= 1)) {
    
    </div><div>&nbsp; &nbsp; CleanQuickPipe;</div>
    - I am able to workaround it by manually calling QuickPipeUserMenu() in script editor.

    - But really all I want to do is to launch the main UI from shelf (instead of it trying to figure out what to do by looking at my selections; I believe this is the right call especially when I am using it as a shelf button: I want my shelf icon to have a consistent function, not a changing one based on user selections.)

    ----

    - FYI, these are the paths for macOS when using Maya LT 2017:
    `internalVar -userScriptDir`

    will return

    /Users/USERNAME/Library/Preferences/Autodesk/maya/2017LT/scripts
    While
    `internalVar -userBitmapsDir`
    will return
    /Users/USERNAME/Library/Preferences/Autodesk/maya/2017LT/prefs/icons/
    - Which means your QPUserSettings.ini will be created in the root script folder.

    - I would say it's better to define a folder name string unique to Quick Pipe at the top of script, so you can re-use that path throughout. And since you are using an anonymous block, I think it won't pollute the global scope: 
    // untested, but should work
    {
      // this should be accessible by all proc within the block
      string $ScriptDir;<br><br>  proc InitQuickPipeDir () {<br>&nbsp;   $ScriptDir = (`internalVar -userScriptDir` + "QuickPipe/");<br>  }
    
      // if you really hate variables
      proc GetQuickPipeDir () {
        return (`internalVar -userScriptDir` + "QuickPipe/");
      }
    }
    - You can store the settings in this folder instead, and of course other QuickPipe profiles as well.

    - I know people like using userBitmapsDir folder for custom icons. BUT unless you want to re-use these icons in multiple plugins, I think it's fine to store them under your custom folder at userScriptDir. And it makes installation easier (you just extract and copy the folder into your script folder, done!)

    ----

    Lastly, you might want to update the PDF document (make it pure JPEG for example), for some reasons it will freeze the macOS UI. I tried both the built-in Preview.app and Chrome, it's borderline unusable on my Macbook Pro 2015.

    ----

    And IMHO mate, you need to work on the code formatting. I am an experienced programmer and the script is borderline unreadable for me.

    (Especially your long if-else clause where you leave the closing bracket before your comment. I never know when your if-else clause will end ;)
  • rodpv
    Offline / Send Message
    rodpv polycounter lvl 10
    Hey there! This looks great. Does it currently work with Maya 2018?
  • Fansub
    Offline / Send Message
    Fansub sublime tool
    Hey @bitinn, thanks a lot for these reports ! :) and yeah the code of Quick Pipe was pretty much my first script ever, so it's definitely not a reference when it comes to readability x)

    ADN Modeler Tools and Mesh Blend have both actually adopted a unique folder structure for all their content, and in a more recent Quick Pipe build for Maya 2018 i've made that transition, too. I'm currently in the midst of a production at work and don't have much time these days unfortunately, but rest assured i'm checking every post you make and trying to update the code accordingly :)

    @rodpv Yes i've got dozens of reports confirming it to work, and i'm doing a checkup on it for 2018, too :)

    @Zelfit Sorry for the late reply, just seen the message after the recent posts :( i'll investigate that issue and come back to you as soon as i have more info on it.



  • bitinn
    Offline / Send Message
    bitinn polycounter lvl 6
    Thx @Fansub, appreciate your response. I will send you my modified version through email soon (not that you need it, but hey if it helps you to release 2.0 someday)
  • Iziaky01
    Offline / Send Message
    Iziaky01 polycounter lvl 7
    Facing right now the same problem of the the Main UI that doesn't launch, but typing QuickPipeUserMenu() in the Script editor works fine. Will use this as my shortcut, Thank you! :D@bitinn

  • OvidiusTiberius
    Offline / Send Message
    OvidiusTiberius polycounter lvl 3
    Hello,
     I  got this plugin from gumroad. Looks cool, works cool, so thanks !  One question though: Can you make it so next time ,that it opens the Quick Pipe window straight forward? Going to all that ,select the obj then go to component then make sure nothing is selected it's overkill really!!  I need the window, markin menu>> booom window please! If i have 10 curves and i want to put a pipe on all of them , i need to make the retarded steps on a random obj first to be able to open the window and go to Multi Pipe! That's not how to build an intuitive simple way of working man ! Keep it simple please ! BTW not all of us want to put all this pipe tools on shortcuts, you know why? Because we have tons of shortcuts on other more important tools man ! We don't make pipes all day long , please give us the simple window by default ! Thanks man !
  • tomofnz@gmail.com
    Offline / Send Message
    tomofnz@gmail.com polycounter lvl 4
    It would be cool to have a Select Spline that Makes This Mesh button ; so you can Rebuild it
    And maybe just a slider that rebuilds the source spline while in the QP edit mode.
  • PixelApocalypse
    Offline / Send Message
    PixelApocalypse polycounter lvl 8
    Not sure if I can ask it here about the latest version. I can't get the script to work in either Maya 2016 or 2017. The menu just won't show up.
  • hoarycastle
    Hello,  @Fansub  , I  got this plugin from gumroad, Looks cool ! But I had a problem, when I pressed the 'Edit Pipe' , I didn't get the path curve 
  • Dey
    Hello, I have the same problems as you.
    .../LaunchQuickPipe.mel line 2403: Cannot parent components or objects in the underworld. //



  • Chase
    Offline / Send Message
    Chase polycounter lvl 9
    For anyone that's having the issue with adjusting the path, check the Outliner. There will be an ADN_NewPipe_HGroup_1 group that will have a few duplicates of the original curve path. You'll have to unhide this group as it's initially hidden. I found that any one of these three will allow you to edit the path direction, but note that two paths seem to be identical.



    Currently, when you select Edit Pipe in the Quick Pipe Menu only the profile is adjustable as it's being removed from the ADN_NewPipe_HGroup_1 group and added to the New_QP_PolyPipe_1 group. The paths are left as is, but one of them should in theory also be moved in the process making it adjustable. When you select Edit Pipe again the profile is placed back into the ADN_NewPipe_HGroup_1 group which is probably why it's hidden in the first place and not something that should really be needing adjusting.
  • ChanceofAwesome
     
    To add on to Chase's answer.  "GeoPath_1" is used for adding more subdivisions to the pipe and "Base_CPath-2_1" just influences the curve. 
    The Pipe really follows "Base_CPath_1"  
  • CursedMonk
    Offline / Send Message
    CursedMonk polycounter lvl 4
    have a question : shape twist working only from base shapes like cube etc, however then i am trying to do shape twist on the curve which was extracted from the mesh it becoming a mess, looks like rotating only on one pivot point not along the curve. i dont know if it is a bug or it should be like that. however at least for me twist shape looks like does not work. anybody else has this problem ? maybe someone know the workaround ? by the way was cleaning and history, and rebuilding curve creating new pointers, etc.. 
  • giovanniakp

    Hello,  @Fansub  , I  got this plugin from gumroad, Looks cool ! But I had a problem, when I pressed the 'Edit Pipe' , I didn't get the path curve 
    Posting this in case anyone wondering how to fix this Edit Pipe error. It happens because an error in the code...
    This code snippet:
          string $GetPrfl[] = `listConnections -s true -scn true $Attrs[0]`;
          $QPipeProfile = $GetPrfl[0]; }

          string $GetPath[] = `listConnections -s true -scn true $Attrs[4]`;

          $QPipePath = $GetPath[0];
    the last two lines was intended to get a connection from subCurve node, which is the "ADN_Base_CPath02_Shape", for the $QPipePath variable (that's why you could edit it manually like @Chase & @ChanceofAwesome mentioned). In Maya 2018 and 2020 (for me at least), it returns another wrong node connection instead, hence the error and the failure to parent the "ADN_Base_CPath02_1" curve back to the PolyPipe mesh.

    Just need to edit LaunchQuickPipe.mel in your script folder. Find this line of code (line 2394):
    $QPipePath = $GetPath[0];
    and change it to:
    $QPipePath = $GetPath[1];
    rehash/restart Maya, re-run script.











  • Axcel
    Offline / Send Message
    Axcel polycounter lvl 14

    HI there,

    The script doesn't really work in my Maya 2022.


    Sourced LaunchQuickPipe.mel instead of opening toolbox window, executes a random procedure from it. Each time a different one.

    Here is what echo commands window says;


    // Result: scriptEditorPanel1Window|scriptEditorPanel1|formLayout198|formLayout200|paneLayout3|cmdScrollFieldReporter1 //

    source "LaunchQuickPipe.mel";

    // Warning: file: C:/Users/DS-870EVO/Documents/maya/2022/scripts/LaunchQuickPipe.mel line 1053: No objects specified that can have connections. //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    xform -cpc;

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    xform -cpc;

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    sets -e -forceElement Pipe_MaterialSG;

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    // Result: Pipe_MaterialSG //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    xform -cpc;

    if(`exists gameVertexCountRefresh`) { gameVertexCountRefresh(); };

    xform -cpc;

    GetFilteredSelectionSets();

    // Result: defaultObjectSet defaultLightSet //

    New Pipe created !


    Any idea why that is?

  • oglu
    Offline / Send Message
    oglu polycount lvl 666

    Use the sweep tool.

    https://youtu.be/6RIHSfW5x2Q

13
Sign In or Register to comment.