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. Havremunken
    3. Topics
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 8
    • Posts 46
    • Best 6
    • Controversial 0
    • Groups 0

    Topics created by Havremunken

    • H

      How to get FONT information and use it to create text objects in C++?

      Cinema 4D SDK
      • c++ • • Havremunken
      10
      0
      Votes
      10
      Posts
      796
      Views

      H

      I can confirm that you were right (nothing unexpected there!) - this is the second time in a couple of weeks where casting has bit me in the behind. I guess I was too spoiled by C# and need to keep my head turned on in the future..

      For anyone from the future reading this: The problem with the code above was READING the value, not WRITING it back to the object. That part was ok. Either passing on for instance op as a parameter or using Get() (if you're on the right object) to get at it is the right move.

      Thanks again!

    • H

      How to store "cached" data in the document from the scenehook?

      Cinema 4D SDK
      • c++ • • Havremunken
      17
      0
      Votes
      17
      Posts
      1.7k
      Views

      H

      Hi Ferdinand,

      Yes, I remember reading about that, so the IDs for this container data is 5060 and 5061 (I work in IP telephony as my day job so this is surely no coincidence), but I even tried to move them to 50060 and 50061 and the freeze still happens.

      I will pack up the project shortly and email it in. 🙂

    • H

      Unexpected "refresh" behavior when manipulating linked object

      Cinema 4D SDK
      • 2024 c++ windows • • Havremunken
      10
      0
      Votes
      10
      Posts
      1.7k
      Views

      H

      @ferdinand After a lot of time forced to work on other projects, I have looked further into this, and sent you an email. I hope you don't see it until after the holiday season. 🙂

    • H

      Idiomatic way to populate text objects in Cinema 4D using the C++ SDK

      Cinema 4D SDK
      • c++ • • Havremunken
      5
      0
      Votes
      5
      Posts
      797
      Views

      H

      Hi Ferdinand - I understand that is is complex and not something that you can easily give an answer to that would be correct in every situation.

      For me the use case for this is 1:N, but when I read your first reply, it hit me that it could actually theoretically be useful with N:M too. At least 2:N, I doubt much more than that, but programming wise "two is many" - i.e. more than one, so programming for 2 and 1024 won't be much different, but if was only ever going to be 1 DP, that would make a difference.

      I am leaning towards CommandData like you indicate, but I will experiment a bit with the code to actually set the text content parameter. I also have some other calculations that need to calculate based on for instance the bounding box of the text object after the text has changed, and I want to do this without ending up in some sort of document destroying hell. Don't be surprised if more questions show up eventually if I run into race conditions after I paint myself into a corner. 😉

      Thanks again!

    • H

      Project management for C4D SDK projects

      General Talk
      • c++ 2024 macos windows • • Havremunken
      4
      3
      Votes
      4
      Posts
      1.1k
      Views

      H

      Thank you very much, Maxime! I'll check out the various points and open a dedicated thread if I have anything further to ask or say about these topics. 🙂

    • H

      How to properly load async data into C++ generator plugin?

      Cinema 4D SDK
      • c++ • • Havremunken
      15
      0
      Votes
      15
      Posts
      2.7k
      Views

      H

      Thanks again, Ferdinand! I have been conditioned by other programming to fear and loathe anything that blocks the UI thread. However, the files that will be downloaded by users of my plugin would typically be in the 250-1000 bytes range, as long as the network isn't extremely slow I guess it should not be a huge problem.

      I will do the blocking behavior for now, and then maybe start looking into Jobs or something if needed. 🙂

    • H

      Possible for Python generator object to get a message when a linked object changes in any way?

      Cinema 4D SDK
      • python 2024 • • Havremunken
      6
      0
      Votes
      6
      Posts
      1.5k
      Views

      H

      Hi Ferdinand,

      Yeah, I'll need to do dirty checking for sure. Not because I am shipping this to any customers (unless I can find a good licensing framework 😉 ), but because the nature of my plugin is to create quite a few objects; We could easily reach 100s or even 1000s of objects, depending on the situation.

      So I implemented primitive dirty checking from one of the links you provided, and this helps a LOT with the performance - as you're mentioning, just ignoring the cache and recreating everything every time GetVirtualObjects is called would effectively kill Cinema 4D. Especially when fiddling with parameters, as the algorithm to layout all the objects I am creating is quite intensive.

      So I'm using your code from this topic https://developers.maxon.net/forum/topic/14936/difficulties-to-dedect-the-right-message-data/2 to make sure I do proper dirty checking for my own generator and all linked objects before I decide to return the cache or generate all objects again. I'm not done yet, but early tests seem pretty promosing.

      Now if only there was a simple way to split the large python file into multiple files, then bundle them all together for one giant python file so I wouldn't have to mess with module paths. 1000 line code files get old real fast. 😄

      Thanks again!

    • H

      Python Generator creating Text object, then getting bounding box

      Cinema 4D SDK
      • python r25 windows • • Havremunken
      5
      0
      Votes
      5
      Posts
      1.4k
      Views

      H

      Many thanks for your help and thorough explanations, Ferdinand! Much appreciated!

      I'll go create a temp document and clones, and don't expect much more resistance from this particular issue. Thanks again, and have a happy holiday season! 🙂