SOLVED How to get the activated objects in the IN/EXCLUDE GUI?

I searched a lot in the forum and still couldn't find the answer. But in c4d, the right-clicked the activated object in the gui can select or remove the activated object . Obviously it should have a way to get the activated object.

Thanks for any help.

0_1546922705214_未标题-1.png

Hi, @chuanzhen I'm afraid it's not possible to know the current selection state.

InExclude.GetFlags actually return the enabling state (e.g in the Fracture object, in the Effectors tab, drag an effector into the InExclude fields, and GetFlags return the enabling state of the effector).

Cheers,
Maxime.

@m_adam Thanks,I still have a question about c4d how to implement the "Select Object(s)/Remove" command in IN/ExcludeGUI,this confuses me!

Hi @chuanzhen, if you try to create a command which Selects the object and Remove this is not possible.
The internal parameter which store the selection is not exposed, and the message sent to the description to notify a selection change, do not contains information about ID.

So I'm afraid it's a limitation, I will fill a feature request.
Cheers,
Maxime.

@m_adam Thanks,although the problem has not been resolved, but got a good answer.

Thanks also for the help provided by @mp5gosu ☺

Another way would be to create your own CustomGui. This however may be a bit over the top and there's way more to implement. It may pay off for you though.

@mp5gosu Thanks, I will keep exploring that creating my own CustomGui. The greatest pleasure is the process of finding answers.☺

@mp5gosu, that's true I didn't think about this possibility as well.

Just for your information, an IcustomGui can only be done with C++ an implementation example can be found in customdata_customgui.cpp.

Cheers,
Maxime.