BGE : KX_VertexProxy support for more than 2 UV channel.

I have added an optional named "index" argument for methode get/setUV, I have also modified the and set to deprecated methodes setUV2 and getUV2 : the doc was wrong and the methode can't be called anyway because it declared as VARARG in the .h and convert directly the args value to a vector in the .cpp.

Reviewers: sybren, lordloki, hg1

Reviewed By: lordloki, hg1

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D1240
This commit is contained in:
Porteries Tristan
2015-05-06 22:55:46 +02:00
parent de180aba35
commit fb0dd596e9
3 changed files with 59 additions and 24 deletions

View File

@@ -25,6 +25,12 @@ base class --- :class:`SCA_IObject`
:type: Vector((u, v))
.. attribute:: uvs
A list of all the texture coordinates of the vertex.
:type: list of Vector((u, v))
.. attribute:: normal
The normal of the vertex.
@@ -120,18 +126,24 @@ base class --- :class:`SCA_IObject`
:arg pos: the new position for this vertex in local coordinates.
.. method:: getUV()
.. method:: getUV(index=0)
Gets the UV (texture) coordinates of this vertex.
:arg index: the UV (texture) channel (optional).
:type index: integer
:return: this vertexes UV (texture) coordinates.
:rtype: Vector((u, v))
.. method:: setUV(uv)
.. method:: setUV(uv, index=0)
Sets the UV (texture) coordinates of this vertex.
:type: Vector((u, v))
:arg uv: the UV (texture) coordinate of this vertex.
:type uv: Vector((u, v))
:arg index: the UV (texture) channel (optional).
:type index: integer
.. method:: getUV2()
@@ -140,14 +152,16 @@ base class --- :class:`SCA_IObject`
:return: this vertexes UV (texture) coordinates.
:rtype: Vector((u, v))
.. method:: setUV2(uv, unit)
.. deprecated:: use :meth:`getUV`
.. method:: setUV2(uv)
Sets the 2nd UV (texture) coordinates of this vertex.
:type: Vector((u, v))
:arg uv: the 2nd (texture) UV coordinate of this vertex.
:type uv: Vector((u, v))
:arg unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
:arg unit: integer
.. deprecated:: use :meth:`setUV`
.. method:: getRGBA()