• 0 Votes
    4 Posts
    823 Views
    B
    @ferdinand Gotcha. Thanks for the clarification and the sample code. Should have probably went for the matrix transforms to begin with. I was hoping I can get away with those euler angles lol. Closing the thread now.
  • MatrixToHPB Not Giving the Global Rotation?

    Cinema 4D SDK r25 python
    3
    1
    0 Votes
    3 Posts
    379 Views
    ferdinandF
    Hello @bentraje, thank you for reaching out to us. There is nothing much left to add for us here. All angle values are represented internally in radians in Cinema 4D, only the UI does convert to degrees. Except for displaying angle values in UIs, I would however recommend to embrace the unit of radians in code rather than converting in and out of it. There is no computional downside to always doing the conversions, e.g., theta: float = c4d.utils.DegToRad(90). But writing something like theta: float = math.pi * .5 forces oneself to understand the intimate relation between a trigangle and the unit circle, i.e., the circle or trigonometric functions. Understanding radians and why it is a useful unit is then an emergent property of that understanding of trigonometry. Cheers, Ferdinand
  • Load Save Weights Command from Weight Manager?

    Cinema 4D SDK r25 python
    3
    1
    0 Votes
    3 Posts
    466 Views
    B
    @manuel Gotcha. Thanks for the confirmation. Closing this thread now.
  • 0 Votes
    9 Posts
    2k Views
    B
    @ferdinand Thanks for the response. I'll get back to you on this just having some stuff in the pipeline that are more immediate. That said, I do want to confirm that your code is working from the get go. It's just my implemention of it in the GUI dialog. I'll just have to iron out the logic on that one.
  • Multiple instances of ObjectData plugin?

    Cinema 4D SDK c++ r25 macos
    3
    1
    0 Votes
    3 Posts
    624 Views
    W
    @ferdinand Thank you very much for your elaborate answer! Explaining the difference between the interface layer and the plugin layer was very enlightening. I now understand that calling functions more than once is all part of the package and that this does not refer to the actual plugin instance. Thank you again.
  • Add "Clickable" Text in a GUI?

    Cinema 4D SDK r25 python
    5
    0 Votes
    5 Posts
    690 Views
    B
    @ferdinand RE: The id is CUSTOMGUI_HYPER_LINK_STATIC, you can find it on the page of the custom GUI Gotcha. Thanks for the confirmation. Just wondering, why is that ID not also on the list of the Custom GUIs in the documentation. Along with other CUSTOMGUIs. Is it because the list will be too long already? RE: code Can confirm it works as expected. Although had to revised this default=200 part to defaultw=200.
  • Reset Rotate With Compensate Points?

    Cinema 4D SDK r25 python
    4
    0 Votes
    4 Posts
    974 Views
    B
    For some fortunate happpenstance, found a code snippet that does this: https://gist.github.com/andreberg/885210
  • Reset Scale With Compensate Points?

    Cinema 4D SDK r25 python
    3
    1
    0 Votes
    3 Posts
    747 Views
    B
    @m_adam Gotcha. Thanks for the response. It works but I was kinda looking for the thought process on how to implement it. Mainly because the command is only limited to scale. I was hoping I can modify it to include also rotation.
  • Paste JSON Values on the Node Network?

    Cinema 4D SDK r25 python
    7
    0 Votes
    7 Posts
    1k Views
    B
    @iplai ah yep. I'll probably use this one since it does not require third party library. haha. Thanks for the illustration!
  • Get the Name of the Node?

    Cinema 4D SDK r25 python
    7
    0 Votes
    7 Posts
    2k Views
    M
    You have to be careful since the value returned by effectivename will change according of the Cinema 4D language. The best way is really to work with IDs. Cheers, Maxime
  • How to Use ListAllNodes?

    Cinema 4D SDK r25 python
    5
    0 Votes
    5 Posts
    933 Views
    ferdinandF
    Hello @bentraje @bentraje said in How to Use ListAllNodes?: doc: c4d.documents.BaseDocument # The active document. I'm not too familiar with the Python 3 syntax but this line returns an empty graph down the line. Tha is a bit odd, especially since I tested and ran the code with R25. This line or code such as below # Without type hinting. def foo(a): return f"{a}" # With type hinting. def foo(a: typing.Any) -> str: return f"{a}" makes use of type hinting. It tries to rectify ambiguities that come with the fact that Python is dynamically typed. For now, type hinting has no real impact on code run on CPython (i.e., the "standard" Python), unless you use special libraries to run your CPython code or use interpreters other than CPython which support static or at least asserted typing out of the box. All the line doc: c4d.documents.BaseDocument # The active document. does for now is: Make code more readable by telling humans what the module attribute doc is and that it exists in the first place. Enable auto-complete engines as provided by, for example, VSCode to give you smart suggestions. Enable linters or runtime libraries to run type assertions on your code. Adding or removing this line should have zero impact on the execution, unless you added there an equals sign and overwrote the value of doc. Cheers, Ferdinand
  • Append string the node path in retrieving the port?

    Cinema 4D SDK python r25
    3
    0 Votes
    3 Posts
    362 Views
    B
    @ferdinand Thanks for the clarification and offering some alternatives. I guess it has something do with how it was designed. There is a FindChild equivalent in other DCC API too like in maya there is a GetAttr or something. But again, if you know the actual parameter/attribute path like texturenode.tex0.colorspace texturenode.uv.uv_channel texturenode.remape.scale.x There's no need. It's straightforward. You use that instead. Anyhow, will close this thread now.
  • API for Project Asset Inspector?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    828 Views
    B
    @ferdinand Thanks for the response. RE: we never expose managers themselves Gotcha. Thanks for the clarification RE: Code Works as expected. Closing this thread now.
  • 1 Votes
    6 Posts
    2k Views
    B
    @Dunhou @Manuel Thanks for the response. I ended up going for the ctrl+C on the node editor Pretty straightforward and works as expected. Functions like how you copy/paste nodes on Fusion and Nuke.
  • Selection Order Flag for GetActiveMaterials?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    335 Views
    B
    @Manuel Gotcha. Thanks for the confirmation.
  • Ability to Drag Nodes to the Console?

    General Talk r25 python
    7
    0 Votes
    7 Posts
    1k Views
    B
    @ferdinand Gotcha. Thanks for the clarification. Will close this thread now.
  • Get Node By Name?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    384 Views
    B
    @Manuel Ah gotcha. It's only available R26 onwards. That's why I can't see something related in my R25 documentation.
  • String values for the "FindChild"?

    Cinema 4D SDK python r25
    13
    0 Votes
    13 Posts
    1k Views
    B
    @Manuel Gotcha. Thanks for the clarification. Sorry for the trouble. Works as expected. Will close this thread now.
  • Include Description in the Search Documentation?

    General Talk r25 python
    5
    0 Votes
    5 Posts
    878 Views
    B
    @ferdinand Uhm. It's not as complicated as that. I mean it is complicated per se but there are already existing solutions. Check "Sphinx Search Extension". There are several. Pip install it and just insert it into the conf.py file. Also, it's not really as spicing it up per se. I mean it is but not really. It's just adding a sub paragraph section. The maxon redshift documentation is already doing it. And even if you are using sphinx implementation, it's also existing. Blender documentation is built using sphinx. [image: 1666619696194-8579cd6b-d0a4-4844-9563-5ee4d390a1e3-image.png]
  • 0 Votes
    5 Posts
    603 Views
    B
    @manuel ah gotcha. the node kinda. thanks. will close this thread for now.