TraceColor & Recursion ...

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

On 03/05/2005 at 13:05, xxxxxxxx wrote:

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

---------
Hi again
At last I think I have found the problem to my TraceColor/TraceColorDirect problems.  After an 'interesting' debugging session, I found that when the command is called it infinite recurses until the memory runs out and it has a 'stack overflow'.  Now in the SDK docs it says :
" Note: Always use a limit for the recursion (typically a value from 6 to 20) to avoid the danger of a stack overflow."
So ... how on earth do I do this?  Is there a variable I need to set, or is there something more clever I need to do?  Please HELP!!
Much Thanks
Dan

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

On 13/05/2005 at 02:38, xxxxxxxx wrote:

For example if you call this function in CalcColor(), then you need to increment a variable somewhere in your plugin so that if the call to TraceColor() calls CalcColor() again you know how far the recursion has gone.