Delta

Object Hierarchy | Related C++ Class: Delta

Inheritance

SIObject

ProjectItem

Delta

Introduced

v6.0

Categories

Delta|Action|RefModel

Description

The Delta object represents a 'diff' or list of modifications to a reference model. These are grouped into types of changes called ActionDeltas, which have a unique type similar to the Parameter.Source type (see siModificationDeltaType) and changes to Overrides (which are stored in a parameter called 'PropertiesAddedToRefModel' under the Delta property), etc.

Modifications stored in an override are used to save static modifications, such as a new material.

Modifications stored in an ActionDelta are related to animation, such as FCurves, Constraints, etc.

Delta properties are stored under the model and each model can only have one delta associated to it, so to access a delta, use the Dictionary.GetObject method (for example, 'var myDelta = Dictionary.GetObject("MyRefModel.Delta");'.

There are three ways to create deltas on a reference model:

(1) When the user makes a change to a value or source on a parameter in a reference model, a new Delta is automatically created containing an ActionDelta with the ActionDeltaItem to store the change.

(2) Add an empty Delta using the AddDelta command.

(3) Import a delta using the ImportDelta or ImportReferencedDelta commands.

Methods

AddAction AddCustomOp AddScriptedOp AddScriptedOpFromFile
AnimatedParameters2 Apply BelongsTo operator EvaluateAt
GetICEAttributeFromName IsA IsAnimated2 IsClassOf operator
IsEqualTo operator IsKindOf IsLocked operator IsSelected operator
Load LockOwners RemoveAction Save
SetAsSelected operator SetCapabilityFlag operator SetLock TaggedParameters
UnSetLock      
       

Properties

ActionDeltas Application BranchFlag operator Capabilities operator
Categories EvaluationID Families operator FullName operator
Help HierarchicalEvaluationID ICEAttributes LockLevel operator
LockMasters operator LockType operator Model Mute
Name operator NestedObjects ObjectID Origin
OriginPath Owners PPGLayout operator Parameters operator
Parent Parent3DObject Selected operator Target
Type operator      
       

Examples

JScript Example

/*
        This example demonstrates how to display information about the delta
*/
NewScene(null, false);
// Create a reference model from a cube
var oRoot = Application.ActiveProject.ActiveScene.Root;
var oCube = oRoot.AddGeometry("Cube", "MeshSurface");
var emdlFileRefModel = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Models", "MyModel.emdl"); 
CreateModelAndConvertToRef(oCube, emdlFileRefModel );
// Add the Delta object
var oDelta = AddDelta(oCube.Model);
// Print delta information
Application.Logmessage(" Name: " + oDelta.Name);
Application.Logmessage(" Type: " + oDelta.Type);
Application.Logmessage(" Target reference model name: " + oDelta.Target);
// Output of above script:
//INFO :  Name : Delta
//INFO :  Type : model_delta
//INFO :  Target reference model name : Model

See Also

Model ApplyDelta AddDelta ImportDelta ExportDelta ImportReferencedDelta ImportModel ExportModel RemoveUnusedDeltas