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

    Topics created by justinleduc

    • justinleducJ

      Baking normal in Object space: Bake Material Tag V.S. BakeTexture()

      Cinema 4D SDK
      • windows c++ 2024 • • justinleduc
      4
      0
      Votes
      4
      Posts
      734
      Views

      i_mazlovI

      Hi @justinleduc ,

      Great to hear your issue was resolved! Special thanks on sharing your solution with the community!

      Regarding compiling issues you had:

      Error C2440: <function-style-cast>: cannot convert from AutoAlloc<ColorProfile> to GeData

      The AutoAlloc wrapper is just a convenient wrapper for a raw pointer. Hence, to fix your issue you just had to dereference the pointer:

      CheckState(colorProfile); settings.SetData(BAKE_TEX_COLORPROFILE, GeData(*colorProfile));

      Cheers,
      Ilia

    • justinleducJ

      Programmatically drawing a brush stroke

      Cinema 4D SDK
      • windows c++ 2024 • • justinleduc
      4
      0
      Votes
      4
      Posts
      783
      Views

      justinleducJ

      Thanks a lot for confirming my doubts, @i_mazlov.

      I'll find a compromise, but I can't help but express how great it would be if BodyPaint exposed such functionality.

      The Brush tool and its filters (such as "Smudge") can't be replicated with a simple bitmap texture, and gaining access to it (mind you, in the context where the Paint brush can be programmatically moved/dragged across the UV space) would open the door to so many creative and useful applications.

      Of course, I'm sure you are already aware of all of this. This is just me casting a single vote for a potential addition of the Brush tool to the SDK in the future.

      Thanks for everything! 👏

    • justinleducJ

      Clone orientation without a "Up Vector"

      Cinema 4D SDK
      • windows c++ 2024 • • justinleduc
      8
      0
      Votes
      8
      Posts
      2.5k
      Views

      justinleducJ

      @ferdinand Oh wow! Thank you so much for letting me know about Keenan Crane, as I was not familiar with him. I am in awe of the exhaustive list of tools he and his lab have published.

      The Globally Optimal Direction Fields paper seems indeed to be exactly what I am looking for. I was also surprised to see that I had already skimmed the Youtube video of the paper back in December.

      Thank you so much @ferdinand for this invaluable piece of information. Time to dive in!

      Cheers!

    • justinleducJ

      SetMousePointer() will not "stick" in GeDialog

      Cinema 4D SDK
      • c++ 2024 • • justinleduc
      2
      0
      Votes
      2
      Posts
      491
      Views

      i_mazlovI

      Hello @justinleduc,

      Sorry for the delayed answer.

      You have a point that the discussion on some abstract questions doesn't require any code. However, you have a very specific question, namely you're struggling from your cursor constantly flickering between cursor states. This is your exact code that produces this undesirable result, so this is not an abstract question.

      According to my observations there's no issues with flickering cursor in GeUserArea in C4D 2024.2. You can find some good examples in our C++ repository. for example you can start with C++ SDK - Example Dialog. Please also make sure you familiarized yourself with the following manual pages:

      GUI and Interaction Messages Manual GeDialog Manual GeUserArea Manual

      Especially the GeUserArea::Message() would be something of your interest.

      If you're still observing the issue please provide a minimal code snippet that gives context to our discussion.

      Cheers,
      Ilia

    • justinleducJ

      Spline to UV map... is this even possible?

      Cinema 4D SDK
      • python 2024 windows • • justinleduc
      3
      0
      Votes
      3
      Posts
      856
      Views

      justinleducJ

      Hey @m_adam,

      I never thanked you for your very helpful and thorough reply, so allow me to do so now: thank you very much! Your reply ended up being extremely useful, as it guided me in implementing the KD-Tree within my Python script, as well as helping me convert the Barycentric coordinates to UV coordinates. So, for that, once again; thank you!

      Now that this is implemented, I am faced with a challenge: it appears that the precision of the drawing of the Spline greatly depends on the subdivision/triangulation level of my geometry (for example, the Sphere in my parent message). In other words, if the geometry whose UV map I am drawing the shape of my Spline onto is very low-poly, the drawing of said Spline will be incredibly imprecise. It seems like the precision increases as I increase the amount of polygons on the geometry.

      Just curiously, without necessarily pasting my code here, I was wondering if - at the top of your head - this behavior was to be expected? Does this mean that, with the KD-Tree and Barycentric conversion method, I would never be able to programmatically draw a perfectly round circle Spline on a Plane object that, despite having a perfect UV map, only has 2 polygons?

      I can work around those constraints, but it'd be great to know if the current imprecision of my drawing approach isn't caused by something else.

      Thanks!

    • justinleducJ

      Accessing vector field data of Volume Builder or Volume object

      Cinema 4D SDK
      • 2024 python • • justinleduc
      8
      0
      Votes
      8
      Posts
      2.8k
      Views

      M

      Hi correct I made a typo in the string representation of a Vec3, this is going to be fixed in an upcoming release.

      Cheers,
      Maxime.

    • justinleducJ

      "Vector Curl" on Volume Builder?

      Cinema 4D SDK
      • python 2024 • • justinleduc
      3
      0
      Votes
      3
      Posts
      562
      Views

      justinleducJ

      Hey @i_mazlov, thank you so much for your incredibly helpful and thorough reply. This is exactly what I was looking for.

      Thanks again! I really appreciate it!

    • justinleducJ

      Import NumPy?

      Cinema 4D SDK
      • python 2024 • • justinleduc
      4
      0
      Votes
      4
      Posts
      856
      Views

      G

      Hi, I'm also trying to install numpy, but after registering c4dpy I'm getting a syntax error after running "c4dpy -m ensurepip" command.

      c4dpy -m ensurepip
      (null) File "<stdin>", line 1
      c4dpy -m ensurepip
      ^^^^^^^^^
      (null)SyntaxError: invalid syntax