Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I get SoExtSelection to work in “additive” mode?

Additive mode
0
Posted

How can I get SoExtSelection to work in “additive” mode?

0

GROUND INFO: Additive mode means that if you select an object using SoExtSelection and then you select it again, it doesn’t get deselected (the usual behavior). This way you can (for example) first select objects A and B, then B and C, resulting in the cumulative selection of objects A, B and C. Normally object B would be *de*selected by SoExtSelection the second time it was selected. Internally, this deselection happens as follows: When you pick one or more objects, SoExtSelection checks to see if each picked object is already in the selection list and if it is, it removes it from the selection list. The result is that any object selected twice is deselected. CODE TO USE: To get around this behavior, you will need to use a pick filter callback. This callback allows you to take specific actions depending on what was picked. In the pick filter callback, you will check to see if the picked object is already in SoExtSelection’s selection list.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.