• DistanceQuery

    Cinema 4D SDK c++ r20 sdk
    3
    0 Votes
    3 Posts
    488 Views
    N
    thank you so much!!
  • 0 Votes
    6 Posts
    753 Views
    D
    @m_magalhaes Thank you
  • Logging in Cinema 4D

    Cinema 4D SDK sdk python
    4
    0 Votes
    4 Posts
    1k Views
    M
    Hi @blastframe unfortunately for the moment is not possible to implement its own logger in python. However, you could use any existing loggers. Here an example that writes into the Application (Default) Logger. import maxon txt = "My Wonderfull Text" defaultLogger = maxon.Loggers.Default() defaultLogger.Write(maxon.TARGETAUDIENCE.ALL, txt, maxon.MAXON_SOURCE_LOCATION(1), maxon.WRITEMETA.DEFAULT) Note that the print simply reroutes to the Python logger. But it can be useful to directly use the logger to write if you pass the write meta maxon.WRITEMETA.UI_SYNC_DRAW this way you can force a redraw of the console (slower) after each print, this can be used to avoid the limitation mentioned in the second part of this post. Cheers, Maxime
  • List of all Cinema 4D IDs?

    Cinema 4D SDK r21 sdk python
    5
    0 Votes
    5 Posts
    667 Views
    ?
    @m_adam Thank you for the clarification and the code example, Maxime!
  • Object Links in GeDialog

    Cinema 4D SDK sdk python
    1
    1
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • ParallelFor vs. ParallelImage

    Cinema 4D SDK c++ r20 sdk macos
    6
    0 Votes
    6 Posts
    648 Views
    fwilleke80F
    Thanks a lot! That helps Cheers, Frank
  • How to use STRINGTABLE with a Python Command Plugin

    Cinema 4D SDK sdk python
    7
    0 Votes
    7 Posts
    818 Views
    P
    I don't think there are any official "tools". But the docs describe how to handle unicode (Dialog Layout The encoding is 7-bit ASCII with other characters encoded as \uHHHH. For example 'Natürlich' is written 'Nat\u00fcrlich'. Byte-order marks are not used.
  • GetSplinePointSegment Offset

    Cinema 4D SDK r20 c++ sdk
    8
    0 Votes
    8 Posts
    1k Views
    r_giganteR
    Hi @JohnThomas thanks for the follow-up. I see the point, but when you're dealing with uniform splines you've also to consider the number of intermediate points you're using to approximate the natural spline. With a natural parametrization even with a low number of points the vertexes position returned from SplineHelp::GetPosition() are accurate, whilst with a uniform parametrization you get higher accuracy as long as you increase the number of points. See the data below, where first coordinate is the position returned by the SplineHelp::GetPosition and the second coordinate is returned by quering the points vector PointsObject::GetPointR() Natural_4 [4, 2123.461, BEZIER, 1] 0 [0/0], 0.000[0.000] --> (200.000,0.000,0.000) -- (200.000,0.000,0.000) 1 [17/0], 0.250[530.865] --> (0.000,700.000,0.000) -- (0.000,700.000,0.000) 2 [34/0], 0.500[1061.731] --> (-200.000,0.000,0.000) -- (-200.000,0.000,0.000) 3 [51/0], 0.750[1592.596] --> (0.000,-200.000,0.000) -- (0.000,-200.000,0.000) Uniform_4 [4, 2107.332, BEZIER, 2] 0 [0/0], 0.000[0.000] --> (200.000,0.000,0.000) -- (200.000,0.000,0.000) 1 [7/0], 0.350[737.566] --> (4.370,699.695,0.000) --> (0.000,700.000,0.000) 2 [14/0], 0.700[1475.132] --> (-199.849,8.692,0.000) -- (-200.000,0.000,0.000) 3 [17/0], 0.850[1791.232] --> (-4.394,-199.953,0.000) -- (0.000,-200.000,0.000) Uniform_16 [4, 2107.332, BEZIER, 2] 0 [0/0], 0.000[0.000] --> (200.000,0.000,0.000) -- (200.000,0.000,0.000) 1 [7/0], 0.350[737.566] --> (4.370,699.695,0.000) -- (0.000,700.000,0.000) 2 [14/0], 0.700[1475.132] --> (-199.849,8.692,0.000) -- (-200.000,0.000,0.000) 3 [17/0], 0.850[1791.232] --> (-4.394,-199.953,0.000) -- (0.000,-200.000,0.000) Uniform_128 [4, 2124.555, BEZIER, 2] 0 [0/0], 0.000[0.000] --> (200.000,0.000,0.000) -- (200.000,0.000,0.000) 1 [182/0], 0.353[749.359] --> (-1.373,699.970,0.000) -- (0.000,700.000,0.000) 2 [363/0], 0.703[1494.600] --> (-199.996,1.279,0.000) -- (-200.000,0.000,0.000) 3 [440/0], 0.853[1811.636] --> (1.380,-199.995,0.000) -- (0.000,-200.000,0.000) If no further help is needed please don't forget to set the thread as Solved. Cheers, R
  • How do I access Redshift AOV settings from Python?

    Cinema 4D SDK
    3
    1
    0 Votes
    3 Posts
    2k Views
    lasselauchL
    Wow, thanks for the example, @r_gigante. Was it always possible to import a redshift module? Or is there any info from which version on (C4D / Redshift) this is possible!? Thanks, Lasse
  • Bug with GetLink/SetLink & Hyperfile

    Cinema 4D SDK sdk python
    3
    1 Votes
    3 Posts
    404 Views
    ?
    My apologies: I didn't understand how BaseLink worked and this clarified things. Thank you!
  • Keyframing UserData with Value Tracks

    Cinema 4D SDK python sdk
    5
    3
    0 Votes
    5 Posts
    595 Views
    ?
    @m_adam You are a genius! Thank you, Maxime
  • maxon::LoggerTypes::File()

    Cinema 4D SDK r21 c++ sdk
    3
    0 Votes
    3 Posts
    520 Views
    kbarK
    Thanks Manuel.Adding that lambda did the trick. Working fine now.
  • 0 Votes
    9 Posts
    2k Views
    B
    @Dunhou Thanks for the reference but yea I'm unfortunately using the xpresso here instead of the new node editor. Which in all regards, an unfortunate scenario is xpresso is not integrated to the new node editor. @m_adam Gotcha. Thanks. Looking forward to the update.
  • Exporting Motion Clips & what are .c4dsrc Files?

    Cinema 4D SDK sdk python
    3
    0 Votes
    3 Posts
    658 Views
    ?
    @m_adam Hi Maxime, thank you for the quick reply and insight into this. I look forward to trying this.
  • 0 Votes
    7 Posts
    1k Views
    ?
    @m_adam Thank you, Maxime, for going to this effort.
  • C++ Shader Plug-In Best Practices

    Cinema 4D SDK c++ r21 sdk windows
    6
    1
    3 Votes
    6 Posts
    1k Views
    ManuelM
    hello, thanks @PluginStudent for the answer here if (obj != nullptr) // If I'm checking for nullptr could I just use if(obj) as in Python? The correct way is to check against nullptr, that's a c++11 standard. if (obj) could lead to false positive and bugs. String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling Last but not least you can probably use our Url class to handle file or filename. Give it a look Cheers, Manuel
  • Advice for storing animation in a Hyperfile

    Cinema 4D SDK python sdk
    4
    0 Votes
    4 Posts
    559 Views
    ?
    Additional information here: https://developers.maxon.net/forum/topic/12295/bug-with-getlink-setlink-hyperfile/3 Thank you @m_magalhaes & @r_gigante!
  • 0 Votes
    3 Posts
    579 Views
    mfersaouiM
    @Cairyn Hi, Thank you. Solution: Float GeIncircle(Int32 n, Float r) { return r * cos(PI / n); } Float max_rrad = GeIncircle(n, r);
  • Creating Keyframes with AutoKey

    Cinema 4D SDK python sdk
    4
    0 Votes
    4 Posts
    984 Views
    M
    Hi @blastframe this is also the behavior of AutoKey in the Editor, so I would say is not an API issue. But you can use BaseDocument.Record to simulate the click of AddKeyFrame (but of course correct parameter have to be checked). Cheers, Maxime.
  • Formula to calculate cloner radius

    Moved General Talk c++ sdk
    3
    1
    0 Votes
    3 Posts
    691 Views
    mfersaouiM
    @r_gigante Hi Riccardo, thank you for your detailed response. That allowed me to find the exact formula. l / (2 * tan((180 / n) * 3.14159 / 180)) Regards, Mustapha