Max comes with UV macro explanation

Source: Internet
Author: User

/*
Macro_scripts for uvw unwrap

Version: 3 DSMAX 9

 

Revision history:

12 Dec 2003, Pierre-Felix Breton,
Added product switcher: This macro file can be shared with all discreet Products
Moved functions and dialog definition into the/stdplug/stdscripts/modifier_uvwunwrap_dialog.ms
 
28th August 2006, Pierre-Felix Breton
Minor updates to actions

*/
--- 2011.10.24 because of the new implant tool, please replace it. I will explain what to replace.

 

Macroscript openunwrapui
Enabledin: # ("Max", "Viz") -- pfb: 2003.12.12 added product Switch
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "openunwrapui"
Silenterrors: True

 
(

Unwrapmodpkw = modpanel. getcurrentobject () --- modpanel. getcurrentobject is to query the current level
Xpkw = unwrapmodpkw. getwindowx () -- getwindowx find the X coordinate of the window.
Ypkw = unwrapmodpkw. getwindowy () -- getwindowy find the Y coordinate of the window.
Hpkw = unwrapmodpkw. get0000wh () -- get0000wh find the total height of the UV window.
--- But when is it equal to zero? It is carried out in the smallest ring, and the height is equal to 0.
If (hpkw = 0) then
(
Ypkw =-10
)
Ppkw = point2 xpkw (ypkw + hpkw) --- in this case, the position of the form is always outside of my interface, which is good. There are dozens of such MCR programs that are actually implemented.
Createdialog unwrapuidialog pos: ppkw style: # (# style_border)

If (hpkw = 0) then -- the height and
(
Unwrapuidialog. Height = 0
)
/*
Getwindowwh getwindowx getwindowy
Createdialog destroydialog modpanel. getcurrentobject
Unwrapmodpkw = modpanel. getcurrentobject () -- query the current level,
Xpkw = unwrapmodpkw. getwindowx () -- locate the X axis coordinate of the UV editor.
Ypkw = unwrapmodpkw. getwindowy () -- locate the vertical direction of Y in the UV editor.
Hpkw = unwrapmodpkw. getwindowh () -- the total height of the UV editor.
If (hpkw = 0) --- but this number is used when I minimize the window.
(
Ypkw =-10; yes, it is to ask my dialog box to run outside the interface and it seems to have disappeared.
 
)
Ppkw = point2 xpkw (ypkw + hpkw) --- this is the point2 coordinate after the window is generated.
 
Createdialog unwrapuidialog pos: ppkw style: # (# style_border) -- settings of the generate dialog box.
 
-- The height of the dialog box named "my" is also 0.
If (hpkw = 0) then
(
Unwrapuidialog. Height = 0 --- the height of the dialog box.
 
)
 

 
*/
 
 

)

Macroscript moveunwrapui
Enabledin: # ("Max", "Viz") -- pfb: 2003.12.12 added product Switch
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "moveunwrapui"
Silenterrors: True

 
(
Unwrapmodpkw = modpanel. getcurrentobject () -- unwrapmodpkw = modpanel. getcurrentobject () --- the selected level
Xpkw = unwrapmodpkw. getwindowx () -- xpkw = unwrapmodpkw. getwindowx ()
 
Ypkw = unwrapmodpkw. getwindowy () -- ypkw = unwrapmodpkw. getwindowy .. getwindowh -- collect the UV editor dialog box.
Hpkw = unwrapmodpkw. get1_wh ()

If (hpkw = 0) then
(
Ypkw =-10
)

Ppkw = point2 xpkw (ypkw + hpkw)
Setdialogpos unwrapuidialog ppkw --- setdialogpos fact setting setdialogpos

If (hpkw = 0) then
(
Unwrapuidialog. Height = 0
)
Else
(
If (unwrapuidialog. dash_options.state = true) then --- the effect of following my attributes. Display the unseen attributes, which works well.
(
If (unwrapuidialog. height! = 163) then
Unwrapuidialog. Height = 163
)
Else
(
If (unwrapuidialog. height! = 78) then
Unwrapuidialog. Height = 78
)
Unwrapuidialog. updateui () --- this command cannot be seen from the effect.
)
)

Macroscript closeunwrapui
Enabledin: # ("Max", "Viz") -- pfb: 2003.12.12 added product Switch
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "closeunwrapui"
Silenterrors: True

 
(
Destroydialog unwrapuidialog --- destroydialog unwrapuidialog destruction window UNW
)

-----------------------------------------------------

Macroscript uvwunwrap_stitch
Enabledin: # ("Max", "Viz", "vizr") -- this should be embedded in
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "Stitch selected"
Buttontext: "Stitch selected"
(
On execute do actionman.exe cuteaction 2077580866 "40043" -- all commands: Stitch edge Welding
-- Actionman.exe cuteaction
On altexecute type do actionman.exe cuteaction 2077580866 "40044" -- all commands: Stitch Dialog
--- Squeeze and the effect of the box,
-- Actionman.exe cuteaction
-- Actionman.exe cuteaction
 
)

Macroscript uvwunwrap_sketch
Enabledin: # ("Max", "Viz", "vizr ")
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "sketch vertices"
Buttontext: "sketch vertices"
(
On execute do actionman.exe cuteaction 2077580866 "40114" -- all commands: Sketch
On altexecute type do actionman.exe cuteaction 2077580866 "40112" -- all commands: Sketch Dialog
--- Actionman.exe cuteaction 2077580866 "40112" to arrange the vertex brushes.
)

Macroscript uvwunwrap_pack
Enabledin: # ("Max", "Viz", "vizr ")
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "pack Uvs"
Buttontext: "pack Uvs"
(
On execute do actionman.exe cuteaction 2077580866 "40074" -- all commands: Pack
On altexecute type do actionman.exe cuteaction 2077580866 "40075" -- all commands: Pack Dialog
-- Just set the pickuv.
)

Macroscript uvwunwrap_relax
Enabledin: # ("Max", "Viz", "vizr ")
Category: "uvw unwrap"
Internalcategory: "uvw unwrap" -- Do not localize
Tooltip: "relax"
Buttontext: "relax"
(
On execute do actionman.exe cuteaction 2077580866 "40135" -- all commands: Relax
On altexecute type do actionman.exe cuteaction 2077580866 "40136" -- all commands: Relax Dialog

--- Relaxation settings.
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.