• Not able to post?

    Cinema 4D SDK s26 python
    2
    0 Votes
    2 Posts
    600 Views
    ferdinandF
    Hey @ELJeffery, Thank you for pointing this out. We are generally aware of this issue. If anyone else is experiencing similar issues, please point them out. While we are aware that the issue exists and we can see the incident reports in the back end, it is not 100% clear to us how frequent this does happen to human users (and how urgent this is issue is). So, when you run into the issue too, please drop us here the Cloudflare Ray ID of your error page. As an FYI, the issue usually rectifies itself after a few minutes. Cheers, Ferdinand
  • C4DAtom.SetParameter/GetParameter help

    Cinema 4D SDK 2024 python
    3
    0 Votes
    3 Posts
    662 Views
    i_mazlovI
    Hi @ops, Thanks for reaching out to us and thanks for sharing your solution with the community, this is highly appreciated! You're right, the most common way of accessing object's attributes is by using subscript operator. Cheers, Ilia
  • 0 Votes
    8 Posts
    2k Views
    DunhouD
    Wow @m_adam , thanks for that, I'll check this after work!
  • 0 Votes
    2 Posts
    606 Views
    i_mazlovI
    Hi @BigRoy, For the alembic camera, you can use c4d.MSG_GETREALCAMERADATA, for example: def main(): data = dict() op.Message(c4d.MSG_GETREALCAMERADATA, data) print(data['res']) Another option (which would work for other object types as well) would be to check type of the object's cache using GetCache(). Cheers, Ilia
  • 0 Votes
    2 Posts
    683 Views
    M
    Hey BigRoy, sadly it's still impossible, I will start the discussion again, thanks for the reminder. Cheers, Maxime.
  • 0 Votes
    5 Posts
    1k Views
    R
    I was just looking for the exact same thing and would second the need for these 3 hooks without the need for a Python Generator object. It would make the pipeline integration of C4D much more straightforward. @m_adam
  • Import and managing 'merged' Alembic

    Cinema 4D SDK python 2023
    4
    1
    0 Votes
    4 Posts
    2k Views
    i_mazlovI
    Hi @BigRoy, in python the lifetime of the objects is handled automatically so you're right, there's no need to do anything special to destruct the object. Good job on your project! Thanks for sharing it with the community! Cheers, Ilia
  • 0 Votes
    3 Posts
    733 Views
    i_mazlovI
    Hi @datamilch, you can use the EVMSG_CHANGE message as a trigger to check your objects for changes. The timer approach might seem imprecise from the first glance, but can actually be used, I don't think there're any significant reasons against it. Additionally, the recent change was made to make BaseList2D being hashable. This effectively means you can operate with your objects in a dict. The python tag approach is the least efficient, although would still work, yes. You're saying your GeDialog plugin uses "mostly the ideantical userdata". If it was "identical", you could potentially use c4d.gui.DescriptionCustomGui with the SetObject function to make it point to your object. This way you can avoid hassling around all the data sync, because it is all handled as a built-in functionality of this class. This is how the attribute manager effectively works, or the Active Object Dialog as well. For your further postings please follow our guidelines on How to Ask Questions, namely: Please consolidate your questions into a singular posting by editing your last posting Cheers, Ilia
  • CopyBitmapToClipboard gamma issue

    Cinema 4D SDK python 2024 windows
    2
    1
    0 Votes
    2 Posts
    514 Views
    i_mazlovI
    Hi @John_Do, Please note that this forum is for the public APIs of Maxon products related topics. We unfortunately cannot help with the end user issues. Please ask your end user questions in our Support Center. This and also other important considerations are mentioned in the Scope of Support part of our Support Procedures. With that's said, your question gives a fuzzy impression on what exactly you're asking about. Namely, you're talking (presumably) about the CopyToClipboard() function, but then also claim the issue is not there, rather when you paste this bitmap in the PV. Could you please share some code snippet, which highlights the issue, especially the pasting part, which seem to not work as expected. Please also make sure you've setup the Picture Viewer's View Transform to meet your needs. In our internal bug tracking system I'm also seeing 2 issues that we already keep track of: A-B comparison issue that was just recently fixed and is not yet released Picture Viewer issue with OCIO enabled when using EXR files However, none of these seem to be specifically related to your case. If you're still having this issue and it is not related to our SDK, I would kindly ask you to reach out to our Support Center. Cheers, Ilia
  • 0 Votes
    4 Posts
    1k Views
    H
    @i_mazlov Thanks much for explanation.
  • 0 Votes
    2 Posts
    418 Views
    ferdinandF
    Hey @rui_mac, thank you for reaching out to us. In general only shaders which are volume shaders have access to the object for which they are being called for. In Python (or in COFFEE) you cannot implement volume shaders and therefore cannot access the object which is being rendered. When you are implementing a volume shader in C++, you can do this (untested pseudo code): cinema::Vector MyShader::Output(cinema::BaseShader* shader, cinema::ChannelData* cd){ // Get the volume data from the channel data. cinema::VolumeData* const vd = cd ? cd->vd : nullptr; if (!vd) return COLOR_RENDER_ERROR; // Get the ray objects. for (cinema::Int32 i; i < vd->GetObjCount(); i++) { const cinema::RayObject* const ro = vd->GetObj(i); if (!obj) continue; // Attempt to find the object this ray object has been constructed for. const cinema::BaseObject* const op = ro._texture_link ? ro._texture_link : ro._link; if (!op) return COLOR_RENDER_ERROR; // Do stuff with the object ... } return COLOR_RENDER_ERROR; } Cheers, Ferdinand
  • Getting UV coordinates from a plane

    Cinema 4D SDK python r21
    9
    1
    0 Votes
    9 Posts
    2k Views
    ferdinandF
    Hey @rui_mac, no, they do not match the uvw coordinates. They are weights, please have look at the example I have linked to above, it likely does everything you need. GetPolyPointST expects a value in local object coordinates and returns weights for the polygon UVW coordinates. You get then your final coordinate by the bilinear interpolation of the UVW quad over the s,t weights. You can of course technically replicate all the math yourself, but as Ilia has pointed out this would be out of scope of support. Cheers, Ferdinand
  • Set Tangnet of Spline

    Cinema 4D SDK python
    3
    1
    0 Votes
    3 Posts
    744 Views
    gheyretG
    Hi @ferdinand ! Sorry for late reply, and thank you very much for your detailed and thorough explanation, and for taking the time to explain the relationship between linear algebra and trigonometry in the context of computer graphics and transformations. As a beginner, all I want to do here is to practice as much as I can with the knowledge I've learned, and I apologize if I didn't explain clearly. Yes, in the code I want to implement is placing two tangent handle relative to the two input objects a and c. Compared to calculating with trigonometric functions, your suggestion seems more straightforward and clear, and I never would have thought to use vectors to achieve this, I need to keep practicing. I will take the time to review the thread you mentioned. Thank you again for your support and guidance. Thank you very much for your insights!
  • 0 Votes
    3 Posts
    693 Views
    jochemdkJ
    OK, clear, thx!
  • Create Radio Button in User Data

    Cinema 4D SDK python
    5
    1
    0 Votes
    5 Posts
    1k Views
    D
    @i_mazlov Thanks a lot for your time. You answered my question brilliantly.
  • 2025.0.0 SDK Release

    News & Information cinema 4d news c++ python sdk
    8
    3 Votes
    8 Posts
    11k Views
    H
    Thank you
  • 0 Votes
    5 Posts
    1k Views
    R
    Thanks Ferdinand and that does seem very plausible given that I am very new to type hinting in my code, and I have actually caught myself swapping the colon for the equals sign already. Learning from you guys every day though! I'm off to break some more sh!t! Thanks so much for your time, will let you know when I get stuck...
  • 0 Votes
    3 Posts
    965 Views
    ferdinandF
    Hello, Thank you for reaching out to us. @Dunhou is right, the Picture Viewer is sealed, which means that you can put images into it (with c4d.bitmaps.ShowBitmap or c4d.documents.LoadFile) but you cannot get images or information out of it. This generally applies to all UIs, we do not expose UIs, but the data structures behind them. So, there is for example no Object or Material Manager API interface, their functionalities are exposed via the scene graph. For the Picture Viewer there is no data structure exposed. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    727 Views
    D
    @i_mazlov Thanks! makes sens. seems i only used the forgiving commands until now. the code is run in a python generator. so by returning the object, it will be inserted into the scene.