diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-05 14:53:13 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-05-06 11:58:57 +0400 |
commit | a6f92cd29ad4585745dc0bb420cb79f1b97aeb1e (patch) | |
tree | 1935fbe4ba6eb14d5525e2a19cb4b968623c3654 /source/blender/editors/space_buttons/buttons_context.c | |
parent | fd7f5c423070f52d023e1c403c5c2543ec7fa3a6 (diff) |
Freestyle: added more conditions to be able to switch to the line style texture properties context.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 4b37ac6b281..a00aac12fba 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -525,12 +525,20 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur static bool buttons_context_linestyle_pinnable(const bContext *C) { Scene *scene = CTX_data_scene(C); + SceneRenderLayer *actsrl; + FreestyleConfig *config; SpaceButs *sbuts; /* if Freestyle is disabled in the scene */ if ((scene->r.mode & R_EDGE_FRS) == 0) { return false; } + /* if Freestyle is not in the Parameter Editor mode */ + actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); + config = &actsrl->freestyleConfig; + if (config->mode != FREESTYLE_CONTROL_EDITOR_MODE) { + return false; + } /* if the scene has already been pinned */ sbuts = CTX_wm_space_buts(C); if (sbuts->pinid && sbuts->pinid == &scene->id) { |