|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| SDK C++: Creation of Dialog Boxes (not PPGs)
|
|
|
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::ExecuteCommand( L"InspectObject", ...);
and deleting it when the PPG gets closed with:
Application::ExecuteCommand( L"DeleteObj", ...);
However, this looks more like a workaround. Is there any direct way to create Dialog Boxes in Softimage, please?
Thank you.
|
|
|
|
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.
|
|
|
|
Thank you very much, Stephen.
|
|
|
|
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.CreateObject( L"UnipixelsAttachProcess" );
if ( myRef.IsValid() )
{
CValueArray inspectobjArgs(5) ;
inspectobjArgs[0] = L"UnipixelsAttachProcess" ;
inspectobjArgs[3] = L"Attach Process";
app.ExecuteCommand( L"InspectObj", inspectobjArgs, retVal ) ;
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.
|
|
|
|
Dear all,
this is the right thing of doing it:
Factory myFactory = app.GetFactory();
CustomProperty myProperty = myFactory.CreateObject( L"UnipixelsAttachProcess" );
myProperty.PutName(L"Attach Process");
if ( myProperty.IsValid() )
{
CValueArray inspectobjArgs(5) ;
inspectobjArgs[0] = myProperty ;
app.ExecuteCommand( L"InspectObj", inspectobjArgs, retVal ) ;
return CStatus::OK ;
}
else
{
// Factory did not create the object properly
return CStatus::Fail;
}
Best regards.
|
|
|
|
|
|