AddProperty (Clip)
Introduced
4.0
Description
Creates and adds a UserDataBlob or CustomProperty to a Clip object.
Scripting Syntax
Clip.AddProperty( Preset, [BranchFlag], [Name] )
C# Syntax
Property Clip.AddProperty( Object in_Preset, Boolean in_Branch, String in_name );Parameters
|
Parameter |
Type |
Description |
|
Preset |
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 |
False is the only supported value. Default Value: false |
|
|
Name |
Represents the name of the new property (see SIObject.Name). If not specified the object is named based on the Preset argument. |
Return Value
CustomProperty, UserDataBlob or UserDataMap, depending on the preset that was used.
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
Autodesk Softimage v7.5