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
    • Login

    Detect a read from Content Browser

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 178 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 22/09/2009 at 02:42, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      In my shader's ::Read(GeListNode *, HyperFile *, LONG) method, I'd like to detect that I'm being called in the context of a Content Browser.

      I only allow one instance of the shader in the whole C4D session, so I'm displaying a message telling so when the user loads a new scene which also contains my shader.
      When the user browses with the Content Browser, the browser parses all the files and will therefore display this message box for all files that contain my shader, which is really annoying to the user.

      So, is there a way to detect that?

      Thanks!

      Best,
      Ben

      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 29/09/2009 at 00:56, xxxxxxxx wrote:

        It is not possible to detect a Content browser load. What you can do is to check for MSG_DOCUMENTINFO/MSG_DOCUMENTINFO_TYPE_LOAD messages. If the loaded document contains your shader you can react to it.

        cheers,
        Matthias

        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 01/10/2009 at 02:37, xxxxxxxx wrote:

          Thanks!

          I found another way to do what I wanted, but I'll take a look at what you said.

          Right now, I only display the warning message once the scene is really loaded. I know that the scene is really opened by calling the HyperFile::GetDocument() method during the read, to get the document in which the scene will be loaded. If this document is then displayed or whatever, I can display the message. So, for scenes that are just read but never really opened, there is no warning.

          Ben

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