• Polygon Selections with ObjectData Plugin

    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.
  • Ignore Javascript on Windows ?– CUSTOMGUI_HTMLVIEWER

    python sdk windows
    6
    0 Votes
    6 Posts
    927 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.
  • Adding camera calibration lines by script?

    3
    0 Votes
    3 Posts
    585 Views
    CairynC
    ok, thanks for the confirmation!
  • Remove a GeDialog Tab Group

    python
    3
    0 Votes
    3 Posts
    628 Views
    ?
    @m_adam I'm good with using Python this way. Thanks Maxime.
  • Changing assets paths - Feature request

    4
    0 Votes
    4 Posts
    1k Views
    J
    Hi @r_gigante, Would still love if you guys can create something that enabled you to change assets paths with python. Hopefully it can be added to the feature list. Thank you.
  • Access C4D Objects outside C4D?

    r21 python
    10
    0 Votes
    10 Posts
    975 Views
    M
    VS Code and Sublime Text are not so well designed and simply spawn a bunch of python interpreters to retrieve the information they need, In contrast, pycharm does use only one and the same python interpreter its spawn. So that's why you got these issues.
  • RDATA_PATH not working with Render Settings

    r23 python
    3
    1
    0 Votes
    3 Posts
    425 Views
    M
    Hi @blastframe as demonstrated in tokensystem_render_r17.py you should always operate on the BaseContainer. Cheers, Maxime.
  • Radio button groups in two columns

    Moved
    6
    0 Votes
    6 Posts
    897 Views
    S
    Hi Maxime, it now works great, thank you very much for your support! Cheers, Stan
  • Compare only parts of two BaseContainers()

    r20 r21 s22 r23 c++
    6
    0 Votes
    6 Posts
    634 Views
    fwilleke80F
    Nice, Manuel, thank you! I guess, I'll try the SetDParameter() approach, too, in good time. Cheers, Frank
  • Emojis - macOS vs. Windows

    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.)
  • I need help with this Python code

    Moved
    3
    0 Votes
    3 Posts
    448 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
    3 Posts
    642 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.
  • Select several files in LoadDialog()

    r21 python
    3
    0 Votes
    3 Posts
    358 Views
    B
    @r_gigante Ah gotcha. Thanks for the confirmation.
  • What is Vector.GetLengthSquared() really meant for?

    r21 python
    5
    0 Votes
    5 Posts
    894 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.
  • UVW values inconsistency

    r21 s22 c++ python
    4
    0 Votes
    4 Posts
    910 Views
    rsodreR
    @r_gigante good to know, thanks!
  • Edge To Spline Modeling Command

    sdk r20 c++
    3
    0 Votes
    3 Posts
    925 Views
    J
    Thanks for the response, that was exactly what I needed. John Thomas
  • CloseDocument ?

    2
    0 Votes
    2 Posts
    444 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

    3
    0 Votes
    3 Posts
    577 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
  • Retrieving Viewport Camera Matrix

    r20 sdk c++
    9
    0 Votes
    9 Posts
    2k Views
    J
    Thanks for the detailed response @r_gigante, sorry about the late post. I wasn't trying to move an object into the camera view, I was just trying to get the information about a cameras perspective so that if necessary I could create an object that would have an orientation parallel to it. John Thomas
  • GetUserDataContainer() and UserData Values

    9
    0 Votes
    9 Posts
    1k Views
    ManuelM
    hi, ha, i was not setting any value. So yes, they are in the BaseContainer at id c4d.ID_USERDATA (=700) to filter the groups or separator you just have to check the type in the descLevel and compare with DTYPE_SEPARATOR or DTYPE_GROUP or either use DescId.IsPartOf like: for descId, parameterBc in op.GetUserDataContainer(): print(c4d.DESCID_DYNAMICSUB.IsPartOf(descId)) # Will print True for all of them Cheers, Manuel