• 0 Votes
    3 Posts
    589 Views
    DunhouD
    Hi @ferdinand , @ferdinand said in Can I use both MouseDown() and DoubleClick() in treeview?: In general, you should keep in mind that the concept of a double click is only represented very weakly in Cinema 4D, with TreeViewFunctions being one of the very few cases which uses that term. In the backbone of the API, the GUI message stream, the concept of a double click does not exist. Things are actions (BFM_ACTION_...) and inputs (BFM_INPUT_...) and each mouse click counts as an input and/or action. It is up to specific gadgets to bundle up multiple clicks into a double click. That helps foe better unstand how it worked, thanks! And this kind solution is a much more mature solution than what I used a simple one in my Octane Light Manager, I try to stop the set check event duplicate many times, I will keep more condition as your suggestion. [image: 1693920299018-e0be12a8-f277-400d-9d7a-14065e55ffee-image.png] Thanks again for your detailed explain for all the answer. Cheers~ DunHou
  • Registration code being run in After Effects

    Cinema 4D SDK
    4
    0 Votes
    4 Posts
    691 Views
    i_mazlovI
    Hi Timm, You can familiarize yourself with cineware integrations on our documentation webpage Maxon Cineware User Guides. Specifically for the After Effects integration there's a compact but rather informative description (as well as pointers to a corresponding video footages at Maxon's Youtube channel) on a dedicated webpage Cineware for After Effects: Adobe After Effects includes a free installation of Cinema 4D Lite – a limited but feature rich version of Maxon’s award-winning 3D software package. Cinema 4D Lite can be accessed directly from within After Effects in the File ⇒ New menu, or by clicking Edit Footage on a Cinema 4D layer in your composition. The question about proper licensing behavior of your plugin lies outside of scope of knowledge and highly depends on the goals you're trying to achieve. As I already pointed out, say, the scene with some object defined in the external plugin would require this plugin to be loaded by cineware as well to function the same way as in C4D. Cineware integrations use preferences folder different from the one that is used by Cinema 4D (it uses the same folder name with suffix _w). Hence, all the preferences (including the world container) are not shared between C4D and Cineware. The behavior of some function call can also differ, including GetGeneralLicensingInformation(). However, the system identifier systemId is independent of the APPLICATIONID and will be the same in both cases. Let me know if you have any further questions. Cheers, Ilia
  • 0 Votes
    4 Posts
    808 Views
    ThomasBT
    @ferdinand Thank you Ferdinand for your leniency regarding the three questions.. Will take note of that in the future. =====BaseTime===== Which just surprises me about the BaseTime problem is, that it worked in the Python tag. I didn't get an error message and the prototype worked very well. So I also tried instead of BaseTime int type value in the plugin, but it crashed. It confused me a bit. So I try your suggestion. # In the python tag it worked with int # starf_frame was an int frame = doc.GetTime().GetFrame(doc.GetFps()) - op[c4d.ID_USERDATA,start_frame] ====PoseMorph Symbol==== Regarding the posmorph ID, I should have figured that out myself Thanks for your quick respond Tom
  • Problem with plugin example

    Cinema 4D SDK 2023 python
    7
    0 Votes
    7 Posts
    1k Views
    ferdinandF
    Hey @filipst, please adhere to our rule for a topic being a singular subject/line of questioning. I strongly doubt that Current State to Object (CSTO) and Make Editable (ME) were ever the same for splines; and if so, this was probably a bug. There is a fundamental difference between these two operations. Current State to Object: Collapses the cache of the entity it is being called upon and inserts it into the scene. Make Editable: Replaces an object with its (direct and uncollapsed) cache. Aside from the obvious difference that CTSO produces a new object and ME replaces its input, there is a fundamental difference in getting the cache of something (ME) or getting the collapsed cache of something (CSTO). Caches tend to be hierarchical structures in Cinema 4D and can become very complex. A simple example would be to collapse a spline with a bend deformer attached to it. Input: [image: 1693570672626-735753e6-3276-4ae8-b19a-369d5e9aaf01-image.png] Make Editable output (with deformer disabled for clarity): [image: 1693571275301-c20a09cd-83a4-47c4-bd4c-7dd774733144-image.png] CSTO output: [image: 1693571349405-787e44c3-bb86-4efd-9633-94271266326d-image.png] I went over the topic of caches and our geometry model here. For this hierarchy, [image: 1693571575544-5bb9fe31-178b-4967-821f-ebfccb153e47-image.png] the Circle object will have a cache tree as follows: + 1: Circle (BaseObject Generator) + 2: Cache of 1: Circle (SplineObject Generator) + 3: Cache of 2: Circle (LineObject) + 4: Deform Cache of 3: Circle (LineObject) The Circle object is a BaseObject generator which has a SplineObject as its cache which itself is a generator and has a LineObject as its cache (i.e., the discrete representation of the spline for its current interpolation settings). The bend deformer deforms this terminal node in the cache chain, the LineObject, and not the SplineObject. CSTO collapses the whole cache of an object, i.e., exhausts it. In this case this means returning 4, which includes deformation and the Bezier spline converted to its linear spline representation. CSTO can also mean joining objects in a cache, which is not represented by this simple example. ME on the other hand returns 2, i.e., whatever is the direct cache of the entity it has been invoked on. We do not collapse the cache of the cache and therefore neither include the LineObject cache nor its deform cache (they are of course still implicitly generated as the cache for the SplineObject we return because ME replaces its input object). Cheers, Ferdinand
  • 0 Votes
    2 Posts
    468 Views
    i_mazlovI
    Hello @wuzelwazel, Depending on the size and complexity of objects on your scene (namely on the objects that are processed with the script) adding an undo can be quite an expensive operation to execute. There was some recent work done that should affect the undo-stack in a positive way in the following releases. Let me know if you have any further questions. Cheers, Ilia
  • 0 Votes
    3 Posts
    695 Views
    E
    @ferdinand Thank you very much for your help, your code has been extremely useful to me. Cheers!
  • Handling Treeview File Drag and Drop Events

    Cinema 4D SDK python c++ 2023
    3
    1 Votes
    3 Posts
    788 Views
    ferdinandF
    Hey @Dunhou, yeah, I already saw and fixed that in the course of answering this. Cheers, Ferdinand
  • 0 Votes
    2 Posts
    331 Views
    i_mazlovI
    Hi @maxiokid , Please excuse the long answer delay. There're a lot of changes between R22 and 2023.2.2, so I'm not surprised the behavior has changed. The way you adapt your plugin to the new SDK depends on what you're trying to achieve. Please provide a more detailed description of the the effects you need to use inside the execute function. Usually a minimally functional code snippet that highlights the issue is a very self-explanatory way to do that. Cheers, Ilia
  • 0 Votes
    3 Posts
    950 Views
    HerzogVonWieselH
    Thank you again @ferdinand ! Sad that resizing windows is not a possibility. Would've been nice to have the options pop up once you toggle the extra options on! Now I've implemented them as a modal dialogue so you can choose them and close it again. Thank you for your help!
  • Python plugin encryption

    Cinema 4D SDK python 2023 sdk
    3
    0 Votes
    3 Posts
    703 Views
    F
    Thank you very much!
  • 0 Votes
    3 Posts
    796 Views
    ThomasBT
    @ferdinand Many thanks for this detailed example, I'll try it out P.S. Oh my gosh, it's working perfectly. I decided to go the easiest way, just to check the dirtyness of the linked object. linkDirty: bool = link.IsDirty(c4d.DIRTYFLAGS_DATA) Many many thanks Thomas
  • 0 Votes
    9 Posts
    1k Views
    chuanzhenC
    @ferdinand The code works very well
  • hud depth buffer?

    Cinema 4D SDK r19 2023 python
    6
    1
    0 Votes
    6 Posts
    1k Views
    ymoonY
    Added one more for... zip to remove the invisible points.
  • DescID() python doc issue

    Cinema 4D SDK python 2023
    3
    2
    0 Votes
    3 Posts
    421 Views
    chuanzhenC
    @i_mazlov Thanks
  • Get All Description of Object

    Cinema 4D SDK 2023 python
    3
    1
    0 Votes
    3 Posts
    554 Views
    chuanzhenC
    @ferdinand Thanks
  • 0 Votes
    3 Posts
    771 Views
    E
    @i_mazlov Thank you very much for your help!
  • 0 Votes
    4 Posts
    661 Views
    ferdinandF
    Hey @fwilleke80, you are right, it does indicate an error, hence my example from above. When I searched in our internal code base for similar code, I found a lot of return NodeData::GetDDescription(node, description, flags); calls. While there are certainly node types which customize their description handling, this seems to be more a precaution for the case when we decide that we want to implement something in NodeData::GetDDescription in the future. Or something has been there in the past and we optimized it away. In any case, one should not take my comment about calling the base implementation being pointless too seriously. It is best to leave the call in, although it currently has no practical effect and probably will never have. Cheers, Ferdinand
  • Object Opacity Animation by Python Tag

    Cinema 4D SDK 2023 python
    5
    0 Votes
    5 Posts
    982 Views
    ymoonY
    @ferdinand Thank You for Reply
  • 0 Votes
    3 Posts
    680 Views
    S
    @i_mazlov got it! thx for answer!
  • 0 Votes
    4 Posts
    740 Views
    i_mazlovI
    Hi @ymoon, Thanks for reaching out to us. Glad your problem is solved! Here are some pointers to the docs with related toolset: c4d.Vector, c4d.Matrix, c4d.utils. Please note, there's Matrix Manual, although math questions are generally out of scope of the support on this forum. Cheers, Ilia