• Sampling an Effector

    Cinema 4D SDK r20 c++ sdk
    5
    0 Votes
    5 Posts
    855 Views
    ferdinandF
    Hello @d_schmidt, without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly. Thank you for your understanding, Ferdinand
  • Accessing json data from DataDictionary

    Cinema 4D SDK c++ r20 r21 r23 s22 s24
    3
    0 Votes
    3 Posts
    573 Views
    kbarK
    That is what I was looking for. Thanks Manuel!
  • create a material with a set texture?

    General Talk r20 python
    3
    0 Votes
    3 Posts
    734 Views
    JH23J
    Hi. Oh I understand, thanks for your answer, it has helped me a lot.
  • Simple asset browser example

    Cinema 4D SDK r20 c++
    5
    0 Votes
    5 Posts
    911 Views
    ferdinandF
    Hello @Rox, without any further questions or replies, we will consider this topic as solved by Wednesday and flag it accordingly. Thank you for your understanding, Ferdinand
  • FieldLayer GetDirty

    Cinema 4D SDK c++ r20 sdk
    10
    0 Votes
    10 Posts
    1k Views
    J
    Thanks for the response, that seems to have solved the issue. John Terenece
  • FieldList Modifiers

    Cinema 4D SDK r20 sdk c++
    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    hi, Would be nice to share the solution. Cheers, Manuel
  • NodeData Undo

    Cinema 4D SDK r20 r19 r21 c++
    13
    0 Votes
    13 Posts
    2k Views
    ferdinandF
    Hello @C4DS, without any further questions, we will consider this topic as solved by Monday, the 25th and flag it accordingly. Thank you for your understanding, Ferdinand
  • 0 Votes
    4 Posts
    814 Views
    ferdinandF
    Hello @JH23, without further questions or postings, we will consider this topic as solved by Wednesday and flag it accordingly. Thank you for your understanding, Ferdinand
  • Colors on a generator

    Cinema 4D SDK r20 r21 r23 s22 s24 c++
    14
    0 Votes
    14 Posts
    1k Views
    ferdinandF
    Hello @fwilleke80, without further questions or postings, we will consider this topic as solved by Wednesday and flag it accordingly. Thank you for your understanding, Ferdinand
  • problema de regreso de código de gestor de scripts

    General Talk
    3
    0 Votes
    3 Posts
    689 Views
    JH23J
    Excuse me, I thought I translated it was my mistake, and in the same way, thank you for your help.
  • 0 Votes
    4 Posts
    857 Views
    C4DSC
    Seems the only solution here is to register an own mode.
  • How to create a child from the script manager?

    General Talk r20 python
    8
    0 Votes
    8 Posts
    1k Views
    ferdinandF
    Hello @JH23, first, I would like to point out that we ask the community here to post separate questions into separate postings, so that other users can find more easily answers when searching the forum. You can read more about the procedures of SDK support in our Forum Guidelines. It is okay in this case, but for future cases we have to ask you to open new topics for follow-up questions that are not directly related to the initial question of the topic (thread). About your question - you have two options when you want to make an object editable: In case you already have the object in question already inserted into the active document and are in the main thread, you can still use CallCommand. For CallCommand you have to keep in mind that it usually relies on an object selection. When running it in a script, you have then make sure that actually the objects you want to be affected are selected when you do run the CallCommand. I have provided an extension of my prior example at the end of this posting. In all other cases, i.e., when the object is either in no document or not in the active one, or you are not on the main thread, then you must use c4d.utils.SendModelingCommand Link. In this case for example for the command MCOMMAND_MAKEEDITABLE. You can find more information about that in our SDK documentation and in the code examples on GitHub. Cheers, Ferdinand Example code: import c4d def main(): # Assuming you want to use a CallCommand, you can do this. In practice # instantiating a cube object is better done in the way shown by Cairyn # in the forums. # The CallCommand for creating a cube object which will also insert and # select the cube. c4d.CallCommand(5159) # Get the currently active object; which is the new cube object due to the # prior CallCommand. The function object() created by the script log, and # used in your code, does effectively something similar. But it has the # overhead of retrieving the active object each time it is being called, # which is not necessary here. # In a script environment there are also the predefined attributes op and # doc, "variables" in non-Python terms. op is the currently active object # when the script is being run and doc the currently active document. # We cannot use op here, since the CallCommand just did change that, but # we can use doc, which we could retrieve also manually if we had to via # c4d.documents.GetActiveDocument(). cube = doc.GetActiveObject() # Set some of the parameters of that cube object. cube[c4d.ID_BASELIST_NAME] = "Cube" cube[c4d.PRIM_CUBE_LEN, c4d.VECTOR_X] = 32 cube[c4d.PRIM_CUBE_LEN, c4d.VECTOR_Y] = 32 cube[c4d.PRIM_CUBE_LEN, c4d.VECTOR_Z] = 32 cube[c4d.PRIM_CUBE_SUBX] = 11 cube[c4d.PRIM_CUBE_SUBY] = 11 cube[c4d.PRIM_CUBE_SUBZ] = 11 # Instantiate manually a cone object and insert it under that cube, i.e., # do it like Cairyn has shown it. cone = c4d.BaseObject(c4d.Ocone) # We can also set the name of a node like this, which is a bit easier to # remember than the ID. cone.SetName("Cone") # Set some parameters of the cone. You can find out parameter ids via # drag and drop and the console, read more about it here: # developers.maxon.net/docs/Cinema4DPythonSDK/html/misc/descriptions.html cone[c4d.PRIM_CONE_HEIGHT] = 32 cone[c4d.PRIM_CONE_BRAD] = 16 cone[c4d.ID_BASEOBJECT_REL_POSITION, c4d.VECTOR_Y] = 32 # Create a phong tag for the cone, so that the cone is being shaded nicely. phongTag = cone.MakeTag(c4d.Tphong) # Enable the angle limit of the phong tag. phongTag[c4d.PHONGTAG_PHONG_ANGLELIMIT] = True # Insert the cone under the cube. cone.InsertUnder(cube) # When we are doing things "manually", i.e., do not use CallCommand, we # have to push an update to Cinema 4D after we have modified the scene # graph. c4d.EventAdd() # Make the cube object the new active selection. doc.SetActiveObject(cube, c4d.SELECTION_NEW) # And run the " Make Editable" CallCommand on that c4d.CallCommand(12236) # Make Editable if __name__ == '__main__': main()
  • Double clicking behaviour in a Field List.

    Cinema 4D SDK c++ r20 r21 r23 s22 s24
    3
    1 Votes
    3 Posts
    393 Views
    kbarK
    This is for my own plugin. I was looking for a flag that I could set. Totally forgot about just checking for the parameter being set. Great solution. Thanks.
  • ReadFileToMemory() in R20 crashes

    Cinema 4D SDK c++ macos r20 maxon api
    7
    1
    0 Votes
    7 Posts
    877 Views
    fwilleke80F
    Hi Manuel, sorry, I totally forgot about this one. Priorities have changed, so this isn't an issue anymore at the moment. Thanks! Cheers, Frank
  • Open a GeModalDialog from a Job Observer

    Cinema 4D SDK r20 r21 s22 r23 c++ maxon api
    4
    0 Votes
    4 Posts
    431 Views
    fwilleke80F
    It works perfectly, thanks again! Cheers, Frank
  • EffectorData: Set clone visibility?

    Cinema 4D SDK r20 r21 s22 r23 c++
    3
    1
    0 Votes
    3 Posts
    366 Views
    fwilleke80F
    Works like a charm, thank you! Greetings, Frank
  • Fields and Adding an Effector

    Cinema 4D SDK c++ python r20 sdk
    3
    0 Votes
    3 Posts
    750 Views
    D
    @m_magalhaes Thank you! Works perfectly. Dan
  • 0 Votes
    4 Posts
    741 Views
    ferdinandF
    Hello @JH23, without any further feedback or questions, we will consider this topic as solved by Wednesday and flag it accordingly. Thank you for your understanding, Ferdinand
  • 0 Votes
    4 Posts
    756 Views
    M
    Hi @mp5gosu , I will set the topic as closed. Note that the fix will not come in the next update but don't worry we have it logged and it's on our list of things to fix in the future. Cheers, Maxime.