diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-07-16 08:36:39 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-07-16 08:38:58 +0400 |
commit | 647969f9b617b0ef6d49d7502aef7c1035769bc0 (patch) | |
tree | 99acc628ef513e3d542f1c384eddbd2bc923b2ba /source/blender/blenkernel | |
parent | de379c05dea561fbd02dc875fd7f4ae6178579b5 (diff) |
Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene().
The function is to retrieve the active line style ID datablock from a scene and
there is nothing related to bContext.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_linestyle.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 13 |
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index e30c8ecee2b..877e376b343 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -234,7 +234,6 @@ int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBas struct Main *CTX_data_main(const bContext *C); struct Scene *CTX_data_scene(const bContext *C); struct ToolSettings *CTX_data_tool_settings(const bContext *C); -struct FreestyleLineStyle *CTX_data_linestyle_from_scene(struct Scene *scene); const char *CTX_data_mode_string(const bContext *C); int CTX_data_mode_enum(const bContext *C); diff --git a/source/blender/blenkernel/BKE_linestyle.h b/source/blender/blenkernel/BKE_linestyle.h index 8bc8cc44d92..3b448e1c402 100644 --- a/source/blender/blenkernel/BKE_linestyle.h +++ b/source/blender/blenkernel/BKE_linestyle.h @@ -48,6 +48,8 @@ FreestyleLineStyle *BKE_new_linestyle(const char *name, struct Main *main); void BKE_free_linestyle(FreestyleLineStyle *linestyle); FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle); +FreestyleLineStyle *BKE_get_linestyle_from_scene(struct Scene *scene); + LineStyleModifier *BKE_add_linestyle_color_modifier(FreestyleLineStyle *linestyle, const char *name, int type); LineStyleModifier *BKE_add_linestyle_alpha_modifier(FreestyleLineStyle *linestyle, const char *name, int type); LineStyleModifier *BKE_add_linestyle_thickness_modifier(FreestyleLineStyle *linestyle, const char *name, int type); diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 47b29b49689..de285f87444 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -48,7 +48,6 @@ #include "BKE_context.h" #include "BKE_main.h" #include "BKE_screen.h" -#include "BKE_freestyle.h" #include "RNA_access.h" @@ -1091,16 +1090,3 @@ int CTX_data_visible_pose_bones(const bContext *C, ListBase *list) { return ctx_data_collection_get(C, "visible_pose_bones", list); } - -FreestyleLineStyle *CTX_data_linestyle_from_scene(Scene *scene) -{ - SceneRenderLayer *actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); - FreestyleConfig *config = &actsrl->freestyleConfig; - FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); - - if (lineset) { - return lineset->linestyle; - } - - return NULL; -} diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index d92fa328e87..5d51eb09b6e 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -43,6 +43,7 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BKE_freestyle.h" #include "BKE_global.h" #include "BKE_library.h" #include "BKE_linestyle.h" @@ -209,6 +210,18 @@ FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle) return new_linestyle; } +FreestyleLineStyle *BKE_get_linestyle_from_scene(Scene *scene) +{ + SceneRenderLayer *actsrl = BLI_findlink(&scene->r.layers, scene->r.actlay); + FreestyleConfig *config = &actsrl->freestyleConfig; + FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config); + + if (lineset) { + return lineset->linestyle; + } + return NULL; +} + static LineStyleModifier *new_modifier(const char *name, int type, size_t size) { LineStyleModifier *m; |