• Slow Python in R20 ?

    Cinema 4D SDK r19 r20 python
    4
    0 Votes
    4 Posts
    1k Views
    M
    After a reboot, I'm able to reproduce it again... I will create a bug report and more testing after Season's Greetings & SDK Team Vacation. Anyway thanks a lot. Cheers, Maxime.
  • 0 Votes
    3 Posts
    1k Views
    M
    @m_adam wow! I did what you say,it works!! you are so cool!! thank you very much!!! yeah!!
  • How to get spline offset by spline point index ?

    Cinema 4D SDK python
    13
    0 Votes
    13 Posts
    3k Views
    ferdinandF
    Hi @everyone, as a little disclaimer, this is my private take on this topic. Cinema does calculate the length of a spline (at least with SplineHelp) in a rather unpretentious fashion as the sum of the Euclidean norms of the underlying LineObject segments, i.e., there is no fancy arc-length calculation going on. Which makes sense in Cinema, since the discrete LineObject is what does effectively count, and not the smooth SplineObject. Since you can get access to the LineObject of a SplineObject and also convert between SplineObject and LineObject vertex indices with SplineHelp.SplineToLineIndex() , this also means that you can both calculate the length of spline as a total and up to a specific vertex. Which then should mean that you can calculate the relative offset for a spline vertex yourself. Practically you can cut out the SplineObject altogether when sampling a spline and just use its associated LineObject. The one nice thing that SplineHelp does for you is though, that it implements a parallel transport for the frames of spline points for you. I.e., realizes that the normals of spline points point into a direction humans would consider "correct" (mathematically these normals are not correct, due to them being modified by parallel transport, but they will look smoother, won't flip when then curvature of the spline flips). Cheers, Ferdinand
  • 0 Votes
    5 Posts
    2k Views
    D
    @s_bach i see. thx, nevertheless. well, as said, the only way to avoid that collision seems to be: put the plugins into the plugin-folder of the main application. while discussing the other part of my problem (see symbolcache-topic) on other forums (the german c4dnetwork, that is), it became apparent, that other ppl also do have those collision-messages with r20 - and they, too, do not experience those plugins to be not working. if at any time this "problem" should become of interest for you, let me know, if there's something that i could do/deliver/add any detail, to support you in your efforts. cheers, mesut.
  • 0 Votes
    10 Posts
    2k Views
    DunhouD
    @m_adam Thanks a lot for this example A big shout out !
  • Quit Cinema after SAVE_AFTER message

    Cinema 4D SDK r20 python
    3
    0 Votes
    3 Posts
    699 Views
    B
    Hi @m_adam! Thank you for your response. I looked for a way to mark the post as a question while submitting, I didn't think to look at the submitted post again for that option. I'll remember next time. KillDocument and Exiting were never ment to run consecutively, they were just two things I wanted to try for different scenarios. I should have clarified that. StopAllThreads() unfortunately wasn't enough, but adding in a small message plugin to trigger the exit from the CoreMessage() did the trick. I'm now changing a global boolean for the CoreMessage() to look for. Is that what you had in mind? Thank you for your help, everything works now. I'll make sure and try and find the "mark as solved" button on my way out Edit: I can't actually mark your comment as the solution, only this one...
  • Shortcuts for buttons from gui.GeDialog

    Cinema 4D SDK r20 python
    4
    0 Votes
    4 Posts
    1k Views
    FlavioDinizF
    Thanks a lot @C4DS @m_adam ! So I think it's better to create separate CommandDataplugins to perform the same action of each button, it's less complicated and allow the user to change the keyboard shortcuts and exclude the need of the GUI being always open. Although the m_adam suggestions may be useful for other plugins ideas I have. I'll try it later. Thanksss !
  • Bevel selection after a CSTO

    Cinema 4D SDK python r20
    2
    3
    0 Votes
    2 Posts
    515 Views
    a_blockA
    Hi Pim, no, I don't think so. Basically the Selection tag reacts to MSG_POINTS_CHANGED and MSG_POLYGONS_CHANGED, in the end adding or removing the needed amount of points or polygons in the selection array. But there's no information, what to do with for example additional points. And so it heavily depends on where the new points/polygons are added and also which tool does so, what the outcome for those selected entities will be. Something that will probably be addressed in future with the CustomDataTag introduced in R20. Cheers, Andreas
  • Checknames option

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    871 Views
    P
    Works great, thanks. -Pim
  • 0 Votes
    2 Posts
    834 Views
    M
    Hi @pyr, In Python, there is a GIL which do not allow Python by design to execute something in parallel. In Cinema 4D all our functions (so everything which is in the c4d python module) is "GIL safe" in order to avoid any issue with Python memory. So in Cinema 4D thread are designed for doing GUI, or background stuff. Moreover, keep in mind creating a Thread have a cost in term of time (to create, execute, delete them). Finally, I would like to point you to multiprocessing vs multi-threading. Note that since it's more an algorithm problem than an issue related to our API, we can only provide you hints. btw, I also turned your topic as a question. See Q&A New Functionality. Cheers, Maxime.
  • Bevel Object Type

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    722 Views
    P
    Thanks. And yes, I used that value already. -Pim
  • 0 Votes
    3 Posts
    863 Views
    A
    Amazing! Thank you again Andreas!
  • Confusing ToolData content

    Cinema 4D SDK python c++ r19 r20
    20
    1 Votes
    20 Posts
    5k Views
    S
    Congrats on the new forum! it is very informative About time
  • Objectdata and Bevel objects

    Cinema 4D SDK python r20
    6
    2
    0 Votes
    6 Posts
    2k Views
    P
    Hi Riccardo, I am not sure what you mean, but I guess you mean that you define selection tags on one of the children and use that selection on the resulting objectdata object? -Pim
  • Please help - Python script

    Cinema 4D SDK python
    3
    1 Votes
    3 Posts
    965 Views
    a_blockA
    Hi, I'm afraid @Cairyn already contributed everything we could. We need to leave this to the community. Sorry. I have moved this to the General Programming & Plugins Discussions category, as I don't regard it as a very C4D specific question. Please, correct me, if I'm wrong. Cheers, Andreas
  • SetDocumentData options for exporting

    Cinema 4D SDK r20 python
    4
    0 Votes
    4 Posts
    1k Views
    M
    Hi @Rage I guess export_OBJ example on our Github repository is what you are looking for. Note for the moment values of the BaseContainer are not available in the Python Documentation. But you could find them in the C++ documentation about fobjexport2.h. If you have any question please let me know. Cheers, Maxime.
  • 0 Votes
    5 Posts
    1k Views
    a_blockA
    I forgot to turn this thread into a question. Done now, and as I regard the last post as a "solved" message, I also marked it as solved. Please, don't hesitate to turn back to unresolved, if I was wrong.
  • RestartApplication() / c4d.RestartMe()

    Cinema 4D SDK c++ python classic api
    4
    0 Votes
    4 Posts
    956 Views
    a_blockA
    Sorry, in contrary to what I had written here before, we will not add RestartApplication() to the documentation. These calls have certain intricacies, so their use will be at own risk. This is now based on an answer from our development. Cheers, Andreas
  • Clear LinkBox field

    Cinema 4D SDK python r19 windows
    3
    0 Votes
    3 Posts
    1k Views
    A
    Hi Andreas, Thank you very much! It works like a treat and I appreciate your thorough explanation! Happy Friday! Andre
  • PySide2 Integration

    Moved General Talk python
    8
    1 Votes
    8 Posts
    3k Views
    M
    @Aeoll Additional question: I'm creating a QApplication and then a QDialog but I can't seem to close the QApplication at all when the dialog is | closed? This means even when C4D is closed normally it's still running in the background and needs to be force-quit. Any | suggestions appreciated I have the same issue with PySide. You mentioned that sole this issue. Could you Help me?