• Emojis - macOS vs. Windows

    Cinema 4D SDK
    4
    3
    0 Votes
    4 Posts
    2k Views
    CairynC
    why do you think C4D has any special handling for emojis? The font rendering is OS dependent, so any kind of text - including emoji codepoints - is drawn by the underlying operating system routines. Anything else would mean a ridiculous effort by Maxon to replicate font behavior. (I do not know how Windows internally handles emojis, I doubt that every available font has all these characters so most likely certain codepoints are mapped to common glyphs regardless of the font... but that is not a C4D question anyway.)
  • json.dumps truncated in R23 Console

    Cinema 4D SDK python r23
    7
    0 Votes
    7 Posts
    828 Views
    ?
    Excellent, thank you for following up, @m_adam !
  • CommandData Plugin with Submenu

    Cinema 4D SDK python
    7
    1 Votes
    7 Posts
    2k Views
    a_blockA
    Thanks, Manuel I do not mean to stress anybody. But I'd say, this is quiet basic plugin functionality, which by now is not working for more than two years. So, i thought, I'd ask, if there's a chance for a fix.
  • What is Vector.GetLengthSquared() really meant for?

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    1k Views
    CairynC
    @zipit said in What is Vector.GetLengthSquared() really meant for?: My major point was that there are certain programming assumptions (multiplication is better than division, never take the square root if avoidable, cubic complexity is uncomputable, etc.) that should be taken with a grain of salt due to the fact that they rely on a certain "state" of hardware. I.e. all these three do not really hold true anymore to the extent they once did. (...) That goes without saying... ultimately, any effort towards optimization needs to be checked for effectivity. Nevertheless, I was curious and abused a plugin of mine to execute some timer checks in C++, just for comparison (code excerpt only): using namespace std::chrono; Vector v(100.0, 100.0, 100.0); float f; milliseconds ms1, ms2, diff; ms1 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); for (int i = 0; i < 100000000; i++) { f = 0; // v.GetLength(); } ms2 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); diff = ms2 - ms1; GePrint(maxon::String("Time counter Empty:") + maxon::String::IntToString(diff.count())); ms1 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); for (int i = 0; i < 100000000; i++) { f = v.GetLength(); } ms2 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); diff = ms2 - ms1; GePrint(maxon::String("Time counter GetLength:") + maxon::String::IntToString(diff.count())); ms1 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); for (int i = 0; i < 100000000; i++) { f = v.GetSquaredLength(); } ms2 = duration_cast<milliseconds>( system_clock::now().time_since_epoch() ); diff = ms2 - ms1; GePrint(maxon::String("Time counter GetSquaredLength:") + maxon::String::IntToString(diff.count())); Switching off all optimizations, I get (for multiple button presses): Time counter Empty:185 Time counter GetLength:921 Time counter GetSquaredLength:228 Time counter Empty:184 Time counter GetLength:922 Time counter GetSquaredLength:228 Time counter Empty:183 Time counter GetLength:921 Time counter GetSquaredLength:228 Time counter Empty:183 Time counter GetLength:922 Time counter GetSquaredLength:228 Time counter Empty:185 Time counter GetLength:921 Time counter GetSquaredLength:228 Time counter Empty:183 Time counter GetLength:921 Time counter GetSquaredLength:227 That is far more like what I expected (double so if you consider that the loop with a constant assignment already takes 185ms). Considering that I had to up the loop count to a hundred million to get measurable results, it is practically guaranteed that any difference between GetLength and GetLengthSquared in the Python sample is drowned in the Python interpreter's overhead, and any result from my initial tests must be attributed to sheer randomness.
  • Radio button groups in two columns

    Moved Cinema 4D SDK
    6
    0 Votes
    6 Posts
    1k Views
    S
    Hi Maxime, it now works great, thank you very much for your support! Cheers, Stan
  • 0 Votes
    9 Posts
    2k Views
    ferdinandF
    Hi @jochemdk, okay, I then took the liberty to close the question You can of course still post here. Cheers, Ferdinand
  • CloseDocument ?

    Cinema 4D SDK
    2
    0 Votes
    2 Posts
    530 Views
    CairynC
    Just check it manually: if currDoc.GetChanged() : c4d.gui.MessageDialog(c4d.plugins.GeLoadString(IDS_MSG_PROJECTCHANGED)) else : c4d.documents.KillDocument(currDoc) # works but ignores change status
  • Plugin ID Collision starting by Itself

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    708 Views
    ManuelM
    hi, no problem. By the way, the first register. The second show the collide message so it can't register. But that doesn't unload the first one. That's why your plugin was still working. Cheers, Manuel
  • UVW values inconsistency

    Cinema 4D SDK r21 s22 c++ python
    4
    0 Votes
    4 Posts
    1k Views
    rsodreR
    @r_gigante good to know, thanks!
  • Cinema 4D R23 / macOS - pip install broken

    Cinema 4D SDK python r23 macos
    7
    0 Votes
    7 Posts
    3k Views
    a_blockA
    Hi, sorry, for bumping this thread. With the new S26 I have again problems installing pip in C4D's python on MacOS (Big Sur, x86). Funnily so, it works in c4dpy, but then the modules are only available in c4dpy, not inside C4D (probably expected). But when trying to do the same with C4D's python, regardless, if I try to use get-pip.py or .../python --ensure-pip -default-pip I end up with "Defaulting to user installation because normal site-packages is not writeable" as the main error and then in the following something along the lines "User base directory is not specified". The latter sounds a bit like, I could maybe simply specify a user base directory somehow? In R25 for example it worked nicely. Sorry, if this a stupid question. Pretty sure, I overlooked something in the docs somewhere. Cheers and thanks for any help in advance, Andreas
  • 0 Votes
    6 Posts
    1k Views
    M
    Gload you solved your issue, if you have any questions, please feel free to open a new topic. Ho and I forget the most important, welcome in the plugincafe community Cheers, Maxime.
  • Different behavior on Mac for Commanddata options

    Cinema 4D SDK r23 python
    6
    0 Votes
    6 Posts
    758 Views
    ManuelM
    hi That's already mentioned in our application documentation. https://help.maxon.net/us/index.html#PREFSINTERFACE-PREF_INTERFACE_MAIN_GROUP Where do you think we should mention it ? Cheers, Manuel
  • OBJ Export Options

    Cinema 4D SDK
    10
    0 Votes
    10 Posts
    2k Views
    .
    Thanks for looking at it Manuel. Sounds like your getting the same behavior I'm seeing. I'll add something to my script to parse it out. Thanks Manuel and Cairyn for taking time to help. .del
  • The slider tool returns False.

    General Talk r21 python
    2
    0 Votes
    2 Posts
    669 Views
    M
    Hi @x_nerve the ID used is not the correct one you should use: 431000021 for edge mode and 431000030 for point mode, unfortunately, there are no symbols for these tools. Cheers, Maxime.
  • Select several files in LoadDialog()

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    402 Views
    B
    @r_gigante Ah gotcha. Thanks for the confirmation.
  • I need help with this Python code

    Moved Cinema 4D SDK
    3
    0 Votes
    3 Posts
    560 Views
    M
    Without more information, from your side, I've set up your topic as solved but feel free to re-open it. Cheers, Maxime.
  • Rendering with specific camera ?

    General Talk python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hi, without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    755 Views
    M
    Without more information, from your side, I've set up your topic as solved but feel free to re-open it. Cheers, Maxime.
  • 0 Votes
    4 Posts
    593 Views
    B
    Thanks for the response @m_magalhaes Oh thanks. It now works on native c4d emitter but not in xparticles emitter. No worries, the solution by @zipit works @zipit Thanks. It works as expected. Here's the code I used added in a python tag orig = doc.SearchObject("original") dup = doc.SearchObject("duplicate") orig_container = orig.GetDataInstance() orig_container.CopyTo(dup.GetDataInstance(), flags= c4d.COPYFLAGS_PRIVATE_CONTAINER_COPY_IDENTICAL, trans=None) c4d.EventAdd()
  • r23 console

    Cinema 4D SDK python
    9
    0 Votes
    9 Posts
    2k Views
    oli_dO
    I confirm that with versionn 10.15.6 it works. Once again thank you very much Maxime for your availability and quick answers! Best regards