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. sandidolsak
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 6
    • Best 0
    • Controversial 0
    • Groups 0

    sandidolsak

    @sandidolsak

    0
    Reputation
    17
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    sandidolsak Unfollow Follow

    Latest posts made by sandidolsak

    • RE: How to deselect item in a fieldList

      @m_magalhaes Hey!

      Added the code you provided and it works nicely, thanks so much!

      Cheers,

      Sandi

      posted in Cinema 4D SDK
      S
      sandidolsak
    • RE: How to deselect item in a fieldList

      @zipit Thanks for this, I tried, doesn't seem to work with DelBit(), it does change the state, so if I read it back with GetBit() it says false, but it doesn't reflect in OM or AM.

      But thanks anyway, this is more a visual thing anyway, would be cool to fix but it works without it too, just more confusing 🙂

      posted in Cinema 4D SDK
      S
      sandidolsak
    • RE: How to deselect item in a fieldList

      @m_magalhaes I am talking about the bold orange Highlight on selected field object when it is not actually selected in the OM but trough the field list

      selected_01.JPG

      I would like to remove this, deselect everything inside Field list, if possible.

      Thanks.

      posted in Cinema 4D SDK
      S
      sandidolsak
    • How to deselect item in a fieldList

      edit :
      new question, forked from this thread

      Hey @zipit,

      Thanks for the detailed explanation about type, will try following it from now on.

      Tested FIeldLists implementation and it seems to work very well so far, the only thing I struggle is with "half selected" (bold orange) elements in fieldlists, is there a way to deselect them all like with volumebuilder, where you simply call:

          for i in xrange(0, obj.GetListEntryCount()):
              obj.SetSelected(i, 0)
      

      Thanks again,

      Sandi

      posted in Cinema 4D SDK r20 r21 python
      S
      sandidolsak
    • RE: Iterating trough Field list?

      Hey zipit,

      thanks you so much for this, works like a charm.

      It only fails on Text and MoText object, I think it is because "font" attribute, it is returning error "AttributeError: Parameter value not accessible (object unknown in Python)"
      Any idea how to get around this?
      Edit: Found solution here: https://developers.maxon.net/forum/topic/10248/13738_iterate-attributes/5

      Manuel, thanks for pointing me to that, will follow it from now on np.

      p.s. sorry about type() I usually copy paste code until it works and that works 😉

      Cheers,

      Sandi

      posted in Cinema 4D SDK
      S
      sandidolsak
    • Iterating trough Field list?

      Hello,

      I wrote a script that does a simple check up if the selected object is used in any Link or InExcludeData field trough the scene (objects, tags, nodes..), so you can debug a messy project and find out which objects are important or not.

      I never updated it to include Field list, so I come here for help since I am lost.
      The code to crawl trough is as follows

      def iter_container(bc):
          for value in bc:
              if type(value[1]) == c4d.InExcludeData:
                  for i in range(0, value[1].GetObjectCount()):
                      if value[1].ObjectFromIndex(doc, i) == op:
                          return 1
              if value[1] == op:
                  return 1
      

      I figured out I have to check

      if type(value[1]) == c4d.FieldList:
      

      But how do iterate trough it and check each objects like with inexcludedata?

      Thanks for help!

      Sandi

      posted in Cinema 4D SDK python r20 r21
      S
      sandidolsak