THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2006 at 12:37, xxxxxxxx wrote:
Cinema 4D Version: 8.503
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
What there is is a hierarchy of plugin objects. They don't need any form displayed as they are tied to their root polygon object. When the user moves the mouse within the Editor window, I'd like to find the part of the polygon object under the cursor (for now, the closest will do) and the associated plugin object and 'highlight' that section of the polygon object for the user. This is sort of like how the polygon tool works, but not a tool.
Is the SceneHook plugin what I'm looking for to do this?
Also, if this is the right option, how do I satisfy this note from the documentation:
Make sure that you only use this function when the user is somehow working with your plugin, so that other plugins can also use this hook when it's their turn.
It's so great that there is an example of this sufficiently critical plugin type ...
On 29/01/2006 at 02:53, xxxxxxxx wrote:
1. Yes you can do that within a scenehook, the viewport highlighting is done this way. As with a tool you can use GetCursorInfo, however, be warned that in doing so you block other scenehooks/tools from activting if you return TRUE, you should return FALSE if your scenehook wants to allow other ones to continue (e.g. if no highlight occurs)
2. that depends heavily on what you are doing in the scenehook and its intended use. A scenehook will always be running, you don't want to add code that runs when its not needed (slowing down the update) and anything running all the time like this must be heavily checked that it is absolutely safe (i.e. isn't going to crash, freeze or otherwise cause the update to fail). An easy way to satisfy this is just to let the user turn it on/off with an option, that way it only runs if the user wants it to.
3. What example would you like? a scenehook can be used to do many things, its just an Execute call (just like a tag/object). The class shows the functions available and it registers just like any other plugin type.
If you have suggestions then please send them to MAXON, that will get you better results and reduce the clutter. Posts here can be used by others to find help, I'm sure nobody wants to wade through pointless banter to find answers.