StatusSetSpin?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/02/2011 at 08:59, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R9+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
Howdy,I'm having a little trouble getting the status bar to spin while walking the hierarchy in a recursive function.
Basically what I'm doing is something similar to this:
void WalkTheHierarchy(BaseObject *op) { while(op) { StatusSetSpin(); // do something with op.... WalkTheHierarchy(op->GetDown()); op = op->GetNext(); } }
... and that's being called with something similar to this:
StatusSetText("walking the hierarchy"); WalkTheHierarchy(doc->GetFirstObject());
... but for some reason the status bar doesn't want to spin. It shows the dashed bar, but it doesn't move, and instead I get the spinning curser until it's done.
Is the example code above the correct way to handle it? Or is branching out of the function causing it to start over every time?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 06:46, xxxxxxxx wrote:
It's working fine here. My problem was it iterated so quickly through my hierarchy there was no spinning visible. Introducing a little delay clearly shows the animation. For instance I just added a GePrint() to print the names.
void WalkTheHierarchy(BaseObject *op) { while(op) { StatusSetSpin(); // do something with op.... GePrint(op->GetName()); WalkTheHierarchy(op->GetDown()); op = op->GetNext(); } }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 07:49, xxxxxxxx wrote:
Howdy,
Hmmmm, you're right when I make a simple a simple test command using my example code, it does work. There must be something else in my plugin code that's stopping it from animating, then. :frowning2:
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 08:12, xxxxxxxx wrote:
From where do you call StatusSetSpin?
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 10:03, xxxxxxxx wrote:
Howdy,
Well, I'm calling it as the first line inside the while loop like the simplified example, but it's doing a test for object type, and then branching out of there, passing the object pointer to another function that's making calls to the fbx sdk to create fbx objects equivalent to the object passed to the function.
Could it be that those calls are cpu intensive and causing Cinema 4D to skip updating the managers?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2011 at 11:12, xxxxxxxx wrote:
Howdy,
Ah-ha! The problem was indeed that walking the hierarchy went by so fast. After that it then went on to a more time consuming function that didn't have status bar support yet, so after walking the hierarchy, the status bar was not being cleared until way later on.
Now that I've added status bar support for the more intensive function that comes after walking the hierarchy it behaves more normal.
Adios,
Cactus Dan