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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-04 16:08:57 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-04 17:11:27 +0300
commitfc115e1ab23a9c458ea1496f160e14009e68cd54 (patch)
treef61d7a4d8c09d5ebf6839299ec00998976f31f3f /source/blender/blenkernel/intern/object_dupli.c
parent0f50caf5560f9c2f9af393eefdf2b209210dbfba (diff)
Cleanup: remove legacy layer and dupli code.
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 9f6cdcd5179..b5c2e7f3d96 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1259,59 +1259,3 @@ int count_duplilist(Object *ob)
}
return 1;
}
-
-DupliApplyData *duplilist_apply(Depsgraph *depsgraph, Object *ob, Scene *scene, ListBase *duplilist)
-{
- DupliApplyData *apply_data = NULL;
- int num_objects = BLI_listbase_count(duplilist);
-
- if (num_objects > 0) {
- DupliObject *dob;
- int i;
- apply_data = MEM_mallocN(sizeof(DupliApplyData), "DupliObject apply data");
- apply_data->num_objects = num_objects;
- apply_data->extra = MEM_mallocN(sizeof(DupliExtraData) * (size_t) num_objects,
- "DupliObject apply extra data");
-
- for (dob = duplilist->first, i = 0; dob; dob = dob->next, ++i) {
- /* make sure derivedmesh is calculated once, before drawing */
- if (scene && !(dob->ob->transflag & OB_DUPLICALCDERIVED) && dob->ob->type == OB_MESH) {
- mesh_get_derived_final(depsgraph, scene, dob->ob, scene->customdata_mask);
- dob->ob->transflag |= OB_DUPLICALCDERIVED;
- }
- }
-
- for (dob = duplilist->first, i = 0; dob; dob = dob->next, ++i) {
- /* copy obmat from duplis */
- copy_m4_m4(apply_data->extra[i].obmat, dob->ob->obmat);
- copy_m4_m4(dob->ob->obmat, dob->mat);
-
- /* copy layers from the main duplicator object */
- apply_data->extra[i].lay = dob->ob->lay;
- dob->ob->lay = ob->lay;
- }
- }
- return apply_data;
-}
-
-void duplilist_restore(ListBase *duplilist, DupliApplyData *apply_data)
-{
- DupliObject *dob;
- int i;
- /* Restore object matrices.
- * NOTE: this has to happen in reverse order, since nested
- * dupli objects can repeatedly override the obmat.
- */
- for (dob = duplilist->last, i = apply_data->num_objects - 1; dob; dob = dob->prev, --i) {
- copy_m4_m4(dob->ob->obmat, apply_data->extra[i].obmat);
- dob->ob->transflag &= ~OB_DUPLICALCDERIVED;
-
- dob->ob->lay = apply_data->extra[i].lay;
- }
-}
-
-void duplilist_free_apply_data(DupliApplyData *apply_data)
-{
- MEM_freeN(apply_data->extra);
- MEM_freeN(apply_data);
-}