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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Python Xpresso Node

    Cinema 4D SDK
    windows python 2023
    3
    5
    1.0k
    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.
    • L
      ll2pakll
      last edited by

      Windows 10
      Cinema 4d 2023.2.1

      Good evening.
      Which command allows you to add a Python Xpresso node?
      I didn't find it in the list of available id's. But without it my program will not work correctly.
      Also, I need to understand how I can put the necessary code into this node for it to work? Or maybe there is a way not to use this node, but to use an alternative?
      This is what the code placed in this node looks like:

      from typing import Optional
      import c4d
      
      op: c4d.modules.graphview.GvNode # The Xpresso node
      doc: c4d.documents.BaseDocument # The document evaluating this node
      tp: Optional[c4d.modules.thinkingparticles.TP_MasterSystem] # Particle system
      
      def main() -> None:
          global Output1
          katet_1 = Input1 - Input3
          kater_2 = Input2 - Input4
          kvadrat_giopotenuzy = katet_1**2 + kater_2**2
          Output1 = kvadrat_giopotenuzy**0.5
      
      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi you should use ID_OPERATOR_COFFEE, this is mostly due to historical reason since previously the scripting language in Cinema 4D was COFFEE and it was then replaced with Python.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        L B 2 Replies Last reply Reply Quote 1
        • L
          ll2pakll @m_adam
          last edited by

          @m_adam Thank you very much for your reply. But while I was waiting for a reply, I experimented and realized that the Python tag suits me much better than the xpresso system, and rewrote the whole scene overnight). Have a great day.

          1 Reply Last reply Reply Quote 1
          • B
            Brakusha @m_adam
            last edited by

            @m_adam said in Python Xpresso Node:

            Hi you should use ID_OPERATOR_COFFEE, this is mostly due to historical reason since previously the scripting language in Cinema 4D was COFFEE and it was then replaced with Python.

            Cheers,
            Maxime.

            ID_OPERATOR_COFFEE is not work.(((

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

              Hi @Brakusha, welcome in plugin cafe !

              c4d.ID_OPERATOR_COFFEE is working in all versions, please open a new topic with a code that demonstrate the issue and with a short explanation about what you want to achieve. I would also highly recommend you to read our Support Guideline to know how to get the best support from us.

              Cheers,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

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