[Bf-python] Proposal to getSelected and getAcitve

Campbell Barton cbarton at metavr.com
Fri Mar 4 18:25:08 CET 2005


jms wrote:

> Willian Padovani Germano a écrit :
>
>>
>> Still, we can add Object module functions Object.SetActive(obj) and 
>> also Object.GetActive() like Campbell suggested, for completeness and 
>> simetry, since other modules have these.
>>
> Good idea . Really needed .
>
> -jms-

Half the functionality is there, when I added the ob.isSelected() and 
ob.sel = 1.. etc. I made it act like selecting an object in blender.
So when you do an
ob.sel = 1. This object becomes active , de-selected but its still active.
So if you realy need to make sure Object.GetSelected()[0] is active you 
can do a.

ob = Object.GetSelected()[0]
ob.sel = 0
ob.sel = 1

- Cam

-- 
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