• Stacking Tabs Menu?

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    826 Views
    B
    @r_gigante Thanks for the response. RE: Extending to get it working for more than one should be trivial. Unfortunately, the whole code is trivial to me being novice. Anyhow, I guess I'll just learn on QuickTabCustomGui on a separate thread. RE: With regard to the "stacked" tabs functionality, as said above Yes, you did. I was wondering if there is an option for the TabGroupBegin as that is somewhat straight forward to me rather than the QuickTabCustomGui. So I guess, this confirms that it is not possible for the TabGroupBegin. Again, no further action required. Will just open another thread for the QuickTabCustomGui.
  • Tips for GeDialog GUI ID Management?

    General Talk r21 python
    4
    0 Votes
    4 Posts
    702 Views
    B
    Thanks for the response @mp5gosu Yea, this "another level of abstraction" might bite me in other sections of the code but this is the only way I can be sane for now. hehe @m_adam RE: it's also advised to use only iD superior to 1000. Thanks for the note. RE:here is one of the few possible ways The code works as expected. Thanks again! Should make things easier now
  • Update GeDialog When Button is Pressed?

    Cinema 4D SDK r21 python
    6
    0 Votes
    6 Posts
    694 Views
    B
    RE: So if it recreates the same things it is probably because images are not local to your class but only to your function, Ah, gotcha. Thanks for the heads up. Works now as expected
  • Simple way to save images?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    568 Views
    M
    @bentraje said in Simple way to save images?: Union This means it can be either a str or either a c4d.storage.MemoryFileStruct. (Both don't really make sense). Cheers, Maxime.
  • Cinema 4D Client R21 Service Creation

    Moved General Talk
    22
    0 Votes
    22 Posts
    18k Views
    r_giganteR
    Hi @thestraycat, I'm sorry to disappoint you but the option to start the TeamRender Client via NSSM or SC or WinSW has not yet been restored. I can only ask, to contact us via our official email address, to better describe the impact this issue is causing on your work to escalate the discussion. Best, Riccardo
  • Modify Preferences of an Third Party Plug-in?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    346 Views
    B
    Hi @zipit Thanks for the response. The thread reference works as expected. Here is the code I used: op = plugins.FindPlugin(1027974) # Retrieved from the script log if op: print op[c4d.XPPREFS_SYSHUD_SHOW] # we know the enum from the console Have a great day ahead!
  • Calculate FPS tool?

    General Talk r21
    3
    0 Votes
    3 Posts
    630 Views
    chuanzhenC
    @m_magalhaes Thanks for your reply
  • 0 Votes
    10 Posts
    1k Views
    B
    @m_magalhaes RE: Does using the object list iterator is mandatory or not ? For this one, it kinda is since the whole code base rest on the for loop section. RE: you can see in this file that i can use UserData Thanks for the clarification. I see what you mean now. It works on my use case. Have a great day ahead!
  • Execution Delay When Reading Data from JSON file

    Cinema 4D SDK r21 python
    6
    0 Votes
    6 Posts
    838 Views
    M
    I don't have a lot to add here, @zipit almost pointed everything moreover doing proper profiling for hard drive can be a bit tricky to set up for couple of reasons: Another process may randomly use hard drive (e.g Antivirus checking). Cached file optimization made by either the OS, the processor or even the hard drive itself. Cheers, Maxime.
  • Unexpected Margin/Padding on AddCustomGui

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    1k Views
    B
    You are right. self.width = c4d.gui.SizePix(w) self.height = c4d.gui.SizePix(h) self.color = color wasn't actually used. Will close this thread now and crawl to my little cave of shame. lol
  • Building Cinema 4D SDK on Windows

    Cinema 4D SDK r21 c++ sdk windows
    3
    0 Votes
    3 Posts
    580 Views
    W
    Thank you @m_magalhaes! I needed to open the plugins.sln solution instead of the project file. I feel like I've learned something, but I'm not sure what
  • Disabling a Protection Tag

    Cinema 4D SDK r21 python
    8
    0 Votes
    8 Posts
    1k Views
    ManuelM
    Hello, @blastframe said in Disabling a Protection Tag: tag[c4d.PROTECTION_P_X] = 0 you should use the right type, this is a Boolean. tag[c4d.PROTECTION_P_X] = False you can use those symbols to define the function : c4d.PROTECTION_NONE c4d.PROTECTION_LOCK c4d.PROTECTION_LIMIT tag[c4d.PROTECTION_P] = c4d.PROTECTION_NONE Last point, using SetParameter doesn't change the fact that you need to send a message to the tag. Cheers, Manuel
  • Communication between DescriptionTool and GeUserArea

    General Talk
    4
    0 Votes
    4 Posts
    806 Views
    C4DSC
    @s_bach said in Communication between DescriptionTool and GeUserArea: The typical modern approaches are patterns like Model-View-Controller or Model-View-Presenter. In such models, you don't "send data around". Thanks for mentioning this. As stated in my opening post, this is what I have been using, where the "model" is a singleton class, available as a global variable to all plugins to synchronize and share data. Maybe not quite the exact wording. I was just wondering if there is another means of providing this "model" instead of using an instanced (singleton) class via a global variable? So in your example, the interaction with the DescriptionToolData would write data into the model. And the GeUserArea would read that data from the model. The example I provided isn't making use of a "model" as it already represented too much code just to point out the bug that slipped into R21. There I indeed used a very simplified solution by "sending data around". But an overall "thank you" for bringing up the model-view discussion, as this made me realize I could use an observer pattern in another project of mine which would fix its current poorly chosen design. Daniel
  • c4dpy.exe and VS Code on Windows?

    Cinema 4D SDK python windows r21
    9
    1 Votes
    9 Posts
    3k Views
    M
    @rossc1 Thanks for the inputs, I will for sure add a note in the documentation regarding this issue. Just as a follow-up from the current status, it is confirmed and while there is a behavior change in our side due to the new licensing mechanism, the issue also comes from Visual Studio Code, reading directly raw string to detect a valid interpreter, and fail if something is not formated as it wants. However, we received the official confirmation from Visual Studio Code that they will not change their implementation, and not support custom interpreters. But we are still on it. Regarding your needs for an IDE, you can use Pycharm, the only pre-requires is to rename c4dpy to python, unfortunately, we can't officially recommend doing such things since newer OS (Catalina) prevent user changing content of an application package but @dskeith explained everything cleary in How to use c4dpy for Cinema4D R20 SP1. Cheers, Maxime.
  • Make Deformer Affect Objects Outside Hierarchy?

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    2k Views
    B
    @wuzelwazel Yes, I'm referring to the file you uploaded earlier. There is some delay when hitting Undo. You can see it here: https://www.dropbox.com/s/hayep6r4iyowqt5/c4d194_deformer_affect_outside_hierarchy_02.mp4?dl=0 RE: perhaps making sure the objects with the surface deformers are lower down the list In your file, yep they are. That's why I was wondering why there is a lag.
  • Will R22 be Python 3 as Python 2 "dies" in 2020?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    906 Views
    r_giganteR
    Hi @iluxa7k thanks for following up. At the moment, as told in the very first answer, there are no updates I can share about the adoption of Python 3 in C4D. Rest assured that this is still under our PMs' radar. Best, Riccardo
  • Take Viewport Screenshot

    Cinema 4D SDK r21 python
    6
    0 Votes
    6 Posts
    2k Views
    B
    Thank you all for the response. Appreciate a lot. Specially for the sample code provided by @m_magalhaes as this is my code relating to rendering.
  • GeUserArea lag in R21 versus R20

    Cinema 4D SDK r21 r20 c++
    8
    0 Votes
    8 Posts
    1k Views
    M
    Yes your code could be optimized but we agree with you here this is not really the point, a R20 code is expected to have the same performance with R21 and here this is not the case. And @C4DS I agree using GeIsMainThread() == false I would say partially fix the issue (sometimes it works as R20, sometimes not) We keep investigating it. Cheers, Maxime.
  • 0 Votes
    3 Posts
    538 Views
    fwilleke80F
    The way it's described in the SDK docs, I do not get any error message: [image: 1576494560496-screen-shot-2019-12-16-at-12.08.48.png] By diving into the location in the API where the error is thrown, I might have found that it's a nullptr error. [image: 1576494318563-screen-shot-2019-12-16-at-12.04.55-resized.png]
  • Failed to get data from BaseContainer

    Cinema 4D SDK r21 c++
    3
    0 Votes
    3 Posts
    429 Views
    chuanzhenC
    Hi, @r_gigante Thank you for your reply. With your help, I finally traced the source of the problem. As you said, the reason for the error(Critical Stop) is that there is no Container at all. Because of a very hidden error in somewhere, I wrote the wrong data type to BaseContainer.