RemoveUnusedDeltas

Introduced

v6.0

Description

Deletes all model Deltas targeting non-existent models.

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.

Scripting Syntax

RemoveUnusedDeltas();

Examples

JScript Example

/*

	This example demonstrates how to remove an unused delta from the scene.

*/

// Create a referenced model

NewScene( null, false );

var obj = CreatePrim( "Cube", "MeshSurface" );

var mdl = CreateModel()(0);

ConvertToRefModel( mdl, XSIUtils.BuildPath( ActiveProject.Path, "Models", "Model.emdl") );

// Create some modifications to generate a delta

Translate( obj, -2, 0, 0, siRelative, siObjCtr, siObj, siXYZ );

// Change the target of the delta so that it points to an non-existent model

SetValue( mdl.Name+".Delta.target", "model_two" );

// Remove all unused deltas (the one we just created)

RemoveUnusedDeltas();

See Also

Delta.RemoveAction ActionDelta.RemoveItem ActionDelta.RemoveAllItems ApplyDelta CommitToReference ConvertToRefModel ExportDelta ExportModel ImportDelta ImportModel ImportReferencedDelta