Results 1 to 2 of 2

Thread: channel editor: input: uValue in motion path: No direct Access?

  1. #1
    integer srlake314's Avatar
    Join Date
    Jul 2013
    Location
    Toluca Lake, CA
    Posts
    30

    Default channel editor: input: uValue in motion path: No direct Access?



    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.

    Code:
    import maya.cmds as mc
    
    locName="userSet"
    objSel = mc.ls(sl=True)
    objShapeSel = mc.listRelatives(objSel, shapes = True)
    
    
    #create window UI
    
    
    # Create locator
    mc.spaceLocator(n=locName)
    
    # 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)
    motionPath=mc.pathAnimation(locName,objSel)
    
    #Iterate through each selection...
    for all in objShapeSel:
    	
        # Determing the connection
        mPath = list(set(mc.listConnections(all, type = 'motionPath')))
        print mPath
        
        # 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'))
    My question is, is that the way it is with anything other than the transforms(trans, rot, scale)?

    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.

  2. #2
    integer srlake314's Avatar
    Join Date
    Jul 2013
    Location
    Toluca Lake, CA
    Posts
    30

    Default

    OH to add,

    so normally I'd key:
    mc.setAttr(locName.translateZ)

    So, from what I'm guessing(google, here, and trial and error), there isn't a way to key:
    mc.setAttr(locname.motionPath.uValue = whatever)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •