Commit 8872d5b4 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Code Gardening] Entirely remove already unsupported (Asset) ParamTypes

parent b644d247
......@@ -218,10 +218,6 @@ You can set `default` to `"adjustcenter"` to adjust the geometry to the frame s
* special GUI for the wipe transition makes it possible to select a direction of a slide
##### `"addedgeometry"`
* parameter linked to a "geometry" parameter
##### `"curve"`
* cubic curve editor for the frei0r color curves filter (old version)
......
......@@ -158,9 +158,6 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
case ParamType::Fontfamily:
case ParamType::Keywords:
case ParamType::Readonly:
case ParamType::RestrictedAnim: // Fine because unsupported
case ParamType::Animated: // Fine because unsupported
case ParamType::Addedgeometry: // Fine because unsupported
case ParamType::Url:
case ParamType::UrlList:
// All fine
......@@ -665,8 +662,6 @@ ParamType AssetParameterModel::paramTypeFromStr(const QString &type)
return ParamType::AnimatedRect;
} else if (type == QLatin1String("geometry")) {
return ParamType::Geometry;
} else if (type == QLatin1String("addedgeometry")) {
return ParamType::Addedgeometry;
} else if (type == QLatin1String("keyframe") || type == QLatin1String("animated")) {
return ParamType::KeyframeParam;
} else if (type == QLatin1String("color")) {
......@@ -837,9 +832,7 @@ QVariant AssetParameterModel::parseAttribute(const ObjectId &owner, const QStrin
return converted;
}
if (attribute == QLatin1String("default")) {
if (type == ParamType::RestrictedAnim) {
content = getDefaultKeyframes(0, content, true);
} else if (type == ParamType::KeyframeParam) {
if (type == ParamType::KeyframeParam) {
return content.toDouble();
} else if (type == ParamType::List) {
bool ok;
......
......@@ -27,11 +27,8 @@ enum class ParamType {
Bool,
Switch,
MultiSwitch,
RestrictedAnim, // animated 1 dimensional param with linear support only
Animated,
AnimatedRect, // Animated rects have X, Y, width, height, and opacity (in [0,1])
Geometry,
Addedgeometry,
KeyframeParam,
Color,
ColorWheel,
......
......@@ -76,8 +76,7 @@ void AssetParameterView::setModel(const std::shared_ptr<AssetParameterModel> &mo
for (int i = 0; i < model->rowCount(); ++i) {
QModelIndex index = model->index(i, 0);
auto type = model->data(index, AssetParameterModel::TypeRole).value<ParamType>();
if (m_mainKeyframeWidget && (type == ParamType::Geometry || type == ParamType::Animated || type == ParamType::RestrictedAnim ||
type == ParamType::KeyframeParam || type == ParamType::ColorWheel)) {
if (m_mainKeyframeWidget && (type == ParamType::Geometry || type == ParamType::KeyframeParam || type == ParamType::ColorWheel)) {
// Keyframe widget can have some extra params that shouldn't build a new widget
qDebug() << "// FOUND ADDED PARAM";
if (type != ParamType::ColorWheel) {
......
......@@ -140,9 +140,6 @@ AbstractParamWidget *AbstractParamWidget::construct(const std::shared_ptr<AssetP
widget = new KeywordParamWidget(model, index, parent);
break;
}
case ParamType::Animated:
case ParamType::RestrictedAnim:
case ParamType::Addedgeometry:
default:
// not reimplemented
widget = new Unsupported(model, index, parent);
......
......@@ -73,7 +73,7 @@ KeyframeImport::KeyframeImport(const QString &animData, std::shared_ptr<AssetPar
int spaces = first.count(QLatin1Char(' '));
switch (spaces) {
case 0:
currentParam.insert(QLatin1String("type"), QJsonValue(int(ParamType::Animated)));
currentParam.insert(QLatin1String("type"), QJsonValue(int(ParamType::Hidden)));
break;
default:
currentParam.insert(QLatin1String("type"), QJsonValue(int(ParamType::AnimatedRect)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment