Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-11-09 21:47:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-09 23:00:53 +0300
commit865796375bcfa6be4288cca4243dddcb4092f70b (patch)
tree5264d4b9b0f9d392b6e1b942e0f6fd802de1fff4 /source/blender/freestyle
parentcf959a879eb5ffbdfa573c5f3a00965e69d7a976 (diff)
Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 46724ff530a..2244e9196de 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -698,10 +698,10 @@ void FRS_paste_active_lineset(FreestyleConfig *config)
if (lineset) {
if (lineset->linestyle)
- lineset->linestyle->id.us--;
+ id_us_min(&lineset->linestyle->id);
lineset->linestyle = lineset_buffer.linestyle;
if (lineset->linestyle)
- lineset->linestyle->id.us++;
+ id_us_plus(&lineset->linestyle->id);
lineset->flags = lineset_buffer.flags;
lineset->selection = lineset_buffer.selection;
lineset->qi = lineset_buffer.qi;
@@ -710,12 +710,12 @@ void FRS_paste_active_lineset(FreestyleConfig *config)
lineset->edge_types = lineset_buffer.edge_types;
lineset->exclude_edge_types = lineset_buffer.exclude_edge_types;
if (lineset->group) {
- lineset->group->id.us--;
+ id_us_min(&lineset->group->id);
lineset->group = NULL;
}
if (lineset_buffer.group) {
lineset->group = lineset_buffer.group;
- lineset->group->id.us++;
+ id_us_plus(&lineset->group->id);
}
strcpy(lineset->name, lineset_buffer.name);
BKE_freestyle_lineset_unique_name(config, lineset);