THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2007 at 23:51, xxxxxxxx wrote:
Cinema 4D Version: R8.2-R10
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
Is there any way to distinguish between types of copying of a tag? What I mean is - a copy done for a cache or rendering or whatnot and a copy-past done by a user?
The reason that I ask is because the plugin tag being developed should pre-calculate certain information from the object to which it is attached. Too time consuming for other more dynamic but very repetitive areas (Execute()). Obviously, if the user copies the tag to another object (Ctrl+drag) then this information will be for the old object and not the new.
CopyTo() is being considered but, again, can the type of copy be distinguished? Otherwise, there may be little reason for that over the other method.
On 02/10/2007 at 01:55, xxxxxxxx wrote:
I don´t know of any information like this. Maybe you could check for rendering with CheckIsRunning() or if there is a cache already or if the destination object is in the scene already. But I´m not sure if this is safe.
On 02/10/2007 at 11:50, xxxxxxxx wrote:
It looks like Init() is the way to go. It is called only when the tag is created, moved, or copy-pasted. Even if this involves caches and stuff, it should be better than the alternative. The calculated value is stored in the resource. If necessary, an object Link could be stored in the resource as well for comparison to allow avoidance of recalculation and the Link updated if the objects are different.
On 02/10/2007 at 12:14, xxxxxxxx wrote:
Hmmm, that doesn't work. It appears that Init() is called *before* it has a valid tag->GetObject() response.
If there really isn't a way to detect a change of object for a tag at this time might it not be suggested to add such a feature in the SDK?