3ds Max C++ API Reference
ITranslationProgress Class Referenceabstract

Interface used for progress reporting by translators. More...

#include <ITranslationProgress.h>

Public Member Functions

virtual void SetTranslationProgressTitle (const MCHAR *title, bool &abort_immediately)=0
 This method is equivalent to IRenderingProcess::SetRenderingProgressTitle(), but contains additional handling to abort translation if a scene change occurs while processing the UI messages. More...
 
virtual void SetTranslationProgress (const size_t done, const size_t total, bool &abort_immediately)=0
 This method is equivalent to IRenderingProcess::SetRenderingProgress(), but contains additional handling to abort translation if a scene change occurs while processing the UI messages. More...
 

Protected Member Functions

virtual ~ITranslationProgress ()
 

Detailed Description

Interface used for progress reporting by translators.

Translators must use this interface to report progress; they shouldn't use IRenderingProcess directly. This is to ensure stability when translating for an interactive render session. When updating the UI tho show the new progress status, window messages get processed; these messages may represent user input which will in turn be processed into scene modifications. The modifications may interfere with the translation process. For example, if the user hits the delete key, and that command gets processed while updating the progress bar, then a scene object may get deleted while it's still being accessed by the translator. This interface includes special checks to warn the translator of such situations, through the abort_immediately parameter of the method it exposes.

Constructor & Destructor Documentation

◆ ~ITranslationProgress()

virtual ~ITranslationProgress ( )
inlineprotectedvirtual
62 {}

Member Function Documentation

◆ SetTranslationProgressTitle()

virtual void SetTranslationProgressTitle ( const MCHAR title,
bool &  abort_immediately 
)
pure virtual

This method is equivalent to IRenderingProcess::SetRenderingProgressTitle(), but contains additional handling to abort translation if a scene change occurs while processing the UI messages.

Parameters
titleThe string to display as the progress title.
abort_immediately[out] If set to true (by the system), the caller must immediately abort the translation that is currently in progress: no further access to the 3ds Max must be performed, under risk of crash (e.g. if a scene element was deleted); Translate() must immediately return TranslationResult::Aborted. Failure to abide by this will result in race conditions, random and hard to reproduce crashes.

◆ SetTranslationProgress()

virtual void SetTranslationProgress ( const size_t  done,
const size_t  total,
bool &  abort_immediately 
)
pure virtual

This method is equivalent to IRenderingProcess::SetRenderingProgress(), but contains additional handling to abort translation if a scene change occurs while processing the UI messages.

Parameters
doneThe number of units of work which are done. Current progress is expressed as: done / total.
totalThe number of units of work in total. Current progress is expressed as: done / total.
abort_immediately[out] If set to true (by the system), the caller must immediately abort the translation that is currently in progress: no further access to the 3ds Max must be performed, under risk of crash (e.g. if a scene element was deleted); Translate() must immediately return TranslationResult::Aborted. Failure to abide by this will result in race conditions, random and hard to reproduce crashes.