• Move the plane in random effect

    windows 2025
    2
    0 Votes
    2 Posts
    415 Views
    M
    Hi @Fabio-B Thank you for reaching out to us. Unfortunately, your question is off topic for the forum you have posted in. Please check the Forum Overview for an overview of the scope of the different forums. On this forum we only provide support for third party software developers about the Cinema 4D Software Development Kit. We unfortunately cannot provide end user support, as we lack the tools and the knowledge to do so. To receive end-user support, please visit our Support Center and create a ticket for your issue Cheers, Maxime.
  • 0 Votes
    4 Posts
    607 Views
    uogygiuolU
    This is fantastic, thank you so much! This works beautifully. I see your confusion with the "offset". This is absolutely my fault in formulating the question. Sorry about that. I also wanted the clones to follow a spline with an individual offset, but then thought to remove this part to not overcomplicate the question and accidentally left some traces. However, in your video you gave me valuable insight in how to achieve this as well. I already have a working sketch where I'm daisy chaining your script with a Spline Effector in the right order. Giving these thoughtful answers is incredibly valuable, you can't believe how motivating this is to go further.
  • The code entered in the Python emitter has no effect.

    r25 python windows
    4
    0 Votes
    4 Posts
    834 Views
    ferdinandF
    Hey @Fabio-B, Please note that we cannot provide support for AI generated code. See Support Procedures: Scope of Support for details. When you want the clones to move, or in other words to be animated over time, you will need a noise and cannot use hashes or random values, as they are not interpolated, i.e., continous. """Realizes an effector that attracts MoGraph particles spherically around its origin. Add the example to a Matrix object to understand its effect. In Full Control mode we can realize a true attraction force as we have full control over the particle values. Compare this example to Parameter Control mode to understand the difference. """ import c4d import mxutils op: c4d.BaseObject # The Python Effector object containing this code. gen: c4d.BaseObject # The MoGraph Generator executing `op`. doc: c4d.documents.BaseDocument # The document `op` and `gen`are contained in. def main() -> bool: """Called by Cinema 4D to evaluate the effector. """ # Get the particle data for the effector #op. Get out when either the data cannot be retrieved. data: c4d.modules.mograph.MoData = c4d.modules.mograph.GeGetMoData(op) if data is None: return 1.0 # Get the matrices of the particles. This is the array we will modify. matrices: list[c4d.Matrix] = data.GetArray(c4d.MODATA_MATRIX) # For each particle write a new persistent random height value, hashed over the index of the # particle. This will cause the height each time to be the same, as long as the index of the # particle does not change. One could also hash the position of the original particle to get a # height value that is not dependent on the index of the particle (e.g., when the user changes # the order of the particles in the Matrix object). for i in range(data.GetCount()): pos: c4d.Vector = matrices[i].off y: float = c4d.utils.noise.Noise(matrices[i].off, doc.GetTime().Get()) * 25.0 matrices[i].off = c4d.Vector(pos.x, y, pos.z) # Hash a height value over the position of the particle. # y: float = mxutils.g_random.HashVectorToNumber(matrices[i].off) * 25.0 # Write the new data back. data.SetArray(c4d.MODATA_MATRIX, matrices, op[c4d.FIELDS].HasContent()) return True Recording 2025-05-02 141611.mp4 Cheers, Ferdinand
  • C4D Python: Redshift IPR Start/Stop Control

    python windows 2025
    5
    0 Votes
    5 Posts
    814 Views
    M
    @hoganXYZ hi if it does not appear in the script log then there is no clear rules. Sometimes there is another way sometimes now it depends on how it is implemented. For the one you asked I do not think it is possible. Best bet would be to ask Redshift on their forum. Cheers, Maxime.
  • lhit from BaseVolumeData

    r21 python windows
    3
    0 Votes
    3 Posts
    549 Views
    JH23J
    Hey @m_adam, Thanks for the reply! What you’re saying makes a lot of sense C++ is clearly the better option for this kind of stuff, especially when you need more control and better performance. I haven’t had much chance to dive into C++ yet, but I’m well aware it’s way more powerful than Python when it comes to working with the engine. It’s a bit of a shame that there’s no way to directly access polygon info from Python, since that’s exactly what I needed. But still, I really appreciate you taking the time to explain it. Cheers, James H.
  • DrawHudText interferes with Polygon Pen Tool etc

    4
    0 Votes
    4 Posts
    785 Views
    i_mazlovI
    Hi @FlavioDiniz, thanks for providing more information on the issue. Regarding your "Issue 2". I see no reason for the background color (and other properties) to not work in your setup, hence I've created a bug report for that (ITEM#587756). Thanks for reporting the issues you face during your development. We are happy to handle your "Issue 1" about "constantly unsaved document" in a separate thread, once you create it yourself. Cheers, Ilia
  • Links on Tag are not animated when in Extrude Object cache

    c++
    3
    1
    0 Votes
    3 Posts
    504 Views
    E
    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
  • Cache Proxy Tag

    2025 c++ windows
    5
    0 Votes
    5 Posts
    734 Views
    J
    @ferdinand Thanks for the detailed response, unfortunately what I'm trying to do doesn't seem viable. John Thomas
  • Maxon API for Python

    python 2025 windows
    3
    0 Votes
    3 Posts
    506 Views
    ThomasBT
    @ferdinand Thank you for your detailed explanation, it shed some light on the whole matter for me.
  • Adding an Object to a New Cinema 4D Asset Database

    python macos 2025
    5
    2
    0 Votes
    5 Posts
    861 Views
    i_mazlovI
    Hi @d_keith, I would kindly ask you to check our Support Procedures, namely the "How To Ask Questions" paragraph: Singular Question: The initial posting of a support topic must contain a singular question. Do not ask ten things at once, that makes it extremely hard to answer topics. Break up your questions into multiple topics. Here you effectively have 4 different questions about Asset Browser, and these are candidates for 4 different threads on the forum. In your further postings please try to follow the aforementioned rules. Regarding your questions: Should I be able to mount a directory and have it auto-create a DB? Mounting database is effectively executing the AssetDataBasesInterface.SetDatabases. It has nothing to do with creating database neither semantically, nor is this mentioned in the docu. If you need to create repository, please use maxon.AssetInterface.CreateRepositoryFromUrl(), it will scan the directory for being already a database and create proper dir structure if it's not. Any idea why I need to re-try creating the Repo for it to work? If you face any errors in the script, please always attach at least the error message! In this case I assume you receive the following error, when executing the maxon.AssetRepositoryTypes.AssetDatabase() for the first time after Cinema 4D started. Looks like a bug to me, I've created a bug report for that (ITEM#585831). The error message: Traceback (most recent call last): File "console", line 1, in <module> File "C:\Program Files\Maxon Cinema 4D 2025\resource\modules\python\libs\python311\maxon\interface.py", line 5049, in __call__ self._cachedObj.R = _maxon_mapping.GetAssociatedDataType(dt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Exception: unable to find datatype As a workaround you can just execute the following line first in your main(): maxon.AssetRepositoryTypes.AssetDatabase() ... about multiple DBs ... You're giving your databases unique IDs with the line repo_id = maxon.AssetInterface.MakeUuid(str(url), True). If you need them to be the same, just pick one instead, e.g. repo_id = maxon.Id('net.maxon.sdk.cool.things.repo') ... revealing assets doesn't work... I've created a bug report for that, as it looks like a bug with refreshing in the Asset Browser. As a workaround you can reload databases and reopen the AB before reveling your assets, e.g.: def RepenAssetBrowser(): CID_ASSET_BROWSER = 1054225 # Close the Asset Browser if it's alredy opened if c4d.IsCommandChecked(CID_ASSET_BROWSER): c4d.CallCommand(CID_ASSET_BROWSER) # Open again c4d.CallCommand(CID_ASSET_BROWSER) def main(): # ... # assets = [] # ... # assets.append(asset) # ... maxon.AssetDataBasesInterface.ReloadAssetRepositories(True) RepenAssetBrowser() maxon.AssetManagerInterface.RevealAsset(assets) Cheers, Ilia
  • Enables or disables all Emission in the scene

    python 2025 windows
    3
    1
    0 Votes
    3 Posts
    461 Views
    I
    Hi Ferdinand, Thanks a lot for the clear explanation and for taking the time to share the code. The part about accessing BaseVideoPost and using REDSHIFT_RENDERER_EMISSION_ENABLE was spot on. Exactly what I needed. Works perfectly! Really appreciate it. Anthony
  • How to Execute a Modifier plugin in Expression priority

    2024 python
    7
    0 Votes
    7 Posts
    956 Views
    chuanzhenC
    @i_mazlov Thanks,it works!
  • Access the Output Folder path from a RS BakeSet

    2025 python windows
    3
    0 Votes
    3 Posts
    557 Views
    I
    Hi Ilia, Thanks a lot for the quick and clear reply! That makes sense. I had a feeling it might be a limitation of the current API. I’ll definitely follow up with the Redshift team on their forum to confirm whether there’s any workaround or future support planned for accessing those fields. Appreciate your help and the reference to the related thread! Cheers, Anthony
  • connect material to reference node

    2025 python
    6
    0 Votes
    6 Posts
    952 Views
    ferdinandF
    Hey, Node attributes are things that are directly present on a GraphNode. You could also call them fields, because a GraphNode like many things in our API has qualities of a DataDictionay, i.e., you can write values over keys into it, just like for Python's own dict. Such node attributes (for true nodes) are then rendered out quite similarly to port values in the Attribute Manager but they are fundamentally different from ports, as users cannot drive their value with a connection, i.e., the value of a port of another node. And a port also always requires another GraphNode attached to the true node¹ for which they are a port, while the attribute sits directly on the true node. An attribute, e.g., the name of a node, will also never show up in the node representation in the graph. In the screen below I for example right clicked on the RS Reference node and invoked Add Input > All; but things like Name, Color, Show Preview etc. are alle not listed. [image: 1744368637847-174097cf-d777-49d2-b0ea-0057c8474a5e-image.png] That is because they are all attributes and not ports. There is unfortunately no absolute rule like 'everything in Basic is attributes and everything else is ports'. While it holds (for now) true that everything in Basic is an attribute, especially Redshift also puts attributes into other tabs. They usually only appear in more complex scenarios when dealing with port bundles and variadic ports, but they exist. And just for clarity, attributes do not only exist on nodes that are what our API calls 'true nodes'¹, but also on other GraphNode types, e.g., a GraphNode representing a port. It is just that they are usually not rendered out to the GUI there and more of an internal nature (nodes have a lot of internal attributes). Cheers, Ferdinand ¹ GraphNode instances that represent what the end user would consider a 'node', e.g., the RS Reference node, and with that excluding GraphNode instances that for example represent an input port.
  • 0 Votes
    3 Posts
    626 Views
    chuanzhenC
    @i_mazlov Thanks
  • Xpresso python tag issue

    2025 python
    5
    0 Votes
    5 Posts
    753 Views
    A
    Ah, super! thank you.
  • BaseDraw.DrawTexture Issue

    2025 python
    3
    0 Votes
    3 Posts
    697 Views
    FlavioDinizF
    Fantastic @i_mazlov ! Both issues are solved, thank you so much ! Cheers, Flavio Diniz
  • Reading from the Project Settings

    c++ 2024
    3
    1
    0 Votes
    3 Posts
    608 Views
    D
    Hi @ferdinand, Sorry about missing that post. This exactly solved my problem, thanks. Dam
  • 0 Votes
    3 Posts
    605 Views
    D
    @ferdinand said in SAVEDOCUMENTFLAGS_AUTOSAVE still added to the recent file list?: But please provide instructions on how to use your code when required in the future. oh shit, i'm so sorry. you're right. completly missed this one. ... and of cause thanks for the explaination / clarification.
  • How to draw HDR bitmaps into a dialog?

    2025 c++
    4
    0 Votes
    4 Posts
    708 Views
    ferdinandF
    Hey @T1001, I am still not 100% sure how you all mean that. But in short what you are doing is not possible in the public API and also only to some degree in the internal API. First of all, Cinema 4D only supports HDR in the viewport and it must be enabled by the user: [image: 1744104813146-f4036fae-fdc3-44bd-bd44-b876a51f4699-image.png] I.e., viewport effectively means Drawport API. What the docs write there about the only the viewport is only semi true, because you can embed a drawport into a GeDialog (but that functionality is still not even semi-public I think, but we could change that in a future release). I am not quite sure what you mean by 'integrating a custom OpenGL pipeline into a plugin'. When I take this at face value, I would say you cannot do this. The Drawport API is an abstraction around effectively Vulkan and Metal. We do not write OS specific graphics API code anymore. This goes as far as that we have (sort of) our own shading language (MSL). You cannot just draw with OpenGL into a GeDialog, because that dialog will not be drawn with OpenGL and we also do not offer a direct access point to drawing handlers. I assume this all has something to do with implementing some kind of render buffer? I really would recommend then applying for the Maxon Registered Developer program to get access to the Drawport API. Just as a warning ahead, the Drawport API is not totally undocumented but not documented to the same degree as our fully public API. It is an API from graphics API experts for graphics API experts. You seem fairly knowledgeable there, so this might be just your thing, but you have been warned, there will be less hand-holding there. Cheers, Ferdinand