You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user