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

    XPRESSO Python Node "Could not find port value for..." Error

    Cinema 4D SDK
    python
    2
    3
    546
    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.
    • N
      noseman
      last edited by noseman

      Python Hierarchy Node 11A.c4d As I'm trying to understand how to use a Python Node in XPRESSO, I did this very simple setup. All I want is for the "OutputObject" to be the same as the "Input1" but I keep getting an error: "NameError: Could not find port value for 'OutputObject' in node 'Python iterate Hierarchy'."

      Can someone explain this please?
      Cheers

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by Manuel

        hi @noseman ,

        looks like you have twice def main() in your code.
        Global variable are only necessary for the output's ports.

        Your code

        import c4d
        #Welcome to the world of Python
        
        
        def main():
            global Input1
            global OutputObject
            def main():
                OutputObject = Input
        

        should be

        import c4d
        #Welcome to the world of Python
        
        
        def main():
            global OutputObject
            OutputObject = Input1
        
        

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        N 1 Reply Last reply Reply Quote 0
        • N
          noseman @Manuel
          last edited by

          @m_magalhaes
          Oh man... thank you so much. Even when I read your reply, I couldn't "see" it in the Node... was staring at it for to long.
          thanks.

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