mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-28 17:52:19 +05:30
Added getuvs()
This commit is contained in:
parent
650178f3a4
commit
c45c8d758a
@ -140,6 +140,9 @@ class UVs(ctypes.Structure):
|
||||
("v", ctypes.c_short)
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return "(%s, %s)" % (str(self.u), str(self.v))
|
||||
|
||||
class BoneIndexes(ctypes.Structure):
|
||||
_pack_ = 1
|
||||
_fields_ = [
|
||||
@ -372,6 +375,10 @@ class MEsh:
|
||||
length = self.cstruct.b.contents.bd.contents.numVertex
|
||||
return self.cstruct.b.contents.vd.normals[:length]
|
||||
|
||||
def getuvs(self):
|
||||
length = self.cstruct.b.contents.bd.contents.numVertex
|
||||
return self.cstruct.b.contents.vd.u[:length]
|
||||
|
||||
#--------------------------------------+
|
||||
# Regular Python
|
||||
#--------------------------------------+
|
||||
@ -460,11 +467,17 @@ if __name__ == "__main__":
|
||||
m = MEsh(0, data)
|
||||
m.show()
|
||||
p = m.getpositions()
|
||||
print("positions:")
|
||||
for point in p:
|
||||
print(point)
|
||||
n = m.getnormals()
|
||||
print("normals:")
|
||||
for point in n:
|
||||
print(point)
|
||||
u = m.getuvs()
|
||||
print("uvs:")
|
||||
for point in u:
|
||||
print(point)
|
||||
#---------------------------------------+
|
||||
# main()
|
||||
mainx()
|
||||
|
Loading…
Reference in New Issue
Block a user