• How to read Field driven VertexMapTag's

    2023 c++
    4
    0 Votes
    4 Posts
    1k Views
    K
    Yes that's what afraid to hear:) I did iteration over tags of Cache/Deform Cache and compare with GetOrigin() thingy to find related tag. I believe there should be some functionality in the SDK. Thanks for answers!
  • How to set a Shader for Roughness ????

    windows python r23
    7
    0 Votes
    7 Posts
    1k Views
    B
    @Dunhou @ferdinand Gotcha. Thanks for the confirmation and illustration links.
  • IsConnected Method Not Working As Expected?

    2023 python
    9
    0 Votes
    9 Posts
    837 Views
    ManuelM
    @bentraje said in IsConnected Method Not Working As Expected?: P.S. Just some minor nitpick, both method does not return the same type. The first returns a list. While the second return an iterator. Not really a problem per se since I can just convert the iterator to a list. Just some FYI in case you are interested. Thanks a lot for reporting that, we will fix this as soon as possible
  • Need help getting an old script to work in C4D

    python
    8
    0 Votes
    8 Posts
    936 Views
    ferdinandF
    Hello @bstone, Thank you for reaching out to us and welcome to the Cinema 4D community. And thank you @bentraje for answering the question. We do not have to add anything here, @bentraje already pointed out all the important bits Cheers, ferdinand
  • Arrange Selected Node Method?

    2023 python
    3
    1
    0 Votes
    3 Posts
    284 Views
    B
    @manuel gotcha. thanks for the confirmation.
  • Get Spline Points Positions from PLA keyframes

    python
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hey @joel, a 'dead' object means that Python tries to reference a node which does not exist in the C++ layer anymore, i.e., has been de- or reallocated. Since my function retrieves the tag on the spot and does not attempt to pass it outside of the function, it seems a bit unlikely that the tag is already dead, at least I am not experiencing any of this. Please provide the scene, code you are running, and the exact stack trace (do not forget to save your script first, so that the trace has the correct line numbers). Otherwise I will not be able to help you. Cheers, Ferdinand
  • Replace "Shape Node"?

    2023 python
    4
    0 Votes
    4 Posts
    556 Views
    B
    @ferdinand Thanks for the outlining the limitation. For options Yep the replace command does not carry over the connection so that's a no go. I just went with the python route. Works as expected. Basically, I just deleted all the points of the spline object through the resize object. Then rebuild it again with the reference. No problem so far. RE: scene nodes. Uhm I really find the nodes implementation clunky at the moment and this is coming from a user who uses Houdini. No plans in implementing it at all in my workflow.And the pyro being implemented as a tag and not as a scene nodes set-up tells a lot that they are not confident in that workflow. Too convoluted for what it is trying to achieve and doesn't use "attributes" like what Houdini and Blender can. I find it as a "toy" at the moment rather than an actual production tool. Anyway, will close this thread for now.
  • Python Cloner Effectors Keyframe

    python
    6
    1
    0 Votes
    6 Posts
    1k Views
    J
    I was able to solve it by searching the DescID in the Cloner Description with the Inheritance Name.
  • Python Plugin GUI Tutorial

    python
    5
    0 Votes
    5 Posts
    2k Views
    J
    Thank you so much for the information. If further information is needed I will reopen this question.
  • Trying to install Python package

    4
    1
    0 Votes
    4 Posts
    746 Views
    J
    Thank you so much. All further communications will be done via email.
  • Show "Hidden" Points?

    2023 python
    3
    1
    0 Votes
    3 Posts
    285 Views
    B
    @Manuel RE: This might happen if you changed Yep yep this is what I'm currently doing. hehe Anyhow, your code works. Thanks!
  • Unpacking Animation Data Wrapped by the Motion System (NLA)

    2023 python
    5
    0 Votes
    5 Posts
    1k Views
    K
    Hi @ferdinand, Thank you for the detailed explanation and the code. It works perfectly and the problem is solved!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Actively Link Hair Guides to a Spline or Alembic?

    r25 python
    3
    0 Votes
    3 Posts
    580 Views
    B
    Hi @ferdinand Thanks for the response and heads up on the crashes. RE: you want to control hair guide vertices programmatically Yep yep you are right on this part. Basically, have a geometric hair animated and simulated for preview. But rendered on the actual hair object. This is the workflow for other DCC, and the more logical one. This way you separate the hair source and hair generation. It's easier to debug. Anyhow, for looking at your python example, this should get me by on my current use case. Thanks for your illustration as always! Will close thread now.
  • Copy Assets to new Location

    python
    3
    0 Votes
    3 Posts
    536 Views
    C
    Hi ferdinand, I am very sorry for my lack of reading the Guidelines properly. But still, very huge thanks to you for the explanation anyway. This already helped me. I will try things out and will probably come back here with some code.
  • Asset Browser: Add Watch Folder

    python
    4
    0 Votes
    4 Posts
    1k Views
    a_blockA
    Thanks, Ferdinand. I'll take a closer look as soon as I find the time.
  • Remove render sequence automatic numbering

    8
    0 Votes
    8 Posts
    2k Views
    L
    Hello @ferdinand Thanks a lot for the code above, I really appreciate your help. I changed a few things for match what I was looking for and now it's working perfectly. Thanks again!
  • Make Node Callbacks Optional?

    python
    3
    0 Votes
    3 Posts
    341 Views
    B
    @ferdinand Thanks as always for the explanation. The illustration code works for my use case. Will close now thread
  • How to Modify the Axis of a Point Object?

    python
    7
    0 Votes
    7 Posts
    3k Views
    ferdinandF
    Hey @delizade, The script works for anything that is a c4d.PointObject, i.e., editable polygon and spline objects. But not for generators, e.g., the Cube object or the Circle spline, as you cannot edit their points and therefore have no control over the placement of their "axis" in relation to their vertices. When you want to set the transform of any BaseObject, e.g., a PointObject, a generator, or a null object, you must simply set either its local or global matrix. But this will not keep vertices 'in place' as generators and a null object have no vertices one could edit, and the vertices of PointObject instances must be corrected manually to achieve the 'move the axis idea'. But you can of course just set the global or local matrix (a.k.a. transform) of a BaseObject. Find an example below. For more detailled information, I would recommend having a look at the Matrix Manual. Cheers, Ferdinand The result, the two cubes are not at the same location because combining two transforms is not commutative, i.e., the order matters. A * B is not always the same as B * A for matrices: [image: 1669892200687-8392f997-7526-4a6d-b00b-e020d7669c59-image.png] The code: """Demonstrates the basic concept of transformations as realized by Cinema 4D. """ import c4d def main() -> None: """Constructs two transforms and applies them in the global coordinate system to two cube objects. """ # Construct a transform that translates by 500 units on the y-axis and one that rotates by # 45° on the x-axis. move: c4d.Matrix = c4d.utils.MatrixMove(c4d.Vector(0, 500, 0)) rotate: c4d.Matrix = c4d.utils.MatrixRotX(c4d.utils.DegToRad(45)) # Combine both transforms into a singular one by multiplying them. Note that matrix # multiplication, combining transforms, is not commutative. I.e., the order matters opposed # to numbers; move * rotate is not the same as rotate * move. tMoveRotate: c4d.Matrix = move * rotate tRotateMove: c4d.Matrix = rotate * move # Allocate two cube objects. cubeMoveRotate: c4d.BaseObject = c4d.BaseObject(c4d.Ocube) cubeRotateMove: c4d.BaseObject = c4d.BaseObject(c4d.Ocube) if None in (cubeMoveRotate, cubeRotateMove): raise MemoryError("Could not allocate cube object.") # And set their global matrix, i.e., the absolute transform in the global coordinate system. cubeMoveRotate.SetMg(tMoveRotate) cubeRotateMove.SetMg(tRotateMove) # Name both null objects, set their display color, insert them into the active document, and # push an update event. cubeMoveRotate.SetName("Cube: Move -> Rotate") cubeRotateMove.SetName("Cube: Rotate -> Move") cubeMoveRotate[c4d.ID_BASEOBJECT_USECOLOR] = c4d.ID_BASEOBJECT_USECOLOR_ALWAYS cubeRotateMove[c4d.ID_BASEOBJECT_USECOLOR] = c4d.ID_BASEOBJECT_USECOLOR_ALWAYS cubeMoveRotate[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(1, 0, 0) cubeRotateMove[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(0, 0, 1) doc.InsertObject(cubeMoveRotate) doc.InsertObject(cubeRotateMove) c4d.EventAdd() if __name__ == '__main__': main()
  • Node Method IsValid() Throws ValueError

    python r25
    5
    0 Votes
    5 Posts
    452 Views
    B
    @m_adam Gotcha. Thanks for the heads up!