PDA

View Full Version : Attribute contolling connections


ajsfuxor
06-29-2003, 05:03 PM
Hey yall

I'm wondering if is possible for an attribute, when set at value 1 can make a connection between two nodes, and when that value is 0, it breaks that same connection. Anyone have any ideas on how to do something like this?

Thanks

ajsfuxor
06-29-2003, 05:16 PM
actually, i think i want something a little different now

I have a math utility node with input1 and input2

Input 1 is a constantly changing number depending on the length of a curve.

I want an attrribute on a control curve (eg. stretch) to determine the value of input2

SO....when

Stretch = 0, then input2 = 11.5 (just a set number)

Stretch = 1 then input2 = input1

Any ideas on how i might do this?

ajk48n
06-30-2003, 05:43 AM
You should be able to do it with an expression.

if (curve.stretch == 0)
{
math_node.input2 = 11.5;
}
if (curve.stretch == 1)
{
math_node.input2 = math_node.input1;
}

ajsfuxor
06-30-2003, 06:51 AM
Thanks! Works like a charm!

CGTalk Moderation
01-15-2006, 12:00 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.