[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43408] trunk/blender/source/gameengine: use defines for property name lenghths in the BGE, were using 31, 32, 64, 100 .

Campbell Barton ideasman42 at gmail.com
Mon Jan 16 06:27:27 CET 2012


Revision: 43408
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43408
Author:   campbellbarton
Date:     2012-01-16 05:27:11 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
use defines for property name lenghths in the BGE, were using 31,32,64,100.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
    trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
    trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
    trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.h
    trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.h
    trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
    trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KX_RaySensor.cpp
    trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp
    trunk/blender/source/gameengine/Ketsji/KX_TouchSensor.cpp
    trunk/blender/source/gameengine/Rasterizer/RAS_TexVert.cpp

Modified: trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -526,8 +526,8 @@
 	KX_PYATTRIBUTE_RO_FUNCTION("channelNames", BL_ActionActuator, pyattr_get_channel_names),
 	KX_PYATTRIBUTE_SHORT_RW("priority", 0, 100, false, BL_ActionActuator, m_priority),
 	KX_PYATTRIBUTE_RW_FUNCTION("frame", BL_ActionActuator, pyattr_get_frame, pyattr_set_frame),
-	KX_PYATTRIBUTE_STRING_RW("propName", 0, 31, false, BL_ActionActuator, m_propname),
-	KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 31, false, BL_ActionActuator, m_framepropname),
+	KX_PYATTRIBUTE_STRING_RW("propName", 0, MAX_PROP_NAME, false, BL_ActionActuator, m_propname),
+	KX_PYATTRIBUTE_STRING_RW("framePropName", 0, MAX_PROP_NAME, false, BL_ActionActuator, m_framepropname),
 	KX_PYATTRIBUTE_RW_FUNCTION("useContinue", BL_ActionActuator, pyattr_get_use_continue, pyattr_set_use_continue),
 	KX_PYATTRIBUTE_FLOAT_RW_CHECK("blendTime", 0, MAXFRAMEF, BL_ActionActuator, m_blendframe, CheckBlendTime),
 	KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",0,100,false,BL_ActionActuator,m_playtype,CheckType),

Modified: trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -519,8 +519,8 @@
 	KX_PYATTRIBUTE_RW_FUNCTION("action", BL_ShapeActionActuator, pyattr_get_action, pyattr_set_action),
 	KX_PYATTRIBUTE_SHORT_RW("priority", 0, 100, false, BL_ShapeActionActuator, m_priority),
 	KX_PYATTRIBUTE_FLOAT_RW_CHECK("frame", 0, MAXFRAMEF, BL_ShapeActionActuator, m_localtime, CheckFrame),
-	KX_PYATTRIBUTE_STRING_RW("propName", 0, 31, false, BL_ShapeActionActuator, m_propname),
-	KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 31, false, BL_ShapeActionActuator, m_framepropname),
+	KX_PYATTRIBUTE_STRING_RW("propName", 0, MAX_PROP_NAME, false, BL_ShapeActionActuator, m_propname),
+	KX_PYATTRIBUTE_STRING_RW("framePropName", 0, MAX_PROP_NAME, false, BL_ShapeActionActuator, m_framepropname),
 	KX_PYATTRIBUTE_FLOAT_RW_CHECK("blendTime", 0, MAXFRAMEF, BL_ShapeActionActuator, m_blendframe, CheckBlendTime),
 	KX_PYATTRIBUTE_SHORT_RW_CHECK("mode",0,100,false,BL_ShapeActionActuator,m_playtype,CheckType),
 	{ NULL }	//Sentinel

Modified: trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/Converter/KX_BlenderSceneConverter.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -888,11 +888,11 @@
 			{
 				//KX_IPhysicsController* physCtrl = gameObj->GetPhysicsController();
 				
+#if 0
 				Object* blenderObject = gameObj->GetBlenderObject();
 				if (blenderObject && blenderObject->ipo)
 				{
 					// XXX animato
-#if 0
 					Ipo* ipo = blenderObject->ipo;
 					
 					//create the curves, if not existing
@@ -903,17 +903,11 @@
 					testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotX"));
 					testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotY"));
 					testhandles_ipocurve(findIpoCurve((IpoCurve *)ipo->curve.first,"RotZ"));
-#endif
 				}
+#endif
 			}
-
 		}
-		
-	
 	}
-
-
-
 }
 
 #ifdef WITH_PYTHON

Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.h
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.h	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.h	2012-01-16 05:27:11 UTC (rev 43408)
@@ -54,6 +54,8 @@
 }
 #endif
 
+#define MAX_PROP_NAME 64
+
 static inline void Py_Fatal(const char *M)
 {
 	fprintf(stderr, "%s\n", M);

Modified: trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -150,7 +150,7 @@
 };
 
 PyAttributeDef SCA_ActuatorSensor::Attributes[] = {
-	KX_PYATTRIBUTE_STRING_RW_CHECK("actuator",0,100,false,SCA_ActuatorSensor,m_checkactname,CheckActuator),
+	KX_PYATTRIBUTE_STRING_RW_CHECK("actuator",0,MAX_PROP_NAME,false,SCA_ActuatorSensor,m_checkactname,CheckActuator),
 	{ NULL }	//Sentinel
 };
 

Modified: trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.h
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.h	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.h	2012-01-16 05:27:11 UTC (rev 43408)
@@ -133,8 +133,8 @@
 
 
 	/* for moving logic bricks between scenes */
-	virtual void		Replace_IScene(SCA_IScene *val) {};
-	virtual void		Replace_NetworkScene(NG_NetworkScene *val) {};
+	virtual void		Replace_IScene(SCA_IScene *val) {}
+	virtual void		Replace_NetworkScene(NG_NetworkScene *val) {}
 
 #ifdef WITH_PYTHON
 	// python methods

Modified: trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -479,8 +479,8 @@
 	KX_PYATTRIBUTE_INT_RW("key",0,SCA_IInputDevice::KX_ENDKEY,true,SCA_KeyboardSensor,m_hotkey),
 	KX_PYATTRIBUTE_SHORT_RW("hold1",0,SCA_IInputDevice::KX_ENDKEY,true,SCA_KeyboardSensor,m_qual),
 	KX_PYATTRIBUTE_SHORT_RW("hold2",0,SCA_IInputDevice::KX_ENDKEY,true,SCA_KeyboardSensor,m_qual2),
-	KX_PYATTRIBUTE_STRING_RW("toggleProperty",0,100,false,SCA_KeyboardSensor,m_toggleprop),
-	KX_PYATTRIBUTE_STRING_RW("targetProperty",0,100,false,SCA_KeyboardSensor,m_targetprop),
+	KX_PYATTRIBUTE_STRING_RW("toggleProperty",0,MAX_PROP_NAME,false,SCA_KeyboardSensor,m_toggleprop),
+	KX_PYATTRIBUTE_STRING_RW("targetProperty",0,MAX_PROP_NAME,false,SCA_KeyboardSensor,m_targetprop),
 	{ NULL }	//Sentinel
 };
 

Modified: trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.h
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.h	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.h	2012-01-16 05:27:11 UTC (rev 43408)
@@ -111,7 +111,7 @@
 	/* --------------------------------------------------------------------- */
 
 	// KeyEvents: 
-	KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,getEventList); 
+	KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,getEventList);
 	// KeyStatus: 
 	KX_PYMETHOD_DOC_O(SCA_KeyboardSensor,getKeyStatus);
 	

Modified: trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -257,7 +257,7 @@
 };
 
 PyAttributeDef SCA_PropertyActuator::Attributes[] = {
-	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_PropertyActuator,m_propname,CheckProperty),
+	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,MAX_PROP_NAME,false,SCA_PropertyActuator,m_propname,CheckProperty),
 	KX_PYATTRIBUTE_STRING_RW("value",0,100,false,SCA_PropertyActuator,m_exprtxt),
 	KX_PYATTRIBUTE_INT_RW("mode", KX_ACT_PROP_NODEF+1, KX_ACT_PROP_MAX-1, false, SCA_PropertyActuator, m_type), /* ATTR_TODO add constents to game logic dict */
 	{ NULL }	//Sentinel

Modified: trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -377,7 +377,7 @@
 
 PyAttributeDef SCA_PropertySensor::Attributes[] = {
 	KX_PYATTRIBUTE_INT_RW_CHECK("mode",KX_PROPSENSOR_NODEF,KX_PROPSENSOR_MAX-1,false,SCA_PropertySensor,m_checktype,modeChange),
-	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_PropertySensor,m_checkpropname,CheckProperty),
+	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,MAX_PROP_NAME,false,SCA_PropertySensor,m_checkpropname,CheckProperty),
 	KX_PYATTRIBUTE_STRING_RW_CHECK("value",0,100,false,SCA_PropertySensor,m_checkpropval,validValueForProperty),
 	KX_PYATTRIBUTE_STRING_RW_CHECK("min",0,100,false,SCA_PropertySensor,m_checkpropval,validValueForIntervalProperty),
 	KX_PYATTRIBUTE_STRING_RW_CHECK("max",0,100,false,SCA_PropertySensor,m_checkpropmaxval,validValueForIntervalProperty),

Modified: trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp	2012-01-16 01:58:37 UTC (rev 43407)
+++ trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp	2012-01-16 05:27:11 UTC (rev 43408)
@@ -361,7 +361,7 @@
 	KX_PYATTRIBUTE_FLOAT_RO("para1",SCA_RandomActuator,m_parameter1),
 	KX_PYATTRIBUTE_FLOAT_RO("para2",SCA_RandomActuator,m_parameter2),
 	KX_PYATTRIBUTE_ENUM_RO("distribution",SCA_RandomActuator,m_distribution),
-	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,100,false,SCA_RandomActuator,m_propname,CheckProperty),
+	KX_PYATTRIBUTE_STRING_RW_CHECK("propName",0,MAX_PROP_NAME,false,SCA_RandomActuator,m_propname,CheckProperty),
 	KX_PYATTRIBUTE_RW_FUNCTION("seed",SCA_RandomActuator,pyattr_get_seed,pyattr_set_seed),
 	{ NULL }	//Sentinel
 };	

Modified: trunk/blender/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
===================================================================

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list