Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. ECHekman
    3. Posts
    E
    • Profile
    • Following 0
    • Followers 0
    • Topics 20
    • Posts 43
    • Best 3
    • Controversial 0
    • Groups 0

    Posts made by ECHekman

    • RE: Document copied for Picture viewer doesnt copy contents of child of a TagData

      Thanks for your reply m_adam

      Thanks for providing the information that the init function should not modify the scene graph. Ill take this into account in the future.

      I went through that example you linked, but Im a bit unclear why it is nessesary to manually create the handling of a custom and parallel nodegraph branch when plugin GeListNodes are already graphs themselves?

      posted in Cinema 4D SDK
      E
      ECHekman
    • Document copied for Picture viewer doesnt copy contents of child of a TagData

      I am encountering a problem when rendering to picture viewer.
      I have two plugins, a TagData and a NodeData as its child.
      I also created a link from the TagData to the NodeData for easy access
      However when the document is copied and sent to the picture viewer renderer there are two issues.

      1. The link is not copied
      2. The contents of the NodeData basecontainer are not copied over

      The copied TagData does have a child object with my type, so it does exist

      Here is how I connect the two plugins

      Bool MyTagData::Init(GeListNode* node, Bool isCloneInit)
      {
          BaseTag* tag = (BaseTag*)node;
          BaseContainer *data = tag->GetDataInstance();
          BaseList2D* mynodedata= BaseList2D::Alloc(ID_MY_NODEDATA); // Creating my MyNodeData
          mynodedata->InsertUnderLast(node); //Add as mynodedata as a child to mytagdata
          data->SetLink(MYTAG_NODEDATA_INK, mynodedata); //Add link for easy access
          return true;
      }
      

      This basically works in all situations, except when sending it to the picture viewer for rendering.
      I feel like im missing something, but i cant find what in the documentation

      posted in Cinema 4D SDK c++
      E
      ECHekman
    • RE: Getting an effective value of an enum from a GraphNode

      @ferdinand

      I wrote a whole a4 reply about your suggestions about maxon style, error handling and my opinions about the sparse documentation and the new api in general, but i deleted it because im just so baffled by how hard it is to just get a connected node, and then get a single enum value from a node that I literally stopped caring about code architecture and style. I have tried so many different thing now im at a loss at what is supposed to be the way to do this?

      All I want to do:
      1: Get the bumpmap that is connected to the standard material node. (com.redshift3d.redshift4c4d.nodes.core.standardmaterial.bump_input)
      2: Get the inputType enum value of the bumpmap node (com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputType)

      I have tried so many different things im not even going to post code. I have read the sdk manual. I have rooted through the examples projects. I have read all the code comments in the headers. Never in my life have i spent so much effort doing something this conceptually simple. What am i supposed to do here?

      I just want this value
      747d99fc-52c2-4950-89a4-3fdc242a363d-image.png

      posted in Cinema 4D SDK
      E
      ECHekman
    • Getting an effective value of an enum from a GraphNode

      I am trying to wrap my mind around the GraphNode api, and starting to get it a bit (i think)
      However, im trying to retrieve the type of a RS Bump Map, however im having a bit of trouble.
      I can get the bump map node itself, but I cannot seem to get the effective value that is in its port.
      This is my latest attempt, it fails at typeNode.GetValue(maxon::EffectivePortValue,

      ifnoerr(auto & bumpRes = inputs.FindChild(maxon::Id("com.redshift3d.redshift4c4d.nodes.core.standardmaterial.bump_input")))
      {
          maxon::GraphNode bumpNode = getConnectedNode(bumpRes, maxon::NODE_KIND::NODE);
      
          auto assetId = bumpNode.GetValue(maxon::nodes::AssetId).GetValueOrDefault().GetValue();
          const maxon::Id& nodeId = assetId.Get<0>();
      
          if (nodeId == maxon::Id("com.redshift3d.redshift4c4d.nodes.core.bumpmap"))
          {
              ifnoerr(auto & typeNode = bumpNode.GetInputs().FindChild(maxon::Id("com.redshift3d.redshift4c4d.nodes.core.bumpmap.inputType")))
              {
                  maxon::ConstDataPtr inputData2 = typeNode.GetValue(maxon::EffectivePortValue, maxon::DataType::DefaultValue()) iferr_return;
      
                  auto type = inputData2.GetType();
                  auto typeId = type.GetId();
      
              }
          }
      }
      
      posted in Cinema 4D SDK c++ 2025
      E
      ECHekman
    • RE: Userarea keyboard focus issues in 2025.3

      Thank you Ferdinand. Ill try to remember to post bugs to the bug subforum.

      posted in Bugs
      E
      ECHekman
    • Userarea keyboard focus issues in 2025.3

      There seems to have been a change to userarea default behavior in 2025.3 - however i cannot find this in the release notes.
      Mouse clicks still trigger GeUserArea::InputEvent, however keyboard and scroll events no longer work with default settings.
      I found that when i explicitly set USERAREAFLAGS::HANDLEFOCUS in the AttachUserArea it will work like it did in previous versions. However USERAREAFLAGS settings are poorly documented and i cannot find what the settings do or if i need them (HANDLEFOCUS, TABSTOP, SYNCMESSAGE)

      posted in Bugs 2025 c++
      E
      ECHekman
    • RE: 2025.3.0 SDK Release

      Ok? will do

      posted in News & Information
      E
      ECHekman
    • RE: 2025.3.0 SDK Release

      We are experiencing an issue where keyboard and scrolling events no longer call the inputevent function of a GeUserArea. They seem to ignore the active window.
      It did work with older versions of 2025. Left, Center and Right mouse presses work normally.

      posted in News & Information
      E
      ECHekman
    • Getting debugbreak in atom.cpp

      I have created my own iCustomGUI, and it is fully functional except for that when I update the value i get a critical stop message and a debugbreak. However the data is actually correctly set and stored. So im not sure what is going on.

      atom.cpp(439): CRITICAL: Stop
      A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Cinema 4D.exe.
      

      This is how the data is set in the Init() function of my ShaderData

      // In MyData::Init(GeListNode* node, Bool isCloneInit)
      BaseContainer ociodata;
      ociodata.SetString(SOME_STRING_ID, String("initial text"));
      ociodata.SetInt32(SOME_INT_ID,  19);
      base->SetParameter(c4dId, ociodata);
      

      Here is how i create the UI

      // in MyData::GetDDescription()
      BaseContainer bc = GetCustomDataTypeDefault(DA_CONTAINER);
      bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_OCIOCYCLE);
      bc.SetString(DESC_NAME, String(pinInfo->mStaticLabel));
      bc.SetBool(DESC_SCALEH, TRUE);
      description->SetParameter(IDCopy, bc, groupID);
      

      Here is how i send the update from the iCustomGUI class

      // in My_iCustomGui::Command()
      BaseContainer _data;
      _data.SetString(SOME_STRING_ID, String("some text"));
      _data.SetInt32(SOME_INT_ID,  14);
      
      BaseContainer m(BFM_ACTION);
      m.SetInt32(BFM_ACTION_ID, GetId());
      m.RemoveData(BFM_ACTION_VALUE);
      m.SetContainer(BFM_ACTION_VALUE, _data);
      SendParentMessage(m);
      

      I have the same setup with a different iCustomGUI and it works fine, but there is something about this specific case where it is doing this debug break and complaining about a critical stop. Could it be because it im using a basecontainer here in not a simple type like int/float/vector?

      posted in Cinema 4D SDK c++ 2025
      E
      ECHekman
    • RE: GeDialog ColorChooser Color + Alpha

      Thank you for your response that did the trick.

      // ... do more settings work, check the user data editor with the data type Color with Alpha and there the details for all the settings, or the docs for DR_COLORFIELD_...

      |I am not familiar with the "user data editor". I am interested in changing the settings because this is what it looks like now:
      a5b35c99-9230-4fa2-b333-3b62d87f6976-image.png

      I would like it to look like this - including the ability to fold it
      5b066269-e1e4-489f-8f6e-61b7b1fb3fcf-image.png

      posted in Cinema 4D SDK
      E
      ECHekman
    • GeDialog ColorChooser Color + Alpha

      I am creating my own iCumstomGUI and I want to add a colorchooser with alpha
      But there is only a function called AddColorChooser which creates a color chooser without alpha

      This one in particular:
      d50a24a0-6f91-4502-ac0f-ab8438fcbfd0-image.png

      posted in Cinema 4D SDK c++
      E
      ECHekman
    • RE: How to expose C++ symbols to Python users as a third party?

      Definitly interested 🙂

      posted in General Talk
      E
      ECHekman
    • RE: Links on Tag are not animated when in Extrude Object cache

      Thanks Ferdinand, that was kind of what I expected the awnser to be. I'll use a creative solution that doesnt trigger an unnessesary recreation of the Extrude cache

      posted in Cinema 4D SDK
      E
      ECHekman
    • How to expose C++ symbols to Python users as a third party?

      @ferdinand said in how to use the commands from Octane/Redshift's symbols.h:

      Hey @RTF,

      Thank you for reaching out to us. There is no fully automatic way to do this, as it is up to third parties to expose their APIs to Python. When a vendor does not offer a Python API, you can do two things:

      1. Simply define the symbols yourself in your Python code, they are just integer values after all.
      2. With mxutils.ImportSymbols you can import symbols from a resource, e.g., a symbols.h file. It is (a part of) the very mechanism we use to automatically expose the symbols from the native Cinema 4D C++ API to the Python API.

      Cheers,
      Ferdinand

      Just to piggyback on this. "it is up to third parties to expose their APIs to Python" How would we at Octane expose the symbols in our c4d_symbol.h?
      I found this page: https://developers.maxon.net/docs/py/2024_0_0a/manuals/manual_py_symbols.html
      But it doesnt specify how to do this from our end in C++?
      Atm we are only able expose certain NodeData headers files in our resource folder.

      posted in General Talk
      E
      ECHekman
    • Links on Tag are not animated when in Extrude Object cache

      I have a Tag on an Extrude object. The Tag has links (DA_ALIASLINK) on it to ShaderData. These shaderdata's have animated values.
      The extrude object correctly copies over the Tag to the cache object, including copies of all the linked ShaderDatas.
      However none of the copied objects get animated when scrubbing the timeline - but the original objects do. I suspect this is because the expected behavior is that normally when the tag changes, the Extrude object recreates its cache. However this is not triggered for linked objects?

      I have a few "creative" solutions. But im wondering if there is a clean solution for this issue.

      Setup:
      f237d2dc-673f-4f05-a1de-2bb26ed53da1-image.png

      posted in Cinema 4D SDK c++
      E
      ECHekman
    • RE: GUI shows M (meters) instead of CM (centimeters) in CUSTOMGUI_VECTOR

      Ok that makes a lot of sense. Ill see what i can do on my end then

      posted in Cinema 4D SDK
      E
      ECHekman
    • GUI shows M (meters) instead of CM (centimeters) in CUSTOMGUI_VECTOR

      I programmatically create a vector gui using CUSTOMGUI_VECTOR. I set DESC_UNIT to DESC_UNIT_METER.
      However the gui will show CM after the number. And i would like it to display M for meter at the end of the number.
      I cant find in the SDK how to do this

      posted in Cinema 4D SDK c++
      E
      ECHekman
    • Start CUSTOMGUI_LINKBOX expanded

      I am using the CUSTOMGUI_LINKBOX UI, but for some reason it always starts out as collapsed, but i would like to expand it.
      DESC_GUIOPEN, DESC_DEFAULT both dont work.

      posted in Cinema 4D SDK c++
      E
      ECHekman
    • RE: GeListNode from ShaderData::Read function does not have a document?

      After some digging it seems only some ShaderDatas dont have their document set. Other do have it.
      However after the Read, c4d will set the document at some point, because in the ::Message() function GetDocument does return a basedocument.

      posted in Cinema 4D SDK
      E
      ECHekman
    • GeListNode from ShaderData::Read function does not have a document?

      Im loading in c4d project and want to get the Document the GeListNode belongs to, but i am getting a nullptr back.
      Is it expected for certain ShaderDatas not to be associated with a document?

      Code looks something like this:

      Bool SomeShaderDataPlugin::Read(GeListNode* node, HyperFile* hf, Int32 level)
      {
      	const BaseDocument* bd = node->GetDocument(); //bd is nullptr sometimes for some ShaderDatas
      	return SUPER::Read(node, hf, level);
      }
      
      posted in Cinema 4D SDK c++
      E
      ECHekman