• 0 Votes
    7 Posts
    2k Views
    ?
    @zipit My sincerest gratitude for your help. Not only did you get my project unblocked, but you answered my follow-up questions. I have learned a lot from you. Thank you!
  • Create New Take Using Python

    Moved Cinema 4D SDK
    9
    0 Votes
    9 Posts
    2k Views
    D
    @m_adam Thanks for your help. Apologies for not following the rules. I'm struggling with the rules of Python at the moment so it's not surprising! Will try to be a better poster in future.
  • Connect C4D with Tkinter (External Application) ?

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    2k Views
    B
    @r_gigante Thanks for the response and the website reference. I was able to work the code with the following revisions: def CoreMessage(self, id, bc): if id == 1234: P1MSG_UN = bc.GetVoid(c4d.BFM_CORE_PAR1) pythonapi.PyCObject_AsVoidPtr.restype = c_int pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object] P1MSG_EN = pythonapi.PyCObject_AsVoidPtr(P1MSG_UN) # check message and act if (P1MSG_EN == 1): c4d.documents.GetActiveDocument().InsertObject(c4d.BaseObject(c4d.Ocube)) elif (P1MSG_EN == 2): c4d.documents.GetActiveDocument().InsertObject(c4d.BaseObject(c4d.Osphere)) Thanks again. Will close this thread now.
  • How to fillet a ObjectData edge in Python?

    General Talk
    9
    1
    0 Votes
    9 Posts
    1k Views
    ?
    @zipit Absolutely incredible work! So elegant! Thank you very much @m_adam Thank you for the reply and confirmation!
  • Priority Delay on Stacking Skin Deformers

    Cinema 4D SDK r21 python
    16
    0 Votes
    16 Posts
    2k Views
    B
    Hi, Just checking if this is now resolved in the current version of C4D (2023).
  • Unable to Set Priority Data for Skin Deformer

    Cinema 4D SDK r21 python
    6
    0 Votes
    6 Posts
    691 Views
    ManuelM
    @zipit said in Unable to Set Priority Data for Skin Deformer: probably overlooked correct, friday evening
  • Unusual "NoneType" Error for GetDeformCache()

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    2k Views
    B
    Hi @m_magalhaes Ah gotcha. I guess I can't change the deformer's priority. Anyhow. Thanks for the confirmation.
  • Phong Tag with ObjectData

    Cinema 4D SDK python
    6
    0 Votes
    6 Posts
    1k Views
    ?
    It's working! Thank you @zipit , @r_gigante , & @m_adam ! Have an excellent weekend. A note for future readers One issue with my demo code is I wasn't passing the op from GetVirtualObjects to the CreateMyObject method. @m_adam created a new object (newObj) and only calls GetTag on the op (variable name: node). phongTag = node.GetTag(c4d.Tphong)
  • 'SetRealTag' Request

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    463 Views
    ?
    @m_magalhaes Hi Manuel! Thanks for the update.
  • Error reading resource Line 1

    Cinema 4D SDK r20 c++ python windows
    3
    0 Votes
    3 Posts
    907 Views
    B
    After a LOT of testing around I finally found the culprit. The header file was encoded UTF-8 with BOM. I finally figured it out after noticing that two versions of the header file that worked or didn't work had a 3 byte difference in file size. No idea how that snuck in there, but now it finally works. Also now it makes sense that the error was pointing to line 1.
  • Polygon Selections with ObjectData Plugin

    Cinema 4D SDK python
    6
    1
    0 Votes
    6 Posts
    794 Views
    ?
    @zipit Sorry, it embarrassingly didn't occur to me that your file example was working because I didn't see the Selection Tags as with the Generators. Thanks again for it! For the best user experience, there would be a proxy tag so the user can link & reference it by name. @m_magalhaes , any updates on the SetRealTag implementation in the SDK? I created a request for the SDK here: SetRealTag Request Thank you.
  • 0 Votes
    6 Posts
    917 Views
    M
    Hi @lasselauch sorry for the late reply, I asked about the developer responsible for it. On Windows we use the WebView control of the last iteration of iexplore MS shipped for 8.1 - Internet Explorer 11 (user-agent ID: "Trident"). It supports >most< things other modern browsers do, but sadly not everything... Especially the JS support has become a problem since IE11 is missing parts of the ECMA 6 standard and needs 'polyfills' to emulate those. Many JS frameworks / libraries don't offer IE11 compatibility and instead rely on the developer to add those polyfills themselves. One of the improvements IE11 received back then was the developer console+tools so the user could use those to track > down the JS issues and resolve them." I also forwarded your request about the ability to disable Javascript, but so far nothing planned atm, so the only workaround I see is either fix your javascript framework (maybe a huge task) or you can disable your javascript based on the user agent and if it's an IE11. Hope this help, Cheers, Maxime.
  • Remove a GeDialog Tab Group

    Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    623 Views
    ?
    @m_adam I'm good with using Python this way. Thanks Maxime.
  • TreeView Menu

    Cinema 4D SDK python
    6
    1
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hi, without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly. Cheers, Ferdinand
  • RDATA_PATH not working with Render Settings

    Cinema 4D SDK r23 python
    3
    1
    0 Votes
    3 Posts
    424 Views
    M
    Hi @blastframe as demonstrated in tokensystem_render_r17.py you should always operate on the BaseContainer. Cheers, Maxime.
  • Emojis - macOS vs. Windows

    Cinema 4D SDK
    4
    3
    0 Votes
    4 Posts
    1k 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
    734 Views
    ?
    Excellent, thank you for following up, @m_adam !
  • CommandData Plugin with Submenu

    Cinema 4D SDK python
    7
    1 Votes
    7 Posts
    1k 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
    880 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.