- set_link("color1",ValueNode_Const::create(Color::black()));
- set_link("color2",ValueNode_Const::create(Color::white()));
+ switch(value.get_type())
+ {
+ case ValueBase::TYPE_GRADIENT:
+ set_link("color1",ValueNode_Const::create(value.get(Gradient())(0)));
+ set_link("color2",ValueNode_Const::create(value.get(Gradient())(1)));
+ break;
+ default:
+ throw Exception::BadType(ValueBase::type_local_name(value.get_type()));
+ }
+