Thanks for the code example.

Are you sure "Reference Generator" is actually being used as the name to
the window, even with the space? I am not at a computer to confirm. It may
be that when you create the window, it uses an escaped version of that
value when it returns the name, without the space. You can confirm this by
printing the rWindow variable after it is assigned. If that is the case,
then you aren't managing to delete the previous window each time you launch
a new one. So you should try using a name without spaces.


On Mon, Dec 10, 2018, 10:58 PM James Kim <[email protected]> wrote:

> class rGenUI():
>     def __init__(self):
>         self.name = "Reference Generator"
>         self.size = [550, 150]
>
>         if cmds.window(self.name, exists=True):
>             cmds.deleteUI(self.name, window=True)
>
>     def refWindow(self, *args):
>         rWindow = cmds.window(self.name, title='Reference Generator', 
> widthHeight=self.size, sizeable=False,
>                               retain=True)
>         form = cmds.columnLayout(rowSpacing=10, columnWidth=200)
>
>         cmds.rowLayout(numberOfColumns=3, columnAttach=(1, 'right', 0), 
> adjustableColumn=2, columnWidth3=(70, 400, 20))
>         cmds.text(label='Top View')
>         top = cmds.textField('topScenePathField')
>         cmds.iconTextButton(style='iconAndTextVertical', 
> command='scnFileOpenTop()', image1='fileOpen.xpm',
>                             height=20)
>         cmds.setParent('..')
>
>         cmds.rowLayout(numberOfColumns=3, columnAttach=(1, 'right', 0), 
> adjustableColumn=2, columnWidth3=(70, 400, 20))
>         cmds.text(label='Side View')
>         side = cmds.textField('sideScenePathField')
>         cmds.iconTextButton(style='iconAndTextVertical', align='right', 
> command='scnFileOpen2()', image1='fileOpen.xpm',
>                             height=20)
>         cmds.setParent('..')
>
>         cmds.rowLayout(numberOfColumns=3, columnAttach=(1, 'right', 0), 
> adjustableColumn=2, columnWidth3=(70, 400, 20))
>         cmds.text(label='Front View')
>         front = cmds.textField('frontScenePathField')
>         cmds.iconTextButton(style='iconAndTextVertical', align='right', 
> command='scnFileOpen3()', image1='fileOpen.xpm',
>                             height=20)
>         cmds.setParent('..')
>
>         cmds.rowLayout(numberOfColumns=2, columnAttach2=('right', 'left'), 
> columnWidth2=(270, 270), adjustableColumn=2)
>         createButton = cmds.button(label='Create')
>         closebutton = cmds.button(label='Close')
>
>         cmds.showWindow(rWindow)
>
>
> Here is the base of the UI
>
> On Monday, December 10, 2018 at 1:54:04 AM UTC-8, Justin Israel wrote:
>>
>> There is not much to go on here. Do you have an example of what you are
>> running?
>>
>> Yes it is true that imported python modules could still be cached and are
>> not being reloaded. And it could be a case of you not affecting the UI
>> instance that you intended.
>>
>> Without some code to look at, that is the best I can offer.
>>
>> On Mon, Dec 10, 2018, 10:23 PM James Kim <[email protected]> wrote:
>>
>>> Also, one of my simpler UI code does run and update itself so im
>>> wondering if its my UI code being to heavy for Maya? I'm wondering if that
>>> is a thing
>>>
>>> On Monday, December 10, 2018 at 1:20:58 AM UTC-8, James Kim wrote:
>>>>
>>>> Hi,
>>>>
>>>> so i have a problem with my maya 2016 not updating my UI code. I run it
>>>> in the script editor and after i change some code it doesn't update itself
>>>> after running it again. I'm wondering if this is an issue with Maya
>>>> remembering the older UI code. Is there a way to solve this? Even
>>>> cmds.deleteUI() isnt really doing anything. Thank you
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/33ce6267-6280-44f8-94df-e8ac2474e238%40googlegroups.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/33ce6267-6280-44f8-94df-e8ac2474e238%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/b0d8afe4-af73-4485-b070-b9e732c30646%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/b0d8afe4-af73-4485-b070-b9e732c30646%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Luf%2BoV04o-5CCv4y%3D9gLCCvAzDLz8TDGvEKy36fZsDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to