home *** CD-ROM | disk | FTP | other *** search
- -- Macro Scripts File
- -- Created: Nov 17 1998
- -- Modified: Feb 27 1999 9:35pm
- -- Author: Frank DeLise
- -- Macro Scripts Fucnction for Modifiers
- --***********************************************************************************************
- -- MODIFY THIS AT YOUR OWN RISK
-
- -- AddMod Modname Example:(Addmod Bend) Will Check to see if an object can have this type of modifier applied and add it.
-
- FN AddMod Modname =
- (
- If $ == undefined then
- (
- MessageBox "Please Select an Object first " title:"Modifiers"
- false
- )
- Else
- (
- If (ValidModifier $ (Modname)) then
- (
- Try
- (
- If SubObjectLevel == undefined then (Max Modify Mode)
- modPanel.addModToSelection (Modname())
- true
- )
- Catch
- (
- MessageBox "Modifier cannot be applied to this object."
- false
- )
- )
- Else
- (
- MessageBox "Modifier cannot be applied to this object."
- false
- )
- )
- )
-
-
- -- Utility function for macroScripts
-
- Struct mcrUtils (
-
- -- return true when at editable mesh or edit mesh in modify panel
- fn EditingMesh = selection.count == 1 and
- ( Try
- ( local co_class = Classof (modPanel.GetcurrentObject ())
- co_class == Edit_Mesh or
- co_class == Editable_Mesh
- )
- Catch (false)
- ),
-
- -- Returns true of the modifier is applicable to the current selection set
- fn ValidMod Mod =
- ( Try ( ($ != undefined) and (isKindof Mod Modifier) and (ValidModifier $ Mod) )
- Catch (false)
- ),
-
- -- Return true of the class passed to it is currently being created.
- fn IsCreating Obj =
- ( Try ( (iskindof Obj node) and (isCreatingObject Obj) )
- Catch (false)
- )
- )
-
-