v6.0
RefModel|Delta
Imports a model delta object from a specific file. The file must
be in a delta format previously exported using the ExportDelta command or it can be an external
storage file from an existing model delta.
A Delta is basically a 'diff' or list of modifications made to the
components of a reference model. You can specify which
modifications should be tracked in each delta (eg., track only
expressions and constraints vs. tracking all animation, etc.). Each
model can only have one delta associated to it and each delta
contains the name of the model to which it is associated. When
importing a delta while there is already a model delta for the
model, the user is prompted to chose whether to use the new delta
instead of the old one, or just to load the model delta with no
target.
oReturn = ImportDelta( FileName, Model, [Reference], [Interactive] ); |
The imported Delta
Parameter | Type | Description |
---|---|---|
FileName | String | The filename where to import the model delta. |
Model | String | Indicate for which model the delta will be imported. Note that deltas are always nested under the referenced model head, which is the topmost referenced model. |
Reference | Boolean | True to set the model delta object storage to external and use
the input filename. Otherwise, the storage of the model delta will
be set to internal. Tip: You can also use the ImportReferencedDelta command. directly. Default Value: False |
Interactive | Boolean | True to enable (display) any dialog when importing a delta onto
a model.
Default Value: True |
/* This example demonstrates how to import a model delta. */ NewScene(null, false); CreatePrim("Sphere", "MeshSurface", null, null); CreateModel(null, null, null, null); var sPath = Application.InstallationPath(siFactoryPath) + "\\Data\\XSI_SAMPLES\\Models\\Test.emdl"; ConvertToRefModel ("Model", sPath); SelectObj("Model.sphere", null, true); Translate(null, -8.21651117203418, 4.54207454997213, -0.454207454997213, siRelative, siView, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0); var sPath2 = Application.InstallationPath(siFactoryPath) + "\\Deltas\\Test.delta"; ExportDelta("Model.Delta", sPath2); var oDelta = ImportDelta(sPath2, "Model"); Logmessage( oDelta ); |