[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20045] trunk/blender/source/gameengine: fix for a problem with setUV2 reported by cthames on blenderartist
Campbell Barton
ideasman42 at gmail.com
Sun May 3 22:47:29 CEST 2009
Revision: 20045
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20045
Author: campbellbarton
Date: 2009-05-03 22:47:29 +0200 (Sun, 03 May 2009)
Log Message:
-----------
fix for a problem with setUV2 reported by cthames on blenderartist
http://blenderartists.org/forum/showpost.php?p=1369757&postcount=35
there was an undocumented second arg but may as well allow a single vector arg like setUV()
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_VertexProxy.cpp
trunk/blender/source/gameengine/PyDoc/KX_VertexProxy.py
Modified: trunk/blender/source/gameengine/Ketsji/KX_VertexProxy.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_VertexProxy.cpp 2009-05-03 19:47:13 UTC (rev 20044)
+++ trunk/blender/source/gameengine/Ketsji/KX_VertexProxy.cpp 2009-05-03 20:47:29 UTC (rev 20045)
@@ -435,9 +435,10 @@
PyObject* KX_VertexProxy::PySetUV2(PyObject* args)
{
MT_Point2 vec;
- unsigned int unit=0;
+ unsigned int unit= RAS_TexVert::SECOND_UV;
+
PyObject* list= NULL;
- if(!PyArg_ParseTuple(args, "Oi:setUV2", &list, &unit))
+ if(!PyArg_ParseTuple(args, "O|i:setUV2", &list, &unit))
return NULL;
if (!PyVecTo(list, vec))
Modified: trunk/blender/source/gameengine/PyDoc/KX_VertexProxy.py
===================================================================
--- trunk/blender/source/gameengine/PyDoc/KX_VertexProxy.py 2009-05-03 19:47:13 UTC (rev 20044)
+++ trunk/blender/source/gameengine/PyDoc/KX_VertexProxy.py 2009-05-03 20:47:29 UTC (rev 20045)
@@ -86,11 +86,13 @@
@rtype: list [u, v]
@return: this vertexes UV (texture) coordinates.
"""
- def setUV2(uv):
+ def setUV2(uv, unit):
"""
Sets the 2nd UV (texture) coordinates of this vertex.
@type uv: list [u, v]
+ @param unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
+ @param unit: int
"""
def getRGBA():
"""
More information about the Bf-blender-cvs
mailing list