THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/07/2012 at 08:49, xxxxxxxx wrote:
Cinema 4D Version:
In the SDK Examples, the SculptingTool example (sculpting.cpp) performs some checks in ToolData::MouseInput().
Bool SculptingTool::MouseInput(BaseDocument *pDoc, BaseContainer &data, BaseDraw *pDraw, EditorWindow *win, const BaseContainer &msg)
if (pDraw != pDoc->GetActiveBaseDraw())
/* .. */
Why should Cinema pass invalid arguments to our plugins, should we really perform these kind of checks?
On 26/07/2012 at 09:00, xxxxxxxx wrote:
Better safe than sorry It may be a bit over defensive but you should never assume a pointer to be valid, especially in a multi-threaded application as CINEMA 4D.
On 30/07/2012 at 11:24, xxxxxxxx wrote:
Ok, you're right at this point. Thanks!