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

    Why do Splines not have a DeformCache?

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 232 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 28/09/2008 at 17:20, xxxxxxxx wrote:

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

      ---------
      Hi,

      I am trying to get the points of a deformed spline here, so my plugin object can work with a deformed spline.

      Everything would be so easy, if op->GetDeformCache() would not always return 0x00000000 when "op" is a SplineObject.

      Now I have to use CurrentStateToObject and clone the spline including hierarchy (because if I use COPY_NO_HIERARCHY, the deformers are of course gone). The problem is: When the user puts my plugin object as a child object of the Spline, Cinema crashes. I guess, it's recursion. Sounds logical.

      So my question is:
      How can I get the deformed points of a spline without cloning the spline's hierarchy?
      or
      How can I prevent either that the user puts my plugin object as a child under the spline,
      or
      how can I recognize if the spline is a parent of my plugin object?

      There has to be a solution. But which?

      Thanks for any help!!

      Greetings,
      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 29/09/2008 at 01:08, xxxxxxxx wrote:

        Quote: How can I get the deformed points of a spline without cloning the spline's hierarchy?
        >
        > * * *
        >
        > * * *

        You can't at least not in GetVirtualObjects(). You have to use CurrentStateToObject with a temporary document.

        > Quote: How can I pr event either that the user puts my plugin object as a child under the spline
        >
        > * * *
        >
        > * * *

        You can't.

        > Quote: how can I recognize if the spline is a parent of my plugin object?
        >
        > * * *
        >
        > * * *

        I would say check in GetVirtualObjects() if the spline (I guess you got it from a link field) is the same as the parent of your object. I think pointer comparing should be enough.

        cheers,
        Matthias

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