Clip.AddProperty

Introduced

v4.0

Description

Creates and adds a UserDataBlob or CustomProperty to a Clip object.

Note: This method could return an invalid object in python, use Clip.AddProperty2 instead.

C# Syntax

Property Clip.AddProperty( Object in_Preset, Boolean in_Branch, String in_name );

Scripting Syntax

oReturn = Clip.AddProperty( Preset, [BranchFlag], [Name] );

Return Value

CustomProperty, UserDataBlob or UserDataMap, depending on the preset that was used.

Parameters

Parameter Type Description
Preset String This argument contains either the name of a Property Preset or a string with the filename or full path to a Preset file.

Note: Only CustomProperty Presets, UserDataBlob Presets, and UserDataMap Presets are valid for clips.

The type of property that is created is determined by this argument. For example, "CustomProperty" creates an empty CustomProperty and "UserDataBlob" creates a UserDataBlob.
BranchFlag Boolean False is the only supported value.

Default Value: false

Name String Represents the name of the new property (see SIObject.Name). If not specified the object is named based on the Preset argument.

Examples

JScript Example

NewScene( null,false ) ;
var oRoot = ActiveProject.ActiveScene.Root ;
var oGrid = oRoot.AddGeometry( "Grid", "MeshSurface" );
var oGeom = oGrid.ActivePrimitive.Geometry ;
var oClip = oGeom.SaveShapeKey(1) ;
var oPSet = oClip.AddProperty( "CustomProperty",false,"ClipData" ) ;
oPSet.AddParameter3( "StringOnClip", siString ) ;
//You can also store binary data
oClip.AddProperty( "UserDataBlob",false,"MyBlob" ) ;
//The new properties show up on the bottom
//of the PPG
InspectObj( oClip ) ;

See Also

SceneItem.AddProperty Clip.Properties