Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to change attribute from int to float?

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
2138 Views, 7 Replies

Is there a way to change attribute from int to float?

Hello, I was making a custom rig for a character and working with custom attributes. I seem to have accidentally created some of these attributes as ints, but they should really be floats. Unfortunately they have already gone through connection editor to affect the skeleton, so I was wondering if there was an easy way to change an attribute type from int to float. Thank you for reading and your time.

7 REPLIES 7
Message 2 of 8
mspeer
in reply to: Anonymous

Hi!

 

I don't know an easy way. The best would be to create the attribute again.

You could also try an utility node to change the values of your integer output.

Message 3 of 8
Anonymous
in reply to: Anonymous

for Set Driven Key issue.
select driver
Modify>edit attrib
adjust the min/max value (in my case, -2 to 10, I changed to -20 to 100)
select driven
open graph editor
adjust keyframes 



Message 4 of 8
Anonymous
in reply to: Anonymous

Yiu could use the edit attribut option and switch int to float

Message 5 of 8
Anonymous
in reply to: Anonymous

[image: image.png]
dont have the float in the options
Message 6 of 8
christineZo
in reply to: Anonymous

I had this question too and saw no answers but luckily found one on youtube:

https://www.youtube.com/watch?v=OgXr-ZYjRgg

 

Basically, you save your file as an Ascii file (so .ma). Then open it using a text editor like TextEdit on Mac or whichever one you have on your computer. Ctrl+F (or Cmd+F on Mac) to open up the search box. Then type in the attribute name you are looking to change, and search for it. In my case it was the blink attributes I was looking to convert to a float, so I just typed blink. You'll see something like this:

 

Screen Shot 2022-06-08 at 1.48.55 PM.png

 

The string "long" means it's an integer. If it were a float, it would say "double". So simply change the word "long" to "double" as I did in the highlighted text and save it. When you open up your scene in Maya again, the attribute will be a float!

 

 

Message 7 of 8
christineZo
in reply to: Anonymous

I had this question too and saw no answers but luckily found one on youtube:

https://www.youtube.com/watch?v=OgXr-ZYjRgg

 

Basically, you save your file as an Ascii file (so .ma). Then open it using a text editor like TextEdit on Mac or whichever one you have on your computer. Ctrl+F (or Cmd+F on Mac) to open up the search box. Then type in the attribute name you are looking to change, and search for it. In my case it was the blink attributes I was looking to convert to a float, so I just typed blink. You'll see something like this:

 

Screen Shot 2022-06-08 at 1.48.55 PM.png

 

The string "long" means it's an integer. If it were a float, it would say "double". So simply change the word "long" to "double" as I did in the highlighted text and save it. When you open up your scene in Maya again, the attribute will be a float!

Message 8 of 8
wpeterburg
in reply to: christineZo

Helpful, thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report