diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-04 18:47:16 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-04 18:47:16 +0300 |
commit | ed2b55585d7c28f980d264e9add5079adde9209c (patch) | |
tree | a678bc1eee89b054693e3c3a6cd6b5bbdc4b75db /source/blender/python/api2_2x | |
parent | ec01a66a6b21d4bde016533af4004d2bfeba5162 (diff) | |
parent | 4cb838d54f6a84e2717fce580a65d205f3980b03 (diff) |
Wednesday sync orange with bf-blender
Note: has the crazyspace fix!
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r-- | source/blender/python/api2_2x/Armature.c | 1 | ||||
-rw-r--r-- | source/blender/python/api2_2x/doc/Lamp.py | 10 | ||||
-rw-r--r-- | source/blender/python/api2_2x/doc/Object.py | 22 |
3 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index a2a3db05bc8..743956a1f61 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -465,6 +465,7 @@ static PyObject *Armature_update(BPy_Armature *self) if (!BonesDict_InitBones(self->Bones)) return NULL; self->Bones->editmode_flag = 0; + BLI_freelistN(&self->Bones->editbones); }else{ goto AttributeError; diff --git a/source/blender/python/api2_2x/doc/Lamp.py b/source/blender/python/api2_2x/doc/Lamp.py index 52ec301f994..b1e0754c05c 100644 --- a/source/blender/python/api2_2x/doc/Lamp.py +++ b/source/blender/python/api2_2x/doc/Lamp.py @@ -38,6 +38,16 @@ Example:: - 'Square' - 'NoDiffuse' - 'RayShadow' + +Example:: + from Blender import Lamp, Object + # Change the mode of selected lamp objects. + for ob in Object.GetSelected(): # Loop through the current selection + if ob.getType() == "Lamp": # if this is a lamp. + lamp = ob.getData() # get the lamp data. + if lamp.type == Lamp.Types["Spot"]: # Lamp type is not a flag + lamp.mode &= ~Lamp.Modes["RayShadow"] # Disable RayShadow. + lamp.mode |= Lamp.Modes["Shadows"] # Enable Shadowbuffer shadows """ def New (type = 'Lamp', name = 'LampData'): diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py index dac594d9259..bddf09c92cd 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -91,9 +91,8 @@ def Get (name = None): def GetSelected (): """ - Get the selected objects on visible layers from Blenders current scene. If no objects are selected, an empty - list will be returned. - The active object of the current scene will always be the first object in the list (if selected). + Get the user selection. If no objects are selected, an empty list will be returned. + @return: A list of all selected Objects in the current scene. I{B{Example:}} @@ -104,6 +103,10 @@ def GetSelected (): objects = Blender.Object.GetSelected() print objects + @note: The active object will always be the first object in the list (if selected). + @note: The user selection is made up of selected objects from Blenders current scene. + @note: The user selection is limited to objects on visible layers, + if the users last active 3d view is in localview then the selection will be limited to the objects in that localview. """ @@ -156,19 +159,6 @@ def Duplicate (mesh=0, surface=0, curve=0, text=0, metaball=0, armature=0, lamp= activeObject.LocX += 1 Blender.Redraw() """ -''' -def Join (): - """ - Joins selected objects on visible layers from Blenders current scene. - The active object is used as a base for all other objects of the same type to join into - just like pressing Ctrl+J - - @return: None - @note: Being in edit mode, mesh objects with keys and a large number of verts in the - resulting mesh will all raise a RuntimeError. - @note: The join may be unsucsessfull because of the selection or object types and no error raised. - Checking if the number of selected objects has changed is a way to know the join worked. - """ -''' class Object: """ |