// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // Register MASH's runtime commands // These are then refrenced from the menuitems. // global proc MASHruntimeCommands() { if(`runTimeCommand -q -exists CreateMashNetwork`) return; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateMASHNetwork")) -annotation (getPluginResource("MASH", "kCreateMASHNetworkAnnot")) -longAnnotation "MASH is a suite of nodes which can be daisy chained together to scatter, transform and animate objects procedurally.\nYou can quickly create and adjust complex effects and see the results of any changes live in the viewport.\nStart with a Waiter and a Distribute node and get creative from there!" -image "out_MASH_Waiter.png" -category ("Menu items.Animation.MASH;Menu items.FX.MASH") -plugin "MASH" -command ("python(\"import MASH.api;network = MASH.api.Network();network.createNetwork()\")") CreateMashNetwork; runTimeCommand -default true -annotation (getPluginResource("MASH", "kCreateOptions")) -category ("Menu items.Animation.MASH;Menu items.FX.MASH") -plugin "MASH" -command ("MASHcreateOptions") CreateMashNetworkOptions; runTimeCommand -default true -label (getPluginResource("MASH", "kMASHOutliner")) -annotation (getPluginResource("MASH", "kMASHOutlinerAnnot")) -image "ae_MASH_Editor.png" -category ("Menu items.Animation.MASH;Menu items.FX.MASH") -plugin "MASH" -command ("MASHOutliner") OpenMashEditor; runTimeCommand -default true -label (getPluginResource("MASH", "kCacheThisNetwork")) -annotation (getPluginResource("MASH", "kCacheThisNetworkAnnot")) -longAnnotation "Select a MASH node, then this command to cache the network as an Alembic file. \nMost useful when your MASH effect is complete and you want to create a lightweight version of the animation for rendering." -image "MASH_CacheNetwork.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHcacheRedirection") CacheMashNetwork; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateMASHDeformer")) -annotation (getPluginResource("MASH", "kCreateMASHDeformerAnnot")) -image "out_MASH_Deformer.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHaddDeformer") AddMashDeformer; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateBlendDeformer")) -annotation (getPluginResource("MASH", "kCreateBlendDeformerAnnot")) -longAnnotation "Prior to using this command, duplicate an object in the scene and alter its surface. \nSelect the original object and use this command to create a MASH Blend Deformer. \nIn the Blend Deformer node, open the Connections section and middle-drag the duplicated object into the Blend Mesh field. You can now use the Blend Value attribute to blend between shapes." -image "MASH_CreateBlendDeformer.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHaddBlendDeformer") AddMashBlendDeformer; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateJiggleDeformer")) -annotation (getPluginResource("MASH", "kCreateJiggleDeformerAnnot")) -image "MASH_CreateJiggleDeformer.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHaddJiggleDeformer") AddMashJiggleDeformer; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateMeshFromPoints")) -annotation (getPluginResource("MASH", "kCreateMeshFromPointsAnnot")) -longAnnotation "Select a MASH node, then this command to create a new polygon mesh with vertices at all MASH points. Vertex IDs follow the same order as MASH point IDs." -image "MASH_CreateMeshFromPoints.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHcreateMeshFromPointsEntry") CreateMeshFromMashPoints; runTimeCommand -default true -label (getPluginResource("MASH", "kConnectToType")) -annotation (getPluginResource("MASH", "kConnectToTypeAnnot")) -longAnnotation "Select a Type / SVG object, then Shift + select a MASH node. \nUse this command to connect the translation of each character to a point in the MASH network." -image "MASH_ConnectToType.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHConnectToVector") ConnectMashToVector; runTimeCommand -default true -label (getPluginResource("MASH", "kConnectParticlesToMASH")) -annotation (getPluginResource("MASH", "kConnectParticlesToMASHAnnot")) -longAnnotation "Select an nParticle node, then a MASH node. Use this command to connect the distribution of MASH points (creation/location) to the nParticles." -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHnNetworkConnect") ConnectMashToParticles; runTimeCommand -default true -label (getPluginResource("MASH", "kParticlesFromMASH")) -annotation (getPluginResource("MASH", "kParticlesFromMASHAnnot")) -longAnnotation "Select a MASH node, then this command to create a new set of nParticles at all MASH point locations." -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHbakeToParticles") BakeMashToParticles; runTimeCommand -default true -label (getPluginResource("MASH", "kConnectTrailsToParticles")) -annotation (getPluginResource("MASH", "kConnectTrailsToParticles")) -image "MASH_AddTrailsToParticles.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHaddTrailsToParticles") AddTrailsToParticles; runTimeCommand -default true -label (getPluginResource("MASH", "kSwitchGeometryType")) -annotation (getPluginResource("MASH", "kSwitchGeometryTypeAnnot")) -longAnnotation "Select a MASH node, then this command to toggle its geometry type. Repros require more processing power, but are also more versatile and can have a greater variety of effects applied to them. Instances perform faster, but are more limited." -image "MASH_SwitchGeometryType.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHswitchGeometryType") SwitchMashGeometryType; runTimeCommand -default true -label (getPluginResource("MASH", "kBakeInstancer")) -annotation (getPluginResource("MASH", "kBakeInstancerAnnot")) -longAnnotation "Select a MASH Instancer node, then this command to convert them to individual objects. Object will be initially grouped together and hidden." -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHBakeGUI") BakeInstancerToGeometry; runTimeCommand -default true -label (getPluginResource("MASH", "kCreateInstancerPivot")) -annotation (getPluginResource("MASH", "kCreateInstancerPivot")) -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("createInstancerPivot") CreateInstancerPivot; runTimeCommand -default true -label (getPluginResource("MASH", "kAddShellDynamics")) -annotation (getPluginResource("MASH", "kAddShellDynamicsAnnot")) -longAnnotation "Select one or more polygon objects, then this command to add rigid body dynamics (physics) to them. \nA MASH node is created for each object, as well as a shared Bullet solver (unless one already exists, in which case that one is used)." -image "MASH_ShellDynamics.png" -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHAddShellDynamics") AddShellDynamics; runTimeCommand -default true -label (getPluginResource("MASH", "kAssignSolver")) -annotation (getPluginResource("MASH", "kAssignSolverAnnot")) -longAnnotation "Select a MASH Bullet Solver, then Shift + select a MASH node. \nUse this command to assign the bullet solver to the MASH network, replacing any currently assigned Bullet solver in the process." -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHAssignSolver") AssignMashBulletSolver; runTimeCommand -default true -label (getPluginResource("MASH", "kAddSolver")) -annotation (getPluginResource("MASH", "kAddSolverAnnot")) -longAnnotation "Use this to add a MASH Bullet solver to the scene, which is a rigid body dynamics solver that can affect MASH Dynamic nodes or objects with Shell Dynamics applied." -category ("Menu items.Animation.MASH.utilities;Menu items.FX.MASH.utilities") -plugin "MASH" -command ("MASHAddSolver") AddMashBulletSolver; }