custom operators and changing topology

42 views
Skip to first unread message

ran sariel

unread,
May 21, 2013, 4:56:47 PM5/21/13
to softimage
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

Matt Lind

unread,
May 21, 2013, 5:49:32 PM5/21/13
to soft...@listproc.autodesk.com

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

ran sariel

unread,
May 21, 2013, 6:21:04 PM5/21/13
to softimage
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



Matt Lind

unread,
May 21, 2013, 6:43:18 PM5/21/13
to soft...@listproc.autodesk.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.

Ahmidou Lyazidi

unread,
May 21, 2013, 7:59:52 PM5/21/13
to soft...@listproc.autodesk.com
what is your debuger saying?

-----------------------------------------------
Ahmidou Lyazidi
Director | TD | CG artist
http://vimeo.com/ahmidou/videos


2013/5/22 Matt Lind <ml...@carbinestudios.com>

Songqiong Yang

unread,
May 22, 2013, 1:11:36 AM5/22/13
to soft...@listproc.autodesk.com
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: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@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>>
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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@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>> 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




winmail.dat

ran sariel

unread,
May 22, 2013, 12:27:59 PM5/22/13
to softimage
Hi Songqiong 
sadly I'm still on 2012.SAP

Ran

Matt Lind

unread,
May 22, 2013, 1:23:01 PM5/22/13
to soft...@listproc.autodesk.com

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: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Songqiong Yang
Sent: Tuesday, May 21, 2013 10:12 PM
To: soft...@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 (const CString &in_scriptname, CValue::DataType in_type, siParamClassification in_classification, INT in_capabilities, const CString&in_name, const CString &in_description, const CValue &in_default, const CValue &in_min, const CValue &in_max, const CValue &in_suggestedmin, constCValue &in_suggestedmax, CStatus *pst=0)

 

2.       CustomProperty::AddParameter

AddParameter (const CString &in_scriptname, CValue::DataType in_type, siParamClassification in_classification, INT in_capabilities, constCString &in_name, const CString &in_description, const CValue &in_default, const CValue &in_min, const CValue &in_max, const CValue&in_suggestedmin, const CValue &in_suggestedmax, Parameter &io_parameter)

 

Thanks,

Joany

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@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>

Scripting and C++ are not 1:1.  It might not be necessary to set parameter classification to ‘siClassifTopo’ in C++.  

Songqiong Yang

unread,
May 22, 2013, 8:21:28 PM5/22/13
to soft...@listproc.autodesk.com
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>
Date:
To: soft...@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: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Songqiong Yang
Sent: Tuesday, May 21, 2013 10:12 PM
To: soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@listproc.autodesk.com<mailto:soft...@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>>
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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@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>> 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




winmail.dat

Matt Lind

unread,
May 22, 2013, 8:45:29 PM5/22/13
to Songqiong Yang, soft...@listproc.autodesk.com

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.

CreateParamDef (const CString &in_scriptname, CValue::DataType in_type, siParamClassification in_classification, INT in_capabilities, const CString&in_name, const CString &in_description, const CValue &in_default, const CValue &in_min, const CValue &in_max, const CValue &in_suggestedmin, constCValue &in_suggestedmax, CStatus *pst=0)

 

2.       CustomProperty::AddParameter

AddParameter (const CString &in_scriptname, CValue::DataType in_type, siParamClassification in_classification, INT in_capabilities, constCString &in_name, const CString &in_description, const CValue &in_default, const CValue &in_min, const CValue &in_max, const CValue&in_suggestedmin, const CValue &in_suggestedmax, Parameter &io_parameter)

 

Thanks,

Joany

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@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>

Scripting and C++ are not 1:1.  It might not be necessary to set parameter classification to ‘siClassifTopo’ in C++.  

Songqiong Yang

unread,
May 23, 2013, 12:22:11 AM5/23/13
to Matt Lind, soft...@listproc.autodesk.com
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]
Sent: Thursday, May 23, 2013 8:45 AM
To: Songqiong Yang; soft...@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: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Songqiong Yang
Sent: Wednesday, May 22, 2013 5:21 PM
To: soft...@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>>
Date:
To: soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com] On Behalf Of Songqiong Yang
Sent: Tuesday, May 21, 2013 10:12 PM
To: soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@listproc.autodesk.com<mailto:soft...@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>>
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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@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>> 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




winmail.dat

ran sariel

unread,
May 23, 2013, 11:40:59 AM5/23/13
to softimage
so does that mean that there's no way to write a custom operator changing topology in 2012??, 

Songqiong Yang

unread,
May 23, 2013, 12:06:52 PM5/23/13
to soft...@listproc.autodesk.com
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.s...@gmail.com>
Date:
To: softimage <soft...@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 <Songqio...@autodesk.com<mailto:Songqio...@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; soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>] On Behalf Of Songqiong Yang
Sent: Wednesday, May 22, 2013 5:21 PM
To: soft...@listproc.autodesk.com<mailto:soft...@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: soft...@listproc.autodesk.com<mailto:soft...@listproc.autodesk.com><mailto:soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com><mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>] On Behalf Of Songqiong Yang
Sent: Tuesday, May 21, 2013 10:12 PM
To: soft...@listproc.autodesk.com<mailto:soft...@listproc.autodesk.com><mailto:soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com><mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>] On Behalf Of Ahmidou Lyazidi
Sent: Wednesday, May 22, 2013 8:00 AM
To: soft...@listproc.autodesk.com<mailto:soft...@listproc.autodesk.com><mailto:soft...@listproc.autodesk.com<mailto:soft...@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: softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com><mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com>> [mailto:softimag...@listproc.autodesk.com<mailto:softimag...@listproc.autodesk.com><mailto:softimag...@listproc.autodesk.com<mailto:softimag...@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




winmail.dat

ran sariel

unread,
May 23, 2013, 8:15:33 PM5/23/13
to Songqiong Yang, softimage
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







Reply all
Reply to author
Forward
0 new messages