Notifications
Clear all

[Closed] unwrap load

The problem is here that when i run this, i get a pop up which asks me what .uvw file to load, but I want that in the code so that I only have to select the objects, press a button, and the script applies the appropiate .uvw file on them. Can anyone help me with this?

$.modifiers[#unwrap_uvw].unwrap.load ()
or
$.modifiers[#unwrap_uvw].unwrap.load () "c:\1.uvw" 
6 Replies

That function does not take a file path as parameter, it’s simply not exposed to maxscript that way. You might be able to hack it by using windows callback to make it enter filename and press ‘load’ for you automatically, that seems to be how some have done it (you’ll see if you google around a bit)…

1 Reply
(@omidseifi)
Joined: 10 months ago

Posts: 0

I’m sorry.
I did a Google search,but could not find it.
Please help

http://forums.cgsociety.org/showthread.php?t=485300

You could modify that pretty easily to work for loading uv’s

the 2nd hit i got via google:

http://forums.cgsociety.org/archive/index.php/t-1076150.html

That looks exactly what you want

Thank you Matt Rennie
I want loading a set of uvs to unwrap uvw modifier via maxscript
That function does not take a file path as parameter

$.modifiers[#unwrap_uvw].unwrap.load ()

can it be done? and how? :banghead:

error script


DialogMonitorOPS.unRegisterNotification id:#eyeInTheSky

fn dmnotification = 
(
WindowHandle = DialogMonitorOPS.GetWindowHandle()
WindowName = UIAccessor.GetWindowText WindowHandle
if WindowName != undefined then
   (
   if (findString WindowName "Load UVW") != undefined then
      (
      cWindows = UIAccessor.GetChildWindows WindowHandle
      entryField = 0
      for t = 1 to cWindows.count do
         (
         if cWindows != 0 then
            (
            if (UIAccessor.GetWindowClassName cWindows) == "ComboBoxEx32" then
               entryField = cWindows
            )
         )
      if entryField != 0 then
         (
         UIAccessor.SetWindowText entryField "C:\\Temp\	mp.uvw"
         UIAccessor.PressButtonByName WindowHandle "&Load"
         )
      )
   )
true
)

DialogMonitorOPS.RegisterNotification dmnotification id:#eyeInTheSky
DialogMonitorOPS.Enabled = true

$.modifiers.unwrap.Load()

DialogMonitorOPS.Enabled = false
DialogMonitorOPS.unRegisterNotification id:#eyeInTheSky