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

    Spline is not updated after i move point using Pyt

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 220 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 28/01/2013 at 18:29, xxxxxxxx wrote:


      I am using Python to move a spline's point. But the spline itself is not updated in the C4D viewport, the point moves alone, together with its tangent(s). Only after I grab the handles and manually move the point a little, the whole spline is updated. What code can I write to have the spline immediately follow the node's movements?
       
      def Execute(self, tag, doc, op, bt, priority, flags) :
            spline = tag.GetObject()
            oldPos = spline.GetPoint(0)
            newPos = c4d.Vector(oldPos.x + 10, oldPos.y + 10, oldPos.z)
            spline.SetPoint(0, newPos);

      -Ingvar

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

        On 29/01/2013 at 00:23, xxxxxxxx wrote:

        Ok, found out about it myself. It is in the SDK doc, under PointObject.
        One needs to call obj.Message ( c4d.MSG_UPDATE )
         
        -Ingvar

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