Introduced
1.5
Description
Makes a referenced model local.
Tip: To optimize this command, make sure the Default_Pass is activated and there are no overrides on partitions. When overrides are active, it runs much more slowly.
Scripting Syntax
MakeModelLocal( [Model], [IncludeNestedRefModels] )
Parameters
|
Parameter |
Type |
Description |
|
Model |
The model clip to make local. |
|
|
IncludeNestedRefModels |
True to include nested reference models. Default Value: true |
Examples
JScript Example
/* This example shows how to make a referenced model local. */ NewScene(null, false); // First create a simple model containing a sphere var sph = CreatePrim("Sphere", "MeshSurface"); var mdl = CreateModel(sph, "LocalModel")(0); var mymodelpath = XSIUtils.BuildPath( Application.InstallationPath(siFactoryPath), "Data", "XSI_SAMPLES", "Models", "mymodel.emdl" ); Application.LogMessage(Application.ActiveSceneRoot.Models.GetAsText()); // INFO : LocalModel // Export it and then reimport it as a referenced model ExportModel(mdl, mymodelpath); SelectObj(mdl, "BRANCH") // models must be branch-selected when deleting DeleteObj(); Application.LogMessage(Application.ActiveSceneRoot.Models.GetAsText()); // INFO : var rtn = ImportModel(mymodelpath, null, true); mdl = rtn.Value("Value"); // Now make it local MakeModelLocal(mdl); Application.LogMessage(Application.ActiveSceneRoot.Models.GetAsText()); // INFO : mymodel
See Also
Autodesk Softimage v7.5