home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar Special 2002 April
/
GSSH42002.iso
/
EDITOREN
/
DS
/
gmax
/
gmaxinst_1-1.exe
/
gmaxsetup11.cab
/
Macro_EditablePatch.mcr
< prev
next >
Wrap
Text File
|
2002-02-13
|
16KB
|
638 lines
-- EditPatch Operations MacroScript File
--
-- Created: June 12 2000
-- Last Updated: June 16 2000
--
-- Author : Frank DeLise
-- Version: 3ds max 4
--
--
-- EditPatch operations Macroscript file.
--***********************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK
--
-- Renamed Flt_EditPath --> Filters.Is_EditPatch
MacroScript EPatch_Attach
ButtonText:"Attach"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Attach (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
Try(ApplyOperation Edit_Patch Patchops.startAttach)Catch()
)
)
MacroScript EPatch_Detach_Element
ButtonText:"Detach Element"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Detach Element (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.Detach)Catch()
)
)
MacroScript EPatch_Detach_Patch
ButtonText:"Detach"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Detach (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.Detach)Catch()
)
)
MacroScript EPatch_Extrude_Edge
ButtonText:"Extrude Edge"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Extrude Edge (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.StartExtrude)Catch()
)
)
MacroScript EPatch_Extrude_Patch
ButtonText:"Extrude Patch"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Extrude Patch (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.StartExtrude)Catch()
)
)
MacroScript EPatch_Extrude_Element
ButtonText:"Extrude Element"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Extrude Element (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.StartExtrude)Catch()
)
)
MacroScript EPatch_Bind
ButtonText:"Bind"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Bind (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Patch PatchOps.StartBind)Catch()
)
)
MacroScript EPatch_UnBind
ButtonText:"Unbind"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Unbind (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == 1 then Try(ApplyOperation Edit_Patch PatchOps.UnBind)Catch()
else subobjectlevel = 1
)
)
MacroScript EPatch_Weld
ButtonText:"Weld Verticies"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Weld Vertices (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.Weld)Catch()
)
)
MacroScript EPatch_Add_Tri
ButtonText:"Add Tri"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Add Tri (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.AddTri)Catch()
)
)
MacroScript EPatch_Add_Quad
ButtonText:"Add Quad"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Add Quad (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.AddQuad)Catch()
)
)
MacroScript EPatch_Hide
ButtonText:"Hide (Patch)"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Hide (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
else Try(ApplyOperation Edit_Patch PatchOps.Hide)Catch()
)
)
MacroScript EPatch_UnHide
ButtonText:"Unhide All (Patch)"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Unhide All (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == undefined then subobjectlevel = 1
Try(ApplyOperation Edit_Patch PatchOps.UnHideAll)Catch()
)
)
MacroScript EPatch_Bevel_Patch
ButtonText:"Bevel Patch"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Bevel Patch (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.StartBevel)Catch()
)
)
MacroScript EPatch_Bevel_Element
ButtonText:"Bevel Element"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Bevel Element (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.StartBevel)Catch()
)
)
MacroScript EPatch_Delete_Vertex
ButtonText:"Delete Vertex"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Delete Patch Vertex (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Patch PatchOps.Delete)Catch()
)
)
MacroScript EPatch_Delete_Edge
ButtonText:"Delete Edge"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Delete Patch Edge (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.Delete)Catch()
)
)
MacroScript EPatch_Delete_Patch
ButtonText:"Delete Patch"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Delete Patch (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.Delete)Catch()
)
)
MacroScript EPatch_Delete_Element
ButtonText:"Delete Patch Element"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Delete Patch Element (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.Delete)Catch()
)
)
MacroScript EPatch_Subdivide_Edge
ButtonText:"Subdivide Edge"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Subdivide Edge (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == 2 then Try(ApplyOperation Edit_Patch PatchOps.Subdivide)Catch()
else subobjectlevel = 2
)
)
MacroScript EPatch_Subdivide_Patch
ButtonText:"Subdivide Patch"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Subdivide Patch (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == 3 or subobjectlevel == 4 then Try(ApplyOperation Edit_Patch PatchOps.Subdivide)Catch()
else subobjectlevel = 3
)
)
MacroScript EPatch_Subdivide_Element
ButtonText:"Subdivide Element"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Subdivide Element (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == 4 then Try(ApplyOperation Edit_Patch PatchOps.Subdivide)Catch()
else subobjectlevel = 4
)
)
-- Last Updated: Sept 5 2000
--
-- Author : Fred Ruff
-- Version: 3ds max 4
--
--
-- EditPatch operations Macroscript updates.
--***********************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK
MacroScript EPatch_CreatePatch
ButtonText:"Create Patch"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Create (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.startcreate)Catch()
)
)
MacroScript EPatch_TargetWeld
ButtonText:"Target Weld"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Target Weld (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 1 then subobjectlevel = 1
Try(ApplyOperation Edit_Patch PatchOps.StartWeldtarget)Catch()
)
)
MacroScript EPatch_FlipNormalMode
ButtonText:"Flip Normals Mode"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Flip Normals Mode (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 3 then subobjectlevel = 3
Try(ApplyOperation Edit_Patch PatchOps.StartFlipNormalMode)Catch()
)
)
MacroScript EPatch_SelectOpenEdges
ButtonText:"Select Open Edges"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Select Open Edges (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.SelectOpenEdges)Catch()
)
)
MacroScript EPatch_BreakVertex
ButtonText:"Break Vertex"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Break Vertex (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel == 1 then Try(ApplyOperation Edit_Patch PatchOps.Break)Catch()
else subobjectlevel = 1
)
)
MacroScript EPatch_CreateShapeFromEdges
ButtonText:"Create Shape"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Create Shape From Edges (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 2 then subobjectlevel = 2
Try(ApplyOperation Edit_Patch PatchOps.CreateShapeFromEdges)Catch()
)
)
MacroScript EPatch_FlipNormal
ButtonText:"Flip Normal"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Flip Normals Selected (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.FlipNormal)Catch()
)
)
MacroScript EPatch_UnifyNormal
ButtonText:"Unify Normals"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Unify Normals (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.UnifyNormal)Catch()
)
)
MacroScript EPatch_SelectByMatID
ButtonText:"Selected by ID"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Select by Material ID (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.SelectByMatID)Catch()
)
)
MacroScript EPatch_SelectBySG
ButtonText:"Selected by Smoothing Group"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Selected by Smoothing Group (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.SelectBySG)Catch()
)
)
MacroScript EPatch_ClearAllSG
ButtonText:"Clear All Smoothing Groups"
Category:"Editable Patch Object"
internalCategory:"Editable Patch Object"
Tooltip:"Clear All Smoothing Groups (Patch)"
-- Needs Icon
(
On IsEnabled Return Filters.Is_EditPatch()
On IsVisible Return Filters.Is_EditPatch()
On Execute Do
(
if subobjectlevel == undefined then max modify mode
if subobjectlevel != 4 then subobjectlevel = 4
Try(ApplyOperation Edit_Patch PatchOps.ClearAllSG)Catch()
)
)