PDA

View Full Version : Maya Stupidity (#6 in a series of 1001...)


NaughtyNathan
01-18-2011, 12:57 PM
I've just stumbled upon yet another hilarious example of Maya's spectacular stupidity:

addAttr -attributeType "float" -longName "naughty" -defaultValue 4.0 pCube1;
getAttr -type pCube1.naughty; // Sanity check!
// Result: float //

setAttr -type "float" pCube1.naughty 8.0;
// Error: line 1: The type 'float' is not the name of a recognized type. //
:D :) :sad: :cry:
:nathaN

INVINCIBLE0918
01-18-2011, 01:58 PM
Coz float is the default type of data,so when you want to set you custon float attr,try this:

setAttr pCube1.naughty 8.0;

setAttr command's type flag is used to identify the special type of data such as float2,float3 ...

denisT
01-18-2011, 02:31 PM
setAttr command's type flag is used to identify the special type of data such as float2,float3 ...
... other than numeric (default).

-type flag in getAttr and setAttr specifies data type (not attribute type) .

ewerybody
01-19-2011, 09:30 AM
i guess you are preaching to the choir :D

this error is stupefying anyway.

CGTalk Moderation
01-19-2011, 09:30 AM
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.