#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.

after a lot of years doing arch-viz... almost 20 a[…]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]

Hey, I guess maxwell is not going to be updates a[…]

Help with swimming pool water

Hi Choo Chee. Thanks for posting. I have used re[…]