<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Maya Python textField question in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8477859#M8526</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Try This...&lt;/P&gt;
&lt;PRE&gt;import maya.cmds as cmds
if cmds.window(window, exists =True):
    cmds.deleteUI(window)

window = cmds.window(title = "DS Selection Loader Demo", widthHeight=(300, 200) )
cmds.columnLayout(adjustableColumn=True)

def sld_loadHelperJoint(*_):
    rsSel = cmds.ls(selection=True)
    rsJtNm = cmds.textField( rsTxJtNm, query=True, text=True)
    rsHelperJt = cmds.joint( n = rsJtNm, p=(0, 0, 0) )
    rsConstNode = cmds.parentConstraint( rsSel, rsHelperJt, mo=0 )
    cmds.delete(rsConstNode)
def rsCreateNode(*_):
    rsJtNm = cmds.textField( rsTxJtNm, query=True, text=True)
    testNode = cmds.createNode( 'transform', name = (rsJtNm+'_firstGuy') )
    
rsTxJtNm = cmds.textField()
cmds.button( label='Load Helper Joint', command = sld_loadHelperJoint)
cmds.button ( 'Test', command = rsCreateNode)


cmds.showWindow (window)&lt;/PRE&gt;</description>
    <pubDate>Wed, 19 Dec 2018 10:35:34 GMT</pubDate>
    <dc:creator>rajasekaransurjen</dc:creator>
    <dc:date>2018-12-19T10:35:34Z</dc:date>
    <item>
      <title>Maya Python textField question</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8470631#M8525</link>
      <description>&lt;P&gt;Oh great Maya forums, I beseech you once more for your assistance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my plan. First create a joint and open your node editor. When you got your joint created, name it "A_Joint" hit "load joint" after running the script, then hit "test" upon hitting test, you should get a node created with the name "A_Joint_firstGuy"&lt;/P&gt;
&lt;P&gt;the objective of this script is to create a node based on the name of whatever you loaded into the textField. It will take the name of the selected object and add it to the front of the name of the node&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Atleast thats what should happen, but in truth I lack the knowledge to figure this out and every google search has thus far been fruitless. The script is down below for anyone willing to take a crack at it, thank you for your time and I hope to hear back from you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;import maya.cmds as cmds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if cmds.window(window, exists =True):&lt;/P&gt;
&lt;P&gt;cmds.deleteUI(window)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;window = cmds.window(title = "DS Selection Loader Demo", widthHeight=(300, 200) )&lt;/P&gt;
&lt;P&gt;cmds.columnLayout(adjustableColumn=True)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;def sld_loadHelperJoint():&lt;/P&gt;
&lt;P&gt;sel = cmds.ls(selection=True)&lt;/P&gt;
&lt;P&gt;selString = " ".join(sel)&lt;/P&gt;
&lt;P&gt;add = cmds.textField('sld_surfaceTextHJ', edit=True, text=selString)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#def sld_loadParentJoint():&lt;/P&gt;
&lt;P&gt;# sel = cmds.ls(selection=True)&lt;/P&gt;
&lt;P&gt;# selString = " ".join(sel)&lt;/P&gt;
&lt;P&gt;# add = cmds.textField('sld_surfaceTextPJ', edit=True, text=selString)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;def createNode():&lt;/P&gt;
&lt;P&gt;testNode = cmds.createNode( 'transform', name = textField +'_firstGuy' )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cmds.columnLayout(adjustableColumn=True)&lt;/P&gt;
&lt;P&gt;sld_textFld = cmds.textField('sld_surfaceTextHJ', width =240)&lt;/P&gt;
&lt;P&gt;cmds.button( label='Load Helper Joint', command = "sld_loadHelperJoint()")&lt;/P&gt;
&lt;P&gt;cmds.setParent('..')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#cmds.columnLayout(adjustableColumn=True)&lt;/P&gt;
&lt;P&gt;#name = cmds.textField('sld_surfaceTextPJ', width =240)&lt;/P&gt;
&lt;P&gt;#cmds.button( label="Load Parent Joint", command = "sld_loadParentJoint()")&lt;/P&gt;
&lt;P&gt;#cmds.setParent('..')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cmds.button ( 'Test', command = "createNode()")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;# you must first create "def" group for the attributes you&lt;/P&gt;
&lt;P&gt;# want to be created via button, "testNode" is our example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;# Connect the translation of two nodes together&lt;/P&gt;
&lt;P&gt;#cmds.connectAttr( 'firstGuy.t', 'secondGuy.translate' )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;# Connect the rotation of one node to the override colour&lt;/P&gt;
&lt;P&gt;# of a second node.&lt;/P&gt;
&lt;P&gt;#cmds.connectAttr( 'firstGuy.rotate', 'secondGuy.overrideColor' )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cmds.showWindow (window)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Dec 2018 06:13:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8470631#M8525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-16T06:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Python textField question</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8477859#M8526</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Try This...&lt;/P&gt;
&lt;PRE&gt;import maya.cmds as cmds
if cmds.window(window, exists =True):
    cmds.deleteUI(window)

window = cmds.window(title = "DS Selection Loader Demo", widthHeight=(300, 200) )
cmds.columnLayout(adjustableColumn=True)

def sld_loadHelperJoint(*_):
    rsSel = cmds.ls(selection=True)
    rsJtNm = cmds.textField( rsTxJtNm, query=True, text=True)
    rsHelperJt = cmds.joint( n = rsJtNm, p=(0, 0, 0) )
    rsConstNode = cmds.parentConstraint( rsSel, rsHelperJt, mo=0 )
    cmds.delete(rsConstNode)
def rsCreateNode(*_):
    rsJtNm = cmds.textField( rsTxJtNm, query=True, text=True)
    testNode = cmds.createNode( 'transform', name = (rsJtNm+'_firstGuy') )
    
rsTxJtNm = cmds.textField()
cmds.button( label='Load Helper Joint', command = sld_loadHelperJoint)
cmds.button ( 'Test', command = rsCreateNode)


cmds.showWindow (window)&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Dec 2018 10:35:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8477859#M8526</guid>
      <dc:creator>rajasekaransurjen</dc:creator>
      <dc:date>2018-12-19T10:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Python textField question</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8481803#M8527</link>
      <description>&lt;P&gt;Thank you man, That did it!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2018 19:10:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8481803#M8527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-20T19:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Python textField question</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8482565#M8528</link>
      <description>&lt;P&gt;You are welcome.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 04:21:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/maya-python-textfield-question/m-p/8482565#M8528</guid>
      <dc:creator>rajasekaransurjen</dc:creator>
      <dc:date>2018-12-21T04:21:45Z</dc:date>
    </item>
  </channel>
</rss>

