Can't get custom Attr created in maya.cmds

Can't get custom Attr created in maya.cmds

shomari.rivero65CK4
Explorer Explorer
304 Views
1 Reply
Message 1 of 2

Can't get custom Attr created in maya.cmds

shomari.rivero65CK4
Explorer
Explorer

import maya.cmds as cmds

cmds.file(new = True, f = True)

sphere_xform, sphere_shape = cmds.polySphere( n = 'Earth')

cmds.addAttr(

  sphere_xform,

  attributeType = 'float',

  shortName = 'mass',

  longName = 'mass',

  defaultValue = 5.9742e24)

0 Likes
305 Views
1 Reply
Reply (1)
Message 2 of 2

jmreinhart
Advisor
Advisor

That code does add the attribute. Maybe you want to add 

keyable = True

so that it shows up in the channel box, instead of just the attribute editor? 

jmreinhart_0-1667051683841.png

 

0 Likes