The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.
  • Mac build fails, PC build OK

    8
    0 Votes
    8 Posts
    1k Views
    C4DSC
    @a_block No need for apologies. I thought the bearded guy had something to do with it ... Hence the reason I posted the message again. Luckily, JIT before the easter bunny was to blame.
  • Setting `coordinate system` using `MCOMMAND_MIRROR`

    python r20
    3
    1
    0 Votes
    3 Posts
    1k Views
    K
    Hi @m_adam Thank you for your reply. It works perfectly!
  • This topic is deleted!

    10
    0 Votes
    10 Posts
    395 Views
  • The plugin ID '000' collides with another plugin ID in 'aaa'.

    r20 python windows
    4
    0 Votes
    4 Posts
    1k Views
    a_blockA
    Hi, good we got you going It is not wrong per se to use multiple plugin directories. Actually Cinema 4D R20 was specifically designed to have multiple ones. You just need to make sure not to have duplicate plugins in these directories. Cheers, Andreas
  • Refresh Editor after killDocument or SetActiveDocument

    python windows r20
    3
    0 Votes
    3 Posts
    644 Views
    B
    Hi Sebastian! Turns out my issues are two seperate, but equally self inflicted problems Inserting and activating works as expected, I am blocking the update with some custom UI stuff so I will have to find a solution for that. Calling EventAdd() in the closeEvent of the UI doesn't do anything. Is there another way to force Cinema to update everything? Killing the document not only doesn't update, but actually crashes Cinema, because I am trying to kill the document from within a callback that is reacting to MSG_DOCUMENTINFO_TYPE_LOAD. I am doing some more involved environment management and sometimes I have to close a document after loading. I have a workaround that will have to do for now. In the callback I change the document path to a string I can then look for in EVMSG_CHANGE. When I detect my string there, I can then kill the document. It's not very elegant and if anyone has a better solution I would be very happy, but otherwise consider this problem solved
  • Python Scripting-Help with GeDialog.AddComboBox add child option

    Moved python
    12
    1
    0 Votes
    12 Posts
    3k Views
    M
    Please do not delete topics once they are resolved, this topic may help other people that have the same issue. Instead, use the Q&A functionality to mark a topic as solved. Cheers, Maxime.
  • iferr warn_unused_result missed

    6
    0 Votes
    6 Posts
    1k Views
    S
    Hello, the Source Processor only checks for coding style violations and creates auxiliary code. It cannot check for valid C++ syntax (because C++ is quite an complex language). Coming back to the issue of return values, only the compiler can check that at compile time. And, yes, unfortunately Visual Studio and Xcode behave differently. best wishes, Sebastian
  • Render from picture viewer programatically

    r20 python windows
    2
    0 Votes
    2 Posts
    526 Views
    r_giganteR
    Hi mafster, thanks for reaching out us. With regard to accessing images being available in the Picture Viewer, I'm sorry to confirm that there is no PictureViewer-related classes/functions exposed in the API. This is valid for both C++ and Python API. Best, Riccardo
  • How to get to the str-value in a UserData Integer Cycle

    Moved python
    4
    0 Votes
    4 Posts
    1k Views
    S
    @stevejlv I found a workaround: the value part in the value;string Cycle option list does not have to be 0,1,2 etc. So I can give them the exact value as the string part (as long as they are int) and get the value I want the old fashioned way: [c4d.ID_USERDATA,1]
  • Cinema4D Application crash R19 in Release Mode

    Moved r19 c++
    3
    0 Votes
    3 Posts
    2k Views
    A
    @Riccardo Thank you very much for your reply Riccardo! Yes of course you are right - modifying the c4d sdk is a bad way. I just did this to see what happens. I will take a close look to the manual you have mentionend and will review the memory handling in my code. Best regards Andi
  • 0 Votes
    2 Posts
    1k Views
    S
    Hello, you cannot create a Material in the main() function of a Python Generator object. The main() function of the Python Generator object defines a cache of "virtual" BaseObjects which will appear in the scene. Materials cannot be created this way. A material must be inserted into the BaseDocument. This must only happen from the main thread, typically in reaction to some user interaction. One way of doing this would be to add a user data button to your Generator. Then your user could simply press that button to create the needed materials. Pressing the button can be detected by implementing the message() function. This could look like this: def main(): # search for material mat = doc.SearchMaterial("Generator Material") if mat is None: return None # create object cube = c4d.BaseObject(c4d.Ocube) # apply material ttag = cube.MakeTag(c4d.Ttexture) ttag[c4d.TEXTURETAG_MATERIAL] = mat return cube def message(id, data): if id == c4d.MSG_DESCRIPTION_COMMAND: buttonId = data['id'] # check button ID if buttonId[1].id == 1: # create material and insert it into the host document c4d.StopAllThreads() material = c4d.Material() material.SetName("Generator Material") material[c4d.MATERIAL_COLOR_COLOR] = c4d.Vector(1,0,0) doc.InsertMaterial(material, None) c4d.EventAdd() Also, please use the Q&A system. best wishes, Sebastian
  • Python: Key Error while initializing GUI, Dictionary, self

    5
    0 Votes
    5 Posts
    1k Views
    M
    thanks solved: self.data = {'sphere_size': 15, 'extension_ratio': 1, 'extend_vector': False} kind regards
  • 0 Votes
    4 Posts
    1k Views
    CairynC
    @bentraje Yeah, the second part was meant just in case you have need for a manual process. GetModelingAxis() takes multiselections of elements into account. However, I believe GetModelingAxis() works by selected mode (as you can have different selections for points, polys, and edges in parallel depending on whether the point, poly, edge, or object mode is active. So if you explicitly need the point selection and use the method in a script, you may want to switch to the point mode before using GetModelingAxis(). (Also, the actual modeling axis can be changed by the tools, so caution is in order. Personally, this is the behavior I needed, so I didn't make any big experiments.)
  • Fit image to a plane maintaining the ratio of the image?

    python r20
    2
    3
    0 Votes
    2 Posts
    594 Views
    P
    Together with the help from the c4dlounge.eu forum the issues is solved. The main issue was I did not read the manual good enough. "Note that Size symbolizes the axis size and not the expansion of the object itself. For planar projections, the true dimension is the two/fold of the axis length."
  • Python Tag vs Expresso for Set Driver/Driven Behavior?

    python r20
    6
    0 Votes
    6 Posts
    1k Views
    B
    @Cairyn Interesting "(not just on every frame but far more often)" I guess for now I guess I'll just do it in piecemeal. Other parts in Xpresso nodes and the other python tag. Thanks for the tip on the Python nodes on the Xpresso editor. Haven't tried it. I would go for the pure Xpresso set-up but its a bit finicky to set-up such as identifying where the node sits in the xpresso editor otherwise it sits on top of each other (An automatic layout command would be nice). @m_adam Thanks for the reference!
  • Texture Tag Output

    c++ sdk r20
    15
    0 Votes
    15 Posts
    3k Views
    D
    Hi Riccardo, Thanks for the first response. My bad with not catching that it was a layer shader bug, I figured I had done something wrong with the sampling. I'll start looking into the other projection samplings. Dan
  • Registering tokens in python

    windows python r20
    4
    0 Votes
    4 Posts
    843 Views
    r_giganteR
    Hi line6dude, thanks for following up. With regard to registering Tokens in c++, given that it's not a complex task, requires at least a minimum background of C++, familiarity with Xcode (or VisualStudio) and understanding of our Cinema 4D tool-chain. If you feel comfortable in becoming familiar with such concepts, please open a new thread to tackle the argument. Best, Riccardo
  • R20 Script State Function

    Moved python r20
    7
    0 Votes
    7 Posts
    2k Views
    M
    Thanks a_block, Sadly I had to disable the state() function because it breaks (delays forever) Material Preview/Shader rendering. This State() function should somehow be isolated if possible ... but i guess this is the limitation of "checking the gui state". kind regards mogh
  • Changing DATETIME_GUI date format

    python r19
    3
    1
    0 Votes
    3 Posts
    705 Views
    A
    @s_bach Hi Sebastian, Thanks for your help! That makes sense! Andre
  • 0 Votes
    8 Posts
    3k Views
    M
    @bentraje said in Get World Position of Obj A's position and Set it to Obj B's position: RE: main function Just wondering does it have to be in a main function (like literally the name of the function is main) or just inside the if __name__=='__main__':? Does C4D places special treatment to the word "main"? I was confused at that previously and later realized that if __name__=='__main__': is not specific to C4D but used in python in general in checking if the script is referenced to other script, which I don't do at the moment. So I just skip it. So would this code be just fine? if __name__=='__main__': executeMe() Yes this is correct.