• node size

    Cinema 4D SDK python windows 2023
    4
    0 Votes
    4 Posts
    965 Views
    L
    Thank you for the answers.
  • 0 Votes
    4 Posts
    992 Views
    ferdinandF
    Hey @jochemdk, That is the nature of threading restrictions. It is like crossing the street without looking left and right: It works fine until it doesn't Cheers, Ferdinand
  • Adding ports to nodes.

    Cinema 4D SDK 2023 python windows
    3
    0 Votes
    3 Posts
    805 Views
    L
    @ferdinand said in Adding ports to nodes.: DescID Thank you so much. I am pleasantly surprised at the level of your responsiveness. When I wrote "Global Data" I accidentally used the wrong word, I meant "Global Coordinates". I have read your links and code very carefully. Actually the concept of DescID is not so much complicated as confusing, the easiest thing would be to have something like an interactive online converter that could show the attributes of the desired objects and their corresponding id. I will try to understand the concept of DescID, deeper. And thank you again for your very detailed answer. Have a nice day.
  • Saving Documents

    Cinema 4D SDK python 2023
    3
    0 Votes
    3 Posts
    647 Views
    A
    Hi Ilia, Thanks for the reply - you're correct about what I'm trying to do! I've tried your first option and unfortunately the following dialog pops up: "Unable to write file $FILE$ (file may be write protected)" This dialog does not appear if the file is saved manually with the File -> Save Project As... Dialog The save location is a network drive. Let me know if theres a workaround? For your second option - is it possible to specify the exact filename here? EDIT: It looks like you can also specify a filename here, which has worked - thanks !
  • 0 Votes
    9 Posts
    3k Views
    S
    Hi Bjorn, I have a working version of this now which you can download from my site at https://microbion.co.uk/files/rounditr2024.zip It's PC-only at the moment and requires C4D R2024. Try this and see if it does what you need. There's some basic documentation included which I'll tidy up for the final version. There doesn't seem to be a DM facility here so we'd better take any further discussion to email. You can get hold of through the contact page on my site (link is in the PDF in the zip file). Do let me know what you think. Cheers, Steve
  • Command Make Editable confusion

    Cinema 4D SDK s26 windows python
    4
    0 Votes
    4 Posts
    899 Views
    G
    Got it! Thanks.
  • 0 Votes
    13 Posts
    3k Views
    G
    It works as expected in C4D 2024, but not in the previous versions.
  • 0 Votes
    2 Posts
    801 Views
    i_mazlovI
    Hi @Gaal-Dornik , Thanks for reaching out to us. Please excuse the delay. This issue is now tracked via internal bug tracking system. Thread is tagged to_fix, so that the thread can be tracked more closely. Cheers, Ilia
  • subprocess not running in background

    Cinema 4D SDK python 2023 macos
    4
    0 Votes
    4 Posts
    968 Views
    B
    MAny thanks Ferdinand. I will look into the BatchRender suggestion. That looks promising.
  • 0 Votes
    5 Posts
    949 Views
    gheyretG
    @ferdinand Indeed, the allure of good looks can be captivating at times. In fact, my primary objective was to explore the development of a pie toolbar, which may seem unconventional but has always held a deep fascination for me. I sincerely appreciate your valuable advice and will certainly give it a try. Cheers, Gheyret
  • 0 Votes
    2 Posts
    570 Views
    i_mazlovI
    Hello @Gregor-M , 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 should follow the idea of keeping things short and mentioning your primary question in a clear manner. About your First Question What you're trying to achieve is supposed to be happening on the main thread. It's difficult to guess the reasons of the crash you're stumbling across without any further information (e.g. the code showcasing the issue), but could be that MTCharacterBodyPart.GetParameters() function is not a thread-safe one. Cheers, Ilia
  • Simulating mouse movement in C4D

    Cinema 4D SDK python r25 windows
    5
    0 Votes
    5 Posts
    3k Views
    D
    Hi @ferdinand, Thank you so much for the comprehensive reply! Given all this I don't think it would make sense to keep trying to unit test this particular part of our code with Python. The last approach you highlighted with testing directly on the C++ side seems like the best option, so I'll give that a try. I'll have to see how to integrate this test with the rest of the unit tests (we have a lot and they're all in Python) but hopefully that won't be too much of a problem. Thanks again for all the help, Daniel
  • 0 Votes
    3 Posts
    692 Views
    G
    I see, thanks. But honestly i don't get it why the plugins folder isn't in the search path...
  • Howto to pass arguments to a python script

    Cinema 4D SDK python windows
    4
    0 Votes
    4 Posts
    638 Views
    ferdinandF
    Hey @Gaal-Dornik, In Cinema 4D you can bind a command to multiple shortcuts, but adding arguments is not possible. You would have to poll the keyboard yourself to distinguish such events. Cheers, Ferdinand Result: [image: 1696252767040-49a4bee1-8135-412f-b238-43d21184e071-image-resized.png] Code: """Runs different code based on which keys are pressed. Must be run as a Script Manager script. Pressing Shift+ALT+A while the script is invoked will print "Foo", while pressing Ctrl+Alt+A will print "Bar". See: https://developers.maxon.net/docs/py/2024_0_0a/misc/inputevents.html """ import c4d def CheckKeyboardState(*args: tuple[str]) -> bool: """Returns #True when the given key sequence is pressed, #False otherwise. """ result = [] for char in (n.upper() for n in args if isinstance(n, str)): if char == "SHIFT": c = c4d.KEY_SHIFT elif char == "CTRL": c = c4d.KEY_CONTROL elif char == "ALT": c = c4d.KEY_ALT else: c = ord(char) bc = c4d.BaseContainer() if not c4d.gui.GetInputState(c4d.BFM_INPUT_KEYBOARD, c, bc): raise RuntimeError("Failed to poll the keyboard.") result += [True if bc[c4d.BFM_INPUT_VALUE] == 1 else False] return all(result) def main() -> None: """ """ if CheckKeyboardState("Shift", "Alt", "A"): print ("Foo") elif CheckKeyboardState("Ctrl", "Alt", "A"): print ("Bar") else: print("None") if __name__ == '__main__': main()
  • 0 Votes
    2 Posts
    836 Views
    ferdinandF
    Hello @BretBays, Thank you for reaching out to us. Your posting does not contain an explicit question; there is no question mark in it. There is an implied question of us implementing what you describe, but the MAXON SDK group cannot do that, implement feature descriptions provided by users. I would recommend having a look at our support guidelines regarding asking good technical questions and the scope of support. About your Question If you want to CTSO, just CTSO the object or join it, we have examples for both cases in the modeling commands section of the Python examples. The problem with your function is also that it makes quite a few assumptions which do not always hold true, it for example assumes that the deform cache of something is always found directly on an object in the object manager (which is only true for editable polygon objects). What the script is calling 'direct copy' might also lead to results the user does not consider to be a copy. CSTO is the way to go to 'duplicate that deformed shape to a simple mesh with no deformer'. If the output is then not a singular object, you can join the output or a subset of it. Cheers, Ferdinand
  • Import NumPy?

    Cinema 4D SDK python 2024
    4
    0 Votes
    4 Posts
    1k Views
    G
    Hi, I'm also trying to install numpy, but after registering c4dpy I'm getting a syntax error after running "c4dpy -m ensurepip" command. c4dpy -m ensurepip (null) File "<stdin>", line 1 c4dpy -m ensurepip ^^^^^^^^^ (null)SyntaxError: invalid syntax
  • 2024 c4d python doc link error

    Cinema 4D SDK python 2024
    4
    1
    1 Votes
    4 Posts
    824 Views
    chuanzhenC
    @ferdinand Great job!
  • 0 Votes
    5 Posts
    1k Views
    ThomasBT
    @ferdinand This is a command, and you can c4d.CallCommand it, but that is all the control you have. thank you Ferdiand,
  • New Child Render settings with python

    Cinema 4D SDK 2024 python
    6
    0 Votes
    6 Posts
    2k Views
    M
    Thank you @ferdinand, I'll need to work out how I implement but once again a thorough and considered reply....
  • c4d 2024 "MENURESOURCE_SEPERATOR"

    Cinema 4D SDK 2024 python
    5
    2
    0 Votes
    5 Posts
    983 Views
    chuanzhenC
    @ferdinand Thanks,hope to fix spelling in c4dpython doc in future versions