Itoo Software Forum

Author Topic: Access Glue via Maxscript  (Read 536 times)

IJ2087

  • Jr. Member
  • **
  • Posts: 59
Access Glue via Maxscript
« on: July 05, 2017, 10:36:50 PM »
Hello,

Is there any way to access Glue and its settings via MaxScript? We use this plugin in many of our projects, but would like to automate it if we can.

Thanks!

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1385
Re: Access Glue via Maxscript
« Reply #1 on: July 06, 2017, 12:03:03 PM »
Hi,

I'm afraid, the Glue utility doesn't support Maxscript access.

Best regards,
« Last Edit: July 06, 2017, 12:05:37 PM by Michal Karmazín »

IJ2087

  • Jr. Member
  • **
  • Posts: 59
Re: Access Glue via Maxscript
« Reply #2 on: July 06, 2017, 04:25:05 PM »
Okay...Thanks for letting me know.

IJ2087

  • Jr. Member
  • **
  • Posts: 59
Re: Access Glue via Maxscript
« Reply #3 on: July 06, 2017, 06:34:25 PM »
Actually, I'm starting to get somewhere accessing the Windows Structure via Maxscript...

UtilityPanel.OpenUtility glue
children = windows.getChildrenHWND (windows.getDesktopHWND())
pickBaseButton = (for c in children where ( c[5] == "Pick" ) collect ( c ))[1]
pickBase = (for c in children where ( c[4] == "Edit" and c[5] == "" ) collect ( c ))[1]
UIAccessor.pressButton pickBaseButton[1]

With the above code, I can open the glue utility and create a couple of variables based on the children structure of the utility. I am trying to find a way to populate the resulting pickBase string with a variable created earlier in my script and use it to place a specific object as the base object, but so far, I have to manually pick it in the viewport.

Any ideas are welcome! ;-)