Added dropdown choices into JSON properties, so a UI can correctly list the options for certain properties. Fixed a bug when deleting all Points from a Keyframe, and added some missing Enums from the Python/Ruby bindings.

This commit is contained in:
Jonathan Thomas
2015-10-02 18:22:10 -05:00
parent ac7be90544
commit 358e0835d2
11 changed files with 61 additions and 13 deletions

View File

@@ -77,7 +77,20 @@ Json::Value ClipBase::add_property_json(string name, float value, string type, s
prop["readonly"] = readonly;
prop["interpolation"] = intepolation;
prop["closest_point_x"] = closest_point_x;
prop["choices"] = Json::Value(Json::arrayValue);
// return JsonValue
return prop;
}
Json::Value ClipBase::add_property_choice_json(string name, int value, int selected_value) {
// Create choice
Json::Value new_choice = Json::Value(Json::objectValue);
new_choice["name"] = name;
new_choice["value"] = value;
new_choice["selected"] = (value == selected_value);
// return JsonValue
return new_choice;
}