• 0 Votes
    2 Posts
    451 Views
    ferdinandF
    Hello @konradsawicki, Thank you for reaching out to us. Cappucino Realtime is a tool to record mouse inputs; your plugin or things like the Vibrate tag do not count as mouse inputs and are therefore not recorded. When you want to bake the output of whatever your plugin is, you will have to implement that yourself. Cheers, Ferdinand
  • Cursor in gui element Show different text info

    python 2023
    9
    1
    0 Votes
    9 Posts
    1k Views
    chuanzhenC
    @ferdinand The code works very well
  • Drag & Drop Undo

    r20 sdk c++
    5
    0 Votes
    5 Posts
    1k Views
    J
    Thanks for the response. I figured that something like this would be the case, will have to look into the options you mentioned. John Terenece
  • 0 Votes
    3 Posts
    673 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.
  • Get All Description of Object

    2023 python
    3
    1
    0 Votes
    3 Posts
    554 Views
    chuanzhenC
    @ferdinand Thanks
  • 0 Votes
    3 Posts
    728 Views
    S
    @ferdinand Thanks a lot. Very useful information. You are the best!
  • 0 Votes
    3 Posts
    663 Views
    S
    @i_mazlov got it! thx for answer!
  • Object Opacity Animation by Python Tag

    2023 python
    5
    0 Votes
    5 Posts
    957 Views
    ymoonY
    @ferdinand Thank You for Reply
  • ShaderData: SUPER::GetDDescription() always returns false

    2023 c++
    4
    0 Votes
    4 Posts
    655 Views
    ferdinandF
    Hey @fwilleke80, you are right, it does indicate an error, hence my example from above. When I searched in our internal code base for similar code, I found a lot of return NodeData::GetDDescription(node, description, flags); calls. While there are certainly node types which customize their description handling, this seems to be more a precaution for the case when we decide that we want to implement something in NodeData::GetDDescription in the future. Or something has been there in the past and we optimized it away. In any case, one should not take my comment about calling the base implementation being pointless too seriously. It is best to leave the call in, although it currently has no practical effect and probably will never have. Cheers, Ferdinand
  • using python Layerset - Generate Alpha option?

    python sdk
    5
    2
    0 Votes
    5 Posts
    819 Views
    P
    @ferdinand Thanks for the advice. i'm going to try Have a nice day today
  • 0 Votes
    4 Posts
    729 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

    python r23 r20 2023
    2
    0 Votes
    2 Posts
    636 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
  • How to use external libraries inside of a plugin

    python
    4
    0 Votes
    4 Posts
    811 Views
    G
    Thankyou! Noted!
  • Use the tab name and open the that window?

    python
    3
    1
    0 Votes
    3 Posts
    843 Views
    ymoonY
    @ferdinand There is no command to invoke the viewport window, so I was looking for an alternative. I will tagging the version in the next post. (R2023) Thank You.
  • Using recent VS to make older builds

    5
    0 Votes
    5 Posts
    804 Views
    WickedPW
    Thanks Maxime. And apologies for the delay - I didn't see the response. WP.
  • Python-Generated Splines are not recognized by Cloner Object

    python 2023
    3
    0 Votes
    3 Posts
    609 Views
    K
    hi @i_mazlov , I understand that it is not supported, so I will use Scene Nodes to generate the spline this time. No other questions, thank you very much.
  • Python Xpresso node detect Userdata button press message

    r20 python project tool
    5
    0 Votes
    5 Posts
    1k Views
    D
    @ferdinand Thanks for your comprehensive explanation. I really appreciate that. Cheers
  • Why are my port definitions duplicated in the Attribute Manager?

    Moved c++ 2023
    7
    4
    0 Votes
    7 Posts
    1k Views
    S
    Hi @ferdinand, No problem, I got there in the end and it's actually not too tricky once you know how it's supposed to work. I'll have a go now at a material node, there are more examples of those so hopefully it'll be straightforward. I'll be sure to be back if it isn't! In the meantime I've uploaded a detailed explanation of all the steps needed to build this kind of node to my site at https://www.microbion.co.uk/html/create_nodes_corenode1.htm so if anyone wants to see how it was done, it's all there. Hopefully it's fairly accurate; all I can say is that this is what I did and it worked for me Thanks again for your help, Cheers, Steve
  • 0 Votes
    4 Posts
    1k Views
    T
    Hi @ferdinand, your links really helped me a lot, and I managed to write a script that starts a render and sends the rendered image to a web service. Can the SDK grab the live preview image from the redshift IPR? I assume not looking at the documentation: https://developers.maxon.net/docs/py/2023_2/search.html?q=redshift&check_keywords=yes&area=default
  • DrawView update ISSUE

    python
    7
    0 Votes
    7 Posts
    1k Views
    i_mazlovI
    Hi @mdk7b2, Glad to hear and thank you for sharing your solution! Good luck and let me know if you have any further questions. Cheers, Ilia