• wordwrapping difference between r23 and r2023.

    python r23 2023
    3
    0 Votes
    3 Posts
    877 Views
    D
    hi, thank you - but it has become unnecessary. i did not realize that there is a checkbox in the preferences, called "Script Word Wrap", which was activated while i was working in r23 (probably since the first installation of r23, back in the day), but deactivated (i guess, that's the default setting) in my fresh installation of r2023. it's fine now. i'll mark this one as solved.
  • Getting the spline from the SplineCustomGui

    python 2023
    2
    1
    0 Votes
    2 Posts
    560 Views
    ferdinandF
    Hello @pim, Thank you for reaching out to us. As announced here, Maxon is currently conducting a company meeting. Please understand that our capability to answer questions is therefore limited at the moment. The custom GUI for SplineData has its own dedicated GUI type, c4d.gui.SplineCustomGui as pointed out by yourself. So, you must use SplineCustomGui.GetSplineData instead of the generic BaseCustomGui.GetData. Cheers, Ferdinand
  • set only the value of a dialog gadget

    python
    6
    0 Votes
    6 Posts
    1k Views
    D
    huge thanks again @m_adam! the trick with storing the data in a dictionary was super helpful. now i can jump between documents and the dialog updates properly. cheers, sebastian
  • how to track if the document has changed?

    python
    4
    1 Votes
    4 Posts
    965 Views
    M
    Hi correct, if you look at my code I do oldDoc = self.activeDoc This means oldDoc will call the activeDoc property getter. And within it I already check for IsAlive and return None if the saved document is not alive. @property def activeDoc(self): doc = getattr(self, '_activeDoc', None) if doc is None: return None if not doc.IsAlive(): return None return doc So for my use case it's fine enough, but you are right, if you store somewhere this oldDoc variable and use it latter then yes you need to check for IsAlive. Cheers, Maxime.
  • Connect Multiply Object with saving Position/Rotation/Scale

    s26 python
    3
    0 Votes
    3 Posts
    671 Views
    i_mazlovI
    Hello @DjNikMax, Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are: Support Procedures: Scope of Support: Lines out the things we will do and what we will not do. Support Procedures: Confidential Data: Most questions should be accompanied by code but code cannot always be shared publicly. This section explains how to share code confidentially with Maxon. Forum Structure and Features: Lines out how the forum works. Structure of a Question: Lines out how to ask a good technical question. It is not mandatory to follow this exactly, but you follow the idea of keeping things short and mentioning your primary question in a clear manner. About your First Question The goal you're trying to achieve is a unclear and the proposed steps look redundant. There're a couple of topics I'd like to mention regarding your provided code: Using doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_CHILDREN) doesn't make any sense in this context, because children are removed when calling "Connect Objects + Delete" command Using c4d.CallCommand(16768) applies this command to the currently selected objects (rather than to the obj on the current loop iteration) If you process objects one-by-one there's no need to group it beforehand, the "Connect Objects + Delete" command can be run directly on the object itself. This would bake rotation and scale into the mesh itself, the position would remain exactly the same as in the original object (without any extra step, no need to instantiate the object and copy it's coordinates back to the baked mesh) If you want to zero-out object position after baking it, you might want to look into freeze transform functionality: c4d.ID_BASEOBJECT_FREEZE_P If you anyways want to deal with transformations, you can check the thread about matrices, mentioned in above. @mogh, thank you for sharing! Let me know if you still have any questions. Cheers, Ilia
  • Setting mouse position

    4
    1
    0 Votes
    4 Posts
    874 Views
    WickedPW
    @i_mazlov thanks for posting the link to the icon resource page listing. Have bookmarked it. Thanks @ferdinand, I noticed the CSS change. It's made scrolling through what were large pages more digestible and quicker. Hopefully I haven't upset too many others. But appreciated from my end. Post edit: I know this topic was about setting the mouse position, but seems like that's an OS level thing for now. So have marked topic as solved.
  • Using / copying object properties dialog

    python 2023
    5
    1
    0 Votes
    5 Posts
    821 Views
    P
    Thanks for the clear answer. I know the difference between description and dialog, but I was hoping I could re-use already defined description in a dialog. But I follow your advise and recreate the settings. Regards, Pim
  • description.SetParameter() Question

    r23 2023 python windows
    11
    0 Votes
    11 Posts
    2k Views
    ThomasBT
    @ferdinand At first I wanted to do it exactly like you recommended, but then I thought why, if you save 36 IDs, it's certainly more memory-efficient. And when you just rename it, you've already learned something again. Actually, I wanted to do it with separate IDs. But then I recognized that I need the exact same 3 parameters, just with other Labels. but since renaming was faster, I decided to do it. It's an update of the previous version of the plugin and it was easiest to just change the labels. I'll think about it, I've got time. Thank you because my English is not always the best, I sometimes find it difficult to read your texts. They are already very extensive in some cases. Good evening!
  • Defer Modifying Menus to the Main Thread

    python s26
    6
    0 Votes
    6 Posts
    2k Views
    alexandre.djA
    @ferdinand Just a quick update that using an event message to force update the view after creating the menus is working great. c4d.EventAdd(c4d.EVMSG_CHANGE)
  • Plugin Update use "disklevel" or new PluginID

    r23 python windows 2023
    3
    0 Votes
    3 Posts
    593 Views
    ThomasBT
    @ferdinand thank you very much
  • How to create Preference hierarchy child tree item

    python r23
    3
    1
    0 Votes
    3 Posts
    615 Views
    mikeudinM
    @ferdinand Thank you! I'll check it!
  • Quicktabs in dynamic prefs description

    5
    1
    0 Votes
    5 Posts
    1k Views
    a_blockA
    No worries. Thanks for trying.
  • 0 Votes
    2 Posts
    498 Views
    ferdinandF
    Hello @fkenned1, Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are: Support Procedures: Scope of Support: Lines out the things we will do and what we will not do. Support Procedures: Confidential Data: Most questions should be accompanied by code but code cannot always be shared publicly. This section explains how to share code confidentially with Maxon. Forum Structure and Features: Lines out how the forum works. Structure of a Question: Lines out how to ask a good technical question. It is not mandatory to follow this exactly, but you follow the idea of keeping things short and mentioning your primary question in a clear manner. About your First Question Your question is a little bit ambiguous, and I am not quite sure what you want to be done here. To get something simple out of the way: Cinema 4D C4DAtom instances, the atomic type all classic API scene elements derive from, have parameters which are indexed by c4d.DescID keys. Cinema 4D does not have properties in its classic API model. I understood what you meant, just as an FYI. This is represented by the methods C4DAtom.GetParameter and .SetParameter. The methods GeListNode.__getitem__ and .__setitem__, i.e., the bracket syntax in Cube[c4d.PRIM_CUBE_SUBY], are just convenience wrappers around the C4DAtom methods. The parameter keys passed to these methods are internally always c4d.DescID, it is only the convenience methods __get/setitem__ which allow you to pass integers instead, e.g., write Cube[c4d.PRIM_CUBE_LEN,c4d.VECTOR_X] or Cube[1100, 1000] (both do the same). I went over the subject of parameter IDs in more detail here. The drag and drop behavior of the Python console is proprietary and not exposed, I also do not quite understand what you want to do with it inside a dialog. If you want to let a user reference an object in a dialog, as for example many objects do in Cinema 4D, you must use a BaseLink parameter. In dialogs you can do this with the CUSTOMGUI_LINKBOX custom gui. I have shown here how to do this. Letting a user reference a parameter in this manner is not possible. You could technically unpack parameter drag data (at least in C++, likely not in Python, have not checked though) to get hold of a dragged BaseList2D and traverse its description (possible in C++ and Python) of a node to figure out to which DescID for example the string "c4d.PRIM_CUBE_LEN, c4d.VECTOR_X" corresponds to. But I do not quite understand the purpose of all this? I am sure there is a less complicated way to achieve what you want to do. I would recommend sharing your code and explaining what you want to achieve on a high level, as the workflow you have in mind is either impossible or at least very labor intensive to implement. Cheers, Ferdinand
  • Python version suddenly reported as 3.1 in 2023.2

    sdk python 2023
    3
    1
    0 Votes
    3 Posts
    717 Views
    M
    Ok, thanks Ferdinand your clarification shed some light on my problem. I convert the version to a float which is the culprit ... import sys if sys.version_info < (3, 2): print("This Plugin requires at least Python 3.2") thank you
  • Can get Point-Index under the mouse pointer? (Py)

    python sdk
    3
    1
    0 Votes
    3 Posts
    753 Views
    ymoonY
    The mouse position is obtained as follows. msg[c4d.BFM_INPUT_X] --> GetEditorWindow() --> editor_x = win.Global2Local() --> mouse_x-abs(Editor_x) The problem of overlapping selection in GetNearestPoint() was solved by making a list of selected object. Thank you.
  • Github Example group_nodes_r26 is broken.

    sdk python 2023
    4
    1
    0 Votes
    4 Posts
    526 Views
    ferdinandF
    Hello @Dunhou, I noticed maxon api changed every version and almost the major part of sdk change log We are aware that this fact is disliked by especially technical artists. But the Nodes API is still under active development and probably will be for the intermediate foreseeable future. Some changes from time to time are therefore inevitable. But we usually do not just remove something, but first mark it as deprecated and then remove it one or two cycles later, giving third parties more time to adapt. For S26, GraphModelInterface::IsSelected in graph.h changed for example into this: [[deprecated("Use GraphModelHelper static functions")]] MAXON_METHOD Result<Bool> IsSelected(const GraphNode& node); The problem is that this information is not visible at all for Python developers and still could also be improved for C++. We are aware of the problem, and working on the quality of change notes is something we already did over the last cycles and are still doing. Mapping such information to Python is certainly something I would like to do, but my main focus was for now gathering C++ API change notes in a more consistent manner. For now, I would recommend having an eye on the C++ change notes as a Python developer. The color coded deprecated markup should make it fairly easy to find upcoming removals, see for example the 2023.2 C++ API change notes. We are still working on improving API change notes for C++ and Python, because we are aware that it is crucial to clearly communicate our intentions with an API. I for example would like to make such information more searchable or pull it into the relevant documentary units. I.e., pull change notes also into the class, method, etc. descriptions, which are the subject of change. But that will be very hard to do with our current solutions might therefore have to wait a bit. Cheers, Ferdinand
  • Interaction Tag - def message seems to not work

    4
    1
    0 Votes
    4 Posts
    724 Views
    ferdinandF
    Hey @Smolak, You must expose the ID as explained in the posting and shown in the second code listing. Forgot to do it in the second one. I have updated the listing. Cheers, Ferdinand
  • 0 Votes
    5 Posts
    1k Views
    ymoonY
    @ferdinand It Works. Thank You
  • CUSTOMGUI_QUICKTAB trigger twice when click

    sdk python 2023 windows
    3
    0 Votes
    3 Posts
    443 Views
    DunhouD
    @m_adam Thanks man! this @dataclasses.dataclass decorator is pretty handy , new knowledge incoming And maybe some similar bug I have seen before , but I don't remember what it is (and even didn't know it is a bug or my bad coding ) , if I met some similar bugs I will update the topic , but now let's hope it will be fixed next release . Thanks for your help again Cheers~
  • How to obtain all vertices of an object in C++.

    s26 c++ sdk
    3
    0 Votes
    3 Posts
    639 Views
    P
    @m_adam Thanks