View Full Version : Converting a string to float with nodes

03 March 2011, 03:30 PM
I'm calculating the angle between three locators, I've created an annotation which I'd like to connect the angle output to.

Problem is, I can only connect a string to the annotation, not a float. So I've tried to figure out if it's possible to convert a float to a string without using expressions, without any luck so far.

Is there any labels other than the annotation that can be used to display float outputs? Or is it any way off connection the float output to the annotation-text?

I'd like to do this without doing the conversion with expressions, I've tried that, but it doesn't allways update the results :curious:

03 March 2011, 04:54 PM
Sounds like a very awkward way of doing things.

Are you saying the node is calculating the angle and then storing the output in a string attribute?

Can you not just use an MFnNumericData.kFloat attribute for your output?

03 March 2011, 04:56 PM
you could ditch the annotation and use a particle set to numeric... I think I have some test code, I'll dig some out later... fact, I just thought... just download my protractor script, that does it.



03 March 2011, 05:13 PM
Aha, clever solution! Thanks a bunch Nathan :)

CGTalk Moderation
03 March 2011, 05:13 PM
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.