Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Adding points to a spline

    Cinema 4D SDK
    python
    2
    3
    692
    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.
    • KantroninK
      Kantronin
      last edited by Manuel

      Hi,
      I would like to add points to a spline, spreading them evenly, without changing the shape of this spline.
      I can do a python script, but is there a simple way to make this change ?

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hello,

        The easiest way is to use a modeling command data. Something like this

            bc=c4d.BaseContainer()
            bc.SetInt32(c4d.MDATA_SUBDIVIDE_SPLINESUB,5)
            result=c4d.utils.SendModelingCommand(c4d.MCOMMAND_SUBDIVIDE, [op], mode=c4d.MODELINGCOMMANDMODE_POINTSELECTION, bc=bc, doc=doc, flags =c4d.MODELINGCOMMANDFLAGS_CREATEUNDO)
            c4d.EventAdd()
        

        You will find some code on this topic on how to use that kind of command based on the length of the spline.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          hello,
          without information from your part, i'll consider this thread as solved and change its states

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

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