nemirc
04-05-2003, 02:39 AM
Hello everybody.
I created a lung and I also made a "breathing control" to control the breathing rate (using a range from 1 to 4).
The thing is that I made an expression that would control the expansion of the lungs (using blendshapes) by reading the value in the controller attribute.
The expression is as follows:
if (breathing_control.breath_rate = 1)
leftlung_morph.weight[0] = sind(time*90)*0.25;
else if (breathing_control.breath_rate = 2)
leftlung_morph.weight[0] = sind(time*90)*0.5;
else if (breathing_control.breath_rate = 3)
leftlung_morph.weight[0] = sind(time*90)*0.75;
else if (breathing_control.breath_rate = 4)
leftlung_morph.weight[0] = sind(time*90)*1;
else
leftlung_morph.weight[0] = 0;
The problem is that the blendshape attribute is orange (as expected when an attrib is connected to other one) but the locator's attribute is orange as well and I am unable to change it (and that renders my controller useless).
What is the problem with the expression?
The expression was created (for some reason) in both the lungshape and locatorshape nodes. I don't know if that would be the problem...
Thanks
I created a lung and I also made a "breathing control" to control the breathing rate (using a range from 1 to 4).
The thing is that I made an expression that would control the expansion of the lungs (using blendshapes) by reading the value in the controller attribute.
The expression is as follows:
if (breathing_control.breath_rate = 1)
leftlung_morph.weight[0] = sind(time*90)*0.25;
else if (breathing_control.breath_rate = 2)
leftlung_morph.weight[0] = sind(time*90)*0.5;
else if (breathing_control.breath_rate = 3)
leftlung_morph.weight[0] = sind(time*90)*0.75;
else if (breathing_control.breath_rate = 4)
leftlung_morph.weight[0] = sind(time*90)*1;
else
leftlung_morph.weight[0] = 0;
The problem is that the blendshape attribute is orange (as expected when an attrib is connected to other one) but the locator's attribute is orange as well and I am unable to change it (and that renders my controller useless).
What is the problem with the expression?
The expression was created (for some reason) in both the lungshape and locatorshape nodes. I don't know if that would be the problem...
Thanks
