Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/03/2007 at 13:20, xxxxxxxx wrote:
User Information: Cinema 4D Version: Platform: Language(s) :
--------- Hi again,
I'm trying to determine when a render to picture view start/end.
I'm trying to receive MSG_MULTI_RENDERNOTIFICATION in a dialog plugin through CoreMessage(), but not receiving.
Bool PluginDialog::CoreMessage(LONG id,const BaseContainer &msg;){ switch (id){ case MSG_MULTI_RENDERNOTIFICATION: GePrint("received MSG_MULTI_RENDERNOTIFICATION"); break; } return GeDialog::CoreMessage(id,msg); }
also how do I tell if render starts or ends?
thanks for all the help guys
On 01/03/2007 at 15:38, xxxxxxxx wrote:
Don't use CoreMessage() (wrong method). If you look at CoreMessage(), it doesn't receive these type of messages at all. Use Message() instead. Problem is that GeDialog::Message() doesn't receive this type of message either - it only receives GUI messages. This message is usually relayed to other plugin types (Object, Tag, etc.) - anything based on NodeData.
The solution is to use another type of plugin, usually a SceneHook is suggested.
Per your second question:
case MSG_MULTI_RENDERNOTIFICATION: { if (!data) return TRUE; RenderNotificationData* rnd = (RenderNotificationData* )data; if (!rnd) return TRUE; // Start Editor or External Render (set Render visibility) if (rnd->start || (rnd->external && (rnd->doc != GetActiveDocument()))) ... // End Editor or External Render (restore Editor visibility) else ... break; }
Check out RenderNotificationData in the SDK Docs.
On 02/03/2007 at 10:13, xxxxxxxx wrote:
I've tried to create the scene hook, but crash after register. am I missing somenthing?
class MySceneHook : public NodeData { public: Bool Message(GeListNode* node, LONG type, void* data) { GePrint("scene hook message"); }; }; static NodeData* SceceHookAllocator() { NodeData *data = gNew MySceneHook; return data; } Bool PluginStart(void) { // scene hook Bool r= RegisterSceneHookPlugin( 1007778, "my plugin", PLUGINFLAG_HIDE | PLUGINFLAG_HIDEPLUGINMENU, SceceHookAllocator, EXECUTION_INITIAL, 0, NULL ); }
On 02/03/2007 at 12:24, xxxxxxxx wrote:
1. class MySceneHook : public SceneHookData
2. Do your allocator like this:
class MySceneHook : public SceneHookData { Bool Message(GeListNode* node, LONG type, void* data) { GePrint("scene hook message"); }; static NodeData* Alloc() { return gNew MySceneHook; } };
Bool PluginStart(void) { Bool r = RegisterSceneHookPlugin( ... MySceneHook::Alloc(), ... ); }
On 02/03/2007 at 12:39, xxxxxxxx wrote:
Thanks all working now! I was using the wrong base class
small correction
Bool PluginStart(void) { Bool r = RegisterSceneHookPlugin( ... MySceneHook::Alloc, ... ); }
On 02/03/2007 at 16:46, xxxxxxxx wrote:
You are correct.