Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Cinema 4D R20 and Octane 3.08.5 attribute issue

    Cinema 4D SDK
    4
    11
    6.3k
    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.
    • A
      AndreAnjos
      last edited by AndreAnjos

      Hi all,

      I understand that this might not be related with Maxon, but thought of asking it anyway, as it may have been resolved by others or it can help others.

      We are currently in the process of testing and deploying R20 and I'm testing all of our in-house plugins.
      I've encounter an issue specific with Octane where it doesn't recognise the attribute IDs.

      e.g.: Enabling the multipass of on the render engine.
      AttributeError: 'module' object has no attribute 'SET_PASSES_ENABLED'

      When debugging this by drag and drop the attribute into the console
      It outputs OctaneRenderer[c4d.SET_PASSES_ENABLED], but throws the same error.

      This is the first time I've seen it happen and not sure why it doesn't recognise it.

      Please let me know if I do need to refer to Otoy instead.

      Thank you in advance! ☺

      Andre

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by

        Probably, Octane saves its passes in a Scenehook. Unfortunately, Python is very limited in this regard.
        Therefore, you cannot access its passes.

        But this needs some clarification - I'll take a look into it within the next hours.

        1 Reply Last reply Reply Quote 0
        • A
          AndreAnjos
          last edited by

          @mp5gosu
          Thank you very much for coming back to me and your help! ☺
          Hmmm... Can't understand why Octane would have that change be made between versions, unless is been changed by Cinema in the first place, which I think it wouldn't be the case.

          Thanks for looking into this and I will try to gather more information.

          1 Reply Last reply Reply Quote 0
          • M
            mp5gosu
            last edited by mp5gosu

            So I just installed Octane and took a look where Octane stores its passes. The general settings are stored directly with the VideoPost. The passes itself are stored at a separate branch as Post Effect Pass, see screenshot.
            The settings on the right show the Node located under Post-Effects->Octane Renderer

            0_1551097900276_29ac4769-445f-442f-bd21-7648c044f0a2-image.png

            A 1 Reply Last reply Reply Quote 1
            • pKrimeP
              pKrime
              last edited by

              Hi AndreAnjos,

              Octane stores the passes settings in a VideoPost, and c4d.SET_PASSES_ENABLED is the ID for the checkbox highlighted in mp5gosu's reply.

              Here's a snippet to print out the checkbox state, in the hope it helps

              def check_octane_passes():
                  renderSettings = doc.GetActiveRenderData()
                  
                  _vp = renderSettings.GetFirstVideoPost()
                  oc_vp = None  # Octane VideoPost
              
                  while _vp:
                      if _vp.CheckType(1029525):  # Octane ID
                          oc_vp = _vp
                          break
                      _vp = _vp.GetNext()
              
                  if not oc_vp:
                      return
              
                  print "Octane Passes Enabled", oc_vp[c4d.SET_PASSES_ENABLED]
              

              the error

              AttributeError: 'module' object has no attribute 'SET_PASSES_ENABLED'

              might imply that the Octane attributes have not been added at all to the c4d module. If that's the case you might need to make sure that your code is executed after the Octane plugin has been fully initialized

              Hope it helps,
              Paolo

              1 Reply Last reply Reply Quote 1
              • A
                AndreAnjos @mp5gosu
                last edited by

                @mp5gosu @pKrime
                Thanks for your reply and findings!
                Unfortunately my code is exactly like @pKrime example, so my problem is a bit weirder than I thought.

                @pkrime said in Cinema 4D R20 and Octane 3.08.5 attribute issue:

                the error

                AttributeError: 'module' object has no attribute 'SET_PASSES_ENABLED'

                might imply that the Octane attributes have not been added at all to the c4d module. If that's the case you might need to make sure that your code is executed after the Octane plugin has been fully initialized

                This makes more sense, but I know the plugin as loaded correctly, so can't be a initialisation problem (I think!).
                Hopefully this will help:

                https://drive.google.com/file/d/1vYgxDEH-Yr7WK2KbBpH21rg9KNcXSRxQ/view?usp=sharing

                @mp5gosu The Active Object Properties tool you screenshot, is it something you wrote or you can get it somewhere? looks very useful to me ☺

                Thank you both! ☺

                M 1 Reply Last reply Reply Quote 0
                • M
                  mp5gosu @AndreAnjos
                  last edited by

                  @andreanjos said in Cinema 4D R20 and Octane 3.08.5 attribute issue:

                  @mp5gosu The Active Object Properties tool you screenshot, is it something you wrote or you can get it somewhere? looks very useful to me

                  This is the "Active object dialog" that comes with Cinema 4D's SDK. Usually, you have to compile it yourself. But maybe some of the Devs can share a standalone version - it is useful even to pyDevs.

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    AndreAnjos @mp5gosu
                    last edited by

                    @mp5gosu said in Cinema 4D R20 and Octane 3.08.5 attribute issue:

                    @andreanjos said in Cinema 4D R20 and Octane 3.08.5 attribute issue:

                    @mp5gosu The Active Object Properties tool you screenshot, is it something you wrote or you can get it somewhere? looks very useful to me

                    This is the "Active object dialog" that comes with Cinema 4D's SDK. Usually, you have to compile it yourself. But maybe some of the Devs can share a standalone version - it is useful even to pyDevs.

                    Thank you! I will try to compile it 🙂

                    1 Reply Last reply Reply Quote 0
                    • A
                      AndreAnjos
                      last edited by AndreAnjos

                      Hi guys,

                      So after compiling the sdk examples and trying the Active Object Dialog that @mp5gosu showed me, the damn plugin run correctly.
                      I don't think I've done anything different to initialize Octane, but it's definitely working now after a few experiments.

                      So it doesn't happen again (and future reference), is there a way to force a plugin's initialization?

                      Thank you all again! ☺

                      Edit: I've marked the thread as resolved, but hopefully we can get more insight to the matter.

                      1 Reply Last reply Reply Quote 0
                      • a_blockA
                        a_block
                        last edited by

                        Hi Andre,

                        you were too fast ☺
                        I'm glad the issue got resolved.
                        When we were discussing this case here, we thought, if this might be related to the symbolcache.
                        See for example this thread: Dealing with Symbolcache

                        Of course we were only having an educated guess here and I was about to ask for more details.
                        Now, that the installation of another plugin (basically our C++ cinema4dsdk examples) brought some change, I'm almost convinced this was the culprit.

                        Cheers,
                        Andreas

                        A 1 Reply Last reply Reply Quote 2
                        • A
                          AndreAnjos @a_block
                          last edited by

                          @a_block
                          Hi Andreas,

                          Thanks for your help and you are never too late! ☺
                          That actually makes more sense.
                          Unfortunately I can't seem to replicate the issue again on my machine, as it seems that it's been working for all my updates.

                          I will have a look on one of my team machines when released and see if that could be the problem.

                          Thank you again! 👍

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