blender.git
5 years agoDisabled data access in particle RNA. particles_refactor
Lukas Tönne [Mon, 14 Jul 2014 13:00:55 +0000 (15:00 +0200)]
Disabled data access in particle RNA.

Only the general attribute descriptions and state instance can be
accessed from plain bpy now. For detailed data read/write the bparticles
module has to be used.

This was forced by a change to collection iterators, which essentially
makes them unsuitable for anything other than ListBase and arrays
(state attributes and particle data in this case). It may be possible
to reeanble this later, but generally bparticles is the better approach.

5 years agoFixed a few small merge errors. Sorted libs are now defined in
Lukas Tönne [Mon, 14 Jul 2014 12:59:17 +0000 (14:59 +0200)]
Fixed a few small merge errors. Sorted libs are now defined in
macros.cmake.

5 years agoMerge branch 'master' into particles_refactor
Lukas Tönne [Mon, 14 Jul 2014 12:23:50 +0000 (14:23 +0200)]
Merge branch 'master' into particles_refactor

Conflicts:
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/rigidbody.c
source/blender/blenloader/intern/writefile.c
source/blender/python/intern/bpy_interface.c
source/creator/CMakeLists.txt

5 years agoRemove redundant NULL check
Campbell Barton [Mon, 14 Jul 2014 04:23:23 +0000 (14:23 +1000)]
Remove redundant NULL check

5 years agoBMesh: avoid redundant normalize comparing angles
Campbell Barton [Mon, 14 Jul 2014 04:22:15 +0000 (14:22 +1000)]
BMesh: avoid redundant normalize comparing angles

5 years agoMath Lib: add compare_len_squared_v3v3 from paint branch
Campbell Barton [Mon, 14 Jul 2014 01:55:38 +0000 (11:55 +1000)]
Math Lib: add compare_len_squared_v3v3 from paint branch

5 years agoMath Lib: accept a limit of 0.0 when comparing vectors
Campbell Barton [Mon, 14 Jul 2014 01:33:19 +0000 (11:33 +1000)]
Math Lib: accept a limit of 0.0 when comparing vectors

5 years agoTooltip improvements for modifier functions
gaiaclary [Sun, 13 Jul 2014 19:52:35 +0000 (21:52 +0200)]
Tooltip improvements for modifier functions

5 years agoFreestyle: minor docstring fixes.
Tamito Kajiyama [Sat, 12 Jul 2014 17:12:22 +0000 (02:12 +0900)]
Freestyle: minor docstring fixes.

5 years agoFollowup to rB320b7a59c3eed: also handle background image ID refcount when duplicatin...
Bastien Montagne [Sun, 13 Jul 2014 13:16:01 +0000 (15:16 +0200)]
Followup to rB320b7a59c3eed: also handle background image ID refcount when duplicating/freeing View3D.

5 years agoFix T40987: Distant Lamps have no influence on Volumes.
Thomas Dinges [Sun, 13 Jul 2014 10:06:31 +0000 (12:06 +0200)]
Fix T40987: Distant Lamps have no influence on Volumes.

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

5 years agoBMesh: minor speedup to BM_face_split_edgenet
Campbell Barton [Sun, 13 Jul 2014 03:53:08 +0000 (13:53 +1000)]
BMesh: minor speedup to BM_face_split_edgenet

5 years agoBMesh: remove error check on radial loops and consistent naming
Campbell Barton [Sun, 13 Jul 2014 02:55:53 +0000 (12:55 +1000)]
BMesh: remove error check on radial loops and consistent naming

5 years agoReplace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)
Campbell Barton [Sat, 12 Jul 2014 06:48:52 +0000 (16:48 +1000)]
Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)

5 years agoCode Cleanup: use const
Campbell Barton [Fri, 11 Jul 2014 23:07:51 +0000 (09:07 +1000)]
Code Cleanup: use const

5 years agoBGE debug API and actuator
HG1 [Fri, 11 Jul 2014 22:18:43 +0000 (15:18 -0700)]
BGE debug API and actuator

This patch adds some new debug methods to the KX_GameObject for manually adding the debug list and bge.render for controlling the debug visualization.
It also adds a new debug actuator, which allows to control the same functions.

This patch is a updated version of T33701.

Thread on Blenderartists:
http://blenderartists.org/forum/showthread.php?264745-Debug-proerties-for-added-objects-patch&p=2256018&viewfull=1#post2256018

Reviewers: moguri

Reviewed By: moguri

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

5 years agoCorrect error in BM_face_split_edgenet when no faces are split
Campbell Barton [Fri, 11 Jul 2014 08:28:57 +0000 (18:28 +1000)]
Correct error in BM_face_split_edgenet when no faces are split

5 years agoFix potential bug in loop normals code.
Bastien Montagne [Fri, 11 Jul 2014 17:52:43 +0000 (19:52 +0200)]
Fix potential bug in loop normals code.

Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!

5 years agoAnother attempt for T40981, clipping border does not work with GLSL on
Antony Riakiotakis [Fri, 11 Jul 2014 16:17:29 +0000 (19:17 +0300)]
Another attempt for T40981, clipping border does not work with GLSL on
ATIs.

This is actually a test to see if this can be enabled on ATI cards.
According to various sources, newer ATI cards supporting GLSL 3.0
support gl_ClippingDistance in shaders, which is the forward compatible
way to do custom clipping.

This fix will bind 6 additional varying variables on ATIs, which may
lead to some shaders not compiling due to limiting out of those
variables, or to performance degradation. Also I do not have an ATI
handy to test.

Having those in mind, this commit may well be reverted later.

Clipping planes are usually 4 (6 is for cube clipping), but making
shaders depend on viewport state is really bad, and would lead to
recompilation, so I took the worst case here to avoid that.
Hopefully driver does some optimization there.

5 years agoView3D Walk: Use scene gravity instead of hardcoded value (fix T40921)
Dalai Felinto [Mon, 7 Jul 2014 15:46:25 +0000 (12:46 -0300)]
View3D Walk: Use scene gravity instead of hardcoded value (fix T40921)

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

5 years agoView3D Walk: Rename gravity by gravity_state (cleanup)
Dalai Felinto [Mon, 7 Jul 2014 15:30:43 +0000 (12:30 -0300)]
View3D Walk: Rename gravity by gravity_state (cleanup)

5 years agoFix T41023: Specific material cause bad render result, different on CPU/GPU
Sergey Sharybin [Fri, 11 Jul 2014 12:19:14 +0000 (18:19 +0600)]
Fix T41023: Specific material cause bad render result, different on CPU/GPU

Issue was caused by too much aggressive optimization, which skipped execution
of some nodes leading to an uninitialized memory read in SVM stack.

5 years agoFix T41019: Calculate Mass does not calculate actual volume.
Lukas Tönne [Fri, 11 Jul 2014 10:06:13 +0000 (12:06 +0200)]
Fix T41019: Calculate Mass does not calculate actual volume.

This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex)
the operator was simply using the bounding box volume, which can grossly
overestimate the volume and mass.

Calculating the actual volume of a mesh is not so difficult after all,
see e.g.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf

This patch also allows calculating the center-of-mass in the same way.
This is currently unused, because the rigid body system assumes the CoM
to be the same as the geometric object center. This is fine most of the
time, adding such user settings for "center-of-mass offset" would also
add quite a bit of complexity in user space, but it could be necessary
at some point. A number of other physical properties could be calculated
using the same principle, e.g. the moment of inertia.

5 years agoBLI_array: avoid mixing terms count/length
Campbell Barton [Fri, 11 Jul 2014 05:30:42 +0000 (15:30 +1000)]
BLI_array: avoid mixing terms count/length

5 years agoFix T40257: Frustum culling not working properly
Mitchell Stokes [Fri, 11 Jul 2014 05:11:25 +0000 (22:11 -0700)]
Fix T40257: Frustum culling not working properly

This is mostly the same fix as before, but now code depending on culling
checks is executed after KX_Scene->CalculateVisibleMeshes(). As a
side-effect, LoD checks and animation culling now use the current
frame's culling information rather than the previous frame's.

5 years agoWM: add WM_operator_properties_create_ptr
Campbell Barton [Fri, 11 Jul 2014 05:07:55 +0000 (15:07 +1000)]
WM: add WM_operator_properties_create_ptr

Call operator types directly and avoid a lookup when their known.

5 years agoAdd mesh tool to split faces by wire edges (face menu)
Campbell Barton [Fri, 11 Jul 2014 00:32:33 +0000 (10:32 +1000)]
Add mesh tool to split faces by wire edges (face menu)

This can be used in a similar way to the knife tool, but the edges are manually setup first.

5 years agoBMesh: new face splitting function BM_face_split_edgenet
Campbell Barton [Fri, 11 Jul 2014 00:29:53 +0000 (10:29 +1000)]
BMesh: new face splitting function BM_face_split_edgenet

This takes a face and an edge-net, splitting the face into regions
defined by the edge-net.

5 years agoCycles: Add link to a paper used for Beckmann table calculation
Sergey Sharybin [Thu, 10 Jul 2014 11:55:56 +0000 (17:55 +0600)]
Cycles: Add link to a paper used for Beckmann table calculation

This is for those who'll be reading code and trying to improve it.

5 years agoFix T41005: Seemingly random crashes with cycles rendering
Sergey Sharybin [Thu, 10 Jul 2014 11:42:38 +0000 (17:42 +0600)]
Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector

Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.

5 years agoFix for invalid memory access in graph editor when deleting the last
Lukas Tönne [Thu, 10 Jul 2014 11:02:22 +0000 (13:02 +0200)]
Fix for invalid memory access in graph editor when deleting the last
vertex in a fcurve.

5 years agoFix compilation error with scons when building from detached head
Sergey Sharybin [Thu, 10 Jul 2014 10:23:48 +0000 (16:23 +0600)]
Fix compilation error with scons when building from detached head

5 years agoRevert "Fix T40257: Frustum culling not working properly"
Mitchell Stokes [Thu, 10 Jul 2014 05:34:45 +0000 (22:34 -0700)]
Revert "Fix T40257: Frustum culling not working properly"

This reverts commit 978dba4616852e0b94374f2ae56934049d9b3669. The change
still doesn't provide accurate culling information, and actually breaks
animation culling.

5 years agoNeed to disable Libmv for cudakernels target
Sergey Sharybin [Thu, 10 Jul 2014 04:56:38 +0000 (10:56 +0600)]
Need to disable Libmv for cudakernels target

This way no access to automated tests variables will happen.

Ideally it should be something more like using blenderlite
with just Cycles enabled, but let's keep it for a bigger
clean up.

5 years agoSCons: Hopefully final fix for 32bit linux buildbot
Sergey Sharybin [Thu, 10 Jul 2014 04:47:01 +0000 (10:47 +0600)]
SCons: Hopefully final fix for 32bit linux buildbot

No need to run automated tests for cudakernels target. TThis could
be harmless because CUDA binaries are built in the another chroot.

5 years agoFix T40909: BGE softbodies broken.
Mitchell Stokes [Thu, 10 Jul 2014 04:32:33 +0000 (21:32 -0700)]
Fix T40909: BGE softbodies broken.

Looks like softbody settings got lost in a recent cleanup.

5 years agoCleanup: Same thing in path trace setup, we can safely always assign the proper value.
Thomas Dinges [Wed, 9 Jul 2014 23:49:34 +0000 (01:49 +0200)]
Cleanup: Same thing in path trace setup, we can safely always assign the proper value.

5 years agoCleanup: Always assign num_samples, there is no need for this special define.
Thomas Dinges [Wed, 9 Jul 2014 23:43:53 +0000 (01:43 +0200)]
Cleanup: Always assign num_samples, there is no need for this special define.

5 years agoFurther tweaks to SCons's auto tests
Sergey Sharybin [Wed, 9 Jul 2014 21:53:37 +0000 (03:53 +0600)]
Further tweaks to SCons's auto tests

We should do autotests only after setting path to sconsign,
otherwise using the same working directory and different
build directories will eventually break.

5 years agoAnother attempt to fix issues with 32bit OSX and scons
Sergey Sharybin [Wed, 9 Jul 2014 20:33:44 +0000 (02:33 +0600)]
Another attempt to fix issues with 32bit OSX and scons

5 years agoAttempt to fix compilation error on 32bit OSX and SCons
Sergey Sharybin [Wed, 9 Jul 2014 20:19:41 +0000 (02:19 +0600)]
Attempt to fix compilation error on 32bit OSX and SCons

5 years agoBuildbot: enable cubins fox OSX
Sergey Sharybin [Wed, 9 Jul 2014 19:43:30 +0000 (01:43 +0600)]
Buildbot: enable cubins fox OSX

With new buildbot env they should be all fine.

5 years agoAttempt to mitigate issue T40981
Antony Riakiotakis [Wed, 9 Jul 2014 18:24:37 +0000 (21:24 +0300)]
Attempt to mitigate issue T40981

Clipping border causes a software fallback on ATIs. We have disabled it
in that case but from minor digging on the net seems like Intels support
this, so enable.

5 years agoFix T40997, artifacts when unhiding part of the mesh in dyntopo.
Antony Riakiotakis [Wed, 9 Jul 2014 17:13:22 +0000 (20:13 +0300)]
Fix T40997, artifacts when unhiding part of the mesh in dyntopo.

Tagging a face as hidden should not be done only when hiding.

5 years agoFix T40991, mirrored armatures not restored properly when cancelling.
Antony Riakiotakis [Wed, 9 Jul 2014 16:58:48 +0000 (19:58 +0300)]
Fix T40991, mirrored armatures not restored properly when cancelling.

Issue here is that we force mirroring even if original armature is not
mirrored.

We could be smart and store only unselected mirrored bones here (since
those will get restored from transdata), however not all properties were
getting stored and restored; rolling bones still suffered from the bug
for instance.

To fix this we need to restore all properties that armature mirroring
overrides. Transdata obviously does not offer a lot of space here, so I
used TransInfo->customdata to store an array of initial parameters of
the mirrored bones.

5 years agoFix T41003: Object Info's Random socket produces erratic results when
Lukas Tönne [Wed, 9 Jul 2014 15:24:31 +0000 (17:24 +0200)]
Fix T41003: Object Info's Random socket produces erratic results when
material is applied to multiple Dupli instances of an object.

One of the random_id initialization lines for cycles objects slipped
into the basic update part in this commit:
rBb98ff5cb5b2c14c33b16e3b129e1e08810e90a6c

This would constantly re-shuffle the random_id ...

5 years agoImplement Start Resolution for preview render in BI
Sergey Sharybin [Wed, 9 Jul 2014 13:02:07 +0000 (19:02 +0600)]
Implement Start Resolution for preview render in BI

So now viewport render resolution division works exactly the same as in Cycles.

5 years agoCleanup: silent C++11 warning (implicit double to float conversion) in Collada code.
Bastien Montagne [Wed, 9 Jul 2014 13:10:59 +0000 (15:10 +0200)]
Cleanup: silent C++11 warning (implicit double to float conversion) in Collada code.

5 years agoCleanup: get rid of magic numbers.
Bastien Montagne [Wed, 9 Jul 2014 13:05:06 +0000 (15:05 +0200)]
Cleanup: get rid of magic numbers.

5 years agoFix T40939: Border render and SSS doesn't work correct in rendered viewport
Sergey Sharybin [Wed, 9 Jul 2014 11:57:32 +0000 (17:57 +0600)]
Fix T40939: Border render and SSS doesn't work correct in rendered viewport

There were some missing updates in the viewport render job which lead to
wrong SSS mapping on the final resolution.

There was also wrong scaling applying when border render is used.

And last but not least(?) strands render was using first level of the
resolution leading to really thick strands in the final viewport.

5 years agoFix T40164: Linking a Group of linked Groups don't take Dupli Visibility
Lukas Tönne [Wed, 9 Jul 2014 10:17:05 +0000 (12:17 +0200)]
Fix T40164: Linking a Group of linked Groups don't take Dupli Visibility
correctly.

Problem was that object layers are defined by duplis as the top-level
duplicator layers. This happens //during// the duplilist construction,
which breaks group layer checks for subsequent instances and hides them.
Now the duplilist generators leave Object DNA untouched, the
modification of layers for drawing, rendering, etc. happens afterward
in the duplilist_apply/restore functions, as a kind of second pass.

5 years agoFix T40980: Exporting animation in MPEG Matroska using ffv1 and FLAC codecs fails
Sergey Sharybin [Wed, 9 Jul 2014 09:39:41 +0000 (15:39 +0600)]
Fix T40980: Exporting animation in MPEG Matroska using ffv1 and FLAC codecs fails

5 years agoAdd bone_groups.new() and bone_groups.remove() methods to RNA.
Bastien Montagne [Wed, 9 Jul 2014 08:27:31 +0000 (10:27 +0200)]
Add bone_groups.new() and bone_groups.remove() methods to RNA.

To do so, matching BKE 'API' was also refactored a bit:
* Get Pose data instead of Object, as parameter;
* Removed some sanity checks not needed at such a low level (callers are supposed to do that);
* You can now remove an arbitrary bone group, not only the active one.

Based on patch by pkrime (Paolo Acampora), with own edits.

Reviewers: #python, pkrime, aligorith

Reviewed By: aligorith

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

5 years agoFreestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator.
Tamito Kajiyama [Wed, 9 Jul 2014 05:51:19 +0000 (14:51 +0900)]
Freestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator.

5 years agoMath Lib: add function to get signed angle about an axis
Campbell Barton [Wed, 9 Jul 2014 01:15:08 +0000 (11:15 +1000)]
Math Lib: add function to get signed angle about an axis

5 years agoCorrect IS_EMPTY macro
Campbell Barton [Tue, 8 Jul 2014 21:52:06 +0000 (07:52 +1000)]
Correct IS_EMPTY macro

also prevent reading from BM_ELEM_API_FLAG_ get/setters

5 years agoOSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
Jens Verwiebe [Tue, 8 Jul 2014 21:35:04 +0000 (23:35 +0200)]
OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles

5 years agoOSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build...
Jens Verwiebe [Tue, 8 Jul 2014 15:03:35 +0000 (17:03 +0200)]
OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated

5 years agoFix T40785: "Select Grouped" Pass Index mode is redundant.
Lukas Tönne [Tue, 8 Jul 2014 14:18:04 +0000 (16:18 +0200)]
Fix T40785: "Select Grouped" Pass Index mode is redundant.
Revert "Object Select Similar tool now has a Pass Index option."

This reverts commit 7a6919a74eb08caaf21030c17fe7c2723394a3d6.

5 years agoFix T40983 Particle Texture use of generated coordinates is wrong.
Lukas Tönne [Tue, 8 Jul 2014 11:44:58 +0000 (13:44 +0200)]
Fix T40983 Particle Texture use of generated coordinates is wrong.

Particle texture eval was not taking the actual texture space for orco/
generated textures into account at all.

5 years agoFix T40986: crash on using the viewer node inside of group nodes.
Lukas Tönne [Tue, 8 Jul 2014 10:48:41 +0000 (12:48 +0200)]
Fix T40986: crash on using the viewer node inside of group nodes.

Viewers were activated both inside the active group as well as the top
level tree (the latter being a quick fix for getting a fallback viewer).
This caused a race condition on the shared viewer image.

Now the active viewer is defined at node conversion time in the converter
so that only one can be active at a time without each node having to
follow complicated rules for exclusion.

5 years agoInstall_deps: minor cleanup.
Bastien Montagne [Tue, 8 Jul 2014 10:35:07 +0000 (12:35 +0200)]
Install_deps: minor cleanup.

Patch D633 by simonrepp (Simon Repp), thx.

5 years agoOSX/cmake: more work on T40887 and a tentative fix
Jens Verwiebe [Mon, 7 Jul 2014 22:29:53 +0000 (00:29 +0200)]
OSX/cmake: more work on T40887 and a tentative fix
- test fail due libiomp5 is not available @ testing time
- must solve this by adding requred flags/includes to tests
- atm release builds are possible with this hack

5 years agoBLI_string, dont pass unicode to ascii BLI_str_partition functions
Campbell Barton [Mon, 7 Jul 2014 20:06:34 +0000 (06:06 +1000)]
BLI_string, dont pass unicode to ascii BLI_str_partition functions

5 years agoOSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing...
Jens Verwiebe [Mon, 7 Jul 2014 17:20:24 +0000 (19:20 +0200)]
OSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing, breaking all other tests following
- tested gcc 4.8.1 works again
- tested clang-omp in libs works again
- i assume atm., if we only use vanilla clang it is the one in darwin libs

5 years agoBGE: Fix for applyImpulse function
Jorge Bernal [Mon, 7 Jul 2014 15:01:49 +0000 (08:01 -0700)]
BGE: Fix for applyImpulse function

This is related to task T29419. Credit also goes to Goran Milovanovic
(goran) for proposing an initial fix for this issue.

The issue is the current behavior of applyImpulse doesn't match the behavior
described in the documentation as instead of a impulse point in world coordinates,
it seems to require a coordinate in a local space.

Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc)
as it doesn't allow  to choose in which space (local or global) the impulse is applied.

Now, we have the following function:

applyImpulse(point, impulse, local=False)
being "point" the point to apply the impulse to (in world or local coordinates). When local is False will
have both point and impulse in World space and when local is True will have point and impulse in local space.

Reviewers: moguri, dfelinto, brita_

Reviewed By: moguri

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

5 years agoCode cleanup: Simplify decoupled scattering code a bit.
Thomas Dinges [Mon, 7 Jul 2014 11:27:50 +0000 (13:27 +0200)]
Code cleanup: Simplify decoupled scattering code a bit.

5 years agoFix compilation error with Freestyle after recent DAG changes
Sergey Sharybin [Mon, 7 Jul 2014 10:29:04 +0000 (16:29 +0600)]
Fix compilation error with Freestyle after recent DAG changes

5 years agoFix T40775: Clearing material texture slot through Python does not update 3D View...
Sergey Sharybin [Mon, 7 Jul 2014 09:38:40 +0000 (15:38 +0600)]
Fix T40775: Clearing material texture slot through Python does not update 3D View render

5 years agoFix T40791: Changing path to movie file does not mark the project as changed
Sergey Sharybin [Mon, 7 Jul 2014 09:25:32 +0000 (15:25 +0600)]
Fix T40791: Changing path to movie file does not mark the project as changed

5 years agoFix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport...
Lukas Tönne [Mon, 7 Jul 2014 08:50:43 +0000 (10:50 +0200)]
Fix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport preview.
Fix T39286: Display percentage ignored in Cycles viewport.

The threaded depsgraph update changes included a cleanup of the global
is_rendering flag, which was replaced by a general EvalContext being
passed to dupli functions.

Problem is that the global flag was true for viewport duplis before
(ugly hack), which was used as a check for generating dupli orco/UV from
mesh data layers. The new flag is stricter and only true for actual
renders, which disables these attributes and breaks the Cycles
Texture Coordinates and UVMap nodes.

The solution is to extend the simple for_render boolean to an enum:
* VIEWPORT: OpenGL viewport drawing (dupli tex coords omitted)
* PREVIEW: Viewport preview render (simplified modifiers)
* RENDER: Full render with all details and attributes

There are still some areas that need to be examined, in particular
modifiers seem to totally ignore the EvaluationContext!
Instead they generally execute without render params from the depsgraph
(BKE_object_handle_update_ex) and are built with render settings
explicitly.

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

5 years agoFollow-up to my last commit: Fixed a wrong property name in the versioning code.
Tamito Kajiyama [Mon, 7 Jul 2014 07:52:50 +0000 (16:52 +0900)]
Follow-up to my last commit: Fixed a wrong property name in the versioning code.

5 years agoFix T40877: Bezier Hook to New Object does not work properly
Sergey Sharybin [Mon, 7 Jul 2014 07:43:43 +0000 (13:43 +0600)]
Fix T40877: Bezier Hook to New Object does not work properly

5 years agoPer-material line color settings for Freestyle.
Tamito Kajiyama [Mon, 7 Jul 2014 06:54:46 +0000 (15:54 +0900)]
Per-material line color settings for Freestyle.

New properties 'line_color' and 'line_priority' are added to Material ID data blocks.

The 'line_color' property allows users to specify a per-material line color that can be
used as a Freestyle line color through Material color modifiers of line style settings.

The new line color property is intended to provide a solution for line color
stylization when a proper Freestyle support for Cycles is implemented (likely
as part of the upcoming Blender 2.72 release; see Patch D632).  Materials in
Cycles are usually set up using shader nodes, and Freestyle won't be capable
of retrieving colors and other properties from node-based materials any soon.

The new line color property of materials addresses this foreseen limitation by
providing artists with an intuitive alternative mean to specify line colors on a
per-material basis independently from node trees.

The 'line_priority' property gives users a way to control line colors at material
boundaries.  When a line is drawn along a feature edge at material boundaries,
one of the two materials on both sides of the edge has to be picked up to
determine the line color.  So far there was no way to control this selection
(which was in effect at random).  Now the material with a higher line color
priority will be selected.

The new per-material line settings are shown in the new Freestyle Line tab in
the Material context of the Properties window (only when Freestyle is enabled).

5 years agoCycles: Fix crash with environment maps and packed images
Sergey Sharybin [Mon, 7 Jul 2014 06:37:45 +0000 (12:37 +0600)]
Cycles: Fix crash with environment maps and packed images

5 years agoUI: tooltips, blurry and incorrect rhs-padding in recent update
Campbell Barton [Mon, 7 Jul 2014 00:43:32 +0000 (10:43 +1000)]
UI: tooltips, blurry and incorrect rhs-padding in recent update

D634 by Severin

5 years agoFix for RNA_int/enum mixup
Campbell Barton [Sun, 6 Jul 2014 10:54:08 +0000 (20:54 +1000)]
Fix for RNA_int/enum mixup

5 years agoAdd support to lasso masking/flood fill for inverted values.
Antony Riakiotakis [Sun, 6 Jul 2014 15:29:48 +0000 (18:29 +0300)]
Add support to lasso masking/flood fill for inverted values.

This can be used to subtract a region from masks but it's not very
user friendly yet. To male this work better, the tool will probably be
brushified later.

5 years agoOSX/Scons: after doublechecking. take out sdk_flags from cflags again, looks as we...
Jens Verwiebe [Sun, 6 Jul 2014 13:46:16 +0000 (15:46 +0200)]
OSX/Scons: after doublechecking. take out sdk_flags from cflags again, looks as we always get sdk properly fron ccflags in subcompiles

5 years agoOSX/scons: Try to get rid of buildproblems with openjpeg enabled in certain build...
Jens Verwiebe [Sun, 6 Jul 2014 12:10:29 +0000 (14:10 +0200)]
OSX/scons: Try to get rid of buildproblems with openjpeg enabled in certain build environments and prepend SDK_FLAGS to CFLAGS always

5 years agoCycles: Equi-Angular and MIS Volume sampling work on GPU now.
Thomas Dinges [Sun, 6 Jul 2014 11:59:52 +0000 (13:59 +0200)]
Cycles: Equi-Angular and MIS Volume sampling work on GPU now.

* malloc() is used now, which is supported since sm_20: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations The performance of this needs to be tested on various cards still.
* This also works for Heterogeneous Decoupled Ray Marching, but in this case I get sporadic "Illegal Address" errors on my Geforce 540, therefore I did not remove the GPU check in kernel_volume_use_decoupled() yet.

I would appreciate some tests from people who compile themselves, enable Volumetrics in kernel_types.h.

5 years agoFix T40548: After canceling, F-Curve handlers don't go back to original position.
Lukas Tönne [Sun, 6 Jul 2014 11:09:52 +0000 (13:09 +0200)]
Fix T40548: After canceling, F-Curve handlers don't go back to original position.

Handle vectors for the initial location were only stored when the handles are actually
selected for transform. When only the master vertex is moved this can still affect
the handles though, since they are constraint to one side of the master vertex.

Now the handle data is stored regardless of whether handles are included in the transform,
so on cancel their location is reset correctly as well.

5 years agoFix part of T40964: Glass shader was giving wrong results with OSL.
Thomas Dinges [Sun, 6 Jul 2014 11:07:16 +0000 (13:07 +0200)]
Fix part of T40964: Glass shader was giving wrong results with OSL.

5 years agoOutliner: Added option to RMB menu for "Animation" entries to remove these and their...
Joshua Leung [Sun, 6 Jul 2014 08:55:10 +0000 (20:55 +1200)]
Outliner: Added option to RMB menu for "Animation" entries to remove these and their data

5 years agoBugfix: Selecting object channels in NLA editor didn't make the object active
Joshua Leung [Sun, 6 Jul 2014 08:27:24 +0000 (20:27 +1200)]
Bugfix: Selecting object channels in NLA editor didn't make the object active

5 years agoCode cleanup
Joshua Leung [Sun, 6 Jul 2014 07:32:50 +0000 (19:32 +1200)]
Code cleanup

- Fixed incorrect section heading
- Missed one place where short was still used when the specific enum type would be
  more appropriate

5 years agoNLA/AnimEditors: Added operator to remove all "empty" AnimData blocks
Joshua Leung [Sun, 6 Jul 2014 07:32:01 +0000 (19:32 +1200)]
NLA/AnimEditors: Added operator to remove all "empty" AnimData blocks

It is sometimes possible to end up with a lot of datablocks which have old + unused
"AnimData" containers still attached. This most commonly happens when doing motion
graphics work (i.e. when some linked-in objects may have previously been used to develop
a set of reusable assets), and is particularly distracting in the NLA Editor.

This commit adds an operator which removes AnimData blocks (restricted to only those
which are visible in the animation editor where it is run from) which are "empty"
(i.e. that is, have no active action, drivers, and nla tracks or strips).

This operator can be found from the "Edit" menu in the NLA Editor. Although it also
works when run from the DopeSheet or Graph Editors, it is of less use there since
those won't show these empty AnimData blocks by default (since by definition, such
AnimData blocks necesarily have no keyframes or drivers that can be shown), hence
there will be no feedback if the operator fails or succeeds.

5 years agoFix for typo in comment
Joshua Leung [Fri, 4 Jul 2014 13:05:50 +0000 (01:05 +1200)]
Fix for typo in comment

5 years agoFix uninitialized bool in recent own 'sode_select_groupe' commit.
Bastien Montagne [Sat, 5 Jul 2014 15:58:21 +0000 (17:58 +0200)]
Fix uninitialized bool in recent own 'sode_select_groupe' commit.

Found by CoverityScan.

5 years agoCycles: Some tweaks to baking UI.
Thomas Dinges [Sat, 5 Jul 2014 13:39:08 +0000 (15:39 +0200)]
Cycles: Some tweaks to baking UI.

* Put Normal Settings beneath the other ones, wild button jumping should be avoided.
* Remove Cage prefix for Object and Extrusion, it's clear from the button placement, the former UI was too squeezed...

5 years agoCleanup: Typo fixes.
Thomas Dinges [Sat, 5 Jul 2014 12:25:34 +0000 (14:25 +0200)]
Cleanup: Typo fixes.

5 years agoCycles: Compile fixes for CUDA Volumetrics.
Thomas Dinges [Sat, 5 Jul 2014 00:04:07 +0000 (02:04 +0200)]
Cycles: Compile fixes for CUDA Volumetrics.
* CUDA can be compiled with Volume support again, change line 78 kernel_types.h for that.

Volumes are still fragile on GPU though, got some Memory/Address CUDA errors in tests.. needs to be investigated more deeply.

5 years agoStyle cleanup
Campbell Barton [Fri, 4 Jul 2014 19:26:32 +0000 (05:26 +1000)]
Style cleanup

5 years agoOSX: Jpeg2000 was formely handled by quicktime, after QT removal it was forgotten...
Jens Verwiebe [Fri, 4 Jul 2014 13:01:56 +0000 (15:01 +0200)]
OSX: Jpeg2000 was formely handled by quicktime, after QT removal it was forgotten to move it to openjpeg, doing this now
Note: In releases this was missing since 2.69, so we may want an ‘a’ release for 2.71

5 years agoRefactor of Node's 'Select by type' op, to also handle color and name handling.
Bastien Montagne [Fri, 4 Jul 2014 12:17:54 +0000 (14:17 +0200)]
Refactor of Node's 'Select by type' op, to also handle color and name handling.

Ne op is similar to other 'Select Grouped' ones in Blender.

Based on patch D288 by Cruentus_Nex (Steve).

Reviewed by Campbell Barton, thanks!

Revision: D288.

5 years agoAdd (r)partition funcs to BLI_string, to get left-most/right-most first occurence...
Bastien Montagne [Fri, 4 Jul 2014 12:14:06 +0000 (14:14 +0200)]
Add (r)partition funcs to BLI_string, to get left-most/right-most first occurence of delimiters.

Inspired by Python (r)partition str functions. Also added some Gtest cases for those new funcs.

Reviewed by Campbell Barton, many thanks!

5 years agoInstall_deps: Final (hopefully!) fix for dual clang/cfe name (*sigh*).
Bastien Montagne [Fri, 4 Jul 2014 12:04:51 +0000 (14:04 +0200)]
Install_deps: Final (hopefully!) fix for dual clang/cfe name (*sigh*).

Patch by simonrepp (Simon Repp), thanks!

5 years agoFix T40843: Cycles does not support viewport render override
Sergey Sharybin [Fri, 4 Jul 2014 10:32:17 +0000 (16:32 +0600)]
Fix T40843: Cycles does not support viewport render override

5 years agoFix the ABIFLAGS order for detecting Python debug builds
Campbell Barton [Fri, 4 Jul 2014 10:02:58 +0000 (20:02 +1000)]
Fix the ABIFLAGS order for detecting Python debug builds

D631 by mva

5 years agoFix T40941: Bevel factor in Text
Sergey Sharybin [Fri, 4 Jul 2014 09:11:51 +0000 (15:11 +0600)]
Fix T40941: Bevel factor in Text

Bevel factor is not supported by text, hide it from the interface.