• Handling Treeview File Drag and Drop Events

    Cinema 4D SDK python c++ 2023
    3
    1 Votes
    3 Posts
    963 Views
    ferdinandF
    Hey @Dunhou, yeah, I already saw and fixed that in the course of answering this. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    1k Views
    HerzogVonWieselH
    Thank you again @ferdinand ! Sad that resizing windows is not a possibility. Would've been nice to have the options pop up once you toggle the extra options on! Now I've implemented them as a modal dialogue so you can choose them and close it again. Thank you for your help!
  • Python plugin encryption

    Cinema 4D SDK python 2023 sdk
    3
    0 Votes
    3 Posts
    889 Views
    F
    Thank you very much!
  • Free plugin : HDR Link for Poly Haven

    General Talk
    1
    1
    1 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    ThomasBT
    @ferdinand Many thanks for this detailed example, I'll try it out P.S. Oh my gosh, it's working perfectly. I decided to go the easiest way, just to check the dirtyness of the linked object. linkDirty: bool = link.IsDirty(c4d.DIRTYFLAGS_DATA) Many many thanks Thomas
  • Free plugins all in one : Boghma HUB

    General Talk
    4
    2
    4 Votes
    4 Posts
    2k Views
    S
    Thank you so much. I wand trouble shooting this for a week with Paid ChatGtp (stupidGpt) it couldn’t get it right. It works !!! Thank you.
  • 0 Votes
    9 Posts
    1k Views
    chuanzhenC
    @ferdinand The code works very well
  • hud depth buffer?

    Cinema 4D SDK r19 2023 python
    6
    1
    0 Votes
    6 Posts
    2k Views
    ymoonY
    Added one more for... zip to remove the invisible points.
  • Plugin Tag printing randomly to the console

    Moved Bugs python
    4
    1
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hey @aghiad322, Great to hear that you solved your problem. And although I understand how you meant your last sentence, the questions of users are never inconvenient to us. All questions are welcome, but sometimes we must draw some boundaries for the scope of support. Cheers, Ferdinand
  • DescID() python doc issue

    Cinema 4D SDK python 2023
    3
    2
    0 Votes
    3 Posts
    445 Views
    chuanzhenC
    @i_mazlov Thanks
  • Get All Description of Object

    Cinema 4D SDK 2023 python
    3
    1
    0 Votes
    3 Posts
    618 Views
    chuanzhenC
    @ferdinand Thanks
  • 0 Votes
    3 Posts
    1k Views
    S
    @ferdinand Thanks a lot. Very useful information. You are the best!
  • 0 Votes
    3 Posts
    969 Views
    E
    @i_mazlov Thank you very much for your help!
  • Problems with Reused Asset Resources in MGS_GETALLASSETS

    Moved Bugs python
    3
    0 Votes
    3 Posts
    1k Views
    P
    Hi @ferdinand , thanks a ton for the very extensive reply. I do understand where you are coming from decision/code wise and that it might indeed be intended behavior, but I also appreciate you flagging this behavior to be looked at! I will look into the code you provided and see what I can make of it to work for our specific case. As with all the examples i receive on here it is also about learning itself, to become better. I already found out that I can run my piece of code 2 times to catch the first set of instances, perhaps it is also possible to run that on a loop until the len() doesn't increase anymore It's a hack-job but it might be a good last resort. To address the first comment about the post itself, my reasoning was that since it was about GetAllAssetsNew which we talked about last, I added it to my post to keep it all together. But I can see how it deviated too much from the original question that started the topic, my apologies. Cheers,
  • Object Opacity Animation by Python Tag

    Cinema 4D SDK 2023 python
    5
    0 Votes
    5 Posts
    1k Views
    ymoonY
    @ferdinand Thank You for Reply
  • 0 Votes
    3 Posts
    943 Views
    J
    Thank you Ilia, Let me digest your extremely kind advice and example, learn from it, and come back tom you. Kind regards, James.
  • 0 Votes
    3 Posts
    912 Views
    S
    @i_mazlov got it! thx for answer!
  • using python Layerset - Generate Alpha option?

    Cinema 4D SDK python sdk
    5
    2
    0 Votes
    5 Posts
    988 Views
    P
    @ferdinand Thanks for the advice. i'm going to try Have a nice day today
  • 0 Votes
    4 Posts
    996 Views
    i_mazlovI
    Hi @ymoon, Thanks for reaching out to us. Glad your problem is solved! Here are some pointers to the docs with related toolset: c4d.Vector, c4d.Matrix, c4d.utils. Please note, there's Matrix Manual, although math questions are generally out of scope of the support on this forum. Cheers, Ilia
  • MessageDialog in NodeData plugin

    Cinema 4D SDK python r23 r20 2023
    2
    0 Votes
    2 Posts
    844 Views
    ferdinandF
    Hey @mikeudin, Thank you for reaching out to us. In short, there is no good answer to your question. There is no guarantee that anything will ever run on the main thread. You must always check yourself with c4d.threading.GeIsMainThread. Scene computations, e.g., ObjectData.GetContour is run in parallel off-main-thread and is therefore subject to access restriction to avoid access violations, i.e., crashes. There is no "hack" for this. The essence is that you cannot have both the benefits of sequentialism (can use shared resources) and parallelism (is fast). There are of course data structures which allow you to handle a singular resource from multiple threads, but doing this always entails lining up multiple users in a line, each waiting for users ahead in the line to be done, i.e., hidden sequentialism. In Python this might be hard to grasp because Python itself mostly ignores the concept of parallelism and we only experience here the side effects of the parallelism of the underlying C++ Cinema 4D API. There is also the problem that your request does not make too much sense for me on a practical level. Imagine having a plugin MySpline which opens an error dialog once its GetContour method strays from the right path. A user now edits one hundred instances of MySpline at once and triggers the error. Cinema 4D sometimes executes passes two or three times in a row to resolve dependency problems. This would then mean that you would open three hundred error dialogs for one user interaction (if that would be technically possible in the first place). In general, no node should open any form of dialogs on its own. Opening a dialog after a button press in the description of a node via NodeData.Message is okay. When you are hell-bent on doing this, you could do this: Add a field to your plugin, e.g., self._error: str = "". When you are in your GetContour and an error happens, instead of raising it, simply write it to _error. Implement any NodeData method which often runs on the main thread. NodeData.Message is a good candidate. On each execution of it, check if _error has content and if you are on the main thread. If so, display the message and then null _error. You will still need some kind of throttling so that the user is not spammed with the same error over and over again. I.e., you need an "only-new-errors" mechanism. It is up to you to implement that. An alternative approach could go via core messages. But that is also non-ideal because setting off a c4d.SpecialEventAdd will work from a non main thread but will cause the global core message lock to engage, which is of course a bad thing to happen and exactly the "no-hack" problem I described under (4). You could also try using c4d.StatusSetText and the other status functions. While not officially supported, they will work from non-main-thread environments. But there is no guarantee and we do not officially support this. Cheers, Ferdinand