Isotropix Forums

Picking session

Clarisse Scripting related topics

Picking session

Unread postby stheroux » Wed Jun 29, 2016 5:01 pm

Hi guys,

I am building a simple tool that requires the user to select a source object and a destination object. Ideally, the user would run the command with the source object already selected and then would be prompted to select the destination object in a picking session.

No tool that I'm aware of seems to uses picking session in Clarisse and I did not find anything in the api doc. Is this something that exists ?

There are workaround as I can always have the user select 2 objects initially or have some ui pop-up to drop a destination object in. But a pick session is nice and very intuitive.

Thanks
Sylvain
stheroux
 
Posts: 42
Joined: Thu Jan 15, 2015 10:23 pm

Re: Picking session

Unread postby julien » Mon Jul 04, 2016 6:44 pm

Hi,
By picking you mean opening a browser and selecting the item or picking directly an object in 3d view or image view ?

Regards
User avatar
julien
 
Posts: 272
Joined: Mon Nov 18, 2013 7:30 pm

Re: Picking session

Unread postby stheroux » Mon Aug 15, 2016 6:53 pm

Hi,

Browser would be best.
We currently have the order of selection matter instead and it works pretty well for our current need. But it is more limited and less explicit.

Thanks
Sylvain
stheroux
 
Posts: 42
Joined: Thu Jan 15, 2015 10:23 pm

Re: Picking session

Unread postby stheroux » Fri Nov 18, 2016 3:26 pm

Just saw that in the latest release:

It is now possible to summon Clarisse's browser picker in Python to select items, objects or contexts. Methods are available in ix.api.IOHelpers: pick_item, pick_items, pick_object, pick_objets, pick_context and pick_contexts

Still have to try it but it lookx exactly like what i need.

Thanks!
Sylvain
stheroux
 
Posts: 42
Joined: Thu Jan 15, 2015 10:23 pm

Re: Picking session

Unread postby atnreg » Sun Jan 08, 2017 2:19 pm

stheroux wrote:Hi,

Browser would be best.
We currently have the order of selection matter instead and it works pretty well for our current need. But it is more limited and less explicit.

Thanks
Sylvain


Do you mean that you can find out the exact order the selection has been done?
I would need exactly that but when I use the ix.selection, it always sorts the items in order they are in browser.

So:
-first I select some objects, say 'b', 'c', 'a'
-then I run a script that shows me the ix.selection but it appears as: 'a','b','c' (or whatever the sorting order in browser was)
-I would like to get it in original order i.e. 'b','c','a'

Can you please explain how to do this if that is what you meant by 'order of selection matter'? :)
And/or of course if anyone else has any ideas on this, please tell!

Thank you!

Antti
Intel i7(6-core),32GB RAM,NVIDIA GTX690 (2GPU)+GTX Titan Black,Win10Pro 64bit
Clarisse 3.5SP2,Blender,ZBrush,Onyx,(3D-Coat,Lightwave+Octane...)
Clarisse since 2016-09-29 (Py 2017-01-04), Python since 2016-11-10
I do all 3D stuff for fun, no business
atnreg
 
Posts: 254
Joined: Mon Sep 19, 2016 5:20 pm
Location: Helsinki, Finland

Re: Picking session

Unread postby stheroux » Mon Jan 09, 2017 4:20 pm

Hi atnreg,

Seems like you are right and the selection order is not preserved. But somehow the last item selected seems to always be returned last regardless of the browser sort order. And it is the only one that mattered in that script so we did not catch that.

Have you tried the new pick commands instead ?

Thanks
Sylvain
stheroux
 
Posts: 42
Joined: Thu Jan 15, 2015 10:23 pm

Re: Picking session

Unread postby atnreg » Mon Jan 09, 2017 4:54 pm

Seems like you are right and the selection order is not preserved. But somehow the last item selected seems to always be returned last regardless of the browser sort order. And it is the only one that mattered in that script so we did not catch that.


Oh so LAST is always the last, that helps too, thanks :)

Have you tried the new pick commands instead ?


Uh oh...yes...kind of...but I am very new in Python too (see my sig) and not familiar with those C++ style parameters...I tried to make simple picker and finally managed to get it to work except for the filters, I don't understand how the array should be created to be accepted.

Why doesn't Clarisse have basic picker and basic dialogs (in addition to yesno) with even simple selection buttons?
I cannot be the only one not familiar with C++ and so it is really hard to make any otherwise pretty simple UIs for scripts...

Has someone made some simple-to-use (i.e. pure Python) wrappers or something for those? :?
And is there some 'secret' place where I can find examples for Clarisse scripts?

Any help on this would be highly welcome!

Antti
Intel i7(6-core),32GB RAM,NVIDIA GTX690 (2GPU)+GTX Titan Black,Win10Pro 64bit
Clarisse 3.5SP2,Blender,ZBrush,Onyx,(3D-Coat,Lightwave+Octane...)
Clarisse since 2016-09-29 (Py 2017-01-04), Python since 2016-11-10
I do all 3D stuff for fun, no business
atnreg
 
Posts: 254
Joined: Mon Sep 19, 2016 5:20 pm
Location: Helsinki, Finland

Re: Picking session

Unread postby sam » Mon Jan 09, 2017 5:16 pm

stheroux wrote:Seems like you are right and the selection order is not preserved

Hi Sylvain,

This has been reported as a bug #6255
Cheers,
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 977
Joined: Sat Jan 26, 2013 12:33 am

Re: Picking session

Unread postby atnreg » Mon Jan 09, 2017 5:28 pm

sam wrote:
stheroux wrote:Seems like you are right and the selection order is not preserved

Hi Sylvain,

This has been reported as a bug #6255
Cheers,


So it is meant that the selection order is preserved in script? That's good news :)
Could that be fixed in SP7, what do you think? And/or when? ;)
That would help a lot when making special, even quite complicated scripts so I will be waiting for it eagerly :D

Antti
Intel i7(6-core),32GB RAM,NVIDIA GTX690 (2GPU)+GTX Titan Black,Win10Pro 64bit
Clarisse 3.5SP2,Blender,ZBrush,Onyx,(3D-Coat,Lightwave+Octane...)
Clarisse since 2016-09-29 (Py 2017-01-04), Python since 2016-11-10
I do all 3D stuff for fun, no business
atnreg
 
Posts: 254
Joined: Mon Sep 19, 2016 5:20 pm
Location: Helsinki, Finland

Re: Picking session

Unread postby sam » Mon Jan 09, 2017 7:56 pm

Unfortunately it's not going to be fixed in SP7. The order isn't preserved when selecting items using the Browser/Explorer. The bug lies within this two widgets. Honestly, this has been there for ages and no one has ever reported it until now. So it seems it's far to be a critical issue.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 977
Joined: Sat Jan 26, 2013 12:33 am

Next

Return to Scripting