vcanim.gif (8357 bytes)SAA_elementCopy
Home ] Sales ] Products ] Services ] Support ] Downloads ]

 

 


SAA_elementCopy

Copies a single element.

SAA_elementCopy scene original copy

original

A light, material, model, 2D texture, or 3D texture. Use SAA_AllocElem to allocate element

copy

The element to which original is copied. Use SAA_AllocElem to allocate element

Note

Copy flags control what is copied from original to copy. Most of the copy flags correspond to the settings in the Duplicate -> Setup dialog. See the reference page for SAA_copyFlagGet.

Possible Errors

  • SI_ERR_NOTSUPPORTED if original is not a light, material, model, 2D texture, or 3D texture.

See Also

Example

proc SAA_elementCopyExample {} {

    global SAA_Constants
   
    set scene [SAA_AllocScene]

    SAA_sceneGetCurrent $scene

    set copyFlags [ expr $SAA_Constants(SAA_COPY_LIGHT_ANIM) | \
        $SAA_Constants(SAA_COPY_ALL_TEXTURE2D_ANIM) | \
        $SAA_Constants(SAA_COPY_ALL_TEXTURE3D_ANIM) | \
        $SAA_Constants(SAA_COPY_MATERIAL_DUP) | \
        $SAA_Constants(SAA_COPY_MATERIAL_ANIM) | \
        $SAA_Constants(SAA_COPY_T2DLOCAL_DUP) | \
        $SAA_Constants(SAA_COPY_T3DLOCAL_DUP) | \
        $SAA_Constants(SAA_COPY_T2DLOCAL_ANIM) | \
        $SAA_Constants(SAA_COPY_T3DLOCAL_ANIM) ]

# Save copy flags.

    SAA_copyFlagGet flag

# Temporarily set new copy flags.

    SAA_copyFlagSet $copyFlags

    set original [SAA_AllocElem]

    SAA_selectlistGetElements $scene 1 $original

    set copy [SAA_AllocElem]

    SAA_elementCopy $scene $original $copy

# Restore the copy flags.

    SAA_copyFlagSet $flag

    SAA_Free $scene
    SAA_Free $original
    SAA_Free $copy
}


SAA Index ] Examples SAA calls index ]

copyright Video-Collage Inc.