Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. lasselauch
    3. Topics
    • Profile
    • Following 2
    • Followers 2
    • Topics 24
    • Posts 99
    • Best 13
    • Controversial 0
    • Groups 0

    Topics created by lasselauch

    • lasselauchL

      Importing pythonapi from ctypes freezes C4D

      Cinema 4D SDK
      • s24 macos python • • lasselauch
      7
      0
      Votes
      7
      Posts
      1.0k
      Views

      ferdinandF

      Hey @lasselauch,

      We are not able to reproduce this crash on an Intel, M1, or M3 MacBook with 2024.4.0. Please provide and submit a crash report when this is still a problem for you. I would also recommend reinstalling Cinema 4D to rule out that your installation was damaged.

      Cheers,
      Ferdinand

    • lasselauchL

      Detect Menu/Manager while hovering...

      Cinema 4D SDK
      • python maxon api classic api • • lasselauch
      4
      0
      Votes
      4
      Posts
      711
      Views

      ferdinandF

      Hello @lasselauch,

      without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly.

      Thank you for your understanding,
      Ferdinand

    • lasselauchL

      Japanese Language Interface – Problems

      Cinema 4D SDK
      • r23 • • lasselauch
      2
      0
      Votes
      2
      Posts
      471
      Views

      ferdinandF

      Hi @lasselauch,

      thank you for reaching out to us and I am sorry to hear about your problems regarding targeting multiple localizations. I am struggling however a bit to understand what is exactly going wrong for you. You tell us that the plugin "isn't behaving correctly in R23" which is a bit too broad for us to come up with an reliable answer. I am also sorry for having to point out that your proposed way of getting hold of the implementation of the plugin via aescripts.com - with the proprietary downloader you provide there to distribute your products - is a bit much for us.

      I would suggest that you share the relevant code more directly here, or, in case you cannot do this, share it via sdk_support(at)maxon.net confidentially with us (please note the Forum Guidelines regarding Support Procedures: Confidential Data, specifically regarding NDAs, in case they would apply here).

      For your actual problem: It is really hard to give any advice without knowing what exactly is going wrong. I assume you have a Japanese localization in your resource folder and it does not work for the user? I would check:

      If the folder has the correct ISO 639-1 language code, for Japanese it should be ja-JP, so for the strings folder it should be strings_ja-JP for example. Not providing a matching language code for a running Cinema 4D instance should result in Cinema automatically falling back to en-US. Make sure that the Japanese translation files are all UTF-8. While the manuals do not state that restriction, it could be something that is tripping Cinema up, especially considering that languages with large character sets, like for example Japanese, are not fully represented in UTF-8 due to the limited namespace. I would however had to ask our translators how they handle Japanese if this is the culprit.

      But in the end these are mostly shots into the dark for me, due to not knowing what is exactly going wrong. So I would also had to ask you to describe more precisely what is going wrong.

      Cheers,
      Ferdinand

    • lasselauchL

      Detect closing of Document

      Cinema 4D SDK
      • • • lasselauch
      7
      0
      Votes
      7
      Posts
      1.2k
      Views

      ferdinandF

      Hi @lasselauch,

      we talked about your problem this morning. There are two ways of looking at your question:

      You are interested in the event of a closing document (i.e. present progressive) and you want to react to that event by making some changes before this process is finalized (i.e. the document closed). As already stated yesterday by me, there is currently no way to do that in a GeDialog. You will need some kind of node for that. It is also noteworthy that currently CommandData is bugged in this regard in Python. As @mp5gosu already pointed out, MessageData is a really good way to go, unless you do not have already something like TagData plugin where you could squeeze in that functionality. You are interested in the state of the loaded documents list, i.e. if a document has closed (past tense), but not exactly when it happens. This is possible in a dialog. You already provided your own answer here (thanks for making it visible to everyone). The basic idea is just to build some hashmap/list to compare against what Cinema considers to be loaded documents. As an added note, you might want to look at GeDialog.Timer, which will let you execute things in fixed intervals, in order to get closer to the point of when something happened. This won't be to much of a performance strain if implemented carefully.

      Cheers,
      Ferdinand

    • lasselauchL

      Drag and Drop "Command" from Treeview

      Cinema 4D SDK
      • • • lasselauch
      6
      0
      Votes
      6
      Posts
      1.0k
      Views

      ferdinandF

      Hi,

      I understand that this thread has not yet come to a final conclusion, but without further feedback, we will consider this thread as solved by Monday and flag it accordingly.

      Cheers,
      Ferdinand

    • lasselauchL

      developers.maxon.net – Offline?

      General Talk
      • • • lasselauch
      7
      0
      Votes
      7
      Posts
      977
      Views

      M

      @lasselauch said in developers.maxon.net – Offline?:

      Had one aswell....

      explorer_2020-11-23_12-19-58.png

      a rather old one... 🙄 ...haha.

      Slightly outdated. LOL. 😄

    • lasselauchL

      Plugin not loaded in R23 on macOS

      Cinema 4D SDK
      • • • lasselauch
      14
      1
      Votes
      14
      Posts
      2.3k
      Views

      kbarK

      Python plugins do not work reliably in R23 on OSX 10.13.6. The C4D minimum spec is for 10.14.6 as Riccardo mentioned.

      And even if you try to debug a plugin on 10.13.6 what you will notice is that many calls (such as print) don't even work on this OS. So you can't even write anything out to the console to see what the problem might be.

      No amount of re-installing C4D will help you at all. You just have to let your customers know that the minimum spec for R23 is 10.14.6 and not guarantee any support for anything below that spec.

    • lasselauchL

      BaseDraw – DrawLine2D – Transparency?

      Cinema 4D SDK
      • • • lasselauch
      5
      0
      Votes
      5
      Posts
      910
      Views

      ferdinandF

      Hi,

      without further feedback, we will consider this thread as solved by tomorrow and flag it accordingly.

      Cheers,
      Ferdinand

    • lasselauchL

      Matrices / Rotations / Quaternions when transferring data.

      General Talk
      • • • lasselauch
      4
      0
      Votes
      4
      Posts
      750
      Views

      lasselauchL

      Hey guys,

      just wanted to let you know, that I've cracked the case in the meantime.

      Here are my findings:

      def convert_matrix_left_to_right(m): # http://www.techart3d.com/2016/02/convert-left-handed-to-right-handed-coordinates/ # m = op.GetMg() new_m = c4d.Matrix( m.off, m.v1*-1, m.v2, m.v3) return new_m def rotate_y_axis_180(): # Construct your own matrix based on rotation of axis # https://www.mathworks.com/help/phased/ref/roty.html x = c4d.Vector(-1, 0, 0) y = c4d.Vector(0, 1, 0) z = c4d.Vector(0, 0, -1) off = c4d.Vector(0, 0, 0) return c4d.Matrix(off, x, y, z) def GetGlobalRotation(obj): m = obj.GetMg() new_m = rotate_y_axis_180() * convert_matrix_left_to_right(m) return c4d.utils.MatrixToHPB(new_m, order=c4d.ROTATIONORDER_XYZGLOBAL)

      Indeed you have to convert from a left-handed (c4d) (hpb) to a right-handed (houdini) (xyz) coordinate system... plus I've found that you need to add 180° to the y axis, so I constructed a matrix in rotate_y_axis_180 that I can multiply to my converted matrix.

      Hope it helps someone...

      Thank you guys for your input! Have a great weekend and stay safe!

      Cheers,
      Lasse

    • lasselauchL

      Ignore Javascript on Windows ?– CUSTOMGUI_HTMLVIEWER

      Cinema 4D SDK
      • python sdk windows • • lasselauch
      6
      0
      Votes
      6
      Posts
      760
      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.

    • lasselauchL

      Emojis - macOS vs. Windows

      Cinema 4D SDK
      • • • lasselauch
      4
      0
      Votes
      4
      Posts
      910
      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.)

    • lasselauchL

      Delete Third-Party-Tags?

      Cinema 4D SDK
      • • • lasselauch
      7
      0
      Votes
      7
      Posts
      1.1k
      Views

      M

      Hi with the latest update of Cinema 4D (R24 SP1), BasePlugin.GetFilename now also return the file extension in Python.

      Cheers,
      Maxime.

    • lasselauchL

      Prevent Projects from opening if dragged.

      Cinema 4D SDK
      • python sdk • • lasselauch
      5
      0
      Votes
      5
      Posts
      759
      Views

      lasselauchL

      @mp5gosu Whooop! Thanks, Robert!

      You have to return a tuple so return (c4d.NOTOK, False) does the trick for me.

      Thank you!!!

      Cheers,
      Lasse

    • lasselauchL

      escape unicode characters in filepath

      General Talk
      • • • lasselauch
      7
      0
      Votes
      7
      Posts
      932
      Views

      M

      Hi, @lasselauch as a rule of thumb with Python2.7 always store data as a Unicode string.

      Control your IO which means, for each, Input make sure you know the encoding in all cases by always calling .decode('utf-8') so you are sure to store a Unicode value and get an error if something went wrong at a loading time.
      Then output the content according to your need some need ASCII, some can work with unicode, but do the conversion on the fly, don't touch you stored Unicode data.

      For the francophone people, there is this fabulous article about unicode Encoding in Python for English I guess the best I found on this topic is A Guide to Unicode, UTF-8, and Strings in Python.

      Cheers,
      Maxime.

    • lasselauchL

      Change Color of Hyperlink Customgui

      Cinema 4D SDK
      • • • lasselauch
      3
      0
      Votes
      3
      Posts
      454
      Views

      lasselauchL

      Okay!
      Thanks for the info @m_adam !

      Oh, and on macOS it is General - Text - Flag Edit Saved
      Bildschirmfoto 2020-04-06 um 14.28.13.png

      ¯_(ツ)_/¯

      Cheers,
      Lasse

    • lasselauchL

      How about updating ResEdit..?

      Cinema 4D SDK
      • • • lasselauch
      2
      0
      Votes
      2
      Posts
      442
      Views

      M

      Hi @lasselauch there is actually no plan to update ResEdit.

      There is the R20 Resource Editor but for the moment it's only for Node stuff.

      Cheers,
      Maxime.

    • lasselauchL

      Avoid: IsActive()

      Cinema 4D SDK
      • python classic api • • lasselauch
      10
      0
      Votes
      10
      Posts
      1.1k
      Views

      lasselauchL

      Thanks @m_adam for the insights!

      Works like a charm!!

      Cheers,
      Lasse

    • lasselauchL

      Design Choices for shared variables across Plugins & Classes

      Cinema 4D SDK
      • • • lasselauch
      4
      0
      Votes
      4
      Posts
      581
      Views

      ManuelM

      hello,

      I will consider this thread as solved without new information from you 🙂

      Cheers,
      Manuel

    • lasselauchL

      SetData() with FindCustomGui / CUSTOMGUI_BITMAPBUTTON

      Cinema 4D SDK
      • • • lasselauch
      4
      0
      Votes
      4
      Posts
      659
      Views

      ManuelM

      @lasselauch said in SetData() with FindCustomGui / CUSTOMGUI_BITMAPBUTTON:

      there's no way to flush a single Element and insert at that position, right? It has to be a group

      For what I know, correct.

      Cheers,
      Manuel

    • lasselauchL

      Renderqueue Layout/Dialog Questions

      Cinema 4D SDK
      • • • lasselauch
      5
      0
      Votes
      5
      Posts
      735
      Views

      M

      I'm sorry for the huge delay asked for this question, but it appears, that this dialog layout is hardcoded in the default Cinema 4D layout, so when you open it this dialog, it loads this layout by default since it's saved in the default Cinema 4D layout.

      Unfortunately, there is no way to do the same thing with code but you can split your GUI in 2 parts and let the user build its own layout with all the Command and your Dialog bellow.

      Cheers,
      Maxime.