blender.git
4 years agoFreestyle: disabled debug code in ViewMapBuilder::ComputeIntersections().
Tamito Kajiyama [Fri, 15 Aug 2014 07:38:41 +0000 (16:38 +0900)]
Freestyle: disabled debug code in ViewMapBuilder::ComputeIntersections().

4 years agoFreestyle: Removed tesselated forms of silhouettes for displaying in the UI.
Tamito Kajiyama [Thu, 14 Aug 2014 07:58:17 +0000 (16:58 +0900)]
Freestyle: Removed tesselated forms of silhouettes for displaying in the UI.

The tesselated silhouettes were not used in Freestyle for Blender at all.

4 years agoFreestyle: code cleanup.
Tamito Kajiyama [Fri, 1 Aug 2014 03:49:04 +0000 (12:49 +0900)]
Freestyle: code cleanup.

Removed unnecessary header files and replaced some other heade files with
forward class declarations.

4 years agoFreestyle: minor optimization for space in the FEdgeXDetector.
Tamito Kajiyama [Wed, 30 Jul 2014 08:08:31 +0000 (17:08 +0900)]
Freestyle: minor optimization for space in the FEdgeXDetector.

Member variables and auto variables were changed from real (double) to float
in most part of the FEdgeXDetector (except for curvature computations).

4 years agoFreestyle: commented part of FEdgeXDetector::ProcessRidgeFace() that has no effect.
Tamito Kajiyama [Wed, 30 Jul 2014 07:11:10 +0000 (16:11 +0900)]
Freestyle: commented part of FEdgeXDetector::ProcessRidgeFace() that has no effect.

4 years agoFreestyle: internal switch from double to float in mesh loading and construction...
Tamito Kajiyama [Sat, 27 Jun 2015 13:07:51 +0000 (22:07 +0900)]
Freestyle: internal switch from double to float in mesh loading and construction of winged edges.

4 years agoFreestyle: minor optimization for space from mesh importing to feature edge detection.
Tamito Kajiyama [Fri, 25 Jul 2014 04:26:24 +0000 (13:26 +0900)]
Freestyle: minor optimization for space from mesh importing to feature edge detection.

Several class member variables were removed (at the cost of computing their values
when retrieved) or changed to a type of smaller size.  Also fixed whitespace.

4 years agoFreestyle: minor code cleanup.
Tamito Kajiyama [Sun, 27 Jul 2014 13:17:19 +0000 (22:17 +0900)]
Freestyle: minor code cleanup.

4 years agoFreestyle: removed redundant instantiation of vector objects.
Tamito Kajiyama [Sun, 27 Jul 2014 12:58:05 +0000 (21:58 +0900)]
Freestyle: removed redundant instantiation of vector objects.

4 years agoFreestyle: minor optimization for space by using a pointer to a const char array...
Tamito Kajiyama [Fri, 25 Jul 2014 03:23:09 +0000 (12:23 +0900)]
Freestyle: minor optimization for space by using a pointer to a const char array instead of std::string.

4 years agoCleanup: style
Campbell Barton [Sun, 19 Jul 2015 19:19:47 +0000 (05:19 +1000)]
Cleanup: style

Also 'com' as abbreviation for center-of-mass is a bit confusing, rename to 'center'.

4 years agoConvert rigidbody conversion to looptri.
Antony Riakiotakis [Sun, 19 Jul 2015 17:10:41 +0000 (19:10 +0200)]
Convert rigidbody conversion to looptri.

Patch D1417 by Martin Felke, with minor edits thanks!

4 years agoProperly fix T45477
Antony Riakiotakis [Sun, 19 Jul 2015 16:35:09 +0000 (18:35 +0200)]
Properly fix T45477

Code was actually skipping setting color selection indices and previous
commit actually broke mask selection in texture painting.
All should work now.

4 years agoFix T45477 wrong edge selection.
Antony Riakiotakis [Sun, 19 Jul 2015 16:04:21 +0000 (18:04 +0200)]
Fix T45477 wrong edge selection.

Caused by own changes to framebuffer selection code, code was not
packing color ids correctly.

4 years agoFix T45495: Armatures using the iTaSC IK solver causes UI truncation in bone constrai...
Bastien Montagne [Sun, 19 Jul 2015 14:25:48 +0000 (16:25 +0200)]
Fix T45495: Armatures using the iTaSC IK solver causes UI truncation in bone constraints panel.

Caused by rB404f9ddc37fc, cleanup is OK but please double-check changes before committing. :(

4 years agoCMake: correct generated location for buildinfo.h
Campbell Barton [Sat, 18 Jul 2015 23:53:38 +0000 (09:53 +1000)]
CMake: correct generated location for buildinfo.h

4 years agoFix error when getting the commit time fails
Campbell Barton [Sat, 18 Jul 2015 23:51:49 +0000 (09:51 +1000)]
Fix error when getting the commit time fails

While this should work, allow the build to succeed if for some reason the command fails.

4 years agoFix T45484: Regression OpenCL split: access violation
Sergey Sharybin [Sat, 18 Jul 2015 21:30:19 +0000 (23:30 +0200)]
Fix T45484: Regression OpenCL split: access violation

That was a primary school error caused by moving statements inside assert()
which effectivly disabled crucial code in release builds.

4 years agoCycles: Fix compilation of OpenCL kernel after point density commit
Sergey Sharybin [Sat, 18 Jul 2015 21:05:29 +0000 (23:05 +0200)]
Cycles: Fix compilation of OpenCL kernel after point density commit

4 years agoPoint density: Workaround for possible race condition
Sergey Sharybin [Sat, 18 Jul 2015 20:57:02 +0000 (22:57 +0200)]
Point density: Workaround for possible race condition

There was possible race condition in the point density sampling caused
by access to the same data in particle system from sampling thread and
sampling initialization.

Could have happened when two different point density textures were using
same particle system

4 years agoCycles: Point density texture support
Sergey Sharybin [Sat, 18 Jul 2015 20:36:09 +0000 (22:36 +0200)]
Cycles: Point density texture support

This commit implements point density texture for Cycles shading nodes.

It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.

Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.

This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.

Particle color support is done by Lukas, thanks!

4 years agoCycles: Add voxel texture sampler shader node
Sergey Sharybin [Sat, 18 Jul 2015 20:09:20 +0000 (22:09 +0200)]
Cycles: Add voxel texture sampler shader node

The idea of this node is to sampling of 3D voxels at a given coordinate
supporting different mapping strategies (world space mapping, object
local space etc).

Currently not in use, it's a preparation step for supporting point density
textures.

4 years agoPoint density: Add utility function to sample density outside of render pipeline
Sergey Sharybin [Sat, 18 Jul 2015 19:42:39 +0000 (21:42 +0200)]
Point density: Add utility function to sample density outside of render pipeline

Not currently used, it's a preparation for the further work.

Should not be functional changes.

4 years agoCycles: Camera frustum space object culling scene simplification
Sergey Sharybin [Fri, 10 Apr 2015 13:09:58 +0000 (18:09 +0500)]
Cycles: Camera frustum space object culling scene simplification

The idea is to give artists a simplier way to control memory usage in such
scenes as grass fields by doing automatic object culling based on whether
object is visible in the frame or not.

This is controlled on per-object level. In order to use this option few steps
are required:

- Enable Simplify in scene settings

- Enable Camera Cull option in the Simplify panel

- Set camera cull margin (measured in relative value to the render resolution)
  This setting is used to avoid possible flickering caused by changes in shadow
  which are cast by objects outside of the frame.

- Enable Camera Cull for objects which are desired to be culled
  (object culling option could be found in Option panel in object buttons).

There is still room for improvements, but this worked quite well during
Gooseberry open movie project, so think it's useful feature even in it's current
non-ideal state.

4 years agoCycles: Commit file missing from conditionally compiling baking kernel
Sergey Sharybin [Sat, 18 Jul 2015 14:26:41 +0000 (16:26 +0200)]
Cycles: Commit file missing from conditionally compiling baking kernel

4 years agoCycles: Log requested device features
Sergey Sharybin [Sat, 18 Jul 2015 14:00:07 +0000 (16:00 +0200)]
Cycles: Log requested device features

Useful to have this always logged because otherwise it's needed to remove cached
kernels and check build flags to see which features are enabled.

4 years agoCycles; Make baking a feature-specific option
Sergey Sharybin [Sat, 18 Jul 2015 13:34:32 +0000 (15:34 +0200)]
Cycles; Make baking a feature-specific option

This means render devices now might skip building baking kernels in cases when
only actual render-related functionality is used.

For now it's only implemented for OpenCL split kernel device and mainly needed
to work around some compiler-specific bugs which crashes on building the kernel.

Using OpenCL for baking might still crash the driver, but at least there is now
higher probability of that GPU will be usable to render the scene.

Real fix should actually be done in the driver side.

4 years agoCycles: Use feature-selective base kernel compilation when using split kernel
Sergey Sharybin [Sat, 18 Jul 2015 13:09:25 +0000 (15:09 +0200)]
Cycles: Use feature-selective base kernel compilation when using split kernel

The idea is to make all kernels as small as possible to work around possible
issues with buggy drivers which might fail building feature-complete kernels.

It's indeed just a workaround to make at last simple test scenes to render
on OpenCL. Real fix should happen from the driver side.

4 years agoCycles: Some cleanup if OpenCL base kernel load_kernel()
Sergey Sharybin [Sat, 18 Jul 2015 11:30:13 +0000 (13:30 +0200)]
Cycles: Some cleanup if OpenCL base kernel load_kernel()

Hopefully makes it less clumzy, should be no functional changes still.

4 years agoCycles: Make OpenCL cache follow out code style a bit closer
Sergey Sharybin [Sat, 18 Jul 2015 11:23:17 +0000 (13:23 +0200)]
Cycles: Make OpenCL cache follow out code style a bit closer

4 years agoUse gpu-buffers for UV-edge drawing
Campbell Barton [Sat, 18 Jul 2015 13:45:51 +0000 (23:45 +1000)]
Use gpu-buffers for UV-edge drawing

4 years agoFix/enhance behavior of VES's 'alt-rmb' selection.
Bastien Montagne [Sat, 18 Jul 2015 11:25:49 +0000 (13:25 +0200)]
Fix/enhance behavior of VES's 'alt-rmb' selection.

Main issue in previous code was that you could not shift-alt-rmb select several
contiguous strips, result was pretty much unusable.

Also, enhanced general behavior of this selection mode, now (similar to alt-rm clicking
on handles), when you alt-rmb click on a same strip several times, you alternate between:
* Strip is selected, neighbor handles are selected;
* Strip and its handles are selected, neighbor handles are selected.
…which allows you to either grab or slide the strip.

And refactored a bit code too, linked_handle has a complete different logic
than without this option, simpler and clearer to completely separate them in code.

Initial issue reported by Leon Cheung on IRC, thanks!

4 years agoReplace MFace w/ MLoopTri in imapaint_pick_uv
Campbell Barton [Sat, 18 Jul 2015 12:08:58 +0000 (22:08 +1000)]
Replace MFace w/ MLoopTri in imapaint_pick_uv

D1415 by @scorpion81, with minor edits

4 years agoFix (IRC reported) inverted behavior of select more/less in VSE.
Bastien Montagne [Sat, 18 Jul 2015 09:55:08 +0000 (11:55 +0200)]
Fix (IRC reported) inverted behavior of select more/less in VSE.

Also, cleaned up a bit that code, and added releavnt entries in Select menu.

Reported on IRC by Leon Cheung, thanks!

4 years agoCMake: Disable Werror in extern/libmv for now
Sergey Sharybin [Sat, 18 Jul 2015 09:13:11 +0000 (11:13 +0200)]
CMake: Disable Werror in extern/libmv for now

It gives issues with Glog compiled in release mode.

Need to revisit the directory layout here and compiler flag, because technically
libmv is now more an intern/ library and i'll actually prefer it to be covered
with strict flags as well. But it's a bit tricky because of libraries which we
don't maintain are in the libmv subfolder.

4 years agoCleanup: whitespace & break placement
Campbell Barton [Sat, 18 Jul 2015 09:02:39 +0000 (19:02 +1000)]
Cleanup: whitespace & break placement

4 years agoCMake: Add option to enable -Werror cflag in some areas
Sergey Sharybin [Sat, 18 Jul 2015 08:35:03 +0000 (10:35 +0200)]
CMake: Add option to enable -Werror cflag in some areas

It is rather annoying attitude nowadays to use const qualifier all over the
place, including using it for multi-dimensional arrays. This isn't really
supported in GCC prior to version 5.0 because it considers such an arrays
to be a "pointer to a const pointer" which gives implicit casting errors.

It's not possible to disable this particular type of warnings treated as
errors in any GCC version prior to 5.0 as well, meaning currently usage of
-Werror globally in Blender code is not possible at all.

This commit makes it possible to use -Werror in areas which are complaint
with older GCC versions. New advanced CMake options are:

- WITH_COMPOSITOR_WERROR
- WITH_LIBMV_WERROR
- WITH_CYCLES_WERROR

4 years agoCleanup: whitespace, wrong indent level
Campbell Barton [Sat, 18 Jul 2015 08:41:14 +0000 (18:41 +1000)]
Cleanup: whitespace, wrong indent level

4 years agoCleanup: whitespace (CMake)
Campbell Barton [Sat, 18 Jul 2015 08:21:17 +0000 (18:21 +1000)]
Cleanup: whitespace (CMake)

4 years agoCMake: Fix indentation around LLVM detection code
Sergey Sharybin [Sat, 18 Jul 2015 07:40:33 +0000 (09:40 +0200)]
CMake: Fix indentation around LLVM detection code

4 years agoCleanup: ws
Campbell Barton [Fri, 17 Jul 2015 19:54:31 +0000 (05:54 +1000)]
Cleanup: ws

4 years agoOnly use material callback when enabled
Campbell Barton [Fri, 17 Jul 2015 19:39:01 +0000 (05:39 +1000)]
Only use material callback when enabled

Vert/Face select in painting modes weren't drawing after recent changes.

4 years agoAdd check for GPU materials enable state
Campbell Barton [Fri, 17 Jul 2015 19:29:34 +0000 (05:29 +1000)]
Add check for GPU materials enable state

4 years agoAvoid getting the original index if its not needed
Campbell Barton [Fri, 17 Jul 2015 18:57:58 +0000 (04:57 +1000)]
Avoid getting the original index if its not needed

4 years agoAbsent-mindedness...Remove testing code
Antony Riakiotakis [Fri, 17 Jul 2015 17:13:22 +0000 (19:13 +0200)]
Absent-mindedness...Remove testing code

4 years agoFix GLSL code not working correctly for Macs without VBO, again report
Antony Riakiotakis [Fri, 17 Jul 2015 17:12:04 +0000 (19:12 +0200)]
Fix GLSL code not working correctly for Macs without VBO, again report
by scorpion81 on irc

4 years agoFix T45469: Vertex Group weight = 0.0 in scene 2.
Bastien Montagne [Fri, 17 Jul 2015 16:49:58 +0000 (18:49 +0200)]
Fix T45469: Vertex Group weight = 0.0 in scene 2.

4 years agoFix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior...
Bastien Montagne [Fri, 17 Jul 2015 16:31:48 +0000 (18:31 +0200)]
Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior to what is intended.

Logic was just broken for the LEFT case here.

Also cleaned up and made behavior more consistant between strips and markers.

4 years agoFix issue reported by scorpion81 on irc: material mode + flat shading
Antony Riakiotakis [Fri, 17 Jul 2015 16:30:40 +0000 (18:30 +0200)]
Fix issue reported by scorpion81 on irc: material mode + flat shading
artifacts in cycles textured mode.

4 years agoAvoid double index lookup mesh/selection drawing
Campbell Barton [Fri, 17 Jul 2015 14:01:44 +0000 (00:01 +1000)]
Avoid double index lookup mesh/selection drawing

4 years agoAvoid accessing MTFace drawing subsurf
Campbell Barton [Fri, 17 Jul 2015 13:52:41 +0000 (23:52 +1000)]
Avoid accessing MTFace drawing subsurf

4 years agoFix another index error, made multimaterial mapped meshes draw
Antony Riakiotakis [Fri, 17 Jul 2015 13:15:53 +0000 (15:15 +0200)]
Fix another index error, made multimaterial mapped meshes draw
incorrectly.

4 years agoChange winding of looptris in subsurf so they point to the same
Antony Riakiotakis [Fri, 17 Jul 2015 12:56:10 +0000 (14:56 +0200)]
Change winding of looptris in subsurf so they point to the same
direction as the surface.

4 years agoFix crash texpainting on subsurfed meshes.
Antony Riakiotakis [Fri, 17 Jul 2015 12:46:05 +0000 (14:46 +0200)]
Fix crash texpainting on subsurfed meshes.

Unfortunately, loops and polys are generated, therefore we need to keep
copies. Still not painting after this commit but at least no crash now.

4 years agoCleanup: ws & correct comment
Campbell Barton [Fri, 17 Jul 2015 12:08:52 +0000 (22:08 +1000)]
Cleanup: ws & correct comment

4 years agoProjection Paint: move to looptri data
Campbell Barton [Fri, 17 Jul 2015 10:23:33 +0000 (20:23 +1000)]
Projection Paint: move to looptri data

4 years agoDon't create MFace's when calculating normals
Campbell Barton [Fri, 17 Jul 2015 10:14:17 +0000 (20:14 +1000)]
Don't create MFace's when calculating normals

Instead only create MFace layer when its requested

4 years agoAdd macro BKE_MESH_TESSTRI_VINDEX_ORDER
Campbell Barton [Fri, 17 Jul 2015 10:17:33 +0000 (20:17 +1000)]
Add macro BKE_MESH_TESSTRI_VINDEX_ORDER

gives the index of a vertex in a looptri

4 years agoFix T45465
Antony Riakiotakis [Fri, 17 Jul 2015 11:24:01 +0000 (13:24 +0200)]
Fix T45465

Easy one, we don't draw quads anymore. Also normal
didn't use polygon index

4 years agoFix no longer being possible to display a suzanne with 8 levels of
Antony Riakiotakis [Fri, 17 Jul 2015 10:25:05 +0000 (12:25 +0200)]
Fix no longer being possible to display a suzanne with 8 levels of
subdivision.

Classic integet overflow/size_t substitution case. Machines are getting
powerful enough to easily expose these kinds of error now.

4 years agoCleanup image's poll funcs.
Bastien Montagne [Fri, 17 Jul 2015 10:18:58 +0000 (12:18 +0200)]
Cleanup image's poll funcs.

Checking space returned from CTX_wm_space_image() is SPACE_IMAGE type... tssst. :)

4 years agoFix T45462: Do not enale 'replace image' op with packed images.
Bastien Montagne [Fri, 17 Jul 2015 10:11:52 +0000 (12:11 +0200)]
Fix T45462: Do not enale 'replace image' op with packed images.

4 years agoLet's use proper helpers for debug-only vars...
Bastien Montagne [Fri, 17 Jul 2015 09:58:15 +0000 (11:58 +0200)]
Let's use proper helpers for debug-only vars...

4 years agoFix for nodeitems module using the NODE_MT_add menu types from bl_ui.
Lukas Tönne [Fri, 17 Jul 2015 09:45:02 +0000 (11:45 +0200)]
Fix for nodeitems module using the NODE_MT_add menu types from bl_ui.

This is basically a bad-level call: ui scripts are registered *after*
the modules. It only works for addons because those are loaded even
later.

Now the nodeitems_utils module just defines a function which is then
called by the UI script, rather than the other way around.

4 years agoMake strict flags happy in release builds
Sergey Sharybin [Fri, 17 Jul 2015 07:54:21 +0000 (09:54 +0200)]
Make strict flags happy in release builds

4 years agoRemove MTFace DM_paint_uvlayer_active_get func
Campbell Barton [Thu, 16 Jul 2015 18:26:17 +0000 (04:26 +1000)]
Remove MTFace DM_paint_uvlayer_active_get func

4 years agoFix for error in looptri commit
Campbell Barton [Thu, 16 Jul 2015 18:22:24 +0000 (04:22 +1000)]
Fix for error in looptri commit

Sculpting w/ subsurf crashed

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.