Exporting UV Values

Discussions concerning programming of SOFTIMAGE©
User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 14:00

Exporting UV Values

Post by TwinSnakes007 » 01 Jan 2013, 02:58

I need some help with this part. Getting this data out of Softimage has been a challenge for me.

For a given PolygonMesh, how do you export the UV values?

face
Posts: 57
Joined: 10 Jan 2010, 11:28

Re: Exporting UV Values

Post by face » 01 Jan 2013, 13:59

Use the CGeometryAccessor.
There are some samples in the SDK.

face

User avatar
csaez
Posts: 253
Joined: 09 Jul 2012, 13:31
Skype: csaezmargotta
Location: Sydney, Australia

Re: Exporting UV Values

Post by csaez » 01 Jan 2013, 14:20

This only works in a very simple scenario, if it's not a complete cluster you should match the indices with the geometry :)

Code: Select all

oObj = Application.Selection(0)
for oCls in oObj.ActivePrimitive.Geometry.Clusters:
	for oProp in oCls.Properties:
		if oProp.Type != "uvspace":
			continue
		Application.LogMessage(oProp.FullName)
		Application.LogMessage(oProp.Elements.Array)

User avatar
TwinSnakes007
Posts: 316
Joined: 06 Jun 2011, 14:00

Re: Exporting UV Values

Post by TwinSnakes007 » 01 Jan 2013, 16:19

Thanks guys...that worked.