Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Choosing/Reporting opened documents

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 278 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post