• Is it possible to update the Python Version a release uses?

    3
    0 Votes
    3 Posts
    538 Views
    ManuelM
    hi, technically, it is possible, but you will have to figure it out yourself and be prepare to do a lot lot work. the answer is pretty no. Cheers, Manuel
  • Fields and Adding an Effector

    c++ python r20 sdk
    3
    0 Votes
    3 Posts
    750 Views
    D
    @m_magalhaes Thank you! Works perfectly. Dan
  • EffectorData: Set clone visibility?

    r20 r21 s22 r23 c++
    3
    1
    0 Votes
    3 Posts
    366 Views
    fwilleke80F
    Works like a charm, thank you! Greetings, Frank
  • GetContour() and return Onull

    13
    0 Votes
    13 Posts
    2k Views
    D
    Hi @ferdinand. Thanks for all of the help. That all makes sense to me. Hopefully in the future there will be a better work around, but for now I've got a workaround that is clunky but working. Thanks again, Dan
  • Change LONG_CYCLE selected Item.

    c++ r20 windows
    11
    0 Votes
    11 Posts
    2k Views
    W
    Thanks for guiding Regards, Folexin
  • Help with tutorial of an animation of a Wallet!

    2
    0 Votes
    2 Posts
    357 Views
    M
    Hi @Quencyjones first of all welcome to the plugin cafe community, Nevertheless, this forum is about Cinema 4D Development to build plugin or script in Cinema 4D. This is not a Cinema 4D user forum where you can find solutions to technical questions about how to use Cinema 4D, but only about its API. So I think it's better for you to ask on more Cinema 4D user-centric forum such as cgtalk, core4d. Cheers, Maxime.
  • Run plugin every frame

    Moved
    3
    0 Votes
    3 Posts
    484 Views
    R
    After a few mails with Ferdinand I switched to a Tag plugin solution. This does the job perfectly. So the solution was not to use an Object data solution but a TagData. Thanx!
  • Create Geometry from Python Generator

    Moved python
    7
    1
    0 Votes
    7 Posts
    1k Views
    J
    @johntravolski I figured it out, I needed to add node.Message(c4d.MSG_UPDATE) after the for double loop where I set the polygons.
  • startup script in R23 not working anymore

    r23 python
    3
    0 Votes
    3 Posts
    511 Views
    M
    hi @ferdinand thank you very much for your response! the python_init.py does the job perfectly great support, thanks a lot! best, marc.
  • Build fails with R23 SDK

    r23 sdk
    3
    0 Votes
    3 Posts
    643 Views
    K
    Thank you for your advice. The build was successful !!
  • Drag and Drop external image in a gui Edit Text box with Python

    5
    0 Votes
    5 Posts
    898 Views
    D
    Great! Cheers!
  • Drag&Drop an image in a gui field

    r20 python
    5
    1
    0 Votes
    5 Posts
    1k Views
    D
    @pim I'm trying to figure out how you did this. Could you please share a sample code of this example? I'm trying to get the full path of an image by dragging it into a edit text field... Cheers
  • UVW coordinates in ShaderData.Output()

    r23 c++ python
    12
    3
    0 Votes
    12 Posts
    2k Views
    ManuelM
    hi, I don't see how we could do it with the Draw Method in a efficient way. Cheers, Manuel
  • How to download a file in R20+

    maxon api r21 s22 r23
    5
    0 Votes
    5 Posts
    548 Views
    ManuelM
    hi, by the way, i forgot to talk about the thread thing. This thread might help And of course our manuals about threading Cheers Manuel
  • Global Matrix - Trying to copy data from Mixamo Control Rig with Python

    13
    0 Votes
    13 Posts
    3k Views
    ferdinandF
    Hi @Leo_Saramago, while I agree that using transforms/matrices is more convenient than vectors for position, scale and rotation, it frankly do not quite get why you cannot use the latter since matrices are exactly the same, just written in a more convenient form. There are however multiple convenience methods attached to BaseDocument, .AnimateObject(), .AutoKey(), .Record() and .RecordKey(), with which you can animate nodes without having to deal with the more atomic animation types directly. I have attached a very simple example at the end for the .Record() method, in the hopes that this reflects what you are trying to do. Cheers, Ferdinand """Little example for one of the animation convenience methods of BaseDocuement. Select an object and run the script, it will create a short animation for it. As discussed in: plugincafe.maxon.net/topic/13228/ """ import c4d import math def main(): """ """ # Get out when there is no object selected. op is predefined as the # primary selected object in a script module. if op is None: raise ValueError("Please select an object.") # Set a frozen rotation for that object. op[c4d.ID_BASEOBJECT_FROZEN_ROTATION] = c4d.Vector(0, 0, math.pi) # Set a frozen translation for that object. op[c4d.ID_BASEOBJECT_FROZEN_POSITION] = c4d.Vector(50., 0, 0) # Take ten steps. for t in range(10): # Create a BaseTime in 1/10th of a second intervals from our step count. bt = c4d.BaseTime(t * .1) # Set the document to that time. doc is like op a predefined script # module attribute, pointing to the currently active document. doc.SetTime(bt) # Set the rotation of our object. rotation = t * .1 * math.pi op[c4d.ID_BASEOBJECT_REL_ROTATION] = c4d.Vector(rotation, 0, 0) # You can also make use of SetMg() here if you want to, this however # will not respect the frozen values, or only in a way that is probably # not what you want. So if you set a frozen offset of (100, 0, 0) # for example and then write an offset of (0, 0, 0) into the object # via SetMg(), the object will then have the relative position of # (-100, 0, 0) in the coordinate manger, because (0, 0, 0) in world # coordinates is (-100, 0, 0) in frozen coordinates. Keyframing with # SetMg() will however work fine. # mg = c4d.utils.MatrixRotZ(rotation) # mg.off = c4d.Vector(t * 10, 0, 0) # op.SetMg(mg) # Record the active object(s) in the document. Additional convenience # methods for animating stuff are BaseDocument.AnimateObject(), # .AutoKey(), and .RecordKey(). Se documentation for details. doc.Record() # Push an update event to Cinema 4D, so that our editor is getting updated. c4d.EventAdd() if __name__=='__main__': main()```
  • Undo Problem For TagData Plugin

    python r23
    4
    1
    0 Votes
    4 Posts
    616 Views
    ManuelM
    hi, @beatgram said in Undo Problem For TagData Plugin: So these bracket notation style is safer than using BaseContainer in any case? this should be exactly the same. Sorry i didn't got time to warp my head around it. Cheers, Manuel
  • SaveDocument Unexpected Behavior in R23

    Moved
    3
    0 Votes
    3 Posts
    511 Views
    K
    @m_magalhaes Thank you so much for the help! The script works fine after adding this line. Cheers, Kon
  • External dependencies question

    python
    3
    0 Votes
    3 Posts
    699 Views
    M
    Hi @mfersaoui there is nothing wrong with the way you are doing, but I would like to point out that the sys.path is a global variable shared over the current python environment. Meaning that 3rd party will be able also to import your own module so it's recommended to have an ambiguous name (e.g. if your module1.py is called util.py) people will be able to do import util and this can be really misleading so it's preferred to have a unique name (maybe you can start with a prefix). Finally, the solution offered by @mp5gosu is the cleanest one as it will create a local import space, so your util.py will only be importable by your own pyp file that actually calls the local import so it's so far the cleanest way as you are not "polluting" the global sys.path. But which one is the best, only you can decide according to what you are aiming to produce. Cheers, Maxime.
  • Grabbing a GeUserArea when using InputEvent

    r23 python windows
    4
    1
    0 Votes
    4 Posts
    511 Views
    ferdinandF
    Hi @blastframe, yes, that would be one, and probably the more modern way to do it. I personally like also an explicit call to the base implementation. I think it is more readable for someone else reading your code. But that is probably a rather subjective choice. So for clarity, I am speaking about something like this: foo = bar * baz return c4d.gui.GeUserArea.InputEvent(self, msg) There is of course the advantage of super taking care of calling the proper implementation(s) for you which is not taken care of by this approach, but you cannot have everything and in this case things are rather unambiguous for us here Cheers, Ferdinand
  • Erratic Keyboard Messages in GeDialog

    python r23 windows
    7
    0 Votes
    7 Posts
    1k Views
    ?
    @mp5gosu Sorry, I missed it! That works! In case other devs have a solution, I'll mark yours as the right answer. Thank you!