Blender Git Loki
Git Commits -> Revision fdfa591
Revision fdfa591 by Sergey Sharybin (master) February 5, 2013, 12:46 (GMT) |
Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashes Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review! |
Commit Details:
Full Hash: fdfa5910b50e9e3af5fdd1a24d1affdfbdafc523
SVN Revision: 54318
Parent Commit: e7cead0
Lines Changed: +498, -423
70 Modified Paths:
/intern/cycles/blender/blender_mesh.cpp (+2, -2) (Diff)
/intern/cycles/blender/blender_util.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_action.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_armature.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_brush.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_camera.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_curve.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_group.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_lamp.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_lattice.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_library.h (+6, -0) (Diff)
/source/blender/blenkernel/BKE_mask.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_material.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_mball.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+3, -1) (Diff)
/source/blender/blenkernel/BKE_movieclip.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_object.h (+3, -2) (Diff)
/source/blender/blenkernel/BKE_speaker.h (+3, -1) (Diff)
/source/blender/blenkernel/BKE_text.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_texture.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/action.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/anim_sys.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/armature.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/brush.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/camera.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/curve.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/group.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/image.c (+11, -11) (Diff)
/source/blender/blenkernel/intern/ipo.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lattice.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/library.c (+7, -2) (Diff)
/source/blender/blenkernel/intern/mask.c (+4, -4) (Diff)
/source/blender/blenkernel/intern/material.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/mball.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/mesh.c (+12, -7) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+6, -6) (Diff)
/source/blender/blenkernel/intern/node.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+16, -22) (Diff)
/source/blender/blenkernel/intern/paint.c (+2, -1) (Diff)
/source/blender/blenkernel/intern/speaker.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/text.c (+2, -4) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -2) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -1) (Diff)
/source/blender/editors/animation/keyframing.c (+1, -1) (Diff)
/source/blender/editors/armature/poselib.c (+2, -1) (Diff)
/source/blender/editors/interface/interface_ops.c (+3, -2) (Diff)
/source/blender/editors/mask/mask_ops.c (+3, -1) (Diff)
/source/blender/editors/object/object_add.c (+1, -1) (Diff)
/source/blender/editors/object/object_group.c (+3, -2) (Diff)
/source/blender/editors/physics/rigidbody_constraint.c (+2, -1) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+2, -1) (Diff)
/source/blender/editors/render/render_shading.c (+6, -3) (Diff)
/source/blender/editors/sculpt_paint/paint_ops.c (+3, -2) (Diff)
/source/blender/editors/space_action/action_edit.c (+4, -1) (Diff)
/source/blender/editors/space_clip/clip_ops.c (+2, -1) (Diff)
/source/blender/editors/space_image/image_ops.c (+3, -1) (Diff)
/source/blender/editors/space_node/node_add.c (+3, -1) (Diff)
/source/blender/editors/space_node/node_edit.c (+3, -3) (Diff)
/source/blender/editors/space_node/node_group.c (+1, -1) (Diff)
/source/blender/editors/space_node/node_header.c (+1, -1) (Diff)
/source/blender/editors/space_text/text_ops.c (+4, -2) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+305, -87) (Diff)
/source/blender/makesrna/intern/rna_object_api.c (+1, -190) (Diff)
/source/blender/modifiers/intern/MOD_boolean_util.c (+2, -1) (Diff)
/intern/cycles/blender/blender_util.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_action.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_armature.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_brush.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_camera.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_curve.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_group.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_lamp.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_lattice.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_library.h (+6, -0) (Diff)
/source/blender/blenkernel/BKE_mask.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_material.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_mball.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+3, -1) (Diff)
/source/blender/blenkernel/BKE_movieclip.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_node.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_object.h (+3, -2) (Diff)
/source/blender/blenkernel/BKE_speaker.h (+3, -1) (Diff)
/source/blender/blenkernel/BKE_text.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_texture.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/action.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/anim_sys.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/armature.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/brush.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/camera.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/curve.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/group.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/image.c (+11, -11) (Diff)
/source/blender/blenkernel/intern/ipo.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lattice.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/library.c (+7, -2) (Diff)
/source/blender/blenkernel/intern/mask.c (+4, -4) (Diff)
/source/blender/blenkernel/intern/material.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/mball.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/mesh.c (+12, -7) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+6, -6) (Diff)
/source/blender/blenkernel/intern/node.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+16, -22) (Diff)
/source/blender/blenkernel/intern/paint.c (+2, -1) (Diff)
/source/blender/blenkernel/intern/speaker.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/text.c (+2, -4) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -2) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -1) (Diff)
/source/blender/editors/animation/keyframing.c (+1, -1) (Diff)
/source/blender/editors/armature/poselib.c (+2, -1) (Diff)
/source/blender/editors/interface/interface_ops.c (+3, -2) (Diff)
/source/blender/editors/mask/mask_ops.c (+3, -1) (Diff)
/source/blender/editors/object/object_add.c (+1, -1) (Diff)
/source/blender/editors/object/object_group.c (+3, -2) (Diff)
/source/blender/editors/physics/rigidbody_constraint.c (+2, -1) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+2, -1) (Diff)
/source/blender/editors/render/render_shading.c (+6, -3) (Diff)
/source/blender/editors/sculpt_paint/paint_ops.c (+3, -2) (Diff)
/source/blender/editors/space_action/action_edit.c (+4, -1) (Diff)
/source/blender/editors/space_clip/clip_ops.c (+2, -1) (Diff)
/source/blender/editors/space_image/image_ops.c (+3, -1) (Diff)
/source/blender/editors/space_node/node_add.c (+3, -1) (Diff)
/source/blender/editors/space_node/node_edit.c (+3, -3) (Diff)
/source/blender/editors/space_node/node_group.c (+1, -1) (Diff)
/source/blender/editors/space_node/node_header.c (+1, -1) (Diff)
/source/blender/editors/space_text/text_ops.c (+4, -2) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+305, -87) (Diff)
/source/blender/makesrna/intern/rna_object_api.c (+1, -190) (Diff)
/source/blender/modifiers/intern/MOD_boolean_util.c (+2, -1) (Diff)