Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Home
    2. Cinema 4D SDK
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • WickedPW

      BaseContainer containers

      c++ sdk • • WickedP
      3
      0
      Votes
      3
      Posts
      93
      Views

      ManuelM

      Hi,

      you have two function to retrieve the BaseContainer from an object and a container inside a BaseContainer.
      You can either retrieve a pointer or a reference.
      All function retrieve a pointer to the data and the references are just returning a dereference's pointer.

      To retrieve the data from the object you have GetDataInstance and GetDataInstanceRef and to retrieve a BaseContainer inside another one you have GetContainer and GetContainerInstance.

      Neither of them return a copy.

      About the issue, there's no issue as long as the object exist in memory. Depending of the context (specially if you are using threads) this can be more or less safe.

      Cheers,
      Manuel

    • Y

      Turn Bezier spline to linear spline

      • • Yaroslav
      8
      0
      Votes
      8
      Posts
      598
      Views

      Y

      @ferdinand
      Oh, thanks!
      Quite a nice idea!

    • A

      How to move axis to desired matrix without affecting object in python?

      python • • alfredogzz
      3
      0
      Votes
      3
      Posts
      288
      Views

      ferdinandF

      Hi @alfredogzz,

      welcome to the Plugin Cafe forum and the Cinema 4D development community! Please have a look at our Forum Guidelines as we have to ask all users to flag their questions with tags. I have added a Python tag (assuming that is the programming environment you are after) to your posting for you, but you have still to add an OS and Cinema 4D version tag yourself. Please also note that providing full solutions is outside of the scope of support (see Forum Guidelines), so it would be best if you could post whatever code you already have.

      About your problem, let's assume you have an object Obj which has has the "incorrect" c4d.Matrix, i.e., transform, M_old and you want to move that transform to the known transform M_new. Let's also assume that all our transforms are in global space.

      What you basically have to do is:

      Compute a difference matrix M_dif for M_old and M_new. One way to do it, is to multiply M_new by the inverse of M_old, i.e., "untransform" M_new by the amount of M_old. Multiply all vertices of Obj by the inverse of M_dif. Set the global matrix of O to M_new.

      Here are some other postings, topics and examples (the first one contains code for pretty much what you want to do) that might be helpful for you regarding this topic:

      "Move" the transform of a point object
      Setting coordinates for selected faces (Python - Beginner)
      Mirroring with Matching or Different Axes

      If you import your geometry from Rhino, you might also have to deal with baked normals, i.e., normal tags. Please take a look at this thread for that scenario.

      It also noteworthy that Rhino's coordinate system is right-handed with Z being up, while Cinema 4D's system is left-handed with Y being up. Handedness of coordinate systems has been discussed in Mirroring with Matching or Different Axes for example.

      Cheers,
      Ferdinand

    • G

      Material Assignments doesn't update when changing TextureTag Material

      python windows r23 • • Graeme
      5
      0
      Votes
      5
      Posts
      286
      Views

      ManuelM

      hi,

      thanks @mp5gosu for the answer.

      About inserting material before making some changes, there's no real right way of doing it. It just that if something go wrong about the change you are doing, you have to remove the material from the document, while if you don't insert it, you don't have to.

      As @mp5gosu said it's better to insert the object in the document before linking them. Even if should work if you insert the material after.

      Cheers,
      Manuel

    • B

      Errors when recompiling R20 plugin to R21

      • • Boony2000
      6
      0
      Votes
      6
      Posts
      307
      Views

      r_giganteR

      hi @Boony2000 , these are Visual Studio Intellisense errors which you can safely ignore. If they bother you switch the filter from "Build + Intellisense" to "Build".

      Cheers, R

    • mikeudinM

      MacOS BigSur on M1 Macbook Air zlib not loading

      python r23 macos • • mikeudin
      6
      0
      Votes
      6
      Posts
      928
      Views

      M

      Correct here are all the one we expect to fail:

      bz2 curses gzip lzma zlib

      As a quick reminder, Python 3.7.7 doesn't officially support M1, and only Python 3.9.1 (released in December does fully support it).

      Cheers,
      Maxime.

    • fwilleke80F

      This topic is deleted!

      • • fwilleke80
      1
      0
      Votes
      1
      Posts
      3
      Views

      No one has replied

    • C4DSC

      How to know when Apply button is grayed out (disabled)

      r20 c++ • • C4DS
      4
      0
      Votes
      4
      Posts
      184
      Views

      ManuelM

      hi,

      one side note, there is GetDEnabling and GetEnabling you can have more information in our manual

      GetEnabling will call GetDEnabling.

      There are pretty the same but the one you implement is GetDEnabling.

      Cheers,
      Manuel.

    • M

      BaseContainer Sort broken?

      python • • mp5gosu
      7
      0
      Votes
      7
      Posts
      213
      Views

      M

      That's okay, since it is a minor issue.
      For newcomers however, there should be a hint in the docs, because it clearly states Sorts the container entries by ID. which is not the case.

    • ?

      Updating F-Curves in Timeline on EditSlider Drag

      python sdk r23 windows • • A Former User
      4
      0
      Votes
      4
      Posts
      158
      Views

      ManuelM

      @blastframe said in Updating F-Curves in Timeline on EditSlider Drag:

      What's c4d.EVMSG_FCURVECHANGE for then?

      After a quick check (sorry, I should have checked yesterday for a more complete answer) literally nothing. It's used nowhere.

      Cheers,
      Manuel

    • ?

      CCurve.FindPrevUnmuted & CCurve.FindNextUnmuted

      r23 windows python sdk • • A Former User
      3
      0
      Votes
      3
      Posts
      146
      Views

      ?

      @ferdinand Thank you for this; it makes things much clearer. I am very grateful we have the forum to clarify these issues.

    • J

      Collect System Information/Configuration

      r23 c++ • • JuicyJuggles
      2
      0
      Votes
      2
      Posts
      106
      Views

      ManuelM

      hi,

      you can have a look at our manual about MachineInterface you will find all the machine information under those attributs

      Cheers,
      Manuel

    • ?

      Creating a Keyframe similar to Ctrl-Clicking the Curve

      r23 windows python • • A Former User
      3
      0
      Votes
      3
      Posts
      157
      Views

      ?

      @ferdinand That was exactly what I was seeking, thank you, Ferdinand! 😄

    • ?

      Description & Example in Documentation for CCurve.AddKey

      python sdk • • A Former User
      2
      0
      Votes
      2
      Posts
      104
      Views

      ferdinandF

      Hi @blastframe,

      thank you for reaching out to us and for reporting these errors in the documentation. We will fix both the erroneously attributed short description of AddKey as well as the code example in an upcoming update of the C4D SDK Python docs.

      Cheers and happy coding,
      Ferdinand

    • D

      Access GradientCustomGui in NodeData::GetDDescription

      c++ sdk • • Deyan
      4
      0
      Votes
      4
      Posts
      163
      Views

      D

      Hi, @m_adam, thanks for the effort. I suspected it will not be possible without a custom GUI/data implementation - I guess I will go with this approach.

      Cheers,
      Deyan

    • A

      ShowPopupDialog Freezes Cinema R21

      python r21 • • AndreAnjos
      12
      0
      Votes
      12
      Posts
      541
      Views

      A

      @ferdinand
      Hi Ferdinand,

      Thank you for your time and help!
      Will get it sorted with your pointers above.

      All the best!

      Andre

    • fwilleke80F

      Plugin compiled on macOS Catalina for R23, not working on Big Sur?

      r23 macos c++ • • fwilleke80
      22
      0
      Votes
      22
      Posts
      961
      Views

      r_giganteR

      @kbar said in Plugin compiled on macOS Catalina for R23, not working on Big Sur?:

      @fwilleke80 I think setting the hardened runtime when you code sign solves the timestamp issue. I don’t set a timestamp.

      codesign --force --options runtime --sign 'Developer ID Application: YOURCOMPANYNAME' 'sdk/plugins/yourplugin/yourplugin.xlib'

      Thanks a lot Kent, for pointing this out!
      The one below is the string I use which, as said by Kent, doesn't need the timestamp because of the hardened runtime.
      codesign -f -s "Developer ID Application: <YOUR DEV ID>" --options runtime <binary file>.xlib

      Documentation updated accordingly

    • M

      Find Plugin remains by Plugin ID and delete - how to tacle.

      r23 python • • mogh
      5
      0
      Votes
      5
      Posts
      503
      Views

      M

      I just had time to check this hence the holidays.

      This works with the correct ID (1036219 = Redshift) the nodes render my "cleaned" C4D file again.

      Thank you very much @m_magalhaes

      kind regards
      mogh

    • orestiskonO

      How to get all elements from BaseSelect

      • • orestiskon
      3
      0
      Votes
      3
      Posts
      186
      Views

      orestiskonO

      Thanks @ferdinand , I misinterpreted the GetRange argument. That clears it up, and thanks for the example as well, it's very useful!

    • Y

      Get Spline Data from document->GetActiveObject();

      c++ • • Yaroslav
      8
      0
      Votes
      8
      Posts
      308
      Views

      Y

      @m_magalhaes

      Thank you, Manuel!