5 years agoSwitch windows MSVC builds to OpenAL-soft
Martijn Berger [Wed, 28 Jan 2015 09:36:19 +0000 (10:36 +0100)]
Switch windows MSVC builds to OpenAL-soft

5 years agocleanup: py imports
Campbell Barton [Tue, 27 Jan 2015 06:46:07 +0000 (17:46 +1100)]
cleanup: py imports

5 years agoStacked fullscreen area support (proper implemenation)
julianeisel [Wed, 28 Jan 2015 01:32:52 +0000 (02:32 +0100)]
Stacked fullscreen area support (proper implemenation)

Adds support for stacked fullscreens. This basically means, if a user opens a
temporary fullscreen mode, such as the File Browser or the Image Editor render
view, from a different fullscreen, the "Back to Previous" function or the other
ways to escape those temporary fullscreens don't return to the split screen
layout but to the previous fullscreen he has been in.

I already committed something similar (f7e844570fea862) but that was only
supposed as a fix, it didn't work for the "Back to Previous" operator and the
implementation wasn't really reusable. This one looks a bit nicer + makes some
older hacks unnecessary :)

5 years agoOSL: Updates for OSL 1.5 API changes.
Thomas Dinges [Wed, 28 Jan 2015 00:07:59 +0000 (01:07 +0100)]
OSL: Updates for OSL 1.5 API changes.

* create() and destroy() are deprecated since OSL 1.5, use regular constructors / destructors.

5 years agoFix T43388 Cycles Baking gives different results than Cycles Render
Dalai Felinto [Tue, 27 Jan 2015 15:02:55 +0000 (13:02 -0200)]
Fix T43388 Cycles Baking gives different results than Cycles Render

Reported and nailed down by Michale (MeshLogic).
The code that fixes this was commented out, but Brecht gave the go ahead to use it even if it is not the real solution

5 years agoInterface get rid of some quadstrips in favor of trianglestrips
Martijn Berger [Tue, 27 Jan 2015 19:18:39 +0000 (20:18 +0100)]
Interface get rid of some quadstrips in favor of trianglestrips

If we ever want OpenGL 3.2 core context quadstrips need to go anyway and while there is much more things that need to be done this is something that can be tackled without any mayor surgery.
And without losing any kind of compatibility with ancient GL.

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: psy-fi

Projects: #bf_blender

Differential Revision:

5 years agoCorrection to tooltip, object texture space is supported by both SVM and OSL
Sergey Sharybin [Tue, 27 Jan 2015 18:53:50 +0000 (23:53 +0500)]
Correction to tooltip, object texture space is supported by both SVM and OSL

5 years agoFix T43398: Viewport "Renderend" ist not updated when a material is assigned to a...
Sergey Sharybin [Tue, 27 Jan 2015 17:40:55 +0000 (22:40 +0500)]
Fix T43398: Viewport "Renderend" ist not updated when a material is assigned to a face

The issues goes back to eb016eb and now it becomes clear object could be tagged for
update from the edit mode as well.

5 years agoFix T43309 saving takes longer.
Antony Riakiotakis [Tue, 27 Jan 2015 16:58:29 +0000 (17:58 +0100)]
Fix T43309 saving takes longer.

Issue is that world shader compilation and loading may take long so we
just draw file previews with premultiplied background. Should create the
old familiar transparent background files.

Thanks to Sergey for figuring out the issue.

5 years agoFollowup fix for T43394: Reconnect feature was using identity matrix for
Lukas Tönne [Tue, 27 Jan 2015 16:49:34 +0000 (17:49 +0100)]
Followup fix for T43394: Reconnect feature was using identity matrix for
transforming hair into world space, but this is already happining due to
the global flag.

Still is a horrible mess, legacy code headache as always ...

5 years agoFix T43346: Window mapping is wrong in preview render
Sergey Sharybin [Tue, 27 Jan 2015 16:36:14 +0000 (21:36 +0500)]
Fix T43346: Window mapping is wrong in preview render

The issue was caused by the whole viewplane used for mapping calculation
which would for sure lead to differences between final camera render and
viewport render from the camera view.

This commit makes it so window texture mapping is the same as final render
when viewing from the camera in viewport render.

It's not totally clear what's the right thing to do when viewport is not
in the camera view mode and that part is left unchanged.

5 years agoFix T43250, lamp node did not use energy when used with nodes in blender
Antony Riakiotakis [Tue, 27 Jan 2015 15:34:27 +0000 (16:34 +0100)]
Fix T43250, lamp node did not use energy when used with nodes in blender

Similar to fix for T42074 we need to multiply with energy -after-
texture application.

5 years agoAnd one more infamous BPlayer Fix (tm).
Bastien Montagne [Tue, 27 Jan 2015 15:28:54 +0000 (16:28 +0100)]
And one more infamous BPlayer Fix (tm).

Seriously, please build complete Blender when you change some public func signature...

5 years agoFix T43367: Non-wacom tablets broken on Blender in linux?
Bastien Montagne [Tue, 27 Jan 2015 15:17:27 +0000 (16:17 +0100)]
Fix T43367: Non-wacom tablets broken on Blender in linux?

Looks like with some versions of Xlib (at least the 1.6.2 currently used on Debian testing)
and/or evdev generic driver (2.9.0 currently on Debian testing), you have to also 'select'
DeviceButton1Motion with the extended tablet's motion event, otherwise you won't get any
tablet motion event once pen is pressed, leading to no pressure (each stroke keeping its
init pressure until the end). Crap!

5 years agoFix T43371 lamps not updated on appenidng. Remove GPU materials on
Antony Riakiotakis [Tue, 27 Jan 2015 14:37:49 +0000 (15:37 +0100)]
Fix T43371 lamps not updated on appenidng. Remove GPU materials on

5 years agoCorrect path to mingw64 libs so some minimal blender subset is possible to be compile...
Sergey Sharybin [Tue, 27 Jan 2015 14:29:22 +0000 (19:29 +0500)]
Correct path to mingw64 libs so some minimal blender subset is possible to be compiled with older gcc

5 years agoFix T43429: bpy.ops.render.render() not working with scene in VSE
Sergey Sharybin [Tue, 27 Jan 2015 12:13:21 +0000 (17:13 +0500)]
Fix T43429: bpy.ops.render.render() not working with scene in VSE

Was a mistake in threading conflict prevention condition.

5 years agoProxy job: make user cancelling actually matter
Antony Riakiotakis [Tue, 27 Jan 2015 11:29:45 +0000 (12:29 +0100)]
Proxy job: make user cancelling actually matter

5 years agoFix T43427: Particle system children sometimes not generated on reload
Sergey Sharybin [Tue, 27 Jan 2015 11:14:53 +0000 (16:14 +0500)]
Fix T43427: Particle system children sometimes not generated on reload

The issue was caused by the conflict between preview render which would set
R_NO_IMAGE_LOAD flag on the renderer and texture samplers called outside of
the render pipeline trying to use this flag.

Now the sampler functions accepts extra argument so render pipeline can
still skip image load, but calls outside of the pipeline will nicely load
all the images.

Not cleanest change in the world but good enough to unlock gooseberry team,
and assuming we already had pool passed all over the place it should be all

Will need to reshuffle arguments into SamplerOptions structure later.

5 years agoCycles: Support texture coordinate from another object
Sergey Sharybin [Wed, 21 Jan 2015 17:19:31 +0000 (22:19 +0500)]
Cycles: Support texture coordinate from another object

This is the same as blender internal's texture mapping from another object,
so this way it's possible to control texture space of one object by another.

Quite straightforward change apart from the workaround for the stupidness of
the dependency graph. Now shader has flag telling that it depends on object
transform. This is the simplest way to know which shaders needs to be tagged
for update when object changes. This might give some false-positive tags now
but reducing them should not be priority for Cycles and rather be a priority
to bring new dependency graph.

Also GLSL preview does not support using other object for mapping.

This is actually correct for BI shading as well and to be addressed as
a part of general GLSL viewport improvements since it's not really clear
how to support this in GLSL.

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

Differential Revision:

5 years agoFix T43408: Putting steps and keys properties into an inactive sublayout
Lukas Tönne [Tue, 27 Jan 2015 08:06:45 +0000 (09:06 +0100)]
Fix T43408: Putting steps and keys properties into an inactive sublayout
based on the interpolate property does not make any sense at all.

These settings are still totally confusing - this code has not been
touched since 2009 at least! Go figure ...

5 years agomissed last commit
Campbell Barton [Mon, 26 Jan 2015 16:41:05 +0000 (03:41 +1100)]
missed last commit

5 years agoBGE: remove Py3.1 workaround
Campbell Barton [Mon, 26 Jan 2015 15:17:56 +0000 (02:17 +1100)]
BGE: remove Py3.1 workaround

5 years agoCleanup: current/parent paths: add helpers in BLI_path_utils.
Bastien Montagne [Mon, 26 Jan 2015 15:58:02 +0000 (16:58 +0100)]
Cleanup: current/parent paths: add helpers in BLI_path_utils.

Also, avoid calling ugly strcmp with '.' or '..', making direct char checks is
much cheaper here!

5 years agoCleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Bastien Montagne [Mon, 26 Jan 2015 15:03:11 +0000 (16:03 +0100)]
Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).

Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...

5 years agoCode cleanup: de-duplicate codegen texid assignment
Nicholas Bishop [Sat, 24 Jan 2015 16:07:38 +0000 (17:07 +0100)]
Code cleanup: de-duplicate codegen texid assignment

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use GPUDynamicType instead of int
Nicholas Bishop [Sat, 24 Jan 2015 14:50:03 +0000 (15:50 +0100)]
Code cleanup: use GPUDynamicType instead of int

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use GPUDataSource enum instead of int
Nicholas Bishop [Sat, 24 Jan 2015 14:33:34 +0000 (15:33 +0100)]
Code cleanup: use GPUDataSource enum instead of int

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use bool instead of int
Nicholas Bishop [Sat, 24 Jan 2015 14:20:26 +0000 (15:20 +0100)]
Code cleanup: use bool instead of int

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use an enum for GPUNodeLink.image
Nicholas Bishop [Sat, 24 Jan 2015 14:09:18 +0000 (15:09 +0100)]
Code cleanup: use an enum for GPUNodeLink.image

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use enums instead of defines
Nicholas Bishop [Sat, 24 Jan 2015 14:02:54 +0000 (15:02 +0100)]
Code cleanup: use enums instead of defines

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: move struct GPUFunction and related code out of header
Nicholas Bishop [Sat, 24 Jan 2015 14:01:13 +0000 (15:01 +0100)]
Code cleanup: move struct GPUFunction and related code out of header

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: use lowercase "gpu" prefix for static functions
Nicholas Bishop [Sat, 24 Jan 2015 13:51:00 +0000 (14:51 +0100)]
Code cleanup: use lowercase "gpu" prefix for static functions

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: remove do-nothing function `GPU_node_end`
Nicholas Bishop [Sat, 24 Jan 2015 13:48:19 +0000 (14:48 +0100)]
Code cleanup: remove do-nothing function `GPU_node_end`

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: remove some `UNUSED` parameters from static functions
Nicholas Bishop [Sat, 24 Jan 2015 13:47:32 +0000 (14:47 +0100)]
Code cleanup: remove some `UNUSED` parameters from static functions

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: retype various fields/parameters from int to GPUType
Nicholas Bishop [Sat, 24 Jan 2015 12:58:19 +0000 (13:58 +0100)]
Code cleanup: retype various fields/parameters from int to GPUType

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: remove parameter from GPU_node_link_create()
Nicholas Bishop [Sat, 24 Jan 2015 13:10:03 +0000 (14:10 +0100)]
Code cleanup: remove parameter from GPU_node_link_create()

In all but one call the value 0 (aka GPU_NONE) was passed in. Clearer
to just default to GPU_NONE and change the one caller that sets a real
type to do it explicitly.

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: minor comment improvements
Nicholas Bishop [Sat, 24 Jan 2015 12:43:57 +0000 (13:43 +0100)]
Code cleanup: minor comment improvements

Reviewed By: campbellbarton

Differential Revision:

5 years agoCode cleanup: give anomymous enum used for CustomData.type a name
Nicholas Bishop [Sat, 24 Jan 2015 12:25:49 +0000 (13:25 +0100)]
Code cleanup: give anomymous enum used for CustomData.type a name

Used this in GPU module to clarify what some "ints" really are.

Reviewed By: campbellbarton

Differential Revision:

5 years agoUV Unwrap: Correct aspect was inverted
Campbell Barton [Mon, 26 Jan 2015 14:05:09 +0000 (01:05 +1100)]
UV Unwrap: Correct aspect was inverted

5 years agoFix T43409: Particle instancing on hair sometimes doesn't have a path
Lukas Tönne [Mon, 26 Jan 2015 13:57:01 +0000 (14:57 +0100)]
Fix T43409: Particle instancing on hair sometimes doesn't have a path
cache available.

5 years agoTimeline: Draw keyframe lines at 60% height
Sybren A. Stüvel [Mon, 26 Jan 2015 13:48:51 +0000 (14:48 +0100)]
Timeline: Draw keyframe lines at 60% height

This patch updates the timeline editor. Ordinarily, it draws the
yellow keyframe lines at 100% of the available height. This becomes an
issue when there are keyframes for every frame, which can happen when
importing motion capture data or recording animations from the BGE. In
such cases, the green "current frame" indicator becomes very hard to

This patch restricts the drawing to the bottom 60% of the available
space, thereby making the "current frame" indicator more visible.

Reviewers: aligorith

Reviewed By: aligorith

Subscribers: Severin

Projects: #bf_blender

Differential Revision:

5 years agoFix T43394: hair remapping needs to handle "global" hair correctly.
Lukas Tönne [Mon, 26 Jan 2015 13:37:13 +0000 (14:37 +0100)]
Fix T43394: hair remapping needs to handle "global" hair correctly.

The function was checking the psys flag for this, but since for
disconnect/connect the same psys is used as source and target, the flag
must be passed explicitly.

5 years agoFix T38619: Confusing logic for Keying Set keyframing Settings
Joshua Leung [Mon, 26 Jan 2015 13:09:50 +0000 (02:09 +1300)]
Fix T38619: Confusing logic for Keying Set keyframing Settings

The logic used for determining whether certain keyframing settings (i.e. visual,
only needed, xyz -> rgb) got applied was wonky. The original intention here was
that the Keying Set settings would override the global settings, and the path
settings would override what was used for the Keying Set. However, that was not
happening in all cases previously, as it was only possible to add flags and not
to turn them off.

This commit fixes that by introducing separate toggles to control whether the
Keying Set/Path's settings override the settings inherited from its parent
(i.e. the Keying Set for the Path, and the User Prefs for the Keying Set).
The icons used for these toggles could get revised a bit (we need something
which communicates "override this"; the current one is the closest I could find)

WARNING: If you have old keying sets, this may cause some breakage!

5 years agoFix T43345: Dirty Vertex Colors - odd behavior
Campbell Barton [Mon, 26 Jan 2015 11:38:59 +0000 (22:38 +1100)]
Fix T43345: Dirty Vertex Colors - odd behavior

was cancelling when the dynamic range was zero, but gave odd behavior,
using the last value, not the values from the UI.

5 years agoFix T41834: Ctrl+LMB, Extrude Curves 2+ splines
Campbell Barton [Mon, 26 Jan 2015 09:55:41 +0000 (20:55 +1100)]
Fix T41834: Ctrl+LMB, Extrude Curves 2+ splines

Extrude and Ctrl+LMB now support multiple selected vertices.
Also maintain active vertices.

D964 by Tyler Sliwkanich with own modifications

5 years agoChange exception syntax to be more modern and hopefully fix buildbot issue in the...
Martijn Berger [Mon, 26 Jan 2015 07:48:55 +0000 (08:48 +0100)]
Change exception syntax to be more modern and hopefully fix buildbot issue in the process

5 years agoCurves: BKE_nurb_copy left duplicate arrays
Campbell Barton [Mon, 26 Jan 2015 07:21:44 +0000 (18:21 +1100)]
Curves: BKE_nurb_copy left duplicate arrays

While callers accounted for this, its quite error prone. Just NULL instead.

5 years agoBugfix T43343: Buttons for Keyframing Settings are Mutually Exclusive
Joshua Leung [Mon, 26 Jan 2015 06:15:46 +0000 (19:15 +1300)]
Bugfix T43343: Buttons for Keyframing Settings are Mutually Exclusive

Since 1c3f2354f83b3e79dee31d837ca4d7c08d2c3f26 the keyframing settings on
Keying Sets have been incorrectly displayed as a clump of toggle buttons,
which are usually only used when only one of the options apply.

Reverting this back to how it was, while leaving bl_options in place still for
the one case where it makes sense to do it that way (i.e. for KeyingSetInfo)

5 years agoUI: macro for checking modifiers
julianeisel [Mon, 26 Jan 2015 01:51:09 +0000 (02:51 +0100)]
UI: macro for checking modifiers

Useful for UI handling where its common to check multiple modifiers at once.

5 years agoCorrection to c792e546991bd9: OS-Key should be checked as well
julianeisel [Mon, 26 Jan 2015 01:51:09 +0000 (02:51 +0100)]
Correction to c792e546991bd9: OS-Key should be checked as well

5 years agoCleanup: Remove ugly ELEM checks in modifier key handling
julianeisel [Mon, 26 Jan 2015 01:38:39 +0000 (02:38 +0100)]
Cleanup: Remove ugly ELEM checks in modifier key handling

Campbell once told me such checks can cause warnings on some compilers, so
let's try to avoid them.

From the theoretical view, this check works quite different than the old
one, but in this case everything should work just like previousely.

5 years agoIf a modifier key is held, don't open context menu
julianeisel [Mon, 26 Jan 2015 00:57:58 +0000 (01:57 +0100)]
If a modifier key is held, don't open context menu

D1019 by @gregzaal (minor edits by me).

Thanks for the patch!

5 years agocleanup: warnings, spelling
Campbell Barton [Sun, 25 Jan 2015 10:15:27 +0000 (21:15 +1100)]
cleanup: warnings, spelling

5 years agoCrash when deleting NlaTrack
Romanov Alexander [Thu, 22 Jan 2015 13:37:04 +0000 (02:37 +1300)]
Crash when deleting  NlaTrack

Steps to reproduce:
1) Create an object, animated with shape keys
2) Copy it with Alt-D
3) Push action down to nla track
4) Select that track and delete it

In attached file 1-3 steps are completed.

Alexander (Blend4Web Team)

Reviewers: aligorith

Subscribers: yurikovelenov, Evgeny_Rodygin, valentin_b4w, AlexKowel

Differential Revision:

5 years agoFix T43315: Minor Conflict in Maya Key Configs
julianeisel [Sun, 25 Jan 2015 02:25:25 +0000 (03:25 +0100)]
Fix T43315: Minor Conflict in Maya Key Configs

Alt+Mousewheel was used for frame scrubbing which isn't really good as users
may often use this by accident while using Alt for Viewport navigation.

Frame scrubbing/frame_offset() is now called by Ctrl+Alt+Mousewheel (shift +
Mousewheel was already used for scrolling up/down)

5 years agoFix T43399: VSE - don't show fps info when stopping animation with ALT+A
julianeisel [Sun, 25 Jan 2015 01:43:57 +0000 (02:43 +0100)]
Fix T43399: VSE - don't show fps info when stopping animation with ALT+A

Caused by a missing notifier on the animation_play operator.

5 years agoFix T43335: Node Editor: name doesn't update
julianeisel [Sun, 25 Jan 2015 00:59:49 +0000 (01:59 +0100)]
Fix T43335: Node Editor: name doesn't update

Update Node Editor info (drawn on the bottom left) on redraw if needed

5 years agoCleanup: Ugly typo (retore->restore)
julianeisel [Sat, 24 Jan 2015 22:39:06 +0000 (23:39 +0100)]
Cleanup: Ugly typo (retore->restore)

5 years agoFix T43008: Support stacked fullscreen areas
julianeisel [Sat, 24 Jan 2015 21:53:22 +0000 (22:53 +0100)]
Fix T43008: Support stacked fullscreen areas

5 years agoFix BGE compilation after recent renames in BKE_image (tsst...).
Bastien Montagne [Sat, 24 Jan 2015 13:57:57 +0000 (14:57 +0100)]
Fix BGE compilation after recent renames in BKE_image (tsst...).

5 years agoBKE_image: use BKE_image_*** prefix
Campbell Barton [Sat, 24 Jan 2015 05:48:23 +0000 (16:48 +1100)]
BKE_image: use BKE_image_*** prefix

use bools for return values and some api naming consistency.

5 years agoCleanup: style
Campbell Barton [Fri, 23 Jan 2015 16:10:23 +0000 (03:10 +1100)]
Cleanup: style

5 years agoDon't add Cycles tests if tests folder does not exist
Sergey Sharybin [Fri, 23 Jan 2015 15:56:03 +0000 (20:56 +0500)]
Don't add Cycles tests if tests folder does not exist

Also print message about those tests being disabled.

5 years agoRevert "New cycles tests require buildbot to checkout tests of have test succeed...
Sergey Sharybin [Fri, 23 Jan 2015 15:48:28 +0000 (20:48 +0500)]
Revert "New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files."

This reverts commit d390e24c49ba8543b56948402622563cae6e860f.

Forcing tests to success is really bad idea. It'll only lead to cases when
you see PASSED and will think everything is OK.

Long story short: never force tests to pass!

5 years agoNew cycles tests require buildbot to checkout tests of have test succeed if we test...
Martijn Berger [Fri, 23 Jan 2015 15:28:59 +0000 (16:28 +0100)]
New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files.

5 years agocleanup: style
Campbell Barton [Fri, 23 Jan 2015 14:59:09 +0000 (01:59 +1100)]
cleanup: style

5 years agoKeep proper bone active group after removing first one
Sergey Sharybin [Fri, 23 Jan 2015 11:59:16 +0000 (16:59 +0500)]
Keep proper bone active group after removing first one

Previously active bone group would be set to NONE after removing the first
one even if there are more groups in the armature.

5 years agoPyAPI: don't adjust prefs when an fails to load
Campbell Barton [Fri, 23 Jan 2015 10:09:31 +0000 (21:09 +1100)]
PyAPI: don't adjust prefs when an fails to load

Recent addons commit meant that addons would be enabled even if they weren't found.
This would give an error (which is fine), but also remove from preferences.

5 years agoCycles: Don't re-generate blackbody/beckmann tables on every shaders update
Sergey Sharybin [Fri, 23 Jan 2015 09:00:48 +0000 (14:00 +0500)]
Cycles: Don't re-generate blackbody/beckmann tables on every shaders update

This commit makes it so blackbody and beckmann lookup tables are stored on CPU
after being generated and then only being copied to the device if needed.

This solves lag of viewport update when tweaking shader tree by using 266KB of
CPU memory.

5 years agoPyAPI: avoid scanning all addons on startup
Campbell Barton [Fri, 23 Jan 2015 05:20:37 +0000 (16:20 +1100)]
PyAPI: avoid scanning all addons on startup

Gives small speedup

5 years agoPyAPI: use set.discard instead of set-subtraction
Campbell Barton [Fri, 23 Jan 2015 05:37:00 +0000 (16:37 +1100)]
PyAPI: use set.discard instead of set-subtraction

5 years agoPyAPI: Replace importlib.reload, not 'imp'
Campbell Barton [Fri, 23 Jan 2015 05:34:08 +0000 (16:34 +1100)]
PyAPI: Replace importlib.reload, not 'imp'

5 years agoCleanup: replace deprecated imp -> importlib
Campbell Barton [Fri, 23 Jan 2015 01:37:58 +0000 (12:37 +1100)]
Cleanup: replace deprecated imp -> importlib

5 years agoSet bAction.chanbase to deprecated
Campbell Barton [Thu, 22 Jan 2015 23:52:20 +0000 (10:52 +1100)]
Set bAction.chanbase to deprecated

5 years agoTheme Flatty Light
Pablo Vazquez [Thu, 22 Jan 2015 22:49:49 +0000 (23:49 +0100)]
Theme Flatty Light

As discussed, welcome flatty light to master!

5 years agoFix: Joining armatures fixes up the drivers accordingly
Joshua Leung [Thu, 22 Jan 2015 13:33:01 +0000 (02:33 +1300)]
Fix: Joining armatures fixes up the drivers accordingly

Finally! At long last, I've gotten this working! This ended up being far trickier
to get right than anticipated; the normal remapping API's cannot be used as-is
as they will just clobber over subtleties whenever datablock changes are involved.
So, for now, we have to duplicate the logic a bit.

5 years agoWIP: Attempt to get driver links remapped correctly when joining armatures
Joshua Leung [Thu, 22 Jan 2015 09:04:16 +0000 (22:04 +1300)]
WIP: Attempt to get driver links remapped correctly when joining armatures

Now, RNA Paths and driver targets get corrected, but at the expense of this
always happening (i.e. even for those affecting drivers which existed before).

5 years agoFix: Joining armatures wasn't updating Action Constraints properly
Joshua Leung [Wed, 21 Jan 2015 13:29:18 +0000 (02:29 +1300)]
Fix: Joining armatures wasn't updating Action Constraints properly

The code here was still trying to access ancient 2.4x "action channels" to rename
them. Now, this renames the relevant FCurves instead.

5 years agoCycles: Fix compilation error with some compilers
Sergey Sharybin [Thu, 22 Jan 2015 12:04:01 +0000 (17:04 +0500)]
Cycles: Fix compilation error with some compilers

Not sure why this was not visible previously, but the change is
logical anyway.

5 years agoCTests: Add render tests for Cycles
Sergey Sharybin [Thu, 22 Jan 2015 10:53:49 +0000 (15:53 +0500)]
CTests: Add render tests for Cycles

The idea is to use the set of really small images from the lib folder
and run Cycles render on them comparing render output to reference
images in the tests repository.

For sure same thing could become more generic for BI or Freestyle
render engines.

Thanks Campbell for review and code tweaks!

5 years agoCMake: Auto-detect path to idiff application in FindOpenImageIO.cmake
Sergey Sharybin [Thu, 22 Jan 2015 10:52:50 +0000 (15:52 +0500)]
CMake: Auto-detect path to idiff application in FindOpenImageIO.cmake

Not used at this moment, but will be real soon with new ctests.

5 years agoQuit blender with non-zero exit code if tryign to use non-existing render engine...
Sergey Sharybin [Thu, 22 Jan 2015 10:23:09 +0000 (15:23 +0500)]
Quit blender with non-zero exit code if tryign to use non-existing render engine via the command line

5 years agoFix T43357: Cycles crash with spatial splits after recent changes
Sergey Sharybin [Thu, 22 Jan 2015 09:56:00 +0000 (14:56 +0500)]
Fix T43357: Cycles crash with spatial splits after recent changes

When doing BVH leaf node split we can't rely on leaf size limit from
BVH parameters in case there's spatial split enabled.

This commit basically reverts previous optimization change here which
used stack-allocated memory and uses heap-allocated vector now.

It's possible to boost this code up again by using own allocator.

5 years agoCycles: Add assert check to triangle packing
Sergey Sharybin [Thu, 22 Jan 2015 09:27:13 +0000 (14:27 +0500)]
Cycles: Add assert check to triangle packing

Handy for troubleshooting.

5 years agoFix T43120: Cycles mapping node rotation order is different from viewport
Sergey Sharybin [Thu, 15 Jan 2015 08:23:33 +0000 (13:23 +0500)]
Fix T43120: Cycles mapping node rotation order is different from viewport

Root of the issue goes to the fact that since the very beginning Cycles was
using ZYX euler rotation for mapping shader node but blender was always
using XYZ euler rotation.

This commit switches Cycles to use XYZ euler order and adds versioning code
to preserve backward compatibility.

There was no really nice solution here because either we're ending up with
versioning code or we'll need to deal with all sort of exceptions from blender
side in order to support ZYX order for the mapping node. The latest one is
also creepy from the other render engines points of view -- that might break
compatibility with existing bindings or introduce some extra headache for them
in the future.

This could also become a PITA for us with need of supporting all sort of weird
and wonderful exceptions in the refactored viewport project.

NOTE: This commit breaks forward compatibility, meaning opening new files in
older blender might not give proper result if Mapping node was used.

Also, libraries are to be re-saved separately from the scene file, otherwise
versioning code for them wouldn't run if scene file was re-saved with new
version of blender.

Reviewers: brecht, juicyfruit, campbellbarton

Reviewed By: campbellbarton

Differential Revision:

5 years agoCleanup / Cycles: Code de-duplication for graph node relinking.
Thomas Dinges [Thu, 22 Jan 2015 08:58:11 +0000 (09:58 +0100)]
Cleanup / Cycles: Code de-duplication for graph node relinking.

Differential Revision:

5 years agoExpose shading node shading compatibility to the RNA
Sergey Sharybin [Thu, 22 Jan 2015 08:48:20 +0000 (13:48 +0500)]
Expose shading node shading compatibility to the RNA

This way it is possible to probe shading compatibility of a given node from
python, making things like versioning code much easier to perform.

it's only valid for shading nodes, for other nodes the property also exists
but reads as an empty enum.

To access this compatibilities:


5 years agoFix: Audaspace threw an exception for files it could not open.
Jörg Müller [Thu, 22 Jan 2015 05:57:56 +0000 (18:57 +1300)]
Fix: Audaspace threw an exception for files it could not open.

5 years agoDocs: touch ups in the bge.render doc introduction
Dalai Felinto [Thu, 22 Jan 2015 05:20:39 +0000 (03:20 -0200)]
Docs: touch ups in the bge.render doc introduction

5 years agobge.render.getStereoEye() and bge.types.LEFT_EYE/RIGHT_EYE
Dalai Felinto [Thu, 22 Jan 2015 04:42:40 +0000 (02:42 -0200)]
bge.render.getStereoEye() and bge.types.LEFT_EYE/RIGHT_EYE

This function allows the user to run specific code for each of the
rendered stereoscopic eyes in the Game Engine.

The initial use case is to set the camera projection matrix in
a scene.pre_draw callback function for each eye, to be used in VR
(Virtual Reality) installations.

Reviewed by Mitchell Stokes and Campbell Barton, thank you guys.

Sample Test Python Script:
import bge
import bgl
import blf

def init():
    """init function - runs once"""
    scene = bge.logic.getCurrentScene()

def write():
    """write on screen - depending on the eye"""
    width = bge.render.getWindowWidth()
    height = bge.render.getWindowHeight()

    # OpenGL setup
    bgl.gluOrtho2D(0, width, 0, height)

    eye = bge.render.getStereoEye()

    if eye == bge.render.LEFT_EYE:
        blf.position(0, (width * 0.2), (height * 0.3), 0)
        blf.size(0, 40, 72)
        blf.draw(0, "Left")

    else: # bge.render.RIGHT_EYE:
        blf.position(0, (width * 0.7), (height * 0.3), 0)
        blf.size(0, 40, 72)
        blf.draw(0, "Right")

5 years agoerror in last commit (missed in review)
Campbell Barton [Wed, 21 Jan 2015 23:56:52 +0000 (10:56 +1100)]
error in last commit (missed in review)

5 years agoOutliner: use enum for outliner_data_operation()
Campbell Barton [Wed, 21 Jan 2015 23:47:53 +0000 (10:47 +1100)]
Outliner: use enum for outliner_data_operation()

No functional change, D997 by @lichtwerk

5 years agoCycles: Support tube projection for images
Sergey Sharybin [Wed, 21 Jan 2015 19:37:09 +0000 (00:37 +0500)]
Cycles: Support tube projection for images

This way Cycles finally becomes feature-full on image projections
compared to Blender Internal and Gooseberry Project Team could
finally finish the movie.

5 years agoCycles: Support sphere mapping for the image texture
Sergey Sharybin [Wed, 21 Jan 2015 17:44:30 +0000 (22:44 +0500)]
Cycles: Support sphere mapping for the image texture

5 years agoCycles: Optimization for black world backgrounds
Thomas Dinges [Wed, 21 Jan 2015 19:06:53 +0000 (20:06 +0100)]
Cycles: Optimization for black world backgrounds

* If a Background node is set to a black color or zero strength,
it now gets removed from the shader graph.

* In case the graph is empty (no background node), the kernel will skip
evaluating it and save some rendertime. This can help quite a bit in scenes,
where the majority of the image consists of a black background.

In this case the render is ~16% faster.

Differential Revision:

5 years agoCleanup of BGE code CcdPhysicsEnvironment::CallbackTriggers()
Sybren A. Stüvel [Wed, 21 Jan 2015 17:42:24 +0000 (18:42 +0100)]
Cleanup of BGE code CcdPhysicsEnvironment::CallbackTriggers()

Refactored some code to be easier to read. Semantically the code is

  - Some conditions were negated to be able to return/continue early,
    rather than having the majority of the code inside an if-body.
  - Conditions were simplified (!(a == b)) turned into (a != b);
    repeated conditions calculated only once.
  - Unnecessary variables and one unnecessary condition were

Reviewers: campbellbarton, lordloki

Reviewed By: lordloki

Projects: #game_physics

Differential Revision:

5 years agoCMake/MSVC: Quotes around the path
Campbell Barton [Wed, 21 Jan 2015 14:52:17 +0000 (01:52 +1100)]
CMake/MSVC: Quotes around the path

D940 by @TeeTrizZz

5 years agoFix: Joining armatures loses drivers
Joshua Leung [Wed, 21 Jan 2015 13:08:29 +0000 (02:08 +1300)]
Fix: Joining armatures loses drivers

Currently, when joining two armatures, the drivers of the armatures being merged
in are lost. This commit introduces a new AnimData API function for merging
animation data into another AnimData block.

* For now, this only copies the drivers over. As a result, manual effort will
  still be needed to go through and fix the drivers.

  I am working on automating that process, but it's more important that the
  drivers don't have to be created from scratch for now (since this is needed
  for the Goosberry rigging work).

5 years agoAdded new debug flag which can be used to lazy-init the SimDebug drawing.
Lukas Tönne [Wed, 21 Jan 2015 13:00:59 +0000 (14:00 +0100)]
Added new debug flag which can be used to lazy-init the SimDebug drawing.

A development addon can be used now to enable the debug drawing, without
the need to add UI code for this in the release files.

The SimDebug feature should also get an overall build flag and use
function stubs unless enabled. That way any possibility of overhead in
releases is eliminated.