http://codingfreak.blogspot.com/2009/02/blogger-adding-syntax-highlighter-to.html
Means you can do things like:
import pymel.core as pm def dummystuff(): node=pm.selected()[0] node.name()
It also has syntax highting for most languages supported :)
Welcome to my blog, this is the random mutterings from a Senior Pipeline TD currently working for Crytek UK. Thoughts, tips and moans on any subject loosely associated with Autodesk Maya / Python / Pymel / 3d in general. If you've nothing better to do then stick around.
import pymel.core as pm def dummystuff(): node=pm.selected()[0] node.name()
setAttr ".rm" -type "characterMapping" 206 "RIG:Shoulders_Ctr.SpineBias" 0 1 "RIG:Shoulders_Ctr.rotateZ" 2 1 "RIG:Shoulders_Ctr.rotateY" 2 2 "RIG:Shoulders_Ctr.rotateX" 2 3 "RIG:Shoulders_Ctr.translateZ" 1 1 "RIG:Shoulders_Ctr.translateY" 1 2 "RIG:Shoulders_Ctr.translateX" 1 3 "RIG:Hips_Ctr.rotateZ" 2 4 "RIG:Hips_Ctr.rotateY"
connectAttr animCurveTL4545 LinearValue[4]that connected the translateX of the Wrist to it's animCurve, this edit would still just blindly go and remake this connection, even though LinearValue[4] may now be a completely different object. Now in Maya2011 they try and resolve this issue in a post load script that runs after file load, but's it's better to know about than rely on it.
import maya.cmds as cmds cube=cmds.ls(sl=True)[0] cmds.addAttr(cube, ln='Test') cmds.deleteAttr('%s.Test' % cube) cmds.addAttr(cube, ln='Test')So we've added an attribute 'Test', then deleted it, then added it again in a referenced file. Now this looks like a stupid thing to do, but lets say you're using attributes as markers in a function, maybe exportFlags etc. In 2010 if you look at the edits you'll see the addAttr, then under that the deleteAttr.... regardless of the fact that the last action was to add the attribute again. When the scene is saved the new attribute won't be there because the delete was the last thing in the editList. More over, unless you go and remove that deleteAttr from the editList itself, you'll never be able to remake it.