Python

pymel

Latest version: v1.2.0

PyUp actively tracks 485,906 Python packages for vulnerabilities to keep your Python environments secure.

Scan your dependencies

Page 1 of 3

1.1.0

==================================

----------------------------------
Non-Backward Compatible Changes
----------------------------------
- removed support for maya versions before 2017
- general: AttributeSpec.parent() now returns None instead of erroring
- datatypes: Quaternion.asEulerRotation now returns a datatypes.EulerRotation
as intended, instead of OpenMaya.MEulerRotation; since dt.EulerRotation
inherits from om.MEulerRotation, they should mostly be compatible, but if you
need a om.MEulerRotation, just cast directly - ie,
om.MEulerRotation(dt.Quaternion().asEulerRotation())
- uitypes: OptionMenuGrp.getParent() now returns a PyUI object, instead of a
string, as intended. This brings it's behavior in line with most other PyUI
.getParent() calls, including RowLayout.getParent() and Layout.getParent(),
from which OptionMenuGrp inherits
- uitypes: PopupMenu.getItemArray() now returns PyUI objects, instead of
strings, as intended. This brings it's behavior in line with Menu
.getItemArray(), from which it inherits
- nodetypes: Due to a bug, the following methods were wrapped on a random
scattering of subclasses of the named classes. They were ever intended to be
wrapped at all. They are all being removed - exact methods and reasoning
below:

- **DagNode.setObject**: dangerous - changes the node we're wrapping out from
underneath us
- **DependNode.addAttribute**: dangerous, because it only took
AttributeSpec objects as inputs. In addition to being fairly obscure,
they are mostly constructed from existing attributes - but the API
explicitly warns against adding an attribute using an MObject that's already
added to another node. Use addAttr method instead.
- **DependNode.attribute**: too confusing to have both "attr" and "attribute"
which return different types of objects. Use attrSpec instead. Also, the old
wrap only worked with integer indices, which wasn't useful in most
situations (attrSpec works with either string names, Attribute objects, or
indices).
- **DependNode.findPlug**: dangerous, as it allowed returning networked mplugs.
Use attr method instead. The api docs warn that networked plugs should not
be used if you might be breaking connections, thus why these are
considerered dangerous. Also, it only worked when fed AttributeSpec, a
little known / used part of pymel.
- **DependNode.reorderedAttribute**: obscure, and apparently only useful
during file IO
- **Shape.dagPath**: useless, as it just always returned self
- **Shape.getPath**: useless, as it just always returned self

----------------------------------
Changes
----------------------------------
- all: The basic way methods and commands are wrapped has been altered.
Formerly, all items were wrapped dynamically, at runtime; now, they are
wrapped and "baked", using templates, when a pymel release is made. The end
result should be code that is more much readable and understandable for end
users.
- all: Converted to a new .py/.pyc.zip cache format. Improved pymel import
times, in addition to being more readable/diffable/maintainable
- general: AttributeDefaults renamed to AttributeSpec, which better reflects
what it is: a specification for the type on an attribute, not associated with
any single node. The AttributeDefaults name is preserved as an alias for
backwards compatibility.
- nodetypes: Due to a bug, the following methods were wrapped on a random
scattering of subclasses of the named classes. They were ever intended to be
wrapped at all. They are being marked as deprecated, and will raise a
warning, if used on any of the subclasses for which they are implemented:

DependNode.findAlias, DependNode.getAffectedAttributes, DependNode
.getAffectedByAttributes, DependNode.getAliasList, DependNode
.getConnections, DependNode.plugsAlias, DependNode.setAlias, Transform
.getRotationQuaternion, Transform.setRotationQuaternion

- nodetypes: The following methods were removed from Shape: model, removeChild,
and removeChildAt. They were never intended to be wrapped, and were non-
functional, so removing them should not introduce any backwards-compatibility
issues.
- nodetypes:Shape.getAllPaths was moved from Shape to DagNode, and marked
deprecated. It was only wrapped as a result of a bug, it has a misleading name
(it returns PyNodes, not paths), and is functionally equivalent to
getInstances(). However, since it may have been in use, and we don't wish to
break backward compatibility, we are marking it as deprecated. We are moving
it to DagNode, instead of Shape, because the fact that it was defined on
Shape and not Transform made it give incorrect / misleading results. This is
because the Transform node will check it's first shape for attributes it
can't find defined on itself - the net result is that, even though it's not
defined on Transform, if it had a shape, it would "appear" to be, but return
the "wrong" results - ie PyNodes corresponding to all instances of the
first shape, NOT the transform itself.
- nodetypes: AnimCurve.timedAnimCurveTypeForPlug/unitlessAnimCurveTypeForPlug
turned into classmethods, as they don't require / operate on a specific
AnimCurve
- conf: add a new setting to pymel.conf, "deleted_pynode_name_access", to
to control the behavior when a deleted node's name is queried / used. The
current behavior - of issuing a warning, but returning the old name - is now
deprecated, and at some point the default will be changed to "error", which
will cause pymel to raise a DeletedMayaNodeError. If you wish to keep the
old behavior - and not be nagged that it may be changed at some point the
future - change the setting to "warn". You may also set it to "ignore" if you
want to not even issue a warning. (The current default setting is
"warn_deprecated", which will behave just like "warn", except with an
additional FutureWarning to remind you to change the setting in pymel.conf)
- util: Singleton: eliminate DeprecationWarning for object.__init__(*p, **k)
- nodetypes: tweak new constraint-weight-query syntax - we now allow
constraint(q=1, weight=True), instead of constraint(q=1, weight=[]); also,
may use a tuple (or other non-list iterable) for weight

- general: remove unused kwargs for Attribute.affects/affected
- uitypes: make a base PyUIContainer parent class for Layout and Window
- mel2py: removed findMelOnlyCommands(), as it wasn't working, unused, and never
intended to be publicly exposed.
(https://github.com/LumaPictures/pymel/issues/412)

----------------------------------
Additions
----------------------------------
- all: Add maya-2019 support
- all: python-3 / "typing" style type comments added to many / most commands
and methods
- general: AttributeSpec may now be constructed from a string (which names an
existing Attribute), an Attribute, an MPlug, or another AttributeSpec.
DependNode.attrSpec now also accepts all these objects as well.
- uitypes: Many layout flags were were not wrapped on Layout; they now are,
which also means all sub-classes inherit these methods as well (though many
subclasses already had their own overrides for many of these commands). The
full set of new methods on Layout is:

dragCallback, dropCallback, getAnnotation, getBackgroundColor, getChildArray,
getDocTag, getEnable, getEnableBackground, getFullPathName, getHeight,
getHighlightColor, getIsObscured, getManage, getNumberOfChildren,
getNumberOfPopupMenus, getPopupMenuArray, getPreventOverride, getVisible,
getVisibleChangeCommand, getWidth, noBackground, setAnnotation,
setBackgroundColor, setDocTag, setEnable, setEnableBackground, setHeight,
setHighlightColor, setManage, setPreventOverride, setVisible,
setVisibleChangeCommand, setWidth, statusBarMessage

- nodetypes: Some api method wraps were re-enabled on DependNode, DagNode, and
ObjectSet. Formerly, some of these methods were implemented on some
subclasses of these node types; they are now uniformly available on the base
node. Note that some of these methods represent new functionality, while
others merely duplicate existing functionality (ie, DagNode.partialPathName
<=> DagNode.name); however, we wanted to provide a uniform interface, and did
not want to break backward compatibility, so they were enabled on their base
classes. The set of new methods is:

Camera.getFarClippingPlane, Camera.setFarClippingPlane,
Camera.getNearClippingPlane, Camera.setNearClippingPlane,
DagNode.fullPathName, DagNode.isInstancedAttribute, DagNode.partialPathName,
DagNode.setInstanceable, DependNode.allocateFlag, DependNode.attributeClass,
DependNode.deallocateAllFlags, DependNode.deallocateFlag,
DependNode.dgCallbacks, DependNode.dgTimer, DependNode.dgTimerOff,
DependNode.dgTimerOn, DependNode.dgTimerQueryState, DependNode.dgTimerReset,
DependNode.getAliasAttr, DependNode.hasAttribute, DependNode.isNewAttribute,
DependNode.removeAttribute, DependNode.setFlag, DependNode.typeName,
ObjectSet.addMember, ObjectSet.isMember, ObjectSet.removeMember

- nodetypes: Transform.rotateByQuaternion added, and accepts either a
Quaternion/MQuaternion or four separate floats
- nodetypes: DependNode.deleteAttr now accepts Attribute objects (first
verifying that it is an attribute on the same node as self)
- nodetypes: Added a DependNode.typeName classmethod - similar to
DependNode.type / general.nodeType, but unlike those, it does not require an
actual instance of a node, or call any mel / api functions - instead, it just
returns the type that the given class wraps. When called from an instance,
should always give the same result as DependNode.type, since pymel always
ensures that the most specific node class is used to create any PyNode
- nodetypes: Undo support added to a number of AnimCurve methods:

addKeys, addKeysWithTangents, insertKey, remove, setAngle, setBreakdown,
setInTangentType, setOutTangentType, setPostInfinityType,
setPreInfinityType, setTangentTypes, setTangentsLocked, setTime,
setUnitlessInput, setValue, setWeight, setWeighted, setWeightsLocked

- util.enum: EnumValue objects now have a __hash__, and so can be stored in dicts / sets
- versions: add v2018_1, v2018_1, v2018_2, v2019_3, v2019
- general: added getDefault method to Attribute class - thanks Bob White!
- language: allow optionvars to save long types - thanks Jordan Hueckstaedt!
- all: standardize on numpy-style docstrings with PEP484 type annotations.
- general: allow adding of 2 (1-dimensional) components - ie, you can now add
two MeshVertex objects, containing verts for the same mesh, together to get
a new MeshVertex object representing their union
- nodetypes: add Transform.getRotateOrientation / setRotateOrientation
these are distinct from the existing getRotateAxis / setRotateAxis
(from MEL), because they operate on quaternions, which are what the
transform "actually" stores under the hood - and so it seems potentially
useful to give direct access.
- general: expand types of objects that AttributeSpec constructor accepts -
str, Attribute object, AttributeSpec object, MPlug, MObject
- nodetypes: make DependNode.deleteAttr work with Attribute
- datatypes: expand set of things you can construct a Quaternion with: lists
of floats, ints, another Quaternion, an MQuaternion, axis-angle, rotate
vector-to-vector
- nodetypes: added an undoable Camera.setNearFarClippingPlanes
- system: UndoChunk can take an optional chunk "name" to show up in undo list
- nodetypes: make creation of RenderLayer() / DisplayLayer() use mel cmds
this way, they are hooked up to renderLayerManager / displayLayerManager
also, gives more options on creation. However, they are created empty by
default, to match old behavior

----------------------------------
Bug Fixes
----------------------------------
- uitypes.OptionMenu.getItemArray() now fixed, and returns PyUI objects
- nodetypes: fixed issue with DependNode.attrSpec incorrectly caching dynamic
attrs
- datatypes: fix getPlugValue for Angle and Time plugs (would error previously)
- core: Added defensive code to prevent callback id leaks in some scenarios
...thanks David Lassonde!
- core: fixed bug where api commands that errored would still create an undo
entry
- nodetypes: THblendShape was incorrectly mapped to kPluginSkinCluster
- nodetypes: fix DagNode.exists() (was raising error in some situations)
- general: fix indexing components with an iterable - ie, myMesh.f[(1,2,5)]
- nodetypes: fix for ikHandle not returning PyNodes (issue 410)
- general: fix for parenting with grouping of args; fixes issue 406
- virtual nodes: fix for plugins.PyNodeMethod
- nodetypes: fix for creating PyNode wraps for node types added outside of
plugin init - ie, some mtoa nodes get created outside of the plugin init
- core: fix for plugin unloaded callback when using plugin name with extension -
ie, pm.unloadPlugin("myPlugin.py")
- nodetypes: make TransferAttribute use MFnWeightGeometryFilter
- nodetypes: AnimCurve.addKey / evaluate / AnimCurve.findClosest now work for
all curve types, not just time-to-float types
- nodetypes: fix for creation of Locator() - thanks bob-white!
- nodetypes: fix DisplayLayer.removeMembers - thanks Akshay!
- general: deal with connectAttr error that contains unicode
(https://github.com/LumaPictures/pymel/issues/402)
- nodetypes: fix bug when creating AngleBetween node
(https://github.com/LumaPictures/pymel/issues/416)


==================================

1.0.10

==================================

----------------------------------
Changes
----------------------------------
- default testing engine changes to pytest (from nose)
- remove ply as requirement, as we have pymel.util.external.ply
- utilitytypes: make LazyLoadModule a class, not func

----------------------------------
Additions
----------------------------------
- added support for 2018
- system: add FileReference.nodes(recursive=True) flag
- Adding pm.isModified function (replacement for cmds.file(q=1, modified=1)
(thanks, bob-white!)
- Added file reference remove flags (thanks, wesbondie!)
- added mergeNamespaceWithParent and mergeNamespaceWithRoot to
FileReference.remove to match docs (thanks mjmvisser!)
- add kwargs support to getClassfication - issue 343 (thanks kartikg3!)
- plugins: add FileTranslator plugin helper base class to pymel.api.plugins
- util.enum: add Enum.itervalues
- maintenance: make stub generation more general-purpose; add cli
- stubs: improvements to PEP484 pyi stub file generation
- tests support pytest now

----------------------------------
Bug Fixes
----------------------------------
- fix for Attribute equality for compound multi attrs
- cmds.file(new=1, type='mayaAscii') will crash maya - pm.newFile() will now
automatically ignore any type/typ flags to avoid this - issue 346
(thanks bob-white!)
- fix for mesh.numTriangles() raising a TypeErorr - issue 388
(thanks kartikg3!)
- fix for uitypes.Menu.getItemArray exceptions (thanks bob-white!)
- plogging: fix for setting of root logging level (thanks sdalgo!)
- fix to deal with nodes showing up multiple times in inheritance tree from
cmds.nodeType (ie, aiSkyDomeLight)
- ipymel now working again with modern versions of IPython
- fix for PyNode becoming invalid if instance is reparented in some situations
- deprecated api-wrapped functions weren't returning values
- dynamically create PyNodes from nodetypes - fixes issue with some maya node
types that can't get detected on plugin load
- fix for hasParent/hasChild/isParentOf/isChildOf with underworld nodes
- pm.parent will set PyNodes fed in to use the correct instance / parent
- better fix for mayapy segfaults (run maya.standalone.uninitialize)
- factories: some functions using MFloatPoint weren't doing unit conversion
- some node types that are dag nodes don't work with MFnDagNode - however,
.nodeName() should still work (as that doesn't need MFnDagNode)
- nodetypes: attempt to deal with crash with instances;
get it when you add an instance of an object, and then access the old object;
this doesn't completely solve the issue, but it may be impossible to avoid
completely without a patch for the underlying problem from autodesk
- fix for pm.listNamespaces() returning duplicates weed out - issue 380
(thanks mjmvisser!)
- datatypes: fix to deal with new swig-generated setattr in 2018
- factories: fix for fromInternalUnits with ref-casts
- factories: fix for isMayaType, for weird types
(ie, TadskAssetInstanceNode_TdependNode, which is a parent of adskMaterial)
- factories: prefer non-deprecated api methods
- startup: fix some hangs on exit in maya 2016.51
- pymel.conf: fix name of fix_linux_mayapy_segfault
- stubs: fix for detection of os.environ


==================================

1.0.9

==================================

----------------------------------
Changes
----------------------------------
- turn fixMayapy2011SegFault on by default, control with config

----------------------------------
Additions
----------------------------------
- added support for 2017
- Added support for PySide2

----------------------------------
Bug Fixes
----------------------------------
- arrays: fix error messages for non-existent axes (issue 369)
- general: remove hard-coded getSetAttrCmds; also fix tests (default is short attr names)
- general: Fix for showNamespaces breaking ls
- general: Mesh*.connected* raises error if list is empty (issue 367)
- general: Fix a bug where parenting to a non-existent node did not raise an error
- language: restore gFilterUIDefaultAttributeFilterList, in prep for autodesk fix
- ui: textField and text lose their type (issue 349)


==================================

1.0.8

==================================

----------------------------------
Changes
----------------------------------
- ui: update promptForFolder to use fileDialog2
- core: don't abort loading pymel if error adding a plugin command
- system: ensure sceneName always returns Path('') for untitled scenes (this was the described behavior, but it would return e.g. /path/to/untitled.mb under some circumstances)
- system: changed FileInfo to inherit from collections.MutableMapping. This gives it a complete dictionary interface, like OptionVarDict.
- language: added support for namespace-protected MEL procedure calls. (issue 359).
- update ipymel to work with newer ipython versions

----------------------------------
Additions
----------------------------------
- added support for 2016.5
- nodetypes: added ObjectSet.forceElement
- pmcmds: give wrapped commands unique co_name, for better cProfile info
- general: added ability to pass type to addAttr. The type is automatically determined to be a dataType or an attributeType

----------------------------------
Bugfixes
----------------------------------
- general: fix for getMin/Max with multi attr elements
- general: fix listRelatives to make combo of allDescendents, shapes, noIntermediate work
- general: fix for parent(removeObject=True)
- general: fix particle attribute in ParticleComponent.attr(). (issue 350)
- general: fix spaceLocator not returning unique names. (issue 320)
- startup: fix for installation of exit handler in fixMayapy2011SegFault
- uitypes: fix for TextScrollList.selectIndexedItems / selectAll. (issue 110)
- uitypes: fix docs for MainProgressBar
- all: don't try to UI modules when Maya runs in batch mode
- datatypes: fix for Matrix/TransformationMatrix scale/rotate properties
- nodetypes: fix Shape.getTransform() to return shape node's transform. (issue 311)
- utils: fix runOverriddenModule() to use os.stat compare in case of Windows OS, where samefile would error. (issue 358).


==================================

1.0.7

==================================

----------------------------------
Changes
----------------------------------

- general: MultiAttrs now support __delitem__
- uitype: use PySide in toQtObject methods if no PyQt
- language: added mel.globals alias for melGlobals
- core: improve API undo callbacks
- system: saveFile resets name if filename is messed up
- system: make loadReference give more informative error if ref not loaded
- system: optimized FileReference.__init__
- system: switched file cmd used by iterReferences for more stable referenceQuery
- docs: improved the look of the docs
- util.arrays: Array objects now explicitly unhashable, added totuple
- utils.path: allow the pattern argument for various methods to take a compiled regular expression pattern.

----------------------------------
Additions
----------------------------------

- added support for 2016
- language: added Env.playbackTimes convenience property for getting/setting all timeline values at once
- allapi: added example usage to SafeApiPtr
- general: added Attribute.iterDescendants
- system: added mode and caseSensitive args to Translator.fromExtension
- nodetypes: added topLevel and descendants kwargs to DependNode.listAttr
- nodetypes: added Camera.isDisplayGateMask method
- nodetypes: added closestPolygon keyword arg to getUVAtPoint
- uitypes: added toPySide* functions for casting maya UI strings to PySide objects
- pymel.conf: added option to source initialPlugins.mel
- pymel.conf: added option to prefer PyQt4 or PySide
- util.arguments: added support for sets, useChangedKeys to compareCascadingDicts
- util.common: added inMaya() func
- stubs: make stub Mel.__getattr__ accept anything
- stubs: added PySide stubs

----------------------------------
Bugfixes
----------------------------------

- system: fixed bug with referenceQuery which occured when editStrings and liveEdits flags are True
- system: fixed bug with ReferenceEdit.remove() where self.rawEditData was referred to as a method instead of a property.
- ipymel: pressing ctrl-c no longer quits maya
- logging: fixed bug preventing logging menus from displaying


==================================

1.0.6

==================================

----------------------------------
Non-Backward Compatible Changes
----------------------------------

- joint.limitSwitchX/Y/Z: now return [bool, bool] when queried, just like the mel command, to indicate whether the limit is on for the min/max
- joint.radius: now returns the float radius, instead of [radius]

----------------------------------
Changes
----------------------------------

- general: addAttr/setEnums now accept strings, lists, or dicts for setting enums
- other: cast NameParser arguments to unicode
- factories: issue deprecation warning for deprecated functions only when they're actually used

----------------------------------
Additions
----------------------------------

- added support for 2015
- added (functional) namespace method to Attribute, Component
- general: added mute accessors to Attributes
- system: provide ReferenceEdit.rawEditData property for getting faster unparsed access to reference edits
- nodetypes: added stripUnderworld flag to DependNode.nodeName(), and default it to true. This removes the underworld prefix (the node prior to ->) from nodeName().
- ipymel: update for ipython 0.11
- util.arguments: compareCascadingDicts can show which keys have been added (as opposed to just changed)
- system: added workspace.expandName

----------------------------------
Bugfixes
----------------------------------

- general: for the keyframe command, the upper / lower limits substituted in for the "index" flag, when no upper/lower limits were given, are now correct; formerly, the behavior of index=":" would vary depending on where (in time) the first and last keyframes were
- general: timerange flags (ie, keyframe(time=...), findKeyframe(time=...), etc) now provide correct results when no upper/lower limits given; formerly, the time=":" would vary depending on if / which objects were selected
- animation: Joint.angleX/Y/Z and Joint.stiffnessX/Y/Z now work
- nodetypes: Container.getParentContainer, Container.getRootTransform, and Character.getClipScheduler now all return None instead of raising a runtime error if no object was found
- system: FileReference.fullNamespace and iterReferences/listReferences with namespaces=1 now handle situations where reference node itself is in a non-root namespace correctly
- general: when instantiating PyNode from an MPlug, to get the PyNode for the node, create from the underlying mobject, not the name (which may not be unique)
- animation: fix for Joint.getAngleX/Y/Z, .getStiffnessX/Y/Z; joint.radius no longer returns list
- mel2py: numerous fixes / tweaks
- system: handle situations where reference node itself is in a non-root namespace
- system: FileReference.nodes fix when reference contains no nodes
- general: duplicate - special-case workaround for duplicating a single underworld node with no children
- general: fix for duplicate + non-unique names
- general: duplicate - workaround for bug introduced in 2014
- nodetypes: fix for getAllParents with underworld nodes
- Upgrade path.py to version 5.0 from github (https://github.com/jaraco/path.py). This fixes an issue with Maya2014, python 2.7.3, and Windows where path().isdir() raised an error.
- general: cmds.group returns unique name in maya > 2014
- fix for virtual classes
- versions: parsing for 'Preview Release' format - from Dean Edmonds

==================================

Page 1 of 3