• Output Current Sound Track Name

    Cinema 4D SDK python r20
    12
    3
    0 Votes
    12 Posts
    3k Views
    S
    Hello, it seems you just write the name of the last track into your user data field: obj[c4d.ID_USERDATA,19] = trak.GetName() Since you do not extend that string, it can only show one name. best wishes, Sebastian
  • 0 Votes
    3 Posts
    783 Views
    B
    HI @r_gigante Thanks for the response. With regard to 2CV-only Bezier curve: Yes, I only need 2 CV maximum. I understand that it will not interpolate complicated shapes properly but as you can see in my example, it's only a simple shape. Looking at it now. I have a feeling I am biting more than I can chew. I'm not sure I can solve it at the moment given my current knowledge. Will just perform it manually at the moment. Anyhow, thanks for responding. Have a great day ahead!
  • 0 Votes
    7 Posts
    1k Views
    M
    Please consider to sets the topic as solved if it's the case. Cheers, Maxime. EDIT: I've done it, but feel free to set it back to Open if you feel the need to ask more questions.
  • access sound attributes using python API

    Cinema 4D SDK r20 python
    7
    0 Votes
    7 Posts
    2k Views
    M
    Hey @mrittman, i cant find the id names in documentation but i think CID_SOUND_START would be the timecode of when the audio starts (notice you are assigning a BaseTime object to it) CID_SOUND_NAME which i'm using is the audio file path. My application is taking the audio file path and the image sequence output (as defined by the render output settings) and combining them via a subprocess using ffmpeg. If there was a way i could do it straight through c4d id prefer that! Mainly cos ffmpeg is a mission! especially when you need to shift/delay audio and what not.
  • Define your own icons for mouse cursor

    Cinema 4D SDK r20 python
    5
    0 Votes
    5 Posts
    882 Views
    P
    Ok, something to think about and to consider.
  • Frame selected objects correctly in camera

    Cinema 4D SDK python r19
    13
    0 Votes
    13 Posts
    3k Views
    r_giganteR
    Thanks a lot @AndreAnjos for sharing the code. I'll try to have a look at it and maybe contribute if/where needed. For the time being I'm glad to hear that you were able to tackle with it. Cheers, Riccardo
  • 0 Votes
    6 Posts
    2k Views
    P
    Yes it is! Thank you very much!
  • Python Tag Priority Problem

    Cinema 4D SDK r20 python
    7
    0 Votes
    7 Posts
    1k Views
    B
    Works as expected. Thank you @m_adam for getting back to me. Have a great day ahead!
  • DrawLine2D on top of everything else

    Cinema 4D SDK r20 python
    6
    0 Votes
    6 Posts
    1k Views
    P
    Thanks. Pim
  • 0 Votes
    3 Posts
    729 Views
    CairynC
    @m_adam Oops. Okay, GeRayCollider works only for polygon objects, as does GetPixelInfoPolygon. The idea was to provide a new selection method for arbitrary objects by just checking all hits of a scattered PickObject within a radius, and then select the nearest hit. For that, I need to be able to hit splines and parametric objects as well. Okay, I guess I can still do that in C++ then, thanks.
  • Get Message from TreeView gui dialog

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    625 Views
    S
    Hello, SendParentMessage() is a member function of GeUserArea. It is only relevant if you create a custom GUI element based on GeUserArea. A class based on TreeViewFunctions is used to define the behaviour of a TreeViewGUI. It is not based on GeUserArea. In TreeViewFunctions, you could inform the host GeDialog about an event by sending a custom core message using SpecialEventAdd(). The GeDialog can catch this message with CoreMessage(). If you want to send data, one way is to store the data in a global variable which is then accessed by the dialog. best wishes, Sebastian
  • STEP/STP FILE IMPORT PYTHON DOCUMENTATION

    Cinema 4D SDK r20 python
    5
    0 Votes
    5 Posts
    4k Views
    T
    @mp5gosu @m_adam I'll test out these options and see how it works out. Thanks for the information guys, I appreciate it!
  • DeformCache Update

    Cinema 4D SDK r19 python
    3
    0 Votes
    3 Posts
    542 Views
    chuanzhenC
    @m_adam Thanks
  • TreeView: How to insert dragobject as new item

    Cinema 4D SDK r20 python
    2
    0 Votes
    2 Posts
    456 Views
    mikeudinM
    Solved. There is TREEVIEW_OUTSIDE_DROP option.
  • SpecialEventAdd and structures / containers

    Cinema 4D SDK r20 python
    2
    0 Votes
    2 Posts
    420 Views
    M
    Hi @pim, In Python, SpecialEventAdd can only pass integer value, so the sender part can store the data into the document BaseContainer send the SpecialEventAdd/ Process this event read back the data from the active document BaseContainer. You can find valuable information on this topic https://developers.maxon.net/forum/topic/8219/10712_pluginmessage-and-pycobject-solved/5. Cheers, Maxime.
  • Send message to tooldata

    Cinema 4D SDK r20 python
    4
    0 Votes
    4 Posts
    1k Views
    P
    @C4DS said in Send message to tooldata: PrepareData Your first answer works great! Thank you.
  • Drag&Drop in Editor window

    Cinema 4D SDK r20 python
    3
    0 Votes
    3 Posts
    524 Views
    P
    Yes - dragging session only occurs in a 2D space - I thought so. Thanks.
  • Transform mouse coordinates to c4d coordinates

    Cinema 4D SDK r20 python
    5
    0 Votes
    5 Posts
    1k Views
    P
    Thanks for the answer. I just started with a command plugin. New requirements emerged and yes, perhaps I now change over to a tool plugin.
  • Compute the Area of an Irregular Polygon?

    Moved General Talk r20 python
    6
    0 Votes
    6 Posts
    2k Views
    r_giganteR
    Hi Bentraje, thanks for following up and sorry for coming late here. I've checked your geometry and the issue is not with the algorithm, but in both cases with the geometries you're using to compute the area who don't shown vertexes being properly "ordered". The algorithm I've briefly presented requires the vertexes to be ordered as if you're visiting them by walking on the outer edge of your n-gon or polygon in CCW or CW. It is then mandatory to generate an ordered list of vertexes before passing the data to the function to get the correct result. [image: 1553532189426-62d2c929-154a-4c85-b558-af1536d3153d-image.png] In order to come out with such an ordered list I warmly recommend you to visit the following old-threads: Get all ngons PolygonObject.GetPolygonTranslationMap() Get outer edges of each Ngon Best, Riccardo