Get all properties for a specific frame
| 689 | |
| 690 | // Get all properties for a specific frame |
| 691 | std::string ChromaKey::PropertiesJSON(int64_t requested_frame) const { |
| 692 | |
| 693 | // Generate JSON properties list |
| 694 | Json::Value root = BasePropertiesJSON(requested_frame); |
| 695 | |
| 696 | // Keyframes |
| 697 | root["color"] = add_property_json("Key Color", 0.0, "color", "", &color.red, 0, 255, false, requested_frame); |
| 698 | root["color"]["red"] = add_property_json("Red", color.red.GetValue(requested_frame), "float", "", &color.red, 0, 255, false, requested_frame); |
| 699 | root["color"]["blue"] = add_property_json("Blue", color.blue.GetValue(requested_frame), "float", "", &color.blue, 0, 255, false, requested_frame); |
| 700 | root["color"]["green"] = add_property_json("Green", color.green.GetValue(requested_frame), "float", "", &color.green, 0, 255, false, requested_frame); |
| 701 | root["fuzz"] = add_property_json("Threshold", fuzz.GetValue(requested_frame), "float", "", &fuzz, 0, 125, false, requested_frame); |
| 702 | root["halo"] = add_property_json("Halo", halo.GetValue(requested_frame), "float", "", &halo, 0, 125, false, requested_frame); |
| 703 | root["keymethod"] = add_property_json("Key Method", method, "int", "", NULL, 0, CHROMAKEY_LAST_METHOD, false, requested_frame); |
| 704 | root["keymethod"]["choices"].append(add_property_choice_json("Basic keying", 0, method)); |
| 705 | root["keymethod"]["choices"].append(add_property_choice_json("Basic keying (soft)", CHROMAKEY_BASIC_SOFT, method)); |
| 706 | root["keymethod"]["choices"].append(add_property_choice_json("HSV/HSL hue", 1, method)); |
| 707 | root["keymethod"]["choices"].append(add_property_choice_json("HSV saturation", 2, method)); |
| 708 | root["keymethod"]["choices"].append(add_property_choice_json("HSL saturation", 3, method)); |
| 709 | root["keymethod"]["choices"].append(add_property_choice_json("HSV value", 4, method)); |
| 710 | root["keymethod"]["choices"].append(add_property_choice_json("HSL luminance", 5, method)); |
| 711 | root["keymethod"]["choices"].append(add_property_choice_json("LCH luminosity", 6, method)); |
| 712 | root["keymethod"]["choices"].append(add_property_choice_json("LCH chroma", 7, method)); |
| 713 | root["keymethod"]["choices"].append(add_property_choice_json("LCH hue", 8, method)); |
| 714 | root["keymethod"]["choices"].append(add_property_choice_json("CIE Distance", 9, method)); |
| 715 | root["keymethod"]["choices"].append(add_property_choice_json("Cb,Cr vector", 10, method)); |
| 716 | |
| 717 | // Return formatted string |
| 718 | return root.toStyledString(); |
| 719 | } |