• Polygonize() and scene camera

    Moved Cinema 4D SDK c++ sdk
    4
    0 Votes
    4 Posts
    525 Views
    ManuelM
    hi, i don't think there's a particular reason for not keeping the camera but the function description is : Returns a copy of the document in which all objects are converted to polygon objects. As a camera doesn't generate polygon, it just doesn't follow. I'm expecting the same for light, atmosphere, background, floor etc. Cheers, Manuel
  • Broken Links in Documentation

    Cinema 4D SDK python sdk
    6
    0 Votes
    6 Posts
    633 Views
    r_giganteR
    Hi guys, we've should have fixed the caching issue in the documentation and we kindly ask, before emptying the cache, to see if the issue persists on your side. In case you still experience the issue, please follow-up with a new post in this thread. Thanks for your help! R
  • BaseBitmap.CopyPartTo() with grayscale image

    Cinema 4D SDK python sdk
    5
    0 Votes
    5 Posts
    895 Views
    oli_dO
    Thank you very much Maxime for the reply. I'm looking forward to the r23 and the python 3 with a lot of impatience. Cheers
  • SDK for node based materials, status?

    Cinema 4D SDK r21 sdk
    3
    1 Votes
    3 Posts
    640 Views
    F
    @r_gigante said in SDK for node based materials, status?: With regard to your question, we confirm that at the moment there are no news concerning this topic but, again, we are aware of the relevance of the request and it will be delivered accordingly to our product development plan. Thanks! On a related note: Is there any statement from MAXON on the future of the old xpresso-style node system? We are looking to implement a node-system in our plugin, and since API for the new node system is not out yet we may consider using the legacy xpresso API instead. On the other hand, it would not be a good idea to invest resources in this if that part of the SDK might be deprecated and replaced with the new node system. I realize that you may not be able to provide much info on the roadmap here, but any information that you can give would be super helpful for making this decision! Cheers /Filip
  • id PluginMessage () when the scene loaded

    Cinema 4D SDK python sdk
    12
    0 Votes
    12 Posts
    2k Views
    ManuelM
    hi, sorry I was focused on calling a command and not a script. Even if it's pretty simple, it's not as simple as i expected to run a python script, sorry about that. Be careful that you need to create the script and relaunch c4d to be able to find it by its name. The idea is to retrieve the ID of the script and use callCommand to execute it. (as you can do with any commandData IDs) you can retrieve the ScriptList with GetScriptHead witch return a GeListHead So you can retrieve the first with GetFirst and compare the name. If you find one, you can simply return it's IDs using GetDynamicScriptID and return it. You now just have to use CallCommand with this ID. (be aware that this CallCommand will create an undo step in the undo stack) So your script will be executed when a new document is loaded. #include "maxon/apibase.h" #include "maxon/errorbase.h" #include "maxon/errortypes.h" #include "maxon/file_utilities.h" #include "maxon/application.h" #include "c4d_general.h" #include "c4d_commanddata.h" #include "c4d_baseplugin.h" #include "c4d_scenehookdata.h" #include "c4d_baselist.h" static Int32 GetScriptID(const maxon::String& scriptName) { iferr_scope; // check all script // Retrieves the script head BaseList2D* scriptHead = static_cast<BaseList2D*>(GetScriptHead(0)->GetFirst()); // for all script for (BaseList2D* script = scriptHead; script != nullptr; script = script->GetNext()) { // retrieves the name of the script maxon::String name = script->GetName(); // if the name match the argument, return the id of the script if (name.IsEqual(scriptName)) return GetDynamicScriptID(script); } // return NOTOK if no script founded. return NOTOK; } class pc12835_scenehook : public SceneHookData { public: static NodeData* Alloc() { return NewObjClear(pc12835_scenehook); } Bool Message(GeListNode* node, Int32 type, void* data) override { if (type == MSG_DOCUMENTINFO) { DocumentInfoData* const msg = static_cast<DocumentInfoData*>(data); if (msg == nullptr) return false; // switch message sub-type switch (msg->type) { case MSG_DOCUMENTINFO_TYPE_LOAD: { // define my script name maxon::String scriptName = "myscript"_s; // search the ID of the scrip const Int32 scriptID = GetScriptID(scriptName); // if the script have been founded, execute it. if (scriptID != NOTOK) CallCommand(scriptID); break; } case MSG_DOCUMENTINFO_TYPE_UNDO: case MSG_DOCUMENTINFO_TYPE_REDO: { ApplicationOutput("undo or redo done"_s); break; } } return true; } return SceneHookData::Message(node, type, data); }; }; Of course you need to register your sceneHookData with RegisterSceneHookPlugin Cheers, Manuel
  • Blip before Correctly Updating

    Cinema 4D SDK c++ r20 sdk
    16
    0 Votes
    16 Posts
    2k Views
    D
    @m_magalhaes Sorry about the late reply again! I went to build some simplified code to post and I might have figured it out in the process. It seems that if I correctly mark the children with AddDependence then GetCache returns the cache I expect. Having the object lower in the object manager than mine causes it to lag behind slightly, but that seems consistent with other Cinema objects. Dan
  • Python, tool attributes and hotkeys

    Cinema 4D SDK s22 python sdk
    8
    0 Votes
    8 Posts
    2k Views
    John_DoJ
    @m_magalhaes Yes please, and sorry for the delay :3
  • Prevent Projects from opening if dragged.

    Cinema 4D SDK python sdk
    5
    0 Votes
    5 Posts
    876 Views
    lasselauchL
    @mp5gosu Whooop! Thanks, Robert! You have to return a tuple so return (c4d.NOTOK, False) does the trick for me. Thank you!!! Cheers, Lasse
  • ZipFile extracting spanned files

    Cinema 4D SDK r20 c++ sdk classic api maxon api
    10
    0 Votes
    10 Posts
    1k Views
    kbarK
    @zipit Really great insights.Totally appreciate all your comments. I have worked with zlib for many years and integrated it into many different platforms, apps and plugins. This is just the first time I have ever looked into splitting or spanning features. Off topic: Would be great to work on compression algorithms again. I keep eyeing up all the image compression formats being used and developed these days. Fun stuff.
  • << Multiple Values>> in Attribute Manager

    Cinema 4D SDK c++ r20 sdk
    3
    0 Votes
    3 Posts
    476 Views
    D
    Thanks! That's exactly what I needed!
  • Writing/Reading Rendered Image to and from Text

    Cinema 4D SDK python sdk
    13
    0 Votes
    13 Posts
    1k Views
    ?
    @m_adam Thank you, Maxime. I still learned a lot from your help, @zipit , thank you too.
  • 0 Votes
    12 Posts
    1k Views
    ?
    @m_magalhaes That's okay. Thank you for letting me know!
  • Drawing Multiple Lines from TagPlugin

    Cinema 4D SDK s22 python sdk
    3
    1
    0 Votes
    3 Posts
    330 Views
    ?
    @zipit Hahahahaha! Thank you! I see my lines now. Who hoo!
  • BaseDraw in TagDataPlugin

    Cinema 4D SDK s22 python sdk
    3
    0 Votes
    3 Posts
    372 Views
    ?
    @m_adam My apologies for not being clearer. I thought there was something wrong with how I was doing the Draw function. The issue was the TAG_IMPLEMENTS_DRAW_FUNCTION flag was missing. Thank you very much!
  • 0 Votes
    3 Posts
    441 Views
    ?
    @m_magalhaes Remap did the trick! Thanks for the help, Manuel
  • How is NBIT_CKEY_ACTIVE used?

    Cinema 4D SDK python s22 sdk
    3
    0 Votes
    3 Posts
    258 Views
    ?
    @r_gigante Ahhhhhhhh, okay, I get it now. Thank you
  • Get Active Timeline Request

    Cinema 4D SDK
    7
    0 Votes
    7 Posts
    1k Views
    annA
    Indeed a better sdk will be better. I actually also hope that sdk can recognize which parameters of the object are activated in the object manager. I know that because c4d supports opening multiple object managers at the same time, this is really convenient. But it will also make it impossible to know which object manager the user is using, so there is no way to identify it in the current SDK.
  • Catching when an ID collision occurs

    Cinema 4D SDK c++ sdk
    5
    0 Votes
    5 Posts
    571 Views
    D
    Thanks, this is exactly what I needed!
  • Sizing Plugin Dialogs

    Cinema 4D SDK python s22 sdk
    9
    1
    1 Votes
    9 Posts
    1k Views
    ferdinandF
    Hi @blastframe, without further questions or feedback, by Monday we will consider this thread as solved and flag it accordingly. Cheers, Ferdinand