• Sample Code for Connecting Ports/Nodes?

    Cinema 4D SDK r25 python
    4
    1
    0 Votes
    4 Posts
    497 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
    366 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
    871 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
    621 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
    925 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
    452 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
    680 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
    785 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()
  • "Render Marked Takes" Command via Python?

    General Talk python s26
    3
    0 Votes
    3 Posts
    805 Views
    delizadeD
    Hi Manuel, Thank you for your help.
  • 0 Votes
    5 Posts
    1k Views
    jochemdkJ
    Done, didn't know I could do it myself :}
  • Copy info from one Object to other Object

    Cinema 4D SDK python s22
    5
    0 Votes
    5 Posts
    2k Views
    John_DoJ
    @Manuel Thanks ! Still here in 2024.5.1
  • Cinema 4D 2023 None bug

    Cinema 4D SDK sdk python windows
    3
    2
    0 Votes
    3 Posts
    631 Views
    DunhouD
    @ferdinand I Check with my home PC in R 2023, It works fine , And for some reason , It report a none last time I am pretty sure I have not insert a layer field in fieldlist ( I just miniest the scene for test code ) , But when I resart C4D today this none warning just gone Maybe It is just a oolong events I make some thing I don't know . Sorry for that . And Thanks for the TIPS , next post I will take a more spesific report cheers~
  • Force VertexMap display

    Cinema 4D SDK python
    18
    0 Votes
    18 Posts
    4k Views
    ymoonY
    @ferdinand, Is it possible to VertexColor, WeightMap(character rig) in the same way? Some games use VertexColor, so marking can always be useful. I tried to convert your code to VertexColor, but I lack knowledge. Please help us.
  • 0 Votes
    8 Posts
    3k Views
    DunhouD
    @ferdinand Thanks for the detailed explain I think DescriptionCustomGui is the best way to solve this for now . With learning furthur , maybe I will try a C++ version , but for me it's not time . Anyway , It is helpful for this techniclly explain and the example
  • Render Settings change Save state

    Cinema 4D SDK python s22
    8
    1
    0 Votes
    8 Posts
    1k Views
    chuanzhenC
    @ferdinand Thanks you for your help!
  • 0 Votes
    7 Posts
    1k Views
    DunhouD
    @ferdinand Thnaks for your help, I think it is enough for this specific toppic . It work as espected
  • how to Scroll UserArea

    Cinema 4D SDK s22 python
    7
    1
    0 Votes
    7 Posts
    2k Views
    chuanzhenC
    @m_adam Thanks for your help,great work!
  • How to detect click on a item in InExclude list?

    Cinema 4D SDK python
    10
    0 Votes
    10 Posts
    2k Views
    M
    Hi with the 2023.1 release, the method InExcludeData.GetData have been added to the Python SDK. Cheers, Maxime.
  • 0 Votes
    11 Posts
    2k Views
    R
    Since I know exactly what methods access/check/change the self.xxxx variables, it is a risk I'm willing to take As for the solution, I removed the c4d.EventAdd() and at the GetContour method I was simply calling the function that was creating the spline. Now I perform a few checks for "dirtyness" and only after they show that something is dirty, I call the function to produce the spline.