Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Cinema 4D SDK
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • justintaylor-devJ

      Accessing Dev Tools in Webview / CUSTOMGUI_HTMLVIEWER

      python 2024 windows macos • • justintaylor-dev
      7
      0
      Votes
      7
      Posts
      1.1k
      Views

      justintaylor-devJ

      @ferdinand Great thanks!

    • B

      Right aligned button

      c++ • • BruceC
      3
      0
      Votes
      3
      Posts
      556
      Views

      B

      This works! Thank you very much, @i_mazlov.

    • S

      Changing the angle of spline-aligned objects

      python 2024 windows • • SmetK
      5
      0
      Votes
      5
      Posts
      841
      Views

      ferdinandF

      Good to hear that you found your solution!

    • Q

      Retrieving Images from Cinema 4D's Picture Viewer for Importing into Photoshop

      python 2023 • • qq475519905
      3
      0
      Votes
      3
      Posts
      741
      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

    • treezwT

      How do I sort the plug-in menu?

      python • • treezw
      8
      0
      Votes
      8
      Posts
      1.4k
      Views

      treezwT

      @ferdinand Thank you very much for your help, I have solved the problem!😄

    • D

      MCOMMAND_SELECTALL and MCOMMAND_SELECTINVERSE not working?

      python 2024 windows • • datamilch
      3
      0
      Votes
      3
      Posts
      554
      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.

    • S

      Use buttons in tags. Rope tag.

      windows python 2024 • • SmetK
      3
      0
      Votes
      3
      Posts
      526
      Views

      S

      @i_mazlov Thank you for your reply. That was very helpful!

    • R

      Encountered a possible error in the example code in the docs for AssetDataBasesInterface.FindRepository

      python 2024 • • randymills
      5
      0
      Votes
      5
      Posts
      782
      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...

    • WTools3DW

      Reading Display scale factor? <Retina,non-Retina>

      c++ • • WTools3D
      3
      0
      Votes
      3
      Posts
      575
      Views

      WTools3DW

      Thank you Ferdinand!
      I'll continue in backstage with this topic.
      V.

    • K

      Files and modules organization

      • • kisaf
      3
      0
      Votes
      3
      Posts
      717
      Views

      R

      AWESOME! Thanks @ferdinand!!!

    • jochemdkJ

      Is it safe to change the timeline from the main function of a python tag?

      python • • jochemdk
      3
      0
      Votes
      3
      Posts
      516
      Views

      jochemdkJ

      OK, clear, thx!

    • P

      Copy over additional nodes with a Node Material

      c++ • • peter_horvath
      5
      1
      Votes
      5
      Posts
      857
      Views

      P

      Sure, no worries, it's not a high priority, more like a nice to have feature. We can manage without this. I was just wondering if something like this could be possible already in the context of node materials. Thanks.

    • R

      This topic is deleted!

      • • rui_mac
      1
      0
      Votes
      1
      Posts
      7
      Views

      No one has replied

    • I

      This topic is deleted!

      • • ikolev
      1
      0
      Votes
      1
      Posts
      9
      Views

      No one has replied

    • R

      Getting UV coordinates from a plane

      python r21 • • rui_mac
      9
      0
      Votes
      9
      Posts
      1.4k
      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

    • R

      Getting the object it is being rendered, from inside a shader plugin

      python 2024 • • rui_mac
      2
      0
      Votes
      2
      Posts
      311
      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

    • gheyretG

      Set Tangnet of Spline

      python • • gheyret
      3
      0
      Votes
      3
      Posts
      569
      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!

    • chuanzhenC

      Copy info from one Object to other Object

      python s22 • • chuanzhen
      5
      0
      Votes
      5
      Posts
      1.3k
      Views

      John_DoJ

      @Manuel Thanks ! Still here in 2024.5.1

    • D

      Create Radio Button in User Data

      python • • danielsian
      5
      0
      Votes
      5
      Posts
      849
      Views

      D

      @i_mazlov Thanks a lot for your time.
      You answered my question brilliantly.

    • H

      HOW TO Turn off the auto tangent checkbox on keyframes using python API

      python windows 2023 2024 • • heytraile
      4
      0
      Votes
      4
      Posts
      746
      Views

      H

      @i_mazlov Thanks much for explanation.