• [Python] Edit Parameters on nodes?

    5
    0 Votes
    5 Posts
    1k Views
    M
    Hi @sortsovs once you have the node, you need to retrieve the appropriate port. Be careful as some port can be nested. Then once you have the correct port, you need to call GraphNode.SetDefaultValue. When calling SetDefaultValue it is important to pass a maxon data as the current Python system is not able to automatically guess the expected result. Find bellow an example to create a Redshift Material with a Texture Node with a custom path and name. import c4d import maxon REDSHIFT_NODESPACE_ID = maxon.Id("com.redshift3d.redshift4c4d.class.nodespace") def CreateTextureNode(gr: maxon.GraphModelRef, nodeName: str, texturePath: str, isLinear:bool=False) -> maxon.GraphNode: # Start a transaction to inform the graph that a modification is going to happen with gr.BeginTransaction() as transaction: # Create a Redshift Texture Node and rename it textureNodeId = maxon.Id("com.redshift3d.redshift4c4d.nodes.core.texturesampler") texNode = gr.AddChild("", textureNodeId, maxon.DataDictionary()) texNode.SetValue("net.maxon.node.base.name", maxon.String(nodeName)) # Retrieve path and gammage override port path = texNode.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0").FindChild("path") gammaOverride = texNode.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0_gammaoverride") # Define the value stored by the node for these port when no connection exist gammaOverride.SetDefaultValue(maxon.Bool(isLinear)) path.SetDefaultValue(maxon.Url(texturePath)) # Push the change to the graph transaction.Commit() return texNode def main() -> None: # Create a BaseMaterial in the active document rsMat = c4d.BaseMaterial(c4d.Mmaterial) doc.InsertMaterial(rsMat) # Retrieve it node material part and create a Redshift Graph nMat = rsMat.GetNodeMaterialReference() nMat.AddGraph(REDSHIFT_NODESPACE_ID) gr = nMat.GetGraph(REDSHIFT_NODESPACE_ID) # Create a texture node albedoTexNode = CreateTextureNode(gr, "Albedo", r"C:/PathToATexture.jpg") c4d.EventAdd() if __name__ == '__main__': main() Cheers, Maxime.
  • Connect to asset database without Cinema4d?

    3
    0 Votes
    3 Posts
    1k Views
    C
    Thank you for the reply. Good information.
  • Forum email receiving delay

    2
    0 Votes
    2 Posts
    1k Views
    ferdinandF
    Hello @x_nerve, thank you for reaching out to us and bringing this up. the forum cannot be searched without registration. We had a quick internal discussion, and we agree, guests should be able to search the content of the forum. I have changed the settings; you can now also search as a guest for topics. Searching for users and creating topics intentionally remains disabled for guests. "Maxon One" has fully promoted the subscription system, but Plugin Cafe forum and Redshift forum accounts cannot log in to each other. I am not sure if I do understand what you mean with 'log into each other', but I assume you are talking about having automatically provided user accounts via your id.maxon.net account with which you also identify with the Maxon products you have licensed. This is first of all technically not trivial, but it would also lock out anyone who does not have a Maxon ID account. To be able to search over all forums, the forums would have to be integrated into one database or we would have to substantially modify the frontend (NodeBB in case of Plugin Café). In the close future there are no plans to do this. In the long term Maxon has some community management plans which might address the integration of multiple forums, but I can give neither a guarantee that this will happen nor an ETA. If such a system will be built, we will likely also use Maxon ID for authentication there. Cheers, Ferdinand
  • Floating license problem

    Moved
    2
    0 Votes
    2 Posts
    807 Views
    ferdinandF
    Hello @fss, Thank you for reaching out to us. We unfortunately cannot help you with this question here in the SDK Team as you are asking effectively for a feature in the Maxon App. While the C++ SDK has some licensing features, they are restricted to reading data, so you cannot just call an API to release the licenses yourself. You should ask your question to user support, because they are the right place for things concerning the Maxon App. What you might want to clarify there is what you mean by "defunct instances" and which app you are using. I assume from the context that you are using c4dpy with some Python scripts which sometimes crash c4dpy and then the license is not being released correctly. Which sounds like a bug which you then should report to user support. Cheers, Ferdinand
  • Set IRR settings

    3
    0 Votes
    3 Posts
    869 Views
    I
    Works like a charm, thank you!
  • developers.maxon.net - offline

    2
    0 Votes
    2 Posts
    626 Views
    ferdinandF
    Hello @indexofrefraction, Thank you for reaching out to us. FYI, developers.maxon.net is down since about 24 hours.... We were aware and were working on it, the site should now be accessible again. Please excuse the inconvenience. Cheers, the SDK Team
  • Looking for Scene Nodes Capsules Creators

    3
    1 Votes
    3 Posts
    932 Views
    d_keithD
    Hi All, Thank you so much for your interest and taking the time to apply. We ended up with more applicants than could fit in one workshop. If you received an email from me (Maybe in your spam folder? look for d_keith ) you've likely been accepted. If not, I do intend to host similar workshops in the future. Candidates were given priority based on: Prior programming expertise in C/C++/Python or similar languages. Interest and ability to actively participate in the lectures/homework projects. Availability to potentially create capsules for the Maxon Capsules Library in the future on a freelance basis. And for auditors, special preference was given to MAXON employees who will be documenting/developing/training Scene Nodes workflows. I hope to host similar workshops in the future and will prioritize previous applicants at that time. Sincerely, Donovan Keith
  • c4dpy "sysctl: No such file or directory"

    s26 python
    4
    1
    0 Votes
    4 Posts
    970 Views
    I
    Sorry for the late reply, my issue went away after reinstalling C4D so I forgot about it Thank you for your feedback
  • Python writing to desktop

    Moved python r25
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @Peek, without any further questions or other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022. Thank you for your understanding, Ferdinand
  • OBJ Sequence Importer

    4
    0 Votes
    4 Posts
    1k Views
    M
    Sorry it should be fixed now
  • ZeroConf error: Couldn’t get bonjour version [sys_bonjour.cpp(1725)]

    2
    0 Votes
    2 Posts
    655 Views
    ManuelM
    Hi, This forum is dedicated for questions from developers about our API. Your issue is a user issue, please contact our support for that question. Cheers, Manuel
  • overwrite the alembic file loading in c4d?

    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @atticuslv, as indicated in my last posting, this is not a programming question, as you do not invoke any of our APIs, and you should reach out to customer support with that question. We only deliver API related support here. Cheers, Ferdinand
  • [Python] LayerShader.AddLayer() -> Defining Shader

    4
    0 Votes
    4 Posts
    7k Views
    indexofrefractionI
    Hi... I'm trying to figure out how to handle nested LayerShaders mat.InsertShader(gradient_shader, sha_xlayer) inserts gradient_shader as a child of sha_xlayer ? Would sha_xlayer.InsertShader(gradient_shader) do exactly the same thing ? If yes, does mat.InsertShader(sha_xlayer) have to be done first as well, or can you set up a shader tree first and then add it to the material? best, index
  • How CINEBENCH_R15 set processor affinity?

    2
    0 Votes
    2 Posts
    693 Views
    ferdinandF
    Hello @sucky012, welcome to the forum and thank you for reaching out to us. This is a forum dedicated to plugin programming for Cinema 4D. The General Talk forum is our sort of Off-Topic forum, but your question is even out of scope for that. We will let your question remain in the forum, but you will not get an answer from the MAXON SDK Team, as Cinebench is simply not our area of expertise, and it seems also unlikely that the community will be able to answer this. When you want end-user support, you should contact them via a support ticket. But I somehow doubt that CINEBENCH 15 is still in the support cycle. But I might be wrong about that. Cheers, Ferdinand
  • Script Request: Multiple STL file Export

    2
    0 Votes
    2 Posts
    696 Views
    ferdinandF
    Hello @prowl, Welcome to the forum and thank you for reaching out to us. I am not sure how your posting is meant. Are you looking for a developer or are you looking for support for developing a solution yourself? If the latter is the case, then you are posting in the wrong sub-forum. When you are indeed looking for a developer, then you are in the right forum. If this is a task which you could solve on your own depends on the details of what you want to achieve, but the principal logic is not that hard to realize. Assuming that you want to implement your idea in Python: Use c4d.utils.SendModelingCommand and the command identifiers for Current State to Object and Connect and Delete to collapse some geometry as you would do it manually in Cinema 4D. Use c4d.documents.SaveDocument with c4d.FORMAT_STL_EXPORT to export the output of the modelling commands. As lined out in the forum guidelines, we cannot design applications for users. There can be things which complicate this simple task (like for example collecting dependencies in a scene). If you do not want to take the risk of being overwhelmed by your task, you should hire a developer. In general, I would say this is a manageable task for a beginner. The Maxon SDK Team will be happy to answer further questions when you decide to implement this yourself. But you must provide code and specific questions related to our APIs. Cheers, Ferdinand
  • Cinema4D CAD Translator SDK

    3
    0 Votes
    3 Posts
    806 Views
    C
    Very good. Thank you for the response and guiding me towards the appropriate channel of communication for this. Best, Clayton
  • Calling a blocking Plugin

    4
    0 Votes
    4 Posts
    968 Views
    FSSF
    Understood.
  • Zertificates for developer documentation expired yesterday

    6
    0 Votes
    6 Posts
    1k Views
    fwilleke80F
    Working again, thanks!
  • Looking for Developer of custom Mograph effector

    3
    0 Votes
    3 Posts
    795 Views
    CairynC
    Done and delivered.
  • Script request: Automatic scale UVW map to a specific size

    Moved
    4
    1
    0 Votes
    4 Posts
    911 Views
    a_blockA
    Well, helping out is generally my business. Although I have to admit, I have some problems understanding the actual goal. If you like, contact me via job AT andreasblock DOT de