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

@@ -280,6 +280,10 @@ string Mask::PropertiesJSON(long int requested_frame) {
root["duration"] = add_property_json("Duration", Duration(), "float", "", false, 0, 0, 1000 * 60 * 30, CONSTANT, -1, true);
root["replace_image"] = add_property_json("Replace Image", replace_image, "bool", "", false, 0, 0, 1, CONSTANT, -1, false);
// Add replace_image choices (dropdown style)
root["replace_image"]["choices"].append(add_property_choice_json("Yes", true, replace_image));
root["replace_image"]["choices"].append(add_property_choice_json("No", false, replace_image));
// Keyframes
root["brightness"] = add_property_json("Brightness", brightness.GetValue(requested_frame), "float", "", brightness.Contains(requested_point), brightness.GetCount(), -10000, 10000, brightness.GetClosestPoint(requested_point).interpolation, brightness.GetClosestPoint(requested_point).co.X, false);
root["contrast"] = add_property_json("Contrast", contrast.GetValue(requested_frame), "float", "", contrast.Contains(requested_point), contrast.GetCount(), -10000, 10000, contrast.GetClosestPoint(requested_point).interpolation, contrast.GetClosestPoint(requested_point).co.X, false);