Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    ProgressDialog..

    SDK Help
    0
    1
    148
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 01/06/2014 at 15:58, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      I`ve called a ProgressDialog from within my ObjectData plugin and trying to figure out how to properly update the progress.

      In the sdk docs there`s an example and what this does is override the virtual Main() function and run a for/next loop inside it to demonstrate the progress bar updating..

      This works fine but when i try a similar thing ( using my own custom percentage variable which is updated elsewhere in the plugin ) it only seems to read the value of the variable as it is when the ProgressDialog is initially instantiated - ie it`s not reading the updated value as it updates elsewhere.

      Here`s an example of my Main() override:

      void MyProgressDialog::Main(C4DThread *bt)
      {
      	SetPercent(0.f);
        
      	while (progPercent != 1)
      	{
      		GePrint(RealToString(progPercent));      // only ever prints zero or whatever initial value i set,
      		SetPercent((Real) progPercent);  // and doesnt recognise that progPercent is being updated elsewhere.
      	}
        
      	SetPercent(1.f);
      }
      

      To be honest im probably overlooking something obvious and maybe theres an alternative to using While to check the variable, but any advice would be appreciated!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post