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
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Maxon Developers Forum
    2. ferdinand
    3. Posts
    Offline
    • Profile
    • Following 0
    • Followers 16
    • Topics 55
    • Posts 3,178
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: EventAdd doesn't work with a modal dialog in C4D 2026

      Hey @aturtur,

      Thank you for reaching out to us. EventAdd will never really work in script manager scripts in the sense you mean it, unless you use hacks like dangling async dialogs (which as I always point out are a really bad idea).

      The reason is that Script Manager scripts are blocking, i.e., all scene and GUI execution is being halted until the script finishes. You can hack yourself around this with a dangling async dialog, i.e., a dialog that lives beyond the life time of its script. But that is not a good idea, you should implement some form of plugin to host your asnyc dialog, as you otherwise risk crashes.

      A modal dialog is just an extension of this. It is right in the name, it is modal, i.e., synchronous. All scene and GUI execution is being halted while this dialog is open and only resumes once it closes. When you want updates while your dialog is open, you need an async dialog (and a plugin which hosts it).

      Cheers,
      Ferdinand

      Since you also might misunderstand the nature of EventAdd() I am also putting here the C++ docs I updated a few weeks ago, to better reflect the nature of it (not yet live):

      /// @brief Enqueues an update event for the active document.
      /// @details Only must be called when modifying the active document and is without meaning for other documents. The typical example of using `EventAdd` is after adding or removing elements from the active document; and wanting these changes to be reflected in the UI. The function itself is technically thread-safe, but the vast majority of operations that require calling `EventAdd` are not thread-safe and must be called from the main thread (and therefore calling this function is usually main thread bound). The function also does not enqueue a dedicated event item, but rather sets a flag that is checked when the next update event is processed. Therefore, calling `EventAdd` multiple times in one function scope is unnecessary overhead which must be avoided. Because such multiple event flags cannot be consumed while a function on the main thread is still running, and instead the event will only be consumed after that function returns.
      /// @code
      /// Result<void> AddCubes()
      /// {
      ///   CheckState(maxon::ThreadInterface::IsMainThread(), "AddCubes must be called from the main thread."_s);
      ///
      ///   // EventAdd(); // We could also technically call it here with the same effect. The event
      ///                  // will only happen after this function returns.
      ///
      ///   BaseDocument* doc = GetActiveDocument();
      ///   for (int i = 0; i < 10; ++i)
      ///   {
      ///     BaseObject* cube = BaseObject::Alloc(Ocube);
      ///     if (!cube)
      ///       return maxon::OutOfMemoryError(MAXON_SOURCE_LOCATION, "Failed to allocate cube object."_s);
      ///
      ///	    doc->InsertObject(cube);
      ///
      ///     // Calling EventAdd here would have no extra effect, since this event cannot be consumed while
      ///     // our main thread function is still running. And such extra calls on a large scale can cause
      ///     // considerable overhead.
      ///   }
      ///
      ///   // Notify C4D that the active document has changed. The very end of a function or scope is the
      ///   // canonical place to call EventAdd().
      ///   EventAdd();
      /// }
      /// @endcode
      /// @see The article @link page_manual_coremessages Core Messages@endlink for more information.
      /// @param[in] eventflag					The event to add: @enumerateEnum{EVENT}
      
      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Render Token Questions

      @tommyf said in Render Token Questions:

      The frame padding I was referring to are in regards to the frame numbering that is written out when selecting a render pattern in the output settings that you would find under Render Settings > Save > Name where the one we typically use is Name.0000.TIF.

      Yes, that was already my hunch, as described above, and you cannot alter this numbering with render tokens, you can only add your own. When you want to change this numbering, you would have to write yourself a post processor as lined out above. Technically, you could also just run this outside of Cinema 4D, e.g.,

      commandline.exe -someScene.c4d ...
      c4dpy.exe renameScript.py -someScene.c4d
      # Or just even just a CPython instance (or any other scripting language), the problem here is
      # that you could not access the the render settings of the scene and would have to rely on conventions.
      python  renameScript.py -someScene.c4d
      

      Based on how you answered my questions it sounds like as long as I load the plugin script that contains the registration code that I could create custom tokens that way. I can also therefore create my own $frame token with my own frame padding (python str.zfill method) for frame numbers however there is no way to override the 4 digit frame padding that comes from the render settings name field.

      Yes. But you could not name it $frame, because that would collide with the builtin token of the same name.

      When the pattern my_render_frame-000001_001.tif works for you, I would definitely go for the render token. When you absolutely have to change the postfix set by Cinema 4D, that is possible too, but much more work. The work lies there not in actually renaming the files, that is somewhat trivial. The work lies in supporting all the ways a rendering can happen. When you are locked into using the commandline on your farm only, that would simplify things and drive down the costs of doing this (i.e., you would not support picture viewer, teams, editor, etc. renderings).

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Xref Material reference

      Hello @Jespersather,

      thank you for reaching out to us. This is a developer forum, not an end user support forum. We cannot help you here with your end user issues. Please use our Support Center to get end user support for Cinema 4D.

      I have moved your topic into General Talk.

      Cheers,
      Ferdinand

      posted in General Talk
      ferdinandF
      ferdinand
    • RE: Render Token Questions

      Hello @tommyf,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      Thank you for reaching out to us. Please do not hijack other threads with your questions and split up multiple questions into multiple topics in the future. Please read our support procedures, I have forked your questions.

      Do the token registrations get stored within the project files themselves or do they get stored in local machine or user settings for c4d. Meaning that if we wanted to implement this for our render farm we'd have to register the token on each one of the machines.

      Implementing a custom render token can be done with our C++ or Python API (here is an example for Python). So, you will need such plugin on each machine where you want to use that token. Not quite sure how the rest of your question is meant, 'registering a token (or any other plugin)' just means that the plugin is present when Cinema 4D is booting.

      Depending on how 1 is answered is it possible to support multiple $frame padding configurations?

      Since you do not explain what you would consider '4 to 6 digit frame padding', I can only speculate. My guess would be that you want to replace the frame counter provided by Cinema 4D in file names, e.g., transform my_render_001.tif, my_render_002.tif, etc. into my_render_0001.tif, my_render_0002.tif, etc.

      If that is what you mean, then no, that is not possible with tokens. The frame counter is something added by Cinema 4D you cannot influence as a user (as it depends on the render settings).

      You could either implement a token which adds your own frame counter to a file name (my_render_frame-0001_001.tif, my_render_frame-0002_002.tif, etc.) or you could write a postprocessor which hooks into MSG_MULTI_RENDERNOTIFICATION to catch a finished rendering and then post-process the files it created on disk. But the latter could get complicated.

      Also depending on how 1 is answered, are the token registrations permanent or are we going to have to register the custom token every time we launch c4d or whenever we want to change it.

      As explained above, I do not really understand what you are asking for. A registration is not something you do manually as a human, but rather some code that runs.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: C++ SDK Matrix object style distribution

      Hello @dex,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      Thank you for reaching out to us.

      Does C++ SDK allows you to create some sort of a custom Matrix Object style distribution?

      The SDK does not allow you create any MoGraph generators, the only thing you can implement are effectors and fields. A generator is effectively just an ObjectData plugin which generates some MoData stored as a tag on it, and then depending on the generator type, also generates some cache and/or viewport output. What a MoGraph generator does is not strongly defined, therefore each generator might have to be handled differently by our Core API; which makes it impossible to create a custom one.

      In the case of a Matrix object linked in a Cloner object in object mode, the custom behavior is that the Cloner will read the MoData tag of the Matrix object when it sees an Omgmatrix being linked. You could create an ObjectData plugin which generates the same MoData tag as the Matrix object, but it would not be recognized by the Cloner as a Matrix object, and thus not be treated as such. But you could create your own infrastructure which picks up on that. But in general, implementing your own generators within the MoGraph system is not possible and also not trivial.

      It is important that the points encode position, orientation and size or scale and that the cloner can read that data and apply it to instances.

      The most straight forward way to achieve what you want, would be probably to implement a custom effector which overrides the particle data to your liking. The only limitation of effectors is that they cannot change the particle count. A way out could be here to create some driver logic, e.g., a tag on the cloner which drives both the cloner and an instance of your custom generator in tandem. If you do that you have to be a bit careful with not violating threading restrictions or creating dirtiness feedback loops, but it is possible.

      The other alternative could be to just implement a polygon object ObjectData and generate tiny polygons for each (position, orientation, scale) tuple you want to have. Then in the cloner, you just clone in polygon mode onto your object and enable 'Enable Scaling', so that the particles are also scaled according to the size of the polygons.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: [Cinema 4D/Redshift] How to insert knots into a Redshift Ramp Node

      Hello @pislices,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      Thank you for reaching out to us. The Nodes API, i.e., the API you are using since you show us the Node Editor, is a Maxon and not a Cinema API, so it uses entities from the maxon and not c4d namespace in Python (you linked to c4d.Gradient article for the old Redshift Xpresso Nodes - which are part of the Cinema API). E.g., the Nodes API uses maxon.GradientInterface and not c4d.Gradient. Under the hood, the Cinema API type is usually just a thin wrapper for the Maxon API type, but that does not really matter for us here.

      What comes on top of this, is that the Nodes API abstracts all data types it uses and decomposes them accordingly into port bundles (a data type) and variadic ports (a list of dynamically addable or removable ports for things such as points, gradient knots, or the layers of a shader). See here for details on these two concepts.

      So, to add/remove or manipulate knots of a gradient, you do not get the data as a whole, modify it, and then write all data back, but manipulate ports which represent individual gradient knots. In short, you get the port bundle which represents the gradient on your node. This port then usually has a child port which is a port bundle which holds all the knots of the gradient. You can add or remove ports form/to that bundle to modify the gradient. To edit a knot, you write to the attributes of the port which represents that knot.

      Graph descriptions offer an abstraction for this not entirely trivial subject (see also the link for variadic ports and port bundles, it also contains some example code for graph descriptions on that subject).

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Set View Transform in Picture Viewer

      Hey @ECHekman,

      Thank you for reaching out to us. The answer to your question is sort of yesn't. You can set the embedded view transform of a bitmap, which by default will be used by the Picture Viewer. The Picture Viewer like most managers in Cinema 4D is sealed, and we do not want to change that. So, you cannot change what view transform override is used by the Picture Viewer (when the user chooses to ignore the view transform embedded into an image).

      See Manage Bitmap OCIO Color Profiles for details.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Debugging in VS Code does not pause at breakpoints

      Hey @idealflaw,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      Thank you for reaching out to us and please excuse the delay. But for now I can only confirm the issue, as I have no found a quick fix for this. Oddly enough, on my machine it does not work, but on the machine of a colleague it does. My hunch would be that either something (firewall) is interfering with the debugger server communication or VS Code mixes something up with the vanilla CPython environment. But that cannot really be, because then the code should not run due to missing dependencies. I also tried making the launch environment explicit but that did not do anything either (no surprise again because it does find the C4D python environment with an explicit launch.json, otherwise the code would not run at all).

      This problem only exists on MacOS, Windows is not affected. I have moved this topic into bugs and I cannot give an ETA when we will fix this.

      Sorry for the trouble,
      Ferdinand

      Reproduction Steps

      1. Attach to VS Code to Cinema 4D 2026.1 on MacOS.
      2. Run the script attached below and that a breakpoint on line 10.
      3. Run the script with the debugger attached.

      Result

      1. The debug environment will open and the debugger will attach.
      2. The code will neither halt on the manual stop set one line 10, nor on the raised exception. It will just run as if it would be running without a debugger.

      OK Windows 2026.1
      NOK MacOS 2026.1

      import c4d
      
      def main() -> None:
          """Called by Cinema 4D when the script is being executed.
          """
          a: int = 42
          b: float = 3.14
          c: float = a + b
          
          if c > 45:
              raise ValueError("c is too large!")
          else:
              print(f"c is {c}.")
      
      
      if __name__ == '__main__':
          main()
      
      posted in Bugs
      ferdinandF
      ferdinand
    • RE: We can update the Python API to align with the C++API

      Hey @Dunhou,

      Thank you for reaching out to us. We agree that this would be desirable. These methods are actually already wrapped but we hide them for now in the Python SDK. Find the reasons below.

      1. ExecuteJavascript: I just did remove the bindings of the Python API for that method in the current beta and also switched the C++ method to internal. The reason for that decision was is that we have security concerns about attackers being able to execute arbitrary JS in a web browser opened in Cinema 4D.
      2. SetWebMessageCallback: This is intended solution, i.e., the JS you want to execute must be already embedded into the HTML which is running in the HtmlView. On Windows/WebView2 it uses web messages, on MacOS/WebKit a custom solution emulating them. And SetURLCallback is then the way to get data back from the JS VM.
      3. For 2026.1 I already wrote examples for these methods, but on the last meters we discovered that something not only broke the Python bindings but the whole "execute JS" in the WebView2/WebKit bindings.

      My last info is that something broke there due to a project update, and that the two devs involved in it will have a look. I'll give them another bump and report here if there are any updates.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Creating custom asset nodes via Python API

      Good to hear that things worked out for you!

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: [Cinema 4D/Redshift] Nested Redshift Proxy Files Not Detected by Project Asset Inspector

      Hey @vaishhg,

      As I tried to explain there are no nested dependencies. *.rs is a full blown scene file format which can express geometry, curves, simulation data, materials and more. When you save a Cinema 4D scene as *.rs al data in it is exported to that format, including the "nested" case where a *.c4d scene is referencing a *.c4d scene.

      So when you start out with this *.c4d scene:

      Scene.c4d
          +-- Objects
              +-- Cloner ( creates 5 instances)
                  +-- Cube Generator 
                      +-- Cache
                          +-- Polygon Object
                      +-- Tags
                          +-- Material Tag (references 'Red Material')
          +-- Materials
              +-- Red Material
      

      And then export it to Scene.rs, you get this (this is not an actual depiction of the file format, just a visualization of what happens, rs is not an open format).

      Scene.rs
          +-- Objects
              +-- Cube.0 [Red Material]
              +-- Cube.1 [Red Material]
              +-- Cube.2 [Red Material]
              +-- Cube.3 [Red Material]
              +-- Cube.4 [Red Material]
          +-- Materials
              +-- Red Material (contains Red Material definition)
      

      If you load that file back into Cinema 4D you get this. All data - that these are 5 separate cubes with a red material each - resides in the Redshift core only, we only see a proxy in Cinema 4D, hence the name "RS Proxy Object". It is the Redshift Core which will resolve the data in the RS file at render time.

      ReferencingScene.c4d
          +-- Objects
              +-- RS Proxy Object.0 (loads Scene.rs)
                  +-- Cache (will be empty by default, there is literally no data in the c4d core, 
                             only when we set 'Preview' to 'Mesh' there will be a cache so that the
                             viewport can display something)
                      +-- Polygon Object (one blob representing all 5 cubes and no material information)
              +-- RS Proxy Object.1 (loads Scene.rs)
                  +-- Cache
                      +-- Polygon Object
      

      When we now export ReferencingScene.c4d to ReferencingScene.rs we get this. Because when the exporter runs, it will encounter the two RS Proxy Objects when flattening the c4d scene and do what you cannot do, grab the rs scene data from the referenced Scene.rs files and inline that into the new ReferencingScene.rs file. So we end up with 10 cubes in total, each with the red material assigned.

      ReferencingScene.rs
          +-- Objects
              +-- Cube.0 [Red Material] (from RS Proxy Object.0)
              +-- Cube.1 [Red Material] ...
              +-- Cube.2 [Red Material] ...
              +-- Cube.3 [Red Material] ...
              +-- Cube.4 [Red Material] ...
              +-- Cube.0 [Red Material] (from RS Proxy Object.1)
              +-- Cube.1 [Red Material] ...
              +-- Cube.2 [Red Material] ...
              +-- Cube.3 [Red Material] ...
              +-- Cube.4 [Red Material] ...
          +-- Materials
              +-- Red Material (contains Red Material definition)
      

      And when we load that back into Cinema 4D we get this:

      SecondGeneration.c4d
          +-- Objects
              +-- RS Proxy Object.0 (loads ReferencingScene.rs)
                  +-- Cache
                      +-- Polygon Object (one blob representing all 10 cubes and no material information)
      

      The TLDR is that the Redshift Core can read *.rs files and the Cinema API cannot, it can only write them or load them via an RS Proxy Object. And there is no 'resolving [...] the full proxy chain' as you put it. An *.rs scene file is just a discrete scene representation that contains does not know concepts such as generators or assets known to the Cinema API/Core. When export a *.c4d scene that references *.rs files all data is just flattened into a single *.rs file (again, what I showed under the *.rs formats above was just a visualization, not the actual file format).

      There is currently no way to do what you want to do, even if you would request access to the Redshift Core C++ SDK. Because the RS file format is a GPU scene file format and very deeply integrated into the core. Even the RS Core SDK does not expose functionalities to read RS files to CPU memory structures.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Deadline Issues: TeamRender PRO

      I did not see this as a rant or rude, if I had, I would have reacted differently. I understand your concerns, but this is a developer forum and we cannot help you here with your issue.

      posted in General Talk
      ferdinandF
      ferdinand
    • RE: Deadline Issues: TeamRender PRO

      Hey @3dduff,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      These are developer forums, and while you have posted in the correct off topic forum, I am not sure how well placed your topic here is. We as the SDK team have little to do with the active development of Cinema 4D outside of SDK features.

      But Deadline is not as dead as you make it out to be. AWS simply has shifted their focus to Deadline Cloud. There are also a c4d bindings for Deadline Cloud. I think they still struggle a bit with asset management, but the product is quite mature. The Deadline team is also active on these forums. I understand that some users will see Deadline Cloud not as an equivalent replacement, but 'deadline has stopped active development' is simply not a correct assessment either.

      The best way to make a feature request directed at Maxon is to create a ticket in our Support Center and share there a suggestion. When you are looking for a user-to-user discussion, you are probably better served with the Redshift forums.

      Cheers,
      Ferdinand

      posted in General Talk
      ferdinandF
      ferdinand
    • RE: Creating custom asset nodes via Python API

      Hey @itstanthony,

      Thank you for reaching out to us and sorry, I am somehow overlooked this topic. It is rather hard for me to reproduce what you did there since I am lacking that asset of yours. I understand that the nodes API in total but also its simplified variant of graph descriptions are not trivial, but I would recommend having a look at Graph Descriptions: Referencing Entities, it is all explained there.

      • You can either reference entities by their human readable name (English only at the moment) or by their ID.
      • When you use an ID reference, you must use the hashtag prefix so that the graph description parser knows that it is meant to be an ID. E.g., #com.maxon.nodes.stuff or #2348twiugrfjwsgrrwo4.
      • You can also use lazy references but I won't get into that here.

      So, you either must prefix the ID with a hashtag or you can just use the plain name of your node which seems to be "Normal Blender AOV". The danger with names is always, especially for user designed nodes, that there will be a name collision. Graph descriptions work by building a cache of IDs and labels right in a node space right before the description is executed. It does not matter if a node is native or not.

      The alure of graph descriptions is of course to use human readable identifiers. I would recommend naming custom nodes with a prefix to make name collisions less likely. E.g. instead of naming a node "Normal Blender", one could name it "MXN Normal Blender" where "MXN would stand for Maxon and would have to be customized to your company/name.

      Cheers,
      Ferdinand

      Example

      I created a Redshift node asset called "DoubleNoise":
      c5f80076-9856-4862-a45a-93f7c96d0973-image.png

      And then instantiated it like this. You can also access the ports just like for builtin nodes via their human readable name.

      import math
      import maxon
      from maxon import GraphDescription
      
      GraphDescription.ApplyDescription(
          GraphDescription.GetGraph(name="foo"), {
                  GraphDescription.Type: "DoubleNoise",
          }
      )
      

      035fcdc3-9886-448d-8be3-5f762ee3608d-image.png

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: how to detect obj selected in InExcludeData()?

      @chuanzhen
      d62b4385-6405-42a6-98fa-46f26c5fc075-image.png

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: Import multiple Takes

      Hey @yannickkohn,

      Thank you for the source code, but pseudo code is often problematic, especially when it contains so many undefined functions. I cannot say much about any bugs, as your code is so 'pseudo' and you do not show the really deep down work (reading curves and keys here).

      What also is a bit weird is that you use FindOverride. That function is private for a reason. You should set the active take and then just evaluate the scene data or the tracks of scene data when you are interested in animations only.

      Cheers,
      Ferdinand

      posted in Cineware SDK
      ferdinandF
      ferdinand
    • RE: Import multiple Takes

      Hey Yannick, as I said without code and your scene data we will not be able to help you. In understand what you want to do conceptually, but for concrete help we will need concrete code and concrete data. As I hinted at, not all aspects of takes can be faithfully exported into the Melange (a.k.a.) Cineware format. The Take export has be initially written for the Adobe After Effects bindings, so there might be gaps even when data could be discretized in principle.

      posted in Cineware SDK
      ferdinandF
      ferdinand
    • RE: Import multiple Takes

      Hello @yannickkohn,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      It is quite hard to answer your question in this form, please read the points listed above. From what I get, you have some C++ application and use there the Cineware SDK to import c4d files. You now want to read take data in these scenes. First of all, I would recommend to read the end user docs on takes, in case you have not already.

      Takes are somewhat comparable to render settings in Cinema 4D, as in that you always have at least one of them in a scene, but also can have many (which also can be nested). Just likes for render settings, there can only be one active take at a time. So unless you have called SetCurrentTake, the data of your scene will not change.

      Cineware is also a sparse/discrete data format, i.e., all procedural goodness of Cinema 4D has been baked down. Without knowing what take data you want to see being exported, it is hard to tell if what you are experiencing is working as intended or not. Please share your code and images or files of the scene you are trying to export, including examples/descriptions of what data is missing.

      Cheers,
      Ferdinand

      posted in Cineware SDK
      ferdinandF
      ferdinand
    • RE: how to detect obj selected in InExcludeData()?

      Hey @chuanzhen,

      Thank you for reaching out to us. For me this works fine, but I also struggled for a second with this. The crucial information is probably that you have to set SEND_SELCHNGMSG in the InExcludeCustomGui for which this shall work. Since this information is rather obscure, I have updated the docs of InExcludeData::GetData to better reflect this.

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand
    • RE: [Cinema 4D/Redshift] Nested Redshift Proxy Files Not Detected by Project Asset Inspector

      Hello @vaishhg,

      Welcome to the Maxon developers forum and its community, it is great to have you with us!

      Getting Started

      Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

      • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
      • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
      • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

      It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

      About your First Question

      I assume this is about Deadline? I am also not sure that I understand the question correctly. Let me recap, so that we are sure we talk about the same thing.

      You have a scene Original.c4d and you export it to the Redshift Scene format OriginalProxy.rs. Then you create a Cinema 4D scene Composition.c4d and there create one or multiple Redshift Proxy objects referencing OriginalProxy.rs. Then you export that scene as a Redshift scene as CompositionProxy.rs. You now want to access information about Original.c4d or OriginalProxy.rs when loading CompositionProxy.rs with a RS Proxy object into a Cinema 4D scene (or by extension see that information in the Asset Inspector).

      That is not possible. rs is the Redshift scene format which works across the full landscape of DCCs supported by Redshift. The Redshift format has no such concept as a generator and just discretizes all smooth/procedural geometry data.

      When you export a Cinema 4D scene to the Redshift rs format, it will among other things just walk your scene and collect all the geometry caches and save them discretely in the RS format. For Redshift it does not make any difference if it collects the cache of a Cube generator object or the cache of a Redshift Proxy generator object. In the eyes of Redshift these are both just two procedural geometry generators which must be discretized/baked for export (not entirely true, because Redshift Proxy objects are cached in the Redshift Core itself and not in Cinema 4D, but close enough).

      As soon as you save a scene in the RS format, all information is lost that something once was a generator and the parameters it held. The Redshift Core also does not know a concept such as asset data or the Asset Inspector, as that is a Cinema 4D specific concept. So, such data is not stored in the rs format either.

      So, to answer your questions: You cannot reach into the past like that. Neither directly via the Asset Inspector and its API, nor indirectly by for example traversing the scene graph of a scene. In fact, RS Proxy objects do not even have caches in the Cinema 4D world, unless you set Preview to Mesh. The actual data resides discretely in the in the Redshift Core.

      As an example, when we have this scene which holds two proxies and we run this script on it to, print the scene graph string of each object in the scene, we can see both proxies only hold discrete polygonal data:

      import c4d
      import mxutils
      
      doc: c4d.documents.BaseDocument  # The currently active document.
      
      def main() -> None:
          """Called by Cinema 4D when the script is being executed.
          """
          for obj in mxutils.IterateTree(doc.GetFirstObject(), True):
              print(mxutils.GetSceneGraphString(obj))
      
      
      if __name__ == '__main__':
          main()
      

      2c7c3701-ac06-43d6-b038-bea506e05083-image.png

      When we now save that scene as an RS scene file and load that in an RS Proxy object in another scene, we will see that it only contains one blob of discrete geometry.

      627111d5-a034-409f-a93a-b7e064b9f044-image.png

      Cheers,
      Ferdinand

      posted in Cinema 4D SDK
      ferdinandF
      ferdinand