[Bf-python] Proposal to getSelected and getAcitve
Joilnen Batista Leite
vma_bad_list at yahoo.com
Thu Mar 3 06:19:12 CET 2005
Hi guys !
Stephen explained the what my english not could :) !
--- Stephen Swaney <sswaney at centurytel.net> wrote:
> Note: if there are selected objects, the active
> object is the first
> one in the list returned by Object.GetSelected().
>
> > In addition I propose to name it
> Scene.GetObjects() (plural).
I sending a new patch with few rewrite and changes
this scene method to GetObjects
> This changes the meaning of Object.isSelected().
> Right now, it tests
> objects in the current scene. We can not break
> existing scripts.
>
> One way to get the effect you want is to add an
> optional scene arg.
> However, I am not convinced this belongs as an
> Object method rather
> than a Scene one.
I am not sure where put that too I thought in Object
Object.isSelected (yes/no) and about compatibility,
scripts not used Objects in Scene aproach before I
guess so this method in old scripts testing just only
in current scene it works for that too.
here a simple test:
make Scene.001 and put objects in this scenes
from Blender import Scene, Object
scn= Scene.Get('Scene.001')
lay=2
ob= scn.getObjects(lay) # nothing get all objects in
active layers
for i in ob:
if (lay!=0):
print i,'First is active'
lay=0
if i.isSelected(): # this funcs changing to
test objects in ever scene
print i,'Selected'
else:
print i,'NoSelected'
Thanks, Joilnen
PS.: Mark, portuguese could help me a lot :)!
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getsel_patch_1
Type: application/octet-stream
Size: 4996 bytes
Desc: getsel_patch_1
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20050302/6af37a68/attachment.obj>
More information about the Bf-python
mailing list