blender.git
5 years agoBuildbot: Missed this in the previous commit
Sergey Sharybin [Mon, 27 Jul 2015 09:49:05 +0000 (11:49 +0200)]
Buildbot: Missed this in the previous commit

5 years agoBuildbot: Attempt to make windows cmake builds names matching buldbot's names
Sergey Sharybin [Mon, 27 Jul 2015 09:17:57 +0000 (11:17 +0200)]
Buildbot: Attempt to make windows cmake builds names matching buldbot's names

Did this in packaging buildbot rule because of several reasons:

- CMake doesn't deliver name of package which we expect it to be for buildbot
- CMake doesn't really know that building happens for buildbot
- Making default CPAck name matching buildbot's naming is kinda stupid

Probably we can pass CPack name via command line arguments, but i'm happy with
the current state and one might change things in the future.

5 years agoReplace MFace with MLoopTri in laplacian_deform
Martin Felke [Mon, 27 Jul 2015 07:37:42 +0000 (17:37 +1000)]
Replace MFace with MLoopTri in laplacian_deform

5 years agoMissed last commit
Campbell Barton [Mon, 27 Jul 2015 06:46:12 +0000 (16:46 +1000)]
Missed last commit

5 years agoReplace MFace with looptri for dynamicpaint
Campbell Barton [Mon, 27 Jul 2015 05:52:54 +0000 (15:52 +1000)]
Replace MFace with looptri for dynamicpaint

D1429 by @lichtwerk, with edits

5 years agoCleanup: deprecate some G.fileflags comment others
Campbell Barton [Mon, 27 Jul 2015 00:36:11 +0000 (10:36 +1000)]
Cleanup: deprecate some G.fileflags comment others

5 years agoFix T45563: Crash rendering hair dupli's
Campbell Barton [Mon, 27 Jul 2015 00:02:41 +0000 (10:02 +1000)]
Fix T45563: Crash rendering hair dupli's

5 years agoMake cmake windows 32 bit buildbot use the 120xp toolkit, restoring
Martijn Berger [Sun, 26 Jul 2015 19:14:24 +0000 (21:14 +0200)]
Make cmake windows 32 bit buildbot use the 120xp toolkit, restoring
windows XP compatibility

Fixes T45559

5 years agoFix T26141: render setting affects only first scene.
Porteries Tristan [Sun, 26 Jul 2015 16:01:56 +0000 (18:01 +0200)]
Fix T26141: render setting affects only first scene.

5 years agoFix bug in particle API accessing the emitter
Campbell Barton [Sun, 26 Jul 2015 02:19:52 +0000 (12:19 +1000)]
Fix bug in particle API accessing the emitter

5 years agoFix T45510: Animation channel textbox field to small
Julian Eisel [Sat, 25 Jul 2015 23:55:25 +0000 (01:55 +0200)]
Fix T45510: Animation channel textbox field to small

It now takes (almost) the whole available width of the region. Icons on the right hand side are hidden during text input now, they can't be used then anyway. Using this space for the text input button makes more sense.

5 years agoFix T45562: Crashing pre 2.5 file with grid subdivisions set to 0
Julian Eisel [Sat, 25 Jul 2015 22:18:44 +0000 (00:18 +0200)]
Fix T45562: Crashing pre 2.5 file with grid subdivisions set to 0

Seems like the original version patch for this wasn't made correctly.

5 years agominor cleanup, reuse existing variable
Antony Riakiotakis [Sat, 25 Jul 2015 20:32:55 +0000 (22:32 +0200)]
minor cleanup, reuse existing variable

5 years agoConvert CCGSubsurf VBO system to also sort hidden and visible faces.
Antony Riakiotakis [Sat, 25 Jul 2015 20:02:15 +0000 (22:02 +0200)]
Convert CCGSubsurf VBO system to also sort hidden and visible faces.

It's not actually used during drawing though.

5 years agoGPU Buffers:
Antony Riakiotakis [Sat, 25 Jul 2015 18:00:49 +0000 (20:00 +0200)]
GPU Buffers:

This commit begins implementation of the idea about hidden face
separation outlined in

http://code.blender.org/2015/06/optimizing-blenders-real-time-mesh-

We split hidden and visible faces to different parts of the triangle
buffer.
Mapped drawing will now skip iterating through hidden polys.
Of course the final target, when all derived mesh types use
VBO sorting, is to skip checking for hide flag per face
completely. All faces will be pre-sorted anyway and we'll
be able to draw them with one draw call.

5 years agoStyle cleanup + fix sign on previous commit.
Antony Riakiotakis [Sat, 25 Jul 2015 16:02:07 +0000 (18:02 +0200)]
Style cleanup + fix sign on previous commit.

5 years agoCleanup - we don't need a bogus enable material function, just pass
Antony Riakiotakis [Sat, 25 Jul 2015 15:18:45 +0000 (17:18 +0200)]
Cleanup - we don't need a bogus enable material function, just pass
NULL.

All derivedmesh types check if we have an enable function, we can get
rid of this.

5 years agoFix tile feature not working outside mesh boundaries.
Antony Riakiotakis [Sat, 25 Jul 2015 14:21:09 +0000 (16:21 +0200)]
Fix tile feature not working outside mesh boundaries.

We need to generate strokes up to a brush radius around the bounding
box.

5 years agoFix T45515, dynamic paint not displaying colors correctly.
Antony Riakiotakis [Sat, 25 Jul 2015 14:16:25 +0000 (16:16 +0200)]
Fix T45515, dynamic paint not displaying colors correctly.

Looptri refactor artifact

5 years agoGPU buffer materials:
Antony Riakiotakis [Sat, 25 Jul 2015 11:17:37 +0000 (13:17 +0200)]
GPU buffer materials:

Separate and reuse some shared code.

Also avoid counting for information we already know,
such as total loop triangles etc.

5 years agoFix compile warning in 04b369
Porteries Tristan [Sat, 25 Jul 2015 12:00:46 +0000 (14:00 +0200)]
Fix compile warning in 04b369

5 years agoBGE: Fix T35454: Soft body joints crash.
Porteries Tristan [Sat, 25 Jul 2015 11:45:13 +0000 (13:45 +0200)]
BGE: Fix T35454: Soft body joints crash.

Constraint on soft bodies are special and return 0 as constraint id.
So we have to check that the id is not 0 in function setParam, getParam, getAppliedImpulse and removeConstraint.

5 years agoBGE: Fix T45278 sleeping deactivation with overlay scene.
Porteries Tristan [Fri, 3 Jul 2015 09:13:47 +0000 (11:13 +0200)]
BGE: Fix T45278 sleeping deactivation with overlay scene.

this commit fix also angular and linear threshold sleeping value update via bge.constraints.

5 years agoFix T45555 crash with subsurf edge drawing.
Antony Riakiotakis [Sat, 25 Jul 2015 10:46:08 +0000 (12:46 +0200)]
Fix T45555 crash with subsurf edge drawing.

Loose edge count was double. It didn't fail on own
tests because they had a small number of loose edges,
but for bigger meshes it hit garbage indices at draw time
and crashed.

Also cleaned up the code to make it less verbose and easier to
understand how indices are counted.

Hope it's the last edge-related fix (fingers crossed)

5 years agoFix grease pencil selection
Campbell Barton [Sat, 25 Jul 2015 10:34:21 +0000 (20:34 +1000)]
Fix grease pencil selection

When zoomed in could int overflow and select the wrong vertex.

also correct clipping check.

5 years agoFix T45553: Object parent_type 'ARMATURE' disappeared in Blender 2.75.
Bastien Montagne [Sat, 25 Jul 2015 08:39:04 +0000 (10:39 +0200)]
Fix T45553: Object parent_type 'ARMATURE' disappeared in Blender 2.75.

Own stupid mistake in rBb318795c3b3d (ideally we should really not have that kind of ugly hacks :/ ).

5 years agoBGE: Fix T35288 Touch/Ray/Mouse sensor and Constraint actuator with material check...
Porteries Tristan [Fri, 24 Jul 2015 18:28:39 +0000 (20:28 +0200)]
BGE: Fix T35288 Touch/Ray/Mouse sensor and Constraint actuator  with material check doesn't work.

Now we look at all materials instead of the first. So m_auxilary_info is useless and removed.

5 years agoCleanup: double-promotion warnings
Campbell Barton [Sat, 25 Jul 2015 03:26:20 +0000 (13:26 +1000)]
Cleanup: double-promotion warnings

5 years agoCorrect check for angle-rake stroke
Campbell Barton [Sat, 25 Jul 2015 03:07:05 +0000 (13:07 +1000)]
Correct check for angle-rake stroke

5 years agoCleanup: warnings, style
Campbell Barton [Fri, 24 Jul 2015 21:40:02 +0000 (07:40 +1000)]
Cleanup: warnings, style

5 years agoCompositor: Fixes for the debug pass
Sergey Sharybin [Fri, 24 Jul 2015 21:05:11 +0000 (23:05 +0200)]
Compositor: Fixes for the debug pass

This commit fixes issues with wrong socket type being added to the Cycles debug
pass compositor operation, which lead to crashes with non-value pass types.

This commit also reverts socket renaming thing because while it's was behaving
ok on runtime file reload might have loose the links which is annoying.

5 years agoFix T45537: cycles bake crashes with motionblur on
Kévin Dietrich [Fri, 24 Jul 2015 19:18:17 +0000 (21:18 +0200)]
Fix T45537: cycles bake crashes with motionblur on

The crash was due to baking with motion blur but without a camera.

Reviewed by Brecht.

5 years agoExperiment with setting proper socket name for debug pass
Sergey Sharybin [Fri, 24 Jul 2015 16:41:54 +0000 (18:41 +0200)]
Experiment with setting proper socket name for debug pass

5 years agoDeduplicate some logic around debug passes
Sergey Sharybin [Fri, 24 Jul 2015 15:45:14 +0000 (17:45 +0200)]
Deduplicate some logic around debug passes

5 years agoCompositor: Make it work for debug passes other than float
Sergey Sharybin [Fri, 24 Jul 2015 15:15:55 +0000 (17:15 +0200)]
Compositor: Make it work for debug passes other than float

5 years agoBGE: Fix T45544 Adding Armatures takes an increasing amount of logic time
Porteries Tristan [Fri, 24 Jul 2015 15:05:38 +0000 (17:05 +0200)]
BGE: Fix T45544 Adding Armatures takes an increasing amount of logic time

Armatures were not totaly freed (only the armature object not the armature) and the original armature user count was not decrease after replication.

5 years agoFix T45541 crash when mixing flat and smooth shaded faces in sculpt
Antony Riakiotakis [Fri, 24 Jul 2015 14:28:18 +0000 (16:28 +0200)]
Fix T45541 crash when mixing flat and smooth shaded faces in sculpt
mode.

Issue from looptri merge.

5 years agoCompositor: Allow using debug pass output in the compositor
Sergey Sharybin [Fri, 24 Jul 2015 10:56:05 +0000 (12:56 +0200)]
Compositor: Allow using debug pass output in the compositor

Currently only works correct with single float output, RGBA and vector are not
supported so if one need to use this passes he'll need to wait a bit still.

It is coming, don't worry.

5 years agoMake it easier to create debug passes with more than 1 channel
Sergey Sharybin [Fri, 24 Jul 2015 10:29:05 +0000 (12:29 +0200)]
Make it easier to create debug passes with more than 1 channel

5 years agoCycles: Don't explicitly add debug passes, this is now handled via RNA
Sergey Sharybin [Fri, 24 Jul 2015 10:12:24 +0000 (12:12 +0200)]
Cycles: Don't explicitly add debug passes, this is now handled via RNA

5 years agoFix subsurf edge drawing when more than one loose edge vert exists
Antony Riakiotakis [Fri, 24 Jul 2015 12:39:52 +0000 (14:39 +0200)]
Fix subsurf edge drawing when more than one loose edge vert exists

5 years agoFix yet another issue caused by my recent changes.
Antony Riakiotakis [Fri, 24 Jul 2015 12:32:11 +0000 (14:32 +0200)]
Fix yet another issue caused by my recent changes.

5 years agoFix out of bounds memory access when copying loose vertices in cddm
Antony Riakiotakis [Fri, 24 Jul 2015 10:24:05 +0000 (12:24 +0200)]
Fix out of bounds memory access when copying loose vertices in cddm

Caused by own fix for too much allocated memory not taking all code
into account.

5 years agoAdjust CMake platform dependant release options
Campbell Barton [Fri, 24 Jul 2015 09:39:12 +0000 (19:39 +1000)]
Adjust CMake platform dependant release options

5 years agoFix for building with OpenSubdiv
Campbell Barton [Fri, 24 Jul 2015 07:11:50 +0000 (17:11 +1000)]
Fix for building with OpenSubdiv

5 years agoCleanup: comments (remove outdated & update)
Campbell Barton [Fri, 24 Jul 2015 06:58:43 +0000 (16:58 +1000)]
Cleanup: comments (remove outdated & update)

5 years agoPyAPI: update bgl to OpenGL 3.3
Martijn Berger [Fri, 24 Jul 2015 06:43:20 +0000 (16:43 +1000)]
PyAPI: update bgl to OpenGL 3.3

Adds (currently unused) deprecated option
so we can remove support for older API versions.

5 years agoparenthisize macro args to avoid errors
Campbell Barton [Fri, 24 Jul 2015 05:53:52 +0000 (15:53 +1000)]
parenthisize macro args to avoid errors

5 years agoCompile Fix: setenv() is not defined for mingw either
Joshua Leung [Fri, 24 Jul 2015 03:08:43 +0000 (15:08 +1200)]
Compile Fix: setenv() is not defined for mingw either

5 years agoFix: Autokeying of buttons doesn't work on NLA Strip properties
Joshua Leung [Fri, 24 Jul 2015 02:15:28 +0000 (14:15 +1200)]
Fix: Autokeying of buttons doesn't work on NLA Strip properties

5 years agoFix: NLA Strip properties cannot be keyframed if Visual Keying/Only Needed options...
Joshua Leung [Fri, 24 Jul 2015 02:14:55 +0000 (14:14 +1200)]
Fix: NLA Strip properties cannot be keyframed if Visual Keying/Only Needed options are enabled

5 years agoCleanup: remove redundant __doc__ from bgl
Campbell Barton [Thu, 23 Jul 2015 23:45:25 +0000 (09:45 +1000)]
Cleanup: remove redundant __doc__ from bgl

5 years agoCleanup: move defines inside bgl C source
Campbell Barton [Thu, 23 Jul 2015 23:24:44 +0000 (09:24 +1000)]
Cleanup: move defines inside bgl C source

- remove number-of-args arg from BGL_Wrap.
- use doxy groups.

5 years agoMinor cleanup - use integers for counters.
Antony Riakiotakis [Thu, 23 Jul 2015 21:21:19 +0000 (23:21 +0200)]
Minor cleanup - use integers for counters.

5 years agoSculpt Tiling Feature
Antony Riakiotakis [Thu, 23 Jul 2015 20:52:03 +0000 (22:52 +0200)]
Sculpt Tiling Feature

Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc

Notes:

Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).

After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)

Thanks a lot for the patch!

Patch: D1426

5 years agoFix memory leaks mesh w/ mesh remapping
Campbell Barton [Thu, 23 Jul 2015 19:04:33 +0000 (05:04 +1000)]
Fix memory leaks mesh w/ mesh remapping

5 years agoSubsurf: Optimize edge drawing, now it uses VBOs.
Antony Riakiotakis [Thu, 23 Jul 2015 14:05:00 +0000 (16:05 +0200)]
Subsurf: Optimize edge drawing, now it uses VBOs.

Also the refactor exposed an error where we requested too much
memory from the video memory in general for all mesh types.

Now we are back to normal :)

5 years agoAdded NlaStrip.fcurves.find(data_path, array_index=0)
Sybren A. Stüvel [Thu, 23 Jul 2015 13:38:25 +0000 (15:38 +0200)]
Added NlaStrip.fcurves.find(data_path, array_index=0)

This is the same as D1427 / 89e5c756665c1e7e622ddbd5deece0dda4ce7724
except for NlaStrip.fcurves instead of Action.fcurves. It makes finding
a specific fcurve in Python much easier, as you don't need a Python-side
loop any more.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1430

5 years agoFreestyle: Fix for round/square stroke caps causing line thinning.
Tamito Kajiyama [Thu, 23 Jul 2015 11:14:19 +0000 (20:14 +0900)]
Freestyle: Fix for round/square stroke caps causing line thinning.

This is a regression introduced in rBce729677db3e and rBb408d8af31c9.

RoundCapShader and SquareCapsShader had to remove (almost) overlapping
stroke vertices to avoid sudden thinning of line thickness.  For instance,
the test .blend file from https://developer.blender.org/T36425#231460
suffered from the reported line thinning (although T36425 was originally
caused by a different bug).

5 years agoCycles: Previous commit broke compilation on Windows
Sergey Sharybin [Thu, 23 Jul 2015 07:53:23 +0000 (12:53 +0500)]
Cycles: Previous commit broke compilation on Windows

Apparently MSVC doesn't have setenv() function.

5 years agoFix T45381: Crash Blender 2.75 in Win7 x64 AMD card
Sergey Sharybin [Thu, 23 Jul 2015 10:08:19 +0000 (12:08 +0200)]
Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card

Previous fix didn't work well enough because on Windows Python has different
environment than Blender ans setting variables in there made no effect from
Blender point of view.

5 years agoUse looptri for sampling UV's in smoke.c
Campbell Barton [Thu, 23 Jul 2015 10:06:57 +0000 (20:06 +1000)]
Use looptri for sampling UV's in smoke.c

D1424 by @scorpion81

5 years agoFix regression of custom nodes not triggering material preview re-render
Sergey Sharybin [Thu, 23 Jul 2015 09:50:13 +0000 (11:50 +0200)]
Fix regression of custom nodes not triggering material preview re-render

Issue was introduced in b0df196.It's not the nicest ever solution but it's
quite close to be as nice as we can do it with current custom nodes and
notifier system design.

5 years agoCycles: Resolve compilation error of avx2 kernel with certain compilers
Sergey Sharybin [Thu, 23 Jul 2015 09:48:54 +0000 (11:48 +0200)]
Cycles: Resolve compilation error of avx2 kernel with certain compilers

It was redefined macro happening with Clang 3.6 here.

5 years agoImBuf: Fix OpenExr leaking memory when reading file with IB_test flag
Sergey Sharybin [Thu, 23 Jul 2015 07:10:11 +0000 (09:10 +0200)]
ImBuf: Fix OpenExr leaking memory when reading file with IB_test flag

5 years agoUse looptri for smoke collisions & particle edit
Campbell Barton [Thu, 23 Jul 2015 07:07:14 +0000 (17:07 +1000)]
Use looptri for smoke collisions & particle edit

5 years agoUse looptri for RNA BVH functions
Campbell Barton [Thu, 23 Jul 2015 05:38:50 +0000 (15:38 +1000)]
Use looptri for RNA BVH functions

5 years agoCleanup; duplicate header
Campbell Barton [Thu, 23 Jul 2015 05:39:36 +0000 (15:39 +1000)]
Cleanup; duplicate header

5 years agoCleanup: arg names
Campbell Barton [Thu, 23 Jul 2015 05:17:26 +0000 (15:17 +1000)]
Cleanup: arg names

5 years agoUse looptri for mesh remapping
Campbell Barton [Thu, 23 Jul 2015 05:10:12 +0000 (15:10 +1000)]
Use looptri for mesh remapping

5 years agoUtility function to get poly -> looptri mapping
Campbell Barton [Thu, 23 Jul 2015 05:08:27 +0000 (15:08 +1000)]
Utility function to get poly -> looptri mapping

5 years agoUse looptri for BVH raycast (simple cases)
Campbell Barton [Thu, 23 Jul 2015 03:20:34 +0000 (13:20 +1000)]
Use looptri for BVH raycast (simple cases)

5 years agoUse looptri for volume snapping
Campbell Barton [Thu, 23 Jul 2015 02:56:44 +0000 (12:56 +1000)]
Use looptri for volume snapping

5 years agoMissed adding BVH callbacks in recent commit
Campbell Barton [Thu, 23 Jul 2015 03:09:14 +0000 (13:09 +1000)]
Missed adding BVH callbacks in recent commit

5 years agoAdd missing break checking for tangents
Campbell Barton [Thu, 23 Jul 2015 01:51:03 +0000 (11:51 +1000)]
Add missing break checking for tangents

5 years agoMesh Deform: support for ngons when binding
Campbell Barton [Thu, 23 Jul 2015 00:47:34 +0000 (10:47 +1000)]
Mesh Deform: support for ngons when binding

Weights were calculated using tessellation data, giving slightly uneven weighting.
Now only use tessellation for ray-cast but weight the influences from the original polygons.

Also cache arrays from derived-mesh, they we're called each intersection.

5 years agoFix weight painting + mask not drawing in latest master.
Antony Riakiotakis [Wed, 22 Jul 2015 14:58:18 +0000 (16:58 +0200)]
Fix weight painting + mask not drawing in latest 

Same issue as vertex painting - though one might wonder if we really
need to set material on such occasions.

5 years agoGPU debug: Only flush stderr if needed.
Antony Riakiotakis [Wed, 22 Jul 2015 11:57:35 +0000 (13:57 +0200)]
GPU debug: Only flush stderr if needed.

5 years agoUse looptri for MeshDeform modifier
Campbell Barton [Wed, 22 Jul 2015 11:30:02 +0000 (21:30 +1000)]
Use looptri for MeshDeform modifier

5 years agoAdd bvhtree_from_mesh_looptri utility function
Campbell Barton [Wed, 22 Jul 2015 10:55:46 +0000 (20:55 +1000)]
Add bvhtree_from_mesh_looptri utility function

5 years agoAdd DM_get_looptri_array utility function
Campbell Barton [Wed, 22 Jul 2015 10:54:12 +0000 (20:54 +1000)]
Add DM_get_looptri_array utility function

5 years agoUse doxy sections in bvhutils
Campbell Barton [Wed, 22 Jul 2015 10:35:33 +0000 (20:35 +1000)]
Use doxy sections in bvhutils

5 years agoUse const for BVH mesh arrays
Campbell Barton [Wed, 22 Jul 2015 07:39:33 +0000 (17:39 +1000)]
Use const for BVH mesh arrays

5 years agoCleanup: use struct for storing callback data
Campbell Barton [Wed, 22 Jul 2015 05:49:53 +0000 (15:49 +1000)]
Cleanup: use struct for storing callback data

5 years agoOpenSubdiv: Optimize speed of topology refiner construction
Sergey Sharybin [Wed, 22 Jul 2015 10:48:22 +0000 (12:48 +0200)]
OpenSubdiv: Optimize speed of topology refiner construction

Now the conversion code uses mesh element mapping to speed up lookups.
Gives really nice speed improvement here, but the cost is higher memory
usage during refiner construction.

On the dragon scene here topology refiner construction time goes down
from 5 seconds to around 0.01.

It's possible to reduce the memory footprint by allocating mapping in
stages (don't allocate all of them at once, but do it on demand only
and free them after they're not needed anymore).

5 years agoOpenSubdiv: Resolve crash when trying to do weight mcol
Sergey Sharybin [Wed, 22 Jul 2015 09:58:48 +0000 (11:58 +0200)]
OpenSubdiv: Resolve crash when trying to do weight mcol

5 years agoFix crash with recent refactor of customdata writing.
Bastien Montagne [Wed, 22 Jul 2015 09:54:53 +0000 (11:54 +0200)]
Fix crash with recent refactor of customdata writing.

Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers
needed to store saved customdata, we have to adjust CustomData->maxlayer too.

Otherwise, on next read, customdata code believes it has more layers allocated than
actual number.

Issue reported by Campbell over IRC, thanks.

5 years agoDon't make Python classes of StructRNA on startup
Campbell Barton [Wed, 22 Jul 2015 09:41:59 +0000 (19:41 +1000)]
Don't make Python classes of StructRNA on startup

This gives small start time speedup, classes are lazy loaded instead.

Keep existing behavior in debug builds to catch any errors early.

5 years agoRender preview: Make preview render database lazily loaded
Sergey Sharybin [Wed, 22 Jul 2015 09:24:38 +0000 (11:24 +0200)]
Render preview: Make preview render database lazily loaded

Gives about 5-10% of startup time improvement here.

5 years agoFix: solved issue with "make doc_py"
Sybren A. Stüvel [Wed, 22 Jul 2015 08:20:45 +0000 (10:20 +0200)]
Fix: solved issue with "make doc_py"

The error was "ValueError: Function <function normal_at_I0D at 0x7f2aad1feb70>
has keyword-only arguments or annotations, use getfullargspec() API which can
support them", and was first seen in eeeb845d33e81afbc8ed127e6ab4ae7b18472a54

5 years agoFix T43779: Cycles texture interpolation issues
Sergey Sharybin [Tue, 21 Jul 2015 20:09:52 +0000 (22:09 +0200)]
Fix T43779: Cycles texture interpolation issues

That was basically not an issue with interpolation, but rather missing wrapping
options and periodic wrapping was always used.

It's still a bit questionable why certain graphics cards were doing clamping in
the file from the report, that's not something what is expected to happen from
the settings of textures being passed to GPU. In any case this issue i still
didn't manage to reproduce on any of the available GPUs, might be something
related on driver glitch or so.

In any case CPU now should behave just fine, rest of the issues we'll need to be
able to reproduce first.

5 years agoCycles: Expose image image extension mapping to the image manager
Sergey Sharybin [Tue, 21 Jul 2015 19:58:19 +0000 (21:58 +0200)]
Cycles: Expose image image extension mapping to the image manager

Currently only two mappings are supported by API, which is Repeat (old behavior)
and new Clip behavior. Internally this extension is being converted to periodic
flag which was already supported but wasn't exposed.

There's no support for OpenCL yet because of the way how we pack images into a
single texture.

Those settings are not exposed to UI or anywhere else and there should be no
functional changes so far.

5 years agoCycles: Implement camera zoom motion blur
Sergey Sharybin [Tue, 21 Jul 2015 13:36:35 +0000 (15:36 +0200)]
Cycles: Implement camera zoom motion blur

Works totally similar to camera motion blur and majority of the changes are
related on just passing extra arguments to sync() functions.

Couple of things still to look into:

- Motion pass will not include motion caused by the zoom.
- Only perspective cameras are supported currently.
- Motion is being interpolated on projected coordinates, which might give
  different results from constructing projection matrix from interpolated
  field of view.

  This could be good enough for us, but we need to consider improving this
  at some point.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1383

5 years agoTry to remap buffer before rejecting.
Antony Riakiotakis [Tue, 21 Jul 2015 14:40:58 +0000 (16:40 +0200)]
Try to remap buffer before rejecting.

I suspect code here can be cleaned up but for now try this.
Alternatively we can check for errors around buffer allocation
but this needs bigger changes.

5 years agoAdded Action.fcurves.find(data_path, array_index=0)
Sybren A. Stüvel [Tue, 21 Jul 2015 14:01:26 +0000 (16:01 +0200)]
Added Action.fcurves.find(data_path, array_index=0)

Finding a specific F-Curve is often needed in Python, and usually
consists of a construct like:

```
 [fcurve
  for fcurve in ob.animation_data.action.fcurves
  if fcurve.data_path == "location"][1]
```

This can now be written as
`ob.animation_data.action.fcurves.find('location', 1)`

This new function `Action.fcurves.find()` is still O(N) in the number
of FCurves in the Action, but at least it allows us to remove
boiler-plate code. It is also faster than the Python equivalent, as
only the found F-Curve is converted to Python.

Reviewers: campbellbarton, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1427

5 years agoFailure to alllocate vertex buffer would not fall back to vertex array
Antony Riakiotakis [Tue, 21 Jul 2015 13:41:57 +0000 (15:41 +0200)]
Failure to alllocate vertex buffer would not fall back to vertex array
properly.

This should fix failure to use vertex arrays in OSX with high
polycounts.

Note this will not suffice as a fix when we move to VBOs exclusively
(GL 3+), we'll have to think of some way to separate huge meshes to many
VBOs.

5 years agoFix: fixed UI description of Action.new() function
Sybren A. Stüvel [Tue, 21 Jul 2015 12:20:42 +0000 (14:20 +0200)]
Fix: fixed UI description of Action.new() function

5 years agoMath Lib: use vector funcs for isect_line_line_v2_point
Campbell Barton [Tue, 21 Jul 2015 11:33:57 +0000 (21:33 +1000)]
Math Lib: use vector funcs for isect_line_line_v2_point

5 years agoFix T45471: Blend file: Bad old_addr handling in mesh's customdata writing.
Bastien Montagne [Tue, 21 Jul 2015 10:02:11 +0000 (12:02 +0200)]
Fix T45471: Blend file: Bad old_addr handling in mesh's customdata writing.

Issue is rather well explained in T45471: our current customdata writing code easily generates several different blocks in blend file with same 'old' address. This is bad, because those addresses are used as 'uid' during reading process (it kind of work in Blender's own reading process, by mere luck mostly, but breaks the file specs).

Solution (suggested by Campbell, thanks) implemented by this patch is to avoid duplicating everything, and instead just overwrite what we needs to skip some cdlayers on write:
* the CustomData's `totlayer` number;
* the CustomData's `layers` array of CustomDataLayer (keeping its original address using the `writestruct_at_address` helper).

New design allows us to get completely rid of the no_free flag stuff in `write_customdata()`.

Note that this implies written data is **not** directly valid from Blend PoV, since its written typemap does not match written layers (this is not an issue because typemap is rebuilt on read anyway - and it's easy to fix this if really needed).

Also, the backward compatibility saving of mface data remains an issue here, see comment in code.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Maniphest Tasks: T45471

Differential Revision: https://developer.blender.org/D1425

5 years agoCycles: Another attempt to solve CUDA compilation errors on 32bit platforms
Sergey Sharybin [Tue, 21 Jul 2015 09:42:32 +0000 (11:42 +0200)]
Cycles: Another attempt to solve CUDA compilation errors on 32bit platforms