• CreateRay

    Cinema 4D SDK sdk c++
    6
    0 Votes
    6 Posts
    1k Views
    rsodreR
    Ok, but if RS can call it, when and how does it? Call just once... makes no sense, because the effect calls once per pixel at least, on every frame. Why would RS call it in a different context? What do you mean not fully functional? Is it partially functional? How so?
  • The oldest SDK for Cinema 4D 19-25

    Cinema 4D SDK sdk r19 r20 r21 r25 r23 s22 s24
    7
    0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hello @jeremyliu1989, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • 0 Votes
    7 Posts
    2k Views
    F
    That's exactly what I was looking for. Thank you, Ferdinand
  • 0 Votes
    1 Posts
    625 Views
    No one has replied
  • Get data about moving objects in c4d file

    Cineware SDK sdk r21
    5
    1
    0 Votes
    5 Posts
    2k Views
    ferdinandF
    Hello @tsj_JNU, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Global change notifications

    Cinema 4D SDK c++ sdk
    3
    0 Votes
    3 Posts
    474 Views
    ferdinandF
    Hello @BarnaBuzaVentuz, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • 0 Votes
    6 Posts
    1k Views
    ManuelM
    hi, sorry i didn't had time to investigate yesterday. I'm happy that you find out the solution. Cheers, Manuel
  • 0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @yaya, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • OpenInputStream() works incorrect.

    Cinema 4D SDK
    2
    0 Votes
    2 Posts
    544 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; }
  • GeDialog Button Highlighted By Default

    Cinema 4D SDK r25 python sdk windows
    3
    1
    1 Votes
    3 Posts
    333 Views
    ferdinandF
    Hello @blastframe , we will set this topic to 'Solved' when there are no further questions or replies until Monday, November the 22th. Thank you for your understanding, Ferdinand
  • Effector Updates

    Cinema 4D SDK c++ windows r25 sdk
    2
    0 Votes
    2 Posts
    487 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; } // ... }
  • Save node created from resource editor as .json file

    Cinema 4D SDK s24 sdk c++
    3
    0 Votes
    3 Posts
    547 Views
    O
    That's what I was looking for, thanks a lot!
  • Mograph Effector List

    Cinema 4D SDK r20 sdk c++
    3
    0 Votes
    3 Posts
    716 Views
    J
    Thanks for the response. I figured it would need to be the SceneHook but always best to double check. John Terenece
  • Larger BaseMaterial Preview Renders

    Cinema 4D SDK c++ sdk
    7
    0 Votes
    7 Posts
    843 Views
    kbarK
    @m_magalhaes said in Larger BaseMaterial Preview Renders: The function looks like this. As you can see the progressRef and progressIndex are passed arguments. While BASEBITMAP_DATA_PROGRESSHOOK looks like you just need to pass a function (here a lambda), i still don't know what the context is good for. Sorry i don't have enough time to investigate more and give you a better answer. I will try to find more time this week. Be aware that this is marked as Private and "hack". So, it could change in the futur. Thanks. Looks like I was passing in the ProgressHook correctly but still for some reason I do not get any callbacks to it. Perhaps it is because I am not passing in an actual document filename, not sure. But I am still getting the correct renders back even though my ProgressHook does not get called, just would have been nice to see the progress on larger images. The context in this situation would have been great for me to let me set the progress in my progress dialog. So that is what it is useful for. It is fine that it is private and may change, I am only using this for internal tools to generate images, IE not a customer facing tool. Thanks for the help.
  • Drag and Drop Gradient Data onto a Gradient

    Cinema 4D SDK c++ r20 r21 r23 s22 s24 sdk
    5
    0 Votes
    5 Posts
    789 Views
    ferdinandF
    Hello @kbar, 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
  • Filename::SetMemoryReadMode Docs don't seem right.

    Moved Bugs c++ r20 r21 r23 s22 s24 sdk
    4
    1
    0 Votes
    4 Posts
    985 Views
    ferdinandF
    Hello @kbar, I should have replied here since there is at least an implied request in your last answer. I have added a task for this in our documentation task pool and added the tracking tag to this topic. Without any further questions or replies, we will consider this thread as solved by Monday the 20th and flag it accordingly. But that does not mean that the topic is forgotten, due to its to fix tag. Thank you for your understanding, Ferdinand
  • MoData Effector Rotation

    Cinema 4D SDK r20 c++ sdk
    8
    1
    0 Votes
    8 Posts
    1k Views
    ferdinandF
    Hello @johnterenece, so, to clarify this for myself. You have an ObjectData implementation which probably overwrites GetContour, i.e., builds a SplineObject , or draws spline-like information into the viewport. This plugin then has an InExcludeData parameter which is populated with Mograph effectors which are then meant to influence the vertices of your plugin. Consequently you want to do the deformation of your input geometry yourself and not like I assumed before not just clone stuff onto a PolygonObject that has been deformed by a PolyFx. First of all, I do not see really the point in reinventing the wheel in the first place, why not use PolyFX if it does what you need anyways? I would also stress that this cobling up of functionalties, deformation and generation in your case, in a single plugin and even single function in your case, is often not a very good idea, bot for technical and debugging reasons. As I said before, we cannot debug your code for you, but here are some points: The way you use a MoData tag is not its intended usage, the tag is reserved for MoGraph generators only and you hijacking it here is something you have to do on your own responsiblity. You also do not take the transforms of the effectors into account which might be a cause for your problem. There are other problems like using BaseObject::MakeTag and a possibly thread environment and the lack of error handling with maxon::BaseArray::Append which can lead to crashes, as you just store posible erros in resultVector and resultVector2D in your code which are undefined, but I assume to be of type maxon::Result<Vector> and maxon::Result<maxon:BaseArray<Vector>. But they are not the source of your problem, which likely lies in the fact that you do hijack MoData in the way you do and then do not respect the transforms of the effectors. You still have not told us the plugin type you are implementing, but if it is a ObjectData which generates a spline, I would simply build the spline on the orginal polygon geometry and then retun the spline with a PolyFX attached to it in GetContour. Much easier than reinventing the wheel here. You would have to pass through the content of the InExcludeData of your plugin to the PolyFX. Cheers, Ferdinand
  • How to detect a document switching?

    Cinema 4D SDK python r23 s24 sdk
    5
    0 Votes
    5 Posts
    862 Views
    ferdinandF
    Hello @mocoloco, without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly. Thank you for your understanding, Ferdinand
  • Voronoi Fracture Glitch

    Cinema 4D SDK c++ r23 sdk
    13
    2
    0 Votes
    13 Posts
    2k Views
    ferdinandF
    Dear Community, this bug has been fixed with S26.1, the glitches in the Attribute Manger should not appear anymore. Cheers, Ferdinand
  • DESC_PARENT_COLLAPSE Display

    Cinema 4D SDK r20 c++ sdk
    5
    0 Votes
    5 Posts
    946 Views
    J
    Thanks for the response. I was assuming that would be the case. John Terenece