• Clone orientation without a "Up Vector"

    Cinema 4D SDK windows c++ 2024
    8
    0 Votes
    8 Posts
    4k Views
    justinleducJ
    @ferdinand Oh wow! Thank you so much for letting me know about Keenan Crane, as I was not familiar with him. I am in awe of the exhaustive list of tools he and his lab have published. The Globally Optimal Direction Fields paper seems indeed to be exactly what I am looking for. I was also surprised to see that I had already skimmed the Youtube video of the paper back in December. Thank you so much @ferdinand for this invaluable piece of information. Time to dive in! Cheers!
  • 0 Votes
    2 Posts
    534 Views
    ferdinandF
    Hey @JACK0319, Thank you for your issue report, I have fixed it and it will be shipped with the next release. Cheers, Ferdinand
  • 0 Votes
    4 Posts
    1k Views
    F
    Thank you, it works perfectly!
  • Sampling Redshift Materials

    Cinema 4D SDK 2024 c++ macos
    3
    0 Votes
    3 Posts
    980 Views
    D
    Hi Ilia, At this point this seems a bit over my head, but it seems to be what I need, thanks! Dan
  • 0 Votes
    5 Posts
    2k Views
    gheyretG
    @czt_306 It looks realy cool!
  • How to add "scripts" to a menu?

    Cinema 4D SDK 2024 python
    4
    0 Votes
    4 Posts
    2k Views
    ferdinandF
    Hey @mogh, I know that you did not meant any harm and the word hijack was a bit strong - which is why reworded that before you answered. But topics should remain focused on a singular thing, the specific question of the original poster, rather than being a collection of questions from multiple people which roughly align with whatever broader topic they see embodied in a thread. Cheers, Ferdinand
  • How to set a custom color for a node?

    Cinema 4D SDK python 2024
    7
    0 Votes
    7 Posts
    2k Views
    M
    @ferdinand You are amazing! Thanks
  • How to set the position of a node manually?

    Cinema 4D SDK python 2024
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hey @momoko, I understood why you asked, as this is common thing to do. Even for our own other node system, Xpresso aka GraphView, doing this is possible in the API. I just provided an explanation as to why the Nodes Team did it like this and why they very likely will never change that (as it would break their design pattern). So that you and future readers can understand why we do this instead of just being confronted with a blunt "no" Cheers, Ferdinand
  • 0 Votes
    2 Posts
    792 Views
    ferdinandF
    Hey @JACK0319, thank you for reaching out to us and reporting this. You are right, up is incorrect and upvector is the correct keyword. I fixed this and double checked the other keywords for the next upcoming Python documentation release. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    932 Views
    i_mazlovI
    Hello @JACK0319 , I'm not sure what you consider the "correct result", but it looks good here: [image: 1709806382074-9888272b-b870-4514-80e9-e16f01e6dc14-image.png] However, there're a couple things to mention about your script. First, there SendModelingCommand() function executes passes itself, so there's no need in munally running ExecutePasses() function. Second, in the last line you insert the result object from the CSTO command into document stored in doc variable. At this point doc still points to the document that was active before you executed function InsertBaseDocument(). After this function call, GetActiveDocument() returns the same document that you have in temp_doc. However, there's one edge case, which happens if you execute InsertBaseDocument() function while currently active document is empty. In this case, current document is deallocated and doc points to the invalid document. This is why you see the corresponding log in python console: ReferenceError: the object 'c4d.documents.BaseDocument' is not alive By the way, this is similar behavior you notice when clicking on [+] button [image: 1709807443046-0dd7ae71-413a-4cf6-b981-b42ca06e488b-image.png] multiple times: it kills currently active empty document and activates new empty document instead. There're multiple solutions for you depending on what are your intentions with this script: If you only need baked object inserted to currently active document, there's no need in attaching your temporary document to cinema with the InsertBaseDocument() function If otherwise you need the temporary document to be inserted to cinema, consider attaching it after you insert cache to the old document. If you're attaching temp_doc to cinema only for debugging purposes, you can early exit your script to not let it go to the insertion step. Another option could be to "touch" original document (e.g. by inserting c4d.Onull object at the beginning of the script and removing it in the end). Cheers, Ilia
  • 0 Votes
    5 Posts
    1k Views
    ferdinandF
    No need to be sorry
  • SDK ZBRUSH DOWNLOAD

    ZBrush SDK c++ 2024
    4
    0 Votes
    4 Posts
    3k Views
    ferdinandF
    Hey @VICTOR_PEREZ, The ZBrush GoZ SDK is the only ZBrush SDK there currently is. There is no dedicated C++ SDK for ZBrush at the moment. Although most GoZ bridges are realized in C++ due to the hefty throughput requirements that come with geometry data as dense as ZBrush data usually is. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    930 Views
    ferdinandF
    Hello @gaschka, Thank you for reaching out to us. Yes, this is an encoding issue. In general, Unicode is supported by the Python to C++ bindings, as you can see, French, German, and Turkish diacritics are all correctly transported, as well as Chinese characters. [image: 1709563393413-5bfdbc74-f638-4fd8-8df9-2b95479b233b-image.png] But all these are part of the Basic Multilingual Plane (BMP) while the emojis are part of the Supplementary Multilingual Plane (SMP) of the Unicode table. It could either be that there is something not implemented or some bits get chopped off while data is sent to the C++ layer. I don't really know, the person who is responsible for the Python bindings, @m_adam, is on vacation. I will ask him once he is back, as I too would be guessing what is happening here exactly. Cheers, Ferdinand
  • how to limit the type of files we can import?

    Cinema 4D SDK python 2024
    3
    0 Votes
    3 Posts
    806 Views
    M
    @i_mazlov Thanks for your response! I learnt a lot!
  • 0 Votes
    4 Posts
    1k Views
    ferdinandF
    @datamilch said in Calling BaseDocument.SetMode twice in a row leads to freezes: always had the feeling, that i could print feedback while it is running That is a misconception many users have. This is because most code usually runs very fast, so you do not realize it. Note that I also wrote Script Manager script. While it technically applies to all Python Scripting scene elements, the execution of the Python VM is there always blocking, it is much more prominent for a Script Manager script. Because there the module is only executed once and it is also okay to run scripts here which take seconds to execute. But it also applies for example to a Python Programming tag, the execution of the module is there also blocking. But because the module of a Python Programming tag is called many times - on each scene update at least once, and you are anyway in a world of hurt when your Python Programming tag module takes more than ~100 ms to run, it is not that obvious there. Syntax errors are evaluated before the VM actually runs because then the compilation of your code into byte code fails (which is then later interpreted by the VM). But the error is here also displayed only after the VM stopped (just as a RuntimeError which is raised by the VM and not by the compiler), but syntax errors prevent the VM from running your code in the first place. Cheers, Ferdinand import time def main() -> None: """Run as a Python Script Manager script to see that the execution of a scope in the Python VM is blocking. This will not print five 'A's with a stride of one second, but five 'A's after five seconds. """ for _ in range(5): print('A') time. Sleep(1) if __name__ == '__main__': main()
  • How to make static texts bold? Icons?

    Cinema 4D SDK 2024 python
    2
    0 Votes
    2 Posts
    731 Views
    ferdinandF
    Hello @momoko, Thank you for reaching out to us. I understand that especially when getting familiar with a new API that the thirst for knowledge is immeasurable and the questions are uncountable but I must also point out our Support Guidelines here, especially our Support Topic Rules. A support topic should be mono-thematic, i.e., usually have one question only. If you have multiple questions, please open multiple topics. Please also make sure that your questions are repeatable as outlined in the guidelines. Usually this means complete code. I can guess from the context in this case that you are talking about GeDialog but I might not be able to in a more complex case. How can I make a static text bold? I tried some common methods in Python but they didn't work! I am not sure what you mean with common methods in Python, but you can make a static text font bold by a bit counterintuitively setting its border style. There is no italic option and bold emphasis should be used only very selectively. self.AddStaticText(id=2001, flags=c4d.BFH_SCALEFIT, name="Hello World", borderstyle=c4d.BORDER_WITH_TITLE_BOLD) How can I add an icon to a button without using custom icons? Does Cinema4D provide any default icon like Blender? I am not 100% sure how this is meant. Buttons with icons and text are a bit atypical in Cinema 4D and usually only appear in palettes. The standard dialog button cannot have an icon. But you can use a CUSTOMGUI_BITMAPBUTTON, but they are not really meant to have a caption. You can find a Python example here. Cheers, Ferdinand
  • How to create Tabs with Python?

    Cinema 4D SDK 2024 python
    4
    0 Votes
    4 Posts
    955 Views
    M
    @Dunhou @i_mazlov Thank you guys!
  • Change Dialog Text color

    Cinema 4D SDK 2024 python
    4
    0 Votes
    4 Posts
    955 Views
    i_mazlovI
    Hello @momoko , Welcome to the Maxon developers forum and its 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 procedures. You did not do anything wrong, we point all new users to these rules. Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment. Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support. Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads. It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions. About your First Question Thanks to @Dunhou for providing correct solution! Cheers, Ilia