Navigation

    • Register
    • Login
    • Search
    1. Home
    2. sandidolsak
    S

    sandidolsak

    @sandidolsak

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

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    sandidolsak Follow

    Best posts made by sandidolsak

    This user does not have any upvoted posts yet.

    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 •
    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 •
    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 •
    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 •
    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://plugincafe.maxon.net/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 •
    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 •