Fix #35080: freestyle Fill Range by Selection operator giving error when invoked

without a linestyle.
This commit is contained in:
2013-04-26 02:29:31 +00:00
parent 48a6fe86ca
commit 0731932eb8

View File

@@ -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