Skip to content

Commit

Permalink
Build fixes on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 2, 2024
1 parent 185c2d5 commit 895bfe1
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 63 deletions.
35 changes: 35 additions & 0 deletions src/core/BlendEffects/blendeffectmenucreator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
#
# Friction - https://friction.graphics
#
# Copyright (c) Friction contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See 'README.md' for more information.
#
*/

#include "BlendEffects/blendeffectmenucreator.h"

#include "BlendEffects/moveblendeffect.h"
#include "BlendEffects/targetedblendeffect.h"

void BlendEffectMenuCreator::forEveryEffect(const EffectAdder &add)
{
add(QObject::tr("Move"),
[]() { return enve::make_shared<MoveBlendEffect>(); });
add(QObject::tr("Targeted"),
[]() { return enve::make_shared<TargetedBlendEffect>(); });
}
11 changes: 1 addition & 10 deletions src/core/BlendEffects/blendeffectmenucreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@

#include "core_global.h"

#include <QString>
#include <functional>
#include "BlendEffects/moveblendeffect.h"
#include "BlendEffects/targetedblendeffect.h"
#include "smartPointers/selfref.h"

class BlendEffect;
Expand All @@ -41,13 +38,7 @@ struct CORE_EXPORT BlendEffectMenuCreator
using EffectCreator = Creator<BlendEffect>;
using EffectAdder = Func<void(const QString&,
const EffectCreator&)>;
static void forEveryEffect(const EffectAdder& add)
{
add(QObject::tr("Move"),
[]() { return enve::make_shared<MoveBlendEffect>(); });
add(QObject::tr("Targeted"),
[]() { return enve::make_shared<TargetedBlendEffect>(); });
}
static void forEveryEffect(const EffectAdder& add);
};

#endif // BLENDEFFECTMENUCREATOR_H
3 changes: 3 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ set(
BlendEffects/blendeffectcollection.cpp
BlendEffects/moveblendeffect.cpp
BlendEffects/targetedblendeffect.cpp
BlendEffects/blendeffectmenucreator.cpp
Boxes/animationbox.cpp
Boxes/boundingbox.cpp
Boxes/boxrendercontainer.cpp
Expand Down Expand Up @@ -168,6 +169,7 @@ set(
PathEffects/subpatheffect.cpp
PathEffects/sumpatheffect.cpp
PathEffects/zigzagpatheffect.cpp
PathEffects/patheffectmenucreator.cpp
Private/Tasks/complextask.cpp
Private/Tasks/execcontroller.cpp
Private/Tasks/gputaskexecutor.cpp
Expand Down Expand Up @@ -234,6 +236,7 @@ set(
TransformEffects/trackeffect.cpp
TransformEffects/transformeffect.cpp
TransformEffects/transformeffectcollection.cpp
TransformEffects/transformeffectmenucreator.cpp
XML/xevexporter.cpp
XML/xevimporter.cpp
XML/xevzipfilesaver.cpp
Expand Down
59 changes: 59 additions & 0 deletions src/core/PathEffects/patheffectmenucreator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
#
# Friction - https://friction.graphics
#
# Copyright (c) Friction contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See 'README.md' for more information.
#
*/

#include "PathEffects/patheffectmenucreator.h"

#include "PathEffects/dashpatheffect.h"
#include "PathEffects/displacepatheffect.h"
#include "PathEffects/duplicatepatheffect.h"
#include "PathEffects/linespatheffect.h"
#include "PathEffects/solidifypatheffect.h"
#include "PathEffects/spatialdisplacepatheffect.h"
#include "PathEffects/subdividepatheffect.h"
#include "PathEffects/subpatheffect.h"
#include "PathEffects/sumpatheffect.h"
#include "PathEffects/zigzagpatheffect.h"

void PathEffectMenuCreator::forEveryEffect(const EffectAdder &add)
{
add(QObject::tr("Displace"),
[]() { return enve::make_shared<DisplacePathEffect>(); });
add(QObject::tr("Spatial Displace"),
[]() { return enve::make_shared<SpatialDisplacePathEffect>(); });
add(QObject::tr("Dash"),
[]() { return enve::make_shared<DashPathEffect>(); });
add(QObject::tr("Duplicate"),
[]() { return enve::make_shared<DuplicatePathEffect>(); });
add(QObject::tr("Sub-Path"),
[]() { return enve::make_shared<SubPathEffect>(); });
add(QObject::tr("Solidify"),
[]() { return enve::make_shared<SolidifyPathEffect>(); });
add(QObject::tr("Sum"),
[]() { return enve::make_shared<SumPathEffect>(); });
add(QObject::tr("Lines"),
[]() { return enve::make_shared<LinesPathEffect>(); });
add(QObject::tr("ZigZag"),
[]() { return enve::make_shared<ZigZagPathEffect>(); });
add(QObject::tr("Subdivide"),
[]() { return enve::make_shared<SubdividePathEffect>(); });
}
35 changes: 1 addition & 34 deletions src/core/PathEffects/patheffectmenucreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@

#include "core_global.h"

#include <QString>
#include "PathEffects/dashpatheffect.h"
#include "PathEffects/displacepatheffect.h"
#include "PathEffects/duplicatepatheffect.h"
#include "PathEffects/linespatheffect.h"
#include "PathEffects/solidifypatheffect.h"
#include "PathEffects/spatialdisplacepatheffect.h"
#include "PathEffects/subdividepatheffect.h"
#include "PathEffects/subpatheffect.h"
#include "PathEffects/sumpatheffect.h"
#include "PathEffects/zigzagpatheffect.h"
#include <functional>
#include "smartPointers/selfref.h"

Expand All @@ -49,29 +38,7 @@ struct CORE_EXPORT PathEffectMenuCreator
using EffectCreator = Creator<PathEffect>;
using EffectAdder = Func<void(const QString&,
const EffectCreator&)>;
static void forEveryEffect(const EffectAdder& add)
{
add(QObject::tr("Displace"),
[]() { return enve::make_shared<DisplacePathEffect>(); });
add(QObject::tr("Spatial Displace"),
[]() { return enve::make_shared<SpatialDisplacePathEffect>(); });
add(QObject::tr("Dash"),
[]() { return enve::make_shared<DashPathEffect>(); });
add(QObject::tr("Duplicate"),
[]() { return enve::make_shared<DuplicatePathEffect>(); });
add(QObject::tr("Sub-Path"),
[]() { return enve::make_shared<SubPathEffect>(); });
add(QObject::tr("Solidify"),
[]() { return enve::make_shared<SolidifyPathEffect>(); });
add(QObject::tr("Sum"),
[]() { return enve::make_shared<SumPathEffect>(); });
add(QObject::tr("Lines"),
[]() { return enve::make_shared<LinesPathEffect>(); });
add(QObject::tr("ZigZag"),
[]() { return enve::make_shared<ZigZagPathEffect>(); });
add(QObject::tr("Subdivide"),
[]() { return enve::make_shared<SubdividePathEffect>(); });
}
static void forEveryEffect(const EffectAdder& add);
};

#endif // PATHEFFECTMENUCREATOR_H
44 changes: 44 additions & 0 deletions src/core/TransformEffects/transformeffectmenucreator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
#
# Friction - https://friction.graphics
#
# Copyright (c) Friction contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See 'README.md' for more information.
#
*/

#include "TransformEffects/transformeffectmenucreator.h"

#include "TransformEffects/followobjecteffect.h"
#include "TransformEffects/followobjectrelativeeffect.h"
#include "TransformEffects/followpatheffect.h"
#include "TransformEffects/parenteffect.h"
#include "TransformEffects/trackeffect.h"

void TransformEffectMenuCreator::forEveryEffect(const EffectAdder &add)
{
add(QObject::tr("Track"),
[]() { return enve::make_shared<TrackEffect>(); });
add(QObject::tr("Follow Path"),
[]() { return enve::make_shared<FollowPathEffect>(); });
add(QObject::tr("Follow Object"),
[]() { return enve::make_shared<FollowObjectEffect>(); });
add(QObject::tr("Follow Object Relative"),
[]() { return enve::make_shared<FollowObjectRelativeEffect>(); });
add(QObject::tr("Parent"),
[]() { return enve::make_shared<ParentEffect>(); });
}
20 changes: 1 addition & 19 deletions src/core/TransformEffects/transformeffectmenucreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@

#include "core_global.h"

#include <QString>
#include <functional>
#include "TransformEffects/followobjecteffect.h"
#include "TransformEffects/followobjectrelativeeffect.h"
#include "TransformEffects/followpatheffect.h"
#include "TransformEffects/parenteffect.h"
#include "TransformEffects/trackeffect.h"
#include "smartPointers/selfref.h"

class TransformEffect;
Expand All @@ -44,19 +38,7 @@ struct CORE_EXPORT TransformEffectMenuCreator
using EffectCreator = Creator<TransformEffect>;
using EffectAdder = Func<void(const QString&,
const EffectCreator&)>;
static void forEveryEffect(const EffectAdder& add)
{
add(QObject::tr("Track"),
[]() { return enve::make_shared<TrackEffect>(); });
add(QObject::tr("Follow Path"),
[]() { return enve::make_shared<FollowPathEffect>(); });
add(QObject::tr("Follow Object"),
[]() { return enve::make_shared<FollowObjectEffect>(); });
add(QObject::tr("Follow Object Relative"),
[]() { return enve::make_shared<FollowObjectRelativeEffect>(); });
add(QObject::tr("Parent"),
[]() { return enve::make_shared<ParentEffect>(); });
}
static void forEveryEffect(const EffectAdder& add);
};

#endif // TRANSFORMEFFECTMENUCREATOR_H

0 comments on commit 895bfe1

Please sign in to comment.