[Bf-blender-cvs] [d3ae91e] temp-bge-cleanup: Run of uncrustify on Converter/
Porteries Tristan
noreply at git.blender.org
Mon May 4 19:33:27 CEST 2015
Commit: d3ae91e920c57dbe10acc48b89e7f8839ae6a773
Author: Porteries Tristan
Date: Mon May 4 19:24:47 2015 +0200
Branches: temp-bge-cleanup
https://developer.blender.org/rBd3ae91e920c57dbe10acc48b89e7f8839ae6a773
Run of uncrustify on Converter/
===================================================================
M source/gameengine/Converter/BL_ActionActuator.cpp
M source/gameengine/Converter/BL_ActionActuator.h
M source/gameengine/Converter/BL_ArmatureActuator.cpp
M source/gameengine/Converter/BL_ArmatureActuator.h
M source/gameengine/Converter/BL_ArmatureChannel.cpp
M source/gameengine/Converter/BL_ArmatureChannel.h
M source/gameengine/Converter/BL_ArmatureConstraint.cpp
M source/gameengine/Converter/BL_ArmatureConstraint.h
M source/gameengine/Converter/BL_ArmatureObject.cpp
M source/gameengine/Converter/BL_ArmatureObject.h
M source/gameengine/Converter/BL_BlenderDataConversion.cpp
M source/gameengine/Converter/BL_BlenderDataConversion.h
M source/gameengine/Converter/BL_DeformableGameObject.cpp
M source/gameengine/Converter/BL_DeformableGameObject.h
M source/gameengine/Converter/BL_MeshDeformer.cpp
M source/gameengine/Converter/BL_MeshDeformer.h
M source/gameengine/Converter/BL_ModifierDeformer.cpp
M source/gameengine/Converter/BL_ModifierDeformer.h
M source/gameengine/Converter/BL_ShapeActionActuator.cpp
M source/gameengine/Converter/BL_ShapeActionActuator.h
M source/gameengine/Converter/BL_ShapeDeformer.cpp
M source/gameengine/Converter/BL_ShapeDeformer.h
M source/gameengine/Converter/BL_SkinDeformer.cpp
M source/gameengine/Converter/BL_SkinDeformer.h
M source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
M source/gameengine/Converter/KX_BlenderScalarInterpolator.h
M source/gameengine/Converter/KX_BlenderSceneConverter.h
M source/gameengine/Converter/KX_ConvertActuators.cpp
M source/gameengine/Converter/KX_ConvertActuators.h
M source/gameengine/Converter/KX_ConvertControllers.cpp
M source/gameengine/Converter/KX_ConvertControllers.h
M source/gameengine/Converter/KX_ConvertProperties.cpp
M source/gameengine/Converter/KX_ConvertProperties.h
M source/gameengine/Converter/KX_ConvertSensors.cpp
M source/gameengine/Converter/KX_ConvertSensors.h
M source/gameengine/Converter/KX_LibLoadStatus.cpp
M source/gameengine/Converter/KX_LibLoadStatus.h
M source/gameengine/Converter/KX_SoftBodyDeformer.cpp
M source/gameengine/Converter/KX_SoftBodyDeformer.h
===================================================================
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index c756d86..aa054c8 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -61,27 +61,27 @@ extern "C" {
}
BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
- const STR_String& propname,
- const STR_String& framepropname,
- float starttime,
- float endtime,
- struct bAction *action,
- short playtype,
- short blend_mode,
- short blendin,
- short priority,
- short layer,
- float layer_weight,
- short ipo_flags,
- short end_reset,
- float stride)
+ const STR_String& propname,
+ const STR_String& framepropname,
+ float starttime,
+ float endtime,
+ struct bAction *action,
+ short playtype,
+ short blend_mode,
+ short blendin,
+ short priority,
+ short layer,
+ float layer_weight,
+ short ipo_flags,
+ short end_reset,
+ float stride)
: SCA_IActuator(gameobj, KX_ACT_ACTION),
-
+
m_lastpos(0, 0, 0),
m_blendframe(0),
m_flag(0),
- m_startframe (starttime),
- m_endframe(endtime) ,
+ m_startframe(starttime),
+ m_endframe(endtime),
m_starttime(0),
m_localtime(starttime),
m_lastUpdate(-1),
@@ -90,7 +90,7 @@ BL_ActionActuator::BL_ActionActuator(SCA_IObject *gameobj,
m_stridelength(stride),
m_layer_weight(layer_weight),
m_playtype(playtype),
- m_blendmode(blend_mode),
+ m_blendmode(blend_mode),
m_priority(priority),
m_layer(layer),
m_ipo_flags(ipo_flags),
@@ -110,9 +110,9 @@ void BL_ActionActuator::ProcessReplica()
{
SCA_IActuator::ProcessReplica();
- m_localtime=m_startframe;
- m_lastUpdate=-1;
-
+ m_localtime = m_startframe;
+ m_lastUpdate = -1;
+
}
void BL_ActionActuator::SetBlendTime(float newtime)
@@ -122,37 +122,37 @@ void BL_ActionActuator::SetBlendTime(float newtime)
void BL_ActionActuator::SetLocalTime(float curtime)
{
- float dt = (curtime-m_starttime)*KX_KetsjiEngine::GetAnimFrameRate();
+ float dt = (curtime - m_starttime) * KX_KetsjiEngine::GetAnimFrameRate();
if (m_endframe < m_startframe)
dt = -dt;
m_localtime = m_startframe + dt;
-
+
// Handle wrap around
if (m_localtime < min(m_startframe, m_endframe) || m_localtime > max(m_startframe, m_endframe))
{
switch (m_playtype) {
- case ACT_ACTION_PLAY:
- // Clamp
- m_localtime = m_endframe;
- break;
- case ACT_ACTION_LOOP_END:
- // Put the time back to the beginning
- m_localtime = m_startframe;
- m_starttime = curtime;
- break;
- case ACT_ACTION_PINGPONG:
- // Swap the start and end frames
- float temp = m_startframe;
- m_startframe = m_endframe;
- m_endframe = temp;
+ case ACT_ACTION_PLAY:
+ // Clamp
+ m_localtime = m_endframe;
+ break;
+ case ACT_ACTION_LOOP_END:
+ // Put the time back to the beginning
+ m_localtime = m_startframe;
+ m_starttime = curtime;
+ break;
+ case ACT_ACTION_PINGPONG:
+ // Swap the start and end frames
+ float temp = m_startframe;
+ m_startframe = m_endframe;
+ m_endframe = temp;
- m_starttime = curtime;
+ m_starttime = curtime;
- m_flag ^= ACT_FLAG_REVERSE;
+ m_flag ^= ACT_FLAG_REVERSE;
- break;
+ break;
}
}
}
@@ -165,9 +165,9 @@ void BL_ActionActuator::ResetStartTime(float curtime)
//SetLocalTime(curtime);
}
-CValue* BL_ActionActuator::GetReplica()
+CValue *BL_ActionActuator::GetReplica()
{
- BL_ActionActuator* replica = new BL_ActionActuator(*this);//m_float,GetName());
+ BL_ActionActuator *replica = new BL_ActionActuator(*this);//m_float,GetName());
replica->ProcessReplica();
return replica;
}
@@ -177,7 +177,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
bool bNegativeEvent = false;
bool bPositiveEvent = false;
bool bUseContinue = false;
- KX_GameObject *obj = (KX_GameObject*)GetParent();
+ KX_GameObject *obj = (KX_GameObject *)GetParent();
short playtype = BL_Action::ACT_MODE_PLAY;
short blendmode = (m_blendmode == ACT_ACTION_ADD) ? BL_Action::ACT_BLEND_ADD : BL_Action::ACT_BLEND_BLEND;
float start = m_startframe;
@@ -198,7 +198,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
// We handle ping pong ourselves to increase compabitility
// with files made prior to animation changes from GSoC 2011.
playtype = BL_Action::ACT_MODE_PLAY;
-
+
if (m_flag & ACT_FLAG_REVERSE)
{
start = m_endframe;
@@ -207,7 +207,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
break;
case ACT_ACTION_FROM_PROP:
- CValue* prop = GetParent()->GetProperty(m_propname);
+ CValue *prop = GetParent()->GetProperty(m_propname);
// If we don't have a property, we can't do anything, so just bail
if (!prop) return false;
@@ -220,8 +220,8 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
if (m_flag & ACT_FLAG_CONTINUE)
bUseContinue = true;
-
-
+
+
// Handle events
if (frame)
{
@@ -242,8 +242,8 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
// Handle a frame property if it's defined
if ((m_flag & ACT_FLAG_ACTIVE) && m_framepropname[0] != 0)
{
- CValue* oldprop = obj->GetProperty(m_framepropname);
- CValue* newval = new CFloatValue(obj->GetActionFrame(m_layer));
+ CValue *oldprop = obj->GetProperty(m_framepropname);
+ CValue *newval = new CFloatValue(obj->GetActionFrame(m_layer));
if (oldprop)
oldprop->SetValue(newval);
else
@@ -265,7 +265,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
return false;
}
}
-
+
// If a different action is playing, we've been overruled and are no longer active
if (obj->GetCurrentAction(m_layer) != m_action && !obj->IsActionDone(m_layer))
m_flag &= ~ACT_FLAG_ACTIVE;
@@ -279,7 +279,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
ResetStartTime(curtime);
}
- if (obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, m_blendin, playtype, m_layer_weight, m_ipo_flags, 1.f, blendmode))
+ if (obj->PlayAction(m_action->id.name + 2, start, end, m_layer, m_priority, m_blendin, playtype, m_layer_weight, m_ipo_flags, 1.f, blendmode))
{
m_flag |= ACT_FLAG_ACTIVE;
if (bUseContinue)
@@ -319,13 +319,13 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
m_flag |= ACT_FLAG_PLAY_END;
break;
-
+
case ACT_ACTION_FLIPPER:
// Convert into a play action and play back to the beginning
float temp = end;
end = start;
start = curr_action ? obj->GetActionFrame(m_layer) : temp;
- obj->PlayAction(m_action->id.name+2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags, 1.f, blendmode);
+ obj->PlayAction(m_action->id.name + 2, start, end, m_layer, m_priority, 0, BL_Action::ACT_MODE_PLAY, m_layer_weight, m_ipo_flags, 1.f, blendmode);
m_flag |= ACT_FLAG_PLAY_END;
break;
@@ -346,49 +346,49 @@ PyObject *BL_ActionActuator::PyGetChannel(PyObject *value)
PyErr_SetString(PyExc_NotImplementedError, "BL_ActionActuator.getChannel() no longer works, please use BL_ArmatureObject.channels instead");
return NULL;
#if 0 // XXX To be removed in a later version (first removed in 2.64)
- const char *string= _PyUnicode_AsString(value);
+ const char *string = _PyUnicode_AsString(value);
if (GetParent()->GetGameObjectType() != SCA_IObject::OBJ_ARMATURE)
{
PyErr_SetString(PyExc_NotImplementedError, "actuator.getChannel(): Only armatures support channels");
return NULL;
}
-
+
if (!string) {
PyErr_SetString(PyExc_TypeError, "expected a single string");
return NULL;
}
-
+
bPoseChannel *pchan;
-
- if (m_userpose==NULL && m_pose==NULL) {
- BL_ArmatureObject *obj = (BL_ArmatureObject*)GetParent();
+
+ if (m_userpose == NULL && m_pose == NULL) {
+ BL_ArmatureObject *obj = (BL_ArmatureObject *)GetParent();
obj->GetPose(&m_pose); /* Get the underlying pose from the armature */
}
-
+
// BKE_pose_channel_find_name accounts for NULL pose, run on both in case one exists but
// the channel doesnt
- if ( !(pchan=BKE_pose_channel_find_name(m_userpose, string)) &&
- !(pchan=BKE_pose_channel_find_name(m_pose, string)) )
+ if (!(pchan = BKE_pose_channel_find_name(m_userpose, string)) &&
+ !(pchan = BKE_pose_channel_find_name(m_pose, string)) )
{
PyErr_SetString(PyExc_ValueError, "channel doesnt exist");
return NULL;
}
PyObject *ret = PyTuple_New(3);
-
- PyObject *list = PyList_New(3);
+
+ PyObject *list = PyList_New(3);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->loc[0]));
PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->loc[1]));
PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->loc[2]));
PyTuple_SET_ITEM(ret, 0, list);
-
+
list = PyList_New(3);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->size[0]));
PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->size[1]));
PyList_SET_ITEM(list, 2, PyFloat_FromDouble(pchan->size[2]));
PyTuple_SET_ITEM(ret, 1, list);
-
+
list = PyList_New(4);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(pchan->quat[0]));
PyList_SET_ITEM(list, 1, PyFloat_FromDouble(pchan->quat[1]));
@@ -399,28 +399,28 @@ PyObject *BL_ActionActuator::PyGetChannel(PyObject *value)
return ret;
#if 0
return Py_BuildValue("([fff][fff][ffff])",
- pchan->loc[0], pchan->loc[1], pchan->loc[2],
- pchan->size[0], pchan->size[1], pchan->size[2],
- pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3] );
+ pchan->loc[0], pchan->loc[1], pchan->loc[2],
+ pchan->size[0], pchan->size[1], pchan->size[2],
+ pchan->quat[0], pchan->quat[1], pchan->quat[2], pchan->quat[3]);
#endif
#endif
}
/* setChannel
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list