• Checking for ALT GetInputState() issue

    Cinema 4D SDK python 2023
    6
    1
    0 Votes
    6 Posts
    1k Views
    P
    Great, thank you Glad I can help to improve this great program.
  • Place multiple objects on spline and align

    Cinema 4D SDK python 2023
    5
    1
    0 Votes
    5 Posts
    2k Views
    P
    And once again, thank you!
  • Quicktab SDK Example

    Cinema 4D SDK r20 2023 python sdk
    9
    1
    0 Votes
    9 Posts
    2k Views
    M
    While rethinking about it last night, it may not be that slow if on user interaction you just flush the main group and re-attach already existing dialog. So you need to modify your `def _DrawQuickTabGroup(self)`` method like so to only display visible dialog: def _DrawQuickTabGroup(self, onlyVisible=True): """ Creates and draws all the SubDialog for each tab, take care it does not hide these according to a selection state. Returns: True if success otherwise False. """ # Checks if the quicktab is defined if self._quickTab is None: return False activeIds, activeNames = self.GetActiveTabs() # Flush the content of the group that holds all ours SubDialogs self.LayoutFlushGroup(ID_MAINGROUP) #self.GroupBorderSpace(left=5, top=5, right=5, bottom=5) # Iterates over the number of tab to create and attach the correct SubDialog for tabId, (tabName, tabGui) in enumerate(self._tabList.items()): toDisplay = tabId in activeIds if not toDisplay: continue self.AddSubDialog(ID_QUICKTAB_BASE_GROUP + tabId, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 0, 0) self.AttachSubDialog(tabGui, ID_QUICKTAB_BASE_GROUP + tabId) self.LayoutChanged(ID_MAINGROUP) return True Then in the Command message instead of calling DisplayCorrectGroup you should call _DrawQuickTabGroup like so: def Command(self, id, msg): if id == ID_QUICKTAB_BAR and self._quickTab: self._DrawQuickTabGroup() return True Regarding your question and classic Tab, find an example in Remove a GeDialog Tab Group but as you can see this is also not possible to remove a tab without redrawing everything . Cheers, Maxime.
  • GeDialog Timer Always Printing to Console?

    Cinema 4D SDK s26 2023 python
    2
    2
    0 Votes
    2 Posts
    318 Views
    K
    Well, that was a fast solution... couldn't it have emerged BEFORE I hit submit?!? Haha, the solution was easy... I was returning True on the Timer function. Took a look at the python memory viewer example and noticed they don't return a value on it. Removed the return from my Timer() function and all is working as expected. def Timer(self, msg): print("Timer") That's it:)
  • 0 Votes
    3 Posts
    871 Views
    V
    Great, this is exactly what I needed. Thanks @ferdinand !
  • Removing IsolateObjects document

    Cinema 4D SDK r23 r25 c++ 2023 r20
    3
    0 Votes
    3 Posts
    720 Views
    ManuelM
    hi, yes, KillDocument is not necessary in that case. Cheers, Manuel
  • 0 Votes
    6 Posts
    630 Views
    ferdinandF
    Hello @dunhou, ah that was the critical bit of information for me, that is you plugin at work there Well, as always without code it is hard to say what is going wrong there. the main code about this function is like : SetBit() doc.InsertMaterial() c4d.CallCommand(12252) # Render Materials doc.GetActiveMaterial() textag.SetMaterial() and some undo and call the Node Editor for certain renderer or rules for the function ... Out of this selection, I would put my money on CallCommand and undo handling. Setting bits and calling the mentioned methods are far less likely candidates. But that is pure guess work. actually, I checked the c4d.IsCommandChecked(id) The first thing I would do, is search for the command ID of the Material Manager (12159) in your code and add a print statement to each place where either this command ID is invoked with CallCommand or places where an ID determined at runtime is invoked (silly example : CallCommand(random.randint(1000, 1000000))) Then run your plugin again. When you see 12159 being printed when the undesired behaviour happens, you know it must be your plugin which misfiring. When not, it might be a bug in Cinama 4D or one of its APIs. Cheers, Ferdinand
  • Setting Material Preview for 1 material

    Cinema 4D SDK 2023 python
    3
    0 Votes
    3 Posts
    541 Views
    P
    Thank you.
  • Best practices for loading textures?

    Cinema 4D SDK sdk c++ 2023
    3
    0 Votes
    3 Posts
    528 Views
    M
    Hello @jpheneger, without further questions or postings, we will consider this topic as solved by Friday 02/06/2023 and flag it accordingly. Thank you for your understanding, Maxime.
  • Error when removing bound joints

    Cinema 4D SDK c++ 2023
    4
    0 Votes
    4 Posts
    799 Views
    CJtheTigerC
    Thank you very much Maxime, both for the solution and the explanation. The code works perfectly. Also thanks for fixing this bug. Out of curiosity: Was this causing issues anywhere else? For completion sake: I do need to add a directChild->Free() after directChild->Remove(), correct? Still gonna mark this as answered as the core issue has been solved with flying colors. Thanks again!
  • 0 Votes
    4 Posts
    894 Views
    A
    @manuel Wow! Manuel thank you so much I'm new in code development so that's why its fo easy for me to have those kind of mistakes. Thank you so much for your support.
  • 0 Votes
    4 Posts
    925 Views
    ThomasBT
    @ferdinand Yes you are right, in relation to this the self.spline etc is unnecessary that could also be a normal local variable. Is correct. But basically if I load a profile spline in my init method, for example, I can already save it in such a variable. I need to be able to access it from anywhere in the class. But here it is totally superfluous....sorry
  • 0 Votes
    5 Posts
    858 Views
    B
    Thanks for the update @m_adam
  • How to detect CTRL being pressed in a GeDialog

    Cinema 4D SDK r23 r25 2023 c++
    4
    0 Votes
    4 Posts
    1k Views
    C4DSC
    Thanks @m_adam I can confirm that the following does work with R20, R23 and 2023 Int32 MyDialog::Message(const BaseContainer& msg, BaseContainer& result) { BaseContainer keyChannels; if (GetInputState(BFM_INPUT_KEYBOARD, QCTRL, keyChannels)) { Bool ctrlModifier = (keyChannels.GetInt32(BFM_INPUT_QUALIFIER) & QCTRL) != 0;
  • 0 Votes
    2 Posts
    423 Views
    ManuelM
    hi, well you cannot inherit from the Hair Object as you could from a class. What you can do is to load the description of the hair object or include it in your description, create the hair object internally and link your description parameters to the internal hair object. Probably add your own parameter in your description. Than inside GVO you could generate the hair object with those parameter and return the result of it. While this seems to be possible, there are probably a lot of issue you are going to face, be ready ^^ Cheers, Manuel
  • Unsolo a Node?

    Cinema 4D SDK python 2023
    5
    0 Votes
    5 Posts
    874 Views
    B
    @m_adam Thanks. Works as expected!
  • 0 Votes
    4 Posts
    642 Views
    ManuelM
    Hi, there is this thread where Maxime is talking about drag and drop. If you have any question about it, please open a new thread. We like to keep question separated. Cheers, Manuel
  • 0 Votes
    11 Posts
    2k Views
    ThomasBT
    @manuel Thank you very much!
  • 0 Votes
    4 Posts
    766 Views
    ManuelM
    hi, well, if it works. Cheers, Manuel
  • 0 Votes
    9 Posts
    1k Views
    gheyretG
    Hi @ferdinand , I get it ! Thanks again to your reply!