blender.git
4 years agoSplit ray_face_intersection into quad/tri versions
Campbell Barton [Thu, 16 Jul 2015 18:15:24 +0000 (04:15 +1000)]
Split ray_face_intersection into quad/tri versions

Since many callers only need a single triangle

4 years agoAdd tessellation data to DerivedMesh (LoopTri)
Campbell Barton [Thu, 16 Jul 2015 17:36:03 +0000 (03:36 +1000)]
Add tessellation data to DerivedMesh (LoopTri)

This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.

This doesn't yet move all internal code from MFace to LoopTri just yet.

Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint

Thanks to @psy-fi for review, fixes and improvements to drawing!

4 years agoFix T45428: Sometimes in a dupligroup linked actuators are not triggered
Dalai Felinto [Thu, 16 Jul 2015 15:37:42 +0000 (12:37 -0300)]
Fix T45428: Sometimes in a dupligroup linked actuators are not triggered

Revert "BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse."

This reverts commit 371e5f25a054759014efa27c6fe4d497854ed64e.

The fix is basically to revert the cleanup commit 371e5f25 (and 3d658bf7)
Also 5dc22fbbf had to be adapted to the reverted code.

Conflicts:
source/gameengine/Ketsji/KX_Scene.cpp

4 years agoFix T45459: Edge Length with Separate Units Displayed As 1m 100cm.
Bastien Montagne [Thu, 16 Jul 2015 15:45:51 +0000 (17:45 +0200)]
Fix T45459: Edge Length with Separate Units Displayed As 1m 100cm.

Our 'unit epsilon' was too small, given the fact we only display up to four digits usually...

4 years agoFix T45451: File Browser crash on 16bits PNG image previews.
Bastien Montagne [Thu, 16 Jul 2015 15:26:53 +0000 (17:26 +0200)]
Fix T45451: File Browser crash on 16bits PNG image previews.

Issue was that with those files, Blender generate a float image by default, not a byte one...

Now, we ensure in two places we only get a byte imbuf for our thumbnails!

4 years agoFix for the previous commit: overallocation of an array
Sergey Sharybin [Thu, 16 Jul 2015 15:26:20 +0000 (17:26 +0200)]
Fix for the previous commit: overallocation of an array

4 years agoFix T45446: Crash when baking a certain object
Sergey Sharybin [Thu, 16 Jul 2015 15:21:34 +0000 (17:21 +0200)]
Fix T45446: Crash when baking a certain object

Issue was caused by deform vert layer existing in the mesh.
Solved in quite simple way, but it still might be missing
some other layers.

Any custom data experts around to check if it's correct?

4 years agoSculpt draw code:
Antony Riakiotakis [Thu, 16 Jul 2015 14:22:28 +0000 (16:22 +0200)]
Sculpt draw code:

Remove legacy code completely, now dyntopo, multires et al even work on
GL 1.1 for really hardcore users :p

Real purpose here though is to be able to have fast multires drawing
even with VBO off, since it requires using indices for vertex buffers.

Also made own code elf puke an eaten normal update function which
made multires not update normals in solid mode...sorry.

4 years agoFix T45456: Error's in splash don't restore cursor
Campbell Barton [Thu, 16 Jul 2015 07:28:20 +0000 (17:28 +1000)]
Fix T45456: Error's in splash don't restore cursor

4 years agoDisable check for recent-files.txt existing
Campbell Barton [Thu, 16 Jul 2015 06:57:10 +0000 (16:57 +1000)]
Disable check for recent-files.txt existing

slows startup on remote, network fs... etc.

4 years agoFix T45447: Area light importance sampling improvement
Stefan Werner [Thu, 16 Jul 2015 06:31:02 +0000 (08:31 +0200)]
Fix T45447: Area light importance sampling improvement

Turning on importance sampling on area lights increases noise on diffuse
surfaces. This was caused by PDF calculated for an intersected point on
light instead of original light position.

Patch by Stefan with some own modifications.

4 years agoOptimize Vertex Color update
Campbell Barton [Thu, 16 Jul 2015 05:47:23 +0000 (15:47 +1000)]
Optimize Vertex Color update

Avoid recalculating the material color when its the same as the last.

4 years agoIcons: Add new 'library_data_broken' one.
Bastien Montagne [Wed, 15 Jul 2015 18:01:49 +0000 (20:01 +0200)]
Icons: Add new 'library_data_broken' one.

4 years ago VBO offscreen selection drawing, cdderivedmesh
Antony Riakiotakis [Wed, 15 Jul 2015 16:50:02 +0000 (18:50 +0200)]
VBO offscreen selection drawing, cdderivedmesh

    Get rid of legacy drawing, it's only used for selection,
    in which case we can prepare a temporary color buffer and draw
    at once. Code is not complete here because we still redundantly
    set the draw color in the draw function and don't ommit hidden
    faces automatically. Still it works 100% without immediate mode
    now.

4 years agoFix own stupid error in yesterday's refactor of recursive dir creation.
Bastien Montagne [Wed, 15 Jul 2015 15:43:04 +0000 (17:43 +0200)]
Fix own stupid error in yesterday's refactor of recursive dir creation.

Missed adding return value in one place.

Thanks a lot to Thomas Szepe for reporting the issue and finding the solution!

Question remains: how could MSVC allow such a code to compile in some cases
(own win64 + scons buildbot win32 were OK with that it seems!).
Crappy compiler, not comming to the rescue of stupid dev...

4 years agoCycles: Merging of patch from OSX went wrong in the previous change
Sergey Sharybin [Wed, 15 Jul 2015 13:12:19 +0000 (15:12 +0200)]
Cycles: Merging of patch from OSX went wrong in the previous change

That's what happens when you can't commit from a system you're making
changes at and someone is behind your back...

Sorry for the noise.

4 years agoCycles: Missed this in the previous commit
Sergey Sharybin [Wed, 15 Jul 2015 13:10:28 +0000 (15:10 +0200)]
Cycles: Missed this in the previous commit

4 years agoFix T45439 crash with subsurf when many materials present.
Antony Riakiotakis [Wed, 15 Jul 2015 12:57:49 +0000 (14:57 +0200)]
Fix T45439 crash with subsurf when many materials present.

Silly oversight on the viewport patch

4 years agoCycles: Enable OpenCL rendering on Apple OSX
Sergey Sharybin [Wed, 15 Jul 2015 09:16:12 +0000 (11:16 +0200)]
Cycles: Enable OpenCL rendering on Apple OSX

Requires having latest El Capitan beta 3 OSX due to ome crucial fixes made in the
compiler. Supports same features as NVidia OpenCL apart from CMJ (there's no
experimental feature set support in megakernel yet).

Uses megakernel internally, which works much better than the split kernel. Split
kernel is not supported on OSX still, needs to be investigated still.

Some more details can be found there:

  http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/OpenCL#AMD_on_OSX

4 years agoFix autosmooth with recent DM optimizations
Campbell Barton [Wed, 15 Jul 2015 04:32:11 +0000 (14:32 +1000)]
Fix autosmooth with recent DM optimizations

Also avoid multiple float->short conversions for the same normal.

4 years agoDerivedMesh: minor changes to callback use
Campbell Barton [Wed, 15 Jul 2015 02:42:41 +0000 (12:42 +1000)]
DerivedMesh: minor changes to callback use

- use void instead of float for array arg (cast in the switch statement)
- remove unused args
- use const for poly-mapping and user_data args

4 years agoCleanup: ws
Campbell Barton [Wed, 15 Jul 2015 02:08:32 +0000 (12:08 +1000)]
Cleanup: ws

4 years agoCleanup: ws
Campbell Barton [Wed, 15 Jul 2015 01:43:23 +0000 (11:43 +1000)]
Cleanup: ws

4 years agoMinor English grammar typo fixes.
Nikolaus Leopold [Wed, 15 Jul 2015 01:33:10 +0000 (03:33 +0200)]
Minor English grammar typo fixes.

This fixes T45433.

Reviewers: Severin, kevindietrich

Reviewed By: kevindietrich

Projects: #bf_blender, #user_interface

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

4 years agoFix overdrawing and errors with textured and mapped drawing
Antony Riakiotakis [Tue, 14 Jul 2015 21:48:38 +0000 (23:48 +0200)]
Fix overdrawing and errors with textured and mapped drawing

4 years agoUsual i18n messages fixes...
Bastien Montagne [Tue, 14 Jul 2015 19:41:24 +0000 (21:41 +0200)]
Usual i18n messages fixes...

4 years agoFix T45424: Blender able to create folders with invalid characters at the end of...
Bastien Montagne [Tue, 14 Jul 2015 16:48:51 +0000 (18:48 +0200)]
Fix T45424: Blender able to create folders with invalid characters at the end of the name.

In fact, filebrowser was not making any checks for invalid file/dir names here!

Added checks in the three places that should be protected:
* Renaming.
* Creating dirs.
* Typing in filename field.

4 years agoBLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().
Bastien Montagne [Tue, 14 Jul 2015 16:42:22 +0000 (18:42 +0200)]
BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().

BLI_filename_make_safe had several issues:
* Would replace all dots ('.'), not a great idea since it would break extensions.
* Was not checking for 'control' ASCII chars (though unlikely, better to be safe here).
* Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.).

New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().

4 years agoBLI_fileops: Make BLI_dir_create_recursive() return success/error status.
Bastien Montagne [Tue, 14 Jul 2015 16:36:48 +0000 (18:36 +0200)]
BLI_fileops: Make BLI_dir_create_recursive() return success/error status.

Handy to know directly whether a file creation succeeded or not.

Also, made a few more changes in this func, and harmonized a bit win32/*nix versions.

4 years agoParticle Info node support for GLSL mode and the internal render.
Alexander Romanov [Tue, 14 Jul 2015 16:48:54 +0000 (18:48 +0200)]
Particle Info node support for GLSL mode and the internal render.

With this patch "Particle Info" node from Cycles works in GLSL and BI

Alexander (Blend4Web Team)

Reviewers: psy-fi
Note: moved particle info to object render instance instead of
shadeinput during review - Antony.

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

4 years agoDisplay optimizations part 1.
Antony Riakiotakis [Tue, 14 Jul 2015 14:48:23 +0000 (16:48 +0200)]
Display optimizations part 1.

This patch changes the way we draw meshes by introducing
indexed drawing. This makes it possible to easily
upload and rearrange faces ad lib according to any criteria.

Currently we use material sorting but textured sorting and
hiding will be added to optimize textured drawing and skip
per face testing.

It also adds support for vertex buffers for subsurf
modifiers (Except from GLSL drawing), making drawing of
subsurf much faster without need for bogus modifiers.

Tests show that we gain approximately 20-25% performance
by that for solid mode drawing with up to 50% gains for
material drawing. Textured drawing should also have a
small performance gain, but more substantial optimizations
are possible there.

Reviewers: campbellbarton

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

4 years agoCorrect last commit
Campbell Barton [Tue, 14 Jul 2015 13:37:11 +0000 (23:37 +1000)]
Correct last commit

4 years agoMove from MTFace to MTexPoly w/ texture checks
Campbell Barton [Tue, 14 Jul 2015 12:27:25 +0000 (22:27 +1000)]
Move from MTFace to MTexPoly w/ texture checks

Part of moving away from MFace.

4 years agoMatch face tessellation order in edimode
Campbell Barton [Tue, 14 Jul 2015 12:09:14 +0000 (22:09 +1000)]
Match face tessellation order in edimode

add a negated version of axis_dominant_v3_to_m3

4 years agoCleanup: headers (wm)
Campbell Barton [Tue, 14 Jul 2015 08:37:14 +0000 (18:37 +1000)]
Cleanup: headers (wm)

4 years agoFix for recent optimization commit in endian switch
Sergey Sharybin [Tue, 14 Jul 2015 09:33:50 +0000 (11:33 +0200)]
Fix for recent optimization commit in endian switch

Pre-4.8 GCC had a bug which lead to non-exposed __builtin_bswap16() symbol.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for details.

4 years agoFix T45423: depsgraph: crash in IDDepsNode::tag_update
Sergey Sharybin [Tue, 14 Jul 2015 09:19:27 +0000 (11:19 +0200)]
Fix T45423: depsgraph: crash in IDDepsNode::tag_update

Two issues fixed in this commit:

- Clearing or adding animation via python should ensure relations are valid.
- Animation component animation data might be null caused by removing animation
  from python.

4 years agoMake tooltip parsable by human compilers (thanks to Pablo for
Antony Riakiotakis [Tue, 14 Jul 2015 09:18:27 +0000 (11:18 +0200)]
Make tooltip parsable by human compilers (thanks to Pablo for
suggestion)

4 years agoData Transfer: very minor cleanup...
Bastien Montagne [Tue, 14 Jul 2015 09:13:20 +0000 (11:13 +0200)]
Data Transfer: very minor cleanup...

4 years agoWorkaround for non-bleeding edge compilers and const cast of pointer arrays.
Sergey Sharybin [Tue, 14 Jul 2015 07:55:21 +0000 (09:55 +0200)]
Workaround for non-bleeding edge compilers and const cast of pointer arrays.

4 years agoCycles: Add logging to detected OpenCL platforms and devices
Sergey Sharybin [Tue, 14 Jul 2015 07:49:15 +0000 (09:49 +0200)]
Cycles: Add logging to detected OpenCL platforms and devices

Happens on verbosity level 2, should help looking into some of the
bug reports in the tracker.

4 years agoCleanup: replace BLI_split_file_part w/ BLI_path_basename
Campbell Barton [Mon, 13 Jul 2015 23:34:53 +0000 (09:34 +1000)]
Cleanup: replace BLI_split_file_part w/ BLI_path_basename

4 years agoCleanup: use ascii as suffix (as with utf8)
Campbell Barton [Mon, 13 Jul 2015 23:17:00 +0000 (09:17 +1000)]
Cleanup: use ascii as suffix (as with utf8)

4 years agoBKE_deform: assert on invalid args
Campbell Barton [Mon, 13 Jul 2015 22:41:15 +0000 (08:41 +1000)]
BKE_deform: assert on invalid args

Will phase these out eventually

4 years agoDraw emboss when area is full but in quad-split
Campbell Barton [Mon, 13 Jul 2015 21:28:30 +0000 (07:28 +1000)]
Draw emboss when area is full but in quad-split

4 years agoFix T45348: Collapse gives sel verts in face mode
Campbell Barton [Mon, 13 Jul 2015 21:02:35 +0000 (07:02 +1000)]
Fix T45348: Collapse gives sel verts in face mode

4 years agoEditMesh: show angles of adjacent selected verts
Campbell Barton [Mon, 13 Jul 2015 20:30:02 +0000 (06:30 +1000)]
EditMesh: show angles of adjacent selected verts

Useful since moving vertices will change angles on adjacent,
unselected face-corners too.

4 years agoFix T45247: Softbody ignores lattice weight
Campbell Barton [Mon, 13 Jul 2015 20:18:58 +0000 (06:18 +1000)]
Fix T45247: Softbody ignores lattice weight

Now multiply the lattice wight by the goal weight too.

4 years agoSoftbody goal weights cleanup
Campbell Barton [Mon, 13 Jul 2015 20:10:56 +0000 (06:10 +1000)]
Softbody goal weights cleanup

- avoid searching for vertex group for each vertex.
- add support for mass and spring weights to lattice.
- multiply the vertex group weight by the overall goal weight value.

4 years agoAdd some pedantic casts, since some guys around like to take all warnings from their...
Bastien Montagne [Mon, 13 Jul 2015 20:00:49 +0000 (22:00 +0200)]
Add some pedantic casts, since some guys around like to take all warnings from their compilers as errors, even the stupidest ones!

4 years agoincrease mathutils callback count (BGE devs, read the log)
Dalai Felinto [Mon, 13 Jul 2015 19:11:59 +0000 (16:11 -0300)]
increase mathutils callback count (BGE devs, read the log)

This was causing the BGE to crash on Debug mode when built with "break on asserts", meaning the BGE was not debuggeable.
Please make sure to test patches in debug mode with the proper flags enabled before committing

4 years agoRNA assert: make object game state to comply with RNA_property_boolean_get_index...
Dalai Felinto [Mon, 13 Jul 2015 18:51:31 +0000 (15:51 -0300)]
RNA assert: make object game state to comply with RNA_property_boolean_get_index() 1/0 requirement

4 years agoFix T45402: Transform crash w/ project+align snap
Campbell Barton [Mon, 13 Jul 2015 18:27:32 +0000 (04:27 +1000)]
Fix T45402: Transform crash w/ project+align snap

Only euler rotations were checked for.
Also delta rotations caused random/unusable output.

4 years agoFix T45394: Motion tracking constraints did not work with Cycles motion blur
Sergey Sharybin [Mon, 13 Jul 2015 16:17:07 +0000 (18:17 +0200)]
Fix T45394: Motion tracking constraints did not work with Cycles motion blur

4 years agoData Transfer: Add an option to 'auto-transform' destination mesh so that it matches...
Bastien Montagne [Mon, 13 Jul 2015 16:00:08 +0000 (18:00 +0200)]
Data Transfer: Add an option to 'auto-transform' destination mesh so that it matches best the source one.

This allows to match and transfer data between two meshes with similar shape but complete arbitrary different transform.

Note that the result will be best if the meshes (more precisely, their vertices) are exact copies of each other.
Otherwise, method used can only perform an approximated best match, which means you'll likely get better
results if you 'visually' make them match in 3D space (and use 'Object Transform') instead.

4 years agoAdd BLI_math_statistics, where stats tool shall be!
Bastien Montagne [Mon, 13 Jul 2015 15:53:22 +0000 (17:53 +0200)]
Add BLI_math_statistics, where stats tool shall be!

For now, only contains some 3x3 matrix covariance computing.

4 years agoAdd BLI_math_solver, where non-linear solvers should be.
Bastien Montagne [Mon, 13 Jul 2015 15:48:13 +0000 (17:48 +0200)]
Add BLI_math_solver, where non-linear solvers should be.

For now, only has an eigen solver for 3×3 (symmetric) matrix.

4 years agoAdd a skeleton of C API for Eigen3.
Bastien Montagne [Mon, 13 Jul 2015 15:40:06 +0000 (17:40 +0200)]
Add a skeleton of C API for Eigen3.

Title says pretty much everything. For now, only thing available is a solver of eigen
values/vectors for self-adjoint matrices.

We can easily add more when needed.

Thanks to Sergey and Campbell for quick review.

4 years agoAdd icon scale argument for ui-template-previews
Campbell Barton [Mon, 13 Jul 2015 15:46:25 +0000 (01:46 +1000)]
Add icon scale argument for ui-template-previews

4 years agoAllow spin/screw to run outside 3D view
Campbell Barton [Mon, 13 Jul 2015 14:55:04 +0000 (00:55 +1000)]
Allow spin/screw to run outside 3D view

This lets scripts call them

4 years agoFix T45364: NEW DEPSGRAPH: New Torus created can't be transformed
Sergey Sharybin [Mon, 13 Jul 2015 13:59:58 +0000 (15:59 +0200)]
Fix T45364: NEW DEPSGRAPH: New Torus created can't be transformed

Linking objects to a scene via python should ensure relations are properly
updated for that scene.

4 years agoFix T45333: Volume Scatter crash blender
Sergey Sharybin [Mon, 13 Jul 2015 13:53:48 +0000 (18:53 +0500)]
Fix T45333: Volume Scatter crash blender

4 years agoFreestyle: Fix compilation error with strict compiler flags
Sergey Sharybin [Mon, 13 Jul 2015 13:24:19 +0000 (15:24 +0200)]
Freestyle: Fix compilation error with strict compiler flags

4 years agoFix T45390: Cycles experimental displacement method ignores scaling when render
Sergey Sharybin [Mon, 13 Jul 2015 13:22:36 +0000 (15:22 +0200)]
Fix T45390: Cycles experimental displacement method ignores scaling when render

From artists perspective it makes sense to always apply displacement in a local
space.

TODO: Double-check that BVH is being packed properly. From quick tests seems it's
all fine, but might be missing some obvious failure still.

4 years agoCleanup: IMB prefix for ImBuf defines
Campbell Barton [Mon, 13 Jul 2015 12:00:07 +0000 (22:00 +1000)]
Cleanup: IMB prefix for ImBuf defines

4 years ago Imbuf types refactor.
Antony Riakiotakis [Mon, 13 Jul 2015 11:58:17 +0000 (13:58 +0200)]
Imbuf types refactor.

    ImBuf types were getting stored as bitflags in a 32bit integer which had
    already run out of space. Solved the problem by separating file type to
    an ftype enum, and file specific options to foptions.

    Reviewed by Campbell, thanks a lot!

4 years agoUse regex for cmake config parsing
Campbell Barton [Mon, 13 Jul 2015 10:03:15 +0000 (20:03 +1000)]
Use regex for cmake config parsing

4 years agoFix T45397: Frameserver rendering no longer works in 2.75 or 2.75a
Sergey Sharybin [Mon, 13 Jul 2015 09:10:33 +0000 (11:10 +0200)]
Fix T45397: Frameserver rendering no longer works in 2.75 or 2.75a

Issue was caused by a typo in original multiview commit.

4 years agoFix T45385: Crash on render occurring when two hair modifiers are active that both...
Sergey Sharybin [Mon, 13 Jul 2015 09:01:34 +0000 (11:01 +0200)]
Fix T45385: Crash on render occurring when two hair modifiers are active that both use a UV mapped material for render

Not sure it's totally correct solution, but seems reasonable because it's
possible dmcache is set to ISCHILD.

Someone more familiar with the particles code might want to revisit this :)

4 years agoMinor tweaking to Knife header text.
Bastien Montagne [Sun, 12 Jul 2015 19:52:59 +0000 (21:52 +0200)]
Minor tweaking to Knife header text.

Confirm/cancel shall always be first, and also makes more sense to have
define cut/close cut/new cut together.

4 years agoShortcut-to-string converter: add 'dbl-' in front of key when expecting a double...
Bastien Montagne [Sun, 12 Jul 2015 19:39:59 +0000 (21:39 +0200)]
Shortcut-to-string converter: add 'dbl-' in front of key when expecting a double-click.

I think this is the only Keymap value we really need to handle here...

4 years agoAdd new modalkeymap usage in helper header message to Knife tool.
Bastien Montagne [Sun, 12 Jul 2015 19:32:16 +0000 (21:32 +0200)]
Add new modalkeymap usage in helper header message to Knife tool.

4 years agoAdd new modalkeymap usage in helper header message to Fly mode.
Bastien Montagne [Sun, 12 Jul 2015 19:14:06 +0000 (21:14 +0200)]
Add new modalkeymap usage in helper header message to Fly mode.

4 years agoCleanup: style
Campbell Barton [Sun, 12 Jul 2015 17:48:08 +0000 (03:48 +1000)]
Cleanup: style

4 years agoRemove redundant string copy
Campbell Barton [Sun, 12 Jul 2015 17:43:41 +0000 (03:43 +1000)]
Remove redundant string copy

4 years agoMissed essential part in previous commit.
Bastien Montagne [Sun, 12 Jul 2015 17:04:31 +0000 (19:04 +0200)]
Missed essential part in previous commit.

Or how to epic fail a fix when working on two different systems.
Or how to increase your commit rate.

4 years agoFix T45375: Cant clear temp fluid cache after closing Blender (Windows).
Bastien Montagne [Sun, 12 Jul 2015 16:47:29 +0000 (18:47 +0200)]
Fix T45375: Cant clear temp fluid cache after closing Blender (Windows).

There was two different issues here actually:
* Own (very high) stupidity only gave 8 chars to file name (sic).
* list dir returns dirpaths without a trailing slahs, but expects them to have it it seems. :|

4 years agoCycles: Expose "Max Bounces" for the world light.
Thomas Dinges [Sun, 12 Jul 2015 15:56:54 +0000 (17:56 +0200)]
Cycles: Expose "Max Bounces" for the world light.

When using MIS, the world is treated as regular light and in this case
we can now also limit the maximum amount of bounces, the background light
will contribute to the scene.

This can improve performance in some cases, where it's e.g. sufficient to
only have a contribution on first 1-2 bounces.
Examples can be found in the differential.

Differential revision: https://developer.blender.org/D1399

4 years agoBGE Clean-up: New EXP prefix for the BGE Expression module
Jorge Bernal [Sun, 12 Jul 2015 14:55:33 +0000 (16:55 +0200)]
BGE Clean-up: New EXP prefix for the BGE Expression module

The expression module now uses an EXP prefix and it follows a
distribution similar to blender.

Additionally the hash function in EXP_HashedPtr.h was simplified and the
files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused.

Reviewers: campbellbarton, moguri, sybren, hg1

Projects: #game_engine

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

4 years agoFix crash in redraw timer
Campbell Barton [Sun, 12 Jul 2015 14:21:08 +0000 (00:21 +1000)]
Fix crash in redraw timer

Was modifying wrong regions flag, that could also be NULL.

4 years agoAdd ability for redraw timer to run for fixed time
Campbell Barton [Sun, 12 Jul 2015 12:57:35 +0000 (22:57 +1000)]
Add ability for redraw timer to run for fixed time

Also avoid accessing context vars in timer loop.

4 years agoPyAPI: Use separate writes for operator reports
Campbell Barton [Sun, 12 Jul 2015 12:16:54 +0000 (22:16 +1000)]
PyAPI: Use separate writes for operator reports

This allows us to temp override the stdout and extract individual reports

4 years agoDocs; Py API gotcha's section
Campbell Barton [Sun, 12 Jul 2015 10:50:44 +0000 (20:50 +1000)]
Docs; Py API gotcha's section

Minor corrections and cleanup

4 years agoUse const for direntry strings
Campbell Barton [Sat, 11 Jul 2015 19:50:07 +0000 (05:50 +1000)]
Use const for direntry strings

4 years agoFile Browser: Fix possible bug and some minor tweaks
Julian Eisel [Sat, 11 Jul 2015 19:37:50 +0000 (21:37 +0200)]
File Browser: Fix possible bug and some minor tweaks

BLI_add_slash appended to a char *, a potential buffer overflow

Also partially removed an assert, which failed after changing file format of a saved image. We need a better way to handle such cases.

4 years agoError in last commit
Campbell Barton [Sat, 11 Jul 2015 19:35:44 +0000 (05:35 +1000)]
Error in last commit

4 years agoMinor changes for more efficient endian switching
Campbell Barton [Sat, 11 Jul 2015 19:33:04 +0000 (05:33 +1000)]
Minor changes for more efficient endian switching

4 years agoUse const for sculpt vars
Campbell Barton [Sat, 11 Jul 2015 17:49:47 +0000 (03:49 +1000)]
Use const for sculpt vars

resolves building with gcc4.9

4 years agoImBuf: Fix compilation error with older libpng
Sergey Sharybin [Sat, 11 Jul 2015 17:18:20 +0000 (19:18 +0200)]
ImBuf: Fix compilation error with older libpng

Older libpng library does not use const pointer to a memory.

The exact version is a bit of a guess here, maybe needs tweaks to it tho.

4 years agoremove redundant casts
Campbell Barton [Sat, 11 Jul 2015 16:53:37 +0000 (02:53 +1000)]
remove redundant casts

4 years agoerror in own last commit
Campbell Barton [Sat, 11 Jul 2015 15:43:32 +0000 (01:43 +1000)]
error in own last commit

4 years agoAdd Thai and Khmer charsets to our i18n font.
Bastien Montagne [Sat, 11 Jul 2015 16:02:19 +0000 (18:02 +0200)]
Add Thai and Khmer charsets to our i18n font.

4 years agoAvoid static var for OpenEXR
Campbell Barton [Sat, 11 Jul 2015 15:43:32 +0000 (01:43 +1000)]
Avoid static var for OpenEXR

4 years agoMake Iris image loading thread-safe
Campbell Barton [Sat, 11 Jul 2015 15:06:32 +0000 (01:06 +1000)]
Make Iris image loading thread-safe

Needed for thumbnails

4 years agoImBuf: cleanup, use const for memory passed in
Campbell Barton [Sat, 11 Jul 2015 13:52:18 +0000 (23:52 +1000)]
ImBuf: cleanup, use const for memory passed in

4 years agoAdd some basic report/timing/logging tool as util py module `progress_report`.
Bastien Montagne [Sat, 11 Jul 2015 14:47:59 +0000 (16:47 +0200)]
Add some basic report/timing/logging tool as util py module `progress_report`.

It supports any level of sub-steps, timing, messaging, and uses WindowManage.progress API
to report progress in UI, in addition to console printing.

4 years agoAdd WM_framebuffer_to_index_array
Campbell Barton [Sat, 11 Jul 2015 11:09:22 +0000 (21:09 +1000)]
Add WM_framebuffer_to_index_array

Convert buffer to index in one loop,
also minor cleanup to backbuf/selection functions.

- Use IMB_rectcpy instead of inline pixel copy.
- Redundant WM_framebuffer_to_index call.

4 years agoFile Browser: Keep file name after changing directory
Julian Eisel [Sat, 11 Jul 2015 03:20:35 +0000 (05:20 +0200)]
File Browser: Keep file name after changing directory

Actually this was an intentional change in rBaeeb23efa28dc to prevent Blender from trying to open the old file from the new directory. Issue is that this is really bad for saving and basically breaks "Save As".

Some more tweaks were needed to make it work like before, so now it keeps the name of the last selected file, but clears it when selecting a folder.

4 years agoBLI_matrix space_transform: Add a 'local-invariant' setter.
Bastien Montagne [Fri, 10 Jul 2015 22:04:27 +0000 (00:04 +0200)]
BLI_matrix space_transform: Add a 'local-invariant' setter.

`BLI_space_transform_from_matrices()` defines a 'global-invariant' transform
(same point in global space, two different coordinates in local and target spaces).

New `BLI_space_transform_global_from_matrices()` is kind of opposite, it defines
a 'local-invariant' transform (two different points in global space, same coordinates in local and target spaces).

Useful to 'match' meshes.

4 years agoFix T45405: Crash on opening a file (in filebrowser code)
Julian Eisel [Fri, 10 Jul 2015 20:04:06 +0000 (22:04 +0200)]
Fix T45405: Crash on opening a file (in filebrowser code)

Quoting Bastien from IRC: "Filebrowser is a nest of bad surprises" -- indeed :S