#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()
Image
By luis.hijarrubia
#400983
From the documentation that comes with the installation (sdk/doc), there's a function:

byte getUVWChannelProperties (dword iChannel, byte &projType, bool &customProj, Cbase &projectorBase, real &startLatitude, real &endLatitude, real &startLongitude, real &endLongitude, real &startAngle, real &endAngle, bool &mirrorBackFaces) const

It should exist the same method on python.
User avatar
By Brany
#401026
CmaxwellObject.getUVWChannelProperties is meant for procedural geometry objects, which UVs were generated by CmaxwellObject.generateCustomUVW.

UV projection parameters used to generate UVs in Studio, in the way you show in the screenshot, are saved as "Maxwell Studio custom data" in the MXS, so they cannot be retrieved from the public SDK. It is opaque data that only Maxwell Studio knows how to handle.
Chocolate test with SSS

nice