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

    xpresso Python node NameError for input port

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 473 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

      On 26/04/2016 at 04:11, xxxxxxxx wrote:

      I'm trying to make a python script node in xpresso, I'm sure this worked earlier, but since reloading the file the script is broken and I get the following error:

      NameError: global name 'inFrame' is not defined

      inFrame is the 3rd input of the Python node (integer)

      file:
      https://dl.dropboxusercontent.com/u/24304389/NameError.c4d

      I also added a generic python node which would normally work in a new project, to show it reproducing the same error when in the same xpresso window?!

      afaik the input ports do not need to be defined, like in the example when you make a python node, can anyone tell me what's happening here?

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

        On 26/04/2016 at 08:27, xxxxxxxx wrote:

        Hi and Welcome to the Plugin Cafe!

        I've reviewed the linked document and there seem to have an issue with the Python XPresso node and Frame ports. I'll report it and also try to find a workaround if there's any.

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

          On 26/04/2016 at 11:05, xxxxxxxx wrote:

          Thank you,
          I've also emailed support and they couldn't immediately help, they are now waiting to hear back from someone

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

            On 27/04/2016 at 05:16, xxxxxxxx wrote:

            Is this the NNenov I think it is ?
            I think I recognize the task at hand 😉
            Welcome here !

            1: Your Constant Node is not Enabled ( Basic Tab ). So there's no value coming in. Switch it on.
            The 0 or 1 you need is set in the Node Tab.

            2: Next you need to make sure all possible conditions are adressed and can lead to Output values.
            - What happens when inFrame does not equal 0, and i does not have a value yet ?
            - What happens with Output 1 "if In1 and i > 1"
            - What happens with Output 2 "if In1 and i > 0"
            - ...

            cheers,
            d

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

              On 27/04/2016 at 14:45, xxxxxxxx wrote:

              Hey, NNenov.
              I just saw who I think you were in person, and he told me you're not him.  😐

              Great coincidence.
              One of my students who just started exploring Py in C4D, happens to be working on a very similar task.

              Anyway,
              Just as welcome here...

              d

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

                On 29/04/2016 at 07:46, xxxxxxxx wrote:

                Douwe,

                I feel like a right berk, it was all down to the constant node being disabled, I must have unticked it by accident in the wrong tab.
                Once the node has been enabled, everything works fine.
                Heh I wish I was one of your students!
                Many thanks 🙂

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