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

    Determine if Spline is used by a NURB?

    Scheduled Pinned Locked Moved SDK Help
    9 Posts 0 Posters 748 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 21/10/2009 at 07:00, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.0 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      is it possible to determine if a Spline-input is used by a NURB?
      GetBit(BIT_CONTROLOBJECT) works for polygonobjects but splines always return TRUE, so i can't find out if it is really used by the NURB.

      THANKS for help

      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 22/10/2009 at 03:18, xxxxxxxx wrote:

        Maybe there's no other solution than to iterate through all objects in the scene and check for each object ob the spline is used.

        Cheers,
        Jack

        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 22/10/2009 at 10:48, xxxxxxxx wrote:

          maybe using for example something like this:
          if (splineObject->(GetUp()->GetType()==Oextrude)
          {
          //do something
          }

          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 22/10/2009 at 12:37, xxxxxxxx wrote:

            I would be careful using double indirection though. If GetUp() returns NULL (perfectly valid), instant crash. Also note that instead of checking for every conceivable generator type object (and you'll miss plugin ones), you can get the more general flag, OBJECT_GENERATOR.

            BaseObject* parent = splineObject->GetUp();
            if (parent && (parent->GetInfo()&OBJECT;_GENERATOR))
            {
            // do something
            }

            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 22/10/2009 at 13:08, xxxxxxxx wrote:

              Howdy,

              Since a NURBS object uses the splines as input objects, you can also test for
              parent->GetInfo()&OBJECT;_INPUT to help narrow it down. ;o)

              Adios,
              Cactus Dan

              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 22/10/2009 at 15:10, xxxxxxxx wrote:

                Right. You can check as:

                if (parent && (parent->GetInfo()&(OBJECT_GENERATOR|OBJECT_INPUT)))

                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 23/10/2009 at 05:27, xxxxxxxx wrote:

                  thanks for the fast replies. but this does not solve my problem. i was too imprecise. I need to find out, which of the splines are really used. For example when I have a hypernurbs object with two polyobjects as Input, only the first one has the bit CONTROL_OBJECT set, so I can take the second one out of the NURB because it has no function there. but if I have a sweepnurbs instead with 3 input splines I can't find a difference in the third one to take it out because the CONTROL_OBJECT bit is set in all of them. this should be part of a sorting process. i think it's not possible or maybe do you have more ideas?

                  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 23/10/2009 at 06:18, xxxxxxxx wrote:

                    That's true of a Sweep NURBS because all three splines are used, the third being the rail. Both the first and second are always used (assuming they're not disabled). However, the rail is ignored if both Use rail direction and Use rail scale are turned off in the NURBS. If you look at these values, and both are off, the rail is not being used. Is that what you meant?

                    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 23/10/2009 at 07:25, xxxxxxxx wrote:

                      you are right. but that was not really the problem. its the same with 4 or more splines inside the sweep nurbs object. hmm .. 🙂

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