Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-27 22:50:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-27 22:50:10 +0400
commiteb40d8ef0f49873a7f262af367decb7e652e7618 (patch)
tree0e705bf7f8b208360bf420629afb0c5193e32c48 /release
parent324187b61a92c0c02c0e528a3f918ea73345a28e (diff)
render api utility function to initialize a render layer from an image rather then loading through python.
lay = result.layers[0] lay.rect_from_file("somefile.png", part.x, part.y) If the source image is bigger then the render layer x/y offsets can be used to choose the part of the image use.
Diffstat (limited to 'release')
-rw-r--r--release/ui/space_view3d_toolbar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
index 0a9b1090f9e..7fd8d75209f 100644
--- a/release/ui/space_view3d_toolbar.py
+++ b/release/ui/space_view3d_toolbar.py
@@ -27,7 +27,8 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
col.itemO("object.duplicate")
col.itemO("object.delete")
- if context.active_object.type == 'MESH':
+ active_object= context.active_object
+ if active_object and active_object.type == 'MESH':
layout.itemL(text="Shading:")
col = layout.column(align=True)