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

    adressing a TP Node's Objectfield

    Scheduled Pinned Locked Moved SDK Help
    11 Posts 0 Posters 692 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 01/06/2011 at 17:25, xxxxxxxx wrote:

      i think what i'm trying to do here is get at the xpresso tag first,
      then give an instruction to the node, right ?

      i think i can get at the tag using :
      var s = doc->FindObject("nullwithjustanexpressotag"); 
      var tag = s->GetFirstTag();

      in my twisted logic i should then be able to simply
      tag#GRAV_OBJECT = nullObj;

      but that's a no go of course.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 01/06/2011 at 20:52, xxxxxxxx wrote:

        I could be mistaken.
        But I don't think Coffee can access xpresso nodes.

        -ScottA

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 02/06/2011 at 06:56, xxxxxxxx wrote:

          mmmm.. is that so ? that's frustrating. I expected a simple series of actions like this ( creating and naming a null, then adding it to the object field of a specific xpresso node. ), to be a pretty reachable goal for a first exploration.

          i came across TTag Types (Texpresso). doesn't that allow for interaction with an xpresso tag ?

          maybe i'd learn more if i rephrase it :
          if you had to do something like this, how would you approach it ?

          i'm trying to learn from being result oriented here.
          if the task can't be done with one approach; rather then get stuck, I'm looking for alternatives to get at least some functionality. I guess I'm saying I'm also open for python suggestions.

          anybody willing to enlighten me ?
          (or am i asking for too much here ?)

          cheers,
          douwe

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 02/06/2011 at 07:05, xxxxxxxx wrote:

            You can't dive into the XPresso tag with COFFEE, you can just allocate and insert one.

            But it is possible via Python.
            Take a look into the Py4D documentation under c4d.modules.graphview, which represents the XPresso "module".

            Cheers,
            Niklas

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 02/06/2011 at 09:20, xxxxxxxx wrote:

              ok, i see.
              that's clear.

              let's see what i can dig up.
              thx,
              d

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 02/06/2011 at 23:55, xxxxxxxx wrote:

                Here's an example code by Scott Ayers.

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 03/06/2011 at 04:39, xxxxxxxx wrote:

                  Originally posted by xxxxxxxx

                  Here's an example code by Scott Ayers.

                  yes, sir.
                  was looking at ( and being intimidated by ) that example yesterday.
                  need to take some time to experiment.

                  also, i think to populate a node's object field i may bump into needing GetOperatorContainer() & SetOperatorContainer() just like scott mentions.

                  i'll get back to this later when i finally get there.
                  interesting challenge.

                  d

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 03/06/2011 at 16:00, xxxxxxxx wrote:

                    just to make sure :
                    Is it correct that Coffee (still) doesn't allow to write user data ?

                    that would allow me to do something like :
                      var s = doc->FindObject("User Data");
                      nullObj = new(NullObject);   
                      nullObj->SetName("TPGravityNull");  
                      doc->InsertObject( nullObj, NULL, NULL )
                      s#ID_USERDATA:2 = nullObj;

                    doesn't seem to work though.
                    d

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 03/06/2011 at 17:13, xxxxxxxx wrote:

                      I don't think you can create new UserData entries with Coffee.
                      But you can definitely use it to put object's into a UserData link field:

                      var UDobject= doc->FindObject("Cube");//The object that has a Link type UserData on it  
                      var n = AllocObject(Onull); //Create a null in memory only  
                      n->SetName("TPGravityNull"); //Change it's name   
                      doc->InsertObject(n, NULL,NULL);//Grab it from memory and put it in the OM  
                      UDobject#ID_USERDATA:1 = n; //Put the Null in the first UD link field that's on the Cube
                      

                      -ScottA

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

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 03/06/2011 at 18:46, xxxxxxxx wrote:

                        yes sir,
                        that does work, and can be fit in nicely.
                        good lesson learned.

                        thx,
                        d

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