[Bf-python] Select/isSelect/sel: new patch, whoops
Campbell Barton
cbarton at metavr.com
Sat Jun 5 18:07:41 CEST 2004
Hi, this is kinda a matter of opinion.
If you select a heap of objects and then shift RMB on any one of tyhem
twice.
It will first become active then deselected but active. So I dont see
why de'selecting should make another object active.
When you select an object it becomes active.
Therefor the last selected object is always the acive one.
If you deselect an object it wont affect any objects active states.
Its totaly possible to be unselected and active in the 3d view so I
didnt have a problem with this in python.
If anything- an set_active_base( base ); should be called on a python
select(0) call too. (To mimic the 3d view) But that makes it a little
harder to keep track of whats active.
Mostly if you want an ob to be active you also want it to be selected so
It just means:
Last ob.selected(1) is always active.
If users wants an unselected to be active then they can select then
de-select.
I thaught of an ob.make_active() function but thaught it was a bit low
level abnd Id rather have python mimic the workings of the 3d view.
In saying all of this Im realy not that fussed as long as you can easely
control the active state of any object.
- Cam
Stephane SOPPERA wrote:
> Hi,
>
> Campbell Barton wrote:
>
>> Hi I just added a line to 1683 of Object.c
>>
>> set_active_base(base);
>>
>> - This is good because it makes the last selected object active, I'll
>> need this functionality when I add Object.Join().
>
>
> There seems to be still a problem with Object.select()
> If you get the active object and call select(0) on it, this object is
> still considered as the active object without being selected.
>
> set_active_base() should also be called in case sel==0 if the object
> deselected was the active one.
>
> Thanks,
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
More information about the Bf-python
mailing list