What error exactly are you getting when you try that?
On Friday, October 28, 2016 at 12:50:46 PM UTC-5, Padraig Ó Cuínn wrote: > > Nope no difference > > On Friday, 28 October 2016 08:58:37 UTC-7, Robert White wrote: >> >> Does this work by chance? >> >> # File_1 >> from file_2 import selection as sel >> >> >> def create_window(): >> >> def pushButton(): >> sel() >> >> >> >> On Friday, October 28, 2016 at 10:46:26 AM UTC-5, Padraig Ó Cuínn wrote: >>> >>> Hi Marcus, >>> >>> I am trying to get to selection() which is in a maya code file, The UI >>> is built under a create_window() function, in a UI specific file. The >>> code is separated from the UI. >>> >>> under create_window() I have another function nested in it for the >>> button to call selection() but it is not reaching due to the enclosure, >>> >>> File_1 >>> from file_2 import selection as sel >>> >>> >>> def create_window(): >>> >>> def pushButton(): >>> file_2.sel() >>> >>> File_2 >>> import pymel.core >>> >>> >>> def selection(): >>> pymel.core.selection(n="transforms") >>> >>> as you can see there are two files and due to the closure I can't >>> execute the selection function. I know I could easily throw it under the >>> pushbutton inside the UI but i strictly want UI code alone and maya code >>> alone on another file. >>> >>> Thanks again >>> >> -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8fa92a6d-64d9-48bc-ad46-615ac0d1fa41%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.