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
    • Register
    • Login
    1. Home
    2. datamilch
    3. Topics
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 20
    • Posts 48
    • Best 2
    • Controversial 0
    • Groups 0

    Topics created by datamilch

    • D

      SAVEDOCUMENTFLAGS_AUTOSAVE still added to the recent file list?

      Cinema 4D SDK
      • windows python 2025 • • datamilch
      3
      0
      Votes
      3
      Posts
      103
      Views

      D

      @ferdinand said in SAVEDOCUMENTFLAGS_AUTOSAVE still added to the recent file list?:

      But please provide instructions on how to use your code when required in the future.

      oh shit, i'm so sorry. you're right. completly missed this one. 😬
      ...
      and of cause thanks for the explaination / clarification.

    • D

      Docked Dialog Problem with width of CUSTOMGUI_FILENAME

      Cinema 4D SDK
      • windows python 2025 • • datamilch
      6
      0
      Votes
      6
      Posts
      211
      Views

      i_mazlovI

      Hi Sebastian,

      correct, it hasn't been included into 2025.2.0. The next minor release will likely have it fixed though.

      Cheers,
      Ilia

    • D

      Message from Object or Tag to CommandData/GeDialog Plugin

      Cinema 4D SDK
      • windows 2023 python • • datamilch
      3
      0
      Votes
      3
      Posts
      402
      Views

      i_mazlovI

      Hi @datamilch,

      you can use the EVMSG_CHANGE message as a trigger to check your objects for changes. The timer approach might seem imprecise from the first glance, but can actually be used, I don't think there're any significant reasons against it. Additionally, the recent change was made to make BaseList2D being hashable. This effectively means you can operate with your objects in a dict.

      The python tag approach is the least efficient, although would still work, yes.

      You're saying your GeDialog plugin uses "mostly the ideantical userdata". If it was "identical", you could potentially use c4d.gui.DescriptionCustomGui with the SetObject function to make it point to your object. This way you can avoid hassling around all the data sync, because it is all handled as a built-in functionality of this class. This is how the attribute manager effectively works, or the Active Object Dialog as well.

      For your further postings please follow our guidelines on How to Ask Questions, namely:

      Please consolidate your questions into a singular posting by editing your last posting

      Cheers,
      Ilia

    • D

      MCOMMAND_SELECTALL and MCOMMAND_SELECTINVERSE not working?

      Cinema 4D SDK
      • python 2024 windows • • datamilch
      3
      0
      Votes
      3
      Posts
      388
      Views

      D

      @i_mazlov Thanks!
      makes sens. seems i only used the forgiving commands until now.

      the code is run in a python generator. so by returning the object, it will be inserted into the scene.

    • D

      use thicken generator inside a python generator

      Bugs
      • windows 2024 python • • datamilch
      4
      0
      Votes
      4
      Posts
      565
      Views

      D

      hi @i_mazlov,
      ok, good to know.
      i also tried to insert the thicken generator into a temp_doc, activating the selections and executing passes. but that didn't work either.

    • D

      issue with inserting fieldlayers in r2024

      Bugs
      • windows python 2024 • • datamilch
      4
      0
      Votes
      4
      Posts
      725
      Views

      M

      Hey thanks for the report, I indeed fix one issue with the InsertLayer but in your case it was another one, sadly there is no workaround for you (except the one you found).

      The fix will be provided in the next release.
      Cheers,
      Maxime.

    • D

      fieldlayer with variable tag

      Cinema 4D SDK
      • windows python 2023 • • datamilch
      2
      0
      Votes
      2
      Posts
      267
      Views

      D

      found the solution ... the corresponding type is called: FLweight

    • D

      Create folder in Volume Builder

      Cinema 4D SDK
      • windows python 2023 • • datamilch
      3
      0
      Votes
      3
      Posts
      424
      Views

      D

      hi @i_mazlov,
      thanks for the answer. good to know about this status / limitation.
      for my current case I found a solution without folders..

    • D

      Accessing Parameters of Filters in a Volume Builder

      Cinema 4D SDK
      • windows python 2023 • • datamilch
      3
      0
      Votes
      3
      Posts
      412
      Views

      ferdinandF

      Hey @datamilch,

      Thank you for reaching out to us and answering your own question. In general we prefer it when topics do not get deleted, so that other users can benefit from a topic. You should also not be able to delete this topic anymore since more than three hours have passed since you posted and because your topic has replies.

      Cheers,
      Ferdinand

    • D

      Set value of a fieldlayer parameter

      Cinema 4D SDK
      • windows python 2023 • • datamilch
      3
      0
      Votes
      3
      Posts
      371
      Views

      D

      hi @ferdinand,
      this solved it, thanks! I suspected, that I would have to write back the data, as in many other cases. but I didn't know how exactly.

      As for the executable code: will do so, next time!
      cheers Sebastian

    • D

      Prevent material preview update

      Cinema 4D SDK
      • windows python 2023 • • datamilch
      3
      0
      Votes
      3
      Posts
      628
      Views

      D

      hi @ferdinand,
      thanks for the information.
      found a workaround, that is good enough so far. I use the 3d-gradient in texture space and transform the texture tag matrix as I need it. the change in color will not occur that often.

    • D

      Calling BaseDocument.SetMode twice in a row leads to freezes

      Bugs
      • windows python 2024 2023 • • datamilch
      4
      0
      Votes
      4
      Posts
      549
      Views

      ferdinandF

      @datamilch said in Calling BaseDocument.SetMode twice in a row leads to freezes:

      always had the feeling, that i could print feedback while it is running

      That is a misconception many users have. This is because most code usually runs very fast, so you do not realize it. Note that I also wrote Script Manager script. While it technically applies to all Python Scripting scene elements, the execution of the Python VM is there always blocking, it is much more prominent for a Script Manager script. Because there the module is only executed once and it is also okay to run scripts here which take seconds to execute. But it also applies for example to a Python Programming tag, the execution of the module is there also blocking. But because the module of a Python Programming tag is called many times - on each scene update at least once, and you are anyway in a world of hurt when your Python Programming tag module takes more than ~100 ms to run, it is not that obvious there.

      Syntax errors are evaluated before the VM actually runs because then the compilation of your code into byte code fails (which is then later interpreted by the VM). But the error is here also displayed only after the VM stopped (just as a RuntimeError which is raised by the VM and not by the compiler), but syntax errors prevent the VM from running your code in the first place.

      Cheers,
      Ferdinand

      import time def main() -> None: """Run as a Python Script Manager script to see that the execution of a scope in the Python VM is blocking. This will not print five 'A's with a stride of one second, but five 'A's after five seconds. """ for _ in range(5): print('A') time. Sleep(1) if __name__ == '__main__': main()
    • D

      Type Error when inserting geometry from a loaded file

      Cinema 4D SDK
      • python 2023 windows • • datamilch
      3
      0
      Votes
      3
      Posts
      367
      Views

      D

      @i_mazlov thanks ilia!!!

      ok that was truly obvious 😬

      actually had to use 'c4d.documents.GetActiveDocument()' to make it work in my case ...

    • D

      delete vertex from quad-poly delets the poly

      Cinema 4D SDK
      • • • datamilch
      6
      0
      Votes
      6
      Posts
      803
      Views

      D

      @ferdinand thanks for your explanation and sorry for the ambiguouty!

      the second image showed what currently happens, but not what i wanted.

      so converting a quad to tri is more like reordering the verticies and leaving one out. makes sens. hope i find the time to test it next weekend ...

      finding the points is already done, but thanks for the hint. most of the time i use a little trick: select all points, shrink selection, grow selection. then points, that were only connectet to two border-verticies will not be reselectet, you can invert the selection and have the points. but border-points of n-gons will be selectet too. for these i do have a script that makes use of the neighbor function.

      1.2.2. yes i'm aware of the right-angled quad cases, and luckily they don't matter in my case. but thanks for pointing it out. i find it super cool how alert you are! appreciate it alot.

    • D

      Undo for commanddata plugin principle

      Cinema 4D SDK
      • python • • datamilch
      6
      0
      Votes
      6
      Posts
      675
      Views

      J

      Hello @datamilch ,

      without further questions or postings, we will consider this topic as solved by Friday, the 11th of august 2023 and flag it accordingly.

      Thank you for your understanding,
      Maxon SDK Group

    • D

      set only the value of a dialog gadget

      Cinema 4D SDK
      • python • • datamilch
      6
      0
      Votes
      6
      Posts
      718
      Views

      D

      huge thanks again @m_adam!

      the trick with storing the data in a dictionary was super helpful.
      now i can jump between documents and the dialog updates properly. 😳

      cheers,
      sebastian

    • D

      how to track if the document has changed?

      Cinema 4D SDK
      • python • • datamilch
      4
      1
      Votes
      4
      Posts
      604
      Views

      M

      Hi correct, if you look at my code I do

      oldDoc = self.activeDoc

      This means oldDoc will call the activeDoc property getter. And within it I already check for IsAlive and return None if the saved document is not alive.

      @property def activeDoc(self): doc = getattr(self, '_activeDoc', None) if doc is None: return None if not doc.IsAlive(): return None return doc

      So for my use case it's fine enough, but you are right, if you store somewhere this oldDoc variable and use it latter then yes you need to check for IsAlive.

      Cheers,
      Maxime.

    • D

      updated forum search

      General Talk
      • • • datamilch
      5
      0
      Votes
      5
      Posts
      490
      Views

      ferdinandF

      Hey @datamilch,

      @datamilch said in updated forum search:

      Actually I was not able to respond in the Announcement forum. I just looked again and there is no reply button for me.

      Good that you point that out, that was not intentional. The recent forum update might have changed the privileges. I have again given registered users the ability to reply to topics in this forum. Creating new topics in this forum is still restricted to moderators.

      Regarding the search mode, I fully understand the different behaviors. Just had the urge to give this feedback, so i can move on.
      I really appreciate your 'hacky' solution with the dark-mode, thank you! 😸

      Yeah, I understand and truly appreciate that. I was just trying to explain that what might seem as 'absolutely correct' from one user's perspective, might be the opposite from another.

      just a thought for consistency: since the condensed feature seems to be skin related, couldn't there be 4 skins - light condensed and uncondensed and dark condensed and uncondensed ... but since i don't know, how you did it, maybe this might become to cluttered in your backend.

      NodeBB has skins and themes (two different things). The theme our forum is based on, which is effectively a NodeBB plugin, has its own setting which is also called skin (because everything else would be too easy, right 😄 ). That skin has nothing to do with the NodeBB notion of a skin and its elements cannot be extended (without messing with the source) as far as I know. That custom skin is what users see as default and dark skin.

      The easiest solution would be to inject some custom JS which listens for search result page events and then injects one or multiple toggle buttons and their associated logic into that page. The result will be then that one can toggle the folded state of all results on a page with one click (more or less what is currently already possible in the search options). But one would have to do this single click on each result page. Anything which is more persistent than that is too much work.

      Cheers,
      Ferdinand

    • D

      select edge points with python

      Cinema 4D SDK
      • • • datamilch
      5
      0
      Votes
      5
      Posts
      995
      Views

      D

      wohaa, thank you so much for your time an effort!

      i will have a good look at it.

      alos great insight into what the GetNgonEdgesCompact numbers mean. this was a bit mysterious in the sdk, or at least hard to decipher what the description meant.

    • D

      creating a subdivision surface with fields falloff via python generator

      Cinema 4D SDK
      • python r21 sdk • • datamilch
      4
      0
      Votes
      4
      Posts
      951
      Views

      ManuelM

      Hi,

      I often use the python generator to create some prototype myself. So it's ok for me. But if you want to give or sell your result, you should move to a plugin.
      It's not hard at all, if you already did that prototype, the plugin is easy, and we are here in case you have some issue.

      Nice result 🙂

      Cheers,
      Manuel