6 years agoOpenCL wrangler: Add some of the extension defines
Sergey Sharybin [Fri, 15 May 2015 07:05:28 +0000 (12:05 +0500)]
OpenCL wrangler: Add some of the extension defines

6 years agoCycles: Cleanup, move build options string calculation into the device class
Sergey Sharybin [Fri, 15 May 2015 07:03:08 +0000 (12:03 +0500)]
Cycles: Cleanup, move build options string calculation into the device class

This way it's easier to access platform name, device ID and other stuff which
might be needed to define build options.

6 years agoFix T42510: Limit by seams fails in edge/vert mode
Campbell Barton [Fri, 15 May 2015 07:08:27 +0000 (17:08 +1000)]
Fix T42510: Limit by seams fails in edge/vert mode

6 years agoBMesh: add loop-shell walker
Campbell Barton [Fri, 15 May 2015 07:07:57 +0000 (17:07 +1000)]
BMesh: add loop-shell walker

6 years agoCorrect recent cleanup
Campbell Barton [Fri, 15 May 2015 01:29:34 +0000 (11:29 +1000)]
Correct recent cleanup

Removed call which was still needed

6 years agoBMesh: rename loop walker -> edgeloop
Campbell Barton [Fri, 15 May 2015 00:55:22 +0000 (10:55 +1000)]
BMesh: rename loop walker -> edgeloop

6 years agoAdd material reorder buttons for Cycles as well
Julian Eisel [Thu, 14 May 2015 23:25:03 +0000 (01:25 +0200)]
Add material reorder buttons for Cycles as well

6 years agoFix some issues found by Coverity Scan
Julian Eisel [Thu, 14 May 2015 21:58:08 +0000 (23:58 +0200)]
Fix some issues found by Coverity Scan

Some of them are just brain dead code, some are potential bugs.

6 years agoCycles: Enable object motion blur on Intel OpenCL platform
Sergey Sharybin [Thu, 14 May 2015 19:48:12 +0000 (00:48 +0500)]
Cycles: Enable object motion blur on Intel OpenCL platform

This required allocating some memory related on object transform needed
by ShaderData and currently it is done for all the platforms. Since we're
targeting full feature-complete platforms this is rather acceptable at
this point and in the future we'll do selective NO_HAIR/NO_SSS/NO_BLUR

This is experimental still and in fact there're some major issues on
NVidia platform and it's not really clear if it's a bug in compiler,
some uninitizlied variable or other kind of issue.

6 years agoCycles: Various fixes
Sergey Sharybin [Thu, 14 May 2015 19:42:05 +0000 (00:42 +0500)]
Cycles: Various fixes

Some stupid fixes like spaces around operator and missing semicolon,
plus fix for wrong detecting of ShaderData SOA size. Thar was harmless
since there's only one closure array, but still better to fix this.

6 years agoCycles: Remove meaningless ifdef checks for features in device_opencl
Sergey Sharybin [Thu, 14 May 2015 18:44:19 +0000 (23:44 +0500)]
Cycles: Remove meaningless ifdef checks for features in device_opencl

This file was actually checking for features enabled on CPU and surely all
of them were enabled, so removing them does not cause any difference.

ideally we'll need to do runtime feature detection and just pass some stuff
as NULL to the kernel, or maybe also have variadic kernel entry points which
is also possible quite easily.

6 years agoCycles: Enable camera motion blur in split kernel for Intel/NVidia
Sergey Sharybin [Thu, 14 May 2015 18:35:19 +0000 (23:35 +0500)]
Cycles: Enable camera motion blur in split kernel for Intel/NVidia

It's good for testing and seems to work quite reliably here.

This probably not totally cheap in terms of performance, but this we
could solve quite easily by selective kernel compilation once other
things are tested/proved to be reliable.

6 years agoCycles: Fix missing camera-in-volume update when using certain render layers configur...
Sergey Sharybin [Thu, 14 May 2015 14:08:13 +0000 (19:08 +0500)]
Cycles: Fix missing camera-in-volume update when using certain render layers configurations

6 years agoCycles: Prepare code for OpenCL camera/motion blur
Sergey Sharybin [Thu, 14 May 2015 13:46:26 +0000 (18:46 +0500)]
Cycles: Prepare code for OpenCL camera/motion blur

The kernels are now compiling just fine, but there're some issues
during rendering. This is still to be investigated.

6 years agoCycles: Use special _auto versions of transform function in motion blur code
Sergey Sharybin [Thu, 14 May 2015 13:35:12 +0000 (18:35 +0500)]
Cycles: Use special _auto versions of transform function in motion blur code

Doing this as a separate commit so it's easier to revert in the future, once
OpenCL 2.0 is becoming our requirement.

6 years agoCycles: Add transformation functions with specified addrspace
Sergey Sharybin [Thu, 14 May 2015 13:19:21 +0000 (18:19 +0500)]
Cycles: Add transformation functions with specified addrspace

This is required for OpenCL prior to 2.0 and those functions will become
handy when working on camera/motion blur support in split kernel.

6 years agoCycles: Enable hair for split kernels when using Intel or NVidia drivers
Sergey Sharybin [Thu, 14 May 2015 12:33:37 +0000 (17:33 +0500)]
Cycles: Enable hair for split kernels when using Intel or NVidia drivers

Apart from simply enabling this features needed changes to the code were done.
Technical change, replacing SD access from "simple" structure to SOA.

6 years agoBGE: Add 'Lock Translation' for dynamic objects
Thomas Szepe [Thu, 14 May 2015 13:23:42 +0000 (15:23 +0200)]
BGE: Add 'Lock Translation' for dynamic objects

The XYZ translation lock was missing for dynamic object.

Reviewed By: panzergame

6 years agoInvert value calculation for percentages it makes more sense that way
Antony Riakiotakis [Thu, 14 May 2015 12:16:28 +0000 (14:16 +0200)]
Invert value calculation for percentages it makes more sense that way

6 years agoRadial operator:
Antony Riakiotakis [Thu, 14 May 2015 12:01:33 +0000 (14:01 +0200)]
Radial operator:

Percentage properties use interaction like factors with number feedback
and easier way to go predict lower percentages.

6 years agoAdd clear seams to uv editor
Antony Riakiotakis [Thu, 14 May 2015 10:48:47 +0000 (12:48 +0200)]
Add clear seams to uv editor

6 years agoBGE: Fix: Double jumps are not working with character motion actuator
Thomas Szepe [Thu, 14 May 2015 07:45:51 +0000 (09:45 +0200)]
BGE: Fix: Double jumps are not working with character motion actuator

The actual character motion actuator triggers every frame the jump method.
Adding an edge detection to trigger the jump method.

Reviewers: lordloki, sybren, moguri

Reviewed By: moguri

Differential Revision:

6 years agoBGE: Code Cleanup: LOD hysteresis calculation
Thomas Szepe [Thu, 14 May 2015 07:40:03 +0000 (09:40 +0200)]
BGE: Code Cleanup: LOD hysteresis calculation

* Cleanup duplicated code.
* Remove unnecessary "this->"

Reviewers: kupoman, lordloki

Reviewed By: kupoman, lordloki

Differential Revision:

6 years correct typo
Campbell Barton [Thu, 14 May 2015 03:13:13 +0000 (13:13 +1000)] correct typo

6 years agoFix project paint worldspace coord calc from seam
Campbell Barton [Thu, 14 May 2015 03:03:24 +0000 (13:03 +1000)]
Fix project paint worldspace coord calc from seam

Surprising this worked at all, would show errors with non-flat-quads.

6 years agoCycles: Resize light_data after possible light removal.
Thomas Dinges [Wed, 13 May 2015 23:11:43 +0000 (01:11 +0200)]
Cycles: Resize light_data after possible light removal.

6 years agoCycles: Remove Emission shaders from the graph if color or strength is 0.
Thomas Dinges [Wed, 13 May 2015 23:08:45 +0000 (01:08 +0200)]
Cycles: Remove Emission shaders from the graph if color or strength is 0.

6 years agoUI: Copy to selected nodes now filtered by type
Campbell Barton [Wed, 13 May 2015 20:23:41 +0000 (06:23 +1000)]
UI: Copy to selected nodes now filtered by type

Was needed because sockets are very generic type which would match on unrelated values.

6 years agoCleanup: Avoid temp variable in portal sampling code.
Thomas Dinges [Wed, 13 May 2015 17:54:20 +0000 (19:54 +0200)]
Cleanup: Avoid temp variable in portal sampling code.

6 years agoCycles: Cleanup: use generic utility function to set kernel arguments
Sergey Sharybin [Wed, 13 May 2015 14:29:19 +0000 (19:29 +0500)]
Cycles: Cleanup: use generic utility function to set kernel arguments

6 years agoCycles: Inline sizeof of elements needed for the split kernel
Sergey Sharybin [Wed, 13 May 2015 14:09:07 +0000 (19:09 +0500)]
Cycles: Inline sizeof of elements needed for the split kernel

No need to store them in the class, they're unlikely to be changed
and if they do change we're in big trouble anyway.

More appropriate approach would be then to typedef this things in
kernel_types.h, but still use inlined sizeof(),

6 years agoCleanup / Cycles: De-Duplicate Portal data fetch and side check.
Thomas Dinges [Wed, 13 May 2015 14:04:43 +0000 (16:04 +0200)]
Cleanup / Cycles: De-Duplicate Portal data fetch and side check.

6 years agoClip editor: Selecting curves in graph view always extends tracks selection
Sergey Sharybin [Wed, 13 May 2015 11:11:26 +0000 (16:11 +0500)]
Clip editor: Selecting curves in graph view always extends tracks selection

Was actually an old TODO, hopefully solved now in a way so everyone is happy.

6 years agoClip editor: Deselecting with shift-LMB does not work in graph view
Sergey Sharybin [Wed, 13 May 2015 10:55:32 +0000 (15:55 +0500)]
Clip editor: Deselecting with shift-LMB does not work in graph view

6 years agoFix T44683: Unable to mute movie clip when using stabilized display
Sergey Sharybin [Wed, 13 May 2015 09:28:24 +0000 (14:28 +0500)]
Fix T44683: Unable to mute movie clip when using stabilized display

6 years agoFix T44689: New Depsgraph crash
Sergey Sharybin [Wed, 13 May 2015 09:05:31 +0000 (14:05 +0500)]
Fix T44689: New Depsgraph crash

Simple highschool rated issue -- uninitialized variable :)

6 years agoProject Paint: enable old bleed UV calculation
Campbell Barton [Wed, 13 May 2015 08:26:56 +0000 (18:26 +1000)]
Project Paint: enable old bleed UV calculation

Was disabled because other values weren't quite right.

6 years agoProject Paint: resolve ugly bleed artifacts
Campbell Barton [Wed, 13 May 2015 08:04:46 +0000 (18:04 +1000)]
Project Paint: resolve ugly bleed artifacts

Use the bilinear reverse to find the pixel to bleed from.
Was using pixel space which didn't work well.

6 years agoProject Paint: simplify uv bleed factor calc
Campbell Barton [Wed, 13 May 2015 07:48:54 +0000 (17:48 +1000)]
Project Paint: simplify uv bleed factor calc

6 years agoFix T39775: Skin modifier crash
Campbell Barton [Wed, 13 May 2015 06:01:43 +0000 (16:01 +1000)]
Fix T39775: Skin modifier crash

6 years agoCleanup: reduce scope for win32, Linux vars
Campbell Barton [Wed, 13 May 2015 02:49:33 +0000 (12:49 +1000)]
Cleanup: reduce scope for win32, Linux vars

6 years agoDuplicate Render->RenderData.views for thread safety (as we do for layers)
Dalai Felinto [Wed, 13 May 2015 04:00:03 +0000 (01:00 -0300)]
Duplicate Render->RenderData.views for thread safety (as we do for layers)

This fixes nothing at the moment, but better safe than sorry since there
are still a few strange multiview issues around.

6 years agoUI: check visible layers when reading context
Campbell Barton [Wed, 13 May 2015 00:56:40 +0000 (10:56 +1000)]
UI: check visible layers when reading context

This resolves a problem where selected items edited for multi-value-editig
could include objects not in any visible views (unlocked layers, local view... etc).

6 years agoUI: multi-value-edit, distable alt+lmb on sliders
Campbell Barton [Wed, 13 May 2015 00:32:30 +0000 (10:32 +1000)]
UI: multi-value-edit, distable alt+lmb on sliders

6 years agoUI: multi-value-edit, tint button while editing
Campbell Barton [Tue, 12 May 2015 23:58:05 +0000 (09:58 +1000)]
UI: multi-value-edit, tint button while editing

Currently re-uses node-flag (which is only used to tint color too)

6 years agoUI: multi-value-editing, copy value when typed in
Campbell Barton [Tue, 12 May 2015 23:43:06 +0000 (09:43 +1000)]
UI: multi-value-editing, copy value when typed in

6 years agoUI: nodes support for multi-value-editing
Campbell Barton [Tue, 12 May 2015 23:22:42 +0000 (09:22 +1000)]
UI: nodes support for multi-value-editing

6 years agoMulti-View: return correct number of views when rendering only one of the stereo...
Dalai Felinto [Tue, 12 May 2015 21:43:07 +0000 (18:43 -0300)]
Multi-View: return correct number of views when rendering only one of the stereo pairs

Without this fix ViewerNode would continously trash the views/buffer
when disabling either stereo eye.

6 years agoEdit last commit, redundant 'data' in RNA path
Campbell Barton [Tue, 12 May 2015 21:36:43 +0000 (07:36 +1000)]
Edit last commit, redundant 'data' in RNA path

6 years agoUI: ObData support for copy-to-selected
Campbell Barton [Tue, 12 May 2015 21:23:03 +0000 (07:23 +1000)]
UI: ObData support for copy-to-selected

Now multi-object editing works for obdata too.

6 years agoFix T44684 Compositor backdrop isn't updating correctly
Dalai Felinto [Tue, 12 May 2015 21:18:57 +0000 (18:18 -0300)]
Fix T44684 Compositor backdrop isn't updating correctly

6 years agoCleanup: style
Campbell Barton [Tue, 12 May 2015 20:10:49 +0000 (06:10 +1000)]
Cleanup: style

6 years agoFix T40762: Python can't access macro values
Campbell Barton [Tue, 12 May 2015 19:25:26 +0000 (05:25 +1000)]
Fix T40762: Python can't access macro values

6 years agoDyntopo PBVH build optimization:
Antony Riakiotakis [Tue, 28 Apr 2015 17:41:06 +0000 (19:41 +0200)]
Dyntopo PBVH build optimization:

Optimize the full rebuild case for now (though same code can be adapted to
partial redraws)

Main changes here:

* Calculate bounding centroid for faces only once (instead of every intermediate node)
* Faces do not get added to GSets immediately, instead we track a face
array which has faces that belong in a node in consecutive order.
Nodes just keep accounting of start and length in the array.
* Due to faces not being added to GSets, we can skip doing cleanup of GSets
and readdition for each intermediate node and instead only
add the faces to the final leafs node GSets when those nodes are created.

For a 1.9 million face test model, PBVH generation time (roughly measured by undoing) is
dropped from 6 seconds to about 4 seconds. Still too high, but still a nice improvement.

Thread some parts. Unfortunately threading the GSet assignment part might not help much since
we'd need a lot of locking to avoid collisions with node assignments, especially for unique vertices.

6 years agoFix missing define in blenloader
Sergey Sharybin [Tue, 12 May 2015 14:52:42 +0000 (19:52 +0500)]
Fix missing define in blenloader

It caused blender versions compiled with scons not having proper
build date/hash stored in the .blend file.

6 years agosmall cleanup on render_result_new()
Dalai Felinto [Tue, 12 May 2015 14:36:52 +0000 (11:36 -0300)]
small cleanup on render_result_new()

(making the duplicate code more like the original one)

6 years agoFix T44616: Cycles crashes loading 42k by 21k textures
Sergey Sharybin [Tue, 12 May 2015 13:33:31 +0000 (18:33 +0500)]
Fix T44616: Cycles crashes loading 42k by 21k textures

Simple integer overflow issue.

TODO(sergey): Check on CPU cubic sampling, it might also need size_t.

6 years agoFix T44398: Compositing displace node makes image fuzzy with zero displacement
Sergey Sharybin [Tue, 12 May 2015 12:24:07 +0000 (17:24 +0500)]
Fix T44398: Compositing displace node makes image fuzzy with zero displacement

EWA filtering with zero derivatives is introducing some fuzzyness into the
image. Currently solved by using regular sampling for cases when derivatives
are zero, which should also make compo faster in that areas.

Still need to look into checking if EWA filter can be tweaked in a way so
no fuzzyness is introduced.

6 years agoDepsgraph: Don't use C++11 function binding with MSVC
Sergey Sharybin [Tue, 12 May 2015 11:40:22 +0000 (16:40 +0500)]
Depsgraph: Don't use C++11 function binding with MSVC

It has some weird incompatibility with the way how Boost and GCC C++11
function bindings works, resulting in compilation errors.

6 years agoBGE : Fix Bullet shape margin for triangle mesh static objects
Porteries Tristan [Tue, 12 May 2015 11:24:47 +0000 (13:24 +0200)]
BGE : Fix Bullet shape margin for triangle mesh static objects

6 years agoDepsgraph: Attempt to fix alignment issue on 32bit platforms
Sergey Sharybin [Tue, 12 May 2015 11:36:34 +0000 (16:36 +0500)]
Depsgraph: Attempt to fix alignment issue on 32bit platforms

6 years agoImBuf: Update stubs so strict compiler is happy about unused arguments
Sergey Sharybin [Tue, 12 May 2015 11:24:22 +0000 (16:24 +0500)]
ImBuf: Update stubs so strict compiler is happy about unused arguments

Also use C++-style unused arguments tagging instead of legacy c-style.
It's less annoying this way because does not require adding argument to
two places of the function.

6 years agoDepsgraph: New dependency graph integration commit
Sergey Sharybin [Tue, 12 May 2015 10:05:57 +0000 (15:05 +0500)]
Depsgraph: New dependency graph integration commit

This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:


There are also some user-related information online:


Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)

6 years agoDepsgraph: Add evaluation callbacks for granular nodes update
Sergey Sharybin [Tue, 12 May 2015 08:57:11 +0000 (13:57 +0500)]
Depsgraph: Add evaluation callbacks for granular nodes update

This commit only adds callbacks which then later be used with major dependency
graph commit, keeping the upcoming commit more clean to follow.

Should be no functional changes so far still.

6 years agoDepsgraph: Make ob_get_parent_matrix() more public and reusable
Sergey Sharybin [Tue, 12 May 2015 09:06:31 +0000 (14:06 +0500)]
Depsgraph: Make ob_get_parent_matrix() more public and reusable

Currently still only used from object.c, but in the next commit it'll be also
used from granular object update callbacks.

6 years agoDepsgraph: Add utility function to check whether modifier depends on time
Sergey Sharybin [Tue, 12 May 2015 08:38:55 +0000 (13:38 +0500)]
Depsgraph: Add utility function to check whether modifier depends on time

Currently unused, based on the code from old depsgraph.c. The purpose is to
re-sue the code over old and new depsgraph in an easy way.

6 years agoDepsgraph: Add additional relations/id update tags
Sergey Sharybin [Tue, 12 May 2015 08:29:00 +0000 (13:29 +0500)]
Depsgraph: Add additional relations/id update tags

This calls are not strictly speaking needed for the old dependency graph, but
due to more granular nature of upcoming depsgraph more actions requires update
of relations of IDs.

On the one hand this extra tags could be wrapped with if() statements, but on
the other hand it makes sense to keep tag in sync so it's clear if some issue
is caused by missing/extra tag or by depsgraph itself.

6 years agoDepsgraph: Add utility function to tag pose for recalc
Sergey Sharybin [Tue, 12 May 2015 08:13:36 +0000 (13:13 +0500)]
Depsgraph: Add utility function to tag pose for recalc

Currently this function only tags pose itself, totally matching previous
behavior. But this will be needed in the future once new dependency graph
is landed, because of it's granular nature which relies on the fact that
pose channels are all up to date when building the graph.

Should be no functional changes so far.

6 years agoDepsgraph: Move update-related functions into own files
Sergey Sharybin [Tue, 12 May 2015 07:50:24 +0000 (12:50 +0500)]
Depsgraph: Move update-related functions into own files

Currently it is just moving existing functions into a new file,
but in the future those new files will be grown much more due
to upcoming more granular scene updates.

Should be no functional changes.

6 years agoFix T44677: Normal Edit Modifier Radial Mode broken with target object.
Bastien Montagne [Tue, 12 May 2015 08:56:28 +0000 (10:56 +0200)]
Fix T44677: Normal Edit Modifier Radial Mode broken with target object.

Very stupid mistake, odd nobody hit this earlier... :/

6 years agoPyAPI: Remove release method, just use delitem
Campbell Barton [Tue, 12 May 2015 08:43:30 +0000 (18:43 +1000)]
PyAPI: Remove release method, just use delitem

6 years agoMinor tweaks to preview templates
Campbell Barton [Tue, 12 May 2015 08:28:05 +0000 (18:28 +1000)]
Minor tweaks to preview templates

6 years agoDoc: add bpy.utils.previews
Campbell Barton [Tue, 12 May 2015 08:06:31 +0000 (18:06 +1000)]
Doc: add bpy.utils.previews

Updated to better handle pure py-classes.

6 years agoDoc: correct rst syntax
Campbell Barton [Tue, 12 May 2015 07:59:37 +0000 (17:59 +1000)]
Doc: correct rst syntax

also remove some API docs from example

6 years agoDoc: replace addons -> scripts in docstring
Campbell Barton [Tue, 12 May 2015 07:17:31 +0000 (17:17 +1000)]
Doc: replace addons -> scripts in docstring

Theres nothing add-on specific here.

6 years agoDoc: minor fixes
Campbell Barton [Tue, 12 May 2015 06:56:40 +0000 (16:56 +1000)]
Doc: minor fixes

- check for class/static methods assumed nonzero args.
- subclass references and set-flag items are now sorted.
- use 'order' for Py operator mix-ins,
  so operator settings don't show in random order.

6 years agoBGE: Adding material IPO support to GLSL materials
Mitchell Stokes [Tue, 12 May 2015 06:05:04 +0000 (23:05 -0700)]
BGE: Adding material IPO support to GLSL materials

Most of this patch was created by Daniel Stokes, I'm mostly just cleaning
it up and testing it. Still todo: hardness. I need to figure out how to
handle the integer -> float conversion on a dynamic uniform.

Reviewers: psy-fi, brecht

Reviewed By: psy-fi

Subscribers: psy-fi

Differential Revision:

6 years agoFreestyle: Fix for assertion failure in viewport preview.
Tamito Kajiyama [Mon, 11 May 2015 07:53:11 +0000 (16:53 +0900)]
Freestyle: Fix for assertion failure in viewport preview.

An assertion to check if `re->clipsta` < 0 (added as part of addressing
T36009 in rBrB795034c17d76bef2a15e576ac9c70ae2268a823b) was failing when
Freestyle viewport preview rendering takes place in the camera view with
an orthographic camera (in this case, the user-defined clipping range is
used without changes, so that `re->clipsta` is positive).  The
`re->clipsta` property has a negative value only when the 3D viewport is
in an orthographic view but not in the camera view.  It seems that this
viewport setting cannot be identified from rendering settings accessible
from Freestyle.  Now a negative `re->clipsta` value is directly checked
instead, without relying on other render flags.

6 years agoCycles: check for F16C support with __cpuid, as we do for BMI and BMI2
Sv. Lockal [Mon, 11 May 2015 15:49:36 +0000 (15:49 +0000)]
Cycles: check for F16C support with __cpuid, as we do for BMI and BMI2

6 years agoCollada Exporter: sanitize a bit lnor export.
Bastien Montagne [Mon, 11 May 2015 15:22:18 +0000 (17:22 +0200)]
Collada Exporter: sanitize a bit lnor export.

In case `BKE_mesh_calc_normals_split()` would fail, exporter would read
uninitialized random mem... Should not happen, but better be safe than sorry.

6 years agoClearing preview image shall also unset 'user edited' flag!
Bastien Montagne [Mon, 11 May 2015 15:12:31 +0000 (17:12 +0200)]
Clearing preview image shall also unset 'user edited' flag!

6 years agoCycles: Get rid of one more OpenGL matrix manipulation/push/pop.
Antony Riakiotakis [Mon, 11 May 2015 14:40:38 +0000 (16:40 +0200)]
Cycles: Get rid of one more OpenGL matrix manipulation/push/pop.

6 years agoExpose PreviewImage & custom icons to py API.
Bastien Montagne [Mon, 11 May 2015 14:29:12 +0000 (16:29 +0200)]
Expose PreviewImage & custom icons to py API.

This commit mainly:

* Exposes PreviewImage struct in RNA, including ways for user to set images data.
* Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image.
* Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system.
* Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons.

Note that loading image from files' thumbnails is done when needed (deferred loading), not
when defining the custom preview/icon.

WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level.
We do not want our UI to explode under hundreds of different flashy icons!

For more info, see also the release notes of Blender 2.75 (
and the example/templates featured with Blender.

Patch by Campbell (ideasman42), InĂªs (brita) and Bastien (mont29).

Differential Revision:

6 years agoCycles: use vertex buffers when possible to draw tiles on the screen.
Antony Riakiotakis [Mon, 11 May 2015 14:28:41 +0000 (16:28 +0200)]
Cycles: use vertex buffers when possible to draw tiles on the screen.

Not terribly necessary in this case, since we are just drawing a quad,
but makes blender overall more GL 3.x core ready.

6 years agoKeep valgrind happy by using tight vec3 packing instead of lax vec4 with
Antony Riakiotakis [Mon, 11 May 2015 12:14:06 +0000 (14:14 +0200)]
Keep valgrind happy by using tight vec3 packing instead of lax vec4 with
an unused coordinate missing.

6 years agoCycles OpenGL: Don't use full matrix transform when we can just use
Antony Riakiotakis [Mon, 11 May 2015 11:10:19 +0000 (13:10 +0200)]
Cycles OpenGL: Don't use full matrix transform when we can just use
simple addition.

6 years agoUI: initial support for UI editing selected items
Campbell Barton [Mon, 11 May 2015 05:32:43 +0000 (15:32 +1000)]
UI: initial support for UI editing selected items

Add basic support (holding Alt) to edit all selected objects/bones/sequences.

6 years agoGHash: avoid redundant casts
Campbell Barton [Mon, 11 May 2015 02:39:39 +0000 (12:39 +1000)]
GHash: avoid redundant casts

6 years agoGHash: use const keys when only used for lookups
Campbell Barton [Mon, 11 May 2015 02:39:08 +0000 (12:39 +1000)]
GHash: use const keys when only used for lookups

6 years agoOutliner: postpone rebuilding the tree
Campbell Barton [Mon, 11 May 2015 01:06:35 +0000 (11:06 +1000)]
Outliner: postpone rebuilding the tree

On existing Blender could rebuild tree many times (on freeing each ID).
Use a flag instead of immediately rebuilding.

6 years agoOutliner: cleanup flag was never cleared
Campbell Barton [Mon, 11 May 2015 00:58:53 +0000 (10:58 +1000)]
Outliner: cleanup flag was never cleared

Was running cleanup on every draw.

6 years agoGHash: Add BLI_ghash_ensure_p_ex to copy the key
Campbell Barton [Sun, 10 May 2015 23:27:05 +0000 (09:27 +1000)]
GHash: Add BLI_ghash_ensure_p_ex to copy the key

Needed in cases where the memory from each key is owned by the GHash.

6 years agoCycles: And yet another compilation fix after half-float commit for clang.
Sv. Lockal [Sun, 10 May 2015 19:32:32 +0000 (19:32 +0000)]
Cycles: And yet another compilation fix after half-float commit for clang.

Suggested by Brecht, tested with gcc > 4.4 and Clang

6 years agoCycles: fix compilation on 32-bit Windows for half-floats
Sv. Lockal [Sun, 10 May 2015 19:04:24 +0000 (19:04 +0000)]
Cycles: fix compilation on 32-bit Windows for half-floats

Reported by IRC user HG1.

6 years agoFix T44633: image cache broken for movies and sequences.
Brecht Van Lommel [Sun, 10 May 2015 18:37:38 +0000 (20:37 +0200)]
Fix T44633: image cache broken for movies and sequences.

After multiview, it was continuously unloading/loading image buffers from
the cache due to mismatch in cache insert and lookup keys.

6 years agoCycles: Add -mf16c for previous commit for Scons
Sv. Lockal [Sun, 10 May 2015 17:48:07 +0000 (17:48 +0000)]
Cycles: Add -mf16c for previous commit for Scons

Thanks to Dingto for noticing!

6 years agoBGE : Fix crash during physics mesh update.
Porteries Tristan [Sun, 10 May 2015 17:21:21 +0000 (19:21 +0200)]
BGE : Fix crash during physics mesh update.

Currently we can't update the physics mesh of an added rigid body.
The cause is that that we need to update all shapes to say that the mesh was changed, for static object we don't do that previously because we use a odd way to reallocate memory at the same place.
So now when a mesh is changed we iterate all physics controllers which use the same shape info and recreate its shape with the correct mesh.

example file : {F168100}

Reviewers: scorpion81, sergof, hg1, sybren, moguri, agoose77

Reviewed By: moguri, agoose77

Subscribers: sybren

Differential Revision:

6 years agoCycles: Use native float->half conversion instructions for Haswell CPUs.
Sv. Lockal [Sun, 10 May 2015 16:20:04 +0000 (16:20 +0000)]
Cycles: Use native float->half conversion instructions for Haswell CPUs.

This makes OCIO viewport color correction a little bit faster (about -0.5s for 100 samples)
Also set max half float value to 65504.0 to conform with IEEE 754.

6 years agoCycles: Correction to opencl whitelist check
Sergey Sharybin [Sun, 10 May 2015 15:01:24 +0000 (20:01 +0500)]
Cycles: Correction to opencl whitelist check

Was using platform as a device id accidentally.

6 years agoBGE: Cleanup constraints documentation
Thomas Szepe [Sun, 10 May 2015 13:58:17 +0000 (15:58 +0200)]
BGE: Cleanup constraints documentation

* Fixing Python example. Behavior has changed with Blender 2.74
* Adding missing return type
* Fixing typo simbolic
* Fixing note for upper/lower limit
* Adding link to constraints constants