Screen Shot 2017-02-10 at 8.29.49 AM.jpg
Grabbed via cmd/shft 4 on mac.
So I know, that normally with a disconnectAttr, I can access the transforms from the transform node, and not the shape. In order to access and break the connection of the input section of the picture you see, it was determined we had to do a around about to get to it and then use the disconnectAttr.
My question is, is that the way it is with anything other than the transforms(trans, rot, scale)?
import maya.cmds as mc
objSel = mc.ls(sl=True)
objShapeSel = mc.listRelatives(objSel, shapes = True)
#create window UI
# Create locator
# Attach locator to motion path c=userCurve created by user, perhaps force user to select the curve(loop generated base on # of selections to prevent duplicates)
#Iterate through each selection...
for all in objShapeSel:
# Determing the connection
mPath = list(set(mc.listConnections(all, type = 'motionPath')))
# locate all motion paths
for all_mPaths in mPath:
# Break connections on the Motion Path's 'uValue' channel.
mc.disconnectAttr((all_mPaths + '_uValue.output'), (all_mPaths + '.uValue'))
I'm curious because some of my next steps will be to access said, uValue in a loop form to position the locator and joints at various points on the curve. In other words, to add the uValue, (e.g. 0, .5, 1) to place 3 points, then locators and then the joints. So from what I'm seeing, there's no direct way of just assigning a value to the uValue field like I would if I was doing it manually.