Skip to content
Register a node and command. With the command it will be possible to query the volume of a mesh and with the node you can query not only the volume but also the surface area of all the faces.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
icons initial commit Sep 13, 2017
plug-ins update installation method Aug 26, 2018
.gitignore
LICENSE update installation method Aug 26, 2018
README.md update installation method Aug 26, 2018
meshInfo.mel update installer Oct 3, 2018
meshInfo.mod

README.md

maya-plugin-mesh-info

This plugin will register a node and a command. With the command it will be possible to query the volume of a mesh and with the node you can query not only the volume but also the surface area of all the faces.

Installation

  • Extract the content of the .rar file anywhere on disk.
  • Drag the meshInfo.mel file in Maya to permanently install the plugin.

Usage

Command:

import maya.cmds as cmds
volume = cmds.polyVolume(ws=True, ch=False)

By setting the constructionHistory argument to True, instead of the volume being returned as a float, the meshInfo node will be returned that in order can be used to query the volume.

Node:

import maya.cmds as cmds
meshInfo = cmds.createNode("meshInfo")

cmds.connectAttr(
    "{0}.worldSpace[0]".format(mesh), 
    "{0}.inMesh".format(meshInfo)
)
volume = cmds.getAttr("{0}.volume".format(meshInfo))
area = cmds.getAttr("{0}.area".format(meshInfo))
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.