CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 05-08-2013, 09:46 AM   #1
New Member
Join Date: May 2013
Posts: 7
Compound attr names break in Attribute Editor


I'm adding some attributes to a node and want to group them nicely but it fails.

If you run the code below it will create an empty group and add a compound attribute with 4 children. Initially the attribute names appear fine, but if you click in the viewport to de-select the node and the select it again, all the names of the child attributes have changed into the name of the parent. Then try and select another node ('persp' or any node really) and again switch back to the empty group node and the names will be correct again. Anyone has any idea about what's going on here?

It works fine in the channel box. Tested on Maya 2012 SP1.

import maya.cmds as cmds ctrlNode = cmds.addAttr(ctrlNode, ln='scaler', numberOfChildren=4, at='compound') cmds.addAttr(ctrlNode, ln='objScaleA', at='float', dv=30, smn=0, smx=100, parent='scaler', k=1) cmds.addAttr(ctrlNode, ln='objScaleB', at='float', dv=30, smn=0, smx=100, parent='scaler', k=1) cmds.addAttr(ctrlNode, ln='objScaleC', at='float', dv=30, smn=0, smx=100, parent='scaler', k=1) cmds.addAttr(ctrlNode, ln='objScaleD', at='float', dv=30, smn=0, smx=100, parent='scaler', k=1)

Old 05-08-2013, 09:46 AM   #2
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:38 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.