Isotropix Forums

Is it possible to get eye status of ref list attribute?

Clarisse Scripting related topics

Is it possible to get eye status of ref list attribute?

Unread postby atnreg » Mon Apr 23, 2018 3:41 pm

Hi!

I have ScriptedClass that has list<reference> CID attribute. Now I would like to detect which items on list have the eye icon on. Can that be done in Python and if so, please give me simple example :)

Also is it possible to detect which items on the ref list attribute are selected i.e. highlighted by mouse?

Thank you in advance for any tips/ideas :)

Antti
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP5b,Houdini,Blender2.80,Fusion360,Onyx,ZBrush,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 534
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland

Re: Is it possible to get eye status of ref list attribute?

Unread postby atnreg » Wed Apr 25, 2018 1:58 pm

56 views and not a single comment :o
Was this too stupid question or too difficult? :D

Please Isotropix, just at least tell me if it is possible or not, you must know ;)

Thank you!

Antti
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP5b,Houdini,Blender2.80,Fusion360,Onyx,ZBrush,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 534
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland

Re: Is it possible to get eye status of ref list attribute?

Unread postby bvaldes » Wed Apr 25, 2018 3:34 pm

Hi,

About the first question, do you simply want to get the items that have eye displayed? If you can simply do that:

python code

attr = ix.get_item(your_item.attr_name")
for i in range(attr.get_value_count()):
print attr.get_object(i)


About the second question, it's not possible to know witch attribute is highlighted.

Regards,
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 384
Joined: Mon Sep 26, 2016 10:44 am

Re: Is it possible to get eye status of ref list attribute?

Unread postby atnreg » Wed Apr 25, 2018 4:03 pm

bvaldes wrote:Hi,
About the first question, do you simply want to get the items that have eye displayed? If you can simply do that:

python code

attr = ix.get_item(your_item.attr_name")
for i in range(attr.get_value_count()):
print attr.get_object(i)



Oops, so my question was stupid :o Has this changed for Python? I have tried that some time ago and it always gave me all items on the reflist :o
Anyway, thank you, now I know it works, that is the main thing :)

About the second question, it's not possible to know witch attribute is highlighted.


I think we understood each other but just for clarification, I meant what is selected on the list of reflist. So if I add 3 items to a reflist and then click on one of them (turn to orange), is it possible to know that in Python? I think not but it would be useful in some cases :)

Thank you!

Antti
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP5b,Houdini,Blender2.80,Fusion360,Onyx,ZBrush,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 534
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland

Re: Is it possible to get eye status of ref list attribute?

Unread postby bvaldes » Thu Apr 26, 2018 9:40 am

Hi,

This way to find item in reference's type attribute hasn't changed for a while. The hard part is to get all the list even when the items are "disabled".

About second subject, it's what I'd understood. This is not possible because we don't have access to the widget in python.

Regards,
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 384
Joined: Mon Sep 26, 2016 10:44 am

Re: Is it possible to get eye status of ref list attribute?

Unread postby atnreg » Thu Apr 26, 2018 12:13 pm

ok, then I must have messed up something earlier, anyway now it works so I'm happy :)
Luckily I have not needed to get the list regardless of that status but is that even possible in Python?

And yes I was pretty sure the selected items are not reachable to Python but wanted to make sure. And now I am :)

Thank you very much again!

Antti
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP5b,Houdini,Blender2.80,Fusion360,Onyx,ZBrush,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 534
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland


Return to Scripting
cron