• 0 Votes
    4 Posts
    1k Views
    T
    Hi @ferdinand, your links really helped me a lot, and I managed to write a script that starts a render and sends the rendered image to a web service. Can the SDK grab the live preview image from the redshift IPR? I assume not looking at the documentation: https://developers.maxon.net/docs/py/2023_2/search.html?q=redshift&check_keywords=yes&area=default
  • DrawView update ISSUE

    python
    7
    0 Votes
    7 Posts
    1k Views
    i_mazlovI
    Hi @mdk7b2, Glad to hear and thank you for sharing your solution! Good luck and let me know if you have any further questions. Cheers, Ilia
  • Active Controls

    sdk r20 c++
    5
    1
    0 Votes
    5 Posts
    997 Views
    J
    Thanks for the response. That's what I figured would be the case.
  • How to access Volume Data?

    3
    0 Votes
    3 Posts
    890 Views
    C
    Hello @ferdinand , First of all thanks a lot for your answer, it does exactly what I was trying to achieve, print the names of the volume grids stored on a Volume Loader with Python, I just added the GetName() on the last loop for that. Sorry about the rule violation, I thought it was a good idea to have the C++ and the Python code equivalent at the same place because of the same reason that you mentioned, if someone was looking for doing this they could find both versions at the same place, also as you mentioned, sometimes it can be tricky to decide when something is on-topic or not. Here is the updated code with the grid name: """Demonstrates accessing volume caches. Volumes are composed differently based on part of application using them but this script demonstrates how most of them can be accessed. """ import c4d doc: c4d.documents.BaseDocument # The active document op: c4d.BaseObject | None # The active object, None if unselected def main() -> None: """ """ if not op: return # Volume output is contained in the caches of objects. In this case an Ovolume is directly # the cache content of some tangible scene object. cache: c4d.BaseObject = op.GetCache() if cache.CheckType(c4d.Ovolume): print (f"{cache = }") # Sometimes, e.g., Pyro, volumes are loaded from VDB files on disk, in that case the loading # tangible scene object usually holds a Ovolumeloader as the first child of its cache. if cache.CheckType(c4d.Ovolumeloader): cache = cache.GetCache() # Many things contain not only a singular volume but sets of them. Which then hold their content # as children. Stuff can get more complex as always the case with caches in Cinema 4D, but the # cache structure of a Pyro Output object loading data from disk could look like this: # # PyroOutput # Cache: Ovolumeloader # Cache: Ovolumeset # Child: Ovolume (Color) # Child: Ovolume (Density) # ... if cache.CheckType(c4d.Ovolumeset): cache = cache.GetCache() for item in cache.GetChildren(): print (f"{item = }") print ("grid name = " + item.GetName()) if __name__ == '__main__': main()
  • Annotation tag without bubble

    sdk
    5
    0 Votes
    5 Posts
    818 Views
    S
    @ferdinand many thanks, I think that the topic is closed! You're amazing!
  • access the layers in the shader layer

    python
    10
    0 Votes
    10 Posts
    2k Views
    JH23J
    Hi @i_mazlov , This solves my problem, for now I don't think I have another question, and I could consider my problem solved, thanks. cheers, James H.
  • ToolData.MouseInput() how to get right mouse click?

    python
    3
    0 Votes
    3 Posts
    655 Views
    J
    @i_mazlov Hi, thanks for letting me know that. cheers~
  • Creating object in CommandData does not update Object Manager

    c++
    2
    2
    0 Votes
    2 Posts
    527 Views
    M
    Hi sadly this is a known issue, see EventAdd is not working. Cheers, Maxime.
  • python script, is "add to hud" possible to add to my python script?

    r21 python
    3
    0 Votes
    3 Posts
    723 Views
    T
    would love to see that being added. the HUD is amazing for internal tooling
  • Not working FieldLists Keyframes and Tracks

    python r23
    3
    1
    0 Votes
    3 Posts
    596 Views
    mikeudinM
    @ferdinand Thank you! That was TranslateDescID issue!
  • How to understand GraphModelInterface.AddChild().

    2023 maxon api windows python
    11
    2
    0 Votes
    11 Posts
    2k Views
    DunhouD
    Hi @m_adam , I have ask what are main functions in redshift do in redshift forum, but get no reply for week. and the help(redshift) also give me an ambiguous result. But anyway, I have something here, I will update it and publish when I have free times.
  • Retrieve GvNodeMaster from Xpresso Editor/Manager

    python 2023
    3
    0 Votes
    3 Posts
    648 Views
    T
    Hello @ferdinand ! Thank you for such a fast reply! Looks like c4d.modules.graphview.GetMaster(0) does the trick, I was confused at first about "id" in the arguments, but looks like 0 really gives the current active GvNodeMaster! Cheers, Max.
  • Updating a spline

    Moved
    3
    0 Votes
    3 Posts
    677 Views
    KantroninK
    @ferdinand I made this function which works fine: def spline_update(doc,spline,tabNewPoint): tabPoint = spline.GetAllPoints() dim = len(tabNewPoint) if len(tabPoint) != dim: spline.ResizeObject(dim) for i in range(0,dim): point = tabNewPoint[i] spline.SetPoint(i,point) spline.Message(c4d.MSG_UPDATE) return spline
  • Loading in a framesequence to the pictureviewer (EXRs)

    python
    5
    0 Votes
    5 Posts
    928 Views
    G
    Loud and clear! Thankyou!
  • Setting Noise as the Shader in a Displacer

    python 2023
    4
    0 Votes
    4 Posts
    934 Views
    P
    Ok, I understand it now better, thanks.
  • Python CallCommands Are Not Executed When Using Nodes?

    2023 python
    9
    0 Votes
    9 Posts
    924 Views
    ferdinandF
    Hello @bentraje, please excuse the delay, but this bug has been fixed in 2023.2, your code from above should work properly now. Cheers, Ferdinand
  • Change textures path from GetAllAssetNew in the new node editor

    python
    4
    0 Votes
    4 Posts
    2k Views
    ferdinandF
    Hello @Tng, Please excuse the very long waiting time, I simply overlooked the question in your answer. One question regarding Assets from the asset browser, in the case of a random machine that is rendering via command-line, is the Asset stored in the Project File or will it be downloaded if's missing ? Assets will be automatically downloaded when they are accessed and not already localized. The type maxon.Url hides all that complexity away with its different URL schemes. The Asset API manual provides an example for how to manually download an asset. But doing that is not possible in the Python API, here one must always rely on the automated asset access mechanisms. Assets can be stored in project files (via BaseDocument.GetSceneRepository) but are usually not, and instead reside in the user preferences directory bound user preferences repository. Once a remote asset has been accessed, a copy of its primary data, e.g., the texture, the model, etc., resides as a cache in the user preferences of that Cinema 4D installation. That cache will only be updated when the primary or secondary (i.e., metadata) of that asset change. Cheers, Ferdinand PS: I have closed this thread due to its age. Please feel free to reopen it when you have more questions.
  • After id exeetzer axis alignment

    r21 python
    4
    2
    0 Votes
    4 Posts
    889 Views
    ferdinandF
    Hello @WDP, Please excuse the very long delay, but I have to overlooked your answer here. But as stated in my initial posting, we can only provide support on concrete technical questions. If I remember correctly, there was another thread preceding this one where the same rule had been lined out, which is why I was as strict in my answer here as I was. And while we understand that this line of questions usually does not come from a bad place when asked by less experienced Python users, we ultimately cannot provide full solutions or even write applications. What might get you (and other information seekers) started on this subject is the operation_transfer_axis_s26.py code example, as it manipulates the "axis" of an object. I have closed this topic due to the lack of an eligible support request. Please feel free to open a new question when you have tangible coding problem for that subject. Cheers, Ferdinand
  • Creating and initializing nested ObjectData

    c++
    5
    0 Votes
    5 Posts
    1k Views
    M
    Hi @CJtheTiger, the most modular way would be the second one with Message, since it does not require you some weird casting and its pretty generic, so if you change your design you can still rely on the same message to do the things. But there is no wrong way, the one that work the best for you is probably the better. With that's said there is also the MultiMessage method that let you send a message directly to multiple objects according to their hierarchical position via the MULTIMSG_ROUTE input flag. Finally to retrieve the implementation (the NodeData) of a GeListNode(the instance) you can call instance->GetNodeData<Child>() Cheers, Maxime.
  • Custom XPRESSO graph editor, show nodes in object manager

    s26 sdk
    10
    0 Votes
    10 Posts
    2k Views
    F
    Great, thanks a lot for looking into this and for the detailed explanations! Now I know better what my options are! I am marking this thread as "solved". Best regards Filip Malmberg