• How to select directories in a CUSTOMGUI_FILENAME?

    Cinema 4D SDK s26 python
    3
    0 Votes
    3 Posts
    846 Views
    P
    Hi @ferdinand , Thanks a lot, that's exactly what I was looking for ! flags: c4d.BaseContainer = c4d.BaseContainer() flags[c4d.FILENAME_DIRECTORY] = True # Add a CUSTOMGUI_FILENAME with our flags settings. self.AddCustomGui(id=MyDialog.ID_FILENAME, pluginid=c4d.CUSTOMGUI_FILENAME, name="Path", flags=c4d.BFH_SCALEFIT, minw=0, minh=0, customdata=flags)
  • 0 Votes
    13 Posts
    3k Views
    ferdinandF
    No worries, everything is fine, that is what we are here for, to clear up things. When you have questions I encourage you to open a new thread so that we can see what we can do. And this is also an open forum, so you can ask questions to the community if you want to. But unless pointed out specifically otherwise, we assume things to be support requests. Cheers, Ferdinand
  • Can i get global input event ?

    Cinema 4D SDK python s26
    3
    0 Votes
    3 Posts
    440 Views
    gheyretG
    @ferdinand Wow~ Thank you so much bro
  • Get Node By Name?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    395 Views
    B
    @Manuel Ah gotcha. It's only available R26 onwards. That's why I can't see something related in my R25 documentation.
  • String values for the "FindChild"?

    Cinema 4D SDK python r25
    13
    0 Votes
    13 Posts
    2k Views
    B
    @Manuel Gotcha. Thanks for the clarification. Sorry for the trouble. Works as expected. Will close this thread now.
  • Plugin works with R23 and doesn't work with S24.

    General Talk python r23 s24
    4
    0 Votes
    4 Posts
    1k Views
    K
    Got it. Thank you.
  • Include Description in the Search Documentation?

    General Talk r25 python
    5
    0 Votes
    5 Posts
    911 Views
    B
    @ferdinand Uhm. It's not as complicated as that. I mean it is complicated per se but there are already existing solutions. Check "Sphinx Search Extension". There are several. Pip install it and just insert it into the conf.py file. Also, it's not really as spicing it up per se. I mean it is but not really. It's just adding a sub paragraph section. The maxon redshift documentation is already doing it. And even if you are using sphinx implementation, it's also existing. Blender documentation is built using sphinx. [image: 1666619696194-8579cd6b-d0a4-4844-9563-5ee4d390a1e3-image.png]
  • Undo for InsertUnder() is not right. Why?

    Cinema 4D SDK python
    4
    4
    0 Votes
    4 Posts
    967 Views
    ferdinandF
    Thanks! Sorry, I am so careless that I ignore the message "Needs to be called before the change.". No worries, you are not the first one who trips over Undo call order, including myself at some point
  • Python. Cinema4d. All iterations in the Text value

    Cinema 4D SDK
    9
    2
    0 Votes
    9 Posts
    2k Views
    S
    @ferdinand thx very much! ill save this
  • 0 Votes
    5 Posts
    623 Views
    B
    @manuel ah gotcha. the node kinda. thanks. will close this thread for now.
  • Get asset from asset browser python

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    2k Views
    K
    @ferdinand Thanks a lot Ferdinand for this detailed and complete answer! This is exactly what I hoped to do! I tested the code and it works great! Since a few of the fixes you use are not recommended, i will solve it in another way for now, until it gets fixed for python, or i switch to C++. I got my plugin doing what i want, for the moment. Pretty sure this will also help someone else in the future. Have a nice day!
  • Sample Code for Connecting Ports/Nodes?

    Cinema 4D SDK r25 python
    4
    1
    0 Votes
    4 Posts
    513 Views
    ManuelM
    hi, There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither. Cheers, Manuel
  • older documentation links?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    376 Views
    B
    @fwilleke80 Gotcha thanks for the confirmation. So I guess they don't host it online? But man they are already using sphinx. They can easily have a button to switch to previous versions. But oh well.
  • Access Spline Field Parameters with XPresso

    Cinema 4D SDK python s26
    3
    0 Votes
    3 Posts
    953 Views
    I
    Thank you for the elaborate reply, it worked! (And helped me to better understand the desc id system)
  • Is it possible to change active view?

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    655 Views
    ferdinandF
    Hello @lingza, Thank you for reaching out to us. In short, what you want to do is unfortunately not possible. To unpack things a bit, I understood your question as such that you have multiple view panels in your layout and each view panel contains multiple views. The screen below shows two view panels with four views each for example. [image: 1665048050441-screenshot-2022-10-06-at-11.20.38.png] You then want to toggle a view panel from showing all its views (depending on the panel layout) to singular one, e.g., "minimize and maximize" the Perspective view in the second panel. For that you wanted to use c4d.CallCommand(13640) and therefore need to set the active view (the view with the grey border). Internally, there is a non-public method called BaseDocument::SetActiveView which handles setting the selected viewport and one has more or less all tools in the Python SDK to replicate it (you more or less just have to set BIT_ACTIVE and send some messages). And while doing this will have some effect on the selection state of viewports, it will not be identical to what you can achieve with mouse interactions, and running then your CallCommand(13640) on such 'semi-selected' viewport will not have the desired effect. In the end, the viewport selection state is bound to a very specific call chain in our internal API. Which is probably the reason why the method BaseDocument::SetActiveView remains non-public. FYI: This is not a Python issue, the same applies to C++, I tried it there too, to the same effect. Cheers, Ferdinand
  • GetSplinePoint REVERSE

    Cinema 4D SDK python
    3
    1
    0 Votes
    3 Posts
    1k Views
    Caleidos4DC
    Thanks ferdinand I will treasure your help. Thank you very much!
  • Material and Shader Questions

    Cinema 4D SDK python s26
    3
    0 Votes
    3 Posts
    466 Views
    gheyretG
    @m_adam OK~ Thank you so much!
  • Why does "Symbols Parser" not work?

    Cinema 4D SDK python
    3
    3
    0 Votes
    3 Posts
    732 Views
    L
    Great!!! It runs. You are right. Thank you so much! I think your answer is worth being written in the API document to make the workflow more clear.
  • 0 Votes
    3 Posts
    848 Views
    chuanzhenC
    @ferdinand Thanks for your help!
  • 0 Votes
    6 Posts
    1k Views
    DunhouD
    I find a way to read aovs and render container , if I had some times I will post a create Read Octane Post from typing import Optional import c4d SET_RENDERAOV_IN_CNT=3700 SET_RENDERAOV_INPUT_0=3740 RNDAOV_TYPE=995 RNDAOV_ENABLED=994 doc: c4d.documents.BaseDocument # The active document op: Optional[c4d.BaseObject] # The active object, None if unselected c4d.CallCommand(13957) #clear console def main() -> None: rdata = doc.GetActiveRenderData() vpost = rdata.GetFirstVideoPost() OctaneRender_ID = 1029525 octVp=None # rdata[c4d.RDATA_RENDERENGINE] = OctaneRender_ID while vpost: print(vpost) if vpost.GetName() == "Octane Renderer": octVp=vpost vpost = vpost.GetNext() if octVp: aovCnt = octVp[SET_RENDERAOV_IN_CNT] print ("--- OCTANERENDER FOUND ---") print(octVp) print ("Buffer:",octVp[1010]) print ("Color space:",octVp[1028]) print ("AOV count:",aovCnt) for i in range(0,aovCnt): aov = octVp[SET_RENDERAOV_INPUT_0+i] enabled = aov[RNDAOV_ENABLED] type = aov[RNDAOV_TYPE] print ("AOV1:",aov," type:",type," enabled:", enabled) if type==185: # cryptomatte print (" crypto_type:",aov[1821]) if type==255: #z-depth AOV print (" z-depth max:",aov[3392]," env.depth:",aov[3397]) if __name__ == '__main__': main()