I personally find that looking at nodes like this in the NodeEditor helps if they have really dodgy/hidden mel AETemplate based functionality and a non obvious codeable interaction. (WARNING: I'm realtively sure coding this in, without using the AETemplate calls will break the AETemplate and render the attribute view pretty useless.) <https://lh3.googleusercontent.com/-1VE8nq8QvWE/WPUvAvmGdHI/AAAAAAAAMfQ/cmNH-qfCt4cS82KoSa6xleRfGaT6UO08gCLcB/s1600/Capture.PNG>
You can see that this one has Input[0].inShape. So all you need to do is connect something to that attribute and can work with the code for compound attributes to detect: import maya.cmds as mc node = 'tripleShadingSwitch1' [attr for attr in mc.listAttr('%s.input[:]' % node) if mc.listConnections('%s.%s'%(node, attr))] This will display all connected input attributes. Remove the if in the list comprehension and you can then just get all input attributes that are currently added to the node. Good luck. On Thursday, April 13, 2017 at 12:05:41 AM UTC-4, kevin cortez wrote: > > On Sunday, April 9, 2017 at 2:15:35 PM UTC-7, miarmy wrote: > > hi!,I created a triple switch node,... > > i want code of add surface button > > look image: > > > > > > > > help help help help.... > > is it line 169 of AEswitchControlTemplate.mel? -- 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/f8d78995-6253-4a08-bc2f-fc53d07fe4cc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.