diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-09-18 22:36:34 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-09-18 22:44:42 +0300 |
commit | 572bc1364ca9d978edf5aee991849dd4f8e56a52 (patch) | |
tree | 61e965068f2d6bc835ecb8bd0ffe29709c9f5c1d /source/blender/freestyle/FRS_freestyle.h | |
parent | 6c28d3bac26b22049768824bef6ae9d0e82bb71f (diff) |
BLI_listbase: Add/use utility to move link (BLI_listbase_link_move)
We were calling BLI_remlink and then BLI_insertlinkbefore/after quite often. BLI_listbase_link_move simplifies code a bit and makes it easier to follow. It also returns if link position has changed which can be used to avoid unnecessary updates.
Added it to a number of list reorder operators for now and made use of return value. Behavior shouldn't be changed.
Also some minor cleanup.
Diffstat (limited to 'source/blender/freestyle/FRS_freestyle.h')
-rw-r--r-- | source/blender/freestyle/FRS_freestyle.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h index 039a75a2f0f..a6382010ca7 100644 --- a/source/blender/freestyle/FRS_freestyle.h +++ b/source/blender/freestyle/FRS_freestyle.h @@ -63,8 +63,7 @@ void FRS_exit(void); void FRS_copy_active_lineset(struct FreestyleConfig *config); void FRS_paste_active_lineset(struct FreestyleConfig *config); void FRS_delete_active_lineset(struct FreestyleConfig *config); -void FRS_move_active_lineset_up(struct FreestyleConfig *config); -void FRS_move_active_lineset_down(struct FreestyleConfig *config); +bool FRS_move_active_lineset(struct FreestyleConfig *config, int direction); /* Testing */ struct Material *FRS_create_stroke_material(struct Main *bmain, struct FreestyleLineStyle *linestyle); |