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
    1. Maxon Developers Forum
    2. cmpxchg8b
    3. Topics
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by cmpxchg8b

    • C

      Saving pointers to BaseObjects for use between scene updates

      Cinema 4D SDK
      • c++ • • cmpxchg8b
      3
      0
      Votes
      3
      Posts
      504
      Views

      C

      Greetings!

      Thanks for the reply.

      I kinda goofed up- apparently my objects were being improperly deconstructed before I was trying to use them, which was causing the BaseLink to get deleted and crash on subsequent access. BaseLink does indeed work fine and solves my problem. Sorry for the confusion!

      -CMPX

    • C

      Getting the deform cache of another object under ModifyObject()

      Cinema 4D SDK
      • c++ • • cmpxchg8b
      2
      0
      Votes
      2
      Posts
      458
      Views

      r_giganteR

      Hi CMPX, thanks for reaching out is.

      With regard to your topic I recommend to have a look at how the Lattice Plane example on Github works.
      This is a simplified example showing how to deliver the mechanism of the Lattice Deformer on a plane and, at the same time, it put the bases to extend it with an arbitrary mesh.
      Definitively your mesh modifier should implement the ObjectData::ModifyObject() method to displace the mesh of the object to be deformed based on the displacement that you've set on the controlling mesh.
      If your controlling mesh(es) are then Cinema 4D generators, then you have to run through BaseObject::GetCache() or BaseObject::GetDeformCache() in order to retrieve the points of the controlling object, and based on their relative position in the space deliver the modification on the target object.

      Best, Riccardo

    • C

      iCustomDataType and GraphView- who owns the set pointer?

      Cinema 4D SDK
      • c++ • • cmpxchg8b
      3
      0
      Votes
      3
      Posts
      724
      Views

      C

      Awesome, that's exactly what I needed to know- thanks for the reply!

      -CMPX

    • C

      iCustomGui with multiple input fields and TriState

      Cinema 4D SDK
      • c++ sdk • • cmpxchg8b
      5
      0
      Votes
      5
      Posts
      1.2k
      Views

      C

      Right, that's kinda what I thought. I guess showing "<< MULTIPLE VALUES >>" for all four values will have to do (it's not that big of a deal, it just kinda looks ugly on the UI).

      Anyways, thanks for your help!
      -CMPX

    • C

      How can I create a custom Xpresso data type?

      Cinema 4D SDK
      • c++ • • cmpxchg8b
      5
      0
      Votes
      5
      Posts
      1.1k
      Views

      C

      Sorry about that, I'd noticed that the API was literally wired up to return the value from GetId() inside GetValueId() by default, so I figured that was answer enough... though I suppose that's kinda why I was asking in the first place- I wasn't sure what sort of situation would require two separate IDs.

      Thanks for your response though, that certainly clears up why there's two different functions to handle that.

      -CMPX

    • C

      Plugin ID label renaming

      General Talk
      • • • cmpxchg8b
      2
      0
      Votes
      2
      Posts
      998
      Views

      r_giganteR

      Hi CMPX,

      thanks very much for the comment. It's definitively something helpful we'd consider to add in the future.

      Best, Riccardo

    • C

      How do priorities work when all objects/tags have the same priority?

      Cinema 4D SDK
      • • • cmpxchg8b
      2
      0
      Votes
      2
      Posts
      850
      Views

      M

      Hi @cmpxchh8b,
      No worries at all since it's one of your first posts, but please make sure to read and apply the rules defined on the following topics:

      How to Post Questions. (Add proper tags in your case) Q&A Functionality.

      Regarding your question, if an object gets the same priority it's from top to bottom. Then you can find valuable information about priority in the c4d help

      With the given example you mentioned in the post here is the execution order after some internal test. (First one is executed before the last one)

      Skin.1 (Called to some kind of prepass) Skin.2 Called to some kind of prepass) Polygon.1 Skin.1 Circle (ObjectData which return a Spline, Called to some kind of prepass) Circle (ObjectData which return a Spline, Called to return the cache) Null.1 Null.2 Null.3 Polygon.2 Skin.2 XPresso.1 XPresso.2 XPresso.3

      Note that any ObjectData can be executed multiple time since you can call AddToExecution which allow you to add the current node at any time within the execution pipline. This is basically used to do some kind of prepass and postpass.

      Hope it's answers to your question.
      Cheers,
      Maxime.

    • C

      Aligning a ray origin and direction towards a target by rotating a parent matrix

      General Talk
      • • • cmpxchg8b
      3
      0
      Votes
      3
      Posts
      1.3k
      Views

      eZioPanE

      Hi @cmpxchg8b and @a_block ,
      I don't know much about matrix, but here is what I found.
      If the point with arrow should rotate to aim, then all the possible position of the point must lay on the sphere surface which sphere's center is the parent object.
      And one point and a vector can form a line in space.
      So the question becomes a line-sphere intersection problem.
      After solving the equations, we can get 2 points: original point and transformed point(s).
      After that, we can find the transform matrix between 2 points.