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 19/08/2005 at 07:04, xxxxxxxx wrote:
User Information: Cinema 4D Version: 9.102 Platform: Windows ; Language(s) : C++ ;
---------
My plugin selects the first light source in the active scene. Changes are reported with
m_doc->GetChanged(); in the Timer() Method. This works fine.
When I open a new (2nd) scene, my plugin should recognize that there is a new active scene, from which it should get its 1st light source, instead of pointing to the "old" scenes light.
Whats the command (handler/event?) to get informed about a document change?
If that's not possible, I'd like to give a Combo-List with the opened documents like in the end of the Menu/Window.
Any hints? Thanks!
On 19/08/2005 at 07:47, xxxxxxxx wrote:
Sorry for wasting your time with silly question. The solution was next to me:
if (m_doc != GetActiveDocument()) { m_doc = GetActiveDocument(); }
Tested in Timer(...){ } makes the opened document available for the plugin.
On 28/08/2008 at 06:46, xxxxxxxx wrote:
Hello,
I have similar questions about detecting a document switch. We are trying to get our plugin working correctly with Cinema 4D's multiple document functionality (e.g. you can have multiple C4D files open within a single C4D application).
Therefore I also figured that simply comparing GetActiveDocument() with our own ActiveDocument variable works.
But the question is; where can I do this comparison? I found that MSG_DOCUMENTINFO_TYPE_SAVE_AFTER is called during every switch of documents. However, the problem is that this is called before it switches over to the new document. Needed is the moment after the document switch.
Any ideas?
regards, mcduck