Home Technical Talk

[Maya] GN Quad Fill Hole

polycounter lvl 6
Offline / Send Message
Gabriel Nadeau polycounter lvl 6


Update version 2.01:

Hello!
I just updated my script on ArtStation which now comes with a new option "Force offset" that might help achieve a better result in certain situations. Basically, as you can see in the animation below, if you check this box, an offset will be applied to the Quad Fill Hole no matter what.



Update version 2.0:

Hi everyone!
I've just updated my script on ArtStation with some cool new features.
Basically, I've improved the script overall functioning and made it preserve your object transforms and pivot.
Also, the script now comes with an option box that contains a couple of additional options that you will find listed below with some new examples of the script in action.

UI:


OPTIONS:
Alternate action: This option will allow you to choose an alternate action to perform in situations where the quad filled hole is not possible.
Add inset: This option will allow you to add an inset to the filled hole, with a slider controlling the size of the inset.
Offset: This option will allow you to shift the quad filled hole by one unit, which can help get a better result in some situations.

DEMO 1 - ALTERNATE ACTION / OFFSET:


DEMO 2 - INSET:


DEMO 3 - TRANSFORMS & PIVOT:


DEMO 4 - IRREGULAR SHAPES:


Version 1.0:

Hi everyone!
I've been learning to script in my spare time for some time now and I decided to share with you my latest script which is called GN Quad Fill Hole that I created mainly to cap cylinders with an even quad topology. Below are a couple of examples of the script in action:




The script is very basic and won't take into account the curvature of the object, it's really meant to just replicate the current Fill Hole operation in Maya but with a quad toplogy instead of just a ngon face. Also, the script has a couple of limitations that I might try to improve in the future. For example, it will only work with certain type of holes and the script will delete the object transforms and history. Below you will see examples of the limitations and how to work around it:



The script is available on my ArtStation store: https://www.artstation.com/gabrielnadeau/store/dRAM/maya-gn-quad-fill-hole
Let me know your thoughts and feel free to contact me if you encounter any bug or you think that something could be improved/changed.

Cheers!
Gabriel

Replies

  • Dukefleed
    Offline / Send Message
    Dukefleed polycounter lvl 7
    Hi!
    nice script!
    Works on mac maya 2018 with little hack: 
        -rename GN-QuadFillHole.mel as GN_QuadFillHole.mel
        -mel command to execute: source GN_QuadFillHole.mel; GN_QuadFillHole; (not GN_QuadrangulateFace;)
  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6
    Hi Dukefleed!

    Thank you for reporting back.
    You're right about the command to use, I put the wrong one in the instructions.
    I updated the files with the correct one.
  • Slyvin
    I install the tool in maya 2020, but it doesn t work. It s posible to help me. Thank you :)
  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6
    Hi @Slyvin

    I'd like to help you, but I don't really have enough information right now.
    Can you tell me what happens when you run the command, do you have an error or something?
    Make sure to follow carefully the instruction on how to install and use the script in the READ-ME.txt file that comes with it and then everything should work fine.
  • Slyvin
    Great, I made a mistake. I put a wrong order. Thank you very much. It works 

  • RedMASK
    Offline / Send Message
    RedMASK polycounter lvl 4
    Hi, this looks nice.
    Any plans for future like adding to work on curvature surface?
  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6

    I fear like a feature like this would be very challenging to make and it's not really on my plan for the near future, but maybe someday I'll try to work something out.
  • RedMASK
    Offline / Send Message
    RedMASK polycounter lvl 4
    Hi @Gabriel Nadeau

    I know :) .... no one has done it.
    Anyway tnx ,and keep up with good work.
  • Matfreitas
    I install the tool in maya 2020, but it doesn t work. It s posible to help me. Thank you !
  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6
    Hi @Matfreitas

    I'd like to help you, but I would need more details to do so.
    Can you tell me exactly what version of my tool that you're trying to install and what happens when you run the command?
    Do you have any error that you could share with me, so that I can troubleshoot this issue.

    Thank you,
    Gabriel
  • Matfreitas
    Hi @Matfreitas

    I'd like to help you, but I would need more details to do so.
    Can you tell me exactly what version of my tool that you're trying to install and what happens when you run the command?
    Do you have any error that you could share with me, so that I can troubleshoot this issue.

    Thank you,
    Gabriel
    Quad fill v4 01. in maya 2020 . cmdline # Error: unexpected indent. 
    Can you provide me a old version? 


  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6
    Hi @Matfreitas

    I'd like to help you, but I would need more details to do so.
    Can you tell me exactly what version of my tool that you're trying to install and what happens when you run the command?
    Do you have any error that you could share with me, so that I can troubleshoot this issue.

    Thank you,
    Gabriel
    Quad fill v4 01. in maya 2020 . cmdline # Error: unexpected indent. 
    Can you provide me a old version? 


    Did you make sure that you typed the command correctly with no space (indentation) at the beginning?
    You can also just copy & paste the command below in the Python command line and it should work.
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=True)

    You will also find the commands to use in the file READ-ME.txt that comes with the script.
  • Matfreitas
    Hi @Matfreitas

    I'd like to help you, but I would need more details to do so.
    Can you tell me exactly what version of my tool that you're trying to install and what happens when you run the command?
    Do you have any error that you could share with me, so that I can troubleshoot this issue.

    Thank you,
    Gabriel
    Quad fill v4 01. in maya 2020 . cmdline # Error: unexpected indent. 
    Can you provide me a old version? 


    Did you make sure that you typed the command correctly with no space (indentation) at the beginning?
    You can also just copy & paste the command below in the Python command line and it should work.
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=True)

    You will also find the commands to use in the file READ-ME.txt that comes with the script.


    I made a mistake.. Thank you very much. It works . Great tool
  • ManiSalguero
    Hi! 
    I am trying to install the plugin, but It's not working.

    I pasted in maya 2019 and 2022 scripts folder.
    After I pasted the command.
    And when I'm in maya I got a "syntax error":
    What I'm doing wrong?
    Hope that you can help me, and thank you! :D 


  • Gabriel Nadeau
    Offline / Send Message
    Gabriel Nadeau polycounter lvl 6
    Hi @ManiSalguero

    You didn't enter the command properly.
    There are two different commands that you can use, one that will run the script with the current options and the other one to open the window and change the options.

    Command #1:
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=False)

    Command #2:
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=True)

    You can just copy & paste the commands above and it should work.
    Make sure to copy only the commands and nothing else.

    Thank you,
    Gabriel
  • ManiSalguero
    Hi @ManiSalguero

    You didn't enter the command properly.
    There are two different commands that you can use, one that will run the script with the current options and the other one to open the window and change the options.

    Command #1:
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=False)

    Command #2:
    import GN_QuadFillHole
    GN_QuadFillHole.QFH_Window(optionBox=True)

    You can just copy & paste the commands above and it should work.
    Make sure to copy only the commands and nothing else.

    Thank you,
    Gabriel
    My mistake! Thank you so much! :D 


Sign In or Register to comment.