Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / SDK C++: Creation of Dialog Boxes (not PPGs)
  RSS 2.0 ATOM  

SDK C++: Creation of Dialog Boxes (not PPGs)
Rate this thread
 
48492
 
Permlink of this thread  
avatar
  • Total Posts: 101
  • Joined: 31 August 2010 07:17 AM

Dear all,

Does Softimage SDK C++ offer a mechanism to create Dialog Boxes? I am not talking about PPGs wich attach Custom Properties to underlined objects. I wish to create a Dialog Box that lets the user to insert some settings. After the Dialog Box gets closed, it will not remain any custom properties anywhere in the scene graph.

An example: I need to setup IPC (Inter Process Communication) with another application process, and for that I do not need to store any custom propertes to Scene Root or anywhere else.

One solution comes to my mind: It is creating Custom Property Layout, displaying it with:

Applciation::ExecuteCommandL"InspectObject", ...);

and deleting it when the PPG gets closed with:

Application::ExecuteCommandL"DeleteObj", ...);

However, this looks more like a workaround. Is there any direct way to create Dialog Boxes in Softimage, please?

Thank you.



Replies: 0
avatar

Custom properties are the basic way to create a dialog.
Use Factory::CreateObject to create a property that is not attached to any scene object.



Replies: 0
avatar

Thank you very much, Stephen.



Replies: 0
avatar

Hi Stephen,

I created temporary Custom Property (Dialog Box) that should not be saved into an object, but I can not display it. What is wrong with the code below, please:

//CStatus st = app.ExecuteCommand( L"SIAddProp", addpropArgs, retVal ) ;
 
Factory myFactory app.GetFactory();
 
CRef myRef myFactory.CreateObjectL"UnipixelsAttachProcess" );

 if ( 
myRef.IsValid() )
 
{

 CValueArray inspectobjArgs
(5) ; 
 
inspectobjArgs[0] L"UnipixelsAttachProcess" 
 
inspectobjArgs[3] L"Attach Process";

 
app.ExecuteCommandL"InspectObj"inspectobjArgsretVal ) ;
 return 
CStatus::OK ;
 
}
 
else
 
{
 
return CStatus::Fail;
 
}

Everything elese is as if I were creating standard PPG. I just created the Custom Property via Factory::CreateObject().

The code above creates the object, however Application::ExecuteCommand( L"InspectObject",...) does not display the dialog box.

Thanks.



Replies: 0
avatar

Dear all,

this is the right thing of doing it:

Factory myFactory app.GetFactory();
 
CustomProperty myProperty myFactory.CreateObjectL"UnipixelsAttachProcess" );
 
myProperty.PutName(L"Attach Process");
 
 if ( 
myProperty.IsValid() )
 
{
 CValueArray inspectobjArgs
(5) ; 
 
inspectobjArgs[0] myProperty 

 
app.ExecuteCommandL"InspectObj"inspectobjArgsretVal ) ;
 return 
CStatus::OK ;
 
}
 
else
 
{
 
// Factory did not create the object properly
 
return CStatus::Fail;
 
}

Best regards.



Replies: 0