diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 17:15:01 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 19:58:37 +0300 |
commit | f40a88a4ba9569db3574044f82838a88fc810726 (patch) | |
tree | 1b510c927513063b130ce7d0d1ccb23a081b1dfa /source/blender/editors/object | |
parent | e9634b6930e4712260d69a2c4e350783144a371a (diff) |
Fix selected to active Cycles Baking
Since we started using looptris we no longer need a triangulation
modifier in the highpoly object. In fact having was causing a bug
where baking would be utterly broken.
This fix normal baking. Combined pass still needs a fix to hide the
objects during baking.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index b9cc13cda34..90bb853e9d4 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -856,7 +856,6 @@ static int bake( /* populate highpoly array */ for (link = selected_objects->first; link; link = link->next) { - TriangulateModifierData *tmd; Object *ob_iter = link->ptr.data; if (ob_iter == ob_low) @@ -866,14 +865,6 @@ static int bake( highpoly[i].ob = ob_iter; highpoly[i].restrict_flag = ob_iter->restrictflag; - /* triangulating so BVH returns the primitive_id that will be used for rendering */ - highpoly[i].tri_mod = ED_object_modifier_add( - reports, bmain, scene, highpoly[i].ob, - "TmpTriangulate", eModifierType_Triangulate); - tmd = (TriangulateModifierData *)highpoly[i].tri_mod; - tmd->quad_method = MOD_TRIANGULATE_QUAD_FIXED; - tmd->ngon_method = MOD_TRIANGULATE_NGON_EARCLIP; - highpoly[i].me = bake_mesh_new_from_object(depsgraph, bmain, scene, highpoly[i].ob); highpoly[i].ob->restrictflag &= ~OB_RESTRICT_RENDER; @@ -1091,9 +1082,6 @@ cleanup: for (i = 0; i < tot_highpoly; i++) { highpoly[i].ob->restrictflag = highpoly[i].restrict_flag; - if (highpoly[i].tri_mod) - ED_object_modifier_remove(reports, bmain, highpoly[i].ob, highpoly[i].tri_mod); - if (highpoly[i].me) BKE_libblock_free(bmain, highpoly[i].me); } |