- Thu Aug 12, 2021 9:07 am
#400976
Hi, does anyone know how to get the object's UVsets data in PyMaxwell4? I can only get the count of each object.
from pymaxwell4 import *
def test():
file = "C:/Users/twong/Desktop/test.mxs"
scene = Cmaxwell(mwcallback)
scene.readMXS(file)
it = CmaxwellObjectIterator()
obj = it.first(scene)
while not obj.isNull():
obj_Name = obj.getName()[0]
print('\nobj_Name:', obj_Name)
if obj.isInstance()[0] == 0: # 0=Object, 1=Instance.
obj_UVSets = obj.getChannelsUVWCount()
for u in range(obj_UVSets[0]):
obj_UVChannelId = obj.getUVWChannelId(u)
print('obj_UVChannelId:', obj_UVChannelId)
obj = it.next()
test()
from pymaxwell4 import *
def test():
file = "C:/Users/twong/Desktop/test.mxs"
scene = Cmaxwell(mwcallback)
scene.readMXS(file)
it = CmaxwellObjectIterator()
obj = it.first(scene)
while not obj.isNull():
obj_Name = obj.getName()[0]
print('\nobj_Name:', obj_Name)
if obj.isInstance()[0] == 0: # 0=Object, 1=Instance.
obj_UVSets = obj.getChannelsUVWCount()
for u in range(obj_UVSets[0]):
obj_UVChannelId = obj.getUVWChannelId(u)
print('obj_UVChannelId:', obj_UVChannelId)
obj = it.next()
test()