SetStatusBar not updating..



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 18/05/2009 at 09:43, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.6 
    Platform:      
    Language(s) :

    ---------
    Hi.

    im generating a preview render, and want to display a progressbar while its rendering.

    I did it with the progrsshook thing, and when i print 'p' to console, its all cool.

    But the progress isnt reflected in the status bar..
    Do i have to call some refres function maybe for the bar ?

    Here's my test code (extended sdk simpleMatPreview with the progressHook) :

    > \> void ProgressFunction (Real p, void\* private_data){ \>      StatusSetBar(int(p\*100)); \>      GePrint (RealToString(int(p\*100)));      \> } \> . \> . \> \> case MATPREVIEW_GENERATE_IMAGE: \>           { \>            MatPreviewGenerateImage\* image = (MatPreviewGenerateImage\* )data; \>            if (image->pDoc){ \>                if (!image->bEditorPreview) { \>                     // we don't calculate a preview map for the editor \>                     GePrint("generating some preview.."); \>                     LONG w = image->pDest->GetBw(); \>                     LONG h = image->pDest->GetBh(); \>                     BaseContainer bcRender = image->pDoc->GetActiveRenderData()->GetData(); \>                     bcRender.SetLong(RDATA_XRES, w); \>                     bcRender.SetLong(RDATA_YRES, h); \>                     bcRender.SetLong(RDATA_ANTIALIASING, ANTI_BEST); \>                     if (image->bLowQuality) bcRender.SetBool(RDATA_RENDERASEDITOR, TRUE); \>                     image->pDest->Clear(0, 0, 0);                                    \>                     image->lResult = RenderDocument(image->pDoc, bcRender, ProgressFunction, NULL, image->pDest,RENDERFLAG_EXTERNAL | RENDERFLAG_PREVIEWRENDER, image->pThread); \>                } \>            } \>            return TRUE; \>           } \>           break; \> . \> . \>

    greetings,
    Daniel


Log in to reply