blender.git
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
fine.

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: https://developer.blender.org/D1021

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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: https://developer.blender.org/D1026

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
see.

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: https://developer.blender.org/D1033

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.
{F138559}

Alexander (Blend4Web Team)

Reviewers: aligorith

Subscribers: yurikovelenov, Evgeny_Rodygin, valentin_b4w, AlexKowel

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

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: https://developer.blender.org/D973

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: https://developer.blender.org/D1018

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:

  node.shading_compatibility

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()
    scene.post_draw.append(write)

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

    # OpenGL setup
    bgl.glMatrixMode(bgl.GL_PROJECTION)
    bgl.glLoadIdentity()
    bgl.gluOrtho2D(0, width, 0, height)
    bgl.glMatrixMode(bgl.GL_MODELVIEW)
    bgl.glLoadIdentity()

    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.

Example: http://www.pasteall.org/pic/show.php?id=82650
In this case the render is ~16% faster.

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

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
identical.

  - 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
    eliminated.

Reviewers: campbellbarton, lordloki

Reviewed By: lordloki

Projects: #game_physics

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

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.

NOTE:
* 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.

5 years agoFix limit check before accessing array in opennl
Martin Ettl [Wed, 21 Jan 2015 12:18:39 +0000 (17:18 +0500)]
Fix limit check before accessing array in opennl

Please note that opennl is already modified (for double precision)
so re-integration is not really easy. Also, we'll eventually switch
to Eigen.

For until that let's just solve the condition in our bundled opennl.

5 years agoFix T43158: pixels in the 3d-view was mis-aligned
Campbell Barton [Wed, 21 Jan 2015 12:01:50 +0000 (23:01 +1100)]
Fix T43158: pixels in the 3d-view was mis-aligned

Change the pixel offset for regions, it make oversampling blurry when drawing pixel aligned values.
See T41749

5 years agoRemoved generic debug1..4 values from the cloth data.
Lukas Tönne [Wed, 21 Jan 2015 09:07:11 +0000 (10:07 +0100)]
Removed generic debug1..4 values from the cloth data.

These were used as UI buttons during development. If such parameters are
needed again later they should instead be added in the (now global)
SimDebugData and made accessible with a dev addon or so.

5 years agoUI: support alt+wheel for expanded enums
Campbell Barton [Wed, 21 Jan 2015 05:27:21 +0000 (16:27 +1100)]
UI: support alt+wheel for expanded enums

5 years agoFix T43247: Don't open pulldown when a popup overlaps it
julianeisel [Wed, 21 Jan 2015 02:45:00 +0000 (03:45 +0100)]
Fix T43247: Don't open pulldown when a popup overlaps it

Auto-opening of pulldown menus didn't take overlapping popups into account.

5 years agoBKE_screen: add BKE_screen_find_area_xy
Campbell Barton [Wed, 21 Jan 2015 02:43:46 +0000 (13:43 +1100)]
BKE_screen: add BKE_screen_find_area_xy

Use from eyedropper & screen operators
also define SPACE_TYPE_ANY for readability.

5 years agoFix Python CTest's, ignore 'addons_contrib'
Campbell Barton [Wed, 21 Jan 2015 01:56:30 +0000 (12:56 +1100)]
Fix Python CTest's, ignore 'addons_contrib'

Too many contrib addons are in an unstable state making the test not so useful.

Thanks to Sergey initial patch: D1012, redid mostly - but outcome is the same.

5 years agoRemove 'addons_extern' was used before git move
Campbell Barton [Wed, 21 Jan 2015 01:56:03 +0000 (12:56 +1100)]
Remove 'addons_extern' was used before git move

5 years agoCleanup: style
Campbell Barton [Wed, 21 Jan 2015 00:57:11 +0000 (11:57 +1100)]
Cleanup: style

5 years agoUpdate icons after recent cleanup in svg file.
Bastien Montagne [Tue, 20 Jan 2015 20:49:57 +0000 (21:49 +0100)]
Update icons after recent cleanup in svg file.

Note differences in those five icons are invisible by eye, just for sake of consistency.

5 years agoCleanup SVG icon file, pass II.
Bastien Montagne [Tue, 20 Jan 2015 19:05:54 +0000 (20:05 +0100)]
Cleanup SVG icon file, pass II.

Name each icon group from its define in Blender.

Simplifies searching for a given icon (in one way or the other), and could also be
useful one day in some scripting.

Also, removed/fixed more empty and stray groups...

Finally, found that we have several svg icons not linked to any defines, and one define
with no icon (dyntopo), would be nice to sort this one way or the other too.

5 years agoCleanup SVG icons file: pass I.
Bastien Montagne [Tue, 20 Jan 2015 14:18:34 +0000 (15:18 +0100)]
Cleanup SVG icons file: pass I.

Made sure each icon has its own, 'private' group.
Removed empty groups, and some stray paths and rects (among other benefits,
'make icons' do not generate anymore that half o dozen of empty icons one had to remove
by hand before committing ;) ).

Note: double checked, only five generated icons differ (on binary level) from before,
with no actual visual diff.

5 years agoMade SimDebugData into a single global instance.
Lukas Tönne [Tue, 20 Jan 2015 17:29:31 +0000 (18:29 +0100)]
Made SimDebugData into a single global instance.

This way it doesn't have to be stored as DNA runtime pointers or passed
down as a function argument. Currently there is now no property or
button to enable debugging, this will be added again later.

5 years agoOutliner: "Show Active" - if active is a child, open tree to show child
julianeisel [Tue, 20 Jan 2015 16:32:54 +0000 (17:32 +0100)]
Outliner: "Show Active" - if active is a child, open tree to show child

Previously, if the active object was a child, "Show Active" only showed the
parent object. Now it also opens the tree to take children into account.

Patch D974 by @lichtwerk with some minor edits, reviewed by me.

5 years agoFix for BI rendering of hair spirals: Was not taking the extra points
Lukas Tönne [Tue, 20 Jan 2015 15:38:03 +0000 (16:38 +0100)]
Fix for BI rendering of hair spirals: Was not taking the extra points
into account.

5 years agoDe-duplicate large block of shared code for GL vert attribs
Nicholas Bishop [Tue, 20 Jan 2015 13:17:08 +0000 (14:17 +0100)]
De-duplicate large block of shared code for GL vert attribs

Code in ccgdm_draw_attrib_vertex() was entirely the same as the top
portion of the code in cddm_draw_attrib_vertex(). Moved this code to a
new function, DM_draw_attrib_vertex().

ccgdm_draw_attrib_vertex() was removed in favor of calling
DM_draw_attrib_vertex(). cddm_draw_attrib_vertex() still does a couple
extra things, so it still exists but calls DM_draw_attrib_vertex().

In the interest of easy code review, no changes made to the code in
DM_draw_attrib_vertex() other than the new name and an added comment.

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

5 years agoFix UI glitch: Ctrl/Shift didnt refresh the UI
Campbell Barton [Tue, 20 Jan 2015 12:02:15 +0000 (23:02 +1100)]
Fix UI glitch: Ctrl/Shift didnt refresh the UI

5 years agoFix transform glitch: Ctrl/Shift didn't refresh
Campbell Barton [Tue, 20 Jan 2015 12:14:06 +0000 (23:14 +1100)]
Fix transform glitch: Ctrl/Shift didn't refresh