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

    snapping support?

    Scheduled Pinned Locked Moved PYTHON Development
    16 Posts 0 Posters 1.6k 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 05/07/2011 at 08:05, xxxxxxxx wrote:

      It's used to find the nearest snapping point for an arbitrary point. It's used in plugin tools for instance to support snapping.

      The sum of the passed point and the returned delta is the snapping point.

      cheers,
      Matthias

      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 05/07/2011 at 09:55, xxxxxxxx wrote:

        Yes. Does this class exist in python, too?

        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 06/07/2011 at 00:30, xxxxxxxx wrote:

          Doesn't seem to.
          So this is used when I'm holding shift and moving an object ?
          If yes, try this:

          def snap(origin, point, grid) :  
            def singlesnap( (o, p, d) ) :  
                p = p - o  
                p_d = p % d  
                if p_d < d / 2.:  
                    return p - p_d + o  
                else:  
                    return p - p_d + o + d  
            
            return map(singlesnap, zip(origin, point, grid))
          

          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 06/07/2011 at 01:33, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            So this is used when I'm holding shift and moving an object ?

            No, it's used to snap points to the world grid for instance, or basically to what you set in Cinema's snapping options.

            cheers,
            Matthias

            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 06/07/2011 at 03:48, xxxxxxxx wrote:

              |   o |                     |     |  
              -------      snaps   to  ?  ----- o  
              |     |                     |     |
              

              Right ? This is what the function above does. (see here)
              Cheers,

              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 06/07/2011 at 05:18, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                |   o |                     |     |  
                -------      snaps   to  ?  ----- o  
                |     |                     |     |
                

                Right ? This is what the function above does. (see here)
                Cheers,

                Not quite, the function uses Cinema's snapping system. So it knows which snapping point is closest to the point you want snapping applied to. Have you worked with snapping in Cinema itself?

                I'm talking about this stuff:

                cheers,
                Matthias

                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 07/07/2011 at 23:40, xxxxxxxx wrote:

                  I take it as a "no it's not in there" :[

                  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 08/07/2011 at 02:03, xxxxxxxx wrote:

                    Sorry for the delay. Unfortunatly the snapping library is currently not avaible in Python.

                    cheers,
                    Matthias

                    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 08/07/2011 at 02:16, xxxxxxxx wrote:

                      Will the library be implemented in the future?

                      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 08/07/2011 at 02:41, xxxxxxxx wrote:

                        Originally posted by xxxxxxxx

                        Will the library be implemented in the future?

                        I am sorry but I can't make any statements about future development of CINEMA 4D.

                        cheers,
                        Matthias

                        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 08/07/2011 at 02:46, xxxxxxxx wrote:

                          Thank you.

                          You can't or your mustn't? 😉

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