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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-20 10:04:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-20 10:04:18 +0300
commit7959617fb6d715838f40165c08aeb75d85ebffd4 (patch)
tree6494b7097413a320a67e0946ebdb15954983a9ff /source/blender/blenkernel
parent12eb29fe355bc17dacf094e8e9d6edc1d8b877f0 (diff)
Cleanup: line length
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_layer.h21
-rw-r--r--source/blender/blenkernel/intern/collection.c9
-rw-r--r--source/blender/blenkernel/intern/layer.c46
3 files changed, 48 insertions, 28 deletions
diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h
index 25130f43b73..ca6806a98c6 100644
--- a/source/blender/blenkernel/BKE_layer.h
+++ b/source/blender/blenkernel/BKE_layer.h
@@ -95,18 +95,25 @@ void BKE_layer_collection_sync(const struct Scene *scene, struct ViewLayer *view
void BKE_main_collection_sync_remap(const struct Main *bmain);
-struct LayerCollection *BKE_layer_collection_first_from_scene_collection(struct ViewLayer *view_layer, const struct Collection *collection);
-bool BKE_view_layer_has_collection(struct ViewLayer *view_layer, const struct Collection *collection);
-bool BKE_scene_has_object(struct Scene *scene, struct Object *ob);
+struct LayerCollection *BKE_layer_collection_first_from_scene_collection(
+ struct ViewLayer *view_layer, const struct Collection *collection);
+bool BKE_view_layer_has_collection(
+ struct ViewLayer *view_layer, const struct Collection *collection);
+bool BKE_scene_has_object(
+ struct Scene *scene, struct Object *ob);
-bool BKE_layer_collection_objects_select(struct ViewLayer *view_layer, struct LayerCollection *lc, bool deselect);
+bool BKE_layer_collection_objects_select(
+ struct ViewLayer *view_layer, struct LayerCollection *lc, bool deselect);
/* override */
-void BKE_override_view_layer_datablock_add(struct ViewLayer *view_layer, int id_type, const char *data_path, const struct ID *owner_id);
-void BKE_override_view_layer_int_add(struct ViewLayer *view_layer, int id_type, const char *data_path, const int value);
+void BKE_override_view_layer_datablock_add(
+ struct ViewLayer *view_layer, int id_type, const char *data_path, const struct ID *owner_id);
+void BKE_override_view_layer_int_add(
+ struct ViewLayer *view_layer, int id_type, const char *data_path, const int value);
-void BKE_override_layer_collection_boolean_add(struct LayerCollection *layer_collection, int id_type, const char *data_path, const bool value);
+void BKE_override_layer_collection_boolean_add(
+ struct LayerCollection *layer_collection, int id_type, const char *data_path, const bool value);
/* evaluation */
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 215477e66cc..30ed796d73f 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -189,7 +189,8 @@ bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy)
*
* \param flag Copying options (see BKE_library.h's LIB_ID_COPY_... flags for more).
*/
-void BKE_collection_copy_data(Main *UNUSED(bmain), Collection *collection_dst, const Collection *collection_src, const int flag)
+void BKE_collection_copy_data(
+ Main *UNUSED(bmain), Collection *collection_dst, const Collection *collection_src, const int flag)
{
/* Do not copy collection's preview (same behavior as for objects). */
if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0 && false) { /* XXX TODO temp hack */
@@ -287,7 +288,8 @@ void BKE_collection_new_name_get(Collection *collection_parent, char *rname)
else {
const int number = BLI_listbase_count(&collection_parent->children) + 1;
const int digits = integer_digits_i(number);
- const int max_len = sizeof(collection_parent->id.name) - 1 /* NULL terminator */ - (1 + digits) /* " %d" */ - 2 /* ID */;
+ const int max_len =
+ sizeof(collection_parent->id.name) - 1 /* NULL terminator */ - (1 + digits) /* " %d" */ - 2 /* ID */;
name = BLI_sprintfN("%.*s %d", max_len, collection_parent->id.name + 2, number);
}
@@ -723,7 +725,8 @@ void BKE_collections_child_remove_nulls(Main *bmain, Collection *old_collection)
*
* If source collection is NULL move it from all the existing collections.
*/
-void BKE_collection_object_move(Main *bmain, Scene *scene, Collection *collection_dst, Collection *collection_src, Object *ob)
+void BKE_collection_object_move(
+ Main *bmain, Scene *scene, Collection *collection_dst, Collection *collection_src, Object *ob)
{
/* In both cases we first add the object, then remove it from the other collections.
* Otherwise we lose the original base and whether it was active and selected. */
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 461d332dcf5..7bda471d3da 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -528,12 +528,10 @@ int BKE_layer_collection_findindex(ViewLayer *view_layer, const LayerCollection
* in at least one layer collection. That list is also synchronized here, and
* stores state like selection. */
-static void layer_collection_sync(ViewLayer *view_layer,
- const ListBase *lb_scene,
- ListBase *lb_layer,
- ListBase *new_object_bases,
- int parent_exclude,
- int parent_restrict)
+static void layer_collection_sync(
+ ViewLayer *view_layer, const ListBase *lb_scene,
+ ListBase *lb_layer, ListBase *new_object_bases,
+ int parent_exclude, int parent_restrict)
{
/* TODO: support recovery after removal of intermediate collections, reordering, ..
* For local edits we can make editing operating do the appropriate thing, but for
@@ -543,7 +541,8 @@ static void layer_collection_sync(ViewLayer *view_layer,
for (LayerCollection *lc = lb_layer->first; lc;) {
/* Note ID remap can set lc->collection to NULL when deleting collections. */
LayerCollection *lc_next = lc->next;
- Collection *collection = (lc->collection) ? BLI_findptr(lb_scene, lc->collection, offsetof(CollectionChild, collection)) : NULL;
+ Collection *collection = (lc->collection) ?
+ BLI_findptr(lb_scene, lc->collection, offsetof(CollectionChild, collection)) : NULL;
if (!collection) {
/* Free recursively. */
@@ -577,7 +576,10 @@ static void layer_collection_sync(ViewLayer *view_layer,
}
/* Sync child collections. */
- layer_collection_sync(view_layer, &collection->children, &lc->layer_collections, new_object_bases, lc->flag, child_restrict);
+ layer_collection_sync(
+ view_layer, &collection->children,
+ &lc->layer_collections, new_object_bases,
+ lc->flag, child_restrict);
/* Layer collection exclude is not inherited. */
if (lc->flag & LAYER_COLLECTION_EXCLUDE) {
@@ -653,7 +655,10 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer)
ListBase new_object_bases = {NULL, NULL};
const int parent_exclude = 0, parent_restrict = 0;
- layer_collection_sync(view_layer, &collections, &view_layer->layer_collections, &new_object_bases, parent_exclude, parent_restrict);
+ layer_collection_sync(
+ view_layer, &collections,
+ &view_layer->layer_collections, &new_object_bases,
+ parent_exclude, parent_restrict);
/* Any remaning object bases are to be removed. */
for (Base *base = view_layer->object_bases.first; base; base = base->next) {
@@ -827,7 +832,8 @@ bool BKE_scene_has_object(Scene *scene, Object *ob)
/**
* Add a new datablock override
*/
-void BKE_override_view_layer_datablock_add(ViewLayer *view_layer, int id_type, const char *data_path, const ID *owner_id)
+void BKE_override_view_layer_datablock_add(
+ ViewLayer *view_layer, int id_type, const char *data_path, const ID *owner_id)
{
UNUSED_VARS(view_layer, id_type, data_path, owner_id);
TODO_LAYER_OVERRIDE;
@@ -836,7 +842,8 @@ void BKE_override_view_layer_datablock_add(ViewLayer *view_layer, int id_type, c
/**
* Add a new int override
*/
-void BKE_override_view_layer_int_add(ViewLayer *view_layer, int id_type, const char *data_path, const int value)
+void BKE_override_view_layer_int_add(
+ ViewLayer *view_layer, int id_type, const char *data_path, const int value)
{
UNUSED_VARS(view_layer, id_type, data_path, value);
TODO_LAYER_OVERRIDE;
@@ -845,7 +852,8 @@ void BKE_override_view_layer_int_add(ViewLayer *view_layer, int id_type, const c
/**
* Add a new boolean override
*/
-void BKE_override_layer_collection_boolean_add(struct LayerCollection *layer_collection, int id_type, const char *data_path, const bool value)
+void BKE_override_layer_collection_boolean_add(
+ struct LayerCollection *layer_collection, int id_type, const char *data_path, const bool value)
{
UNUSED_VARS(layer_collection, id_type, data_path, value);
TODO_LAYER_OVERRIDE;
@@ -1147,9 +1155,10 @@ void BKE_view_layer_bases_in_mode_iterator_end(BLI_Iterator *UNUSED(iter))
/* Evaluation */
-void BKE_layer_eval_view_layer(struct Depsgraph *depsgraph,
- struct Scene *UNUSED(scene),
- ViewLayer *view_layer)
+void BKE_layer_eval_view_layer(
+ struct Depsgraph *depsgraph,
+ struct Scene *UNUSED(scene),
+ ViewLayer *view_layer)
{
DEG_debug_print_eval(depsgraph, __func__, view_layer->name, view_layer);
@@ -1185,9 +1194,10 @@ void BKE_layer_eval_view_layer(struct Depsgraph *depsgraph,
}
}
-void BKE_layer_eval_view_layer_indexed(struct Depsgraph *depsgraph,
- struct Scene *scene,
- int view_layer_index)
+void BKE_layer_eval_view_layer_indexed(
+ struct Depsgraph *depsgraph,
+ struct Scene *scene,
+ int view_layer_index)
{
BLI_assert(view_layer_index >= 0);
ViewLayer *view_layer = BLI_findlink(&scene->view_layers, view_layer_index);