• Modifier dependencies

    Cinema 4D SDK c++ r19 r20 r21 s22
    6
    0 Votes
    6 Posts
    947 Views
    rsodreR
    Hi @m_magalhaes This was research for a feature I'll start implementing soon, and possible refactor. I'll mark as solved and if there's anything else I need I'll open it again. Thanks.
  • CommandData trigger from GeDialog

    Cinema 4D SDK c++ r19 r20 r21
    6
    0 Votes
    6 Posts
    643 Views
    C4DSC
    Nevermind. Trying to explain will probably lead us too far. I was only wondering if messaging was possible between a CommandData and its GeDialog.
  • Cross platform screencapture code

    General Talk
    5
    0 Votes
    5 Posts
    793 Views
    M
    Hi @C4DS, just to confirm that there is nothing built-in Cinema 4D. For python most of the library in the end only reroutes through OS call and does have a system dependant call, so you will probably end with something like that also in C++. Cheers, Maxime.
  • 0 Votes
    3 Posts
    419 Views
    C4DSC
    @m_magalhaes said in GeUserArea - RemoveLastCursorInfo not compatible with ActivateFading: ActivateFading is also using RemoveLastCursorInfo internally. I more or less assumed this was the case. As such I went with an alternative solution using RemoveLastCursorInfo to be able to detect the mouse leaving the GeUserArea, while providing an own implementation for fading in and out. Thanks for confirming.
  • GeUserArea ActivateFading and AdjustColor

    Cinema 4D SDK c++ r19 r20 r21
    6
    0 Votes
    6 Posts
    673 Views
    C4DSC
    @PluginStudent Yup ... it's official, I need glasses on top of my glasses. Thanks for pointing it out.
  • Howto map polygon numbers before - after split

    Cinema 4D SDK r19 r20 r21 c++
    9
    0 Votes
    9 Posts
    1k Views
    C4DSC
    @m_magalhaes Thanks for the example. I am sure this will be helpful in future, however for now I am still stuck with the classic API to remain backwards compatible. While there isn't a readily available solution to the problem, a few options have been mentioned how to handle this. As such I will set the topic as solved.
  • get initial position in python tag

    Cinema 4D SDK r19 r20 r21 classic api python
    5
    1
    0 Votes
    5 Posts
    918 Views
    ManuelM
    hi, without further feedback i'll set this thread as solved tomorrow. Cheer, Manuel
  • Update button

    Cinema 4D SDK python r20 r19 r21
    4
    1
    0 Votes
    4 Posts
    1k Views
    pyxelriggerP
    Thanks! seems to work well! the problem is that apparently it only runs on the tag, if I set the option as a UserData of my object, it doesn't work
  • 0 Votes
    15 Posts
    1k Views
    M
    Looking at the doc in R19: [image: 1586334998271-5fdf5fb0-1327-4589-b6b6-d68af8869c11-image.png] [image: 1586334983049-821d97fa-e103-4cca-84b1-85f0f50304f0-image.png] So I'm afraid there is no simple solution that will work on each version maxon::String being introduced in R20, you will need to adapt your code. Cheers, Maxime.
  • 0 Votes
    4 Posts
    474 Views
    M
    Hi Pim sorry for the late reply, this is possible by using the lib_py.h (typically this is somehow what we used before R20 to expose feature in python, but it's way elder, not everything is possible to do, you have less control than with the new python.framework, and the lib_py.h is not maintained (so don't expect any enhancement in it) Only the python.framework will be enhanced. // Init Python GePython pythonScope; pythonScope.Init(); // Acquiere the GIL GePythonGIL gil_state; pythonScope.SetNode("doc", doc); // If doc->GetFirstObject() is nullptr, op variable will not be declared in the python scope, and you cant add a None. pythonScope.SetNode("op", doc->GetFirstObject()); maxon::String pythonCode = "\ import c4d\n\ \n\ def main():\n\ print(doc, op)\n\ \n\ if __name__ == '__main__' :\n\ main()\n\ "_s; StopAllThreads(); pythonScope.Run(pythonCode); Cheers, Maxime.
  • 0 Votes
    9 Posts
    1k Views
    A
    @m_magalhaes Hi Manuel, Thank you for giving me some time to check this out. So after a bit of testing and changing the code to work with Cinema I cannot replicate the issue. As you mention it seems to be related to Pyblish. I did find interesting that when running the code in Cinema without Pyblish you can't see the active frame running through the timeline, while you do see it when running through Pyblish. Perhaps that's the correlation with the crash. I will close this as solve, for the fact that it does not crash in the Cinema context. Thanks again! Andre
  • Finding duplicate materials - Octane Render

    Cinema 4D SDK python r19
    17
    0 Votes
    17 Posts
    3k Views
    John_DoJ
    Hi, sorry for bringing back up this topic but the Compare() method still gives weird results in 2024.5.1. [image: 1730828935913-cinema_4d_d5fwj9o4rq.gif] Comparing a material duplicated with Ctrl-Drag returns sometimes True, sometimes False Comparing a material against a copy-pasted version (in the same scene) always returns False Comparing two identical materials both copy-pasted together in one-go in another scene always returns False, even if True was returned in the original scene. Please note that I'm using Corona Materials here but results are the same with the Standard Material.
  • 0 Votes
    4 Posts
    899 Views
    ManuelM
    hi, thanks a lot for sharing your code Don't forget to change the state of this thread to solved. (if it is) cheers, Manuel
  • FieldList.GetCount Bug

    Moved Cinema 4D SDK r21 r20 r19 python
    2
    0 Votes
    2 Posts
    577 Views
    M
    Hi @pyr, I've just reached the development team about it. So for them, this is not a bug since FieldList store only baseLink. In Python, we don't have BaseLink, but if you are not aware of what it is, please read BaseLink Manual. But since there is no BaseLink in Python, if a link points to a destructed object (like in your case, Python simply returns None) So I guess your workaround is ok. Cheers, Maxime
  • BaseShader global vs local filename

    Cinema 4D SDK c++ r19 r20 r21
    6
    0 Votes
    6 Posts
    661 Views
    kbarK
    @C4DS That was the most normal happy smiling glad you solved your issue emoji I could find. Any of the others could definitely have been interpreted in many ways. Hope that one came across alright
  • 0 Votes
    6 Posts
    656 Views
    r_giganteR
    Hi @C4DS , maybe I wasn't enough clear. you end up with a single merged object, which has 2 selection tags, and both still have the specific name ... but none have the added unique ID. Surely you start to think something is really wrong. Actually you end up in a new mesh with new selection tags which beside having the data copied from the two source selection tags, they are NEW and hence the UniqueID is not supposed to be kept. The names are kept for convenience but I don't see any reason to have also the UniqueID being kept considering that - in the end - they are indeed new instances and have nothing to do with the source selection tags. Cheers, R
  • Trigger on BaseShader change

    Cinema 4D SDK r19 r20 r21 c++
    4
    0 Votes
    4 Posts
    558 Views
    C4DSC
    @m_magalhaes Thanks for reminding me of the GeDialog::CoreMessage. I totally overlooked that.
  • 0 Votes
    11 Posts
    2k Views
    r_giganteR
    Well @pyxelrigger thanks for clarifying the final scope. Since, as already stated, folding or unfolding a scene entry doesn't generate any valuable message to be intercepted, the sole - brute force - hack you might try to implement in Python would be to implement a MessageData plugin which constantly checks for the folded/unfolded state of the entries in the scene and eventually delete the unfolded one. This approach carries strong performances penalties to the whole Cinema 4D UI because you need to constantly traverse the scene and depending on the scene size this could strongly affect Cinema performances. If there are no further question please mark the thread as solved. Best, R
  • BaseLink from cloned document

    Cinema 4D SDK r19 r20 r21 c++
    11
    0 Votes
    11 Posts
    2k Views
    P
    There is no relationship between BaseContainer IDs and plugin IDs. All you need is a unique ID, that you can use as a BaseContainer ID. This forum (the plugin ID page) provides such IDs.