Open Search
    BaseThread Manual

    Table of Contents

    About

    A BaseThread is a Cinema API thread. BaseThread cannot be instantiated; for custom threads see C4DThread Manual.

    Access

    A BaseThread is either accessed through various utility functions or is given as an argument of an implemented function of a plugin class. Such a BaseThread argument defines the thread context of a function that is executed in a thread. The called function should stop if the given thread is stopped.

    • In a VideoPostData::Execute() function the thread is obtained from the given VideoPostStruct argument.
    • In a ObjectData::GetVirtualObjects() function the thread is obtained from the given HierarchyHelp argument.
    • In a ShaderData plugin the sampling thread is obtained from the given InitRenderStruct argument.
    • etc.

    Use

    These BaseThread properties can be accessed:

    • BaseThread::TestBreak(): Returns true if the thread encountered a break condition to stop processing.
    • BaseThread::IsRunning(): Returns true if the thread is running.
    • BaseThread::End(): Ends the thread.
    // In the Execute() function of a VideoPostData plugin one must
    // check if the rendering process should be stopped.
    RENDERRESULT Execute(BaseVideoPost* node, VideoPostStruct* vps)
    {
    // check if break
    BaseThread* const bt = vps->thread;
    if (bt && bt->TestBreak())
    {
    }
    OK
    User has selected a font.
    Definition: customgui_fontchooser.h:0
    RENDERRESULT
    Definition: ge_prepass.h:427
    Definition: node.h:10

    Further Reading