From ef520a8cc9e863aa234be0ee60d1038e7ec8fc44 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jan 2006 01:53:26 +0000 Subject: [PATCH] Scene.c - Removed redraw when in non UI mode. Lamp.py - Example indent Object.py - Improved join documentation. --- source/blender/python/api2_2x/Scene.c | 2 +- source/blender/python/api2_2x/doc/Lamp.py | 18 +++++++++--------- source/blender/python/api2_2x/doc/Object.py | 15 ++++++++++----- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 90aa548d7ce..4f1ce26778d 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -934,7 +934,7 @@ static PyObject *Scene_setCurrentCamera( BPy_Scene * self, PyObject * args ) scene->camera = object; /* set the current Camera */ /* if this is the current scene, update its window now */ - if( scene == G.scene ) + if( !G.background && scene == G.scene ) /* Traced a crash to redrawing while in background mode -Campbell */ copy_view3d_lock( REDRAW ); /* XXX copy_view3d_lock(REDRAW) prints "bad call to addqueue: 0 (18, 1)". diff --git a/source/blender/python/api2_2x/doc/Lamp.py b/source/blender/python/api2_2x/doc/Lamp.py index b1e0754c05c..20a25db41ac 100644 --- a/source/blender/python/api2_2x/doc/Lamp.py +++ b/source/blender/python/api2_2x/doc/Lamp.py @@ -39,15 +39,15 @@ Example:: - '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 + 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 07ec0ab1666..45d3fb9c90d 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -556,12 +556,17 @@ class Object: @type objects: Sequence of Blender Object @param objects: A list of objects matching the objects type. - @note: Objects in the list will not be removed, to avoid duplicate data you may want to remove them manualy after joining. - @note: Join modifies the object in place so that other objects are joined into it. no new object or data is created. - @note: Join will only work for object types Mesh, Armature, Curve and Surface, an error will be raised if the object is not of this type. + @note: Objects in the list will not be removed from the scene, + to avoid overlapping data you may want to remove them manualy after joining. + @note: Join modifies the base objects data in place so that + other objects are joined into it. no new object or data is created. + @note: Join will only work for object types Mesh, Armature, Curve and Surface, + an error will be raised if the object is not of this type. @note: objects in the list will be ignored if they to not match the base object. - @note: An error in the join function input will raise a TypeError, otherwise an error in the data input is raised is a RuntimeError, - for situations where you do not have tight control on the data that is being joined, you should handel the RuntimeError error. + @note: An error in the join function input will raise a TypeError, + otherwise an error in the data input will raise a RuntimeError, + for situations where you don't have tight control on the data that is being joined, + you should handel the RuntimeError error, litting the user know the data cant be joined. """ def makeParentDeform(objects, noninverse = 0, fast = 0):