• 0 Votes
    15 Posts
    2k Views
    beatgramB
    @m_adam Oh, that's a little update for many users but huge for tiny developers like me! Thank you so much for the heads up.
  • GroupBorderNoTitle change GUI or flags after user input

    Cinema 4D SDK
    4
    0 Votes
    4 Posts
    788 Views
    ferdinandF
    Hi @mogh, thank you for reaching out to us and thank you @mp5gosu for providing help. I think the most meaningful thing I can say is that GeDialog is pretty forgiving and not as strict as the sum of its methods might imply; at least that was my insight to be gained when I encountered the class first. Since you said you consider this to be still rough, here are some tips that might be helpful. All following method references are members of GeDialog. You can define and load file based resources for dialogs, just like it is implicitly done with descriptions, with LoadDialogResource. This helps to clean up GeDialog implementations from the inherent clutter that comes with complex interface definitions. You can also do this to some extent in a modular fashion, i.e., invoking LoadDialogResource multiple times will not replace the former content but instead append new content. CreateLayout is mostly a convenience method. Or in other words, there is nothing which does prevent you from modifying the resource of a dialog from anywhere else where you have access to the dialog instance (be careful with threading though). Resources are organized in groups and you can flush these groups with LayoutFlushGroup, for example to rebuild them on user interaction. Single arbitrary elements can be removed by invoking RemoveElement. The relevant methods are all grouped under Dialog Change Methods in the GeDialog documentation. If anything remains unclear, please do not hesitate to ask. Cheers, Ferdinand
  • Drawing to Multiple Views at Once

    Cinema 4D SDK r23 python windows
    5
    0 Votes
    5 Posts
    635 Views
    ?
    @ferdinand That's very helpful, thank you!
  • Thinking Particles- How to Set "Settings"

    Cinema 4D SDK r23 python
    5
    0 Votes
    5 Posts
    805 Views
    I
    Okay, thank you again.
  • Reflection Layer Settings

    Cinema 4D SDK python
    4
    1
    0 Votes
    4 Posts
    653 Views
    ferdinandF
    Hi @kosmos3d, without further questions or feedback, we will consider this thread as solved by Monday and flag it accordingly. Cheers, Ferdinand
  • Spline dynamics

    Cinema 4D SDK python r21 windows
    7
    0 Votes
    7 Posts
    1k Views
    bacaB
    @ferdinand you were clear and example is pretty good, I got the idea. No need to write code for me But it's not trivial overall, I just need to spend some time on this. Thanks again.
  • Global variable for Preferences Folder?

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    624 Views
    ferdinandF
    Hi @bentraje, hi @C4DS, you seem to have solved your problem yourself, so there is not much for me to add here apart from offering alternative solutions. One slightly dodgy way to get the preferences path is to use the path which is stored under c4d.PREF_MEMORY_PVHARDFOLDER in the world container of Cinema (it is the Memory>Cache Path attribute). A more elegant way is to use maxon.Application.GetUrl() which does properly handle the different paths under which the preferences can be stored (see example at the end of my posting for details). Cheers, Ferdinand """On how to iterate over the different preferences paths with the maxon API. """ import maxon def main(): """Entry point. """ for urlType in (maxon.APPLICATION_URLTYPE.GLOBALPREFS_DIR, maxon.APPLICATION_URLTYPE.PREFS_DIR, maxon.APPLICATION_URLTYPE.PREFS_DIR_STATIC): print (f"{urlType}:{maxon.Application.GetUrl(urlType)}") if __name__=='__main__': main()
  • 0 Votes
    5 Posts
    920 Views
    ferdinandF
    Hi @SolarPH, without further questions or feedback, we will consider this thread as solved by Monday and flag it accordingly. Cheers, Ferdinand
  • NodeData: How to get connected GeListNode

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    438 Views
    M
    Thought so. No, there's nothing missing in inherited methods. Thought, it'd be convenient. However, storing it to a member variable on init or forwarding does the trick.
  • 0 Votes
    6 Posts
    1k Views
    beatgramB
    @m_magalhaes Anyway thanks for the support, Manuel! I love this great community.
  • 0 Votes
    3 Posts
    804 Views
    ferdinandF
    Hi @alfredogzz, welcome to the Plugin Cafe forum and the Cinema 4D development community! Please have a look at our Forum Guidelines as we have to ask all users to flag their questions with tags. I have added a Python tag (assuming that is the programming environment you are after) to your posting for you, but you have still to add an OS and Cinema 4D version tag yourself. Please also note that providing full solutions is outside of the scope of support (see Forum Guidelines), so it would be best if you could post whatever code you already have. About your problem, let's assume you have an object Obj which has has the "incorrect" c4d.Matrix, i.e., transform, M_old and you want to move that transform to the known transform M_new. Let's also assume that all our transforms are in global space. What you basically have to do is: Compute a difference matrix M_dif for M_old and M_new. One way to do it, is to multiply M_new by the inverse of M_old, i.e., "untransform" M_new by the amount of M_old. Multiply all vertices of Obj by the inverse of M_dif. Set the global matrix of O to M_new. Here are some other postings, topics and examples (the first one contains code for pretty much what you want to do) that might be helpful for you regarding this topic: "Move" the transform of a point object Setting coordinates for selected faces (Python - Beginner) Mirroring with Matching or Different Axes If you import your geometry from Rhino, you might also have to deal with baked normals, i.e., normal tags. Please take a look at this thread for that scenario. It also noteworthy that Rhino's coordinate system is right-handed with Z being up, while Cinema 4D's system is left-handed with Y being up. Handedness of coordinate systems has been discussed in Mirroring with Matching or Different Axes for example. Cheers, Ferdinand
  • 0 Votes
    5 Posts
    858 Views
    ManuelM
    hi, thanks @mp5gosu for the answer. About inserting material before making some changes, there's no real right way of doing it. It just that if something go wrong about the change you are doing, you have to remove the material from the document, while if you don't insert it, you don't have to. As @mp5gosu said it's better to insert the object in the document before linking them. Even if should work if you insert the material after. Cheers, Manuel
  • BaseContainer Sort broken?

    Cinema 4D SDK python
    7
    0 Votes
    7 Posts
    1k Views
    M
    That's okay, since it is a minor issue. For newcomers however, there should be a hint in the docs, because it clearly states Sorts the container entries by ID. which is not the case.
  • 0 Votes
    4 Posts
    476 Views
    ManuelM
    @blastframe said in Updating F-Curves in Timeline on EditSlider Drag: What's c4d.EVMSG_FCURVECHANGE for then? After a quick check (sorry, I should have checked yesterday for a more complete answer) literally nothing. It's used nowhere. Cheers, Manuel
  • 0 Votes
    3 Posts
    464 Views
    ?
    @ferdinand Thank you for this; it makes things much clearer. I am very grateful we have the forum to clarify these issues.
  • 0 Votes
    3 Posts
    382 Views
    ?
    @ferdinand That was exactly what I was seeking, thank you, Ferdinand!
  • 0 Votes
    2 Posts
    254 Views
    ferdinandF
    Hi @blastframe, thank you for reaching out to us and for reporting these errors in the documentation. We will fix both the erroneously attributed short description of AddKey as well as the code example in an upcoming update of the C4D SDK Python docs. Cheers and happy coding, Ferdinand
  • ShowPopupDialog Freezes Cinema R21

    Cinema 4D SDK python r21
    12
    0 Votes
    12 Posts
    2k Views
    A
    @ferdinand Hi Ferdinand, Thank you for your time and help! Will get it sorted with your pointers above. All the best! Andre
  • Python and the GUI Separator

    Cinema 4D SDK python c++ r21 r23
    8
    0 Votes
    8 Posts
    1k Views
    CairynC
    Good to hear, thanks!