openMASH¶
-
class
openMASH.
MASHData
(nodeName)¶ - MASHData prepares data from a MASH network, ready for use with the MASH_Python node.It also provides utility funcitons to make working with this data easier.This class uses the MAYA Python API 2.0
-
count
()¶ Returns the number of points in the MASH network.
-
createLocalMatrix
(position, rotation, scale)¶ Returns a local MTransformationMatrix
-
getColorSet
(setName)¶ Returns a MASH colour set of the specified name.
-
getData
()¶ Internal - called from init. Gets the data from the in attributes and sets it to the class variables. | It is highly unlikely you will need to use this.
-
getDoubleArray
(attributeName)¶ Returns a double array from the specified attribute name
-
getFalloff
(index)¶ Returns a doubleArray of strengths from a falloff object at the index specified. This happens through the old Maya Python API due to lack of support for MFnFloatArrayData in 2.0
-
getFalloffsCount
()¶ Returns the number of falloff objects.
-
getFrame
()¶ Returns the current frame. We do this via the MAnimControl and so it works reguardless of the state of the time attribute.
-
getIntArray
(attributeName)¶ Returns an int array from the specified attribute name
-
getMatrix
(pointId)¶ Returns an MTransformationMatrix of the specified point.
-
getNamedArray
(channelName, typeName)¶ - Returns a vector array or Python list (for doubles) from the specified channel name.Please note, you can only read data in this way.:param – channelName: The desired channel. Use getNamedArrays() to see what channels you can get.:param – typeName: “double” and “vector” are valid strings here.
-
getNamedArrays
()¶ Returns all the array names in the dynamic array data
-
getVectorArray
(attributeName)¶ Returns a vector array from the specified attribute name
-
resizeMArray
(l, newsize, obj=None)¶ - If growing:Rather then using .setLength() we append to an MArray one by one in order to give ourselves a default value.If shrinking:Delete the unneeded entries.
-
setData
()¶ - Set the data to the out attributes.Calling this at the end of your script is required for the MASH Python node to function correctly.
-
setDoubleArray
(attributeName, array)¶ Sets the specified double array to the specified attribute name
-
setIntArray
(attributeName, array)¶ Sets the specified int array to the specified attribute name
-
setMatrix
(matrix, pointId)¶ Sets the MTransformationMatrix for the specific point.
-
setPointCount
(count)¶ Resizes all the out arrays with default values - thus changing the point count.
-
setVectorArray
(attributeName, array)¶ Sets the specified vector array to the specified attribute name
-