@m_magalhaes Hey!
Added the code you provided and it works nicely, thanks so much!
Cheers,
Sandi
@m_magalhaes Hey!
Added the code you provided and it works nicely, thanks so much!
Cheers,
Sandi
@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
@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
I would like to remove this, deselect everything inside Field list, if possible.
Thanks.
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
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
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