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. karpique
    K
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    karpique

    @karpique

    0
    Reputation
    9
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    karpique Unfollow Follow

    Latest posts made by karpique

    • RE: Make Python Generator update on User Data change

      Thansk so much for the video, that was a deep dive! For my issue, I resolved it like this:

      def message(id, data):
          if(id==c4d.MSG_DESCRIPTION_POSTSETPARAMETER):
              userDataID = eval(str(data['descid']))[1][0]
              if userDataID in [2, 4, 5]:
                  c4d.CallButton(op, c4d.OPYTHON_MAKEDIRTY)
      

      so, if any user data touched (including fieldlist), the generator updates itself.

      posted in Cinema 4D SDK
      K
      karpique
    • Make Python Generator update on User Data change

      Hi, I have a Python Generator that uses fields with SampleListSimple() function. It should change the position of generated geometry based on provided field sample values. Fields are connected to Pyhton Generator with User Data -> Field List. It works good, I can tweak field values and Pyhon Generator updates accordingly, but if I try to turn off / turn on / add / remove field from field list, Generator is not updated accordingly to that event (however if I turn off field itself, not in user data but in objects tree, generator updates well).

      So far I managed to get that event:

      def message(id, data):
          if(id==c4d.MSG_DESCRIPTION_POSTSETPARAMETER):
              flId = eval(str(data['descid']))[1][0]
              if flId == 1:
                  myFieldList = op[c4d.ID_USERDATA, 1] #trying update global FieldList value, no sucess
      

      I've tried to push "force update" button on this event, but got error that says button execution should be only from main thread. So the question -- how to properly refresh Python Generator when parameters of fields in FieldList User Data (such as turn on/off, name, blending, opacity) are changed?

      posted in Cinema 4D SDK 2024 2025 python
      K
      karpique
    • RE: Set Ngons with Python

      @ferdinand thanks for answer, this solution works fine!
      Actually because of bug I thought that melt command only returns new object instead of changing current one. Thanks again!

      Is it 100% safe to select all polygons to melt at once? What if two or more Ngons are neighbours — will that worked out?

      posted in Cinema 4D SDK
      K
      karpique
    • Set Ngons with Python

      I got Ngons translation map and I'd like to change other Polygon object made of Cpolygons according to that map.

      Is there a way to do it without replacing polygon object with new one?

      posted in Cinema 4D SDK
      K
      karpique
    • RE: Copy mesh from one object to another with Python

      @ferdinand I get Ngon translation map and applied MCOMMAND_MELT but stuck again — as I understand SendModellingCommand only returns new object with melted ngons, but my goal is to correct object that already exists in scene...

      Is there any other ways of setting up Ngon translation map with python?

      posted in Cinema 4D SDK
      K
      karpique
    • RE: Copy mesh from one object to another with Python

      @ferdinand thanks! I have one more question: after replacing Tpoint and Tpolygon tags object seems to keep it's old bounding box parameters and disappear from viewport accordigly to them. Is there a way to update this property?

      posted in Cinema 4D SDK
      K
      karpique
    • Check C4D version for using Fields

      Since fields introduced in R20, is it correct statement to check before call them?

      if c4d.GetC4DVersion() > 20000:
         doFieldsStuff()
      
      posted in Cinema 4D SDK python
      K
      karpique
    • RE: Select custom tab with python

      @ferdinand thanks!
      My goal is to:

      1. Rename "User Data" tab of my tag
      2. Keep it opened by default (or make that tab opened with python) after tag placing in scene

      I tried to change DESC_NAME property of default user data group but didn't succeed, thats why I created parentless group with name needed, but as I see it cant be selected by default. Is there some other way of reaching my goal?

      posted in Cinema 4D SDK
      K
      karpique
    • RE: Select custom tab with python

      @fwilleke80 Thanks for answer! Unfortunately I'm dealing with python tag, not plugin

      posted in Cinema 4D SDK
      K
      karpique
    • Select custom tab with python

      I create Python Tag with custom group (tab), Tag has selected by default tab "Tag".
      How to set selected my newly created tab?

      posted in Cinema 4D SDK
      K
      karpique