5 years agoDocs: function comments
Campbell Barton [Mon, 17 Aug 2015 21:10:01 +0000 (07:10 +1000)]
Docs: function comments

5 years agoRefactor translation code out of blenfont
Campbell Barton [Sun, 16 Aug 2015 07:32:01 +0000 (17:32 +1000)]
Refactor translation code out of blenfont

- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.

5 years agoLattice min_max: add a version of the func using lattice's final DispList,
Philipp Oeser [Mon, 17 Aug 2015 14:59:32 +0000 (16:59 +0200)]
Lattice min_max: add a version of the func using lattice's final DispList,
and use it for bbox computing.


5 years agoBGE: Fix T45817 Convert curve object in group instance.
Porteries Tristan [Mon, 17 Aug 2015 14:51:35 +0000 (16:51 +0200)]
BGE: Fix T45817 Convert curve object in group instance.

Now group instance conversion allow unconverted object like curve, meta ball ect…

5 years agoSubsurf: don't reserve MFace by default
Campbell Barton [Mon, 17 Aug 2015 07:24:34 +0000 (17:24 +1000)]
Subsurf: don't reserve MFace by default

Instead, the cache can be calculated only when its needed (fixes T45787).

5 years agoFix for Ghost/OSX w/ core profile
Campbell Barton [Mon, 17 Aug 2015 06:17:22 +0000 (16:17 +1000)]
Fix for Ghost/OSX w/ core profile

5 years agoFix T45802: View Lock w/ Curve-Parent fails
Campbell Barton [Mon, 17 Aug 2015 04:26:27 +0000 (14:26 +1000)]
Fix T45802: View Lock w/ Curve-Parent fails

5 years agoCleanup: remove unused Object.ipoflag
Campbell Barton [Mon, 17 Aug 2015 04:22:23 +0000 (14:22 +1000)]
Cleanup: remove unused Object.ipoflag

5 years agoSimplify thumbnail blend parser
Campbell Barton [Mon, 17 Aug 2015 02:37:38 +0000 (12:37 +1000)]
Simplify thumbnail blend parser

No need to convert the BHead code to an int, just compare the bytes.

5 years agoFix T39486, screwed object bevel made bevel amount go out of control.
Howard Trickey [Sun, 16 Aug 2015 19:15:13 +0000 (15:15 -0400)]
Fix T39486, screwed object bevel made bevel amount go out of control.

There is an adjustment pass in bevel that tries to make the bevel
widths at either end of a beveled edge as equal as possible.
When there are hundreds of beveled edges end-to-end, these adjustments
can accumulate out of control and result looks awful.
Yet the adjustment pass is sometimes needed to avoid equally awful
appearances in other cases (see the "Bent test" in the bevel regression
This change uses the 'Clamp overlap' flag of bevel (on by default in
the modifier, not in the tool) to limit the amount of adjustment to within
10% of the desired width. When the flag is off, there is no limit to the

5 years agoFix T45795, bevel treated one-edge-beveled case inconsistently.
Howard Trickey [Sun, 16 Aug 2015 15:10:35 +0000 (11:10 -0400)]
Fix T45795, bevel treated one-edge-beveled case inconsistently.

When one edge is beveled at a vertex among more than 1 other unbeveled
edges, the code makes a polygon around the vertex. The position of the
vertices on the non-adjacent-to-beveled-edge edges depended on the
ordering of edges, which leads to inconsistent-looking results in seeming
symmetrical situations.  Changed to use the bevel amount as slide
distance, which fixes this.

5 years agoFix for numpy with nmake and missing directory
Chad Fraleigh [Sun, 16 Aug 2015 12:32:14 +0000 (14:32 +0200)]
Fix for numpy with nmake and missing directory

When using the nmake generator from cmake, numpy fails to extract during build because the working directory doesn't exist yet.

Reviewers: juicyfruit

Differential Revision:

5 years agoBGE: Fix memory leak and crash with certain physic types
Thomas Szepe [Sun, 16 Aug 2015 09:38:25 +0000 (11:38 +0200)]
BGE: Fix memory leak and crash with certain physic types

Fixing crash if the physic type is set sensor or character. Caused by a790e172d0281e64.
Fixing memory leak, if the constraint is deleted with Python API removeConstraint().
Add RemoveConstraint() method to avoid code duplication.
Rename old RemoveConstraint() to RemoveConstraintById() which is more suitable name for this method.

5 years agoFix T45807: Instant crash adding any modifier to NLA track
Julian Eisel [Sat, 15 Aug 2015 12:47:25 +0000 (14:47 +0200)]
Fix T45807: Instant crash adding any modifier to NLA track

Caused by rBcbf936a3327282

5 years agoCleanup: Avoid calling function twice
Julian Eisel [Fri, 14 Aug 2015 20:19:14 +0000 (22:19 +0200)]
Cleanup: Avoid calling function twice

Own stupidness from rB17422124eca332

5 years agoRemove redundant workaround for T41548
Julian Eisel [Fri, 14 Aug 2015 20:16:04 +0000 (22:16 +0200)]
Remove redundant workaround for T41548

Reverts 7a026971dc3f93 which isn't needed anymore after b347f523cececdf

5 years agoFix T45750: Closing search menu by clicking root button doesn't work when clicking...
Julian Eisel [Fri, 14 Aug 2015 20:09:31 +0000 (22:09 +0200)]
Fix T45750: Closing search menu by clicking root button doesn't work when clicking on lower half

5 years agoFix T40070, Bevel didn't bend as expected sometimes.
Howard Trickey [Fri, 14 Aug 2015 19:48:29 +0000 (15:48 -0400)]
Fix T40070, Bevel didn't bend as expected sometimes.

Two problems fixed. One, the comparison of angles to
'almost straight' or 'almost zero' needed a bigger epsilon.
Two, using the corner normal instead of the average face normal
is usually the right thing to do, and what the code was doing,
but in some cases the corner normal could be very wrong.

5 years agoFix dyntopo not warning anymore when vertex colors or uvs are present.
Antony Riakiotakis [Fri, 14 Aug 2015 15:11:31 +0000 (17:11 +0200)]
Fix dyntopo not warning anymore when vertex colors or uvs are present.

We check against loop data now, not tessface data

5 years agoFix unnecessarily added undo steps when deleting only scene
Julian Eisel [Fri, 14 Aug 2015 13:49:14 +0000 (15:49 +0200)]
Fix unnecessarily added undo steps when deleting only scene

Steps to reproduce were: startup.blend, move any object, delete active scene (nothing happens), undo (nothing happens), second undo is needed to revert object transformation

5 years agoRemove already-ifdef'ed out PRE_275_ALGORITHM code from bevel.
Howard Trickey [Fri, 14 Aug 2015 13:45:29 +0000 (09:45 -0400)]
Remove already-ifdef'ed out PRE_275_ALGORITHM code from bevel.

The new algorithm has soaked enough that we are unlikely to go back now.

5 years agoOutliner: Context menu for scenes
Philipp Oeser [Fri, 14 Aug 2015 13:15:25 +0000 (15:15 +0200)]
Outliner: Context menu for scenes

Adds context menu for scenes in the outliner, for now, with only a 'Delete' entry.

D1448 by @lichtwerk, review by @aligorith and @Severin

5 years agoCleanup: style
Campbell Barton [Fri, 14 Aug 2015 07:46:26 +0000 (17:46 +1000)]
Cleanup: style

5 years agoDocs: comment BHead.code values
Campbell Barton [Fri, 14 Aug 2015 07:30:32 +0000 (17:30 +1000)]
Docs: comment BHead.code values

5 years agoAdd real boundbox support to lattice, and update armature one.
Philipp Oeser [Thu, 13 Aug 2015 16:12:08 +0000 (18:12 +0200)]
Add real boundbox support to lattice, and update armature one.

* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices]
* give proper values for lattice objects ".bound_box" in bpy
* give proper values for armature objects ".bound_box" in bpy
* lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures
* remove redundant calculations in "boundbox_armature()"

Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used.

Based on report T45735: Lattice's bounding_box doesn't update,
and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too").


5 years agoFix T45783: Problem selecting all objects on a layer from a script if any 3d view...
Bastien Montagne [Thu, 13 Aug 2015 12:25:26 +0000 (14:25 +0200)]
Fix T45783: Problem selecting all objects on a layer from a script if any 3d view is in local mode.

Do not take into account lay bits used for local view, when doing exact match.

5 years agoFix T45782: bpy.ops.object.select_by_layer match='SHARED' option is not working.
Bastien Montagne [Thu, 13 Aug 2015 11:18:45 +0000 (13:18 +0200)]
Fix T45782: bpy.ops.object.select_by_layer match='SHARED' option is not working.

Looks like some half-done change from enum to bool (or vice-versa), that op was just broken!

5 years agoFix T45775: Bad 'Normal' transform space for edge of non-uniformed scaled object.
Bastien Montagne [Thu, 13 Aug 2015 10:45:13 +0000 (12:45 +0200)]
Fix T45775: Bad 'Normal' transform space for edge of non-uniformed scaled object.

Non-uniform scaled obmat will lead to transformation not preserving angles, so
we must ensure our normal is orthogonal to the edge **after** applying obmat.

5 years agoDisplace Modifier: add an option to displace along (averaged) custom normals, instead...
Bastien Montagne [Wed, 12 Aug 2015 16:21:41 +0000 (18:21 +0200)]
Displace Modifier: add an option to displace along (averaged) custom normals, instead of vertex normals.

User suggestion/request from 'boby'.

5 years agoFix T45739: Number slider precision handling inconsistent between unit systems.
Bastien Montagne [Wed, 12 Aug 2015 14:41:52 +0000 (16:41 +0200)]
Fix T45739: Number slider precision handling inconsistent between unit systems.

When using unit system, step was multiplied by 100, could really not find any good reason to that.
Easy to revert anyway if needed, but in this case please explain why in code. ;)

Investigated and patch by Thomas Radeke (ThomasR), thanks.

5 years agoFix T44049, edge bevel with sometimes breaks UVs.
Howard Trickey [Wed, 12 Aug 2015 14:18:58 +0000 (10:18 -0400)]
Fix T44049, edge bevel with sometimes breaks UVs.
Fairly large changes to bevel code to do a better job
of keeping UVs from crossing islands, etc.
to explain algorithm used for maintaining UVs.
Updated the bevel_regression.blend tests in lib tests.

5 years agoFix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no...
Bastien Montagne [Wed, 12 Aug 2015 09:42:35 +0000 (11:42 +0200)]
Fix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no more edges to draw).

5 years agoUsual UI message cleanup/fixes.
Bastien Montagne [Tue, 11 Aug 2015 20:29:16 +0000 (22:29 +0200)]
Usual UI message cleanup/fixes.

5 years agoinstall_deps: fix broken force/skip-osd options.
Bastien Montagne [Tue, 11 Aug 2015 20:08:01 +0000 (22:08 +0200)]
install_deps: fix broken force/skip-osd options.

Bash scripts are such a PITA, having to redefine the options in three different places... :(

5 years agoBGE: Fix delete constraint for replicated physics controllers.
Porteries Tristan [Tue, 11 Aug 2015 19:48:06 +0000 (21:48 +0200)]
BGE: Fix delete constraint for replicated physics controllers.

Replicated controllers didn't free constraints list before.

5 years agoCycles: Enable some extra debug prints for OpenCL kernel loading
Sergey Sharybin [Tue, 11 Aug 2015 16:03:54 +0000 (18:03 +0200)]
Cycles: Enable some extra debug prints for OpenCL kernel loading

5 years agoBGE: Fix T38448: Bullet constraint memory leak.
Porteries Tristan [Tue, 11 Aug 2015 10:56:57 +0000 (12:56 +0200)]
BGE: Fix T38448: Bullet constraint memory leak.

5 years agoAdd WM_event_add/remove_timer_notifier() helpers.
Bastien Montagne [Tue, 11 Aug 2015 10:11:48 +0000 (12:11 +0200)]
Add WM_event_add/remove_timer_notifier() helpers.

This basically does the 'timer' part of Jobs system: it sends a given notifier on every timer step.

This is needed for background tasks (not full-fledged jobs, lighter BLI_tasks based) that want to update UI
(like for up-comming new thumbnail handling in filebrowser).

5 years agoBGE: Fix T33187 constraints replication for libloaded objects.
Porteries Tristan [Mon, 10 Aug 2015 20:42:52 +0000 (22:42 +0200)]
BGE: Fix T33187 constraints replication for libloaded objects.

Reviewers: Moguri

5 years agoUI drag&drop: make code able to free dragpoin if needed.
Bastien Montagne [Mon, 10 Aug 2015 16:01:11 +0000 (18:01 +0200)]
UI drag&drop: make code able to free dragpoin if needed.

Only for image and strings for now. Needed for incomming filebrowser work.

5 years agoData previews: add utils to generate/clear previews.
Bastien Montagne [Mon, 10 Aug 2015 15:26:37 +0000 (17:26 +0200)]
Data previews: add utils to generate/clear previews.

Not much to add, you can now clear previews from current .blend file, or a set of non-opened files.
Likewise, you can generate previews (for mat/tex, objects, groups, scenes, ...).

5 years agoBGE: Fix T33564: UI obstacle panel disable for character and no collision objects.
Porteries Tristan [Mon, 10 Aug 2015 15:24:19 +0000 (17:24 +0200)]
BGE: Fix T33564: UI obstacle panel disable for character and no collision objects.

5 years agoCycles: Fix for typo in previous commit
Sergey Sharybin [Mon, 10 Aug 2015 15:24:14 +0000 (17:24 +0200)]
Cycles: Fix for typo in previous commit

5 years agoBGE: Fix T19377 restore dynamics after unparenting object.
Porteries Tristan [Mon, 10 Aug 2015 12:36:54 +0000 (14:36 +0200)]
BGE: Fix T19377 restore dynamics after unparenting object.

Reviewers: scorpion81

5 years agoData previews: add preview to Object, Group and Scene.
Bastien Montagne [Mon, 10 Aug 2015 13:41:28 +0000 (15:41 +0200)]
Data previews: add preview to Object, Group and Scene.

This commit does not add anything yet to users, it’s purely internal one.
Useful commit is next. ;)

5 years agoBLI_threads: add an helper to wait on a condition using a global mutex.
Bastien Montagne [Mon, 10 Aug 2015 13:03:31 +0000 (15:03 +0200)]
BLI_threads: add an helper to wait on a condition using a global mutex.

Also, factorized internal code to get global mutex from its ID.

5 years agoInstall_deps: add basic listing of needed dependencies to error message for unsupport...
Bastien Montagne [Mon, 10 Aug 2015 11:09:57 +0000 (13:09 +0200)]
Install_deps: add basic listing of needed dependencies to error message for unsupported distro.

5 years agoBGE: Fix T44782 suspend/restore dynamics on inactive object.
Porteries Tristan [Sat, 8 Aug 2015 19:54:08 +0000 (21:54 +0200)]
BGE: Fix T44782 suspend/restore dynamics on inactive object.

5 years agoInstall_deps: add (non-tested) OSD-building code.
Bastien Montagne [Sun, 9 Aug 2015 13:58:53 +0000 (15:58 +0200)]
Install_deps: add (non-tested) OSD-building code.

Not tested for fedora-like and arch distro, would expect it to work though. Please report otherwise.

Also, always inatll git now (and a few other XOrg -dev packages).

5 years agoinstall_deps: Add libxcursor packages, seems to be needed now?
Bastien Montagne [Sun, 9 Aug 2015 13:40:59 +0000 (15:40 +0200)]
install_deps: Add libxcursor packages, seems to be needed now?

5 years agoCompile fix cycles network. This code is crusty and not super
Martijn Berger [Sun, 9 Aug 2015 13:31:32 +0000 (15:31 +0200)]
Compile fix cycles network. This code is crusty and not super
functional. But is should compile.

5 years agoCycles: Follow up on cc0bbc28 (Collapse multiview panel)
Dalai Felinto [Sun, 9 Aug 2015 03:25:34 +0000 (00:25 -0300)]
Cycles: Follow up on cc0bbc28 (Collapse multiview panel)

5 years agoOptimize reading of fcurves
Sergey Sharybin [Sat, 8 Aug 2015 20:17:03 +0000 (22:17 +0200)]
Optimize reading of fcurves

Reading fcurves wasn't really optimal because restoring fcu->group pointer was
changing lasthit pointer, which required full lookup over the oldnewmap happened
at the next call to newdatadr().

This reduces loading franck_sheep.blend file from ~2.2sec to 1.5sec.

5 years agoCollapse multiview panel in render layers by default
Sergey Sharybin [Sat, 8 Aug 2015 18:52:47 +0000 (20:52 +0200)]
Collapse multiview panel in render layers by default

This is not so much common panel to access to and having it fully
visible just adds clutterness in cases when one only need to work
with render passes.

5 years agoFix for SeqCache hash ignoring multi-view
Campbell Barton [Sun, 9 Aug 2015 03:46:18 +0000 (13:46 +1000)]
Fix for SeqCache hash ignoring multi-view

Thanks to @chadf for finding

5 years agoFix: opening missing file didnt remove in recent-files.txt
Campbell Barton [Sun, 9 Aug 2015 02:53:09 +0000 (12:53 +1000)]
Fix: opening missing file didnt remove in recent-files.txt

Refactor recent-file.txt handling, split into smaller functions.
It wasn't possible to write the current state to disk (depended on current context).

5 years agoSPeedup for particle point cache reading
Sergey Sharybin [Sat, 8 Aug 2015 17:50:11 +0000 (19:50 +0200)]
SPeedup for particle point cache reading

Order of saving and reading particle point cache was totally different which
made newdataadr() falling back to full data block list traversal for every
point cache entry.

This commit makes it so reading code uses the same order of reading structs
and lists ad the writing code. This required to add special version of list
linking which is capable of running a callback after linking a list element.
This seems to be more robust approach than splitting writing code into
several loops.

5 years agoFix T45705: Selected to Active Cycles Baking no longer working
Dalai Felinto [Sat, 8 Aug 2015 17:40:41 +0000 (14:40 -0300)]
Fix T45705: Selected to Active Cycles Baking no longer working

5 years agoUse polygon normals for baking
Campbell Barton [Sun, 9 Aug 2015 01:05:25 +0000 (11:05 +1000)]
Use polygon normals for baking

5 years agoFix crash baking in cycles
Campbell Barton [Sat, 8 Aug 2015 22:28:58 +0000 (08:28 +1000)]
Fix crash baking in cycles

Error in recent move to looptri

5 years agoSupport building OpenSubdiv libraries under Debian (Ubuntu) with our
Thomas Beck [Sat, 8 Aug 2015 12:12:02 +0000 (14:12 +0200)]
Support building OpenSubdiv libraries under Debian (Ubuntu) with our script.

Use --skip-osd to skip building opensubdiv libs,
use --force-osd to force a rebuild of the libs.

I added all needed user information (where to find the include dir, which -D options to set) to the print_info method that is called at the end too, so it should be pretty intuitive to use.

Reviewers: sergey, mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision:

5 years agoRemove leftover from sticky keys
Julian Eisel [Sat, 8 Aug 2015 00:37:03 +0000 (02:37 +0200)]
Remove leftover from sticky keys

5 years agoFix T45726: Wrong handling of 'failed to generate' audio waveform data in VSE strip...
Bastien Montagne [Fri, 7 Aug 2015 21:42:32 +0000 (23:42 +0200)]
Fix T45726: Wrong handling of 'failed to generate' audio waveform data in VSE strip draw code.

5 years agoFix T45715: Blender crashes when creating Environment Map textures in Multi-View...
Dalai Felinto [Fri, 7 Aug 2015 18:46:18 +0000 (15:46 -0300)]
Fix T45715: Blender crashes when creating Environment Map textures in Multi-View mode

5 years agoFix T45721: Panoramic render in Cycles camera : depth of field issue with bump maps...
Dalai Felinto [Fri, 7 Aug 2015 16:41:16 +0000 (13:41 -0300)]
Fix T45721: Panoramic render in Cycles camera : depth of field issue with bump maps - patch by Brecht Van Lommel

5 years agoData Transfer operator: Add a 'freeze' setting to prevent operator from re-running...
Bastien Montagne [Fri, 7 Aug 2015 14:33:48 +0000 (16:33 +0200)]
Data Transfer operator: Add a 'freeze' setting to prevent operator from re-running when changing settings.

This is likely weak design, but allows people to change several settings without having to wait
several tenth of seconds each time, when e.g. transferring UVs between heavy geometries.

5 years agoFix (unreported) crash in mesh remap (i.e. data transfer).
Bastien Montagne [Fri, 7 Aug 2015 14:18:13 +0000 (16:18 +0200)]
Fix (unreported) crash in mesh remap (i.e. data transfer).

Issue from rBabbd82a50, loops data were not correctly protected against multi-freeing in bvhtree data.

5 years agoMesh remap: Fix two potential numeric issues in corner cases, and enhance poly projec...
Bastien Montagne [Fri, 7 Aug 2015 14:14:54 +0000 (16:14 +0200)]
Mesh remap: Fix two potential numeric issues in corner cases, and enhance poly projection.

Null-area face could generate an int overflow, and potential numerical imprecision in face area computation
could lead to negative number of rays-to-cast (though highly unlikely).

Also, use domnant axis of poly normal as 'flattening' one, instead of always using Z axis.

Points raised by Campbell, thanks!

5 years agoAttempt to fix T45718, crash when enabling GLSL mode with UV layers.
Antony Riakiotakis [Fri, 7 Aug 2015 14:16:23 +0000 (16:16 +0200)]
Attempt to fix T45718, crash when enabling GLSL mode with UV layers.

I can't  reproduce issue here but crash is most likely caused by passing
a NULL pointer to glUniform2fv.

This is caused by OpenSubdiv changes to the codegen module, which pass
mtex layers to the uniform system
even when not needed.

Since Sergey is demoing OpenSubdiv in a few days, I'll
go with the easy fix for now which is just checking for NULL pointer, but
this needs to be fixed properly at some point.

5 years agoFix scrubbing only treated as animation for sequencer
Antony Riakiotakis [Fri, 7 Aug 2015 13:39:32 +0000 (15:39 +0200)]
Fix scrubbing only treated as animation for sequencer

Intent was to act as animation everywhere

5 years agoFix T45713: Numselect for confirm popup not working anymore
Julian Eisel [Fri, 7 Aug 2015 12:39:50 +0000 (14:39 +0200)]
Fix T45713: Numselect for confirm popup not working anymore

5 years agoBGe: Fix T45597 wrong object layer for linked object in blenderplayer.
Porteries Tristan [Thu, 6 Aug 2015 14:58:52 +0000 (16:58 +0200)]
BGe: Fix T45597 wrong object layer for linked object in blenderplayer.

5 years agoFix: Sliders in animeditors were getting drawn too far left
Joshua Leung [Thu, 6 Aug 2015 14:41:33 +0000 (02:41 +1200)]
Fix: Sliders in animeditors were getting drawn too far left

Sliders in for FCurves in the animation editors were leaving space for
one extra setting that they didn't need to be accounting for (and which
wasn't shown, as it isn't valid for FCurves).

5 years agoAnimEditors FModifiers toggle: Add a bit more space beside it so that it doesn't...
Joshua Leung [Thu, 6 Aug 2015 14:38:23 +0000 (02:38 +1200)]
AnimEditors FModifiers toggle: Add a bit more space beside it so that it doesn't seem to collide with the mute toggle

5 years agoFix T45166: Keyframes pasted at wrong position when NLA strip has offset
Joshua Leung [Thu, 6 Aug 2015 14:23:55 +0000 (02:23 +1200)]
Fix T45166: Keyframes pasted at wrong position when NLA strip has offset

Paste keyframes code seemed to have overlooked the NLA mapping issue, causing
keyframes to get pasted in the wrong places.

5 years agoNo need to count layers to check empty
Campbell Barton [Thu, 6 Aug 2015 14:00:02 +0000 (00:00 +1000)]
No need to count layers to check empty

5 years agoGPencil UI: Streamline the data panel workflow
Joshua Leung [Thu, 6 Aug 2015 13:46:06 +0000 (01:46 +1200)]
GPencil UI: Streamline the data panel workflow

Restored the "New Layer" button in the NKEY Grease Pencil panel (as was found
pre-2.73) for two cases:
 1) When no Grease Pencil datablock is active - This shortcut makes it possible to
    add a new layer to start drawing in with a single click again (instead of two
    clicks - one to add a datablock, and a second to add the layer)

 2) When there are no layers - There is no need to display the UI list in this case,
    thus saving a bit more space in the rare cases where this applies.

5 years agoT44932: Disable pressure handling for "poly" mode too
Joshua Leung [Thu, 6 Aug 2015 13:36:27 +0000 (01:36 +1200)]
T44932: Disable pressure handling for "poly" mode too

5 years agoStopGap Fix for T44932: Ignore pressure values when drawing straight line segments...
Joshua Leung [Thu, 6 Aug 2015 13:33:53 +0000 (01:33 +1200)]
StopGap Fix for T44932: Ignore pressure values when drawing straight line segments with GPencil

After some testing of the behaviour of this stuff, it became clear that the current
pressure handling here isn't very useful. The initial point would invariably get a
low pressure value (due to the way that the initial tap needs time to "take"), while
the end of the stroke suffers from similar issues (i.e. when the pen is released).
Meanwhile, the line thickness would flicker while drawing the stroke, as the endpoint
pressure varied.

So, until we find a better way, all straight line segments are now drawn without
pressure sensitivity.

5 years agoTimeline: Make GPencil keyframes slightly taller than normal keyframes to make them...
Joshua Leung [Thu, 6 Aug 2015 13:23:58 +0000 (01:23 +1200)]
Timeline: Make GPencil keyframes slightly taller than normal keyframes to make them easier to distinguish

This commit makes GPencil keyframes in the timeline slightly taller (80% height
vs 60% height) so that they will not be that easily confused.

5 years agoRemove MFace use w/ fluidsim
Campbell Barton [Thu, 6 Aug 2015 12:33:45 +0000 (22:33 +1000)]
Remove MFace use w/ fluidsim

5 years agoDocs: comment BKE_scene_set_background
Campbell Barton [Thu, 6 Aug 2015 11:02:08 +0000 (21:02 +1000)]
Docs: comment BKE_scene_set_background

5 years agoFix typo in cmake when OpenSubdiv is not found
Thomas Beck [Thu, 6 Aug 2015 09:51:18 +0000 (11:51 +0200)]
Fix typo in cmake when OpenSubdiv is not found

5 years agoFix T45695: Assigning material reverts
Campbell Barton [Thu, 6 Aug 2015 08:04:13 +0000 (18:04 +1000)]
Fix T45695: Assigning material reverts

Setting the material was resetting the link bit, this is OK from the UI,
confusing for scripts.

5 years agoOpenSubdiv: Make sure faces are exported with consistent normal
Sergey Sharybin [Thu, 6 Aug 2015 07:49:13 +0000 (09:49 +0200)]
OpenSubdiv: Make sure faces are exported with consistent normal

This is currently a requirement of OpenSudiv and original orientation code
was depending on this quite a lot.

This makes mesh conversion and comparison slower but solves some crashes.
With some trickery it could be optimized and become closer to original

Probably Campbell has some nice ideas here as well :)

5 years agoSimplify defvert_remove_group(), use realloc
Campbell Barton [Thu, 6 Aug 2015 06:52:39 +0000 (16:52 +1000)]
Simplify defvert_remove_group(), use realloc

Patch by @chadf

5 years agoCleanup: unused warning
Campbell Barton [Thu, 6 Aug 2015 06:52:28 +0000 (16:52 +1000)]
Cleanup: unused warning

5 years agoCMake: AUDASPACE_ROOT_DIR wasn't working
Campbell Barton [Thu, 6 Aug 2015 02:59:39 +0000 (12:59 +1000)]
CMake: AUDASPACE_ROOT_DIR wasn't working

5 years agoCleanup: style (match other find modules)
Campbell Barton [Thu, 6 Aug 2015 02:55:54 +0000 (12:55 +1000)]
Cleanup: style (match other find modules)

5 years agoCleanup: whitespace, unused var
Campbell Barton [Thu, 6 Aug 2015 02:34:31 +0000 (12:34 +1000)]
Cleanup: whitespace, unused var

5 years agoCleanup: whitespace
Campbell Barton [Thu, 6 Aug 2015 02:34:19 +0000 (12:34 +1000)]
Cleanup: whitespace

5 years agoFix T45691 crash on material view
Antony Riakiotakis [Wed, 5 Aug 2015 23:09:07 +0000 (01:09 +0200)]
Fix T45691 crash on material view

Call glProgramUniform1i only when OpenSubdiv is requested and only when
the GPU supports it.

5 years agoFix T45693: Fix for using 4-component vector as 3 component in osd shader
Sergey Sharybin [Wed, 5 Aug 2015 19:35:38 +0000 (21:35 +0200)]
Fix T45693: Fix for using 4-component vector as 3 component in osd shader

5 years agoOpenSubdiv: Make sure normals passed to OSD are all up to date
Sergey Sharybin [Wed, 5 Aug 2015 17:19:05 +0000 (19:19 +0200)]
OpenSubdiv: Make sure normals passed to OSD are all up to date

Solves shading artifacts with animated characters.

5 years agoOpenSubdiv: Changes to texturing
Sergey Sharybin [Wed, 5 Aug 2015 16:29:43 +0000 (18:29 +0200)]
OpenSubdiv: Changes to texturing

Use first material slot for until multiple materials are fully supported.

Also respect setMaterial()'s return value to avoid drawing unnecessary

5 years agoOpenSubdiv: Initial OsdMesh construction missed clearing out-of-date coords flag
Sergey Sharybin [Wed, 5 Aug 2015 14:06:18 +0000 (16:06 +0200)]
OpenSubdiv: Initial OsdMesh construction missed clearing out-of-date coords flag

5 years agoCleanup: unused warning
Campbell Barton [Wed, 5 Aug 2015 13:50:22 +0000 (23:50 +1000)]
Cleanup: unused warning

5 years agoFix dereference before NULL check
Campbell Barton [Wed, 5 Aug 2015 13:46:49 +0000 (23:46 +1000)]
Fix dereference before NULL check

5 years agoOpenSubdiv: Completely avoid possible access to non-existing CPU data
Sergey Sharybin [Wed, 5 Aug 2015 13:11:50 +0000 (15:11 +0200)]
OpenSubdiv: Completely avoid possible access to non-existing CPU data

Make it so CCGDM reports 0 number of geometry when it uses GPU backend for
drawing. This screws up a bit statistics in info header and requires to have
some special handle of CCGDM in the drawing code, but makes it so non of the
areas will try to access non-existing geometry.

5 years agoOpenSubdiv: Edit mode was not checking for Use OpenSubdiv flag
Sergey Sharybin [Wed, 5 Aug 2015 12:51:08 +0000 (14:51 +0200)]
OpenSubdiv: Edit mode was not checking for Use OpenSubdiv flag