[Bf-blender-cvs] [f29f4c9] master: BGE: Remove KX_IPOActuator.
Porteries Tristan
noreply at git.blender.org
Tue Nov 3 10:31:12 CET 2015
Commit: f29f4c92f2b10e9707be151750dcbbba244f862b
Author: Porteries Tristan
Date: Tue Nov 3 10:31:08 2015 +0100
Branches: master
https://developer.blender.org/rBf29f4c92f2b10e9707be151750dcbbba244f862b
BGE: Remove KX_IPOActuator.
KX_IPOActuator is not used since 2.4.
This patch removes:
- KX_IPOActuator.h/cpp;
- Python doc;
- Write of IPO actuator in write.c;
- Allocation of IPOactuator in sca.c;
- Conversion in KX_ConvertActuators.cpp;
- Initialization of the python proxy in KX_PythonInitTypes.cpp;
- Other minor remove in logic_windows.c and in KX_PythonInit.cpp.
Reviewers: sybren, campbellbarton
Reviewed By: campbellbarton
Subscribers: moguri
Differential Revision: https://developer.blender.org/D1603
===================================================================
D doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst
M source/blender/blenkernel/intern/sca.c
M source/blender/blenloader/intern/writefile.c
M source/blender/editors/space_logic/logic_window.c
M source/blender/makesdna/DNA_actuator_types.h
M source/gameengine/Converter/KX_ConvertActuators.cpp
M source/gameengine/Ketsji/CMakeLists.txt
D source/gameengine/Ketsji/KX_IpoActuator.cpp
D source/gameengine/Ketsji/KX_IpoActuator.h
M source/gameengine/Ketsji/KX_PythonInit.cpp
M source/gameengine/Ketsji/KX_PythonInitTypes.cpp
===================================================================
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst b/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst
deleted file mode 100644
index 2cae4fb..0000000
--- a/doc/python_api/rst/bge_types/bge.types.KX_IpoActuator.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-KX_IpoActuator(SCA_IActuator)
-=============================
-
-.. module:: bge.types
-
-base class --- :class:`SCA_IActuator`
-
-.. class:: KX_IpoActuator(SCA_IActuator)
-
- IPO actuator activates an animation.
-
- .. attribute:: frameStart
-
- Start frame.
-
- :type: float
-
- .. attribute:: frameEnd
-
- End frame.
-
- :type: float
-
- .. attribute:: propName
-
- Use this property to define the Ipo position.
-
- :type: string
-
- .. attribute:: framePropName
-
- Assign this property this action current frame number.
-
- :type: string
-
- .. attribute:: mode
-
- Play mode for the ipo. Can be on of :ref:`these constants <ipo-actuator>`
-
- :type: integer
-
- .. attribute:: useIpoAsForce
-
- Apply Ipo as a global or local force depending on the local option (dynamic objects only).
-
- :type: boolean
-
- .. attribute:: useIpoAdd
-
- Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag.
-
- :type: boolean
-
- .. attribute:: useIpoLocal
-
- Let the ipo acts in local coordinates, used in Force and Add mode.
-
- :type: boolean
-
- .. attribute:: useChildren
-
- Update IPO on all children Objects as well.
-
- :type: boolean
-
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 88a2822..e90a39e 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -435,9 +435,6 @@ void init_actuator(bActuator *act)
oa= act->data;
oa->flag= 15;
break;
- case ACT_IPO:
- act->data= MEM_callocN(sizeof(bIpoActuator), "ipoact");
- break;
case ACT_PROPERTY:
act->data= MEM_callocN(sizeof(bPropertyActuator), "propact");
break;
@@ -1059,7 +1056,6 @@ void BKE_sca_actuators_id_loop(ListBase *actlist, SCAActuatorIDFunc func, void *
break;
}
/* Note: some types seems to be non-implemented? ACT_LAMP, ACT_MATERIAL... */
- case ACT_IPO: /* DEPRECATED */
case ACT_LAMP:
case ACT_MATERIAL:
case ACT_END_OBJECT: /* DEPRECATED */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index bc94ef9..f1f90c4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1356,9 +1356,6 @@ static void write_actuators(WriteData *wd, ListBase *lb)
case ACT_OBJECT:
writestruct(wd, DATA, "bObjectActuator", 1, act->data);
break;
- case ACT_IPO:
- writestruct(wd, DATA, "bIpoActuator", 1, act->data);
- break;
case ACT_PROPERTY:
writestruct(wd, DATA, "bPropertyActuator", 1, act->data);
break;
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index a853649..8802ab5 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -397,8 +397,6 @@ static const char *actuator_name(int type)
return N_("Action");
case ACT_OBJECT:
return N_("Motion");
- case ACT_IPO:
- return N_("F-Curve");
case ACT_LAMP:
return N_("Lamp");
case ACT_CAMERA:
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 59a0589..6bdea21 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -362,12 +362,7 @@ typedef struct bActuator {
#define ACT_ACTION_ADD 1
/* ipoactuator->type */
-#define ACT_IPO_PLAY 0
-#define ACT_IPO_PINGPONG 1
-#define ACT_IPO_FLIPPER 2
-#define ACT_IPO_LOOP_STOP 3
-#define ACT_IPO_LOOP_END 4
-#define ACT_IPO_KEY2KEY 5
+/* used for conversion from 2.01 */
#define ACT_IPO_FROM_PROP 6
/* groupactuator->type */
@@ -386,12 +381,6 @@ typedef struct bActuator {
#define ACT_IPOCHILD (1 << 4)
#define ACT_IPOADD (1 << 5)
-/* ipoactuator->flag for k2k */
-#define ACT_K2K_PREV 1
-#define ACT_K2K_CYCLIC 2
-#define ACT_K2K_PINGPONG 4
-#define ACT_K2K_HOLD 8
-
/* property actuator->type */
#define ACT_PROP_ASSIGN 0
#define ACT_PROP_ADD 1
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 12bfb11..021111b 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -54,7 +54,6 @@
// Ketsji specific logicbricks
#include "KX_SceneActuator.h"
-#include "KX_IpoActuator.h"
#include "KX_SoundActuator.h"
#include "KX_ObjectActuator.h"
#include "KX_TrackToActuator.h"
@@ -262,32 +261,6 @@ void BL_ConvertActuators(const char* maggiename,
else
printf ("Discarded shape action actuator from non-mesh object [%s]\n", blenderobject->id.name+2);
}
- case ACT_IPO:
- {
- bIpoActuator* ipoact = (bIpoActuator*) bact->data;
- bool ipochild = (ipoact->flag & ACT_IPOCHILD) !=0;
- STR_String propname = ipoact->name;
- STR_String frameProp = ipoact->frameProp;
- // first bit?
- bool ipo_as_force = (ipoact->flag & ACT_IPOFORCE);
- bool local = (ipoact->flag & ACT_IPOLOCAL);
- bool ipo_add = (ipoact->flag & ACT_IPOADD);
-
- KX_IpoActuator* tmpbaseact = new KX_IpoActuator(
- gameobj,
- propname ,
- frameProp,
- ipoact->sta,
- ipoact->end,
- ipochild,
- ipoact->type + 1, // + 1, because Blender starts to count at zero,
- // Ketsji at 1, because zero is reserved for "NoDef"
- ipo_as_force,
- ipo_add,
- local);
- baseact = tmpbaseact;
- break;
- }
case ACT_LAMP:
{
break;
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index a5bdb2c..417f54c 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -85,7 +85,6 @@ set(SRC
KX_GameObject.cpp
KX_IpoConvert.cpp
KX_IPO_SGController.cpp
- KX_IpoActuator.cpp
KX_KetsjiEngine.cpp
KX_Light.cpp
KX_LightIpoSGController.cpp
@@ -163,7 +162,6 @@ set(SRC
KX_IScalarInterpolator.h
KX_ISceneConverter.h
KX_ISystem.h
- KX_IpoActuator.h
KX_KetsjiEngine.h
KX_Light.h
KX_LightIpoSGController.h
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
deleted file mode 100644
index ec7a414..0000000
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * Do Ipo stuff
- *
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * 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 2
- * 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, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file gameengine/Ketsji/KX_IpoActuator.cpp
- * \ingroup ketsji
- */
-
-#include <cmath>
-
-#include "KX_IpoActuator.h"
-#include "KX_GameObject.h"
-#include "EXP_FloatValue.h"
-
-#include "KX_KetsjiEngine.h"
-
-/* ------------------------------------------------------------------------- */
-/* Type strings */
-/* ------------------------------------------------------------------------- */
-
-const char *KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play";
-const char *KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong";
-const char *KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper";
-const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop";
-const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd";
-const char *KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key";
-const char *KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp";
-
-/* ------------------------------------------------------------------------- */
-/* Native functions */
-/* ------------------------------------------------------------------------- */
-
-KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj,
- const STR_String& propname,
- const STR_String& framePropname,
- float starttime,
- float endtime,
- bool recurse,
- int acttype,
- bool ipo_as_force,
- bool ipo_add,
- bool ipo_local)
- : SCA_IActuator(gameobj, KX_ACT_IPO),
- m_bNegativeEvent(false),
- m_startframe (starttime),
- m_endframe(endtime),
- m_recurse(recurse),
- m_localtime(starttime),
- m_direction(1),
- m_propname(propname),
- m_framepropname(framePropname),
- m_ipo_as_force(ipo_as_force),
- m_ipo_add(ipo_add),
- m_ipo_local(ipo_local),
- m_type(acttype)
-{
- this->ResetStartTime();
- m_bIpoPlaying = false;
-}
-
-void KX_IpoActuator::SetStart(float starttime)
-{
- m_startframe=starttime;
-}
-
-void KX_IpoActuator::SetEnd(float endtime)
-{
- m_endframe=endtime;
-}
-
-bool KX_IpoActuator::ClampLocalTime()
-{
- if (m_startframe < m_endframe)
- {
- if (m_localtime < m_startframe)
- {
- m_localtime = m_startframe;
- return true;
- }
- else if (m_localtime > m_endframe)
- {
- m_localtime = m_endframe;
- return true;
- }
- } else {
- if (m_localtime > m_st
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list