Thanks got it to work. for completion, and hope it helps the next one searching for advice of how to get it to work in 2012
in the operator _Define. ... Context ctxt( in_ctxt ); CustomOperator customOperator; Parameter param; customOperator = ctxt.GetSource(); CStatus status; CComAPIHandler factory; factory.CreateInstance(L"XSI.Factory"); CValueArray args(11); args[0]="time"; args[1]=siDouble; args[2]=siClassifTopo; args[3]= siAnimatable | siPersistable; args[4]=L"time"; args[5]=L"time"; args[6]=1; args[7]=DBL_MIN; args[8]=DBL_MAX; args[9]=DBL_MIN; args[10]=DBL_MAX; CValue opdef; factory.Call(L"CreateParamDef",opdef,args); customOperator.AddParameter(opdef,param); ... Ran On Thu, May 23, 2013 at 9:06 AM, Songqiong Yang <songqiong.y...@autodesk.com > wrote: > Try to use CComAPIHandler, to call APIs provided by Object Model. > > More info pls refer to sdk manual about CComAPIHandler class. > > > Thanks, > Joany > > > > -------- Original message -------- > From: ran sariel <ran.sar...@gmail.com> > Date: > To: softimage <softimage@listproc.autodesk.com> > Subject: Re: custom operators and changing topology > > > so does that mean that there's no way to write a custom operator changing > topology in 2012??, > > > On Wed, May 22, 2013 at 9:22 PM, Songqiong Yang < > songqiong.y...@autodesk.com<mailto:songqiong.y...@autodesk.com>> wrote: > Hi Matt, > > Thanks for your comments. We will work with doc team to see what’s going > on if there are sdk changes in SP. > Normally, in SP release, SDK wouldn’t be changed except the bug fixing > (But support backward-compatibility). > This is very particular/rare case that happened in 2013 SP1. > > > Back to this question, you may try to use CComAPIHandler, to call APIs > provided by Object Model. > > Thanks, > Joany > From: Matt Lind [mailto:ml...@carbinestudios.com<mailto: > ml...@carbinestudios.com>] > Sent: Thursday, May 23, 2013 8:45 AM > To: Songqiong Yang; softimage@listproc.autodesk.com<mailto: > softimage@listproc.autodesk.com> > Subject: RE: custom operators and changing topology > > For the record, SDK updates like this are pretty important. I would like > to request the docs be updated with reach release whether it be a main > release, service pack, or subscription advantage pack. > > In this particular scenario, if I had to write the custom topology > operator, I would be following the 2013 SP1 documentation only to encounter > errors from improper use (because SDK doesn’t match the manuals), or would > pull out hair wondering why my operator is behaving in a flakey manner. > > It’s important the documentation be matched with the software we’re using. > > Thank you. > > Matt > > > > From: softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com> [mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>] On Behalf Of Songqiong Yang > Sent: Wednesday, May 22, 2013 5:21 PM > To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com > > > Subject: RE: custom operators and changing topology > > Hi Matt, > > We didn't update docs for service pack release. > > You can see their introduced version is v11.1(2013) in 2014 sdk manual. > > 11.1 means 2013 SP1. > > Thanks, > Joany > > > > -------- Original message -------- > From: Matt Lind <ml...@carbinestudios.com<mailto:ml...@carbinestudios.com > ><mailto:ml...@carbinestudios.com<mailto:ml...@carbinestudios.com>>> > Date: > To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com > ><mailto:softimage@listproc.autodesk.com<mailto: > softimage@listproc.autodesk.com>> > Subject: RE: custom operators and changing topology > I’m on 2013 SP1, but those new methods are not shown in the SDK manuals. > I think they were added in 2014. > > Matt > > > From: softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>> [mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>] On Behalf Of Songqiong Yang > Sent: Tuesday, May 21, 2013 10:12 PM > To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com > ><mailto:softimage@listproc.autodesk.com<mailto: > softimage@listproc.autodesk.com>> > Subject: RE: custom operators and changing topology > > Hi Ran, > Which Softimage version are you using? > > Since 2013 SP1, there’re two new C++ APIs introduced, to allow the > creation of paramdef with a specified classification. > > 1. Factory::CreateParamDef > CreateParamDef< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1Factory.html#a3badfe123fc78a4353347e7c2de0d270> > (const CString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html> > &in_scriptname, CValue::DataType< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html#ad8ed01ff3ff33333d8e19db4d2818bb6> > in_type, siParamClassification< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/namespaceXSI.html#a8f0a8fe3a0669ff112ec8be6075c9f92> > in_classification, INT in_capabilities, const CString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html>&in_name, > const CString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html> > &in_description, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_default, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_min, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_max, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_suggestedmin, constCValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_suggestedmax, CStatus< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CStatus.html> > *pst=0) > > > 2. CustomProperty::AddParameter > > AddParameter< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CustomProperty.html#a3cd8cb29aea12aad508cfc2d623dc836> > (const CString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html> > &in_scriptname, CValue::DataType< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html#ad8ed01ff3ff33333d8e19db4d2818bb6> > in_type, siParamClassification< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/namespaceXSI.html#a8f0a8fe3a0669ff112ec8be6075c9f92> > in_classification, INT in_capabilities, constCString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html> > &in_name, const CString< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CString.html> > &in_description, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_default, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_min, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_max, const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html>&in_suggestedmin, > const CValue< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1CValue.html> > &in_suggestedmax, Parameter< > http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_cpp/classXSI_1_1Parameter.html> > &io_parameter) > > Thanks, > Joany > From: softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>> [mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>] On Behalf Of Ahmidou Lyazidi > Sent: Wednesday, May 22, 2013 8:00 AM > To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com > ><mailto:softimage@listproc.autodesk.com<mailto: > softimage@listproc.autodesk.com>> > Subject: Re: custom operators and changing topology > > what is your debuger saying? > > ----------------------------------------------- > Ahmidou Lyazidi > Director | TD | CG artist > http://vimeo.com/ahmidou/videos > > 2013/5/22 Matt Lind <ml...@carbinestudios.com<mailto: > ml...@carbinestudios.com><mailto:ml...@carbinestudios.com<mailto: > ml...@carbinestudios.com>>> > Scripting and C++ are not 1:1. It might not be necessary to set parameter > classification to ‘siClassifTopo’ in C++. > > I don’t know the answer. > > Matt > > > > From: softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>> [mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>>] On Behalf Of ran sariel > Sent: Tuesday, May 21, 2013 3:21 PM > To: softimage > Subject: Re: custom operators and changing topology > > Thank you Matt > > the issue is not defining the data type, the problem I'm facing is trying > to let softimage treat my customOperator as one that is changing topology. > one of the advice I found online was defining the first parameters on that > operator as "siClassIfTopo", that method is valid for the object model but > not in the c++ signature. > Ran > > > > > On Tue, May 21, 2013 at 2:49 PM, Matt Lind <ml...@carbinestudios.com > <mailto:ml...@carbinestudios.com><mailto:ml...@carbinestudios.com<mailto: > ml...@carbinestudios.com>>> wrote: > XSIFactory.CreateParamDef() is for creating parameters the user interacts > with in the operator’s PPG. > > Defining the data type your operator reads/writes is done via port > connections. CustomOperator.AddInputPort() and > CustomOperator.AddOutputPort(), for example. > > > Matt > > > > > From: softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>> [mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com><mailto: > softimage-boun...@listproc.autodesk.com<mailto: > softimage-boun...@listproc.autodesk.com>>] On Behalf Of ran sariel > Sent: Tuesday, May 21, 2013 1:57 PM > To: softimage > Subject: custom operators and changing topology > > Hi > > I'm trying to read geometry (from a stream) using a custom operator. > as long as there's no topology changes all works fine and the mesh is read > and animated. > when the topology changes softimage crashes. > I understand I need to classify that operator siClassifTopo, but not sure > how to do that in c++ > (the c++ methods for CreateParamDef in factory don't have the option to > specify the classification that the object model has). > > what would be the right way to go about it? > > Cheers > Ran > > > >