C++ GetDeformerWeights

Date : Tue, 6 May 2008 15:22:05 -0400
To : xsi(at)Softimage.COM
From : "Dominic Belanger" <dbelanger2(at)gmail.com>
Subject : C++ GetDeformerWeights
 Hi Guys , Im trying to acces to the weightValue of  an object  by
GetDeformerWeights ,but  i had a little problem to work with Envelope
class ,instead i have used EnvelopeWeight Class , With this one im
able to get the number of deformers .
But with de EnvelopeWeight Class a i m not able to use
GetDeformerWeights from Envelope Class could Anyone have an idea how
can i use Envelope Class ..

there is my code snipet  thanks!

//---------------------------------------------------------------------------------------------------------------------------

PolygonMesh SMesh(SourceObj.GetActivePrimitive().GetGeometry(0));

		CGeometryAccessor ga = SMesh.GetGeometryAccessor();
        CRefArray SEnvelope = ga.GetEnvelopeWeights();

	    EnvelopeWeight SWeighting = SEnvelope[0];
                   // Envelope  SWeighting  = SEnvelope[0]; //envelope class

	    CRefArray SourceDeformers = SWeighting.GetDeformers();

	    App.LogMessage(L"DeformersCount : " +CString(SourceDeformers.GetCount()));

                   CTime Frame;
	    for (LONG e =0;e <  SourceDeformers.GetCount();e++)
	    {

			
			   CDoubleArray weights =
Envelope(SEnvelope[0]).GetDeformerWeights(SourceDeformers[e],Frame.GetTime());
                                                   //CDoubleArray
weights = SWeighting.GetDeformerWeights(SourceDeformers[e],Frame.GetTime());
//envelope class
			
			   for (LONG f = 0; f < weights.GetCount();f++)
			   {
				
				   App.LogMessage(CString(weights[f]));

			   }
		
		


	   }
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.