Chit Chat

Rigging101 » Chit Chat12

Gui script help (3 posts)

About This Topic

Tags

No tags yet.

  1. Mark Neil

    offline
    Member
    Posted 6 years ago
    #

    I'm trying to create a rigging interface to both help myself out in the future and learn more scripting. A bit of a go big or go home project for myself.

    Well, I'm having some troubles with the radio buttons, two specifically at the moment. The goal of the radio buttons is to define the prefex that will be used in naming and searching for various nodes through the process, largely left and right, but I want to include a third radio button for custom (that problem 2). The issue is that I can't seem to get the radio buttons onCommand to propagate the string $prefixID that I have designated. I can get it when using integers, but not when I try adding a string (such as "L_").

    The second problem, as mentioned above, is how to create a radio button with a textfield rather then a label (which would then propagate $prefixID with the content of the textField using whatever the solution is to problem one.


    //Check if there is already a window open
    if(

    n
    == 1)
    {//if window exists, close it and inform user
    deleteUI marksRiggerWin;
    }//end If Statment

    //Create the window
    $rigWindow =

    n
    ;

    //Create the string to be used for naming and identifying
    //joints and other nodes during rigging process
    string $prefixID;

    //First set of Buttons
    columnLayout -adjustableColumn true;
    //Section tittle
    text
    -align "center"
    -label "Limb Prefix";

    radioCollection identifyPrefix;
    radioButton
    -align "left"
    -label "Left (L_)"
    -onCommand "$prefixID = "L_"";
    //THIS IS PROBLEM
    //The onCommand here is what I want to do, but it's not working.
    //change the "L_" to 1 and it will work

    radioButton
    -align "left"
    -label "Right (R_)"
    -onCommand "$prefixID = 2";
    //This almost does what I want, by filling $prefixID,
    //but not with the string that I want

    radioButton
    -align "left"
    -label "should be a text field";
    //This button I would like to have a textField, so people can
    //Define custom prefex's, for example, for additional limbs and such

    button -label "Test" -align "center"
    -command "print $prefixID";

    //This is just a temporary button used to test if the
    //$prefixID string has been filled proper.

    showWindow $rigWindow;

    Thanks for any help you can spare.

  2. Mark Neil

    offline
    Member
    Posted 6 years ago
    #

    Seems even within the <code brackets the backtick causes problems. let me know if there is a way to fix it.

  3. Mark Neil

    offline
    Member
    Posted 6 years ago
    #

    I think I figured out a different way to do this using the numbers and, when I begin another proc that requires the solution, an "if statement" that fills in the right string. I would have had problems with the textfield anyways (clicking the textfield radio would fill the $prefixID with the contents of the blank field and anything written in afterworlds would be ignored, which isn't what I want.

Reply

You must log in to post.

Rigging101 » Chit Chat12
1,099 posts in 307 topics over 110 months by 188 of 8,226 members. Latest: fashionpvp, d2q4p5z2j, gasheldonl