[Bf-blender-cvs] [a1e8547] master: BGE: Use CameCase code style for KX_WorldInfo python API.

Porteries Tristan noreply at git.blender.org
Wed May 20 00:13:19 CEST 2015


Commit: a1e8547877ea4d2f289aab5ccc47c6260f43d1ee
Author: Porteries Tristan
Date:   Tue May 19 23:13:30 2015 +0200
Branches: master
https://developer.blender.org/rBa1e8547877ea4d2f289aab5ccc47c6260f43d1ee

BGE: Use CameCase code style for KX_WorldInfo python API.

===================================================================

M	doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
M	source/gameengine/Ketsji/KX_WorldInfo.cpp

===================================================================

diff --git a/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst b/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
index ffc24b4..d6cb23c 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_WorldInfo.rst
@@ -16,7 +16,7 @@ base class --- :class:`PyObjectPlus`
 
       sce = bge.logic.getCurrentScene()
 
-      sce.world.mist_color = [1.0, 0.0, 0.0]
+      sce.world.mistColor = [1.0, 0.0, 0.0]
 
 *********
 Constants
@@ -38,49 +38,49 @@ Constants
 Attributes
 **********
 
-   .. attribute:: mist_enable
+   .. attribute:: mistEnable
 
       Return the state of the mist.
 
       :type: bool
 
-   .. attribute:: mist_start
+   .. attribute:: mistStart
 
       The mist start point.
 
       :type: float
 
-   .. attribute:: mist_distance
+   .. attribute:: mistDistance
 
       The mist distance fom the start point to reach 100% mist.
 
       :type: float
 
-   .. attribute:: mist_intensity
+   .. attribute:: mistIntensity
 
       The mist intensity.
 
       :type: float
 
-   .. attribute:: mist_type
+   .. attribute:: mistType
 
       The type of mist - must be KX_MIST_QUADRATIC, KX_MIST_LINEAR or KX_MIST_INV_QUADRATIC
 
-   .. attribute:: mist_color
+   .. attribute:: mistColor
 
       The color of the mist. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
       Mist and background color sould always set to the same color.
 
       :type: :class:`mathutils.Vector`
 
-   .. attribute:: background_color
+   .. attribute:: backgroundColor
 
       The color of the background. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
       Mist and background color sould always set to the same color.
 
       :type: :class:`mathutils.Vector`
 
-   .. attribute:: ambient_color
+   .. attribute:: ambientColor
 
       The color of the ambient light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
 
diff --git a/source/gameengine/Ketsji/KX_WorldInfo.cpp b/source/gameengine/Ketsji/KX_WorldInfo.cpp
index 21e7250..f6caaf0 100644
--- a/source/gameengine/Ketsji/KX_WorldInfo.cpp
+++ b/source/gameengine/Ketsji/KX_WorldInfo.cpp
@@ -232,17 +232,17 @@ PyMethodDef KX_WorldInfo::Methods[] = {
 };
 
 PyAttributeDef KX_WorldInfo::Attributes[] = {
-	KX_PYATTRIBUTE_BOOL_RW("mist_enable", KX_WorldInfo, m_hasmist),
-	KX_PYATTRIBUTE_FLOAT_RW("mist_start", 0.0f, 10000.0f, KX_WorldInfo, m_miststart),
-	KX_PYATTRIBUTE_FLOAT_RW("mist_distance", 0.001f, 10000.0f, KX_WorldInfo, m_mistdistance),
-	KX_PYATTRIBUTE_FLOAT_RW("mist_intensity", 0.0f, 1.0f, KX_WorldInfo, m_mistintensity),
-	KX_PYATTRIBUTE_SHORT_RW("mist_type", 0, 2, true, KX_WorldInfo, m_misttype),
+	KX_PYATTRIBUTE_BOOL_RW("mistEnable", KX_WorldInfo, m_hasmist),
+	KX_PYATTRIBUTE_FLOAT_RW("mistStart", 0.0f, 10000.0f, KX_WorldInfo, m_miststart),
+	KX_PYATTRIBUTE_FLOAT_RW("mistDistance", 0.001f, 10000.0f, KX_WorldInfo, m_mistdistance),
+	KX_PYATTRIBUTE_FLOAT_RW("mistIntensity", 0.0f, 1.0f, KX_WorldInfo, m_mistintensity),
+	KX_PYATTRIBUTE_SHORT_RW("mistType", 0, 2, true, KX_WorldInfo, m_misttype),
 	KX_PYATTRIBUTE_RO_FUNCTION("KX_MIST_QUADRATIC", KX_WorldInfo, pyattr_get_mist_typeconst),
 	KX_PYATTRIBUTE_RO_FUNCTION("KX_MIST_LINEAR", KX_WorldInfo, pyattr_get_mist_typeconst),
 	KX_PYATTRIBUTE_RO_FUNCTION("KX_MIST_INV_QUADRATIC", KX_WorldInfo, pyattr_get_mist_typeconst),
-	KX_PYATTRIBUTE_RW_FUNCTION("mist_color", KX_WorldInfo, pyattr_get_mist_color, pyattr_set_mist_color),
-	KX_PYATTRIBUTE_RW_FUNCTION("background_color", KX_WorldInfo, pyattr_get_back_color, pyattr_set_back_color),
-	KX_PYATTRIBUTE_RW_FUNCTION("ambient_color", KX_WorldInfo, pyattr_get_ambient_color, pyattr_set_ambient_color),
+	KX_PYATTRIBUTE_RW_FUNCTION("mistColor", KX_WorldInfo, pyattr_get_mist_color, pyattr_set_mist_color),
+	KX_PYATTRIBUTE_RW_FUNCTION("backgroundColor", KX_WorldInfo, pyattr_get_back_color, pyattr_set_back_color),
+	KX_PYATTRIBUTE_RW_FUNCTION("ambientColor", KX_WorldInfo, pyattr_get_ambient_color, pyattr_set_ambient_color),
 	{ NULL } /* Sentinel */
 };




More information about the Bf-blender-cvs mailing list