• Execution Delay When Reading Data from JSON file

    r21 python
    6
    0 Votes
    6 Posts
    836 Views
    M
    I don't have a lot to add here, @zipit almost pointed everything moreover doing proper profiling for hard drive can be a bit tricky to set up for couple of reasons: Another process may randomly use hard drive (e.g Antivirus checking). Cached file optimization made by either the OS, the processor or even the hard drive itself. Cheers, Maxime.
  • Building Cinema 4D SDK on Windows

    r21 c++ sdk windows
    3
    0 Votes
    3 Posts
    580 Views
    W
    Thank you @m_magalhaes! I needed to open the plugins.sln solution instead of the project file. I feel like I've learned something, but I'm not sure what
  • R21 BaseDraw::DrawPointArray draws squares versus circles in R20

    c++ r20 r21
    4
    1
    0 Votes
    4 Posts
    529 Views
    ManuelM
    Hello Sorry for the delay, Christmas time didn't helped. I've opened a bug entry for that issue. I'll be back when i'll have more information. I've added the "Bug report" tag to this thread Cheers, Manuel
  • Always use unique Module ID

    Locked
    1
    1 Votes
    1 Posts
    987 Views
    No one has replied
  • Adding points to a spline

    python
    3
    0 Votes
    3 Posts
    746 Views
    ManuelM
    hello, without information from your part, i'll consider this thread as solved and change its states Cheers, Manuel
  • Disabling a Protection Tag

    r21 python
    8
    0 Votes
    8 Posts
    1k Views
    ManuelM
    Hello, @blastframe said in Disabling a Protection Tag: tag[c4d.PROTECTION_P_X] = 0 you should use the right type, this is a Boolean. tag[c4d.PROTECTION_P_X] = False you can use those symbols to define the function : c4d.PROTECTION_NONE c4d.PROTECTION_LOCK c4d.PROTECTION_LIMIT tag[c4d.PROTECTION_P] = c4d.PROTECTION_NONE Last point, using SetParameter doesn't change the fact that you need to send a message to the tag. Cheers, Manuel
  • Detect Keyboard in a Shader Dialog.

    3
    0 Votes
    3 Posts
    519 Views
    RenatoTR
    Hi Riccardo, many thanks for the infos Cheers Renato
  • 0 Votes
    2 Posts
    465 Views
    r_giganteR
    Hi Jenandesign, thanks for reaching us. With regard to your request, the reason of the change is due to the new Python console brought out since R20 where by dragging a parameter from the UI in the console provides the user with the complete "route" to propelry evaluate the parameter. This is by design and won't be reverted back in future releases. Best, Riccardo
  • Blend matrices

    Moved python
    6
    0 Votes
    6 Posts
    1k Views
    r_giganteR
    Thanks a lot Baca and I apologize for the hurried and shallow answer. Looking deeper in the argument the Computer Animation: Algorithms and Techniques reports: "While it should be obvious that interpolating the translation is straigthforward, it is not at all clear how to go about interpolating the rotations. In fact, it is the objective of this discussion to show that interpolation of orientations can be a problem. A property of 3x3 rotation matrix is that the rows and columns are orthonormal. Simple linear interporlation between the nine pairs of numbers that make up the two 3x3 rotation matrices to be interpolated will not produce intermediate 3x3 matrices that are orthonormal and are, therefore, not rigid body rotations. It should be easy to see that interpolating from a rotation of +90 deg about the y-axis to a rotation of -90 degrees about the y-axis results in an intermediate transformation that is nonsense. So direct interpolation of transformation matrices is not acceptable. There are alternatives representation that are more useful than transformation matrices in performing such interpolations: fixed angle, Euler angle, axis angle, quaternions." Considering your answer providing a reasonable solution using quaternions, I've played something similar using fixed angle def MatrixBlendFixedAngle(mxA, mxB, t): # get mxA scale AScale = mxA.GetScale() # get mxA offset AOff = mxA.off # remove from mxA the scale to retrieve rotation mxA.Scale(c4d.Vector(1/AScale.x, 1/AScale.y, 1/AScale.z) ) # retrieve the HPB representation of mxA AHPB = utils.MatrixToHPB(mxA) # get mxB scale BScale = mxB.GetScale() # get mxB offset BOff = mxB.off # remove from mxB the scale to retrieve rotation mxB.Scale(c4d.Vector(1/BScale.x, 1/BScale.y, 1/BScale.z) ) # retrieve the HPB representation of mxB BHPB = utils.MatrixToHPB(mxB) # execute the linear interpolations for offset, scale and HPB COff = (1 - t) * AOff + t * BOff CScale = (1 - t) * AScale + t * BScale CHPB = (1 - t) * AHPB + t * BHPB # calculate mxC from interpolated HPB mxC = utils.HPBToMatrix(CHPB) # add the interpolated scale mxC.Scale(CScale) # add the interpolated offset mxC.off = COff return mxC Finally with regard to your quaternion solution, for those who are interested in, a discussion on how to make use of quaternions is on GameDev. Cheers, R
  • Best way to get Enable status of an object?

    r20 python
    3
    1
    0 Votes
    3 Posts
    384 Views
    P
    Sorry I was not clear enough. Your answer (polygon object is "enabled" by definition) triggered me and now I understand. Thanks and my best wishes for a great 2020 for you, your family and your Maxon family. -Pim
  • Take Viewport Screenshot

    r21 python
    6
    0 Votes
    6 Posts
    2k Views
    B
    Thank you all for the response. Appreciate a lot. Specially for the sample code provided by @m_magalhaes as this is my code relating to rendering.
  • Viewport render and camera FOV

    c++ r21
    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    Hello, That's a more wide discussion about how to code. We can say that as long as it compile and your plugin is working, your code is fine. Cinema 4D is provided for both Windows and OSX, so differences can be introduces. Using our datatype guaranty (unless a bug) that your code will work the same on both OS. (of course there's always exception, don't jump on them ) Same goes for external librairies. Another example is our thread/job system, some external librairies can interfere with cinema4D in a badly way. Cheers, Manuel
  • DoUndo() issue when using loop selection, ring, ...

    r19 r20 r21
    6
    0 Votes
    6 Posts
    767 Views
    C4DSC
    @r_gigante Hi Riccardo, Thanks for the explanation. I wasn't sure that a "Solved" thread would still get revisited by SDK team members. As Manuel mentioned "I'll come back when I got more information", but the thread was set to solved, I wasn't sure the thread would get an update. Also, others visiting the forum (now or in future) might be misleaded by the state of the thread, thinking that the bug has been fixed, while it actually isn't. But now I understand a "bug fixed" tag is being added. Seems I need to pay more attention to the tags, as I assumed these tags were added by the creator of the thread. As such, I never really paid any attention later on, as I assumed the tags I added were the only ones to be available for that thread, and only the unsolved/solved state would change as a result of a resolution. Thanks for clarifying.
  • Multiple animation import

    python r20 r21
    9
    2
    0 Votes
    9 Posts
    2k Views
    S
    @kbar @m_adam Thanks for the help lads, the markers were already added thanks to Kent suggestion in his previous reply. Now the only things left are a little "GlTF-fighting", and some more polishing, packaging and testing before updating the plugin with a - hopefully - nice animation support ! I'll let you know when that's done (probably not before 2020 though ). Cheers, Loïc
  • Failed to get data from BaseContainer

    r21 c++
    3
    0 Votes
    3 Posts
    429 Views
    chuanzhenC
    Hi, @r_gigante Thank you for your reply. With your help, I finally traced the source of the problem. As you said, the reason for the error(Critical Stop) is that there is no Container at all. Because of a very hidden error in somewhere, I wrote the wrong data type to BaseContainer.
  • PoseMorph Tag question

    5
    1
    0 Votes
    5 Posts
    1k Views
    M
    The mode specifies how data can be read from the Morph Tag. By default, they are presented in a compact way (aka only modified points are stored for some internal optimization). But if you SetMode with c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND then all the points are then readable from outside of the morph Tag. I adapted the Python documentation to match the C++ documentation so it will be available in the next documentation update. But I would say the C++ documentation for SetMode is pretty self-explanatory, what is the part you don't understand? Cheers, Maxime.
  • Method to access CAMorphNode pointdata reference index?

    Moved
    3
    0 Votes
    3 Posts
    836 Views
    jenandesignJ
    THank you so much!
  • GetGeneralLicensingInformation() in TeamRender Client fails

    3
    0 Votes
    3 Posts
    537 Views
    fwilleke80F
    The way it's described in the SDK docs, I do not get any error message: [image: 1576494560496-screen-shot-2019-12-16-at-12.08.48.png] By diving into the location in the API where the error is thrown, I might have found that it's a nullptr error. [image: 1576494318563-screen-shot-2019-12-16-at-12.04.55-resized.png]
  • AddUndo(c4d.UNDOTYPE_CHANGE) not working with doc.ExecutePasses()?

    r21 python
    3
    0 Votes
    3 Posts
    391 Views
    B
    @m_magalhaes Oh gotcha. Thanks for the reminder. Totally forgot they UNDOTYPE_CHANGE have a different placement thant UNDOTYPE_NEW Thanks again. Have a great day ahead!
  • Export Issues (FBX / DAE)

    2
    0 Votes
    2 Posts
    530 Views
    ManuelM
    Hello, We've talked about this issue in our morning meeting. Contrary to what I've said, it's Core related and not API related. (limitation of cinema4D itself in fact) You have to open a ticket in our support. Tell them you are coming from our forum and it's not related to the API and it's a Core Problem. Sorry for wasting a bit of your time but we need to keep organized. Cheers, Manuel