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

    Access tag and object from python node

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 418 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 24/03/2014 at 11:03, xxxxxxxx wrote:

      I don't work with the python node much but I assume theres a way to access the object the xpresso tag is on from the python node within it?

      Thanks

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

        On 24/03/2014 at 12:18, xxxxxxxx wrote:

        You can just add an object node and link that to the python tag. If you want it to be dynamic as in you will be moving the tag from object to object node it should pick up the object it is added to.

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

          On 24/03/2014 at 14:03, xxxxxxxx wrote:

          Thanks that does work. Was hoping to do it by python though:/ Thanks

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

            On 24/03/2014 at 14:47, xxxxxxxx wrote:

            Inside a python node 'op' stands for the python node itself.

            So you can use...

            op.GetNodeMaster().GetOwner().GetObject()
            

            ... to get the object the expresso tag is on.

            Peter

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

              On 24/03/2014 at 20:06, xxxxxxxx wrote:

              Ah that's what I was looking for. I didn't know about the GetOwner command on python nodes.
              Thanks Peter!

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