The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.
  • OpenInputStream() works incorrect.

    2
    0 Votes
    2 Posts
    568 Views
    ferdinandF
    Hello @yaya, thank you for reaching out to us. Your example does build for me in R23, at least regarding the mentioned line of code: const maxon::InputStreamRef inputStream = webFile.OpenInputStream() iferr_return; Your example is however incomplete, it is missing the include statement to include iostreams.h which is likely causing your error. But there should be more errors for you in this stretch of code, since for example the line const maxon::Url webFile = (maxon::Url("https://www.mysite.com/Somevideo.mp4"_s))iferr_return is also incorrect. Find a commented example at the end of my posting for details. On SDK help search there is no a link to a "InputStreamRef". The maxon API does provide in C++ a managed memory environment, i.e., garbage collection, akin to managed languages like C# or Python. Which means all objects are split into the actual object instance and references to that instance. The object instance is then reference counted and deallocated once there are no references to it anymore. So, when you have a ThingRef, it is actually just a reference to an instance of a ThingInterface (at least most of the time, copy-on-write object references do not have the Ref postfix, i.e., the reference for a COW ThingInterface would be called Thing). The Doxygen parser (the tool we are using for documentation) does struggle heavily with all the metaprogramming we do and cannot properly ingest Ref entities. This is a bit tricky subject we are aware of and working on to, but this will take some time. Long story short, you would have to search here for InputStreamInterface. There is also our Entity Creation Manual which does expand a bit on the topic of interfaces and their references. If you continue to have problems, please make sure to post your full code and not just a snippet, as it otherwise mostly guesswork for us to figure out where your problem lies. Cheers, Ferdinand // You must include this header in order to have access to the full interface definitions. #include "maxon\iostreams.h" maxon::Result<void> SomeFunction() { iferr_scope; // The iferr_return here was incorrect. In our example it is required because we concatenate there // two urls. UrlInterface.operator+ is a maxon::Result, i.e., requires error handling. Just // initializing a Url does not have any error handling and therefor requires no iferr_return. const maxon::Url url("https://www.mysite.com/Somevideo.mp4"_s); const maxon::UrlScheme scheme = url.GetScheme(); const maxon::Bool isHTTP = scheme == maxon::URLSCHEME_HTTP; const maxon::Bool isHTTPS = scheme == maxon::URLSCHEME_HTTPS; if (isHTTP || isHTTPS) { const maxon::InputStreamRef inputStream = url.OpenInputStream() iferr_return; const maxon::Int length = inputStream.GetStreamLength() iferr_return; maxon::BaseArray<maxon::Char> data; data.Resize(length) iferr_return; inputStream.Read(data) iferr_return; inputStream.Close() iferr_return; // trgetUrl was not defined in your/our example, so I did redefine it here as someUrl. const maxon::Url someUrl("https://www.yoursite.com/"_s); // This will be "https://www.yoursite.com/Somevideo.mp4", i.e., GetName returns the last // component of a Url, e.g., "Somevideo.mp4" in this case. Here we need the iferr_return, since // UrlInterface.operator+ can fail, i.e., return an error. const maxon::Url anotherUrl = (someUrl + url.GetName()) iferr_return; const maxon::OutputStreamRef outputStream = anotherUrl.OpenOutputStream() iferr_return; outputStream.Write(data) iferr_return; outputStream.Close() iferr_return; } return maxon::OK; }
  • How to control Picture Viewer by Python in C4D R19 ?

    4
    0 Votes
    4 Posts
    946 Views
    ferdinandF
    Hello @Артём, without any further questions, we will consider this topic as solved by Tuesday, November the 2nd and flag it accordingly. Thank you for your understanding, Ferdinand
  • C4D Freezes after consecutive Import/Export

    python
    4
    0 Votes
    4 Posts
    968 Views
    ferdinandF
    Hello @orestiskon, without any further questions, we will consider this topic as solved by Tuesday, November the 2nd and flag it accordingly. Thank you for your understanding, Ferdinand
  • Undo SetSceneCamera

    5
    0 Votes
    5 Posts
    666 Views
    ferdinandF
    Hello @kbar, without any further questions, we will consider this topic as solved by Tuesday, November the 2nd and flag it accordingly. Thank you for your understanding, Ferdinand
  • Get identical document as the Render document

    python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hello @orestiskon, without any further questions, we will consider this topic as solved by Tuesday, November the 2nd and flag it accordingly. Thank you for your understanding, Ferdinand
  • R25 - Compile plugin issue

    8
    0 Votes
    8 Posts
    2k Views
    ferdinandF
    Hello @jwzegelaar, without any further questions, we will consider this topic as solved by Tuesday, November the 2nd and flag it accordingly. Thank you for your understanding, Ferdinand
  • How to get Data unit

    r21 python
    3
    1
    0 Votes
    3 Posts
    411 Views
    chuanzhenC
    @ferdinand Thanks,great!
  • 0 Votes
    10 Posts
    2k Views
    ManuelM
    hi, this will be fixed on the next update. Cheers, Manuel
  • Where can I download the SDK for R15-R19?

    c++
    4
    0 Votes
    4 Posts
    547 Views
    ferdinandF
    Hello @ingvarai, My old posts are likely gone, I assume. Your old posts are not gone, but they are not linked to your account anymore, since the accounts of the old forum have not been migrated to the current forum. The old postings have been imported into the Legacy Forum category, in case of C++ questions mostly into SDK Help. So, you cannot search for all postings assigend to an account anymore, since they are attached now to the @Helper account. But when there is a certain topic you do remember, you will usually find it with some searching. Cheers, Ferdinand
  • gNew deprecated, ok, but NewObj generates compiler error

    c++
    3
    0 Votes
    3 Posts
    380 Views
    ingvaraiI
    Hi and thanks for this. It is my bad.. I didn't read the docs carefully enough / or did not understand the docs. Now this works! -Ingvar
  • Constant tracking of object position with Python

    python r23
    5
    0 Votes
    5 Posts
    782 Views
    D
    Hello @ferdinand , this example was perfect for me, thank you very much!
  • Enabling Team Render in Render Queue

    s24 python
    4
    1
    0 Votes
    4 Posts
    889 Views
    CairynC
    (Yes, I notice that the thread has been closed, and marked as solved, and I probably shouldn't barge in, but it seems the original script error has never been addressed, so I must mansplain because that's the obnoxious guy I am.) Two points: The error in the script above is that the index used in SetUseNet is wrong. The indices in the BatchRender element list begin at 0, so the first valid index is 0, and the last is GetElementCount()-1. dBatchCount starts as GetElementCount(), which is fine as counter, but as an index, it is the first unused index. Then this counter is increased += 1, so now it is the second unused index after the list. When AddFile is called with that index, it simply adds the file as last element because it cannot leave empty gaps in the list. It returns True although it didn't use the desired index - it used index-1. Now SetUseNet is called with the same index. The reason it fails is that this index is not the index that AddFile actually used. This index is not even valid. There is no element with that index. So, nothing happens. If you use dBatchCount-1 as index at this point, or simply never increase dBatchCount in the first place, the script works fine. The actual API error is that SetUseNet does not raise an IndexError as the docs claim. (Other methods like GetElementStatus do.) Okay, I go annoy someone else now.
  • Cinema4D GeDialog Not Updating.

    python
    3
    3
    0 Votes
    3 Posts
    482 Views
    E
    Thanks for your prompt Reply, I was able to debug the whole thing yesterday, I don't know what to do with this post now though.
  • C++ The product of the Matrix and another type function does not exist?

    8
    0 Votes
    8 Posts
    1k Views
    Y
    Hello @ferdinand I've tested it a bit and now I've finished with this: instead of this: matrixA= c4d.utils.MatrixMove(c4d.Vector(0,10,0)) matrixB = myObject.GetMg().__mul__(matrixA) to this: Matrix matrix = MatrixMove(Vector(0, 10, 0)); Vector vector = myObject->GetMg() * matrix.off; It looks it works for me. Thank you again!
  • "two-leveled" ID ( [50004,1] ) of a Constraint Tag? C++

    c++ r25
    3
    0 Votes
    3 Posts
    579 Views
    Y
    Hello @ferdinand , Thank you for your answer! I made a search by the forum but have lost your post above because of I sorted topics only for a C++. My bad) I also read the C++ manual for a DescID and DescLevel and the examples in there. But they are not cover the examples like my above for a [50004,1] - IDs (or maybe I've not found). For a Python version of my plugin I did not have a problem with understanding the access to the parameters at all. But on C++... For example I stuck in my mind with figuring out how does the second DescLevel work. But after your explanation above I understand it. The first level DescLevel in your code locates this sub-container: [image: 1634311057292-%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_2021-10-15_181737.png] And next with the codeline: const DescLevel secondLevel (0, DTYPE_LONG, 0); we access into the one of this items. So I've changed your your code into: const DescLevel secondLevel (1, DTYPE_LONG, 0); and I got access into the 5004,1 item. Thank you very much!
  • Contentbrowser Python API

    3
    0 Votes
    3 Posts
    766 Views
    H
    Thanks Maxime. I will try to solve this differently for now. And update my Scripts again when the Python API is ready. Thanks again.
  • Effector Updates

    c++ windows r25 sdk
    2
    0 Votes
    2 Posts
    510 Views
    ferdinandF
    Hello @JohnTerenece, thank you for reaching out to us. Unfortunately, our answer is mostly the same as it was for the previous topic on this plugin of yours. You are using the MoData tags in a way not intended by us. It is not supported by our SDK to implement a custom MoGraph generator and you are therefore not intended to populate and manage your own MoData tags. There is nothing preventing you from doing it anyways, this however will then be out of scope of support as declared in our Forum Guidelines under "Scope of Support". We cannot debug your code for you, especially when the employed techniques are a violation of point one listed here. This is also outlined in "Scope of Support". You are also misusing the maxon API. Specifically, the error system, as you cannot just step over all errors which are returned. Which is what you do when you store them in some fields attached to your plugin implementation; never to be used or looked at again. Which can introduce all sorts of problems. The cases I saw do look unlikely to go wrong, but this is still a fundamental misuse of our API. See the end of my posting for details. Finally, about your question. I would look at your CheckDirty(), since this is the likely culprit for your problems. But we cannot debug that for you. When you can show us that something is not being flagged as dirty what was flagged before, we will be glad to provide a context for that. Please also note that example code should be condensed as also outlined in our Forum Guidelines. I understand that this is not the support you did hope for, but these limitations of scope of support must be enforced by us to a certain degree, as it would otherwise become a boundless task. Thank you for your understanding, Ferdinand maxon::Result Example What you do: void EffectorTestClass::CheckDirty(BaseObject *op, BaseDocument *doc) { // ... if (op->GetDown() != nullptr) // This could fail and you just step over it. resultBaseObject = objArray.Append(op->GetDown()); // ... flags = data->GetFlags(doc, object); if ((flags & 1) == 1) { // This could fail and you just step over it. resultBaseObject = objArray.Append(object); } // ... } What you should do: void EffectorTestClass::CheckDirty(BaseObject *op, BaseDocument *doc) { // An error scope handler that brings the classic and maxon API together. iferr_scope_handler { // you could also write to one of the loggers here, e.g. ApplicationOutput("Error in CheckDirty() @", err); return false; } // ... if (op->GetDown() != nullptr) objArray.Append(op->GetDown()) iferr_return; // ... flags = data->GetFlags(doc, object); if ((flags & 1) == 1) { objArray.Append(object) iferr_return; } // ... }
  • Linkbox Dropdown Arrow

    c++ r20 r23
    9
    1
    0 Votes
    9 Posts
    1k Views
    LorenzJaegerL
    Hi, sorry for the late reply. Just got to test out your fix and everything works now. Thank you very much for your persistence! cheers, Lorenz
  • How to get renderer version number by python in C4D R19 ?

    4
    0 Votes
    4 Posts
    825 Views
    ferdinandF
    Hello @артём, without any further questions, we will consider this topic as solved by Monday, the 25th and flag it accordingly. Thank you for your understanding, Ferdinand
  • Need help making this script

    4
    2
    0 Votes
    4 Posts
    627 Views
    ferdinandF
    Hello @rgi, without any further questions, we will consider this topic as solved by Monday, the 25th and flag it accordingly. Thank you for your understanding, Ferdinand