User Tools

Site Tools


DzTypeAssetContainer

A generic asset container for hierarchical structures that can be represented by a slash ('/') delimted path.

More...

Inherits :

Properties

DAZ Script
Objectdata

Methods

DAZ Script
NumberaddChildContainer ( String typePath )
NumberaddChildContainer ( DzTypeAssetContainer container )
voidclear ()
DzTypeAssetContainerfindChildContainer ( String typePath )
StringgetTextPath ( Boolean ignoreRoot=true )
StringgetTypeName ()
BooleaninsertToSpecificType ( DzAsset asset, String typePath )

Signals

voidaboutToClear ()

Detailed Description

A generic asset container that takes on the type of the data assigned to it, which can be used to present hierarchical structures that are representable by a slash ('/') delimted path.

Properties


Object : data

Holds the data associated with this container; type depends on the type of the data assigned.

Methods


Number : addChildContainer( String typePath )

Adds a new container with the given name, if one doesn't already exist.

Parameter(s):

  • typePath - The slash ('/') delimited path of a container to add.

Return Value:

  • The index of the newly inserted container. If a container of the same type already exists, the index of that container will be returned.

Number : addChildContainer( DzTypeAssetContainer container )

Adds the given container if one of the same type name doesn't exist.

Parameter(s):

  • container - The child container to be inserted.

Return Value:

  • The index of the newly added container or, if a container already exists with the same name, the index of that container.

void : clear()

Clears all the child containers and assets associated with this container. Emits endAssetRemove() and endChildContainerRemove().


DzTypeAssetContainer : findChildContainer( String typePath )

Parameter(s):

  • typePath - The path of the container to find.

Return Value:

  • The container with the given type name, if it exists, otherwise null.

String : getTextPath( Boolean ignoreRoot=true )

Parameter(s):

  • ignoreRoot - If true, the root item will not be included in the path.

Return Value:

  • The displayed text path of this container.

String : getTypeName()

Return Value:

  • The type name for this container.

Boolean : insertToSpecificType( DzAsset asset, String typePath )

Attempts to insert the asset to a specific type.

Parameter(s):

  • asset - The asset to be inserted.
  • typePath - The slash ('/') delimited path of the type for the asset.

Return Value:

  • true if successful, otherwise false.

Signals


void : aboutToClear()

Signature:“aboutToClear()”

Emitted when this container is about to be cleared.