diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-26 06:29:31 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-04-26 06:29:31 +0400 |
commit | 0731932eb8ca33fe7b634c09761d4ca394f182c4 (patch) | |
tree | 72441c524faa7399c37503fc4826d2d5027415ba /release | |
parent | 48a6fe86cab42d8417bf77f481fd131dd6cb0899 (diff) |
Fix #35080: freestyle Fill Range by Selection operator giving error when invoked
without a linestyle.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/freestyle.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py index 3943481ae22..2be41882d62 100644 --- a/release/scripts/startup/bl_operators/freestyle.py +++ b/release/scripts/startup/bl_operators/freestyle.py @@ -34,6 +34,11 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator): ("THICKNESS", "Thickness", "Thickness modifier type"))) name = StringProperty(name="Name", description="Name of the modifier to work on") + @classmethod + def poll(cls, context): + rl = context.scene.render.layers.active + return rl and rl.freestyle_settings.linesets.active + def execute(self, context): rl = context.scene.render.layers.active lineset = rl.freestyle_settings.linesets.active |