zoukankan      html  css  js  c++  java
  • max 自带uv 宏解释

    /*
    Macro_scripts for UVW Unwrap

    Version: 3dsmax 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 由于植入新工具要吧这个进行替换掉 我解释下主要是替换什么内容。

    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 是查询当前层级
      xPKW =  unwrapModPKW.GetWindowX() -- GetWindowX 找到窗口x 坐标
      yPKW =  unwrapModPKW.GetWindowY() -- GetWindowY 找到窗口y 坐标
      hPKW =  unwrapModPKW.GetWindowH() -- GetWindowH 找到展uv 窗口 的总高度。
    ---但什么时候这里等于零 就是在我最小环的时候进行,高度就是等于了0  
      if (hPKW==0) then
       (
     yPKW = -10
     ) 
      pPKW = Point2 xPKW (yPKW+hPKW) ---这个时候 窗体的位置永远在我的界面之外,很好,还有几十这样的mcr 程序是事实进行的。
      CreateDialog UnwrapUIDialog pos:pPKW style:#(#style_border)
     
      if (hPKW==0) then -- 淡然我最最小花的时候 界面的高度与也是为0
       (
     unwrapUIdialog.height = 0
     )
     /*
      GetWindowH GetWindowX GetWindowY
      CreateDialog  DestroyDialog modpanel.getcurrentobject
     unwrapModPKW = modpanel.getcurrentobject() --查询当前的层级、
     xPKW = unwrapModPKW. GetWindowX ()-- 是找到uv编辑器的x 轴坐标。
     yPKW = unwrapModPKW. GetWindowY () --值找到uv 编辑器的y 竖向上得方向
     hPKW = unwrapModPKW. GetWindowH ()-- 是uv 编辑器的总高度。
     if (hPKW ==0 ) ---但我最小化窗口的时候就是这个数字了。
      (
     yPKW = -10 ; 是的是为了叫我的对话框跑到界面外边去, 看上去像是消失了一样。
     
    )
    pPKW = Point2 xPKW (yPKW+hPKW) ---这个就是我生成窗口后的 Point2 坐标
     
     CreateDialog UnwrapUIDialog pos: pPKW style:#(#style_border )--生成对话框的设置。
     
     --下面是叫我的对话框的高度也是0
     if (hPKW == 0) then
     (
      UnwrapUIDialog. height = 0 ---对话框的高度。
     
        )
     
     
     
     */
     
     
     
    )


    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() ---当前选择的层级
      xPKW = unwrapModPKW .GetWindowX() -- xPKW = unwrapModPKW. GetWindowX ()
     
      yPKW = unwrapModPKW .GetWindowY() -- yPKW = unwrapModPKW. GetWindowY .. GetWindowH -- 都是 收集uv 编辑器的对话框的。
      hPKW = unwrapModPKW .GetWindowH()
     
      if (hPKW==0) then 
       (
     yPKW = -10
     )

      pPKW = Point2 xPKW (yPKW+hPKW)
      SetDialogPos UnwrapUIDialog pPKW --- SetDialogPos 事实设定 SetDialogPos
       
      if (hPKW==0) then
       (
     unwrapUIdialog.height = 0
     )
       else
        (
     if  (UnwrapUIDialog.dash_options.state==TRUE) then  ---我的属性按下去的效果。把没有看到的属性显示出来, 这个效果很好。
      (
      if (unwrapUIdialog.height != 163 ) then
       unwrapUIdialog.height = 163 
      )
     else
      (
      if (unwrapUIdialog.height != 78 ) then
       unwrapUIdialog.height = 78 
      )
     unwrapUIdialog.UpdateUI() --- 这里这个命令从效果是 看不出来。
     )
    )


    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  销毁窗口 unw
    )


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

    macroScript UVWUnwrap_Stitch
    enabledIn:#("max", "viz", "vizr") -- 这个应该是镶嵌到内
     category:"UVW Unwrap"
     internalCategory: "UVW Unwrap"  --do not localize
     toolTip:"Stitch Selected"
     buttontext:"Stitch Selected"
    (
     on execute do actionMan.executeAction 2077580866 "40043"  -- All Commands: Stitch 边焊接
      -- actionMan.executeAction 
     on altExecute type do actionMan.executeAction 2077580866 "40044"  -- All Commands: Stitch Dialog
       --- 是挤压还有就是box 盒子的效果,
     -- actionMan.executeAction
     -- actionMan.executeAction
     
    )

    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.executeAction 2077580866 "40114"  -- All Commands: Sketch
     on altExecute type do actionMan.executeAction 2077580866 "40112"  -- All Commands: Sketch Dialog
      --- actionMan.executeAction 2077580866 "40112" 进行顶点 画笔排列。
    )

    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.executeAction 2077580866 "40074"  -- All Commands: Pack
     on altExecute type do actionMan.executeAction 2077580866 "40075"  -- All Commands: Pack Dialog
      --就行 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.executeAction 2077580866 "40135"  -- All Commands: Relax
     on altExecute type do actionMan.executeAction 2077580866 "40136"  -- All Commands: Relax Dialog
      
     ---松弛的设置。
    )

  • 相关阅读:
    JZOJ 1075. 【GDKOI2006】新红黑树
    [CQOI2018]异或序列
    JZOJ 1077. 【GDKOI2006】防御力量
    [TJOI2014]匹配
    JZOJ 1073. 【GDOI2005】山海经
    JZOJ 3745. 【NOI2014模拟7.14】Problem A
    SQL Server 2008 数据库快照
    vSphere 5.0 开发系列(一)vSphere 5.0 环境搭建手顺
    Crm系统帮助
    SQL Server 2008 Entity Data Model 和 Linq to Entities
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2215359.html
Copyright © 2011-2022 走看看