blender.git
6 years agocleanup: ui, use bools
Campbell Barton [Fri, 13 Feb 2015 00:43:28 +0000 (11:43 +1100)]
cleanup: ui, use bools

6 years agoUI: show check-boxes pie-menu bool/enums
Campbell Barton [Fri, 13 Feb 2015 00:32:24 +0000 (11:32 +1100)]
UI: show check-boxes pie-menu bool/enums

6 years agoBMesh: avoid ugly macro for loop interpolation
Campbell Barton [Fri, 13 Feb 2015 00:01:47 +0000 (11:01 +1100)]
BMesh: avoid ugly macro for loop interpolation

Compiler optimizes to practically the same output

6 years agoBGE: Fix for T42285 & T38935 crashes. They are Rayhit related.
Jorge Bernal [Thu, 12 Feb 2015 23:09:32 +0000 (00:09 +0100)]
BGE: Fix for T42285 & T38935 crashes. They are Rayhit related.

We make sure that good values are passed to GetPolygon() and we check that the visual mesh doesn't have a wrong displacement when it passes over a object which has a mesh triangle as compound bound.

Reviewers: dfelinto, sergof, agoose77, moguri

Reviewed By: moguri

Subscribers: agoose77

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

6 years agoBGE: Remove translation and rotation constrains subpanel from dynamics type
Jorge Bernal [Thu, 12 Feb 2015 23:05:16 +0000 (00:05 +0100)]
BGE: Remove translation and rotation constrains subpanel from dynamics type

The translation and rotation locks subpanel was not used by dynamic physics type to avoid inestability in the application of forces and/or torques. Therefore it is better to remove it from UI (for dynamics) to avoid misunderstandings.

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: panzergame

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

6 years agoBGE Fix T39026: No collisions detected with parented rigid body object
Jorge Bernal [Thu, 12 Feb 2015 22:56:50 +0000 (23:56 +0100)]
BGE Fix T39026: No collisions detected with parented rigid body object

Fix for T39026. Preliminary investigation by blenderscripter on D446.
Also it solves bug T41285 (Parenting object leave collission box).

Refactor commit b90de0331df6c92af909b20a3e183596ff3511e4 introduced a
regression bug.

Reviewers: sergof, campbellbarton, moguri

Reviewed By: moguri

Subscribers: blueprintrandom, blenderscripter

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

6 years agoCleanup horrible artifact of Greek to English translation.
Antony Riakiotakis [Thu, 12 Feb 2015 21:05:47 +0000 (22:05 +0100)]
Cleanup horrible artifact of Greek to English translation.

6 years agoUse the RNA for overriding the name instead.
Antony Riakiotakis [Thu, 12 Feb 2015 18:59:34 +0000 (19:59 +0100)]
Use the RNA for overriding the name instead.

6 years agoMore naming refinement GPU fstop -> Viewport f-stop
Antony Riakiotakis [Thu, 12 Feb 2015 18:50:19 +0000 (19:50 +0100)]
More naming refinement GPU fstop -> Viewport f-stop

6 years agoRevert "Add missing trailing '}' in GLSL files"
Antony Riakiotakis [Thu, 12 Feb 2015 18:39:10 +0000 (19:39 +0100)]
Revert "Add missing trailing '}' in GLSL files"

This reverts commit ebd4a6e0dd3bdd511f3857dc9192df848f388200.

Trailing '}' is added in C, also we add some extra code as needed.

6 years agoAdd DOF fstop property for cycles, also don't grey it out when object is
Antony Riakiotakis [Thu, 12 Feb 2015 18:35:32 +0000 (19:35 +0100)]
Add DOF fstop property for cycles, also don't grey it out when object is
set as focused

6 years agoAdd missing trailing '}' in GLSL files
Campbell Barton [Thu, 12 Feb 2015 18:12:15 +0000 (05:12 +1100)]
Add missing trailing '}' in GLSL files

6 years agoViewport compositing - first code
Antony Riakiotakis [Thu, 12 Feb 2015 17:54:41 +0000 (18:54 +0100)]
Viewport compositing - first code

This commit introduces a few ready made effects for the 3D viewport
and OpenGL rendering.

Included effects are Depth of Field, accessible from camera view
and screen space ambient occlusion. Those effects can be turned on and
tweaked from the shading panel in the 3D viewport.

Off screen rendering will use the settings of the current camera.

WIP documentation can be found here:

http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing

6 years agoFix (unreported) `load_file()` func from creator.c not setting G.save_over correctly.
Bastien Montagne [Thu, 12 Feb 2015 16:30:19 +0000 (17:30 +0100)]
Fix (unreported) `load_file()` func from creator.c not setting G.save_over correctly.

This was rather annoying, since if you were script-editing a .blend file in background
mode, opened through this commandline option system,  and wanted to save over,
a mere `bpy.ops.wm.save_mainfile()` *would not* overwrite expected file,
but instead write/replace the dummy `untitled.blend` one!

6 years agoRemoved the cloth preroll feature.
Lukas Tönne [Thu, 12 Feb 2015 15:28:15 +0000 (16:28 +0100)]
Removed the cloth preroll feature.

This feature has been totally broken for a long time. It was added
originally because negative frames were not supported.

Giving simulations (cloth and others) time to settle before animation
starts needs to be solved in a much better and more generic way.

6 years agoTracker operators: filter & copy track settings
Campbell Barton [Thu, 12 Feb 2015 15:17:23 +0000 (02:17 +1100)]
Tracker operators: filter & copy track settings

D1069 by @sebastian_k

6 years agoGPencil: Alt-S can now be used to adjust the pressure values (i.e. thickness) of...
Joshua Leung [Thu, 12 Feb 2015 13:46:14 +0000 (02:46 +1300)]
GPencil: Alt-S can now be used to adjust the pressure values (i.e. thickness) of strokes

6 years agoGPencil: Some tweaks to make GPencil UI more compact when there are 0 or 1 layer...
Joshua Leung [Thu, 12 Feb 2015 13:24:49 +0000 (02:24 +1300)]
GPencil: Some tweaks to make GPencil UI more compact when there are 0 or 1 layer(s) only

As brought up in T43595, the Grease Pencil layers list could sometimes end up
taking up too much space when there are no layers. Another issue raised there
was that the up/down buttons are redundant when there is only a single layer.
This commit makes some changes to get these a bit more compact for the case where
you have an empty GPencil datablock left over from previous work.

6 years agoGPencil: LKEY can now be used for Select Linked too now
Joshua Leung [Thu, 12 Feb 2015 13:13:01 +0000 (02:13 +1300)]
GPencil: LKEY can now be used for Select Linked too now

6 years agoBugfix: Old NLA Strips from 2.4x got converted with no names (since they didn't use...
Joshua Leung [Thu, 12 Feb 2015 13:11:17 +0000 (02:11 +1300)]
Bugfix: Old NLA Strips from 2.4x got converted with no names (since they didn't use to have any)

6 years agocleanup
Campbell Barton [Thu, 12 Feb 2015 12:51:02 +0000 (23:51 +1100)]
cleanup

6 years agoAddons: print short message if an addons missing
Campbell Barton [Thu, 12 Feb 2015 12:42:51 +0000 (23:42 +1100)]
Addons: print short message if an addons missing

Was printing full traceback, harmless but verbose.

6 years agoFollow functionality: Scrubbing with the arrow keys and during jumps,
Antony Riakiotakis [Thu, 12 Feb 2015 12:08:22 +0000 (13:08 +0100)]
Follow functionality: Scrubbing with the arrow keys and during jumps,
will update the editors range.

Offsetting to a certain direction will put the editors min/max to the
new frame if the frame is out of the editor bounds while jumping will
set the new frame at the editor's center.

6 years agoFix T43612: VSE crash clearing proxies
Campbell Barton [Thu, 12 Feb 2015 11:59:04 +0000 (22:59 +1100)]
Fix T43612: VSE crash clearing proxies

6 years agoFix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.
Howard Trickey [Thu, 12 Feb 2015 11:55:30 +0000 (06:55 -0500)]
Fix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.

Implemented multisegment rounding of vertices with two edges.
Works both with wire edges and edges that have one or two faces
attached.

6 years agoCorrect fix for T43424
Campbell Barton [Thu, 12 Feb 2015 10:31:36 +0000 (21:31 +1100)]
Correct fix for T43424

Would crash undoing adding a new scene in camera view.

6 years agoFix T43471, based on patch submitted by @sean_loh.
Lukas Tönne [Thu, 12 Feb 2015 09:15:25 +0000 (10:15 +0100)]
Fix T43471, based on patch submitted by @sean_loh.

Particle textures always override timing information of particles.
Previously particle times could be scripted, but now these changes are
discarded by the texture evaluation function.

The patch disables texture overriding when no textures are defined, this
way at least some old scripts can keep working.

6 years agoBGE: Improve UI of Anisotropic Friction subpanel
Jorge Bernal [Thu, 12 Feb 2015 05:38:21 +0000 (06:38 +0100)]
BGE: Improve UI of Anisotropic Friction subpanel

Little patch that introduces X: Y: and Z: texts over anisotropic friction sliders

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

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

6 years agoFix for previous commit - since it's for non-debug unused vars, name it UNUSED_VARS_N...
Bastien Montagne [Wed, 11 Feb 2015 21:22:40 +0000 (22:22 +0100)]
Fix for previous commit - since it's for non-debug unused vars, name it UNUSED_VARS_NDEBUG.

This commit was proudly crafted by the Commit Rate Raising Committee!

6 years agoAdd new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars...
Bastien Montagne [Wed, 11 Feb 2015 21:08:36 +0000 (22:08 +0100)]
Add new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars as unused in non-debug builds.

Helps handling cleanly pure-debug variables.

6 years agoOutliner: use enum for outliner_group_operation()
Campbell Barton [Wed, 11 Feb 2015 20:43:32 +0000 (07:43 +1100)]
Outliner: use enum for outliner_group_operation()

No functional changes.

D1067 by @lichtwerk

6 years agoOutliner: ContextMenus for constraints/modifiers
Campbell Barton [Wed, 11 Feb 2015 20:25:36 +0000 (07:25 +1100)]
Outliner: ContextMenus for constraints/modifiers

Context menu to toggle render, visibility & delete

D996 by @lichtwerk

6 years agoFix VSE strip channel skip overlapping strips
Campbell Barton [Wed, 11 Feb 2015 19:18:02 +0000 (06:18 +1100)]
Fix VSE strip channel skip overlapping strips

D1096 by @mangostaniko (with some edits)

6 years agoFull screen mode did not remember the follow mode of previous screen.
Antony Riakiotakis [Wed, 11 Feb 2015 19:01:21 +0000 (20:01 +0100)]
Full screen mode did not remember the follow mode of previous screen.

Also make follow mode do something similar in reverse play.

6 years agocleanup: rename enum type to blender convention
Campbell Barton [Wed, 11 Feb 2015 16:29:10 +0000 (03:29 +1100)]
cleanup: rename enum type to blender convention

6 years agoFileBrowser Bookmarks: fix issue with invalid bookmarks.
Bastien Montagne [Wed, 11 Feb 2015 16:07:52 +0000 (17:07 +0100)]
FileBrowser Bookmarks: fix issue with invalid bookmarks.

Reported by maxon through IRC, thanks.

Invalid (inexistant) bookmarks would not be selectable, hence not removable.

First, made invalid bookmarks grayed out in lists, so that user knows when there are some.

Then, added a new 'cleanup' operator that removes all invalid bookmarks.

This solution may not be completely satisfaying, but should do the work for now.
I do not want to add back those ugly 'X' delete buttons for each entry in list,
so better solution would be to make UIList able to select several items at once...

6 years agoBPY RNA: add `is_property_readonly()`.
Bastien Montagne [Wed, 11 Feb 2015 16:06:09 +0000 (17:06 +0100)]
BPY RNA: add `is_property_readonly()`.

This property may be defined dynamically, so mere access to static flag value
through `bl_rna.properties[...].is_readonly` is not enough.

6 years agoFix (unreported) disabled items in UIList not grayed out.
Bastien Montagne [Wed, 11 Feb 2015 15:46:41 +0000 (16:46 +0100)]
Fix (unreported) disabled items in UIList not grayed out.

Since we override widget's theme colors in this case in widget_state,
we have to redo 'disabled' alpha shading...

6 years agoRNA: sequencer channel range was incorrect
Campbell Barton [Wed, 11 Feb 2015 15:36:33 +0000 (02:36 +1100)]
RNA: sequencer channel range was incorrect

Broke since 2.4x, zero sequence channels shouldn't be allowed

6 years agoFix depth-eyedropper crashing outside 3d view
Campbell Barton [Wed, 11 Feb 2015 14:29:33 +0000 (01:29 +1100)]
Fix depth-eyedropper crashing outside 3d view

Also set the eyedropper operators as internal.

6 years agoUse line curve for cavity mask instead of sharp as default when no curve
Antony Riakiotakis [Wed, 11 Feb 2015 14:27:50 +0000 (15:27 +0100)]
Use line curve for cavity mask instead of sharp as default when no curve
is found during loading

6 years agoCavity option active even in fill brushes
Antony Riakiotakis [Wed, 11 Feb 2015 14:09:11 +0000 (15:09 +0100)]
Cavity option active even in fill brushes

6 years agoCavity masking - add curve control to cavity mask and move relevant
Antony Riakiotakis [Wed, 11 Feb 2015 14:07:04 +0000 (15:07 +0100)]
Cavity masking - add curve control to cavity mask and move relevant
structs to paint struct (might be useful for vertex paint too in the
future)

Cavity masking now has a curve control. The control will set the amount
of masking for positive cavity ("pointness") or negative cavity
("cavity") with x axis being the amount of cavity and 0.0 = full cavity,
1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of
alpha.

6 years agoFix T43621: Layout only using 65% of available width
Julian Eisel [Wed, 11 Feb 2015 13:32:49 +0000 (14:32 +0100)]
Fix T43621: Layout only using 65% of available width

Not really a bug, more like a silly typo.

6 years agoCompositor: Expose Alpha socket for multilayer EXR node
Sergey Sharybin [Wed, 11 Feb 2015 13:26:42 +0000 (18:26 +0500)]
Compositor: Expose Alpha socket for multilayer EXR node

This way re-mapping scene nodes to EXR files becomes much easier,
no extra trickery with separate RGBA setups is needed.

Plus makes it more consistent with regular EXR files.

This uses EGBA pass to get alpha from.

6 years agoFix T43628: Circular dependency error preventing multiple highpoly objects to bake
Dalai Felinto [Wed, 11 Feb 2015 13:23:03 +0000 (11:23 -0200)]
Fix T43628: Circular dependency error preventing multiple highpoly objects to bake

Throwing an RPT_ERROR was stopping baking after the first object.

6 years agoMinor code cleanup: move some duplicated texpaint code into function
Nicholas Bishop [Wed, 11 Feb 2015 12:33:47 +0000 (13:33 +0100)]
Minor code cleanup: move some duplicated texpaint code into function

Reviewers: psy-fi

Reviewed By: psy-fi

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

6 years agoUV Island support for vertex & edge slide
Campbell Barton [Wed, 11 Feb 2015 08:40:54 +0000 (19:40 +1100)]
UV Island support for vertex & edge slide

This ensures slide with `Correct UVs` enabled, keeps UV's (any loop custom-data) contiguous.

Adds 2 key functions `BM_vert_loop_groups_data_layer_create` and `BM_vert_loop_groups_data_layer_merge`

They work by collecting matching loop custom-data around the vertices loop-fan,
and merging the custom-data after edits are made.

Thanks to @mont29 for review!

6 years agoCleanup: Remove unused Cycles cpuid code.
Thomas Dinges [Wed, 11 Feb 2015 10:28:42 +0000 (11:28 +0100)]
Cleanup: Remove unused Cycles cpuid code.

6 years agoFix crasher in own UIList bookmarks commit.
Bastien Montagne [Wed, 11 Feb 2015 10:16:32 +0000 (11:16 +0100)]
Fix crasher in own UIList bookmarks commit.

Immediate crash in merged asset-experiments branch, no idea why it did not show in master too?

6 years agocleanup: style/indentation
Campbell Barton [Wed, 11 Feb 2015 07:38:41 +0000 (18:38 +1100)]
cleanup: style/indentation

6 years agoFix T43149: Grease Pencil fill areas look divided by multiples ray lines
Joshua Leung [Wed, 11 Feb 2015 04:54:14 +0000 (17:54 +1300)]
Fix T43149: Grease Pencil fill areas look divided by multiples ray lines

The problem here was caused by the usage of GL_POLYGON_SMOOTH (thanks Campbell
for the help tracking this down!). Apparently the issue is that this option
ends up doing some nasty accumulation with whatever is in the framebuffer for
each *tesselated* polygon (instead of the whole polygon as intended/expected).

** IMPORTANT USER NOTES **
With the removal of this option, filled areas and volumetric strokes will now
have jagged edges again. To resolve these artifacts, it is necessary to enable
Viewport Multisampling (found in the User Preferences, under the System tab),
and restart Blender to see the effects of this change.

6 years agoMinor optimization for mask modifier
Campbell Barton [Tue, 10 Feb 2015 23:34:34 +0000 (10:34 +1100)]
Minor optimization for mask modifier

- don't resize ghash buckets (reserve maximum size)
- get vert, edge arrays instead of DM getVert, getEdge
- calloc -> malloc

6 years agoFileBrowser: Editable Bookmarks.
Bastien Montagne [Tue, 10 Feb 2015 23:09:45 +0000 (00:09 +0100)]
FileBrowser: Editable Bookmarks.

Bookmarks are now editable (i.e. you can rename them, and reorder them).
They are also listed in regular UILists, so you can filter/sort them as usual too.

Also, FileBrowser 'T' side area is changed to something similar to 3DView one,
in this case because we need op panel to remain at the bottom, and later because
we'll more than likely need tabs here!

Thanks to Campbell and Sergey for reviews.

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

6 years agoUI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
Bastien Montagne [Tue, 10 Feb 2015 23:06:03 +0000 (00:06 +0100)]
UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.

When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.

For now, only used by UIList, which can now optionaly use a given string property
of each item for its tooltip.

Thanks to Campbell for the reviews!

6 years agoFix T43297 The Exporter assumed ANSII encoding but we need to support UTF-8 instead
Gaia Clary [Tue, 10 Feb 2015 21:12:47 +0000 (22:12 +0100)]
Fix T43297 The Exporter assumed ANSII encoding but we need to support UTF-8 instead

6 years agoCycles: Control CPU capabilities via environment variables
Sergey Sharybin [Tue, 10 Feb 2015 20:55:35 +0000 (01:55 +0500)]
Cycles: Control CPU capabilities via environment variables

Purely developers-only feature which allows to disable some of the CPU
capabilities. This way it's easier to test different kernels on the
same machine.

6 years agoRemove legacy color transform functions.
Troy Sobotka [Tue, 10 Feb 2015 20:33:00 +0000 (21:33 +0100)]
Remove legacy color transform functions.

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

6 years agoFix recent vert-slide UV's when cancelled
Campbell Barton [Tue, 10 Feb 2015 20:22:19 +0000 (07:22 +1100)]
Fix recent vert-slide UV's when cancelled

Added support recently, but wasn't cancelling correctly.

6 years agoFix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart
Sybren A. Stüvel [Tue, 10 Feb 2015 20:28:18 +0000 (21:28 +0100)]
Fix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart

6 years agoTypo fix + clarification in mathutils.Vector example
Sybren A. Stüvel [Tue, 10 Feb 2015 20:25:01 +0000 (21:25 +0100)]
Typo fix + clarification in mathutils.Vector example

6 years agoCycles: Fallback to bottom-top tile order when rendering from the command line
Sergey Sharybin [Tue, 10 Feb 2015 20:02:36 +0000 (01:02 +0500)]
Cycles: Fallback to bottom-top tile order when rendering from the command line

In the worst case it'll do nothing, in the best case it might give some percent
of speedup because of better cache coherency.

Currently it's all handled as an override on blender_python level, don't really
see reason to penetrate the boolean flag further into sync code. This can always
be done later if needed.

6 years agoCavity mask support for texture painting.
Antony Riakiotakis [Tue, 10 Feb 2015 19:22:25 +0000 (20:22 +0100)]
Cavity mask support for texture painting.

Title says it all, options can be found in the options panel,

A slider controls the amount of cavity masking that is applied while
it's also possible to invert the mask and paint outside or inside
cavities.

Again we might greatly benefit from caching of the cavity result, but
that should only affect startup time for the stroke.

6 years agoCycles: Add print functions for sse3f, sse3i and sse3b
Sergey Sharybin [Tue, 10 Feb 2015 19:20:34 +0000 (00:20 +0500)]
Cycles: Add print functions for sse3f, sse3i and sse3b

6 years agoCycles: Add utility functions to print ssef, ssei and sseb
Sergey Sharybin [Tue, 10 Feb 2015 19:11:04 +0000 (00:11 +0500)]
Cycles: Add utility functions to print ssef, ssei and sseb

Nothing special, just really handy for debugging.

6 years agoCycles: Move mesh attribute creation into separate functions
Sergey Sharybin [Tue, 10 Feb 2015 18:40:26 +0000 (23:40 +0500)]
Cycles: Move mesh attribute creation into separate functions

This makes overall code of create_mesh() much cleaner and easier to follow.

6 years agoBLI_linklist: Add a new helper to move an item (identified by its current index)...
Bastien Montagne [Tue, 10 Feb 2015 16:28:55 +0000 (17:28 +0100)]
BLI_linklist: Add a new helper to move an item (identified by its current index) to a new position in the list.

6 years agoSlip tool: add enter and space to confirm the operation
Antony Riakiotakis [Tue, 10 Feb 2015 16:39:23 +0000 (17:39 +0100)]
Slip tool: add enter and space to confirm the operation

6 years agoCycles: optimize one normalization out from the previous commit
Sergey Sharybin [Tue, 10 Feb 2015 16:32:44 +0000 (21:32 +0500)]
Cycles: optimize one normalization out from the previous commit

6 years agoCycles: implement pointiness geometry attribute
Sergey Sharybin [Fri, 6 Feb 2015 07:35:46 +0000 (12:35 +0500)]
Cycles: implement pointiness geometry attribute

This attribute means how "pointy" the geometry surface is, which allows to do
effects like dirt maps and wear-off effects on render geometry. This means the
attribute is calculated for the final mesh which means no baking (which implies
UV unwrap) is needed. Apart from this the behavior is quite close to how vertex
dirty colors works.

The new attribute is available as an output socket of Geometry node.

There's no penalty for the render time, only some delay on scene preparation
(the delay is linear of the mesh complexity).

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

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

6 years agoTests: Disable failing import/export tests for until they're fixed
Sergey Sharybin [Tue, 10 Feb 2015 14:29:18 +0000 (19:29 +0500)]
Tests: Disable failing import/export tests for until they're fixed

6 years agoCycles: Bring back distance check in re-intersection
Sergey Sharybin [Tue, 10 Feb 2015 14:07:55 +0000 (19:07 +0500)]
Cycles: Bring back distance check in re-intersection

From more investigation of the numeric failures in the kernel it appears
the check was rather correct. But in theory it;s also needed for the motion
triangles.

6 years agoCycles: Correction to glossy shaders not handling total internal reflection
Sergey Sharybin [Tue, 10 Feb 2015 13:20:36 +0000 (18:20 +0500)]
Cycles: Correction to glossy shaders not handling total internal reflection

The issue was caused by lack of check for whether fresnel term is actually
giving total internal reflection in refraction BSDFs. This lead to usage of
arbitrary vector of (0, 0, 0) as reflection, giving numeric issues in other
areas of the kernel.

This gives some visual changes of sharp reflection but it seems to be rather
proper now. Which also corresponds with rough glossy reflection with sharpness
set to 0.001 (previously it was totally different from sharpness of 0.0, which
is just weird).

6 years agoFix T43596: Refraction BSDF crashes blender on pre-sse4 CPU
Sergey Sharybin [Tue, 10 Feb 2015 12:31:55 +0000 (17:31 +0500)]
Fix T43596: Refraction BSDF crashes blender on pre-sse4 CPU

This is the same issue T43475: SSE4 code is more robust to non-finite values
in the ray origin/direction. So for now added a check before doing BVH traversal
for pre-SSE4 CPUs.

For sure actual root of the issue is a bit different and much more tricky to
solve, especially without disturbing render results too much. Still looking
into this.

In any case, it's kinda fine to have such a check, we might later make it to be
a kernel_assert() instead of just a return.

6 years agoFix grease-pencil crash without clip/track data
Campbell Barton [Tue, 10 Feb 2015 12:34:16 +0000 (23:34 +1100)]
Fix grease-pencil crash without clip/track data

6 years agoUI: scale timeline cache-height by DPI/pixelsize
Campbell Barton [Tue, 10 Feb 2015 11:33:52 +0000 (22:33 +1100)]
UI: scale timeline cache-height by DPI/pixelsize

D602 by @blakenator with edits

6 years agocorrect last commit
Campbell Barton [Tue, 10 Feb 2015 11:03:10 +0000 (22:03 +1100)]
correct last commit

6 years agoFix: Grease Pencil datablocks can be copied using the ID.copy() API method now
Joshua Leung [Tue, 10 Feb 2015 10:30:30 +0000 (23:30 +1300)]
Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now

6 years agoSynchronize changes from buildbot server
Sergey Sharybin [Tue, 10 Feb 2015 08:47:28 +0000 (13:47 +0500)]
Synchronize changes from buildbot server

6 years agoFix T43611: Collision shape of rigid bodies changes inadvertently
Sergey Sharybin [Tue, 10 Feb 2015 07:49:34 +0000 (12:49 +0500)]
Fix T43611: Collision shape of rigid bodies changes inadvertently

The issue was caused by the fix for T34108, which modified DNA in order to
get a fallback box collision shape. Not sue why it's needed, we can just get
box shape directly, without modifying user's settings.

6 years agoNodes: Various UI cleanups for Image and Environment Texture Nodes
julianeisel [Mon, 9 Feb 2015 22:11:30 +0000 (23:11 +0100)]
Nodes: Various UI cleanups for Image and Environment Texture Nodes

Mainly consistency changes and smaller fixes.

* Environment Texture Nodes:
** show image info
** split layout for menus (showing menu title on the left)
** hierarchical button order

* Image Nodes:
** disable Alpha Mode menu if Use Alpha is disabled
** Don't show "+" icon/button if an image is already loaded
** Consistent alignment of menu buttons (see Input Color Space menu)

Requested and approved by @venomgfx

6 years agoNodes: (Un)pack, filepath, refresh buttons for Environment Texture nodes
julianeisel [Mon, 9 Feb 2015 21:25:12 +0000 (22:25 +0100)]
Nodes: (Un)pack, filepath, refresh buttons for Environment Texture nodes

The same buttons are already used for other image textures and since the
environment tex node does only allow images as well, it makes sense to
have this here too.

Approved by @lukastoenne and @venomgfx,
requested by @venomgfx

6 years agoCMake cleanup: Move OSL detection code into FindOpenShadingLanguage.cmake
Sergey Sharybin [Mon, 9 Feb 2015 21:39:00 +0000 (02:39 +0500)]
CMake cleanup: Move OSL detection code into FindOpenShadingLanguage.cmake

Should be no functional changes.

6 years agoFix file size not drawn using Link/Append
julianeisel [Mon, 9 Feb 2015 21:06:07 +0000 (22:06 +0100)]
Fix file size not drawn using Link/Append

For linking/appending, .blends get the type S_IFDIR added which prevents
the size from being drawn. BLI_is_dir gets the type from the OS so it's
better suited for this case.

Reported by @sergey.

6 years agoBGE - Vehicle Controller - add background and API checks for arguments of function...
Ines Almeida [Mon, 9 Feb 2015 14:45:29 +0000 (14:45 +0000)]
BGE - Vehicle Controller - add background and API checks for arguments of function calls

Fixes T41570 crash
For readability, attachDir was renamed to downDir and the Python API docs renamed accordingly

6 years agoRecreating bge python modules instead of using existing
Ines Almeida [Mon, 9 Feb 2015 20:56:38 +0000 (20:56 +0000)]
Recreating bge python modules instead of using existing

All of the initXPythonBinding functions are changed to always creating the module instead of importing if previously existing.
I can instead only remove the module return when the import is ok, so that it always inits. But then, I don't see the point in importing.

I make sure that these functions are called only once per run, inside initBGE.
This was not the case with GameTypes. I moved initPyTypes inside of initGameTypesPythonBinding due to that.

I reorganized initGamePlayerPythonScripting and initGamePythonScripting so that they run things in the same order.
initGamePlayerPythonScripting imports mathutils and aud, the other only aud. Shouldn't it be the same for both?

Reviewers: campbellbarton

Subscribers: sybren

Projects: #game_engine, #game_python

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

6 years agoFix T43424: undo changes the active scene
Campbell Barton [Mon, 9 Feb 2015 18:45:57 +0000 (05:45 +1100)]
Fix T43424: undo changes the active scene

Using different scenes with 2+ windows broke entirely using undo.
Now keep track of the current windows scene in each undo-file,
and ensure the undo-scene is on a visible window when undo is executed,
switching the scene only when its not in a visible window.

6 years agomore direct fix for last commit
Campbell Barton [Mon, 9 Feb 2015 16:00:37 +0000 (03:00 +1100)]
more direct fix for last commit

6 years agoFix T43498: New curves fails /w radius & rotation
Campbell Barton [Mon, 9 Feb 2015 15:38:21 +0000 (02:38 +1100)]
Fix T43498: New curves fails /w radius & rotation

Scaling matrix assumed no rotation,
also remove unused apply_diameter arg.

6 years agoFix outliner crash renaming library /w filter
Campbell Barton [Mon, 9 Feb 2015 15:03:55 +0000 (02:03 +1100)]
Fix outliner crash renaming library /w filter

D1045 by @a.romanov

6 years agoCycles: Another attempt to solve 32bit CUDA kernel
Sergey Sharybin [Mon, 9 Feb 2015 11:11:58 +0000 (16:11 +0500)]
Cycles: Another attempt to solve 32bit CUDA kernel

Previous fix didn't quite work well. For some reason everything worked fine when
using native nvcc in 32bit environment, but cross-compiling from 64bit platform
it was still running out of memory.

For now just made it so all the kernels are slower on 32bit CUDA as a temporary
solution. Either it'll be solved in next CUDA releases (by dropped 32bit? =\) or
we'll find better workaround.

6 years agoFix ImBuf leaked by Image from View operator
Nicholas Bishop [Mon, 9 Feb 2015 11:02:59 +0000 (12:02 +0100)]
Fix ImBuf leaked by Image from View operator

Running this operator and and closing Blender gives this:
Error: Not freed memory blocks: 2
ImBuf_struct len: 2480 0x69ba4f8
imb_addrectImBuf len: 1048576 0x6ccc2d8

Fixed with added call to IMB_freeImBuf in BKE_image_add_from_imbuf.
Could be fixed in the operator instead, but I think the BKE function
is the correct place since the comment says it should take ownership
of the ImBuf.

Reviewers: sergey

Reviewed By: sergey

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

6 years agoCode cleanup: remove unused function BKE_image_assign_ibuf
Nicholas Bishop [Mon, 9 Feb 2015 10:25:34 +0000 (11:25 +0100)]
Code cleanup: remove unused function BKE_image_assign_ibuf

Reviewers: sergey

Reviewed By: sergey

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

6 years agoSpaceFile: rework filelist_find, was looping way too much.
Bastien Montagne [Mon, 9 Feb 2015 09:10:20 +0000 (10:10 +0100)]
SpaceFile: rework filelist_find, was looping way too much.

6 years agoGPencil: Show color swatches for GPencil layers in Outliner
Joshua Leung [Sun, 8 Feb 2015 23:39:03 +0000 (12:39 +1300)]
GPencil: Show color swatches for GPencil layers in Outliner

Instead of showing a meaningless "dot" icon or having to come up with an arbitrary
icon, the Outliner now shows the stroke/fill color swatches for each layer to
match every other place where these are shown.

NOTE: Like many other widgets in the outliner though, these are not editable.

6 years agoGPencil: Viewport visbility and editability toggles for layers in Outliner
Joshua Leung [Sun, 8 Feb 2015 23:34:17 +0000 (12:34 +1300)]
GPencil: Viewport visbility and editability toggles for layers in Outliner

* Viewport visibility and locking are currently exposed
* Later on, visibility in renders can also be included

6 years agoFix T43554: Zoom to mousepos makes 2D Views pan after zoom limits are
julianeisel [Sun, 8 Feb 2015 21:33:58 +0000 (22:33 +0100)]
Fix T43554: Zoom to mousepos makes 2D Views pan after zoom limits are
reached

There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.

6 years agondof: detect new 3Dx devices on Linux
Mike Erwin [Sun, 8 Feb 2015 20:01:18 +0000 (15:01 -0500)]
ndof: detect new 3Dx devices on Linux

Was filtering for Logitech's USB vendor ID. 3Dconnexion now uses their
own vendor ID for new products. Mac & Windows don't look for specific
vendors so they should be fine.

Also added a note to eventually make USE_FINISH_GLITCH_WORKAROUND
available on all platforms.

6 years agoGHOST: fewer virtual functions
Mike Erwin [Sun, 8 Feb 2015 19:18:53 +0000 (14:18 -0500)]
GHOST: fewer virtual functions

Reined back over-use of virtual functions in GHOST, especially in
"leaves" of the inheritance hierarchy. This eliminates vtables for many
classes and (in some places) turns virtual function dispatch into direct
function calls.

I'll be around to fix things if other coders think this change is too
much.

Still lots of virtual in GHOST_TaskbarWin32 since it just loves virtual.

6 years agominor Windows include tweak
Mike Erwin [Sun, 8 Feb 2015 17:41:45 +0000 (12:41 -0500)]
minor Windows include tweak

Needed a minor change to test committing from a new development system.