Import: use Part::ImportExportSettings to access parameters
This commit is contained in:
@@ -423,10 +423,7 @@ private:
|
||||
|
||||
Handle(XCAFApp_Application) hApp = XCAFApp_Application::GetApplication();
|
||||
Handle(TDocStd_Document) hDoc;
|
||||
bool optionReadShapeCompoundMode = true;
|
||||
hApp->NewDocument(TCollection_ExtendedString("MDTV-CAF"), hDoc);
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Import/hSTEP");
|
||||
optionReadShapeCompoundMode = hGrp->GetBool("ReadShapeCompoundMode", optionReadShapeCompoundMode);
|
||||
ImportOCAFExt ocaf(hDoc, pcDoc, file.fileNamePure());
|
||||
FC_TIME_INIT(t);
|
||||
FC_DURATION_DECL_INIT2(d1,d2);
|
||||
@@ -586,9 +583,8 @@ private:
|
||||
}
|
||||
|
||||
if (legacy == Py_None) {
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Mod/Import");
|
||||
legacy = hGrp->GetBool("ExportLegacy",false) ? Py_True : Py_False;
|
||||
Part::ImportExportSettings settings;
|
||||
legacy = settings.getExportLegacy() ? Py_True : Py_False;
|
||||
}
|
||||
|
||||
Import::ExportOCAF2 ocaf(hDoc, &getShapeColors);
|
||||
|
||||
Reference in New Issue
Block a user