View Full Version : Using floatFieldGrp in an equation?

11-24-2011, 10:37 PM

Iīm trying to get the value from my float field and use it in an equation, but it doesnīt work. If I query it directly in my equation I get "// Error: Cannot use data of type no type in a scalar operation. // ". Why is it "no typ"? If I use a float field, shouldnīt it return a float?

I tried making it like this and all I get is 0 in $heightMultiplier. Donīt mind the structure of the code, just copied the important parts.

floatFieldGrp -label "Height Multiplier"
-numberOfFields 1
-value1 1.000

float $height;
float $heightMultiplier = `floatFieldGrp -query "heightMultiplier_FFG"`;

$height = rand(0.75,1.1) * $heightMultiplier;

What am I not understanding here?

11-24-2011, 11:28 PM
you are not telling it what PROPERTY of the floatFieldGrp you want to query. How does it know whether you want to query the label, the value, the width, etc...
float $heightMultiplier = `floatFieldGrp -query -value1 "heightMultiplier_FFG"`;:nathaN

11-25-2011, 01:12 AM
Oh damn, so obvious. Thanks! :)

CGTalk Moderation
11-25-2011, 01:13 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.