[Bf-blender-cvs] [bd239c7] custom-manipulators: Rebase wiggly-widgets branch onto blender2.8 branch
Commit: bd239c7661395f2043cf4a5c1225470ee3c8352d Author: Julian Eisel Date: Fri Sep 23 02:31:23 2016 +0200 Branches: custom-manipulators https://developer.blender.org/rBbd239c7661395f2043cf4a5c1225470ee3c8352d Rebase wiggly-widgets branch onto blender2.8 branch This commit adds a new 'custom-manipulators' branch in which changes of the wiggly-widgets branch are applied onto the blender2.8 branch. I've done it so I can start porting manipulator drawing code to use the new abstractions for OpenGL 3.2 core profile. At some point I had to do it anyway - better earlier than later to reduce loss of git history. >From now on this is the main branch for the custom manipulators project, I'll >delete the wiggly-widgets branch in a bit (but keep it available at >https://github.com/julianeisel/blender/tree/wiggly-widgets). It's still >possible to merge some manipulators for pre-2.8 by rewriting the drawing of >those to use OpenGL <= 2.1 (or copy & pasting from earlier state). === A release/datafiles/widget_export.py M release/scripts/modules/bpy_extras/keyconfig_utils.py M release/scripts/modules/rna_keymap_ui.py M release/scripts/startup/bl_ui/properties_data_bone.py M release/scripts/startup/bl_ui/properties_data_mesh.py M release/scripts/startup/bl_ui/properties_data_modifier.py M release/scripts/startup/bl_ui/properties_object.py M release/scripts/startup/bl_ui/space_node.py M release/scripts/startup/bl_ui/space_sequencer.py M release/scripts/startup/bl_ui/space_userpref.py M source/blender/CMakeLists.txt M source/blender/blenkernel/BKE_DerivedMesh.h M source/blender/blenkernel/BKE_blender_version.h A source/blender/blenkernel/BKE_facemap.h M source/blender/blenkernel/BKE_screen.h M source/blender/blenkernel/CMakeLists.txt M source/blender/blenkernel/intern/action.c M source/blender/blenkernel/intern/armature.c M source/blender/blenkernel/intern/camera.c M source/blender/blenkernel/intern/cdderivedmesh.c M source/blender/blenkernel/intern/customdata.c A source/blender/blenkernel/intern/facemap.c M source/blender/blenkernel/intern/library_query.c M source/blender/blenkernel/intern/object.c M source/blender/blenkernel/intern/screen.c M source/blender/blenkernel/intern/subsurf_ccg.c M source/blender/blenlib/BLI_math_vector.h M source/blender/blenlib/intern/math_vector.c M source/blender/blenloader/intern/readfile.c M source/blender/blenloader/intern/versioning_260.c M source/blender/blenloader/intern/versioning_270.c M source/blender/blenloader/intern/writefile.c M source/blender/editors/armature/pose_select.c M source/blender/editors/armature/pose_utils.c M source/blender/editors/include/BIF_glutil.h M source/blender/editors/include/ED_armature.h M source/blender/editors/include/ED_mesh.h M source/blender/editors/include/ED_screen.h M source/blender/editors/include/ED_transform.h M source/blender/editors/include/ED_uvedit.h M source/blender/editors/include/ED_view3d.h M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/interface_draw.c M source/blender/editors/interface/interface_intern.h M source/blender/editors/interface/resources.c M source/blender/editors/object/CMakeLists.txt M source/blender/editors/object/object_edit.c A source/blender/editors/object/object_fmap.c M source/blender/editors/object/object_intern.h M source/blender/editors/object/object_ops.c M source/blender/editors/object/object_shapekey.c M source/blender/editors/render/render_internal.c M source/blender/editors/screen/area.c M source/blender/editors/screen/glutil.c M source/blender/editors/screen/screen_edit.c M source/blender/editors/space_api/spacetypes.c M source/blender/editors/space_clip/clip_draw.c M source/blender/editors/space_graph/graph_buttons.c M source/blender/editors/space_graph/graph_edit.c M source/blender/editors/space_graph/graph_intern.h M source/blender/editors/space_graph/graph_ops.c M source/blender/editors/space_graph/space_graph.c M source/blender/editors/space_image/image_draw.c M source/blender/editors/space_image/space_image.c M source/blender/editors/space_node/CMakeLists.txt M source/blender/editors/space_node/drawnode.c M source/blender/editors/space_node/node_draw.c M source/blender/editors/space_node/node_edit.c M source/blender/editors/space_node/node_intern.h M source/blender/editors/space_node/node_view.c A source/blender/editors/space_node/node_widgets.c M source/blender/editors/space_node/space_node.c M source/blender/editors/space_sequencer/sequencer_draw.c M
[Bf-blender-cvs] [1dfb89d] blender2.8: Merge branch 'master' into blender2.8
Commit: 1dfb89d229304c302b8849756aa0ddd7e8d96488 Author: Julian Eisel Date: Fri Sep 23 01:40:19 2016 +0200 Branches: blender2.8 https://developer.blender.org/rB1dfb89d229304c302b8849756aa0ddd7e8d96488 Merge branch 'master' into blender2.8 Conflicts: intern/ghost/intern/GHOST_ContextCGL.mm intern/ghost/intern/GHOST_WindowCocoa.mm source/blender/makesrna/intern/rna_main.c === === diff --cc intern/cycles/blender/blender_sync.cpp index be395b9,4ca202a..e77cc12 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@@ -143,6 -124,34 +123,28 @@@ bool BlenderSync::sync_recalc( } } + BL::BlendData::objects_iterator b_ob; + + for(b_data.objects.begin(b_ob); b_ob != b_data.objects.end(); ++b_ob) { + if(b_ob->is_updated()) { + object_map.set_recalc(*b_ob); + light_map.set_recalc(*b_ob); + } + + if(object_is_mesh(*b_ob)) { + if(b_ob->is_updated_data() || b_ob->data().is_updated() || + (dicing_prop_changed && object_subdivision_type(*b_ob, preview, experimental) != Mesh::SUBDIVISION_NONE)) + { + BL::ID key = BKE_object_is_modified(*b_ob)? *b_ob: b_ob->data(); + mesh_map.set_recalc(key); + } + } + else if(object_is_light(*b_ob)) { + if(b_ob->is_updated_data() || b_ob->data().is_updated()) + light_map.set_recalc(*b_ob); + } - - if(b_ob->is_updated_data()) { - BL::Object::particle_systems_iterator b_psys; - for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys) - particle_system_map.set_recalc(*b_ob); - } + } + BL::BlendData::meshes_iterator b_mesh; for(b_data.meshes.begin(b_mesh); b_mesh != b_data.meshes.end(); ++b_mesh) { diff --cc intern/ghost/intern/GHOST_ContextCGL.h index c2f1ce1,dd49b81..8186eaa --- a/intern/ghost/intern/GHOST_ContextCGL.h +++ b/intern/ghost/intern/GHOST_ContextCGL.h @@@ -134,10 -134,10 +134,12 @@@ private /** The OpenGL drawing context */ NSOpenGLContext *m_openGLContext; + bool m_coreProfile; + //static CGLEWContext *s_cglewContext; + const bool m_debug; + /** The first created OpenGL context (for sharing display lists) */ static NSOpenGLContext *s_sharedOpenGLContext; static int s_sharedCount; diff --cc intern/ghost/intern/GHOST_ContextCGL.mm index 6a39d76,03c45f9..1ab0301 --- a/intern/ghost/intern/GHOST_ContextCGL.mm +++ b/intern/ghost/intern/GHOST_ContextCGL.mm @@@ -59,26 -59,10 +59,27 @@@ GHOST_ContextCGL::GHOST_ContextCGL int contextResetNotificationStrategy) : GHOST_Context(stereoVisual, numOfAASamples), m_openGLView(openGLView), - m_openGLContext(nil) + m_openGLContext(nil), + m_debug(contextFlags) { assert(openGLView != nil); + + // for now be very strict about OpenGL version requested + switch (contextMajorVersion) { + case 2: + assert(contextMinorVersion == 1); + assert(contextProfileMask == 0); + m_coreProfile = false; + break; + case 3: + // Apple didn't implement 3.0 or 3.1 + assert(contextMinorVersion == 2); + assert(contextProfileMask == GL_CONTEXT_CORE_PROFILE_BIT); + m_coreProfile = true; + break; + default: + assert(false); + } } @@@ -189,12 -173,11 +190,14 @@@ static void makeAttribList bool stereoVisual, int numOfAASamples, bool needAlpha, - bool needStencil) + bool needStencil, + bool softwareGL) { + attribs.clear(); + + attribs.push_back(NSOpenGLPFAOpenGLProfile); + attribs.push_back(coreProfile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy); + // Pixel Format Attributes for the windowed NSOpenGLContext attribs.push_back(NSOpenGLPFADoubleBuffer); @@@ -207,9 -187,11 +207,10 @@@ } else { attribs.push_back(NSOpenGLPFAAccelerated); + attribs.push_back(NSOpenGLPFANoRecovery); } - /* Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway */ - //attribs.push_back(NSOpenGLPFAAllowOfflineRenderers); +
[Bf-blender-cvs] [1b2b7cf] master: Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced
Commit: 1b2b7cfa2007172e07d78324bb941d0160b59c42 Author: Mai Lavelle Date: Thu Sep 22 17:34:14 2016 -0400 Branches: master https://developer.blender.org/rB1b2b7cfa2007172e07d78324bb941d0160b59c42 Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced === M intern/cycles/render/mesh.cpp === diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index 2d297c3..3eff35b 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -601,6 +601,12 @@ void Mesh::add_undisplaced() /* copy verts */ size_t size = attr->buffer_size(this, (subdivision_type == SUBDIVISION_NONE) ? ATTR_PRIM_TRIANGLE : ATTR_PRIM_SUBD); + + /* Center points for ngons aren't stored in Mesh::verts but are included in size since they will be +* calculated later, we subtract them from size here so we don't have an overflow while copying. +*/ + size -= num_ngons * attr->data_sizeof(); + if(size) { memcpy(data, verts.data(), size); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ca1c7a0] master: Fix T49422: Metadata not showing in OpenGL renders
Commit: ca1c7a0cf7a27d513e7f44b8f0e9a967a9dba2d2 Author: Sergey Sharybin Date: Thu Sep 22 09:42:09 2016 +0200 Branches: master https://developer.blender.org/rBca1c7a0cf7a27d513e7f44b8f0e9a967a9dba2d2 Fix T49422: Metadata not showing in OpenGL renders Own regression since recent optimization. === M source/blender/editors/render/render_opengl.c === diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index a154791..db0ffb9 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -373,12 +373,10 @@ static void screen_opengl_render_doit(OGLRender *oglrender, RenderResult *rr) } if (ibuf_result != NULL) { - - RE_render_result_rect_from_ibuf(rr, >r, ibuf_result, oglrender->view_id); - - if ((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW)) + if ((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW)) { BKE_image_stamp_buf(scene, camera, NULL, rect, NULL, rr->rectx, rr->recty, 4); - + } + RE_render_result_rect_from_ibuf(rr, >r, ibuf_result, oglrender->view_id); IMB_freeImBuf(ibuf_result); } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c77da24] master: Fix non-finite normalization factor in certain cases
Commit: c77da24116991e1c6c5911e5bc99aa66178e0e7c Author: Sergey Sharybin Date: Thu Sep 22 10:04:51 2016 +0200 Branches: master https://developer.blender.org/rBc77da24116991e1c6c5911e5bc99aa66178e0e7c Fix non-finite normalization factor in certain cases === M source/blender/editors/animation/anim_draw.c === diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index dbc9c8b..f8b98eb 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -343,12 +343,13 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo } } - range = max_coord - min_coord; - - if (range > FLT_EPSILON) { - factor = 2.0f / range; + if (max_coord > min_coord) { + range = max_coord - min_coord; + if (range > FLT_EPSILON) { + factor = 2.0f / range; + } + offset = -min_coord - range / 2.0f; } - offset = -min_coord - range / 2.0f; } BLI_assert(factor != 0.0f); if (r_offset) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0e7c3df] blender2.8: OpenGL: matrix code from viewport-fx
Commit: 0e7c3dfe75cb16158eb5df0520f32b7b7f0921f0 Author: Mike Erwin Date: Thu Sep 22 12:11:40 2016 +0200 Branches: blender2.8 https://developer.blender.org/rB0e7c3dfe75cb16158eb5df0520f32b7b7f0921f0 OpenGL: matrix code from viewport-fx Bringing over whole files from rB194998766c65 === A source/blender/gpu/GPU_matrix.h A source/blender/gpu/intern/gpu_matrix.c === diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h new file mode 100644 index 000..9d61084 --- /dev/null +++ b/source/blender/gpu/GPU_matrix.h @@ -0,0 +1,106 @@ +#ifndef _GPU_MATRIX_H_ +#define _GPU_MATRIX_H_ + +/* + * * BEGIN GPL LICENSE BLOCK * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2012 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Alexandr Kuznetsov, Jason Wilkins + * + * * END GPL LICENSE BLOCK * + */ + +/** \file source/blender/gpu/GPU_matrix.h + * \ingroup gpu + */ + +#include "GPU_glew.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum eGPUMatrixMode { + GPU_MODELVIEW_MATRIX = 0, + GPU_PROJECTION_MATRIX = 1, + GPU_TEXTURE_MATRIX = 2 +} eGPUMatrixMode; + +void gpuPushMatrix(eGPUMatrixMode stack); +void gpuPopMatrix(eGPUMatrixMode stack); + +void gpuLoadMatrix(eGPUMatrixMode stack, const float m[16]); +void gpuLoadMatrixd(eGPUMatrixMode stack, const double m[16]); +const float *gpuGetMatrix(eGPUMatrixMode stack, float m[16]); +void gpuGetMatrixd(eGPUMatrixMode stack, double m[16]); + +void gpuLoadIdentity(eGPUMatrixMode stack); + +void gpuMultMatrix(eGPUMatrixMode stack, const float m[16]); +void gpuMultMatrixd(eGPUMatrixMode stack, const double m[16]); + +void gpuTranslate(eGPUMatrixMode stack, float x, float y, float z); +void gpuScale(eGPUMatrixMode stack, GLfloat x, GLfloat y, GLfloat z); +void gpuRotateVector(eGPUMatrixMode stack, GLfloat deg, GLfloat vector[3]); +void gpuRotateAxis(eGPUMatrixMode stack, GLfloat deg, char axis); +void gpuRotateRight(eGPUMatrixMode stack, char type); + +void gpuOrtho(eGPUMatrixMode stack, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal); +void gpuFrustum(eGPUMatrixMode stack, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal); + +void gpuLoadOrtho(eGPUMatrixMode stack, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal); +void gpuLoadFrustum(eGPUMatrixMode stack, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearVal, GLfloat farVal); + +void gpuLookAt(eGPUMatrixMode stack, GLfloat eyeX, GLfloat eyeY, GLfloat eyeZ, GLfloat centerX, GLfloat centerY, GLfloat centerZ, GLfloat upX, GLfloat upY, GLfloat upZ); + +void gpuProject(const GLfloat obj[3], const GLfloat model[16], const GLfloat proj[16], const GLint view[4], GLfloat win[3]); +GLboolean gpuUnProject(const GLfloat win[3], const GLfloat model[16], const GLfloat proj[16], const GLint view[4], GLfloat obj[3]); + +void gpu_commit_matrix(void); + +void GPU_feedback_vertex_3fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat out[3]); +void GPU_feedback_vertex_4fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat out[4]); +void GPU_feedback_vertex_4dv(GLenum type, GLdouble x, GLdouble y, GLdouble z, GLdouble w, GLdouble out[4]); + +#if defined(GLEW_ES_ONLY) + +/* ES 2.0 doesn't define these symbolic constants, but the matrix stack replacement library emulates them + * (GL core has deprecated matrix stacks, but it should still be in the header) */ + +#ifndef GL_MODELVIEW_MATRIX +#define GL_MODELVIEW_MATRIX 0x0BA6 +#endif + +#ifndef GL_PROJECTION_MATRIX +#define GL_PROJECTION_MATRIX 0x0BA7 +#endif + +#ifndef GL_TEXTURE_MATRIX +#define GL_TEXTURE_MATRIX 0x0BA8 +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* GPU_MATRIX_H */ diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c new file mode 100644 index 000..29b8c02 --- /dev/null +++ b/source/blender/gpu/intern/gpu_matrix.c @@ -0,0 +1,468 @@ +/* + * *
[Bf-blender-cvs] [1d469f3] blender2.8: OpenGL: remove double precision matrix functions
Commit: 1d469f3780dc9138448a49851a9056c3596a7cf8 Author: Mike Erwin Date: Thu Sep 22 12:19:24 2016 +0200 Branches: blender2.8 https://developer.blender.org/rB1d469f3780dc9138448a49851a9056c3596a7cf8 OpenGL: remove double precision matrix functions Proper fp64 is a GL 4.x feature. Pretending to support it in our API is just clutter. === M source/blender/gpu/GPU_matrix.h M source/blender/gpu/intern/gpu_matrix.c === diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 9d61084..4588e70 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -48,14 +48,11 @@ void gpuPushMatrix(eGPUMatrixMode stack); void gpuPopMatrix(eGPUMatrixMode stack); void gpuLoadMatrix(eGPUMatrixMode stack, const float m[16]); -void gpuLoadMatrixd(eGPUMatrixMode stack, const double m[16]); const float *gpuGetMatrix(eGPUMatrixMode stack, float m[16]); -void gpuGetMatrixd(eGPUMatrixMode stack, double m[16]); void gpuLoadIdentity(eGPUMatrixMode stack); void gpuMultMatrix(eGPUMatrixMode stack, const float m[16]); -void gpuMultMatrixd(eGPUMatrixMode stack, const double m[16]); void gpuTranslate(eGPUMatrixMode stack, float x, float y, float z); void gpuScale(eGPUMatrixMode stack, GLfloat x, GLfloat y, GLfloat z); @@ -78,7 +75,6 @@ void gpu_commit_matrix(void); void GPU_feedback_vertex_3fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat out[3]); void GPU_feedback_vertex_4fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat out[4]); -void GPU_feedback_vertex_4dv(GLenum type, GLdouble x, GLdouble y, GLdouble z, GLdouble w, GLdouble out[4]); #if defined(GLEW_ES_ONLY) diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c index 29b8c02..9a938cc 100644 --- a/source/blender/gpu/intern/gpu_matrix.c +++ b/source/blender/gpu/intern/gpu_matrix.c @@ -220,22 +220,6 @@ void gpuLoadMatrix(eGPUMatrixMode stack, const float *m) CHECKMAT(ms_current); } -void gpuLoadMatrixd(eGPUMatrixMode stack, const double *md) -{ - GPU_matrix_stack *ms_current = mstacks + stack; - float mf[16]; - int i; - - for (i = 0; i < 16; i++) { - mf[i] = md[i]; - } - - copy_m4_m4(ms_current->dynstack[ms_current->pos], (float (*)[4])mf); - - CHECKMAT(ms_current); -} - - const GLfloat *gpuGetMatrix(eGPUMatrixMode stack, GLfloat *m) { GPU_matrix_stack *ms_select = mstacks + stack; @@ -249,20 +233,6 @@ const GLfloat *gpuGetMatrix(eGPUMatrixMode stack, GLfloat *m) } } -void gpuGetMatrixd(eGPUMatrixMode stack, double m[16]) -{ - GPU_matrix_stack *ms_select = mstacks + stack; - - if (m) { - int i; - float *f = ms_select->dynstack[ms_select->pos][0]; - for (i = 0; i < 16; i++) { - m[i] = f[i]; - /* copy_m3_m3d(); should use something like */ - } - } -} - void gpuLoadIdentity(eGPUMatrixMode stack) { GPU_matrix_stack *ms_current = mstacks + stack; @@ -298,18 +268,6 @@ void gpuMultMatrix(eGPUMatrixMode stack, const float *m) CHECKMAT(ms_current); } -void gpuMultMatrixd(eGPUMatrixMode stack, const double *m) -{ - GLfloat mf[16]; - GLint i; - - for (i = 0; i < 16; i++) { - mf[i] = m[i]; - } - - gpuMultMatrix(stack, mf); -} - void gpuRotateVector(eGPUMatrixMode stack, GLfloat deg, GLfloat vector[3]) { GPU_matrix_stack *ms_current = mstacks + stack; @@ -459,10 +417,3 @@ void GPU_feedback_vertex_4fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLflo float in[4] = {x, y, z, w}; mul_v4_m4v4(out, m[0], in); } - -void GPU_feedback_vertex_4dv(GLenum type, GLdouble x, GLdouble y, GLdouble z, GLdouble w, GLdouble out[3]) -{ - GPU_matrix *m = (GPU_matrix*)gpuGetMatrix(type, NULL); - double in[4] = {x, y, z, w}; - mul_v4d_m4v4d(out, m[0], in); -} ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [de311a0] blender-v2.78-release: Blender 2.78: Point locales to the latest branch
Commit: de311a0a1549a479ed6a7910d6eb27046b8b69f6 Author: Sergey Sharybin Date: Thu Sep 22 12:37:35 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBde311a0a1549a479ed6a7910d6eb27046b8b69f6 Blender 2.78: Point locales to the latest branch === M release/datafiles/locale === diff --git a/release/datafiles/locale b/release/datafiles/locale index 86e7330..229b696 16 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit 86e73304d25cffd978212a6ccf30e4c72dc4a778 +Subproject commit 229b696c7ec65f3dc39c96dd8104df268907e15c ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7da7611] blender-v2.78-release: Cycles: Adaptive isolation
Commit: 7da7611c0b9ddea0be5fd9a512523ab46bf257b2 Author: Mai Lavelle Date: Fri Sep 16 18:07:24 2016 -0400 Branches: blender-v2.78-release https://developer.blender.org/rB7da7611c0b9ddea0be5fd9a512523ab46bf257b2 Cycles: Adaptive isolation Idea here is to select the lowest isolation level that wont compromise quality. By using the lowest level we save memory and processing time. This will also help avoid precision issues that have been showing up from using the highest level (T49179, T49257). This is a pretty simple heuristic that gives ok results. There's more we could do here, such as filtering for vertices/edges adjacent geometric features that need isolation instead of checking them all, but the logic there could get a bit involved. There's potential for slight popping of edges during animation if the dice rate is low, but I don't think this should be a problem since low dice rates really shouldn't be used in animation anyways. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D2240 === M intern/cycles/render/mesh_subdivision.cpp === diff --git a/intern/cycles/render/mesh_subdivision.cpp b/intern/cycles/render/mesh_subdivision.cpp index 3b4841f..0ae5ff7 100644 --- a/intern/cycles/render/mesh_subdivision.cpp +++ b/intern/cycles/render/mesh_subdivision.cpp @@ -16,12 +16,14 @@ #include "mesh.h" #include "attribute.h" +#include "camera.h" #include "subd_split.h" #include "subd_patch.h" #include "subd_patch_table.h" #include "util_foreach.h" +#include "util_algorithm.h" CCL_NAMESPACE_BEGIN @@ -177,7 +179,7 @@ public: Far::TopologyRefinerFactory::Options(type, options)); /* adaptive refinement */ - int max_isolation = 10; + int max_isolation = calculate_max_isolation(); refiner->RefineAdaptive(Far::TopologyRefiner::AdaptiveOptions(max_isolation)); /* create patch table */ @@ -248,6 +250,42 @@ public: } } + int calculate_max_isolation() + { + /* loop over all edges to find longest in screen space */ + const Far::TopologyLevel& level = refiner->GetLevel(0); + Transform objecttoworld = mesh->subd_params->objecttoworld; + Camera* cam = mesh->subd_params->camera; + + float longest_edge = 0.0f; + + for(size_t i = 0; i < level.GetNumEdges(); i++) { + Far::ConstIndexArray verts = level.GetEdgeVertices(i); + + float3 a = mesh->verts[verts[0]]; + float3 b = mesh->verts[verts[1]]; + + float edge_len; + + if(cam) { + a = transform_point(, a); + b = transform_point(, b); + + edge_len = len(a - b) / cam->world_to_raster_size((a + b) * 0.5f); + } + else { + edge_len = len(a - b); + } + + longest_edge = max(longest_edge, edge_len); + } + + /* calculate isolation level */ + int isolation = (int)(log2f(max(longest_edge / mesh->subd_params->dicing_rate, 1.0f)) + 1.0f); + + return min(isolation, 10); + } + friend struct OsdPatch; friend class Mesh; }; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5ef46c1] blender-v2.78-release: Cycles: Fix update of subdivision meshes when global dice rates change
Commit: 5ef46c1ef12a6650e4d9b893d9912cc18363721c Author: Mai Lavelle Date: Sun Sep 18 12:04:12 2016 -0400 Branches: blender-v2.78-release https://developer.blender.org/rB5ef46c1ef12a6650e4d9b893d9912cc18363721c Cycles: Fix update of subdivision meshes when global dice rates change When subdivision settings were moved from meshes to objects this was missed, should work fine now. === M intern/cycles/blender/blender_mesh.cpp M intern/cycles/blender/blender_sync.cpp M intern/cycles/blender/blender_util.h === diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index dba6897..ff1d49f 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -959,25 +959,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob, bool need_undeformed = mesh->need_attribute(scene, ATTR_STD_GENERATED); - mesh->subdivision_type = Mesh::SUBDIVISION_NONE; - - PointerRNA cobj = RNA_pointer_get(_ob.ptr, "cycles"); - - if(cobj.data && b_ob.modifiers.length() > 0 && experimental) { - BL::Modifier mod = b_ob.modifiers[b_ob.modifiers.length()-1]; - bool enabled = preview ? mod.show_viewport() : mod.show_render(); - - if(enabled && mod.type() == BL::Modifier::type_SUBSURF && RNA_boolean_get(, "use_adaptive_subdivision")) { - BL::SubsurfModifier subsurf(mod); - - if(subsurf.subdivision_type() == BL::SubsurfModifier::subdivision_type_CATMULL_CLARK) { - mesh->subdivision_type = Mesh::SUBDIVISION_CATMULL_CLARK; - } - else { - mesh->subdivision_type = Mesh::SUBDIVISION_LINEAR; - } - } - } + mesh->subdivision_type = object_subdivision_type(b_ob, preview, experimental); BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed, mesh->subdivision_type); diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index e7e57b2..4ca202a 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -103,6 +103,27 @@ bool BlenderSync::sync_recalc() if(b_lamp->is_updated() || (b_lamp->node_tree() && b_lamp->node_tree().is_updated())) shader_map.set_recalc(*b_lamp); + bool dicing_prop_changed = false; + + if(experimental) { + PointerRNA cscene = RNA_pointer_get(_scene.ptr, "cycles"); + + float updated_dicing_rate = preview ? RNA_float_get(, "preview_dicing_rate") + : RNA_float_get(, "dicing_rate"); + + if(dicing_rate != updated_dicing_rate) { + dicing_rate = updated_dicing_rate; + dicing_prop_changed = true; + } + + int updated_max_subdivisions = RNA_int_get(, "max_subdivisions"); + + if(max_subdivisions != updated_max_subdivisions) { + max_subdivisions = updated_max_subdivisions; + dicing_prop_changed = true; + } + } + BL::BlendData::objects_iterator b_ob; for(b_data.objects.begin(b_ob); b_ob != b_data.objects.end(); ++b_ob) { @@ -112,7 +133,9 @@ bool BlenderSync::sync_recalc() } if(object_is_mesh(*b_ob)) { - if(b_ob->is_updated_data() || b_ob->data().is_updated()) { + if(b_ob->is_updated_data() || b_ob->data().is_updated() || + (dicing_prop_changed && object_subdivision_type(*b_ob, preview, experimental) != Mesh::SUBDIVISION_NONE)) + { BL::ID key = BKE_object_is_modified(*b_ob)? *b_ob: b_ob->data(); mesh_map.set_recalc(key); } @@ -129,42 +152,14 @@ bool BlenderSync::sync_recalc() } } - bool dicing_prop_changed = false; - - if(experimental) { - PointerRNA cscene = RNA_pointer_get(_scene.ptr, "cycles"); - - float updated_dicing_rate = preview ? RNA_float_get(, "preview_dicing_rate") - : RNA_float_get(, "dicing_rate"); - - if(dicing_rate != updated_dicing_rate) { - dicing_rate = updated_dicing_rate; - dicing_prop_changed = true; - } - - int updated_max_subdivisions =
[Bf-blender-cvs] [f3fe4e7] blender-v2.78-release: Cycles: Soft minimum for dice rates
Commit: f3fe4e736ff520295416d49683d4dd16da1f5fde Author: Mai Lavelle Date: Sat Sep 17 20:45:00 2016 -0400 Branches: blender-v2.78-release https://developer.blender.org/rBf3fe4e736ff520295416d49683d4dd16da1f5fde Cycles: Soft minimum for dice rates Use 0.5 as a soft minimum for dice rates to help from setting them too low. Lower values can still be set by typing in the value. === M intern/cycles/blender/addon/properties.py === diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 82a18b3..977d7f7 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -367,14 +367,14 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): cls.dicing_rate = FloatProperty( name="Dicing Rate", description="Size of a micropolygon in pixels", -min=0.1, max=1000.0, +min=0.1, max=1000.0, soft_min=0.5, default=1.0, subtype="PIXEL" ) cls.preview_dicing_rate = FloatProperty( name="Preview Dicing Rate", description="Size of a micropolygon in pixels during preview render", -min=0.1, max=1000.0, +min=0.1, max=1000.0, soft_min=0.5, default=8.0, subtype="PIXEL" ) @@ -1011,7 +1011,7 @@ class CyclesObjectSettings(bpy.types.PropertyGroup): cls.dicing_rate = FloatProperty( name="Dicing Scale", description="Multiplier for scene dicing rate (located in the Geometry Panel)", -min=0.1, max=1000.0, +min=0.1, max=1000.0, soft_min=0.5, default=1.0, ) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [213e9ae] blender-v2.78-release: Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes
Commit: 213e9aeb8c8758de92505212b9817d7bd21fd0dd Author: Joshua Leung Date: Wed Sep 21 17:02:17 2016 +1200 Branches: blender-v2.78-release https://developer.blender.org/rB213e9aeb8c8758de92505212b9817d7bd21fd0dd Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes Reported by @loochmunz. I've also gone through checking for and fixing other places where this was also occurring. To be included in 2.78 === M source/blender/editors/gpencil/gpencil_brush.c M source/blender/editors/gpencil/gpencil_edit.c === diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index fcb2ce0..8576cbc 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -1350,6 +1350,10 @@ static bool gpsculpt_brush_apply_standard(bContext *C, tGP_BrushEditData *gso) CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers) { + bGPDframe *gpf = gpl->actframe; + if (gpf == NULL) + continue; + /* calculate difference matrix if parent object */ if (gpl->parent != NULL) { ED_gpencil_parent_location(gpl, diff_mat); @@ -1358,10 +1362,8 @@ static bool gpsculpt_brush_apply_standard(bContext *C, tGP_BrushEditData *gso) else { parented = false; } - - bGPDframe *gpf = gpl->actframe; - bGPDstroke *gps; - for (gps = gpf->strokes.first; gps; gps = gps->next) { + + for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { /* skip strokes that are invalid for current view */ if (ED_gpencil_stroke_can_use(C, gps) == false) continue; diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 9f700e8..8301879 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1502,6 +1502,9 @@ static int gp_stroke_cyclical_set_exec(bContext *C, wmOperator *op) /* loop all selected strokes */ CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers) { + if (gpl->actframe == NULL) + continue; + for (bGPDstroke *gps = gpl->actframe->strokes.last; gps; gps = gps->prev) { bGPDpalettecolor *palcolor = gps->palcolor; @@ -1722,6 +1725,9 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers) { bGPDframe *gpf = gpl->actframe; + if (gpf == NULL) + continue; + for (gps = gpf->strokes.first; gps; gps = gpsn) { gpsn = gps->next; if (gps->flag & GP_STROKE_SELECT) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d146030] blender-v2.78-release: Blender 2.78: Point addons to an updated branch
Commit: d14603021ce825a579a297312c2cc7031a34ccd4 Author: Sergey Sharybin Date: Thu Sep 22 11:14:48 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBd14603021ce825a579a297312c2cc7031a34ccd4 Blender 2.78: Point addons to an updated branch === M release/scripts/addons === diff --git a/release/scripts/addons b/release/scripts/addons index 535999c..beda28f 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 535999c64040697f554936789b64ef432842e59c +Subproject commit beda28f87f4c65378c7e0cb8447712ce532ac032 ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d63505e] blender-v2.78-release: CMake: Fix copy-paste error
Commit: d63505e42e4b936def907032f9bb8f887b9e6e9c Author: Sergey Sharybin Date: Thu Sep 22 11:01:37 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBd63505e42e4b936def907032f9bb8f887b9e6e9c CMake: Fix copy-paste error === M build_files/cmake/config/blender_release.cmake === diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 8d87a92..050db91 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -1,7 +1,7 @@ # Turn everything ON thats expected for an official release builds. # # Example usage: -# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender +# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender # set(WITH_ALEMBIC ON CACHE BOOL "" FORCE) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c6ab7c3] blender-v2.78-release: [windows] add some helpers to make.bat to facilitate making release builds.
Commit: c6ab7c31a14eb144ca84d6836c9d47b98a519dac Author: lazydodo Date: Wed Sep 14 17:50:16 2016 -0600 Branches: blender-v2.78-release https://developer.blender.org/rBc6ab7c31a14eb144ca84d6836c9d47b98a519dac [windows] add some helpers to make.bat to facilitate making release builds. New features: 1) Release target that checks for both cuda 7.5 and 8 with WITH_CYCLES_CUDA_BINARIES=ON and CYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 options set. 2) Option to switch between x86 and x64 builds, the default remains (auto detect the architecture) but can be overridden. 3) Option to switch between vs12(2013) and vs14(2015) default is 2013. Reviewers: juicyfruit, sergey Reviewed By: sergey Tags: #platform:_windows Differential Revision: https://developer.blender.org/D2180 === A build_files/cmake/config/blender_release.cmake M make.bat === diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake new file mode 100644 index 000..82ff315 --- /dev/null +++ b/build_files/cmake/config/blender_release.cmake @@ -0,0 +1,78 @@ +# Turn everything ON thats expected for an official release builds. +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender +# + +set(WITH_ALEMBIC ON CACHE BOOL "" FORCE) +set(WITH_BUILDINFO ON CACHE BOOL "" FORCE) +set(WITH_BULLET ON CACHE BOOL "" FORCE) +set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE) +set(WITH_CODEC_FFMPEGON CACHE BOOL "" FORCE) +set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) +set(WITH_CYCLES ON CACHE BOOL "" FORCE) +set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) +set(WITH_FFTW3 ON CACHE BOOL "" FORCE) +set(WITH_LIBMV ON CACHE BOOL "" FORCE) +set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE) +set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE) +set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE) +set(WITH_FREESTYLE ON CACHE BOOL "" FORCE) +set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE) +set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE) +set(WITH_IK_ITASCON CACHE BOOL "" FORCE) +set(WITH_IMAGE_CINEONON CACHE BOOL "" FORCE) +set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE) +set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) +set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) +set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) +set(WITH_JACKON CACHE BOOL "" FORCE) +set(WITH_LZMAON CACHE BOOL "" FORCE) +set(WITH_LZO ON CACHE BOOL "" FORCE) +set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE) +set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE) +set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE) +set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE) +set(WITH_MOD_OCEANSIMON CACHE BOOL "" FORCE) +set(WITH_AUDASPACE ON CACHE BOOL "" FORCE) +set(WITH_OPENAL ON CACHE BOOL "" FORCE) +set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE) +set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE) +set(WITH_OPENMP ON CACHE BOOL "" FORCE) +set(WITH_OPENVDB ON CACHE BOOL "" FORCE) +set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE) +set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE) +set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE) +set(WITH_SDL ON CACHE BOOL "" FORCE) +set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE) +set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE) + +set(WITH_PLAYER ON CACHE BOOL "" FORCE) +set(WITH_MEM_JEMALLOCON CACHE BOOL "" FORCE) +set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) +set(CYCLES_CUDA_BINARIES_ARCH sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 CACHE STRING "" FORCE) + +# platform dependent options +if(UNIX AND NOT APPLE) + set(WITH_JACKON CACHE BOOL "" FORCE) + set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE) + set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) +elseif(WIN32) + set(WITH_JACKOFF CACHE BOOL "" FORCE) + if(NOT CMAKE_COMPILER_IS_GNUCC) + set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE) + else() + # MinGW exceptions + set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE) + set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE) + set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE) + endif() +elseif(APPLE) +
[Bf-blender-cvs] [9836940] blender-v2.78-release: Bring blender_release.cmake uptodate with the changes from D2227
Commit: 9836940d4d1208bbe1ff70b5d6aec2f00a153872 Author: lazydodo Date: Thu Sep 15 06:34:57 2016 -0600 Branches: blender-v2.78-release https://developer.blender.org/rB9836940d4d1208bbe1ff70b5d6aec2f00a153872 Bring blender_release.cmake uptodate with the changes from D2227 === M build_files/cmake/config/blender_release.cmake === diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 82ff315..8d87a92 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -12,6 +12,7 @@ set(WITH_CODEC_FFMPEGON CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) set(WITH_CYCLES ON CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) +set(WITH_CYCLES_OPENSUBDIV ON CACHE BOOL "" FORCE) set(WITH_FFTW3 ON CACHE BOOL "" FORCE) set(WITH_LIBMV ON CACHE BOOL "" FORCE) set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bca6aa4] blender-v2.78-release: Blender 2.78: Move to release cycle
Commit: bca6aa47bc0045735406ab957f1e413145697c18 Author: Sergey Sharybin Date: Thu Sep 22 11:13:58 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBbca6aa47bc0045735406ab957f1e413145697c18 Blender 2.78: Move to release cycle === M source/blender/blenkernel/BKE_blender_version.h === diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 189340d..eae83c8 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -37,7 +37,7 @@ /* can be left blank, otherwise a,b,c... etc with no quotes */ #define BLENDER_VERSION_CHAR /* alpha/beta/rc/release, docs use this */ -#define BLENDER_VERSION_CYCLE rc +#define BLENDER_VERSION_CYCLE release extern char versionstr[]; /* from blender.c */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [22b3990] blender-v2.78-release: Fix non-finite normalization factor in certain cases
Commit: 22b39901e39e0a0af804c5a574e016b9ba93f917 Author: Sergey Sharybin Date: Thu Sep 22 10:04:51 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB22b39901e39e0a0af804c5a574e016b9ba93f917 Fix non-finite normalization factor in certain cases === M source/blender/editors/animation/anim_draw.c === diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index dbc9c8b..f8b98eb 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -343,12 +343,13 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo } } - range = max_coord - min_coord; - - if (range > FLT_EPSILON) { - factor = 2.0f / range; + if (max_coord > min_coord) { + range = max_coord - min_coord; + if (range > FLT_EPSILON) { + factor = 2.0f / range; + } + offset = -min_coord - range / 2.0f; } - offset = -min_coord - range / 2.0f; } BLI_assert(factor != 0.0f); if (r_offset) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f915ee8] master: CMake: Fix copy-paste error
Commit: f915ee8e76aded1cfd790f04743e7b04ee48b8b6 Author: Sergey Sharybin Date: Thu Sep 22 11:01:37 2016 +0200 Branches: master https://developer.blender.org/rBf915ee8e76aded1cfd790f04743e7b04ee48b8b6 CMake: Fix copy-paste error === M build_files/cmake/config/blender_release.cmake === diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 8d87a92..050db91 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -1,7 +1,7 @@ # Turn everything ON thats expected for an official release builds. # # Example usage: -# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender +# cmake -C../blender/build_files/cmake/config/blender_release.cmake ../blender # set(WITH_ALEMBIC ON CACHE BOOL "" FORCE) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [83bbf57] blender-v2.78-release: regression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones should always be set to the length of the smallest bone. since t
Commit: 83bbf57b5b734682b40c9f219a914d0424941be9 Author: Gaia Clary Date: Tue Sep 20 17:32:44 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB83bbf57b5b734682b40c9f219a914d0424941be9 regression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones should always be set to the length of the smallest bone. since the mentioned commit the importer did only recalculate the leaf bone length when the 'fix leaf bones' option was also enabled. === M source/blender/collada/ArmatureImporter.cpp M source/blender/collada/ArmatureImporter.h === diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 1bc2bff..d97fb55 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -221,7 +221,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBon * tail locations for the affected bones (nodes which don't have any connected child) * Hint: The extended_bones set gets populated in ArmatureImporter::create_bone **/ -void ArmatureImporter::fix_leaf_bones(bArmature *armature, Bone *bone) +void ArmatureImporter::fix_leaf_bones(bArmature *armature, Bone *bone, bool fix_orientation) { if (bone == NULL) return; @@ -237,7 +237,7 @@ void ArmatureImporter::fix_leaf_bones(bArmature *armature, Bone *bone) EditBone *ebone = bc_get_edit_bone(armature, bone->name); float vec[3]; - if (ebone->parent != NULL) { + if (ebone->parent != NULL && fix_orientation) { EditBone *parent = ebone->parent; sub_v3_v3v3(vec, ebone->head, parent->head); if (len_squared_v3(vec) < MINIMUM_BONE_LENGTH) @@ -257,7 +257,7 @@ void ArmatureImporter::fix_leaf_bones(bArmature *armature, Bone *bone) } for (Bone *child = (Bone *)bone->childbase.first; child; child = child->next) { - fix_leaf_bones(armature, child); + fix_leaf_bones(armature, child, fix_orientation); } } @@ -756,17 +756,10 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector /* and step back to edit mode to fix the leaf nodes */ ED_armature_to_edit(armature); - if (this->import_settings->fix_orientation || this->import_settings->find_chains) { + if (this->import_settings->find_chains) + connect_bone_chains(armature, (Bone *)armature->bonebase.first, UNLIMITED_CHAIN_MAX); - if (this->import_settings->find_chains) - connect_bone_chains(armature, (Bone *)armature->bonebase.first, UNLIMITED_CHAIN_MAX); - - if (this->import_settings->fix_orientation) - fix_leaf_bones(armature, (Bone *)armature->bonebase.first); - - // exit armature edit mode - - } + fix_leaf_bones(armature, (Bone *)armature->bonebase.first, this->import_settings->fix_orientation); fix_parent_connect(armature, (Bone *)armature->bonebase.first); diff --git a/source/blender/collada/ArmatureImporter.h b/source/blender/collada/ArmatureImporter.h index e006ccb..524c524 100644 --- a/source/blender/collada/ArmatureImporter.h +++ b/source/blender/collada/ArmatureImporter.h @@ -111,7 +111,7 @@ private: BoneExtended _bone_extended(EditBone *bone, COLLADAFW::Node * node, int sibcount, std::vector _labels); void clear_extended_boneset(); - void fix_leaf_bones(bArmature *armature, Bone *bone); + void fix_leaf_bones(bArmature *armature, Bone *bone, bool fix_orientation); void fix_parent_connect(bArmature *armature, Bone *bone); void connect_bone_chains(bArmature *armature, Bone *bone, const int max_chain_length); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fb85484] blender-v2.78-release: Fix memory leak in copy pose operator
Commit: fb85484e6c4f0dc5458bd537298248ba9ba4d1bf Author: Sergey Sharybin Date: Wed Sep 14 15:56:23 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBfb85484e6c4f0dc5458bd537298248ba9ba4d1bf Fix memory leak in copy pose operator === M source/blender/editors/armature/pose_transform.c === diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index df906a3..ddf35d7 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -265,6 +265,7 @@ void ED_clipboard_posebuf_free(void) /* was copied without constraints */ BLI_freelistN(_posebuf->chanbase); + BKE_pose_channels_hash_free(g_posebuf); MEM_freeN(g_posebuf); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9d976a4] blender-v2.78-release: GPencil D+W Pie: Don't show editing operators when not in editmode
Commit: 9d976a4f7adfd6b50ca68630f02d69b78762dede Author: Joshua Leung Date: Wed Sep 21 15:06:39 2016 +1200 Branches: blender-v2.78-release https://developer.blender.org/rB9d976a4f7adfd6b50ca68630f02d69b78762dede GPencil D+W Pie: Don't show editing operators when not in editmode These operators only operate on the selected strokes, but when not in editmode, stroke vertices are not shown. Safe for 2.78 === M release/scripts/startup/bl_ui/properties_grease_pencil_common.py === diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index e42f726..318ba64 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -473,11 +473,13 @@ class GPENCIL_PIE_settings_palette(Menu): layout = self.layout pie = layout.menu_pie() -# gpd = context.gpencil_data +gpd = context.gpencil_data gpl = context.active_gpencil_layer palcolor = context.active_gpencil_palettecolor brush = context.active_gpencil_brush +is_editmode = bool(gpd and gpd.use_stroke_edit_mode and context.editable_gpencil_strokes) + # W - Stroke draw settings col = pie.column(align=True) if palcolor is not None: @@ -510,32 +512,33 @@ class GPENCIL_PIE_settings_palette(Menu): row.prop(gpl, "hide") col.prop(gpl, "use_onion_skinning") -# NW - Move stroke Down -col = pie.column(align=True) -col.label("Arrange Strokes") -col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM' -col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN' - -# NE - Move stroke Up -col = pie.column(align=True) -col.label("Arrange Strokes") -col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP' -col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP' - -# SW - Move stroke to color -col = pie.column(align=True) -col.operator("gpencil.stroke_change_color", text="Move to Color") +# NW/NE/SW/SE - These operators are only available in editmode +# as they require strokes to be selected to work +if is_editmode: +# NW - Move stroke Down +col = pie.column(align=True) +col.label("Arrange Strokes") +col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM' +col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN' + +# NE - Move stroke Up +col = pie.column(align=True) +col.label("Arrange Strokes") +col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP' +col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP' + +# SW - Move stroke to color +col = pie.column(align=True) +col.operator("gpencil.stroke_change_color", text="Move to Color") + +# SE - Join strokes +col = pie.column(align=True) +col.label("Join Strokes") +row = col.row() +row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' +row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' +col.operator("gpencil.stroke_flip", text="Flip direction") -# SE - Join strokes -col = pie.column(align=True) -col.label("Join Strokes") -row = col.row() -row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' -row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' -col.operator("gpencil.stroke_flip", text="Flip direction") - -gpd = context.gpencil_data -if gpd: col.prop(gpd, "show_stroke_direction", text="Show drawing direction") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0a97e63] blender-v2.78-release: Fix T49375: align rotation with snap target isn't toggleable in edit mode.
Commit: 0a97e632462c8d81e7cba3bc588f6ec029fa515c Author: Bastien Montagne Date: Mon Sep 19 15:49:43 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB0a97e632462c8d81e7cba3bc588f6ec029fa515c Fix T49375: align rotation with snap target isn't toggleable in edit mode. Based on D2237, but fixed patch always hiding 'snap on self' button... Should be safe for 2.78. === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index b9cb7f2..6e535ce 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -106,10 +106,10 @@ class VIEW3D_HT_header(Header): else: row.prop(toolsettings, "snap_target", text="") if obj: -if mode in {'OBJECT', 'POSE'} and snap_element != 'VOLUME': -row.prop(toolsettings, "use_snap_align_rotation", text="") -elif mode == 'EDIT': +if mode == 'EDIT': row.prop(toolsettings, "use_snap_self", text="") +if mode in {'OBJECT', 'POSE', 'EDIT'} and snap_element != 'VOLUME': +row.prop(toolsettings, "use_snap_align_rotation", text="") if snap_element == 'VOLUME': row.prop(toolsettings, "use_snap_peel_object", text="") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0960d52] blender-v2.78-release: Fix T49179: Parts of mesh disappear with adaptive subdivision
Commit: 0960d523a261b53aa6e842f2e3320c7a4afa381b Author: Mai Lavelle Date: Wed Sep 14 19:34:43 2016 -0400 Branches: blender-v2.78-release https://developer.blender.org/rB0960d523a261b53aa6e842f2e3320c7a4afa381b Fix T49179: Parts of mesh disappear with adaptive subdivision Problem was zero length normal caused by a precision issue in patch evaluation. This is somewhat of a quick fix, but is better than allowing possible NaNs to occur and cause problems elsewhere. === M intern/cycles/render/mesh_subdivision.cpp === diff --git a/intern/cycles/render/mesh_subdivision.cpp b/intern/cycles/render/mesh_subdivision.cpp index c8cc3ab..3b4841f 100644 --- a/intern/cycles/render/mesh_subdivision.cpp +++ b/intern/cycles/render/mesh_subdivision.cpp @@ -284,7 +284,12 @@ struct OsdPatch : Patch { if(dPdu) *dPdu = du; if(dPdv) *dPdv = dv; - if(N) *N = normalize(cross(du, dv)); + if(N) { + *N = cross(du, dv); + + float t = len(*N); + *N = (t != 0.0f) ? *N/t : make_float3(0.0f, 0.0f, 1.0f); + } } BoundBox bound() { return BoundBox::empty; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1782263] blender-v2.78-release: CacheFile: make sure SpinLock is destroyed when exiting Blender.
Commit: 1782263ef85014ab4bae6f0893f8d5f44412f651 Author: Kévin Dietrich Date: Mon Sep 19 09:02:31 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB1782263ef85014ab4bae6f0893f8d5f44412f651 CacheFile: make sure SpinLock is destroyed when exiting Blender. Missed in rB62b1cdd6. === M source/blender/blenkernel/BKE_cachefile.h M source/blender/blenkernel/intern/blender.c M source/blender/blenkernel/intern/cachefile.c === diff --git a/source/blender/blenkernel/BKE_cachefile.h b/source/blender/blenkernel/BKE_cachefile.h index 7a9744e..b30143c 100644 --- a/source/blender/blenkernel/BKE_cachefile.h +++ b/source/blender/blenkernel/BKE_cachefile.h @@ -39,6 +39,7 @@ struct Main; struct Scene; void BKE_cachefiles_init(void); +void BKE_cachefiles_exit(void); void *BKE_cachefile_add(struct Main *bmain, const char *name); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 0805335..a867039 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -49,6 +49,7 @@ #include "BKE_blender_version.h" /* own include */ #include "BKE_blendfile.h" #include "BKE_brush.h" +#include "BKE_cachefile.h" #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" @@ -84,6 +85,7 @@ void BKE_blender_free(void) BKE_spacetypes_free(); /* after free main, it uses space callbacks */ IMB_exit(); + BKE_cachefiles_exit(); BKE_images_exit(); DAG_exit(); diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index 502f1d5..e62e652 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -56,6 +56,11 @@ void BKE_cachefiles_init(void) BLI_spin_init(); } +void BKE_cachefiles_exit(void) +{ + BLI_spin_end(); +} + void *BKE_cachefile_add(Main *bmain, const char *name) { CacheFile *cache_file = BKE_libblock_alloc(bmain, ID_CF, name); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [91966ee] blender-v2.78-release: fix Mac build with Xcode 8
Commit: 91966eeefa58cbc158cacc70d31db958cdc4d694 Author: Mike Erwin Date: Wed Sep 14 16:23:48 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB91966eeefa58cbc158cacc70d31db958cdc4d694 fix Mac build with Xcode 8 Small issues in GHOST - use NSApplicationDelegate protocol for our app delegate - make sure NSApp is initialized before using (cherry picked from commit df7be04ca6d4b6dccc998445386228699d72d072) === M intern/ghost/intern/GHOST_SystemCocoa.mm === diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 4b8cb53..b0d5ab3 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -285,7 +285,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) * CocoaAppDelegate * ObjC object to capture applicationShouldTerminate, and send quit event **/ -@interface CocoaAppDelegate : NSObject { +@interface CocoaAppDelegate : NSObject { GHOST_SystemCocoa *systemCocoa; } - (void)setSystemCocoa:(GHOST_SystemCocoa *)sysCocoa; @@ -412,65 +412,64 @@ GHOST_TSuccess GHOST_SystemCocoa::init() }*/ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - if (NSApp == nil) { - [NSApplication sharedApplication]; + [NSApplication sharedApplication]; // initializes NSApp + + if ([NSApp mainMenu] == nil) { + NSMenu *mainMenubar = [[NSMenu alloc] init]; + NSMenuItem *menuItem; + NSMenu *windowMenu; + NSMenu *appMenu; - if ([NSApp mainMenu] == nil) { - NSMenu *mainMenubar = [[NSMenu alloc] init]; - NSMenuItem *menuItem; - NSMenu *windowMenu; - NSMenu *appMenu; - - //Create the application menu - appMenu = [[NSMenu alloc] initWithTitle:@"Blender"]; - - [appMenu addItemWithTitle:@"About Blender" action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; - [appMenu addItem:[NSMenuItem separatorItem]]; - - menuItem = [appMenu addItemWithTitle:@"Hide Blender" action:@selector(hide:) keyEquivalent:@"h"]; - [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; - - menuItem = [appMenu addItemWithTitle:@"Hide others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; - [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask | NSCommandKeyMask)]; - - [appMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; - - menuItem = [appMenu addItemWithTitle:@"Quit Blender" action:@selector(terminate:) keyEquivalent:@"q"]; - [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; - - menuItem = [[NSMenuItem alloc] init]; - [menuItem setSubmenu:appMenu]; - - [mainMenubar addItem:menuItem]; - [menuItem release]; - [NSApp performSelector:@selector(setAppleMenu:) withObject:appMenu]; //Needed for 10.5 - [appMenu release]; - - //Create the window menu - windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; - - menuItem = [windowMenu addItemWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; - [menuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; - - [windowMenu addItemWithTitle:@"Zoom" action:@selector(performZoom:) keyEquivalent:@""]; - - menuItem = [windowMenu addItemWithTitle:@"Enter Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f" ]; - [menuItem setKeyEquivalentModifierMask:NSControlKeyMask | NSCommandKeyMask]; + //Create the application menu +
[Bf-blender-cvs] [0247547] blender-v2.78-release: Lowercase includes for psapi.h and dbghelp.h windows includes. This makes cross compilation a little less painful
Commit: 0247547b6b535a4db8b155658ebfee3971b3fdc9 Author: Martijn Berger Date: Mon Sep 19 14:20:37 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB0247547b6b535a4db8b155658ebfee3971b3fdc9 Lowercase includes for psapi.h and dbghelp.h windows includes. This makes cross compilation a little less painful === M intern/ghost/intern/GHOST_SystemWin32.cpp M source/blender/blenlib/intern/system.c === diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index f884b0f..60e7815 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include "utfconv.h" diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c index 898075e..863622f 100644 --- a/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c @@ -35,7 +35,7 @@ # include #elif defined(WIN32) # include -# include +# include #endif int BLI_cpu_support_sse2(void) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8e6aaa0] blender-v2.78-release: Fix T49384: crash in tangent space calculation with NaN mesh vertices.
Commit: 8e6aaa08c201b1b3d4ce1d0f54f91f483d663ca9 Author: Brecht Van Lommel Date: Sun Sep 18 13:06:15 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB8e6aaa08c201b1b3d4ce1d0f54f91f483d663ca9 Fix T49384: crash in tangent space calculation with NaN mesh vertices. === M intern/mikktspace/mikktspace.c === diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c index 7e5861e..8d51816 100644 --- a/intern/mikktspace/mikktspace.c +++ b/intern/mikktspace/mikktspace.c @@ -579,11 +579,10 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons { // make bbox int c=0, l=0, channel=0; - float fvMin[3], fvMax[3]; + float fvMin[3] = {INFINITY, INFINITY, INFINITY}; + float fvMax[3] = {-INFINITY, -INFINITY, -INFINITY}; float dx=0, dy=0, dz=0, fSep=0; - for (c=0; c<3; c++) - { fvMin[c]=pTmpVert[iL_in].vert[c]; fvMax[c]=fvMin[c];} - for (l=(iL_in+1); l<=iR_in; l++) + for (l=iL_in; l<=iR_in; l++) for (c=0; c<3; c++) if (fvMin[c]>pTmpVert[l].vert[c]) fvMin[c]=pTmpVert[l].vert[c]; else if (fvMax[c]=fvMax[channel] || fSep<=fvMin[channel]) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ea7d500] blender-v2.78-release: Fix T49386: Blender crashes when told to load an OCIO LUT that does not exist
Commit: ea7d500b6d4f290ab0892e966b56de6db7f9f3ca Author: Sergey Sharybin Date: Tue Sep 20 10:48:25 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBea7d500b6d4f290ab0892e966b56de6db7f9f3ca Fix T49386: Blender crashes when told to load an OCIO LUT that does not exist === M source/blender/imbuf/intern/colormanagement.c === diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 4181287..0134854 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -3268,6 +3268,13 @@ bool IMB_colormanagement_setup_glsl_draw_from_space(const ColorManagedViewSettin update_glsl_display_processor(applied_view_settings, display_settings, from_colorspace ? from_colorspace->name : global_role_scene_linear); + if (global_glsl_state.processor == NULL) { + /* Happens when requesting non-existing color space or LUT in the +* configuration file does not exist. +*/ + return false; + } + return OCIO_setupGLSLDraw(_glsl_state.ocio_glsl_state, global_glsl_state.processor, global_glsl_state.use_curve_mapping ? _glsl_state.curve_mapping_settings : NULL, dither, predivide); @@ -3304,5 +3311,7 @@ bool IMB_colormanagement_setup_glsl_draw_ctx(const bContext *C, float dither, bo /* Finish GLSL-based display space conversion */ void IMB_colormanagement_finish_glsl_draw(void) { - OCIO_finishGLSLDraw(global_glsl_state.ocio_glsl_state); + if (global_glsl_state.ocio_glsl_state != NULL) { + OCIO_finishGLSLDraw(global_glsl_state.ocio_glsl_state); + } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c8c8293] blender-v2.78-release: Cycles: Fix typo that would sometimes result in subsurf modifier being disabled
Commit: c8c829360b704cc87e5f406120c1981351501fd2 Author: Mai Lavelle Date: Sun Sep 18 22:11:07 2016 -0400 Branches: blender-v2.78-release https://developer.blender.org/rBc8c829360b704cc87e5f406120c1981351501fd2 Cycles: Fix typo that would sometimes result in subsurf modifier being disabled === M intern/cycles/blender/blender_util.h === diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index e79f2bb..5a88e4b 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -55,11 +55,10 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data, BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1]; subsurf_mod_show_render = subsurf_mod.show_render(); - subsurf_mod_show_viewport = subsurf_mod.show_render(); + subsurf_mod_show_viewport = subsurf_mod.show_viewport(); subsurf_mod.show_render(false); subsurf_mod.show_viewport(false); - } BL::Mesh me = data.meshes.new_from_object(scene, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8909ff0] blender-v2.78-release: Fix filebrowser not getting back to valid dir in Release builds.
Commit: 8909ff0e6701ce31ed1431e96cf18f6966113241 Author: Bastien Montagne Date: Thu Sep 15 12:12:19 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB8909ff0e6701ce31ed1431e96cf18f6966113241 Fix filebrowser not getting back to valid dir in Release builds. Stupid mistake wrapping path validation code inside a BLI_assert, which means it was only called in Debug builds... Found by Sergey, thanks. Should be backported to 2.78. === M source/blender/editors/space_file/filelist.c === diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 1471932..ab95a77 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1405,7 +1405,9 @@ void filelist_setdir(struct FileList *filelist, char *r_dir) BLI_assert(strlen(r_dir) < FILE_MAX_LIBEXTRA); BLI_cleanup_dir(G.main->name, r_dir); - BLI_assert(filelist->checkdirf(filelist, r_dir, true)); + const bool is_valid_path = filelist->checkdirf(filelist, r_dir, true); + BLI_assert(is_valid_path); + UNUSED_VARS_NDEBUG(is_valid_path); if (!STREQ(filelist->filelist.root, r_dir)) { BLI_strncpy(filelist->filelist.root, r_dir, sizeof(filelist->filelist.root)); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4733544] blender-v2.78-release: Fix Py's IDs user mapping: do not consider ShapeKeys' from here.
Commit: 4733544195447392e921bd4058d02c2dd55a9cca Author: Bastien Montagne Date: Thu Sep 15 11:12:31 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB4733544195447392e921bd4058d02c2dd55a9cca Fix Py's IDs user mapping: do not consider ShapeKeys' from here. This is internal pointer helper for scene evaluation and tools, though exposed to bpy API, it can give false 'dependency cycles' in bpy.data.user_map() results. That's followup to rBe007552442634 really, both should be backported to 2.78 === M source/blender/python/intern/bpy_rna_id_collection.c === diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c index 95c2b3a..1037c83 100644 --- a/source/blender/python/intern/bpy_rna_id_collection.c +++ b/source/blender/python/intern/bpy_rna_id_collection.c @@ -40,7 +40,9 @@ #include "BKE_library_query.h" #include "DNA_ID.h" +/* Those folowing are only to support hack of not listing some internal 'backward' pointers in generated user_map... */ #include "DNA_object_types.h" +#include "DNA_key_types.h" #include "bpy_util.h" #include "bpy_rna_id_collection.h" @@ -98,6 +100,10 @@ static int foreach_libblock_id_user_map_callback( /* We skip proxy_from here, since it some internal pointer which is not irrelevant info for py/API level. */ return IDWALK_RET_NOP; } + else if ((GS(self_id->name) == ID_KE) && (id_p == (ID **)&((Key *)self_id)->from)) { + /* We skip from here, since it some internal pointer which is not irrelevant info for py/API level. */ + return IDWALK_RET_NOP; + } /* pyrna_struct_hash() uses ptr.data only, * but pyrna_struct_richcmp() uses also ptr.type, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7b748e9] blender-v2.78-release: Fix crash in some cases when deleting particle systems.
Commit: 7b748e9478f4e88a6e94687b8202261957674424 Author: Bastien Montagne Date: Thu Sep 15 11:50:56 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB7b748e9478f4e88a6e94687b8202261957674424 Fix crash in some cases when deleting particle systems. Those 'never null' ID pointers are really a PITA to handle... luckily we don't have much of those around! Found by Sybren, thanks. Should be backported to 2.78. === M source/blender/blenkernel/BKE_library_remap.h M source/blender/blenkernel/intern/particle.c M source/blender/blenkernel/intern/particle_system.c === diff --git a/source/blender/blenkernel/BKE_library_remap.h b/source/blender/blenkernel/BKE_library_remap.h index e974b79..89b0870 100644 --- a/source/blender/blenkernel/BKE_library_remap.h +++ b/source/blender/blenkernel/BKE_library_remap.h @@ -44,7 +44,7 @@ enum { * (like e.g. Object->data). */ ID_REMAP_FLAG_NEVER_NULL_USAGE = 1 << 2, /* This tells the callback func to force setting IDs using target one with a 'never NULL' pointer to NULL. -* WARNING! Use with extreme care, this will leave database in broken state! */ +* WARNING! Use with extreme care, this will leave database in broken state and can cause crashes very easily! */ ID_REMAP_FORCE_NEVER_NULL_USAGE = 1 << 3, }; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 907721b..1ea2755 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -503,7 +503,9 @@ void psys_free_particles(ParticleSystem *psys) PARTICLE_P; if (psys->particles) { - if (psys->part->type == PART_HAIR) { + /* Even though psys->part should never be NULL, this can happen as an exception during deletion. +* See ID_REMAP_SKIP/FORCE/FLAG_NEVER_NULL_USAGE in BKE_library_remap. */ + if (psys->part && psys->part->type == PART_HAIR) { LOOP_PARTICLES { if (pa->hair) MEM_freeN(pa->hair); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index b4e951c..efaf1f9 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4336,7 +4336,9 @@ void BKE_particlesystem_id_loop(ParticleSystem *psys, ParticleSystemIDFunc func, func(psys, (ID **)>ob, userdata, IDWALK_NOP); } - if (psys->part->phystype == PART_PHYS_BOIDS) { + /* Even though psys->part should never be NULL, this can happen as an exception during deletion. +* See ID_REMAP_SKIP/FORCE/FLAG_NEVER_NULL_USAGE in BKE_library_remap. */ + if (psys->part && psys->part->phystype == PART_PHYS_BOIDS) { ParticleData *pa; int p; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ca5f919] blender-v2.78-release: Fix Py's IDs user mapping: do not consider proxy_from here.
Commit: ca5f91951c68f136d94c1028efb0e98c31a86ddf Author: Bastien Montagne Date: Thu Sep 15 10:11:47 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBca5f91951c68f136d94c1028efb0e98c31a86ddf Fix Py's IDs user mapping: do not consider proxy_from here. This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway, and can give false 'dependency cycles' in bpy.data.user_map() results. Found by sybren in his Splode work. === M source/blender/python/intern/bpy_rna_id_collection.c === diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c index 3e50e79..95c2b3a 100644 --- a/source/blender/python/intern/bpy_rna_id_collection.c +++ b/source/blender/python/intern/bpy_rna_id_collection.c @@ -40,6 +40,7 @@ #include "BKE_library_query.h" #include "DNA_ID.h" +#include "DNA_object_types.h" #include "bpy_util.h" #include "bpy_rna_id_collection.h" @@ -81,7 +82,7 @@ static bool id_check_type(const ID *id, const BLI_bitmap *types_bitmap) } static int foreach_libblock_id_user_map_callback( -void *user_data, ID *UNUSED(self_id), ID **id_p, int UNUSED(cb_flag)) +void *user_data, ID *self_id, ID **id_p, int UNUSED(cb_flag)) { IDUserMapData *data = user_data; @@ -93,6 +94,11 @@ static int foreach_libblock_id_user_map_callback( } } + if ((GS(self_id->name) == ID_OB) && (id_p == (ID **)&((Object *)self_id)->proxy_from)) { + /* We skip proxy_from here, since it some internal pointer which is not irrelevant info for py/API level. */ + return IDWALK_RET_NOP; + } + /* pyrna_struct_hash() uses ptr.data only, * but pyrna_struct_richcmp() uses also ptr.type, * so we need to create a valid PointerRNA here... ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fc2b8c9] blender-v2.78-release: Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output
Commit: fc2b8c9793b55ca9674f46816028435ee50473c7 Author: Sergey Sharybin Date: Fri Sep 16 11:48:42 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBfc2b8c9793b55ca9674f46816028435ee50473c7 Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output === M source/blender/nodes/shader/nodes/node_shader_fresnel.c === diff --git a/source/blender/nodes/shader/nodes/node_shader_fresnel.c b/source/blender/nodes/shader/nodes/node_shader_fresnel.c index b50f722..ef2ce99 100644 --- a/source/blender/nodes/shader/nodes/node_shader_fresnel.c +++ b/source/blender/nodes/shader/nodes/node_shader_fresnel.c @@ -41,10 +41,12 @@ static bNodeSocketTemplate sh_node_fresnel_out[] = { static int node_shader_gpu_fresnel(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) { - if (!in[1].link) + if (!in[1].link) { in[1].link = GPU_builtin(GPU_VIEW_NORMAL); - else + } + else if (GPU_material_use_world_space_shading(mat)) { GPU_link(mat, "direction_transform_m4v3", in[1].link, GPU_builtin(GPU_VIEW_MATRIX), [1].link); + } return GPU_stack_link(mat, "node_fresnel", in, out, GPU_builtin(GPU_VIEW_POSITION)); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ab09a80] master: Fix T49425: Freestyle in viewport keeps updating over and over.
Commit: ab09a80d33ece770f0b722e8f4c329f558cc9896 Author: Bastien Montagne Date: Thu Sep 22 14:57:16 2016 +0200 Branches: master https://developer.blender.org/rBab09a80d33ece770f0b722e8f4c329f558cc9896 Fix T49425: Freestyle in viewport keeps updating over and over. Regression caused by rBb27ba26, we would always tag datablocks to update in G.main, ignoring given bmain, now always use this one instead. To be backported to 2.78. === M source/blender/blenkernel/intern/library_remap.c === diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 442c407..f456364 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -133,6 +133,7 @@ void BKE_library_callback_remap_editor_id_reference_set(BKE_library_remap_editor } typedef struct IDRemap { + Main *bmain; /* Only used to trigger depsgraph updates in the right bmain. */ ID *old_id; ID *new_id; ID *id; /* The ID in which we are replacing old_id by new_id usages. */ @@ -212,7 +213,7 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id else { if (!is_never_null) { *id_p = new_id; - DAG_id_tag_update(id_self, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DAG_id_tag_update_ex(id_remap_data->bmain, id_self, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } if (cb_flag & IDWALK_USER) { id_us_min(old_id); @@ -386,15 +387,15 @@ static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), O * - \a id is non-NULL: * + If \a old_id is NULL, \a new_id must also be NULL, and all ID pointers from \a id are cleared (i.e. \a id * does not references any other datablock anymore). - * + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only for given \a id. + * + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only within given \a id. * - * \param bmain: the Main data storage to operate on (can be NULL if \a id is non-NULL). - * \param id: the datablock to operate on (can be NULL if \a bmain is non-NULL). + * \param bmain: the Main data storage to operate on (must never be NULL). + * \param id: the datablock to operate on (can be NULL, in which case we operate over all IDs from given bmain). * \param old_id: the datablock to dereference (may be NULL if \a id is non-NULL). * \param new_id: the new datablock to replace \a old_id references with (may be NULL). * \param r_id_remap_data: if non-NULL, the IDRemap struct to use (uselful to retrieve info about remapping process). */ -static void libblock_remap_data( +ATTR_NONNULL(1) static void libblock_remap_data( Main *bmain, ID *id, ID *old_id, ID *new_id, const short remap_flags, IDRemap *r_id_remap_data) { IDRemap id_remap_data; @@ -404,6 +405,7 @@ static void libblock_remap_data( if (r_id_remap_data == NULL) { r_id_remap_data = _remap_data; } + r_id_remap_data->bmain = bmain; r_id_remap_data->old_id = old_id; r_id_remap_data->new_id = new_id; r_id_remap_data->id = NULL; @@ -611,7 +613,7 @@ void BKE_libblock_relink_ex( BLI_assert(new_id == NULL); } - libblock_remap_data(NULL, id, old_id, new_id, remap_flags, NULL); + libblock_remap_data(bmain, id, old_id, new_id, remap_flags, NULL); /* Some after-process updates. * This is a bit ugly, but cannot see a way to avoid it. Maybe we should do a per-ID callback for this instead? ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9937f28] master: Buildinfo: Improve behavior with detached HEAD
Commit: 9937f2887742e22b0bca33d6f8cdeaa4333e8fb1 Author: Sergey Sharybin Date: Thu Sep 22 15:00:23 2016 +0200 Branches: master https://developer.blender.org/rB9937f2887742e22b0bca33d6f8cdeaa4333e8fb1 Buildinfo: Improve behavior with detached HEAD Try real hard to detect which branch we've detached from. === M build_files/cmake/buildinfo.cmake === diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index af0ccd2..1f0a283 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -27,13 +27,12 @@ if(EXISTS ${SOURCE_DIR}/.git) OUTPUT_VARIABLE MY_WC_HASH OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH} + execute_process(COMMAND git branch --list master blender-v* --contains ${MY_WC_HASH} WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_contains_check OUTPUT_STRIP_TRAILING_WHITESPACE) - STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}") - if(_git_contains_check STREQUAL "master") + if(NOT _git_contains_check STREQUAL "") set(MY_WC_BRANCH "master") else() execute_process(COMMAND git show-ref --tags -d @@ -48,6 +47,22 @@ if(EXISTS ${SOURCE_DIR}/.git) if(_git_tag_hashes MATCHES "${_git_head_hash}") set(MY_WC_BRANCH "master") + else() + execute_process(COMMAND git branch --contains ${MY_WC_HASH} + WORKING_DIRECTORY ${SOURCE_DIR} + OUTPUT_VARIABLE _git_contains_branches + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}") + string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}") + string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}") + foreach(_branch ${_git_contains_branches}) + if (NOT "${_branch}" MATCHES "\\(HEAD.*") + set(MY_WC_BRANCH "${_branch}") + break() + endif() + endforeach() + unset(_branch) + unset(_git_contains_branches) endif() unset(_git_tag_hashes) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d84c55f] master: Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file
Commit: d84c55f0fa4775f68af4ae7beba3fbeec4a98593 Author: Sergey Sharybin Date: Thu Sep 22 17:30:31 2016 +0200 Branches: master https://developer.blender.org/rBd84c55f0fa4775f68af4ae7beba3fbeec4a98593 Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file Was an integer overflow issue when calculating offsets. === M intern/cycles/render/image.cpp === diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index b387c2c..7e24664 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -587,8 +587,7 @@ bool ImageManager::file_load_float_image(Image *img, ImageDataType type, device_ } if(depth <= 1) { - int scanlinesize = width*components*sizeof(float); - + size_t scanlinesize = ((size_t)width)*components*sizeof(float); in->read_image(TypeDesc::FLOAT, (uchar*)readpixels + (height-1)*scanlinesize, AutoStride, @@ -696,8 +695,7 @@ bool ImageManager::file_load_half_image(Image *img, ImageDataType type, device_v } if(depth <= 1) { - int scanlinesize = width*components*sizeof(half); - + size_t scanlinesize = ((size_t)width)*components*sizeof(half); in->read_image(TypeDesc::HALF, (uchar*)readpixels + (height-1)*scanlinesize, AutoStride, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [35f8158] blender-v2.78-release: Fix T49427: Drivers of Shapekeys break when Append a group.
Commit: 35f81587b58657b2497ffd1e0637edc0140713bd Author: Bastien Montagne Date: Thu Sep 22 16:11:16 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB35f81587b58657b2497ffd1e0637edc0140713bd Fix T49427: Drivers of Shapekeys break when Append a group. Optimization attempt with BKE_library_idtype_can_use_idtype() was not taking into account the fact that drivers may link virtually against any datablock... Has to be rethinked, but for after 2.78 release, this commit is safe to backport. === M source/blender/blenkernel/intern/library_query.c === diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index cb86433..392ac68 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -897,10 +897,12 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cd_flag) * This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above, quite useful to reduce * useless iterations in some cases. */ +/* XXX This has to be fully rethink, basing check on ID type is not really working anymore (and even worth once + * IDProps will support ID pointers), we'll have to do some quick checks on IDs themselves... */ bool BKE_library_idtype_can_use_idtype(const short id_type_owner, const short id_type_used) { - if (id_type_used == ID_AC) { - return id_type_can_have_animdata(id_type_owner); + if (id_type_can_have_animdata(id_type_owner)) { + return true; /* AnimationData can use virtually any kind of datablocks, through drivers especially. */ } switch ((ID_Type)id_type_owner) { @@ -999,10 +1001,10 @@ static int foreach_libblock_id_users_callback(void *user_data, ID *self_id, ID * IDUsersIter *iter = user_data; /* XXX This is actually some kind of hack... -* Issue is, only ID pointer from shapekeys is the 'from' one, which is not actually ID usage. +* Issue is, shapekeys' 'from' ID pointer is not actually ID usage. * Maybe we should even nuke it from BKE_library_foreach_ID_link, not 100% sure yet... */ - if (GS(self_id->name) == ID_KE) { + if ((GS(self_id->name) == ID_KE) && (((Key *)self_id)->from == *id_p)) { return IDWALK_RET_NOP; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [5649875] master: Clip Editor: Enable Continuous Grab for view panning
Commit: 56498757ce971af60d27e619ca84249675413f17 Author: Julian Eisel Date: Thu Sep 22 22:49:01 2016 +0200 Branches: master https://developer.blender.org/rB56498757ce971af60d27e619ca84249675413f17 Clip Editor: Enable Continuous Grab for view panning === M source/blender/editors/space_clip/clip_ops.c === diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 6778a0b..de8d760 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -476,7 +476,7 @@ void CLIP_OT_view_pan(wmOperatorType *ot) ot->poll = ED_space_clip_view_clip_poll; /* flags */ - ot->flag = OPTYPE_BLOCKING; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR; /* properties */ RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4e03107] master: Fix T49427: Drivers of Shapekeys break when Append a group.
Commit: 4e031073df3658f3bf9c807bfdfd70cdeca73102 Author: Bastien Montagne Date: Thu Sep 22 16:11:16 2016 +0200 Branches: master https://developer.blender.org/rB4e031073df3658f3bf9c807bfdfd70cdeca73102 Fix T49427: Drivers of Shapekeys break when Append a group. Optimization attempt with BKE_library_idtype_can_use_idtype() was not taking into account the fact that drivers may link virtually against any datablock... Has to be rethinked, but for after 2.78 release, this commit is safe to backport. === M source/blender/blenkernel/intern/library_query.c === diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index cb86433..392ac68 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -897,10 +897,12 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cd_flag) * This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above, quite useful to reduce * useless iterations in some cases. */ +/* XXX This has to be fully rethink, basing check on ID type is not really working anymore (and even worth once + * IDProps will support ID pointers), we'll have to do some quick checks on IDs themselves... */ bool BKE_library_idtype_can_use_idtype(const short id_type_owner, const short id_type_used) { - if (id_type_used == ID_AC) { - return id_type_can_have_animdata(id_type_owner); + if (id_type_can_have_animdata(id_type_owner)) { + return true; /* AnimationData can use virtually any kind of datablocks, through drivers especially. */ } switch ((ID_Type)id_type_owner) { @@ -999,10 +1001,10 @@ static int foreach_libblock_id_users_callback(void *user_data, ID *self_id, ID * IDUsersIter *iter = user_data; /* XXX This is actually some kind of hack... -* Issue is, only ID pointer from shapekeys is the 'from' one, which is not actually ID usage. +* Issue is, shapekeys' 'from' ID pointer is not actually ID usage. * Maybe we should even nuke it from BKE_library_foreach_ID_link, not 100% sure yet... */ - if (GS(self_id->name) == ID_KE) { + if ((GS(self_id->name) == ID_KE) && (((Key *)self_id)->from == *id_p)) { return IDWALK_RET_NOP; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d32ae02] blender-v2.78-release: Buildinfo: Improve behavior with detached HEAD
Commit: d32ae028ba1e345bf853fdbd698a62cf7067267a Author: Sergey Sharybin Date: Thu Sep 22 15:00:23 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rBd32ae028ba1e345bf853fdbd698a62cf7067267a Buildinfo: Improve behavior with detached HEAD Try real hard to detect which branch we've detached from. === M build_files/cmake/buildinfo.cmake === diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index af0ccd2..1f0a283 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -27,13 +27,12 @@ if(EXISTS ${SOURCE_DIR}/.git) OUTPUT_VARIABLE MY_WC_HASH OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH} + execute_process(COMMAND git branch --list master blender-v* --contains ${MY_WC_HASH} WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_contains_check OUTPUT_STRIP_TRAILING_WHITESPACE) - STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}") - if(_git_contains_check STREQUAL "master") + if(NOT _git_contains_check STREQUAL "") set(MY_WC_BRANCH "master") else() execute_process(COMMAND git show-ref --tags -d @@ -48,6 +47,22 @@ if(EXISTS ${SOURCE_DIR}/.git) if(_git_tag_hashes MATCHES "${_git_head_hash}") set(MY_WC_BRANCH "master") + else() + execute_process(COMMAND git branch --contains ${MY_WC_HASH} + WORKING_DIRECTORY ${SOURCE_DIR} + OUTPUT_VARIABLE _git_contains_branches + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX REPLACE "^\\*[ \t]+" "" _git_contains_branches "${_git_contains_branches}") + string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}") + string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}") + foreach(_branch ${_git_contains_branches}) + if (NOT "${_branch}" MATCHES "\\(HEAD.*") + set(MY_WC_BRANCH "${_branch}") + break() + endif() + endforeach() + unset(_branch) + unset(_git_contains_branches) endif() unset(_git_tag_hashes) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4a1feaa] blender2.8: immediate mode: Triple Buffer and two new shaders for TEXTURE_2D and TEXTURE_RECT
Commit: 4a1feaa5558ed60388fd3be41db74fbc54f2ab08 Author: Dalai Felinto Date: Thu Sep 22 13:20:44 2016 + Branches: blender2.8 https://developer.blender.org/rB4a1feaa5558ed60388fd3be41db74fbc54f2ab08 immediate mode: Triple Buffer and two new shaders for TEXTURE_2D and TEXTURE_RECT Use the same vertex shader for both fragment shaders === M source/blender/gpu/CMakeLists.txt M source/blender/gpu/GPU_shader.h M source/blender/gpu/gawain/immediate.c M source/blender/gpu/gawain/immediate.h M source/blender/gpu/intern/gpu_shader.c A source/blender/gpu/shaders/gpu_shader_2D_texture_2D_frag.glsl A source/blender/gpu/shaders/gpu_shader_2D_texture_rect_frag.glsl A source/blender/gpu/shaders/gpu_shader_2D_texture_vert.glsl M source/blender/windowmanager/intern/wm_draw.c === diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index a0b236d..e8e0a7b 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -125,6 +125,9 @@ data_to_c_simple(shaders/gpu_shader_2D_no_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_flat_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_smooth_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_2D_smooth_color_frag.glsl SRC) +data_to_c_simple(shaders/gpu_shader_2D_texture_2D_frag.glsl SRC) +data_to_c_simple(shaders/gpu_shader_2D_texture_rect_frag.glsl SRC) +data_to_c_simple(shaders/gpu_shader_2D_texture_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_no_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_flat_color_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_3D_smooth_color_vert.glsl SRC) diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 9b3077e..0b618d1 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -101,6 +101,9 @@ typedef enum GPUBuiltinShader { GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_SMOOTH_COLOR, GPU_SHADER_3D_DEPTH_ONLY, + /* basic 2D texture drawing */ + GPU_SHADER_2D_TEXTURE_2D, + GPU_SHADER_2D_TEXTURE_RECT, } GPUBuiltinShader; GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader); diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c index bcc84c1..9c3904f 100644 --- a/source/blender/gpu/gawain/immediate.c +++ b/source/blender/gpu/gawain/immediate.c @@ -650,3 +650,14 @@ void immUniformColor4ubv(const unsigned char rgba[4]) const float scale = 1.0f / 255.0f; immUniform4f("color", scale * rgba[0], scale * rgba[1], scale * rgba[2], rgba[3]); } + +void immUniform1i(const char *name, const unsigned int data) + { + int loc = glGetUniformLocation(imm.bound_program, name); + +#if TRUST_NO_ONE + assert(loc != -1); +#endif + + glUniform1i(loc, data); + } \ No newline at end of file diff --git a/source/blender/gpu/gawain/immediate.h b/source/blender/gpu/gawain/immediate.h index d33f680..84fb076 100644 --- a/source/blender/gpu/gawain/immediate.h +++ b/source/blender/gpu/gawain/immediate.h @@ -72,3 +72,5 @@ void immUniform4f(const char* name, float x, float y, float z, float w); // TODO: treat as sRGB? void immUniformColor3ubv(const unsigned char data[3]); void immUniformColor4ubv(const unsigned char data[4]); + +void immUniform1i(const char *name, const unsigned int data); diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c index fbb9c9e..41a4537 100644 --- a/source/blender/gpu/intern/gpu_shader.c +++ b/source/blender/gpu/intern/gpu_shader.c @@ -53,6 +53,9 @@ extern char datatoc_gpu_shader_2D_no_color_vert_glsl[]; extern char datatoc_gpu_shader_2D_flat_color_vert_glsl[]; extern char datatoc_gpu_shader_2D_smooth_color_vert_glsl[]; extern char datatoc_gpu_shader_2D_smooth_color_frag_glsl[]; +extern char datatoc_gpu_shader_2D_texture_vert_glsl[]; +extern char datatoc_gpu_shader_2D_texture_2D_frag_glsl[]; +extern char datatoc_gpu_shader_2D_texture_rect_frag_glsl[]; extern char datatoc_gpu_shader_3D_no_color_vert_glsl[]; extern char datatoc_gpu_shader_3D_flat_color_vert_glsl[]; extern char datatoc_gpu_shader_3D_smooth_color_vert_glsl[]; @@ -88,6 +91,9 @@ static struct GPUShadersGlobal { GPUShader *fx_shaders[MAX_FX_SHADERS * 2]; /* for drawing text */ GPUShader *text; + /* for drawing texture */ + GPUShader *texture_2D; + GPUShader *texture_rect; /* for simple 2D drawing */ GPUShader *uniform_color_2D; GPUShader *flat_color_2D; @@ -623,6 +629,22 @@ GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader) NULL, NULL, NULL, 0, 0, 0);
[Bf-blender-cvs] [42f42cb] blender-v2.78-release: Fix T49425: Freestyle in viewport keeps updating over and over.
Commit: 42f42cbfdce1732b193c05495eab4f23ddba045d Author: Bastien Montagne Date: Thu Sep 22 14:57:16 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB42f42cbfdce1732b193c05495eab4f23ddba045d Fix T49425: Freestyle in viewport keeps updating over and over. Regression caused by rBb27ba26, we would always tag datablocks to update in G.main, ignoring given bmain, now always use this one instead. To be backported to 2.78. === M source/blender/blenkernel/intern/library_remap.c === diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 442c407..f456364 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -133,6 +133,7 @@ void BKE_library_callback_remap_editor_id_reference_set(BKE_library_remap_editor } typedef struct IDRemap { + Main *bmain; /* Only used to trigger depsgraph updates in the right bmain. */ ID *old_id; ID *new_id; ID *id; /* The ID in which we are replacing old_id by new_id usages. */ @@ -212,7 +213,7 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id else { if (!is_never_null) { *id_p = new_id; - DAG_id_tag_update(id_self, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DAG_id_tag_update_ex(id_remap_data->bmain, id_self, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } if (cb_flag & IDWALK_USER) { id_us_min(old_id); @@ -386,15 +387,15 @@ static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), O * - \a id is non-NULL: * + If \a old_id is NULL, \a new_id must also be NULL, and all ID pointers from \a id are cleared (i.e. \a id * does not references any other datablock anymore). - * + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only for given \a id. + * + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only within given \a id. * - * \param bmain: the Main data storage to operate on (can be NULL if \a id is non-NULL). - * \param id: the datablock to operate on (can be NULL if \a bmain is non-NULL). + * \param bmain: the Main data storage to operate on (must never be NULL). + * \param id: the datablock to operate on (can be NULL, in which case we operate over all IDs from given bmain). * \param old_id: the datablock to dereference (may be NULL if \a id is non-NULL). * \param new_id: the new datablock to replace \a old_id references with (may be NULL). * \param r_id_remap_data: if non-NULL, the IDRemap struct to use (uselful to retrieve info about remapping process). */ -static void libblock_remap_data( +ATTR_NONNULL(1) static void libblock_remap_data( Main *bmain, ID *id, ID *old_id, ID *new_id, const short remap_flags, IDRemap *r_id_remap_data) { IDRemap id_remap_data; @@ -404,6 +405,7 @@ static void libblock_remap_data( if (r_id_remap_data == NULL) { r_id_remap_data = _remap_data; } + r_id_remap_data->bmain = bmain; r_id_remap_data->old_id = old_id; r_id_remap_data->new_id = new_id; r_id_remap_data->id = NULL; @@ -611,7 +613,7 @@ void BKE_libblock_relink_ex( BLI_assert(new_id == NULL); } - libblock_remap_data(NULL, id, old_id, new_id, remap_flags, NULL); + libblock_remap_data(bmain, id, old_id, new_id, remap_flags, NULL); /* Some after-process updates. * This is a bit ugly, but cannot see a way to avoid it. Maybe we should do a per-ID callback for this instead? ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [53ff09b] blender-v2.78-release: GPencil: Fix memory leak using stroke arrange OP
Commit: 53ff09bc97578cf19e307f24c17cd82ac7821fbc Author: Julian Eisel Date: Sun Sep 18 17:25:12 2016 +0200 Branches: blender-v2.78-release https://developer.blender.org/rB53ff09bc97578cf19e307f24c17cd82ac7821fbc GPencil: Fix memory leak using stroke arrange OP === M source/blender/editors/gpencil/gpencil_data.c === diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 9560ab1..01d388b 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -815,6 +815,8 @@ static int gp_stroke_arrange_exec(bContext *C, wmOperator *op) BLI_assert(0); break; } + BLI_freelistN(); + /* notifiers */ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs