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

    Disappearing cros section in sweep

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 448 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 23/02/2016 at 09:35, xxxxxxxx wrote:

      Hi guys!

      I'm working on an object plugin that has a sweep inside. Via a link field I specify the cross section spline, that should go inside sweep. When I convert the plugin object to editable something weird happens.
      When the linked Spline is above the plugin object in the objects panel the cross section disappears from the sweep. When it is below the plugin object everything works out as expected.

      Has anyone experienced something similar or has any idea why this happens?

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

        On 24/02/2016 at 02:02, xxxxxxxx wrote:

        Hello,

        I guess you are creating a generator and the "sweep inside" is a virtual sweep object created in your GetVirtualObjects() function?

        Can you post some code how exactly you access and use the cross section spline from your link?

        Best wishes,
        Sebastian

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

          On 29/02/2016 at 03:44, xxxxxxxx wrote:

          For testing purposes I boiled it down to this:

          def GetVirtualObjects(self, op, hh) :
                  sweep = c4d.BaseObject(c4d.Osweep)
                  spline = c4d.SplineObject(2, c4d.SPLINETYPE_BEZIER)
                  spline.SetPoint(0, c4d.Vector(0, 0, 0))
                  spline.SetPoint(1, c4d.Vector(1000, 0, 0))
                  crossection = op[c4d.T_LINK].GetClone()

          spline.InsertUnder(sweep)
                  crossection.InsertUnder(sweep)

          return sweep

          Still with the same effect.

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

            On 29/02/2016 at 09:20, xxxxxxxx wrote:

            Hello,

            there seem to be some issues with this specific use case. You could try to use the child objects of your generator as arguments (with the flag OBJECT_INPUT set). This would be more like the typical Cinema 4D workflow. Or you could try if the same happens with a Python Generator object and links defined as user data.

            Best wishes,
            Sebastian

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

              On 02/03/2016 at 03:50, xxxxxxxx wrote:

              Thanks for the suggestions. I was hoping to avoid having to use child objects, but I might try it.
              Thanks again.

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