User Tools

Site Tools


DzContentReplaceMgr

Content replacement manager.

More...

Inherits :

Enumerations

Methods

Signals

voidcontentReplaceModeChanged ( DzContentReplaceMgr::ContentReplaceMode mode )

Detailed Description

Enumerations


: ContentReplaceMode

Replacing methods when loading content

  • ALWAYS_REPLACE - When a piece of content of a specific type is loaded, any content already in the scene of the same type is removed, so the new item replaces the old one.
  • ASK_TO_REPLACE - When a piece of content is loaded, a dialog prompts the user to choose which (if any) items already in the scene should be removed.
  • NEVER_REPLACE - Items already in the scene are never removed when loading a piece of content.
  • ASK_WHEN_MATCHING - When a piece of content is loaded, a dialog prompts the user to choose which (if any) items already in the scene should be removed if there is an item of matching content type.

Methods


void : clearReplaceData()

Resets all replace data to default values, excluding replace mode.


void : doReplace()

Performs all the necessary steps to remove content marked for replacement.


String : getNewContentPath()

Return Value:

  • The path of the new content.

String : getNewContentType()

Return Value:

  • The type of the new content.

ContentReplaceMode : getReplaceMode()

Return Value:

  • The content replace mode.

void : initReplaceForContentLoad( String path, DzNode baseNode )

Performs all the necessary initialization for doing content replacement when the given file will be loaded, using items attached to baseNode as potential items to replace.


void : removeReplaceNodes()

Removes all nodes in the replace list from the scene.


void : setNewContentPath( String contentPath )

Parameter(s):

  • contentPath - The path of the new content.

void : setNewContentType( String contentType )

Parameter(s):

  • contentType - The type of the new content.

void : setReplaceMode( ContentReplaceMode mode )

Sets the content replace mode.


void : updateReplaceNodes( DzNode baseNode )

Updates the replace list to contain all items that should be removed during content load. If the replace mode is ALWAYS_REPLACE, the list will contain all nodes attached (following, parented, etc.) to baseNode whose type matches the current “New Content Type” (as set through setNewContentType()). If the replace mode is ASK_TO_REPLACE, a dialog will allow the user to select what nodes should be replaced.

Signals


void : contentReplaceModeChanged( DzContentReplaceMgr::ContentReplaceMode mode )

Signature:“contentReplaceModeChanged(DzContentReplaceMgr::ContentReplaceMode)”

Emitted when the content replace mode has changed.

TODO: Add description.