1
1

Compare commits

...

4683 Commits

Author SHA1 Message Date
34498dbe56 Mod-bskin: Fix 0 radius hang out 2015-10-06 22:51:21 +07:00
ea5054ba5a Mob-bskin: Fix degenerate adjcent edges. Fix wrong winding order in cyclic cases. Fix wrong radius interpolation in cyclic cases 2015-10-06 22:15:36 +07:00
fbbfa43d75 Merge branch 'master' into mod-bskin 2015-10-04 15:16:29 +11:00
5884a0d66e Correct last commit, picky type warnings 2015-10-04 15:11:38 +11:00
a3cf661108 Correct last commit, check before freeing 2015-10-04 15:02:29 +11:00
74a2fa3095 BLI_Buffer: add BLI_buffer_reinit
Useful for re-using a buffer when the existing data can be thrown away.
2015-10-04 14:29:27 +11:00
9f046e95c0 BLI_Buffer: support over 2gb allocations
Also move comment to C-source and enumerate useful features.
2015-10-04 14:10:26 +11:00
38f4aeb2d3 BLI_Buffer: fix BLI_buffer_resize w/ calloc flag
When resizing, zero memory when the calloc flag is set,
even when no realloc is done.
2015-10-04 13:52:13 +11:00
0dc3984924 Cleanup: warnings/style 2015-10-04 11:15:17 +11:00
5443d41882 InstallDeps: Fix broken OSL (would not generate valid default names for its .oso pre-compiled files).
Also, externalize temp/hacky patches in own dir, much much cleaner than integrating them in bash script!
2015-10-03 16:28:09 +02:00
344cf0ad24 Cleanup/warnings 2015-10-03 21:43:38 +10:00
01c1e6b9ff Merge branch 'master' into mod-bskin 2015-10-03 21:26:16 +10:00
d9d3a2a500 Fix T44605: OS X continuous grab issues. 2015-10-03 13:08:37 +02:00
ffe03cd264 Fix Broken Font Preview (reported over IRC by kopias, thanks).
Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here:
* Using non-initialized color (which lead to transparent drawing...), we need to use new
  `blf_draw_buffer__start/end` helpers here too, made them shared internally.
* Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of
  translated string, not the length of untranslated string!

This fix must be backported to final 2.76.
2015-10-03 09:29:37 +02:00
41d0547490 Cleanup: style 2015-10-03 08:22:48 +10:00
caf98e29c5 rename ui_but_dragedit_poll
This isnt only checking, its initializing draglock
2015-10-03 08:19:50 +10:00
e6bc4da2ad Bskin: Remove debug code 2015-10-02 22:26:35 +07:00
aacc54d533 Bskin: Reduce flickering at connection nodes. Add isolated mesh part support. Clean code 2015-10-02 22:00:04 +07:00
e49b934955 Fix T46346: Hide/Mask menu, Hotkey for lasso mask in sculpt mode unchangeable.
One can only edit keyboard shortcuts from that menu, others will now show a short
info about that instead of stupid 'Add' option!
2015-10-02 13:11:27 +02:00
550527bed0 Fix memory leak in compositor code with RGB curve nodes. 2015-10-01 18:11:12 +02:00
9ad829da7b Cycles: Correction to point density with particle source and world mapping 2015-10-01 19:34:37 +05:00
066df84f73 Fix T46340: Auto scrolling in text editor with upward selection not work.
Cleanup and rework a bit text_cursor_set_to_pos_wrapped(), it did not handle correctly negative y valuesi,
because it was only checking lines starting from first visible one.

Mostly, we now directly get line matching given y position (be it an invisible one) from the helper
(renamed `get_line_pos_wrapped()`), instead of first visible one, which allows us to get rid of
additional complexity of looping over next lines until we find correct one.

This code remains rather complex to follow, added some asserts to ensure everything works as expected,
and tested it rather seriously, but DO NOT backport this to 2.76!
2015-10-01 15:34:24 +02:00
29c2a64694 BGE: Fix T46302: abort call for unnormalized quaterions. 2015-10-01 13:06:57 +02:00
0f43fbcd8c Fix T46339: Edge sliding when there is only one vertex in the mesh crashes blender.
If t->mode remains edge/vert slide, restoreTransObjects() ends up calling
projectVert/EdgeSlideData(), which tries to access invalid customdata...

Not sure why we call again restoreTransObjects() and resetTransRestrictions() here tbh,
but safer not to change that for now.

Should be backported to 2.76 if possible.
2015-10-01 12:06:57 +02:00
83a94cb3f2 Fix T46321: 3D view not refreshed immediatelly after pasting keyframe in dope sheet (for a single channel) 2015-10-01 18:47:37 +13:00
e5117108aa Fix potential memory leak baking 2015-10-01 17:21:08 +10:00
22ec991e6b Fix T46331: File open does not show thumbnails, when a filter_glob is provided by python scripts.
No reason to exclude usual file-type 'guessing' for operator-filtered extensions...

Safe for 2.76, should we need to merge more fixes.
2015-09-30 20:20:44 +02:00
fabde2ab43 Fix T46332: Can't select an object with OpenSubdiv enabled
The issue was introduced by a wrong fix for T46247. Now both reports should
be properly solved.
2015-09-30 20:59:19 +05:00
95763b8c8a Revert "Fix T46247: Side-reported, bbox for zero-verts object with OSD subsurf and GPU compute would be -INF."
This reverts commit b278e8742b.
2015-09-30 20:57:02 +05:00
de360c4090 Fix T46313: Cycles bake normal map
Regression moving to bake to looptri
caused by mismatch w/ MFace and MLoopTri when the 3rd index was 0.
2015-10-01 07:25:45 +10:00
1030b22b0a Fix T46325: Armature: No more possible to rotate a bone with only its tip selected, in EditMode.
Regression from rB312cb0a957b81233ea, now we make an exception for TFM_ROTATION mode...
2015-09-30 10:51:16 +02:00
Julian Eisel
491b1899de Fix T46306: Cursor sometimes jumps with num-slider buttons & Continuous Grab
More precise description of the issue: Clicking on the right side of a num-slider button with Continuous Grab enabled sometimes caused cursor to jump to the inner value indicator even though text editing was started.

Happened because data->ungrab_mval wasn't reset correctly after dragging.
2015-09-30 01:58:59 +02:00
Julian Eisel
32365bb06c Add drag-threshold for number slider buttons
Was already used for normal number buttons for ages, makes sense to use here too.
2015-09-30 01:58:59 +02:00
7d2a62ef65 Fix T46299: Windows: File Browser Crash while listing big folders in preview mode (fonts, images...).
Windows-only bug, mmap & co are not threadsafe by default on this platform, so we have to add a dedicated
spinlock for them in win32.

Note that we may try to get rid of those mmap later, but not for 2.76!

To be backported to final 2.76...
2015-09-29 19:54:25 +02:00
2eb0c990f1 i18n extraction tools: keep even better order of entries in PO files.
Important to avoid too much changes, especially on the git repo (we are still getting
way too much changes there currently...).
2015-09-28 20:32:09 +02:00
3a58de3bf1 Blender Internal: Fix regression in point density texture
The issue was introduced by original Cycles point density support commit,
it lead to a constant density of 1 for object verticies point density source.
2015-09-28 21:33:45 +05:00
4c09f47a99 Cycles: Fix wrong particles min/max calculation for point density
Solves wrong object mapping reported in T46301.
2015-09-28 21:33:45 +05:00
fc97204742 Fix T46293: Text Editor: Convert to spaces/to tabs was totally broken with non-ASCII strings.
Code was totally unaware of UTF8, also it was needlessly complicated...
2015-09-28 10:04:37 +02:00
1a6d45527f BGE docs fix: link to the correct method name 2015-09-27 17:20:10 +02:00
8ea5cfd448 BGE documentation updates
Mostly added missing :arg: clauses -- these caused the :type:-clauses
that were already in the RST files to be hidden from the output HTML.

I also fixed some argument types from 'list' to 'Vector' where applicable
and corrected some obvious mistakes.
2015-09-27 16:32:16 +02:00
d187c6d8d6 Fix T46285: "Select parent" if there is no parent doesn't work correctly. 2015-09-27 10:24:11 +02:00
14bac995f3 Fix T46268: All Hotkey "C" are unexpectedly translated in menus.
We need custom context here, those are often very short names so context collision is pretty easy.

Also some minor changes (and avoid shadowing varnames)...
2015-09-27 09:51:56 +02:00
3bc16c3362 Fix T46271: switching between textures in texture buttons not updating preview. 2015-09-27 02:40:30 +02:00
b0951f4954 Fix T46212: blender internal lights in exclusive light group wrong in viewport. 2015-09-27 02:20:16 +02:00
97b1b6775f Fix crash reporting render errors during baking. 2015-09-27 02:18:42 +02:00
Julian Eisel
5a16c85a53 Fix file browser not sorting file list when opened from editor menu 2015-09-26 13:40:13 +02:00
4aad17c622 Use PyThreadState_GetDict, avoid Python internals
Works around problems caused by exposing Py internals (Py_BUILD_CORE).

- Build error with GCC, Py3.6 & OpenMP
- Linking error on MSVC
2015-09-26 12:02:17 +10:00
02b7896423 Fix T46260: Shadeless option ignores Object-Color 2015-09-26 01:37:39 +10:00
Julian Eisel
0419d3bb01 Fix node auto-offset to left broken
Own, really stupid mistake in rBc653077bf56 :| Kids, don't commit at night!
2015-09-25 17:08:33 +02:00
cf12e51eba Fix T46249: Boid goal object that has a force field set to 'Every Point' shape causes crash.
This is a mere bandage, that whole area is known broken anyway, but at least it should prevent the crash.

Note that that kind of stuff (the efd->index being a pointer) is really bad practice imho...

Should be backported to final 2.76.
2015-09-25 15:53:14 +02:00
a4a6e9b3f5 Fix T46239: Cross effect strip input fields can't be changed (in its properties panel).
Those shall not be editable in UI...
2015-09-25 10:54:38 +02:00
7967da2515 Fix T46263: bpy api - assigning to object.matrix_basis with AXIS_ANGLE rotation mode does not work correctly.
Drot in axis angle does not make that much sense anyway (it's even disabled in UI), but let's apply
it correctly at least!
2015-09-25 09:03:30 +02:00
b278e8742b Fix T46247: Side-reported, bbox for zero-verts object with OSD subsurf and GPU compute would be -INF.
Trivial fix, to be backported to final 2.76 if possible.
2015-09-25 08:38:45 +02:00
c216d345aa Merge branch 'master' into mod-bskin 2015-09-25 02:18:00 +10:00
112f665a43 Resolve minor issues for gcc 2015-09-25 02:17:46 +10:00
de80e68768 Cleanup: And one more commit... (BVH Cache). 2015-09-24 17:01:58 +02:00
97a3fa17d6 Cleanup: Remove some more BVH cache code, for reading/writing the cache. 2015-09-24 16:49:10 +02:00
5bcdc5513b Mod_bskin:remove unused functions 2015-09-24 21:37:14 +07:00
a5646b2d5b Bskin: add ununiform scaling. add hole support. add bulging effect support at branch verts. reduce triangles at stiching region 2015-09-24 21:19:16 +07:00
dfadf18659 Cleanup: Remove some underlying code for the BVH disk cache.
Notes:
- There is still some bvh cache code, but that is from the engines initial commit, we might clean this up further or keep it.
- Changes in util_cache.h/.c are kept, this might be re-used in the future.
2015-09-24 15:47:27 +02:00
3804a3660e Cleanup: Typo fixes in OpenCL log messages. 2015-09-24 15:34:41 +02:00
3e59691df5 Cycles: Remove the BVH cache feature
This removes the BVH cache feature from the UI, underlying code will be removed in a separate commit.

The BVH cache was added before we had a multi-threaded BVH build, and a lot of other optimizations were done since then, which makes this not useful anymore.

Fix T46162.
2015-09-24 15:30:15 +02:00
Dalai Felinto
6aed771fac Multiview: fix Image Editor not showing Views menu when rendering
non-stereo Multi-View camera rigs (unreported)
2015-09-24 09:15:18 -03:00
fc6f4c11ae Add test scripts to ctest & rename 2015-09-24 20:52:58 +10:00
81f64312d2 Fix T46226: Bake normals multi-res crash 2015-09-24 20:14:51 +10:00
4269c56904 Fix T45865: NLA: Auto Blend is not recalculated when adjusting repeat. 2015-09-24 10:53:09 +02:00
f26a3f4bc5 Fix T46227: ShapeKeys Lattice by the driver, problem updates in new depsgraph
The issue was caused by driver referencing path outside of the key datablock.
2015-09-24 13:13:00 +05:00
3352b56d05 Fix T46232: Boids crash w/ random rule selection 2015-09-24 16:07:30 +10:00
ecf0529efd Quiet warning 2015-09-24 15:17:02 +10:00
741cf193f1 Knife: Improve clamping extents in ortho view
- measure extents from mesh center instead of origin.
- use clamping method, guaranteed not to flip the input vectors direction.
- use cage coords when available (since knife operates on the cage).
2015-09-24 13:34:26 +10:00
4493cac21a Fix T46219: Knife cuts fail away from center 2015-09-24 03:00:52 +10:00
Dalai Felinto
1827f99a78 Fix T46225: Crash when rendering halo flare
Error introduced in the multiview commit.
Also bringing back the "continue" statement instead of "return", as it
was before multiview.
2015-09-23 13:37:01 -03:00
d0a2a8086c Fix T46222: Eyedrop picking objects inconsistently 2015-09-24 01:45:19 +10:00
c34993160d Fix T46220: Add torus has no 'layers' option
Add layers property for all operators using AddObjectHelper
2015-09-24 01:05:55 +10:00
Julian Eisel
982a06ac22 Fix UV editor scope background color not correct after theme reset
Missed to do that in rBcbeb76da952cd.
2015-09-23 16:01:44 +02:00
365d8ceac0 Workaround for linking Python on win32 2015-09-23 23:20:15 +10:00
f964334b88 Fix T46215: Explode modifier looses textures 2015-09-23 22:57:00 +10:00
abfc9e59e2 Fix T46217: Make normal artifacts 2015-09-23 20:19:46 +10:00
0ec814c91d Cycles: Support building with latest OSL-1.7dev
So now the following OSL versions are supported (at least for compilation):

- 1.5 with closure alignment patch applied
- 1.6.8 release
- 1.7 development version from latest git
2015-09-23 12:27:02 +05:00
1cae9c4af4 Fix T46202: OS X (and Windows?) crash when going fullscreen.
Calling event handling recursively during window live resize is problematic,
the code wasn't designed to do that. Instead postpone event handling until
after live resize.
2015-09-22 23:20:17 +02:00
0cf842a989 Update module test to pass w/o freestyle enabled 2015-09-23 03:36:32 +10:00
7615073e77 Update test to RNA API 2015-09-23 03:11:17 +10:00
1a59b63e1c Show error when unsupported movie format used
Was silently failing.
2015-09-23 03:02:07 +10:00
ad873ca92d prevent assert: select-linked UV delimit w/o UV's 2015-09-23 03:00:30 +10:00
c3ebab3e45 OpenSubdiv: Fix crash with empty mesh
Reported by newbz in IRC, thanks!
2015-09-22 21:11:17 +05:00
dc9f906d42 FFmpeg: Solve memory leak happening on encoding video 2015-09-22 21:11:17 +05:00
c6049d1371 Fix T46194: Crash rendering particles
Off by one error in 38940662
2015-09-22 22:16:40 +10:00
a1e2b292bb Install_deps: Hopefully fix broken checks for numpy package in fedora-like distro. 2015-09-22 11:00:35 +02:00
f2418f48fa Install_deps: Add command line options to saved BUILD_NOTES.txt.
Requested by Daniel Salazar (zanqdo) over IRC.
2015-09-22 09:45:01 +02:00
e51272f663 Fix report banner text width 2015-09-22 17:18:43 +10:00
e29f8c600b Reporting was done before before addons were loaded
On the very first start, reporting of missing engines wasn't working.
2015-09-22 16:53:07 +10:00
b87cb9ad2c Remove arbitrary simulation time limit in liquid sim. Tested and works fine with more than 100s 2015-09-22 00:35:22 -06:00
70f0499139 Fix for error reporting w/ a new-file
Reports are now initialized before reading startup.blend
2015-09-22 15:56:03 +10:00
9a62164d94 Cleanup: indentation 2015-09-22 15:02:11 +10:00
98807ca751 Report loading file with no matching engine
Re-enable old code, now show in header instead of popup.
2015-09-22 13:30:12 +10:00
28fa49f168 Cleanup: de-duplicate post file read update calls 2015-09-22 12:50:41 +10:00
12ea90b707 Fix T46201: Popup menu in post_load handler crash
Match regular file loading logic for new-file operator.
2015-09-22 12:26:24 +10:00
32578db1bd Fix bplayer (c). 2015-09-21 17:40:50 +02:00
b53eb9e18b Cleanup: use malloc when calloc is overwritten 2015-09-22 01:03:32 +10:00
e4d016ce48 Makefile: show build dir when configuring 2015-09-22 00:16:53 +10:00
894fd0c2fc Sequencer: show X,Y in text effect location 2015-09-22 00:15:37 +10:00
84b074baed Armature drawing: custom shape scale options
- Custom scale:
  Avoids having multiple custom-shapes at different sizes.
- Option not to use bones length:
  So changes in edit-mode don't resize the custom-shape.
2015-09-21 23:57:08 +10:00
0dbde559cf Render: Free persistent image storage when loading new file 2015-09-21 18:42:48 +05:00
7b9bd5b546 Recent change for Py3.6 compat caused fatal-error
Revert back to old method, and define Py_BUILD_CORE to expose internals.
2015-09-21 23:08:18 +10:00
df80aeb162 Fix (unreported) Append/link code: All library datablocks could end with same name.
This was broken since ages I think, did not really hurt since we usually never use libs' names
to access them. Rather bad behavior however, breaking a ground rule of our ID system!

And no real reason to add new libraries to new (split) Main at all, libraries are
never considered linked datablocks, which means they should always be in 'main' Main->library list.

Not a regression, but should be included in 2.76 imho.
2015-09-21 15:06:07 +02:00
8da3c5c1b9 Fix T46159: OpenSubdiv does not always give same results as Blender own subsurf code with crease edges 2015-09-21 17:53:21 +05:00
dbdb1064e7 Small fix for depsgraph debug graphviz: empty labels for edges require an explicit id. 2015-09-21 12:46:07 +02:00
1ee9c5d6a3 Some minor tweaks to depsgraph debug graphviz output.
- Removed relation labels, since these mostly just reflect connected nodes, and also appear too far off the edge lines
- Draw cyclic links in dark red
- Slightly thicker edges and larger margins
2015-09-21 12:16:30 +02:00
ff3c7460e5 Fix view-selected w/ custom bone shapes
Was ignoring bone-length, also check that drawing shapes is enabled.
2015-09-21 15:15:59 +10:00
034cc855f0 Fix T46186: Panel doesn't update on brush change 2015-09-21 10:32:14 +10:00
5031dbcee5 Fix linker warning about zero length memset. 2015-09-21 01:59:52 +02:00
726727191a Fix T43715: IK pole target + stretch not working for a single bone chain. 2015-09-21 01:59:50 +02:00
0b714abacc RNA: angle step-sizes were too small
These were ignored previously, so it wasn't noticeable.
2015-09-21 09:49:13 +10:00
Julian Eisel
c653077bf5 Fix node auto-offset failing during heavy compositing (sometimes)
Compositing might make main thread so busy that animation is considered done due to duration before final position is reached.

Also added check to avoid unnecessary redraws.
2015-09-21 01:03:36 +02:00
8f25c12110 Fix T46050: blender internal geometry node UV not working inside node group. 2015-09-20 23:15:34 +02:00
196d26fb14 Fix T46144: blender internal face texture color wrong in raytraced reflection. 2015-09-20 23:14:55 +02:00
Julian Eisel
5ad8489c1d Fix compiling with GE
Enabled Freestyle instead of GE :| Sry
2015-09-20 21:11:08 +02:00
Julian Eisel
cbeb76da95 Fix T46180: Theme > UV Image editor > Scope Background does not have any effect 2015-09-20 20:17:19 +02:00
Julian Eisel
28da385ac2 Cleanup: Use new vector transform functions 2015-09-20 18:11:25 +02:00
Julian Eisel
a28a1f11d6 GL-utils: Add vector transform functions
Might also be useful to have _neg versions of these (done quite often),
but decided to keep it simple for now.
2015-09-20 18:03:36 +02:00
605a2c8490 Cleanup: warning, style 2015-09-21 06:59:50 +10:00
d0017eb5f2 fix build error w/ clang 2015-09-20 20:27:09 +10:00
fa19af6a93 Word wrap support for frame node 2015-09-20 18:17:34 +10:00
c0d5523e6c Fix T46169: Link to bpy API in addons tab of user preferences is outdated.
Now use auto-generated one, like e.g. for link in Help main menu...
2015-09-20 09:49:36 +02:00
cfc109eb92 Fix T46161: Rotate around selection changes bezier curve handle type.
Issue is, when 'Rotate Aroud Selection' is set, in Edit mode we do a fake transform operation
to get center point around which to rotate. For curves, most transform operations involve
a check of handle types. For now, added 'TFM_DUMMY' as an exception here.

Think it would be best to actually undo those changes in case of cancelled operation,
but this is much more involved, while this fix is safe enough to be included in final 2.76.
2015-09-19 11:08:21 +02:00
6844b02a71 Fix for building w/ Python3.6 2015-09-19 17:49:38 +10:00
631d08aaed Fix leak in UI Panels
Switching screens quickly didn't free the panels activedata.
2015-09-19 17:49:04 +10:00
cbeab360f1 UI: tooltip layout tweaks
- enable word-wrap for all tip text to align vertically.
- draw enum identifier at the end of the last line, not first.
2015-09-19 15:22:03 +10:00
cb27d38cf4 BLF: correct ResultBLF.width value when wrapping 2015-09-19 15:22:03 +10:00
e6a413b1ec UI: word-wrap for tooltips, broke text alignment
This wasn't visible with default settings,
but caused problems w/ pie-menu's & manually adjusted theme font-size.

Now only draw from the bound-box top w/ word-wrap enabled.
2015-09-19 15:22:03 +10:00
Julian Eisel
36d64240e6 File Browser: Scroll view on normal selection too
Adjusts view after mouse/border selection if some selected items are out of view bounds.
To get as much of the selection into view as possible, this adjusts view first for the last, then for the first element in the selection.
Also, if region is pretty small, view adjustment is skipped, as otherwise the view is focused on the first element only, which isn't really useful IMHO.

Maybe not so nice: Since we do two view alignment iterations, UI_view2d_curRect_validate, which is a rather big function *might* be called twice under certain circumstances (border select & total size of selected elements is exceeds view bounds). I think that's totally acceptable though.
2015-09-19 04:24:48 +02:00
Julian Eisel
d7e88fe1fd File Browser: Scroll view with arrow keys navigation
Adjusts view to display active file after using arrow keys to navigate through files.
2015-09-19 03:34:00 +02:00
Julian Eisel
bc5238e3cc Correction to previous commit 2015-09-19 03:17:06 +02:00
Julian Eisel
1bb89a6028 Fix file key select using wrong file after border select in scrolled view
Basically, after border selecting, a wrong file was selected by using arrow keys if the screen was scrolled a bit vertically. Reason was that we didn't use correct view space coordinates but region space coordinates for measuring distance from mouse to first/last file in selection after border select.
2015-09-19 03:12:46 +02:00
6e19aa42bf Fix T46155: Sequencer Text Effect: wrong vertical 'TOP' alignment.
Logic was broken for this vertical alignment option - we need to remove one line height here...
2015-09-18 23:01:31 +02:00
de7b7572c2 Fix T46030: Strange behavior of Cycles Brick Texture
Added some extra seed to the hash, so it's now less likely to give repetitive
patters at values around zero.

This will change distribution of bricks for existing files. but it's something
inevitable.
2015-09-18 17:32:17 +05:00
910aaa3951 Image Stamp: word-wrap support for 'note' text 2015-09-18 20:44:06 +10:00
0aa0a1a966 Sequencer: word-wrap support for sequencer text
Also add vertical alignment option,
default align to bottom for subtitles.
2015-09-18 20:44:06 +10:00
d435b0d24d UI: word-wrap support for tooltips
Tooltips will automatically wrap when exceeding UI_TIP_MAXWIDTH.
2015-09-18 20:44:06 +10:00
f2341f8296 BLF: initial word-wrap support
- Adds support for word wrapping to Blender's BLF font library.
- Splits lines when width limit is reached or on explicit \n newlines.

Details:

- Word wrapping is used when `BLF_WORD_WRAP` flag is enabled.
- There is a single loop to handle line wrapping,
  this runs callback, passing in a substring,
  this way we can avoid code-duplication for all word-wrapped
  versions of functions... OR... avoid having to add support
  for word-wrapping directly into each function.
- The `ResultBLF` struct was added to be able to get the number
  of wrapped lines, when calling otherwise unrelated functions
  such as `BLF_draw/BLF_width/BLF_boundbox`,
  which can be passed as the last argument to `BLF_*_ex()` functions.
- The `ResultBLF` struct is used to store the result of drawing
  (currently only the number of lines wrapped, and the width).
2015-09-18 20:43:52 +10:00
e9dd060102 Doc: remove todo's from BMesh code
These were out of date and better have outside the source.

Also clarify BMLoop description.
2015-09-18 16:40:55 +10:00
803d1563ec Minor edits to sys-info
- remove byte b''
- remove always false check for missing buildinfo.
- use textwrap module
2015-09-18 16:40:55 +10:00
247b68476b Cycles: simplify logic for calculating dof-dist
Matches change from BKE_camera
2015-09-18 16:40:55 +10:00
f1422c40af Use squared length where possible 2015-09-18 16:40:55 +10:00
2eb50d450c Cleanup: simplify PyBMesh customdata API use 2015-09-18 16:40:54 +10:00
b2e206a0af Cleanup: remove unused WriteFile members 2015-09-18 16:40:54 +10:00
1d6c1e90aa Support relative frames w/ start/end args 2015-09-18 16:40:54 +10:00
be73170bf6 Fix UI crash entering very long strings
Strings exceeding UI_MAX_DRAW_STR weren't null terminated.
2015-09-18 16:40:54 +10:00
f7239e9084 Fix T46148: Sculpt view-clip fails in ortho mode 2015-09-18 16:40:54 +10:00
276732ee62 Address request from T46136: make softrange for 'simple deform' angle from -360 to 360 degrees...
This should be safe enough for final 2.76, sould we make other RC.
2015-09-18 08:27:04 +02:00
208e064721 Doc: escape enum name & description
Needed since key enum now uses many characters as they're typed.
2015-09-18 01:47:58 +10:00
a9c5e1d9b7 2.75 splash
by The Alike Team
2015-09-18 00:10:19 +10:00
Julian Eisel
7238ae1df4 Fix hidden auto-offset glitch
Steps to reproduce were: Open F233831, insert floating node into nearby link (so that it's not attached to frame).
2015-09-17 16:00:04 +02:00
174a1f1a45 Fix for broken tree offset after recent change for cyclic nodes support 2015-09-17 17:28:13 +05:00
3cee28ebf3 Fix T46143: Faces missing with GPU render
Epsilon was quite arbitrary for GPU, replaced with checking for zero-sized faces.

It should solve both original report and the new one. After the release we can check
why GPU doesn't produce accurate math here and go to the root of the issue.
2015-09-17 17:21:17 +05:00
c4bcb6a479 Fix T46134: units degrees increment are too small
The user interface was ignoring the precision step size for degrees,
making all rotation inputs drag by a 100th of a degree.

Now use a 10th of a degree instead.
2015-09-17 22:09:18 +10:00
209ca1e746 Fix T46139: Crash when inserting a node in a looped node structure 2015-09-17 16:17:04 +05:00
7fcaa7feac Fix for recent regression clamping materials
Mixup between gpu/derivedMesh total materials, fix and name more clearly to avoid confusion.
thanks to Sergey for finding root cause!
2015-09-17 20:46:38 +10:00
9744c8ca58 CMake: Another attempt to solve compilation error on Windows 2015-09-17 14:29:56 +05:00
a712459603 CMake: Attempt to fix compilation error on Windows after recent changes 2015-09-17 14:17:00 +05:00
eca704f579 Fix T46090: Blender game embedded player crash
SCons didn't pass `-DWITH_AUDASPACE` to the compiler, so it skipped the
instantiation of the "aud" Python module. This caused a crash of the BGE,
which did get the `-DWITH_AUDASPACE` directive, and expected that module
to exist.

Reviewed by: lukastoenne
2015-09-17 10:14:08 +02:00
79c668dbec Correction to previous commit.
Mostly styling, but also str_exec would often remain undefined...
2015-09-16 22:23:05 +02:00
4fb9cc24a8 Fix (unreported): Filebrowser key navigation entry did not change caption correctly
As of this release we're able to navigate with the keyboard in the filebrowsing area. The button caption is changing to an appropriate string whenever a new entry is selected. In @Severins original code a different method was used to determine if a directory was choosen or not, but this got lost while merging the filebrowser rework.

Thanks to @mont29 for review!
2015-09-16 22:08:04 +02:00
9d087ad0b5 Fix T46130: Vertex/wire no visible with OpenSubdiv in edit mode
For now simply show warning in the interface and fallback to regular subsurf
code. Supporting OpenSubdiv in edit mode in possible but not high priority
currently.
2015-09-16 23:02:41 +05:00
1fa3bd6148 Fix T46128: High Quality DoF broken
The issue was caused by some special tricks needed to compile OpenSubdiv shader
which was using stupid check whether geometry shader is used or not.

Now made it more explicit call whether special OpenSubdiv trickery is needed or
not.

Its not ideal solution, but it's not really easy to do a proper solution for
this, because while we can do half of the work with if-defs in the shader code
but we'll still need to somewhat define layout of the input blocks which isn't
really doable with current shader version we're using.
2015-09-16 22:38:46 +05:00
89de6e9eac OpenSubdiv: Fix crash caused by accessing OpenGL vendor from non-main thread 2015-09-16 22:25:13 +05:00
f0023b0dbe Comment unused sequencer prefetch 2015-09-17 03:00:32 +10:00
5a13f8a750 UI: Curve clipping didn't enforce zoom. 2015-09-17 02:55:30 +10:00
cb4e358735 Fix T46126: Anchored sculpt fail when cursor leaves mesh 2015-09-17 02:14:56 +10:00
cf4711bdf9 OpenSubdiv: Attempt to solve crash in background mode 2015-09-16 20:33:16 +05:00
0f19e6d1a7 Code cleanup, whitespace 2015-09-16 20:26:58 +05:00
7b3491f2c6 OpenSubdiv: Fix for missing caching of vendor string parsing result 2015-09-16 20:23:32 +05:00
19d17c8d90 Fllowup to previous commit, remove unused code 2015-09-16 20:20:16 +05:00
3f05d72a98 Fix T45708: OpenSubdiv crashes on Windows with Intel cards
Disable Intel cards for until we'll go to the root of the issue of the crash.
This will take a bit, so being so close to the release we go safe and disable
unstable GPU, so blender at least doesn't crash.

This could be bypassed by setting OPENSUBDIV_ALLOW_INTEL environment variable.
2015-09-16 19:28:40 +05:00
182b5736fb Get rid of leftover from refactor of VBO code. Thanks to severin for
noticing
2015-09-16 17:23:27 +03:00
0b959458ff CMake: Don't modify global CFlags when enabling/disabling OpenJpeg 2015-09-16 19:10:41 +05:00
2d16622068 Fix T46105, disable viewport compositing when non power of two texture
support is missing.

Supporting those (really) old GPUs requires us to make shaders more
expensive by converting between real and scaled coordinates and be wary
of such conversion caveats when handling uv coordinates in shaders. Not
worth the cost for supporting hardware that old.
2015-09-16 17:04:12 +03:00
96282b866d Correct for building with gcc 2015-09-16 14:23:15 +10:00
b7c2199583 Merge branch 'master' into mod-bskin 2015-09-16 14:12:53 +10:00
e3ff9b2044 Fix T46073: crash w/ out-of-bounds material 2015-09-16 07:49:59 +10:00
7f63eaafd6 Fix T45389 Windows thumbnails not working.
Also they did not work when using blender -R from
command line in 64-bit systems.
Issue was checking for wrong define which would
cause code to detect if the blender executable
functions under 32 bit emulation.
For 64bit executables this is false, leading
blender to believe we are operating under a 32bit
system, and registration would try to register
the 32bit thumbnailer.

This 32 bit dll is (correctly) missing for local
installs and from the new installer, thus no thumbnails.
2015-09-16 00:28:09 +03:00
b8a8059e21 Fix for text editor un-indent undo
Same issue as T44381, re-use logic for indent.
2015-09-16 03:35:25 +10:00
860e25fe29 Fix T46093: Thumbnails/previews of materials/textures not displaying in Blender filebrowser when only one thread is available.
Using the global scheduler here is not a really good idea - `filelist_cache_previewf()` is not a short task
that run once, but it's a loop that keeps cheking for work in a TODO queue. This means it won't quickly allow other tasks
to start, so it should not be in the global scheduler.

In fact, asynchronous tasks (that is, tasks that will live for quite a bit of time, and often sleep a lot) should never use
global scheduler, they would steal computing resources from heavy-duty, short-time living ones - and possibly even completely
stall threaded tasks (if all worker threads are executing long-life tasks...).

We could probably even completely bypass the scheduler/task thing here (and directly use threads), but it does not have
that much of an over-head, and still offers easy handling of threading stuff...
2015-09-15 13:57:47 +02:00
0c2be4d8e8 Fix T46113: Color picker erratic outside 0-1 range 2015-09-15 21:28:21 +10:00
745510844b Cleanup: hide clnors warning prints behind G.debug, those can get annoyingly verbose... 2015-09-15 12:03:58 +02:00
841202fd06 Fix wm leak loading factory-startup 2015-09-15 19:31:17 +10:00
Dalai Felinto
07a7d64c06 BGE: make error message more clear when trying to de/activate actuator from non-active controller 2015-09-15 00:01:32 -03:00
dbe1829183 Fix T46114: paint face-mask hide clears sharp flag 2015-09-15 05:55:42 +10:00
0271414aad Fix T46109: Bitmap font objects leads to unfreed memory. 2015-09-14 17:12:40 +02:00
3056add0e0 Fix T45699: BGE auto-run exits immediately 2015-09-14 23:39:58 +10:00
34843a855e Fix T46099: snapping failed on objects with some NULL-dimension in their bbox.
Added a helper that ensures a bbox has some non-NULL dimension along all its axes.

Also, fixed some (rather unlikely) NULL dereference cases (though it should not in this context,
`BKE_object_boundbox_get()` can return NULL).
2015-09-14 12:53:52 +02:00
2db71782e7 Fix T46106: Hidden socket w/ node link from Py API
Internally this was OK, but an invalid state from the users POV.
2015-09-14 20:39:20 +10:00
5611237391 Fix T45699: own regression w/ looptri update
Baking was still checking tessface in parts.
2015-09-14 15:55:43 +10:00
bfea087d96 Alternate fix for offscreen render w/o npot
Store the original texture size,
since its needed for reading pixels and passing to glViewport.
2015-09-14 13:18:43 +10:00
754fb6b907 Revert "Fix crash in opengl render caused..."
This reverts commit d64b1221c6.

While this prevents the crash, offscreen renders still aren't working right.
2015-09-14 13:13:48 +10:00
d64b1221c6 Fix crash in opengl render caused by gfx being blacklisted for
non-power-of-2 texture support.  Note that all I did was pass
the correct width/height into glReadPixels; the result may not
be the same as if non2 textures were enabled.
2015-09-13 14:52:31 -07:00
e443dd4d97 Fix T43033: VideoTexture module repeated loading of images causes memory leak
Fix proposal for memory leak caused by png decoding in videoFFmpeg.cpp

T43033

Author: Ulysse MARTIN (youle)

Reviewers: dfelinto, ben2610, moguri, lordloki, panzergame

Reviewed By: lordloki, panzergame

Subscribers: panzergame, lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1396
2015-09-13 20:59:24 +02:00
09e40a4956 Cleanup: spelling 2015-09-14 02:22:22 +10:00
7900d697f0 Fix T46089: Text from Effect Strip is invisible in VSE Preview.
Deviding two ints together never yields a float... Also, logic of various proxies size corrections was quite broken.
Now we should always get the same (relative) size of text whatever proxy setting/render scale is chosen.
2015-09-13 14:51:50 +02:00
8324750899 Bskin: Add cyclic mesh support. Use RNG random generator instread rand. Some optimizations 2015-09-13 17:13:24 +07:00
0e8a3f8439 Revert "C:/Program Files (x86)/Git/*"
This reverts commit 2e5b5cc5f2.
2015-09-13 17:09:58 +07:00
2e5b5cc5f2 C:/Program Files (x86)/Git/* 2015-09-13 17:06:06 +07:00
c486ae82a5 Revert "Add cyclic mesh support. Use RNG random generator instead of rand. Disable subdivision level. Some optimizations"
This reverts commit 67c4ffcbef.
2015-09-13 16:54:36 +07:00
67c4ffcbef Add cyclic mesh support. Use RNG random generator instead of rand. Disable subdivision level. Some optimizations 2015-09-13 15:08:14 +07:00
0cb67c60fa Reduce MIN_VALENCE to 6 2015-09-13 15:00:01 +07:00
45a875fec4 Fix T46091: Video Sequencer rewrite *.png to _.png
Own mistake when adding filename safety check...
2015-09-13 08:20:48 +02:00
c56deb132e Cleanup: Quiet some picky warning from Coverity. 2015-09-12 16:46:27 +02:00
26041f9357 File Bookmarks: use volume label on Windows, and set name of recent entries
from system/user bookmarks' name if possible.

Volume label on Windows was request from T46083, makes Blender more in line
with 'common' filebrowsing on this OS.

And now, we automatically set name of recent entries from the bookmarks, if path
can be found there, more consistent too from user PoV.
2015-09-11 22:33:13 +02:00
a79c519e5d Fix T45755: Bad NLA text alignment 2015-09-11 23:32:15 +10:00
6212eb2845 Fix T45579: Custom Hotkeys Dissapear.
Due to how we find kmi to remove and kmi to add when patching final keymap with user defines,
we could actually end up with same kmi for both, see comments in code for details.

Note that it may be a good idea to make user-defined customizations specific to a given base keymap,
instead of applying them blindly?
2015-09-11 15:01:37 +02:00
21826af5f7 Fix T45165, OSX quicktime fails with diacriticals in filename.
Since Blender internal strings are UTF8, changed the initialization
of the string to use initWithUTF8String from default encoding.
Fix worked on OSX 10.5.5.
2015-09-11 07:32:05 -04:00
bb20c96da5 Fix memory leaks in collada import 2015-09-11 19:12:54 +10:00
42825dc1fc Fix T46074: Collada crashes importing animation
double-frees and freeing memory already inserted into Blender.
2015-09-11 18:46:08 +10:00
2f1e51a1f3 Fix T46058: Modifiers on curve shows different results on OpenGL and cycles render
Not really ideal fix, but should make Cycles behave same as BI. For some details
please refer to inline comment.
2015-09-11 12:02:17 +05:00
5a284e1b62 Merge branch 'master' into mod-bskin 2015-09-11 15:58:32 +10:00
9355446716 Fix T46070: Content of folders with a .blend extension aren't listed until filtering is disabled.
Own stupid mistake somewhere during filebrowser revamp...
2015-09-10 22:09:42 +02:00
d1dcf91955 UI: increase threshold for color-band select
Was quite small, especially with hi-dpi displays.
Increase to 50 since theres no benefit to not select when clicking.
2015-09-11 05:57:55 +10:00
0d568e4186 Fix T46048: Custom properties UI redraw issue
Adding/removing custom properties didn't refresh elsewhere in the UI.
2015-09-11 04:29:31 +10:00
54daeb185f PyAPI: add an update method for properties
This is called when modifying an RNA property,
however it can be useful to be able to make a properties
update callback run without having to change it.
2015-09-11 04:29:31 +10:00
477e81128d Show correct syntax for id-properties 2015-09-11 04:29:31 +10:00
Julian Eisel
d234bf21b9 Correction to last commit
Did a fullscreen check in a function that should only be called in fullscreen mode. Not a big deal, but bad API practice.
2015-09-10 20:23:17 +02:00
Julian Eisel
487705d60a Fix T46069: Crash when saving a render with non-fullscreen file editor
IMAGE_OT_save_as assumes that active area is an Image Editor and the logic that should return to image editor after saving didn't run after fullscreen was manually exited.
2015-09-10 19:54:20 +02:00
37f4660637 Fix T44344: paint bleed fails in perspective view 2015-09-11 02:33:51 +10:00
84c44e026e Fix leak in ContextGLX 2015-09-11 01:48:31 +10:00
1d1b8bb196 Fix T46067: ShrinkWrap + Threaded depsgraph crash
Note that allocating DM arrays from an editmesh is currently not threadsafe,
however even if were resolved, its more efficient to avoid having to do it in the first place.
2015-09-10 18:33:24 +10:00
ac0e511619 Fix T46064: Sequencer view-selected does nothing 2015-09-10 15:31:37 +10:00
3225261f13 Fix incorrect textbox use w/ scaled fonts 2015-09-10 14:13:14 +10:00
e4baa9fb86 Fix broken logic in new FileBrowser caching of entries.
We were still using main borwser's FileDirEntryArr to own memory of entries currently in cache.

That was OK for common caching operation, but if was not released when clearing cache!
Nothing dramatic, since that was cleared too, but less often, so e.g. by changing sorting
options you could pile up more and more no-more-used entries there...

Anyway, there is no reason to do that, much more sound and clean to keep everything
cache-related in dedicated FileDirEntryCache struct.

This means main borwser's FileDirEntryArr is now always expected to not store any actual entry!

Note: this can probably be cleaned up a bit more, but would wait after 2.76 for this!
2015-09-09 21:36:10 +02:00
02b9921b75 bgl: fix implicit overflow 2015-09-10 03:59:18 +10:00
d4ca74c227 bgl: disable some defines not found in mesa 7 2015-09-10 03:54:40 +10:00
a9b0390bff Fix T45880: Texture Paint mask random angle fails
Random mask failed when the paint brush didn't have random angle enabled too.
2015-09-10 03:34:57 +10:00
4e759d6735 Fixes T46060 Regenerated the full list of constants we should expose 2015-09-09 18:35:05 +02:00
a2a0e7aed9 Add button for H.264 lossless output 2015-09-10 01:06:24 +10:00
8ff0d35744 Fix crash viewing passes w/ scopes
Scopes assumed all passes were RGBA, but some passes have 1-3 channels.
2015-09-10 00:41:10 +10:00
Dalai Felinto
5317dc716e Fix T45839 : Regression - Multi-layer image issues when using non-standard names
This was introduced in the fix for T44336 .
The code is now what it should have been in the first place at the time
of multiview commit.

ImageUser->passtype is being removed in favour of bringing
ImageUser->pass back.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1504
2015-09-09 19:42:35 +05:00
c028b5980b Fix (unreported) crash with undo/outliner and drivers.
To reproduce the crash:
* Add some shapekeys to default cube.
* Add at least on driver (can be default empty one) to a shapekey value.
* **Make this driver visible in Outliner**.
* Delete all shapekeys.
* Undo.
* Crash.

Root of the issue is outliner reading code in `blo_lib_link_screen_restore()`,
which would try to `restore_pointer_by_name()` for all `TreeStoreElement->id` pointers.
Thing is, those id pointers are not always IDs, they can be animdata, sequence, RNA struct/property...

That's really not so great design, but also has reasons like size of the struct, we have to live with it.

So now:
* TreeStoreElement->type defines are braught back into DNA.
* There we also define a `TSE_IS_REAL_ID` macro to check whether a given TreeStoreElement actually stores an ID pointer or not.
* And in Outliner read code we only try to retore pointers by name for actual ID ones, and set the others to default NULL value.

Also, added clear comment to TSE types that do not store a real ID pointer!
2015-09-09 16:36:23 +02:00
12e4103bdd Cycles: Attempt to fix 32bit CUDA kernels 2015-09-09 18:23:49 +05:00
0899f47d78 Formatting fix.
Reviewed by: Severin
2015-09-09 14:39:21 +02:00
a9b9478247 Fix: VSE text strip size was wrong when preview render size != 100%
Reviewed by: sergei
2015-09-09 14:36:12 +02:00
145617c5eb OpenSubdiv: More graceful handling of shader compile/linking errors 2015-09-09 17:27:08 +05:00
4f29613894 Buildbot: Test enable CUDA binaries for Win32
Linux 32bit seems to work fine now, let's see if Win32 also works.
2015-09-09 16:38:44 +05:00
42e15b9dd3 Fix T46051: Loading certain Jpeg causes system alert sound (Win32)
The issue was caused by RedCode library printing binary string to the terminal.
2015-09-09 16:18:37 +05:00
9307f08986 Fix (unreported) Outliner letting you edit path of indirect linked lib shown at 'first level'.
From Gooseberry team request indirect libs were also added at root of 'BlendFile' Outliner view,
but that allowed edition of their path, which is useless...
2015-09-09 12:26:58 +02:00
6ddf77f1c0 Fix crash in preview render w/ too small border 2015-09-09 19:43:39 +10:00
1a04179802 Cycles: Cleanup, typo
Spotted by Campbell, thanks!
2015-09-09 14:25:43 +05:00
ad86d6ebdc Fix T46056: User Preferences-> install from File freezes Blender.
Own stupid error in recent fix for buffer overflow in `BLI_testextensie_glob()`...
Also found & fixed another potential buffer overflow in this func.
2015-09-09 11:02:32 +02:00
c87ee8da2c Fix T46055: Volume doesn't render when PANORAMIC Camera is inside volume mesh 2015-09-09 13:57:54 +05:00
d13a0e8f4a Cycles: Limit triangle magnitude check for only GPU
Found a way to make AVX2 CPUs happy by reshuffling instructions a bit,
so now there's no weird precision errors happening in there.

This solves some render speed regressions on CPU, but unfortunately
this doesn't help for GPU rendering.
2015-09-09 13:39:36 +05:00
46d2abf78f Cycles: Only use ascii in comments 2015-09-09 13:39:36 +05:00
7fab7b63f9 Assert CustomData_from_bmeshpoly is used correctly
Follow up to last commit, since bugs here aren't so obvious.
2015-09-09 16:48:56 +10:00
1e7a8ab5e8 Fix T45733: Crash w/ VColor + BlenderInternal
Tessface CustomData layers were added multiple times when tangents were used.
This made BI crash accessing layers missing elsewhere.
2015-09-09 16:48:21 +10:00
1b98ece49d Buildbot: Enable 32bit kernels for linux builders
This is more an experiment, not guaranteed to work but at the same time
building of kernels seems to work manually in the same chroot. Perhaps
latest changes helped compiler to optimize registers usage.
2015-09-09 11:05:17 +05:00
3b10f500c2 Cleanup: warnings 2015-09-09 04:54:02 +10:00
c26a9eed92 Error in last commit
Had warnings disabled.
2015-09-09 02:39:40 +10:00
a2b80d4c48 Fix T46003: Scale w/ script ignores axis-align 2015-09-09 02:05:10 +10:00
91264cfdd0 Revert "Fix T45191 Speed strip behaviour not easy to predict."
This reverts commit 0e83b0854f.

Fixes T46038
2015-09-09 00:36:15 +10:00
d5f1f66f06 typo in last commit 2015-09-08 23:46:56 +10:00
a93e15aee3 Fix T45771: Walk mode fails on OSX 2015-09-08 23:39:37 +10:00
9d8aaf77ac Fix T45981: BGE, 2D filters leak memory 2015-09-08 19:42:59 +10:00
d1d0f8eb1a Cleanup: quiet warnings 2015-09-08 19:42:58 +10:00
abb63be099 Use C++ guarded alloc for FilterBase 2015-09-08 19:42:58 +10:00
5f120f7723 Fix for building with C++ guarded alloc
KX_WorldInfo is already inherits the overrides
2015-09-08 19:42:58 +10:00
f184202a9a Cleanup: API docs 2015-09-08 19:42:58 +10:00
2cdfa3ea5b Cycles: Support building with latest upstream OSL
Only affects standalone part.
2015-09-08 13:10:00 +05:00
cb7c61ad54 Fix T46006: Issue with Equirectangular image rendering in Standalone Cycles
Issue was caused by wrong viewplane used for standalone camera.
2015-09-08 13:07:08 +05:00
310764603a Cycles: Add missing initialization of fov for prev/next frames 2015-09-08 13:06:17 +05:00
92d12ab38b Cycles: Correction to integrator's transparent shadows
It was possible that deleting transparent BSDF from shader wouldn't
disable transparent shadows in integrator when doing viewport render.
2015-09-08 11:47:39 +05:00
6b0544eaaf Cycles: Update TODO, camera in volume is supported already 2015-09-08 11:29:14 +05:00
0e12228bd9 Fix T46045: Missing viewport update when adding transparent shader to material 2015-09-08 11:28:02 +05:00
946b850b3e Fix T46040: Bake action cleans existing keyframes 2015-09-08 04:01:03 +10:00
9de20963cd Fix beautiful textbook case of string overflow in BLI_testextensie_glob... 2015-09-07 19:23:11 +02:00
0c275ea18a Fix large branch node assert. Clone amarture create, mark root, equalize radius from the old modifier 2015-09-07 21:50:49 +07:00
04e12c617d Fix T46029. Center ngon in bevel got no attributes or interpolation data. 2015-09-07 09:33:42 -03:00
1a7eca3c54 Fix T46034: OpenCL kernel compilation error in latest buildbot
Simply expanded expression, so no float4->float3 conversion happens.
2015-09-07 15:02:44 +05:00
77b0b661dd Doc: PyAPI docs, quiet warnings, fix URL's 2015-09-07 18:23:16 +10:00
e106a212e8 Fix T46032: Crash w/ file-browser preview 2015-09-07 17:20:09 +10:00
1c5b15eab3 Doc: update Python 'gpu' module reference
- add missing uniforms.
- add uniform types.
- link to RNA equivalent.
- remove 'value' from uniforms (they were wrong, better use module members anyway).
- various corrections & edits.

Fixes T45505
2015-09-07 16:11:05 +10:00
7038c2c489 Cleanup: gpu constants weren't so clearly arranged
Also reminder to update docs w/ the API.
2015-09-07 16:11:05 +10:00
4ae181543f Fix viewport camera dof object distance
Also use simpler method to calculate the depth.
2015-09-07 02:32:34 +10:00
e54fb3f78f Build with GCC strict warnings 2015-09-07 02:27:26 +10:00
Julian Eisel
14dd88e817 Add icon for incremental grid snapping
As decided in D910, we use a new icon for incremental grid snapping and use its old one for absolute grid snapping.

This also touches the library_data_broken icon .dat files, seems some changes on its .svg entry landed in upstream without updating the other icon files (already noticed this when committing icon for auto-offset, but removed it from commit - leaving it in now to avoid further confusion)

Icon by @plyczkowski (made a tiny edit as it looked a bit blurry in 16x16). Thx!
2015-09-05 23:36:52 +02:00
Julian Eisel
b529b82830 Fix T45944: Ctrl+Wheel to cycle values failes in toolshelf
Now, ctrl+wheel for cycling tabs is passed to hovered button if it supports cycling values (RNA menus, color/row/number/slider buttons, list boxes)

This might feel a bit glitchy if ctrl+wheel is used to cycle tabs and in newly opened tab, a button with cycling support is under the mouse, which will get mouse input from this point on instead of region. Think this is still better than old behavior.
2015-09-05 19:42:05 +02:00
1478ac35c7 Depsgraph: Don't use legacy function when building without legacy depsgraph 2015-09-05 17:52:29 +05:00
9683807459 Fix T45938: Ocean modifier animation not working with NLA action-strip (old depsgraph only)
When a modifier was animated by a NLA strip, this animation was not working when using
the old depsgraph. This was because the code which checks if a NLA strip affects any
modifiers was missing - specifically, it was originally left out as it was thought
that it was unlikely that many users would need this, but adding in those checks
would have a (slight) negative effect files where there are heaps of NLA strips
but modifiers animated this way were absent.

The new depsgraph however doesn't suffer from this problem, as these sorts of checks
need ot be built into the graph-building stage for everything to work, so these links
had already been added.
2015-09-06 00:07:06 +12:00
b8e0b2db56 Math Lib: isect_plane_*_v3 avoid negation
Unmeasurable speedup for plane intersection.
2015-09-05 17:44:02 +10:00
ba188cf98d Math Lib: simplify isect_plane_plane_v3
Unlike the 3 plane method, the 2 planes squared cross-product _is_ the determinant.
2015-09-05 17:10:07 +10:00
ac51e2f326 Fix T46015: normals_split_custom_set_from_vertices doesn't work with zero vectors
This was simply broken for vertex case (indexing loop normals with vert indices...).

Turns out to be rather verbose to replace on-the-fly zero normals by default ones correctly,
and do not want to make a full copy of the given custom normals array, so now this one is
editied in place (replacing zero vectors by correct default normals). Don't think this
could be a serious issue anyway.
2015-09-04 22:41:10 +02:00
83a36b2829 Cycles: Fix for wrong optimization of bump node
It can't be simply removed in cases when it's connected to input which is
different from Normal. This is because the input wouldn't be connected to
default Normal geometry input, possibly breaking shading setup.

The fix is not really ideal, but should work at least.

This fixes skin having too much glossy reflection in the file from T46013.
2015-09-04 20:06:31 +05:00
713ce037ab Cycles: Fix wrong check for zero-sized triangles
Initial idea was to optimize calculation a bit by skipping calculation of actual
triangle edges and use vector from ray origin to triangles. In practice this
optimization didn't quite work in cases when origin point is too close to the
triangle.

Let's do 2.76 with a bit more complicated calculation, still looking into exact
reasons why watertight intersections fails in certain cases, but actual fix might
bit be ready so soon.

This fixes wrong eyes on the lady from T46013.
2015-09-04 20:06:31 +05:00
65a80708d4 Fix T46010: Bone offset between Rest Pose and Edit mode.
That one was hairy... To summarize:
* We were setting Bone.head/tail (aka **local** rest location of bone) from EditBone data, using **EditBone's parent computed armature space**.
* We use those local head/tail to define Bone's restpose (in `BKE_armature_where_is_bone()`), using **Bone's parent armature space** (aka parent's arm_mat).
* Because of bone's roll nightmare, the two above parent's matrices will often not be the same.
  In an ideal world, this should not affect locations (head/tail), but in real world of float it does - noticeably, in some extreme cases.

So! This commit cleans up things a bit (`fix_bonelist_roll()` was already doing much more than just fixing roll mess, has been renamed
to `armature_finalize_restpose()`), and ensures we do use (final!) parent's arm_mat local space to compute children's local head/tail as well.
This allows us to avoid too much imprecision here.

Checked the patch also with a complete Victor's rig from Gooseberry, seems to have no nasty side effects - fingers crossed!
2015-09-04 16:50:29 +02:00
c882cbd37c Cleanup: Better to assert over bad condition (which shall never happen anyway), than just return with un-initialized mat... 2015-09-04 16:50:29 +02:00
c73a009bfc Cleanup & build with gcc 2015-09-05 00:40:43 +10:00
38ed9107cd Merge branch 'master' into mod-bskin 2015-09-05 00:26:29 +10:00
e132af62e1 Fix incorrect convex hull building in case of plannar vertex set. Add some check 2015-09-04 20:56:59 +07:00
39752eb912 Fix for isect_tri_tri_epsilon_v3 w/ small faces
tris with ~1e-05 edge lengths would fail
2015-09-04 22:29:12 +10:00
1d71ad2eaa Math Lib: Use plane intersect from graphics-gems 2015-09-04 22:13:20 +10:00
d0e7ba3fd1 Math Lib: avoid sqrt w/ triangle intersection 2015-09-04 22:06:36 +10:00
2ea96df159 Correct own error in line_point_factor
Passing zero epsilon allowed divide by zero.
2015-09-04 22:06:36 +10:00
f79c748246 Armature: Cheap edit-to-object mode speedup.
`fix_bonelist_roll()` is already recursive, and was calling recursive `BKE_armature_where_is_bone()` twice!

Changed `BKE_armature_where_is_bone()` to controll whether we recurse over children or not.

With full Victor's rig, we gain 16% in `ED_armature_from_edit()` (from 31ms to 26ms).
With a dummy test-case 100 bones chain, we gain 80% in `ED_armature_from_edit()` (from 1.25ms to 0.25ms).

Not crucial, but still worth it. ;)
2015-09-04 12:26:52 +02:00
52fda9b0db Fix T45019: Cycles wrong render of motion blur mesh
The issue was caused by wrong detection whether number of verticies
changed or not. Basically, it wasn't working correct in cases when
number of verticies is increasing compared to the current frame.
2015-09-04 15:19:22 +05:00
3e63c604e3 Partial revert of warning cleanup
These warnings are false-positives
2015-09-04 14:40:03 +10:00
Julian Eisel
ef629e0d50 Quiet warnings
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-09-04 01:04:37 +02:00
c3fef001ee View-Selected: use custom bones boundbox
Support using custom pose-bone transform and object when calculating view bounds.
2015-09-04 04:23:18 +10:00
54ad576666 Small tri intersect fails when not normalized
Logic was ok, but would run into precision issues.
2015-09-04 01:59:44 +10:00
e709da3def Cleanup: minor RST edits 2015-09-04 01:11:26 +10:00
727b88fa67 Use priority queue for better triangle merging at branch nodes 2015-09-03 21:42:18 +07:00
10c93a582b Check for no-op edge separates to quiet asserts when inset individual.
This causes no change in behavior, since code was alreadying doing
a no-op in bmesh_edge_separate if the edge is a boundary.
But it tripped an assert, annoying in debug builds.
We want to leave assert in bmesh_edge_separate in case callers
expect there to be separate loops after this always.
So putting test in caller.
(Same worry about bmesh_urmv_loop? I checked callers and they
appear OK to me - they deal with the no-op return.)
2015-09-03 10:42:16 -04:00
8cd121ecaa Reduce quad resolution at skeleton limbs 2015-09-03 20:57:55 +07:00
b899114a7e Fix T45937: Cycles hair not rendered if children count set to zero 2015-09-03 18:54:50 +05:00
129e0b8ab5 Reduce mesh resolution in the middle region of skeleton limbs 2015-09-03 20:54:15 +07:00
a4bcd9bc96 Cycles: Fix missing packed images with newer versions of OSL
This isn't really complete fix, complete fix would require calculating
derivatives via OIIO API, but supporting this will either end up with
some code duplication or will require some non really safe changes at
this release cycle.
2015-09-03 18:16:30 +05:00
0bc4bc2e61 Fix T45946: Cycles texture interpolation bug
Coordinate clamping was done in the wrong order.
2015-09-03 18:16:30 +05:00
2c2f075929 BGE docs: resolution & fullscreen changes don't work in the embedded player
The documentation for bge.render.{setWindowSize,setFullScreen,getFullScreen}
did not mention that those functions are no-ops when using the Blender-
embedded player.
2015-09-03 15:05:36 +02:00
73b34ad06b PyAPI: tweak to ensure_ext don't lower entire path 2015-09-03 21:58:11 +10:00
8383a2d4cc Fix: Made bpy.path.ensure_ext compatible with compound extensions.
Extensions such as ".tar.gz" are now also supported. Before this patch,
ensure_ext('demo.tar.gz', '.tar.gz') would return 'demo.tar.tar.gz'.

This results in issues with the `ExportHelper` mix-in class; clicking
an existing file in the file dialogue warns about overwriting it
(highlighting the input box in red), but then saves to a different
file.

Also added a unit test for the new behaviour.

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1498
2015-09-03 13:09:16 +02:00
e5e65b1099 Fix T45984: Setting custom normals properly requires multiple calls to normals_split_custom_set()
The detection of needed sharp edges (based on given loop normals) would not fully work
on first run in case we started with a complete smooth cyclic loop fan (edge between
first and last loop of the fan would not get checked).
2015-09-03 12:20:50 +02:00
8e8aed9efa Cleanup: now warning free w/ GCC 2015-09-03 19:52:35 +10:00
d1640d5fab Quiet compiler warnings 2015-09-03 19:45:16 +10:00
913cfc4d1a Cleanup: style 2015-09-03 19:27:55 +10:00
357e749957 Cycles: Fix nondeterministic pass ordering when using baker 2015-09-03 13:52:56 +05:00
f387fe2b65 Cycles: Fix for uninitialized closure data
This might confuse closure merger.

Spotted by Campbell Barton, thanks!
2015-09-03 13:48:43 +05:00
8e75abd29a ImBuf: Fix crash generating preview for really huge image
In fact, any user of IMB_scalefastImBuf() is now robust against working
with really hires images.
2015-09-03 12:49:04 +05:00
2ed4f98548 Compositor: Support changing distortion models in movie distortion node
Previously only polynomial model worked correct. now changing it to divisions
will work nicely as well.
2015-09-03 12:19:47 +05:00
6789d02112 Fix T45959: DistanceKey preview used wrong colors
Same issue as recent fix in ChannelMatte
2015-09-03 12:28:27 +10:00
46d731612d Animplayer passed -a, then warned its unknown
Also modify a copy of argv
2015-09-03 04:27:44 +10:00
1f16b3280f Fix T45979: animplayer crashes w/ DND and audio
Issues re-initializing audaspace
2015-09-03 04:15:08 +10:00
390bc05b32 Fix second part of T45987: Node preview was still using wrong color space 2015-09-02 22:46:06 +05:00
39a437181c Quiet -Wdeclaration-after-statement warnings 2015-09-03 03:07:48 +10:00
06e61746f2 Merge branch 'master' into mod-bskin 2015-09-03 01:59:09 +10:00
c8cc664ce3 Fix T45995: Auto-set preview range sets superfluous end key.
get_keyframe_extents() would add an extra frame in case of mono-key fcurves in selected set...

Now do the 'not same start/end frames' check later, and also use floor/ceil instead of round
(we want to start at frame 3 if first key is at frame 3.8, reversed-same goes for end frame).
2015-09-02 17:50:55 +02:00
5671611c40 CMake: use generator expressions 2015-09-03 01:26:28 +10:00
c8ebc8736e CMake: Fix building w/o FindGit 2015-09-03 01:24:25 +10:00
0ddc05a07e Fix sphere projection while splitting polyhedra 2015-09-02 22:17:39 +07:00
6f5d1e257e Add missing spin-lock to IMB_makeSingleUser 2015-09-02 23:23:44 +10:00
525d7e02d4 Fix T45991: Transfer Weight tool UI is inconsistent and crashes blender.
Since data transfer when called from this tool has reversed behavior (it transfers **towards**
active object, as previous tool), we have to also reverse source/destination layers selection options.

Also fix 'reverse' option being saved, otherwise calling regular operator after 'transfer weights'
would stay in reverse mode, ugly!
2015-09-02 13:10:29 +02:00
2387e1629a fix flickering problem 2015-09-02 16:54:14 +07:00
5fe9b36aa6 Cleanup: style 2015-09-02 18:39:19 +10:00
41b99e40c0 b5287b1 removed important CCG_key_top_level call
Caused subsurf to crash w/o OSD
2015-09-02 15:39:17 +10:00
f6e0262a83 Enable guarded-alloc when --debug-all is passed 2015-09-02 13:41:12 +10:00
b3e1edf7f8 Correct help message for debug options 2015-09-02 13:38:55 +10:00
881047de88 Fix snapping edit-gpencil to edit-mesh
Reported in T45978

Was checking mesh selection state.
2015-09-02 11:29:04 +10:00
4b1f3a7819 Fix T45931: Blender Fails to generate previews.
Root of the issue was, preview generator was filling ID preview with unsigned int,
when RNA only knows of signed integers (and thus generates a python exception
when converting uint outside of int range)...

Using the brand new and much simple float pixels accessor to PreviewImage now.

Why this was working perfectly OK (it seems...) under Linux, and why error (py exception)
was so badly and misleadingly reported on Windows, remains pitch black mystery to me.
2015-09-01 19:15:06 +02:00
a2714c9e4f RNA PreviewImage: add float pixels accessors.
Raw int pixels can be nice in some cases (much less memory used), but converting to/from float values
(as e.g. expected by/from Image) is not simple in py, error prone and rather slow.
2015-09-01 19:15:06 +02:00
b5287b1b81 Avoid reupdating pbvh data in upload functions, these should have been
taken care of in draw functions.

Those iterate the whole PBVH tree so better avoid doing them, twice or
thrice.
2015-09-01 19:56:32 +03:00
45eb406748 Fix T45978: Ruler ignores new edit-mesh data 2015-09-02 02:28:16 +10:00
312cb0a957 Fix T45974: Bones fail to snap to verts
Was an issue with individual-origins + snap
2015-09-02 01:34:03 +10:00
ef931fecc3 Fix uninitialized normal var w/ objects snapping 2015-09-02 01:25:13 +10:00
2fcc38ad54 Assert vec_roll_to_mat3_normalized's gets a normalized vector 2015-09-02 00:43:53 +10:00
282811f8b8 Fix projection painting normal culling operating on individual
triangles.

This made the normal-related artifacts of projection painting much more
apparent. Now we do culling based on
whole polygons. Pure backface culling still uses individual
triangles.
2015-09-01 16:00:07 +03:00
a660f27527 Don't use GCC-only pragma for all compilers 2015-09-01 17:40:10 +05:00
5b02f8006a Add Python UI 2015-09-01 21:44:33 +10:00
a6409f3cb4 Minor changes needed for building on linux 2015-09-01 21:37:18 +10:00
36a9ae9c11 new skin modifier implementation, diff D1465 by @(khanh_ha 2015-09-01 21:24:35 +10:00
1140238acf Fix T45976: Crash accessing BMesh customdata
Layers returned from items() and values() could have an invalid index.
2015-09-01 19:59:26 +10:00
55f87590f0 Depsgraph: Fix compilation error with legacy depsgraph disabled
Reported by Campbell on IRC, partial patch by him as well.
2015-09-01 14:48:08 +05:00
74fae33ee5 Fix T45825: Macro redo disable options incorrectly
A non repeatable operator would disable editing options for all operators after it.
2015-09-01 18:43:29 +10:00
9304df5182 Fix T45939: Crash w/ BMesh.*.sort() 2015-09-01 16:07:34 +10:00
6db978f6d1 BMesh: add asserts for BMesh sort ghash lookups 2015-09-01 15:43:49 +10:00
a7b349d03c Cleanup: redundant cast 2015-09-01 15:01:13 +10:00
c86a519898 Use qsort_r for BMesh Py API 2015-09-01 13:56:08 +10:00
922d72355d Cleanup: pep8 2015-09-01 13:03:38 +10:00
b3f4bf87b4 Trade-marked BPlayer Fix (c) 2015-08-31 22:03:51 +02:00
333feea6e9 Fix T45258, impossible to select brush when removing it from 2d
painting.

Also system added a brush every time it found no paint brush in the
system which is not what we would want.

Solution:
* Brush panel stays visible always, regardless of whether there is a
brush or not.
* We search for first available brush when we find no brush in paint
struct instead of always generating a new one.
* Generating and searching for a brush take a mode argument now. Needed
some refactoring to users of BKE_paint_init as well.
* Did some style cleanups for paint mode enums.

Patch is big but it's mostly argument refactoring.
2015-08-31 22:00:30 +03:00
0018483dfa error in last commit 2015-09-01 03:02:14 +10:00
705776db1f Fix T45954: Inset w/ interpolated vertex color
Accumulating ubyte color was overflowing.

Thanks to @mont29 for suggested fix.
2015-09-01 02:51:30 +10:00
879c5d4568 Cycles: Make the max value for World MIS Map Resolution a power of two.
Old value likely was a copy / paste error.
2015-08-31 18:17:16 +02:00
26bad9e8f0 Cleanup: Fix some typos in volume code comments. 2015-08-31 18:14:51 +02:00
929db33828 Write thumbnail directly
BlendThumbnail matches the on-disk format, so just write directly.
2015-09-01 01:52:27 +10:00
5f64b77ca5 Fix T45955: Python's pdb can't show script source 2015-08-31 23:41:13 +10:00
a603a3470c Revert fix for T45849 (part 2, tsk!) 2015-08-31 22:47:14 +10:00
06b14aa5f9 error in comments 2015-08-31 22:26:05 +10:00
6a53e658d3 Alternate fix for T45849: tri-tri intersect error
Project both triangles onto the same plane to simplify calculations.
2015-08-31 22:15:27 +10:00
e503e37333 Revert fix for T45849, alternate fix coming up
epsilon check here didn't account for scale, causing T45919
2015-08-31 22:12:19 +10:00
96fa58e22c Math Lib: Add closest_to_plane helper functions
- closest_to_plane3 (for float3 planes)
- closest_to_plane*_normalized_v3 (for unit length planes)

Use when the plane is known to be unit length
2015-08-31 20:10:36 +10:00
489a5d34b7 Fix T45959: DistanceKey output incorrect 2015-08-31 16:22:16 +10:00
d9e71d5e16 Fix uninitialized vars in DistanceKey node 2015-08-31 16:22:06 +10:00
d267739be7 Fix incorrect cast 2015-08-31 13:47:32 +10:00
4ac5859f05 Cycles: Avoid copying objects in some places of BVH build
Gives barely measurable speedup of Spatial Split BVH build.
2015-08-30 16:48:16 +02:00
00d12ec04f Preview generation module: explicitly exclude any lib item.
Thanks to campbell for raising that point!
2015-08-30 15:49:26 +02:00
d8291ed88a missing NULL pointer check 2015-08-30 20:20:26 +10:00
6a80c2c48b Audaspace: fix for building with scons.
Removed duplicated code.
CMake so far built only the now removed version and scons tried to build both.
2015-08-29 22:42:20 +02:00
0952a8e44a Cleanup: set fd->mainlist to NULL at the end of blo_read_file_internal().
This is a local var, do not try to use it later!
2015-08-29 16:47:32 +02:00
95ed5d4437 Add some more missing ID types to TREESTORE_ID_TYPE... 2015-08-29 15:51:11 +02:00
db25b33973 Fix missing 'case idx' line in (debug-only & disabled) valgrind-friendly BKE_main_free() code. 2015-08-29 15:07:09 +02:00
c749fe4031 Fix T45736: Channel key error: color spaces modes
Was missing conversion back to RGB space.
2015-08-28 18:44:27 +02:00
36c408d861 Fix remaining parts of T44881, missing update on loading file 2015-08-28 18:29:27 +02:00
a068629abe Fix UI font drawing getting width w/o kerning 2015-08-29 02:10:11 +10:00
a0a7d92cc4 Partial fix of T44881: Fix for missing particles update when changing seed
Was only visible with new dependency graph.

Changing emit_from still doesn't behave fully reliably tho, that needs some
closer investigation.
2015-08-28 17:35:51 +02:00
a08d039e59 Fix assigning flag to bool 2015-08-29 01:05:43 +10:00
982533eb39 Revert "Blind attempt to fix T45931: Blender Fails to generate previews."
This reverts commit c4ab521e26, since it does not actually fix the issue...
2015-08-28 17:01:37 +02:00
b024ccd619 Fix T45929: OpenSubdiv was doing extra object recalc tags 2015-08-28 14:55:21 +02:00
c53b1e2a93 Readfile: Minor optimization in undo/redo case: do not call do_versions_userdef either. 2015-08-28 14:06:01 +02:00
c4ab521e26 Blind attempt to fix T45931: Blender Fails to generate previews.
Cannot reproduce the issue here on linux, but have the feeling windows builds are much
more easily broken with referencing bad data from bpy. So here guessing direct loop
over bpy.data.xxx when you do add and remove stuff from said xxx inside the loop
is not a good idea - which seems logical in the end. :P
2015-08-28 13:24:30 +02:00
a560122c4b OpenSubdiv: Remove some dead code 2015-08-28 12:46:52 +02:00
bf88428b7e Fix T45930 weights not appearing in editmode when show weights option
was enabled.

Caused by an -unneeded now- fix for opensubdiv. Code caused the vertex
colors to be uninitialized. Thanks to Sergey for confirming that initial
issue is no longer a problem.
2015-08-28 13:40:52 +03:00
e515d64c3e UI: Panels shared same class-name 2015-08-28 15:33:01 +10:00
85edd8fc82 Fix T45933: Can't select scaled camera in camera view 2015-08-28 12:10:21 +10:00
6bdf1d6dde Sequence/Scene render fixes
- wasn't checking subframe to see if the scene needed to be re-evaluated.
- unneeded int/float conversion storing original frame.
- moved cleanup block into one place to avoid confusion.
2015-08-28 11:28:01 +10:00
43a4aaf8e6 Compositor: Reduce number of divisions in EWA filtering 2015-08-27 19:43:33 +02:00
3ec81b814c Fix T45617: Map UV node produces image artifacts
Basically filtering was happening twice, first time by applying weights of EWA
filter itself and then by applying subpixel offset while reading pixel values.
2015-08-27 18:50:40 +02:00
9b3fa880a5 Support subframe evaluation for scene strips
Useful when used with the speed effect.
2015-08-28 01:25:23 +10:00
8d1f9b9f51 Update of our *nix .desktop file.
Based on patch by Alex (AlexL) (T45927), thanks.
2015-08-27 16:31:13 +02:00
59b2acc71b Make .blend file thumbnail reading simpler and more coherent, read/store them when reading in background mode.
Primary goal of this commit is to fix an annoying issue - when processing and saving .blend
files in background mode you lose their thumbnails, since it can only be generated with
an OpenGL context.

Solution to that is to read .blend thumbnail while reading .blend file (only done in background
mode currently), and store it in Main struct.

Also, this lead to removing .blend file reading code from thumb_blend (no need to have doublons).
We now have a small interface in regular reading code area, which keeps it reasonbaly light
by only reading/parsing header info, and first few BHead blocks.

This makes code reading .blend thumbnail about 3 to 4 times slower than previous highly specialized
one in blend_thumb.c, but overall thumbnail generation of a big .blend files folder only grows
of about 1%, think we can bare with it.

Finally, since thumbnail is now optionally stored in Main struct, it makes it easy to allow user
to define their own custom one (instead of auto-generated one). RNA API for this was not added though,
accessing that kind of .blend meta-data has to be rethought a bit on a bigger level first.

Reviewers: sergey, campbellbarton

Subscribers: Severin, psy-fi

Differential Revision: https://developer.blender.org/D1469
2015-08-27 16:00:46 +02:00
987b3df9c0 Missed version update loading in background mode 2015-08-27 23:12:40 +10:00
2112bd892b Fix T45926: Drivers fail in background mode
Scene evaluation was done before text blocks were registered.
2015-08-27 23:12:40 +10:00
90f667576f Buildbot: Correction to previous commit
Previous commit didn't really disable cuda binaries for some reason.
2015-08-27 12:22:44 +02:00
067fe2719a Fix T45702: Editing smoke while viewport render and blender bug
Issue was caused by blender internal accessing data from DNA during rendering.

There's no simple solution to make stuff thread safe, so for now simply restart
rendering on frame update.
2015-08-27 12:10:01 +02:00
43dab7833a OpenSubdiv: Fix crash toggling edit mode with new depsgraph 2015-08-27 12:01:20 +02:00
efc6f9438f OpenSubdiv: Tweaks to detecting whether geometry data is needed on GPU with new DEG 2015-08-27 11:47:56 +02:00
8cd4966722 Buildbot: Disable CUDA binaries on win32
They started to give issues as well, need some dedicated time to look
into the issues.
2015-08-27 11:43:29 +02:00
c5f9255eed Fix T45921: Screw modifier flips vertex normals 2015-08-27 19:29:42 +10:00
5908340f79 OpenSubdiv: Attempt to solve crash on certain GPUs/drivers 2015-08-27 11:05:23 +02:00
74c3ebad12 Fix T45920: Loopcut w/ shrinkwrap crash 2015-08-27 17:45:56 +10:00
72aadc3597 Use correct size for BVH insertion 2015-08-27 17:45:56 +10:00
a8be746609 OpenSubdiv: Fix error found by PerfectionCat,
Use glew, not gl constants to detect presence of extensions.
glProgramParameterEXTi is part of GLEW_EXT_geometry_shader4
2015-08-27 10:05:58 +03:00
512f631af6 Fix T43826: Sculpt grab anchored fails
Regression caused by GSOC2013 merge f745564
2015-08-27 15:22:08 +10:00
e9a6effa95 DNA/IO: struct ghash lookup didn't set 'lastfind'
Internal inconsistency: lastfind was being checked
on every DNA_struct_find_nr call, but never set.

Gives minor speedup reading files.
2015-08-27 13:29:57 +10:00
a32a4059da Fix crash switching to rotate from edge-slide
Caused by own fix for T45458
2015-08-27 11:11:09 +10:00
2633928e1d Fix T45232: Cycles bake artifacts with transparent textures
The issue was caused by uninitialized ray used for composite and AO evaluation.

Can;t really think of "proper" ray configuration here, it's all a bit arbitrary
but think initializing the ray in a way so we look at the surface in a negative
normal direction is much better alternative to uninitialized ray.

Open for alternative suggestions tho.
2015-08-26 17:51:54 +02:00
f62748f10a Fix T45912: Opensubdiv meshes don't properly center when using <numpad .> 2015-08-26 17:12:08 +02:00
9cc75bc524 Fix T44945: Blender crashes when using multiple domains and multiple flow objects with subframes
This is more like a workaround to prevent obvious cases fail, but in theory
if some other area will start updating object for subframes blender will
crash again.

Perhaps proper way to solve this will be to copy objects for subframe updates.
2015-08-26 15:27:22 +02:00
3e4a7f4366 Fix T45275: F-Curve normalization might corrupt animation 2015-08-26 15:06:45 +02:00
76df0ec93a Fix T45631: Ambient update rendered bug
The issue was in fact caused by both preview and viewport renderers affecting
on the default material, conflicting with each other.

Preview render doesn't really need default material, so we can safely skip it's
initialization in the render pipeline for preview rendering.
2015-08-26 14:52:28 +02:00
d33557c52e Correct fix for T39161: Scaling & snap 2015-08-26 22:26:28 +10:00
2f766f8ad2 Fix T45709: Cached Hair system is not seen in 2.75
Don't force re-distribution of cached particle systems, this doesn't
cause actual evaluation of particles and there was a reason why particles
are baked actually..
2015-08-26 14:28:41 +02:00
3dd16946aa Fix T39161: Scaling fails w/ snap-to-point 2015-08-26 20:42:27 +10:00
fed0448f92 Fix for error in recent smooth-view commit
Was assuming there was a camera
2015-08-26 20:42:26 +10:00
6ca12d157f Fix T45909: Garbage output in Viewport with OpenSubdiv device set to GLSL Compute
This isn't a Blender issue and the same bug happens with official OpenSubdiv
examples. For until it's either worked around from OpenSubdiv side or fixed
in the driver we'll force disable GLSL Compute for AMD hardware.
2015-08-26 12:10:24 +02:00
bcc0d2fb1d OpenSubdiv: Fix/workaround bad shading on AMD devices
Uniform block data layout was different on CPU and GPU which caused wrong
data being used from shader.

In theory using layout(std140) is what we need to do, but for some reason
such layout specifier is being ignored. This is probably caused by the way
how we exploit extensions from older version of glsl.

For until we've upgraded our glsl pipeline used different approach which
is basically about removing unused fields form the struct manual in hope
that it'll keep memory layout consistent for both CPU and GPU.

This seems to work so far for both NVidia GTX580 and AMD FirePro W8000
here in the studio.
2015-08-26 12:07:38 +02:00
77ce7eb541 Revert "BGE: Fix T44557 GameLogic module memory leak."
This reverts commit cd24871706.
The commit re-introduced problems with starting the game engine
multiple times in the same run of Blender.
2015-08-26 11:13:50 +02:00
3699ab1843 Fix T45711: Color spill average algorithm broken
Thanks to @kevindietrich for finding the cause!
2015-08-26 18:38:55 +10:00
df9f4c2e4f OpenSubdiv: Add extra checks whether GPU compute available or not 2015-08-26 09:16:35 +02:00
207c360900 Fix T45793: ChromaMatte incorrect output
Port to new node system missed important step.
2015-08-26 16:49:34 +10:00
1d34f0feed Smooth-view: Ignored camera-viewpoint on exit to user-view 2015-08-26 15:13:19 +10:00
cc60f35a18 Delete could assign a temp screen 2015-08-26 14:14:50 +10:00
0b21657897 Fix T45369: Temp screen locks UI
It was possible to navigate into an unused temp screen
(using Ctrl+Arrow keys), but there was no way to navigate back out.

Now Ctrl+Arrows skips temp screens, and remove the ability to navigate away from a temp screen from RNA.
2015-08-26 14:04:03 +10:00
67970da107 Disallow navigating away from a full-temp screen 2015-08-26 13:51:41 +10:00
acb99cfd7b Return success when a screen was added/removed
Currently unused, but useful for screen-operators.
2015-08-26 13:49:58 +10:00
3ee74feb2b Fix for deleting screen w/ temp screens in list
If the next screen to use was temporary, deleting the screen would fail.
2015-08-26 12:41:23 +10:00
e066a33314 Fix crash setting the screen when one is maximized 2015-08-26 11:27:13 +10:00
2e6cbd9bda Fix T45901: Smooth-view w/ bg-image glitch
It was possible to rotate the view while the view was already moving
causing background images to show when they shouldn't.
2015-08-26 10:15:20 +10:00
2f0eb2bfc6 Revert "Increase Smooth_View limit to 10.000"
This reverts commit 1ed1f2f3ab.

Waiting 10 seconds to change view isn't practical.
Further it expose issues where users can attempt to activate tools during view motion,
Some work, others give issues, this just isn't going to be properly supported.

View animation features are fine, but this isn't the purpose of the smooth-view option.
2015-08-26 09:53:58 +10:00
c62ebefcfc Usual i18n messages fixes. Also had to update i18n scripts to new BLT module... 2015-08-25 21:12:36 +02:00
a879dd368c FileBrowser: Fix broken 'extend' behavior of walk select mode.
Glitch when I merged new walk code in asset-experiments most likely...
Thanks to Dalai (dfelinto) who notified that on IRC.
2015-08-25 19:36:51 +02:00
7dc75ea8f4 Fix T45904: Cycles bug after recent triangle intersect changes
Calculated cross product from wrong vectors by accident.
2015-08-25 18:32:11 +02:00
Dalai Felinto
9e188fdd53 Fix walk navigation: scene unit used even when unit not set 2015-08-25 13:31:04 -03:00
ad0c2d6cbb Fix T45789: Materials with transparency not properly rendered in viewport in Material Render mode
This is a bit tricky one -- ideally viewport should detect whether alpha is used
in the shader tree and if so do separate viewport pass for that objects. But in
practice it's really tricky to detect whether alpha is affected by shader or not
without evaluating the tree for all possible input values. We also can't assume
that alpha might always be affected because it'll slow viewport drawing down.

For until some smart solution is found simply expose alpha blending mode used
by the viewport. It could be found below the Viewport Color settings.
2015-08-25 18:12:35 +02:00
79af9b1260 Action Management Feature Request/Regression T45535
By popular request, restored the ability to shift-click on the X (unlink) button
to unlink the action (from the active action slot), clear the Fake User, and
also remove the NLA-stashed copy (only works for the current object/NLA stack though).
2015-08-26 02:30:09 +12:00
27bdc1a984 Preemptive fix for search-buffer size issues
Forgot to increase the size of the string buffer in b88d8916e4
While this wouldn't have caused problems in most cases (since most modifier names
are short), in the rare event that a long modifier name exists, the buffer may have
ended up being truncated prematurely, causing the wrong FCurves to get matched.
2015-08-26 02:30:08 +12:00
f4b65577ff Fix T45776: Rotate around selected fails in texture-paint mode w/ armature
Only rotate around the active pose bone when in weight-paint mode too.
2015-08-25 23:32:55 +10:00
af9838accb OpenSubdiv: Fix/workaround shader compilation when going to GLSL mode 2015-08-25 15:34:34 +02:00
41ae6d7829 OpenSubdiv: Support multiple materials for GLSL view 2015-08-25 15:22:26 +02:00
669f2f0088 OpenSubdiv: Remove partitioned mesh interface
It's hopefully no longer needed, at least not needed for as long as
single ptex face corresponds to a single patch which should be always
correct for uniform subdivisions as far as i know.
2015-08-25 15:12:12 +02:00
f1e68474e0 OpenSubdiv: Support for multiple materials in solid shading mode
Implementation is less optimal compared to non-opensubdiv drawing but
it is now as good as we can do it without affecting on how patches are
being created by OpenSubdiv.
2015-08-25 15:11:56 +02:00
50917edad5 Fix T45853: Edge-slide UV-correct jitter 2015-08-25 22:57:03 +10:00
ba5807c271 BGE: added bge.logic.{get,set}AnimRecordFrame functions
By using getAnimRecordFrame(), game developers have access to the frame
number used by the "Record animation" feature. This enables them to
record additional information in Blender's F-Curves and ensuring perfect
synchronization with the information already recorded by Blender.

The setAnimRecordFrame() can be used to change the frame number at which
animations are recorded, for example to introduce delays the recording that
do not require delays in the actual game/simulation run.

The getter/setter functions in KX_KetsjiEngine are not directly named after
property they access (m_currentFrame). I found "current frame" to be too
vague for a public interface, hence chose a more descriptive name.

Reviewers: moguri, hg1, campbellbarton, panzergame, aligorith

Reviewed By: panzergame, aligorith

Differential Revision: https://developer.blender.org/D1449
2015-08-25 13:42:09 +02:00
6f7eb623d3 Avoid include header from previous commit when building without OpenSubdiv 2015-08-25 13:24:02 +02:00
3db3145c33 OpenSubdiv: Make it more obvious that None compute type actually disables OpenSubdiv 2015-08-25 13:23:06 +02:00
0d33d30cc6 OpenSubdiv: Fill in some missing drawing callbacks of CCGDM 2015-08-25 13:16:55 +02:00
5cf519ac51 OpenSubdiv: Better approximation of vertex normals
Use vertex varying data which gives better approximation of normals.
Still not ideal but should be closer for higher poly meshes to correct
normal.

The only way to have proper smooth normals seems to be to implement
patch evaluation in tessellation shader, but that's a bit PITA with
current GLSL usage in our draw code.
2015-08-25 13:16:55 +02:00
51d969c6a9 Fix T45891: Crash generating previews 2015-08-25 18:34:44 +10:00
c6d7562896 Fix T45729: Cycles Bake break when building a special mesh
The issue was caused by CD_SHAPEKEY_INDEX layer being added to edge data,
now we make sure all the layers are nicely re-allocated.
2015-08-25 10:30:46 +02:00
540f9a3b11 Quiet warning with arg types 2015-08-25 17:27:18 +10:00
a7dd20983a Fix T45814: Writing MP4, h.264 not supported 2015-08-25 08:51:04 +10:00
1080a7d5e1 Cleanup: style 2015-08-25 08:50:53 +10:00
7d516f11f7 Fix for previous commit
uint is only used in Cycles, Blender is not really ready for this.

Pointed out by Thomas Szepe, thanks!
2015-08-24 23:11:45 +02:00
c5018c65b9 BLI_fileops: Some fixes and cleanup.
* Fix BLI_file_touch, used to add one dummy byte ((unsigned char)EOF) to empty files!
* Get rid of static global temp string in WIN32 area (very bad, and useless!).
* Get rid of paranoid NULL checks in WIN32's BLI_gzopen().
* Add non-relative filename asserts to WIN32 file operations too.
* ifdef-out BLI_move and BLI_create_symlink, unused (and the later is not even implemented for windows).

Partly based on patch and points raised by Jason Wilkins (jwilkins) in T32870, thanks!
2015-08-24 22:14:38 +02:00
e8a0478c63 Fix T45833: Light group instances are not rendered in the 3D viewport
The issue was introduced in c9ac51e by trying to use original's objects layers
for light visibility check instead of using duplicator's layers.
2015-08-24 22:02:41 +02:00
2fb639deed Fix T45778: Objects scaled to 0 cause black artifacts with Static BVH
The issue was caused by some numeric instability in triangle intersection which
was visible on avx2 CPUs and GPUs (at least sm_20 here) but maybe some others
too.

Committing rather a workaround for now to be safe for the release, still need
some investigation.

From tests with grass field from Gooseberry project didn't see measurable
slowdown.
2015-08-24 21:23:49 +02:00
3633499f4e Fix T45737: Vertex colors show washed-out
Blender-Internal and GLSL-nodes missed converting sRGB to linear color.
2015-08-25 01:02:28 +10:00
46d275b626 Fix DM_get_loop_array, was checking edge-data
Fixes T45728
2015-08-25 00:47:27 +10:00
68a9328a58 Fix T45084 correcting bending_damping for cloth stiffness, by Martin Norris. 2015-08-24 14:09:01 +02:00
70b7dc993e Fix T45823: PSD files save as JPG without warning
Don't allow image save (which overwrites without asking),
unless the input format can be written to.
2015-08-24 21:34:49 +10:00
aac6ee6b87 Fix T45885: Cycles coordinate extension modes not working as expected
Fix T45769: Image Texture Node clipping bug

Simple mistakes in the normalized/pixel-space coordinates handling.

Render tests for this feature are coming.
2015-08-24 10:40:37 +02:00
8cc8ce3d46 Fix some issues from lates coverity scan.
Unlikely, but still valid.
2015-08-24 09:59:50 +02:00
8031f36261 Tests: Ignore preview render script in module loading tests 2015-08-24 09:46:41 +02:00
2960630b7b Cycles: Use better policy for primitive array resize for spatial split
Gives around 50% of spatial split BVH build speedup with grass field from
cassette player shot from Gooseberry.
2015-08-24 09:46:41 +02:00
7be6dba091 Cycles: Implement reseve() for aligned array class
The title says it all actually, just support reserving memory in the array class.
2015-08-24 09:46:40 +02:00
2230130099 Cycles: Speedup of Spatial BVH split code
Avoid memmove() happening on every insert of duplicated node to the references
list. Temporary pre-allocated vector is used for new references which is then
being inserted into actual array in one go later.

Gives around 4x speedup building spatially split BVH for the grass field in the
cassette player shot from Gooseberry.
2015-08-24 09:46:40 +02:00
334208e670 Cycles: Implementation of object reference nodes spatial split
This commit implements object reference node spatial split making it possible
to use spatial split for top-level BVH.

The code is not in use yet because enabling spatial split on top level BVH is
not coming for free and it needs to be investigated if it's worth in terms of
improved render times.
2015-08-24 09:46:40 +02:00
c88c5db360 Cycles: Make primitive split code easier for re-use by reference splitting function 2015-08-24 09:46:40 +02:00
99c1870ad5 Cycles: Move primitive splitting into own functions
This way it's easy to add more reference types allowed for splitting to the
BVH reference split function without making this function too much big. This
way it's possible to experiment with such features as splitting object instance
references.

So far should not be any functional changes.
2015-08-24 09:46:40 +02:00
9b57d70f3b Cycles: BVH statistics print was missing for spatially split BVH tree 2015-08-24 09:46:40 +02:00
30067b499a Fix editmesh GLSL tangent drawing
The generic tangent calculation relied on CDDM arrays which aren't available in edit-mode.

Add a tangent calculation callback, which has its own implementation for editmesh data.
2015-08-24 15:20:23 +10:00
4f61de6588 Fix T45884: Crash copying keyframes
BLI_str_quoted_substrN could crash if the prefix wasn't found
2015-08-24 09:29:00 +10:00
231ee60ab5 mathutils.BVHTree: support overlap self-intersect
Use same logic as BKE_bmbvh_overlap
2015-08-24 08:23:24 +10:00
8a623b066e BVHTree.FromBMesh() missed epsilon arg 2015-08-24 08:23:24 +10:00
2ee0187ed2 Fix T45882: Sudden shutdown if the filebrowser is part of the area layout.
There is no guarantee in sfile's listener that FileList has already been created...
2015-08-23 20:27:59 +02:00
25bb5cb30c Fix T45860, missing extension in GLSL after recent own fix. 2015-08-23 18:20:08 +03:00
8444f7ba2b BGE: Fix T42679: Python physics environment not setted for python control script. 2015-08-23 14:34:04 +02:00
2672ee77a0 Cleanup: spelling/style 2015-08-23 21:12:48 +10:00
83e16a4a87 This commit makes it possible to select the sort mode whenever we invoke an operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).

Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)

Reviewers: mont29

Reviewed By: mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1476
2015-08-23 12:40:21 +02:00
b88d8916e4 Fix T45633 - Animated modifiers don't update in new depsgraph
* Resolved some todo's where FModifier paths were getting identified using the
  wrong pattern.
* Added the missing animation -> modifier link. The "hacky" part here is just
  to do with how we check if that link is needed; the link though should exist
  in the graph.
2015-08-23 22:23:25 +12:00
e7775833a7 Math Lib: Use same logic for 2d/3d functions
dist_squared_to_line_v2, dist_to_line_v2
2015-08-23 19:10:37 +10:00
0cb23fafe7 Math Lib: minor optimization interp_weights_poly 2015-08-23 17:07:35 +10:00
58c9a0b11a Cleanup: spelling 2015-08-22 21:17:32 +10:00
c1c07b68b8 Use epsilon for line-intersect collinear test
Also remove 2x vector normalize since other parts of the code already check this.

Fixes T45849
2015-08-22 21:12:46 +10:00
6c8db9fd5f FileBrowser: Tweak display of size/time of entries.
We have no size for blenlib entries, nor do we have time for those and 'parent' entry.

Thanks to Sergey for notifying this on IRC.
2015-08-22 11:02:12 +02:00
86690915f1 outliner: tweak GPLayer color button overlap 2015-08-22 16:49:58 +10:00
a22f3cccec Fix outliner grease pencil color button 2015-08-22 16:49:57 +10:00
4d146bdf13 Fix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs
This commit makes some tweaks that make it at least possible to use lib-linked
actions as Pose Libraries. Specifically:
* The apply poses button is no longer greyed out

* It is possible to select different poses from the list of poses

* All pose library operators which edit the poses stored in the poselib
  now have improved poll callbacks which perform extra checks for lib-linked
  actions (which cannot be edited, as all those changes will be lost)


Caveats:
* Due to the way the UI list template works, it doesn't seem to be possible to
  make it not grey out the items in the list. (While the double-click to rename
  thing shouldn't be allowed, items should at least look like they can be clicked on)

* The difference between clickable vs not-clickable isn't too great, making it hard
  to tell that that while the Add/Remove/Sanitise toggles are not usable,
  the Apply Poses is actually functional. But, this is a more of a  UI-toolbox
  level issue
2015-08-22 18:16:55 +12:00
79e3a27c7a Typo fix 2015-08-22 16:53:58 +12:00
24e56d4c39 BGE: Fix constraint free crash in RemoveConstraint.
Fix silly error getRigidBodyA() instead of getRigidBodyB()
2015-08-21 22:17:35 +02:00
7d0b29be69 Fix T45658: linked library object loses particle settings.
Simply make ParticleSettings datablock linkable, see absolutely no reason why those
were the only 'real data' ID type not linkable so far...
2015-08-21 18:31:23 +02:00
94c8f5a447 Anim Editors: All keyframe selection operators now perform undo pushes
This brings them into line with other editing tools (e.g. object/mesh selection),
and should help fix bugs like T45374 and T45846
2015-08-22 02:48:02 +12:00
b617dec065 Fix T45864: Wrong NLA Control Curves keyed when using the Graph Editor sliders
This commit simplifies the logic for finding the control curves for NLA strips,
thus eliminating a whole bunch of weird errors that were happening here. It should
also fix a number of other related issues here.
2015-08-22 02:48:01 +12:00
09b7ec1864 Fix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of strip through RNA. 2015-08-21 16:18:20 +02:00
59e166c568 BVH-raycast: Use watertight intersections
By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.

Fixes T45286
2015-08-21 17:48:33 +10:00
71919efd78 Math Lib: watertight intersection function
From Cycles with some very minor differences.
2015-08-21 17:45:04 +10:00
7e3781179e Math Lib: Add float/int conversion functions 2015-08-21 17:42:40 +10:00
c727fc59ab BVH-raycast: ensure input direction is unit-length
This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.
2015-08-21 17:09:18 +10:00
a98b02ff94 Fix uninitialized var use 2015-08-21 14:46:30 +10:00
aa746677cf Docs: correct some comments 2015-08-21 09:07:52 +10:00
10edaff5c1 Fix ATI part of T45708, crash when enabling opensubdiv.
In fact exit was getting called because we
had an error in shader compilation:

Uniform buffer objects are in fact required.

Since it looks like original intent was to
write the shader against older GLSL version,
I will be adding an extension here instead
of a version.

Thanks to Anshu Arya for letting me borrow his machine through
VPN to do the debugging :)
2015-08-20 16:23:33 +03:00
3fd89df6e7 Fix T45491 not all GPUs support those extensions, use check for
opensubdiv to enable.
2015-08-20 16:05:24 +03:00
f9791155e4 Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-positive assert). 2015-08-20 12:45:20 +02:00
cd24871706 BGE: Fix T44557 GameLogic module memory leak.
This reverts commit 7a28ca4398.
2015-08-20 12:06:54 +02:00
f4d8ce9781 Fix T43654: Radial distance for force fields was computed using the vec_to_point
vector, which already has the radial component removed.
2015-08-20 11:58:11 +02:00
3ec9ff16f8 Resolve MSVC/OpenMP compat issue 2015-08-20 19:37:14 +10:00
179a2e1b98 Use BVH-overlap for mesh self-intersection display
Add BKE_bmbvh_overlap, remove BKE_bmbvh_find_face_segment
2015-08-20 19:13:14 +10:00
66365589ff Hopefully fix mingw building after filebrowser rewrite.
The mystery here is, how MSVC could not break on such error? :(
2015-08-20 10:15:08 +02:00
176b806626 BVH-overlap: add callback to BLI_bvhtree_overlap
The callback checks if 2 nodes intersect (not just their AABB).

Advantages:
- theres no need to allocate overlaps which are later ignored.
- expensive intersection tests will run multi-threaded.

Currently only used for Python API.
2015-08-20 17:52:26 +10:00
67e32b3195 Fix T45514 crash entering texpaint mode.
In the file of the report, stencil and clone indices
have fallen out of synch with the uv/mtexpoly layers.

Looks like the file has a long history, coming from 2.49
even. Unfortunately reporter cannot recall exact steps
to reproduce, so "fix" is to patch mesh.validate to
fix those indices.
2015-08-20 10:35:14 +03:00
e9f432f73c BVH-overlap: use stack for overlap data array
This is known to be <32, so no need to malloc every item.
2015-08-20 16:31:05 +10:00
6b53b4afb9 Avoid redundant normal calculation in heat-weight 2015-08-20 15:09:25 +10:00
a2c9d87a99 Cleanup: de-duplicate ray-cast initialization 2015-08-20 13:25:21 +10:00
a6457f283e Cleanup: comment out isect_ray_tri_threshold_v3
Also define epsilon var for ray-cast functions.
2015-08-20 12:50:39 +10:00
5b6deea647 Transform: Use BVH for volume-snap (optimization)
Was performing ray-tri intersection checks on all faces.

Note, this isn't using isect_ray_tri_threshold_v3
which was used to prevent ray-casts slipping through between faces.

Instead we'll move to using watertight intersections by default.
2015-08-20 12:22:54 +10:00
023b1a3843 Cleanup: remove unused BVH_ONQUAD flag 2015-08-20 11:03:34 +10:00
4224d22039 Fix drawing subsurf & auto-smooth
Error caused by recent MFace removal from subsurf.
2015-08-20 09:20:41 +10:00
a64819b735 Cleanup: unused vars 2015-08-20 09:20:11 +10:00
6c0cdda8e1 Cleanup: whitespace 2015-08-20 08:51:50 +10:00
5c3b95e1a8 FileBrowser: Fix some minor issue with fileentries creation.
An entry could already exist in misc cache, when creating it for block cache, leading to double-creation.
Issue was not that serious (no memleak or so), but nasty still. Thanks to Severin for notifying the assert.
2015-08-20 00:51:21 +02:00
c11222e31a Fix 32bit builds... :/ 2015-08-19 23:54:49 +02:00
f69e9681fa Final 'FileBrowser First Stage' merge.
It basically rewrites most of filelist.c, with some more limited changes in other areas of filebrowser.

From user perspective, it:
* Removes some info in 'long' drawing mode (owner, permissions) - OS-specific data that do not really matter in Blender!
* Makes short/long display 'fixed' size (among four choices, like thumbnails mode).
* Allows to list several layers of dirtree at once, in a flat way (inside .blend files and/or real directories).
* Consequently, adds datablocks types filtering.
* Uses way less RAM when listing big directories, especially in thumbnail mode (we are talking of several hundred of MiB spared).
* Generates thumbnails way faster.

From code perspective, it:
* Is ready for asset engine needs (on data structure level in filebrowser's listing).
* Simplifies and makes 'generic' file listing much lighter.
* Separates file listing in three different aspects:
** 'generic' filelisting (in BLI), which becomes a shallow wrapper around stat struct.
** 'filebrowser drawing' filelisting, which only contains current visible subset of the whole list (sliding window), with extra drawing data (strings for size, date/time, preview, etc.).
** 'asset-ready' filelisting, which is used for operations common to 'basic' filehandling and future asset-related one.
* Uses uuid's to handle file selection/state in the browser, instead of using flags in filelisting items.
* Uses much lighter BLI_task handling for previews, instead of heavy 'job' system (using the new 'notifier' timer to handle UI refresh, in similar way to jobs).
* Moves .blend datablocks preview handling to IMB_thumbnail (necessary to avoid storing all datablock previews at once, and gives better consistency and performances too).

Revision: https://developer.blender.org/D1316

Thanks to Campbell & Sergey for the reviews. :)
2015-08-19 22:41:39 +02:00
Julian Eisel
5c659574e6 Fix T45847: Pie looses focus when mouse cursor passes through a pie button 2015-08-19 20:53:16 +02:00
5668fc0938 More BLT/Windows fixes... :/ 2015-08-19 11:01:52 +02:00
314e40b6ce Hopefully fix broken windows after recent i18n split.
We need to include BLI_utildefines.h when using __func__...
2015-08-19 10:10:29 +02:00
a3b151f341 Fix for accessing looptri's from subsurf
Use poly count since tessfaces may be zero
2015-08-19 17:26:32 +10:00
Dalai Felinto
bb479704d0 Multi-View: fix Multi-View camera suffix test
If we had ambiguity in the SceneRenderView > Suffix matching test, the
first match would be used. And this would happen everytime a
SceneRenderView had an empty camera suffix.

We now take the longest matching suffix instead.
2015-08-19 03:41:02 -03:00
cd8581af8e Fix T45706: Axis aligned tri-tri intersection 2015-08-19 12:20:39 +10:00
7c352ed43a Cleanup: style + doxy 2015-08-19 08:49:12 +10:00
6a5303ab43 Fix error in recent library API updates 2015-08-19 08:49:12 +10:00
1ed1f2f3ab Increase Smooth_View limit to 10.000
Request from @zuggamasta: For turntable like view rotations a very slow and smooth turn is needed. This is now possible with the new limit.
2015-08-18 20:41:21 +02:00
a67a51ed55 IMB_thumb: Allow blen-handling func to also load datablock previews from .blend file.
Notes:
* Not yet used, this is the last piece of 'side changes' before the big filebrowser commit.
* We can probably be more effective here (like e.g. reading and storing all previews for a given
  group in thumbnails cache at once, instead of re-opening and parsing the whole file each time),
  but will do this later.
2015-08-18 14:32:13 +02:00
2735f6fda6 Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.
This new func will be fully used by upcomming code (it mostly adds
the extraction of library item name as well as library file and ID group).
2015-08-18 13:18:50 +02:00
d85e94da07 IMB_thumb: add thread locking API.
General idea is that, if several threads are handling thumbnails at the same time,
they can end working on the same file at some point, which will generate conflict.

To avoid this, threads can now lock a given filepath.

Note that locking data is allocated on a ref-count basis, to avoid keeping the GSet
in memory when not needed. Also, we are using global LOCK_IMAGE mutex for now.

Needed for upcomming filebrowser rework.
2015-08-18 12:39:45 +02:00
81afa2953c BGE: Fix mesh not registered in scene libload. 2015-08-18 12:24:38 +02:00
3a8e73943e Fix T45824: Pie's no longer show enum icons 2015-08-18 19:18:16 +10:00
1190da3ad9 UI: avoid property lookup w/ expanded enums 2015-08-18 19:04:06 +10:00
92fe4e52fd system-info.txt was quoting ffmpeg lib names 2015-08-18 16:09:51 +10:00
6cee6607a2 UI: avoid subtracting shadow from winrct
For popup interactions we need to know if events are in the region or not,
however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup.

Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.
2015-08-18 14:16:58 +10:00
a08f8a4708 Readfile: more efficient OldNewMap lookups
Even when lasthit can't be used to find the next address,
use it as a starting point for the full array search.
Gives approx 1/3 less array searching in own tests.
2015-08-18 11:39:23 +10:00
ac62d44e4f Docs: function comments 2015-08-18 07:11:55 +10:00
2e2dc9b9e3 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`.
2015-08-18 07:01:26 +10:00
3047b96eaa Lattice min_max: add a version of the func using lattice's final DispList,
and use it for bbox computing.

Revision: https://developer.blender.org/D1462
2015-08-17 17:02:22 +02:00
ad43262fdb BGE: Fix T45817 Convert curve object in group instance.
Now group instance conversion allow unconverted object like curve, meta ball ect…
2015-08-17 16:51:35 +02:00
cb7f7b9abd Subsurf: don't reserve MFace by default
Instead, the cache can be calculated only when its needed (fixes T45787).
2015-08-17 18:14:54 +10:00
6e65185854 Fix for Ghost/OSX w/ core profile 2015-08-17 16:17:22 +10:00
ce2d342df5 Fix T45802: View Lock w/ Curve-Parent fails 2015-08-17 14:58:03 +10:00
c58757006d Cleanup: remove unused Object.ipoflag 2015-08-17 14:24:47 +10:00
709a31da93 Simplify thumbnail blend parser
No need to convert the BHead code to an int, just compare the bytes.
2015-08-17 12:37:38 +10:00
0c420a2e49 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
tests).
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
adjustment.
2015-08-16 15:15:13 -04:00
9b43fce3c1 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.
2015-08-16 11:13:53 -04:00
493f9b9155 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: https://developer.blender.org/D1466
2015-08-16 14:34:45 +02:00
9437acb7f3 BGE: Fix memory leak and crash with certain physic types
Fixing crash if the physic type is set sensor or character. Caused by a790e172d0.
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.
2015-08-16 11:38:25 +02:00
Julian Eisel
19cc75d642 Fix T45807: Instant crash adding any modifier to NLA track
Caused by rBcbf936a3327282
2015-08-15 14:48:38 +02:00
Julian Eisel
119cda0a0d Cleanup: Avoid calling function twice
Own stupidness from rB17422124eca332
2015-08-14 22:23:06 +02:00
Julian Eisel
9b729adb6e Remove redundant workaround for T41548
Reverts 7a026971dc which isn't needed anymore after b347f523cececdf
2015-08-14 22:23:06 +02:00
Julian Eisel
d9a720a709 Fix T45750: Closing search menu by clicking root button doesn't work when clicking on lower half 2015-08-14 22:23:06 +02:00
fa86efdc97 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.
2015-08-14 15:51:27 -04:00
18648bef7b Fix dyntopo not warning anymore when vertex colors or uvs are present.
We check against loop data now, not tessface data
2015-08-14 17:11:31 +02:00
Julian Eisel
5fafd493c2 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
2015-08-14 15:54:58 +02:00
a662980f31 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.
2015-08-14 09:46:49 -04:00
d94137ee7d 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
2015-08-14 15:22:52 +02:00
8b286bf35a Cleanup: style 2015-08-14 17:46:26 +10:00
fdfd87f2f4 Docs: comment BHead.code values 2015-08-14 17:40:55 +10:00
3fa0a1a5bc 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").

Revision: https://developer.blender.org/D1460
2015-08-13 18:12:08 +02:00
d2383ec6c0 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.
2015-08-13 14:25:26 +02:00
828710d2ac 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!
2015-08-13 13:18:45 +02:00
c62eb919ec 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.
2015-08-13 12:45:13 +02:00
487d2cb4f3 Displace Modifier: add an option to displace along (averaged) custom normals, instead of vertex normals.
User suggestion/request from 'boby'.
2015-08-12 18:21:41 +02:00
883b420a51 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.
2015-08-12 16:43:41 +02:00
39ce0a9916 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.
Updated http://wiki.blender.org/index.php/Dev:2.5/Source/Modeling/Bevel
to explain algorithm used for maintaining UVs.
Updated the bevel_regression.blend tests in lib tests.
2015-08-12 10:18:58 -04:00
4eefba091d Fix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no more edges to draw). 2015-08-12 11:42:35 +02:00
8a2371e408 Usual UI message cleanup/fixes. 2015-08-11 22:29:16 +02:00
253ee0b490 install_deps: fix broken force/skip-osd options.
Bash scripts are such a PITA, having to redefine the options in three different places... :(
2015-08-11 22:08:01 +02:00
b36c6b9c47 BGE: Fix delete constraint for replicated physics controllers.
Replicated controllers didn't free constraints list before.
2015-08-11 21:49:54 +02:00
d22153425a Cycles: Enable some extra debug prints for OpenCL kernel loading 2015-08-11 18:03:54 +02:00
a790e172d0 BGE: Fix T38448: Bullet constraint memory leak. 2015-08-11 13:02:17 +02:00
10dbe966e1 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).
2015-08-11 12:11:48 +02:00
bccc6c393c BGE: Fix T33187 constraints replication for libloaded objects.
Reviewers: Moguri
2015-08-11 11:30:23 +02:00
c1506454ec UI drag&drop: make code able to free dragpoin if needed.
Only for image and strings for now. Needed for incomming filebrowser work.
2015-08-10 18:01:11 +02:00
8d37aaeca1 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, ...).
2015-08-10 17:45:16 +02:00
8f837e0ac5 BGE: Fix T33564: UI obstacle panel disable for character and no collision objects. 2015-08-10 17:32:09 +02:00
7b467a6fea Cycles: Fix for typo in previous commit 2015-08-10 17:24:14 +02:00
3c77822f96 BGE: Fix T19377 restore dynamics after unparenting object.
Reviewers: scorpion81
2015-08-10 17:08:11 +02:00
0c82ba4213 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. ;)
2015-08-10 15:41:28 +02:00
d70ffd375f 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.
2015-08-10 15:03:31 +02:00
c6d13716c1 Install_deps: add basic listing of needed dependencies to error message for unsupported distro. 2015-08-10 13:09:57 +02:00
65c3207517 BGE: Fix T44782 suspend/restore dynamics on inactive object. 2015-08-09 19:17:24 +02:00
49f3998a0f 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).
2015-08-09 15:58:53 +02:00
64dc38f089 install_deps: Add libxcursor packages, seems to be needed now? 2015-08-09 15:42:27 +02:00
ded665a2c9 Compile fix cycles network. This code is crusty and not super
functional. But is should compile.
2015-08-09 15:31:32 +02:00
Dalai Felinto
63265fd0c3 Cycles: Follow up on cc0bbc28 (Collapse multiview panel) 2015-08-09 00:25:34 -03:00
d9fc9882dc 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.
2015-08-08 22:17:03 +02:00
cc0bbc28e2 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.
2015-08-08 20:55:51 +02:00
f4ba4c6826 Fix for SeqCache hash ignoring multi-view
Thanks to @chadf for finding
2015-08-09 13:53:36 +10:00
115c867190 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).
2015-08-09 13:12:21 +10:00
281f4eb964 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.
2015-08-08 19:54:20 +02:00
Dalai Felinto
e1cea53066 Fix T45705: Selected to Active Cycles Baking no longer working 2015-08-08 14:40:41 -03:00
a9f6b27281 Use polygon normals for baking 2015-08-09 11:05:25 +10:00
e229d66e99 Fix crash baking in cycles
Error in recent move to looptri
2015-08-09 08:29:23 +10:00
dbdc55ab6a Support building OpenSubdiv libraries under Debian (Ubuntu) with our build_deps.sh 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: https://developer.blender.org/D1452
2015-08-08 14:12:02 +02:00
Julian Eisel
fef31aadc4 Remove leftover from sticky keys 2015-08-08 02:37:03 +02:00
8af8bab0c5 Fix T45726: Wrong handling of 'failed to generate' audio waveform data in VSE strip draw code. 2015-08-07 23:42:32 +02:00
Dalai Felinto
e96e0ddbee Fix T45715: Blender crashes when creating Environment Map textures in Multi-View mode 2015-08-07 15:46:18 -03:00
Dalai Felinto
58133d4ab2 Fix T45721: Panoramic render in Cycles camera : depth of field issue with bump maps - patch by Brecht Van Lommel 2015-08-07 15:04:12 -03:00
96f20c34a2 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.
2015-08-07 16:35:39 +02:00
c677bd44ce 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.
2015-08-07 16:35:38 +02:00
930fc7d157 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!
2015-08-07 16:35:38 +02:00
c30c3fde51 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.
2015-08-07 16:16:23 +02:00
9becee445e Fix scrubbing only treated as animation for sequencer
Intent was to act as animation everywhere
2015-08-07 15:39:32 +02:00
Julian Eisel
20bd253809 Fix T45713: Numselect for confirm popup not working anymore 2015-08-07 14:39:50 +02:00
44384c698d BGe: Fix T45597 wrong object layer for linked object in blenderplayer. 2015-08-06 17:07:26 +02:00
f5a333fe65 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).
2015-08-07 02:46:38 +12:00
599d8291ad AnimEditors FModifiers toggle: Add a bit more space beside it so that it doesn't seem to collide with the mute toggle 2015-08-07 02:46:37 +12:00
579329388a 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.
2015-08-07 02:46:37 +12:00
0e80e3d20c No need to count layers to check empty 2015-08-07 00:00:28 +10:00
b9ce21fd0f 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.
2015-08-07 01:48:27 +12:00
376e729de0 T44932: Disable pressure handling for "poly" mode too 2015-08-07 01:48:27 +12:00
e660079e47 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.
2015-08-07 01:48:26 +12:00
c587302ea1 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.
2015-08-07 01:48:26 +12:00
03b2bccca8 Remove MFace use w/ fluidsim 2015-08-06 22:33:45 +10:00
8f45e1156f Docs: comment BKE_scene_set_background 2015-08-06 21:03:35 +10:00
2c5efd5b3f Fix typo in cmake when OpenSubdiv is not found 2015-08-06 11:51:18 +02:00
be1a684755 Fix T45695: Assigning material reverts MaterialSlot.link
Setting the material was resetting the link bit, this is OK from the UI,
confusing for scripts.
2015-08-06 18:07:44 +10:00
fa4172c28c 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
performance.

Probably Campbell has some nice ideas here as well :)
2015-08-06 09:49:13 +02:00
ced9381e20 Simplify defvert_remove_group(), use realloc
Patch by @chadf
2015-08-06 16:52:39 +10:00
c2cfec64e3 Cleanup: unused warning 2015-08-06 16:52:28 +10:00
43c756ac95 CMake: AUDASPACE_ROOT_DIR wasn't working 2015-08-06 13:03:07 +10:00
300f33a8ea Cleanup: style (match other find modules) 2015-08-06 13:03:07 +10:00
fdc8b12726 Cleanup: whitespace, unused var 2015-08-06 13:03:07 +10:00
5af7257309 Cleanup: whitespace 2015-08-06 13:03:07 +10:00
89edddb26c Fix T45691 crash on material view
Call glProgramUniform1i only when OpenSubdiv is requested and only when
the GPU supports it.
2015-08-06 01:09:07 +02:00
868d3605ee Fix T45693: Fix for using 4-component vector as 3 component in osd shader 2015-08-05 21:35:38 +02:00
4140312c36 OpenSubdiv: Make sure normals passed to OSD are all up to date
Solves shading artifacts with animated characters.
2015-08-05 19:19:05 +02:00
02f553cc7a 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
geometry.
2015-08-05 18:29:43 +02:00
9a995c11d3 OpenSubdiv: Initial OsdMesh construction missed clearing out-of-date coords flag 2015-08-05 16:07:32 +02:00
5fe5118845 Cleanup: unused warning 2015-08-05 23:50:22 +10:00
5e050918d8 Fix dereference before NULL check 2015-08-05 23:47:13 +10:00
11bfeb45ce 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.
2015-08-05 15:11:50 +02:00
6146fdc7b0 OpenSubdiv: Edit mode was not checking for Use OpenSubdiv flag 2015-08-05 14:51:08 +02:00
0208c95986 OpenSubdiv: Correction to previous commit 2015-08-05 14:46:27 +02:00
6cba20a8e6 OpenSubdiv: Tweaks to AABB calculation when using opensubdiv for subsurf
Use coarse coordinates to calculate AABB which gives much better approximation
of AABB than using unity AABB size.
2015-08-05 14:43:51 +02:00
5b76f72904 Mirror modifier: Fix for wrong dependency relations
Mirror modifier was reporting that it depends on geometry of the object
used for mirror center which is incorrect -- only object matrix is needed
for modifier evaluation.
2015-08-05 14:29:18 +02:00
8d179e3c1f OpenSubdiv: Resolve regression with unity AABB for CCGDM calculated on CPU 2015-08-05 14:20:40 +02:00
0ea45676d0 OpenSubdiv: Fix crash happening when disabling Use OpenSubdiv option
The issue was caused by the changes from this morning.
2015-08-05 14:15:46 +02:00
a474409f0b OpenSubdiv: Enable by default on the supported platforms
This commit makes sure Linux and Windows buildbots are using OpenSubdiv
and also enables OpenSubdiv by default on Windows.

OSX is kept disabled still, this is due to OpenGL restrictions which are
not solved in any way yet.

Linux is defaults to OpenSubdiv disabled because it needs precompiled
library.

The documentation could be found there:

  http://wiki.blender.org/index.php/User:Nazg-gul/OpenSubdiv
2015-08-05 13:29:39 +02:00
c54df2ad47 Remove files from recent-files list on failed open 2015-08-05 21:26:10 +10:00
cae25ff240 Fix T45647: Incorrect results w/ color spill node 2015-08-05 21:26:10 +10:00
d4a9da28e8 Doc fix: rather then -> rather than 2015-08-05 12:48:04 +02:00
7742926403 Only show interpolation buttons w/ bezier splines 2015-08-05 20:28:31 +10:00
7853cb3c5a Remove redundant addition in BKE_mesh_calc_volume 2015-08-05 20:26:52 +10:00
a7442bef59 Fix selecting linked edges 2015-08-05 20:24:27 +10:00
25f381a9b2 Fix T45641: crash cutting meta-strips 2015-08-05 20:18:57 +10:00
80c50a1d49 OpenSubdiv: Make subsurf behavior closer to original one when built with OpenSubdiv but without enabling option 2015-08-05 11:55:06 +02:00
b5c602c9c2 Buildbot config: disable gooseberry branch from nightly builds
There's no updates happening in the gooseberry branch, so no really reason
to waste time on rebuilding the branch overnight.
2015-08-05 11:45:52 +02:00
864c154a41 Buildbot config: remove windows scons and mingw builders
They are defunct at this moment, no reason to try scheduling builds on them.
2015-08-05 11:44:36 +02:00
Julian Eisel
d39e18853f Nodes: Link lines & link arrows not scaling to DPI/pixelsize correctly 2015-08-04 21:56:43 +02:00
c18e6fd87c Cycles: Remove 32bit cuda workaroudn and disable cubins for buildbot
Recent changes to kernel broke compilation of the kernels again, need some
other kind of solution for this issue.

Don't have much time for this currently, but will be addressed before the
release.

Meanwhile it's better to have some buildbot builds instead of totally failing
one.
2015-08-04 18:50:37 +02:00
8bd425188c OpenSubdiv: Preparation for enabling it for linux buildbot 2015-08-04 18:33:55 +02:00
687a321be3 OpenSubdiv: Modifiers module missed WITH_OPENSUBDIV define 2015-08-04 18:32:21 +02:00
ea40df582f OpenSubdiv: Fix for missing OpenMP device when building with SCons 2015-08-04 18:25:34 +02:00
16b619b77d OpenSubdiv: Correction for compute devices detection in SCons
SCons was still using file names from 2.x branch.
2015-08-04 18:18:21 +02:00
dfc672f8bb SCons: Fix for really nasty bug with polluting configuration environment
The issue was caused by the following construction:

  def = env['SOMETHING']
  defs.append('SOMETHING_MORE')

Since first assignment was actually referencing environment option it was totally
polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-08-04 18:06:28 +02:00
1fc32249f5 Fix fast navigate winding being incorrect (apparent when backface
culling was on)
2015-08-04 16:03:20 +02:00
Julian Eisel
4041e654cd Nodes: Make method to detect hovered link during transform more predictable/responsive
The old method:
The "old" method used the node dimensions to get a number of lines and checked if they intersect with the node link. Issue with this is that only a small part of the actual node surface is checked, making the method a bit unpredictable or unresponsive.

The new method:
The new method checks for intersections within the entire node surface. If multiple links are intersected, the node with the smallest distance from the *upper left corner* to the link is chosen.

Reviewed by @campbellbarton (tm)
2015-08-04 15:25:19 +02:00
07b525ffe2 Remove alloc checks in laplaciansmooth
These arrays aren't especially big or likely to fail.
2015-08-04 22:34:29 +10:00
4b6fba355c Remesh modifier has unnecessary MFace calculation 2015-08-04 22:11:43 +10:00
ae9ccec7c4 Missed from last commit 2015-08-04 22:08:21 +10:00
f1a9a8cbfd Remove MFace use w/ laplacian smooth
Use polygons for calculation
2015-08-04 21:58:35 +10:00
c1938eb127 OpenSubdiv: Report when OSD can't be enabled due to dependencies
Should be useful for debugging cases when enabling the option doesn't
cause any performance improvements.
2015-08-04 12:23:53 +02:00
b50916d172 OpenSubdiv: forgot this in the previous commit
Need to find better approach for dealing with shadeless materials.
2015-08-04 11:04:27 +02:00
abb976ae88 OpenSubdiv: Optimize drawing shader
The idea is to cut as much code as possible and use compile-time
ifdefs rather than runtime if() statements.

Gives about 2x speedup on catmark_car model from OpenSubdiv repository
making our FPS much closer to what glViewer is capable of.
2015-08-04 10:52:50 +02:00
cff288cf3a Use PyC_ParseBool to parse bools
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
2015-08-04 18:49:42 +10:00
62c8f46ab6 Docs: comment functions in BLI & Py API 2015-08-05 02:09:03 +10:00
Mateo de Mayo
23f54076db BGE: Added getActionName() function to KX_GameObject()
It works similar to getActionFrame(), you have to give a layer or not (for layer 0) as the argument and it returns the name of the animation that the object is currently playing.

Example:

```
import bge
own = bge.logic.getCurrentController().owner
own.playAction("SomeAction",0,20)
print(own.getActionName())
```
>> SomeAction

Here is an example file, just open the blend file with the terminal opened
and press P, you can see how the current animation is being printed:
{F217484}

Reviewers: moguri, hg1, panzergame, campbellbarton

Reviewed By: panzergame

Subscribers: campbellbarton, hg1, #game_engine

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1443
2015-08-04 00:10:33 +02:00
73522e1157 OpenSubdiv: Fix/workaround for missing generated coordinates in viewport
This actually requires some bigger work to make it fully supported but
for now at least avoid breaking shading with OpenSundiv option disabled.
2015-08-03 20:39:00 +02:00
0951ea2c6d OpenSubdiv: Support shadeless shading 2015-08-03 20:18:33 +02:00
c2dc6aa946 OpenSubdiv: Smooth shading became broken in recent commit 2015-08-03 19:47:40 +02:00
9b51a9e885 Sculpt: Fix tiling with brushes that use a locked plane
Patch by Tilman Blumhagen, thanks!
2015-08-03 19:41:34 +02:00
2411027a79 Multires sculpting drawing optimization:
Use OpenGL 3.2 extension ARB_draw_elements_base_vertex, which allows us
to add offset in index buffer indices automatically. This should reduce
the number of draw calls significantly.

We may have some errors on the Mac with VBO setting off.
OSX OpenGL extensions don't play well with vertex arrays.
Will test that more later.

We might also use a full element buffer here, like we do when hiding
some quads, but this approach keeps the memory savings intended
originally.
2015-08-03 19:09:21 +02:00
7667ad2d4e OpenSubdiv: Made it a modifier option to enable OSD for viewport
The idea of this commit is to make it so we can enable OpenSubdiv by default
for the release builds but keep it limited to the viewport only for a specific
meshes. This is a temporary solution for until all the needed features are
supported on the OpenSubdiv side.

Flag itself is done as a dedicated field in modifier DNA so we can easily
remove it in the future without ending up with some temporary flag hanging
around forever.
2015-08-03 17:51:18 +02:00
e90fea72c1 Fix T45654 fast navigate artifacts.
Was overdrawing the buffer, in case of fast drawing just use one
draw call. Should also make performance quite smoother.

Note:
Just discovered we are doing one draw call - per grid - in multires
apparently to keep reusing the same element buffer.
This is horribly, dreadfully slow and will check about fixing it later.
2015-08-03 17:47:03 +02:00
e5f7b0f330 OpenSubdiv: Avoid crashes when GPU subsurf is tried to be used on CPU
The issue was caused by CCG code being confused by number of geometry returned
by utility functions in the case of the skipped grids.

Made it so that code is always only working with CCG data and handled drawing
code in a bit special way now.

This solves such crashes as i.e. snapping.
2015-08-03 16:44:46 +02:00
4a0f3bece3 OpenSubdiv: Make new geometry relations ensures dependent data exists on CPU 2015-08-03 16:04:33 +02:00
7cfb05dcb0 OpenSubdiv: Resolve crashes when other object depends on subsurf-ed object
Cases like using subsurfed object as a boolean operand can't be evaluated
on GPU and needs to have all the CCG on CPU.

This commit resolves existing configuration to survive, but new configurations
would need to have some sort of forced object update so all the data is being
moved on CPU if it was previously on GPU.
2015-08-03 15:57:22 +02:00
b4e1b7b18c OpenSubdiv: Remove workaround for simple subdivision mode
This case is now supposed to be supported by OpenSubdiv.
2015-08-03 15:30:25 +02:00
b26eb47961 OpenSubdiv: Corrections to GLSL version
Was own mistake in the last minute fixes, now matcaps should
work just fine.
2015-08-03 15:27:42 +02:00
9036fa6b2e Fix buffer overrun lofting nurbs 2015-08-03 23:18:09 +10:00
1d549530d8 Fix own mistake in curve refactor 2015-08-03 23:06:03 +10:00
8d945bf3cb OpenSubdiv: More proper loop for UV map evaluation on CPU
This is just updating code from our side, actual evaluation is still
disabled because it doesn't support face farying data evaluation.
2015-08-03 14:50:31 +02:00
3a9897f8ce OpenSubdiv: Fix crash caused by applying subsurf on non-mesh object 2015-08-03 14:33:03 +02:00
3aa2dd74b5 OpenSubdiv: Correction to vert edge/face orientation code
non-manifold case didn't start ordering from the correct edge.
2015-08-03 14:27:34 +02:00
60c8cdf763 OpenSubdiv: Switch CPU evaluator to use uniform refinement
This way the result matches GPU viewport and becomes really close to out
legacy subsurf code.
2015-08-03 14:27:31 +02:00
4bf26fda97 OpenSubdiv: Mark non-manifold verts as sharp 2015-08-03 14:27:31 +02:00
11ad18c82a OpenSubdiv: Disable topology check happening from OpenSubdiv side
This check doesn't handle multiple non-manifolds cases which is rather
really annoying currently.
2015-08-03 14:27:31 +02:00
dd1e7f16ca OpenSubdiv: Work on better vert edge/face orientation code
Previous version of code didn't handle cases like hourglass connectivity
with loose edge. The new code is supposed to handle all this cases.
2015-08-03 14:27:31 +02:00
c2c4e02d41 Fix T45620: Coplanar faces w/ flipped normals not selected 2015-08-03 20:47:37 +10:00
1b8afac652 Cleanup: remove redundant normalize 2015-08-03 20:47:36 +10:00
Martijn Berger
230d93ad54 Fix bgl so that get-methods that take a string use strings instead of bgl buffer objects again 2015-08-03 12:20:08 +02:00
42d65ef5cc Add bool parser for PyArg_ParseTuple
Use for mathutils.bvhtree
2015-08-03 20:00:16 +10:00
0f690e2186 Fix T45625: Unpredictable grid fill
Detect when there are < 3 corners & automatically calculating the span isn't useful.
2015-08-03 17:44:50 +10:00
1dd4e933d8 Fix grid-fill offset option
Wasn't applied relative to the active vertex.
2015-08-03 16:14:22 +10:00
88d63905a8 Fix T45644: bpy.utils.smpte_from_frame drops frame
D1444 by @lichtwerk, with minor fix & docstring updates
2015-08-03 14:01:24 +10:00
00857bec52 Fix T45649: Adding Point Density Texture to World Color Crashes Blender.
Crash was caused by missing field in NodeShaderTexPointDensity.

Committed with @dingto blessings.
2015-08-02 23:46:38 +02:00
Julian Eisel
e896f4e77d Use auto-offset after adding node from search menu as well 2015-08-02 15:42:16 +02:00
93d1acfb5c correct ifdef 2015-08-02 23:36:42 +10:00
4cf92c4831 Aduaspace: fixing playback in the game engine. 2015-08-02 11:27:02 +02:00
559e1434d8 parenthisize macro args to avoid errors 2015-08-02 13:54:06 +10:00
a4f55617d1 Cleanup: quiet int overflow warnings 2015-08-02 12:53:12 +10:00
Julian Eisel
3b4a8f1cfa Fix VSE showing FPS during scrubbing
Was intended to be disabled in rBa3b86611a8182, but disabled 3D View FPS drawing instead of VSE drawing. Triple checked but 3D View doesn't draw FPS now, so everything seems fine now.

Note: To recreate this you had to play animation once before scrubbing.
2015-08-02 00:10:52 +02:00
Julian Eisel
2ec0d53034 Fix VSE not able to playback after scrubbing (and a couple of crashes)
After scrubbing, Blender kept thinking an animation is played (see animation "Play" button), even after mouse release. This resulted in a couple of crashes, e.g. by pressing Alt+a and then Esc.

(Also minor cleanup)
2015-08-01 23:59:39 +02:00
Julian Eisel
a3c5de3e3c Use Auto-offset for move_detach_links (alt+D) operator too 2015-08-01 21:01:14 +02:00
Julian Eisel
6098e48d0c Correction to previous commit, git messed up icon binaries :/ 2015-08-01 18:35:42 +02:00
Julian Eisel
47bc66fc8d Note Editor: Auto-offset nodes on insertion
Implements "Auto-offset" (called "insert offset" in code) feature for Node Editor, developed during and after LSOC :)
Idea and sponsoring by Sebastian König, blendFX, Mathias Eimann, Mikavaa, Knick Design

When you drop a node with at least one input and one output socket onto a an existing connection between two nodes, Auto-offset will, depending on the direction setting, automatically and animated move the left or right and all of its following nodes away to make room for the new node.
The direction for offsetting can be toggled while you are moving the node by pressing „T“.

The auto-offset is enabled by default but can be disabled in the header of the node-editor. The offset margin can be changed in the editing section of the User Preferences.

Thanks a lot to the sponsors, and especially to Sebastian who helped *a lot* with this. That's how users can help developing Blender!
2015-08-01 17:56:44 +02:00
Julian Eisel
31bf82c17d Node Editor: A bunch of new utility functions
Needed for node insert offset (Auto-offset in UI), but kept separate so people notice it without having to check insert offset commit (not for commit ratio of course ;) )
2015-08-01 17:23:32 +02:00
Julian Eisel
fa1945c9e5 Allow accessing modal keymap strings directly from keymap
Previously you had to pass operator which in some cases might not be available or hard to get.
2015-08-01 13:01:30 +02:00
2904007d31 Docs: Python API, minor edits to download link 2015-08-01 20:10:25 +10:00
e31f8e756f Fix T45582: Connect vertex hangs
With multiple branches it was possible the search could run for a long time,
especially when there was no possible path to the target.

Now use a heap to keep track of the best path and finish immediately once its reached.
2015-08-01 19:04:09 +10:00
0e9051fbfe BMesh connect pair, fallback to identity matrix
For overlapping vertices, a matrix for the operation can't be calculated.
2015-08-01 15:11:45 +10:00
d894fcb799 Replace checks for tessface w/ polygons
In these cases we're only checking the mesh has faces.
2015-08-01 14:42:14 +10:00
c851d1d045 Missed when updating effects to looptri 2015-08-01 14:37:20 +10:00
c4b2bef163 Remove MFace use w/ cloth 2015-08-01 14:13:59 +10:00
49f88326af Docs: doxy cleanup/minor edits 2015-08-01 12:37:52 +10:00
1c626f823d Complete fix for T45618
Two issues here, normal update was not happening due to own sillyness in
viewport refactor, also normal update code still used triangles.
Now reused Campbell's poly normal recalculation code.
2015-07-31 22:52:37 +02:00
Dalai Felinto
527ee3f1f1 Fix T45632: motion blur (2d filter) not working - in OSX at least
This regression was introduced in Blende 2.73a when we went through a
ghost context refactoring :(
2015-07-31 16:45:05 -03:00
03f00eb91d Docs: doxy corrections 2015-07-31 23:44:37 +10:00
12b7850d4f Cycles: Fix for transmissive microfacet sampling
This is an alternate fix for T40964 which resolves bad handling of
caustics reported in T45609.

There were too much transmission rays being discarded by the original
fix, which caused by caustic light being totally disabled. There is
still some room for investigation why exactly original paper didn't
work that well, could be caused by the way how the pdf is calculated.

In any case current results seems rather correct now.
2015-07-31 13:46:58 +02:00
55fead4767 Use polygon normals for sculpt drawing
Wasn't working correctly since using MLoopTri,
this is improved over 2.75 which only handled tris & quads.
2015-07-31 21:04:23 +10:00
31fe49626f Remove MFace use w/ softbody 2015-07-31 19:17:39 +10:00
63215aea6f Use looptri's for softbody face collision 2015-07-31 19:01:51 +10:00
70f8b5b1ff Don't calculate tessface before sculpting 2015-07-31 16:19:58 +10:00
7575dbaf2a Docs: MLoopTri info and example usage 2015-07-31 15:41:07 +10:00
c582e186d9 Replace MFace w/ vert-tri's for collision modifier
Note that the collision modifier doesn't have any use for Loop indices,
so to avoid duplicating the loop array too,
MVertTri has been added which simply stores vertex indices (runtime only).
2015-07-31 14:00:07 +10:00
6b7313be94 Don't initialize CDDM with MFace from Meshes
Caused crash because MFace is no longer a layer which is added unless requested,
causing CDDM to have numTessFaceData nonzero, but mface set to NULL.
2015-07-31 11:57:50 +10:00
4d4c3b36a7 Cleanup: Remove unused variable in PathState. 2015-07-30 21:07:37 +02:00
2ec00ea0c1 Move tangents and baking to looptris:
Notes:

* Code in rendering and in game engine will still convert
tangents to a tessface representation. Added code that
takes care of tangent layer only, might be removed
when BGE and rendering goes full mlooptri mode.

* Baking should work discovered some dead code while
I was working on the patch, also tangents are broken
when baking from multires (also in master), but those
are separate issues that can be fixed later.

This should fix T45491 as well
2015-07-30 14:43:58 +02:00
9d335d29c7 CustomData: quiet error on 0 element copy 2015-07-30 22:14:59 +10:00
2ae67de944 Fix T45577 tiled sculpting not working with brushes requiring a sculpt
plane.

Make sure sculpt plane is recalculated for every tiled dab.

Note this is not the optimum thing to do, we could cache the original
sculpt plane and reuse that, but this would require us to rearrange the
logic of tiled sculpting somewhat. This can be a TODO, but for now this
will fix the issue.
2015-07-30 14:10:54 +02:00
820d191626 OpenSubdiv: Add CMake option to enable -Werror in subsurf code 2015-07-30 10:31:22 +02:00
5c7cdfcb42 OpenSubdiv: Remove debug-only leftover 2015-07-30 10:22:31 +02:00
7b8230898e Cleanup: safe-free macro for collision modifier 2015-07-30 15:44:03 +10:00
5fabcd099b Use looptri for smoke bvhtree
Missed from D1424
2015-07-30 14:52:55 +10:00
75e387d6c5 error reordering args 2015-07-30 09:58:00 +10:00
4737b12462 Cycles: Fix issue in closure merge function.
* Did not check data2, this partially fixes T45583.
* Initialize data2 in some closures to avoid potential problems.

Differential Revision: https://developer.blender.org/D1436
2015-07-29 22:04:36 +02:00
d49703b298 Fix SCons path issue on Windows. 2015-07-29 21:48:24 +02:00
7380166db2 OpenSubdiv: Workaround for vertices which are adjacent to several manifold islands 2015-07-29 18:41:05 +02:00
26c1ae81be OpenSubdiv: Proper detection of crease changes 2015-07-29 18:05:29 +02:00
48c2f7b288 OpenSubdiv: Some debug-only code sneaked into previous commit 2015-07-29 17:43:43 +02:00
51c1927ccb OpenSubdiv: Make topology orientation optional 2015-07-29 17:41:57 +02:00
717a303a18 OpenSubdiv: Fixes for crease in non-manifold meshes
Basically non-manifold edges are expected to be sharp by OpenSubdiv.

There\s still some work required, see the inlined comment.
2015-07-29 17:38:06 +02:00
ce5e62b78a OpenSubdiv: Typo fixes in comments 2015-07-29 17:13:15 +02:00
b8e2b8ae8a OpenSubdiv: Rework vert-edge and vert-face ordering
Now the code survives multiple non-manifolds happening on the vert.

Still not totally optimal but at least gives much better mesh support.
2015-07-29 17:13:15 +02:00
af6bbab5b4 OpenSubdiv: Fix for weirdly ordered lines 2015-07-29 17:13:15 +02:00
becf20e29f Fix T45605 crash with editmode selection on solidify modifier.
Looks like derivedmesh draw code always assumed a mesh is available.
Make sure that if we use a bmesh, a flag is used to control that.
2015-07-29 16:22:01 +02:00
30679179dd Audaspace: fixes for building with Quicktime on Mac. 2015-07-29 16:13:22 +02:00
a3b86611a8 Do not show fps while scrubbing. 2015-07-29 15:15:55 +02:00
cbf936a332 Gooseberry animation feature: Add toggle that disables modifiers on fcurves.
Feature is found as per channel option in graph editor.
2015-07-29 14:56:03 +02:00
ce1bc1838b Clean channels tool for Hwoozeberry.
Basically it's a clean keyframes tool, but also removes a channel if the
only remaining keyframe has the default value only and is not used by
drivers or generative modifiers.

It's was used to help with performance of keyframe-heavy scenes in
gooseberry.

Note, as always the curve left after the clean tool is used is not the
same as the original, so this tool is better used before doing custom
editing of fcurves and after initial keyframe insertion, to get rid
of any unwanted keyframes inserted while doing mass keyframe insertion
(by selecting all bones and pressing I for instance)
2015-07-29 14:45:50 +02:00
18af73e461 Add mathutils.bvhtree API
Originally D966 by @lukastoenne, with own additions

- trees can be initialized from Object's, BMesh,
  or passed in as vert+polygon arrays.
- original indices of ngons/faces are used. (instead of tessellated indices).
- ray_cast, find_nearest methods
- find overlapping faces between 2 trees
2015-07-29 21:24:12 +10:00
ba32d9d4cd Expose bvhtree_sphereray_tri_intersection for general use 2015-07-29 21:22:28 +10:00
8e9534a850 OpenSubdiv: Make empty meshes supported and not crashing 2015-07-29 13:10:19 +02:00
8b84c5f9de Port optimization from gooseberry branch:
Treat scrubbing as animation.

This is checked during various updates to avoid
some costly calculations.
2015-07-29 12:52:03 +02:00
18c0a15e1e Cleanup 2015-07-29 20:18:22 +10:00
90655d06d4 Math Lib: add isect_tri_tri_epsilon_v3 function 2015-07-29 20:11:54 +10:00
792d66527b Remove not really helpful debug print
If it's still considered useful please move it inside G.debug or ifdef code.
2015-07-29 12:01:41 +02:00
d4b5dd31a3 ImBuf: Fixes for openexr images
- Fixed crash loading multilayer EXR
- Fixed another memory leak loading multilayer EXR
2015-07-29 11:59:29 +02:00
32157d8d01 Triangulate wasn't clearing arena after each use 2015-07-29 12:01:55 +10:00
339915a962 Optimize PySequence_Fast usage
Access arrays directly, avoiding type-check every time.
2015-07-29 10:49:35 +10:00
96f08bf9a8 Fix leaks in mathutils PySequence_Fast usage 2015-07-29 10:49:35 +10:00
376e4c945e Fix leak in BPy_BMElem_PySeq_As_Array
Also add BPy_BMElem_PySeq_As_Array_FAST
2015-07-29 10:49:34 +10:00
d226a4ba6d Fix leak in PyC_AsArray
Would only happen when the list-length was an unexpected size.

Also add PyC_AsArray_FAST
2015-07-29 10:49:34 +10:00
31cb14f5de Cleanup: check exact error w/ mathutils functions 2015-07-29 10:49:34 +10:00
cff71fee21 Cleanup: style 2015-07-29 10:49:34 +10:00
Dalai Felinto
c6688aeddd Fix build with Quicktime after Audaspace update 2015-07-28 21:48:13 -03:00
335c3013f4 Sequencer: Disable Refresh Sequencer button while rendering
This code is not thread-safe and there's no easy way to synchronize
render and viewport threads for this operation, so for until we've
got some nicer solution we just disable dangerous buttons.
2015-07-28 18:28:35 +02:00
79a51f0839 cdderivedmesh: don't prepare a normal buffer when selecting, even
if we skip creating the selection color layer.
2015-07-28 18:24:21 +02:00
1e6e3dcbd7 Fix T45529: Texture Compositor node composition artifact (random pixels)
The issue was caused by the non-threaded texture API used by the node.
While the node itself is single threaded there might be texture nodes
in different execution groups running in parallel.
2015-07-28 17:56:04 +02:00
20c5c5e14b Audaspace: fixing a memory access violation in the audio device list. 2015-07-28 17:40:36 +02:00
a6b2650c7d Cycles: Correction to image extension type commits
Clipping wasn't working totally correct, need to check original coordinates,
not the integer ones,

Now CPU gives the same exact results for both SVM and OSL, CUDA is still doing
something crazy with edges.
2015-07-28 16:31:27 +02:00
971affb436 Fix T45590: Some more missing glsl functions
Also SSS node was using wrong Normal input index.
2015-07-28 15:57:14 +02:00
be047fe455 Audaspace: building without audaspace.
- Fixed building without for cmake.
- Scons can now build without audaspace too.
2015-07-28 14:53:06 +02:00
f29625922f Cycles: Expose Clip image extension type
This type causes pixels outside of 0..1 coordinate range to become transparent.
2015-07-28 14:39:53 +02:00
4690281b17 Cycles: Add implementation of clip extension mode
For now there's no OpenCL support, it'll come later.
2015-07-28 14:36:08 +02:00
3fba620858 Cycles: Prepare for more image extension types support
Basically just replace boolean periodic flag with extension type enum in the
device API.
2015-07-28 14:14:24 +02:00
29ebb56f4d Audaspace: support the device list returned by the new audaspace library.
- use the device names returned from the library.
- system settings UI changed as new audaspace might contain longer and more device names.
2015-07-28 14:01:53 +02:00
a0cbebf404 Audaspace: fixing problems for the merge to master suggested by Campbell and Sergey.
- rename WITH_EXTERNAL_AUDASPACE to WITH_SYSTEM_AUDASPACE.
- rename C/PYAUDASPACE to AUDASPACE_C/PY
- simplifying cmake defines and includes.
- fixing include paths and enabling WITH_SYSTEM_AUDASPACE for windows.
- fixing scons building.
- other minor build system fixes.
2015-07-28 14:01:53 +02:00
58956f3b91 Audaspace: fix the new wm_playanim.c (from gooseberry branch) to use the new API. 2015-07-28 14:01:52 +02:00
f700c1f3a8 Audaspace: name fixes and external library update. 2015-07-28 14:01:52 +02:00
009bb9e5c9 Audaspace: adapt internal C-API naming to external audaspace library. 2015-07-28 14:01:52 +02:00
8528d76dad Audaspace: external audaspace library update. 2015-07-28 14:01:52 +02:00
733073550f Audaspace: use standalone library.
- Added the cmake configuration option WITH_EXTERNAL_AUDASPACE.
- Fixes to build without standalone library as well.
2015-07-28 14:01:52 +02:00
96dd213e7e Audaspace: preparing to use standalone library.
- Renamed some functions.
- Using C API instead of C++ in the game engine, as the standalone is C++11.
2015-07-28 14:01:52 +02:00
d3acfa1d87 BGE: Navmesh fixes and improvements
The navigation mesh functionality was broken for quite a while. This patch
contains fixes: recalculating tesselations before getting the number of
tesselation faces (it otherwise returned 0) before calculating the navmesh,
and calling `DM_ensure_tessface()` on the navmesh's `DerivedMesh` object
(which fixes visualisation in Blender). This allows one to create a new
navmesh, which also works in the BGE.

Furthermore, the patch adds several return values, and shows more error
messages when things go wrong. In several places in the navmesh creation
code, return codes weren't checked and errors silently ignored.

Reviewers: nicks, brita_, campbellbarton, lordloki, moguri, panzergame

Reviewed By: panzergame

Differential Revision: https://developer.blender.org/D1435
2015-07-28 13:54:41 +02:00
038d6ce2cc Cycles: Correction to image extension setting commit
Technically it was all wrong and it should have been called Extend instead
of Clip. Got confused by the naming in different libraries.

More options are still to come.
2015-07-28 13:41:09 +02:00
c6396d9204 Fix for file unpack checking existing files
Wasn't expanding the path '//' before checking the path on-disk.
2015-07-28 21:35:35 +10:00
cd324654b0 Fix T45581: GPU failed to find function node_bsdf_refraction
This commit fixes shader tree compilation, but the shading result wouldn't be
doing actual refraction because it's a bit involved change which isn't really
considered a bug for now. There are more closures which are falling back to
diffuse BSDF currently.
2015-07-28 11:17:18 +02:00
ad7e3c302e CMake: modify recent platform defaults
Now only disable Jack and NDof on OSX

Also comment main block for platform checks
2015-07-28 17:58:47 +10:00
33bac1f401 CMake: use same defaults on all-platforms
Previously Linux had disabled libs that were enabled on other platforms.
Use a reduced feature set on all, since libs such as Jack & OSL aren't totally reliable on Win/OSX.

Keep 'option_defaults_init' since platform maintainers may want to adjust later.
2015-07-28 14:48:12 +10:00
6df3e3a959 Jpeg2000: Fixed for DCP pipeline
Profile and color space were not properly set.
2015-07-27 22:35:24 +02:00
2b632dd8c2 BGE: Fix T37074: GLSL max texture units limit
Actually for the the amount of GLSL textures units is limited by the amount of multitexture units (GL_MAX_TEXTURE_UNITS_ARB).
Most of the Nvidia graphic cards supports only 4 multitexture units, so Nvidia users can not use more then 4 GLSL textures for a custom shader.
This patch removes this limitation by using GL_MAX_TEXTURE_IMAGE_UNITS_ARB if GLSL is supported, but still limit the amount to the maximum texture limit of 8.

Reviewers: lordloki, agoose77, danielstokes, panzergame, sybren, moguri

Reviewed By: panzergame, sybren, moguri

Projects: #game_engine, #game_rendering

Maniphest Tasks: T37074

Differential Revision: https://developer.blender.org/D1389
2015-07-27 20:34:13 +02:00
7973363e34 Cycles: Final-ish tweaks for 32bit cubin compilation 2015-07-27 16:55:50 +02:00
40a866dad4 Doc fix: wolrd -> world
The documentation for bge.types.KX_WorldInfo had two typos.
2015-07-27 15:53:15 +02:00
168bb36bc9 Buildbot: Include branch name to the cmake builds 2015-07-27 14:21:20 +02:00
61e4800b45 Cycles: One more attempt to fix compilation of 32bit CUDA kernels 2015-07-27 14:18:20 +02:00
79ffa03620 Compositor: Add note that bilateral blur is not really correct
The code does stupid box filter which doesn't give nice results and doesn't
match old compositor at all. Need some better gaussian weighting here. Will
look into it later.
2015-07-27 14:15:50 +02:00
c61e4f2683 Don't allocate MFace's by default
This removes CD_MASK_MFACE from CD_MASK_BAREMESH, CD_MASK_DERIVEDMESH and others.

Callers that need it must explicitly add it to their data-masks.
2015-07-27 21:47:41 +10:00
67fe5726af Use loop data instead of face data
Replace checks in various places
2015-07-27 21:47:40 +10:00
15676bcc85 Error in looptri update, was checking wrong layer-type 2015-07-27 21:47:40 +10:00
76beb7b7d4 BGE: Fix T19241: draw debug shape with overlay/background scene.
It's for the function render.drawLine and physics debug.
2015-07-27 13:49:06 +02:00
ba146899c8 Image painting 2D:
Deprecate wrap (BRUSH_TORUS) option, we now have paint flags for tiling
and we can reuse those. Also allows seperate tiling in X/Y
direction for 2D painting now.

Only one tiling is allowed for now.

Options can be found in new "Tiling" panel under the tools tab.

For version patching, we just turn off brush wrapping,
to allow reuse of the flag in the future.
New option is paint mode wide instead of per brush so
a brush having the old wrap option will not enable it
for the whole mode in the version patch.
2015-07-27 12:55:57 +02:00
e355d557f8 CPack: Use hash of the head for the file name
Upstream is not always configured ad might give empty results.

Ideally we need to re-use the same code as we use for buildinfo,
but it's also a bit of a question which exact hash we want to put
to the name by default.
2015-07-27 12:20:16 +02:00
ce092a58a2 Buildbot: Missed this in the previous commit 2015-07-27 11:49:05 +02:00
e5d7cbd191 Buildbot: Attempt to make windows cmake builds names matching buldbot's names
Did this in packaging buildbot rule because of several reasons:

- CMake doesn't deliver name of package which we expect it to be for buildbot
- CMake doesn't really know that building happens for buildbot
- Making default CPAck name matching buildbot's naming is kinda stupid

Probably we can pass CPack name via command line arguments, but i'm happy with
the current state and one might change things in the future.
2015-07-27 11:17:57 +02:00
20ec508ca3 Replace MFace with MLoopTri in laplacian_deform 2015-07-27 18:03:09 +10:00
b74fa38581 Missed last commit 2015-07-27 16:46:12 +10:00
e48c4d73d3 Replace MFace with looptri for dynamicpaint
D1429 by @lichtwerk, with edits
2015-07-27 16:01:56 +10:00
cdf2dbeb1f Cleanup: deprecate some G.fileflags comment others 2015-07-27 10:55:19 +10:00
2fe7e60633 Fix T45563: Crash rendering hair dupli's 2015-07-27 10:04:20 +10:00
Martijn Berger
27a20c2c60 Make cmake windows 32 bit buildbot use the 120xp toolkit, restoring
windows XP compatibility

Fixes T45559
2015-07-26 21:14:24 +02:00
fb7281fb6a Fix T26141: render setting affects only first scene. 2015-07-26 18:01:56 +02:00
c27a1cfd63 Fix bug in particle API accessing the emitter 2015-07-26 12:22:23 +10:00
Julian Eisel
88ebffec96 Fix T45510: Animation channel textbox field to small
It now takes (almost) the whole available width of the region. Icons on the right hand side are hidden during text input now, they can't be used then anyway. Using this space for the text input button makes more sense.
2015-07-26 02:12:16 +02:00
Julian Eisel
1fab327fdf Fix T45562: Crashing pre 2.5 file with grid subdivisions set to 0
Seems like the original version patch for this wasn't made correctly.
2015-07-26 00:18:44 +02:00
8fa1da9213 minor cleanup, reuse existing variable 2015-07-25 22:32:55 +02:00
f1f4a16eab Convert CCGSubsurf VBO system to also sort hidden and visible faces.
It's not actually used during drawing though.
2015-07-25 22:02:43 +02:00
53f6a31c4d GPU Buffers:
This commit begins implementation of the idea about hidden face
separation outlined in

http://code.blender.org/2015/06/optimizing-blenders-real-time-mesh-

We split hidden and visible faces to different parts of the triangle
buffer.
Mapped drawing will now skip iterating through hidden polys.
Of course the final target, when all derived mesh types use
VBO sorting, is to skip checking for hide flag per face
completely. All faces will be pre-sorted anyway and we'll
be able to draw them with one draw call.
2015-07-25 20:00:49 +02:00
17e3f905e1 Style cleanup + fix sign on previous commit. 2015-07-25 18:02:07 +02:00
a6b1e281eb Cleanup - we don't need a bogus enable material function, just pass
NULL.

All derivedmesh types check if we have an enable function, we can get
rid of this.
2015-07-25 17:18:45 +02:00
e2652bc5ad Fix tile feature not working outside mesh boundaries.
We need to generate strokes up to a brush radius around the bounding
box.
2015-07-25 16:21:09 +02:00
5878050a4b Fix T45515, dynamic paint not displaying colors correctly.
Looptri refactor artifact
2015-07-25 16:16:37 +02:00
50a46a5973 GPU buffer materials:
Separate and reuse some shared code.

Also avoid counting for information we already know,
such as total loop triangles etc.
2015-07-25 14:42:26 +02:00
38e19536bf Fix compile warning in 04b369 2015-07-25 14:00:46 +02:00
04b3694d93 BGE: Fix T35454: Soft body joints crash.
Constraint on soft bodies are special and return 0 as constraint id.
So we have to check that the id is not 0 in function setParam, getParam, getAppliedImpulse and removeConstraint.
2015-07-25 13:50:15 +02:00
221aee7ecd BGE: Fix T45278 sleeping deactivation with overlay scene.
this commit fix also angular and linear threshold sleeping value update via bge.constraints.
2015-07-25 13:09:01 +02:00
9ff869e4fb Fix T45555 crash with subsurf edge drawing.
Loose edge count was double. It didn't fail on own
tests because they had a small number of loose edges,
but for bigger meshes it hit garbage indices at draw time
and crashed.

Also cleaned up the code to make it less verbose and easier to
understand how indices are counted.

Hope it's the last edge-related fix (fingers crossed)
2015-07-25 12:51:35 +02:00
9dc0fed877 Fix grease pencil selection
When zoomed in could int overflow and select the wrong vertex.

also correct clipping check.
2015-07-25 20:36:12 +10:00
8cd14d421e Fix T45553: Object parent_type 'ARMATURE' disappeared in Blender 2.75.
Own stupid mistake in rBb318795c3b3d (ideally we should really not have that kind of ugly hacks :/ ).
2015-07-25 10:39:04 +02:00
9939c18900 BGE: Fix T35288 Touch/Ray/Mouse sensor and Constraint actuator with material check doesn't work.
Now we look at all materials instead of the first. So m_auxilary_info is useless and removed.
2015-07-25 09:43:06 +02:00
e301cf3ec2 Cleanup: double-promotion warnings 2015-07-25 13:26:20 +10:00
2a286829f7 Correct check for angle-rake stroke 2015-07-25 13:07:05 +10:00
e4b716a03f Cleanup: warnings, style 2015-07-25 07:44:25 +10:00
5acce60d37 Compositor: Fixes for the debug pass
This commit fixes issues with wrong socket type being added to the Cycles debug
pass compositor operation, which lead to crashes with non-value pass types.

This commit also reverts socket renaming thing because while it's was behaving
ok on runtime file reload might have loose the links which is annoying.
2015-07-24 23:05:11 +02:00
7c5c7b5ef6 Fix T45537: cycles bake crashes with motionblur on
The crash was due to baking with motion blur but without a camera.

Reviewed by Brecht.
2015-07-24 21:18:17 +02:00
75f8f1907a Experiment with setting proper socket name for debug pass 2015-07-24 18:41:54 +02:00
33bd2c1597 Deduplicate some logic around debug passes 2015-07-24 17:45:14 +02:00
68a9d80739 Compositor: Make it work for debug passes other than float 2015-07-24 17:16:29 +02:00
d2fac7df32 BGE: Fix T45544 Adding Armatures takes an increasing amount of logic time
Armatures were not totaly freed (only the armature object not the armature) and the original armature user count was not decrease after replication.
2015-07-24 17:08:55 +02:00
dc80ff9b56 Fix T45541 crash when mixing flat and smooth shaded faces in sculpt
mode.

Issue from looptri merge.
2015-07-24 16:28:38 +02:00
a028575c4a Compositor: Allow using debug pass output in the compositor
Currently only works correct with single float output, RGBA and vector are not
supported so if one need to use this passes he'll need to wait a bit still.

It is coming, don't worry.
2015-07-24 15:39:09 +02:00
54e6413d67 Make it easier to create debug passes with more than 1 channel 2015-07-24 15:39:09 +02:00
6322867e54 Cycles: Don't explicitly add debug passes, this is now handled via RNA 2015-07-24 15:39:09 +02:00
eff1b54362 Fix subsurf edge drawing when more than one loose edge vert exists 2015-07-24 14:39:52 +02:00
b55ed89b66 Fix yet another issue caused by my recent changes. 2015-07-24 14:32:11 +02:00
2dce6dccbb Fix out of bounds memory access when copying loose vertices in cddm
Caused by own fix for too much allocated memory not taking all code
into account.
2015-07-24 12:24:57 +02:00
95f698f840 Adjust CMake platform dependant release options 2015-07-24 19:39:36 +10:00
d6ebf72f9f Fix for building with OpenSubdiv 2015-07-24 17:11:50 +10:00
dc6153453a Cleanup: comments (remove outdated & update) 2015-07-24 16:59:39 +10:00
7f32601159 PyAPI: update bgl to OpenGL 3.3
Adds (currently unused) deprecated option
so we can remove support for older API versions.
2015-07-24 16:48:40 +10:00
07fa1b49d9 parenthisize macro args to avoid errors 2015-07-24 15:53:52 +10:00
8d237503c5 Compile Fix: setenv() is not defined for mingw either 2015-07-24 15:08:43 +12:00
20d516dc35 Fix: Autokeying of buttons doesn't work on NLA Strip properties 2015-07-24 14:20:16 +12:00
15cb94c65a Fix: NLA Strip properties cannot be keyframed if Visual Keying/Only Needed options are enabled 2015-07-24 14:20:15 +12:00
ea3dae74d8 Cleanup: remove redundant __doc__ from bgl 2015-07-24 09:45:25 +10:00
3b362950e9 Cleanup: move defines inside bgl C source
- remove number-of-args arg from BGL_Wrap.
- use doxy groups.
2015-07-24 09:35:39 +10:00
b8481f4683 Minor cleanup - use integers for counters. 2015-07-23 23:21:19 +02:00
0c0db92d7a Sculpt Tiling Feature
Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc

Notes:

Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).

After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)

Thanks a lot for the patch!

Patch: D1426
2015-07-23 22:52:27 +02:00
36630b7e85 Fix memory leaks mesh w/ mesh remapping 2015-07-24 05:04:33 +10:00
d47e565598 Subsurf: Optimize edge drawing, now it uses VBOs.
Also the refactor exposed an error where we requested too much
memory from the video memory in general for all mesh types.

Now we are back to normal :)
2015-07-23 20:02:57 +02:00
b3ac7c07ff Added NlaStrip.fcurves.find(data_path, array_index=0)
This is the same as D1427 / 89e5c75666
except for NlaStrip.fcurves instead of Action.fcurves. It makes finding
a specific fcurve in Python much easier, as you don't need a Python-side
loop any more.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1430
2015-07-23 15:38:25 +02:00
0e2bbd0904 Freestyle: Fix for round/square stroke caps causing line thinning.
This is a regression introduced in rBce729677db3e and rBb408d8af31c9.

RoundCapShader and SquareCapsShader had to remove (almost) overlapping
stroke vertices to avoid sudden thinning of line thickness.  For instance,
the test .blend file from https://developer.blender.org/T36425#231460
suffered from the reported line thinning (although T36425 was originally
caused by a different bug).
2015-07-23 20:29:23 +09:00
6ee2f79f33 Cycles: Previous commit broke compilation on Windows
Apparently MSVC doesn't have setenv() function.
2015-07-23 12:53:23 +05:00
1788293a01 Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card
Previous fix didn't work well enough because on Windows Python has different
environment than Blender ans setting variables in there made no effect from
Blender point of view.
2015-07-23 12:10:38 +02:00
cc5d48e8dd Use looptri for sampling UV's in smoke.c
D1424 by @scorpion81
2015-07-23 20:08:26 +10:00
253f416a36 Fix regression of custom nodes not triggering material preview re-render
Issue was introduced in b0df196.It's not the nicest ever solution but it's
quite close to be as nice as we can do it with current custom nodes and
notifier system design.
2015-07-23 11:50:13 +02:00
08fbc303e1 Cycles: Resolve compilation error of avx2 kernel with certain compilers
It was redefined macro happening with Clang 3.6 here.
2015-07-23 11:48:54 +02:00
4be7fb7651 ImBuf: Fix OpenExr leaking memory when reading file with IB_test flag 2015-07-23 09:11:26 +02:00
b6cf4f777d Use looptri for smoke collisions & particle edit 2015-07-23 17:07:14 +10:00
5c98848895 Use looptri for RNA BVH functions 2015-07-23 15:40:47 +10:00
6aabc1bde4 Cleanup; duplicate header 2015-07-23 15:40:47 +10:00
0a249f9853 Cleanup: arg names 2015-07-23 15:17:26 +10:00
abbd82a504 Use looptri for mesh remapping 2015-07-23 15:10:12 +10:00
8155d25d39 Utility function to get poly -> looptri mapping 2015-07-23 15:08:27 +10:00
60822ec183 Use looptri for BVH raycast (simple cases) 2015-07-23 14:41:09 +10:00
717046ad2a Use looptri for volume snapping 2015-07-23 14:41:09 +10:00
748899a50a Missed adding BVH callbacks in recent commit 2015-07-23 14:41:09 +10:00
0bf2b207e2 Add missing break checking for tangents 2015-07-23 11:51:03 +10:00
368bd34573 Mesh Deform: support for ngons when binding
Weights were calculated using tessellation data, giving slightly uneven weighting.
Now only use tessellation for ray-cast but weight the influences from the original polygons.

Also cache arrays from derived-mesh, they we're called each intersection.
2015-07-23 11:30:47 +10:00
0b7d0f913d Fix weight painting + mask not drawing in latest master.
Same issue as vertex painting - though one might wonder if we really
need to set material on such occasions.
2015-07-22 16:58:18 +02:00
0795f62ddf GPU debug: Only flush stderr if needed. 2015-07-22 13:57:57 +02:00
5983280b4f Use looptri for MeshDeform modifier 2015-07-22 21:40:45 +10:00
b604d5ade0 Add bvhtree_from_mesh_looptri utility function 2015-07-22 21:40:45 +10:00
b305041ce6 Add DM_get_looptri_array utility function 2015-07-22 21:40:41 +10:00
a6f00bb75c Use doxy sections in bvhutils 2015-07-22 21:32:14 +10:00
df41f7bf4f Use const for BVH mesh arrays 2015-07-22 21:32:14 +10:00
f9a6780dc6 Cleanup: use struct for storing callback data 2015-07-22 21:32:14 +10:00
75d1723518 OpenSubdiv: Optimize speed of topology refiner construction
Now the conversion code uses mesh element mapping to speed up lookups.
Gives really nice speed improvement here, but the cost is higher memory
usage during refiner construction.

On the dragon scene here topology refiner construction time goes down
from 5 seconds to around 0.01.

It's possible to reduce the memory footprint by allocating mapping in
stages (don't allocate all of them at once, but do it on demand only
and free them after they're not needed anymore).
2015-07-22 12:51:10 +02:00
461340525e OpenSubdiv: Resolve crash when trying to do weight mcol 2015-07-22 12:01:38 +02:00
945f32e66d Fix crash with recent refactor of customdata writing.
Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers
needed to store saved customdata, we have to adjust CustomData->maxlayer too.

Otherwise, on next read, customdata code believes it has more layers allocated than
actual number.

Issue reported by Campbell over IRC, thanks.
2015-07-22 11:58:18 +02:00
cf6002737d Don't make Python classes of StructRNA on startup
This gives small start time speedup, classes are lazy loaded instead.

Keep existing behavior in debug builds to catch any errors early.
2015-07-22 19:51:03 +10:00
3dd8f287e1 Render preview: Make preview render database lazily loaded
Gives about 5-10% of startup time improvement here.
2015-07-22 11:25:21 +02:00
ec8b7edf53 Fix: solved issue with "make doc_py"
The error was "ValueError: Function <function normal_at_I0D at 0x7f2aad1feb70>
has keyword-only arguments or annotations, use getfullargspec() API which can
support them", and was first seen in eeeb845d33
2015-07-22 10:31:31 +02:00
e3461a02ac Fix T43779: Cycles texture interpolation issues
That was basically not an issue with interpolation, but rather missing wrapping
options and periodic wrapping was always used.

It's still a bit questionable why certain graphics cards were doing clamping in
the file from the report, that's not something what is expected to happen from
the settings of textures being passed to GPU. In any case this issue i still
didn't manage to reproduce on any of the available GPUs, might be something
related on driver glitch or so.

In any case CPU now should behave just fine, rest of the issues we'll need to be
able to reproduce first.
2015-07-21 22:13:25 +02:00
f2c54df625 Cycles: Expose image image extension mapping to the image manager
Currently only two mappings are supported by API, which is Repeat (old behavior)
and new Clip behavior. Internally this extension is being converted to periodic
flag which was already supported but wasn't exposed.

There's no support for OpenCL yet because of the way how we pack images into a
single texture.

Those settings are not exposed to UI or anywhere else and there should be no
functional changes so far.
2015-07-21 21:58:19 +02:00
dc3563ff48 Cycles: Implement camera zoom motion blur
Works totally similar to camera motion blur and majority of the changes are
related on just passing extra arguments to sync() functions.

Couple of things still to look into:

- Motion pass will not include motion caused by the zoom.
- Only perspective cameras are supported currently.
- Motion is being interpolated on projected coordinates, which might give
  different results from constructing projection matrix from interpolated
  field of view.

  This could be good enough for us, but we need to consider improving this
  at some point.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1383
2015-07-21 17:40:03 +02:00
1df42798d4 Try to remap buffer before rejecting.
I suspect code here can be cleaned up but for now try this.
Alternatively we can check for errors around buffer allocation
but this needs bigger changes.
2015-07-21 16:41:13 +02:00
89e5c75666 Added Action.fcurves.find(data_path, array_index=0)
Finding a specific F-Curve is often needed in Python, and usually
consists of a construct like:

```
 [fcurve
  for fcurve in ob.animation_data.action.fcurves
  if fcurve.data_path == "location"][1]
```

This can now be written as
`ob.animation_data.action.fcurves.find('location', 1)`

This new function `Action.fcurves.find()` is still O(N) in the number
of FCurves in the Action, but at least it allows us to remove
boiler-plate code. It is also faster than the Python equivalent, as
only the found F-Curve is converted to Python.

Reviewers: campbellbarton, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1427
2015-07-21 16:01:26 +02:00
e7fc8d98f5 Failure to alllocate vertex buffer would not fall back to vertex array
properly.

This should fix failure to use vertex arrays in OSX with high
polycounts.

Note this will not suffice as a fix when we move to VBOs exclusively
(GL 3+), we'll have to think of some way to separate huge meshes to many
VBOs.
2015-07-21 15:42:11 +02:00
78041fa14a Fix: fixed UI description of Action.new() function 2015-07-21 14:44:48 +02:00
9ae39a1312 Math Lib: use vector funcs for isect_line_line_v2_point 2015-07-21 21:49:29 +10:00
ff3d535bc2 Fix T45471: Blend file: Bad old_addr handling in mesh's customdata writing.
Issue is rather well explained in T45471: our current customdata writing code easily generates several different blocks in blend file with same 'old' address. This is bad, because those addresses are used as 'uid' during reading process (it kind of work in Blender's own reading process, by mere luck mostly, but breaks the file specs).

Solution (suggested by Campbell, thanks) implemented by this patch is to avoid duplicating everything, and instead just overwrite what we needs to skip some cdlayers on write:
* the CustomData's `totlayer` number;
* the CustomData's `layers` array of CustomDataLayer (keeping its original address using the `writestruct_at_address` helper).

New design allows us to get completely rid of the no_free flag stuff in `write_customdata()`.

Note that this implies written data is **not** directly valid from Blend PoV, since its written typemap does not match written layers (this is not an issue because typemap is rebuilt on read anyway - and it's easy to fix this if really needed).

Also, the backward compatibility saving of mface data remains an issue here, see comment in code.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Maniphest Tasks: T45471

Differential Revision: https://developer.blender.org/D1425
2015-07-21 12:02:11 +02:00
b91d64a3d1 Cycles: Another attempt to solve CUDA compilation errors on 32bit platforms 2015-07-21 11:42:59 +02:00
b0df19667f Fix T45317: Cycles material preview unnecessarily re-rendering
The issue was caused by wrong fix for T22741 which forced redraws on any window
event, like Expose. Use proper NV_WM | ND_UNDO listener instead,
2015-07-21 11:26:42 +02:00
b23c6c430f Fix assert in Outliner. 2015-07-21 10:43:22 +02:00
7ae44e8a30 Cycles: Workaround for sm_50 on 32bit platform
Basically this commit totally disables new SVN Voxel node, which solves some
of the compiler's issues.
2015-07-21 10:18:04 +02:00
23831b2161 Cleanup: style 2015-07-21 17:29:23 +10:00
ae00011956 Fix T45496: Crash loading file during preview
Regression from multi-view
2015-07-21 16:02:27 +10:00
9eb6dcbb46 Fix T45453: Driver button's ignore DPI 2015-07-21 15:30:34 +10:00
a48db0894a Fix T45363: Bone attrs ignore editing all selected 2015-07-21 15:22:32 +10:00
39cf1de33d Fix Clear vertex group ignoring selected option
Thanks to @chadf for spotting
2015-07-21 14:35:48 +10:00
9dc9f84740 Fix T45458: Edge Slide Mirror doesn't preserve UVs 2015-07-21 14:15:31 +10:00
5e1a8055f4 Fix T45361: Camera does not rotate in walk mode 2015-07-21 13:02:11 +10:00
3c911ff8a5 Fix T45450: Loop-select fails to cycle between overlapping edges 2015-07-21 12:27:41 +10:00
1d9fbdc9a0 Fix T45455: Select linked issue w/ hidden faces 2015-07-21 12:02:11 +10:00
1d02d34de9 Fix T45434: GPencil on editmode surface fails
Z-offset use for drawing & picking was problematic for extracting locations from depth values.

Use flag to optionally disable.
2015-07-21 11:12:39 +10:00
ef950d6937 Fix T45502: Crash showing thumbnails 2015-07-21 10:01:42 +10:00
2bfa950438 Cleanup: warning 2015-07-21 09:54:23 +10:00
b5f282b211 Remove nonnull attribute, NULL arg is valid here. 2015-07-21 09:41:48 +10:00
30772b6f09 SCons: Weirdly enough at some point scons became broken in OpenSubdiv branch 2015-07-20 22:43:13 +02:00
3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
2466c4f8ce OpenSubdiv: Add OpenSubdiv files which are related on the CCGSubSurf and GPU
Those files are still not in use (SCons will tyr to compile new CCGSubSurf files
but no code will be in use at all because those new files are fully wrapped by
ifdef WITH_OPENSUBDIV check).
2015-07-20 22:29:25 +02:00
a040157e5d OpenSubdiv: Add new OpenSubdiv related files
This includes C-API bindings in intern/opensubdiv and CMAke module
which finds the OpenSubdiv library. This filea are not in use so
far, making it a separate commit to make actual integration commit
more clear.
2015-07-20 22:29:25 +02:00
ccc3c2dbda CCGSubSurf: Split file into several smaller ones
This is a preparation commit for having OpenSubdiv integrated into Blender
and new layout is the following:

- CCGSubSurf.c contains implementation of common functions used by both
  legacy subdivisions code and by the new code in the future.

- CCGSubSurf_inline.h contains internal functions which are to be inlined
  due to the performance reasons. Those functions are only ment to be used
  bu CCGSubSurf* files.

- CCGSubSurf_intern.h contains declarations of private functions and data
  structures used by CCGSubSurf module.

- CCGSubSurf_legacy.c contains legacy implementation of subdivision algorithm.

- CCHSubSurf_util.c contains utility functions which are not directly related
  on the subdivision code (i.e. debug functions, hash implementation etc).

There should be no functional changes so far.
2015-07-20 22:29:25 +02:00
6190d75b5a Usual UI messages fixes. 2015-07-20 22:22:31 +02:00
a4a3d5650d Minor optimization in CustomData_update_typemap(). 2015-07-20 17:28:29 +02:00
66dd9fbf22 Fix (unreported) broken MixWeight modifier in debug builds.
defvert_find_index() & co now assert when '-1' invalid vgroup index is passed.
We used to rely on NULL value returned in this case, but with the assert...

The assert completely stalls blender actually (repeated for every vertex!).
So much better to not call that func when vgroup index is invalid.
2015-07-20 16:55:46 +02:00
9ee1f96a0f Fix (unreported) potential serious bug in CustomData_merge().
It was always only using the flags from the first source layer of a given type, not from
the layer actually being handled.

This was (probably) more or less harmless for the CD_FLAG_NOCOPY test,
but could be really bad when checking CD_FLAG_NOFREE, and when
copying the flags over to new copied data!
2015-07-20 16:25:01 +02:00
40d4da829c Fix/Workaround for CMake buildinfo error
Correcting the paths for buildinfo to point to the real header,
ended up breaking buildinfo (by not running every build).

It turns out we relied on the output _never_ existing,
so CMake generates a new buildinfo each time.
This is quite bad, but I didn't see a way for CMake to do this,
so explicitly point to a missing file and comment whats going on.
2015-07-20 23:27:56 +10:00
432d24f998 Fix recent own stupidity with indexed sculpt drawing. 2015-07-20 15:28:05 +02:00
ed3b19f46d Ugly hack to avoid GLEW context error printing when initializing GLX. 2015-07-20 14:56:36 +02:00
db38a65b02 Filter the debug callback to only report errors unless debug value is
20.

stderr was getting flooded with too many error messages, most of which
were not really relevant.
2015-07-20 14:46:11 +02:00
2e2164d5d4 Resolve compiler warning for clang 2015-07-20 22:31:19 +10:00
87328bde47 Fix T45218: Crash when trying to open System in the User preferences
Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card

The issue is basically caused by graphics card driver which crashes when
querying OpenCL platforms. This isn't something we can really solve from
the CLEW side, because opencl.dll does exist in old driver and even has
all the needed symbols, but first ever call to clGetPlatformIDs crashes.

While rest of the blender works fine with those older ATI/AMD cards it's
really needed to solve crashes of OpenCL device enumeration.

Solution here is to force disable OpenCL platforms if we've detected that
display card is using old ATI/AMD driver. It's not really proper solution
so it's done in the python side where it's easy to do tweaks. Reasoning
behind this change is:

- If one uses really old driver it's likely because it's the latest one
  he/she can ever to install (because of discontinued support from AMD).

- If old card is used it's likely to not have dedicated GPUs for rendering.

- Even if there's a dedicated GPU device enumeration is likely to crash
  because of attempt to query OpenCL from the old card.

There are still some tweaks needed likely, but this commit should make
some of the configurations to work.
2015-07-20 12:46:56 +02:00
bd28c25f9b Fix broken GLEW initialization. Initialize GLEW twice, once to get GLX
extensions, once to get final context extensions.

Not so nice because we get a warning on startup from GLEW, but at least
it GL extensions should work now.
2015-07-20 12:35:58 +02:00
5f25b91b65 Dyntopo should be supported on systems without VBOs now. 2015-07-20 12:18:39 +02:00
cb6fc9d141 Use abstraction to unbind buffers, should avoid crashes in systems that
don't support VBOs.

Exposed by initialization error in GLEW, which should be fixed
seperately.
2015-07-20 12:12:28 +02:00
422ffd252a Pixel format selection now favours a format with a number of samples
closer to the one requested on Windows.

Patch D1384 by Benoit Bolsee.
2015-07-20 10:59:30 +02:00
05ee9d2dd0 Minor edits for consistency 2015-07-20 17:07:40 +10:00
bf6ac302cd Correct own error w/ recent changes to triangulate 2015-07-20 16:12:30 +10:00
e3f86c6580 Replace MFace use by MLoopTri w/ heat-weighting
D1418 by @scorpion81 with edits
2015-07-20 14:42:48 +10:00
e5e9fbfaf0 Replace MFace use by MLoopTri w/ remash modifier
D1419 by @lichtwerk
2015-07-20 14:42:35 +10:00
86e6d6695e GHOST/X11: Support GLX-Context flags
GHOST_ContextGLX was incomplete, ignoring profile-mask and profile-flags.
2015-07-20 13:32:20 +10:00
b368724464 Fix define issues w/ WITH_GL_PROFILE_COMPAT off
This still fails to build, but at least fail where its supposed to (using unsupported API's).
2015-07-20 13:08:26 +10:00
cd91fd655d GHOST: use simple stack array for glx attributes 2015-07-20 11:45:42 +10:00
98bf205c39 GHOST: correct GLX flag w/ WITH_GL_PROFILE_CORE
note that this is currently ignored, but better at least build for now.
2015-07-20 11:32:49 +10:00
b3e7a51ebd Freestyle: disabled debug code in ViewMapBuilder::ComputeIntersections(). 2015-07-20 06:18:03 +09:00
ee263c2566 Freestyle: Removed tesselated forms of silhouettes for displaying in the UI.
The tesselated silhouettes were not used in Freestyle for Blender at all.
2015-07-20 06:18:01 +09:00
1f748d2324 Freestyle: code cleanup.
Removed unnecessary header files and replaced some other heade files with
forward class declarations.
2015-07-20 06:18:00 +09:00
160c65845d Freestyle: minor optimization for space in the FEdgeXDetector.
Member variables and auto variables were changed from real (double) to float
in most part of the FEdgeXDetector (except for curvature computations).
2015-07-20 06:17:59 +09:00
86572dd7c9 Freestyle: commented part of FEdgeXDetector::ProcessRidgeFace() that has no effect. 2015-07-20 06:17:57 +09:00
b9895df36f Freestyle: internal switch from double to float in mesh loading and construction of winged edges. 2015-07-20 06:17:55 +09:00
6705786540 Freestyle: minor optimization for space from mesh importing to feature edge detection.
Several class member variables were removed (at the cost of computing their values
when retrieved) or changed to a type of smaller size.  Also fixed whitespace.
2015-07-20 06:17:54 +09:00
431cee2ba0 Freestyle: minor code cleanup. 2015-07-20 06:17:53 +09:00
66423364ca Freestyle: removed redundant instantiation of vector objects. 2015-07-20 06:17:51 +09:00
be980c4ee4 Freestyle: minor optimization for space by using a pointer to a const char array instead of std::string. 2015-07-20 06:17:50 +09:00
e58d788340 Cleanup: style
Also 'com' as abbreviation for center-of-mass is a bit confusing, rename to 'center'.
2015-07-20 05:30:08 +10:00
23a4f547e7 Convert rigidbody conversion to looptri.
Patch D1417 by Martin Felke, with minor edits thanks!
2015-07-19 19:10:41 +02:00
a597a380bb Properly fix T45477
Code was actually skipping setting color selection indices and previous
commit actually broke mask selection in texture painting.
All should work now.
2015-07-19 18:35:09 +02:00
8f1c1ef3a9 Fix T45477 wrong edge selection.
Caused by own changes to framebuffer selection code, code was not
packing color ids correctly.
2015-07-19 18:04:21 +02:00
d712dc5a1d Fix T45495: Armatures using the iTaSC IK solver causes UI truncation in bone constraints panel.
Caused by rB404f9ddc37fc, cleanup is OK but please double-check changes before committing. :(
2015-07-19 16:25:48 +02:00
23c76039d9 CMake: correct generated location for buildinfo.h 2015-07-19 09:53:38 +10:00
1e10e4e2e3 Fix error when getting the commit time fails
While this should work, allow the build to succeed if for some reason the command fails.
2015-07-19 09:51:49 +10:00
4bca8a6bc5 Fix T45484: Regression OpenCL split: access violation
That was a primary school error caused by moving statements inside assert()
which effectivly disabled crucial code in release builds.
2015-07-18 23:30:19 +02:00
faeac63f68 Cycles: Fix compilation of OpenCL kernel after point density commit 2015-07-18 23:10:46 +02:00
003b56801c Point density: Workaround for possible race condition
There was possible race condition in the point density sampling caused
by access to the same data in particle system from sampling thread and
sampling initialization.

Could have happened when two different point density textures were using
same particle system
2015-07-18 22:57:02 +02:00
9b40616249 Cycles: Point density texture support
This commit implements point density texture for Cycles shading nodes.

It's done via creating voxel texture at shader compilation time, Not
totally memory efficient, but avoids adding sampling code to kernel
(which keeps render time as low as possible), In the future this will
be compensated by using OpenVDB for more efficient storage of sparse
volume data.

Sampling of the voxel texture is happening at blender side and the
same code is used as for Blender Internal's renderer.

This texture is controlled by only object, particle system and radius.
Linear falloff is used and there's no turbulence. This is because
falloff is expected to happen using Curve Mapping node. Turbulence
will be done as a distortion on the input coordinate. It's already
possible to fake it using nose textures and in the future we can add
more proper turbulence distortion node, which then could also be used
for 2D texture mapping.

Particle color support is done by Lukas, thanks!
2015-07-18 22:49:10 +02:00
7d10798af2 Cycles: Add voxel texture sampler shader node
The idea of this node is to sampling of 3D voxels at a given coordinate
supporting different mapping strategies (world space mapping, object
local space etc).

Currently not in use, it's a preparation step for supporting point density
textures.
2015-07-18 22:09:20 +02:00
2f15a1f66e Point density: Add utility function to sample density outside of render pipeline
Not currently used, it's a preparation for the further work.

Should not be functional changes.
2015-07-18 21:42:39 +02:00
92a37993a5 Cycles: Camera frustum space object culling scene simplification
The idea is to give artists a simplier way to control memory usage in such
scenes as grass fields by doing automatic object culling based on whether
object is visible in the frame or not.

This is controlled on per-object level. In order to use this option few steps
are required:

- Enable Simplify in scene settings

- Enable Camera Cull option in the Simplify panel

- Set camera cull margin (measured in relative value to the render resolution)
  This setting is used to avoid possible flickering caused by changes in shadow
  which are cast by objects outside of the frame.

- Enable Camera Cull for objects which are desired to be culled
  (object culling option could be found in Option panel in object buttons).

There is still room for improvements, but this worked quite well during
Gooseberry open movie project, so think it's useful feature even in it's current
non-ideal state.
2015-07-18 18:17:22 +02:00
2ccfbf2f81 Cycles: Commit file missing from conditionally compiling baking kernel 2015-07-18 16:26:41 +02:00
cf14437ac9 Cycles: Log requested device features
Useful to have this always logged because otherwise it's needed to remove cached
kernels and check build flags to see which features are enabled.
2015-07-18 16:02:09 +02:00
45b5bf034b Cycles; Make baking a feature-specific option
This means render devices now might skip building baking kernels in cases when
only actual render-related functionality is used.

For now it's only implemented for OpenCL split kernel device and mainly needed
to work around some compiler-specific bugs which crashes on building the kernel.

Using OpenCL for baking might still crash the driver, but at least there is now
higher probability of that GPU will be usable to render the scene.

Real fix should actually be done in the driver side.
2015-07-18 16:02:08 +02:00
36a952e3e4 Cycles: Use feature-selective base kernel compilation when using split kernel
The idea is to make all kernels as small as possible to work around possible
issues with buggy drivers which might fail building feature-complete kernels.

It's indeed just a workaround to make at last simple test scenes to render
on OpenCL. Real fix should happen from the driver side.
2015-07-18 16:02:08 +02:00
5e4a8c6a87 Cycles: Some cleanup if OpenCL base kernel load_kernel()
Hopefully makes it less clumzy, should be no functional changes still.
2015-07-18 16:02:08 +02:00
025eda57da Cycles: Make OpenCL cache follow out code style a bit closer 2015-07-18 16:02:08 +02:00
2ad3a1d41e Use gpu-buffers for UV-edge drawing 2015-07-18 23:51:44 +10:00
f5629b7265 Fix/enhance behavior of VES's 'alt-rmb' selection.
Main issue in previous code was that you could not shift-alt-rmb select several
contiguous strips, result was pretty much unusable.

Also, enhanced general behavior of this selection mode, now (similar to alt-rm clicking
on handles), when you alt-rmb click on a same strip several times, you alternate between:
* Strip is selected, neighbor handles are selected;
* Strip and its handles are selected, neighbor handles are selected.
…which allows you to either grab or slide the strip.

And refactored a bit code too, linked_handle has a complete different logic
than without this option, simpler and clearer to completely separate them in code.

Initial issue reported by Leon Cheung on IRC, thanks!
2015-07-18 14:45:11 +02:00
cdd1be44c5 Replace MFace w/ MLoopTri in imapaint_pick_uv
D1415 by @scorpion81, with minor edits
2015-07-18 22:10:58 +10:00
df4d25991e Fix (IRC reported) inverted behavior of select more/less in VSE.
Also, cleaned up a bit that code, and added releavnt entries in Select menu.

Reported on IRC by Leon Cheung, thanks!
2015-07-18 11:55:08 +02:00
bbed6af857 CMake: Disable Werror in extern/libmv for now
It gives issues with Glog compiled in release mode.

Need to revisit the directory layout here and compiler flag, because technically
libmv is now more an intern/ library and i'll actually prefer it to be covered
with strict flags as well. But it's a bit tricky because of libraries which we
don't maintain are in the libmv subfolder.
2015-07-18 11:16:25 +02:00
ecb3e0fe73 Cleanup: whitespace & break placement 2015-07-18 19:03:22 +10:00
2199a3e38b CMake: Add option to enable -Werror cflag in some areas
It is rather annoying attitude nowadays to use const qualifier all over the
place, including using it for multi-dimensional arrays. This isn't really
supported in GCC prior to version 5.0 because it considers such an arrays
to be a "pointer to a const pointer" which gives implicit casting errors.

It's not possible to disable this particular type of warnings treated as
errors in any GCC version prior to 5.0 as well, meaning currently usage of
-Werror globally in Blender code is not possible at all.

This commit makes it possible to use -Werror in areas which are complaint
with older GCC versions. New advanced CMake options are:

- WITH_COMPOSITOR_WERROR
- WITH_LIBMV_WERROR
- WITH_CYCLES_WERROR
2015-07-18 10:49:51 +02:00
086ae3ea04 Cleanup: whitespace, wrong indent level 2015-07-18 18:42:59 +10:00
752eb64d60 Cleanup: whitespace (CMake) 2015-07-18 18:42:35 +10:00
7c5dd14689 CMake: Fix indentation around LLVM detection code 2015-07-18 09:40:33 +02:00
3e83a0d92d Cleanup: ws 2015-07-18 06:01:38 +10:00
7b30e2386b Only use material callback when enabled
Vert/Face select in painting modes weren't drawing after recent changes.
2015-07-18 05:39:01 +10:00
b45749727c Add check for GPU materials enable state 2015-07-18 05:30:13 +10:00
32f7b4a358 Avoid getting the original index if its not needed 2015-07-18 04:57:58 +10:00
e6711119f2 Absent-mindedness...Remove testing code 2015-07-17 19:13:22 +02:00
712098b1c8 Fix GLSL code not working correctly for Macs without VBO, again report
by scorpion81 on irc
2015-07-17 19:12:24 +02:00
c1290e441e Fix T45469: Vertex Group weight = 0.0 in scene 2. 2015-07-17 18:49:58 +02:00
20de6f01ed Fix T45464: Blender Sequencer "Select Strips to the Left" produces opposite behavior to what is intended.
Logic was just broken for the LEFT case here.

Also cleaned up and made behavior more consistant between strips and markers.
2015-07-17 18:32:59 +02:00
3a15ec337e Fix issue reported by scorpion81 on irc: material mode + flat shading
artifacts in cycles textured mode.
2015-07-17 18:30:40 +02:00
85809e836e Avoid double index lookup mesh/selection drawing 2015-07-18 00:01:44 +10:00
d4c0617496 Avoid accessing MTFace drawing subsurf 2015-07-17 23:52:41 +10:00
955c13d614 Fix another index error, made multimaterial mapped meshes draw
incorrectly.
2015-07-17 15:15:53 +02:00
7c06167982 Change winding of looptris in subsurf so they point to the same
direction as the surface.
2015-07-17 14:56:10 +02:00
5f09348fe8 Fix crash texpainting on subsurfed meshes.
Unfortunately, loops and polys are generated, therefore we need to keep
copies. Still not painting after this commit but at least no crash now.
2015-07-17 14:46:05 +02:00
82e27f5093 Cleanup: ws & correct comment 2015-07-17 22:09:30 +10:00
416d164fec Projection Paint: move to looptri data 2015-07-17 21:59:07 +10:00
e1606e8c87 Don't create MFace's when calculating normals
Instead only create MFace layer when its requested
2015-07-17 21:59:07 +10:00
19614f4395 Add macro BKE_MESH_TESSTRI_VINDEX_ORDER
gives the index of a vertex in a looptri
2015-07-17 21:59:07 +10:00
c23d29c58e Fix T45465
Easy one, we don't draw quads anymore. Also normal
didn't use polygon index
2015-07-17 13:27:46 +02:00
1b8e0d03d4 Fix no longer being possible to display a suzanne with 8 levels of
subdivision.

Classic integet overflow/size_t substitution case. Machines are getting
powerful enough to easily expose these kinds of error now.
2015-07-17 12:25:44 +02:00
0b121d6a5d Cleanup image's poll funcs.
Checking space returned from CTX_wm_space_image() is SPACE_IMAGE type... tssst. :)
2015-07-17 12:19:57 +02:00
1255ac12a6 Fix T45462: Do not enale 'replace image' op with packed images. 2015-07-17 12:19:57 +02:00
37017d149e Let's use proper helpers for debug-only vars... 2015-07-17 12:19:57 +02:00
9bcf1bb266 Fix for nodeitems module using the NODE_MT_add menu types from bl_ui.
This is basically a bad-level call: ui scripts are registered *after*
the modules. It only works for addons because those are loaded even
later.

Now the nodeitems_utils module just defines a function which is then
called by the UI script, rather than the other way around.
2015-07-17 11:59:24 +02:00
4052384be3 Make strict flags happy in release builds 2015-07-17 09:54:21 +02:00
40936307dd Remove MTFace DM_paint_uvlayer_active_get func 2015-07-17 04:26:17 +10:00
67acde92bb Fix for error in looptri commit
Sculpting w/ subsurf crashed
2015-07-17 04:22:24 +10:00
9d090c4717 Split ray_face_intersection into quad/tri versions
Since many callers only need a single triangle
2015-07-17 04:15:24 +10:00
595a491e63 Add tessellation data to DerivedMesh (LoopTri)
This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.

This doesn't yet move all internal code from MFace to LoopTri just yet.

Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint

Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-17 03:55:14 +10:00
Dalai Felinto
c8f6313487 Fix T45428: Sometimes in a dupligroup linked actuators are not triggered
Revert "BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse."

This reverts commit 371e5f25a0.

The fix is basically to revert the cleanup commit 371e5f25 (and 3d658bf7)
Also 5dc22fbbf had to be adapted to the reverted code.

Conflicts:
	source/gameengine/Ketsji/KX_Scene.cpp
2015-07-16 12:53:20 -03:00
2fe9224375 Fix T45459: Edge Length with Separate Units Displayed As 1m 100cm.
Our 'unit epsilon' was too small, given the fact we only display up to four digits usually...
2015-07-16 17:45:51 +02:00
f2087b4830 Fix T45451: File Browser crash on 16bits PNG image previews.
Issue was that with those files, Blender generate a float image by default, not a byte one...

Now, we ensure in two places we only get a byte imbuf for our thumbnails!
2015-07-16 17:28:25 +02:00
4feef7d4f8 Fix for the previous commit: overallocation of an array 2015-07-16 17:26:20 +02:00
247d922ce5 Fix T45446: Crash when baking a certain object
Issue was caused by deform vert layer existing in the mesh.
Solved in quite simple way, but it still might be missing
some other layers.

Any custom data experts around to check if it's correct?
2015-07-16 17:25:13 +02:00
3e3e7ee41c Sculpt draw code:
Remove legacy code completely, now dyntopo, multires et al even work on
GL 1.1 for really hardcore users :p

Real purpose here though is to be able to have fast multires drawing
even with VBO off, since it requires using indices for vertex buffers.

Also made own code elf puke an eaten normal update function which
made multires not update normals in solid mode...sorry.
2015-07-16 17:12:03 +02:00
6568b6d1cd Fix T45456: Error's in splash don't restore cursor 2015-07-16 17:28:20 +10:00
01a8216a4b Disable check for recent-files.txt existing
slows startup on remote, network fs... etc.
2015-07-16 17:15:00 +10:00
Stefan Werner
51385f6fe8 Fix T45447: Area light importance sampling improvement
Turning on importance sampling on area lights increases noise on diffuse
surfaces. This was caused by PDF calculated for an intersected point on
light instead of original light position.

Patch by Stefan with some own modifications.
2015-07-16 08:33:13 +02:00
b00c49838a Optimize Vertex Color update
Avoid recalculating the material color when its the same as the last.
2015-07-16 15:49:15 +10:00
e6364c64f2 Icons: Add new 'library_data_broken' one. 2015-07-15 20:28:09 +02:00
13c39e90b3 VBO offscreen selection drawing, cdderivedmesh
Get rid of legacy drawing, it's only used for selection,
    in which case we can prepare a temporary color buffer and draw
    at once. Code is not complete here because we still redundantly
    set the draw color in the draw function and don't ommit hidden
    faces automatically. Still it works 100% without immediate mode
    now.
2015-07-15 18:50:02 +02:00
2daa4db8a0 Fix own stupid error in yesterday's refactor of recursive dir creation.
Missed adding return value in one place.

Thanks a lot to Thomas Szepe for reporting the issue and finding the solution!

Question remains: how could MSVC allow such a code to compile in some cases
(own win64 + scons buildbot win32 were OK with that it seems!).
Crappy compiler, not comming to the rescue of stupid dev...
2015-07-15 17:43:04 +02:00
548e650252 Cycles: Merging of patch from OSX went wrong in the previous change
That's what happens when you can't commit from a system you're making
changes at and someone is behind your back...

Sorry for the noise.
2015-07-15 15:12:19 +02:00
2b97ad348c Cycles: Missed this in the previous commit 2015-07-15 15:11:02 +02:00
32c6d92cb0 Fix T45439 crash with subsurf when many materials present.
Silly oversight on the viewport patch
2015-07-15 14:58:10 +02:00
56bf25d219 Cycles: Enable OpenCL rendering on Apple OSX
Requires having latest El Capitan beta 3 OSX due to ome crucial fixes made in the
compiler. Supports same features as NVidia OpenCL apart from CMJ (there's no
experimental feature set support in megakernel yet).

Uses megakernel internally, which works much better than the split kernel. Split
kernel is not supported on OSX still, needs to be investigated still.

Some more details can be found there:

  http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/OpenCL#AMD_on_OSX
2015-07-15 14:20:59 +02:00
4143b8a6c7 Fix autosmooth with recent DM optimizations
Also avoid multiple float->short conversions for the same normal.
2015-07-15 14:34:56 +10:00
72c7e12a5d DerivedMesh: minor changes to callback use
- use void instead of float for array arg (cast in the switch statement)
- remove unused args
- use const for poly-mapping and user_data args
2015-07-15 12:42:41 +10:00
7407ed7637 Cleanup: ws 2015-07-15 12:08:32 +10:00
52fa5b12e1 Cleanup: ws 2015-07-15 11:43:23 +10:00
Nikolaus Leopold
f2620c9df1 Minor English grammar typo fixes.
This fixes T45433.

Reviewers: Severin, kevindietrich

Reviewed By: kevindietrich

Projects: #bf_blender, #user_interface

Differential Revision: https://developer.blender.org/D1408
2015-07-15 03:33:10 +02:00
dfd383ca00 Fix overdrawing and errors with textured and mapped drawing 2015-07-14 23:49:03 +02:00
9cc1953210 Usual i18n messages fixes... 2015-07-14 21:41:24 +02:00
8a17918555 Fix T45424: Blender able to create folders with invalid characters at the end of the name.
In fact, filebrowser was not making any checks for invalid file/dir names here!

Added checks in the three places that should be protected:
* Renaming.
* Creating dirs.
* Typing in filename field.
2015-07-14 18:57:38 +02:00
d7b9202567 BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().
BLI_filename_make_safe had several issues:
* Would replace all dots ('.'), not a great idea since it would break extensions.
* Was not checking for 'control' ASCII chars (though unlikely, better to be safe here).
* Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.).

New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().
2015-07-14 18:57:38 +02:00
d0c5eac4b7 BLI_fileops: Make BLI_dir_create_recursive() return success/error status.
Handy to know directly whether a file creation succeeded or not.

Also, made a few more changes in this func, and harmonized a bit win32/*nix versions.
2015-07-14 18:57:38 +02:00
38940662e5 Particle Info node support for GLSL mode and the internal render.
With this patch "Particle Info" node from Cycles works in GLSL and BI

Alexander (Blend4Web Team)

Reviewers: psy-fi
Note: moved particle info to object render instance instead of
shadeinput during review - Antony.

Differential Revision: https://developer.blender.org/D1313
2015-07-14 18:52:29 +02:00
107e34407d Display optimizations part 1.
This patch changes the way we draw meshes by introducing
indexed drawing. This makes it possible to easily
upload and rearrange faces ad lib according to any criteria.

Currently we use material sorting but textured sorting and
hiding will be added to optimize textured drawing and skip
per face testing.

It also adds support for vertex buffers for subsurf
modifiers (Except from GLSL drawing), making drawing of
subsurf much faster without need for bogus modifiers.

Tests show that we gain approximately 20-25% performance
by that for solid mode drawing with up to 50% gains for
material drawing. Textured drawing should also have a
small performance gain, but more substantial optimizations
are possible there.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1406
2015-07-14 16:48:23 +02:00
1b8b9063f8 Correct last commit 2015-07-14 23:37:11 +10:00
0918461d61 Move from MTFace to MTexPoly w/ texture checks
Part of moving away from MFace.
2015-07-14 22:36:00 +10:00
2cffd6649b Match face tessellation order in edimode
add a negated version of axis_dominant_v3_to_m3
2015-07-14 22:29:31 +10:00
655f498ca7 Cleanup: headers (wm) 2015-07-14 22:29:31 +10:00
cba0858ccd Fix for recent optimization commit in endian switch
Pre-4.8 GCC had a bug which lead to non-exposed __builtin_bswap16() symbol.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for details.
2015-07-14 11:33:50 +02:00
82740cd282 Fix T45423: depsgraph: crash in IDDepsNode::tag_update
Two issues fixed in this commit:

- Clearing or adding animation via python should ensure relations are valid.
- Animation component animation data might be null caused by removing animation
  from python.
2015-07-14 11:21:04 +02:00
9c80e52a89 Make tooltip parsable by human compilers (thanks to Pablo for
suggestion)
2015-07-14 11:19:13 +02:00
6ba4a917a3 Data Transfer: very minor cleanup... 2015-07-14 11:13:56 +02:00
85004461ea Workaround for non-bleeding edge compilers and const cast of pointer arrays. 2015-07-14 09:56:00 +02:00
a79d47b14e Cycles: Add logging to detected OpenCL platforms and devices
Happens on verbosity level 2, should help looking into some of the
bug reports in the tracker.
2015-07-14 09:56:00 +02:00
7ad9ca72dd Cleanup: replace BLI_split_file_part w/ BLI_path_basename 2015-07-14 09:34:53 +10:00
b7c42ef93e Cleanup: use ascii as suffix (as with utf8) 2015-07-14 09:17:00 +10:00
2de497eee0 BKE_deform: assert on invalid args
Will phase these out eventually
2015-07-14 08:41:15 +10:00
8c0b5c02de Draw emboss when area is full but in quad-split 2015-07-14 07:31:46 +10:00
9f78aa4c36 Fix T45348: Collapse gives sel verts in face mode 2015-07-14 07:02:35 +10:00
55374426c6 EditMesh: show angles of adjacent selected verts
Useful since moving vertices will change angles on adjacent,
unselected face-corners too.
2015-07-14 06:30:02 +10:00
eee2d8e45c Fix T45247: Softbody ignores lattice weight
Now multiply the lattice wight by the goal weight too.
2015-07-14 06:20:31 +10:00
240646f506 Softbody goal weights cleanup
- avoid searching for vertex group for each vertex.
- add support for mass and spring weights to lattice.
- multiply the vertex group weight by the overall goal weight value.
2015-07-14 06:20:30 +10:00
6a982a080c Add some pedantic casts, since some guys around like to take all warnings from their compilers as errors, even the stupidest ones! 2015-07-13 22:00:49 +02:00
Dalai Felinto
4050b49f97 increase mathutils callback count (BGE devs, read the log)
This was causing the BGE to crash on Debug mode when built with "break on asserts", meaning the BGE was not debuggeable.
Please make sure to test patches in debug mode with the proper flags enabled before committing
2015-07-13 16:11:59 -03:00
Dalai Felinto
34a7156705 RNA assert: make object game state to comply with RNA_property_boolean_get_index() 1/0 requirement 2015-07-13 15:52:05 -03:00
406b9aa7b1 Fix T45402: Transform crash w/ project+align snap
Only euler rotations were checked for.
Also delta rotations caused random/unusable output.
2015-07-14 04:30:16 +10:00
6f7926c61c Fix T45394: Motion tracking constraints did not work with Cycles motion blur 2015-07-13 18:17:46 +02:00
dd44754c5f Data Transfer: Add an option to 'auto-transform' destination mesh so that it matches best the source one.
This allows to match and transfer data between two meshes with similar shape but complete arbitrary different transform.

Note that the result will be best if the meshes (more precisely, their vertices) are exact copies of each other.
Otherwise, method used can only perform an approximated best match, which means you'll likely get better
results if you 'visually' make them match in 3D space (and use 'Object Transform') instead.
2015-07-13 18:05:38 +02:00
e93b969ac9 Add BLI_math_statistics, where stats tool shall be!
For now, only contains some 3x3 matrix covariance computing.
2015-07-13 18:05:38 +02:00
0e9842dd04 Add BLI_math_solver, where non-linear solvers should be.
For now, only has an eigen solver for 3×3 (symmetric) matrix.
2015-07-13 18:05:38 +02:00
582e7a6347 Add a skeleton of C API for Eigen3.
Title says pretty much everything. For now, only thing available is a solver of eigen
values/vectors for self-adjoint matrices.

We can easily add more when needed.

Thanks to Sergey and Campbell for quick review.
2015-07-13 18:05:38 +02:00
0119539e4b Add icon scale argument for ui-template-previews 2015-07-14 01:46:25 +10:00
e7b3803317 Allow spin/screw to run outside 3D view
This lets scripts call them
2015-07-14 00:55:04 +10:00
b16bf6da80 Fix T45364: NEW DEPSGRAPH: New Torus created can't be transformed
Linking objects to a scene via python should ensure relations are properly
updated for that scene.
2015-07-13 16:00:39 +02:00
9f63cbf4a7 Fix T45333: Volume Scatter crash blender 2015-07-13 18:54:26 +05:00
a2f7997e05 Freestyle: Fix compilation error with strict compiler flags 2015-07-13 15:24:56 +02:00
686e8e452c Fix T45390: Cycles experimental displacement method ignores scaling when render
From artists perspective it makes sense to always apply displacement in a local
space.

TODO: Double-check that BVH is being packed properly. From quick tests seems it's
all fine, but might be missing some obvious failure still.
2015-07-13 15:24:56 +02:00
2d32b92d77 Cleanup: IMB prefix for ImBuf defines 2015-07-13 22:00:07 +10:00
e142ae77ca Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had
    already run out of space. Solved the problem by separating file type to
    an ftype enum, and file specific options to foptions.

    Reviewed by Campbell, thanks a lot!
2015-07-13 13:58:17 +02:00
107bbee4c7 Use regex for cmake config parsing 2015-07-13 20:05:26 +10:00
5201748f5f Fix T45397: Frameserver rendering no longer works in 2.75 or 2.75a
Issue was caused by a typo in original multiview commit.
2015-07-13 11:10:33 +02:00
1dd92f352b Fix T45385: Crash on render occurring when two hair modifiers are active that both use a UV mapped material for render
Not sure it's totally correct solution, but seems reasonable because it's
possible dmcache is set to ISCHILD.

Someone more familiar with the particles code might want to revisit this :)
2015-07-13 11:01:34 +02:00
f4f7348c41 Minor tweaking to Knife header text.
Confirm/cancel shall always be first, and also makes more sense to have
define cut/close cut/new cut together.
2015-07-12 21:52:59 +02:00
c1a5e6b2fd Shortcut-to-string converter: add 'dbl-' in front of key when expecting a double-click.
I think this is the only Keymap value we really need to handle here...
2015-07-12 21:39:59 +02:00
c2bcf2dc05 Add new modalkeymap usage in helper header message to Knife tool. 2015-07-12 21:32:16 +02:00
36c15f4194 Add new modalkeymap usage in helper header message to Fly mode. 2015-07-12 21:14:06 +02:00
1b297567c0 Cleanup: style 2015-07-13 03:48:08 +10:00
feffbe974b Remove redundant string copy 2015-07-13 03:43:41 +10:00
1893e5e4c2 Missed essential part in previous commit.
Or how to epic fail a fix when working on two different systems.
Or how to increase your commit rate.
2015-07-12 19:04:31 +02:00
7e9c347c8c Fix T45375: Cant clear temp fluid cache after closing Blender (Windows).
There was two different issues here actually:
* Own (very high) stupidity only gave 8 chars to file name (sic).
* list dir returns dirpaths without a trailing slahs, but expects them to have it it seems. :|
2015-07-12 18:49:02 +02:00
d54e77b66d Cycles: Expose "Max Bounces" for the world light.
When using MIS, the world is treated as regular light and in this case
we can now also limit the maximum amount of bounces, the background light
will contribute to the scene.

This can improve performance in some cases, where it's e.g. sufficient to
only have a contribution on first 1-2 bounces.
Examples can be found in the differential.

Differential revision: https://developer.blender.org/D1399
2015-07-12 17:56:54 +02:00
6ffc988ae3 BGE Clean-up: New EXP prefix for the BGE Expression module
The expression module now uses an EXP prefix and it follows a
distribution similar to blender.

Additionally the hash function in EXP_HashedPtr.h was simplified and the
files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused.

Reviewers: campbellbarton, moguri, sybren, hg1

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1221
2015-07-12 16:58:12 +02:00
5b0f674e09 Fix crash in redraw timer
Was modifying wrong regions flag, that could also be NULL.
2015-07-13 00:21:08 +10:00
8d48f8e0b0 Add ability for redraw timer to run for fixed time
Also avoid accessing context vars in timer loop.
2015-07-12 22:57:35 +10:00
2fd3b9ad84 PyAPI: Use separate writes for operator reports
This allows us to temp override the stdout and extract individual reports
2015-07-12 22:26:14 +10:00
532b735ee8 Docs; Py API gotcha's section
Minor corrections and cleanup
2015-07-12 20:50:44 +10:00
5c8fc8e505 Use const for direntry strings 2015-07-12 05:50:07 +10:00
Julian Eisel
8c67b8ffe9 File Browser: Fix possible bug and some minor tweaks
BLI_add_slash appended to a char *, a potential buffer overflow

Also partially removed an assert, which failed after changing file format of a saved image. We need a better way to handle such cases.
2015-07-11 21:44:42 +02:00
7b1489b93b Error in last commit 2015-07-12 05:35:44 +10:00
968351d916 Minor changes for more efficient endian switching 2015-07-12 05:33:04 +10:00
17ebbc06e2 Use const for sculpt vars
resolves building with gcc4.9
2015-07-12 03:50:39 +10:00
5a19d9d8f3 ImBuf: Fix compilation error with older libpng
Older libpng library does not use const pointer to a memory.

The exact version is a bit of a guess here, maybe needs tweaks to it tho.
2015-07-11 19:18:20 +02:00
3a810bfed6 remove redundant casts 2015-07-12 02:53:37 +10:00
eed7efa151 error in own last commit 2015-07-12 02:31:46 +10:00
b610ec50de Add Thai and Khmer charsets to our i18n font. 2015-07-11 18:03:18 +02:00
a6259d4290 Avoid static var for OpenEXR 2015-07-12 01:45:30 +10:00
e42e01875e Make Iris image loading thread-safe
Needed for thumbnails
2015-07-12 01:13:33 +10:00
2410797ab1 ImBuf: cleanup, use const for memory passed in 2015-07-12 01:07:59 +10:00
03d8907ca7 Add some basic report/timing/logging tool as util py module progress_report.
It supports any level of sub-steps, timing, messaging, and uses WindowManage.progress API
to report progress in UI, in addition to console printing.
2015-07-11 16:50:22 +02:00
114e7eaa09 Add WM_framebuffer_to_index_array
Convert buffer to index in one loop,
also minor cleanup to backbuf/selection functions.

- Use IMB_rectcpy instead of inline pixel copy.
- Redundant WM_framebuffer_to_index call.
2015-07-11 23:21:41 +10:00
Julian Eisel
02b3618873 File Browser: Keep file name after changing directory
Actually this was an intentional change in rBaeeb23efa28dc to prevent Blender from trying to open the old file from the new directory. Issue is that this is really bad for saving and basically breaks "Save As".

Some more tweaks were needed to make it work like before, so now it keeps the name of the last selected file, but clears it when selecting a folder.
2015-07-11 05:48:02 +02:00
909fa34c5f BLI_matrix space_transform: Add a 'local-invariant' setter.
`BLI_space_transform_from_matrices()` defines a 'global-invariant' transform
(same point in global space, two different coordinates in local and target spaces).

New `BLI_space_transform_global_from_matrices()` is kind of opposite, it defines
a 'local-invariant' transform (two different points in global space, same coordinates in local and target spaces).

Useful to 'match' meshes.
2015-07-11 00:04:27 +02:00
Julian Eisel
bf3fe67862 Fix T45405: Crash on opening a file (in filebrowser code)
Quoting Bastien from IRC: "Filebrowser is a nest of bad surprises" -- indeed :S
2015-07-10 22:09:14 +02:00
f3d5af4172 Cleanup: use const for mesh functions 2015-07-11 04:39:27 +10:00
0875cb07cc Cleanup: use const for gpu buffer 2015-07-11 03:25:28 +10:00
78cae5bad9 Cleanup: remove redundant includes 2015-07-11 02:49:04 +10:00
3443686399 Sequencer: changes to text effect strip
- default alignment to lower center.
- placement is now relative,
  so changing output size keeps correct placement.
- instead of center override, add align option (left/right/center).

Also don't use pixel-size for setting the font size, on new strips.
Better not have UI prefs impact low level API's.
2015-07-11 02:30:26 +10:00
Julian Eisel
9a3dfa1f21 Fix crash when appending from File Browser
Again own mistake in rBaeeb23efa28dc1
2015-07-10 17:49:58 +02:00
e7a48113a9 Freestyle: Missing __all__ symbols added in D963. 2015-07-10 23:15:59 +09:00
25638a9656 Code cleanup: White space and dead code. 2015-07-10 23:15:57 +09:00
Folkert de Vries
eeeb845d33 Freestyle: new stroke modifiers
This patch introduces a couple new stroke modifiers. The ones currently implemented are based on prototypes by @kjym3 and myself.

The new modifiers:
  - Tangent
  - Thickness noise
  - Crease Angle
  - Simplification
  - Curvature 3D

The documentation for these new modifier types can be found [[ http://www.blender.org/manual/render/freestyle/parameter_editor/index.html | in the manual ]]:

{F134441}
(left: AnisotropicThicknessShader, right: NoiseThicknessShader)

{F140499}
(left: Curvature 3D, right: Simplification)

Author: Folkert de Vries (flokkievids)

Reviewers: kjym3

Subscribers: #user_interface, plasmasolutions, kjym3

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D963
2015-07-10 23:15:56 +09:00
7837f0e833 BLI_math 'compare' cleanup & enhancements.
This commit:
* Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats.
* Makes 'compare_vxvx' functions use that new 'compare_ff' one.
* Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats.
* Adds matching 'compare_vxvx_relative' functions.
* Adds some basic tests for compare_ff_relative.

See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative
(using a very small absolute max_diff), but these do not have exact same behavior...
Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-07-10 15:02:43 +02:00
bbcbd2eed9 REmove stupid apple check on OMP in weightvg modifier.
This is handled in build files...
2015-07-10 09:56:10 +02:00
a8b8d60c50 CustomData: deprecate CD_ID_MCOL 2015-07-10 16:47:39 +10:00
a7ed374459 makesrna: use int64 for rounding check
Harmless but larger values would overflow
2015-07-10 16:42:36 +10:00
66f1c3b882 DNA: replace GCC poison with ifdef for enums 2015-07-10 15:58:50 +10:00
Julian Eisel
5513fdc629 Fix T45398: Saving file from File Browser doesn't work if no file is selected
Own mistake in rBaeeb23efa28dc16e20
2015-07-09 23:48:55 +02:00
Julian Eisel
f766a61626 File Browser: (Re-)Allow selecting '..' parent entry for file navigation
Selecting '..' entry was intentionally disabled in rB76b4fad6dbda1b10c, however, for file navigation this can be really useful. So this basically allows selecting '..' entry again, *if it is the only entry to select*. It won't be selected using box select, select all or when expanding selection.
2015-07-09 19:48:03 +02:00
Julian Eisel
aeeb23efa2 File Browser: Improve usage of Enter-key to open files/directories
From a user-POV this makes following changes:
* Adds support for using the Enter-key to open directories
* Updates the upper text-buttons for file and directory on selection
* Last selected file/directory is opened now (in sync with upper text-buttons)
* Changes text in open button to "Open Directory" if a directory is selected

D1349, Reviewed by @mont29
2015-07-09 18:40:34 +02:00
26bd1a766a Cleanup: warnings 2015-07-09 19:39:37 +10:00
a837797740 Cleanup: quiet warning 2015-07-09 19:33:02 +10:00
980ea4e54f Use it->second instead of (*it).second in KX_BlenderSceneConverter. 2015-07-09 09:45:21 +02:00
cdbb60b0a3 Select Shortest Path for edit-curve
D1391 by @pink.vertex with own fixes/edits
2015-07-09 17:03:00 +10:00
ee1b1b9e59 Curve: change rules wrt active bezier
Activate the vertex even if only a single handle is selected
2015-07-09 14:52:01 +10:00
bbc4a92318 Curve selection, de-duplicate & cleanup 2015-07-09 14:39:24 +10:00
ec64bf17e3 Select Similar for edit-curve
D1381 by @johnroper100 with edits
2015-07-09 03:03:19 +10:00
161bbfcd19 Add BKE_nurb_bpoint_calc_normal 2015-07-09 02:56:04 +10:00
4a328a7689 EditCurve: move selection into own file 2015-07-09 00:09:26 +10:00
de6b4dc7f7 Fix/Cleanup mesh remap dest transformation in tree/source space.
In org work, bvhtree helpers were modifying passed co/no in place according to given transform.

However, during review pass we decided this was bad, and made them modify copies. But this broke
some cases where we'd do extra tests after bvhtree query, expecting tmp_co to be in tree (aka source) space!

Further more, since in quite a few cases we were already doing that transform outside of bvhtree helpers,
decided to remove this alltogether from the helpers - makes things more clear and easy to follow,
avoids needless copy of vector, and ensures we are always using tmp_co in its transformed version!
2015-07-07 19:29:17 +02:00
30b7aafe33 Correct default enum values
Had assert creating cheat sheet
2015-07-07 23:10:08 +10:00
3dc86f586c Cycles: Add debug print about CLEW initialization status 2015-07-07 14:37:12 +02:00
37539962fe Cycles: Add an option to force disable all OpenCL devices
This way it's possible to disable OpenCL devices for AMD devices
which are considered whitelisted.
2015-07-07 14:18:45 +02:00
0c14a897dd BGE: Fix wrong current logic manager in collision callback. 2015-07-07 13:37:27 +02:00
1d021956f5 Remove redundant lists, link instead 2015-07-07 21:25:51 +10:00
86f09e58d4 Remove unnecessary constant info
Noting every constant as an int isnt helping,
this is only meant to be passed to only.
2015-07-07 21:17:33 +10:00
5af1daa2dc Fix for recent error, ngons now flipped correctly 2015-07-07 20:29:13 +10:00
23aa425cd9 Using proper subtype in game object velocity clamping properties.
The game.velocity_{min,max} and game.angular_velocity_{min,max} object
RNA properties did not use a subtype, and thus velocity was always
displayed as radians or blender units instead of the configured units.

Reviewed by: campbellbarton
2015-07-07 11:59:28 +02:00
afa25b1136 Minor simplification for uv edge drawing 2015-07-07 15:08:45 +10:00
Quentin Wenger
6ed1a1abe2 BGE: bge.texture API documentation enhancement
This patch attempts to improve and review the documentation of bge.texture, as requested in the [[ http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/GameEngine#Video_Texture | TODO list ]].

More specifically, it

  - fixes the rst syntax, including titles of the examples bge.texture.py and bge.texture.1.py;

  - adds, standardizes and reviews description of the API elements, particularly signatures, types, etc.

  - adds SOURCE_* constants to the doc

  - splits the doc into thematical parts (Video, Image, Texture, and Filter Classes, Functions, Constants).

Notes:

  - The parameter "mode" of ImageBuff.plot has to be described better. Actually, the whole set of IMB_BLEND_* constants (from IMB_imbuf.h) should be exposed to Python. I'll do that in a future diff, and complete the doc at the same moment (adding those IMB_BLEND_* constants to the Constants part of this doc).

  - The option of using webcams in VideoFFmpeg is still particularly not well documented. I am planning to make a proposal about fixing T18634 (and its corresponding TODO in the list) by integrating OpenCV in the BGE (and Blender?). The idea would then probably be to add a new class, f.ex. ImageWebcam, making this functionnality more specialized. So for now I don't think it is worth to document that part much.

This patch fixes T44284 too.

Reviewers: moguri, kupoman, campbellbarton, panzergame, lordloki

Reviewed By: panzergame, lordloki

Subscribers: hg1

Projects: #game_engine, #game_python, #documentation

Maniphest Tasks: T44284

Differential Revision: https://developer.blender.org/D1352
2015-07-06 21:48:25 +02:00
791b5fe9d0 Fix T45331, a bevel regression for 2.75.
Got bad results when two beveled edges form straight line
and there are two or more unbeveled edges attached to either
side of the connecting vertex.
2015-07-06 13:27:01 -04:00
Dalai Felinto
93608e4f3b Fix T45237: Dither does not work 2015-07-06 11:51:40 -03:00
Dalai Felinto
6a132aa65d Fix T45290: Selecting passes in image editor does no longer work
This issue was introduced with the wrong fix I committed for dither (rB56ca7f34)
Which also means T45237 has to be re-open
2015-07-06 11:15:16 -03:00
12583287e7 BGE: Fix T45341: Crash when camera is eliminated
A null check is added to avoid crashes when the camera is removed during
the game and no other is available
2015-07-06 15:40:50 +02:00
266459c7da Fix T45328: Crash upon finishing render with 'Cache Result' enabled 2015-07-06 12:35:11 +02:00
be07ab58c6 BGE Fix T45207: Camera actuator shakes with low height
The camera-aiming code was using a near-zero-length cross product, which
caused oscillations. Thresholding on the cross product length seems to
fix this.

Reviewers: lucky3, Matpi, lordloki

Reviewed By: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1387
2015-07-06 12:20:29 +02:00
28d712b238 Remove redundant face-flipping check 2015-07-06 19:21:19 +10:00
72565fbf30 Cleanup: style, spelling 2015-07-06 17:45:11 +10:00
499308d079 CMake: use cmake commands where possible 2015-07-06 13:34:32 +10:00
15c301f533 Change default for bevel to match previous behavior.
Have reconsidered and feel it best to try matching previous behavior
(doing "loop slides" where possible) as default. This will avoid the
need to change regression tests, among other things.
2015-07-05 13:31:26 -04:00
12aff8d783 Add 'loop slide' option to bevel. See T45260
Current behavior of bevel is to 'loop slide' along unbeveled edges
when possible, but this produces uneven bevel widths sometimes,
so this option lets user choose between having the loop slide effect
or having more even bevel widths. Trying it out with default being
'no loop slide', so different from current behavior. May reverse this
choice later, depending on user reactions.
2015-07-05 09:53:17 -04:00
51e9a814c9 Correct vert-slide helper-line scale
Was invalid in perspective view
2015-07-05 22:35:04 +10:00
6022bfbc05 Correct comment 2015-07-05 22:19:01 +10:00
2b63ec2894 Fix T45319: Set same precision for 3D cursor location as other locations (objects', vertices', etc.). 2015-07-05 10:55:59 +02:00
6de7f3c747 GPencil: use ctrl+x/del for dissolve
Move dissolve into own operator (as with mesh/armature)
2015-07-05 14:34:17 +10:00
68d72e2164 Add key toggle (V) to bevel tool to turn vertex-only on/off. 2015-07-04 10:14:47 -04:00
8d15cad449 Cleanup: Typo in comment. 2015-07-04 13:17:29 +02:00
631b53bad4 RNA: Match enum string to UI name
Having different terminology for enum's is confusing for scripters.
2015-07-04 13:02:59 +10:00
b997bda9f9 BGE: Fix T45259 collision sensor registration. 2015-07-03 23:48:26 +02:00
749f346ce0 BGE: Add alpha to coverage render mode.
This patch add a new option for transparency meshes : Alpha to coverage, in the game setting panel in material.
The alpha to coverage request a multisample, the best is 8x but 4x and 2x can also give nice render.

4x alpha clip : http://www.pasteall.org/pic/show.php?id=89464
4x alpha to coverage : http://www.pasteall.org/pic/show.php?id=89463

Reviewers: moguri, kupoman, campbellbarton, psy-fi

Reviewed By: psy-fi

Subscribers: lordloki, rdb

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1354
2015-07-03 19:03:29 +02:00
c503d17353 Fix T45281: IOR Value Slider with "Ctrl" modifier does not increment as intended.
Looks like a typo in rB1b8069bd?
2015-07-03 18:56:59 +02:00
e42609db49 Fix T45283: Blender crashes on some grayscale PNGs with alpha.
PNG_COLOR_TYPE_GRAY colortype can have some values for alpha, in the same way as
PNG_COLOR_TYPE_PALETTE colortype.

In this case, we need two channels (grayscale and alpha), not one.
2015-07-03 18:30:58 +02:00
97b431e42d BGE: Add integer uniforms for 2D Filter
Actually it is only possible to pass float properties to a 2D filter (GLSL fragment shader).
This patch allows also to use integer properties for the 2D filter.

Reviewers: sybren, agoose77, kupoman, moguri, lordloki, panzergame

Reviewed By: lordloki, panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1370
2015-07-03 17:07:31 +02:00
1ace3272aa Walk mode: Add modal shortcuts in UI (header help message). 2015-07-03 15:55:22 +02:00
9133f5a357 Cleanup: 'return' parameters to the end of functions, and use 'r_' prefix for them. 2015-07-03 15:55:22 +02:00
947cdb3acd UI: add ability to access/generate 'shortcuts strings' of modal keymaps.
We already had that for global keymaps (used e.g. to generate shortcuts for menu entries),
but this wasn’t possible for modal keymaps yet (e.g. help message in header during
transforms and other modal operation).

This commit only adds needing background code, it does not change anything from user PoV.
Modal operators will be updated to use it in comming weeks.

Thanks to Campbell for revisions & suggestions. :)

Differential Revision: https://developer.blender.org/D780
2015-07-03 15:55:22 +02:00
36426c3ee2 Cycles: Code cleanup, double semicolon 2015-07-03 15:44:57 +02:00
3129685f38 Sequencer: srt export support.
This commit adds a new operator that will compile the list of text
strips into an srt file. No positioning is supported yet but will
be added later.

The operator can be found in the effect panel in the strip properties.
2015-07-03 12:38:43 +02:00
c864f5d140 Cycles: Error enqueueing split kernels should no longer cause infinite loop 2015-07-03 12:13:38 +02:00
145ab8c49e BGE: Extend Python API for KX_BlenderMaterial (specular, diffuse…)
Add support for material diffuse, specular… in KX_BlenderMaterial python proxy. And use mathutils in KX_BlenderMaterial for the specular and diffuse color in KX_BlenderMaterial.

Reviewers: sybren, brita_, kupoman, agoose77, dfelinto, moguri, campbellbarton, hg1

Reviewed By: moguri, campbellbarton, hg1

Subscribers: dfelinto

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1298
2015-07-03 11:47:48 +02:00
659e5234af Cycles: Use explicit indices for split kernel queues 2015-07-03 11:05:28 +02:00
b9f89b1647 Cycles: Code cleanup in split kernel, whitespaces 2015-07-03 11:03:56 +02:00
Dalai Felinto
80f344fd95 Multi-View UI: convergence is only useless for the parallel camera (toe-in still uses it) 2015-07-03 01:11:35 -03:00
c702dabc3d Fix vertex slide regression w/ rotated objects
This could only be done with certain rotations.
2015-07-03 10:57:38 +10:00
2b5e150db0 BLI_GHash: add BLI_gset_str_new helpers. 2015-07-02 20:35:05 +02:00
626a287c89 Support debug contexts on win32 2015-07-02 20:06:02 +02:00
00808eb39a Make OpenGL debug contexts a flag --debug-gpu instead of a compile time
option.

This makes sense, since contexts get created at runtime, there is little
reason to require recompilation for this.

Only works on linux currently, will be doing more OSs later
2015-07-02 19:30:17 +02:00
Dalai Felinto
a5b2841aa0 RNA Doc: Camera shift affects all cameras (perspective, orthographic and even panoramic) 2015-07-02 13:53:36 -03:00
Dalai Felinto
fdb474fc8a Game Engine: Camera Lens Shift: support to change it during game 2015-07-02 13:51:30 -03:00
145d3540b3 Text effect strip for sequencer.
Is pretty much what it says :)
Easy subtitles for everyone!

Supports size, positioning,
a cheap shadow effect (probably will need more work),
and autocentering on x axis.

Now you can go wild with long spanish names
in your soap opera videos.

Will probably be refined as days go by,
but at least it's now ready for testing.
2015-07-02 18:46:46 +02:00
2723d10704 Render: Solve wrong vertex parent in linked objects with Locked UI
The cleanup function was a bit too much aggressive here, made it much more
conservative. It means memory usage will not be so low anymore, and to
address this we'll need to make this function depsgraph aware.
2015-07-02 16:12:08 +02:00
84b8ce32a4 Fix crash in background mode after the NDof deadzone commit 2015-07-02 15:59:12 +02:00
d96842bf19 Fix: Keyframe indicators for NLA Strip properties fails if the AnimData has an active action 2015-07-02 23:39:34 +12:00
fabc4fc720 BGE: remove check for area in start-game operator
This prevented the BGE from being started from the command-line,
the exec() function checked already.

Also use API calls to find area, region.
2015-07-02 21:31:39 +10:00
e61ead7d4c BGE: Fix T45267 Lib load without material caching. 2015-07-02 12:27:14 +02:00
db8ccc18f7 Fix T45269: Blender 2.75 crashes when I run my the game
Velocity clamping on static objects caused a crash.
2015-07-02 12:05:49 +02:00
e80e4c937b BGE: Fix T45196 armature action on libloading. 2015-07-02 11:56:49 +02:00
1393695145 Linux desktop spec: Add a 'Keyword' field. 2015-07-02 08:53:45 +02:00
1844160a22 DerivedMesh: cleanup & minor edirs
- place return args last position
- move crazyspace function out of DerivedMesh header
- use bool for args
- flow control on own lines to ease debugging
2015-07-02 16:20:22 +10:00
10c1f208b7 Minor edits to --help 2015-07-02 13:17:06 +10:00
Julian Eisel
b05cf040cb Cleanup: Use bool instead of int 2015-07-01 21:48:42 +02:00
5edff01920 Transform: use snap-to-grid behavior from D910
Excuse the trashing here, but seems users prefer this most (though both can be useful).

Note that the UI remains the same,
so this is an option for 'Incremental' snapping instead of a new snapping mode.
2015-07-02 02:20:54 +10:00
19da2d4124 Linux XDesktop spec: add '%f' file specifier to 'Exec' field.
Also reorder alphabetically generic names & comments, and add french comment.
2015-07-01 17:40:34 +02:00
12a8d7e6c4 Cleanup: Make select grouped effect code a bit more readable 2015-07-01 17:37:14 +02:00
6781cf0049 Refactoring:
Make sure SEQ_TYPE_EFFECT is only used as a flag, not as number
comparison.
This should allow us to add new non-effect types in between
effect types (every 8 indices).

Dirty, but alternative of separating type/subtype means we lose
forward compatibility.
2015-07-01 17:33:10 +02:00
607dca0705 BGE: Fix T44069 playing action during libfree. 2015-07-01 16:51:48 +02:00
d3709f4e79 Correct --help message 2015-07-02 00:24:10 +10:00
1a44237d82 Removing gaps will now also move the scene markers, unless markers are
locked
2015-07-01 16:25:28 +02:00
f525483d83 Sequencer metadata:
Add option to render strip metadata to final result, bypassing current
scene metadata.
2015-07-01 15:23:21 +02:00
0e084f93d9 BGE: Remove KX_PolygonMaterial reference in documentation. 2015-07-01 14:56:02 +02:00
d3109a1937 BPlayer compile fix © 2015-07-01 12:34:04 +02:00
53d12bbe04 atomic_ops: Fix MSVC versions of add/sub returning original value instead of result of operation.
Thanks to Brecht for tip about how to fix this!
2015-07-01 12:25:32 +02:00
174d5cf627 atomic_ops: fix typo in func names (uint32 instead of uint64). 2015-07-01 12:25:31 +02:00
78de47ca24 Cycles: Fix zero-size buffer allocation with OpenCL devices
This is not really supported by OpenCL but might happen in certain
configurations. There might be some remained cases when this happens
but so far can not find any,
2015-07-01 11:56:48 +02:00
9b64ebc605 Fix T45253: Particle emitter volume mode and grid mode broken in 2.75.x
This is a regression since dced56f and root of the issue comes to the fact
that grid distribution sets UNEXIST flag during distribution, which is then
being reset in initialize_all_particles().

This commit solves the issue, but it's not really nice and some smart guy
might want to revisit it.
2015-07-01 10:32:30 +02:00
95a1e99909 Particles: Code cleanup, whitespace 2015-07-01 09:33:52 +02:00
a77edab320 Cleanup: use bools 2015-07-01 16:57:18 +10:00
58d65dd976 Cleanup: use cross_v2v2 function 2015-07-01 16:37:05 +10:00
d9046ccbd4 Cleanup: doxygen comments 2015-07-01 16:30:26 +10:00
1779452eb4 Cleanup: use swap math funcs 2015-07-01 16:02:30 +10:00
45b2218341 User Prefs for NDOF dead-zone
D1344 with edits
2015-07-01 13:45:19 +10:00
b71c27a446 Use macro for user-prefs version checks 2015-07-01 12:48:53 +10:00
cf1bac3f69 Cycles: Solve some harmless NULL pointer magic
Was harmless but confused some sanity checks, also kinda makes sense
to be more verbose about what's going on there.
2015-06-30 23:41:19 +02:00
Julian Eisel
5e9b43cc61 Fix 1px gap in regions drawn with region overlap 2015-06-30 21:04:25 +02:00
6510e40500 Fix T45240: New depsgraph ignores animation applied on the curve data 2015-06-30 18:11:21 +02:00
21db9fff12 Fix T45238: New depsgraph flickers with the lattice modifier 2015-06-30 18:00:24 +02:00
00bfca2178 Fix T45241: New depsgraph was lacking update of python drivers on time change
It's quite tricky to see if the driver actually depends on time or not,
so currently used approach when we'll be doing some extra updates.

This seems to correspond to how old depsgraph was dealing with this.
2015-06-30 17:34:57 +02:00
c1d6a26842 Fix T45239: New depsgraph does not work with IK pole target 2015-06-30 16:48:43 +02:00
7039808899 Fix T45251 custom directory not taken into account for image proxies. 2015-06-30 16:31:30 +02:00
72d21fbd34 Fix for mistake in grid-snap patch 2015-06-30 23:55:14 +10:00
6de17c60bf Select flush deleting edgeloop in edge mode too 2015-06-30 22:50:32 +10:00
df19da3a8b CMake: remove helper text
Its out of date, better use the wiki building docs.
2015-06-30 22:46:55 +10:00
3bb698646a CMake: minor edits 2015-06-30 22:44:27 +10:00
c07bba1b05 Transform: add back absolute snapping option
This ensures that vertices are grid-aligned while transforming,
instead of just snapping the input values for translate.
2015-06-30 19:14:46 +10:00
5d3ba4fb80 Cleanup: transform grid snap round, not floor 2015-06-30 18:26:37 +10:00
cec0138bcc Note that closest_point_on_mesh is in object space 2015-06-30 15:47:44 +10:00
cfd36476a1 Cleanup: use const for screen functions 2015-06-30 15:31:55 +10:00
d59721e47a Cleanup: move BLI_char_switch into BLI_string 2015-06-30 15:18:03 +10:00
d17cb3f75f Cleanup: use BLI_str prefix for BLI_replacestrN 2015-06-30 14:50:34 +10:00
8bef305b6d Cleanup: move BLI_timestr to BLI_timecode 2015-06-30 14:47:31 +10:00
Dalai Felinto
56ca7f34dd Fix T45237: Dither dosn't work in Blender Internal Renderer after Multi-View 2015-06-29 18:10:15 -03:00
Julian Eisel
40d19b519d Node Editor: Use Smaller Factor for Grid Snapping
An attempt to treat @sebastian_k's blood pressure a bit.
2015-06-29 22:05:13 +02:00
079b41dd37 Remove WITH_TESTS_PERFORMANCE option.
Performance tests now have their own CMake macro, which ensures they do not get
added to ctest list, so we do not have to bother about them anymore, and can always
build them (when GTests are enabled, of course).
2015-06-29 20:26:58 +02:00
117bcfe039 GTests: do not add 'performance' tests to auto-ran tests (with ctest or 'make test')... 2015-06-29 18:15:02 +02:00
a8bc5f0cdb Fix .obj testing. 2015-06-29 18:14:27 +02:00
Dalai Felinto
f12b1790a0 Fix 73841 : Game Engine - Camera Lens Shift
This is essential for video projection, and the alternative until now was to manually change the projection matrix via Python.
( http://www.blender.org/manual/game_engine/camera/introduction.html#camera-lens-shift
- this page will be removed as soon as I commit this)

Also this is working for perspective and orto cameras BUT if the sensor is not AUTO it will only look correct in blenderplayer (this is an unrelated bug, but just in case someone runs into it while testing this, now you know why you got the issue).

Kudos for the BlenderVR project for supporting this feature development.

Differential Revision: https://developer.blender.org/D1379
2015-06-29 10:45:27 -03:00
Dalai Felinto
3d12d4b94f Fix T45234: Stereo Parallel vs. Off-Axis
Parallel rendering was not working.

The idea of having parallel convergence mode to render as parallel but
visualize as off-axis was good, but it was leading to some complications
in the code.

I think it's more clear to the user if parallel looks and render as
parallel, and if she wants to pre-visualize the converged planes, simply
temporarily set the camera to off-axis.
2015-06-29 10:24:25 -03:00
295d0c52a2 Fix T45022: Update missing when linking objects with new depsgraph 2015-06-29 12:59:21 +02:00
e35a26fbef Fix T45156: scaling region crash 2015-06-29 20:48:00 +10:00
6654ec7de7 Fix T45154: Translation binary file(blender.mo) for Japanese is too small
The issue was caused by some changes made to msgfmt which were needed to make
modified (cleaned-up, stripped-comments messages) working.

Unfortunately that fix was merged into the release branch, so this fix is to
be ported there as well and verified against rc1 translations.
2015-06-29 12:27:59 +02:00
827ccc343f Partial fix T45156: scaling region crash
'ar->winy' may not be initialized, making regions zoom in (past limits)
and attempt to draw very large text (~10x10k size characters), often crashing.

Fix isn't complete since it only corrects factory startup.
2015-06-29 16:49:23 +10:00
e6f7f36e40 Cleanup: Style in for loops header. 2015-06-29 00:56:04 +02:00
e245a57640 Fix T45227: Light optimization commit broke world MIS 2015-06-28 20:47:35 +02:00
68478aea01 Cycles: Avoid having duplication of BVH arrays during build
Previous idea behind having vector during building and array for actual storage
was needed in order to minimize amount of re-allocations happening during the
build, but it lead to double memory overhead used by those arrays at the vector
to array conversion stage.

Issue with such approach was that for BVH without spatial split size of arrays
is known in advance and it never changes, which made vector to array conversion
totally redundant.

Also after testing with several rather complex from spatial split scenes (such
as trees) it seems even conservative approach of reallocation (when we perform
re-allocation when leaf does not fit into the memory) doesn't give measurable
difference in time.

This makes it so we can switch to array, which will avoid unneeded memory
re-allocations when spatial split is disabled without harming other cases.

it's a bit difficult to measure exact benefit of this change on our production
files here, but depending on the scene it might give quite reasonable memory
save.
2015-06-28 18:15:25 +02:00
b506f3d328 Cycles: Add assert to an array at() function to be sure we don't have bad memory access 2015-06-28 18:15:25 +02:00
d9ef528d05 Cycles: Minor code style cleanup, whitesaces 2015-06-28 18:15:25 +02:00
9f48aa45ad BGE: added clamping of angular velocity.
Angular velocity clamping was missing from the BGE. It is implemented
similarly to the linear velocity clamping. It is needed to be able to
drive physical simulations of systems that have a limited rotational
speed.

Reviewed by: campbellbarton, panzergame, ton

Differential Revision: https://developer.blender.org/D1365
2015-06-28 12:54:53 +02:00
c5c2883ce0 BGE Fix: apply velocity clamping on every physics subtick
This patch uses the Bullet "internal tick callback" functionality to
ensure that velocity clamping is performed after every physics update.
This makes a difference when physics subticks > 1, as in that case the
too-high velocity could have impacted the simulation.

This patch follows the examples at [1] and [2]; the latter example
also explains that the way we limit velocity in the BGE (before this
patch) is wrong.

[1] http://bulletphysics.org/mediawiki-1.5.8/index.php/Simulation_Tick_Callbacks
[2] http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Code_Snippets#I_want_to_cap_the_speed_of_my_spaceship;

Reviewed by: panzergame

Differential Revision: https://developer.blender.org/D1364
2015-06-28 12:54:53 +02:00
32319dd106 Cleanup: remove BLI prefix from BKE funcs 2015-06-28 19:09:52 +10:00
2ef3c43c5d Fix T45214: BI render: maximum saturation bug in shadow pass with non-shadow lighting.
In case scene lighting would only have non-shadow light source, shadow intensity
would remain to 'pitch black'...
2015-06-28 10:53:07 +02:00
3d616ccba8 Temporarily disable absolute snapping
This really should have been finalized as a design task first,
there are too many open topics on how it should work.
2015-06-28 10:13:11 +10:00
aac5485fca Fix T45216: File Browser shows negative sizes for large files.
Simply backport small part of work from asset-experiments here (using double and
adding tera-bytes unit), looks like off_t is not always 64bits even on a 64bit OS...
2015-06-27 23:39:48 +02:00
008da0ff5e Cycles: Use aligned blender allocator when using guarded allocation
This way we solve possible issues caused by regular allocator not being aware of
some classes preferring 16 bytes alignment needed for SSE to work properly. This
caused random crashes during rendering.

Now we always use aligned allocation in GuardedAllocator which shouldn't be any
measurable performance impact and the code is only used by developers after
defining special symbol, so there is no impact on release builds at all.
2015-06-27 21:07:43 +02:00
3d7329950e OpenGL debug contexts:
Enable debug output in debug contexts for gl 4.3+
2015-06-27 17:20:30 +02:00
4d74180b9f Cycles: Fix for wrong device enumeration in CUDA
it is the same issue as described in the previous commit, original changes
in this area were wrong and only worked on a bugger optimus driver which
simply appeared to work by co-incident and in fact used wrong device..
2015-06-27 15:13:08 +02:00
09dc470982 Cycles: Rework the way how OpenCL devices are created
It was annoying copy-paste happened across OpenCL device constructor, device
enumeration and split kernel checks. Now those areas are using an utility
function which returns pairs of platform and device IDs for devices which are
supported by Cycles and enumeration is happening inside that list.

This makes it so filtering is happening in a single place, so there's no need
to keep 3 different functions in sync.

This commit also fixes a bug with wrong enumeration of devices caused by recent
fixes. Those fixes were in fact wrong and only happened to appear to be working
on laptop with optimus card on Linux. Root of those issues is in fact in bad
Linux driver for optimus cards.
2015-06-27 15:13:08 +02:00
17f12fc71a Cycles: Allow using custom allocators for vector class 2015-06-27 15:13:08 +02:00
9260c0c2ba Cycles: Ignore light which has no contribution to the scene
This commit makes it so light which has zero energy or doesn't has
emission shader at all is being ignored by the path tracing.
2015-06-27 15:13:08 +02:00
48ef0501b7 Transform: absolute grid snapping
D910 by @donfabio with edits

New icon for menu is still TODO
2015-06-27 20:03:28 +10:00
e2d3e36ca7 Cycles standalone: add support for reading UV coordinates to the XML scene reader 2015-06-27 12:05:05 +02:00
c68322c7e5 Cleanup: int/uint mismatch in printf... 2015-06-27 11:02:58 +02:00
e170d6be7f Cleanup: all params of BLI_str partition funcs can be const... 2015-06-27 11:00:47 +02:00
ecb6a6df52 OpenEXR cleanup: get rid of public IMB_exr_split_token, use BLI str helpers instead of own cooking. 2015-06-27 10:24:54 +02:00
ff7a46cfad GTests for new 'end' option of BLI_str_partition_ex(). 2015-06-27 10:24:54 +02:00
4d043c99dc Extend BLI_str_partition_ex: add possibility to define a right limit to the string.
Now you can define `end` pointer as right limit of the string (allows to easily search
in substring, especially useful when searching from right).
2015-06-27 10:24:54 +02:00
e78b03f9e9 Fix part of code in load_image_single() wrongly disabled when WITH_OPENEXR was disabled. 2015-06-27 10:24:54 +02:00
ab85c5f980 Fix crasher when loading multiview OpenEXR image.
With multiview/multilayer OpenEXR file, `load_image_single()` will return NULL ibuf,
since it has already populated ima (with `image_create_multiview()` or
`image_create_multilayer()` calls).

Also, added some more checks before doing `IMB_ImBufFromStereo3d()`, to be sure
we do have enough slots in ibuf_arr, and we do not overwrite second ibuf either.
2015-06-27 10:24:54 +02:00
851d7535d9 Fix T45204: String Splitting Function Bug: Using OpenEXR function even if compiled without OpenEXR.
Seriously!!!

Also, fix a potential buffer overrun here.

This should be backported to final release.
2015-06-27 10:24:54 +02:00
ddeb8c595f Cleanup: Fix a typo in world MIS.
Found by Lukas Stockner, thanks!
2015-06-26 21:36:28 +02:00
c58b5acefd Fix crash on undoing after 8690ea6
Forgot to clear the mutex when reloading the scene.
2015-06-26 17:50:08 +02:00
79c106705a Make code compile with GPU_DEBUG 2015-06-26 17:40:54 +02:00
8690ea611e Fix T45199 crash when editing material nodes.
Issue is data race between preview job and GPU nodetree evaluation when
localizing the nodetree. Data race happens due to localizations doing
overrides on original nodes' new_node variable.

Solution here could probably be to use a hash for mapping of old to new
nodes but will prefer simple brute force lock for now.
2015-06-26 14:47:53 +02:00
09e89f01a6 Cleanup: transform center
store global center in transform struct,
some code was calculating all the time, this is useful to keep available.
2015-06-26 16:21:04 +10:00
c74255181e Cleanup: transform aspect
Transform code had duplicate aspect checking,
now store aspect in TransInfo.aspect for reuse.
2015-06-26 15:45:09 +10:00
2cdcb1c171 Revert "Fix off by one error in display of start/end frame in sequencer."
This reverts commit 0e02ad8b64.

Initial commit was done so visual result fits with animation cursor
in timeline but this makes it so it looks like one extra frame is
rendered. Other idea would be to render one less frame for sequencer
but this is not so nice either. Generally here's no way to be
fully consistent here, but at least let's be workflow-consistent
2015-06-25 20:10:30 +02:00
0e83b0854f Fix T45191 Speed strip behaviour not easy to predict.
Code here calculated speed based on underlying strip start position,
which was not really visible, making prediction of the result really
difficult. Things here are simple: As long as the strip exists,
manipulate the current frame by the provided factor.
2015-06-25 19:49:08 +02:00
284d294f2c Fix T45190 effect muting does not restore original sequencer display. 2015-06-25 18:21:58 +02:00
c0ea3099c5 Correct error in recent refactor
Closed loops missed last line
2015-06-25 22:11:25 +10:00
ef57051e9c Select flush was missing in delete edge-loop 2015-06-25 21:06:47 +10:00
8e95303414 splash fix, previous had color conversion error 2015-06-25 18:44:45 +10:00
c40205738b Weight Paint: replace Blend with Smooth tool
Improved behavior

- can smooth # iterations
- option to expand/contract weights
- optionally mix with all/selected/unselected
2015-06-25 16:17:24 +10:00
ba98e6148b API calls for converting weights to float array 2015-06-25 16:17:24 +10:00
42314b32f2 Cleanup: generalize weight paint poll function 2015-06-25 08:32:09 +10:00
Quentin Wenger
6f17fb8630 BGE: Missing dot in 2d filter actuator documentation. 2015-06-24 22:34:55 +02:00
Quentin Wenger
fc668df245 BGE: Fix 2dfilter actuator mode constants. 2015-06-24 15:31:55 +02:00
Quentin Wenger
49aa7b1261 BGE: Fix color used as background in VideoTexture.
Now we use color converted (if we do a color management) by the setter for background color in VideoTexture (ImageRender & ImageMirror).

Reviewers:panzergame
2015-06-24 13:03:23 +02:00
1676fcded0 WeightPaint Blend: don't stack mem for dverts
Bad assumption since this could be a large list
2015-06-24 20:42:02 +10:00
c40759e678 Cleanup: warnings 2015-06-24 18:42:16 +10:00
a09af2dc7b Fix edge/vert slide UV-correct, small face error
Decrease epsilon to prevent flickering with small faces.
2015-06-24 11:21:54 +10:00
9ce738e0f6 Fix edge/vert slide UV-correct & non-planar faces
non-flat ngons would give instability (bad UV's).
2015-06-24 11:21:54 +10:00
a33b1ce500 Correct recent error 2015-06-24 11:21:54 +10:00
Dalai Felinto
227aefc18b RNA: exposing image_user settings for ImageTextureNodes
This is required in order to access image sequence frame_duration and
frame_offset among other settings.
2015-06-23 21:19:58 -03:00
0d4cca6593 Fix edge/vert slide UV-correct & zero length edges
When calculating loop angle weighting, skip overlapping vertices.
2015-06-24 09:54:23 +10:00
f1bad1d16b Improve dist_***_to_corner_v3v3v3 precision
Remove offset before calculating distance.

Define 'plane3' to BLI_math, since we often don't need the 4th component.
2015-06-24 07:21:11 +10:00
40a345a9c7 Cleanup: style 2015-06-24 05:13:43 +10:00
04e9a707f4 Subsurf: Make color layer aquisition order for textured draw match
cdderivedmesh
2015-06-23 17:48:46 +02:00
b318795c3b Fix T45051: Curve parent bug.
PARCURVE is deprecated parting type, should never have been exposed to user!

Not a regression, but safe enough for final 2.75 imho.
2015-06-23 17:35:55 +02:00
90b4131d16 BGE: Fix 57065a, missing dots. 2015-06-23 14:57:38 +02:00
57065a6df5 Minor tweaks to bge.constraints docs 2015-06-23 21:58:08 +10:00
1c251d7cb6 Update bge.constraints API doc
D1357 by @Matpi with edits.
2015-06-23 21:37:28 +10:00
72e812de7c Fix T45123: 2D line intersection fails
Co-linear lines could detect as intersecting even if they weren't overlapping.
2015-06-23 21:01:12 +10:00
ec8e0336a9 Cleanup: use 2d math funcs for line intersection 2015-06-23 21:01:11 +10:00
7ecb199d86 Fix stupid mistake 2015-06-23 12:58:33 +02:00
cb5aecdae9 Code cleanup: Use enums for redraw timer operator, makes things more
readable
2015-06-23 12:53:33 +02:00
91fde2891c Fix edge drawing, total loose edges can only be determined -after- the
edge buffer has been setup (this is where they are counted)
2015-06-23 12:06:36 +02:00
cd7853be22 CMake: quiet warnings in GTest 2015-06-23 14:34:52 +10:00
4e8092e2e4 CMake: support multiple args to remove_cc_flag 2015-06-23 14:30:08 +10:00
f1917a2188 Allow editing the text editor line directly
Alternate solution for T44855
2015-06-23 10:17:00 +10:00
d6e180e75a Fix T45117: Dark dupli-face objects (regression) 2015-06-23 08:02:00 +10:00
74f7ef1240 Missed changing default arg in addon_utils.disable 2015-06-23 07:25:10 +10:00
e2fa6663d3 Fix T44320: UV island overlap considered linked 2015-06-23 07:07:52 +10:00
80192b5391 Fixed compilation error in editor/animation/anim_markers 2015-06-22 20:38:25 +02:00
Julian Eisel
f0c5ed39ee Fix T45149: Normal Node shows a hole in its sphere with heigh scale facs 2015-06-22 20:35:49 +02:00
211a95b538 Fix T45034: MirrorBall rendering on wrong camera axis
This was a mistake in the original code from D1079.

With the current way how direction ot mirror ball works camera should look
into negative Y direction. Corrected it in the camera matrix synchronization,
so no extra calculations are needed at the render time.

That's a bit annoying, but we'd better port it to the release branch, or
otherwise we'll end up with files created with wrong camera mapping after
2.75 release.
2015-06-22 20:09:52 +02:00
a1609791ca Fix T45148, stupid own mistake, the two functions are not the same,
shouldn't have collapsed them
2015-06-22 19:40:07 +02:00
4faccf0a78 Revert "Lock markers now also disallows selection of markers"
This reverts commit 37fd262805.
2015-06-22 19:40:07 +02:00
d979ac4cc9 BGE: Fix T45110, T44174, armature animations update and mirror render.
Reveiwers:Moguri, Matpi, youle
2015-06-22 18:16:31 +02:00
5e241e3028 Fix T45145, multiview selection fix not working for scaled matrices.
Multiview code already accounts for scale, do not scale frame before
multiplying with matrix.
2015-06-22 15:55:36 +02:00
7119a0f67d Fix T45136, only draw edges if there's something to draw. 2015-06-22 15:18:04 +02:00
3044e9fd31 Cycles: Respect duplicator's object motion blur settings
The idea is to make it possible to control linked duplicated objects motion
blur from the scene file without need to do overrides on the linked object
settings. Currently only supported for dupligroup duplication and all now
if duplicator object has motion blur disabled then it'll be inherited into
all the duplicated objects.

There should be no regressions/changes in look of existing files because
objects do have motion blur enabled by default.
2015-06-22 13:53:04 +02:00
b5b8599342 Fix T45144: Multi-value-edit ignored range 2015-06-22 19:36:30 +10:00
63c9f51133 Fix camera stereo logic use /w regular select 2015-06-22 18:23:59 +10:00
c119187be0 Fix T45133: Crash drawing material buttons 2015-06-22 16:51:22 +10:00
63f62cd757 Fix memory leak /w multi-drag over a single button 2015-06-22 08:27:56 +10:00
857c9e14f7 Cleanup: Get rid of some ugly magic numbers... 2015-06-21 22:37:39 +02:00
43f6ed908f Fix T45135: More cleanup of extreme max values in operator properties.
INT_/FLOAT_MAX are sometimes valid choices, but most of the time more
sensible values should be used here!
2015-06-21 21:56:35 +02:00
6057548058 Fix/Cleanup possibility to type insane values in 'add' operators options.
Our 'hard limit' values was too often max_int/float here, mis-typing could
lead to crash (or infinite hanging) of Blender, see e.g.
http://blender.stackexchange.com/questions/32790/blender-forces-computer-to-reboot-after-mistyping-extreme-value-for-resolution-i
2015-06-21 16:06:44 +02:00
8be4d76204 Change defaults for planar-face tool 2015-06-21 12:52:37 +10:00
9ddb624a88 Cleanup: quiet warning 2015-06-21 12:33:55 +10:00
8d752141ce Support for platforms /wo malloc_usable_size
Was only used for stats, netbsd doesn't define this function.
2015-06-21 12:33:55 +10:00
e3d6269ec4 BMesh: replace BLI_array -> BLI_stack 2015-06-21 09:46:12 +10:00
cdb0cf3ec7 BMesh: replace BLI_array -> BLI_stack
Also use more direct custom-data access.
2015-06-21 09:19:12 +10:00
aeda4dca77 Threads: Cache result of syscall when querying number of system threads
Number of system threads is quite difficult to change without need of blender
restart, so we can cache result of the systcalls (which are not really cheap)
in order to be able to call BLI_system_thread_count() without worrying of
performance issues in that function.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1342
2015-06-20 22:10:30 +02:00
a95b0e0e9d Cycles: Another fix for OSX, sm_50 experimental actually also fails to compile
Didn't notice it originally because compilation was threaded.
2015-06-20 19:40:23 +02:00
5e2835037a Cycles: Tweak to previous commit, experimental sm_52 works on Linux but not OSX 2015-06-20 19:01:24 +02:00
34d665a4a4 Cycles: Un-inline triangle_intersect_precalc() on Apple OpenCL
This gives quite the same problems as experimental CUDA kernels
and for until it's found a root cause of the problem we'd just
explicitly uninline the function.
2015-06-20 18:00:30 +02:00
63dd554ff1 Cycles: Don't show pre-sm_20 CUDA cards in the device list 2015-06-20 17:34:12 +02:00
5a4b51992e SCons: Enable sm_52 CUDA kernel on all platforms 2015-06-20 17:01:21 +02:00
845854959f Cycles: Cleanup, make it more obvious which platform requires workaround for triangle intersection
Should be no functional changes.
2015-06-20 17:01:21 +02:00
2a305580b2 BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy
Fix T38030.
In c++ source we use one list for triangles and an other for quads, but KX_PolyProxy doesn't care about that and return the vertex offset in its list. So we just have to compute the offset of each RAS_DisplayArray to its previous to have an absolute vertex index.

Reviewers: moguri, campbellbarton, kupoman, agoose77, brita_, hg1

Reviewed By: agoose77, hg1

Projects: #game_engine

Maniphest Tasks: T38030

Differential Revision: https://developer.blender.org/D1324
2015-06-20 14:21:31 +02:00
6b3a43ccb4 BGE: dissallow calling reverse on internal clists 2015-06-20 20:02:16 +10:00
b6820c9522 missed last commit 2015-06-20 19:47:34 +10:00
e019d8fb8c Transform: UV islands were split by winding
This meant front/back faces from a projection would be seen as separate islands.
2015-06-20 19:28:51 +10:00
e3fe56d9d1 Minor edit to transform-uv-island center calc
Only count each UV to influence the center once.
2015-06-20 19:13:49 +10:00
72a2d22f03 support ninja for netbeans projects 2015-06-20 18:24:06 +10:00
5a69b93f57 Sculpt lasso (used shorts for no good reason) 2015-06-20 17:58:52 +10:00
973afa0172 Cleanup: use listbase clear 2015-06-20 17:09:05 +10:00
f6c661a38f BMesh: simplify join-tri's 2015-06-20 16:48:59 +10:00
e807520a1e BMesh: minor optimization for UV island walker 2015-06-20 16:40:39 +10:00
74b32a23f7 Cleanup: checks for unsupported MSVC versions 2015-06-20 15:17:32 +10:00
4addabaed8 Cleanup: unused vars 2015-06-20 15:17:21 +10:00
2de34ba31d Fix T45109: multi-view regression /w screen-cast 2015-06-20 14:54:02 +10:00
51188ecbf1 BGE Cleanup: Translation of several comments in Dutch 2015-06-20 01:19:32 +02:00
8e1ba0b805 BGE Cleanup: remove dead code at SetCenterOfMassTransform
Basically, at this line body is always NULL and the code is never
executed

Reviewers: moguri, hg1, panzergame, agoose77

Reviewed By: hg1, panzergame, agoose77

Subscribers: blueprintrandom

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1331
2015-06-20 01:00:22 +02:00
1d6c025c42 SCons: Fix missing file in kernel when building on OSX 2015-06-19 21:26:47 +02:00
037181cf1c SCons: Another attempt to fix bundling on OSX 2015-06-19 19:52:47 +02:00
27eb2b1017 SCons: Fix wrong bunding of Cycles kernel on OSX platform 2015-06-19 19:38:51 +02:00
e9406256d0 BGE: Simplify collision callback registration.
Remove list m_triggerController and just use getter CcdPhysicsController->Registered().

Reviewers: sybren, agoose77
2015-06-19 16:40:42 +02:00
ae0ed5e9d5 RNA: Don't fill in color grid array when built without smoke
Array length is set to 0 in that case, so filling in first element is
likely to cause memory corruptions.
2015-06-19 13:55:31 +02:00
Johannes Meng
9affa8450a Expose smoke simulation velocities in Python API
This patch exposes smoke simulation velocities in the Python API,
similar to how density and flame grids are exposed.

This is useful to export velocities to an external renderer using Python.

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Subscribers: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1366
2015-06-19 13:50:34 +02:00
9d796df4f6 Support half float file format storage for Multilayer EXR
Quite straightforward implementation -- all the conversion magic is
happening in IMB_exr_write_channels() and remained changes are only
needed to pass information whether channels is to be converted to
half float or not.

Regular file output will use full-float for Z pass, which matches
behavior of the single layer EXR files. But when saving happens
with File Output node then all the passes are respecting half float
settings because it's not possible to distinguish whether we're
saving Z pass or not.

Reviewers: juicyfruit, campbellbarton

Reviewed By: campbellbarton

Subscribers: maxon, effstops, fsiddi

Differential Revision: https://developer.blender.org/D1353
2015-06-19 13:34:11 +02:00
0d3555fe2e Transform: Add individual origins for UV islands
Useful for scaling all UV islands
2015-06-19 21:17:03 +10:00
0f171d4a25 BLI_threads Queue: add BLI_thread_queue_is_empty().
Avoids counting the whole queue when we only want to check whether it is empty or not!
2015-06-19 12:31:26 +02:00
1cf1f48893 Cleanup: fix mismatch in printf formating (int/unsigned int).
Noisy and annoying with new gcc5...
2015-06-19 12:31:25 +02:00
52e95ad3d3 BLI_stack: BLI_stack_pop_n_reverse
Useful to fill an array in the order its added.
2015-06-19 20:19:37 +10:00
d4aeec9204 BLI_stack: function comments 2015-06-19 15:54:42 +10:00
9b3722b414 avoid assert with bmesh inset 2015-06-19 09:41:39 +10:00
d8cef42a14 Fix leak in edge-offset 2015-06-19 06:03:47 +10:00
Dalai Felinto
a1e01fda24 Fix T45104: RGBA PNG Stereo 3d Anaglyph renders turn all shades of black into alpha in 2.75 RC1 2015-06-18 13:56:11 -03:00
e1fd7b9ca9 Cycles: Report currently sampling tile when CPU is working on the last tile
This is mainly useful for the render farms output when logging might stop at
the "Path Tracing Tile N/N" string, which makes it a bit difficult to follow
what exactly is happening (node going crazy, hardware issues or just last tile
is too much heavy).

This is more like an experiment, might be changed in the future.
2015-06-18 16:15:37 +02:00
7e529c2a64 Return non-zero exit code when running blender from the command line and reading file has failed
This way automated scripts can actually see if some issue happened.
2015-06-18 14:07:39 +02:00
4ed6605d65 Cycles: Don't show devices which does not support OpenCL 1.1 in the menu
They'll be checked for the version later and that check will fail anyway,
so better to not allow user to see unsupported device in the list.

Also corrected one more issue with the device enumeration.
2015-06-18 11:26:22 +02:00
28c34d332f Assert when relative paths are passed to IO ops
This is typically an error (& hangs a few seconds on win32), best catch early.
2015-06-18 12:49:10 +10:00
03efc37a6e Transform: Improve UV creation efficiency
- was doing 2x spin-locks, multi-view check and hash-lookup per face-corner.
- avoid doing customdata layer lookup per face.
2015-06-18 12:27:48 +10:00
7165d979ae Fix crash transforming UV /w PET-connected mode 2015-06-18 12:23:55 +10:00
3468038ed5 Fix transform connected UVs memory leak 2015-06-18 12:23:54 +10:00
7fbf264c67 Update netbeans project file generator 2015-06-18 12:23:54 +10:00
530034511c Freestyle: Fix for wrong assertion failure upon inverted face normals.
The assertion code was not taking quad faces into account.

Problem report by Folkert de Vries (flokkievids) through personal
communications, thanks!
2015-06-18 08:28:35 +09:00
18f228d593 update hand written rst docs
- minor corrections
- link to new manual
- wrap lines at 120
2015-06-18 08:00:46 +10:00
Quentin Wenger
a62392dea7 BGE: remove outdated doc of KX_PolygonMaterial, update doc of KX_BlenderMaterial
This patch suppresses the outdated KX_PolygonMaterial.rst documentation file and moves the example contained in it into KX_BlenderMaterial.rst.
The file KX_BlenderMaterial.rst receives some extra formatting changes (lists are not supported in methods arguments types).

Reviewers: kupoman, campbellbarton, lordloki, panzergame, moguri

Reviewed By: panzergame, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1355
2015-06-17 22:43:29 +02:00
3ce4a58aa9 Cleanup: duplicate includes 2015-06-18 06:32:01 +10:00
937ecaf77e BMesh: Add edge-offset option: cap-endpoint
Creating triangles at endpoints is often not so good, disable by default.
2015-06-18 03:17:20 +10:00
da61c36f2a Revert "Fix/Workaround T44662: Freestyle gives no visual output when the Save Buffers option is enabled"
This reverts commit ab417f31f4.

This workaround caused serious memory corruption issues which is not really acceptable
for the release. We'll be likely sticking to a more limited release when using freestyle
with saved buffers for until proper solution is implemented.

Conflicts:
	source/blender/render/intern/source/pipeline.c
2015-06-17 18:02:02 +02:00
fc35b758ad Fix T44682: Save Buffers canceled renders show nothing in Image Editor
The issue was caused by render pipeline freeing render parts prior to finishing
exr file writing which resulted in unfinished parts not being written into the
file by save_empty_result_tiles().

As a temporary solution we do explicitly write unfinished parts as empty tiles
to the exr file prior to freeing parts.

Not ideal solution, but should work for the release.
2015-06-17 17:50:50 +02:00
e96d1c7965 CMake: use parent scope setting cflags in funcion 2015-06-18 00:59:07 +10:00
0dcda51836 Revert "Correct recent commit replacing macro's /w MSVC"
This reverts commit 810f8928d6.

Worked by accident with MSVC, real fix next...
2015-06-18 00:58:58 +10:00
37fd262805 Lock markers now also disallows selection of markers 2015-06-17 16:59:17 +02:00
bd5ea70a75 Compositor: Fix stupid type in incrementing number of finished tiles 2015-06-17 16:32:07 +02:00
01f21f8026 Report proper frame and time to the console when doing compositing 2015-06-17 16:30:27 +02:00
42d5df448c Cleanup, use define instead of magic number 2015-06-17 16:29:31 +02:00
0119c63405 Print elapsed time when rendering from the command line 2015-06-17 16:06:33 +02:00
bcc4957877 Flush stdout prior of calling render stats callback
Without this extra flush order of stat prints is undefined in the
output. which makes it rather tricky to write custom output in a
reliable way.
2015-06-17 15:49:09 +02:00
0b79c5ed29 Cycles: Report total and render time to the log
This includes total render time spent on rendering since render() was
invoked and also prints time of actual rendering (without synchronization
step).
2015-06-17 14:07:51 +02:00
e1ce9220d6 Fix me being stupid commit.
Copy modifiers operator would copy modifier to all strips, even
unselected ones.
2015-06-17 13:54:36 +02:00
3b57f075a8 Fix (unreported) redo of 'bone envelope distance resize' transform op not working
(it would behave like 'bone envelope resize' instead).

Issue comes from the fact this transform op shares some common points with both BoneResize
and BoneEnvelope operations. However, trying to re-use `TFM_BONE_ENVELOPE` itself in this case
is bad idea, since this mode gets stored in transform op and is directly re-used for redo,
by-passing the whole init phase that shall be done in `TFM_BONESIZE` mode... So now,
we add a real new mode, `TFM_BONE_ENVELOPE_DIST`, while keeping most of existing code
and all existing behavior.

This is slightly hackish - but was already anyway, and avoids creating a full new set of
function for pretty much the same thing. As a side note, also makes it possible to
resize envelope distance outside of envelope viewing mode (from py or by adding a custom
shortcut).
2015-06-17 12:30:30 +02:00
e0ae59f5d8 Cleanup: use floorf instead of floor when dealing with floats. 2015-06-17 12:02:53 +02:00
aee4527101 Cleanup/Fix unreported: many 'transform' apply was not updating t->values with final values.
This means redo panel of matching operators would not get correct values set in case
those were entered with numinput, or some snapping was used...
2015-06-17 12:02:53 +02:00
ae3e37b899 Cycles: Fix wrong numbering of OpenCL devices when some of them are skipped
Skipped devices did not reflect in the device number, which might result in bad
array indices.

This might also resolve T45037, and need to be ported to a release branch.
2015-06-17 11:35:39 +02:00
364d934951 Fix T45059: Image open /w relative paths & anim
- would hang on win32 (checking network share?)
- made the path absolute on all systems
2015-06-17 16:05:35 +10:00
a1c6b73de7 Fix leak getting image frame-range from filesel 2015-06-17 16:05:01 +10:00
5b833de521 ImBuf: Assert when read/write gets relative paths
We _never_ want this, so better not fail silently.
2015-06-17 15:53:35 +10:00
c03dcc5421 CMake: set advanced var 2015-06-17 14:25:05 +10:00
810f8928d6 Correct recent commit replacing macro's /w MSVC 2015-06-17 13:16:21 +10:00
81b37f5e92 CMake: use functions instead of macros
Reduces issues with vars leaking into the parent scope.
2015-06-17 09:38:24 +10:00
ecdbe3cc63 Cleanup: style 2015-06-17 07:06:59 +10:00
2689247f98 Correct last commit
avoid sqrt
2015-06-17 06:54:35 +10:00
770dfead86 Fix T45096: Bad UVs /w EdgeSlide & zero-area faces 2015-06-17 05:51:09 +10:00
aab2da9e65 Optimize drawing of outlines as well 2015-06-16 21:44:40 +02:00
fbff0e68a4 Drawing speedup:
We really don't need to iterate all edges of the mesh every frame to
search for loose edges, this calculation can be cached when filling the
edge index buffer.
2015-06-16 20:55:37 +02:00
5ca3f3d811 Partial Fix T44997: Propagate pose on selected keyframes only included those after the current frame
This behaviour was confusing, since "selected keyframes" suggests that it covers
all selected keyframes (instead of trying to do this based on frame ranges).
2015-06-17 01:49:29 +12:00
c55cf743cd Fix T45088: Wrong tooltip for 'Object Transform' option of transfer data. 2015-06-16 14:17:26 +02:00
94eb2647d5 BGE: correct case for createConstraint keyword 2015-06-16 21:22:41 +10:00
b986f955e9 Disable assert for polyfill
Would fail on some zero-area ngons.
2015-06-16 21:13:22 +10:00
173c1133a8 Fix own mistake selecting linked 2015-06-16 20:33:36 +10:00
fa823dc828 Cleanup: style 2015-06-16 10:32:41 +10:00
b1a92f2b3a Fix T44701: Buffer overrun reading directories 2015-06-16 10:04:28 +10:00
532e29cd76 Win32: make DIR struct opaque 2015-06-16 10:03:12 +10:00
291152e127 Add back ray bounces debug code, can be useful nevertheless.
Just need to keep in mind that these are not indirect bounces in the pass then.
2015-06-16 00:39:11 +02:00
6d63446710 BGE: Fix for precision lost in setBackground/getBackground at Video Texture
Now internally the variables are processed as floats avoiding int->float->char conversions that are causing precision lost.

A check for int numbers is maintained to keep compatibility with old behaviour.

Reviewers: ben2610, campbellbarton, moguri, hg1

Reviewed By: moguri, hg1

Subscribers: campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1301
2015-06-16 00:05:25 +02:00
53e3e46332 Cycles / Branched Path: Some simplifications for main loop.
The main loop only handles transparent intersections from the camera ray.
Therefore we can simplify some things.

* Avoid PATH_RAY_CAMERA check, this is always true.
* Avoid path_state_next() call, we can just set transparent flag and increase transparent bounces. This way we avoid the function call and some branching.

Also remove debug num_ray_bounces++, this is incorrect here as no indirect bounce happens here.

Should be no functional changes.
2015-06-15 23:50:29 +02:00
888ed6b7f1 Cleanup comment and remove now redundant define. 2015-06-15 23:35:38 +02:00
099aaea447 Cycles: Move branched path tracking into own file
Code there started becoming a bit too big, by splitting it up it'll make it
easier to do improvements or extending the features in there.

The layout is not totally final yet, would need to try de-duplicating parts
of code from split kernel with non-split integrators,
2015-06-15 23:02:42 +02:00
6c23497185 Fix T45086: Crash showing scopes
Was a rounding issue, which was previously solved by quite simple check.
Well, let's do the same check again :)
2015-06-15 22:17:16 +02:00
1c707a2392 BGE: Fix T43918: adding submodule bge.app including attribute version.
This patch adds the submodule app to bge. apps contains constants similar to bpy.app, particularly version (tuple of three ints like 2.75.1).

It was requested in T43918 and set as TODO.

The patch also adds rst doc for the module.

Reviewers: moguri, kupoman, lordloki, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Subscribers: marcino15

Projects: #game_logic, #game_python, #game_engine

Differential Revision: https://developer.blender.org/D1348
2015-06-15 21:46:56 +02:00
124b25cf9d Usual minor i18n/UI messages fixes. 2015-06-15 21:38:36 +02:00
a44a0cf443 Copy strip modifier operator for sequencer
Copies from active strip to selected strips, found in modifier panel
2015-06-15 21:23:24 +02:00
b633c2857f Fix integer division error with image scopes 2015-06-16 04:16:27 +10:00
3f7ea7489e Cleanup: quiet assert for zero-length axis 2015-06-16 04:16:27 +10:00
bf57c91ead Depsgrtaph: Adding shapekey should update relations
This is needed for the new granular depsgraph, otherwise graph is not
containing all the operations needed for proper update.

And the same is actually needed onwhen removing shape key.
2015-06-15 18:55:26 +02:00
473d46263b Fix T44980: Shapekeys with driver not working with new depsgraph in 2.75 test build
Was just a few missing dependencies.
2015-06-15 18:50:43 +02:00
05b2ab1109 Fix typo in previous commit 2015-06-15 15:40:40 +02:00
9090d64544 Fix T45060: Brush size snaps back to default max 2015-06-15 22:27:52 +10:00
d7cd8ff891 Fix T45052: Compositing-Masks are not editable with new DepsGraph
This commit fixes missing updates of masks with the new dependency graph
in a way which is safe for backport into master branch.

Compositor nodes will not receive needed update callback yet, this will
be solved after mask and compositor are becoming a proper node in the
graph, it is considered a TODO now.
2015-06-15 13:41:32 +02:00
5b8af1d1f1 Fix T44704: BGE regression importing bpy.types 2015-06-15 21:11:45 +10:00
edfe2d6691 BGE: fix use after free 2015-06-15 20:56:44 +10:00
fd629d2fb8 Cleanup: quiet warning 2015-06-15 19:56:43 +10:00
644e2250ce Add missing file 2015-06-15 18:14:24 +10:00
d8e994b35f BMesh: edge-offset feature (Ctrl+Shift+R)
Ability to quickly add 2x edge loops  on either side of selected loops.
2015-06-15 11:03:13 +10:00
3efc0aca54 Revert "Revert "Disable key accelerators for splash screen""
This reverts commit 7f3dcbe17f.

Please check with authors first, this bug was already fixed since RC1.
2015-06-15 10:59:53 +10:00
7f3dcbe17f Revert "Disable key accelerators for splash screen"
This reverts commit 7b0c327b94.
The problem with this commit is that the "move to layer" functionality by hitting M,1 f.e. didn't work anymore...

Campbell, would be great if you could look into this again, as I'm not experienced in this specific region..
2015-06-15 00:54:28 +02:00
e464cbae3b Edge Slide: refactor direction calc into function 2015-06-15 04:56:07 +10:00
9cefd5612d GHost: Attempt to fix compilation error on older OSX systems
The issue was caused by using NotificationCenter which is only available
since 10.9 so trying to build blender on OSX with 10.7 SDK would fail.

Now it should be possible to build blender with SDK 10.7 and at the same
time official builds should still be doing proper weak-linking to a
notification center.
2015-06-14 14:36:05 +02:00
eb0310950c Fix error enabling an already enabled addon
Would run register() twice causing warning with `register_module()`
which expects new classes to be defined.

Now run unregister() before re-registering.
2015-06-14 22:26:42 +10:00
1862991862 Fix '--addons' argument
- only enable addons which aren't already enabled
- use 'persistent' load option (new file wont reset)
2015-06-14 22:18:44 +10:00
b9fe261255 Fix addon_utils.check
Second return value could be None instead of False.
2015-06-14 21:47:02 +10:00
91b23992ce Fix T41870: Cycles OSL - Changing rotation value in anisotropic shader crashes Blender
Older OSX has major issues with sincos() function, it's likely a big in OSL
or LLVM. For until we've updated to new versions of this libraries we'll use
a workaround to prevent possible crashes on all the platforms.

Shouldn't be that bad because it's mainly used for anisotropic shader where
angle is usually constant.

This fix is safe for inclusion into final Blender 2.75 release.
2015-06-14 13:14:11 +02:00
208a917b73 CMake: note env var 2015-06-14 10:05:03 +10:00
52997272aa CMake: disable OSL if cycles is disabled 2015-06-14 09:50:33 +10:00
1e9348efdc CMake: minor edits to lite config 2015-06-14 09:34:42 +10:00
424e5be046 Makefile support for using NPROCS as an env var 2015-06-14 08:27:29 +10:00
a2d4c26aa2 BMesh: use define for string 2015-06-14 08:27:29 +10:00
b1ed12bfec Compilation error fixes for older GCC/CLang compilers
Avoid data type re-declaration, it's not really working on current FreeBSD's 9
system and CLang-3.0 from OSX.

This is not a good idea to do such sort of copy-paste anyway.

If someone knows better way of dealing with this please go ahead and correct
the code :)
2015-06-13 22:19:50 +02:00
1c81bcffde addon_utils default mismatch /w enable/disable
default_set argument is now False for both.
2015-06-14 05:14:43 +10:00
75a86d6a8e Fix for building without Python 2015-06-14 04:53:10 +10:00
a1ac42f5eb Fix (d4e5df) blenderplayer compiling.
dfelinto is the second time that you forgot to modify bad_level_call_stubs/stubs.c. Please compile with the blenderplayer to see the error.
2015-06-13 20:23:48 +02:00
4835fe06f1 Fix T45062: Make it clear in tooltip that 'double sided' mesh option only affects
OpenGL (viewport), and not render engines.
2015-06-13 19:45:45 +02:00
Dalai Felinto
9326820a1b Multi-View: Show multiview image properties only in the places where
they are supported

aka, remove multiview properties from the texture panel, the textures
node (image), and any other parts.

The multiview options are now to be explicitly set in the image template
in order to have them available in the respective panel
2015-06-13 14:09:22 -03:00
Dalai Felinto
e944af67f7 Multi-View: Fix - stereo 3d background image in viewport not working
The functionality was there, but the UI was missing, since I introduced
the use_mutliview option in the Image datablocks.

Note: when opening the image via the background image UI it has its
views data mangled. I'll look at that. Meanwhile the fix is to toggle
Use Multi-View manually in the UI.
2015-06-13 14:09:22 -03:00
41d5ff6fe9 Cycles: Avoid compilation warnings when building without passes support 2015-06-13 19:07:48 +02:00
d3e16df4f1 Cycles: Solve possible buffer overrun when using too much closures
Glass BSDF was doing some magic with copying weigths from initial closure
onto refraction one and the code was not checking properly for the number
of closures.
2015-06-13 18:51:48 +02:00
1cbf748e0c Cycles: Add assert check to shader closure merge function 2015-06-13 18:17:16 +02:00
0f42b8aee0 Cycles: Fix compilation error with motion blur disabled on CPU 2015-06-13 18:16:32 +02:00
097aa852cf Cycles: Silent paranoid uninitialized GCC warnings in release kernels 2015-06-13 16:29:54 +02:00
Dalai Felinto
54b824106b Multi-View: Some Stereo 3D modes require a special drawing all the time
some 3d methods change the window arrangment, thus they shouldn't
toggle on/off just because there is no 3d elements being drawn

The optimized solution would be to draw only the left eye in those
cases, but there is some issue going on with that, so this commit will
do for now.
2015-06-13 11:29:05 -03:00
0bf0aa6625 Fix: Don't show "Clear Keyframes" option in RMB menu for NLA Strip properties
Since these FCurves for these properties cannot be deleted, this operator is useless
in this case.
2015-06-14 01:21:48 +12:00
0b51e7d991 Fix: "Delete Keyframes" RMB-menu option didn't work on NLA Strip properties 2015-06-14 01:21:47 +12:00
38a60418f7 Msgfmt: Fix for generating .mo files from .po without comments 2015-06-13 14:04:47 +02:00
60ddaf045a Python API: use cached translation tables
bpy.path.clean_name() and AddPresetBase.as_filename() were doing
inefficient search-replace of individual characters.

Use cached replacement table instead.
2015-06-13 19:47:32 +10:00
02a496c61c Translations utils: add needed bits to update git repo together with svn trunk. 2015-06-13 11:42:54 +02:00
7bac8348bf Fix scons compilation 2015-06-13 17:40:50 +12:00
Julian Eisel
7182677620 Cleanup: Correct comment
Own mistake from rBf9972fa53eaab4
2015-06-12 19:38:46 +02:00
1b8a785d83 Armature: add armature dissolve
Works like mesh dissolve (access from delete or Ctrl+X)
2015-06-13 03:24:07 +10:00
07562a4afb Edge slide (minor change, use existing vertex) 2015-06-13 03:24:07 +10:00
9e91313a97 CMake: remove comment 2015-06-13 03:23:58 +10:00
6f36e1f872 Fix compilation error on Windows
The issue was caused by conflicting declaration of HKEY
happening in our WM code and somewhere deeper in atomic
operations headers hierarchy.
2015-06-12 17:32:09 +05:00
efe4af8fcb Fix T45018 camera not easily selectable in multiview.
Generally for scene choosing a view to use for selection is not
straightforward, but camera should at least be easily selectable.
2015-06-12 17:21:07 +02:00
a9d3f663d3 UI: Use numselect for redo-popup (for move layers) 2015-06-13 00:39:19 +10:00
e2e414218b UI: Vertex Mark/Clear Sharp menu, match edge menu 2015-06-13 00:34:36 +10:00
0d95b41f9e Revert "UI: move sharp/smooth out of vertex menu"
This reverts commit d6b57436ef.
2015-06-13 00:34:36 +10:00
7823ca06da Support metadata display in clip editor 2015-06-12 15:26:23 +02:00
4fae3620d0 De-duplicate stamp callback 2015-06-12 15:29:56 +02:00
850bb80aef Fix for building without audiospace 2015-06-12 15:29:56 +02:00
69e96509a6 Fix for building without ffmpeg 2015-06-12 23:01:23 +10:00
f2bd6d73e6 Fix T45048: wrong tooltips in Video Sequence Editor's "Strip" Menu (mute/unmute). 2015-06-12 14:04:31 +02:00
6c44265bc9 Merge all changes to blenderplayer from gooseberry branch:
* Allows sound playback for movies
* Allow play-pause with space button
* Allow displaying a position indicator with the I button
2015-06-12 12:12:24 +02:00
34c3beb339 Cycles: Fix missing node distance update when only two child intersected in QBVH 2015-06-12 10:06:46 +02:00
520fb5c8cd Fix T45041: (2.75RC) blender crashes when I choose 'Refresh DataBlock Previews'.
Not sure where this sneaked in, but we for sure need a valid context (otherwise
we'd need to pass a Main alog too).

This is to be backported to final 2.75.
2015-06-12 09:55:04 +02:00
4ab47a7670 BLI_linklist, avoid full list search for append
For areas that require append, store the last node,
Previous behavior would too easily hide poorly performing code.

Also avoid (prepend, reverse) where possible.
2015-06-12 17:13:34 +10:00
5893a3445e Use prepend instead of append (avoids list search) 2015-06-12 17:08:10 +10:00
37b8153afe Cleanup: unused var 2015-06-12 17:08:10 +10:00
Julian Eisel
7ca40c1061 File Browser: Two more minor fixes for arrow keys selection
* Unset active file on opening/resetting file list
* Accidentally placed NULL check in the middle of the function - not a
big deal as it's highly unlikely that it fails (removed it but added
assert)
2015-06-12 06:25:43 +02:00
Julian Eisel
2205950274 File Browser: Ensure active file is unset if no file is selected
Otherwise arrow keys navigation might start from this file instead of
the last/first file in the list.
2015-06-12 04:46:49 +02:00
6a33d13ae7 Expose Background AO and Transparent flag to XML API 2015-06-12 00:32:00 +02:00
596eadf0e1 Cycles: Add debug pass which shows number of instance pushes during camera ray intersection
TODO: We might want to refactor debug passes into PASS_DEBUG and some
debug_type (similar to Blender's side passes) to avoid issue of running
out of bits.
2015-06-12 00:12:03 +02:00
b3cc602adc Cycles: Remove meaningless debug traversal steps increment from QBVH volume code 2015-06-11 23:54:57 +02:00
f6748183a2 Cycles: Enable transparent shadows for experimental AMD kernel
They're working just fine on AMD Tonga GPU and probably other architectures,
lets enable it under the experimental feature set and see what exact system
configuration gives issues.
2015-06-11 23:49:21 +02:00
7dae8e54cc Fix wrong proxy pointer hanging around after making all local
The issue was caused because of the following circumstances:

- Making All Local will just iterate all IDs and clear linked flags
- It will not do anything with objects which are already local (and
  since proxy rig is local nothing will be changing it).

This commit makes it so id_clear_lib_data() takes care of clearing
all related proxy pointers, avoiding situations when proxy rig will
point to a local armature.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1276
2015-06-11 23:47:00 +02:00
774e034d40 Make scopes update multi-threaded
This commits makes scopes evaluation multithreaded by using OpenMP
for the outer loop of pixel processor. it also makes all the changes
needed for keeping performance as high as possible by keeping data
local to thread for as long as it's possible.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1334
2015-06-11 23:37:49 +02:00
9c5995c062 Image scopes: Make sample line saving check local
Previously it was using accumulative counter of saved lines and so on in order
to detect cases when new sample is to be saved. This is not quite possible to
do with threaded scopes update.

Change it now with non-accumulative approach which saves a bit different lines
due to slightly different rounding, but this things are not strictly defined
anyway and results are close enough to each other.
2015-06-11 23:29:03 +02:00
b496819fcc Image scopes: Make all variables local, prepare to threaded evaluate
Doing this as a separate commit so it's easier to troubleshoot in the future
if some regression happens.
2015-06-11 23:29:03 +02:00
b666593775 Cycles: Remove Bump Node from the graph, if Height input is not connected.
This way we can avoid building the split kernel with NODE_FEATURE_BUMP enabled, in case we don't need it.
2015-06-11 23:09:38 +02:00
96d9801423 Masking: Numpad-. now centers view to selected control points
Currently feather points are being ignored, it could be improved in the future.
2015-06-11 22:46:42 +02:00
b4446b505f Cleanup some style in new 'keyboard select' code.
Really hate onliner checks (if/else)...
2015-06-11 20:03:55 +02:00
5114637967 Fix T45016, mask animation data lost after layer rename
We need to fix up animation data.
2015-06-11 19:34:21 +02:00
8c2619a11a Fix T45032 allow float rotational values for numpad rotation 2015-06-11 18:13:22 +02:00
Julian Eisel
939948c233 File Browser Arrow Keys Navigation
Adds support for selecting/deselecting files in File Browser using the
arrow keys. All directions (up, down, left, right) are possible.

When to Select, When to Deselect?
Standard behaviour is selecting, however if we move into a block of
already selected files (meaning 2+ files are selected) we start
deselecting

Possible Selection Methods
Simple selection (arrow-key): All other files are deselected
Expand selection (Shift+arrow key): Add to/remove from existing
selection
ill-Expand selection (Ctrl+Shift+arrow key): Add to/remove from existing
selection and fill everything in-between

From which file do we start navigating?
From each available selection method (Mouse-, Walk-, All-, Border
Select), we use the last selected file. If there's no selection at all
we use the first (down/right arrow) or last (up/left arrow) file.
(Ideally, the view would automatically be set to the new selection, but
this behaviour overlaps with an other patch I've been working on, so
prefer to do that separately)

(Also tweaks color for highlighted file for better feedback)

D1297, Review done by @campbellbarton, thx a lot :)
2015-06-11 17:20:29 +02:00
356afe0085 Fix possible NULL pointer use 2015-06-11 23:58:53 +10:00
6a0a205cb4 Cycles: Simplify volume_phase_eval().
This simplification is safe, as the call to volume_phase_eval() is guarded behind a CLOSURE_IS_PHASE check, which is equal to
CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID. I don't think we will add more phase functions anytime soon, if at all.
2015-06-11 15:18:33 +02:00
af4d10703b Release cycle: Blender 2.76 BCon 1, alpha 2015-06-11 15:11:07 +02:00
102e18d05c Expose debug type into the interface
This way it is now possible to select which exact debug pass is to be used
by the render engine. Accessible from the Passes panel.

Currently it could only be one debug pass, in the future we can make menus
and image users smarter and support multiple passes of the same type.
2015-06-11 14:53:15 +02:00
2bd6de5bbb Cycles: Add debug pass showing average number of ray bounces per pixel
Quite straightforward implementation, but still needs some work for the split
kernel. Includes both regular and split kernel implementation for that.

The pass is not exposed to the interface yet because it's currently not really
easy to have same pass listed in the menu multiple times.
2015-06-11 14:53:15 +02:00
3438130a94 Use more proper flag for psys reconstruction after memory optimization 2015-06-11 14:53:15 +02:00
abc9c26ec8 Fix for unwanted particle re-distribution happening due to memory optimization
The issue was caused by memory optimization marking particle system to recalc,
and because of the way how particle flags works it was possible that it'll
cause particle's re-distribution. Now this memory optimization will act the
same as loading the file.

This commit appears to be safe according to our render farm and is safe to
be included into final release.
2015-06-11 14:53:15 +02:00
a6803bf564 Compositor: Use atomics to update finished tiles progress
Integer is not safe for incremental by multiple threads and if one is unlucky
enough that could cause progress re[reports to go totally nuts.
2015-06-11 14:53:15 +02:00
bb5e46f105 Fix T44871: Blender hangs when using masking, dilate-erode and soften node
The issue was caused by wrong order of locks acquisition in the compositor image node.
2015-06-11 14:53:15 +02:00
41564a402e BMesh: flatten faces operator 2015-06-11 21:54:06 +10:00
ee37de75e6 BMesh: add BMO_ITER_INDEX macro 2015-06-11 21:54:06 +10:00
867cd2048e Replace linked-list insert-sort with merge-sort
Original code from eglib, modified for reuse with multiple linked-list implementations.

Adds sort functions: BLI_linklist_sort, BLI_linklist_sort_r
2015-06-11 21:54:06 +10:00
b8b57d2da9 BLI_listbase: match arg order with BLI_qsort_r 2015-06-11 21:54:06 +10:00
958c20872a Add argument --python-expr to pass Python directly
This works like Python's -c argument, handy to be able to avoid writing small scripts to disk.
2015-06-11 21:54:06 +10:00
Dalai Felinto
087c82e392 Error message fix - In the manual (thus for the user) we are referring to this as "Multi-View", not "Multiview" 2015-06-10 16:23:19 -03:00
f167f434d9 Support alternate python command 2015-06-11 04:14:43 +10:00
8e0ab3d42f Picky edits to previous commit. 2015-06-10 17:29:46 +02:00
825892ae7a Fix T45017: Crash when running 'track markers' operator with no clip loaded.
CLIP_OT_track_markers was missing a poll callback.
2015-06-10 17:24:08 +02:00
3560e36ee9 CMake: Fix typo in OIIO module 2015-06-10 16:51:52 +02:00
ec3c2d3be9 Fix T45009: Bad 'tri area computation' code in knife tool.
Was causing wrong selection of 'outside' face.
2015-06-10 16:35:52 +02:00
91e767c99c 2.75 splash
by Gooseberry team
2015-06-11 00:01:13 +10:00
ab417f31f4 Fix/Workaround T44662: Freestyle gives no visual output when the Save Buffers option is enabled
For now we solve this for non-multiview renders by merging exr file back into
full render result prior to rendering freestyle strokes. Multiview case is
still to be supported tho.
2015-06-10 13:41:37 +02:00
73a104b8e8 Fix T44968: Python executable crashes due to missing .DLL
For now we work this around by copying python DLL to the
bin folder. Ideally the DLL should be shared between blender
and python, but that's a bit tricky to do on windows.
2015-06-10 13:41:06 +05:00
9f911f62dc Fix T45013 negative curve falloff not working.
Was doing clamping as fix for T42984. Seems we can ommit clamping for
sculpting if we make sure overlap is not zero with negative values.

Control for clamping is moved to the "Use Clipping" function of curves
(which is on by default), so both bugs remain squashed and advanced
users can now properly utilize curves in sculpting, though not all
brushes work well with negative curves.
2015-06-10 13:32:28 +02:00
6e844da9da GTest: add test for listbase sorting
Check for correct sort and stable order for matching values.
2015-06-10 20:26:56 +10:00
0446c73c4a WM: toggling expanded could raise exception
Missing module case wasn't checked for.
2015-06-10 19:33:38 +10:00
bc69eafa98 UI: option to pass "icon_value" to menus
D1336 by @lichtwerk

Also remove verbose description, UI docs can explain use-case in more detail.
2015-06-10 17:39:18 +10:00
08687ee380 Correct typos
D1337 by @lichtwerk
2015-06-10 17:28:43 +10:00
45d4fadebd Tooltip cleanup: show_metadata should be same between image editor/ 2015-06-09 18:25:25 +02:00
7b0c327b94 Disable key accelerators for splash screen 2015-06-09 23:34:24 +10:00
9a83e112be Fix T45002: sculpt show brush toggle no longer working. 2015-06-09 15:13:52 +02:00
3092e1031d Fix T45003: some UI/i18n issues.
* Do not translate renderlayers' names, those are data, not UI (defined by user).
* Translate passes' names, even in button itself (menu items were already translated).
* Translate 'ID type' in ID eyedropper helper message.

Also, added i18n context to IDType private struct, and `BKE_idcode_to_translation_context()`
helper, much more generic and easy to maintain than the private util in interface_template.c.
2015-06-09 15:00:56 +02:00
af980a20a4 Fix T37746: Presets in splash failed to redraw 2015-06-09 21:55:35 +10:00
6c8f2049f6 Fix wrong name displayed for the debug passes 2015-06-09 10:53:54 +02:00
cb9bd23d0c Fix T44930: File-select in redo panel, disables UI 2015-06-09 17:17:22 +10:00
Dalai Felinto
e1b8ed8dd4 Multiview: fix Time Sequential crash when screen is fullscreen T44688
ED_screen_duplicate() was never written to support non-fullscreen modes.
This is prior to the hidden ui fullscreen commit, and it's quite ancient
in Blender's code (since Jan/08 - 1363134d)

That's why duplicate window, and new screen operators are disabled when
screen is full.
2015-06-08 18:48:52 -03:00
962f764d58 WM: refactor window code for stereo3d
Window copy code made it hard to test fixes.
2015-06-09 01:27:40 +10:00
f8385de5ed Remove redundant NULL check 2015-06-09 01:27:40 +10:00
Julian Eisel
ffdeba49e6 Fix yet another fullscreen glitch
Steps to reproduce were: Toggle fullscreen->F12->F3->ESC 2x->3D View
changed to Image Editor and didn't change back.

Actually it doesn't work 100% as wanted since it exits the fullscreen
when pressing ESC to exit Image Editor but it's hard to support all
cases with such a weird spaghetti code.
2015-06-08 17:20:21 +02:00
Julian Eisel
4f94947157 Fix T44976: 3D View turns into an Image Editor after saving render
result

Was a case of two stacked temporary fullscreens, so a quite extreme
situation.
2015-06-08 16:04:00 +02:00
bcfe38aa03 Fix T44964: Bisect tool /w nonuniform scale 2015-06-08 22:30:45 +10:00
303c912093 Fix crash introduced by recent node tree localization
It should not add temporary datablocks to the bmain.
2015-06-08 14:10:43 +02:00
ec0ba4095f Fix T44979: Crash when rendering with more threads than the system ones
Revert "Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads"

This reverts commit fdc653e8ce.

The threads override is not affected by the scene, and hence the limit of the
threads was not giving correct result. Need to re-consider some things here.
2015-06-08 13:53:54 +02:00
d63615272c Use context manager for reading addon headers 2015-06-08 21:21:54 +10:00
07d51141ae Fix: a broken symlink to an addon resulted in a blank addon tab
The addons tab in the User Settings window would be empty, due to
a FileNotFound error. This error can be caused by a broken symlink,
which is now treated the same was as a file that misses its bl_info
dictionary.
2015-06-08 12:08:43 +02:00
87629b2a74 RNA: Object.shape_key_remove method
Python had no ability to remove shape keys
Original D1169 from @lichtwerk, with edits
2015-06-08 19:52:04 +10:00
546a0e2d96 Fix T44989: Crash on linking external OSL material
Issue was caused by passing NULL bmain to the path remap function when
localizing the node tree.

Paths are to be remapped, otherwise mapping of paths to OSL scripts
might happen in a wrong way.
2015-06-08 11:15:40 +02:00
0589a814ba Cycles: Fix crash doing render preview of external OSL script 2015-06-08 11:15:40 +02:00
2ebaa69676 Cycles: Move requested feature conversion to an own function
This way it could be used for the shader/baking kernels easily n the future.
making those kernels more optimal.
2015-06-08 11:15:40 +02:00
8c2750bc82 Cycles: Remove round-up trickery for max closure in split OpenCL kernel
Round-up was only enabled for viewport render, which was for a long time hardcoded to
use 64 closures. This was done in order to avoid unnecessary kernel re-compilations
when tweaking the shader tree.

We could enable selective closure compilation in the viewport later if it'll give
measurable speed improvements, but even then round-up is to happen outside of the
device level,

This commit also removes early output which happened in cases when max closure did
not change. It was wrong because other requested kernel features might have been
changed.
2015-06-08 11:15:39 +02:00
c6c06285a7 Cycles: Remove requirement of using experimental kernel for hair and blur on AMD
Those features are not selectively compiled, so there's no real benefit of hiding
them under the experimental feature set.
2015-06-08 11:15:39 +02:00
27ed75271c Cycles: Make hair, object and motion blur selective compiled into OpenCL
This features are now based on the scene settings, so scenes without those features
used are rendered even faster.

This gives about 30% speedup on the AMD A10 APU here, but at the same time it does
not mean such an improvement will happen on all the hardware. That being said, the
Tonga device here seems to have no measurable difference.

In any case it seems handy to have for the future, when we'll want to support SSS
in the kernel or to port selective compilation/split kernel to CUDA devices.
2015-06-08 11:15:39 +02:00
267c7b098d Fix "View All" operation in image space not available with locked interface 2015-06-08 11:15:39 +02:00
7c5944137e Fix T44995: Crash loading packed image 2015-06-08 18:21:54 +10:00
b54e95a5c8 Alternative fix copying windows from popup dialogs
It could still crash if the window was freed and another was activated. see T44688.
2015-06-08 16:02:57 +10:00
22a4fcb146 Fix T44991: Apply transform skips poly-radius 2015-06-08 12:58:50 +10:00
99fba34b8d rename wiki -> manual 2015-06-08 11:34:07 +10:00
9927849708 Fix T44984: wrong texture clamping when applying saturation > 1.0
Applying saturation > 1.0 in HSV space easily leads to negative values in RGB space,
so we have to clamp again...
2015-06-07 16:56:58 +02:00
b79a33e2d4 Allow compilation of cycles network with WITH_CYCLES_LOGGING is ON 2015-06-07 15:24:31 +02:00
de953bf7b8 Don't show smoke domain when render-only enabled
D1339 from @scorpion81
2015-06-07 21:52:11 +10:00
86bb0d1a35 MakeDupliFace: select new objects 2015-06-07 17:44:25 +10:00
404f9ddc37 Cleanup: use staticmethods 2015-06-07 17:40:39 +10:00
bf010c4a15 Cleanup: pep8 2015-06-07 17:28:02 +10:00
5aade17bdf Revert "BGE : KX_VertexProxy support for more than 2 UV channel."
This reverts commit fb0dd596e9.

This commit reintroduced a deprecated API that we'd rather not see in a
release. A better solution is being worked on.
2015-06-06 13:12:27 -07:00
c5748f3cc7 View3D: avoid jumping placing cursor /w lock on
The view would jump each time, now compensate by adjusting the cursor panning.
Less jarring and helps avoid problems when the cursor gets outside the view, see: T40353
2015-06-07 02:50:50 +10:00
60621940d0 Use threshold for selecting side-of-axis 2015-06-07 02:09:41 +10:00
Julian Eisel
4ee2ae97c3 Cleanup: Typos 2015-06-06 15:32:59 +02:00
50a1ad5bb3 Cleanup 2015-06-06 21:02:16 +10:00
94e7ac5b97 Fix wrong usage of THB_NORMAL size when generating .blend file thumbnail at save time.
We do not use that size of preview anymore, only THB_LARGE...
2015-06-05 19:42:59 +02:00
68cdd2b361 Fix T44961, bevel spikes out when certain angles near 180.
Made the test for whether one can "see" an adjacent edge less
knife-close to 180. This means it will chose to slide along
such an edge less often, and avoid some spikes.
2015-06-05 13:00:41 -04:00
e708042aa0 Cleanup:
Get rid of static functions that pass the exact same arguments in the
same order to other function.
2015-06-05 16:13:15 +02:00
28f798f86e Cycles: Initial support for OpenCL capabilities reports
For now it's just generic information, still need to expose memory, workgorup
sizes and so on.
2015-06-05 14:17:30 +02:00
d5bca524d5 Fix T44960: Crash with 'Shape Cut' in edit hair mode.
This is only supported for mesh objects so far.
Also, abort in case there are no faces in dm (instead of crashing on NULL BVH tree...).
2015-06-05 13:06:01 +02:00
304ee9af8d Depsgraph: Report to the console when the new depsgraph is used 2015-06-05 15:37:41 +05:00
907f804ad8 Depsgraph: Fix typo in header guard comment 2015-06-05 15:37:41 +05:00
fb92c553f1 ImBuf: Fix compilation error with latest OIIO
Latest OIIO libraries are using Boost libraries from the public headers.
2015-06-05 15:37:40 +05:00
ffaf271ab9 BMesh: decimator, allow vgroup factor over 1
Can be useful to apply more extreme weighting
2015-06-05 15:26:37 +10:00
aca40295e8 Check ftell return values 2015-06-05 11:46:01 +10:00
b2e5c017a1 BGE: correct ftell use in LoadGlobalDict 2015-06-05 11:16:46 +10:00
f3434e5f82 BGE Cleanup: remove dead code for collide, visible and twoside variables
As material is not NULL at this stage there is no need to do a NULL
check. Also to remove dead code

Reviewers: dfelinto, panzergame, hg1, moguri

Reviewed By: panzergame, hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1330
2015-06-05 02:24:23 +02:00
2cbe60b476 New "use placeholders" feature of the sequencer did not detect correct
filenames.

Added BLI_path utility functions to decompose a path name and
extract the frame number. It should be useful in autocollapse
feature as well
2015-06-04 20:40:44 +02:00
455ca1b28f BMesh decimate, improve behavior with weights
Add slider to adjust the influence of weights relative to geometry distortion.
This allows subtle influences to be applied - without drastic changes in behavior.
2015-06-05 02:56:11 +10:00
c64f491f9f Fix modifiers stack not recalculated when mapping requirements change
Reported by pixaal on irc, basically reproducable by inserting bevel
modifier on cube and entering/exiting texture paint mode.

Now object stores last needsMapping variable as well as customdata mask.

Also now texture painting only needs mapping when we are in texture
paint selection mode, so modifiers that don't support mapping can still
be used to paint now.
2015-06-04 17:40:10 +02:00
Julian Eisel
91d424b82a Fix tooltip colors not initialized correctly
Already committed similar fix (rBbeaed66f292dd) but saw it appearing on
other peoples screens a few times since them. Never was able to recreate
though.
This should make sure everything is initialized fine, so if we see it
appearing again, then it's likely because of manual tweaks or the
version saved in the .blend.
2015-06-04 17:07:05 +02:00
4a26f3b569 correct last commit 2015-06-04 23:47:03 +10:00
06f4bac104 BMesh: decimator minor edits 2015-06-04 23:42:10 +10:00
cf7a5e93f8 Fix buffer overrun searching program path on win32 2015-06-04 16:48:56 +10:00
3eb38a79d8 Loading raw targa now sets the filetype 2015-06-04 16:36:11 +10:00
061b59a1d4 Cleanup: redundant checks 2015-06-04 15:51:49 +10:00
81e3deadea Fix for leak creating stereo images 2015-06-04 15:41:28 +10:00
7a0f57cd01 Cleanup: clarify order of precedence: &/? 2015-06-04 15:41:27 +10:00
896f08bde8 Fix T41177. Bevel shouldn't try to slide along edge when can't see it. 2015-06-03 15:19:48 -04:00
451a077511 I18n extract: better handling of commandline args. 2015-06-03 17:15:00 +02:00
e4ab526ad1 Make reading previews from .blend file more robust.
Hit a case here where rect pointer was not NULL, when h & w were both zero...
Shall not happen, but better not crash on such cases!
2015-06-03 16:42:08 +02:00
b9c563061c Do not show brush cursor for fill brush (size not supported) 2015-06-03 12:04:47 +02:00
43913fe212 Fix inconsistencies in texture paint UI T44929, T44927:
* lock alpha only works in projective painting
* fill threshold only works in 2D painting
2015-06-03 11:33:40 +02:00
b07be730b2 Fix error calculating bmesh normals
edge vector stack was left un-cleared.
2015-06-03 18:10:43 +10:00
6fbb580e51 BLI_stack: gtest for clear 2015-06-03 18:09:12 +10:00
1dbcccf5f9 BLI_stack, add clear function. 2015-06-03 18:07:30 +10:00
ebebc4ded1 Correct own fix reference before assignment
3rd fix for silly exception conversion!
2015-06-03 17:11:01 +10:00
2517f5c97c Fix memory leak loading multi-layer OpenEXR 2015-06-03 16:24:07 +10:00
e695b34505 Fix memory leak loading single-layer OpenEXR
Internal EXR API specifically avoids freeing non-file streams.
2015-06-03 16:24:00 +10:00
52795932a7 Fix for RMB Menu title including shortcut 2015-06-03 15:03:28 +10:00
2c7cb8ce59 Fix UI string clip (reverse search separator char)
The string may have many '|' characters, only the last is clipped.
2015-06-03 15:03:28 +10:00
b3d2b035c4 Cleanup: check button flag for shortcut delimiter 2015-06-03 14:35:41 +10:00
23f1c6835f Fix multires update (reading char * as an int *) 2015-06-03 13:42:44 +10:00
c07a11b83b Fix object align crash (use-after-free) 2015-06-03 13:42:44 +10:00
4056253627 Cleanup: metaballs called memcpy with NULL source
Simplify logic and use realloc
2015-06-03 13:42:44 +10:00
c0ca70a3b2 Correct vert/edge slide poll functions
Would crash trying to access outside the 3D view.
2015-06-03 13:42:44 +10:00
2be3ebd15d Correct own recent error printing Python exception 2015-06-03 13:42:44 +10:00
fd8b6021c4 Fix race condition
Exposed when checking on T44871
2015-06-03 11:01:44 +10:00
469c0695ac ImBuf: Fix memory leak around EXR handle's multiView 2015-06-02 22:43:23 +05:00
fd1ea5e3db Fix T44742. Bevel now avoids vertex meshes when only two edges are beveled.
Also, changed the algorithm for generating the vertex meshes when not all
edges into a vertex are beveled. Now it tries to slide along edges that
form part of the silhouette when possible; when not possible, it tries
to snap to the best plane in between the beveled edges.
2015-06-02 09:25:05 -04:00
9454377c71 Fix T36994: Make link modifier fails (soft body) 2015-06-02 20:23:01 +10:00
7724b26ab2 Cleanup: use const for object copy funcs 2015-06-02 20:21:45 +10:00
95b9d6d9c2 Fix operator exec /w popups that close the window
Related to T44688, note supporting this case isn't so nice,
but seems it can be made to work.
2015-06-02 19:01:24 +10:00
5f5e05b3eb Fix compilation error after recent commit 2015-06-02 13:11:03 +05:00
89025958af Fix T44921: Node editor, nodes position not maintained after Material panel changes
Also improved a bit behavior of adding new nodes, now they will not overlap that
badly. Still not ideal, but further improvements better not to happen at bcon4.
2015-06-02 12:32:43 +05:00
23b068ce8a Fix T44922: Split kernel renders black when using Bump node
Was missing feature detection in the BumpNode in the previous selective nodes
compilation commit.
2015-06-02 11:53:10 +05:00
660234bfba Fix own mistake searching python binary 2015-06-02 15:42:03 +10:00
aa2bdcccfc Simplify Win32 extension check 2015-06-02 15:38:14 +10:00
c67abff7f0 Fix drawing text on >2gig buffers (stamp for eg) 2015-06-02 14:59:31 +10:00
abc4a3d455 Fix T44869: Crash rendering >2gb images 2015-06-02 13:28:24 +10:00
33a7b72678 Fix T44919: BGE marhutils attrs leak memory 2015-06-02 11:08:17 +10:00
b53836d2c9 UI: tweaks to ID and non ID preview templates
- label is shown on a UI_UNIT_Y heigh instead of 0.2 * total button size
- vertically centering non-ID previews labels
- making some constants dependent on ui units
2015-06-01 21:37:56 +02:00
9e850addae template id previews: changes for consistency with icon views template
- elongate the buttons to acomodate the icon without the label overlapping.
- removing the blue background
- adding a consistent margin all around the popup
2015-06-01 21:37:56 +02:00
32cf18d9a2 template ID previews: quick fix for buttons region overlapping the search button 2015-06-01 21:37:56 +02:00
27c1262e21 Fix T44908: Blender crashes when trying to use cycles experimental displacement
The issue was caused by the reshuffle needed to make objects flags have proper
object's bounding box to solve regressions in SSS objects intersecting volumes.

There's actually a feedback loop happening here, which is now solved in quite
naive way -- for the true displacement we consider all objects are capable of
intersecting volumes, synchronize object flags prior to displacement shader
tasks runs and then re-update object flags for proper bounding box.

Not sure what will be the proper solution here, we can't do preliminary check
of intersection for displacement shader, but on the other hand we don't really
need this flag for displacement shader anyway.
2015-06-02 00:04:30 +05:00
a73d4b859a Thumbnails: fix bad handling of invalid thumbnails, cleanup and deduplication.
Invalid thumbnails (missing mtime metadata) are to be re-generated, not ignored!
2015-06-01 19:42:56 +02:00
bec3131112 Font Preview: much better handling of i18n case.
We have to regenerate previews when we change language. But we also need to do it
when translation is changed or added for a language, etc.

Previously, we were storing one preview per language, which was also stuffing
preview dir with (potentially) tens of PNGs per font file, if user plays with translations.

Now we use a better system, which is storing an additional optional metadata in previews
(some hexdigest), that Blender can use in addition to datetime to decide when to regenerate
previews.

This is only used (and needed) by font previews so far, but can easily be reused for other
types of previews if needed.
2015-06-01 19:42:56 +02:00
2d8880643d Font Preview: fallback to default english strings in case translated ones have not enough chars in current font.
This avoids some ugly 'missing char' in previews - not all cases of course, but most common ones.

A complete solution would be much much more involved, and probably not worth it here.
Definitively not before a release, at least!
2015-06-01 19:42:56 +02:00
7173069cbe Fix T44915 vertex color lost when adding new layer in edit mode.
Was copying new layer colors to old layer colors.
2015-06-01 19:06:46 +02:00
893677a76a Disable writing a crash file completely on Windows.
We had some reports where users did not even read the "Not supported on
release builds" message, and arguably writing a file sort of indicates
that the file may include something useful.
2015-06-01 18:54:03 +02:00
a6101cde06 Cycles XML API: * Add Bump and Holdout Node * Add todo comments for various things. * SSS falloff now works. 2015-06-01 19:56:39 +05:00
b10bc3a6ec Cycles: Number keys 0-3 can be used in interactive mode now to set max bounces. 2015-06-01 19:56:36 +05:00
3127d47029 Cycles: Fix wrong max nodes group used for the viewport render 2015-06-01 19:49:53 +05:00
9d4d55e78b Cycles: Strip meaningless empty output form the MVidia OpenCL compiler 2015-06-01 19:49:53 +05:00
f0a0b1eaac Cycles: Assert in the cases when SVM node was not handled
This will help figuring out cases when node was not properly handled by the SVM
by aborting execution on CPU, where all the nodes are expected to be supported.
2015-06-01 19:49:52 +05:00
ecd4ee75af Cycles: Implement selective nodes compilation
This commits finishes initial selective nodes compilation into kernel, which
helps a lot performance-wise for AMD OpenCL kernels.

Split by node groups is based on statistics from simple scenes like BMW and
more complex scenes like mango and gooseberry production files. Further
tweaks are always possible, but it should be a good starting point.

TODO: Still need to ignore unused nodes when calculating requested shader
features.
2015-06-01 19:49:52 +05:00
c0235da53c Cycles: Fix some typos in the selective modes compilation 2015-06-01 19:49:52 +05:00
399a27b261 Cycles: Code cleanup, spaces around keyword and brace 2015-06-01 19:49:52 +05:00
f45f2ac687 Cycles: Fix missing features gathering from the bump graph 2015-06-01 19:49:52 +05:00
4d8cf1329d Cycles: Add bump feature for selective nodes compilation
For now it is unused in the kernel, actual usage will come with
the next commits.
2015-06-01 19:49:52 +05:00
36ef6d1532 Cycles: Report build flags used for the OpenCL kernel compilation
For now it's reported to the stdout, matching to the CUDA behavior.
In the future we can hide this into GLog logging once the kernels
are considered all stable and so.
2015-06-01 19:49:52 +05:00
14251e8b45 Cycles: Shader node features are to be inherited from the base class 2015-06-01 19:49:52 +05:00
1fc6563917 Fix T44894: Round two.
We cannot `direct_link_packedfile()` twice on a same address, because this tries to
map again pf->data address, which leads to nothing (NULL).

So now, since `ima->packedfile` and `ima->packedfiles` are mutually exclusive
in 'live' blender data anyway, we either read one or the other.

Tested from/to official 2.74 and current master, everything looks fine now.
2015-06-01 13:12:41 +02:00
c8711b6f6f Fix T40621: Tablet in walk mode fails
Add support for walk mode /w absolute pointing devices.
2015-06-01 20:07:57 +10:00
07a6d4ed75 WM: include tablet data in WM_event_print 2015-06-01 17:40:52 +10:00
bfa7586ba3 Fix T44747: Drag toggle /w nodes (glitch)
It was possible to perform actions while performing a drag-toggle.
2015-06-01 16:40:43 +10:00
565faadd8e Cleanup: doxygen comments 2015-06-01 14:56:07 +10:00
668f1f9554 Fix for leak in BM_uv_element_map_create
Also correct over alloc and redundant alloc.
2015-06-01 14:16:28 +10:00
b147473f02 Fix T44892: Cursor warp, invoked outside the area
If an operator starts outside an area, don't use warping.
(problematic for menu's).
2015-06-01 12:03:02 +10:00
4b4695223a Fix vertex slide regression /w rotated objects 2015-06-01 11:26:35 +10:00
a8d6c69d76 Fix T44894: Broken packed image import from older .blend file.
rBe5fbeba0b3a6e9eea not only restored forward compat, it also broke backward compat...
for no reason at all even, exising ima->packedfile is only used by read/versionning
code if .blend version is below 274.4 (i.e. no multi-image packing exists).
2015-05-31 18:28:28 +02:00
3ca0870023 Improvements to the Freestyle Python API (needed by the SVG Exporter)
This patch adds some new functionality to the Freestyle Python API, notably:

  - MaterialBP1D, checks whether the supplied arguments have the same material
  - Fixes a potential crash in CurvePoint.fedge (due to NULL pointer)
  - Makes (error handling in) boolean predicates more robust
  - Adds a BoundingBox type, to make working with bounding boxes easier
  - Adds several new functions (get_object_name, get_strokes, is_poly_clockwise, material_from_fedge)
  - Adds a StrokeCollector StrokeShader, that collects all the strokes from a specific call to Operators.create()
  - Adds hashing and rich comparison to the FrsMaterial type

These new features (most of them, anyway) are needed for making a more robust SVG exporter that supports holes in fills.

Reviewers: kjym3, campbellbarton

Subscribers: campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1245
2015-05-31 23:16:45 +09:00
Julian Eisel
3100fbef5e Fix ugly drawing of closed panels in horizontal layout
Also minor cleanup
2015-05-31 14:34:55 +02:00
f5a471ef86 Python: avoid mutable default param values
D1328 by @yedpodtrzitko
2015-05-31 15:58:58 +10:00
67bebc42f4 UI: comments (doxygen tweaks) 2015-05-31 14:20:03 +10:00
28ef76d0f0 BGE Cleanup: Removing flen variable where it is not used 2015-05-30 18:30:34 +02:00
71dcaa7744 BGE Cleanup: Identical code for both if/else branches 2015-05-30 18:15:11 +02:00
a5a1d4aa3a fix T44884: corrected a wrong usage of the CustomLayer API (due to a misunderstanding) 2015-05-30 14:19:01 +02:00
0a4bf5317f Correct own error with recent commit
Caused entering an invalid number to leak.
2015-05-30 20:26:26 +10:00
0187356613 python tar.gz changed structure due to python.exe being added. remove /lib/ from cmake as lib and bin are both in the tar.gz 2015-05-30 09:44:44 +02:00
1d34d3ee06 python tar.gz changed structure due to python.exe being added.
remove /lib/ from cmake as lib and bin are both in the tar.gz
2015-05-30 09:27:13 +02:00
36d47ce203 Fix leak in BMesh convex hull operator 2015-05-30 16:17:04 +10:00
8b494e03be Fix reading uninitialized buffer 2015-05-30 14:48:42 +10:00
Julian Eisel
1a0c961746 Cleanup: Use true/false for bool, naming 2015-05-29 21:35:13 +02:00
9755986637 BGE: Fix memory leak when unable to add wheel 2015-05-29 17:03:54 +02:00
51bec8e22e fix T44884: Index counter for active UV Map used wrong offset 2015-05-29 16:20:33 +02:00
9876d1f299 Yet another attempt to fix T44869
Fix some integer overflow cases in colormanagement code
2015-05-29 15:43:21 +02:00
dea3f7f5ff GHOST get rid of unused warnings 2015-05-29 15:13:47 +02:00
2f2f7c0e87 Fix T44882, color picker in texpainting doing linear interpolation even
when mipmap is off.

We used to always have nearest interpolation for texpaint but at least
make this work with mipmap off correctly.

Also added conversion casts to avoid integer overflow in filtering code
2015-05-29 13:38:20 +02:00
1bede8644a Fix T44880: transparency filter is only valid with raytransp, not ztransp. 2015-05-29 12:26:58 +02:00
52cfd0eef8 Fix T44879, data transfer modifier was missing a copy function 2015-05-29 11:38:57 +02:00
7b743defd4 Fix wrong 'check context' handling in addon i18n messages generator.
Reported (with patch) by yedpodtrzitko (yed podtrzitko), thanks a bunch!

Differential Revision: https://developer.blender.org/D1327
2015-05-29 11:08:26 +02:00
166408cfe2 UI cleanup: removing if, condition was already tested 2015-05-29 09:27:23 +01:00
af434fea71 BMesh: select linked /w delimiters & wire edges
Add support for using edge delimiters mixed with wire edges.

Code isn't so elegant but users will expect this.
2015-05-29 14:41:39 +10:00
3511e2d6ae Cycles: Enable Object Motion on AMD OpenCL.
Like Camera Motion, only available in the Experimental kernel.
This should be it for the upcoming release, we now support almost everything, apart from Transparent Shadows, SSS and Volume.
2015-05-28 22:10:53 +02:00
Julian Eisel
d3556268d5 Aaaaand another fullscreen glitch
Steps to reproduce were: Set a *Properties Editor* to fullscreen-
>render->Info Editor is set to Image Editor instead of Properties Editor
2015-05-28 20:08:03 +02:00
Julian Eisel
23c7d14afd Fix another fullscreen toggle glitch
Steps to reproduce were: Set 3DView to fullscreen->render->toggle out of
fullscreen->escape->Area doesn't change back to 3DView
2015-05-28 19:48:28 +02:00
18208c8ad9 Fix T44872
All musgrave tupes use intensity, never hide it.
2015-05-28 18:05:50 +02:00
bdf242fa21 BGE Cleanup: Remove old commented Sumo physics code 2015-05-28 17:50:39 +02:00
3b158d2e05 BGE Cleanup: The value of ikconstraint cannot be NULL at this stage and
therefore it is not necessary the NULL check.
2015-05-28 17:18:50 +02:00
8dc6fabc34 Optimize render part commiting to render queue to mitigate delay in
T44869.

There are a couple of issues here:

* Code repeatedly calculated center of ready rendered parts even though
they would not change while the operation was done.

* Code would calculate distance of tiles from center multiple times

* Code would traverse all items, even the ones already sorted
* Traversal used linked lists which is quite slow.

Mitigated these by doing one pass for the center, a second to calculate
distances and a qsort at the end.

Should result in O (n * (log n + 2)) instead of O (n * (n * 2))
complexity, plus the number of repeated operations is much less as well.
2015-05-28 17:01:09 +02:00
eb476c2816 Depsgraph: Cleanup, multiple private functions are to be in anonymous namespace 2015-05-28 13:51:54 +05:00
f777983d5b Add missing particle system tagging on update to the new depsgraph
It's not ideal and mimics weak legacy code, but so close to bcon4 we'd better
not start re-considering the way how particle works..
2015-05-28 13:51:54 +05:00
d9b6768521 Fix T44688: Stereo3D time-sequential crashes 2015-05-28 18:46:15 +10:00
f3161c97a6 Ghost/X11: allow creating windows to fail
Would exit, problematic for setting stereo3d modes which aren't always supported.
2015-05-28 18:46:15 +10:00
4be7258f00 WM: remove windows if they fail to initialize 2015-05-28 18:46:15 +10:00
3dd346c2a1 Cleanup: warning 2015-05-28 18:46:14 +10:00
89c56f6e47 Install_deps: fix different 'libfreetype2' devel package name on fedora and suse... *sigh* 2015-05-28 10:38:48 +02:00
56f6aa977a Multi-value, multi-button cancel keeps value set 2015-05-28 15:52:53 +10:00
2480bbff56 Multi-value cancel, keeps scale set 2015-05-28 15:50:51 +10:00
dc1586063b BMesh: correct flag check (own mistake) 2015-05-28 12:11:35 +10:00
3e0c6a8ca2 BMesh: util functions to get edge loops from verts 2015-05-28 11:46:58 +10:00
46d8bcb617 Cleanup: Remove unused Noise Basis texture code.
Same as last commit, code is unused and this one actually would have required some fixes,
as these variants output values outside the 0-1 value range, which doesn't fit Cycles shader design.
2015-05-28 01:07:37 +02:00
20f6a0f2d7 Cleanup: Remove unused Voronoi texture code.
Let's finally delete this code, after 4 years of being unused,
there really is no excuse anymore.

If we decide to extend the procedural textures in SVM, we can do this anytime in the future.
2015-05-28 00:36:33 +02:00
930bf58478 Clamp min/max frame rate for player 2015-05-27 20:02:53 +02:00
07def553d2 Fix T44745 non manifold edges of mesh do not work when smoothing in
multires.

Code had special guards for such edges to stop this from happening. I
don't see why this is needed though since code above assigns smoothed
positions for all vertices in the grid.

After removing the guards I saw that this in fact was the only place
where grd adjacency was used, so I completely removed it.
2015-05-27 19:52:12 +02:00
9aea98d33c BGE: Add missing m_jumping initialization 2015-05-27 18:19:38 +02:00
c5a8a4e9d8 Fix mismatch in strings length compute in filebrowser, leading to annoying '...' in longest filename.
We must take kerning into account everywhere! Note this will disappear in upcomming filebrowser
refactor anyway.

Reported through IRC by Pablo (venomgfx), thanks.
2015-05-27 17:25:55 +02:00
Quentin Wenger
be4d34ca86 BGE Python API: Completing doc for bge.types.KX_FontObject
This adds description of the Font object and about its (only one)
attribute, as well as an example of use.

Reviewers: campbellbarton, fsiddi, dfelinto, moguri

Reviewed By: dfelinto

Subscribers: lordloki

Projects: #documentation, #game_engine

Differential Revision: https://developer.blender.org/D863
2015-05-27 17:18:43 +02:00
9fc1033429 Fix T44748: Particle is not displayed definitely when I use a new dependence graph 2015-05-27 19:22:52 +05:00
b52af946cd Forgot this in the last commit 2015-05-27 14:43:54 +02:00
c449d4e336 Fix jpeg preview for exr renders broken. 2015-05-27 14:41:51 +02:00
4bf64e841c Correct convex-hull for recent join-tri changes 2015-05-27 21:43:35 +10:00
0e00072ff0 fix:T44856 reverted triangluation back to bmesh ( apparently broken by commit rB51f33 ) 2015-05-27 13:19:40 +02:00
0e02ad8b64 Fix off by one error in display of start/end frame in sequencer. 2015-05-27 12:17:16 +02:00
4c1efcc829 Code cleanup, silence some warnings when building without legacy depsgraph 2015-05-27 13:10:26 +05:00
1fd2e6232a Fix compilation error with legacy depsgraph disabled 2015-05-27 13:09:57 +05:00
e665a60a85 Fix T44854: Creating hooks from curve to objects doesn't work
The issue was introduced in e529882 by doing wrong range checking.
2015-05-27 13:08:17 +05:00
92022218c2 Cycles: Code cleanup, split kernel 2015-05-27 13:08:17 +05:00
da192fb3a7 Missing NULL check getting selected obdata 2015-05-27 11:14:39 +10:00
77f0f3c54e Fix parent tips staying selected after separate 2015-05-27 10:35:14 +10:00
c3810c596e Use PKey for edit-armature separate
As used already for mesh & curves.

Add confirmation menu for curve & armature,
since this isn't such a common operation and undoing leaves object data
(long term bug/todo to fix).
2015-05-27 09:56:50 +10:00
84ad20acef Fix T44833: Can't use ccl_local space in non-kernel functions
This commit re-shuffles code in split kernel once again and makes it so common
parts which is in the headers is only responsible to making all the work needed
for specified ray index. Getting ray index, checking for it's validity and
enqueuing tasks are now happening in the device specified part of the kernel.

This actually makes sense because enqueuing is indeed device-specified and i.e.
with CUDA we'll want to enqueue kernels from kernel and avoid CPU roundtrip.

TODO:
- Kernel comments are still placed in the common header files, but since queue
  related stuff is not passed to those functions those comments might need to
  be split as well.

  Just currently read them considering that they're also covering the way how
  all devices are invoking the common code path.

- Arguments might need to be wrapped into KernelGlobals, so we don't ened to
  pass all them around as function arguments.
2015-05-26 22:54:02 +05:00
4ffcc6ff56 Fix T44497: Crash on deleting curve handle with hook modifier
It was possible race condition on empty curves -- it's possible that curve
object is fully updated and path is null in that cases, Proper way to deal
with this is to check curve_cache for non-NULL.
2015-05-26 22:36:18 +05:00
6245f4a39c Cycles: Enable advanced shading for NVidia OpenCL kernel
It was kept disabled due to render artifacts which weer in fact caused by bad
memory access, which is fixed in the previous commit.

We now also can make it enabled in regular AMD split kernel after someone tests
the updated code.
2015-05-26 21:29:21 +05:00
cf19012fb0 Fix T44831: Crash when using Intel OpenCL with split kernel
The issue was caused by underallocation of object motion related arrays,
which happened by accident.
2015-05-26 21:29:21 +05:00
b90c7dd730 Building without OpenEXR works again 2015-05-26 17:49:08 +02:00
d45c4af469 Cleanup: update comment 2015-05-27 00:00:31 +10:00
89b6c72f8d Cleanup: python 2015-05-26 23:53:47 +10:00
6973e26bf9 Fix T44036: Add option to bake into current action instead of creating a new one.
This is needed when you want to bake only part of an armature's bones, since they
all share a single action, otherwise you'd lose non-baked bones' animation...
2015-05-26 15:32:06 +02:00
a23fbc71a1 Cleanup, add comment for old code. 2015-05-26 14:38:24 +02:00
a64cb4185e Trying to pack image with invalid path crashes 2015-05-26 13:46:14 +02:00
8299284389 Correct own recent error, uninitialized var use 2015-05-26 21:36:49 +10:00
3c9da38e7e Style cleanup: space after keyword 2015-05-26 16:15:52 +05:00
7487a4d4ac Fix T44763: Surface Panel does not update correctly according to Node Output for Cycles UI 2015-05-26 16:15:34 +05:00
d20fd2da72 Revert "Cleanup: set var twice"
This reverts commit eb799dc350.

I recommend reading code before doing cleanup, next time...
2015-05-26 13:01:29 +02:00
bfe0ea4069 Fix own sillyness 2015-05-26 12:58:32 +02:00
ded0004f8b Don't crash with pie menus with more than 8 items.
This will print a warning and users will get overlap of pie buttons, but
it should be quick paper over the cracks and at least should keep
blender working until a more complete fix is coded.
2015-05-26 12:09:51 +02:00
718bc078a8 Fix T44740: Tweak events stuck (ignored release)
Tweak event was being added to the end of the event queue (out of order),
meaning any mouse releases already in the queue wouldn't be used to exit the gesture.
Gestures could get stuck (mostly when the system wasn't able to handle events fast enough).

Now tweak events are now added in order.
2015-05-26 20:07:58 +10:00
de68066c1c Fix multilayer OpenEXR not supporting metadata.
This will fix exporting of metadata and importing for imbufs, but image
editor will not display these metadata since multilayer gets converted
to renderresult, which does not support metadata display yet.
This commit is more meant for external image editors/viewers.
2015-05-26 12:02:30 +02:00
e5fbeba0b3 Images: Solve broken forward compatibility with packed images
Use first packed image as legacy image->packedfile, so saving .blend file with
latest builds makes it so packed images are not lost when opening with previous
releases.

This will only work reliably if mutliview is not used, otherwise it'll be only
first view in the .blend file, which is rather expected since previous releases
are not aware of views.
2015-05-26 14:46:05 +05:00
569a2035c7 GHOST: flush event printer output 2015-05-26 18:51:51 +10:00
de0c269c28 Fix T44821: Making warp shortcut fails
Using OBJECT prefix for editmode operators causes
shortcuts to go into the wrong keymap.
2015-05-26 17:55:34 +10:00
2c3c477223 Cleanup: warning, spelling 2015-05-26 16:46:33 +10:00
9b1ca19396 Fix RMB menu in popup, included 'Header' submenu 2015-05-26 16:45:01 +10:00
e4dc44d7ab Depsgraph: Fix for uninitialized variable in root depsnode 2015-05-26 11:34:18 +05:00
abf7378e44 Fix T44697: Multi-value edit /w layers fails
Not such a nice solution, but good to have this working.
2015-05-26 15:20:46 +10:00
8715fd0925 BMesh: join tris, split angle limit in two
Use a separate limit for face-angle and shape comparisons.

There was no way to join non-rectangular, co-planer tries.
2015-05-26 14:27:38 +10:00
9ce20d3341 BMesh: join tris now delimits all UV/Color layers
Previously was only checking active layers

Also add delimit by edge seam
2015-05-26 13:42:59 +10:00
eb799dc350 Cleanup: set var twice 2015-05-26 10:25:01 +10:00
de21604cf4 Minor cleanup... 2015-05-25 22:24:46 +02:00
1ac0fef345 Fix widget_draw_preview() not taking into account given alpha.
Needed to get correct 'inactive' effect on buttons with big previews.
2015-05-25 22:06:25 +02:00
e092a58fb5 I18n message extractor script: py code: do not consider strings inside 'Compare' AST nodes.
Otherwise, we'd get 'MOVIE' from `text="Build Proxy / Timecode" if clip.source == 'MOVIE' else "Build Proxy")`...
2015-05-25 21:17:49 +02:00
5e66827029 Fix T44842: Modal Timer (template) should return {'CANCELLED'} when cancelled! 2015-05-25 17:43:28 +02:00
6b5f3f5fef preview buttons: tiny optimization 2015-05-25 15:38:12 +01:00
Dalai Felinto
3a7691b73f Fix T44836: crash when multi-view is enabled and switching to BI rendered viewport display 2015-05-25 10:15:18 -03:00
2464395b6d Depsgraph: Avoid unnecessary char*/string conversion when creating RNAPathKey 2015-05-25 18:05:19 +05:00
0b9a65b2ae Fix T44709: New Depsgraph not evaluating driver interactively
Issue was caused by drivers which uses component of an array as a target,
this was not handled properly in the RNA path key.
2015-05-25 18:03:06 +05:00
a80c1e50bc Fix T44822: python enums' itemf callback did not handle 'NULL' context case.
Enum's itemf callback can be called without context in some cases (UI, doc generation...).
Python's enum properties did not handle this at all - it's kind of odd this did not cause
more trouble and wasn't notice earlier... Probably dynamic enums using context are not
much used in py code.

Note about nodes: those are heavy users of dynamic enum with context. Now,
we expect `NodeCategory.poll()` and `NodeItem.poll()` to always be called with
a valid context (since when there is no context available, we can assume `poll()`
is always True). `NodeCategory.items()`, however, must accept NULL context, so if
you use custom `items` callable for your custom node categories, you may need
to update it (as was done here for builtin `node_group_items()`).
2015-05-25 14:24:49 +02:00
39b85e452f Fix T44815: Sound bake doesn't check filepath 2015-05-25 22:13:18 +10:00
62f2d9b566 Cycles: Fix compilation error of split kernel
The code was failing to compile on runtime because of some path differences,
and it seems we don't need to specify full path to the file which originally
seemed to be needed to make include directives expansion working correct.
2015-05-25 14:18:01 +05:00
153cebd95b BGE: Fix bug with default material and MTFace.
It set default material even if there are a MTface but no blender material.
Tested in GLSL and Multitexture.

Reviewers: HG1
2015-05-25 10:33:04 +02:00
a5a648c7c6 Fix error redoing shrink fatten
Use a property to store even-offset option.
2015-05-25 15:45:56 +10:00
7fd93dc8dc Fix bend in object mode (wasn't rotating objects) 2015-05-25 10:37:09 +10:00
fe9ce6603c Fix memory leak /w bend tool 2015-05-25 10:37:09 +10:00
7b60a0f64b Cleanup: const char for operator ID's 2015-05-25 10:37:09 +10:00
a3ef51bba5 Fix T44833, OpenCL compile error on AMD.
This was broken after the kernel file restructure.
Variables allocated in the __local address space can only be defined
inside a __kernel function.

We probably need to solve this a bit differently once we do the CUDA
kernel split, but this fix shoud be good enough until then.
2015-05-25 01:02:06 +02:00
c3ab5b3089 Fix T44830, wrong sample progress number when using split device.
Value was not set, moved it out of the constructor into
device_opencl_create() now.
2015-05-25 00:37:01 +02:00
025a646114 Fix T44823: No menu entry for Circle Select in UV/Image editor. 2015-05-24 19:27:59 +02:00
78918e761f Fix T44814: 'preview' icons would not greyout.
Since they are premultiplied, we need separated handling of colors and alpha blending
if we want additional alpha factor to work OK.
2015-05-24 18:35:14 +02:00
a28adf1b35 Some more minor cleanup in new icon preview code. 2015-05-24 16:50:15 +02:00
febf8cb01d Cleanup: style 2015-05-25 00:19:39 +10:00
7f89bc8e85 Fix rare crash duplicating fluidsim 2015-05-25 00:19:39 +10:00
f9b6f5756c Fix crash clearing skin data on non mesh 2015-05-25 00:08:43 +10:00
0305e9604b Fix RNA type access 2015-05-25 00:08:43 +10:00
7456f06097 Fix unreported bug with recent enum icon preview changes, would show bad in case of mixing
items with and without label.
2015-05-24 15:49:04 +02:00
4737722968 Fix error joining tris -> quads
Incorrect flag check, would need to run multiple times.
2015-05-24 21:54:21 +10:00
2da9a39418 BGE : Fix black material on meshes without materials in blenderplayer.
Blenderplayer forgot to initialize the default material (defmaterail) with function init_def_material().
This reverts also the plumber commit 2fa4a48bce.

Reviewers: campbellbarton
2015-05-24 11:46:57 +02:00
78250f1d1d IconView template: adding optional labels to popup buttons 2015-05-23 16:21:05 +01:00
f01c6e185f Cleanup: typos 2015-05-23 22:38:47 +10:00
f340595dba Quadric: add common why doubles are used. 2015-05-23 22:37:46 +10:00
bc83076355 Math Lib: update API usage info 2015-05-23 22:37:37 +10:00
25f5d2b4d7 Fix (unreported) broken RNA Image pack handling since multiview merge.
Was breaking loading of embedded FBX images (among other things, most likely).
2015-05-22 23:28:41 +02:00
e529882be0 Fix second crashing part of T44497, out of bounds access to hook
modifier data.

Unfortunately seems like we also lose the hook mapping by doing this,
but this can be fixed later and is probably a separate issue.
2015-05-22 16:59:22 +02:00
cd9dc3143c BGE: grey out Alpha and Specular sliders when Transparency panel is
unchecked
2015-05-22 16:03:38 +02:00
2c503d8303 Cycles: Restructure kernel files organization
Since the kernel split work we're now having quite a few of new files, majority
of which are related on the kernel entry points. Keeping those files in the
root kernel folder will eventually make it really hard to follow which files are
actual implementation of Cycles kernel.

Those files are now moved to kernel/kernels/<device_type>. This way adding extra
entry points will be less noisy. It is also nice to have all device-specific
files grouped together.

Another change is in the way how split kernel invokes logic. Previously all the
logic was implemented directly in the .cl files, which makes it a bit tricky to
re-use the logic across other devices. Since we'll likely be looking into doing
same split work for CUDA devices eventually it makes sense to move logic from
.cl files to header files. Those files are stored in kernel/split. This does not
mean the header files will not give error messages when tried to be included
from other devices and their arguments will likely be changed, but having such
separation is a good start anyway.

There should be no functional changes.

Reviewers: juicyfruit, dingto

Differential Revision: https://developer.blender.org/D1314
2015-05-22 16:31:34 +05:00
7f4d5850fe SCons: Don't install SConscript into Cycles kernel folder 2015-05-22 16:00:26 +05:00
be6479c9ea Fix T44801: Blender crash in UV-editor.
Mistake in cleanup rB30b45d55... Odd compiler did not yell at that. :|
2015-05-22 11:01:22 +02:00
ed2cb8de2f Fix for join faces ignoring angle limit
Angle limit for join-faces was more advice then actual limit.
Now joining entire selection, gives assurance that no faces above the limit will be merged.

The purpose of this was to allow users to isolate 2 faces and always join them.
Instead, support this by bypassing limit only when its not set and 2 faces are selected.
2015-05-22 18:14:03 +10:00
476feb622c BMesh: extrude region didnt copy edge flags
Newly created edges around regions wouldn't get the edge flags from surrounding geometry.
2015-05-22 11:00:14 +10:00
a934730368 Cycles: Remove TM / R and whitespace from OpenCL device names.
Was already done for CPU devices, now we also do this for OpenCL.
2015-05-21 23:43:18 +02:00
53eab562b4 Cleanup: Remove some outdated comments related to split kernel. 2015-05-21 20:32:20 +02:00
8843a09df3 Fix T44744, tangents incorrect in edit mode.
Really bad code here, index of fetched data was basically totally off
and unrelated to what it should be.
2015-05-21 20:28:17 +02:00
e8014352c6 Yet another crappy Intel driver added for correct SSAO support. 2015-05-21 18:37:48 +02:00
f6062638c1 Fix crash in blenderplayer when scrubbing off screen.
Was cache referencing deleted or NULL items.

Reported by Kopias on irc
2015-05-21 17:37:11 +02:00
a39efae03d Fix T44778 missing specular transparency slider in game engine 2015-05-21 16:37:37 +02:00
d3c67bc81e Fix T44791 triangles when painting on a texpaint plane
Problem was float precision issues across tile boundaries. Since we are
comparing pixels, give a small tolerance when comparing clipped vertices
against triangle lines.
2015-05-21 16:06:42 +02:00
069adb8104 SCons: Fix for missing avx and avx2 cycles kernels
SCons was checking for a particular compiler version to see whether compiler
flags are available or not, but compiler ID was only set on OSX.

Now it should be set on Linux as well.
2015-05-21 18:46:57 +05:00
25bedeca9b GPencil Eraser Size-Saving Fix
On second thought, the eraser size should be saved even if the brush type is not
eraser, as we can toggle this now.
2015-05-22 01:21:29 +12:00
389564c711 Fix T44774: Grease Pencil eraser size reset after exiting session
Previously, it would only save the eraser size if the session ended properly,
instead of being cancelled. However, that wouldn't happen if exiting the session
using Esc.
2015-05-22 01:21:28 +12:00
03eee4dce7 BMesh: decrease decimate epsilon
Since using doubles to calculate cost,
using topology fallback cost isn't needed as much.
2015-05-21 22:46:33 +10:00
4b8dcfc0f5 Fix T44795: same menu item for different command in node editor.
We have too much of those cases in our UI, if we want to keep operators doing
several similar/related but yet different tasks, we should have a real way to
support it on label/icon/tip side too. Easier to say than to do though. :|
2015-05-21 13:20:54 +02:00
7938bd1877 Cycles: Remove OSL from split headers
Split kernel is mainly useful for GPUs which can not support OSL in visible
future anyway.
2015-05-21 16:12:50 +05:00
329f704601 Cycles: Move utility atomics function to util_atomic.h
No functional changes, just better to keep all atomic function in a single place,
they might become handy later.
2015-05-21 16:12:50 +05:00
e37c4e5819 Fix T44780: Decimate planar creates concave edges
Float precision was causing problems for decimate,
small faces that create a nearly flat surface were detected as having no 'cost' to collapse.
2015-05-21 21:06:30 +10:00
6ee653352b Math Lib: double versions of vector funcs
- add_vn_vn_d
- add_vn_vnvn_d
- mul_vn_db
2015-05-21 21:06:29 +10:00
6b40a4bcb1 Fix T44794: Blend From Shape tool X Icon UI Bug?
Note: maybe we could even make `RNA_property_is_unlink()` always return false
for enum properties? But well, guess being explicit here does not hurt...
2015-05-21 12:00:31 +02:00
d4c676e81b Cycles: CYCLES_OPRNCL_DEBUG now affects on split kernel as well 2015-05-21 14:30:33 +05:00
f18d77b874 Cycles: Restore some lost custom cflags passed to the kernel compilation
They were lost during simplification of kernel loading but might be rather
crucial for the performance.

Also made it so cflags are shared across kernels. Surely it might lead to
some unwanted kernel re-compilation but at the same time they might easily
run out of sync with the changes in kernel and so.
2015-05-21 14:05:53 +05:00
aa54d93a29 BMesh: decimate improvement for flat surfaces
Previously decimate on flat areas of a mesh would more or less randomly collapse edges.
(giving bad topology).

This commit includes a topology 'cost', so smaller edges on flat surfaces collapse first.
2015-05-21 16:41:08 +10:00
2c000cc9fc Fix mesh mirror failing on isolated verts 2015-05-21 13:01:44 +10:00
9bfea67751 UI: Use Ctrl+Wheel to cycle values
Conflicted with Alt for editing multiple values.
This could also conflict with global frame change at times.
2015-05-21 11:06:24 +10:00
1aa1a53115 UI: ignore mouse wheel while editing text
Mouse wheel was used as home/end.
Was annoying since it could happen by accident.
2015-05-21 10:46:22 +10:00
2b0613b948 Fix: GPU_shader_export fails /w some lamp attrs
first/last vars missed some values.

D1309 by @NHA
2015-05-21 08:48:21 +10:00
148ed4e05e Cycles: Cleanup, synchronize name across file name, program and kernel names 2015-05-20 23:10:07 +05:00
6f48df45ee Cycles: Simplify code around kernel loading 2015-05-20 23:10:07 +05:00
093d11df35 BGE: Some changes for the constraint document
* Change the constraint type alignment to vertical.
* Changed PHY_CONE_TWIST_CONSTRAINT to the correct value.
* Some minor changes.
2015-05-20 18:49:18 +02:00
2c5d5a9feb BGE: Remove chapter in KX_WorldInfo python API 2015-05-20 18:36:02 +02:00
Martijn Berger
8dd9b7cc5f Cycles standalone, add device type in output listing 2015-05-20 17:11:09 +02:00
b5bf5b36f1 BMesh: decimate, test for face flip was too low
Created overlapping faces in T44780
2015-05-21 00:00:13 +10:00
24e1d7f4f4 BMesh: decimate wasn't using face/edge centers
When calculating quadrics, using the first-vertex isn't correct.
2015-05-21 00:00:13 +10:00
8edfcf653a Movie Clip: Invlaidate clip cache when changing timecode 2015-05-20 17:52:58 +05:00
44a6109ca9 Clip Editor: Make it more obvious that Rebuild Proxy also rebuilds Timecode 2015-05-20 17:52:57 +05:00
77ef3f9041 Fix T44717: use_negative_frames ignored /w graph-editor
D1303 by @barfot
2015-05-20 21:58:33 +10:00
eb6bab25ba Add dedicated command argument to switch depsgraph to a single-threaded evaluation
This way it is possible to have single threaded depsgraph but threaded other areas
which is handy for torubleshooting.

he argument is: --debug-depsgraph-no-threads
2015-05-20 15:48:29 +05:00
8c6a9b9edc Fix reserve frames in sequencer failing with big frame ranges.
Detect frame range automatically from number of digits.
2015-05-20 12:42:00 +02:00
f4d064a5b2 Send color managed signal if input spaces changes during image saving
We're currently only supporting save to a default format color space, which
makes it a bit tricky to prevent ImBuf from being changed.

For until when saving to a custom colorspace works we'll just reload image
if the space changes.
2015-05-20 15:33:30 +05:00
28b2977be9 Atomic operations: Add function declarations at the top of the header
No functional changes, just helps grasping what operations are actually
supported.
2015-05-20 11:57:17 +05:00
5d30c23c35 doxygen: corrections/updates
Also add depsgraph & physics
2015-05-20 14:12:22 +10:00
922d5ed939 doxygen: update config 2015-05-20 14:09:43 +10:00
f0c143ca72 doxygen: rename included files (they were ignored) 2015-05-20 13:06:42 +10:00
a1e8547877 BGE: Use CameCase code style for KX_WorldInfo python API. 2015-05-19 23:13:30 +02:00
377822729c BGE: Fix T40555: LibLoad material caching issue
Previously we don't merge material cached list, it create dangling pointer and memory leak.
Now we merge material cache list during the scene merge, and remove material in this list during the library free.

Reviewers: agoose77, dfelinto, hg1, pgi, campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: campbellbarton, youle, kupoman

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1278
2015-05-19 19:24:14 +02:00
fccf253e36 Support string metadata loading for OpenEXR files. 2015-05-19 18:32:41 +02:00
150a4b23ba Fix part of T44768 Yet another Intel driver failing on viewport Ambient
occlusion

(Maybe we should add drivers that DO work instead, but in the future
those will be much more since Intel claims to have fixed the issue)
2015-05-19 16:25:42 +02:00
158c891520 Clear animation list to avoid referencing freed memory. 2015-05-19 16:15:55 +02:00
df0a1fa3c5 Fix T44766: Connect fails /w selected ngon edges 2015-05-19 23:51:57 +10:00
07e9fb8ec6 BMesh: calls to store selection at the list head 2015-05-19 23:51:57 +10:00
d3cc7419a3 BMesh: add BM_edge_pair_share_face_by_len 2015-05-19 23:51:57 +10:00
78411dc7d7 Fix T44755 set_value node output in node tree not properly converted to
color in GLSL

Issue here is that intermediate result was clipped as an optimization in
such nodes and thus not converted to the correct type properly. Now only
clip those values if types match.
This keeps both the optimization and the conversion. I looked at
converting uniform types always but it's more involved to compare types
at conversion time for such links because the type was getting
overridden during link duplication.
2015-05-19 15:37:08 +02:00
dc3533030a Fix T44553.
Front face option did not get the correct normals to function - area
normal would always point to the direction of the stroke
2015-05-19 11:49:46 +02:00
e8561e966d Fix T44762: Materials flicker in edit-mode 2015-05-19 19:13:25 +10:00
ac636a3c97 Fix T44759: Blender has problems reading and writing 42k images to PNG 2015-05-19 13:02:52 +05:00
293df68ebd Object Drawing: avoid redundant material update 2015-05-19 18:00:20 +10:00
eb05e87e16 BMesh: editmode drawing set every faces material
Check for changes in material (as other drawing code already does)
2015-05-19 18:00:19 +10:00
da34136de1 Cycles: Check for validity of the tiles arrays in progressive refine
In certain configurations (for example when start resolution is set to small
value for background render and progressive refine enabled) number of tiles
might change in the tile manager. This situation will confuse progressive
refine feature and likely cause crash.

We might also add some settings verification in the session constructor, but
having an assert with brief explanation about what's wrong should already be
much better than nothing.
2015-05-19 12:42:07 +05:00
f868be6295 Cycles: Check for whether update/write callbacks are set prior to calling them
This changes the progressive refine part, regular update was already checking
for whether callbacks are set.
2015-05-19 12:42:07 +05:00
ddb1a068e9 SCons: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
e698299e4f CMake: install Python executable when its bundled 2015-05-19 16:44:19 +10:00
d5a85f87b0 Python: search for 'python' and 'python#.#' 2015-05-19 16:44:19 +10:00
3d70a04a8a CMake: remove temp assignment, unused vars 2015-05-19 16:44:18 +10:00
183b643774 Building without Python works again 2015-05-19 11:38:07 +10:00
65328fadc3 Final solution for Intel card Ambient Occlusion in T43987.
Forgot to account for offscreen case in addition to compositing
2015-05-18 22:10:54 +02:00
Julian Eisel
598c2dffe9 Fix T44708: UI label should use plural
Just to keep commit ratio up while being busy preparing for final exams
;)
2015-05-18 21:29:57 +02:00
192fddb324 BGE: Fix blenderplayer bad call stubs not updated.
Please (dfelinto) compile the bge to avoid these kind of problems.
2015-05-18 18:54:13 +02:00
5fa0b8778b BGE: Set default envMap resolution to 512 pixels
I propose to change  the environment map render default resolution (600) to 512 (Thanks brecht for the correction... I don't know why I said dpi) (to make it compatible with this script: http://en.wikibooks.org/wiki/GLSL_Pr...cting_Surfaces ) to make cubeMap reflections easier and avoid this error:

invalid envmap size please render with CubeRes @ power of two
unable to initialize image(0) in MAMaterial, image will not be available

http://blenderartists.org/forum/showthread.php?371232-BGE-proposal-Set-default-envMap-resolution-to-512-dpi

http://blenderartists.org/forum/showthread.php?370026-Problem-with-cube-map-textures (post 11)

Author : youle (Ulysse MARTIN)

Reviewers: hg1, agoose77, lordloki, moguri, panzergame, dfelinto

Reviewed By: panzergame, dfelinto

Subscribers: brecht

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1306
2015-05-18 18:12:40 +02:00
Dalai Felinto
947b756d5e Multi-View: small cleranup/refactor with RE_pass_find_by_type and RE_RenderLayerGetPass 2015-05-18 10:57:59 -03:00
cecd1f98a4 Fix T44752: Clip Editor doesn't respect ColorSpace setting when playback after Prefetch 2015-05-18 16:40:52 +05:00
45afc02f11 Solve threading conflict related on proxy group's inverse matrix
It was possible that two threads will start calculating proxy group's inverted
matrix and store it in the object itself. This isn't good idea because it means
some threads might be using partially written matrix.
2015-05-18 16:40:52 +05:00
61f9f508a4 Make object material drivers evaluation thread safe
Previously it was very easy to run into situation when two objects are sharing
the same materials with drivers which will cause threading access issues.

This actually only needed for the old depsgraph, but since it's still the one
we're using by default we'd better solve this issue.
2015-05-18 16:40:52 +05:00
8540907d60 Attempt to make drivers more safe for threading
There were some reported data race conditions in the python interpreter which
seems to be rather valid.

Surely this is not very pretty solution, but it might solve some annoying bugs
related on threading.
2015-05-18 16:40:52 +05:00
40091ff83a Correction to early output in the parallel range implementation
The used heuristic of checking the value prior to lock is not totally safe
because assignment is not atomic and check might not give proper result.
2015-05-18 16:40:51 +05:00
b88597c218 Make switching to threaded malloc safe to be called from threads
For a long time this function was only intended to be used from the main thread,
but since out implementation of parallel range (which is currently only used by
mesh deform modifier) we might want to switch to threaded alloc from object
update thread.

Now we're using spinlock around the check, which makes the code safe to be used
from all over the place.

We might consider using a bit of atomics operations magic there, but it's not so
much important for now, this code is not used in the performance critical code
path.
2015-05-18 16:40:51 +05:00
17388794ce Filebrowser: Do not intent to draw empty strings, loss of time.
Fixes assert raised in `UI_text_clip_middle_ex()` when trying to draw (empty) 'size' string
for appended/linked blender datablocks.
2015-05-18 13:02:05 +02:00
bf93316c52 Fix assert in outliner regarding WM and SCR ID types... 2015-05-18 12:53:31 +02:00
5dfe88adba Fix T44553: Dyntopo ignores front-face option
When 'Front Faces' brush option was enabled, dyntop would still adjust detail on back-faces.
2015-05-18 18:22:31 +10:00
3dfce097e4 Cleanup: use const for Imbuf file types 2015-05-18 16:27:08 +10:00
924f31e54f Fix T44543: painted texture lost after first save
Fix for T36639 caused all path changes to reload (which could loose user content).

Change behavior:

- Only reload data when a flag is explicitly passed
  (currently only used by Find Files operator)
- Don't reload images which have been painted onto and not saved (dirty flag set).
2015-05-18 13:42:47 +10:00
662746fdd4 Fix multi-drag & multi-select, Alt press mid-drag
This would enable multi-value-editing in the middle of the drag action.
2015-05-18 11:52:59 +10:00
88acb3c599 Fix T44707: cycles border render regression 2015-05-18 11:37:19 +10:00
29aae4db38 UI: errors in buttons now show in info report
Mistakes in button expressions were previously only printed to the console.
2015-05-18 10:02:29 +10:00
3ed009af96 Change behavior of cycles xml to conform the spec: "Each XML document has exactly one single root element" 2015-05-17 23:41:38 +02:00
0b5bf9d419 BGE: Fix T42244 LibLoad crash with logic brick KX_TouchSensor
I remove duplicate and wrong code which treat the special case of KX_TouchSensor.
And Also the re-conversion of linked logic brick.
2015-05-17 22:19:09 +02:00
Julian Eisel
d1230ca723 Fix Node Editor using wrong snap element menu when called from shortcut
Kudos to @kopias for notifying me :)
2015-05-17 19:47:03 +02:00
105b87a3f7 Cycles: Enable advanced shading on AMD / OpenCL.
That is needed for Motion Blur and Render Passes to work properly.
I hope there are no nasty side effects, but we need to test this.
2015-05-17 19:29:33 +02:00
dae566894a Cycles / OpenCL: Enable Camera Motion and Hair for AMD.
Only enabled for the Experimental kernel though, so the feature set must
be changed in the UI to use the features.
2015-05-17 18:46:25 +02:00
14c2bc53c0 Cleanup: Typos, typos everywhere. :D 2015-05-17 18:32:31 +02:00
4139686817 Fix T44713: GLSL and BI inconsistency converting color to float node socket. 2015-05-17 18:18:04 +02:00
3cff7768d5 Fix T44718: Cycles GLSL not working for NURBS objects. 2015-05-17 17:25:57 +02:00
43ee3f4040 Fix T44739: OS X RMB emulation giving wrong mouse button release event. 2015-05-17 16:55:18 +02:00
48ed2b6309 UV editor: make Ctrl+E menu with mark/clear seam, instead of always marking. 2015-05-17 16:54:14 +02:00
a622cdaad8 Buildbot: Make sure files are readable by www group 2015-05-17 19:28:12 +05:00
2b9d806432 Fix T44084 - Cursor gets reset after MMB scrolling in another area while in GPencil Continous Draw Mode 2015-05-18 02:25:32 +12:00
206f29c12c Fix T44685 - In grease pencil stroke editing, selecting points is offset by a few pixels
The problem was that it was aborting too early after stumbling across a point which
might fit within the bounds required. This commit improves the logic here to solve
this and a few other little bugs like that.

Disclaimer: There are still a few cases where it randomly ends up picking something
way off. However, this only seems to occur very sporadically, so it's hard to say
how bad the problem may be.
2015-05-18 02:03:39 +12:00
30b45d5591 BMesh: don't check winding for uv-vert-map
Made link-select separate front/back with projected UV's
2015-05-17 23:06:41 +10:00
b68fa820d6 Fix T44715: crash compositing with undefined node due to re-save in older version 2015-05-17 13:44:22 +02:00
3b359f1fea BGE: Fix T43761 No re-creation of display list after a mesh modification.
I also removed unused flags in RAS_ListRasterizer.cpp.
2015-05-17 12:53:57 +02:00
4d45f47920 Fix T44737: Missing 'Spin' op entry in surface (NURBS) tools/menu. 2015-05-17 12:45:07 +02:00
effb912061 Cycles Standalone: Expose various light settings. 2015-05-17 12:36:42 +02:00
dad2850cc5 Numeric Input for Pose Breakdowner/Slide/Push Tools 2015-05-17 22:28:25 +12:00
347843f6fe Cycles Standalone: Update help screen. 2015-05-17 12:10:30 +02:00
f51fef63aa Fix own error deleting previews 2015-05-17 17:26:01 +10:00
847ec075eb Cleanup: pep8 2015-05-17 17:26:01 +10:00
02cbc3c1e0 Cleanup: indentation 2015-05-17 17:25:57 +10:00
daeb3069cf Cleanup: typos 2015-05-17 16:09:32 +10:00
6ba128129d CMake: correct file listing 2015-05-17 16:09:15 +10:00
60f60ed496 CMake: fixes for own checking script
don't error if generated files are missing.
2015-05-17 16:05:38 +10:00
6c15f3044b Yet another attempt to fix Intel case for T43987 2015-05-16 23:09:11 +02:00
dcacc54e07 Freestyle: Fix for stroke rendering performed with multi-views enabled.
Per-view Freestyle stroke rendering needs to be done without multi-views.
2015-05-16 23:59:14 +09:00
4c0f0eb338 Fix T44691 Freestyle render crashes when Views is on (Blender Internal).
In pipeline.c the function add_freestyle() was supposed to be called once
per frame, but after the Multi-view merge the function are called as many
as the number of views.  There were however a few Freestyle parameters
that have to be initialized per frame, and initializing one of the
parameters for each view was causing double freeing of allocated memory
which was enough to result in a crash.
2015-05-16 23:59:11 +09:00
a49534ae48 setting some RNA defaults for nodes 2015-05-16 13:04:40 +01:00
dddb4f655c BMesh: link-select-pick now supports redo
Without this you can't change delimiter options without editing the keymap.
2015-05-16 20:53:35 +10:00
3aa4a0e787 BMesh: add UV delimit for select-linked, dissolve 2015-05-16 12:21:31 +10:00
05c4c2409e BMesh: add sharp edge delimiter 2015-05-16 10:18:38 +10:00
5cc55486ee BMesh: select linked, support other delimiters
Use same options as limited dissolve (adds material & winding)
2015-05-16 10:17:46 +10:00
1bb3d0d485 Select linked seam limit, now works for picking
Second half of fix for also T42510
2015-05-16 09:35:35 +10:00
eeadd19eb5 Cleanup: use define for playback frame limiter 2015-05-16 08:35:25 +10:00
80c0097210 Only initialize icons in background mode.
Also enable this for headless builds too.

Calling UI_icons_init would initialize matcaps, brushes etc...
2015-05-16 06:21:26 +10:00
b931afe55e Fix new 'custom previews/icons' py feature crashing in background mode.
We want this even without UI, some scripts may use it in a background processing
mode to avoid too heavy process in actual 'user' blender...
2015-05-15 20:12:25 +02:00
08f30ef31c Fix T44724: missing menu entries for 'view fit' (F) in clip/image editors. 2015-05-15 19:49:00 +02:00
2d479421af Fix crasher in new lazy-rebuild outliner's treehash.
treehash must always been checked before used!

Reported on irc by sebastian_k and investigated by sergey, thanks!
2015-05-15 19:29:18 +02:00
5dc22fbbfb BGE: Fix T41299 Group API for child object in dupli instance group. 2015-05-15 19:17:15 +02:00
ce0d3112e4 Scene audio naming cleanup:
Remane sound_scene_handle to playback handle.
sound_scene_handle was a part of scene so we could see code like scene-
often in the same function.

If I understand things correctly, in audaspace lingo, the
playback_handle corresponds to a Reader while the scene_sound
corresponds to a Factory.

More cleanups will be done here later, but changing this now because my
brain hurts trying to remember which is which...
2015-05-15 16:51:46 +02:00
3d658bf7a7 BGE: Fix stupid typo error in DupliGroupRecurse 2015-05-15 16:25:45 +02:00
371e5f25a0 BGE: Cleanup : merge 3 loop in 1 in function DupliGroupRecurse. 2015-05-15 16:20:06 +02:00
f4e8e70b5d Add really simple memory reduction scheme for internal animation player.
Holds 30 frames in memory. Could make it check memory instead but that
should suffice for now to make sure blender does not crash on me with
movie files.

Previously the system would load eveything in memory so something like
playing caminandes in player would swap after 30 seconds in local
computer.
2015-05-15 16:01:01 +02:00
31e96cbf96 Cleanup: style, spelling 2015-05-15 23:38:53 +10:00
2fa4a48bce BGE: Fix T44700 mesh without material in blenderplayer.
If a mesh doesn't have a material we don't initialize the mSavedData in KX_BlenderMaterial to avoid crash.
2015-05-15 14:54:38 +02:00
7c06190882 Cycles: Make animated seed a builtin feature.
For animations, you often want an animated render seed (noise pattern).

This could be done by e.g. setting a driver on the seed value.
Now it's a little checkbox, that can be enabled.

The animated seed is based on the current Blender frame and
the seed value itself. Simply enabling it, will already result in an animated
seed (different on each Blender frame), but it can be randomized further
by setting a different seed value.

Disabled per default, so no backward compatibility break.

Differential Revision: https://developer.blender.org/D1285
2015-05-15 13:54:59 +02:00
e4c93dc7db Zoom to frame options, requested by the Hwoozeberry (dutch translation)
team.

There are 3 options here:

1) Keep range (previous behaviour)
2) Seconds - allows a specified offset in seconds around current frame
3) keyframes - zoom to include a number of keyframes around the cursor

Options 2 and 3 have their own properties to tweak the behaviour and all
options can be found in User Preferences->Interface under the 2D
viewports section.

Number 3 will probably need some refinement so commiting here for the
hwoozeberry team to test first.
2015-05-15 13:39:30 +02:00
c86a6f3efb Cycles: Enable CMJ for Intel/NVidia experimental split kernels
It is still disabled for AMD devices since can't test if it works fine
on this hardware.
2015-05-15 13:22:47 +05:00
c2b9f78415 Cycles: Pass __KERNEL_EXPERIMENTAL__ to OpenCL split kernels
Experimental feature set id currently unavailable for megakernel, it'll
require some changes to the cache system to distinguish cached regular
kernels from cached experimental kernels.

Currently unused, but some features will be enabled soon.
2015-05-15 13:22:47 +05:00
2ab909a88c Cycles: Make experimental kernel build option more generic
Previously it was explicitly mentioning it's NVidia kernel related option,
but in fact it's also handy for the OpenCL kernel.
2015-05-15 13:22:47 +05:00
c9e8888f87 Cycles: Disable bake OpenCL kernel for NVidia devices prior to sm_30
Driver fails to compile kernel in reasonable time for those devices here,
so for easier testing of the OpenCL split kernel work disabling bake kernel
for now.
2015-05-15 13:22:47 +05:00
960d7df56f Cycles: Pass device compute capabilities to kernel via build options
This way it's possible to do device-selective feature disabling/enabling.
Currently only supported for NVidia devices via OpenCL extension.
2015-05-15 13:22:47 +05:00
650fbd09f7 OpenCL wrangler: Add some of the extension defines 2015-05-15 13:22:47 +05:00
03f9d5a4cf 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.
2015-05-15 13:22:47 +05:00
ba9dbaae64 Fix T42510: Limit by seams fails in edge/vert mode 2015-05-15 17:14:02 +10:00
547b676181 BMesh: add loop-shell walker 2015-05-15 17:07:57 +10:00
cfe54245a8 Correct recent cleanup
Removed call which was still needed
2015-05-15 11:29:34 +10:00
bc371030a7 BMesh: rename loop walker -> edgeloop 2015-05-15 10:55:56 +10:00
Julian Eisel
a92d8a34a8 Add material reorder buttons for Cycles as well 2015-05-15 01:25:03 +02:00
Julian Eisel
7549ec7301 Fix some issues found by Coverity Scan
Some of them are just brain dead code, some are potential bugs.
2015-05-15 01:08:41 +02:00
3c10ec96b5 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
kernels.

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.
2015-05-15 00:48:12 +05:00
03565218d5 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.
2015-05-15 00:42:05 +05:00
f6c6dd44de 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.
2015-05-14 23:44:19 +05:00
5c34266383 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.
2015-05-14 23:35:19 +05:00
0a60c7d8ee Cycles: Fix missing camera-in-volume update when using certain render layers configurations 2015-05-14 19:08:13 +05:00
3d3d805b64 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.
2015-05-14 18:48:56 +05:00
5a63edb929 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.
2015-05-14 18:48:56 +05:00
33439626f1 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.
2015-05-14 18:48:56 +05:00
79aa50dc53 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.
2015-05-14 18:48:56 +05:00
e7f2aec81b BGE: Add 'Lock Translation' for dynamic objects
The XYZ translation lock was missing for dynamic object.

Reviewed By: panzergame
2015-05-14 15:23:42 +02:00
1ccc417477 Invert value calculation for percentages it makes more sense that way 2015-05-14 14:22:57 +02:00
7aa74dfe5e Radial operator:
Percentage properties use interaction like factors with number feedback
and easier way to go predict lower percentages.
2015-05-14 14:01:33 +02:00
057a8c6250 Add clear seams to uv editor 2015-05-14 12:48:47 +02:00
8bf9e1412f 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: https://developer.blender.org/D1220
2015-05-14 09:45:51 +02:00
687f6a9752 BGE: Code Cleanup: LOD hysteresis calculation
* Cleanup duplicated code.
* Remove unnecessary "this->"

Reviewers: kupoman, lordloki

Reviewed By: kupoman, lordloki

Differential Revision: https://developer.blender.org/D1293
2015-05-14 09:40:03 +02:00
434086dc53 install_deps.sh: correct typo 2015-05-14 13:13:13 +10:00
9207c8d669 Fix project paint worldspace coord calc from seam
Surprising this worked at all, would show errors with non-flat-quads.
2015-05-14 13:06:19 +10:00
0e80eb82e0 Cycles: Resize light_data after possible light removal. 2015-05-14 01:13:40 +02:00
67eb2c7897 Cycles: Remove Emission shaders from the graph if color or strength is 0. 2015-05-14 01:13:40 +02:00
da1038c768 UI: Copy to selected nodes now filtered by type
Was needed because sockets are very generic type which would match on unrelated values.
2015-05-14 06:27:51 +10:00
fc31bae66f Cleanup: Avoid temp variable in portal sampling code. 2015-05-13 19:54:52 +02:00
93867ae549 Cycles: Cleanup: use generic utility function to set kernel arguments 2015-05-13 19:56:24 +05:00
51a6bc8faa 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(),
2015-05-13 19:56:24 +05:00
0a6e32173e Cleanup / Cycles: De-Duplicate Portal data fetch and side check. 2015-05-13 16:05:30 +02:00
730e61b446 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.
2015-05-13 16:11:26 +05:00
0d64e26740 Clip editor: Deselecting with shift-LMB does not work in graph view 2015-05-13 15:55:32 +05:00
38eab96f9b Fix T44683: Unable to mute movie clip when using stabilized display 2015-05-13 14:28:24 +05:00
ae9e38c5ad Fix T44689: New Depsgraph crash
Simple highschool rated issue -- uninitialized variable :)
2015-05-13 14:07:37 +05:00
1a0fb7e9ae Project Paint: enable old bleed UV calculation
Was disabled because other values weren't quite right.
2015-05-13 18:26:56 +10:00
a050d6063c 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.
2015-05-13 18:04:46 +10:00
3e782756e3 Project Paint: simplify uv bleed factor calc 2015-05-13 17:48:54 +10:00
7969b238db Fix T39775: Skin modifier crash 2015-05-13 16:08:19 +10:00
7742a8f09c Cleanup: reduce scope for win32, Linux vars 2015-05-13 16:08:19 +10:00
Dalai Felinto
c78df8f9ee 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.
2015-05-13 01:03:19 -03:00
abb80abf8a 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).
2015-05-13 11:00:23 +10:00
08bbea9362 UI: multi-value-edit, distable alt+lmb on sliders 2015-05-13 10:32:30 +10:00
898b6491ed UI: multi-value-edit, tint button while editing
Currently re-uses node-flag (which is only used to tint color too)
2015-05-13 10:01:13 +10:00
91ec8d8d1e UI: multi-value-editing, copy value when typed in 2015-05-13 09:50:08 +10:00
bbadc3aecd UI: nodes support for multi-value-editing 2015-05-13 09:48:41 +10:00
Dalai Felinto
274b0838c7 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.
2015-05-12 18:46:09 -03:00
b3334d936f Edit last commit, redundant 'data' in RNA path 2015-05-13 07:40:21 +10:00
ee3dde2d49 UI: ObData support for copy-to-selected
Now multi-object editing works for obdata too.
2015-05-13 07:25:04 +10:00
Dalai Felinto
3e519860e5 Fix T44684 Compositor backdrop isn't updating correctly 2015-05-12 18:20:05 -03:00
e4cd4c383f Cleanup: style 2015-05-13 06:10:49 +10:00
3160740421 Fix T40762: Python can't access macro values 2015-05-13 05:26:29 +10:00
b01dd748b6 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.

Results:
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.

TODO:
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.
2015-05-12 21:03:16 +02:00
f097453006 Fix missing define in blenloader
It caused blender versions compiled with scons not having proper
build date/hash stored in the .blend file.
2015-05-12 19:53:31 +05:00
Dalai Felinto
15016e1497 small cleanup on render_result_new()
(making the duplicate code more like the original one)
2015-05-12 11:38:24 -03:00
f0f481031c 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.
2015-05-12 18:48:55 +05:00
7c2905b8ec 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.
2015-05-12 17:24:07 +05:00
8697c19e91 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.
2015-05-12 16:41:23 +05:00
909d3228b1 BGE : Fix Bullet shape margin for triangle mesh static objects 2015-05-12 13:38:46 +02:00
615a7aea55 Depsgraph: Attempt to fix alignment issue on 32bit platforms 2015-05-12 16:36:34 +05:00
29529d2ac3 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.
2015-05-12 16:25:39 +05:00
bac7353801 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:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

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 :)
2015-05-12 16:06:37 +05:00
a09341469e 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.
2015-05-12 16:06:37 +05:00
051688b34c 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.
2015-05-12 16:06:36 +05:00
08d87514d3 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.
2015-05-12 16:06:36 +05:00
31f0c27ae7 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.
2015-05-12 16:06:36 +05:00
87fd166654 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.
2015-05-12 16:06:36 +05:00
dbbe721c2a 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.
2015-05-12 16:06:36 +05:00
ae00e42bc2 Fix T44677: Normal Edit Modifier Radial Mode broken with target object.
Very stupid mistake, odd nobody hit this earlier... :/
2015-05-12 10:57:39 +02:00
20e561dd6a PyAPI: Remove release method, just use delitem 2015-05-12 18:43:30 +10:00
f6dc0e918b Minor tweaks to preview templates 2015-05-12 18:29:06 +10:00
34c78a659b Doc: add bpy.utils.previews
Updated sphinx_doc_gen.py to better handle pure py-classes.
2015-05-12 18:24:32 +10:00
f727df6076 Doc: correct rst syntax
also remove some API docs from example
2015-05-12 18:23:29 +10:00
311f6cac92 Doc: replace addons -> scripts in docstring
Theres nothing add-on specific here.
2015-05-12 18:23:29 +10:00
8a231185aa 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.
2015-05-12 18:23:24 +10:00
8478c71a7b 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: https://developer.blender.org/D511
2015-05-11 23:05:04 -07:00
ce504cffad 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.
2015-05-12 02:18:24 +09:00
c7bccb30bf Cycles: check for F16C support with __cpuid, as we do for BMI and BMI2 2015-05-11 15:49:36 +00:00
1bf685488c 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.
2015-05-11 17:22:18 +02:00
2c4736e6db Clearing preview image shall also unset 'user edited' flag! 2015-05-11 17:12:31 +02:00
4fc3188112 Cycles: Get rid of one more OpenGL matrix manipulation/push/pop. 2015-05-11 16:41:18 +02:00
d30f664c04 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 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons)
and the example/templates featured with Blender.

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

Differential Revision: https://developer.blender.org/D1255
2015-05-11 16:37:15 +02:00
e38f914421 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.
2015-05-11 16:28:41 +02:00
cc1883468d Keep valgrind happy by using tight vec3 packing instead of lax vec4 with
an unused coordinate missing.
2015-05-11 14:14:06 +02:00
5588a51c9c Cycles OpenGL: Don't use full matrix transform when we can just use
simple addition.
2015-05-11 13:10:19 +02:00
dfbb876d46 UI: initial support for UI editing selected items
Add basic support (holding Alt) to edit all selected objects/bones/sequences.
2015-05-11 15:32:43 +10:00
097862cb26 GHash: avoid redundant casts 2015-05-11 12:39:39 +10:00
18cf235893 GHash: use const keys when only used for lookups 2015-05-11 12:39:08 +10:00
3141870c96 Outliner: postpone rebuilding the tree
On existing Blender could rebuild tree many times (on freeing each ID).
Use a flag instead of immediately rebuilding.
2015-05-11 11:09:21 +10:00
f4bae1f6d6 Outliner: cleanup flag was never cleared
Was running cleanup on every draw.
2015-05-11 10:58:53 +10:00
9e2e85a367 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.
2015-05-11 09:27:05 +10:00
d55868c3b2 Cycles: And yet another compilation fix after half-float commit for clang.
Suggested by Brecht, tested with gcc > 4.4 and Clang
2015-05-10 19:32:32 +00:00
3ec168465d Cycles: fix compilation on 32-bit Windows for half-floats
Reported by IRC user HG1.
2015-05-10 19:06:43 +00:00
c20c07f27a 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.
2015-05-10 20:51:18 +02:00
8db2a9a352 Cycles: Add -mf16c for previous commit for Scons
Thanks to Dingto for noticing!
2015-05-10 17:51:04 +00:00
4d8f7eddda 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: https://developer.blender.org/D1269
2015-05-10 19:21:21 +02:00
2ec221aa28 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.
2015-05-10 16:35:51 +00:00
3a2c0ccdd0 Cycles: Correction to opencl whitelist check
Was using platform as a device id accidentally.
2015-05-10 20:02:06 +05:00
1c02a201ba 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
2015-05-10 15:58:17 +02:00
a47ade34c2 Cycles: Fix tiny greying out inconsistency for Volume settings. 2015-05-10 12:59:18 +02:00
e8be170e79 Cycles: Do not show Branched Path integrator for OpenCL.
Branched Path is not supported, neither in the Split nor Megakernel.
2015-05-10 12:59:18 +02:00
0525db39d1 fix T44648: Collada finding bone chains during import crashes when no bones are there 2015-05-10 11:04:37 +02:00
1fb97ffeed Fix T44644 Missing thread-protection (spinlock) of image in new multiview code.
Many thanks to Sergey, for practically giving the solution!

Note that it may also fix T44345, depends whether there are other missing
protections/locks or not...
2015-05-10 09:18:52 +02:00
45d9df853e UI: consistent naming for operator props 2015-05-10 15:23:41 +10:00
d6b57436ef UI: move sharp/smooth out of vertex menu
Was confusing to have shade smooth/soft in both edge & vertex menu named differently.

This is an edge-flag, so keep in the edge-menu, use vertex option when in vertex mode.
2015-05-10 15:06:44 +10:00
dc95ca92ca BGE: Fix T43822 Videotexture does not use sky color for off-screen
rendering

Make scene background color as default for render-to-texture instead of
current blue color (0, 0, 255).

It is very useful for mirrors setups.

Reviewers: moguri, ben2610, sybren, panzergame, hg1

Reviewed By: panzergame, hg1, moguri

Subscribers: mpan3

Differential Revision: https://developer.blender.org/D1287
2015-05-10 00:56:51 +02:00
583fd3af65 Cycles: Fix typo in global space version of normal transform
It was using direction transform, which is obviously wrong.
2015-05-10 00:53:32 +05:00
136d7a4f62 Cycles: Only whitelist AMD GPU devices in the OpenCL section
Only those ones are priority for now, all the rest are still testable
if CYCLES_OPENCL_TEST or CYCLES_OPENCL_SPLIT_KERNEL_TEST environment
variables are set.
2015-05-09 23:40:26 +05:00
8647c7d501 Fix T38335: incorrect triangle index in raycast with more than 2 quads
eb81153896 broke the fix for T38335, and this fix was incomplete, now we iterate by triangles and polys in the same while block.
2015-05-09 19:12:22 +02:00
2840a5de8f Cycles: Workaround for AMD compiler crashing building the split kernel
It's a but in compiler but it's nice to have working kernel for until
that bug is fixed.
2015-05-09 19:56:38 +05:00
7f4479da42 Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.

Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.

Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.

This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.

More feature will be enabled once they're ported to the split kernel and
tested.

Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.

Based on the research paper:

  https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf

Here's the documentation:

  https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit

Design discussion of the patch:

  https://developer.blender.org/T44197

Differential Revision: https://developer.blender.org/D1200
2015-05-09 19:52:40 +05:00
f680c1b54a Cycles: Communicate number of closures and nodes feature set to the device
This way device can actually make a decision of how it can optimize the kernel
in order to make it most efficient.
2015-05-09 19:28:00 +05:00
6fc1669679 Cycles: Initial work towards selective nodes support compilation
The goal is to be able to compile kernel with nodes which are actually needed
to render current scene, hence improving performance of the kernel,

The idea is:

- Have few node groups, starting with a group which contains nodes are used
  really often, and then couple of groups which will be extension of this one.

- Have feature-based nodes disabling, so it's possible to disable nodes related
  to features which are not used with the currently used nodes group.

This commit only lays down needed routines for this approach, actual split will
happen later after gathering statistics from bunch of production scenes.
2015-05-09 19:22:16 +05:00
17c95d0a96 Cycles: Add utility function to count maximum number of closures used by session
This will be used by split kernel in order to compile most optimal kernel.

Maximum number of closures is actually being cached in the session, so viewport
rendering will not trigger kernel re-loading when number of closures goes down.
2015-05-09 19:17:49 +05:00
5068f7dc01 Cycles: Add utility function to graph to query number of closures used in it
Currently unused but will be needed soon for the split kernel work.
2015-05-09 19:13:32 +05:00
b3299bace0 Cycles: Pass requested tile size to the device via device task
This is currently unused but crucial for things like calculating amount of
device memory required to deal with the tasks.

Maybe not really best place to store it, but consider it good enough for now.
2015-05-09 19:09:07 +05:00
0e4ddaadd4 Cycles: Change the way how we pass requested capabilities to the device
Previously we only had experimental flag passed to device's load_kernel() which
was all fine. But since we're gonna to have some extra parameters passed there
it makes sense to wrap them into a single struct, which will make it easier to
pass stuff around.
2015-05-09 19:05:49 +05:00
d69c80f717 Cycles: Presumably correct workaround for addrspace in camera motion blur 2015-05-09 19:04:19 +05:00
c9133778cf Cycles: Add CPU compat headers to some of the OSL implementation files
This header was already included into some of the implementation files already,
and this change is needed for some upcoming changes in the way how kernel_types.h
works.
2015-05-09 19:04:16 +05:00
7eac672e4f Cycles: Set default closure values to some of the nodes
Previously it was only set at compilation time which is all fine but does
not let us to check which closure the node corresponds to prior to the
compilation.
2015-05-09 19:04:09 +05:00
8c1b805f87 Freestyle: Partial fix for a crash with Save Buffers option enabled.
Prevents null pointer references in the case of the Save Buffers option
enabled.  This is a regression likely due to rBd5f1b9c22233.
2015-05-09 13:20:40 +09:00
eb81153896 Cleanup: warning (sequence-point) 2015-05-09 11:00:50 +10:00
Julian Eisel
54ac84f2b8 Fix 3D View Properties scrollbar being not set to top in startup.blend 2015-05-08 22:20:18 +02:00
6ee0327594 Fix T38335: incorrect triangle index in raycast result
Previously we forgot to do a special operation for indexes to convert a quad to two triangles.
2015-05-08 21:12:36 +02:00
a08d90f070 matcaps browser: changing emboss style and grid direction according to T44613 2015-05-08 19:22:41 +01:00
b65c77e664 Add Intel's 3000 driver to exceptions for df/dy calculations. Should fix
another case of SSAO effect reversal.
2015-05-08 19:25:51 +02:00
2e6634e4a8 BGE: Cleanup function UpdateMesh and SetMesh in CcdPhysicsController.cpp
"if (value == true)" -> "if(value)"
"if (ptr == NULL)" -> "if (!ptr)"
"vector<bool>" -> "std::vector<bool>"
And other blender typo.
2015-05-08 18:17:37 +02:00
4c79608b3b Revert "Motionpaths: Use scene range option, takes start/end frame and
preview"

Looks like this does not work for animators here after all, will use a
different code for this (probably not hardcoded)

This reverts commit 3bbb4020e7.
2015-05-08 17:16:59 +02:00
3bbb4020e7 Motionpaths: Use scene range option, takes start/end frame and preview
settings into account.
2015-05-08 12:35:52 +02:00
900fc43bb4 Cleanup: Remove unused ray type flags.
They were added for completeness, but it seems we don't need them.
2015-05-08 12:10:26 +02:00
945e302409 Cleanup: #define -> enum, and get rid of useless braces in case's. 2015-05-08 10:44:18 +02:00
9190d18b74 Fix T44634: Slide edge not responding to ALT + WHEEL to change reference edge in "even mode".
Modal events (TFM_MODAL_EDGESLIDE_UP/_DOWN) were eaten by NOP generic transform event handling...
2015-05-08 10:29:59 +02:00
a8da11c014 Add missing TEXTEDIT_UPDATE option 2015-05-08 08:58:29 +10:00
a077be3658 Cleanup: use r_* prefix for return args 2015-05-08 07:25:39 +10:00
e010960431 DNA; document how to ignore a struct 2015-05-08 06:54:13 +10:00
0a82c3cfef Minor cleanup 2015-05-07 18:32:35 +02:00
a5dead2e8c Fix T44604 bad quality of rake with bezier curves.
We can calculate tangents analytically for bezier curves, so just make
them awesome. New code uses forward differencing calculation for
efficiency just like curve calculation.

Picture before/after:

http://www.pasteall.org/pic/87843
2015-05-07 18:10:48 +02:00
a2eb94b470 Fix T44631: Custom Normal Data Transfer crash.
Own stupid mistake in rBcdabf7e3...
2015-05-07 15:32:37 +02:00
aa3fc89257 Fix T44611: 'make_links_data' modifiers would fail and crash with multires modifier.
Since it was not ensuring dest has valid mdisp data matching new multires modifier subdiv level...

Also, fixed a bug in `multires_subdivide()`, which would crash when trying to
increase from level 0 (aka no subdiv) to > 1 (wrong check, trying to interpolate
when it should not). And added a few sanity checks.
2015-05-07 15:19:32 +02:00
15fd37fab2 Rake: store last position from mouse, don't store halfpoint between last
and current position.

patch by Bastien
2015-05-07 15:04:11 +02:00
e6a7fdd309 Fix T44627, black spots with lock alpha in projection paint:
Painting would revert alpha even on unpainted pixels, where values would
contain garbage.
2015-05-07 14:49:40 +02:00
e39ec27bba Fix crash when rendering opengl from sequencer. 2015-05-07 14:09:30 +02:00
e3b0d5e99b EdgeSlide: support for un-clamped sliding
Functionality matches vertex slide.
2015-05-07 21:31:24 +10:00
94b9b259e7 Cleanup: remove unneeded context arg 2015-05-07 21:31:24 +10:00
2ec808a4bc EdgeSlide: use pairs for TransDataEdgeSlideVert
no functional changes
2015-05-07 21:31:24 +10:00
cb7fdf45cd EdgeSlide: fix divide by zero 2015-05-07 21:31:24 +10:00
9ca2b76a9f Cycles: Cleanup, make it more clear what endif closes what ifdef 2015-05-07 15:02:43 +05:00
11cf1ebdd1 Fix first part of T44627, locking alpha should happen in straight space
for float images or we get inconsistent premultiplied values.
2015-05-07 11:42:37 +02:00
0e9b210595 Fix T44630: incorrect mirror modifier merge limit tooltip. 2015-05-07 10:57:37 +02:00
3ec8bcebf3 Fix T27642: Add version in .exe installer properties 2015-05-07 10:31:21 +02:00
165598e49e Correct typo: ifdef'd now, but obviously wrong 2015-05-07 10:12:12 +10:00
2d590670b4 Fix T44614: Maya keymap left mouse click to add cut not working. 2015-05-06 23:59:21 +02:00
236360c838 Change fix for T44530 which caused a "regression".
Looks like the previous commit here is really correct and fixes cases of
distortion that were in mirror-subsurf combination since blender 2.5.

This may cause some changed files in which case we will be adding an
option, but it is expected this will only happen with low res models,
and hand painted textures, and the better distortion here compensates
for that enough to consider not adding a compatibility option yet.

Leaving the facemap winding argument as is just in case we do consider
to add the option.
2015-05-06 23:30:15 +02:00
e73f1035d7 Fix T44598: blender internal not giving same result on repeated texture bakes. 2015-05-06 23:06:47 +02:00
fb0dd596e9 BGE : KX_VertexProxy support for more than 2 UV channel.
I have added an optional named "index" argument for methode get/setUV, I have also modified the and set to deprecated methodes setUV2 and getUV2 : the doc was wrong and the methode can't be called anyway because it declared as VARARG in the .h and convert directly the args value to a vector in the .cpp.

Reviewers: sybren, lordloki, hg1

Reviewed By: lordloki, hg1

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D1240
2015-05-06 22:55:46 +02:00
de180aba35 Feature request: Dyntopo detail expressed in percentage of brush radius.
Not sure how useful this will be but people have requested it so, here
it is...
2015-05-06 22:51:49 +02:00
7c3a714124 Fix T44624: world menu appears in node editor header with Blender internal. 2015-05-06 21:55:35 +02:00
4a5933bb74 Rip tool, support filling-edges with fill enabled 2015-05-07 05:34:07 +10:00
4d7b0e4fe3 Correct own error: is_manifold_region on wire vert 2015-05-07 05:23:07 +10:00
c740027e30 Fix T44381: Text Editor: Un-indent undo fails
D1284 by @mikidep
2015-05-07 05:04:05 +10:00
4487358da7 Fix T44618: Rip Fill on a single vert would only generate one of the two expected faces.
Was tagging (for filling) the wrong edge for one of the two involved loops...
2015-05-06 17:51:39 +02:00
51f33a2e55 collada:custom normals generated by normals modifier have not been exported correctly. Also triangulating during export did not work. 2015-05-06 17:03:38 +02:00
14d55ab7a3 Cleanup: use ntreeFromID 2015-05-07 00:18:11 +10:00
1d88bfce40 Shader node: support native render capabilities
D1188 by @a.romanov
2015-05-06 23:53:51 +10:00
5ffd10a6da OpenGL render: Update metadata as before, for every frame written to a
file, since we need the updated times and frames.

This was lost during stamp code refactoring. The refactoring moved the
stamp when render is initialized so we would be guaranteed to have
correct cameras even when saving render stills at a later time (and even
if cameras were changed). For regular render this would work since
render init takes care of stamp, but for openGL rendering we need to do
this manually.

Still not 100% correct, does not apply multiview cameras to metadata
2015-05-06 15:30:00 +02:00
aaa6b39bfe Quick patch-up for opengl render metadata.
Camera here is incorrect for multiview (as is in real multiview render)
but at least it works now.
2015-05-06 14:47:01 +02:00
15751238d5 BGE: Fix compound child shape added on instance game object 2015-05-06 14:23:22 +02:00
df422314c1 Only use render view name in render filenames if we are actually using
multiview.
2015-05-06 13:58:06 +02:00
d80ff8ce80 Image proxies now correctly support metadata (needs to regenerate
proxies though)
2015-05-06 13:05:59 +02:00
27c3886064 Cleanup: use functions we already use elsewhere for bone detection
instead of the ninja code that we use now.
2015-05-06 12:53:33 +02:00
Martijn Berger
3f04f64eea [cmake] move FindLLVM to its own file 2015-05-06 12:35:48 +02:00
69bf3a9e94 Updating node standard value won't work if node is hidden, patch by
Alexander Romanov with minor changes.
2015-05-06 11:59:39 +02:00
0abb6f3ef0 Patch D1283 by Alexander Romanov fixes reroute node type update not
correct when root reroute node is plugged in a different type of input
2015-05-06 11:46:47 +02:00
bc2f77e1da Add bpy.app.binary_path_python
Access to the python binary distributed with Blender,
fallback to system python executable (matching Blender's version).
2015-05-06 11:13:42 +10:00
c246e0c3b6 Prefer name 'program' over 'binary'
binary-search is confusing!
2015-05-06 06:34:19 +10:00
e00142bfa7 BLI_path: add PATH search utility functions 2015-05-06 06:21:16 +10:00
c641a5563f Fix T44612: add support for mouse button 6 and 7 on OS X. 2015-05-05 21:52:09 +02:00
1d0f1a1ec9 Fix T44593: particle volume distribution not working with large meshes. 2015-05-05 21:43:24 +02:00
b45ad4b214 Cycles: Fix for wrong clamp usage in fast math 2015-05-06 00:01:40 +05:00
4616a7a4d3 BGE: Fix collision callbacks for compound controllers
It fix some mistakes in b5e9653035 and made a more safety behavior for collision callbacks used in compound controllers during adding and removing.
2015-05-05 19:54:12 +02:00
962d53e144 Workaround ld.gold failing with msgfmt 2015-05-06 03:23:20 +10:00
35c67d6750 Fix reading uninitialized memory finding paths 2015-05-06 02:22:00 +10:00
b5e9653035 BGE: Remove function DisableCcdPhysicsController and EnableCcdPhysicsController in CcdPhysicsEnvironment
Replace EnableCcdPhysicsController by AddCcdPhysicsController and DisableCcdPhysicsController by RemoveCcdPhysicsController.
Tested with compound shapes and collision sensors.

Reviewers:agoose77, ideasman42
2015-05-05 15:18:29 +02:00
d01b226870 Cleanup: Remove leftover from Distorted Noise node in XML reader. 2015-05-05 10:38:45 +02:00
e5e73ccc90 Math Lib: rename fill_*, to copy_*
matching convention for fixed length api, eg: copy_v3_fl
2015-05-05 17:08:29 +10:00
ea5f9fee8d Cleanup: function arg wrapping 2015-05-05 16:34:38 +10:00
1648feec94 Cleanup: rip tool 2015-05-05 16:34:37 +10:00
7201f6d14c Cycles: Use curve approximation for blackbody instead of lookup table
Now we calculate color in range 800..12000 using an approximation a/x+bx+c for R and G and ((at + b)t + c)t + d) for B.
Max absolute error for RGB for non-lut function is less than 0.0001, which is enough to get the same 8 bit/channel color as for OSL with a noticeable performance difference.
However there is a slight visible difference between previous non-OSL implementation because of lookup table interpolation and offset-by-one mistake.
The previous implementation gave black color outside of soft range (t > 12000), now it gives the same color as for 12000.

Also blackbody node without input connected is being converted to value input at shader compile time.

Reviewers: dingto, sergey

Reviewed By: dingto

Subscribers: nutel, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1280
2015-05-05 06:11:54 +00:00
22bbd1c512 BMesh: improve rip tool /w mon-manifold verts
Can now rip from multiple fans (mixed single faces or larger regions)

Also add BM_vert_is_manifold_region which only checks if a vert has disconnected fans.
2015-05-05 07:22:35 +10:00
e59bd19fa7 Cleanup: style & const's 2015-05-05 05:19:49 +10:00
7478eb9bd0 Cleanup: wrapped function indentation 2015-05-05 05:19:48 +10:00
cc81b58277 Cleanup: deduplicate code.
FileBrowser had its own 'shorten_string' func, when we have a full fledge one in interface_widget code...
2015-05-04 21:13:35 +02:00
e10ecb6494 Revert "Different drawing for object centers."
This reverts commit 5a8629c0d7.

It does not really work that well since objects can draw in front of
selection circles now.
2015-05-04 18:00:29 +02:00
1b8069bdd9 UI: location/scale were snapping to 10s
In practice this isn't useful (for scale especially).

For float buttons with a very large range, don't attempt to match the snap to the range.
2015-05-05 01:20:40 +10:00
fd5090ab41 UI: button snap (ctrl) was rounding down 2015-05-05 01:06:09 +10:00
1227e5c3d1 Fix T44503 full sample does not display any preview any more.
The fix exposes another error not fixed in this commit, escaping the
render will not flush the full sample render result correctly.
2015-05-04 16:57:48 +02:00
68fe630735 Fix eyedropper with quad-view 2015-05-04 23:50:38 +10:00
52b9d83417 Fix T44592: Zero scale on an axis, zeros all 2015-05-04 22:39:33 +10:00
9ff91acadb Follow up to previous commit, remove depth of field from UI in
wireframe/boundbox mode.
2015-05-04 14:38:02 +02:00
73c090fe81 Fix T44594 disable depth of field in wireframe/bounding box modes. We
don't supply depth information in those modes so supporting the effects
does not really make sense
2015-05-04 14:34:57 +02:00
c19f3ea1b2 Fixed comment. 2015-05-04 14:31:44 +02:00
66f96e555c Cycles: Fix copy / paste mistake in XML reader. 2015-05-04 14:31:20 +02:00
e560bbe1d5 Fix possible crash with datatransfer operator when source object was hidden.
Mismatch in poll and exec funcs when getting active (source) object...
2015-05-04 14:30:00 +02:00
5a8629c0d7 Different drawing for object centers.
Code here did depth test always and depth range 0.0.

There is no real reason for object centers to write and get tested
against depth buffer in this case, just disable the depth test instead
;)

Helps with blurry object centers in depth of field mode too (centers
wrote depth 0 and were always blurry)
2015-05-04 13:53:23 +02:00
be30070d86 BGE: Cleanup KX_BlenderSceneConverter.cpp
This commit is a little cleanup for whitspaces, braces, spaces around operators and useless keywords struct/class.

Reviewers:sybren
2015-05-04 13:36:11 +02:00
b7d0ff0ad6 Separate scene simplification into viewport and render
This way it is possible to have viewport simplification bumped all the way up,
making viewport really responsive but still have final render to use highest
subdivision possible.

Reviewers: lukastoenne, campbellbarton, dingto

Reviewed By: campbellbarton, dingto

Subscribers: dingto, nutel, eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1273
2015-05-04 16:31:10 +05:00
7e3ee2d15d Skin Modifier: remove redundant edge-calculation 2015-05-04 20:59:34 +10:00
abd68c6e45 Fix T42893: Skin Modifier, changes randomly toggling editmode
Own regression, previously it would do a full mesh normal calculation for each isolated shape
(could hang on meshes with many loose parts).

However the normals are needed, instead of doing a full calculation,
just set normals on new faces.

Thanks to Brecht for finding cause!
2015-05-04 20:56:57 +10:00
8d5eeab473 Skin Modifier: Add missing operator stack pop 2015-05-04 20:56:57 +10:00
93055b1c22 Fix metadata display in sequencer lost after doing a preprocess
transform.

IMB_makeSingleUser makes a copy and destroys metadata. I am not sure if
this is the safest way to make a single user ImBuf (setting the refcount
to 0 is simpler and there's less, but no zero, risk of dangling
pointers) but I will leave this as is for now in case there is an actual
need for a copy here. The alternative approach should be tested at some
point.
2015-05-04 12:53:16 +02:00
046388830a Freestyle: Fix for line style ID datablocks not copied when fully copying a scene. 2015-05-04 19:52:03 +09:00
b07c2961fa Don't scale metadata font with zoom - makes strings not consistently
adhere to the string length
2015-05-04 12:30:26 +02:00
711e2f71a8 Support displaying metadata for images in sequencer preview windows (not
backdrop)
2015-05-04 12:18:19 +02:00
23a79c42b5 BGE Player: Fix compilation error after cleanup commit da8a62a 2015-05-04 14:39:12 +05:00
4e1c27f646 Fix T29029: Grease pencil fails in Quad View 2015-05-04 19:12:54 +10:00
c46f40e9e2 Freestyle: Compilation error fix after recent changes in BKE_object_add() 2015-05-04 13:52:44 +05:00
7a8170e9c1 CMake: Only consider it INFO is ld.gold is missing 2015-05-04 18:33:37 +10:00
4edc9d50fd Correct own error in recent quad-view ruler fix 2015-05-04 18:32:47 +10:00
74dc4e87a6 Fix Buttons context, invalid object data access
Another instance of T44376.
Crash where the Python context would access a stale pointer to the active object.
2015-05-04 18:06:31 +10:00
c9e5e81064 Button Space: clear pin flag when NULL'ing pointer 2015-05-04 16:12:12 +10:00
77e6a001a9 Fix T44376: Buttons context, invalid data access
Removing a scene from the buttons window would crash from a Python operator.
2015-05-04 16:01:20 +10:00
8d5e57748a Cleanup: WM_main_remove_notifier_reference
Assumed the `reference` pointer is an ID, currently true, but may not always be.
Add a callback specifically for this purpose since cleaning up notifiers and space-types are different operations.
2015-05-04 16:01:20 +10:00
da8a62adce Cleanup: naming for callback wrappers 2015-05-04 16:01:20 +10:00
8515be8a73 Remove redundant outliner lookup freeing objects 2015-05-04 16:01:20 +10:00
fdc5f9c0a8 Add name argument to data creation API calls
Was adding then renaming, unnecessarily.
2015-05-04 16:01:20 +10:00
4e7ef3f5cd BGE: Added 'ghost' arg to KX_GameObject.suspendDynamics() method
The implementation of this 'ghost' argument already existed in the C++
source, but wasn't exposed to Python yet.
2015-05-04 12:04:09 +08:00
62b13c6d07 BGE: Fix: Activate collision mask/group in UI. 2015-05-03 19:16:27 +02:00
dbee634572 Fix typos. 2015-05-04 01:53:34 +09:00
ee7538613a Rigidbody: Fix viewport update when changing collision shape in toolbar 2015-05-03 18:01:47 +02:00
d33b564f91 Fix T44591: Set PBone Group operator did not handled predifined group index in its invoke func. 2015-05-03 16:53:43 +02:00
dced56f02a Fix T44185, Fix T44090: hair texture density working unreliable.
"Unexisting" particles must be freed after the unexist flag has been set,
which was no longer the case after 78c491e62a.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D1213
2015-05-03 16:21:58 +02:00
6159f9a55a Fix T41739: 3D view solid draw mode missing some material node updates. 2015-05-03 15:39:25 +02:00
2775eaf01a Fix T41893: inconsistent color management on sculpt texture nodes previews. 2015-05-03 15:25:43 +02:00
944e0bd7b5 Cleanup: rename clear_skin & clear_mask operators to skin_clear and mask_clear.
So that they match all other op names around - and sensible logic as well.
2015-05-03 15:18:27 +02:00
3a808270df Fix T44589: No way to add a skin data layer manualy.
There are several ways to end up with an object with skin modifier, but no
skin data on the geometry. So we need an operator to add it by hands.

Also tweaked a bit UI of this modifier.
2015-05-03 15:09:48 +02:00
472b3c5828 We do need to transform lnors in BKE_mesh_transform(), much handy for scripts. 2015-05-03 11:55:58 +02:00
9715d4c778 Added name attribute to instance_geometry nodes (request for Second Life) 2015-05-02 23:17:40 +02:00
6bc8a3f8d3 BMesh: rip-tool can now split off isolated fans
Useful since there wasn't a good way to do this previously.
2015-05-03 06:17:32 +10:00
dd48ddd605 BMesh: utility to split isolated loop regions 2015-05-03 06:16:59 +10:00
33cc5ed495 Cleanup: redundant vars 2015-05-03 06:16:59 +10:00
4fca12e0fa Fix rna default value in BGE UI. 2015-05-02 21:09:29 +02:00
bd5e578804 BMesh: rework BM_vert_is_manifold (simplify logic)
- simplify boundary handling (walk from boundary - no need to reset walking)
- early exit when the vert has >2 boundaries
- use BM_vert_step_fan_loop to walk the fan
2015-05-03 04:46:24 +10:00
de031b7c89 BMesh: replace radial count with simple checks 2015-05-03 04:41:39 +10:00
c826566ce3 Sound now returns even if file fails to load
With various codecs its hard to ensure a sound will load or not.
2015-05-03 04:41:39 +10:00
8e4ac2d229 Fix ghash assert during BGE libload.
The assert message was caused by the multi call of BLO_library_append_begin in KX_BlenderSceneConverter::LinkBlendFile.
2015-05-02 18:43:39 +02:00
2c72edc7f1 Fix T44586: Viet language problem for Blender Interface
We were missing many of the complex diacritics combinations in latin extended additional code block...

Alawyas a pleasure to edit this font... :|
2015-05-02 17:02:08 +02:00
ca15ffb8ad CMake: use ld.gold linker when available
Gives noticeable speedup linking blender
2015-05-02 22:14:12 +10:00
929c9de3dc Turn bpy.utils into a package, so that we can easily add submodules to it. 2015-05-02 10:38:51 +02:00
53d08ec506 BMesh: BM_mesh_edgesplit
Did quite a few checks not to tag bad splits (which wasn't working perfectly)

Instead rely on BM_vert_separate not to create invalid geometry.
2015-05-02 16:24:46 +10:00
f283b959e7 BMesh: BM_vert_separate double edge fix
Splitting edges could give duplicates.
2015-05-02 16:24:35 +10:00
c276cfb3c0 BMesh: return error on mesh validate 2015-05-02 15:52:27 +10:00
a5869945c6 Cleanup: bmesh src/dst order in API args 2015-05-02 15:46:03 +10:00
5e1c729882 Cleanup: use function attrs for BMesh inline funcs 2015-05-02 15:45:57 +10:00
b50c6e3f6f Object Align Operator: Make it use modifiers in high quality bounding box calculation 2015-05-01 16:17:23 -06:00
bd6e1e6ad7 Updated install_deps' Collada to 3335ac164e68b2512a40914b14c74db260e6ff7d. 2015-05-01 21:18:37 +02:00
23abcc0636 OSX: remove collada from fading out 32bit buildbot 2015-05-01 21:09:21 +02:00
86f80c481c Fix T44353, Fix T43981: random particle distribution overlaps if number is greater than 256. 2015-05-01 19:21:41 +02:00
b6caefdaa9 Fix T43711: dual quaternion deform bug with shearing in deform matrix.
This also increases the tolerances in is_orthogonal / is_orthonormal functions,
which were much too low for practical purposes.
2015-05-01 19:21:41 +02:00
bf7098a93f Auto pack: don't show "No new files have been packed" on every .blend file save. 2015-05-01 19:20:42 +02:00
4e40bdd02c Fix T44433: print "unknown" rather than "1970-01-01" when .blend date is unknown. 2015-05-01 19:18:26 +02:00
d3c4553552 Fix a couple of harmless compiler warnings. 2015-05-01 19:18:26 +02:00
74d31279cd Fix T44560: Merge Collapse tool - UVs operator panel option ignored with Collapse but not with other merge types.
Was missing parameter for collapse bmesh operator...
2015-05-01 17:10:39 +02:00
f84135ee65 Fix T44577: writing tessellated cddata when we should not...
Own mistake in rBf75c89b3f42ffac51603e6e53459f9d94a8782cc...
2015-05-01 16:11:55 +02:00
535e75ea90 Use mono font for metadata 2015-05-01 14:27:44 +02:00
28ea3f5b94 Fix T44565 World background artifacts when world shader is void (or
compilation fails).
2015-05-01 12:06:05 +02:00
94d80c8ca4 Left some debug prints in here... 2015-05-01 12:44:37 +12:00
be0dcd4e34 Fix T43867: Clicking outside the viewport exits now Grease Pencil "Continous Draw" mode
When working with a pen only, it was previously impossible to exit Grease Pencil
draw mode (when continous drawing was enabled). Now, clicking outside the drawing region
(e.g. in the timeline, properties editor, or the header/properties/toolshelf regions)
where you are drawing will exit this mode.

Some corner cases to be aware of:
* When Region Overlap is enabled, clicking on the overlapping panels still exits
  draw mode (even though you can see behind the buttons)
* In the Nodes Editor, clicking on a node (while in drawmode) will still draw a
  dot/stroke. But, you can still exit drawmode by clicking on any of the panels
  (properties/toolshelf/header) mentioned earlier
* To cope with cases where the operator is launched from the toolshelf, the
  code now sets a new "active region" when the first stroke is performed
  (based on what region is under the cursor at the time of that stroke),
  overwriting the setting that got stored when invoking the operator (i.e. the toolshelf).
  This change doesn't have any real user-visible effects, other than making it possible for
  this fix to actually work without breaking that use case.
2015-05-01 12:44:35 +12:00
f8bdd8e6a8 BMesh: correct bmesh_edge_vert_swap
Missed swapping out loops.
2015-05-01 06:51:16 +10:00
6111da3629 BMesh: add bmesh_disk_vert_replace 2015-05-01 06:18:04 +10:00
a822106062 Cleanup: typos 2015-05-01 05:53:33 +10:00
cdabf7e353 Data transfer - Loop Islands Hell Fixes.
This commit fixes several issues:
* island_store->items_to_islands_num was reset each time we added a new island, this is stupid! Harmless too, though, afaikt.
* partial verts bvhtree (with several islands) was hugely over-allocated...
* we would 'leak' in neighbor islands when geometry itself was contiguous.
* best_nor_dot was used incorrectly, leading to smaller weights for better matching normal!

All those fixes are related to T44522 (through personal communications with reporter).
2015-04-30 20:58:34 +02:00
4d6584ba6a UI: use enum for thumbnail size 2015-05-01 01:49:58 +10:00
5ced6cb2bc Correct warning 2015-05-01 01:36:36 +10:00
3a9726783f RNA defaults test
Alternative to T32894, simple test which creates new data and compares with RNA defaults.

Can be used to keep the values in sync without having to maintain a large set of defines.
2015-05-01 01:15:55 +10:00
Dalai Felinto
078e589263 Better fix for T44556: Crash on the World Properties > Preview 2015-04-30 12:12:22 -03:00
Dalai Felinto
179fff94e8 Revert "Fix T44556: Crash on the World Properties > Preview"
This reverts commit 4bcc7a2ec6.
2015-04-30 12:12:22 -03:00
69ef1a3a83 Py/RNA: support to load and remove sounds 2015-05-01 00:58:08 +10:00
5dd63a977f Fix opengl rendering always looking through camera
Actually check if we have a camera and looking through it before
rendering in multiview.
2015-04-30 15:06:28 +02:00
f271d85b86 Fix T44439: outliner's treestore could keep invalid ID pointers, could crash on undo due to invalid mem access.
We cannot nuke treestore in readfile's `blo_lib_link_screen_restore()`, because this will
destroy all UI-state data (like opened/closed items, etc.).

Since we cannot know for sure whether an ID pointer from tselem->id is valid here, we
have to ensure they are never invalid, i.e. to always set them to NULL when we delete them.

To do so, this commit uses a similar approach as what already exists for ID references
in WM notifiers - it extends `free_notifier_reference_cb()` to also nullify those IDs in
all outliners.

Note that some ID types are not used(shown) by outliner currently, so `TREESTORE_ID_TYPE` macro
was added, that checks whether an ID is possibly used by outliner. Avoids a few searches
in whole tree whene deleting some IDs.

Reviewers: campbellbarton, sergey

Maniphest Tasks: T44439

Differential Revision: https://developer.blender.org/D1272
2015-04-30 14:28:22 +02:00
d1c98520f7 Missed this last commit 2015-04-30 14:24:05 +02:00
2d491b8415 Minor tweaks to make fill and invert support gpixel operations 2015-04-30 13:52:44 +02:00
04b23af02d Code Cleanup: Simplified insert_keyframe_button and delete_keyframe_button
As a followup for the previous commit, do the same thing for the insert/delete
keyframe button operators as is done for the clear keyframes op. There really isn't
much need/reason for conducting the looping there, as those functions natively
handle this themselves already.
2015-04-30 22:59:41 +12:00
7369c4f4d5 Code Cleanup: Simplify Clear Keyframes operator's code
On second thought, the previous commit was just adding additional complexity which
wasn't needed, as the operator was wasting effort by doing this looping itself.
2015-04-30 22:59:40 +12:00
debcd6b217 Fix T44558 - "Clear Keyframes" complains when operating on an array property and it had deleted the action in the process 2015-04-30 22:59:39 +12:00
16794f908f Cycles: Fix possible uninitialized XML read state which might cause crashes 2015-04-30 15:46:09 +05:00
2909975385 Fix T44541 aka gigapixel image render support in blender.
Moral of the story: Make sure that size_t is used whenever pointer
arithmetic is involved. For images, that basically means whenever any
squared dimensions are involved. Casting an operand to size_t early in
the operation is usually sufficient to force the entire operation to
size_t.

There might still be places lurking where we don't support this
correctly. This has been tested with render pipeline, quite a few image
functions (meaning we can paint on such images now, albeit somewhat
slowly ;) ) and export to jpeg. Too many places in code to check so I
guess we'll be handling cases as they come.

Don't try this at home unless you have an immense ammount of RAM.
First GPixel render of suzanne in the multiverse can be found here:

http://download.blender.org/demo/test/suzanne-billion-pixel.jpg

Can be viewed from blender (takes about 3.3 GB after loading but may
take more during loading so 8GB might be more safe to try this).
2015-04-30 12:11:20 +02:00
4bcc7a2ec6 Fix T44556: Crash on the World Properties > Preview
Issue was caused by de-referencing NULL pointer, rres did not have any
views because nothing was rendered yet.

Needs more closer look about where else such a de-reference could happen.
2015-04-30 14:52:59 +05:00
41d817f15d Fix T44548: Cycles Tube Mapping off / not compatible with BI
Was a typo in original implementation, probably a result of some code reshuffle
happened for optimization reasons.
2015-04-30 14:27:16 +05:00
aa4c97faa3 View3D: expose size as a distance in units
also note that size/rotation doesn't work for camera views. see T44511
2015-04-30 18:59:35 +10:00
1721d47106 CMake: Solve compilation error from path with a space 2015-04-30 12:55:52 +05:00
f553aba69f Correct docstring 2015-04-30 09:55:54 +10:00
0ecce09288 Correct missing break 2015-04-30 08:18:32 +10:00
b640700597 Cleanup: style 2015-04-30 08:18:23 +10:00
4eab0e72b3 Cleanup: Update some comments and add ToDo. 2015-04-29 23:56:46 +02:00
b3def11f5b Cycles: Record all possible volume intersections for SSS and camera checks
This replaces sequential ray moving followed with scene intersection with
single BVH traversal, which gives us all possible intersections.

Only implemented for CPU, due to qsort and a bigger memory usage on GPU
which we rather avoid. GPU still uses the regular bvh volume intersection code, while CPU now uses the new code.

This improves render performance for scenes with:
a) Camera inside volume mesh
b) SSS mesh intersecting a volume mesh/domain

In simple volume files (not much geometry) performance is roughly the same
(slightly faster). In files with a lot of geometry, the performance
increase is larger. bmps.blend with a volume shader and camera inside the
mesh, it renders ~10% faster here.

Patch by Sergey and myself.

Differential Revision: https://developer.blender.org/D1264
2015-04-29 23:31:06 +02:00
e9dcb068c7 Fix T44484: Edge-split corrupts mesh
Splitting non-manifold edges could produce duplicate edges.
2015-04-30 07:22:18 +10:00
99811c283e BMesh: use BM_face_loop_separate_multi for rip
Resolves bug over-splitting non-manifold connected edges.
2015-04-30 06:24:33 +10:00
3ef27ec807 BMesh: add BM_face_loop_separate_multi
New utility function to handle splitting off multiple loops from a face at once.
2015-04-30 06:24:33 +10:00
53662bcaf1 BMesh: simplify/optimize loop splitting logic
To split off a single loop, was splitting all fans off the vertex, then merging back together (except for one).

Now simply splits off one loop.
2015-04-30 06:24:33 +10:00
26541b7488 BMesh: refactor edge-vert swapping into API call 2015-04-30 06:24:32 +10:00
67fcb04bbf BMesh: minor change to swap-vert api
- assert if the verts not in the edge (all callers assume success)
- rename to bmesh_disk_vert_swap
- swap src/dst arg order.
2015-04-30 06:24:32 +10:00
7aab5c6ca9 Cycles: Fix wrong termination criteria in SSS volume stack update
Another issue spotted with Thomas.
2015-04-30 01:20:17 +05:00
e5f3193df3 Cycles: Fix wrong order in object flags calculations
Object flags are depending on bounding box which is only available after
mesh synchronization.

This was broken since 7fd4c44 which happened quite close to the release
and oddly enough was not sopped by anyone. Render test is coming for this.

Was spotted by Thomas Dinges while working on another patch.
2015-04-30 01:09:48 +05:00
Dalai Felinto
3856d439db Fix filename has "new render view" suffix reported by Jason van Gumster (Fweeb)
Bug introduced in f8540d7fd5
2015-04-29 16:39:35 -03:00
054aa61f3c File browser - change thumbnails size with a slider
We can now scale from 32px up to 256px (default has been upgraded to 128px).
Thumbnails are now generated as 'large', i.e. 256px.

Previews are scaled up if necessary, unlike icons (for folders or files without preview images).

Note that .blend thumbnails themselves remain in 128px for now (they are embeded in .blend files,
not quite sure we want to make them four times bigger...).

Patch by DMS (Yaron Dames), with final edits by myself.

Reviewers: mont29

Subscribers: Severin, mont29

Differential Revision: https://developer.blender.org/D1260
2015-04-29 21:30:33 +02:00
3de45ee7fe Fix T44132: Crash after open EXR format
Was own mistake on adding Alpha socket for Combined pass.
2015-04-29 23:45:41 +05:00
ce32aae80c OSX: fix T44533, system_bookmarks not showing utf standard ( umlauts etc. ) 2015-04-29 20:07:53 +02:00
3878180a6f Fix typo using interp_v3_v3v3 over float[2] variables...
Found by asan! ;)
2015-04-29 19:44:06 +02:00
5782126d41 Make sure integer calculation uses large precision 2015-04-29 18:49:50 +02:00
d04ba6d562 Remove unused stubs
Noticed by TristanPorteries in IRC.
2015-04-29 21:47:30 +05:00
0dbc9060a6 Cleanup: make grumpy asan happy and do not use new [] to allocate data freed by free().
Probably nothing crucial, but asan build would crash on that stupid glitch... Annoying.
2015-04-29 17:46:03 +02:00
091832c955 fix for double call to update callback in uiTemplateIconView 2015-04-29 16:29:03 +01:00
611bbc696a cleanup for uiTemplateIconView 2015-04-29 16:29:03 +01:00
78956b6a83 Fix T44542: 'extend selection' editmode tool would select hidden elements. 2015-04-29 17:19:20 +02:00
Dalai Felinto
3e6a66b9de Multi-View cleanup: using RenderResult->rect* only for temporary RenderResults
Originally I wanted to get rid of RenderResult->rect* entirely, but it's
convenient to have for temporary structs.

This patch makes sure they are used only when really needed, which
should help clearing the code out.

(they are needed when using RE_AcquireResultImage() - which produces a
RenderResult with no RenderView)

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1270
2015-04-29 11:55:53 -03:00
18ba32df37 Don't check against scene notifier twice 2015-04-29 16:28:20 +02:00
Dalai Felinto
b033736eb7 Multi-View: new util functions RE_RenderViewGetById() and RE_RenderViewGetByName()
Both functions try to find a valid RenderView and if they can't they
fallback to the first RenderView of the RenderResult
2015-04-29 11:18:22 -03:00
3acc1ba49c Add macro BLI_SMALLSTACK_AS_TABLE
Use for edge-split (a little less overhead compare to popping each item).
2015-04-29 23:59:48 +10:00
d6b28bbb1d Cycles: Fix crashes when loading cache created with pre-leaf split builds 2015-04-29 15:48:49 +05:00
2e91bcfb9d Fix T44544: Cached BVH is broken since BVH leaf split
Still need to solve issues with reading old cache with new builds.
2015-04-29 15:38:07 +05:00
734fb30bda Use size_t to calculate size of tiles for rendering 2015-04-29 12:31:03 +02:00
7232157357 Correct comment 2015-04-29 20:16:40 +10:00
620cc762db Buildbot: Attempt to fix cudakernels target screwing up autotest cache 2015-04-29 14:51:50 +05:00
65a9592660 BMesh: optimize edge split
Avoid hashing edges when splitting into fans,
Instead, walk & split fans until they're all done, gives approx 40% speedup.
2015-04-29 19:43:32 +10:00
179ffefce5 BMesh: replace smallhash flag for checking doubles 2015-04-29 19:43:21 +10:00
e1ecd39f0e BMesh: avoid over-counting vert-edges 2015-04-29 19:42:06 +10:00
728d4f296f Cleanup: headers 2015-04-29 19:42:00 +10:00
615414fa36 SCons: Ignore .svn folder when installing site-packages 2015-04-29 14:30:37 +05:00
e37373d96e Revert commit with perspective depth offset, makes simple cases such as
loopcuts on cube have zfighting.
2015-04-29 11:19:23 +02:00
029bd44bbd SCons: Fix wrong flags usage after recent stdc89 changes
CCFLAGS are used for both C and C++ compilers and one is better not to pass
C-related flags to C++ compiler. C-compiler flags are to be passed via CFLAGS
variable.
2015-04-29 13:57:02 +05:00
f4d7f5216f Buildbot: Fix typo in error message 2015-04-29 13:47:47 +05:00
Dalai Felinto
f8540d7fd5 RenderResult should have a valid view whenever possible 2015-04-28 18:08:56 -03:00
f9d23b82fe Rewind fix for T44505 (leave in ifdef'd)
This makes selection fail in simple cases,
default cube subdiv 10x for eg.
2015-04-29 06:08:45 +10:00
cbb601346a Error in last commit 2015-04-29 05:36:39 +10:00
e0ae693924 Store bit-depth for reuse, replace loop with shift 2015-04-29 05:32:25 +10:00
d2ac3abbc2 Compilation error fixes for strict compiler flags 2015-04-29 00:23:52 +05:00
859ac8fbc6 Fix ortho part of T44505
In this case we can calculate an offset without worrying about
perspective correction. Unfortunately if looking from a camera we still
have depth issues here. There's no really general case that can fix this
so I'm leaving this as is.
2015-04-28 20:41:49 +02:00
85ae4b87af Fix T44404: freestyle crashes blender.
The reported crash case seems to be caused by freeing compiled Python
objects in a thread.  Now this issue is avoided by allocating a buffer to
store a Python script and using BPY_string_exec() to run the script.  This
makes it unnecessary to repeatedly create and destroy Text data blocks.

Many thanks to Campbell Barton for his help on the bug fix.
2015-04-29 00:57:56 +09:00
7851534541 disable ARRAY_SIZE fixed length check for Clang 2015-04-29 01:37:45 +10:00
7615498e6d Alleviate somewhat the issue of T44505
Issue is zfighting with wire of mesh when parts of the mesh are close
together. We can make this slightly better by reducing the offset,
however this offset is calculated pre-perspective division and can vary
greatly with distance. Correct approach would be using polygon offset,
however we draw mesh wireframes as lines, (not polygons with polygon
mode line) so this approach will not work.
Alternatively, we could set an offset in a shader, however we don't have
code for that either.
2015-04-28 17:18:32 +02:00
be228d33f1 Curves: don't use 'charidx' for regular curves
Code attempted to sync them with materials,
but its not needed (and wasn't reliable).
2015-04-29 00:29:32 +10:00
34abe82205 Fix T44522: loop remapping between meshes when using 'nearest vert, best matching normal' modes
would fail on coplanar faces (or smooth verts).

Loop remapping is really a tricky topic... For now, we enhance a bit more
our Frankenfunc by using distance between dest and source polygons as
fallback in case we have too much similar normals...

Probably not a perfect solution, but should be robust enough I hope.

One core question remains open though: do we want to stick to 'use only seams
to detect UV islands'? This makes things much simpler, but will obviously fail
in case of actual islands without matching seams. :/
2015-04-28 16:01:43 +02:00
57a107c7bc Minor cleanup in comments. 2015-04-28 16:01:43 +02:00
f8c383472a Fix T44516 grid lines obscuring selection outline.
Was changed to draw after meshes without depth mask to make grid not
contribute to compositing effects. Now only draw it like this when we do
compositing (unfortunately can't have both).
2015-04-28 15:42:01 +02:00
e2d60d180e Project Paint: Add symmetry support
- Access from symmetry panel (as with sculpt)
- Supports multiple axis at once.
- Supports all brush types including clone.
2015-04-28 23:34:40 +10:00
43616918f3 Cleanup: const correctness 2015-04-28 23:15:48 +10:00
1f9fe0626f BLI_utildefines: add MEMSET_STRUCT_OFS macro 2015-04-28 23:15:47 +10:00
5e423775da Cleanup: Move Cycles volume stack update for subsurface into kernel_volume.h. 2015-04-28 11:20:27 +02:00
d920b8e075 Fix T44530 UV islands fail on subsurf after mirror modifier.
Caused by own commit that changed island detection code. In the case of
modifiers we don't want to take winding information into account, but
left the code since there are use cases (like painting) which could use
this.
2015-04-28 11:18:02 +02:00
eee666583f Use gnu89 for GCC
GCC5 defaults to gnu11, which we may switch to later
but disable for now to prevent accidental use.
2015-04-28 18:59:52 +10:00
2edb342ffa Fix for Clang type check 2015-04-28 18:59:47 +10:00
5c6ec169cc Added missing update tag to recalculate data after permutating materials 2015-04-28 10:52:19 +02:00
7e36c280c2 Cleanup: redundant checks 2015-04-28 16:47:45 +10:00
4288ab16e5 Add material slot reorder buttons 2015-04-28 07:30:04 +10:00
58a2b10a65 Cycles: Initialize portal variable directly, so we can avoid the one NULL check. 2015-04-27 23:12:53 +02:00
a4965249ec Math Lib: add range_vn_u 2015-04-28 06:54:50 +10:00
f478c2cfbd Cycles: Added support for light portals
This patch adds support for light portals: objects that help sampling the
environment light, therefore improving convergence. Using them tor other
lights in a unidirectional pathtracer is virtually useless.

The sampling is done with the area-preserving code already used for area lamps.
MIS is used both for combination of different portals and for combining portal-
and envmap-sampling.

The direction of portals is considered, they aren't used if the sampling point
is behind them.

Reviewers: sergey, dingto, #cycles

Reviewed By: dingto, #cycles

Subscribers: Lapineige, nutel, jtheninja, dsisco11, januz, vitorbalbio, candreacchio, TARDISMaker, lichtwerk, ace_dragon, marcog, mib2berlin, Tunge, lopataasdf, lordodin, sergey, dingto

Differential Revision: https://developer.blender.org/D1133
2015-04-28 01:30:16 +05:00
84836e8952 Cleanup: use strict flags 2015-04-28 06:24:06 +10:00
ae7d84dbc1 Cycles: Use native saturate function for CUDA
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1)
into a single instruction and uses 4 instructions instead.

Original patch by @lockal with own modification:

  Don't make changes outside of the kernel. They don't make any difference
  anyway and term saturate() has a bit different meaning outside of kernel.

This gives around 2% of speedup in Barcelona file, but in more complex shader
setups with lots of math nodes with clamping speedup could be much nicer.

Subscribers: dingto

Projects: #cycles

Differential Revision: https://developer.blender.org/D1224
2015-04-28 00:38:32 +05:00
278ff15c7f BLI_array: add permute utility function 2015-04-28 04:12:48 +10:00
6ada7a1a0b Usual UI messages fixes... 2015-04-27 20:10:32 +02:00
920fa0f963 Fix double-free on copied Text compiled py-code 2015-04-28 01:18:50 +10:00
84db9fdf4d Fix T44464: Viewport mipmaps no longer toggle off 2015-04-28 01:18:50 +10:00
8d8d1939fa Cleanup: use bool for mipmap args 2015-04-28 01:18:50 +10:00
c760c0dbb3 Cleanup: use mul_v3_mat3_m4v3 2015-04-28 01:18:50 +10:00
Dalai Felinto
4a80c4fade Multi-View: Code cleanup
I finally put the time into understanding what was going on here.
Basically RE_AcquireResultImage() produces RenderResults without
RenderViews. That will be fine for now since I'm planning to refactor
RenderResult soon.
2015-04-27 12:10:35 -03:00
Dalai Felinto
f809eef968 Muti-View: viewport crashes when empty is active camera - reported over IRC by Campbell Barton 2015-04-27 10:41:40 -03:00
Dalai Felinto
b315fcb7ed Fix T44514 Crash under cycles rendering using F12, based on patch from Gaia Clary 2015-04-27 10:41:40 -03:00
e1ed47eb5b Fix T44512: Cycles fails normal bake /w scale flip 2015-04-27 22:46:15 +10:00
9dadc8f599 Math Lib: add mul_v3_mat3_m4v3 2015-04-27 21:52:42 +10:00
3f80accfb3 Fix T44011: Ruler/Knife/Loop-cut fail in quad-view
This is a kind of sloppy-focus,
resolving long standing bug with loop-cut/knife/ruler /w quad-view.

Where activating a tool would lock onto one of quad-views,
especially problematic when activating from the toolbar or menus.
2015-04-27 19:17:07 +10:00
5df939fd15 Py API: expose operator runtime flags
eg from operator invoke/execute:
    self.options.is_grab_cursor
2015-04-27 19:00:10 +10:00
5e1eb8cdcf Cleanup: rename GRAB_POINTER -> GRAB_CURSOR
Term pointer is overloaded already.
2015-04-27 18:58:53 +10:00
ddb5f96295 Sculpt: symmetrize was leaving edge-tags dirty
This is used for the edge-queue
2015-04-27 03:35:16 +10:00
24448e11fb Correct own error in recent sculpt changes
mixed up squared nonsquared length, also remove invalid verify check.
2015-04-27 03:34:13 +10:00
Julian Eisel
cf366c8b66 UI: 'View Online Manual' Shortcut
D1031, implement proposal T37478 to give easy access to the online manual.

Use Alt+F1 while hovering over a button/setting.
2015-04-27 01:35:24 +10:00
5efbd2a407 BGE : addObject in python without reference object.
Making the reference argument optional for the addObject function.
```
scene.addObject("Cube")
```

This allows to keep the rotation, scale and position of the original object.
To avoid layer problems with lights if the reference arguments is None, the new object have the same layer than the active layers in scene.

Reviewers: lordloki, moguri, hg1, sybren

Reviewed By: hg1, sybren

Subscribers: agoose77

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1222
2015-04-26 16:29:58 +02:00
3524676036 BMesh: increase subdiv smooth strength
Now 1.0 gives near spherical output
2015-04-26 21:26:45 +10:00
2069187a1b Cleanup: bmesh subdivide
var names were a bit cryptic, set return arg last.
2015-04-26 20:34:03 +10:00
2374cb380b BMesh: subdiv smooth, use simpler even calculation
Was checking all vertices adjacent faces,
now just compare the difference between normal angles.

Also default to inverse-square for loopcut-subdiv falloff.
2015-04-26 19:20:34 +10:00
e1ca127419 Cleanup: subdivide smooth vertex placement 2015-04-26 19:12:20 +10:00
6e02f1da74 BMesh: use inverse-square falloff /w smooth-subdiv
Resolves ugly artifacts with multi-cut.
2015-04-26 18:35:42 +10:00
c2f7cffd56 Add inverse-square falloff to bmesh, mask & compo. 2015-04-26 18:31:54 +10:00
d33314393e BMesh: use const for API calls 2015-04-26 17:19:51 +10:00
12e7c7f674 BMesh: BM_ELEM_CD_GET_VOID_P cast removed const 2015-04-26 17:19:51 +10:00
3917e9f1f2 Macro GENERIC_TYPE_ANY map many types to one value 2015-04-26 17:19:51 +10:00
bc160d8a85 Cleanup: Code style. 2015-04-26 00:42:26 +02:00
8dd055cd47 Cleanup: Update Lookup table comments. 2015-04-26 00:06:38 +02:00
60c5a2f2d2 Cycles: Add Mirror ball mapping to camera panorama options
The projection code was already in place, so this just exposes the option.

Differential Revision: https://developer.blender.org/D1079
2015-04-25 23:51:56 +02:00
01dda9a434 correct own error in recent ngon creation edit 2015-04-25 21:16:58 +10:00
9eb191083a Fix neg-scaled project-paint in perspective mode 2015-04-25 20:47:19 +10:00
89f5a09ab4 Cleanup: use 8 space indent for multi-line args 2015-04-25 20:15:20 +10:00
a7381cca34 BMesh: simplify BM_face_create_ngon
Was doing quite a lot of unnecessary steps.
Now construct the sorted verts, edges /w error checking, in a single loop.
2015-04-25 17:26:22 +10:00
Julian Eisel
a4203814d1 UI: Panel drag-collapse
D1233, Adds a way to quickly open/close multiple panels by holding LMB and dragging over the desired panels,
Suggested by @maxon

The decision if the panels are opened or closed is made based on the first Panel the user drags over.
If it is closed, all panels he drags over are opened
(including the first one) if it's opened, they get closed (matching existing drag-toggle logic).
2015-04-25 13:11:32 +10:00
0221a11c95 Project Paint: save 8 bytes per pixel (re-align) 2015-04-25 12:54:55 +10:00
86d3a1f683 Cleanup 2015-04-25 12:29:52 +10:00
Julian Eisel
3bffcc675b Fix T42495: Fullscreen area icon glitch
Tried a couple of things to trigger an update/redraw for the exact right
moment (sending azone update event, timer, delayed redraw, etc) but this
seems to work rock solid without being *that* ugly.
2015-04-25 01:29:53 +02:00
Julian Eisel
de8e89d4f5 Fix T44405: Importing keyconfig with changed shortcut in "Screen Global"
causes rapid fullscreen toggeling
2015-04-24 20:08:52 +02:00
Dalai Felinto
7e66f0e9d4 Multi-View: Set Stereo 3D operator support for EXEC calls 2015-04-24 13:07:33 -03:00
Dalai Felinto
27ac96dbae Multi-View: rolls back to a non quadbuffer friendly window if displaymode changes from pageflip to something else
In some cases the graphic card supports quadbuffer, but not the display.
In this case it is nice to go back to a window that does not have
quadbuffer if you change back to anaglyph, interlace, ...

Otherwise you may be stuck with a flickering window
2015-04-24 13:06:49 -03:00
Dalai Felinto
fb17a3fb76 Multi-View: Time Sequencial (aka pageflip, aka quadbuffer) stereo support
TODO: I would be nicer if we could set win at file opening to the
current open window, but I'll implement this later.
2015-04-24 12:00:16 -03:00
324751259e correcting typos in python api docs 2015-04-24 14:08:31 +01:00
80d75cb3e4 Add debug option --debug-gpumem to show GPU memory used in status bar.
Only used in ATIs and NVIDIAs. Used extensions are:

https://www.opengl.org/registry/specs/ATI/meminfo.txt
http://developer.download.nvidia.com/opengl/specs/

If you read the documentation, the numbers are not supposed to be exact
and also depend on the time when the call is made. The numbers can also
change quite quickly. It's only meant to give a rough measure of what is
going on.
2015-04-24 14:11:21 +02:00
c2f861453e Fix T44492: knife tool should cut across a split edge.
Added filter condition in visibility check that prevented
a "butting-up-against" face from obscuring an edge.
2015-04-24 07:29:45 -04:00
546031b694 BGE : fix bugs with physics collision mask/group
Currently there are bugs with physics objects in inactive layers,
character and softbody.
I added a function in CcdPhysicsEnvironement to know if a physics
controller is currently active and for soft body I added the correct function in UpdateCcdPhysicsController to re-add a softbody in the dynamics world.

The bug was introduced in D1243 commit 3d55859

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

Reviewed By: sergof

Subscribers: youle, moguri

Differential Revision: https://developer.blender.org/D1253
2015-04-24 11:57:38 +02:00
c884ac28a7 3D Textures:
If we fail allocating a proxy texture don't fail, instead create a
smaller nearest filtered image to display in its place.

This can make viewing slow (it's an extra O^3 operation), but this will
probably help us render the tornado in 3D viewport in gooseberry and
still actually see something - despite the rendering taking longer.
I've added a debug print so we can know when this happens.
2015-04-24 11:35:57 +02:00
9576d03f50 CMake: add -Wformat-signedness 2015-04-24 19:11:02 +10:00
bdf6393c98 Math Lib: pow_i for int power-of 2015-04-24 11:37:48 +10:00
f829f556b4 Fix project painting on a negative scaled object 2015-04-24 11:04:27 +10:00
Dalai Felinto
efe41ae7fd Multiview: Quadbuffer (time sequential) working [debug builds only]
I'll enable this mode in Release builds once I figure out how to best
handle opening files that are saved with the quadbuffer mode.

In fact I think no display mode should be saved/read from a file.

Tested in Linux with NVidia 3D Vision and NVidia 3D Vision Pro with
NVidia Quadro FX 580 and Quadro FX 4600.

(kudos for the Visgraf Lab at IMPA, for having me around with all those
gadgets ;)

Thanks for Cédric Paille (cedricp) for the code snippets and tests -
T44327
2015-04-23 19:50:52 -03:00
0217e6517f Cleanup: minor edits 2015-04-24 07:32:43 +10:00
Dalai Felinto
1076adb458 OpenEXR: RenderResult should always have a RenderView 2015-04-23 18:16:55 -03:00
dc734da46e Cleanup: casts, correct debug ifdefs 2015-04-24 07:08:07 +10:00
97b1f22bc3 Project Paint: minor optimization comparing angles 2015-04-24 06:41:39 +10:00
f75c89b3f4 Fix T44461: Crash and file corruption after calc_normals_split, calc_tessface execution.
This one was nasty, issue comes with temp/nofree CD layers that get 'removed on the fly'
from saved mesh CDData. Since mesh struct itself was written before that cleanup, it would
still have the old, invalid number of layers. That would lead to a buffer overflow when
loading data later (odd you had to do this twice (i.e. have 2 'ghost' layers) to get the crash).

New code prevents that by always making a copy of the mesh (we were already doing that mostly
anyway, since we were saving without tessfaces), copying (by ref of course) in it cddata,
and then writing mesh struct. Makes code a bit more verbose, but... it works!
2015-04-23 20:53:12 +02:00
18ee593729 Expose CD_PAINT_MASK to Python API
D782 by Stanislav Blinov
2015-04-24 04:10:51 +10:00
d2f35d6d50 3D textures: detect if we are pushing OpenGL too hard with the texture
size.
2015-04-23 19:02:37 +02:00
61ac5dd5ba Correct missing NULL check (own mistake) 2015-04-24 02:38:15 +10:00
372752c739 Math Lib: add count_bits_i utility function 2015-04-24 01:37:12 +10:00
27e03dcd21 Fix T44422: Zoom to mouse fails in camera view
Camera now supports all zoom styles too.
2015-04-24 00:18:42 +10:00
Dalai Felinto
22b564f93e Fix T44498 - Blender crashes in some files after render slots fix
This is a temporary fix until I get to investigate it more carefully.
It will help if the report could include the steps to reproduce it
besides the buggy file.

Note: RenderResult should *always* have at least a valid RenderView,
which is not what happens here.
2015-04-23 11:01:56 -03:00
bcac112dde Fix T44494 crop node changes values during execution.
We used the node data as a store for node execution,
bad idea, since the data itself is a template from which
execution data should be derived, never to be modified during execution.
2015-04-23 14:23:42 +02:00
Julian Eisel
2dfbf31a41 Display slot menu in Properties Region even if render slot is empty
For the records, this one is caused by 31f984bc3f, it wasn't
implemented at all ;)
2015-04-23 13:33:29 +02:00
Julian Eisel
85e455b245 Fix slot menu not displayed if render result slot is empty
Caused by own mistake in 31f984bc3f, reported by @sebastian_k in
IRC
2015-04-23 13:21:36 +02:00
8010672bbc BMesh: mesh-data picking, edge+vert improvement
When zoomed out vert bias over edges meant it wasn't possible to select edges.
Now pick the edge if the cursor is closer to its center.
2015-04-23 16:11:54 +10:00
87b3e62b3d Cleanup: warnings 2015-04-23 16:09:30 +10:00
0287b39468 Py API: Remove deprecated callback_add 2015-04-23 12:58:49 +10:00
Dalai Felinto
ecb3362a24 Fix T44396 - Compositing render slots don't work
Note 1: If you go to a render slot previously rendered and change
something in the compositing the buffer will still vanish.

This is an old bug, T44181, and not addressed here
(I'm basically just fixing the regression introduced with multiview)

Note 2: I have a work in progress patch to get rid of
RenderResult->rectf/rect32/rectz entirely. It still not working, and we
should have a working code base before doing refactoring anyways.
2015-04-22 18:48:31 -03:00
6a1c123df4 Fix broken uiTemplateIconView().
Was using enum **value** as **icon id**... tripple sigh!
Guess it was working for its only current use (matcaps), but still.
2015-04-22 22:48:40 +02:00
Julian Eisel
90b7652334 Fix T44472: Stereo 3D save options missing in File Browser 2015-04-22 21:50:49 +02:00
Dalai Felinto
4a8421faa4 Fix T44463 - crash on "Full Sample" 2015-04-22 16:40:21 -03:00
Julian Eisel
31f984bc3f Show buttons to change render layer/pass in UV Editor header
Previousely this was "hidden" in the Properties Region, this makes it
more visible/usable.

Requested by @sebastian_k
2015-04-22 20:43:43 +02:00
147d0cdf98 Tracking: Show plane track outline if image failed to load 2015-04-22 23:20:00 +05:00
f35489fa94 Tracking: Fix missing pointer array check when reading plane track
This could cause memory corruption when moving files from system with one
bitness to another.
2015-04-22 23:00:41 +05:00
3174cbe8f2 Double click selection on animation channels selects all keyframes of the range 2015-04-22 19:28:07 +02:00
3da7226844 Freestyle: Fixed a crash due to missing call of StrokeShader.__init__() in Python.
Many thanks to the problem report by flokkievids (Folkert de Vries)
through a comment in Patch D963.
2015-04-23 01:12:55 +09:00
Julian Eisel
798facbff3 Fix crashes when moving game property with invalid index (from py/redo
panel)

Also hides index option in redo panel to be consistent with similar
operators
2015-04-22 17:20:10 +02:00
d354eeab74 Placeholder image strips feedback session changes no.2:
Change paths operator can also have the same placeholder logic now
2015-04-22 14:11:51 +02:00
e7c2d244c3 Placeholder image strips feedback session changes no.1:
Autodetect range of strips.
2015-04-22 14:11:51 +02:00
62d10cd833 Placeholders for sequencer take one.
Placeholder images, means that the image sequence reserves a range for
images, displaying black while we wait for them to finish rendering.

This is meant as a feature to not break the layout of gooseberry
sequence edits while we wait for those frames to arrive.
2015-04-22 14:11:51 +02:00
Julian Eisel
dc36e1fe39 Fix T44476: Hiding Grease Pencil from Outliner RMB doesn't update 3D
View
2015-04-22 14:02:48 +02:00
Julian Eisel
18aaae101a Fix T44477: Overlapping tooltips in Outliner
Tooltips for buttons in the Outliner could overlap the Outliner's RMB
menu in some cases (and there's no way to get rid of the tooltip again).
This disables the button's tooltip before creating the menu (as we do it
for the normal RMB menu)
2015-04-22 13:41:43 +02:00
1044dfd965 Fix and simplify vertical positioning and calculation of metadata
display more.
2015-04-22 13:19:58 +02:00
a069b8d5d8 Rename stamp panel to metadata panel.
Rationale - this panel also enables metadata that get written on files.

Also moved draw_stamp property in the panel - to make it clearer it only
controls the drawing, not individual metadata.
2015-04-22 12:35:59 +02:00
818a0cdc76 Fix stamp missing after multiview merge.
Was not using acquired render result correctly, most likely a copy paste
error.
2015-04-22 12:03:06 +02:00
97587dc5d6 Stamp cannot be written to file.
Make sure stamp data is avaliable before writing stamp to image - this
still does not fix stamp, looks like issue is availability of the images
themselves for the view, investigating next.
2015-04-22 11:50:57 +02:00
414990b0f1 Tracking: Some more code de-duplication 2015-04-22 12:46:29 +05:00
18a47b67fd Tracking: Code cleanup, de-duplicate some code in tracking context finish 2015-04-22 12:34:01 +05:00
e6ceecdf97 Cleanup: pep8, spelling 2015-04-22 16:26:54 +10:00
4da050674e Fix T44470: File Selection sometimes surpresses last Character.
Tweak hack of `file_draw_string()` (there may be better solution, but not worth
spending time on this, the whole filebrowser drawing code is to be rewritten anyway).
2015-04-22 08:15:05 +02:00
e1a53b6d52 Fix T44475: Merge option of Mirror Modifier behavior reversed.
Glitch in rB57d9badc.
2015-04-22 07:54:14 +02:00
a8adeeb6fb Logic Editor: Buttons for moving game properties up/down
D1163 by @panzergame, with minor edits by me (@Severin)
2015-04-21 23:33:45 +02:00
b35743d39f Tracking: Add missing plane track remapping when joining two point tracks 2015-04-22 02:10:50 +05:00
260f75a2ca Tracking: Cleanup, move some plane tracks code to utility functions 2015-04-22 02:10:50 +05:00
Dalai Felinto
9425a8ff38 BGE: scene.pre_draw_setup[] callback
This callback allows the user to change the camera data right before the
rendering calculations.

scene.pre_draw[] is not enough here, because if you want to change the
camera matrices (projection/modelview) the culling test is done before
that (after pre_draw_setup[] though).

Reviewers: moguri, campbellbarton

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

Python sample code using this. The sample scene would need a default
camera (not used for rendering), a dummy camera ('Camera.VR'), and two
cameras ('Camera.Left', 'Camera.Right') that will be used for the actual
rendering.

```
import bge

def callback():
    scene = bge.logic.getCurrentScene()
    objects = scene.objects

    vr_camera = objects.get('Camera.VR')

    if bge.render.getStereoEye() ==  bge.render.LEFT_EYE:
        camera = objects.get('Camera.Left')
    else:
        camera = objects.get('Camera.Right')

    vr_camera.worldOrientation = camera.worldOrientation
    vr_camera.worldPosition =  camera.worldPosition

def init():
    scene = bge.logic.getCurrentScene()
    main_camera = scene.active_camera
    main_camera.useViewport = True

   scene.pre_draw_setup.append(callback)

    objects = scene.objects
    vr_camera = objects.get('Camera.VR')
    vr_camera.useViewport = True
    vr_camera.setViewport(
            0,
            0,
            bge.render.getWindowWidth(),
            bge.render.getWindowHeight() )
```
2015-04-21 17:41:23 -03:00
f2956d5fc7 Tracking: Fix over-allocation in plane track's point tracks pointers when removing point track 2015-04-22 01:36:15 +05:00
Julian Eisel
6885d316b1 Fix T44474: Rotation manipulator not hidden completely with all axes
locked

Really doesn't look like a bug on a first glance but the line of code
that was there previously seemed to be there to prevent the manipulator
from drawing in this case.
2015-04-21 21:55:19 +02:00
bf69453ae7 BLI_string: add BLI_snprintf_rlen
use when the length of the destination string is needed.
2015-04-22 05:37:22 +10:00
c9f9e29538 Math Lib: handling bits handling into own file 2015-04-22 04:44:24 +10:00
b47892e9f5 Minor edits to metadata commit
No need to calculate height of each line, just use height of font.
2015-04-22 04:43:13 +10:00
e1ce83f762 Initialize and use the theme for metadata text 2015-04-21 19:01:09 +02:00
58c511fb01 Stamp refactoring:
Write those on render result during rendering, so we can cleanly write a
render result image after rendering.
2015-04-21 18:37:06 +02:00
3091ea49fe Metadata:
* Theme support for metadata display
* Increase text DPI with scaling.
2015-04-21 18:37:06 +02:00
50bfc4bfa0 Metadata display support - patch by Julian and me.
Basically, blender adds a few metadata fields to images when
we render an image. Those metadata can now be viewed in the
image editor.

Also, made sure metadata are available when we write imbufs
to disc with "Save As". There may be more cases here that need
fixing, but this means that loading an image with metadata
will now properly preserve them in blender.
2015-04-21 18:37:06 +02:00
Julian Eisel
f9972fa53e VSE: Allow GPencil drawing without having a strip loaded
Previously the GPencil strokes were just not drawn (even though they
were generated) until a strip was loaded.
2015-04-21 17:44:11 +02:00
84d117b3ad Minor edit to edit-mesh selection bias
only choose verts over edges (not faces)
2015-04-22 00:43:31 +10:00
3a3f80673c Cleanup: minor corrections 2015-04-22 00:16:26 +10:00
Julian Eisel
de687b6fa0 Fix T44465: Crash using VSE OGL render + Grease Pencil
Likely caused by rBd5f1b9c22233
2015-04-21 16:04:14 +02:00
e3a6440e7a BMesh: mesh-data picking, general improvements
Generalize logic for vert/edge/face selection:
- index cycling.
- selection bias with mixed modes.

Details:
- Edges now support index cycling (as verts/faces did already)
- Cycling over near elements is now only enabled when the mouse position remains the same.
- No longer do 2 selection passes to perform index cycling.

Fixes:
- Edges behind the view could be selected (surprising nobody reported!)
- Selection bias now only changes the element that gets picked without interning the return distance
  (was buggy with mixed modes).
2015-04-21 21:25:43 +10:00
907d4d310f Backdrop strictly shows image result only - it could get influenced by
scopes setting of space if one changed the space type back and forth.

Thanks to Sergey for reporting.
2015-04-21 12:13:02 +02:00
e0ae23b4d6 Allow editing of active strip proxy settings again in addition to the
set operator
2015-04-21 12:00:10 +02:00
b82d571c85 Cleanup: style 2015-04-21 15:53:32 +10:00
f36e91ad0a Correct crash in last commit (spacebar search) 2015-04-21 15:18:34 +10:00
Julian Eisel
56a93e9cb1 Add eyedropper for selecting object & obdata
In addition to the unlink icon to clear a value,
When cleared, show an eyedropper to select objects or object-data
(was already available via the EKey).
2015-04-21 14:25:03 +10:00
912397756a Fix T44432: Zoom to mouse fails /w FCurve editor 2015-04-21 13:10:32 +10:00
62e149881a Fixes for backbuf selection logic
- Fix ED_view3d_backbuf_sample_rect, r_dist was set completely wrong.
- Avoid duplicate calculations picking the nearest edge.
- Bias against picking selected edges is now optional.
- Remove unused callback reading the backbuf.
- Remove unused strict option picking vertices.
2015-04-21 04:50:39 +10:00
aa880bb815 Cleanup: use ED_view3d_backbuf_* prefix 2015-04-21 03:19:27 +10:00
d57a93a7cb Fix T44383: Select face fails in some positions
When mixing vert/edge/face with select-visible,
face selection could fail when not close enough to the center.

This also fixes a bug where the bias for verts over edges would
prefer faces over edges too, making edges harder to pick.

Mixing edge with other selection modes works more predictably now.
2015-04-21 03:10:32 +10:00
0626d27bf6 Editmesh select nearest fixes
- distance from edge check wasn't clamping 0-1
- vertex bias wasn't taking pixelsize into account.
- index & pass counter were floats

Also some improvements

- use BMesh lookup tables when available.
- use structs to avoid issues getting out of sync.
2015-04-21 01:50:21 +10:00
60e8e20132 Cleanup: use macro for common view3d zbuf check 2015-04-21 01:50:20 +10:00
57d9badc21 Cleanup: use bool /w flag checks 2015-04-21 01:50:20 +10:00
6298632bfa Guardedalloc: Don't use aligned blocks to calculate memory sloppyness
Aligned memory is allocated with memalign() and malloc_usable_size() can't be
used to measure this block.
2015-04-20 19:23:25 +05:00
42e427905c CMake: Move performance tests under the cmake option
This way running full sweep of regression tests does not require
waiting for the performance test to finish.
2015-04-20 18:30:26 +05:00
4d5446cea7 Usual UI messages fixes... 2015-04-20 14:46:09 +02:00
828abaf11c Cycles: Split BVH nodes storage into inner and leaf nodes
This way we can get rid of inefficient memory usage caused by BVH boundbox
part being unused by leaf nodes but still being allocated for them. Doing
such split allows to save 6 of float4 values for QBVH per leaf node and 3
of float4 values for regular BVH per leaf node.

This translates into following memory save using 01.01.01.G rendered
without hair:

                   Device memory size   Device memory peak   Global memory peak
Before the patch:  4957                 5051                 7668
With the patch:    4467                 4562                 7332

The measurements are done against current master. Still need to run speed tests
and it's hard to predict if it's faster or not: on the one hand leaf nodes are
now much more coherent in cache, on the other hand they're not so much coherent
with regular nodes anymore.

Reviewers: brecht, juicyfruit

Subscribers: venomgfx, eyecandy

Differential Revision: https://developer.blender.org/D1236
2015-04-20 17:29:51 +05:00
cd44449578 Cycles: Synchronize images after building mesh BVH
This way memory overhead caused by the BVH building is not so visible and peak
memory usage will be reduced.

Implementing this idea is not so straightforward actually, because we need to
synchronize images used for true displacement before meshes. Detecting whether
image is used for true displacement is not so striaghtforward, so for now all
all displacement types will synchronize images used for them.

Such change brings memory usage from 4.1G to 4.0G with the 01_01_01_D scene
from gooseberry. With 01_01_01_G scene it's 7.6G vs. 6.8G (before and after
the patch).

Reviewers: campbellbarton, juicyfruit, brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D1217
2015-04-20 17:29:51 +05:00
b07c630676 I18n: Add Vietnamese language. 2015-04-20 14:27:20 +02:00
6bc26540c2 Fix T44452: Inconsistent gpencil color in prefs 2015-04-20 21:20:39 +10:00
fa761dfe6d Fix T44419: extruding when using lasso deselect 2015-04-20 21:10:52 +10:00
437f69ab45 Allow Python overrides for materials. 2015-04-20 20:20:33 +10:00
9b4c8a2507 Fix T44458 strip modifier mask not copied correctly when doing scene
copy.

What happens is that the strip is copied, but it still refers to the old
scene. Here we need to fix this by referring to the copy of the strip
and also do it after copying to make it order independent.
2015-04-20 11:51:43 +02:00
0aa2eed0c2 Compilation error fix for MSVC: It does not support expressions in array
declarations
2015-04-20 14:07:26 +05:00
bf6bde232d Fix: BGE crashes when RunPythonCallBackList() is called with maxargcount != minargcount 2015-04-20 13:53:54 +08:00
dbb2b29bea Action Stashing: Newly stashed strips now get "sync length" option enabled by default 2015-04-20 17:27:59 +12:00
a0e1b6573a Action Editor "Browse" Fix: Stash active action if nothing else uses it
Following the initial action management commits for 2.74, blurrymind pointed out a
problematic workflow involving the "Browse Action" dropdown in the Action Editor
which would lead to actions being accidentally lost. Namely, it turns out that
game animators frequently flip between different actions from the Browse menu while
working.

While the new up/down operators and/or other NLA based tools are better suited to this
without the problems of actions getting lost, some additional precautions were needed
for the Browse menu as well. So now, if the active action will have no users as a result
of the switch (i.e. it was a new action, and the user is checking on a previous action
via the Browse menu), this action will now get stashed. This workflow is not perfect though,
as there is the problem of the stashed action strips not reflecting the actions they reference.
2015-04-20 17:27:58 +12:00
689241b6e5 Fix for potential null-pointer-dereference if the new action is NULL 2015-04-20 17:27:57 +12:00
e4fbc8fc8d Fix: Changing actions in the Action Editor using the Browse dropdown should happen in tweakmode
When a NLA strip is being tweaked, it should not be possible to use the Action Editor to change
the action that it uses. Instead of changing the action in tweakmode, it now exits tweakmode
first before doing so.
2015-04-20 17:27:56 +12:00
5f6b958e96 Fix: "show_points" setting for Grease Pencil drawing didn't work
As reported by zeffi, the "show_points" option was not working in master.
It probably broke recently, after some changes meant that the point sizes
weren't geting set prior to drawing these points anymore. Since this was
originally added as a debugging tool (though it is now somewhat redundant
due to the stroke editing functionality, which uses/exposes the same points),
this option wasn't really that important. I have decided to add back a toggle
for this to the UI though, since it can be used for some interesting effects...
2015-04-20 17:27:55 +12:00
79319b3fba Sculpt: remove workaround T25371
It's no longer needed,
and made calc_area_normal different to the normal from calc_area_normal_and_center.
2015-04-20 13:36:51 +10:00
436004b6b1 Sculpt: clay-strips was missing accumulate button
Correct & de-duplicate check for accumulate.
2015-04-20 13:23:47 +10:00
07a7d77ec1 Fix: solved BGE compiler error on Linux/gcc 2015-04-20 10:58:25 +08:00
5db143efbb Fix T44449, sm_52 kernel missing in CMake builds. 2015-04-19 22:04:23 +02:00
62f79856e9 BGE : Standardization of callbacks execution.
A new function (RunPythonCallBackList) to call all python functions
contained in a python list was developed.

This function has:
  - first argument is the python list of callbacks
  - second argument is a python list of arguments
  - third argument is the minimum quantity of arguments
  - forth argument is the maximum quantity of arguments

It improves flexibility and supports *args.

Reviewers: moguri, dfelinto, campbellbarton, sybren

Reviewed By: campbellbarton, sybren

Subscribers: sybren

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1102
2015-04-19 20:33:08 +02:00
6f0f1dc3be Cleanup: warnings 2015-04-19 22:03:42 +10:00
e5048dd4ca Dyntopo: non-topology tool origdata support
Brushes that don't change topology didn't have access to original data.
2015-04-19 19:56:46 +10:00
ac73fe5fe0 Cleanup: use meaningful names re: (fc, an, sn) 2015-04-19 18:38:58 +10:00
fb6a0d24e1 Dyntopo: support for original normal access
Rename calc_flatten_center to calc_area_center,
since theres no 'flatten' spesific logic there.

Also refactor calc_area_center, calc_area_normal, calc_area_normal_and_center
so they're next to eachother - they're almost the same,
having them scattered about isn't helpful.
2015-04-19 18:24:21 +10:00
fe39ebea12 Cleanup: move project code into util function 2015-04-19 17:52:35 +10:00
57b020528b Cleanup: calculating sculpt center & normal
also avoid sqrt calculating dyntopo center (only checks for flipping)
2015-04-19 17:03:51 +10:00
eb4fb4f4fe disable verify from last commit (too slow) 2015-04-19 16:06:40 +10:00
d09a9a9597 Dyntopo: USE_EDGEQUEUE_TAG broke even subdiv
While adding edges to the queue multiple times is redundant,
walking over them is still needed.
2015-04-19 16:03:12 +10:00
550c3c2c1e Dyntopo: avoid over-counting /w neighbor average 2015-04-19 14:46:32 +10:00
2448c21cb3 Sculpt: avoid CD lookup /w mask smooth 2015-04-19 14:46:32 +10:00
9ac618a90e Sculpt: smooth brush, exclude self from average
Was including the vertices own location when accumulating.
2015-04-19 14:46:32 +10:00
3d55859924 BGE: Support for collision group/mask from the api + activated on EndObject.
A Python API for the collision group / mask has been added:
```
KX_GameObject.collisionGroup
KX_GameObject.collisionMask
```
The maximum number of collision groups and masked has been increased from eight to sixteen.
This means that the max value of collisionGroup/Mask is (2 ** 16) - 1

EndObject will now activate objects that were sleeping and colliding with the removed object.
This means that, unlike now, if a rigid body starts sleeping on top of another object, when the latter is removed the rigid body will activate and fall, rather than float midair as before.

Collision groups that do not intersect used to collide on the first frame. Now this has been fixed so that they collide appropriately.

Thanks to agoose77 for his help.

Reviewers: scorpion81, hg1, agoose77, sergof

Reviewed By: agoose77, sergof

Subscribers: sergof, moguri

Projects: #game_physics, #game_engine

Differential Revision: https://developer.blender.org/D1243
2015-04-19 01:04:22 +02:00
a2f9a0cfd9 BGE: Fix T43536 logic.getCurrentScene() returning wrong scene in
pre_draw and post_draw calls

A simple insert of KX_SetActiveScene(scene) before pre_draw and
post_draw calls solves the issue.

Reviewers: dfelinto, sybren, brita_, campbellbarton, moguri, lordloki

Reviewed By: moguri, lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1129
2015-04-18 21:37:59 +02:00
252b0cf5d2 Cleanup: API naming use BKE_undo_ prefix 2015-04-18 18:25:07 +02:00
38bea4e86c Cleanup: use BLO_memfile prefix 2015-04-18 18:11:01 +02:00
230712e6cb Autosave:
Flush edits only when saving global undo. This will stop freeing of PBVH
in sculpt mode, which introduces some pretty severe freezes, especially
in dyntopo. For global undo we flush the contents of the global undo
buffer which does not include localized edits of sculpt/edit mode, so
those data will not get saved anyway.
2015-04-18 15:50:29 +02:00
4f2657bf47 BGE: New Draw debug shadow box for sun lamp
New Check option "Show Shadow Box" in shadow panel of sun lamp to get
feedback about which objects project shadows.

Minor tweaks by Campbell Barton and Jorge Bernal

Reviewers: moguri, sybren, kupoman, dfelinto, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: sergey, lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1149
2015-04-18 12:30:02 +02:00
3a4a2a9427 Fix T44390: Clay brush weirdness part-2
Use the normal of the plane instead of the vertex normal,
since projecting using the vertex normal frequently causes artifacts.
2015-04-18 05:08:14 +10:00
05b6de545a Fix T44390: Clay brush weirdness part-1
Clay brush had a feedback loop with dyntopo,
getting the plane from the cursor center didn't support original data.
2015-04-18 05:08:03 +10:00
b0c2fdd927 Cleanup: simplify sculpt normal accumulation 2015-04-18 03:09:16 +10:00
28b9a0276f Cleanup: simplify sculpt plane accumulation 2015-04-18 02:54:49 +10:00
e0aeafdf0a BGE : Fix light layer check
The layers in Blender are using a bit field for the 20 layers. The light layer value was limited to 20, so the highest usable light layer was five.
The patch modify the range and add layer out of range error messages.

Reviewers: sybren, hg1, moguri

Reviewed By: hg1, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1238
2015-04-17 18:12:51 +02:00
Dalai Felinto
394c5318c6 Bake-API: reduce memory footprint when baking more than one object (Fix T41092)
Combine all the highpoly pixel arrays into a single array with a lookup
object_id for each of the highpoly objects.

Note: This changes the Bake API, external engines should refer to the
bake_api.c for the latest API.

Many thanks for Sergey Sharybin for the complete review, changes
suggestion and feedback. (you rock!)

Reviewers: sergey

Subscribers: pildanovak, marcclintdion, monio, metalliandy, brecht

Maniphest Tasks: T41092

Differential Revision: https://developer.blender.org/D772
2015-04-17 12:25:37 -03:00
45e929dc12 Cleanup: redundant casts 2015-04-18 00:16:05 +10:00
fa0f936a64 Fix BPlayer (c) 2015-04-17 16:03:14 +02:00
3a015bb76b Depsgraph: Report total time spent on scene update
Previously was only per-thread timing.
2015-04-17 18:57:13 +05:00
15d3d8560d Cleanup: remove unused face normals
also use const
2015-04-17 23:50:23 +10:00
Dalai Felinto
80b4b43727 Code cleanup (for previous commit) 2015-04-17 10:41:31 -03:00
Dalai Felinto
cd729e9a4e Image Editor: Fix passes increase/decrease buttons
This was half-broken even in 2.74 (if you were using compositor), multiview did us the favour of breaking this for all cases (you are welcome).
It is all working now.
2015-04-17 10:38:17 -03:00
Dalai Felinto
479b669693 Fix T44336: Unable to select cycles-specific passes in UV/image editor
This approach gets rid of iuser->pass for good.

Also, I'm commenting out the pass increase/decrease. This was broken
since multiview. I will fix it later (before 2.75), but I didn't want to
get this patch mangled with that fix.

Thanks Sergey Sharybin for the review and feedbacks.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1232
2015-04-17 09:48:31 -03:00
02fba106fa Dyntopo: save 4 bytes per BMLogVert 2015-04-17 18:07:08 +10:00
e05f719b8b Dyntopo: avoid redundant lookup on original data 2015-04-17 17:34:14 +10:00
50522cba92 Fix T44411: poll() function of MESH_OT_knife_project was not strict enough.
We need a 3DView region here, not only the 3DView...
2015-04-17 08:09:16 +02:00
09f2aa9382 Fix T44412: Crash when trying to paint on a GPencil frame when the frames are out of order 2015-04-17 13:32:57 +12:00
582fa5e36e Fix for Grease Pencil and negative frames
While investigating T44412, I noticed some weirdness going on when trying to
draw on frame 0 (i.e. strokes were getting added to frame 1 instead). Clearly,
this seemed like an off-by-one error related to clamping to prevent negative
frames which was also excluding frame 0.

This commit reverts the fixes made for T36831 in:
rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808

After thinking this over, I think these checks against drawing on negative
frames aren't needed. Even if the current userpref setting doesn't allow
navigating to negative frames, this may not be true for other users that
may work on the same file (in a team environment). Also, negative frame
values can get set via the dopesheet.
2015-04-17 13:02:45 +12:00
4cd37541b0 BGE: Fix for T44374 Crash when collision sensor deactivated
Don't allocate memory for sensor logic brick if it is deactivated
2015-04-17 02:12:57 +02:00
afc2f415ab Cleanup: use const for sculpt code 2015-04-17 03:11:26 +10:00
bbae0664a3 Added Support for Custom Vertex Normals to Collada exporter 2015-04-16 19:02:26 +02:00
a7cae2987d OpenGL does not like line thickness less than 1.0.
Check here is not completely correct either, we should check against
GL_ALIASED_LINE_WIDTH_RANGE and GL_SMOOTH_LINE_WIDTH_RANGE
2015-04-16 18:35:07 +02:00
6589d07c8f Action Editor: Preemptive fix for null-pointer dereference
A few weeks ago, I got a random crash while testing som edge cases
(IIRC, it was trying to assign an action with no active object),
which I haven't been able to reproduce since then. This commit though
adds some extra sanity checks here, as a user may try to assign an
action to an animdata block which did not have an action already.
2015-04-17 01:11:56 +12:00
0b691563ea Fix T44408: "Rest Length" property in the Stretch To constraint was getting clipped when using Metric Units
Increased the upper bound for the "Rest Length" property to cope with metric
units, especially when large (i.e. > 2 m) distances are involved. It may be
necessary to increase this again in the future, if even larger distances get
used (though it then starts getting a bit difficulty to justify such setups).
2015-04-17 01:11:55 +12:00
6603a10331 Cleanup: remove redundant initializers 2015-04-16 22:26:20 +10:00
69b33b6ed3 Draw smoke domain in transparent pass. Should composite smoke domains
correctly in scene - with known limitations of blending between
transparent objects.
2015-04-16 13:02:09 +02:00
eced87b2d6 Fix T44406: the Hebrew font causes trouble.
Looks like the droidsans hebrew font we used back in the days had some kerning bug or so...
Updated with latest version from Debian Testing repo, works nice now.
2015-04-16 12:37:03 +02:00
59db8d74b9 RNA: avoid past tense in property names 2015-04-16 16:41:12 +10:00
c5a126ee70 Docs: BLI_rand non-obvious behavior 2015-04-16 16:14:30 +10:00
8c98b1649d BGE: Fix for T42341 Sensor.frequency is badly named
"Frequency" parameter is renamed to "Skip" in the LogicBricks sensors as it represents skipped frames between pulses.

Naming something (frequency) the exact opposite of what it represents (period) was the worst choice.

Also, a new BGE python attribute 'skippedTicks' was introduced. 'frequency' attribute is maintained but deprecated.

Internally, freq variable is used yet at DNA_Sensor to maintain compability and to avoid do_versions.

Thanks to Sybren for the investigation.

{F162440}

Reviewers: campbellbarton, sybren, moguri, hg1

Reviewed By: sybren, hg1

Differential Revision: https://developer.blender.org/D1229
2015-04-16 06:39:33 +02:00
b466a82fa5 Partial fix for T44404: freestyle crashes blender.
Logical predicates AndUP1D and OrUP1D were instantiated even with an empty
list of unary 1D predicates, causing an exception in the constructors of
the logical predicate classes.

This is a regression made in b408d8af31.
2015-04-16 13:35:24 +09:00
b88421aa62 Dyntopo: avoid redundant loop collapsing edges 2015-04-16 12:24:59 +10:00
f57b904807 Dyntopo: blend vertex normals when collapsing 2015-04-16 11:59:48 +10:00
6675fd6b52 dyntopo: don't allocate tessfaces while sculpting
Tessellation data isn't used for drawing or sculpting.

This frees up some memory ~approx 10% in own tests.
Also slight spee-up since it avoids calculating it in the first place.
2015-04-16 04:32:16 +10:00
7f4b6a345e Fix crash loading file without scene in bg mode 2015-04-16 01:45:30 +10:00
99299da4b5 Cleanup: warnings, ws 2015-04-16 01:12:22 +10:00
34c1319d06 Cleanup: use const for event->tablet_data 2015-04-16 01:07:54 +10:00
f660085e2f Increase max brush size from 200 to 500 2015-04-16 00:59:43 +10:00
7730391d74 BGE: subclass with more than 1 argument, D1237
In the BGE you can't create a subclass with more than 1 argument like : "player = Player(owner, 10)"
I have modified the py_base_new to check only the first argument of args tuple.
Now we can do :

    class Player(types.KX_GameObject):
        def __init__(self, gameobj, life):
            print("create new player :", self, ", life :", life)

    player = Player(own, 50)
2015-04-15 22:02:16 +10:00
b9ea6fbb30 BMesh: dyntopo used lopsided normals
Normals from subdivided edges were only taken from the edges first vertex.

Interpolate between the two to give more even results.
2015-04-15 20:56:59 +10:00
240c5704e4 BMesh: Missed normal from example /w skip-cd flag
We may still want to use the normal as a reference but skip customdata.
2015-04-15 20:56:11 +10:00
255fb79ff3 Fix T44395: String untranslated in open file window. 2015-04-15 11:11:22 +02:00
730684f976 BMesh: avoid ghash lookups splitting the pbvh
This isn't a bottleneck but may as well avoid the extra ghash overhead.
2015-04-15 16:14:27 +10:00
9a711f98a7 typo in last commit 2015-04-15 15:34:06 +10:00
356ceded27 Sculpt: change behavior of crease brush
Pinch would give a flat result on either side of the stroke,
because points were dragged towards a single point.

Now pinch is projected on the sculpt plane, which gives a tighter crease.
The reverse is true too - blob brush which shares the code is also more curved.
2015-04-15 15:27:27 +10:00
b216f7abd6 RNA: use lock_ prefix for booleans 2015-04-15 14:51:17 +10:00
Julian Eisel
9b9978656d Fix T44389: Tooltips swapped in Logic Editor 2015-04-14 17:24:55 +02:00
Dalai Felinto
2d33057c75 Multiview: compositor openexr multiview images fully working
This is from my original missing-bits/TODO list.
Basically multiview openexr was only working when multiview was on.
2015-04-14 12:19:11 -03:00
Dalai Felinto
66e2fc39ce Fix T44343 Compositor image node cannot properly load multilayer EXRs 2015-04-14 11:21:01 -03:00
f1355d0b45 Second round of hair random rotation limited to 180 degrees
This time roll back to originally discussed in the code review page approach
with simply bumping UI range for the property.

It's still not totally free from forward compatibility breaking (which is
already broken comparing to previous release) but at least it'll keep files
working inbetween of git blender versions in cases random factor was not
set above 2.0.

Differential Revision: https://developer.blender.org/D1214
2015-04-14 19:04:12 +05:00
f1e1ec2d8d Action Editor: Make the warning on unlinking actions a bit less intrusive
venomgfx was complaining that having it do the popup everytime was too intrusive,
so demoting it to just showing the warning in the header.
2015-04-15 01:19:38 +12:00
04daaee0fd Fix T44385 SSAO inverted with new Intel drivers.
Intel has decided to fix this for newer devices and drivers only, so we
can't really avoid keeping a list of buggy drivers here.
2015-04-14 12:31:23 +02:00
ed40d5eaa7 Add flag that prevents editing of markers. Can be located in marker
menu.

When active, all editing operators for markers will not fire up.
2015-04-14 12:12:17 +02:00
68eeeea57e Dyntopo queue added the same edges multiple times
Use tagging to avoid re-evaluating the same edges while sculpting.

While gives only minor speedup,
it allows for changes to the queue without additional redundant checks.
2015-04-14 18:56:49 +10:00
7daa921359 BMesh: avoid customdata copy for new dyntopo verts 2015-04-14 18:41:01 +10:00
d36429b930 initialize members in-order 2015-04-14 18:41:01 +10:00
825b015e92 Fix T44348: Blender crashes when selecting bone from inactive scene in outliner
Pose is not guaranteed to be existing in object, so can't be used for selection
flag clear. Use bones themselves for that.
2015-04-14 13:25:25 +05:00
8486ee39bd PBVH: use realloc/recalloc 2015-04-14 17:58:07 +10:00
34d4ad326c Animation Editors: Name filter now updates as you type, making it a true "live search" 2015-04-14 18:50:15 +12:00
1e488802dc NLA: The "filter by name" functionality now works with NLA strips too 2015-04-14 18:39:09 +12:00
bb1bc7ecda NLA: Store track that the strip being tweaked comes from
There should be no functional changes visible from this change, but this commit
should make it easier to code tools which need to check on tweeakmode status,
by making it easier to figure out which NLA Track contains the strip which
owned the action being edited. (The strip is already saved, so this commit just
adds the track alongside it).

For now there is no version patch for this. The worst that happens is that an
extra refresh is needed in the NLA editor to get these to show up.
2015-04-14 18:39:07 +12:00
c95f38b92a Fix for another NLA drawing bug uncovered by the previous commit
With multiple strips in tweakmode, only the one tagged as being "active"
would get drawn in the correct colours, while all the others would just
get drawn as a selected strip instead.
2015-04-14 18:39:05 +12:00
5361339ba0 Temporary fix for NLA strips not getting drawn in tweakmode with multiple strips selected
When entering tweakmode on multiple strips (from different AnimData blocks)
simultaneously, only the track containing the last selected strip would be
shown. All the other tracks with strips being tweaked would not appear at
all.
2015-04-14 18:39:03 +12:00
097801e701 NLA: Shift-Tab toggles tweakmode AND makes that track solo
To help make it more convenient to edit stashed actions, Shift-Tab
(i.e. holding down the Shift key, which "tabbing" into tweakmode as
usual to edit the action referenced by the active NLA strip) now flags
the NLA Track that the strip occupies as being "solo" too.

This allows you to use the NLA to select a stashed action, then Shift-Tab
to start editing it without any other actions in the NLA stack interfering.
Like the "Next/Previous Layer" tools in the Action Editor, this is designed
to help with checking on stashed actions.
2015-04-14 18:39:02 +12:00
d841b75c5f BMesh: avoid redundant face-exists check (dyntopo) 2015-04-14 15:27:27 +10:00
6fb0563aee BMesh: optimize BM_face_exists
Avoid flagging/clearing flags,
just walk over the face until a mismatch is found.
2015-04-14 15:27:08 +10:00
c448196bb4 Cleanup: warnings 2015-04-14 10:34:32 +10:00
af2f4724d5 Cleanup: don't use single sets for comparisons 2015-04-14 10:34:32 +10:00
Dalai Felinto
2bceb3ae18 Fix for *harmless* T44342 Error when saving multilayer EXR
This was introduced with multiview, and it was an oversight on my end.
There is no error, we simply was never returning True
2015-04-13 19:56:56 -03:00
54c18d4849 Fix T44362 no easy way to repeatedly duplicate keyframes in action
editors.

Reporter used a hacky work-around by placing cursor at end of keyframe
range and doing ctrl-C ctrl-V repeatedly. This was working on 2.73 but
not anymore since the old selection is not kept.

Much better is to have duplication operator be repeatable. This commit
takes care of that.
2015-04-13 23:58:50 +02:00
27ded012d6 cleanup: style
to match my earlier commit in temp_viewport_fx_merge branch
https://developer.blender.org/rBc3f3b958dc0b

plus more

no functional changes
2015-04-13 16:56:43 -04:00
057c7c6fab Cleanup: do not use _reportf() when not doing any string formating!
Also usual minor i18n messages stuff...
2015-04-13 21:00:45 +02:00
Julian Eisel
86fe894f86 Moar precision for Color Stop position slider in Color Ramps
Normal dragging now uses a precision of 0.01 instead of 0.1, shift+dragging now uses 0.001. (0.1 steps can still be done using ctrl)

Requested by @venomgfx
2015-04-13 20:31:40 +02:00
aed97c9efb Fix bug with autonormalization and transform (after own range commit).
Transforming the center after transforming a handle would continuously
flush an extra offset to the handles.

Also use normalization range of -1.0 to 1.0 instead of -0.5 to 0.5 (not
really important, just for better comparisons)
2015-04-13 18:37:15 +02:00
cae23bab6b Fix for crash with non-camera as a camera 2015-04-14 01:00:07 +10:00
f27e0b7c5e After user feedback:
* Allow ctrl click to do negative stroke in line strokes
* Use alt for angle constraints.
2015-04-13 16:31:06 +02:00
4ce437fff0 Revert "Fix hair random rotation limited to 180 degrees"
This reverts commit 176ed5bfe2.
2015-04-13 19:16:54 +05:00
198ca57ae4 Graph editor:
Normalization feature now uses the full range of the data instead of
just one semiaxis for the maximum size.
2015-04-13 15:57:57 +02:00
8ad37b0d22 Fix T44359: mesh_normals_loop_custom_set() would not behave correctly with zero-normals.
Zero-normals here are used as a shortcut to say 'use auto-computed values'.
So we have to do so in pre-process steps!
2015-04-13 15:44:09 +02:00
17a9b05b9d Fix T44350: View3D layer out of sync /w scene 2015-04-13 23:10:43 +10:00
41350a91b5 Workaround T44351: Scopes make editmesh lag
Scopes are very heavy to calculate and editmesh uv's can cause the image view to redraw.

Best just disable scopes in this case.
2015-04-13 22:44:08 +10:00
364b6b29ff New operator for action and graph editor that centers around current
scene frame, bound to numberpad zero.
2015-04-13 14:30:24 +02:00
d1f9fcaabc Cleanup: style 2015-04-13 22:08:51 +10:00
d2da8aa27a BMesh: resolve skinny face artifacts /w dyntopo
Dyntopo can currently create skinny faces,
especially when the faces are much larger then the resolution.

To get the old behavior, set debug value to 1234
2015-04-13 21:25:39 +10:00
a50955ee0f Minor edits of python class documentation (regarding ID tagging) 2015-04-13 13:22:55 +02:00
8c616e86b5 Calculate auto normalization maximum from keyframes within range if
preview is on
2015-04-13 12:44:06 +02:00
fdc653e8ce Nodes: Remove hardcoded BLENDER_MAX_THREADS number of threads
Use actual available number of threads now, which will make it easier
to increase max number of threads, without having some sloppy memory
usage and without doing some redundant checks on thread data which was
never used.
2015-04-13 15:40:44 +05:00
efe90384b7 Be a bit more specific in the message. 2015-04-13 12:28:12 +02:00
8a97d46296 Windows:
Only print backtrace on debug builds, since on release builds there is
only some useless output from a python library and fftw.
2015-04-13 12:21:32 +02:00
97ae0f22cd Depsgraph debug: Remove hardcoded array of BLENDER_MAX_THREADS elements
Allocate statistics array dynamically, so increasing max number of threads does
not increase sloppyness of the memory usage.

For the further cleanups: we can try alloca-ing this array, but it's also not
really safe because we can have quite huge number of threads in the future.
Plus statistics will allocate memory for each individual entry, so using alloca
is not going to give anything beneficial here.
2015-04-13 14:41:02 +05:00
890e533c76 Fix adding to paint-curves from the first point
- add_index now works when selecting the first point.
- sliding now selects the correct handle.
2015-04-13 19:30:43 +10:00
Mai Lavelle
176ed5bfe2 Fix hair random rotation limited to 180 degrees
The issue was caused by phase being limited from 0 to 1, which gave only
0..M_PI distribution which is not good enough for good randomness.

Now the phase is being randomized across full 0..2*M_PI range.
2015-04-13 14:17:00 +05:00
6fbf05f326 Make python gotchas more clear (regarding handling of stale data) 2015-04-13 11:00:22 +02:00
4fb33d82e2 Fix T44361: array modifier "fit curve" mode not working properly
'tot_length / step_length' gives the number of 'segments', not the number of
copies - we have to add 1 here.
2015-04-13 10:51:04 +02:00
f684dfc432 Fix T44364: Remove shape key crashes Blender 2015-04-13 15:54:37 +10:00
dd0cba0076 error in last commit 2015-04-13 15:46:27 +10:00
919de1e4c9 BMesh: diagram for dyntopo edge subdiv 2015-04-13 15:43:25 +10:00
9b359c1592 Py API: default arg for location_3d_to_region_2d
This function could return None for points behind the view,
note this in the doc-string and add an optional fallback argument.
2015-04-13 14:35:16 +10:00
e688ba0304 GHash: use unsigned int for ghash_size 2015-04-13 13:45:48 +10:00
55b7a8c027 ndof: fix Linux device detect regression 2015-04-12 19:58:17 -04:00
c950b8f289 making add>lamp its own menu so it can be extended by addons 2015-04-12 11:38:18 +01:00
542a0c41d2 Dyntopo: redundant length check subdividing edges 2015-04-12 19:14:28 +10:00
690b90f1e2 BMesh: minor optimization counting adjacent data
add BM_***_count_is_over(), _count_is_equal()

Useful if we only want to know if the count is a smaller value.
2015-04-12 17:38:14 +10:00
6d2c3a2456 BMesh: avoid ghash realloc's making log entry 2015-04-12 17:38:14 +10:00
Julian Eisel
f50fed6a6d Reset view after ctrl-clicking a Panel
Using ctrl+LMB to collapse all panels except of the clicked one resulted
in an empty area if done from a view that is scrolled down to some
degree. Resetting the view makes this much better, although it still
doesn't work that well if the area is really small, but I don't think
it's worth over-complicating things here.

"Feature-Request" by @maxon ;)
2015-04-12 08:07:34 +02:00
17b4f57bf0 Missed this last commit (dyntopo hashing) 2015-04-12 11:12:57 +10:00
87b6d3c796 BGE: Add keyword arguments to createConstraint API
Added keyword arguments to createConstraint.
Changed initial values for the pivod XYZ  form 1 to 0.0.
Changed initial values for the axis Z form 1 to 0.0.
Delete the parsing for 4 parameters, because parsing only the X pivot is not necessary, also it was not working correctly (int instead of  float).

Reviewers: brita_, sybren, lordloki, campbellbarton, moguri

Reviewed By: lordloki, campbellbarton

Subscribers: campbellbarton

Differential Revision: https://developer.blender.org/D705
2015-04-11 16:17:07 +02:00
b329016b29 BGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer
In quad-buffer stereo mode, the GE render pass ends with the right eye on the right buffer, but we need to draw on the left buffer to capture the render.

Reviewed By: agoose77, HG1
2015-04-11 16:08:15 +02:00
a6421e1291 BMesh: intersect was using ptr hash for int keys 2015-04-11 23:41:10 +10:00
ccf44c400c BMesh: simplify hashing for dyntopo
Was using pointer hashing when the keys are in fact uint's.
Since they're well distributed from the rangetree,
no need to do bit-shifting tricks. just use int as hash.
Gives ~8% speedup in own tests.
2015-04-11 23:36:37 +10:00
7447a0173c Remove splash link to support gooseberry
Was included only for initial campaign.
2015-04-11 19:41:31 +10:00
465a5d29c0 BGE : Fix T43800: getScreenVect()/getScreenPosition()/modelview_matrix returns incorrect results
The getScreenVect(), getScreenPosition() and modelview_matrixmethod returns an incorrect results if called after the camera has been translated on the same frame.
The model view matrix will be update only once per frame with Cam->SetModelviewMatrix in KX_KetsjiEngine::RenderFrame.
Using GetWorldToCamera as model view matrix to get an actual view matrix even if the camera is moved.

Reviewers: sergey, dfelinto, brita_, sybren, hg1, campbellbarton

Reviewed By: hg1, campbellbarton

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1170
2015-04-10 20:20:52 +02:00
35812e65f4 Cycles: Fix compilation error on windows after recent logging changes 2015-04-10 22:35:10 +05:00
d850fd8244 Disable strict flags for msvc 2015-04-11 00:43:15 +10:00
Dalai Felinto
02a5cf75a2 Fix for debug-only crash when setting "Any" keymap input type
Another one of those assert crashes when passing values != than 1 and 0
(in this case the value is -1)

Notes from reviewer:
--------------------
These should really be enums. since valid values are KM_ANY,
KM_MOD_FIRST, KM_MOD_SECOND.

But can see at some point this was changed from an enum so... I guess
this is the only way.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1227
2015-04-10 11:10:10 -03:00
f75bbe27e2 Thumbnails: Add translations to font preview.
Not much to say, this is pretty straightforward.
We just have to add current locale to thumbnails 'signature', so that
previews get re-generated when we change locale...

Tested with Japanese and French.

Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
2015-04-10 15:34:31 +02:00
8a99dc2324 BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.
BLF_lang_get() shall return 'default' Blender locale (en_US) when translations
are completely disabled!

Also, add BLF_translate() and BLF_translate_do() to allow translating some strings
outside of label/tip context, but still only when i18n global flag is enabled.
2015-04-10 15:34:31 +02:00
a36c43fc8c Thumbnails: some reorganization, decouple actual path of file to preview from 'ref' one.
(Partial) backport from asset-experiments branch.

Reorganization: previously we could recompute name/path of thumb file two or three times,
now added lower-level internal functions that take those as parameters, so in most case
they are computed only once. Very minor optimization, but simple too.

Also, path of file to preview is now decoupled from path used to generate its URI
(and hence thumbnail path). In asset-experiments branch this is needed because
we also handle datablock previews in/as thumbnails (file_path is .blend path,
URI is .blend path + datablock 'path').

Here this will be needed for same kind of reason - once translated, font thumbnails
need to be re-generated when we change current language...
2015-04-10 15:34:31 +02:00
ec710775cf Use off_t for filesize (was int)
Resolves finding >2gig files.

Also enable strict flags.
2015-04-10 22:06:28 +10:00
b0906bcc5e Cleanup: remove win32 workaround 2015-04-10 22:06:28 +10:00
aac0df956f Cycles: Cleanup, make more clear what camera utility functions are private/public 2015-04-10 16:25:35 +05:00
085fa2e3d7 Fix T44329: Second part: prevent 'cachebuffer' and 'fullOSA' in preview renders. 2015-04-10 13:17:08 +02:00
711a5c79d8 Don't use vertex colors in textured mesh display during texpaint.
Wasn't that irritating?
2015-04-10 13:05:32 +02:00
e073562f80 Cycles: Make transform from viewplane a generic utility function 2015-04-10 15:53:14 +05:00
237c53fbf1 Only selected keys will get cleaned by the action and graph clean
operators
2015-04-10 12:45:13 +02:00
2f5dd83759 Cycles: Add some statistics logging
Covers number of entities in the scene (objects, meshes etc), also reports
sizes of textures being allocated.
2015-04-10 15:37:49 +05:00
1e71270f77 Fix T44329: Blender Crash when rendering in 3DView.
This commit fixes two different issues actually:
* When view name is unknown/irrelevant, you should pass a NULL str pointer to
  `RE_RenderLayerGetPass()`, not an empty string!
* `render_result_rescale()` would unconditionnaly free re->result (at the end),
  even if it did not replaced it at all, leading to freed memory access later.

This is only a partial fix though, "CacheBuffer" (i.e. saving tiles in EXR files)
shall not be used in 3DView rendering, and yet it is here...
2015-04-10 12:32:19 +02:00
253d15ea16 Move clean operator from action/ipo editors to the delete menu, now that
O key is bound to proportional editing.
2015-04-10 11:56:18 +02:00
11a48b7227 Python API docs, don't hard-code sphinx themes
also set the theme to classic (as it was for 2.73)
2015-04-10 15:49:07 +10:00
40334b4920 missed last commit 2015-04-10 13:44:26 +10:00
31d354dfa3 rename _ipo -> _fcurve 2015-04-10 13:41:57 +10:00
f2452bc9ab Test: blacklist loading addons /w known problems
The test now runs without warnings
2015-04-10 12:08:23 +10:00
Dalai Felinto
52f511269b Multiview: remove option to preview the selected stereo 3d mode and error when quadbuffer not supported
This was causing glitches when switching from/to fullscreen modes (e.g.,
side by side to anaglyph).

As for the quadbuffer errors this is part of a more complete solution to
be committed later.
2015-04-09 20:44:03 -03:00
Dalai Felinto
33028d17a0 Multiview: fix crashes with pageflip mode - by Cédric Paille (cedricp) 2015-04-09 15:22:53 -03:00
866532360c Fix T31546 fragment program gets created every frame
That was really crappy indeed. Now we have a separate API
for low level OpenGL programs, plus a nice interface for GPU, also
removes some GL calls from main code as a plus :)

The source for the programs is also moved to nice external .glsl files
(not sure which extension convention GPU assemply uses)
2015-04-09 20:20:50 +02:00
7ea4163e1e Cycles: Fix BVH counter on mesh updates 2015-04-09 22:23:59 +05:00
851ea206d0 Separate proportional editing options for graph and action editor. 2015-04-09 18:30:14 +02:00
cca4405437 Cycles: Fix wrong render result in certain configuration of render layer's surface/hair
There were some synchronization missing in cases when only one of those settings
was disabled.

Also added a render test for such configurations now.
2015-04-09 21:22:48 +05:00
ae5f2c2025 Fix regression after multiview, basically we appended the wrong frames
to movie file.

We have to resort to use crappy workarounds with preview arguments again
since preview range is only for OpenGL preview.
2015-04-09 18:02:43 +02:00
b30a2fe3f4 Fix T44322: Crash when trying to render spotlight halos.
Trying to access rl's from full samples in non-full-OSA context (with uninitialized
sample index even :P ).

Caused by rBd5f1b9c2, probably a copy/paste typo or so.
2015-04-09 16:32:45 +02:00
4cadbb03a8 Seriously... Fix building! 2015-04-09 16:17:51 +02:00
5197aa04c6 Fix part of T44320 selecting islands can fail.
Issue here is simple and has been fixed in other places such as
texpainting: Basically if face has different winding, do not calculate
it as adjucent to the other face, even if UV is identical.

This allows us to stack islands of symmetrical closed meshes on top of
one another and still be able to select the two identical island halfs
(provided the normals are correct of course).
2015-04-09 16:12:43 +02:00
d687428122 Error in own last commit 2015-04-09 21:23:21 +10:00
8a1c444c93 Disable proportional editing when duplicating keyframes 2015-04-09 12:49:06 +02:00
9749b2cb81 Fix partial image update during rendering
Was broken since 5d212fb.
2015-04-09 15:33:44 +05:00
d75bfdfafc Fix T44308 painting in 2D editor offset by one pixel.
Not sure why this was so in the first place but changing it seems OK.
2015-04-09 12:18:51 +02:00
8732c1a8b7 WM: allow 'save as' to path set by operator
Invoke assumed the filepath was never set.
Scripts couldn't invoke save-as at a custom location.
2015-04-09 19:49:05 +10:00
cc6e0b7394 UI: Extend preset menu
- allow for preset menu to change operator defaults.
- allow preset menu to select own kinds of file extensions.
2015-04-09 19:10:00 +10:00
bdad2c0595 Fix uninitialized var use reading view prefix 2015-04-09 17:30:26 +10:00
55ee436618 Fix missing NULL checks 2015-04-09 17:23:51 +10:00
089fc24c76 Fix for passing -1 to close() 2015-04-09 17:21:17 +10:00
5467260ce9 Cleanup: redundant NULL checks 2015-04-09 17:20:02 +10:00
0b59865115 Fix missing NULL check 2015-04-09 17:09:10 +10:00
1b72ad0c3d GHOST: don't instantiate assert arg
When debugging is disabled, function calls in an assert should never run.
2015-04-09 13:55:46 +10:00
12661de087 Remove invalid assert 2015-04-09 13:00:58 +10:00
aa24704749 Fix T44235: UNC Path Fails in open.
Here again, stat on '\\MYSERVER\foo\..' does not work...

Anyway, we can handle this in a much much simpler way using
BLI_access and BLI_parent_dir...
2015-04-08 21:59:05 +02:00
114d1b23d2 Fix T44113: Some System Folders do not contain go back arrow.
On windows empty dirs are completely empty - no par or current entries
are listed either, in those cases artificially add those.

Furthermore, stat on UNC paths do not support current/parent 'shortcuts'
(i.e. things like '\\SERVER\foo\bar\..' do not work), so we have to hack
around that mess...

This should ensure us we always do have valid parrent entry...
2015-04-08 21:59:05 +02:00
Dalai Felinto
5d212fb812 Fix T44310: Other render slots cleared after each render 2015-04-08 16:17:56 -03:00
0a304337e1 Freestyle: Fix for AndBP1D and OrBP1D not working due to typos.
Problem report by Folkert de Vries (flokkievids) through personal
communications.  Thanks!
2015-04-09 00:29:07 +09:00
c523e82e31 Particles: Fix for missing particles in render if they're disabled for viewport
The issue was introduced in rB4b685e1 and it appears some crazy area still
accesses particles for render after deleting it's render data, which broke
viewport/render behavior.

This commit restores previous G.is_rendering logic and adds corresponding
checks to cache construction, so counting is all consistent.

Goes to the TODO list to either replace G.is_rendering with eval_ctx or to
make it so psys->renderdata always exists during render sync.
2015-04-08 20:17:44 +05:00
2d05466700 Fix T44213: Bevel object from different scene won't update generated bezier curve geometry
The issue was caused by bevel object being automatically added to the scene graph
by dag_get_node() and had no incoming relations, even form the scene. This confused
scene update flush logic.

Now there'll be a scene relation added to such nodes, so they're always reachable
from the root node.
2015-04-08 20:06:42 +05:00
62f863b78a Fix memory leak in bump GLSL node 2015-04-08 16:48:15 +02:00
7fcb0bf71e Attempt GLSL compile fix in opensuse linux basically, we passed a vec3
as a float.
2015-04-08 16:30:45 +02:00
bf11e362c5 Fix T44046: Cycles speed regression in 2.74 (CPU only)
Issue was caused by MSVC not being able to optimize some code out in the same
way as GCC/Clang does, so now that parts of code are explicitly unfolded in
order to help compilers out.

This makes speed loss much less drastic on my laptop. That's probably as good
as we can do with MSVC without investing infinite amount of time looking trying
to workaround the optimizer.
2015-04-08 18:47:25 +05:00
2c91f9dc11 Transform: use relative motion for vertex slide
Vertex slide was using absolute mouse position unlike all other kinds of transform.

also remove need for allocated 2d projections.
2015-04-08 23:01:38 +10:00
01b1eb445c Math Lib: add project_plane_v3_v3v3
Useful for projecting one vector onto another (as a plane).

This is a rather common operation,
doing inline isn't always obvious whats happening.
2015-04-08 23:01:37 +10:00
d249db9755 Action editor proportional editing:
Fix crash when extending instead of translating
2015-04-08 14:36:25 +02:00
3b440dbf66 FileBrowser previews: Get rid of ugly, stupid and confusing 'FILE_TYPE_ICON_MOVIE' hack.
Was only handling failures in video thumbnails, was confusing (giving two different types
for video files, *sigh*), and... useless, since thumbnail code already handles smartly
failures in preview generation!
2015-04-08 14:31:49 +02:00
c5c60099c5 Proportional editing in action editor: display circle in center of
region.

It's -really- hard getting the center of selection here in the y axis, I
feel this is the best compromise.
2015-04-08 14:31:11 +02:00
40984f6c86 Fix annoying warning in GHOST when ASSERT_ABORT is off 2015-04-08 13:00:46 +02:00
235f1feaf4 Fix opengl render preview in image editor broken
During multiview, invalidation of the display imbuf of the preview image
was eaten by code eating elves.
2015-04-08 12:49:54 +02:00
7621ff7e55 Cycles: Code cleanup, indentation. Was wrong in the multiview commit 2015-04-08 15:35:01 +05:00
bb19c7c3f7 Forgot this last commit. 2015-04-08 12:02:23 +02:00
d6d4d5e094 Fix multiview issue: play animation crashes
We need to avoid passing a NULL string here, and also we need to pass
the correct suffix we used to pass view string directly which is
probably not what we want.
2015-04-08 11:53:14 +02:00
a18e5d6a67 warning: unused 2015-04-08 16:26:58 +10:00
ab2a8832dd Use IS_EQF for floats 2015-04-08 16:20:53 +10:00
Dalai Felinto
60ecc6b3b3 Multiview: Expose current drawn eye to API (viewport only) 2015-04-08 03:12:45 -03:00
45e2366148 Cleanup: remove unused defines 2015-04-08 15:09:20 +10:00
Dalai Felinto
796b17b843 Multiview: Fullscreen modes (sidebyside/topbottom) were not working
* WM_window_is_fullscreen() is not the correct test.
* Also, we no longer change window to fullscreen automatically.
2015-04-08 02:02:59 -03:00
f5648f6db9 BGE : Fix T36285 Wrong viewport scale.
Fix of T36285, I just invalidate projection matrix when a camera switch
to viewport mode, because we need to rewrite the projection matrix in
RenderFrame.
It worked with old blender version because when you use viewport render
one camera is added in the camera list and initialize its projection
matrix for the first time. But when we used several cameras + viewport
for splitscreen we had issues.

Reviewers: dfelinto, hg1, ben2610, lordloki, moguri

Reviewed By: moguri

Projects: #game_rendering, #game_engine

Differential Revision: https://developer.blender.org/D1202
2015-04-08 06:56:17 +02:00
441f68e2b0 Partial fix for T44219
Prevent crashes from out of bounds array access if an invalid rotation mode
is passed to the euler rotation blenlib calculations.
2015-04-08 14:34:07 +12:00
1492db09d1 Partial fixes for issues raised in T44219
* The breakdowner tool will no longer operate directly on properties
  of type "enum", as this doesn't make sense most of the time. This
  is still not much use though when custom properties (ints) are used
  to drive some underlying enum property though (as in blenrig)
* The breakdowner no longer tries to perform any blending if the
  start and end values are the same, to avoid float precision issues.
2015-04-08 14:34:06 +12:00
808ea6271a Cleanup: confusing if statements & alignment 2015-04-08 12:24:52 +10:00
ccfb9a96c3 CMake: resolve linking error on Linux
Since multiview, matrixGlyph failed to link
2015-04-08 11:50:57 +10:00
8c539b0ab5 Font preview for file browser
D1002 by @plasmasolutions, with own refactoring.

Note, needed to do a bad-level call here (IMB -> BLF)
Also can't use the BLF API directly because its not thread-safe.
So keep the function isolated (blf_thumbs.c).
2015-04-08 10:38:19 +10:00
c56c493cf4 BLF: use regular unsigned int's
So GL isnt needed to include BLF types.
2015-04-08 10:30:18 +10:00
a2ea4ce70d Cleanup: IMB/thumb naming 2015-04-08 09:55:02 +10:00
a57b898d17 BLF: Fix clamping drawing into byte buffer 2015-04-08 09:55:01 +10:00
Julian Eisel
7e52d810f3 Muliview: Minor UI-tweaks
* Don't grey multiview options in file browser and in Node Editor Properties out if multi-view is disabled, hide them completely (I think greying out single buttons is fine, but in case of entire blocks we should just hide to save space)
* Move multiview settings in Node Editor Properties above alpha settings to prevent the alpha buttons from appearing above multiview settings if multiview is enabled and Stereo 3D format is chosen (making them appear below is much nicer)
2015-04-08 00:41:37 +02:00
796c3c7748 Fix T44290: Clear users & fake-user conflict
The purpose of clearing users in this case is not to save the data,
so keeping fake-user doesn't make sense.
2015-04-08 06:50:38 +10:00
c89637be30 BGE: use tuple for returning display size 2015-04-08 06:28:05 +10:00
09a746b857 Cycles: Cleanup, typos 2015-04-08 01:15:38 +05:00
Dalai Felinto
cc9c049ff7 Multiview: compositor - avoid trashing image viewer views/buffers when multiview is off
I found this while investigating why the backdrop shows 'blank' while I
update a node influence factor. This problem still persist, but maybe it
was there before multiview. In release it is not noticeable, but in my
debug build is quite evident.
2015-04-07 16:56:31 -03:00
Dalai Felinto
4c2306d21a Multiview: compositor was not updating when multiview was off 2015-04-07 16:38:21 -03:00
c1e5d966c6 Proportional editing support for the action editor.
There are a few things here which are not so nice:

* Position of proportional edit circle is not centered on data
(difficult to predict positions here since those are completely custom,
 will probably be positioned at center of area later instead)

* Result is flushed to curve handles only at the end of the transform,
so if people have the graph editor open they will see handles lagging behind.
2015-04-07 20:49:47 +02:00
Dalai Felinto
662c2cd910 Multiview: update Set Stereo 3D menu when the selected stereo mode changes 2015-04-07 15:43:06 -03:00
858f54f16e Cycles: Cleanup, indentation 2015-04-07 22:41:08 +05:00
e36b0cb8f3 BGE: New API method getDisplayDimensions
This patch adds a new API function to get the actual display dimensions in pixels.

Reviewers: dfelinto, sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Differential Revision: https://developer.blender.org/D648
2015-04-07 18:32:25 +02:00
f9f3c29a3a Fix crash when changing proxy storage type for editing (was own
stupidity casting from Scene to Editing in RNA)

Move versioning for proxy storage to multiview version check (not really
correct but it was orphaned before and it doesn't hurt either).
2015-04-07 16:08:46 +02:00
Julian Eisel
cc78664d50 Revert Sticky Keys (and everything related to that)
Our current keymap doesn't give us enough room to make such changes in
the event system. To fix small issues caused by this, we would need to do
drastic changes in Blender's keymaps and internal handling. It was worth
a try, but it didn't work.

I can write down a more descriptive statement in a few days, but for now
I need a break of this stuff.
2015-04-07 14:13:20 +02:00
d60ff6c112 Fix for own last commit
resolved bug but wasn't correct
2015-04-07 20:27:08 +10:00
34818a44b2 Make image strips also follow the project directory storage options. 2015-04-07 12:15:18 +02:00
20a780e3e8 Fix T44258: Can't select similar regions 2015-04-07 19:56:24 +10:00
4b685e1b90 Fix T44268: Particles: too many virtual parents + non-100 display% = crash
Issue was caused by mismatched logic in counting child/parent particles in
job initialization and actual job execution. Confusion here came from mixed
usage of psys->renderdata and G.is_rendering.

We need to get rid of G.is_rendering and use eval_ctx if it's really needed,
but we also might just use psys->renderdata check since it's expected psys
to have this structure anyway.
2015-04-07 13:52:42 +05:00
98f4106694 Metaball tessellation optimization (Octree to BVH)
Speedup is non-linear, 2x-10x faster is quite normal.
Patch T43678.

- Switched from an Octree to BVH.
- Finding first points of surface no longer "wastes" density function evaluation: every result is cached.
- Use MemArena instead of using own memory management.
- Correct calculation of metaelem bounding box.
- Remove mball_count(): mballs are now counted "on the go".
2015-04-07 13:19:50 +10:00
9510137d12 Cleanup: brace placement /w structs 2015-04-07 11:25:42 +10:00
e2eeb46a1b Cleanup: rename treehash -> outliner_treehash
This is an API specifically for the outliner,
not some generic hierarchical hash structure.
2015-04-07 11:01:47 +10:00
5217d2bc0e Use BKE_edgehash_ensure_p where possible 2015-04-07 10:53:58 +10:00
808de65d91 EdgeHash: ensure function, avoids multiple lookups 2015-04-07 10:53:20 +10:00
1b9f1519bc Cleanup 2015-04-07 08:46:48 +10:00
Julian Eisel
3dcdacffca This commit doesn't deserve a title
Today just wasn't my day...
2015-04-06 23:23:13 +02:00
d3388f0c7a Fix compilation error in Win Debug. 2015-04-06 23:17:18 +02:00
Julian Eisel
bcc9a23548 Various Sticky fixes (tm)
* Revert 776bfa64a5 and c3dad7953a (some X11 systems are doing
stupid things forcing me to do an extra check that completely breaks the
click type handling on other systems using the slightly changed
implementation from those commits - see T44278)
* Fix sample lines in Compositor+VSE

(And yes, this time I tested on both of my systems to make sure
everything is fine)
2015-04-06 23:10:21 +02:00
33a9247334 UI i18n cleanup...
And some general style cleanup as well (line length...).
2015-04-06 22:06:06 +02:00
e2354e64d2 Cycles: Cleanup, spaces around assignment operator
Did some bad spacing in recent commits, better to get rid of those so
they does not confuse those who're working on sources.
2015-04-07 00:25:54 +05:00
c1d8ddacaf Cycles: Avoid doing paranoid checks in filepath of builtin images
Originally we thought it's needed in order to distinguish builtin file from
filename which starts with '@', but the filepath is actually full path there
and it's unlikely to have file system where '@' is a proper root character.

Surprisingly this does not give visible speed differences, but it's still
nice to get rid of redundant check.
2015-04-07 00:11:47 +05:00
7c19239bf9 Cycles: Support bultin 3d textures with OSL backend 2015-04-06 23:29:29 +05:00
2aa79679dc OSX: add also license for iomp5 using cmake and fix all textfiles wrong destination 2015-04-06 19:55:51 +02:00
28e9058e7a OSX: add a license file for libiomp5 ( intel omp ) when compiled with 2015-04-06 19:12:23 +02:00
593b4d84c4 BGE: followup of renaming parameter "other" to "reference"
See commit 3e5332bb95
2015-04-06 18:23:56 +02:00
3e5332bb95 BGE: fixed nomenclature of KX_Scene::addObject and KX_Scene::AddReplicaObject
KX_Scene::addObject: Changed the parameter "other" to "reference", as "other" doesn't mean anything.
KX_Scene::AddReplicaObject: Changed the parameter "parentobject" to "referenceobject", as the parameter did NOT contain a parent object in any way.

Now both functions use the same kind of name for the same thing.

Thanks to panzergame / Porteries Tristan.
2015-04-06 17:11:36 +02:00
d0aae79505 Cycles: More instant feedback on progressive rendering for first sample
Main purpose of this change is to make material preview appearing more
instant after the shader tweaks.
2015-04-06 19:28:25 +05:00
b5f58c1ad9 Cycles: Experiment with making previews more interactive
There were two major problems with the interactivity of material previews:

- Beckmann tables were re-generated on every material tweak.
  This is because preview scene is not set to be persistent, so re-triggering
  the render leads to the full scene re-sync.

- Images could take rather noticeable time to load with OIIO from the disk
  on every tweak.

This patch addressed this two issues in the following way:

- Beckmann tables are now static on CPU memory.

  They're couple of hundred kilobytes only, so wouldn't expect this to be
  an issue. And they're needed for almost every render anyway.

  This actually also makes blackbody table to be static, but it's even smaller
  than beckmann table.

  Not totally happy with this approach, but others seems to complicate things
  quite a bit with all this render engine life time and so..

- For preview rendering all images are considered to be built-in. This means
  instead of OIIO which re-loads images on every re-render they're coming
  from ImBuf cache which is fully manageable from blender side and unused
  images gets freed later.

  This would make it impossible to have mipmapping with OSL for now, but we'll
  be working on that later anyway and don't think mipmaps are really so crucial
  for the material preview.

  This seems to be a better alternative to making preview scene persistent,
  because of much optimal memory control from blender side.

Reviewers: brecht, juicyfruit, campbellbarton, dingto

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1132
2015-04-06 19:22:17 +05:00
Dalai Felinto
36f352a4e4 Fix doversion check - patch by Sergey Sharybin 2015-04-06 11:11:36 -03:00
Dalai Felinto
d5f1b9c222 Multi-View and Stereo 3D
Official Documentation:
http://www.blender.org/manual/render/workflows/multiview.html

Implemented Features
====================
Builtin Stereo Camera
* Convergence Mode
* Interocular Distance
* Convergence Distance
* Pivot Mode

Viewport
* Cameras
* Plane
* Volume

Compositor
* View Switch Node
* Image Node Multi-View OpenEXR support

Sequencer
* Image/Movie Strips 'Use Multiview'

UV/Image Editor
* Option to see Multi-View images in Stereo-3D or its individual images
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

I/O
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

Scene Render Views
* Ability to have an arbitrary number of views in the scene

Missing Bits
============
First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report.

Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report.

Everything else is likely small todos, and may wait until we are sure none of the above is happening.

Apart from that there are those known issues:
* Compositor Image Node poorly working for Multi-View OpenEXR
(this was working prefectly before the 'Use Multi-View' functionality)
* Selecting camera from Multi-View when looking from camera is problematic
* Animation Playback (ctrl+F11) doesn't support stereo formats
* Wrong filepath when trying to play back animated scene
* Viewport Rendering doesn't support Multi-View
* Overscan Rendering
* Fullscreen display modes need to warn the user
* Object copy should be aware of views suffix

Acknowledgments
===============
* Francesco Siddi for the help with the original feature specs and design
* Brecht Van Lommel for the original review of the code and design early on
* Blender Foundation for the Development Fund to support the project wrap up

Final patch reviewers:
* Antony Riakiotakis (psy-fi)
* Campbell Barton (ideasman42)
* Julian Eisel (Severin)
* Sergey Sharybin (nazgul)
* Thomas Dinged (dingto)

Code contributors of the original branch in github:
* Alexey Akishin
* Gabriel Caraballo
2015-04-06 10:40:12 -03:00
74df307ca4 Cycles: Free unused image buffers when rendering with locked interface
It is still possible to free a bit more memory by detecting buildin images
which are not used by shaders, but that's not going to improve memory usage
that much to bother about this now.

Such change brings peak memory usage from 4.1GB to 3.4GB when rendering
01_01_01_D layout scene from the Gooseberry project. Mainly because of
freeing memory used by rather huge environment map in the viewport.

Reviewers: campbellbarton, juicyfruit

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D1215
2015-04-06 17:47:08 +05:00
Julian Eisel
bb2300de94 Fix T44282: Image sampling line disappears after a while
Now even to master
2015-04-06 14:12:05 +02:00
Julian Eisel
883663a0ad Fix T44278: Tab, Z-Key and Spacebar not working
Seems like a fix that is needed for some X11 systems causes this bug on
others :| Not sure if the systems that needed this fix are now still
fine (since I did a slight change to the click type check procedure),
but I need to check that on my system in the institute in a bit.
2015-04-06 13:13:35 +02:00
26e50295ce Use BKE_ghash_ensure_p where possible 2015-04-06 20:41:37 +10:00
dd129125b6 GHash: ensure function, avoids multiple lookups 2015-04-06 20:33:02 +10:00
3639a70eae Fix T44222: Crash using pointiness attribute for volume shaders
This attribute is not really supported for volumes, so it get's converted to
constant 0 at shader compile time.

TODO: We should consider doing the same for tangent attribute in order to save
some annoying checks at tracing time.
2015-04-06 14:11:28 +05:00
a9bb8d8a73 Cycles: de-duplicate fast/approximate erf function calculation
Our own implementation is in fact the same performance as in fast_math from
OpenShadingLanguage, but implementation from fast_math is using explicit madd
function, which increases chance of compiler deciding to use intrinsics.
2015-04-06 12:49:44 +05:00
9f8ffd478e Only show image slot-name in render view 2015-04-06 17:06:37 +10:00
dd3aa1b372 Cleanup: replace confusing 'if' statements 2015-04-06 16:40:26 +10:00
8cc475c40b Fix T43696: Baking tearing normals
Patch D1207 by @chrisr
2015-04-06 15:56:33 +10:00
986972701e Fix T44249: Cursor depth offset 2015-04-06 15:00:07 +10:00
434087981a Fix minor glitch getting depth from mouse cursor 2015-04-06 15:00:07 +10:00
46b42dba14 Fix: Stroke Edit Mode warning for GPencil draws correctly with Region Overlap enabled 2015-04-06 13:21:18 +12:00
5574f4c59d Fix: It was difficult to select control points for NLA Control FCurves in the Graph Editor 2015-04-06 12:19:20 +12:00
7157f3dbce GHash: no reason to use GSetEntry in ghash API 2015-04-06 09:08:10 +10:00
Julian Eisel
c3dad7953a Stickies: Remove redundant fixes
Those fixes aren't needed anymore due to
776bfa64a5
2015-04-05 20:04:37 +02:00
Julian Eisel
776bfa64a5 Stickies: Don't send extra event on KM_CLICK
Just add KM_CLICK to the already sent KM_RELEASE, don't send a new one
for this.

This might help us to get rid of quite some glitches and workarounds \o/
(why didn't this come earlier to my mind? :S)
2015-04-05 19:32:57 +02:00
Julian Eisel
af23e8d44a Fix T44275: CTRL+LMB to extrude to mouse position conflicts with snapped
extruding

More practical description of the bug: extruding with ctrl to use
snapping and confirming the action added another extrusion to the mouse
position.
This was caused from the second event that is now sent if a key release
happens within the click timeout. It triggers the "Extrude to Cursor"
operator since it is called by CTRL+LMB wich is exactly the event that
is sent in this case.

I'm not totally happy with this workaround since it changes the Confirm/
Abort event for all transformation actions to key release which *might*
result in more conflicts (fingers crossed this isn't the case). If this
happens we might need to write some special transformation handling for
extrusion.

This is an example of the difficulties we get from loading too much
functions on the same keys - we need to be careful with that!
2015-04-05 18:52:36 +02:00
ab2d05d958 Fix T44269: Typo in volume_attribute_float:geom_volume.h
Was rather harmless typo since we either pass both dx,dy or pass both NULL.
2015-04-05 19:07:45 +05:00
b06962fcfe Cycles: Avoid using lookup table for Beckmann slopes on GPU
This patch is based on some work done in D788 and re-formulation from Beckmann
implementation in OpenShadingLanguage.

Skipping texture lookup helps a lot on GPUs where it's more expensive to access
texture memory than to do some extra calculation in threads.

CPU code still uses lookup-table based approach since this seems to be still
faster (at least on computers i've got access to).

This change gives about 2% speedup on BMW scene with GTX560TI.
2015-04-05 19:07:45 +05:00
252b36ce77 Cycles: Remove unused Beckmann slope sampling code
It did not preserve stratification too well and lookup-table approach was
working much better. There are now also some more interesting forumlation
from Wenzel and OpenShadingLanguage which should work better than old code.
2015-04-05 19:07:44 +05:00
Julian Eisel
92755da471 Fix T44251 (2nd try): Changing views using numpad broken 2015-04-05 15:41:20 +02:00
29e968a315 BGE: Fix T36703: Character motion actuator local movement not working correct.
The character motion actuator local movement does not taking account of the object rotation.
It is necessary to rotate the motion vector before adding the local movement.

Reviewers: sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Maniphest Tasks: T42709

Differential Revision: https://developer.blender.org/D1206
2015-04-05 10:13:04 +02:00
1a117ad40c Fix T44263: Invalid parameters to fill_vn_fl in deform.c.
Own fault, thanks a bunch to LazyDodo for finding that - and odd
GCC did not warn about it...
2015-04-05 09:50:16 +02:00
a1c2b1a8a8 Fix T44265: Win32 error checking GL version 2015-04-05 09:57:10 +10:00
59bfc5c76e Fix T44270: Similar face region crash /w wire edge 2015-04-05 09:44:30 +10:00
00f732f268 Fix T44266: win32 delete's malloc'd memory 2015-04-05 06:54:34 +10:00
2f42be6995 Cleanup: remove MSVC2008 workaround 2015-04-05 06:54:34 +10:00
26979d45b1 Cleanup: use float math funcs 2015-04-05 06:54:34 +10:00
cedd7cde44 WM: prefer define over zero wmEvent.val 2015-04-05 06:54:34 +10:00
8eac4085be Fix T44264 copy paste error, checking same condition twice. 2015-04-04 22:39:25 +02:00
Julian Eisel
1604a26fe6 Fix T44251: Changing views using numpad broken
For KM_ANY I've filtered out every event that has a click type, although
that was only needed for the additional event sent on KM_HOLD. A bit weird
that this only happened on a few machines though.
2015-04-04 19:17:39 +02:00
Julian Eisel
59df941ea5 Fix T44259: Secondary strokes get terminated early when drawing in Continuous Drawing mode 2015-04-04 14:27:05 +02:00
f5949efb53 Missed in recent cleanup 2015-04-04 18:58:49 +11:00
e84b0e4c35 Ghost: update tests for recent changes 2015-04-04 17:21:18 +11:00
eca22d076c Cleanup: move filelist out of storage
Depends on imbuf, problematic for tests
2015-04-04 17:21:18 +11:00
e5392069cc Cleanup: Typo fix in HSV code. 2015-04-04 07:50:09 +02:00
12cede5ca3 Cleanup: use BKE_ocean_* prefix 2015-04-04 15:19:24 +11:00
7acd69958b Cleanup: use BKE_sculptsession_* prefix 2015-04-04 15:19:21 +11:00
1c96a84320 Cleanup: use BKE_animdata_* prefix 2015-04-04 15:13:56 +11:00
89a3e4deff Cleanup: redundant normalize in expmap_to_quat 2015-04-04 14:45:54 +11:00
519e20f984 Cleanup 2015-04-04 10:48:17 +11:00
92c7632835 Add missing break statements 2015-04-04 10:48:05 +11:00
4a4aaabfa9 CMake: treat inline C files as headers 2015-04-04 10:37:38 +11:00
f9b6709a17 Add missing declarations 2015-04-04 10:37:38 +11:00
53f4aa7817 WIP: Added dedicated operator for unlinking actions from the Action Editor (NLA buttons support to come)
After looking into this more carefully, I've found that we do in fact need a dedicate
operator to add some custom logic when trying to unlink an action from the editor/datablocks.

Specifically, this new operator does the following:
1) When in Tweak Mode, it shouldn't be possible to unlink the active action,
   or else, everything turns to custard.
2) If the Action doesn't have any other users, the user should at least get
   a warning that it is going to get lost.
3) We need a convenient way to exit Tweak Mode from the Action Editor
4) If none of the above apply, we can just unlink normally

This commit implements this for the Action Editor, with stubs for the NLA Editor too.
Those will be fixed next.
2015-04-04 11:37:06 +13:00
34c4133daf Tweaks to descriptions for Action Layer Up/Down 2015-04-04 11:37:05 +13:00
Julian Eisel
a3fdc6b755 Update keyconfigs for stickies
Change are needed to avoid conflicts due to rB53a3850a8a05249942a0c4
2015-04-03 16:44:42 +02:00
Julian Eisel
53a3850a8a Sticky Keys backend
Design task: T42339
Differential Revision: D840
Initial implementation proposal: T41867

Short description:
With this we can distinguish between holding and tabbing a key. Useful
is this if we want to assign to operators to a single shortcut. If two
operators are assigned to one shortcut, we call this a sticky key.

More info is accessible through the design task and the diff.

A few people that were involved with this:
* Sean Olson for stressing me with this burden ;) - It is his enthusiasm
that pushed me forward to get this done
* Campbell and Antony for the code and design review
* Ton for the design review
* All the other people that gave feedback on the patch and helped to
make this possible

A big "Thank You" for you all!
2015-04-03 16:21:22 +02:00
b444887054 Fix T44243: File browser behavior is inconsistent between append and open.
Only basic fix, the whole 'dir' field handling needs rework to correctly support
lib stuff (will be done as part of asset-experiment rewriting work)...

All this code is doing way too much filesystem inspection by itself, instead of
reusing flielist.c work - this is stupid, and will completely break with future
asset engines!
2015-04-03 16:20:18 +02:00
3f30ebf64a Fix related to T44243: do not systematically do live-update when tab-completing textedit buttons.
We now have a specific flag for that, use it! Note that for all 'search menu' buttons,
there is already a similar behavior, so there is no need to force apply butt in this case
anyway, which means in practice this change only has effect in the single place
it is needed currently - file browser dir/file fields.

In this case (dir field), applying button even on partial matches leads code
to ask to create a new dir, which breaks completely the expected behavior of
completion. And we do not need immediate apply at all here.

Note this is the only 'autocomplete' button not using search menu, so this change
does not affect anything else in UI.
2015-04-03 16:20:18 +02:00
03f2e5d4a6 Fix: Drawing glitch when renaming animation channels
When renaming animation channels, the old names are no longer drawn behind the
text boxes anymore. This used to cause problems if the names were long, or
if text boxes were set to have transparent backgrounds.

Thanks to kopias for reporting on IRC.
2015-04-04 01:40:01 +13:00
6ef7e0a194 Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already 2015-04-04 01:40:00 +13:00
b30836dad7 Fix: Action/NLA Tweakmode Checks
Made all action management operators use the AnimData-local flag instead of the scene
global one. Technically, this is more accurate and results in less blocking
situations (i.e. another object may be in tweakmode, but because of that, the active
object's action couldn't be stashed).

The main impetus for this though was that the Action Up/Down feature doesn't clear
the global flag, since it is not in a position to do so (since it can't load up
everything to clear it).

TODO:
I'll need to review how this global flag works and/or potentially ditch it (or
perhaps add some better ways to ensure that it stays valid), since while thinking
this over, I've noticed a few problems here. But, for the meantime, this commit
at least makes things more usable here in the short term.
2015-04-04 01:39:59 +13:00
5681b4fc83 Action Editor: Move up/down buttons to be before the datablock selector
It turned out that the constantly changing width of the datablock selector
made it a pain to use these to quickly toggle between different actions,
as the buttons would keep jumping around, thus leading to errors when
quickly toggling between actions. This way doesn't look quite as great,
but should be more usable.
2015-04-04 01:39:58 +13:00
943b830bf6 Action Layer Up/Down: Fixes for NLA Solo / NLA Muting
Now marking NLA Tracks as Solo'd and muting the NLA stack are linked together
when using the Action Layer Up/Down tools. That is, when switching from a NLA strip
to the active action, if the track was solo'd, then the NLA stack will get muted;
and when switching from the active action to a NLA track, if the stack was muted,
the track will get solo'd. This linkage means that we ensure that when moving up
and down the stack, we can continue to check the actions in isolation without things
messing up when you switch to and from the active action.

Also fixed a bug where this wasn't getting applied when going in the other direction.

TODO:
- When we get the rest/reference track support, we're going to need to insert
  some calls to flush the restpose values so that values from the previously
  used action do not pollute the pose for the new action (if not all the
  same controls get keyed across both). For now, it's best to only do this
  switching from the first frame.
2015-04-04 01:39:56 +13:00
961dac55cf Code Cleanup: Deduplicate logic to switch between NLA Strips/Actions 2015-04-04 01:39:55 +13:00
f350e9f3fc Code Cleanup: Split out duplicate code for finding an available NLA strip above/below 2015-04-04 01:39:54 +13:00
bcf1abbc83 Action Editor: Go to Next/Previous Animation Layer
With this feature, it is now possible to quickly switch between different actions
stacked/stashed on top of each other in the NLA Stack without having to go to the
NLA Editor and doing a tab-select-tab dance, thus saving quite a few clicks. It
was specifically designed with Game Animation / Action Library workflows in mind,
but also helps layered animation workflows.

Usage:
Simply click on the up/down arrow buttons (between the action datablock selector
and the pushdown/stash buttons) to go to the action in the NLA Track above/below
the NLA Strip being whose action is being tweaked in the Action Editor.

Notes:
- These still work when you're not editing the action used by a NLA Strip.
If you're just animating a new action normally, it is possible to use the "down arrow"
to temporarily jump down to the previous action without losing the new action you're
working on, and then use the "up arrow" to get back to it once you're done checking
the other action(s).

- If there are multiple actions/strips on the same layer/track, then only the one
closest to the current frame will be used.
2015-04-04 01:39:53 +13:00
13a63234d6 Fix T44237: translation does not work for input sockets in 'Active node properties' panel. 2015-04-03 12:38:59 +02:00
99d8e08ed9 Fix T44237: translation does not work in spacebar search.
Added translation there, also fixed a stupid bug which was leading most internal
operators to have 'dual' i18n_context (default NULL one and default 'Operator' one).
2015-04-03 12:26:29 +02:00
89530f1486 Fix T44240: Lamp Halo invisible in rendering.
Halo is not possible when using 'deep' buffer shadow - reflect that in UI.
When not using buffered shadows, switch lamp bufftype to 'regular' on render, as already
done with 'halfway' method.
2015-04-03 11:17:58 +02:00
43101289a6 Fix T44183 particles in linked group offset from object
A nice bug combining all the broken features of blender:
Particles, duplis and multiple scene dependencies.

Fortunately this was solvable: Basically, we need to
make sure derivedmesh for dupli instance is generated before
obmat is overriden. This also makes sense, since no instance
has "true" obmat apart from original. Lazy initialization of
derivedmesh just does not work here (or it -does- work but first
use should be before instance drawing).

Fingers crossed nothing else breaks after this...
2015-04-02 17:13:45 +02:00
018dc3aeda Action Editor: Experimental tweak to ordering of buttons
This commit is an experiment exploring the relationship between the action
management buttons (i.e. action selector + pushdown/stash, and soon a few others)
and the filtering stuff (i.e. summary, only selected, etc.)

The old ordering meant that the filtering stuff was consistently in the same
place beside the mode selector, meaning that the order was "common stuff, then
editor specific stuff", this was not that great on smaller windows, where there
important stuff was often out of view.

This new order places greater emphasis on the parts which are likely to be more
important. It also allows us to have a better hierarchy/flow; this is especially
because we'll soon introduce a way to specify which datablock "level" the
action comes from, so going from "level -> action -> filters within action" will
make more sense.
2015-04-03 02:17:45 +13:00
5d4beee8c6 Code Cleanup: Split Action management operator stuff into action_data.c 2015-04-03 02:17:44 +13:00
64fed6841a Cleanup: followup to rBf87d7c605dcfb - use __func__ instead of literal func name in string.
Since we are already using BKE_reportf... This way, no more issue if/when we copy/paste
or rename that!
2015-04-02 14:51:37 +02:00
Dalai Felinto
f87d7c605d Fix error messages for RE_layer_load_from_file() and RE_layer_load_from_file() 2015-04-02 09:08:25 -03:00
77ff544d93 Fix issue reported by copias on irc, shift duplicate and snap crashes in
sequencer.

Missing snap callback case. Quick patch is to use the sequencer specific
operator instead of generic translate. We really need to support proper
snap/snap options at some point though.
2015-04-02 13:47:53 +02:00
ff45930cc5 Cleanup: Make strict flags happy
We might also just remove those arguments perhaps?
2015-04-02 16:01:23 +05:00
fd2ea3a909 Cycles: Make guarded allocator happy about strict C++ flags 2015-04-02 15:51:43 +05:00
f30b60d139 Fix: Crash when using "On Selected Markers" mode for Propogate Pose with no markers present
The function to get a list of markers was not clearing the list before it exited
early, and with no way to tell that the method failed, callers could make the
mistake of trusting that the list was now valid (i.e. either full of marker
frames or empty, vs being invalid)
2015-04-02 23:48:25 +13:00
838c3503a7 Expose the Pose Propagate tool a bit more in the UI
From the various forum threads and the fact that a new addon has cropped up,
it appears that it is not that well known that this tool exists, and that it
can be used solve a very common problem that animators face. Namely:
  When you've gone through blocking out your key poses and then realise
  that you need to adjust parts of the rig which don't change much, this
  tool solves the problem of needing to go through doing grunt-work to
  fix all the other keyframes which now need to change as well.

So, this tool is now available in the following two places (in addition to
the existing Pose -> Propagate menu):
* Toolbar - The "Propagate" button will use the default mode (or the last
            used mode for each subsequent invocation).
            The arrow-button beside this will allow choosing between the different
            modes. (NOTE: The UI team may have different thoughts on this, but,
            let's give this a try for a while first, to see if this sort of thing works)
* Alt-P   - In Pose Mode, this will now bring up a menu allowing you to choose
            which mode is used. Since this sort of thing is something that does
            get run several times in a row when you need it, having this hotkey
            will make it a bit more convenient.
2015-04-02 23:48:24 +13:00
97f6bff45a Propagate Pose: Added 'Selected Keyframes' mode
This commit adds a new mode for the Propagate Pose tool. With this new option,
the Propagate Pose will copy the current pose over to all selected keyframes
after the current frame.

For reference, some of the other/existing options are: to copy it to each subsequent
keyframe with the same value (WHILE_HELD - the default), to the next keyframe,
or to the last keyframe.
2015-04-02 23:48:23 +13:00
f5adbcc3a2 GPencil: Draw status indicator in top-right corner when in Stroke Edit Mode
When in Stroke Edit Mode, an indicator/warning message is now shown in the top-right
corner to make it easier to notice that operations will apply to Grease Pencil
strokes instead.
2015-04-02 23:48:22 +13:00
2cac2e7213 GPencil: H/Shift-H/Alt-H now work to Hide and Reveal Layers in Strokes Edit Mode
* H       = Hide active layer
* Shift-H = Hide non-active layers
* Alt-H   = Show all layers
2015-04-02 23:48:21 +13:00
146be8e258 Fix proportional editing always turned on in graph editor. 2015-04-02 12:34:35 +02:00
2fc69d11c8 Add custom properties to sequence strips 2015-04-02 21:07:23 +11:00
ac2530be8c Cleanup own todo: RE_pipeline is not a bad include from BKE, it's already used in few places 2015-04-02 14:39:58 +05:00
77667ad80f Cleanup 2015-04-02 16:12:33 +11:00
efc7c355b2 Code Cleanup: Pruning back the unusued includes now 2015-04-02 16:33:09 +13:00
26fa13e6f8 Code Cleanup: Reshuffling some of the GPencil code
* Moved the context handling stuff into gpencil_utils.c

* Moved the datablock and layer operators out into their own file too. Again,
  these weren't related to the other stuff that much

* Split the GPencil to Curves operator out into its own file (gpencil_convert.c).
  This was quite a massive blob of code (48kb) that was not that related to the
  other operators still in that file (gpencil_edit.c)
2015-04-02 16:29:33 +13:00
b6d878fa96 Fix for incorrect description 2015-04-02 12:12:35 +13:00
Julian Eisel
4b847595ee Fix T44217: Crash when starting .blend without "Load UI" enabled
Caused by changes in 31e26bb83b. This makes it fall back to the old
method if we can't find a screen.

Patch is actually by @LazyDodo with minor edits by me.
2015-04-02 00:24:58 +02:00
f1494edf78 Cycles: Make SSS intersection closer to regular triangle intersection 2015-04-01 21:20:04 +05:00
394b947a50 Cycles: Remove unused direction from triangle intersection functions
This argument was unused and got nicely optimized out. But once it
starts to be using registers are getting stressed really crazy,
causing slow down of render.
2015-04-01 21:08:12 +05:00
8e6e7010bc Proportional editing for graph editor did not work outside edit mode 2015-04-01 11:24:58 +02:00
af399884e1 Fix T44113: Ashikhmin-Shirley distribution of glossy shader at 0 roughness causes artifacts when background uses MIS
Was a division by zero error, solved in the same way as beckmann/ggx
deals with small roughness values.
2015-04-01 14:21:21 +05:00
71af08e1c9 Fix T44212: Crash on Group Rename.
Nice offset-by-one index error. ;)
2015-04-01 09:48:48 +02:00
f7dbce9914 Real fix for T44127: Python does not guarantee to free all objects on exit...
All kudos to Campbell for the head-up and patch!
2015-04-01 09:34:01 +02:00
6461fbd9ce Fix glitch scaling bone radius
connected parents radius could get out of sync with child.
2015-04-01 17:07:04 +11:00
879f5c832b Match corrective-smooth UI to smooth modifier 2015-04-01 09:29:56 +11:00
c59ca9e477 silence MSVC warning
‘*/‘ found outside of comment
2015-03-31 14:58:41 -04:00
d9c566a2d8 Corrections to submodules: we need to use latest tag available from master branch 2015-03-31 22:10:26 +05:00
f3b45eb76f Fix T43987 ambient occlusion wrong for Intel cards on windows (tested on
HD3000 and HD4000 cards so far).

Similar issue to Radeon 3xxx series but Intels need the opposite factors
for dfdy.
2015-03-31 17:37:17 +02:00
7ee340c0b4 Fix writing freed memory, exiting full view 2015-04-01 02:01:02 +11:00
79918e0577 Cycles: Avoid float/int conversion in few places 2015-03-31 19:52:14 +05:00
7da4c2637d Cycles: Fix typo in distance heuristic for shadow rays
It's not that bad because this typo could only caused not really
efficient BVH traversal, causing higher render times. Not as if
it was causing render artifacts.
2015-03-31 19:52:14 +05:00
66a028a576 Proportional editing for IPO editor - version ready for feedback by artists.
This works by using the distance in the x axis only (usually artists want to influence nearby
keyframes based on timing, not value). Tweaking handles is the same as tweaking
the central handle. It's a bit ambiguous if proportional editing is really meaningful
for handles but will leave that for artists to decide.
2015-03-31 16:45:30 +02:00
41f9cdc955 Point master's submodules to v2.74 tag as well 2015-03-31 18:57:17 +05:00
b98c7bcf3a Fix T44077 material update fails in textured mode when VBOs are off.
The issue has been here since we changed drawing code for meshes to use
vertex arrays instead of immediate mode when VBO was off. Basically we
should now always invalidate the GPU objects regardless of the VBO
setting in the preferences.

The bug has been there since 2.73 at least, but what made it apparent
now is that new version resets preferences and as an extension the VBO
flag.

Should be included in final 2.74 release
2015-03-31 11:42:39 +02:00
4153ff3610 Fix T44201: Crash Deleting Hierarchy in Outliner
Typical error using '->next' member of a freed linked list item. A bit trickier
even here, since we have some recursion...

Trivial fix for nasty crasher, safe for 2.74 imho?
2015-03-31 08:36:48 +02:00
c16a8983ef Corrective Smooth Modifier (aka delta-mush)
This modifier can be used to correct bad deformations,

Original patch D1183 by @sazerac, with own modifications
2015-03-31 10:20:11 +11:00
660173ed72 BGE: Fix: VehicleWrapper compiler warning.
The return type of raise_exc_wheel() is bool, but the method return -1. The compiler will change the return type type to an int. This can cause some problems on 64bit systems.

Reviewers: lordloki, sybren

Reviewed By: lordloki, sybren

Differential Revision: https://developer.blender.org/D1204
2015-03-30 22:47:46 +02:00
dd0604c606 Fix T44193: Hair intersection with duplis causes flickering
It was an issue with what bounds to use for BVH node during construction.

Also corrected case when there are all 4 primitive types in the range and
also there're objects in the same range.
2015-03-31 00:24:43 +05:00
9b4172cc6c Fix T43266, when we have a blendfile name use only that without the pid
for autosave. Will save Windows users from polluting their tmp folders
too much.
2015-03-30 19:21:38 +02:00
050f28f03f Remove wrong back jump detection on looping 2015-03-30 18:27:28 +02:00
bacdfc70e2 Fix T41191: Custom Loop Normals Viewport shading not updating when set from py script
Missing update tagging...

Safe for 2.74.
2015-03-30 15:04:42 +02:00
c6ce8200dd Attempt to fix T44056, dof high quality shader error in ATI cards.
ATI driver does not like declaration of gl_FragColor and glFragData in
the same source file (even though only one of the two is ever
referenced), just use one of the two.
2015-03-30 14:45:14 +02:00
79a68617b3 Pass bool arg to RNA_property_boolean_set 2015-03-30 23:31:42 +11:00
590efaacb8 Potential fix for T43987, ambient occlusion different between offscreen
and on screen rendering.

Aaaaah, the beauty of driver implementations of OpenGL!

Turns out the problem here is that drivers calculate df/dy differently
in some cases (probably because OpenGL counts y reverse to how the
window system does, so drivers can get confused).

Fixed this for the ATI case based on info we have so far, there's also
the Intel case which will be handled separately (missing info on Intel's
renderer string etc).

Unfortunately we can't really fix this for the general case so we'll
have to haldle cases as they come in our tracker and by adding silly
string comparisons in our GPU initialization module <sigh>.
2015-03-30 14:14:52 +02:00
4aeb34dc82 Cleanup: use const for typeinfo 2015-03-30 22:15:06 +11:00
98cbde91d2 Fix compilation of game engine in ubuntu 2015-03-30 13:06:54 +02:00
bfe63bbfc4 Grey out high quality depth of field when it's not supported by GPU 2015-03-30 12:49:05 +02:00
01e0062b4c missed last commit 2015-03-30 21:25:28 +11:00
268524c025 Cleanup: use const for typeinfo 2015-03-30 21:18:49 +11:00
b663f1f1cf Cycles: Correction to previous commit: non-msvc compilers also should use nullptr 2015-03-30 15:17:09 +05:00
131912dc73 Cycles: Fix compilation error with MSVC after recent C++11 changes 2015-03-30 15:06:45 +05:00
09397ac2c1 Fix for invalid buffer access on zero-face meshes 2015-03-30 20:50:23 +11:00
afbc45ed93 Cycles: Attempt to fix osl+scons compilation
Defines (and other cflags) are not inherited by scons to the subdirectories,
need to take care of them in all nested SConscripts.
2015-03-30 14:00:03 +05:00
1b327aa219 Fix T44186: Bezier Bevel facto mapping broken when 'start' was set to 'Resolution' and 'end' was not.
Trivial, we need totla_length in that case too.

Safe to be backported to 2.74.
2015-03-30 10:24:26 +02:00
59740a6c98 SCons: cudakernels now depends on some configuration tests 2015-03-30 13:11:08 +05:00
23c0e46a00 Buildbot: Use Clang with OpenMP support for 64bit OSX builds
This should make such areas as simulations and sculpting nicely threaded.

32bit will be tried to be supported later.
2015-03-30 13:05:14 +05:00
786763ca4c remove zero translations
within draw_emtpy_*
These are no-ops.

Also const-ified some variables there.
2015-03-30 02:53:39 -04:00
e47a96463d cleanup: remove unused code & vars 2015-03-30 01:25:34 -04:00
8d1dc22bec cleanup: typos in comments, style
no functional changes
2015-03-30 00:51:00 -04:00
dea0e3833f Remove use_invert_vertex_group use_ prefix
To match other modifiers.
2015-03-30 10:46:53 +11:00
ab9d903b99 Cleanup: single quotes for enums 2015-03-30 10:46:53 +11:00
3204aff6d0 Fix compilation of cycles network server when logging is enabled 2015-03-29 22:22:53 +02:00
f01456aaa4 Optionally use c++11 stuff instead of boost in cycles where possible. We do and continue to depend on boost though
Reviewers: dingto, sergey

Reviewed By: sergey

Subscribers: #cycles

Differential Revision: https://developer.blender.org/D1185
2015-03-29 22:12:40 +02:00
70d9c01325 Fix T44162: Outliner: modifier's icons toggle update issue
Use same notifier for button callback as the one used in matching outliner operator...
2015-03-29 13:14:59 +02:00
47c1112e6e Make internal functions of point density independent from Render 2015-03-29 02:34:44 +05:00
94b0193196 Make point density sampling functions a bit easier for re-use
Still not ideal but getting closer. Main annoying thing so far is
dependency of Render structure for now. It is used to switch particles
to render mode and could probably also be eliminated.
2015-03-29 02:14:06 +05:00
b25c208d5b Code cleanup: whitespace, line wrapping 2015-03-28 23:50:36 +05:00
2c5ba41413 Code cleanup: Get rid of set but unused matrix 2015-03-28 23:40:56 +05:00
44a4b90b4f Fix collada compile after BKE cleanup 2015-03-28 18:17:54 +01:00
b1d758ae6b Cleanup: redundant struct declarations 2015-03-29 03:56:39 +11:00
8a183aa26b Cleanup: use BKE_texture_ prefix 2015-03-29 03:16:55 +11:00
8c1c2b40a2 Use union for EditBone's
Avoids complicated casts accessing as int
2015-03-29 01:30:44 +11:00
fcc086a92b Cleanup: unused args 2015-03-29 01:26:09 +11:00
7a1e7295a5 NLA Strip Keyframes: Nullified the risk that NLA mapping can get applied to NLA Curves 2015-03-29 03:03:05 +13:00
b253be1a19 Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves) 2015-03-29 02:45:24 +13:00
0c5d0422b4 NLA Strip Keyframes: Insert keyframe tools in Anim Editors work now
* Insert Keyframe tool for Dopesheet/Graph Editors needed to be modified to
  not try to resolve the paths for NLA Control Curves
* For now, the poll callback to get the "Active FCurve" also works when given
  a NLA control curve. They're really the same in most cases, and this should
  be fine until one of the channels does something funky.
2015-03-29 02:20:57 +13:00
0ffd7f721e Nla Strip Keyframes: Sliders in channel list insert keyframes now 2015-03-29 01:39:59 +13:00
34209b59b8 Nla Strip Curves: This works with anim channel rearranging tools now 2015-03-29 01:39:58 +13:00
182e84da88 Nla Strip Curves: Getting more stuff working
* Clicking anywhere on the expander collapses it (like for the gpencil one)
* Deleting these curves works now (but has the side effect of turning off
  the animated influence/time options too, as it is assumed that when those
  are enabled there is a corresponding fcurve)
2015-03-29 01:39:57 +13:00
67f983ac53 Nla Strip Controls: Added special FCurve type (in the animfiltering code)
Using the standard "FCurve" animchannel type didn't work that well for
the control FCurves on NLA Strips, as the paths would not resolve correctly,
and the indentation was wrong. Also, there would likely be issues down the
track with applying NLA mapping. Hence, it's easier to just create a separate
type for this case, and adapt the rest of the code to also consider these (todo).
2015-03-29 01:39:56 +13:00
8f4c5ff0ec Nla Strip Controls: Added dedicated "Expander" channel to Action/Graph Editors
The "Nla Strip Controls" channel is used to house the per-strip
FCurves for controlling the strip_time and influence properties.
It sits above the active action's first group, at the same level
in the hierarchy as other groups.

TODO: It looks like a dedicated FCurve channel is needed for these
control FCurves, so that we won't accidentally apply NLA mapping
or have these FCurves disabled by the path lookups failing.
2015-03-29 01:39:55 +13:00
6dac874d68 Fix for various small issues which may cause crashes 2015-03-29 01:39:54 +13:00
da0d0b2f20 Compile fix
New parameter added by these fixes did not exist when this call got added
2015-03-29 01:39:53 +13:00
90e9a22eaa Fix for earlier commit - Turning off "animated" influence/time didn't work
Reshuffled order that in which NLA Strip's F-Curves vs its automatic settings are
evaluated so that the automatic settings can always override the custom settings,
since it's not that easy to get things working correctly the other way around.
2015-03-29 01:39:53 +13:00
fc0a576c30 Keyframes on NLA-Strip F-Curves are detected by RNA buttons too 2015-03-29 01:39:52 +13:00
59b2316e82 Code Cleanup / Preemptive Bug Fixing: "action" parameter may get set when it shouldn't be
Logically, it makes sense that this parameter only gets used to describe the action
that the F-Curve actually belongs to (if it belongs to one). Otherwise, it should not
be set at all.
2015-03-29 01:39:51 +13:00
2b4ff142ab Fix T36385: Animated Strip-Time doesnt update
This commit implements proper evaluation + keyframing support for animating influence
and time on NLA Strips (among other properties) by resolving a few long standing issues
which prevented the original design for this from working.

The original design for animating these properties (and/or some of the other settings
on NLA Strips) is that NLA Strips actually have some of their own F-Curves that are
used for animating settings which will affect how they are evaluated. As seen in this
bug report, the alternative of having these animated as part of the stack (which the
strips work above/outside/on-top of) means that glitches can occur.

Although one of the original considerations for why this wasn't implemented earlier
was that introducing keyframes there isn't so clean cut, and causes UI design issues
for how we expose these via the animation editors for editing (NOTE: support for that
is still to come). Another concern is that this sets a precedent for how FModifiers
might get evaluated.
2015-03-29 01:39:50 +13:00
1a5c5ac742 Fix T44068: "Layered" option for auto keyframing doesn't "Insert Available Only" is enabled
The "Layered" option for auto keyframing will create a new NLA strip if playback
reaches the end of the frame range and jumps back again. The idea is that instead
of overwriting the keyframes you've already made, it will make a new animation
layer. However, this does not work with the "Insert Available Only" option
(which can either be set in the User Prefs, or in the active keyingset), as that
option needs some existing FCurves to tell what it can insert keyframes into.

The "fix" here is to simply not show the offending button in situations where it
cannot be used!
2015-03-28 23:48:10 +13:00
b7afbaf8cc Bugfix: Fix for crash when trying to create new action in Shape Key DopeSheet mode
When the active object had no shapekey data, trying to create a new action from the
Shape Keys mode of the DopeSheet would crash. The segfault here was a silly regression
caused by my earlier Action Stashing work.

However, the old (pre-Action Stashing) code here also wasn't that great either.
While it didn't crash, it would still silently create a new action, even if that
could not get assigned/used anywhere. To prevent both of these problems from
happening again, I've added additional null checks, as well as beefing up the poll
callback here to forbid keyframing
2015-03-28 23:23:23 +13:00
469ba8a30a Tracking: Code cleanup, missing break statements 2015-03-28 00:46:59 +05:00
5498629906 Freestyle: Code cleanup, silence warning in release mode 2015-03-28 00:34:16 +05:00
e1bcc2d779 Cycles: Code cleanyp, sky model
For as long as code stays in official folders it should follow
our code style.
2015-03-28 00:28:37 +05:00
5ff132182d Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.

Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
2015-03-28 00:15:15 +05:00
6f43e1dfef Cleanup: win32 mixed declare/statements in main()
Make it a more clear where declarations end
(ifdef's all over made it a bit confusing).
2015-03-28 04:12:12 +11:00
59b578e320 Cleanup: use const char for stats arg 2015-03-28 04:12:12 +11:00
3d305b5a37 Cycles: Code cleanup, make strict flags happy about disabled OSL 2015-03-27 19:10:36 +05:00
d18e8ad1f3 Cleanup: view3d headers 2015-03-28 01:05:50 +11:00
267904dd3c Cleanup: gpencil headers 2015-03-28 01:05:50 +11:00
7cbb659400 Use squared dist /w comparisons (mask, edge-slide) 2015-03-28 01:05:49 +11:00
7b7eac9211 Add profiling prints for audio synch to detect how continuous our frame
progression is
2015-03-27 15:00:13 +01:00
74e8e14cce Makesrna: Fix function prototypes for struct used RNA_def_struct_sdna_from
Previously makesrna would have generated code expecting DNA structure from
RNA_def_struct_sdna_from() to be passed to it. This was wrong because actual
PointerRNA points to a "parent" structure, making it impossible to add
functions to certain RNA structures.

It so far never needed and we didn't notice this issue, but it's needed for
some ongoing development now.
2015-03-27 18:44:11 +05:00
1c2f1ff725 Compositor: Cleanup, remove unused need_sync parameter 2015-03-27 18:23:32 +05:00
d84cc6a18f Compositor: Followup to previous stats commit
No need to mark tree for localization, it was never done and
it all just worked. We can save some CPU ticks by skipping doing
this.
2015-03-27 18:23:32 +05:00
da170d9dc3 Compositor: Fix heap overflow when copying previews 2015-03-27 18:23:32 +05:00
8af5390968 Fix T44149: Compositing : Node Groups do not work correctly
Input constants are to be connected before removing proxies,
otherwise node groups might give totally different result.

This is a regression and to be put into final release.
2015-03-27 18:23:32 +05:00
3366b30bf1 Compositor: Code cleanup, debug mode is now fine with strict flags 2015-03-27 18:23:32 +05:00
6cd82dbf57 CMake: Enable strict flags for C++ 2015-03-27 18:23:31 +05:00
061e73a270 Physics: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
052ebd6564 C++ RNA API: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
4393b60579 ImBuf: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
13358d049e Freestyle: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
2ada3512a2 Compositor: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
585dd26120 Cycles: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
232c2d382e Dualcon: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
3f4219a694 OpenColorIO: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
90f645855a GHost: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
38c4645f0a rename BGE attr from D1091 (match methods) 2015-03-27 22:23:19 +11:00
34c92848a7 Use preview option to detect frame range for filename when using ctrl
F11.
2015-03-27 11:39:09 +01:00
e7afba4b29 Compositor: Cleanup, don't pollute namepace with all symbols from std 2015-03-27 14:41:20 +05:00
408a2a8420 Compositor: Improve reports to the interface about what's going on
The functionality was got lost when new compositor system was landed
and it wasn't always clear what's causing the hicucps. Now it's nicely
reported to the stats line.
2015-03-27 14:38:02 +05:00
a12b2ec66d BGE: New isDynamicSuspended python attribute
This is a new KX_GameObject attribute that it increments the
possibilities of optimization during the game

Additionally the unused m_bSuspendDynamics variable is removed.

Reviewers: moguri, agoose77, lordloki

Reviewed By: agoose77, lordloki

Subscribers: agoose77, lordloki

Differential Revision: https://developer.blender.org/D1091
2015-03-27 06:11:23 +01:00
Severin
c8f95cbb60 Only enable IME for supported translation contexts
For me, weird characters are drawn if IME is enabled but translation
is not set to a supported language.
Could become an utility function if needed later.
2015-03-26 22:16:00 +01:00
Severin
065e5896c4 IME: Minor API cleanup 2015-03-26 21:24:01 +01:00
Severin
6e72f06069 Fix duplicated IME input
AFAIK a few IMEs were affected by this so I guess we can now add a
few more IMEs to the "officially supported" list.

Patch by @randon (thanks again!), minor edits by me.
2015-03-26 21:16:43 +01:00
d26c18c05e Project directory proxies:
Use BL_proxy if directory is blank to avoid filling the whole folder
with files.
2015-03-26 18:25:25 +01:00
4c7876c740 New option proxy placement, project directory.
There are two per-editor settings now, the Per-Strip setting (default)
and the Project setting.

The per strip setting basically uses the previous, per-strip options for
storing the proxies.
The project setting though will use a specified directory for -all-
proxies, or the blend file directory if no directory is given.
2015-03-26 17:54:16 +01:00
d084967627 Revert "Change Enables proxy operator to Copy proxy operator."
This reverts commit ec03ab021f.

Changing this since it looks like Mattieu does not really like the change.
Will be adding another way to tweak the directories
2015-03-26 15:44:51 +01:00
c0ef4e9b78 Fix T44122, rendering OpenGL preview movie with audio has wrong audio
range and extra frames.

Issue here is that the movie backend would unconditionally use the start
frame of the scene instead of the preview frame. Solved by passing an
explicit "preview" argument.

Strictly speaking, the preview argument is part of the renderdata
struct, that is also passed to the code, but when rendering the final
result we want to unconditionally render the full range regardless of
the preview setting of the render structure.

However, OpenGL rendering does use the preview range so we need to
account for that when making those exports.

This is also a nice chance to correct the filenames, which still used
the full range.
2015-03-26 14:50:18 +01:00
f80064f2d2 Fix compiling after sound changes 2015-03-26 13:19:33 +01:00
59132e6481 Fix building with audaspace disabled after 828c85a 2015-03-26 16:33:20 +05:00
dc3b869c9a Missed those last commit 2015-03-26 11:39:08 +01:00
828c85a1bf sound module: Append functions with BKE (makes it easier to make them
out from local functions)
2015-03-26 11:35:41 +01:00
d97b97460c Fix T44138: Crash in DataTransfer modifier when selecting a source with no loops.
Simply check and early return in case we have no source or destination items
(verts/edges/loops/polys) available...

Also, fix an assert in `BKE_mesh_calc_normals_poly()`, when called with no poly.
2015-03-26 09:20:37 +01:00
b87eaef1f7 Fix T44137: bpy.path.is_subdir fails
`bpy.path.is_subdir("/abc/def/ghi","/abc/de")` incorrectly returned True
2015-03-26 16:32:16 +11:00
770b109deb Fix: AUD_OpenALDevice::getPosition returns negative values
Reported by Antony Riakiotakis. The problem was the seeking code.
2015-03-26 14:45:21 +13:00
Julian Eisel
92f305a490 A more forward thinking version of previous commit
Basically same as 581afa9da3, but I guess we can assume that scopes added in future
to the image preview may also want to use the viewrect from the original ibuf.
2015-03-25 22:15:56 +01:00
Julian Eisel
581afa9da3 Fix T44121: VSE Preview scaling issue when using proxies and Show Overexposed 2015-03-25 21:52:54 +01:00
4dc141f933 Yet another fix for crashing particles. 2015-03-25 20:09:02 +01:00
5e2cc06518 minor cleanup: alignment 2015-03-25 14:29:08 -04:00
d4ac58d049 Fix T43694, by Krzysztof Rećko (chrisr), reviewed in D1177.
Added some guards to prevent clumping to non existing particles. Also, adjusted threaded child path evaluation, so each child is evaluated once - previously virtual parents were done twice.
2015-03-25 18:34:52 +01:00
9fc1a29de3 Fix 2 typos ( shakin' hands ) 2015-03-25 16:56:51 +01:00
4fd2f678ea Fix T44133 SSAO in OpenGL rendering from orthographic camera did not
work

Safe to include in final release
2015-03-25 15:05:36 +01:00
1a866d55ac Fix crash with computers not supporting high quality depth of field. 2015-03-25 14:43:28 +01:00
1c329af74c Fix T44026: ID prop delete leaves names in _RNA_UI 2015-03-26 00:12:28 +11:00
0ef9f61410 Attempt to fix an error in compilation of geometry shaders in Intel 4000
cards (see T44072)
2015-03-25 13:05:52 +01:00
7bc8ddc6e2 use BKE_mball_tessellate.h include
also remove unused includes
2015-03-25 22:40:09 +11:00
3d20bf75cb BKE_mball: split tessellation into its own file
this has a lot of its own local structs, functions,
better to keep isolated from general metaball selection/library logic.
2015-03-25 22:40:09 +11:00
ec03ab021f Change Enables proxy operator to Copy proxy operator.
Allows to change and copy settings much easier, also allows things like
directory settings etc to be copied over.
2015-03-25 12:36:43 +01:00
8463e6cb41 Fix for crash when using particle emission with clump/roughness curves
in a smoke sim.

This interaction between sims is totally stupid and must be recoded
entirely in some utopian future.
2015-03-25 12:29:22 +01:00
a180c8e2ed Allow multiple strips to use the same directory when custom proxy
directory is used.

This is done by appending the name of the file as extra folder. Existing
projects may need to regenerate their proxies but it should be possible
now to have all proxies nicely in the same custom folder.

Next commits will include operators to copy directory settings between
selected strips, making the process faster.
2015-03-25 12:05:34 +01:00
22dfb50622 Fix T44128: Ray visibility only enables diffuse if glossy is also enabled
Issue was caused by accident in c8a9a56 which not only disabled glossy
reflection if Glossy visibility is disabled, but also Diffuse reflection.

Quite safe and should go to final release branch.
2015-03-25 14:53:20 +05:00
3cee9d6939 Simplify recent commit 2015-03-25 20:29:38 +11:00
b38b5846ba Fix T44124: Crash deleting brush 2015-03-25 20:16:27 +11:00
3eb33b804d Fix T44118: Rotated background image disappears
Image clipping didn't take rotation into account.
2015-03-25 19:49:14 +11:00
8d0b104f43 Fix T44064: Reroute two-node loop crash
Issue was caused by cycles in shader graph confusing it's
simplification stage. Now we're ignoring links which are
marked as invalid from blender side so we don't run into
such cycles and keep graph code simple.
2015-03-25 13:46:59 +05:00
917b8754f9 Tracking: Fix one frame memory leak when tracking last frame 2015-03-25 13:20:37 +05:00
87cff57207 Fix T44123: Cycles SSS renders black in recent builds
Issue was introduced in 01ee21f where i didn't notice *_setup()
function only doing partial initialization, and some of parameters
are expected to be initialized by callee function.

This was hitting only some setups, so tests with benchmark scenes
didn't unleash issues. Now it should all be fine.

This is to go to the 2.74 branch and we actually might re-AHOY.
2015-03-25 02:33:49 +05:00
41ed59e0eb Minor UI message fix. 2015-03-24 21:36:26 +01:00
Julian Eisel
2ba82d5729 Cleanup: Remove unwanted debug printf from 7293f6d486
Sergey said this kindof cleanup is good for commit ratio... noted! ;)
2015-03-24 15:54:02 +01:00
Julian Eisel
f98b84072e Remove redundant shortcuts from keyconfigs
These have been deleted recently (cd54f07a3c, fbd4dfb2c, 3f68a0aea)
2015-03-24 15:52:14 +01:00
fa09e152af Code cleanup: r_ prefix vs. _r suffix 2015-03-24 19:20:51 +05:00
Julian Eisel
b714b23443 Fix T44092: Maya preset doesn't allow attaching Nodes to Frames via D&D 2015-03-24 14:15:03 +01:00
7293f6d486 Cleanup - move proxy storage options to the proxy itself - also will
enable more storage options, since seq->flag is running out of space
2015-03-24 12:24:54 +01:00
765fd7044b Updating python API documentation for function bge.render.makeScreenshot 2015-03-24 10:17:55 +00:00
4685092fd8 Fix T44102: Mirrored objects render black with Blender Internal and Autosmooth.
Normals are not vertices, we cannot apply matrix's scale to them...
2015-03-24 11:03:05 +01:00
0f0e080a26 Fix T44110: Plane track doesn't work when built with scons
For some reason recent change in avoiding non-aligned eigen vectors
was behaving differently for cmake and scons. Made it a bit different
now by storing scalars. This is more robust approach anyway, because
it's not really guaranteed Mat.col() gives a pointer inside data,
depending on column-major vs. row-major storage.

This is to be backported to 2.74 branch.
2015-03-24 14:05:49 +05:00
cf365275c2 Fix T44089: All addons do not use same default for orientations.
Transformed 'OrientationHelper' class into 'orientation_helper_factory' function,
which returns an OrientationHelper customized class with specified default axes.
2015-03-24 09:57:11 +01:00
3030e2d1cb CMake: tweak recent py module changes
support installing portable builds to CMAKE_INSTALL_PREFIX
2015-03-24 19:09:51 +11:00
4560570f8a Fix for building blender as a Python module
Installation didn't work on debian distro's
now install into PYTHON_SITE_PACKAGES (which is detected and can be configured).
2015-03-24 17:06:12 +11:00
3bb7e14618 UI: remove UI_BTYPE_SEARCH_MENU_UNLINK
Internal change only,
use UI_BTYPE_SEARCH_MENU with an unlink flag instead.

They are really the same button type, one just happens to have the option to unlink.
2015-03-24 15:09:58 +11:00
a93f346ff4 Cleanup: unused function 2015-03-24 15:09:58 +11:00
22e222563a Blender world value viewport update
This patch will update the 3D viewport if a word value has changed.

This patch does not depends on an other patch, but should applied after https://developer.blender.org/D151 otherwise the the word value viewport update is be slow.

Reviewers: brecht

Reviewed By: brecht

Subscribers: thelasthope, darkxiv

Differential Revision: https://developer.blender.org/D159
2015-03-24 00:31:31 +01:00
ee57968461 BGE: Remove old world bge.render API
This patch can be used to remove the old world bge.render API if the new world API D157 is used.

If  the new world API is applied we can remove the old API because the old has newer worked.
The patch keep the two old working methods for backward compatibility.

Reviewers: campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: brecht

Differential Revision: https://developer.blender.org/D158
2015-03-24 00:27:45 +01:00
fd22a92939 BGE: Add new world API KX_WorldInfo (KX_Scene)
This Patch will add a the world API (mist, background, ambient)  to KX_WorldInfo.
The new API uses now attributes.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Subscribers: klauser, brecht

Differential Revision: https://developer.blender.org/D157
2015-03-24 00:23:40 +01:00
6c9502a6c1 BGE: Remove BlenderWorldInfo
This patch will remove the BlenderWorldInfo and move the source into KX_WorldInfo.

Reviewers: brecht, moguri

Reviewed By: brecht, moguri

Differential Revision: https://developer.blender.org/D156
2015-03-24 00:19:15 +01:00
ce40fb9ab2 BGE: World color management fix
This patch will fix the color management for the mist and global ambient color.
It will remove the old "Color Management" switch in the BGE "Render > Shading" panel and will use the "Display Device" setting in the "Scene > Color Management" panel instead.

Reviewers: moguri, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D154
2015-03-23 23:56:46 +01:00
931c3e6544 BGE: Code clean up for world (mist, background, ambient)
Code clean up for BGE world mist, background and global ambient color.
Move mist render update to BlenderWolrdInfo

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D152
2015-03-23 22:49:38 +01:00
c73693d4a5 BGE: Fix T43592: World GLSL
This patch will fix the world GLSL (mist, background, ambient) update for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D151
2015-03-23 22:32:49 +01:00
da5fb82a63 CMake: readme.html version trick broke packages 2015-03-24 07:49:17 +11:00
0737f59f62 tweaks to packman build
remove --asroot arg to makepkg
2015-03-24 07:49:17 +11:00
e7ae96ad41 BGE: Fix T27322: World F-Curve
This patch fixes the world (mist, background, ambient) F-Curve for  for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D150
2015-03-23 21:43:42 +01:00
d07c666a0e BGE: Add setMistType and setMistIntensity API.
This patch adds the missing setMistType() and setMistIntensity() to the API

Reviewers: campbellbarton, brecht, moguri

Reviewed By: campbellbarton, brecht, moguri

Subscribers: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D149
2015-03-23 21:40:11 +01:00
2affbb437b BGE: Multitexture world (mist, ambient) fix
This patch fix the existing word API for mist and global ambient lighting.
Add deprecated message to disableMist()
Add setUseMist(enable).

Reviewers: dfelinto, campbellbarton, moguri

Reviewed By: moguri

Subscribers: solarlune, jta, brecht

Projects: #bf_blender:_next

Differential Revision: https://developer.blender.org/D148
2015-03-23 21:36:08 +01:00
38321faa8d cleanup: use spaces for alignment
while studying GPU lib
2015-03-23 15:40:44 -04:00
722ddaaccd Remove 'lorem ipsum' operator
its a very specific function, and not hard to paste body text from elsewhere.
We can make an addon if its important to some users.
2015-03-24 06:17:30 +11:00
6af89c9913 compile fix 2015-03-23 15:04:11 -04:00
1bee77b77a Disable high quality depth of field for GPUs that don't support it,
system will fall back to low quality depth of field.

Also add check in case some of the errors are caused by crappy
framebuffer object support.
2015-03-23 19:24:01 +01:00
ddf58004c4 BGE: LoD Hysteresis clean up
Move scene hysteresis value to KX_Scene where it should be (instead of
KX_GameObject)
2015-03-23 19:03:56 +01:00
f65e3c7f1b Fix T44076, SSAO in solid mode will disable antialiasing in wireframe
mode.

Yes it will, because those modes stay active. So on user side, expose
depth of field option always (I don't see why not), but disable SSAO in
wireframe/bounding box mode. It is a known limitation that compositing
does not support antialiasing yet, but better give users some more
control.

This could be included in final release but it's not that serious
either.
2015-03-23 18:54:56 +01:00
1b71279adc Versioning code to correct socket naming after
340b76b42c

Reported by formerly Old_Demon on blenderartists.

Apparently this caused old files to lose their links to material sockets
(noob own mistake from inexperience with node system).

This should either be included in release with version checking being
set to version 2.73 and subversion 10, without tweaking the
BKE_blender.h file

OR

340b76b42c should be reverted for this
release.

Thanks to Lukas for checking this out.
2015-03-23 18:37:50 +01:00
b13770215c Use linear filtering for final pass of high quality depth of field, no
need to get nearest point anymore.
2015-03-23 17:07:21 +01:00
f5c33a2d48 Shader errors:
Count line from beginning of the whole shader source instead of each
string sepatately since it helps with finding out the error line in most
tested platforms
2015-03-23 15:20:12 +01:00
e8b6d86f95 Fix T44093: Color picker SV+H order wrong.
Based on HSV ordering, SV+H had S<>V swapped.
2015-03-24 00:18:57 +11:00
befaf86a99 Allow bg-image rotation for camera views 2015-03-24 00:03:51 +11:00
b8a6cd0140 Cleanup: comments, style 2015-03-23 22:52:33 +11:00
c48ebb44ae Tidy up the user interface for depth of field based on feedback by
NudelZ on irc, thanks!
2015-03-23 12:48:19 +01:00
fd2b4a74c8 Use same rgb -> greyscale for BLI_math as imbuf 2015-03-23 22:26:00 +11:00
3c21885ec4 Change coefficients to 4 digit precision only.
Need to match convention and sum up to 1.0 (previous set had a minor
10^(-10) overflow) Thanks to Campbell for taking notice.
2015-03-23 12:18:42 +01:00
0884c174b3 Make sure matcap icons are within range.
Basically out of range could happen when opening files made in 2.72 when
the new icons for texture painting were added. Apparently some more
caution is needed here.
2015-03-23 12:00:34 +01:00
c451dba550 Mitigate T44035: Proportional editing lag
Calculating connected data can be slow,
it still lags with heavy meshes but perform some optimizations (nearly twice as fast)
2015-03-23 20:03:14 +11:00
ed7e593a4b Fix T43926: Volume scatter: intersecting objects GPU rendering artifacts
Fix T44007: Cycles Volumetrics: block artifacts with overlapping volumes

The issue was caused by uninitialized parameters of some closures, which
lead to unpredictable behavior of shader_merge_closures().
2015-03-23 12:48:33 +05:00
572489ec89 Fix wrong sizeof() in new ghash hashing helpers code.
Spotted by Coverity.
2015-03-22 21:14:39 +01:00
059d5bc809 OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74 2015-03-22 19:29:42 +01:00
e7d051043d BGE: New hysteresis offset to improve LOD level transitions
This change introduces a new hysteresis parameter that it will be added
or subtracted to/from the LOD distance to avoid popping when a LOD
object moves close to the LOD transition continuously.

Then, we have the following:

- a new LOD Hysteresis setting per scene (default 10%) which is located
in Scene context --> Level of Detail panel. This scene parameter also
will active/deactive the scene hysteresis.
- and a new LOD Hysteresis setting per object (default 10%) which is
located in Object context --> Levels of Detail panel. The LOD hysteresis
setting per object (if active) will overwrite the hysteresis setting per
scene value.

For the new blends: the hysteresis setting per scene would be active by
default and the per object would be inactive by default.
For the old blends: both hysteresis settings (per scene and per object)
would be inactive by default. A quick way to take advantage of this
feature for old blends would be to activate the hysteresis parameter in
the scene context -> Level of Detail panel

Reviewers: campbellbarton, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: nonamejuju, lordodin

Differential Revision: https://developer.blender.org/D957
2015-03-22 18:19:49 +01:00
0b4a71b072 BGE: Add physics constraints replication
This patch will add a physics constraints replication for group instances
(dupli group).
It also fix crashing when when a group instance is made from a linked
group instance and both are on the active layer.

Initial patch T31443 from moerdn (Martin Sell).

Reviewers: lordloki, sergof, moguri, sybren

Reviewed By: moguri, sybren

Differential Revision: https://developer.blender.org/D658
2015-03-22 17:56:26 +01:00
2744ce77de Revert part of D1074 related to acceleration taked into account.
It has been reverted because it was affecting obstacle avoidance
(T44041).

This fix should be backported to 2.74
2015-03-21 17:54:49 +01:00
e183199022 Cleanup: instantiate arg once in context macro 2015-03-22 03:35:13 +11:00
9ff3d8eafa Cleanup: minor edits to project generators 2015-03-22 03:35:13 +11:00
8e9c9fde42 OSX/GHOST: need one more release in error case 2015-03-21 17:15:38 +01:00
d21018b334 Fix T44065: fixed vehicle constraint
Commit ffee7f1a58 broke vehicle constraints; this fixes that.
2015-03-21 14:42:57 +01:00
d28bfb5022 Cleanup: constify view3d/camera 2015-03-21 22:44:13 +11:00
6e50bdd870 Cleanup: constify scene/modifiers 2015-03-21 22:44:00 +11:00
0025d90b98 Cleanup: use tabs 2015-03-21 16:40:43 +11:00
e0611ca832 View3D: fix view-selected zoom logic
- Correct logic converting radius to view distance.
- Wasn't taking view-zoom into account converting lens to angle.
- Support framing the selection in the camera bounds (for camera locked views).

Add ED_view3d_radius_to_dist to handles these details.
2015-03-21 15:33:10 +11:00
e88cfc28b2 View3D: use defines for default zoom-levels 2015-03-21 15:24:36 +11:00
997c0c837b Fix indentation in last commit, tab slipped in 2015-03-20 20:26:51 +01:00
ed61017391 Really fix scons with new glsl shaders 2015-03-20 20:24:30 +01:00
d5abff589e Fix scons build 2015-03-20 19:47:06 +01:00
0582aa6f13 Partly fix T44025, pixelFormat retain was left, for 2.74 backport 2015-03-20 17:57:35 +01:00
919a665497 Cycles: Avoid memcpy of intersecting memory
Could happen when assignment happens to self during sorting.
2015-03-20 21:14:50 +05:00
8ff4c53e63 Correction to previous commit, initialization of needs_free got lost by accident 2015-03-20 21:09:52 +05:00
f91850d564 Disable IME for headless builds 2015-03-21 03:02:09 +11:00
b9dc4f851b Fix link error with GLEW 2015-03-20 16:35:41 +01:00
94a3924eab Correct recent commit 2015-03-21 02:25:28 +11:00
63ab5b0883 Fix for building win32 headless 2015-03-21 02:17:27 +11:00
d12ab9a9a8 Remove unused armature code
ED_armature_deselect_all now simply de-selects
2015-03-21 02:17:27 +11:00
62b31a6e99 Avoid per-draw allocation when drawing currently rendering tiles 2015-03-20 19:56:09 +05:00
339e43e1e8 Only create vertex buffers if supported and clean them up properly. 2015-03-20 15:43:34 +01:00
07b2508305 Fix high quality depth of field on the Mac.
Quite a few things wrong here:

* Mac did not support EXT_draw_instanced, only ARB_draw_instanced
* Draw instanced did not work unless data came from vertex buffer, which
is second time we see weird things with vertex arrays in mac
* There were a few stupid mistakes by me as well, such as binding to
uniform locations for the wrong shaders (it's a wonder it ever worked
:p)
2015-03-20 15:26:13 +01:00
3d6642db83 Fix race condition and bad memory access highlighting render tiles
Is was possible that interface will be refreshed at thesame time
as render engine will start freeing render parts.

Not sure if we can get away without RW mutex here, seems we need
one way of synchronization or another..
2015-03-20 17:51:05 +05:00
c0be69f7fd Fix/Improve FKey bone creation
- new bone is now made active
- previous selection cleared
- bone direction places the tip on the active bone (if available)
2015-03-20 23:48:27 +11:00
6786ef6783 Fix T43986: VSE Mask Modifier don't move with video-Clip.
Now mask animation is offset to start of strip, instead of staying at frame 1!

Warning: this may break existing files, in case some would be using (hacking around!)
current bad behavior...
2015-03-20 12:39:25 +01:00
03d945095a Cmake: Some more tweaks to building from branch without upstream 2015-03-20 14:07:56 +05:00
6f51df5384 SCons: Attempt to deal with branches without upstream configured 2015-03-20 14:03:54 +05:00
6de12b1b43 CMake: Suppress unconfigured branch upstream error in the output 2015-03-20 13:59:05 +05:00
1cd4070e35 Fix T43786: Cycles bake disregards Auto Smooth (vertex per-face normals)
Added an utility function which performs vertex split based on the loop
normal so now backing API matches to what's happening in Cycles and BI
in terms of autosplit.

Reviewers: dfelinto, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1174
2015-03-20 12:47:19 +05:00
56edaf7867 Fix stupid strict flags in math_color_inline.c
It was unleashed with recent ghash commit and issue seems to
be the same as fixed in 69065b5b.
2015-03-20 12:25:14 +05:00
35ea7efbca Add missing update adding a shape-key
Noticeable when pin is enabled.
2015-03-20 15:50:56 +11:00
cf29010bd4 Cleanup: warnings bit-shift int overflow 2015-03-20 15:41:36 +11:00
f51a3aedc9 Cleanup remove unused variable 2015-03-19 21:11:33 +01:00
fd559ed94f Missed this last commit. 2015-03-19 21:10:41 +01:00
05e3c261a4 Fix T43989: Sequencer - Ctrl snapping a sequencer strip does not work if you specify the x axis.
New 'strip' snapping was simply not computed in case of constrained transform, hence init
'0' value was used as frame offset in this case.

This commit reorganizes a bit that snapping, to keep it more 'confined' into `snapSequenceBounds()`
dedicated function. It still needs a minor hack (setting snapping mode to something else than
defualt `SCE_SNAP_MODE_INCREMENT`, to avoid this snapping to be called by contraint code).

Thanks to Antony for review and enhancements.

This fix should be backported to 2.74.
2015-03-19 20:53:34 +01:00
ea12b87afd Fix cycles dof settings 2015-03-19 20:49:18 +01:00
81472aff2b Remove deleted list for palette colors
was used because of UI memory access only.
2015-03-20 06:08:38 +11:00
eee538f0d2 UI: minor re-organization of dof options 2015-03-20 06:08:22 +11:00
bd1e5eeab7 Blender will now use trilinear filtering by default 2015-03-19 20:05:31 +01:00
2941b4ad9b BLI GHash: add some basic gtests.
We could likely add much more, but those already covers basic behavior and should be able
to catch most errors when editing this code.

Also added some performances tests as well (timing ghash insert/lookup under heavy loads,
for different kinds of keys).
2015-03-19 19:50:51 +01:00
cfdd27381c GHash - code reorganization, performance enhancements, add a few missing utils to API.
This patch is the root of the GHash rework, all other diff will be based on it:

Reduce average load from 3.0 to 0.75
----------------------------------

This is the big performance booster part, e.g. makes tracing a dyntopo stroke between 25% and 30% faster.

Not much to say about it, aside that it obviously increase memory footprint (about 25% - 30% too).

Add optional shrinking
----------------------------------

I.e. ghashes/gsets can now shrink their buckets array when you remove enough entries. This remains optional and OFF by default.

Add code to use masking instead of modulo
----------------------------------

Buckets indices are obtained from hashes by “reducing” the hash value into the valid bucket range. This can be done either by bit-masking, or using modulo operation.
The former is quicker, but requires real hashes, while the later is slower (average 10% impact on ghash operations) but can also be used as a 'fake' hashing on raw values, like e.g. indices.

In Blender currently not all ghash usages actually hash their keys, so we stick to modulo for now (masking is ifdef’ed out), we may however investigate the benefits of switching to masking with systematic very basic hashing later…

Add various missing API helpers
----------------------------------

I.e. a way to deep-copy a ghash/gset, and a way to (re-)reserve entries (i.e. manually grow or shrink the ghash after its creation).

Various code refactoring
----------------------------------

* Get rid of the 'hack' regarding ghash size when used as gset (it’s simpler and safer to have two structs defined here, and cast pointers as needed).
* Various re-shuffle and factorization in low-level internal code.
* Some work on hashing helpers, introducing some murmur2a-based hashing too.

Thanks a bunch to Campbell for the extensive review work. :)

Reviewers: sergey, campbellbarton

Subscribers: psy-fi, lukastoenne

Projects: #bf_blender

Maniphest Tasks: T43766

Differential Revision: https://developer.blender.org/D1178
2015-03-19 17:37:54 +01:00
881e05fc54 Armature select-hierarchy now uses connected bones
Traverse down connected child bones (when available)

Also remove redundant bone loops.
2015-03-20 01:40:45 +11:00
3e9947c4d4 Depth of field high quality:
A new checkbox "High quality" is provided in camera settings to enable
this. This creates a depth of field that is much closer to the rendered
result and even supports aperture blades in the effect, but it's more
expensive too. There are optimizations to do here since the technique is
very fill rate heavy.

People, be careful, this -can- lock up your screen if depth of field
blurring is too extreme.

Technical details:

This uses geometry shaders + instancing and is an adaptation of
techniques gathered from

http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-

 http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20-
%20in%20Real-Time%20Rendering%20Course).ppt

TODOs:

* Support dithering to minimize banding.
* Optimize fill rate in geometry shader.
2015-03-19 15:18:14 +01:00
93048873f1 Fix compilation error of blenderplayer after recent constraint commit 2015-03-19 19:10:40 +05:00
7c65b75d01 Correct recent armature symmetrize
Duplicating part of a chain could have invalid 'connected' flag.
2015-03-20 00:42:17 +11:00
15b37a4a4d Speedup for constraints update from python script
General idea is to avoid actual calculation from property update()
callback and tag things for update later instead.

That said, pose constraint flags are now tagged for update and
handled as a part of object update. In the new depsgraph it'll
be a nice dedicated operation node.

Also avoid updating disabled flags for all the modifiers. This
part of the path is not totally optimal since it'll still need
to iterate over bones in order to get pchan, but to optimize it
further would be nice to find a way to avoid pchan requirement
all together.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1191
2015-03-19 18:28:49 +05:00
c69b5e0276 Fix T44040: Blender crashes when nodes are muted
It was actually an old issue with wrong conversion happening for muted
nodes, which wasn't visible before memory optimization commit.

This is to be backported to the final release.
2015-03-19 16:04:49 +05:00
52d72a37cd Cleanup 2015-03-19 20:34:02 +11:00
ad95cb72bc Transform: Shift for precision PET adjustment
Patch T36753 by @hjaarnio
2015-03-19 20:11:33 +11:00
156921114e Armature Symmetrize tool
D1147 by @julien, with fixes/improvements

Duplicate bones where needed, otherwise use existing.
Keeps parent relations intact, can operate on parts of an armature.
2015-03-19 19:26:48 +11:00
c6ee43d384 Cleanup: style (armature duplicate) 2015-03-19 18:13:47 +11:00
8b6e777736 Fix out-of-bounds read BKE_deform_flip_side_name 2015-03-19 18:13:47 +11:00
4b88541d59 CMake: unbundle eigen3
Optionally use systems eigen3 library.

T41989 by @hasufell with edits
2015-03-19 15:41:41 +11:00
2df4444def CMake: exclude Colamd when OpenNL's disabled 2015-03-19 14:48:52 +11:00
2a2bf3c1ab Freestyle: pass Main struct to new/copy 2015-03-19 14:34:14 +11:00
9b54c88e0f Cleanup: spelling grey -> gray 2015-03-19 14:14:48 +11:00
4f602ff943 Revert part of recent color-management commit
This adds back rgb_to_grayscale,
not all color is managed or depends on the current loaded blend file's CM options.

Noted in comments that this is only to be used outside the CM pipeline.
2015-03-19 14:12:51 +11:00
255b07681a Color managed luminance for shader ramp-in-energy 2015-03-19 12:59:36 +11:00
ce11e1c878 Cleanup: better not pass function call to FTOCHAR
also use rgb_uchar_to_float
2015-03-19 12:42:34 +11:00
c31aae0487 Use fabsf for floats 2015-03-19 06:13:50 +11:00
1dd1d286c6 Select nth option to skip steps
Patch T43752 @codemanx, added matching curve option.
2015-03-19 04:40:43 +11:00
64451f0928 Fix for crash adding mask modifier 2015-03-19 01:10:44 +11:00
9231d35caa Simplify math in mix_linear glsl function. Thanks to valentin for
pointing out on irc.
2015-03-18 14:09:03 +01:00
72419eebc2 Fix T44029 textures disappear in viewport if GPU mipmap generation is
off.

GPUs need a full tree of mipmaps up to dimension 1xn to work. This will
make it so for all imbufs but cost is negligible and it's unlikely that
something could break due to that.
2015-03-18 13:48:49 +01:00
3e5cd52783 Fix bad memory access freeing viewport which uses movie clip 2015-03-18 17:17:04 +05:00
aff4aa173a Support UV island selection in UV synch and face select mode.
Enough said, people wanted this for ages, enjoy!
2015-03-18 12:41:03 +01:00
ff1ed872d9 Fix crash using "Copy to selected" on ID-props 2015-03-18 18:53:32 +11:00
2919519714 RNA: palette colors api
Methods so Python can manage colors.
palette.colors.new()/remove()/clear()/active
2015-03-18 16:10:43 +11:00
a975a3ca63 RNA: move palette into its own file 2015-03-18 15:57:53 +11:00
db710e6c0d Fix crash using removed data as function arguments 2015-03-18 15:52:36 +11:00
d0fcbab152 Fix RNA active spline assignment 2015-03-18 15:15:52 +11:00
63897304a9 Fix T44028: Vertex Colors Baking error
Was wrong color management flag used for some bakers.
Actually goes back to 7997e38.
2015-03-18 00:10:58 +05:00
2ab4489f17 Fix T44027: Normal Edit Mod : Radial from object normals affected by target object scale.
The way we were getting diff to apply to vcos from target object was just bad!

Also, fixed another related issue - negated scale would be clamped to nearly zero,
now only consider absolute version of size (we do not care about its sign here anyway).

This should be backported to 2.74 (with previous commit too).
2015-03-17 19:57:16 +01:00
6ceb84c217 BLI math vec: add 'abs' functions to get absolute values of a vector.
Unseful when handling e.g. scale, sometimes.
2015-03-17 19:57:16 +01:00
948bc66a00 Cycles: Improve readability of dumped graphs 2015-03-17 21:15:17 +05:00
a43d00d51e Cycles: Fix displacement code creating cyclic dependencies in graph
Bump result was passed to set_normal node and then set_node was connected
to all unconnected Normal inputs, including the one from original Bump
node, causing cycles.
2015-03-17 19:39:09 +05:00
dd38dce7f0 Part 2 of D1082 by Troy Sobotka, remove our functions that do luma
calculations and use the OCIO one instead.
2015-03-17 15:20:33 +01:00
42aac45d7f Part 1 of D1082 by Troy Sobotka, add API in OCIO for luminance
calculation.
2015-03-17 14:15:05 +01:00
bf8ea6b60e Kick particle systems to force redistribution, needed for reliably
applying recent jitter fix.
2015-03-17 11:04:44 +01:00
07f53d6454 Fix T44020: Crash exporting fluid sim to fbx
The issue is coming from wrong fluid modifier copy callback,
which might have left some pointers shared across original
and target fluid modifiers.
2015-03-17 12:59:44 +05:00
1724513fc6 Fix T44021: Crash switching Rendering Engines while viewport rendering + animating
Make sure preview render job is cancelled before freeing the render engine
associated to the viewport.
2015-03-17 12:02:10 +05:00
f138666f68 cleanup: Mac #include
Don’t need all of Cocoa, or any of Carbon here.
2015-03-17 01:18:52 -04:00
c0fa864e24 Cleanup: bool & const
Using bool when we're asking yes/no questions such as whether some GPU
feature is supported.

Consolidated these simple functions into gpu_extensions.c and grouped
them in the header.

Const-ified some args where the functions don't modify the pointed-to
data.
2015-03-16 22:57:56 -04:00
b0bbd34ac2 I18n: update for new akward algo names in UI messages... 2015-03-16 20:55:01 +01:00
ef70d644d6 reverting unintentionally changed value of enum OBJ_TEXT 2015-03-16 18:58:58 +01:00
9ed5a1073e fix D1130 renamed the enum OBJ_FONT to OBJ_TEXT to avoid naming conflicts in Windows 2015-03-16 18:46:40 +01:00
77bc623bc4 Get rid og gluBuild2DMipmaps on game engine. 2015-03-16 16:18:37 +01:00
664c611fc8 Get rid of gluBuild2DMipmaps on rna API.
Code here is a bit weird/simpler than GPU_draw, but we can reuse the API
here, albeit with a few restrictions (no high resolution, custom
filtering mode - which will probably get lost next time blender reloads
textures)
2015-03-16 16:07:21 +01:00
6d03e94491 Get rid of gluBuild2DMipmaps on gpu_draw.c (use our own imbuf scaling
functions instead)
2015-03-16 15:45:34 +01:00
86c828d9fd Make sure disabling attribute arrays also resets the counter so we don't
do it twice.
2015-03-16 12:14:23 +01:00
2fa593a6f7 Fix T43853: Audio animation bug (fcurves)
For a detailed bug explanation see the comments in the report.
2015-03-16 23:02:04 +13:00
19ce78fb3b Code cleanup: Comment 2015-03-16 14:52:54 +05:00
9542cf041a Fix an incorrect assert in lnor code.
There is one case where we do can have only two edges for two loops...
2015-03-16 10:38:45 +01:00
30527e3e55 Fix T43178: BGE has hard-coded 60 Hz as frame rate
Two areas of the BGE use a hard-coded 60 Hz as frame rate. However, this 60 Hz is just a default setting, and can be changed in the Blender interface.
This setting is now used instead of the hard-coded 60 Hz.

CcdPhysicsEnvironment::SetFixedTimeStep() is actually never called, as we don't even support a true fixed-timestep simulation.
2015-03-16 10:12:37 +01:00
6aaedc7cfd Refer to Task 43975: Deleting a Shapekey can break the relative pointers
This patch would reassign the relative of all keyblocks to the relative
of the deleted keyblock. And it fixes the misalignement of the index values
after the keyblock is deleted.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1176
2015-03-16 10:03:23 +01:00
60df4d10ff Fix T43999: MIS for environment broken after multi-threading commit
Typo in task start row calculation.
2015-03-16 13:31:27 +05:00
ce009c8019 PyConsole: double-click to select word
patch T43641 by @v-disp with own edits
2015-03-16 16:03:32 +11:00
4c58cb8bd9 Correct assert 2015-03-16 13:39:27 +11:00
f03e004c23 Fix T43997: Paste fcurve keeps handle selection 2015-03-16 13:08:26 +11:00
927306d60a Cleanup 2015-03-16 11:46:20 +11:00
13dc766148 PyAPI: bpy.ops enum error was cut short 2015-03-16 10:16:16 +11:00
06cc89d744 Fix T43976: Edit-mode crash /w (scene/screen.scene) mismatch 2015-03-16 09:57:15 +11:00
d49eeabae7 Cleanup: warnings 2015-03-16 09:37:00 +11:00
15374d31d5 Update themes for 2.74 2015-03-16 09:29:26 +11:00
2140cb60cb Fix T39184: Multisegment bevel profiles should curve in-plane sometimes.
When the multisegment profile joins two unbeveled edges, all in the same
plane, users desire that rather than the current behavior of linear
interpolation between those edges, the profile should curve.
This changes behavior to do that.  The old behavior can be obtained
by setting the profile parameter to 0.25, if desired.
2015-03-15 18:24:36 -04:00
Julian Eisel
3e6cfcca86 Nodes: Shortcuts for Snap and Snap Element Menu
Added Shift + Tab for Snap and Ctrl + Shift + Tab for Snap Element Menu (consistent to
3D View)

NOTE: Exit Group is now Ctrl + Tab instead of Shift + Tab
2015-03-15 22:35:26 +01:00
Julian Eisel
62070ae6e1 Fix T44003: Flatty Light: GPencil vertices and timeline keyframes black
I noticed our version code and subversion got out of sync in the past, maybe
that's what the issue was here.
Deleting the entries from the .xml makes it fall back to the default values.
2015-03-15 22:13:05 +01:00
225027ce5d BGE - new read-only attribute in KX_GameObject python api (LOD level)
Added a new "current_lod_level" property to the python api of
KX_GameObject. The property returns the current lod level of the game
object. The purpose of the property is activate logic routines only when
an object is at a certain lod-distance from the camera, avoiding to
separately recomputing the same distance in the logic script. Usage in
python script might look like:

owner = bge.logic.getCurrentController().owner
lod_level = owner.currentLodLevel
if lod_level == 0: ...do something
else: ... object might be too distant

Reviewers: dfelinto, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D978
2015-03-15 17:26:49 +01:00
dd3ade250d BGE: Fix for T43994 Steering actuator bug with Navmesh
Now the facing option is taken into account as before

This is a regression and to be ported to the final release branch.
2015-03-15 11:38:04 +01:00
176ecd9c9c BGE : Fix for T43724 and T41599 addObject() with KX_FontObject and
overlay scene

GetGameObjectType is overwritten in KX_FontObject to differentiate a
font object into AddNodeReplicaObject function. Now, in this function,
we add fonts in the appropriate list.

Reviewers: campbellbarton, moguri, dfelinto, lordloki

Reviewed By: lordloki

Subscribers: lordloki

Projects: #game_logic, #game_engine

Differential Revision: https://developer.blender.org/D1130
2015-03-15 10:50:59 +01:00
3824e0f124 Cleanup: style 2015-03-14 12:10:09 +11:00
6e17420548 BGE: Fix for T43788 Light casts shadow when use_shadow unchecked
Makes use_shadow usage consistent across supported lamp types (Spot and
Sun)

Differential D1148

Reviewers: Moguri, Brecht
2015-03-13 23:47:15 +01:00
fc3de690ac RNA: avoid inefficient array printing 2015-03-13 23:52:47 +11:00
a1a7317f6b Add argument to DM_to_mesh() function to take ownership over the DM
The idea is pretty simple: instead of making temporary copy of all the
related custom data layers just pass the ownership from the DM to the
mesh.

This is really handy in cases when you've got DM which you need to
convert to Mesh datablock and wouldn't need that DM after conversion
anyway.

Foe example, render database conversion, exporters and even Modifier
Apply will benefit from this option.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1127
2015-03-13 17:46:55 +05:00
2ef2f085fb Add an option to mesh.calc_tessface() to get rid of polygons and loops
The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.

This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.

Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().

However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.

In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1125
2015-03-13 17:39:21 +05:00
0e18a56432 Cycles: Free caches used by the synchronized objects
Issue this commit is addressed to is that particle system and particle modifier
will contain caches once derived mesh was requested and this cached data will
never be freed.

This could easily lead to unwanted memory peaks during synchronization stage
of rendering.

The idea is to have RNA function in object which would free caches which can't
be freed otherwise. This function is not intended to deal with derived final
since it might be used by other objects (for example by object with boolean
modifier).

This cache freeing is only happening in the background rendering and locked
interface rendering.

From quick tests with victor file this change reduces peak memory usage by
command line rendering by around 6% (1780MB vs. 1883MB). For rendering from
the interface it's about 12% (1763MB vs. 1998MB).

Reviewers: campbellbarton, lukastoenne

Differential Revision: https://developer.blender.org/D1121
2015-03-13 17:38:03 +05:00
79393cb7a2 Fix T43959 jittering in 2D texture painting.
This is still not perfect,
but should work smoother now. Previously there was visible wobbling
while painting.

This can be included in final release.
2015-03-13 13:10:38 +01:00
a0a6cb129e Fix unstable particle jittered distribution.
This was never working for threaded distribution.
2015-03-13 13:07:23 +01:00
63ea8dd156 Initial compilation support with C++11 featureset enabled
This commit makes some preliminary fixes and tweaks aimed to make blender
compilable with C++11 feature set. This includes:

- Build system attribute to enable C++11 featureset.

  It's for sure default OFF, but easy to enable to have a play around with
  it and make sure all the stuff is compilable before we go C++11 for real.

- Changes in Compositor to use non-named cl_int structure fields.

  This is because __STRICT_ANSI__ is defined by default by GCC and OpenCL
  does not use named fields in this case.

- Changes to TYPE_CHECK() related on lack of typeof() in C++11

  This uses decltype() instead with some trickery to make sure returned type
  is not a reference.

- Changes for auto_ptr in Freestyle

  This actually conditionally switches between auto_ptr and unique_ptr since
  auto_ptr is deprecated in C++11. Seems to be not strictly needed but still
  nice to be ready for such an update anyway/

This all based on changes form depsgraph_refactor branch apart from the weird
changes which were made in order to support MinGW compilation. Those parts of
change would need to be carefully reviewed again after official move to gcc49
in MinGW.

Tested on Linux with GCC-4.7 and Clang-3.5, other platforms are not tested and
likely needs some more tweaks.

Reviewers: campbellbarton, juicyfruit, mont29, lukastoenne, psy-fi, kjym3

Differential Revision: https://developer.blender.org/D1089
2015-03-13 16:47:40 +05:00
278871db5b error in last commit 2015-03-13 22:46:15 +11:00
bb825d02f8 CMake: unbundle LZO library
Patch T41989 by @hasufell
2015-03-13 22:36:01 +11:00
61eab743f1 Cycles: Optimization for CMJ in CUDA kernels
Two things:
- Use intrinsics for clz/ctz (ctz is implemented via ffs()).
- Use faster sqrt() function which precision is enough for
  integer values.
2015-03-13 12:38:14 +05:00
aa4cb95a5c Pass proper bmain to the updateDepgraph() of modifiers
This is mainly to make physics modifiers being able to work
with it. For other cases this main is not needed.
2015-03-13 12:03:23 +05:00
1cac8c23b5 Fix T43803: Crash playing smoke animation, when linked as group instance
The issue was caused by missing relations between smoke domain and flow/source
objects. This happened because smoke's modifier only iterated base objects and
ignored cases when flow/source could be linked to scene via dupli-group and
does not have real base.

The same seems to be still needed for fluid and dynamic paint modifiers,
will do it as a separate commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1172
2015-03-13 12:03:23 +05:00
73ad76970e BGE: Fix for T43980 MouseLook (actuator) triggers MouseMovement (sensor)
on other objects permanently

only trigger mouse event when it is necessary, this way we avoid
conflicts with other mouse sensors.
2015-03-13 00:50:25 +01:00
3db0e1ef6a Cycles: Simplify volume light connect code. 2015-03-13 00:09:13 +01:00
0ed914a194 Cleanup: Use differential helper class. 2015-03-12 23:35:01 +01:00
90f36d4ec8 BGE: Fix for T43793 Increment frame_start/end value to 255 frames
Currently, for animated textures we were allowing 16x16 tiles but we can reproduce 128 frames only.

Reviewers: moguri, sergey, campbellbarton

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1164
2015-03-12 22:07:35 +01:00
e160da30ea View3D: Quad-view opposite axis switching
Pressing Numpad9 now orbits to the opposite side in any viewport,
with the advantage that it can switch locked-quadview axis to their opposite side.
2015-03-13 04:48:23 +11:00
f8de442a35 Cleanup: remove unused viewnumpad code 2015-03-13 03:40:58 +11:00
a8f6d51ebc D1171: Use GHash for BHead idname lookups
This patch avoids looping over bhead's linked list when looking up values by name.

Used during appaned and library loading.
Gives noticeable overall speedup loading files that used libraries. (nearly 2x on some Mango files)
2015-03-13 01:55:49 +11:00
f2d4f6b086 Cleanup: use realloc for entry-array-resizing 2015-03-13 01:55:48 +11:00
1ce256cb8f Cleanup: refactor header lookups into functions 2015-03-13 00:41:21 +11:00
b007fa41c6 Cleanup: use POINTER_OFFSET macro 2015-03-13 00:41:21 +11:00
03c77fbb99 Readme: tweaks to make it less hassle to edit
also remove "this is the Nth release" text, not so helpful and easy to forget to update.
2015-03-13 00:34:27 +11:00
dce16d57dc Revert "Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane"
The fix was really flacky, in terms during speed benchmarks i had
abort() in the fallback block to be sure it never runs in production
scenes, but that affected on the optimization as well. Without this
abort there's quite bad slowdown of 5-7% on the renders even tho
the Pleucker fallback was never run.

This is all weird and for now reverting the change which affects on
all the production scenes and will look into alternative fixes for
the original issue with precision loss on huge planes.

This reverts commit 9489205c5c.
2015-03-12 18:24:53 +05:00
c4b3b60aad Fix T43974: Alpha output of movie clip node crashes blender
Issue was caused by a bug in the memory optimization commit,
should be backported to the final release branch.
2015-03-12 18:24:53 +05:00
13d443496c Partial fix for T43967: Background is wrong in 2.74
Was missing do-versions code after rotation order change in Cycles.

This is a regression and to be ported to the final release branch.
2015-03-12 18:24:53 +05:00
cef379242b Cleanup: style 2015-03-13 00:07:26 +11:00
92d77b250e makesrna: move extern prototypes into own header
Patch T36049 by @jeske
2015-03-13 00:05:11 +11:00
ae45496812 OpenEXR 2.2 add support for Dreamworks DWAA / DWAB compression
This patch makes it possible for the user to select all supported compression types in OpenEXR 2.2

Discussion points:
 - B44 is only defined for half's it compresses to a fixed representation of 44% of the halfs. We do currently not reflect in the UI that in the case of float32's it will be equal to compression = NONE
 - ZIPS is single scanline zip and is supposed to be useful in cases where importing in Nuke happens.
 - The new Dreamworks formats, are the worth exposing etc etc

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1050
2015-03-12 14:02:33 +01:00
2814039ee3 Remove version from readme, (replace on install) 2015-03-12 23:52:48 +11:00
4b3641ec99 Fix loading of indexed .bmp files
D1173 by @rdb

Support for 1,2,4 bit images
2015-03-12 23:52:09 +11:00
064fa4baae Cycles / Decoupled Ray Marching: Skip consecutive empty steps.
This merges consecutive empty steps in the decoupled record function,
which can lead to fewer iterations in the scatter functions.

Only helps slightly though (1%), but doesn't hurt to have this.

Differential Revision: https://developer.blender.org/D873
2015-03-12 13:50:12 +01:00
cdb47b9dfc Cycles: Make Background MIS building threaded
Use multiple threads for building the MIS table, if the
resolution is higher than 512.
Also replace division by cdf_total, with a inverse multiplication by
cdf_total_inv. This gives further speedup.

On my Macbook (8 CPU threads) this improves the time to build the table:
Resolution 4096: From 0.16s to 0.03s
Resolution 8096: From 0.61s to 0.11s

This especially helps to reduce the scene update time, when tweaking world
shader while viewport rendering is running.

Patch by Sergey and myself.

Differential Revision: https://developer.blender.org/D1159
2015-03-12 13:50:11 +01:00
583466fccf Blender 2.75 release cycle start: BCon1 2015-03-12 13:50:11 +01:00
26a2b7b38f Py/RNA: add bpy.data.palettes 2015-03-12 23:49:15 +11:00
42c7200248 CustomData: don't calloc when duplicating layers 2015-03-12 23:49:15 +11:00
56f794fce6 Cleanup: de-duplicate view3d clipping 2015-03-12 23:49:15 +11:00
17d96ca2aa GuardedAlloc: safer MEM_SAFE_FREE
only instantiate the argument once,
so MEM_SAFE_FREE(array[i++]), won't cause incorrect behavior.
2015-03-12 23:49:15 +11:00
57646cb2ce Py Tests: manual URL validator
Support for URL checker to use locally generated manual.
2015-03-12 23:49:15 +11:00
4aa51096a7 Point submodules to RC1 tags 2015-03-11 20:49:46 +05:00
b40b6431c8 2.74 splash
by Manu Järvinen
2015-03-12 02:38:57 +11:00
124a226eaa 2.74 release: update HTML
Also remove unneeded metadata
2015-03-12 02:38:56 +11:00
639a3dd53b 2.74 version bump 2015-03-12 02:30:55 +11:00
99ed95bba2 Fix really stupid issue reported by Campbell, code retry to render
without VBOs would return prematurely and leak.
2015-03-11 12:19:16 +01:00
72f86ad046 Fix typo in RNA definition of "shape_key_add"
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1167
2015-03-11 16:17:13 +05:00
527302bc0b Fix 8bit BMP palette reading
part of D1173 by @rdb, load BGR -> RGB
2015-03-11 21:26:29 +11:00
cf385caf92 Fix flip node making unsigned int out-of-range 2015-03-11 15:39:58 +11:00
62faffc800 Cleanup: style 2015-03-11 13:15:52 +11:00
6b610500b9 Cleanup: indentation 2015-03-11 13:14:24 +11:00
0d053158ec Fix T43342 bad rendering of normal maps on NVIDIAs on the MacOS
This is not limited to normal maps, it's just that normal maps cause a
mix of interleaved vertex arrays + non interleaved vertex arrays + GLSL,
which could confuse the GL. Possible explanation is that it may be
clobbering the vertex index of the shader somehow but this is difficult
to know without extensive tests and the Mac is needed by Francesco in
the morning :).

Do brute force solution instead, just force legacy drawing on Macs when
VBOs is off. On the plus side VBOs work fine, so we should be fine when
we update.
2015-03-10 23:08:43 +01:00
26d7b6c517 Fix T43831: Image Editor: Render info not displayed
Issue was caused by b62c2a9 and root of it goes to the fact that text
info is stored in the "main" scene, not the currently rendering one.

This is a bit annoying but making it so text and result are coming
from the same scene is a bit dangerous to do now. Will re-visit this
change after the release and see if it might be done in a more clear
fashion.
2015-03-11 00:04:59 +05:00
56c0a3faef Fix T43953, make opengl render work like before, basically, if we render
transparent, it will render sky/transparent, regardless of the "show
world setting".
2015-03-10 16:47:50 +01:00
edc8a4c484 Fix memory leak when using two bump maps on the same material 2015-03-10 15:27:24 +01:00
51a60cbaf8 Fix T43887: Quick Fur duplicate particle system on edit
Forbid add quick fur operator from adding fur to objects in edit mode.

Fur is not visible for them anyway and because of local undo stack used
in edit mode tweaking values of this operator does not lead to proper
operator redo.
2015-03-10 17:02:29 +05:00
9d72c9e7e5 Tests: Print counter with operator test 2015-03-10 22:00:24 +11:00
8a551394e5 Fix crash in mesh data transfer 2015-03-10 19:46:24 +11:00
95a1cc20dc Fix crash extruding an empty curve 2015-03-10 18:22:08 +11:00
81b50bcf5f Fix crash enabling dyntopo in background mode 2015-03-10 18:21:26 +11:00
f1a0c2a4f0 Fix T43941: Grease pencil eraser outline vanishes 2015-03-10 18:17:02 +11:00
afa8a0ac19 Fix for yet another assert fail of particle dmcache index.
This is totally broken, just making sure Blender does not crash and devs
can investigate other issues that are actually fixable.
2015-03-09 18:45:27 +01:00
e2471ea96a Attempt to fix T43919, avoid using GPU_framebuffer_slots_bind just in
case a system does not support drawing to many framebuffers.
2015-03-09 18:27:27 +01:00
219937fc5d Fix T43674: Smoke collision does not detect obstacles reliably.
The smoke obstacle detection was using a maximum distance for BVH
checks to find mesh elements that define boundary cells in the grid.
This BVH test was using an arbitrary value of 0.6 cell units. It should
be `sqrt(3)*0.5` to account for the maximum possible distance of mesh
elements inside a cell. Otherwise some cells that should form the
boundary are not detected as such (no closest mesh element found inside
the radius), so you get gaps in the smoke obstacle.
2015-03-09 15:23:52 +01:00
Julian Eisel
b14e2876a7 Fix T43937: Changing Texture Brush doesn't update toolbar 2015-03-09 14:48:56 +01:00
b21e0cccfa Fix T43872: Adding a constraint to a bone of a proxy armature resets all bones' transformations.
Temp hack for until new depsgraph is here. Thanks the Joshua and Sergey for their help.
2015-03-09 13:02:30 +01:00
fd94d2d80f T37832: OpenCL compositing bug in defocus node
The issue seems to be caused by the integer overflow. It's actually
still needed to investigate why exactly buffer contained such a huge
value, but the patch is still legit and seems to be solving the issue
just nicely.
2015-03-09 16:56:37 +05:00
a1549bc47a Image Space: enable zoom/cursor warping 2015-03-09 21:01:43 +11:00
40ef25d000 Fix T43891: Skin modifier inverts some faces 2015-03-09 20:26:09 +11:00
9ffc66b1c0 Math Lib: add mid_v3_v3v3v3v3 2015-03-09 20:26:09 +11:00
d4c1e98dd4 Fix T43484: Motion blur fails in certain circumstances
The issue was caused by mismatch in how aligned triangles storage was
filled in during BVH construction and how it was used during rendering.

Basically, i  was leaving uninitialized storage for triangles when
there was deformation motion blur detected for the mesh. Was likely
some sort of optimization, but in fact it's still possible that regular
triangles would be needed for rendering.

So now we're storing aligned storage for all triangle primitives and
only skipping motion triangles (the deformation motion blur flag from
mesh is now ignored).
2015-03-09 14:15:35 +05:00
b13b900d50 Cycles: Improve logging in object motion detection
Reporting mesh name is not really useful, since it's name does not
any relation with the original object/mesh names.
2015-03-09 13:25:27 +05:00
2ae0f1e70b Fix T43908: Mask render bug, one pixel black line
This was a regression caused by attempts to fix T42844 and there were
some red-herrings which lead me to the wrong way to fix it. It's some
deeper issue than just interpolation offset, it's mainly how the node
resolution is being mapped to each other.

It could be actually a part of canvas awareness project..
2015-03-09 12:48:42 +05:00
36df8cc1e5 Fix T43421: bisect_edges returns insufficient data 2015-03-09 18:33:24 +11:00
09e072a245 Fix T43858: Collision Bounds Display Bug
Was using draw-type when drawing BGE collision bounds.
2015-03-09 17:24:14 +11:00
29e5de3728 Fix BGE: calling ReleaseInstance on NULL joystick 2015-03-09 16:36:35 +11:00
c44f489d24 Fix for clamping large UV coords in UV-panel
Would clamp value ranges in UI when outside hard coded range.
2015-03-09 15:49:45 +11:00
60f7f93c16 Freestyle: Fix for a few line style properties left not copied. 2015-03-09 12:53:16 +09:00
Folkert de Vries
7d38d85340 Freestyle: Fix for references of deprecated texture stroke shaders.
Removed all references of deprecated texture shader.  Also deleted
several lines of dead code.

Since texture_shader.py no longer does what it was supposed to do,
the file itself was removed.

Patch reviewed by Tamito Kajiyama (kjym3).
2015-03-09 12:53:13 +09:00
a0fa3de267 Fix T43624: Freestyle uses wrong colour on second Line Set with textured lines in Cycles.
This is a regression introduced by rBd8b00a3bf5c1 (Freestyle: memory
consumption optimization in stroke rendering).

The issue was caused by uninitialized MPoly::mat_nr values.  Before the
stroke rendering optimization, individual Freestyle strokes were
represented by distinct mesh objects, and thus MPoly::mat_nr was left
unset (i.e., was always zero).  Now that the stroke rendering optimization
has been done and mesh objects may represent multiple strokes of different
materials, MPoly::mat_nr had to be properly set to the material index that
refers to the material of the poly face.
2015-03-09 12:53:11 +09:00
ec18021867 Fix T43337: Group object disappear after append
Relying on user-count of 1 wasn't reliable because of custom-bones.
2015-03-09 14:33:27 +11:00
Severin
573783259d IME: Disable IME for number buttons 2015-03-09 02:27:11 +01:00
Severin
7d5d971dea Fix T43920: Crash when clicking into different area during IME composition
Fix by @randon
2015-03-09 02:27:11 +01:00
a7855f81d4 Fix T43332: Adding polygon int layer failed 2015-03-09 12:23:58 +11:00
fee0e6e211 BMesh Py API: calc_edge_angle functions
Make consistent with calc_edge_angle,
take an optional fallback arg for non-manifold edges
otherwise raise an exception.
2015-03-09 00:47:53 +11:00
b4fccce1f6 BGE: Fix for regressions T43883 and T43456 (and T43876 likely). SDL joystick related
Only to create and destroy joystick devices for connected joysticks

Reviewers: campbellbarton, sybren, moguri

Reviewed By: sybren

Maniphest Tasks: T43883, T43876

Differential Revision: https://developer.blender.org/D1161
2015-03-07 21:27:30 +01:00
c32ded3654 Cycles: add better specializations for SSE shuffle function and few more wrappers. 2015-03-07 17:25:21 +00:00
c8fb488b08 Fix T41066: An actual fix for curve intersection on FMA-enabled CPUs 2015-03-07 16:20:34 +00:00
b7a759502f InstallDeps: Fix stupid typo which broke OIIO building (and nobody reported it :| ). 2015-03-07 14:42:03 +01:00
8dbbb60e8a Fix T43910: Unpack fails when stored filename is broken (empty, or no file part...).
Now we have an helper that will generate local/global paths and ensure they are valid.

Note: We currently have no way to 'generate' a valid extension in these cases, so just
using raw (file-safe) ID name.
2015-03-07 14:41:43 +01:00
cf1227d4ad Fix edit-lattice leaving incorrect point-size 2015-03-07 03:53:08 +11:00
1c3b2c58af Fix issue reported on irc by Sebastian, crash when undoing and changing
screen.

Apparently the screen on the given file did not have a scene attached.

Not sure how this is possible exactly, but for now just guard against it
at load time by assigning default scene in that case.
2015-03-06 14:22:00 +01:00
e95732bced Fix broken "force setting multisamples only once", introduced in b5b359b48f 2015-03-06 13:07:02 +01:00
9794facab3 Fix metaball->mesh removing all metas in the scene
Assumed the entire scene used the one motherball.
2015-03-06 22:46:45 +11:00
6405aa4e9c Fix access freed memory when doing constraints ID counter on main free
Basically just made constraints free function aware of possible do_id_users
argument, same as we've got for objects, object data and so on.
2015-03-06 15:22:25 +05:00
3f572fe7d2 Fix T43905: Crash happens when press Create Plane Track
It was only happening on 32bit platforms because of alignment
differences when allocating class.

Now got rid of copy of eigen matricies stored by value in the
residual block which solves aligment issues and should also
give some unmeasurable speedup.
2015-03-06 14:58:16 +05:00
f682129d62 PyAPI: clarify fallback docstring 2015-03-06 19:02:57 +11:00
8638142c3b Fix T43904: calc_vert_angle returns wrong value
This was mis-named, rename to `calc_edge_angle`
and allow a fallback value in the case when the vert doesn't have 2-edges.
2015-03-06 18:55:36 +11:00
7df60becb9 BMesh: Add extended BM_vert_calc_edge_angle that takes a fallback value 2015-03-06 18:45:00 +11:00
d17e6c10df Cleanup: quiet minilzo warnings 2015-03-06 17:47:23 +11:00
2f21dbf38b Cleanup: unused warnings 2015-03-06 17:30:05 +11:00
a9b7d5e4e8 Cleanup: unused macro warning 2015-03-06 14:17:21 +11:00
b1f4301deb Fix typo in "Add" and "Subtract" mode of Vector Math node.
Differential Revision: https://developer.blender.org/D1003
2015-03-06 02:34:03 +01:00
Julian Eisel
d6a6950547 Correction to previous commit
Calling ensure_lookup_table for each face is stupid! :/
(Noted by Sergey - thx)
2015-03-05 20:36:58 +01:00
Julian Eisel
61aede4305 Fix T43900: "Operator Mesh Add" template fails
Another script that was missing the lookup_table call.
2015-03-05 20:26:41 +01:00
37d7b2d3b6 Revert "COLLADA - support for shadeless material (SHADER_CONSTANT)"
This reverts commit 04b0a9f4b8.
2015-03-05 19:44:23 +01:00
e2d4a93a00 Fix T43880 really stupid mistake from fixing stick mode selection 2015-03-05 19:14:38 +01:00
6f3629607b Make limits of sequencer scaling a bit more sane 2015-03-05 19:05:39 +01:00
7c38ba0a9e Audio library, early exit when animation is found 2015-03-05 18:50:44 +01:00
a7d292394e Fix T43898, correct all uv layers in bevel, not only the active one 2015-03-05 18:50:44 +01:00
04b0a9f4b8 COLLADA - support for shadeless material (SHADER_CONSTANT)
This patch make it possible to export and import shadeless material.

Reviewers: sergey, sauraedron

Subscribers: sergey

Projects: #collada

Differential Revision: https://developer.blender.org/D1094
2015-03-05 18:44:04 +01:00
23af8984bb Compositor: Add sanity check around pass element size and compositor data type
Only happening in the debug builds, avoids issues like recent AO one from happening.
2015-03-05 20:24:41 +05:00
6e1ea04ada Fix T43894: Wrong alpha with bilateral blur node
The issue was caused by AO operation reporting it's a color operation
(which means it's expected to output RGBA) but internally it's RGB
only in the render engine, which caused some memory to be uninitialized.
2015-03-05 20:21:55 +05:00
73d0749a59 Compositor: Fix compilation error with COM_DEBUG enabled 2015-03-05 20:12:28 +05:00
9489205c5c Fix T43865: Cycles: Watertight rendering produces artifacts on a huge plane
The issue was caused by numerical instability whrn having ray origin close to a huge
triangle, which could have aused bad ray distance check.

Watertight Woop intersection isn't really addressing such cases, it's dealing with
small triangles far away from the ray origin instead, so it's a bit tricky yo make
it working reliably.

While we're quite close to the release it's safer to do check in Pleaucker coordinates
if ray close to a huge triangle. Likely this additional check combined with some other
tweaks to the code doesn't cause measurable slowdown in the scenes tested here.

After the release we can play a bit more with this code in order to make it more
stable without Pleucker fallback.
2015-03-05 18:55:30 +05:00
eb16b04b9d CMake: Need to find pugixml.hpp instead of pugixml.h
That's how file is actually called in the upstream.
2015-03-05 17:23:23 +05:00
6883a9bad9 Recent changes broke SDL/GHOST 2015-03-05 21:01:48 +11:00
37771e8fff Cleanup: unused var 2015-03-05 17:58:22 +11:00
61215999b5 Update install_deps for recent CMake change 2015-03-05 17:45:21 +11:00
da0176614b Fix T43672: Cycles preview stalls when out of view 2015-03-05 15:42:01 +11:00
1e817cceb0 CMake: rename LLVM_DIRECTORY -> LLVM_ROOT_DIR
Matching convention with all other libs
2015-03-05 15:42:01 +11:00
acfc0d4a18 CMake: was defaulting to an old LLVM version
Made finding LLVM fail.

only use LLVM_VERSION if set, else set to installed version
2015-03-05 15:42:01 +11:00
30d6589069 CMake: mark lib/debug options advanced 2015-03-05 15:42:01 +11:00
90e1b83696 Fix T43890: Crash, Alt-D over operator redo button 2015-03-05 09:10:16 +11:00
ffee7f1a58 BGE: Fix crash when a constraint misses its reference object
Blender allows you to create a constraint without specifying its reference
object, even when the constraint requires such a reference. The BGE would
crash on this. This change simply ignores such a constraint.
2015-03-04 14:15:41 +01:00
6efcd9e8fe Math Lib: redundant axis flip decomposing a plane
Also add a faster, non-normalized version of the function.

(Neither are used currently used).
2015-03-04 20:11:49 +11:00
b1e48ab4e4 Fix T43879: Autokey ignore pref /w viewlock-camera 2015-03-04 17:15:11 +11:00
cf2876b77a Fix for snap to cursor /w parents (object/pose)
Also don't use pose-bone transform unless the user is in pose-mode.
2015-03-04 15:13:10 +11:00
d48c3666da Snap: ignore unselected items, /w snap from active 2015-03-04 15:13:10 +11:00
27fe640104 Own error in recent commit (Snap active) 2015-03-04 13:28:45 +11:00
c755d8fbb5 RNA: rename mesh validate argument
cleanup_cddata -> clean_customdata
2015-03-04 12:58:14 +11:00
85c38e7389 Fixed wrong label and hint text in Collada exporter 2015-03-03 23:42:33 +01:00
7f25da6509 fix T43094 Added check for out of bounds in vertex color array 2015-03-03 23:42:32 +01:00
d544bc5cd5 Cycles: Fix embarrassing type remained after getting rid of utility SWAP() 2015-03-04 00:16:21 +05:00
ed5df50192 Cycles: Fix/workaround for toggling world MIS causing CUDA to fail
Seems it's just another issue with the compiler, worked around by explicitly
telling not to inline some function.

In theory we can unify this with CPU, but we're quite close to the release
so better be safe than sorry.
2015-03-03 18:48:37 +05:00
19656233dd Style cleanup 2015-03-03 13:43:47 +01:00
d58a15c0a6 Windows: Add stacktrace support when unhandled exception occurs.
We need to register the exception handler slightly differently here, as
well as adding DbgHelp as a library, but according to docs it should be
supported in recent Windows editions (Win XP included even).

We can try it first and revert if there are issues.
2015-03-03 13:39:15 +01:00
b42a3d2485 Another stability commit for legacy users - don't crash when toggling
dyntopo just notify user that their system doesn't support it.
2015-03-03 11:34:23 +01:00
f2bc3dd678 Grrr, missed those ones in previous commit! 2015-03-03 10:44:14 +01:00
82cafcfdb7 UI messages fixes... 2015-03-03 10:40:52 +01:00
23330473e3 Cleanup: remove unused collada conversion 2015-03-03 15:40:34 +11:00
26a251202b Fix mesh-validate for polys using successive verts 2015-03-03 15:32:35 +11:00
34003dd034 Fix T43151: Collada meshes crash Blender
We have multiple reports of collada files crashing, run all meshes through validate.
2015-03-03 15:30:45 +11:00
6d5ab8fdb7 Cleanup: collada had own defined Global (why?)
Wasn't needed and made linking fail here
2015-03-03 15:07:19 +11:00
6856ea0642 Bugfix T43866: 'Purge all' button in the outliner
The cleanups in 08a2101 forgot to modify the UI code which was using these values.
2015-03-03 12:52:18 +13:00
e2c24a18e3 Knife: fix glitch dragging mouse outside the face
Had a small gap between the last-vertex & new-cut
2015-03-03 09:29:44 +11:00
Julian Eisel
c271a9fa8b Fix T43864: Saving from top area in fullscreen changes wrong area into File Browser
We now always use the actual fullscreen area.
2015-03-02 22:38:59 +01:00
d2b6c6fd9b Fix T43862: Knife fails with concave ngon 2015-03-03 00:26:20 +11:00
8c6073db11 BMesh: BM_loop/edge_point_side_of_loop_test
change behavior to use a negative number when outside,
and return the signed, squared distance.
2015-03-03 00:26:13 +11:00
e38dc33f80 Fix dist_signed_squared_to_corner_v3v3v3 with concave corners 2015-03-03 00:20:53 +11:00
cea3892813 Revert "Reshuffle applying of solver results a bit to ensure it works exactly"
This reverts commit 4c723eb80e.
2015-03-02 12:18:57 +01:00
bc20a745be Fix T43859: Texture baking crashes blender
The issue was caused by particles using billboard distribution, which
requires either object to be specified or camera in the scene to be
existing.

This commit prevents backing from crash, but bake result might not be
totally expected because of the thing mentioned above.
2015-03-02 16:08:23 +05:00
4c723eb80e Reshuffle applying of solver results a bit to ensure it works exactly
as complicated as before cloth solver changes.

Still doesn't solve the collapsing cloth cube issue mentioned in T43406,
probably the bending springs work somewhat differently now.
2015-03-02 11:47:42 +01:00
1adfa36f88 Fix missing newline in the button cycle error print 2015-03-02 14:26:52 +05:00
520646b421 cleanup: whitespace 2015-03-02 16:51:01 +11:00
3281c3f3ce error in last commit 2015-03-02 16:51:01 +11:00
6373078321 Fix T43848: Wrong direction recalculating normals
Face islands furthest faces could face towards the center point when connected to sharp edges.

Now check the furthest edge of the furthest face, to test for face winding.
2015-03-02 15:51:07 +11:00
9d85e32ee3 BMesh: calc normals, use area weighted center
Prevents many small faces skewing center calculation.
2015-03-02 13:04:46 +11:00
56935e23c4 cleanup: float/double promotion, redundant casts 2015-03-02 11:05:34 +11:00
2058505da4 Bugfix T43851: Creating a new action after stashing crashes blender 2015-03-02 05:05:04 +13:00
f076eb482b Use the old double-step collision method only for cloth.
This method does not work for hair anyway. Even though hair collision
needs work at this point, it's still better than nothing.
2015-03-01 15:37:55 +01:00
dfefd36837 Fix T43406: Bring back cloth collisions.
This was disabled during the course of hair dynamics work. The cloth
collision solution is based on a secondary velocity-only solver step.

While this approach is usable in general, the collision response
calculation still does not work well for hair meshes. Better contact
point generation is needed here (Bullet) and preferably an improved
solver for unilateral constraints.
2015-03-01 12:33:30 +01:00
9f6f151536 I18n: Do not skip Polish anymore, translation work has started on it. 2015-02-28 21:51:17 +01:00
4ad31d5bab NLA Drawing Tweaks
* Strips in muted tracks are also drawn with dotted borders now to make it clearer
  that they are not contributing.

TODO:
* Perhaps dotted should be used for protected, and opacity for muted instead?
2015-03-01 02:34:54 +13:00
46ad5b6f67 Tweaks for NLA and newly added Action Stash Tracks
* Do not make Action Stash Tracks or their strips active/selected
* Lock the track to prevent accidental editing/adding of other strips

* Prevent strips from being added into locked tracks by the pushdown operator.
  This is mainly to prevent pushdown actions from getting into the stash tracks.
2015-03-01 02:34:53 +13:00
ea84b0e4ac Action Editor: "New Action" operator now stashes old actions, and is used by default again
This commit modifies the "New Action" operator to always stash the old action
before it creates a new one. As a result, the old active action will now have
a proper user of sorts after the new one is created, preventing previously
created actions from being lost.

Now that the New operator does this, it can be used for the Action Editor header AND
NLA Editor (Animation Data Panel -> Active Action) again. The "stash and create"
operator is somewhat redundant at this point as a result.
2015-03-01 02:34:52 +13:00
741a66e472 Action Editor WIP: Adding new actions in Action Editor now uses the "stash and create new" operator
In constrast to the old "new" operator, this operator will stash the existing action
in the stack to prevent it from being lost. This situation isn't totally ideal yet,
since the NLA Editor still calls the old method.
2015-03-01 02:34:51 +13:00
13a0dce51c Action Stashing: Don't allow an action to get stashed more than once 2015-03-01 02:34:50 +13:00
b16fbabd61 Reshuffle code 2015-03-01 02:34:49 +13:00
7c611e2204 Code Cleanup: Deduplicate logic for getting AnimData block associated with Action Editor modes 2015-03-01 02:34:48 +13:00
2b51eab69d Code cleanup: Split off the creation and setting logic for new actions into different functions
This is also just as prep for the next step
2015-03-01 02:34:47 +13:00
9c82a0478f UI Tweak: Display labels for Push Down and Stash
I'm still not sure which version is better, but I suspect that with the labels,
this might help users figure this out more than if they were just unlabelled
icon buttons...
2015-03-01 02:34:46 +13:00
8d2fc99618 Code Cleanup: Separate out the logic for stashing actions into a separate function 2015-03-01 02:34:46 +13:00
ac30378e3e Action Editor: Stash Action Operator
This operator (the snowflake icon, beside the pushdown button on the Action Editor
header) adds the currently active action to the NLA stack in a muted track, then
creates + loads a new action ready to be populated with new keyframes.
Since the NLA is being used to hang on to all the actions here, no actions are
getting lost.

Usage Notes (there will be some additional tweaks to make this nicer):
* To preview different actions that have been "stashed", simply click the "Solo"
  toggle for the track containing the action in question. Playing back the NLA will
  now show the stashed track
* To edit a previously stashed action - simply enter tweakmode on it in the NLA
  while the "Solo" toggle is enabled.

Todo:
* Add some more operators here to polish up the Action <-> NLA bridge to make the
  layered and stash workflows smoother. Examples include some tools to easily
  switch between the different actions layers in the stack, as well as making it
  easier to get out of tweakmode (and sync up the action lengths)

* Review and cleanup the behaviour of the "new" operator here to avoid the old
  problems that users were running into

* After the next release - Implement the full Action Libraries functionality, with
  ways to bridge the stashed strips over to a full-blown library.
2015-03-01 02:34:44 +13:00
7af4690295 NLA: Auto-Blends option is no longer enabled on all newly added strips
This may be put back again later, but currently, this is a bit too trigger-happy
to have it on. It tends to mess up results more than it helps.
2015-03-01 02:34:43 +13:00
b44201d8b9 Fix for NLA Solo/Mute behaviour
The Solo and Mute functionality for the NLA system should really be mutually
exclusive features. They both affect whether a given track applies or not.
The only difference is that the Solo option mutes all the others, while the Mute
only does this on a per track basis.

Before this fix, muting a strip and then making it solo meant that the solo'd
track would not play at all, which isn't really what we want.
2015-03-01 02:34:43 +13:00
bb7ce9173a Fix for previous commit: Pop up a warning in cases where the operator will refuse to do anything 2015-03-01 02:34:42 +13:00
b28a24091f Action Editor: Added "Push Down" operator to send the current action on to the NLA Stack
This commit exposes the "Push Down" button/functionality found in the NLA Editor
to the Action Editor, so that actions can be added NLA Stack from here too. The
main point of this for now is to make the whole layered-animation workflow nicer
more efficient, but not requiring the second editor be visible in common cases.
It also conveniently sets things up for the next few changes (already hinted at
here)...
2015-03-01 02:34:41 +13:00
cec1691a91 Code Cleanup: Clarify some comments regarding usercount management
(Note for the uninitiated looking at the diffs: this is very much *not* what
 you're probably thinking right now, if you're looking at the line in
 act_new_exec())
2015-03-01 02:34:40 +13:00
8bb3e2a3ea gameengine physics: moving collision filtering inside the collision panel and relabeling some parts 2015-02-28 09:09:55 +00:00
b00fecc85d UI: place camera DOF buttons to be more compact 2015-02-28 17:26:05 +11:00
08a2101eb6 Outliner: rename "Orphaned Datablocks" menu item
Makes the drop-down push searchbox out of the view (which is already quite cramped)
change to "Orphan Data".
2015-02-28 16:24:54 +11:00
38c30c41d7 BGE: Fix ShowDeprecationWarning macro.
Reviewers: lordloki, brita_, sybren, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D1144
2015-02-27 23:10:43 +01:00
fff8a519b8 Py Enum props definition: 'default' parameter cleanup/fix.
* There was no real default value for this parameter (neither "" nor None would work the same as
  not specifying that parameter). Now, 'None' is considered as default value, and you get
  exact same behavior with this value and if not specifying it. This is important at least for
  consistency, and potentially too in some esoteric cases (like generated code or so).
* Add a warning about the fact that 'default' parameter shall not be psecified when items
  are given a callback function.
2015-02-27 23:02:13 +01:00
12f60e7825 Fix T43834: Text object looses one char after another by entering/leaving edit mode.
Own mistake in refactoring of `BLI_strncpy_wchar_as_utf8()`, if given size was exactly
the one needed, we'd lost last char (off-by-one error).

Many thanks to plasmasolutions (Thomas Beck) who found the issue and did
all the investigation work here!
2015-02-27 21:31:54 +01:00
15957a9e4d Get rid of gluScaleImage in our game engine as well. 2015-02-27 14:47:39 +01:00
55e7d726c4 Make some adjustments to the units for viewport camera dof.
This is still not so correct, to make it work we really have to do a
blurring pass based on the real coc (currently we are just blending 3
levels of blur)
2015-02-27 14:11:26 +01:00
d7a877b69c Fix WPaint inactive when painting on a vgroup and the only other vgroup is locked.
`enforce_locks()` would reset weights of non-locked modified vgroups if it could not
find any other non-modified non-locked vgroup to 'distribute' weights into.
Sounds rather stupid, yet I hope I did not break something else, this code
is rather convoluted to say the least.

Side-reported by zeauro (ronan ducluzeau) in T43814, thanks!
2015-02-27 11:46:55 +01:00
a7e80a9470 Fix T43814: Skinning : set parent with automatic weights doesn't take into account locked vertex groups.
Simply skip a bone's vgroup when it already exists and is locked.
2015-02-27 11:46:55 +01:00
af032873a2 error in last commit 2015-02-27 20:58:32 +11:00
9ab28727ac Fix T43605: Spot Cone+Curve creates odd shadow
Curves could leave glFrontFace in an unknown state.
2015-02-27 20:54:57 +11:00
9683c2b129 Fix T42833: Kink on nurbs curve
Threshold for normalizing was too big.
2015-02-27 20:16:51 +11:00
0b67c21077 Fix T43807: invalid mesh from 2-sided cyclic curve 2015-02-27 17:43:10 +11:00
7293291a40 cleanup: typos 2015-02-27 15:57:59 +11:00
cfd176bcb1 MEM_SAFE_FREE caused issues /w const & GCC5 2015-02-27 15:26:22 +11:00
5520b8df4b cleanup: double promotion 2015-02-27 14:52:58 +11:00
2a5e92c989 cleanup: use GHOST_PRINT instead of stdio
Mostly from my own NDoF stuff.
2015-02-26 21:21:11 -05:00
6cb692f48e cleanup: ghost Win32 event processing functions
Removed window arg from key conversion functions.

Removed processModifierKeys declaration since that function was
apparently never implemented.

Using Win32-specific classes instead of their generic superclass -- this
helps in a few cases like WinTab.
2015-02-26 19:53:55 -05:00
a6ebc9a813 Compile fixes for mingw64
* m_hDC was always included after m_hWnd in all the constructors and other functions,
  but the order was reversed in the struct, meaning that they would not get initialised
  correctly

* Got rid of the gotos for the error handling case in initializeDrawingContext()
  This was causing "jump to label ... crosses initialisation" errors for the calls
  to get GL version string info (i.e. const char *vendor = ...;  etc.)  I wasn't sure
  if those glGetString calls needed the rest of the context to be defined first, so
  I decided to leave them where they are now, and got rid of the gotos (which were
  making this particular piece of code a bit confusing) instead.


TODO:
There are still a bunch of warnings about around 660, which I haven't managed to solve
(but at least they won't prevent Blender from compiling)

  narrowing conversion of '(stereoVisual ? 1063 : 1061)' from 'int' to
  'DWORD {aka long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]
2015-02-27 13:14:09 +13:00
7aa91f5fbc cleanup: ghost Win32 IME
Took out lots of redundant function calls (getters). Also wrapped more
code in WITH_INPUT_IME guards.
2015-02-26 18:40:34 -05:00
87dc01e690 Fix T43806: Knife project crashes
Need to re-create the bmbvh after executing the cut.
2015-02-27 09:53:23 +11:00
90cc2643e9 cleanup: spelling & typos
Comments only, no functional change.
2015-02-26 14:12:24 -05:00
eaabe9d6c6 BGE: Fix for CreateConstraint API
This patch fix two bugs related to CreateConstraint().
1. Disable linked collision only working with 6DoF constraints.
2. If all pivot axis rotations setted to zero the linked object disappears.

{F101374}

Reviewers: moguri, sybren, brita_, lordloki

Reviewed By: lordloki

Subscribers: p9ablo

Differential Revision: https://developer.blender.org/D704
2015-02-26 20:08:22 +01:00
0aa258117d Fix T43303 impossible to select a joint in stick bone edit mode.
Things here are simple, selected bone joint could have same priority as
unselected bone, so bone would always win. Gave joints a little more
priority than bones, usually user will be more precise just to select
the joint anyway.
2015-02-26 15:44:06 +01:00
84f314c875 Remove redundant glInitNames calls (shouod be handled in selection code
now.)
2015-02-26 15:20:30 +01:00
46fe39ff31 Fix T43479 animated textures lost after going to a frame before animated
frame start.

Issue here is that if we failed to get an image from the cache, we would
try to load from file. This would fail when the queried frame was less
than the animated sequence start frame, and invalidate the OK state of
the image.

Solution is that when loading from cache succeeds, we also reset the OK
state of the image for animated textures.

The fix might be relevant elsewhere too, but kept it isolated just in
case.
2015-02-26 15:10:19 +01:00
13c275ce84 Fix T42506 sequencer not limiting zoom.
Fix by Campbell thanks!
2015-02-26 14:27:33 +01:00
60679a171d Revert "Cleanup: Simplify camera sample motion blur code."
This reverts commit 8197f0bb64.
2015-02-26 13:27:02 +01:00
f159ed7746 Workaround T43491: Python readline causes crash
loading 'readline' module could crash blender if 'libedit' was already linked (via LLVM).

Workaround the problem for now since we don't even need readline,
a _real_ fix likely involves changing how LLVM or Python are built.
2015-02-26 22:54:18 +11:00
d9fa9bffd5 Grmll, sorry for the noise, fix stupi cpoypaste typo in previous commit. 2015-02-26 11:46:05 +01:00
ac26a61385 Attempt to fix BGE build on windows.
Caused by rBb5b359b48f7f35a79b3eec, better to try a full build before pushing that type of commit. :/
2015-02-26 11:42:22 +01:00
98e3694c39 Fix T43817: issue with non-utf8 encodings in Windows paths, again...
We need to use 'W' widechar variants of win funcs and convert wchar to utf8-encoded bytes
in those cases, sigh...

Note: theoritical fix only, need org reporter to test it...
2015-02-26 11:27:58 +01:00
88facb8876 Fix potential buffer overflow in BLI_strncpy_wchar_as_utf8(). 2015-02-26 11:27:58 +01:00
8197f0bb64 Cleanup: Simplify camera sample motion blur code. 2015-02-26 10:30:01 +01:00
31f6e621b8 Fix T43643: Solidify crashes with 'only-rim'
When verts were shared by 2+ face-islands, the number of allocated edges was wrong.

Cleanup the logic for new verts/edges.
2015-02-26 18:48:22 +11:00
d282728f1d mesh_validate: don't add invalid edges into the hash 2015-02-26 17:49:21 +11:00
7708012b9d Change samples variable for SSAO - now it is actual samples, not squared
- spiral scheme is much more intuitive here. Also use float number for
spirals to avoid having samples on the same radial direction when sample
number is divisible by spiral number.
2015-02-25 23:30:50 +01:00
22ab4e6e13 Use spiral mapping for SSAO - it reduces banding a lot, especially in
higher sample counts. Probably a blurring pass might be a good addition
here as well.
2015-02-25 23:10:01 +01:00
442664e02c SSAO: sampling coordinates go out of screen, reject the sample
Previous behaviour would get occlusion at borders which could create
over occlusion at edges of the screen.
2015-02-25 22:05:03 +01:00
6a65bc91e2 Minor message fixes - thanks to S.J.Bennett for the heads up 2015-02-25 14:41:54 +01:00
df258c9054 Fix silly mistake with flags which would make stereo buffers unsupported 2015-02-25 14:15:07 +01:00
5d01db8035 Make the message even more clear in case someone does not know what GPU
is

(we are talking about people who won't have installed a driver -
anything is possible)
2015-02-25 14:09:40 +01:00
b5b359b48f Warning messagebox for windows when an unsupported implementation of
OpenGL is detected:

Hoping to decrease the frequency of by far one of the most frequent bug
reports by windows users.

There is some reorganization of the GHOST API to allow easy addition of
further OpenGL options in the future. The change is not propagated too
deep to keep the size of the patch managable. We might reorganize things
here later.

For OpenGL we do two checks here:
One is a combination of GDI generic renderer or vendor microsoft
corporation and OpenGL version 1.1. This means the system does not
use GPU acceleration at all. We warn user to install a graphics
driver and of cases where this might happen (remote connection, using
blender through virtual machine)

The other one just checks if OpenGL version is less than 1.4 (we can
easily change that in the future of course) and warns that it is
deprecated.

Both cases will still let blender startup correctly but users should now
have a clear idea of the system being unsupported.

A user preference flag is provided to turn the warning off.

Now stop posting those bug reports without installing a driver first -
please?
2015-02-25 13:51:53 +01:00
1da5e8df6f error in last commit 2015-02-25 18:19:39 +11:00
83caabebd2 CMake: error making get_blender_version a function
Incorrect use of PARENT_SCOPE meant the vars would be used uninitialized elsewhere.
2015-02-25 18:15:54 +11:00
37556d9a9a Fix T43798: Individual origins disabled object PET 2015-02-25 13:41:02 +11:00
565df1559f T43771: Fix
There is a difference between the socket order of the BokehBlur node and
the BokehBlur operation. Socket[2] and Socket[3] have switched their
order.
2015-02-24 20:28:12 +01:00
6ddd2549ed Fix T43535 - weight paint issues
Two issues in this report:

* Shift-F key conflict between painting and selecting mirrored bone
(moved select mirrored to ctrl-shift-F)
* It was possible to display texture overlay in weight painting, even
though the mode does not support textures yet.
2015-02-24 20:12:49 +01:00
cc388ccca4 Add Inset Faces to the mesh edit mode toolbar.
Inset has been missing from the toolbar for a long time, even though it's a fundamental mesh tool. It now lives, happily, alongside Extrude.
2015-02-24 12:19:24 -06:00
2dd37614bc Cleanup leftover code from previous commit 2015-02-24 17:28:43 +01:00
50e9868abe Fix T43785 crash with border select.
Naming here is slightly misleading. We have:

* Number of elements (objects) that can be picked
* Buffer size
* Number of integers in buffer.

Interestingly enough, bufsize in OpenGL (as far as I could find in
examples on the web) and in most of the code refers to the latter and
actual buffer size is only used whenever we do allocations on the heap.
Added an extra defines here to make things a bit clearer:

* MAXPICKELEMS refers to the number of objects that can be picked
* MAXPICKBUF   refers to the number of integers in the selection buffer

Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4.
That means that some parts of blender will use less space for selection
now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be
changed at any time, but I think 10000 integers on the stack touches the
borders of uglyland anyway.
2015-02-24 17:19:07 +01:00
340b76b42c Patch D843 by Alexander Romanov, fixes to the naming of the material
node so it's more similar to the names in the material properties
2015-02-24 16:15:46 +01:00
831a111353 Fix T43792: Connect faces fails with ngons
Complex ngons that intersected the path multiple times would fail to connect.

Now find closest intersections in both directions.
2015-02-25 00:08:39 +11:00
6c96113d5f Modifier: no need to calloc (immediately filled) 2015-02-25 00:08:38 +11:00
07c61e9389 Fix T43743 R key not working after recent rake/random source
refactoring.

Use a new menu instead of old enum key.
2015-02-24 11:56:26 +01:00
77faefb453 Fix T43634: Selecting 'Drop Color' from spacebar menu causes instant close
This is an internal operator, should not be invoked manually.
2015-02-24 14:38:49 +05:00
625101da99 RNA: correct enum flag callback
Was returning NULL, auto-completing:

    bpy.types.Material.bl_rna.properties["type"].

Would crash, accessing 'default_flag', thanks to @lukastoenne for investigating.
2015-02-24 19:45:56 +11:00
a585cbd2af Fix T43783: Cycles clipping doesn't match viewport when camera is inside volume
Ray length adjustment got lost in some refactor commit back to 2.71 days.
2015-02-24 13:07:52 +05:00
4c75f77669 Fix T43784: Compositing scale node border error
This was still the known issue with pixel center, original commit didn't cover all the
cases by the looks of it.

Should be all fine now, but much more intense testing is welcome.
2015-02-24 12:42:31 +05:00
1f527c6033 Fix BKE_mesh_validate_arrays, ignored do_fixes 2015-02-24 13:10:15 +11:00
cdd14ea96d Cleanup: use bit-shift for bmesh_elem_check 2015-02-24 13:10:15 +11:00
Dalai Felinto
abd630de62 Disable Bake Jitter code (recently added)
The following commits were supposed to add anti-alias and help with OSL
baking:

7b16fda379
1b92dfa961

However they introduced other issues (artifacts mostly), see T43550 .
Leaving the code ifdef'ed for now.
2015-02-23 17:50:44 -03:00
4f86f62f32 RNA: use 0/1 for pose layer operator 2015-02-24 07:43:04 +11:00
225f68c324 Fix interpolation functions ignoring number of components when doing early output 2015-02-24 00:36:33 +05:00
2081fd1d7d Gooseberry request:
Show World will now influence if world is rendered in opengl rendering.

This is a little undefined according to blender history, since sky used
to always be drawn when offscreen rendering, as if "Only Render" was
ticked. Since if we don't draw sky in that case there's no valid color
really (and using theme colors is not so nice) we just draw transparent
background.
2015-02-23 18:49:29 +01:00
67fcf5256d Move allocation of imbuf from array to allocimbuf.
Skip allocation of temporary imbuf
2015-02-23 17:19:31 +01:00
97422ea64f Cleanup: Simplify brick texture code a bit. 2015-02-23 16:49:50 +01:00
Dalai Felinto
249f2b9ccf RNA: use 1/0 for move layers operator
internal api Consistency.

For the records, I suspect there are still a few cases of this. I found
this by chance (moving an object to a different layer), and I ran into
the previous one (fixed by Campbell) as well (by adding a cube).

Anyways, since it only happens when building with crash on asserts is
not a big issue. But by the time we change RNA to use bool instead of
int it would be nice to do a call for test to prevent those breaks.
2015-02-23 12:34:15 -03:00
9626f4fdf5 GPU module: get rid of gluscaleimage - game engine also uses that but
commit to remove from there will be done separately due to issues with
linking.
2015-02-23 16:33:18 +01:00
1940cf5a0b After discussion on irc change new function to only allocate from a
buffer only. scaling can be done separately
2015-02-23 16:30:37 +01:00
041f706506 IMB library: Add function that scales an array of byte or float pixels.
Function just wraps the array in an imbuf and does regular imbuf
scaling.
2015-02-23 15:51:30 +01:00
eacc3debb7 Fix compilation error after recent GPU debug changes 2015-02-23 18:09:28 +05:00
ced19783fd Fix mismatch (missing 'const' to mactch funcs declarations).
Was breaking windows compile, reported by bdancer over IRC, thanks.

Also, quite some annoying 'unused vars' warnings (debug-only vars).
2015-02-23 13:57:02 +01:00
fed61d50c7 Debug GPU functionality from soc-viewport_fx by Jason Wilkins
patch number D706 with changes:

- WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging
system functions) but leaves the checks we had intact. Old patch
added the debug functionality only if we had the flag on to save some
performance.

Rationale here is that we might not want to recompile blender just to get
the extra information, and having users start blender with a -d flag to
get the extra information is also useful for bug reports. Those checks already
existed and most expensive ones are hidden behind a debug mode check
so performance should not be that bad.

- Did some cleanup of existing functionality:
When things go wrong blender side, just print the error,
don't check for GL errors first.

- Did not port changes needed for GLES to regular glew.h

- Got rid of duplicate or very similar new functionality.

Generally, code is more moving things around/cleanup and should work exactly
as before apart from the debug context, so it's safe to add even now.

It also provides a nice substitute function for glu error descriptions
2015-02-23 13:35:57 +01:00
34479d8b63 Snap to Active: missing armature/pose/mball/curve
de-duplicate active center calc between transform & snap-to-selected.
2015-02-23 23:05:54 +11:00
17b8479101 Fix T43774: Snap to Cursor ignores active pivot 2015-02-23 22:26:19 +11:00
ec36e3ae80 Fix T43776: Rigging : Clear User transform is not working when mesh is in weight paint mode.
Use same trick as for regular 'clear transform' operators to get a valid armature
in weight paint mode (where active object is weight-painted one).
2015-02-23 12:23:13 +01:00
8ee2b01b04 Fix T43740: 'Back to Previous' failed on reload
Would restore with the file-selector where the 'info' header should be.
2015-02-23 21:33:14 +11:00
b497eae0a8 Screen: remove redundant NULL check in ED_area_prevspace 2015-02-23 21:06:55 +11:00
86cfbeec6a Partial fix for T43740
ED_area_data_swap would put the screen in an invalid state and crash.
(SpaceLink.spacetype didn't match ScrArea.type)

However behavior is still odd in the instance of the report.
2015-02-23 20:02:54 +11:00
96c452bdf6 Fix T43769: Envmap Texture copy looses image 2015-02-23 18:22:09 +11:00
7c03ef295b CustomData: const correctness 2015-02-23 16:17:16 +11:00
0c4fb47edd BLI_utildefines: correct comment 2015-02-23 16:17:16 +11:00
64b328f22b Edge/Vert Slide: avoid redundant loop angle calls
No need to calculate loop angle for each layer
2015-02-23 15:44:28 +11:00
bc876f9ea4 Error in last commit
Accidentally left in malloc/free
2015-02-23 15:40:43 +11:00
5a372dbd89 Fix error in recent vert/edge-slide commits
`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied.

This was a bit confusing since the source args have it applied,
and in some cases we only have the destination with the offset.
2015-02-23 13:57:06 +11:00
50c977b54d CustomData: replace calloc -> malloc
stack array is uninitialized, relying on calloc here would just hide bugs.
2015-02-23 13:57:06 +11:00
d580c90469 CustomData: const correctness for interp() 2015-02-23 13:54:33 +11:00
c26fa67bcd BLI_utildefines: add pointer offset macro
Handy since it keeps the type of the original.
2015-02-23 13:50:12 +11:00
765b842f95 Subsurf: missing NULL checks on free 2015-02-23 08:34:20 +11:00
Julian Eisel
0f1ffd4792 Fix T43768: Pointcache end frame ignores preview range
Fix for T43768

This way it works consistent with cloth, softbodys, etc.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D1134
2015-02-22 17:14:19 +01:00
63b0a7feb2 Cycles: Make it survive if preview_cycles.blend uses persistent data
Currently should be no functional changes, but nice thing to have fixed
for some further experiments.
2015-02-21 19:18:20 +05:00
6d9c99422b Fix T43748: MouseLook actuator raises an Assert error
An assertion seems to be inverted by mistake, as MT_assert(!m_mouse); is followed
by using m_mouse->XXXX.
2015-02-21 14:39:04 +01:00
813dcb9feb GPencil: Another fix for the "big square dots" problem
Strokes containing only a single point are now drawn so that they respect the
pressure values too. Previously, they were getting drawn at a fixed size based
on the thickness of strokes. Thanks to @kekeljevic for posting a screenshot which
made the problem here easy to identify!

(On a side note: Perhaps it's a combination of the drivers I'm using, or the
multisampling goodness at work, but after applying this change, the dots are
now appearing as round circles as originally intended, and can also be scaled
up quite a bit too. And that's for 3D points which couldn't be affected like
this earlier! I'm not sure what's going on here, but whatever it is, I like it ;)
2015-02-22 02:09:52 +13:00
6ec05eb3e6 Code cleanup: Use bools instead of int 2015-02-21 17:50:05 +05:00
578cc2143d Cycles: Add note about autodiff in OSL wireframe shader 2015-02-21 17:31:41 +05:00
888d810185 Cycles: Use lower progressive update timeout for preview rendering
This ways previews are refreshing with the same ratio as job was expecting
this to happen, giving more instant feedback on the changes.
2015-02-21 17:30:29 +05:00
a97bc1bedf Fix T43755: Wireframe attribute doesn't work with displace
This attribute missed derivatives calculation.

Not totally sure what's the proper approach for algebraic derivative
calculation, so calculating them by definition. This isn't fastest
way to do it in this case and could be replaced with some smarter magic
in the wireframe calculation loop.

At least currently implemented approach is better than nothing.
2015-02-21 17:30:29 +05:00
3445ff0f93 scene conversion: style cleanup 2015-02-21 12:16:21 +00:00
4c0adb95dc gamengine: removing useless comment 2015-02-21 12:16:21 +00:00
9bfdcc4d32 gameengine: removing addInitFromFrame hack 2015-02-21 12:16:20 +00:00
5785df431b gameengine: dataconversion import and whitespace cleanup 2015-02-21 12:16:20 +00:00
f15bb2b793 doxygen: updating blender version and link to tracker 2015-02-21 12:16:20 +00:00
7501bdc52e python bge.types module - Updating documentation to close T40778 2015-02-21 12:16:20 +00:00
8db9b07cb3 Fix T33762 - texture fonts were not using the material color (gameengine) 2015-02-21 12:16:20 +00:00
f1a65a9fab makeScreenshot - adding frame number to the filename 2015-02-21 12:16:20 +00:00
cf4646b95f commiting patch to fix T30173 2015-02-21 12:16:19 +00:00
c391a67830 gameengine: KX_Scene comment cleanup 2015-02-21 12:16:19 +00:00
cfec320f1e BGE cleanup: removing unused async logic bricks
This code was never run and is an outdated copy from the code above.
If someday this is needed again, it is better to start clean.
2015-02-21 12:16:19 +00:00
e0187ec0c3 Documentation update: references to OpenGL tutorials in the python bgl module 2015-02-21 12:16:19 +00:00
7bd4c78a1a Cleanup: Put all Bump dx/dy code in the beginning here, same as with other nodes. 2015-02-21 12:55:19 +01:00
913e109f14 Correction for RNA getter of use_save_buffers 2015-02-21 12:47:29 +05:00
09893ec7fc Cycles: Workaround for NVidia OpenCL compilation
It was complaining about explicit __constant to __private memory conversion,
which is now worked around using implicit conversion.

It's not a real fix i'm afraid and i'm still failing to build OpenCL kernel
with latest Linux drivers, but maybe it'll let someone else to investigate
what causes compiler to run out of memory?
2015-02-21 12:35:06 +05:00
87572091fb BGE: Fix T43215: Rigidbody constraints deletion.
Deleting an object was deleting all rigidbody constraints in the scene.
Bug was introduced with D701.

Reviewers: agoose77, sergof, moguri, lordloki, sybren

Reviewed By: lordloki, sybren

Subscribers: sybren, hbar, blueprintrandom, sergof, agoose77

Differential Revision: https://developer.blender.org/D1007
2015-02-20 23:37:32 +01:00
1b92dfa961 Fix T43550: Bug in Cycles Bake Texture
Issue was caused by the changes in 7b16fda which changed the initial
state for rng. This commit makes it so the same initial hash is used
(which solves the regression without distorting AA-looking image.

It also makes it so OpenCL compiler is happy about this code (before
this change it'll complain about trying to cast private variable to
global one).
2015-02-21 01:56:48 +05:00
f7a2a36b31 RNA: use 1/0 for object layers
internal api Consistency.
2015-02-21 02:10:08 +11:00
8e955449a8 Yet another commit to get rid of missing faces in fill brushes.
We are now guarding against some divisions by small values.
There are still issues here but they are not on boundary faces
anymore so they must be related to some other issue such as
the triangle intersection test.
2015-02-20 15:11:24 +01:00
d12eba61a5 Sequencer: allow scene volume above 1 2015-02-21 00:08:56 +11:00
de4dcda545 Fix T43651: New pointiness attribute doesn't work with displacement
Simple fix: just make pointiness aware of bump offset.
2015-02-20 17:20:24 +05:00
51b0ae8a85 Fix T43739: bad documentation for bmesh py intersect_face_point()
Previous text could make think this func was checking whether a point was
inside and on the face, while it actually checks whether the projection
of that point onto the face is inside its boundary...
2015-02-20 10:54:26 +01:00
185e301229 RNA: correct bool callbacks 2015-02-20 19:54:51 +11:00
d0978103ae Revert "Cast result of rna_RenderSettings_use_game_engine_get to {0, 1}"
There are more flags that trigger this assertion, so I want to discuss
an appropriate way to fix it before changing them all.

This reverts commit b1191e5caf.
2015-02-20 08:41:31 +01:00
b1191e5caf Cast result of rna_RenderSettings_use_game_engine_get to {0, 1}
rna_RenderSettings_use_game_engine_get() in rna_scene.c would return 0 or 2,
whereas the assertion in rna_access.c:1843 indicates that boolean values
should only be 0 or 1.
2015-02-20 08:36:50 +01:00
f9a5dab529 RNA: calloc -> malloc when fixbuf is uninitialized 2015-02-20 17:18:41 +11:00
919e38cfc8 Fix for unlikely NULL pointer dereference
Potential crash reading freestyle modifiers from future blend-files
2015-02-20 17:18:41 +11:00
1ec83f41c1 Fix possible (unlikely) memory leak 2015-02-20 17:09:40 +11:00
83220ab7fb Cycles: Use size_t for aligned allocator
Seems it got changes by accident to int during guarded allocation work,
causing bad memory allocations.
2015-02-19 22:19:29 +05:00
2ddfd3a123 Skip flip check in cases where it's not needed. 2015-02-19 16:58:35 +01:00
f56fd1c47a Remove flipping for colinear case/ In such cases it is doubtful whether
face orientation is really meaningful
2015-02-19 16:51:51 +01:00
b1d02f3d57 Projective painting: Only dither if factor is more than zero 2015-02-19 16:48:51 +01:00
efb20dacc6 Fix T43735 painting on perpendicular to the screen polygons is
problematic (still!)

It seems due to floating point precision issues we have to account for
even more cases.

Added colinear check for one more triangle edge-vertex and assumed that
if no collision test is found then triangle is completely inside box.

Such cases are mostly from float precision not catching triangle just
outside bucket. Now tests are much better for simple tests (paint/flood
fill cube from ortho view, paint sphere), however there are still some
rare cases of stray pixels.
2015-02-19 16:48:17 +01:00
7f406a53c7 Cycles: Cleanup for indentation in device_cpu.cpp
Perhaps became broken after rather recent change about which entry point
to kernel to use.
2015-02-19 19:05:04 +05:00
3bc9ac19f5 Cycles: Free memory used by intermediate BVH vectors earlier
Ideally we should get rid of those temporary vectors anyway, but
it's not so trivial because of the alignment. For untl then we'll
just have a bit worse solution. This part of code is not the root
of the issue of memory spikes for now anyway.

But since we're getting rid of temporary memory earlier actual spike
is a bit smaller as now. For example in franck_sheep file it's now
5489.69MB vs. previously 5599.90MB.
2015-02-19 18:58:21 +05:00
0f652501c7 Cycles: Reduce memory used by background light update
Simple change: just get rid of intermediate data a bit earlier, before
final pixels array is being allocated. This gives around 30% of memory
save during light update (this is about 60meg in the frank sheep file
i'm using here).

This isn't really visible by artists a lot, because actual spike happens
on BVH construction. But it doesn't mean we shouldn't be accurate with
memory usage in other areas.
2015-02-19 18:18:04 +05:00
27d1446d24 Cleanup: Restructure curve settings code a bit.
This is a bit more logical, as it better represents the 3 primitive types we have.
2015-02-19 12:37:56 +01:00
ebdc1cde3f Fix 2d paint issue with textured brushes: Multiply brush color with
texture in the right space
2015-02-19 12:37:47 +01:00
528514c393 bge physics: disallowing compound collisions for soft bodies
Closes D610, T40427, T30630

Cherrypicked from local squash
Conflicts:
	release/scripts/startup/bl_ui/properties_game.py
2015-02-19 11:20:18 +00:00
b7033e3d4e BGE physics: adding links to bullet documentation 2015-02-19 11:20:18 +00:00
d2c2b10aeb gameengine physics: removing triangle mesh collision option for character controllers 2015-02-19 11:20:17 +00:00
938fa934c8 gameengine physics: removing compound option for character controllers
Cherrypicking c31d921 onto 117edbb
Conflicts:
	release/scripts/startup/bl_ui/properties_game.py
2015-02-19 11:20:17 +00:00
0049c22ad9 Animation ghosting: when tweaking start-end values don't clamp user
input, instead make sure the end-start values are sane instead
2015-02-19 12:10:44 +01:00
9fc2c37328 Guardedalloc: Reset peak memory should set peak to currently allocated memory
Otherwise statistics could be really funny looking.
2015-02-19 13:14:06 +05:00
3e534833e3 Cycles: Make sphere and tube image mapping friendly with OpenCL
OpenCL doesn't let you to get address of vector components, which
is kinda annoying. On the other hand, maybe now compiler will have
more chances to optimize something out.
2015-02-19 12:52:48 +05:00
5004b58262 Cycles: Make util_math_fast.h compatible with OpenCL 2015-02-19 12:29:06 +05:00
5721863805 RNA: pass only 0/1 to RNA_property_boolean_set 2015-02-19 12:33:14 +11:00
eee79641c3 RNA: poll functions restricting object types
D1100,D1105,D1106 by @lichtwerk
2015-02-19 11:59:24 +11:00
a74bd1bec7 Generate correct Cycles node setup for quick smoke "fire" preset.
Patch by Gottfried Hofmann.
Differential Revision: https://developer.blender.org/D1103
2015-02-19 00:18:27 +01:00
5ed2cc8070 Fix T43652: X11 "_NET_WM_PID" not set by Ghost
D1107 by @kevindietrich
2015-02-19 09:54:11 +11:00
f0527d9631 Ghost/X11 cleanup (reduce variable scope) 2015-02-19 09:54:11 +11:00
5d0696052a BGE: Fix T41502 Path following jumping
New Lock Z velocity parameter was added. This parameter avoid the micro-jumping.
By default it is actived except when you load an old file that it is deactived to keep former behaviour.

Additionally it was solved another issue related with the acceleration: That is the acceleration value was not taked into account and we had always the maximum linear velocity from the beginning of movement. Now the acceleration is taken into account until we reach the maximum velocity.
When you load an old file, the acceleration value is set to the maximum range (1000.f). This way we simulate a maximum velocity constant from the beginning of movement (former behaviour).

{F142195}

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D1074
2015-02-18 23:24:02 +01:00
bd5154bb2c Fix Cycles OpenCL error with scons, util_math_fast.h was missing.ø 2015-02-18 22:44:17 +01:00
f1a9dbb0d7 Fix minor mistake - only increase size of compositing when stencil -is-
set.
2015-02-18 22:16:20 +01:00
b5a14c381c Report total unfreed memory size on exit
Previously only number of unfreed blocks would have been printed,
which might not be totally enough during investigation process.
2015-02-19 02:08:09 +05:00
6c5f63b476 Guardedalloc: Add extra logging and checks in MEM_freeN()
We don't like when NULL is send to MEM_freeN(), but there was some
differences between lockfree and guarded allocators:

- Lockfree would have silently crash, in both release and debug modes
- Guarded allocator would have printed error message, abort in debug
  but keep working in release build.

This commit makes lockfree allocator behavior to match guarded one.
2015-02-19 01:58:49 +05:00
0f2adc0817 Cycles: Make aligned allocation to respect WITH_BLENDER_GUARDEDALLOC
Title pretty says it all actually. Can only briefly mention that we're
indeed entering that state when after applying some WIP patches having
much fuller statistics about memory usage would help giving exact memory
benefit.
2015-02-19 01:50:46 +05:00
ee9ac4e4fc CMake: remove expression in endif(...) 2015-02-19 07:45:59 +11:00
54994740bd CMake: indent & missing header 2015-02-19 07:15:55 +11:00
483fa4c387 CMake: picky style edit
'cmake_consistency_check.py' relies on this formattng.
2015-02-19 07:15:00 +11:00
bbc7dc169d RNA: assert when non 0/1 values used as bool
Prepare for using 'bool' type.
2015-02-19 07:08:10 +11:00
86e04c4ca9 RNA: assert on over-sized array index access 2015-02-19 07:01:49 +11:00
9d464a7538 RNA: use __func__ for alloc-id's 2015-02-19 06:57:45 +11:00
4ed8b70870 BGE: Fix T42437: Physics/Compound bug
Null check to verify that parent has a character controller. Otherwise (i.e empty) it will crash.

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1115
2015-02-18 19:59:21 +01:00
9bd2a7c0a8 BGE: Fix T41570: Blender crash when physics createConstraint
Move physicsid type to unsigned long long to avoid crashes on Windows 8.1 64bits.
Other systems also modified to put them inline with this solution.

Reviewers: dfelinto, brita_, moguri, juicyfruit, campbellbarton

Reviewed By: juicyfruit, campbellbarton

Subscribers: juicyfruit

Differential Revision: https://developer.blender.org/D1122
2015-02-18 19:52:54 +01:00
839a6b22d6 Fix T43716 regression in mask modifier - edges could access out of
bounds indices of vertices.

Issue here is that if we copy edge customdata the MEdge data that were
previously written get overwritten, solution is to write indices and
flags last (probably writing flags is superfluous here).
2015-02-18 17:59:16 +01:00
c9fa37fbcd Cycles: Initialize "headless" flags on engine initialization
This flag is global for all the sessions and never changes. so it doesn't
really make sense to pass it around to all sessions and synchronization
routines.

Switched to a static member of BlenderSession now, but it's probably more
logical to introduce some sort of BlenderGlobals. Doesn't currently worth
a hassle for a single boolean flag tho.
2015-02-18 21:52:51 +05:00
6f3500db05 Cleanup: Remove unused SD_PHASE_HAS_EVAL flag.
We only have a non-singular volume closure and therefore no need to distinguish it.
2015-02-18 16:33:31 +01:00
a2366a3a2e Cleanup for Cycles hair shader ifdefs.
sc->T and sc->data2 were behind __HAIR__ ifdef, now they are not anymore, so we can always assign the correct value.
2015-02-18 15:57:39 +01:00
bf0a001e61 Cleanup: Remove support for Boost filesystem 2.
This is deprecated since Boost 1.48.
2015-02-18 13:49:49 +01:00
55fd389a70 New filebrowser bookmarks: Some minor fix/optimization from latest coverity report. 2015-02-18 13:18:04 +01:00
2967253ae4 Fix Windows build.
Mighty M$VC never heard of 'strcasecmp' family of functions, it prefers its
own names, as usual...
2015-02-18 12:22:58 +01:00
6920735cff Include SDL information in system info text.
Adds bpy.app.sdl to expose SDL version information.

When SDL is not available on a Linux system, certain Blender features
are silently disabled (like joystick support in the BGE). This change
is the first step towards making it more obvious why something isn't
working.

SDL information is exposed to Python via bpy.app.sdl, in the same way
as OCIO and OIIO information is exposed.

Generated system-info.txt contains SDL loading method (linked or
dynamically loaded by Blender) and SDL version number.

Reviewed by: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1112
2015-02-18 12:08:20 +01:00
7f7413bce2 Cleanup: Use bools in BVHParams class. 2015-02-18 12:05:59 +01:00
6fe23b60dd Use clamp to border for brushes or textures can "leak" after rotating
texture coordinates of brushes (in rake mode).
2015-02-18 11:59:55 +01:00
fda119866d GPencil: RMB menu tools in Outliner works for GP Layers now
It would be even better if these used their own dedicated menu which could include
the protect values too, but this one at least works now
2015-02-18 14:49:42 +13:00
c7c711bb72 GPencil Fix: Added checks to ensure that copy/paste doesn't paste incompatible strokes
There was a problem with the copy/paste functionality, where it would be possible to
paste 3d strokes into 2D editors, or 2D strokes into the 3D view. The problem with
that though is that these will not show up, and because there's no feedback at the
time, users may end up doing this pasting several times.
2015-02-18 14:49:41 +13:00
bd92168643 Cycles / BVH: Remove unused temp copy of prim_object.
This will save some memory during BVH Build.
2015-02-18 01:14:59 +01:00
5eecfbd980 Quiet uninitialized mem use for blank cursor
harmless but may as well initialize.
2015-02-18 10:44:28 +11:00
1fa98b374f Fix free'd memory use removing constraint 2015-02-18 10:44:17 +11:00
b337cc1c21 Do not allocate an XRay buffer if compositing is dnot one for offscreen
rendering.
2015-02-17 23:38:28 +01:00
d74189a78a cleanup & missing break 2015-02-18 09:08:24 +11:00
ef11be0e77 Cycles: Avoid over-allocation in decouple ray marching
It could have happened with really long rays and small steps.

Step size will be adjusted to the clamped number of steps in order
to preserve render result compatibility as much as possible.

We should probably reformulate this a bit, so it will give the
same looking results without step tweaks. But this new behavior
should already be much better that it was before.
2015-02-18 02:26:24 +05:00
a9dbaf3755 Ensure BLI_stat() return value is checked.
also add function attrs on BLI_fileops to ensure they're used correctly.
2015-02-18 07:27:27 +11:00
e089b0e911 Amend to previous own Fix T43684: only use hack on WIN32, and use case-insensitive comparison.
Thanks to Campbell for the headup.
2015-02-17 21:10:08 +01:00
5115e86246 Fix T38808: Re-opening an image makes absolute 2015-02-18 06:39:28 +11:00
9d879c43f3 Fix T43708: Wrong manipulator in individual origin
Manipulator and actual behavior were out-of-sync with a single edge selected.
2015-02-18 06:08:59 +11:00
6133d14028 BMesh: calc_manipulator_stats can only check verts
Code assumed selection wasn't correctly flushed, which we ensure now.
2015-02-18 05:41:13 +11:00
07ba8b96e5 Tweak to new UIList bookmarks & co: extend up to ten entries before using scrollbars.
But again, what we really need to fix is UI saving for that temp area...
2015-02-17 19:27:14 +01:00
7e73b6aa25 Cleanup: Add comment about light_p being modified in one case. 2015-02-17 19:24:37 +01:00
1aa93dd9fd Cycles: Cleanup after recent changes 2015-02-17 23:21:53 +05:00
21a2b73a1e Fix T43684 (again!): Mighty Windows thinks it’s perfectly sensible to block everyone during 5 seconds for a mere stat() call on "A:\" path...
For now, just always consider those floppy entries ("A:\" and "B:\") as valid... sigh.
2015-02-17 19:13:22 +01:00
e6f40b4ceb Some tweaks to last commit, this is better. 2015-02-17 19:03:50 +01:00
f3e831f02d Cycles: Fix for hair transmission BSDF not returning proper label 2015-02-17 22:40:00 +05:00
6f820664c4 Cleanup: Deduplicate area light sampling code. 2015-02-17 18:39:37 +01:00
f05f99f9d4 Fix crash when rendering to offscreen OpenGL, fix scons build 2015-02-17 18:35:56 +01:00
ff7220349d Compositing works with X-Ray.
Basically, before drawing X-Rays, we now bind a second depth buffer.
After drawing XRays, we do an extra resolve pass where we overwrite the
non-XRay depth buffer in pixels where the depth is not maximum (which
means background pixel, since depth is cleared before drawing X-Ray
objects).

This ensures both scene and X-Rays keep their depth values and are ready
for compositing. Well, the odd effect due to depth discontinuities can be
expected, and X-Rays are a bit more expensive (extra buffer + resolve pass)
but at least X-Rays won't invalidate depth values anymore. Whee!
2015-02-17 18:11:22 +01:00
a0d7db503d Cycles: Small tweaks for Henyey Greenstein closure code.
* Avoid duplicative fabs(g) check in sample code.
* Avoid dot product in eval code.

Helps like ~1% when Scatter Anisotropy is 0.
2015-02-17 17:48:18 +01:00
ea2fc5b9d6 Fix for particle path drawing with black tips.
The last path segment can be shortended due to randomized path length.
In that case the last segment's color vector was not defined.
2015-02-17 15:22:02 +01:00
9b845359a6 Quick fix/hack for too small 'operator' panel in filebrowser
Real issue is that temp area used to draw modal filebrowser is never saved,
so non of UI 'edits' (like UIList resize, regions resize, panels reorder, etc.)
are ever saved. Should be addressed, but no time for that currently.
2015-02-17 15:18:02 +01:00
18e849b05d GPencil: On the fly switching between Drawing and Erasing when using "Continuous Drawing"
It is now possible to switch between drawing and erasing strokes when in
the modal "Continous Drawing" sessions. This makes the drawing experience
just a little more fluid, saving some unncessary steps to get out of
the editing mode to activate the intended tool.

TODO: Is there interest for tablet support for this too?
2015-02-18 03:16:33 +13:00
bf878d3c3d Cycles: Remove empty closure blur code and the corresponding entries in the switch.
Most compilers will probably optimize that out, but I still don't see a reason to keep it.
2015-02-17 13:44:25 +01:00
4660c00ac5 Cycles: Make blender session aware of rendering from command line
This way we can do some more aggressive policy about releasing temporary
data during synchronization.
2015-02-17 16:25:16 +05:00
7307f3b485 Fix T43706: Creating a directory in the file browser (by typing it in the file path) crashes Blender
Issue was caused by 2e9105c, free() does nothing if pointer is NULL, but guarded
allocator expects you to not free NULL.
2015-02-17 15:55:18 +05:00
2c1b0536c9 Fix T43697, grid drawing over wires and grease pencil. Props to Julian
for figuring out a simple solution to that :)
2015-02-17 11:37:20 +01:00
cdc1dab073 Fix T43685: New pointiness attribute error with auto-smooth enabled
Simple fix: all vertex attributes should be filled in before split.
2015-02-17 13:49:11 +05:00
587d8771e0 Cycles: Minor code cleanup in recent attributes changes 2015-02-17 13:46:25 +05:00
86a2e9d0e4 etch-a-ton: off by one error
was writing past the buffer when inserting strokes
2015-02-17 17:12:19 +11:00
28f31bdfd8 etch-a-ton: fix crash selecting strokes 2015-02-17 16:49:30 +11:00
a8487fc7fe etch-a-ton: fix uninitialized memory use 2015-02-17 16:48:53 +11:00
Julian Eisel
0294327615 Hide 3D Cursor in Paint Modes (with exceptions)
= Hide 3D Cursor in Paint Modes (with exceptions)

In paint modes, the 3D Cursor mostly is rather useless so it's more annoying than useful. This patch aims to hide the cursor in cases it's not used.

Included exceptions (cases where cursor is drawn in paint modes):
* Active object is in weight paint mode and a selected bone in pose mode can be found
* Clone brush (only if //Clone from paint slot// is disabled)

There might be more exceptions where the cursor should be shown in paint modes, but those are all I could find for now. Feel free to hint me for more.

Note: After D1110 was rejected, Campbell and me discussed this a bit more on IRC and agreed that this behaviour might be a good solution.

Reviewers: psy-fi, campbellbarton

Reviewed By: psy-fi, campbellbarton

Projects: #user_interface

Differential Revision: https://developer.blender.org/D1113
2015-02-17 03:26:03 +01:00
4bb331dfd5 RNA API: reuse property lookups 2015-02-17 13:13:59 +11:00
Julian Eisel
691cb61835 Fix for another missing update from GPencil in Outliner 2015-02-17 02:12:23 +01:00
Julian Eisel
89412028ce Fix T43669: Grease Pencil visibility toggle not working in Outliner 2015-02-17 02:12:23 +01:00
070f516b52 Fix FileSel globbing including dirs & ".." 2015-02-17 12:01:47 +11:00
8cb4011220 Revert "Fix file size not drawn using Link/Append"
This reverts commit 4ca4f04c75.

Was running an fs-stat on redraw, on every file! (every mouse motion!).
Could become very slow on network-fs

also caused crash (T43631)
2015-02-17 11:36:41 +11:00
9f008d17fe assert when BLI_exists is called with NULL path 2015-02-17 11:36:35 +11:00
00133ba8f0 Subsurf: Use guarded allocator for non-arena CCG
Our new guarded allocator implementation has much smaller memory
block size overhead and doesn't have any locks now. So in order
to make fuller track of what's happening in blender and avoid
confusion why certain circumstances reports much less memory than
others we'll now switch to guarded allocator.

This was actually one of the biggest reasons of the confusion in
the recent memory usage investigation. There's still some overhead
is happening due to non-freeing nature of arena allocator but the
things are not nearly as bad as they looked before: memory overhead
is measured in tens of megabytes, not hundreds as it looked before.

Plus with some smarter allocation policy we can almost eliminate this
overhead.
2015-02-17 03:42:16 +05:00
1e00e87e3a FileSpace selection didn't call op.check sometimes
(de)select all & globbing didnt run operators check callback.

D867 by @igel with edits
2015-02-17 08:54:25 +11:00
fa9311c9a4 Cleanup: Update comments and make it more clear what volume interpolation is for. 2015-02-16 22:11:41 +01:00
652b2b656a Fix bake action visual-keying option
Disabling did nothing
2015-02-17 07:19:48 +11:00
00a3c9afc8 UI messages fixes and cleanup. 2015-02-16 20:38:07 +01:00
0dfdca6d13 Fix T43684: File Browser is unusable on Windows Machines (do not BLI_is_dir() in draw loop!)
Did not had any issue on linux, but looks like on some windows can slow things as Hell.
Or maybe just the presence of some network FS?

Anyway, not a good idea, so now fsmenu entries' valid status is stored and only evaluated
on startup (reading of bookmarks & co) and when opening file browser (refresh, like
for system bookmarks).
2015-02-16 15:58:57 +01:00
fd4f0ed39e Cleanup: Remove unused code from hair BSDF. 2015-02-16 15:23:01 +01:00
bbe1b54818 Fix T43689, viewport compositing does not respect alpha settings for
background.

For SSAO supporting this is no problem, for DOF we would ideally do
blurred alpha, but alpha channel in blurred buffers is occupied by coc
field, so use original color alpha instead. It's not entirely correct
but it's better than nothing.
2015-02-16 14:42:36 +01:00
6e08aa0a9e Tracking: Expose Filter Tracks operators to the Cleanup panel
Not totally happy with this, but it's better than nothing for until
we've got real outlier detection. Also made it more cleat how exactly
filtering happens, so users don't expect something the operator is not
intended to do.
2015-02-16 17:16:14 +05:00
7c3d5a3337 Cycles: Use some more bools in microfacet code. 2015-02-16 12:32:42 +01:00
e7d2e5ffbc Extended RNA support for mesh customdata property layers.
Support for user-defined customdata layers (named int, float, string
layers) was limited to polygon customdata. This is not accessible in
cycles because only tessfaces are used there. Furthermore the polygon
attributes were simply described as MeshFloatProperty, MeshIntProperty,
MeshStringProperty, omitting the distinction by element type.

The patch only adds vertex attributes so far. However, the code now
explicitly defines polygon and vertex attributes, so adding edges, loops
and tessfaces is much easier should the need arise.

Problem is that the RNA definition, which is already much more
complicated than the basic DNA/BKE definition of custom properties, now
becomes extremely bloated and cumbersome. A simpler solution would be
preferable but may not be possible within the constraints of RNA.
2015-02-16 12:26:25 +01:00
9daac198f5 Cycles: Correction for C++11 compilation error after recent vector changes 2015-02-16 15:38:13 +05:00
9a10b208ba Ensure CMake finds SDL 2.0
CMake 2.8 doesn't search /usr/include/SDL2, which is the include directory
for SDL 2.x on Ubuntu Linux (and possibly others). This results in SDL 1.2
headers being found when WITH_SDL_DYNLOAD=OFF, and our shipped SDL 2.0
headers when WITH_SDL_DYNLOAD=ON. This patch ensures that in both
cases the correct SDL headers are used.

Reviewers: sergey, campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1112
2015-02-16 09:27:50 +01:00
58652301de Vert/Edge Slide: better UV interpolation
Ignore faces which the sliding vert is outside of.
2015-02-16 18:49:18 +11:00
421d0f3bde Math Lib: add dist_signed_squared_to_corner_v3v3v3
Can be used to check if a point is inside the 2-planes defined by a face-corner.
2015-02-16 18:47:15 +11:00
81be1c7a21 Correct crash /w vertex slide with no faces
Error in recent commit
2015-02-16 13:41:46 +11:00
7975c0d35a cleanup: split VSE view-size into own function 2015-02-16 13:19:22 +11:00
5c747e7196 Fix T43681: VSE draw glitch with no-display
Missed clearning the backdrop
2015-02-16 13:05:59 +11:00
b1dbda143d BMesh: Connect path, use select order
Could connect a pair of verts previously,
now connect all vertices along the path, running a second time closes the loop.

Can also be used for without faces to connect edges between selected points.
2015-02-16 09:44:30 +11:00
e2573aea9b Compilation error fix for strict compiler flags 2015-02-15 23:12:54 +05:00
478d67e858 Cycles: Hopefully compilation error fix for OSX 2015-02-15 23:11:33 +05:00
a98fc4f8f9 Fix T43671: Playing with Mix Factor of Data Transfer Modifier Is Overwritting Data of Base Mesh
The issue was actually affecting all data types that are not regular CDLayer ones, since by default
DerivedMesh references mesh data (verts, edges, etc. - modifying custom normals often implies
modifying edges' sarpness too).
Modfying edge/face sharpness etc. could directly affect the mesh in this case, **bad**!

So we detect whether we are copying data types that may affect non-CDlayers data, and whether
verts array of org dm is same as mesh one - in which case we copy the DM. This avoids
useless copying in most cases.

Note Edit Normals was quite obviously suffering the same issue.
2015-02-15 19:00:06 +01:00
1c64543aef Cleanup of SpaceFile, from asset-experiments branch mostly.
Helps keeping diff with branch relevant and clean...
2015-02-15 16:35:42 +01:00
f1ee11fcca Fix for previous commit, sorry for the noise. 2015-02-15 15:55:13 +01:00
2e9105cc96 Cleanup: BLI_listdir (direntry): get rid of usage of raw malloc/free here.
No reason at all not to use MEM_xxx as everywhere else, especially confusing
when members of direntry **are** MEM_-allocated (relname, etc.)!
2015-02-15 15:07:48 +01:00
35567d563d Possible todo notes for more polished UI? 2015-02-16 01:21:48 +13:00
263518ec49 Outliner: "Purge All" function for Outliner in "Orphaned Datablocks" mode
Many users have been requesting a way to remove unused datablocks from the file/session
"without closing and reopening" Blender (or at least that's the impression I'm getting).

This commit adds a new operator (exposed as the "Purge All" button in the header of
the "Orphaned Datablocks" mode in the Outliner, which seems to be the logical
place for this) for doing so. It does so by wrapping up the save and "revert"
(i.e. reload the saved file from disk, without needing to quit Blender) operators
along with a confirmation prompt for good measure.

Caveats:
* Ultimately, we still cannot really cleanly delete any datablocks from the current
  session outright without reloading the file/data at some point. Thus, we do need
  to reload the file again before it can be used.
* This does mean that this operation is irreversible. Notably, Undo history is lost
  is doing this operation. Hence the warnings...   (Then again, undo/redo actually
  reloads the entire scene DB from memory, so it's not anything uncommon ;)

Other Notes:
* The addition of this operator brings this mode more into line with being a kind of
  "Trashcan" place, with this new operator being the manual "Empty Trash" button.
  If the "Orphaned Datablocks" name is too obscure, maybe we could rename this
  mode to "Trash" or something similar?
2015-02-16 01:21:47 +13:00
0688f6e012 Code Cleanup: Reshuffle libraries and orphaned datablocks views to a more appropriate place in the file 2015-02-16 01:21:46 +13:00
d0609d09e4 Outliner: Do not show RMB menu for "ID Base" entries 2015-02-16 01:21:45 +13:00
16689a1db0 Outliner: Use restriction columns in "Orphaned Datablocks" view to manage usercounts
When in "Orphaned Datablocks" mode, the restriction columns are used to display
usercount indicators and toggles to manage whether datablocks get saved or not.

* The first column shows an icon to indicate whether that datablock is going to get
  saved. A tick indicates the datablock will be saved, while a cross indicates the
  opposite. Clicking on this changes whether the datablock will get saved.

* The second column shows the usercount.

* The third column shows whether the datablock has a fake user.


Notes:
* The second and third columns are pretty much redundant (functionally speaking).
  While it is possible to also toggle fake users by clicking in the third column,
  its role here is more as information for power users (and hopefully to allow others
  to connect the relationship between the saved/not saved status and fake users)

* I'm not sure whether the use of the X here for the "not saved" state stands out enough
  to draw user's attention to items which are "in the danger zone".
2015-02-16 01:21:44 +13:00
030b0aab43 Outliner: Added new mode for displaying "orphaned" datablocks
Orphaned datablocks are those which have either:
* 0 users
* A "fake" user only

In the case of the former, they will be quietly discarded from the file on the next
save + reload. Hence, it is helpful to have a view where you can confirm which ones
fall into this category and might be worth saving.

We also include datablocks with a fake user only so that datablocks given a user
above can have that easily turned off again (in case the user makes a mistake).
Another benefit of showing these is that it become easier to remove fake users from
datablocks you no longer want retained without having to hunt for them.
2015-02-16 01:21:43 +13:00
Julian Eisel
0ff56ca2aa Revert/Remove "Auto View" Feature
Turned out that I misinterpreted the feature request, plus there are some
minor issues with the commit that would need to be corrected.
After all, I decided to just remove it again as it seems to not be really
useful for the users.
2015-02-15 04:29:11 +01:00
c439d14a9a missed this second last commit 2015-02-15 14:11:05 +11:00
fa2f7c69ac mathutils: Implement __hash__() functions
- all mathutils types
- only works on frozen data (so vectors can be used in sets/dict keys)
- uses same method as CPython, (matches hashing a tuple)

D1104 by @juicyfruit with own modifications
2015-02-15 14:02:08 +11:00
a9d979c8ef mathutils: add freeze() method, is_frozen attr
This allows you to make any mathutils object immutable.
2015-02-15 14:01:59 +11:00
ce85aef0d9 mathutils: remove redundant read callback 2015-02-15 13:46:47 +11:00
4feb77cf03 mathutils: avoid extra alloc for Vector.lerp 2015-02-15 13:46:47 +11:00
24f9ed0b34 Fix crash setting Euler.order to a non-string 2015-02-15 13:46:47 +11:00
bf157ce927 Fix T42919 & T42218: BGE: Python-driven armature animation got buggy
Due to changes in the way animation updates were handled,
BL_ArmatureObjects were no longer registering to KX_Scene as animated.

Moguri says: It might have been relying on the deformer update which
moved rom being called on every object in the render step. Now
armature deformers are only updated if they need to be.

Fix T42919 & Fix T42218
2015-02-15 02:00:56 +01:00
a83b2d3fd9 Cycles: Fix wrong attribute count calculation in prevous commit
The workaround for generated texture coordinates is to be done before
calculating number of elements for attribute, otherwise counter wouldn't
include those attributes.
2015-02-15 02:55:18 +05:00
1862fbf203 Cycles: Optimize memory usage when creating mesh attributes
The idea behind the change is to pre-allocate attribute arrays in advance,
which avoids re-allocation of arrays later for each of meshes being handled.

This reduces peak memory used by Cycles database from 1.3G to 0.9G for
victor.blend from Gooseberry.

It doesn't mean every file will benefit from this change since peak memory
usage is happening in the different places of the rendering code.

Also, unfortunately, attributes export might not cause the peak of render
preparation stage. That said, it's actually object_to_mesh() which causes
the memory to peak in the same test file. So we really need to optimize that
part first in order to get visible results for artists. But in any case it's
now quite easy to track hotspots in Cycles itself which is good.
2015-02-15 02:01:48 +05:00
18937f6fb5 Cycles: Add ifdef switch to use blender's guardedalloc for vector allocation
It's actually a bad level call, but it's inside ifdef block and disabled by
default and only intended to be used for development purposes.

Main idea of this change is to combine statistics coming from Cycles and
Blender during scene synchronization step, to see if further changes are
actually reducing memory footprint.
2015-02-15 02:01:48 +05:00
d0cc1180b0 Cycles: Add utility method to vector which totally frees memory used the vector
The method is called vector::free_memory(). Use with care since it'll invalidate
all the pointers to vector memory, all iterators and so on.

Currently unused, but might become handy when clearing unused data.
2015-02-15 02:01:48 +05:00
aad96506c1 Cycles: Report system memory usage and peak after scene device update
This only happens when built with WITH_CYCLES_DEBUG flag, memory statistics
is coming from guarded STL allocator.
2015-02-15 02:01:48 +05:00
a445e49186 Cycles: Implement guarded allocator for STL classes
The commit implements a guarded allocator which can be used by STL classes
such as vectors, maps and so on. This allocator will keep track of current
and peak memory usage which then can be queried.

New code for allocator is only active when building Cycles with debug flag
(WITH_CYCLES_DEBUG) and doesn't distort regular builds too much.

Additionally now we're using own subclass of std::vector which allows us
to implement shrink_to_fit() method which would ensure capacity of the
vector is as big as it should be (without this making vector smaller will
still use all previous memory allocated).
2015-02-15 02:01:48 +05:00
01067fe51c Cycles: Replace own aligned allocator with system one
This replaces our own implementation of aligned malloc with system calls,
which depends on which operation system you're on.

This is probably really minor noticeable change, but in the same time it
might reduce amount of wasted memory.
2015-02-15 02:01:48 +05:00
Julian Eisel
24976dd29d Outliner: Toggle restrict buttons only for selectable child objects
D404 by @rupp with minor edits by me.
2015-02-14 21:54:31 +01:00
354cf76803 Cleanup: Comment block for sse helpers. 2015-02-14 20:57:21 +01:00
d979f39cf1 Cycles: Small improvement for volume render (decoupled)
Simplify branching here a bit, helps ~3% in volume_light_sampling.blend (Branched MIS scene).
2015-02-14 20:44:30 +01:00
2fad3132a3 Cycles: Fix compilation error of Cycles standalone with Libmv disabled 2015-02-14 21:33:14 +05:00
db297e7ea3 Revert "Fix T43471, based on patch submitted by @sean_loh."
This reverts commit b2b54b0902.

The patch breaks particle distribution even in simple cases, not worth
doing this for keeping a hackish loophole open.
2015-02-14 16:40:57 +01:00
cfa1fd1c1f object drawing: only use halo-draw in object mode 2015-02-14 22:29:45 +11:00
dd6edac803 Bring copy/free operations into line with changes in previous commit 2015-02-15 00:06:19 +13:00
ec2ede4302 Bugfix: Referencing actions from Action Actuator was not setting a user
This reverts the change made in 8872cba7e9
which was contributing to actions being lost in some cases [1], even when
they were assigned to those actuaters, which needed them to be able to
function. Now there's one less case where users are needed but were missing :)

Note that this still doesn't solve the core issue where nothing is responsible
for associating actions created for a particular datablock (and not currently
being used in its active action slot, or in the NLA stack) with that datablock.
That issue is the cause of most action disappearances as well as for other problems
(such as renaming bones being unable to fix unreferenced/unused actions) where there
are diifferences between users' mental models and the data model. Proper fixes are
coming soon (restoring fake users here isn't a proper fix, as it only masks the
fundamental mismatch/problem here).


[1] http://blenderartists.org/forum/showthread.php?357021-BGE-loses-actions
2015-02-15 00:06:18 +13:00
dde0765de2 CMake: Enable JeMalloc by default
It's really handy to have blender linked against jemalloc because of
much better memory fragmentation handling by that library.

To be noted: if jemalloc library is not found it'll be disabled with
message about that, no compilation error should happen.
2015-02-14 15:13:48 +05:00
a439c8026a CMake: Add search path for jemalloc which corresponds to own and studio setup 2015-02-14 12:29:48 +05:00
7a977df6d4 Refactor array_utils out of BLI_array
BLI_array.h is for resizing array macros, where as array_utils can operate on any arrays.
2015-02-14 08:00:41 +11:00
2af905391d cleanup: doxy comments 2015-02-14 08:00:41 +11:00
2c1143aa2f Comments: use doxy sections for nodes header 2015-02-14 08:00:41 +11:00
3ec9b8e0c2 Purge temporary files on abort
This way both BLI_assert() and abort() called directly shouldn't
leave any files in the temp folder.

Previously it was really possible to have gadzillions of files
left over because of assert failures and debug aborts during the
development process.
2015-02-14 01:30:36 +05:00
ab77466105 Fix T43585 XRay + transparency broken
We need to turn off restore depth mask in transparency.
2015-02-13 14:38:38 +01:00
Julian Eisel
ef2f31028e Revert "Fix T43646: VSE preview allows displaying channels down to -5"
This reverts commit e652f781a3.

@schlaile, mentioned in T43646 that this was an intended feature. Checked git
history and it's seems like he's right.
2015-02-13 13:57:48 +01:00
90a9415c9a No need to use "SSAO" for SSAO color 2015-02-13 12:15:57 +01:00
c01a2aa4bb Alleviate grid creating shadows in Ambient Occlusion effect.
Draw the grid last with depth masking disabled. That should have no ill
effects otherwise as far as I can tell except from some exceptional
cases (axis lines over grid) but this is hardly annoying.

Generally to properly solve such issues we need to have a better render
pipeline with wire objects/materials being drawn after compositing. This
is not impossible but for now doing it the simple way.
2015-02-13 11:56:41 +01:00
Julian Eisel
e652f781a3 Fix T43646: VSE preview allows displaying channels down to -5
Maybe just another typo (tm). (Checked with @psy-fi)
2015-02-13 11:53:29 +01:00
261cd7f6bf Fix T43649: Geometry node breaks GLSL shading
The issue was caused by the recently added attribute, which is to be
added to the shader function even tho it's not supported.
2015-02-13 15:24:35 +05:00
e63594a6e5 Fix again tablets with linux!
Yes, for me tablets (both wacom and no-name) were again broken - curse X11!
So now, we want ButtonPress, Button1Motion does not work anymore...

Anyway, this patch makes things much cleaner, storing each event type
in its own variable!

Patch by cedricp (Cédric PAILLE) from T43367, thanks a bunch!
2015-02-13 10:57:26 +01:00
46151a6a69 Fix issue with some files having non-unique modifier names
Originally the files are coming from ancient early-2.4x epoch, but in
theory such setups might have been re-saved multiple times already with
more recent blender versions.

So the verisoning code is applied on all the files, including very
recent ones.

Bumped subversion, because this check si not really cheap.
2015-02-13 13:51:10 +05:00
67fa545ed0 Make modifier_unique_name return whether modifier was renamed or not 2015-02-13 13:46:51 +05:00
270bbc89ec Fix Cycles compilation on x86, without SSE. 2015-02-13 09:29:16 +01:00
34e9f6b956 Fix (revert) mistake in rB1ae2098a6e04359b, causing broken UI (see e.g. Scene buttons).
Reported by  sebastian_k through IRC, thanks!
2015-02-13 09:10:53 +01:00
616eb6818f cleanup 2015-02-13 16:17:00 +11:00
1ae2098a6e cleanup: ui, use bools 2015-02-13 11:43:28 +11:00
4132ca1ac2 UI: show check-boxes pie-menu bool/enums 2015-02-13 11:33:11 +11:00
29e19cecd8 BMesh: avoid ugly macro for loop interpolation
Compiler optimizes to practically the same output
2015-02-13 11:06:16 +11:00
1af042d9ed BGE: Fix for T42285 & T38935 crashes. They are Rayhit related.
We make sure that good values are passed to GetPolygon() and we check that the visual mesh doesn't have a wrong displacement when it passes over a object which has a mesh triangle as compound bound.

Reviewers: dfelinto, sergof, agoose77, moguri

Reviewed By: moguri

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D979
2015-02-13 00:12:21 +01:00
2b847d1e65 BGE: Remove translation and rotation constrains subpanel from dynamics type
The translation and rotation locks subpanel was not used by dynamic physics type to avoid inestability in the application of forces and/or torques. Therefore it is better to remove it from UI (for dynamics) to avoid misunderstandings.

Reviewers: moguri, dfelinto, campbellbarton

Reviewed By: campbellbarton

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D1090
2015-02-13 00:05:16 +01:00
9e217ccb2e BGE Fix T39026: No collisions detected with parented rigid body object
Fix for T39026. Preliminary investigation by blenderscripter on D446.
Also it solves bug T41285 (Parenting object leave collission box).

Refactor commit b90de0331d introduced a
regression bug.

Reviewers: sergof, campbellbarton, moguri

Reviewed By: moguri

Subscribers: blueprintrandom, blenderscripter

Differential Revision: https://developer.blender.org/D1064
2015-02-12 23:56:50 +01:00
eda2d563bc Cleanup horrible artifact of Greek to English translation. 2015-02-12 22:05:47 +01:00
8de421bbf1 Use the RNA for overriding the name instead. 2015-02-12 19:59:34 +01:00
d0a91eb1b4 More naming refinement GPU fstop -> Viewport f-stop 2015-02-12 19:50:19 +01:00
090623c6b6 Revert "Add missing trailing '}' in GLSL files"
This reverts commit ebd4a6e0dd.

Trailing '}' is added in C, also we add some extra code as needed.
2015-02-12 19:39:10 +01:00
f20fa24ba1 Add DOF fstop property for cycles, also don't grey it out when object is
set as focused
2015-02-12 19:35:43 +01:00
ebd4a6e0dd Add missing trailing '}' in GLSL files 2015-02-13 05:12:15 +11:00
5e613198e5 Viewport compositing - first code
This commit introduces a few ready made effects for the 3D viewport
and OpenGL rendering.

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

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

WIP documentation can be found here:

http://wiki.blender.org/index.php/User:Psy-Fi/Framebuffer_Post-processing
2015-02-12 18:54:41 +01:00
d40ac45610 Fix (unreported) load_file() func from creator.c not setting G.save_over correctly.
This was rather annoying, since if you were script-editing a .blend file in background
mode, opened through this commandline option system,  and wanted to save over,
a mere `bpy.ops.wm.save_mainfile()` *would not* overwrite expected file,
but instead write/replace the dummy `untitled.blend` one!
2015-02-12 17:30:19 +01:00
d70c7c06e7 Removed the cloth preroll feature.
This feature has been totally broken for a long time. It was added
originally because negative frames were not supported.

Giving simulations (cloth and others) time to settle before animation
starts needs to be solved in a much better and more generic way.
2015-02-12 16:30:07 +01:00
912b4659ec Tracker operators: filter & copy track settings
D1069 by @sebastian_k
2015-02-13 02:22:39 +11:00
719fd5a1ce GPencil: Alt-S can now be used to adjust the pressure values (i.e. thickness) of strokes 2015-02-13 02:48:50 +13:00
d92d8c3768 GPencil: Some tweaks to make GPencil UI more compact when there are 0 or 1 layer(s) only
As brought up in T43595, the Grease Pencil layers list could sometimes end up
taking up too much space when there are no layers. Another issue raised there
was that the up/down buttons are redundant when there is only a single layer.
This commit makes some changes to get these a bit more compact for the case where
you have an empty GPencil datablock left over from previous work.
2015-02-13 02:48:49 +13:00
4f3f9cb280 GPencil: LKEY can now be used for Select Linked too now 2015-02-13 02:48:49 +13:00
5c02afb698 Bugfix: Old NLA Strips from 2.4x got converted with no names (since they didn't use to have any) 2015-02-13 02:48:48 +13:00
7221fbe9dd cleanup 2015-02-12 23:51:02 +11:00
e408e632a1 Addons: print short message if an addons missing
Was printing full traceback, harmless but verbose.
2015-02-12 23:44:37 +11:00
3b68a74c2a Follow functionality: Scrubbing with the arrow keys and during jumps,
will update the editors range.

Offsetting to a certain direction will put the editors min/max to the
new frame if the frame is out of the editor bounds while jumping will
set the new frame at the editor's center.
2015-02-12 13:08:40 +01:00
d266733dad Fix T43612: VSE crash clearing proxies 2015-02-12 22:59:48 +11:00
dce59530d0 Fix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.
Implemented multisegment rounding of vertices with two edges.
Works both with wire edges and edges that have one or two faces
attached.
2015-02-12 06:55:30 -05:00
7f47cd9b17 Correct fix for T43424
Would crash undoing adding a new scene in camera view.
2015-02-12 21:33:59 +11:00
b2b54b0902 Fix T43471, based on patch submitted by @sean_loh.
Particle textures always override timing information of particles.
Previously particle times could be scripted, but now these changes are
discarded by the texture evaluation function.

The patch disables texture overriding when no textures are defined, this
way at least some old scripts can keep working.
2015-02-12 10:15:25 +01:00
a9d09ff7ae BGE: Improve UI of Anisotropic Friction subpanel
Little patch that introduces X: Y: and Z: texts over anisotropic friction sliders

Reviewers: moguri, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1073
2015-02-12 06:38:21 +01:00
e60259c1cd Fix for previous commit - since it's for non-debug unused vars, name it UNUSED_VARS_NDEBUG.
This commit was proudly crafted by the Commit Rate Raising Committee!
2015-02-11 22:22:40 +01:00
e1bdf5333d Add new UNUSED_VARS_DEBUG utils, which is NOP in debug build, but tags given vars as unused in non-debug builds.
Helps handling cleanly pure-debug variables.
2015-02-11 22:10:09 +01:00
fbe5282c1e Outliner: use enum for outliner_group_operation()
No functional changes.

D1067 by @lichtwerk
2015-02-12 07:43:32 +11:00
23214ecad0 Outliner: ContextMenus for constraints/modifiers
Context menu to toggle render, visibility & delete

D996 by @lichtwerk
2015-02-12 07:29:31 +11:00
27b2ab8cf4 Fix VSE strip channel skip overlapping strips
D1096 by @mangostaniko (with some edits)
2015-02-12 06:20:36 +11:00
26d7ac5077 Full screen mode did not remember the follow mode of previous screen.
Also make follow mode do something similar in reverse play.
2015-02-11 20:01:21 +01:00
de85d6cdbf cleanup: rename enum type to blender convention 2015-02-12 03:30:01 +11:00
b9ffd70960 FileBrowser Bookmarks: fix issue with invalid bookmarks.
Reported by maxon through IRC, thanks.

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

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

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

This solution may not be completely satisfaying, but should do the work for now.
I do not want to add back those ugly 'X' delete buttons for each entry in list,
so better solution would be to make UIList able to select several items at once...
2015-02-11 17:13:16 +01:00
f60b4228b9 BPY RNA: add is_property_readonly().
This property may be defined dynamically, so mere access to static flag value
through `bl_rna.properties[...].is_readonly` is not enough.
2015-02-11 17:13:16 +01:00
cde1ef403b Fix (unreported) disabled items in UIList not grayed out.
Since we override widget's theme colors in this case in widget_state,
we have to redo 'disabled' alpha shading...
2015-02-11 17:13:16 +01:00
2613bfadb2 RNA: sequencer channel range was incorrect
Broke since 2.4x, zero sequence channels shouldn't be allowed
2015-02-12 02:36:33 +11:00
3b5eac548f Fix depth-eyedropper crashing outside 3d view
Also set the eyedropper operators as internal.
2015-02-12 02:17:03 +11:00
44f09c93d1 Use line curve for cavity mask instead of sharp as default when no curve
is found during loading
2015-02-11 15:29:24 +01:00
743a67c6cb Cavity option active even in fill brushes 2015-02-11 15:09:11 +01:00
f7e131a6ac Cavity masking - add curve control to cavity mask and move relevant
structs to paint struct (might be useful for vertex paint too in the
future)

Cavity masking now has a curve control. The control will set the amount
of masking for positive cavity ("pointness") or negative cavity
("cavity") with x axis being the amount of cavity and 0.0 = full cavity,
1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of
alpha.
2015-02-11 15:07:24 +01:00
Julian Eisel
b7bac19aca Fix T43621: Layout only using 65% of available width
Not really a bug, more like a silly typo.
2015-02-11 14:41:35 +01:00
88efcdc376 Compositor: Expose Alpha socket for multilayer EXR node
This way re-mapping scene nodes to EXR files becomes much easier,
no extra trickery with separate RGBA setups is needed.

Plus makes it more consistent with regular EXR files.

This uses EGBA pass to get alpha from.
2015-02-11 18:28:41 +05:00
Dalai Felinto
560c05e8bd Fix T43628: Circular dependency error preventing multiple highpoly objects to bake
Throwing an RPT_ERROR was stopping baking after the first object.
2015-02-11 11:23:03 -02:00
259d47a15e Minor code cleanup: move some duplicated texpaint code into function
Reviewers: psy-fi

Reviewed By: psy-fi

Differential Revision: https://developer.blender.org/D1098
2015-02-11 13:33:47 +01:00
2d1e072686 UV Island support for vertex & edge slide
This ensures slide with `Correct UVs` enabled, keeps UV's (any loop custom-data) contiguous.

Adds 2 key functions `BM_vert_loop_groups_data_layer_create` and `BM_vert_loop_groups_data_layer_merge`

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

Thanks to @mont29 for review!
2015-02-11 21:30:13 +11:00
f2951c23cf Cleanup: Remove unused Cycles cpuid code. 2015-02-11 11:28:42 +01:00
8668006519 Fix crasher in own UIList bookmarks commit.
Immediate crash in merged asset-experiments branch, no idea why it did not show in master too?
2015-02-11 11:16:32 +01:00
d4934f8f6d cleanup: style/indentation 2015-02-11 18:39:28 +11:00
387d91829d Fix T43149: Grease Pencil fill areas look divided by multiples ray lines
The problem here was caused by the usage of GL_POLYGON_SMOOTH (thanks Campbell
for the help tracking this down!). Apparently the issue is that this option
ends up doing some nasty accumulation with whatever is in the framebuffer for
each *tesselated* polygon (instead of the whole polygon as intended/expected).

** IMPORTANT USER NOTES **
With the removal of this option, filled areas and volumetric strokes will now
have jagged edges again. To resolve these artifacts, it is necessary to enable
Viewport Multisampling (found in the User Preferences, under the System tab),
and restart Blender to see the effects of this change.
2015-02-11 17:54:14 +13:00
4ae6d58999 Minor optimization for mask modifier
- don't resize ghash buckets (reserve maximum size)
- get vert, edge arrays instead of DM getVert, getEdge
- calloc -> malloc
2015-02-11 10:39:50 +11:00
9e2abbc9ba FileBrowser: Editable Bookmarks.
Bookmarks are now editable (i.e. you can rename them, and reorder them).
They are also listed in regular UILists, so you can filter/sort them as usual too.

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

Thanks to Campbell and Sergey for reviews.

Differential Revision: https://developer.blender.org/D1093
2015-02-11 00:09:45 +01:00
4f1e387588 UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.

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

Thanks to Campbell for the reviews!
2015-02-11 00:07:09 +01:00
d18993d4e4 Fix T43297 The Exporter assumed ANSII encoding but we need to support UTF-8 instead 2015-02-10 22:14:31 +01:00
4b04a4e2ff Cycles: Control CPU capabilities via environment variables
Purely developers-only feature which allows to disable some of the CPU
capabilities. This way it's easier to test different kernels on the
same machine.
2015-02-11 01:56:58 +05:00
28e76bbb93 Remove legacy color transform functions.
Differential Revision: https://developer.blender.org/D1095
2015-02-10 21:34:19 +01:00
1d64dff671 Fix recent vert-slide UV's when cancelled
Added support recently, but wasn't cancelling correctly.
2015-02-11 07:30:11 +11:00
2b01b71339 Fix T43565: BGE removed unneeded if/else in BL_KetsjiEmbedStart 2015-02-10 21:28:18 +01:00
59c0a1e7c8 Typo fix + clarification in mathutils.Vector example 2015-02-10 21:25:01 +01:00
bb08502cf4 Cycles: Fallback to bottom-top tile order when rendering from the command line
In the worst case it'll do nothing, in the best case it might give some percent
of speedup because of better cache coherency.

Currently it's all handled as an override on blender_python level, don't really
see reason to penetrate the boolean flag further into sync code. This can always
be done later if needed.
2015-02-11 01:11:57 +05:00
a3b7f83cb5 Cavity mask support for texture painting.
Title says it all, options can be found in the options panel,

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

Again we might greatly benefit from caching of the cavity result, but
that should only affect startup time for the stroke.
2015-02-10 20:23:43 +01:00
13ad69c68e Cycles: Add print functions for sse3f, sse3i and sse3b 2015-02-11 00:20:34 +05:00
5646a9f759 Cycles: Add utility functions to print ssef, ssei and sseb
Nothing special, just really handy for debugging.
2015-02-11 00:11:04 +05:00
4e37b29631 Cycles: Move mesh attribute creation into separate functions
This makes overall code of create_mesh() much cleaner and easier to follow.
2015-02-10 23:41:54 +05:00
bc218cf4d2 BLI_linklist: Add a new helper to move an item (identified by its current index) to a new position in the list. 2015-02-10 19:20:36 +01:00
a9c5d0ba51 Slip tool: add enter and space to confirm the operation 2015-02-10 17:40:11 +01:00
0b1a886292 Cycles: optimize one normalization out from the previous commit 2015-02-10 21:32:44 +05:00
227a94077f Cycles: implement pointiness geometry attribute
This attribute means how "pointy" the geometry surface is, which allows to do
effects like dirt maps and wear-off effects on render geometry. This means the
attribute is calculated for the final mesh which means no baking (which implies
UV unwrap) is needed. Apart from this the behavior is quite close to how vertex
dirty colors works.

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

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

Reviewers: brecht, juicyfruit

Subscribers: eyecandy, venomgfx

Differential Revision: https://developer.blender.org/D1086
2015-02-10 20:33:41 +05:00
1ebf95bfd7 Tests: Disable failing import/export tests for until they're fixed 2015-02-10 19:29:18 +05:00
edb7195f27 Cycles: Bring back distance check in re-intersection
From more investigation of the numeric failures in the kernel it appears
the check was rather correct. But in theory it;s also needed for the motion
triangles.
2015-02-10 19:07:55 +05:00
b03ac83843 Cycles: Correction to glossy shaders not handling total internal reflection
The issue was caused by lack of check for whether fresnel term is actually
giving total internal reflection in refraction BSDFs. This lead to usage of
arbitrary vector of (0, 0, 0) as reflection, giving numeric issues in other
areas of the kernel.

This gives some visual changes of sharp reflection but it seems to be rather
proper now. Which also corresponds with rough glossy reflection with sharpness
set to 0.001 (previously it was totally different from sharpness of 0.0, which
is just weird).
2015-02-10 18:20:36 +05:00
298d8681a0 Fix T43596: Refraction BSDF crashes blender on pre-sse4 CPU
This is the same issue T43475: SSE4 code is more robust to non-finite values
in the ray origin/direction. So for now added a check before doing BVH traversal
for pre-SSE4 CPUs.

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

In any case, it's kinda fine to have such a check, we might later make it to be
a kernel_assert() instead of just a return.
2015-02-10 17:36:05 +05:00
e7d20b0be4 Fix grease-pencil crash without clip/track data 2015-02-10 23:34:16 +11:00
1cfe0c1fb2 UI: scale timeline cache-height by DPI/pixelsize
D602 by @blakenator with edits
2015-02-10 22:33:52 +11:00
27f81bf6ce correct last commit 2015-02-10 22:03:10 +11:00
040b510df1 Fix: Grease Pencil datablocks can be copied using the ID.copy() API method now 2015-02-10 23:30:30 +13:00
d21668de5c Synchronize changes from buildbot server 2015-02-10 13:47:28 +05:00
6971bd9a4f Fix T43611: Collision shape of rigid bodies changes inadvertently
The issue was caused by the fix for T34108, which modified DNA in order to
get a fallback box collision shape. Not sue why it's needed, we can just get
box shape directly, without modifying user's settings.
2015-02-10 12:56:25 +05:00
julianeisel
25412d8ae2 Nodes: Various UI cleanups for Image and Environment Texture Nodes
Mainly consistency changes and smaller fixes.

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

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

Requested and approved by @venomgfx
2015-02-09 23:17:33 +01:00
julianeisel
64ef6e74f7 Nodes: (Un)pack, filepath, refresh buttons for Environment Texture nodes
The same buttons are already used for other image textures and since the
environment tex node does only allow images as well, it makes sense to
have this here too.

Approved by @lukastoenne and @venomgfx,
requested by @venomgfx
2015-02-09 23:17:33 +01:00
53c4033b5b CMake cleanup: Move OSL detection code into FindOpenShadingLanguage.cmake
Should be no functional changes.
2015-02-10 02:45:59 +05:00
julianeisel
4ca4f04c75 Fix file size not drawn using Link/Append
For linking/appending, .blends get the type S_IFDIR added which prevents
the size from being drawn. BLI_is_dir gets the type from the OS so it's
better suited for this case.

Reported by @sergey.
2015-02-09 22:06:45 +01:00
4edc1bbe02 BGE - Vehicle Controller - add background and API checks for arguments of function calls
Fixes T41570 crash
For readability, attachDir was renamed to downDir and the Python API docs renamed accordingly
2015-02-09 20:58:15 +00:00
a088b9488d Recreating bge python modules instead of using existing
All of the initXPythonBinding functions are changed to always creating the module instead of importing if previously existing.
I can instead only remove the module return when the import is ok, so that it always inits. But then, I don't see the point in importing.

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

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

Reviewers: campbellbarton

Subscribers: sybren

Projects: #game_engine, #game_python

Differential Revision: https://developer.blender.org/D1070
2015-02-09 20:56:38 +00:00
31e26bb83b Fix T43424: undo changes the active scene
Using different scenes with 2+ windows broke entirely using undo.
Now keep track of the current windows scene in each undo-file,
and ensure the undo-scene is on a visible window when undo is executed,
switching the scene only when its not in a visible window.
2015-02-10 05:51:05 +11:00
2fe9e3c1f0 more direct fix for last commit 2015-02-10 03:00:37 +11:00
c4e8d74563 Fix T43498: New curves fails /w radius & rotation
Scaling matrix assumed no rotation,
also remove unused apply_diameter arg.
2015-02-10 02:50:59 +11:00
3c755fd6a5 Fix outliner crash renaming library /w filter
D1045 by @a.romanov
2015-02-10 02:05:22 +11:00
b83d851901 Cycles: Another attempt to solve 32bit CUDA kernel
Previous fix didn't quite work well. For some reason everything worked fine when
using native nvcc in 32bit environment, but cross-compiling from 64bit platform
it was still running out of memory.

For now just made it so all the kernels are slower on 32bit CUDA as a temporary
solution. Either it'll be solved in next CUDA releases (by dropped 32bit? =\) or
we'll find better workaround.
2015-02-09 16:14:44 +05:00
5544ded2b5 Fix ImBuf leaked by Image from View operator
Running this operator and and closing Blender gives this:
Error: Not freed memory blocks: 2
ImBuf_struct len: 2480 0x69ba4f8
imb_addrectImBuf len: 1048576 0x6ccc2d8

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

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1084
2015-02-09 12:02:59 +01:00
567e147f61 Code cleanup: remove unused function BKE_image_assign_ibuf
Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D1083
2015-02-09 11:28:38 +01:00
9c90c559fe SpaceFile: rework filelist_find, was looping way too much. 2015-02-09 10:10:20 +01:00
12ed439d8e GPencil: Show color swatches for GPencil layers in Outliner
Instead of showing a meaningless "dot" icon or having to come up with an arbitrary
icon, the Outliner now shows the stroke/fill color swatches for each layer to
match every other place where these are shown.

NOTE: Like many other widgets in the outliner though, these are not editable.
2015-02-09 12:48:00 +13:00
7df0a19d63 GPencil: Viewport visbility and editability toggles for layers in Outliner
* Viewport visibility and locking are currently exposed
* Later on, visibility in renders can also be included
2015-02-09 12:47:59 +13:00
julianeisel
6b107daf23 Fix T43554: Zoom to mousepos makes 2D Views pan after zoom limits are
reached

There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.
2015-02-08 22:35:33 +01:00
a19229b80c ndof: detect new 3Dx devices on Linux
Was filtering for Logitech's USB vendor ID. 3Dconnexion now uses their
own vendor ID for new products. Mac & Windows don't look for specific
vendors so they should be fine.

Also added a note to eventually make USE_FINISH_GLITCH_WORKAROUND
available on all platforms.
2015-02-08 15:01:18 -05:00
f0f3554e17 GHOST: fewer virtual functions
Reined back over-use of virtual functions in GHOST, especially in
"leaves" of the inheritance hierarchy. This eliminates vtables for many
classes and (in some places) turns virtual function dispatch into direct
function calls.

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

Still lots of virtual in GHOST_TaskbarWin32 since it just loves virtual.
2015-02-08 14:18:53 -05:00
8aeb9d2158 minor Windows include tweak
Needed a minor change to test committing from a new development system.
2015-02-08 12:41:45 -05:00
0d766aa532 Some minor fixes from latest coverity scan, nothing crucial here. 2015-02-08 16:26:45 +01:00
dd65a44c9a BGE physics: When colliding, report first contact point to Python
This patch adds two parameters to the functions in the
collisionCallbacks list. The callback function should thus be like
this:

```
def on_colliding(other, point, normal):
    print("Colliding with %s at %s with normal %s" % (other, point, normal))

game_ob.collisionCallbacks.append(on_colliding)
```

The `point` parameter will contain the collision point in world
coordinates on the current object, and the `normal` contains the
surface normal at the collision point.

The callback functions are checked for the number of arguments
`co_argcount`. The new `point` and `normal` arguments are only passed
when `co_argcount > 1` or when `co_argcount` cannot be determined.

Reviewers: brita_, campbellbarton

Subscribers: sergey, sybren, agoose77

Projects: #game_physics

Differential Revision: https://developer.blender.org/D926
2015-02-08 15:52:13 +01:00
51b645a655 Initial vertex slide UV-correct support
Still need to adjust for contiguous UV's
2015-02-08 17:58:11 +11:00
8ff099bc7b BoxPack: avoid using static vars (make threadsafe) 2015-02-08 17:07:47 +11:00
c6abfa6114 Fix for mask modifier invert UI missing
D1066 by @gregzaal
2015-02-08 16:30:27 +11:00
d989d8a374 CMake: only quiet warnings for generated rna files
also minor warning cleanup
2015-02-08 15:08:31 +11:00
9c9dab095d RNA: use FUNC_USE_MAIN to avoid 'G' global 2015-02-08 02:20:55 +11:00
e7c7f57481 RNA: packing functions for vfont & sound
D389 by @kevindietrich
2015-02-07 22:35:32 +11:00
5ebae1c0c0 GPencil: Initial support for GP Layers in Outliner
This is still very rudimentary, and lacks many things.
* This needs a better icon. Perhaps we can look into using colour swatches here
  too like in all the other places?
* The "active" check needs to be implemented still
* Various restriction toggles to come still
2015-02-07 12:50:22 +13:00
68fc2e210e GPencil: Initial support for Grease Pencil in the Outliner
This commit just adds entries for the Grease Pencil datablocks in the Outliner.
Currently, there's not much more to see here, but the following commits will see
to that.
2015-02-07 12:28:17 +13:00
ca06c3343e Fix T43515: Initial velocity for fire bug
Visual representation of fire was generated before simulation step took place. This caused fire to essentially lag one simulation step behind, even though all emission areas were up to date.
2015-02-06 22:05:09 +02:00
1b85ca6fc0 Fix T42950: Smoke particle flow doesn't work with high res and subframes unless "set size" option is ticked. 2015-02-06 21:23:43 +02:00
a42553f986 Fix T43579: FBX Export shading issue (Broken normals?)
Error in custom split normals work, non-autosmooth normals != vertex normals!
Loops from flat faces shall take normal of their face, not their vertex.

Tsst...
2015-02-06 20:14:18 +01:00
b12f3cbee7 cleanup: style 2015-02-07 04:50:21 +11:00
fa9e42b57d UserPrefs: increase max undo steps to 256 2015-02-07 04:26:57 +11:00
8ab1188e39 rename SIPO_AUTOVIEW -> SIPO_AUTO_VIEW_SELECTED
The term auto-view on its own isn't very meaningful
2015-02-07 03:47:06 +11:00
0e049e88e2 One more crashing instance for hashes 2015-02-06 17:39:26 +01:00
14dbe1c261 Slip tool accepts numerical input. 2015-02-06 16:38:32 +01:00
bf54867ff1 Get rid of no scaling for proxies for master, it causes FX to crash,
will code another workaround for gooseberry.
2015-02-06 15:58:50 +01:00
julianeisel
dffdde4cdc Graph Editor: Auto View
Auto View automatically adjusts the view based on selection, so that the view is
always focused on the current selection.
A checkbox in the header is used to access it and it works for the following
selection methods: Toggle All, Border, Circle, Lasso, Left, Right, More, Less,
Linked, Column (so all except of single selection, in which this can be a bit
annoying)

Reviewed by @Aligorith (thanks for that :) )
2015-02-06 15:53:13 +01:00
31170ec19e Fix T43578: Beauty Triangulation would hang in infinite loop, due to float rpecision issue.
Only recompute if cost is below -FLT_EPSILON, we can get cases where both cases generate
very tiny negative costs (see 'Cylinder.004' mesh in .blend attached to report).
2015-02-06 15:11:34 +01:00
f4f468fc48 Fix sequencer crashing after recent GHash refactor.
Code frees hash element while iterating - I don't think that's a good
idea but this should keep things working for now at least.
2015-02-06 14:28:08 +01:00
24edab07cc Add a precision to 'show group color' tooltip, that fcurve/action editors option was confusing users a bit. 2015-02-06 12:38:33 +01:00
c62c44bdc1 Fix for scons + mingw64 warning flags fix
So, it turns out my changes here the other day were a bit too over-eager:
  -Wdeclaration-after-statement and -Wstrict-prototypes only applied to C code
and not C++ (which that set of flags was getting included for too).

  However, -Wno-char-subscripts is fine where it is now, so I've left it in place
2015-02-06 23:51:31 +13:00
bf4c44491a Cycles: Some more constants fixes for fast math 2015-02-06 15:40:07 +05:00
460681bd62 Cycles: Use proper constant name for 1/pi in fast math 2015-02-06 15:15:55 +05:00
40f237675f Some tweaks to support upcoming OSL-1.6
Doesn't mean we're 100% ready for the transition, but need to start somewhere
anyway. Changes:

- OSL is no longer supporting cpp and requires usage of Boost Wave.
  So now Wave component of Boost is optionally demanded when looking for the
  Boost libraries if OSL is enabled.

  Only did this for Linux, MSVC seems already using Wave. Not sure about OSX.

- Because of the same reason OSL should be moved prior Boost for linker.

- Whole archive trick makes it so linking fails with duplicated symbols, so
  removed it for the new OSL. Didn't see issues with this so far.

- Added some code to check OSL version on Linux. Would need to move all that
  to FindOpenShadingLanguage.cmake which we can get from Cycles standalone
  repository.

  So in theory no affect on current stup would be made at all.

- Added some tweaks to buildbot files. It now seems to be happy with the new
  OSL libraries, but again, those tweaks are not in action yet.

All this was tested on Linux only. Win/OSX might still need some tweaks to
support new OSL.

P.S. This doesn't mean we're pushing OSL update yet, just making some
preliminary tweaks to avoid entropy of PITA when we'll actually want to
switch.
2015-02-06 14:57:32 +05:00
580bb26213 Fix some UI messages from own recent merge, and RNA code checking for final '.', was a bit too rough. 2015-02-06 09:52:31 +01:00
61c66a996c Outliner: DragDrop objects to groups
Support drag&drop objects to groups in the outliner.

D989 by @lichtwerk
2015-02-06 19:03:09 +11:00
b752597805 cleanup: use bool args & redundant casts 2015-02-06 18:19:29 +11:00
f9f04726e5 GHash: no need to malloc iterators 2015-02-06 15:34:36 +11:00
4cbf2ebdc9 Cleanup: style 2015-02-06 13:55:20 +11:00
ced4c5fe22 Animation play: Follow feature. Enabled from playback menu in the
timeline.

When enabled, ipo, dopesheet, NLA, timeline, clip and sequence editors
will follow the current frame during animation. When the cursor reaches
the end of the screen, then the next range of frames of the same width
is displayed.
2015-02-05 22:14:38 +01:00
d5b1dfa9c6 More fixes for high DPI:
* Radial operators were completely wrong
* Dynamic topology detail was also using unscaled number
2015-02-05 19:15:24 +01:00
77698f6010 Fix T43556 clamp brush size before setting it after division by DPI,
avoids nasty zero size brushes.
2015-02-05 19:11:00 +01:00
a1ec1b3974 Fix part of T43556 brush increase/decrease size operators do not update
the UI sliders.
2015-02-05 18:14:05 +01:00
15ff730b9b Change movie cache to use vectors instead of lists.
Runtime costs were horrible. On gooseberry in some sequencer edits using
proxies of small size, a cache with about 2000 elements would slow to
about 6 fps once cache was full and system tried to find smallest
element available.

There are still improvements to be done here, like requesting a number
of good candidates to avoid rerunnung through the list, or even using
some heap or ring buffer scheme to sort data, but nothing suits all
needs so for now that should bring the cache back to usable state (25fps
here at the studio)
2015-02-05 15:06:25 +01:00
f6e7989460 Custom Loop Normals: Add NormalEdit modifier
Nothing much to say here, basic tool to make normals point toward a target,
or to make them point 'outward' as if object was a spheroid (useful for game bushes etc.).

Also, forgot a big thank you to Campbell for the extensive review work he has done on this project!
2015-02-05 14:59:52 +01:00
2c3e4fbd7e Add Custom Loop Normals to Data Transfer.
Titles says everything, just two notes:
* We have to actually transfer plain *normals*, not 'compressed' clnors,
  so had to add pre/post process to transfer to make the conversions.
* Also added interpolation and advanced copy/mixing to CD_NORMAL, for same reasons.
2015-02-05 14:38:59 +01:00
138c9dba9b Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.

See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.

Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.

Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.

Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:32:57 +01:00
7bae9ee6b6 Mesh validate: add an option to not clean temp/cache CDLayers.
This is mandatory for incoming custom normal imports from io scripts, because
often geometry here is corrupted, so we need to call mesh.validate() to clean it up.

Issue is, we cannot set custom normals before geometry is clean, so we need to store
temporary plain loop normals in a CD_NORMAL layer, validate, and then set custom normals.
So we need a way to prevent 'temp' lnors to be freed by validate.
2015-02-05 14:03:01 +01:00
e442b9916e BLI_math vectors: add minmax_v3v3_v3_array to get min and max values on each components of an array of 3D vectors. 2015-02-05 14:00:58 +01:00
25f33e058a Fix T43562: Cycles gets stuck with camera in volume in certain setup
The issue was caused by the way how we shoot the ray to see which rays we're
inside which might start bouncing back-n-forth between two close to parallel
intersecting faces.

Real solution would be to record all the intersections when shooting the ray,
but it's kinda tricky on GPU because of needed sorting and uncertainty of
how huge intersection array should be.

For now we'll just limit number of steps in the check so in worst case we'll
have some samples not being correct which will be compensated with further
sampling. Shouldn't be an issue since probability of such a lock is quite
small actually.
2015-02-05 16:10:50 +05:00
0527fc5fb8 Fix T43566: Missing update event for VSE
VSE was missing NC_ANIMATION | ND_KEYFRAME events.
Also need to invalidate cache on those, else keyframe editing do not get reflected in VSE preview!
2015-02-05 11:54:47 +01:00
e922903ae8 Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array
Before this was hardcoded to 32, which I think was incorrect because
this is used to store a customdata layer name.

Reviewers: psy-fi, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1040
2015-02-05 11:20:24 +01:00
bec7d62218 CMake: add PLATFORM_LINKFLAGS to CMAKE_(SHARED|MODULE)_LINKER_FLAGS
D750 by @leszekswirski

Need for compiling Blender as a Python module in Windows.
2015-02-05 19:49:46 +11:00
343ddc52dc UI: UVWarp-Modifier had duplicate names
D1047 by @lichtwerk
2015-02-05 19:30:02 +11:00
f8c650aa7a Fix T43561: Wrong include path to standard OSL headers
Issue was in fact only visible in certain circumstances:

- OSL was compiled with Boost Wave
- or system's cpp didn't handle space between -I and path

Now made it so both wave and cpp code paths are always happy.

Original patch from Shane Ambler with own modifications to
mimic what variable holds on more verbose.
2015-02-05 12:34:29 +05:00
57e1a5373f Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
2015-02-05 17:01:58 +11:00
4e27f63828 Fix T43560: crash when loading old (2.45 here) file whith multires.
Was trying to free a NULL pointer...
2015-02-04 21:43:01 +01:00
37ae32870e Fix T43567: Freestyle On/Off keyframe is being ignored.
That kind of stuff shall not be animated! :)
2015-02-04 21:21:45 +01:00
ac2f608fa3 Fix T43450: Texture node tree failed to clamp
Clamping routine was not implemented. This fixes T43450.

Reviewers: #nodes, #rendering, sergey

Reviewed By: sergey

Maniphest Tasks: T43450

Differential Revision: https://developer.blender.org/D1038
2015-02-05 01:20:35 +05:00
363a044b4c Sequencer, scaling and audio synch
Don't scale proxies, same as we do in gooseberry, also for sound synch
give a small window around sound where frame is just pushed forward.
Avoids video jumping in the cases when video renders faster than sound
(yes, weirdly enough it happens sometimes). There might be a few jumps
but results looks smoother here.
2015-02-04 20:38:56 +01:00
Dalai Felinto
035d14c029 small typo in a code comment, fixing this before someone does it to prevent uneeded merge conflicts in branches 2015-02-04 17:19:40 -02:00
a78a17bad5 Fix T43366 export/import materials inconsistent 2015-02-04 19:07:28 +01:00
f75d2fdd24 Port fix from gooseberry that doesn't load the full res file if a proxy
is requested.
2015-02-04 18:48:55 +01:00
4339caf7cb Cleanup: name flip x/y 2015-02-05 03:56:24 +11:00
292444e3f5 RNA image.pack(): fix possible memleak, add possibility to pass raw bytes data.
Note passing data assumes user knows what he is doing, else segfault is guaranted
(there is no good ways to pass raw bytes data to RNA func currently, and using
int array is way too heavy in this case).

And image->packedfile was never freed...
2015-02-04 15:40:28 +01:00
fe03bc2a02 Support rotation and flipping for background images, patch by Andre D.
(T34583) with minor changes. Thanks for the patch!
2015-02-04 15:05:36 +01:00
32482aadb8 BGE physics: allow higher values for maxlogicstep and maxphystep
Increasing those values beyond 5 is important for exact physics
simulation. Soft limit is increased to 50, hard limit to 10000.

To be able to set different values for hardlimit and softlimit,
RNA_def_property_range needs to precede RNA_def_property_range, hence
the swapped order.
2015-02-04 14:16:10 +01:00
31425f9225 Compiler warnings tweak for scons + mingw64
The warning flags in C_WARN were not actually getting included
(most notably, the one disabling the pointless + braindead one
about using chars to index into arrays - given that we only use
unsigned chars everywhere). Maybe this should get done for the
other scons platforms too?
2015-02-05 00:50:50 +13:00
810c7ee825 Fix T43552: Cannot jump between GP keyframes in dopesheet 2015-02-05 00:04:46 +13:00
66eacc2abb Fix for recent LANG locale workaround
Need to get a copy of the string since stored pointer is affected
by subsequent calls of setlocale().
2015-02-04 16:02:47 +05:00
3b0c4d888c GLSL: On some cards '>' can't operate on 'float' and 'int'
So make it so comparison doesn't imply type-cast.
2015-02-04 15:54:42 +05:00
da06dab4e5 Cycles: Use pre-aligned triangle vertex coordinates for subsurface intersection
This gives small speedup (around 2% in quick tests) for ray scattering.
2015-02-04 14:49:19 +05:00
d16ac1e152 Compositor: Code cleanup, trailing whitespace and wrapping 2015-02-04 13:04:09 +05:00
1dddcfbaff Compositor: Implement sampled motion blur for plane track deform node
Quite striaghtforward change, and in theory we can even try supporting motion
blur for the corner pin node (which is tricky because coordinates actually
coming from sockets, but with some black magic should be doable).
2015-02-04 01:17:59 +05:00
c69458985c Hook Modifier: add falloff & radius options
- Add falloff types & curves (matching warp-modifier)
- Add uniform scale option,
  important when adding hooks to non-uniform scaled objects,
  especially for use with lattice objects which can't avoid uneven scaling.

  This uses relative transformation set when the hook is assigned,
  when measuring the distances.
2015-02-04 07:16:20 +11:00
a66a54c06d New Hook's now use the objects center
When adding a hook to an existing selected object/bone,
Use the location for the hook (instead of the selected vertices).
2015-02-04 07:16:20 +11:00
37a08ae5c5 UI messages: minor fixes... 2015-02-03 20:25:14 +01:00
f4535c1a7a Install_deps: update to new exr/oiio versions, and (hopefully) fix ILMBase mess
Root of the issue is an (hidden!) parameter in ILMBase cmake options, that
is enabled by default, and force the generation of those ugly lib names
(Imf_2_2.so & co). Why why why enable such thing by default?

Anyway, it should be simpler to build again even on linuxes having the openexr -dev
package installed.

Also, cleaned up a bit things, now we can switch between repo and plain release archive
building from a single place for each lib, instead of commentting/uncommenting everything
each time (for libs where we have some git repo set up for some reason).
2015-02-03 19:59:07 +01:00
c2f6a07531 Fix possible (unlikely) buffer overrun
Translated strings didn't check fixed length for PET id's
2015-02-04 05:51:48 +11:00
02acfdab9e Add inverse-square blending for PET and warp
Similar to 'Root' but without noticeable spike/pinch in the center.
2015-02-04 05:45:30 +11:00
15cd222270 BGE: python API initialization cleanup
The goal of these changes is to Close T40132 and to get rid of the 'PyRun_SimpleString'

Hilighted changes are:
- consistent naming and initialization of BGE submodules
- initialization of the 'bge' module as a proper module
- using PyDoc_STRVAR instead of static char*
- generic cleanup (unused arguments, logica ordering, naming and whitespace)

Reviewers: campbellbarton

Maniphest Tasks: T40132

Differential Revision: https://developer.blender.org/D983
2015-02-03 15:32:55 +00:00
2699866720 BGE: python API cleanup - initialization for bge with submodules, closes D615 2015-02-03 15:32:55 +00:00
0e0af4f772 BGE: python API cleanup - adding proper initialization to GameTypes 2015-02-03 15:32:55 +00:00
e67bd30bdf BGE: python API cleanup - replace BLI_program_path with BKE_appdir_program_path 2015-02-03 15:32:55 +00:00
ba0978c1a9 BGE: python API cleanup - bge submodules definitions 2015-02-03 15:32:54 +00:00
a7b0330c13 BGE: python API cleanup - using PyDoc_STRVAR instead of static char*
Cherry-picking d503f8a onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
95425bc97a BGE: python API initialization cleanup
-Removing unused parameters
-Updating some parts to match bpy_interface.c initialization

Cherry-picking 14fceb6 onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
c48c20b498 Fix T43530 using blender on remote connection crashes
Issue here is that remote connection will use OpenGL 1.1.
There was a call here that would free VBOs always without a check,
however the VBO free function pointer is NULL on such contexts causing a
crash.

This must have been causing some of the crashes with old contexts. While
I think supporting those systems is not such a good idea in general,
they can have a few more moments of support I guess.

Things might be better now for systems using OGL 1.1 though there are
still things that could be done better here - for instance going to
dyntopo can crash immediately because we don't have a fallback
implementation there. It might be worth reimplementing sculpting with
vertex arrays for the legacy case too, but I guess if we move on to
OpenGL 2.1 soon this is a bit of a wasted effort.
2015-02-03 16:18:19 +01:00
2d4980e68e Fix T42510: bake animation wrong result.
Caused by own rBfb7ff31315a1c9 - not surprising code using Object.matrix_local
in other contexts than mere Object parenting fails, since it was using a broken
implementation before...

Note that whole NLA_OT_Bake op would need some love, it is quite brittle in many aspects.
2015-02-03 15:44:20 +01:00
3ff9e52dca Fix T43380 modulo operation in GLSL does not return negatives.
Make it so by checking operand sign.
2015-02-03 15:08:42 +01:00
8186214c39 Fix T43514: Environment map doesn't update 2015-02-03 18:52:01 +05:00
a01501443b Bugfix T43541: Inserting keyframes using sliders in Action Editor doesn't respect NLA time remapping 2015-02-04 02:22:57 +13:00
445eed8e38 Fix T43403: Compositor does not respect interlaced video
This is actually issue with Image datablock, which had obscure Fields settings
but didn't allow to de-interlace the video.

Now added the option to de-interlace Image with Movie input type.
2015-02-03 18:17:12 +05:00
701a7dcc87 Fix T43544: Runtime Error when Locale is not valid
This is not a real fix and only prevents crash, textures IO might be not
working totally correct if they're unicode path or so. Proper solution
would be to detect which locale we can use and set LANG, LC_ALL and friends.
2015-02-03 17:36:15 +05:00
1667e68797 Revert "Keep mingw specific includes ifdef'd"
This reverts commit ba8b9ae307.

Turns out this is needed on other systems, just happened to be indirect included on them.
2015-02-03 23:24:31 +11:00
ba8b9ae307 Keep mingw specific includes ifdef'd 2015-02-03 22:54:57 +11:00
529ca92975 MinGW still uses SDL1 - will need to change this of course but no need
to keep compilation broken for now
2015-02-03 12:51:12 +01:00
7345d558f9 MinGW64 complains about clock, include time.h 2015-02-03 12:31:51 +01:00
488b342741 BMesh: optimize selection flushing
De-selecting a face would do flushing checks on each vertex 3 times, now only do once.
2015-02-03 19:59:39 +11:00
af2d75b9a7 cleanup: inconsistent BMesh select checks 2015-02-03 19:08:25 +11:00
faaaf7ee1f Possible NULL de-reference on fullsceen check
Also quiet some other minor warnings
2015-02-03 16:42:22 +11:00
32125c40d3 Fix own mistake unlinking text (recent commit) 2015-02-03 16:39:32 +11:00
27cfd291c6 Fix copypaste error in x11 tablet init 2015-02-03 16:37:37 +11:00
75249259f4 BMesh: optimize edge select
It's called a lot, so avoid using a generic iterator for edges of vert.
2015-02-03 09:33:04 +11:00
052a021711 cleanup: indentation & redundant casts
also use 'const' bucket rect args
2015-02-03 09:33:04 +11:00
5678691fe4 cleanup: use bools in drawobject 2015-02-03 09:33:04 +11:00
ce6e71ea90 Make MSVC 2013 win32 also use new OpenEXR 2.2 2015-02-02 21:30:28 +01:00
d7ad64cc5e Bump OpenEXR to 2.2 for windows MSVC 2013 2015-02-02 19:44:49 +01:00
9f874ddb99 Warp modifier: remove redundant NULL check 2015-02-03 04:38:59 +11:00
72f02437e7 Warp modifier: avoid sqrt checking radius 2015-02-03 04:35:40 +11:00
d0ae2624f5 Fix T43524: Warp modifier curve clamped to 0-1 2015-02-03 04:35:40 +11:00
e224b5b9ca Cycles: OSL kernel now also ignores maybe-uninitialized
This is a bit of a mess because of the header dependency hell, but
since the tweak is small enough it's gonna be fine.
2015-02-02 22:15:33 +05:00
432e478f43 Cycles: Further tweaks to T43511 to solve compilation error on 32bit platforms 2015-02-02 22:09:02 +05:00
30e4009f0a Cycles: Solve dependency between camera and object synchronization
IN theory object might depend on camera location (spatial adaptive subdivisions
for example) which became not possible to achieve after camera in volume support.

Should be no functional changes for artists.
2015-02-02 22:09:01 +05:00
ddba5c27a7 Cycles: Ignore -Wmaybe-uninitialized from the kernel in release builds
This warning provided too much false-positive issues in release version of the
kernel, making it really easy to miss actual warnings.
2015-02-02 22:09:01 +05:00
23e3dbb726 Selection: avoid uninitialized memory read with occlusion queries 2015-02-02 17:45:07 +01:00
2c82e748c1 Fix for hair child roughness.
The fixed-function roughness was not getting used once the curve
roughness has been enabled at least once.
2015-02-02 14:47:50 +01:00
750506be97 Adjust GLSL drawing of window coordinates from camera view (use camera
bounds instead of window bounds). Fixes remaining part of T43346
2015-02-02 14:26:05 +01:00
14755dde97 Fix for unfreed effector weights in hair dynamics.
The internal cloth modifier effector weights get replaced temporarily
to make the cloth sim use the particle weight settings instead. But
the particle sim was not putting back the original weights, which can be
non-NULL in case the cloth sim allocated these already. Messy design ...
2015-02-02 14:19:05 +01:00
159124726e Fix for unfreed memory due to unnecessary early exit in the free
function.
2015-02-02 14:19:05 +01:00
961b7e78b4 Fix for unfreed memory of internal hair cloth modifier pointcache. 2015-02-02 14:19:04 +01:00
5030daf2a8 Cycles: Remove redundant calculation of w in recent cubic commit
Was rather harmless since compiler will optimize it out, but nice to get
rid of this anyway.
2015-02-02 17:35:57 +05:00
31263192bb Fix T43511: Major slow down with many instanced objects in cycles GPU
Slowdown was caused by watertight intersection commit and follow-up workaorund
for compiler crash which uninlined utility function which rotates the ray.

Now it's only uninlined for sm_50 and sm_52 experimental kernels which are the
only ones which failed to compile.

Rendering still might be a bit slower but at least shouldn't be that dramatic.
2015-02-02 17:35:57 +05:00
81f97692ae cleanup: style/spelling 2015-02-02 23:29:53 +11:00
7b369080d0 Avoid warping the pointer when doing constrained texture painting
strokes
2015-02-02 11:29:01 +01:00
7ea7c2aab2 Cycles: Fix inconsistent command line used for runtime kernel compilation
Basically build-time compiled kernels were using --fast-math (which is correct)
but run-time compiled did not.
2015-02-02 15:00:21 +05:00
8cd106f12a minor edits to last commit 2015-02-02 19:21:26 +11:00
julianeisel
f12c17abfe Fix T43501: Crash on custom node tree creation 2015-02-02 03:04:31 +01:00
0305b208eb Fix for Freestyle view map caching not properly updated upon changes of render resolution and scale.
Problem reports independently by Light BWK and Folkert de Vries, thanks.
2015-02-02 10:00:12 +09:00
64124ba904 BMesh: tool to ensure all faces are convex
Access from Mesh -> Cleanup
2015-02-02 09:23:44 +11:00
d655a8f168 BMesh: BM_face_triangulate take edge array
To access edges created between the tris.
2015-02-02 09:22:54 +11:00
b757f04a15 Cycles: Indentation fix for the previous commit 2015-02-02 02:04:47 +05:00
3b9d455a90 Cycles: Implement cubit image interpolation on CPU
Basically title says it all. Could be not totally optimized but the code is there now.
2015-02-02 02:02:10 +05:00
0827441c32 Add extra Cycles regression tests
This new tests are aimed to issues/regressions reported to the tracker.
2015-02-02 02:02:10 +05:00
77e6f2212f Cycles: Allow paths customization via environment variables
This is for development and test environment setup only, not for
regular users usage hence no mentioning in the man page needed.
2015-02-02 02:02:10 +05:00
60c643d66a error in last commit 2015-02-02 05:01:48 +11:00
8350f7a587 RNA: add readonly pixelsize to userprefs 2015-02-02 04:57:41 +11:00
baa8b63111 Documentation: updated mathutils documentation
Added descriptions of the constructors, and improved the module-level
documentation.
2015-02-01 18:16:12 +01:00
fd75796afe cleanup: use const 2015-02-02 01:23:08 +11:00
2e6e92cf50 Documentation: Support documenting constructors in class __doc__
Python types defined in C can now start their docstring with a
`.. class:: TypeName(args)` line, to document their constructor.
In that case the documentation writer is responsible for indenting the
remainder of the docstring by 3 spaces, matching the generated
documentation.
2015-02-01 14:00:43 +01:00
9fa628f35b mathutils: added exponential map to Quaternion
Added conversion to and from exponential map representation. This
representation is useful for interpolation of > 2 quaternions, or in
PD controllers.

Implementation in C functions quat_to_expmap,
quat_normalized_to_expmap, and expmap_to_quat with Python API, unit
tests and documentation.

Added Quaternion.to_exponential_map() and Quaternion(3-vector) to
Python API.

Reviewers: campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1049
2015-02-01 13:06:00 +01:00
8c7e1b648b Fix: correctly describing Quaternion.normalize()
The original comment seems to suggest that only the rotation vector
is normalized, leaving the rotation angle alone. This is not what happens,
though. The new comment matches the actual implementation, and the
implementation matches what is commonly understood as quaternion
normalization.
2015-02-01 10:34:49 +01:00
01ec66423c BMesh: remove redundant connect-nonplanar loop 2015-02-01 19:18:39 +11:00
26f9a92453 WM: empty menu so addons can extend the splash 2015-02-01 04:19:55 +11:00
595675ea7a Cleanup: style 2015-02-01 04:19:55 +11:00
5ac7e23e88 Blender metadata changes to accommodate non string data
Work towards T42418

For now got rid of linked list holding key,value pairs for metadata in favour of ID properties.

Reviewers: campbellbarton, sergey

Reviewed By: sergey

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D872
2015-01-31 17:15:43 +01:00
f90891d87e Add PIL_check_seconds_timer_i to avoid casting
note, win32 casts still casts from double.
2015-02-01 02:00:08 +11:00
9e9cd77b8d Compiler warning: double-promotion 2015-02-01 01:17:21 +11:00
535de7ec1f Comment for math defines, also add M_PI_4 2015-02-01 00:37:55 +11:00
03cb146afa Fix T43496: Infinite loop in kernel when using surface attribute for volume
The issue was caused bu the optimization in surface attributes for cases when
there's only a volume shader used. Some attributes doesn't make sense in that
case and were skipped from calculation.

However, it is possible that kernel would still try to access them (because of
the shader setup etc). Prevented an infinite loop in the kernel now, which
should not have much affect on regular renders.
2015-01-31 14:39:19 +05:00
3f5771475d Cycles: Don't perform re-intersection if ray distance is zero
It is possible that ray distance will be zero which would make intersection
refinement return NaN as the refined position which would later lead to all
sort of mathematical issues.

Don't think there are ways to improve intersection accuracy for such rays
so just return original intersection coordinate.

This should fix T43475.

TODO: Need to look into possible issues in Ashikhmin BSDF which might return
zero-length reflected/transmitted ray?
2015-01-31 01:49:48 +05:00
cb2007906f Cycles: Use bool for is_lead array
This way we save 3 bytes per BVH node while building BVH, which overall
gives 100Mb memory save when preparing Frank for render.

It's not really much comparing to overall memory usage (which is 11Gb
during scene preparation here) but still doesn't harm to have solved.
2015-01-31 01:49:41 +05:00
d632ef7c66 Cycles: Use fast math functions in hair BSDF
Precision of the fast functions seems to be enough in there and
since the code was heavily using inverse trigonometric functions
this change gives few percent speedup on Victor's hair.

From the tests files from ctests storage doesn't have any meaningful
difference, hair on Victor is all below 4% absolute error and only
few pixels are exceeding 1% absolute difference.

In any case, let it be as it is currently so it allows us to have
fast math file in sources for it's further evaluation and possible
usage in other areas as well.
2015-01-31 01:49:41 +05:00
dc1043dda0 Cycles: Add fast math function module
It is based on fmath.h from OIIO and could be used to give some speedup
in areas where absolute accuracy is not so critical.
2015-01-31 01:49:41 +05:00
3dbfebc42c First version of constrained line strokes - there's some flickering
still, will look into it later.
2015-01-30 19:47:58 +01:00
0da38ada07 Operator that sets proxies needs to cater for all supported strip types 2015-01-30 16:09:55 +01:00
b58b182753 Get rid of the file touch hack.
If user cancels, there's an issue with leftover files.
Instead use a hash to record files that have akready been registered for
generation and skip them if so.

That should guarantee things will go smoothly and when a file exists it
is assumed to be valid.
2015-01-30 16:00:30 +01:00
f7e8da6f5a Proxy enable operator:
* Enable operator for proxies now becomes set operator for selected and
can unset-set all options.
* Properties become read-only labels, only use operator to set proxies.
2015-01-30 15:13:59 +01:00
7760e97c6b More hacks for proxy generation:
Touch the proxy files if they do not exist so subsequent strips
referencing the same source file won't regenerate it.
2015-01-30 14:30:24 +01:00
d8c20fbb66 Fix T43324: Shrinkwrap projection issue in editmode.
Nice stupid error in low-level `get_cddm` helper, was probably affecting other
modifiers too actualy!
2015-01-30 12:50:38 +01:00
7d543e7310 Corrections to Cycles ctests
- Apply VERBOSE to idiff result as well
- Don't treat verification failed error as unknown
2015-01-30 15:13:09 +05:00
a3c13fa9e8 Cycles: Remove confusing labels usage in hair BSDF
BSDF sampler function shouldn't give labels it's not intended to do.
That said reflection shouldn't give transmission ray and transmission
give reflection ray.

Added an assert in the transmission sampling but reflection still
needs some investigation because even after recent fixes the check
for projection onto the reflected ray could give both positive and
negative values.

It shouldn't have any affect on renders just makes internal logic
consistent and unleashes an issue to be investigate further.
2015-01-30 14:00:24 +05:00
bd10b72ad3 Fix T43458: Crashes with hair transmission BSDF
Hair BSDF did not have proper behavior because of non-normalized
tangent direction (which it expected to be normalized).This lead
to wrong labels being returned by the hair BSDF samplers.
2015-01-30 13:03:01 +05:00
6b81ee6bea Committing the impressive RTheme to the default collection 2015-01-29 23:24:30 -06:00
c6d4a3f3ba Correct location of 'text' button in frame-node 2015-01-30 13:41:07 +11:00
d56c9fb420 Fix T43472: IMBuf: crash on loading top-to-bottom bitmaps.
Height of bitmap may be negative, which indicates a 'top to bottom' line storage.

Also, fixed header handling, bitmaps using other header than 'BM' would most likely
have lead to errors/crashes too...
2015-01-29 20:42:34 +01:00
cff7ef6ee8 Fix texture sampling getting srgb color after fix for subsurf sampling. 2015-01-29 19:34:51 +01:00
ebc064f5c0 Gooseberry request: Dithering support for byte images when painting on
projection painting (2D will be separate commit).
2015-01-29 19:23:57 +01:00
12a38abac6 Fix T43473: mathtutils.geometry.interpolate_bezier returns only 2d coordinates
Fixed/enhanced a few usages of `mathutils_array_parse()` in this file actually...
2015-01-29 18:11:13 +01:00
d2e526a82d Cycles: Fix for bump node not working with object texture mapping
This was intended to be in the original patch of texco copy from object.
2015-01-29 21:48:22 +05:00
a0e8b98b61 Fix T43207 fill brush fails in perspective mode
Divide only the length of the edge by the homogenous coordinate, not the
final coordinate. Also fix the swapping (though it's still a bit
doubtfull if it's really needed)
2015-01-29 17:45:43 +01:00
43fab448f3 Followup for previous commit: fix mismatches between menu entry and shortcut properties.
For now, did most of the changes in menu entries (i.e. py space UI scripts).

Note we do not get 100% same results as previously, but current situation is
globally better than previous one, though the whole system to retrieve shortcuts
remains a bit weak...
2015-01-29 17:34:05 +01:00
945ea40887 Fix T41757: Inconsistent hotkey label with setting.
Issue is double here:

* Quite a handfull of menu entries actually diverge slightly from their shortcut
  counterpart (often one has a prop explicitely set to its default value,
  when the other keep it unset).
* Current code was actually basically sending 'is_strict' option into canal,
  by doing a second check in `wm_keymap_item_find` setting unset op props
  to their default value!

Now, is_strict mostly says one thing: "never consider an unset property as
equal to a set one". Even if set property matches default value. Default values
are not always the same things as unset ones, as demonstrated by this report.

So we are being much stricter now, and also have to check shortcuts and
menu entries definitions actually matches, added some code (triggered by
--debug-wm option) that prints when it finds some (potential) issue.

There is one exception though - Macros. Those have their whole prop set defined
in menu entries currently, this shall probably not be the case, but is another issue,
so for now for macro operators we always do non-strict comparison (pretty much
the same as previously, in this case).

Also 'enum' operators are still tricky. Currently, shortcut extraction relies on
`ot->prop` being set, so even if this is not aboslutely needed anymore (when defining
UI you can specify an arbitrary enum property by name), `ot->prop` shall be set.

Note fix commit for mismatches between menu entries and shortcuts is needed next.
2015-01-29 17:32:34 +01:00
79ba5e52dd Revert "mathutils: let Vector.normalize() return the original length."
Please discuss changes to core mathutils functions first.

Changes like this should be considered and applied to all areas of the API (or not at all).
Missed quaternion, matrix normalize for eg.
2015-01-30 02:12:07 +11:00
7ce7cb5e0f Fix T43454 color is washed out in textured brushes
Yet another color space issue, we multiplied texture color with srgb
brush color and retrasnformed it to srgb. Now use the linear brush color
for the multiplication.
2015-01-29 15:46:49 +01:00
6912fe132f mathutils: let Vector.normalize() return the original length.
The length has to be calculated for normalization anyway, and it is already
returned by normalize_vn(vec, size).
2015-01-29 15:29:01 +01:00
4a99c1ad75 Add override setting to proxy enable operator 2015-01-29 14:40:16 +01:00
87986ed139 Sequencer: Report proxies which are being skipped to the console 2015-01-29 16:58:18 +05:00
a863261ee8 Whitespace cleanup 2015-01-29 12:37:57 +01:00
e0fa282340 Add some convenience operators to sequencer proxy panel:
Enable proxies for all selected movie strips (won't do recursive
enabling for metastrips yet)
Generate proxies operator here, as well as in strip menu
2015-01-29 12:37:57 +01:00
eb150ef337 Node UI: add support to show text-blocks in frames
Some node setups benefit from being documented like this.
2015-01-29 22:04:32 +11:00
c44d7b0340 BGE: Remove duplicated audio panel from Render context
This commit removes the audio panel from Render context as it exists a similar panel in Scene context.
Also, it gives to the Distance Model a similar UI layout as it was in the removed render->audio panel
2015-01-29 18:26:28 +11:00
3cf7a8008e Fix crash on joystick access (if SDL's not found)
D985 by @pgi
2015-01-29 17:17:29 +11:00
072d80a9de Fix T42858: Non uniform gamelogic names on copy
Use generic function for consistent behavior

D949 by @lordloki
2015-01-29 16:43:20 +11:00
65574b0b03 cleanup: shebang lines
D888 by @sambler
2015-01-29 15:56:23 +11:00
1738d4acc9 Bone calculate roll (pos/neg options in menu)
This change means you can see the option to do +/- aligned axis when calculating roll
(in that case the flip-axis option is ignored).

This is added since you mostly don't want to set the option in the toolbar each time.
2015-01-29 15:46:38 +11:00
7095f47665 cleanup: pep8
also remove empty class parenthesis
2015-01-29 15:35:06 +11:00
d434815ff7 Audaspace: Fix typo in speed of sound initialization value by lordloki (Jorge Bernal) 2015-01-29 12:20:41 +13:00
julianeisel
d183e9b43b File Browser: Remove unused fileselect event value
This was initially added for a later support of making the automatic File
Browser fullscreen optional. As this idea was rejected for now (D1037) it
doesn't really make sense to leave these things in.
2015-01-28 23:35:46 +01:00
dd673337f1 BGE: draw contact points + normals in yellow
Red was used with different semantics in the physics visualisation,
switching to yellow to prevent confusion.

A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's
the yellow balls + lines.

Reviewers: brita_, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: lordloki

Projects: #game_physics

Differential Revision: https://developer.blender.org/D925
2015-01-28 22:09:58 +01:00
e5a852c3f3 BGE: draw contact points as sphere + line indicating the surface normal.
A screenshot can be found at http://www.pasteall.org/pic/80766 -- it's the yellow balls + lines.

Reviewers: brita_, lordloki, campbellbarton

Reviewed By: lordloki, campbellbarton

Subscribers: lordloki

Projects: #game_physics

Differential Revision: https://developer.blender.org/D925
2015-01-28 22:09:58 +01:00
773d85ab32 Based on Sergey's suggestion, use spinlocks for threaded loading of
waveforms.
2015-01-28 19:45:29 +01:00
424100cecb Update scons build documentation
- fix dead blender.org link (build dependencies)
  - rewrite $BLENDERHOME/{config,tools}/* to $BLENDERHOME/build_files/scons/{config,tools}/*

Patch by David Creswick, thanks!

Reviewers: jesterking

Differential Revision: https://developer.blender.org/D798
2015-01-28 23:40:41 +05:00
66f85d3487 Added default install location from install_deps.sh to FindOpenEXR.cmake
Patch by Oliver Weissbarth, thanks!

Differential Revision: https://developer.blender.org/D907
2015-01-28 23:36:51 +05:00
cde9b1b948 Fix clicking into texpaint slots not changing active image in blender
internal when using nodes.

Using nodes in blender internal is not well supported, but there's no
harm in allowing this and it will help manu do his texturing better :)
2015-01-28 15:34:11 +01:00
17cb55e442 Fix warning from previous commit:
Set slot to NULL when no active slot is found.
2015-01-28 15:24:37 +01:00
1a0ef58bdf Code cleanup: break up project_paint_begin() into smaller functions
This initialization function was massive with lots of local variables,
quite hard to follow. Splitting up doesn't make it perfectly clear,
but a bit better.

The changes are mostly quite mechanical splitting apart code, plus a
few new temporary structs for passing data without too many confusing
args. No intentional changes to functionality.

Reviewed By: psy-fi

Differential Revision: https://developer.blender.org/D1035
2015-01-28 14:49:44 +01:00
5d04470851 Texture painting, support cycles UV Map nodes:
Support UV Map nodes for determining active UV layer. Now when an image
node is enocuntered, the system will recursively search the node's input
sockets for any UV Map nodes. Obviously this won't fetch any coordinate
transforms into painting, and it will only choose the first UV Map node
encountered if more than one UV Map nodes are combined.

However it should allow custom UV setups per materials and tweaking of
the UV Map node's UV layer from the Slots panel.
2015-01-28 14:43:07 +01:00
7c72ba60d7 Sequencer: Option to skip strip proxy generation if they already exists
This is a per-strip option next to the build proxy size which tells blender
whether to skip building proxy size if the file for it already exists or not.
The option is called "Overwrite" for simplicity.

This option is enabled by default to avoid changes in the file behavior.

TODO: Would be nice to do something like that for movie clips as well.
2015-01-28 17:32:33 +05:00
7a6d757a3b Add theme option for cliping border 2015-01-28 13:03:42 +01:00
1678cb9af2 Fix dreaded black screen for missing proxies - if requested proxy size
is not found, use the original footage instead
2015-01-28 11:48:22 +01:00
0451934538 Properly decrease users of images when deleting a paint slot. 2015-01-28 11:09:30 +01:00
ce52e781b0 Switch windows MSVC builds to OpenAL-soft 2015-01-28 10:36:19 +01:00
e17c6f79a5 cleanup: py imports 2015-01-28 16:50:51 +11:00
julianeisel
3e59092348 Stacked fullscreen area support (proper implemenation)
Adds support for stacked fullscreens. This basically means, if a user opens a
temporary fullscreen mode, such as the File Browser or the Image Editor render
view, from a different fullscreen, the "Back to Previous" function or the other
ways to escape those temporary fullscreens don't return to the split screen
layout but to the previous fullscreen he has been in.

I already committed something similar (f7e844570f) but that was only
supposed as a fix, it didn't work for the "Back to Previous" operator and the
implementation wasn't really reusable. This one looks a bit nicer + makes some
older hacks unnecessary :)
2015-01-28 02:52:49 +01:00
01cebb6e91 OSL: Updates for OSL 1.5 API changes.
* create() and destroy() are deprecated since OSL 1.5, use regular constructors / destructors.
2015-01-28 01:07:59 +01:00
Dalai Felinto
7b16fda379 Fix T43388 Cycles Baking gives different results than Cycles Render
Reported and nailed down by Michale (MeshLogic).
The code that fixes this was commented out, but Brecht gave the go ahead to use it even if it is not the real solution
2015-01-27 18:20:42 -02:00
86d2765ebe Interface get rid of some quadstrips in favor of trianglestrips
If we ever want OpenGL 3.2 core context quadstrips need to go anyway and while there is much more things that need to be done this is something that can be tackled without any mayor surgery.
And without losing any kind of compatibility with ancient GL.

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: psy-fi

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D1027
2015-01-27 20:18:59 +01:00
1bfeabf4c5 Correction to tooltip, object texture space is supported by both SVM and OSL 2015-01-27 23:54:24 +05:00
9aefe08711 Fix T43398: Viewport "Renderend" ist not updated when a material is assigned to a face
The issues goes back to eb016eb and now it becomes clear object could be tagged for
update from the edit mode as well.
2015-01-27 22:41:56 +05:00
3f8f4175c3 Fix T43309 saving takes longer.
Issue is that world shader compilation and loading may take long so we
just draw file previews with premultiplied background. Should create the
old familiar transparent background files.

Thanks to Sergey for figuring out the issue.
2015-01-27 18:02:08 +01:00
937c2d8473 Followup fix for T43394: Reconnect feature was using identity matrix for
transforming hair into world space, but this is already happining due to
the global flag.

Still is a horrible mess, legacy code headache as always ...
2015-01-27 17:51:21 +01:00
3b50d3a04f Fix T43346: Window mapping is wrong in preview render
The issue was caused by the whole viewplane used for mapping calculation
which would for sure lead to differences between final camera render and
viewport render from the camera view.

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

It's not totally clear what's the right thing to do when viewport is not
in the camera view mode and that part is left unchanged.
2015-01-27 21:47:00 +05:00
332cf291e4 Fix T43250, lamp node did not use energy when used with nodes in blender
internal.

Similar to fix for T42074 we need to multiply with energy -after-
texture application.
2015-01-27 16:34:40 +01:00
2d86f58e0f And one more infamous BPlayer Fix (tm).
Seriously, please build complete Blender when you change some public func signature...
2015-01-27 16:28:54 +01:00
0d5ebabe43 Fix T43367: Non-wacom tablets broken on Blender in linux?
Looks like with some versions of Xlib (at least the 1.6.2 currently used on Debian testing)
and/or evdev generic driver (2.9.0 currently on Debian testing), you have to also 'select'
DeviceButton1Motion with the extended tablet's motion event, otherwise you won't get any
tablet motion event once pen is pressed, leading to no pressure (each stroke keeping its
init pressure until the end). Crap!
2015-01-27 16:23:56 +01:00
77848f23a4 Fix T43371 lamps not updated on appenidng. Remove GPU materials on
appeniding.
2015-01-27 15:41:45 +01:00
d687625ad8 Correct path to mingw64 libs so some minimal blender subset is possible to be compiled with older gcc 2015-01-27 19:29:22 +05:00
58f7deca58 Fix T43429: bpy.ops.render.render() not working with scene in VSE
Was a mistake in threading conflict prevention condition.
2015-01-27 17:14:14 +05:00
9e48f010c4 Proxy job: make user cancelling actually matter 2015-01-27 12:30:00 +01:00
d9c77a490c 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.
2015-01-27 16:14:53 +05:00
df07a25d28 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
2015-01-27 13:36:30 +05:00
ddc0d28031 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 ...
2015-01-27 09:09:07 +01:00
59e2f919ac missed last commit 2015-01-27 03:41:05 +11:00
b94efe0e8b BGE: remove Py3.1 workaround 2015-01-27 03:29:45 +11:00
7bc6fbf158 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!
2015-01-26 16:59:24 +01:00
fca515838e 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...
2015-01-26 16:59:24 +01:00
d44890ee75 Code cleanup: de-duplicate codegen texid assignment
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:10 +01:00
c5f5012c5a Code cleanup: use GPUDynamicType instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:07 +01:00
8174ea2684 Code cleanup: use GPUDataSource enum instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:04 +01:00
3a3d68cd88 Code cleanup: use bool instead of int
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:36:01 +01:00
fdb55e3719 Code cleanup: use an enum for GPUNodeLink.image
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:59 +01:00
6cfc55c4f9 Code cleanup: use enums instead of defines
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:55 +01:00
42eaf82d10 Code cleanup: move struct GPUFunction and related code out of header
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:53 +01:00
4c3a49ef34 Code cleanup: use lowercase "gpu" prefix for static functions
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:50 +01:00
548d222d81 Code cleanup: remove do-nothing function GPU_node_end
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:47 +01:00
2233a3556d Code cleanup: remove some UNUSED parameters from static functions
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:44 +01:00
d1f88c05aa Code cleanup: retype various fields/parameters from int to GPUType
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:40 +01:00
a59e590e7f 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
2015-01-26 16:35:34 +01:00
27284e4f34 Code cleanup: minor comment improvements
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1026
2015-01-26 16:35:31 +01:00
8cafa0afa6 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
2015-01-26 16:34:39 +01:00
d1e1fb2239 UV Unwrap: Correct aspect was inverted 2015-01-27 01:05:51 +11:00
4013ae6382 Fix T43409: Particle instancing on hair sometimes doesn't have a path
cache available.
2015-01-26 14:58:15 +01:00
895fa8bc79 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
2015-01-26 14:49:12 +01:00
6f2034cead 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.
2015-01-26 14:38:58 +01:00
e0ee74a171 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!
2015-01-27 02:10:26 +13:00
b648ba4103 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.
2015-01-26 22:44:59 +11:00
027361c898 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
2015-01-26 21:08:43 +11:00
9415976d17 Change exception syntax to be more modern and hopefully fix buildbot issue in the process 2015-01-26 08:48:55 +01:00
5d61cbf008 Curves: BKE_nurb_copy left duplicate arrays
While callers accounted for this, its quite error prone. Just NULL instead.
2015-01-26 18:22:54 +11:00
8db4a24e4e Bugfix T43343: Buttons for Keyframing Settings are Mutually Exclusive
Since 1c3f2354f8 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)
2015-01-26 19:19:33 +13:00
julianeisel
146a0e9447 UI: macro for checking modifiers
Useful for UI handling where its common to check multiple modifiers at once.
2015-01-26 13:34:30 +11:00
julianeisel
b636599fde Correction to c792e54699: OS-Key should be checked as well 2015-01-26 02:51:09 +01:00
julianeisel
b554bcf124 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.
2015-01-26 02:38:39 +01:00
julianeisel
c792e54699 If a modifier key is held, don't open context menu
D1019 by @gregzaal (minor edits by me).

Thanks for the patch!
2015-01-26 01:57:58 +01:00
ce6ba965dc cleanup: warnings, spelling 2015-01-25 21:15:27 +11:00
f4a418b031 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
2015-01-25 18:55:05 +13:00
julianeisel
b112ea3d76 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)
2015-01-25 03:25:25 +01:00
julianeisel
2855485565 Fix T43399: VSE - don't show fps info when stopping animation with ALT+A
Caused by a missing notifier on the animation_play operator.
2015-01-25 02:43:57 +01:00
julianeisel
492b9ab5e3 Fix T43335: Node Editor: name doesn't update
Update Node Editor info (drawn on the bottom left) on redraw if needed
2015-01-25 01:59:49 +01:00
julianeisel
c2af749ac3 Cleanup: Ugly typo (retore->restore) 2015-01-24 23:39:06 +01:00
julianeisel
f7e844570f Fix T43008: Support stacked fullscreen areas 2015-01-24 23:01:39 +01:00
31219415d6 Fix BGE compilation after recent renames in BKE_image (tsst...). 2015-01-24 14:57:57 +01:00
d036ad552f BKE_image: use BKE_image_*** prefix
use bools for return values and some api naming consistency.
2015-01-24 17:26:59 +11:00
fcda27cdae Cleanup: style 2015-01-24 17:09:24 +11:00
ae213d740d Don't add Cycles tests if tests folder does not exist
Also print message about those tests being disabled.
2015-01-23 20:56:03 +05:00
433ecb88bd Revert "New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files."
This reverts commit d390e24c49.

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!
2015-01-23 20:48:55 +05:00
d390e24c49 New cycles tests require buildbot to checkout tests of have test succeed if we test 0 files. 2015-01-23 16:29:06 +01:00
6d78936c43 cleanup: style 2015-01-24 01:59:09 +11:00
e40387b1e2 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.
2015-01-23 17:00:18 +05:00
3ff3f563e5 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.
2015-01-23 21:18:35 +11:00
2dfe5e30ac 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.
2015-01-23 14:00:48 +05:00
7733bd5efc PyAPI: avoid scanning all addons on startup
Gives small speedup
2015-01-23 16:38:29 +11:00
783b4cd1ca PyAPI: use set.discard instead of set-subtraction 2015-01-23 16:37:56 +11:00
2242022653 PyAPI: Replace importlib.reload, not 'imp' 2015-01-23 16:37:30 +11:00
3e8c0027a3 Cleanup: replace deprecated imp -> importlib 2015-01-23 12:37:58 +11:00
6a6e4a9d47 Set bAction.chanbase to deprecated 2015-01-23 10:52:20 +11:00
87fb7ee7e9 Theme Flatty Light
As discussed, welcome flatty light to master!
2015-01-22 23:52:14 +01:00
a730cda72f 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.
2015-01-23 02:33:32 +13:00
99a5f376a2 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).
2015-01-23 02:33:31 +13:00
6248381783 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.
2015-01-23 02:33:31 +13:00
9617446be2 Cycles: Fix compilation error with some compilers
Not sure why this was not visible previously, but the change is
logical anyway.
2015-01-22 17:04:01 +05:00
cae72caa82 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!
2015-01-22 15:57:20 +05:00
90f2febbf4 CMake: Auto-detect path to idiff application in FindOpenImageIO.cmake
Not used at this moment, but will be real soon with new ctests.
2015-01-22 15:53:15 +05:00
4d4456015c Quit blender with non-zero exit code if tryign to use non-existing render engine via the command line 2015-01-22 15:23:09 +05:00
fa46f5a289 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.
2015-01-22 14:56:00 +05:00
1841b12900 Cycles: Add assert check to triangle packing
Handy for troubleshooting.
2015-01-22 14:27:13 +05:00
a1ffb49e49 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
2015-01-22 14:12:22 +05:00
1aa8f0d3c0 Cleanup / Cycles: Code de-duplication for graph node relinking.
Differential Revision: https://developer.blender.org/D1018
2015-01-22 09:59:16 +01:00
82702db407 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
2015-01-22 13:52:17 +05:00
21eb3ce44a Fix: Audaspace threw an exception for files it could not open. 2015-01-22 19:06:23 +13:00
Dalai Felinto
5c6ef95b71 Docs: touch ups in the bge.render doc introduction 2015-01-22 03:20:39 -02:00
Dalai Felinto
8ed439b89e 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")
"""
2015-01-22 03:00:24 -02:00
1b1a6e0c92 error in last commit (missed in review) 2015-01-22 10:56:52 +11:00
64e869ed35 Outliner: use enum for outliner_data_operation()
No functional change, D997 by @lichtwerk
2015-01-22 10:49:10 +11:00
dda355442d 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.
2015-01-22 00:41:42 +05:00
12ccac657f Cycles: Support sphere mapping for the image texture 2015-01-22 00:41:42 +05:00
cd72396797 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
2015-01-21 20:16:18 +01:00
7165db53f2 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
2015-01-21 18:43:05 +01:00
684942c2fe CMake/MSVC: Quotes around the path
D940 by @TeeTrizZz
2015-01-22 01:53:12 +11:00
3df93d063e 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).
2015-01-22 02:09:16 +13:00
f087e9930d 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.
2015-01-21 14:00:59 +01:00
Martin Ettl
f23338e107 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.
2015-01-21 17:19:39 +05:00
a86482f81c 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
2015-01-21 23:15:39 +11:00
47bf0934f5 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.
2015-01-21 10:07:11 +01:00
4422ecbb96 UI: support alt+wheel for expanded enums 2015-01-21 16:27:58 +11:00
julianeisel
17422124ec Fix T43247: Don't open pulldown when a popup overlaps it
Auto-opening of pulldown menus didn't take overlapping popups into account.
2015-01-21 03:51:18 +01:00
12bf84cbe4 BKE_screen: add BKE_screen_find_area_xy
Use from eyedropper & screen operators
also define SPACE_TYPE_ANY for readability.
2015-01-21 13:43:46 +11:00
bb4c34fe78 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.
2015-01-21 12:56:30 +11:00
88222fac63 Remove 'addons_extern' was used before git move 2015-01-21 12:56:03 +11:00
6b655ca62c Cleanup: style 2015-01-21 11:57:11 +11:00
280ed325a2 Update icons after recent cleanup in svg file.
Note differences in those five icons are invisible by eye, just for sake of consistency.
2015-01-20 21:53:06 +01:00
f67c6445e1 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.
2015-01-20 21:53:06 +01:00
fc6d10f5e8 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.
2015-01-20 21:53:05 +01:00
9d9dc06014 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.
2015-01-20 18:32:06 +01:00
julianeisel
3356f3f0bb 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.
2015-01-20 17:32:54 +01:00
408adfae8a Fix for BI rendering of hair spirals: Was not taking the extra points
into account.
2015-01-20 16:38:47 +01:00
8604ec9053 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
2015-01-20 14:17:08 +01:00
58e5509da0 Fix UI glitch: Ctrl/Shift didnt refresh the UI 2015-01-20 23:16:03 +11:00
dfaf26412d Fix transform glitch: Ctrl/Shift didn't refresh 2015-01-20 23:16:02 +11:00
664ef69c9f Cleanup: use const 2015-01-20 23:16:02 +11:00
4a132abd9d Fix for crash when using virtual parent hairs and clumping.
The paths for parents and children are generated using the same function
with a rather obscure test to distinguish them. Modifiers (clump, kink,
roughness) should not be applied to parents though.
2015-01-20 11:42:33 +01:00
6e44e4181f Cleanup: warnings 2015-01-20 21:07:35 +11:00
06160adbf8 Code cleanup: Unused variable in RNA callback 2015-01-20 15:05:39 +05:00
02fad7dca4 Fix T42844: Compositor scale offset
Different interpolation methods in compositor could lead to 0.5 pixel offset in
final renders. This is because of some inconsistency in integer coordinates
which might mean pixel corner or pixel center.

Should be all fine now.
2015-01-20 15:02:35 +05:00
bffd824800 Fixed missing import in particles UI script. 2015-01-20 10:36:05 +01:00
967f93d1c1 Fix error in freestyle api 2015-01-20 20:00:31 +11:00
b22a38786d Fixed merge errors. 2015-01-20 09:38:39 +01:00
c8912073e6 Fix for incorrect DNA field name in versioning, causes constant
resetting of clump noise size on reload.

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:33 +01:00
8ac20d1dee Use separate flags to enable/disable clump and roughness curves for
child hairs.

This allows disabling the curves temporarily without losing the setup.

Conflicts:
	source/blender/blenkernel/BKE_blender.h
2015-01-20 09:30:32 +01:00
1a918cb66e Fix for slow deformation-motionblur in Cycles using the new spiral kink
mode.

This was caused by variation of the number of keys on child hairs due
to shortening of hair curves based on euclidian distances. The other
kink modes also shorten hairs, but use the parametric distance instead,
which does not vary with deformation of hairs.
2015-01-20 09:30:12 +01:00
755734c12f Second variant of the copy-to-select operator for particles to only
copy the active particle system (and not remove existing in the process).
2015-01-20 09:30:11 +01:00
6d65107656 Make removal of existing particle systems on copying optional.
This will be most useful when copying individual particle systems
one-by-one (to be implemented).
2015-01-20 09:30:11 +01:00
04226e324e Added space selection option to the particle system copy operator.
By default this now copies from one object's local space to another
object's local space (instead of the previous world space). This is
more useful when transferring particles between objects, because it
doesn't require moving objects on top of each other, as long as they
have similar shapes.
2015-01-20 09:30:11 +01:00
53135f91d2 Removed debugging code. 2015-01-20 09:30:11 +01:00
0666de06f3 Fix for particle system copy: This has to make sure the ORIGSPACE data
layer is available.

Otherwise particle mapping to the new mesh cannot work with subdivided
and constructively-modified meshes.
2015-01-20 09:30:11 +01:00
2a41d8ebdc Added a "specials" menu button next to the particle systems list for
accessing the copy operator.
2015-01-20 09:30:11 +01:00
2a3279bb87 Changed the workflow for the particle system copy operator to the common
active-to-selected pattern.
2015-01-20 09:30:11 +01:00
91b70d3c56 New operator for copying (hair) particle systems from one object to
another, including edit data (grooming).

This uses basically the same method as the existing connect/disconnect
feature. The main difference is that it allows working with multiple
objects and transferring the //particle/hair data// instead of the
//mesh// data (which is what connect/disconnect expects). This is a much
more realistic workflow when rigging, topology etc. changes and
groomed hair has to be transferred to the changed model.
2015-01-20 09:30:11 +01:00
8f9f55498e Removed unused particles pointer from particle edit data. 2015-01-20 09:30:11 +01:00
2fe96f3f88 New texture influence option for particle kink amplitude (as opposed to
frequency).
2015-01-20 09:30:11 +01:00
9698182227 Renaming "Kink" texture influence to "Kink Frequency" to be more
specific.
2015-01-20 09:30:11 +01:00
68608c5428 Spiral rotation axis was not always fully normalized, avoid an assert. 2015-01-20 09:30:11 +01:00
dcfa75bc89 Make random child length work again with the spiral kink mode. 2015-01-20 09:30:11 +01:00
c2a7f26cbc Add missing stub to the player, so buildbot keeps delivering gooseberry builds 2015-01-20 09:30:10 +01:00
6c908790e7 Allow clumping and roughness in Spiral kink mode as well.
This requires interpolating the parent key properties, because no single
parent key can be mapped to each key on the children any more.
2015-01-20 09:30:10 +01:00
90e46ae6c0 Optional randomization factors for the spiral radius and axis orientation. 2015-01-20 09:30:10 +01:00
76c7d693d9 Support in Cycles for the extra spiral keys in hair paths. 2015-01-20 09:30:10 +01:00
6edeb43c16 Nicer calculation of the kink axis and result of the spiraling for
negative radius.
2015-01-20 09:30:10 +01:00
9f3a840df2 Removed unused old code. 2015-01-20 09:30:10 +01:00
374188cdfe Disable the path length check for spiral kink mode.
This test is terribly expensive for some reason and not necessary for
for the spiral mode anyway.
2015-01-20 09:30:10 +01:00
14af65b3ef Fix for calculation of the key velocity on the last child hair segment. 2015-01-20 09:30:10 +01:00
307c4a4df9 Another crappy approach to spirals on hairs, crazy expensive though.
Conflicts:
	source/blender/blenkernel/intern/particle.c
2015-01-20 09:30:10 +01:00
9bf7633936 Spiral kink mode for particles.
This is BAD code, but the particle kinking does not make it easy to
write a non-local modifier that requires neighboring positions,
curvature, etc. The feature is needed for Gooseberry.
2015-01-20 09:30:10 +01:00
c2306919b7 Optional clumping noise feature for simulating twisted hair strands.
This adds another level of clumping on child hairs. When enabled, child
hairs chose a secondary clumping target using a Voronoi pattern. This
adds visual detail on a smaller scale, which is useful particularly when
the number of parents is relatively small.

Natural fibres behave in a similar way when they become sticky and
intertwined. Hairs close to each other form a first twisted strand, then
combine into larger strands. Similar features can be found in ropes:
http://en.wikipedia.org/wiki/Hair_twists
http://en.wikipedia.org/wiki/Rope

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:10 +01:00
7f219137cf Disable scope updates in texture and image paint modes.
Scope update is very slow for high resolutions, and currently blocks
the UI thread(!). This is especially terrible in paint modes, where
each stroke causes a scope update and unacceptable freezing.

The scopes update method tries to avoid this somewhat by skipping if the
toolbar is disabled, but this doesn't help when painting where brush
tools etc. are frequently needed. It's also a bad-level poll, with the
core system accessing a UI element.

Eventually scope updates should become a low-priority background job,
as well as becoming threaded. Until then this polling provides a usable
workaround to the most outrageous cases.
2015-01-20 09:30:09 +01:00
d1246969ed Curve-based control for "roughness" (noise displacement) of child hair. 2015-01-20 09:30:09 +01:00
c86d55d5e7 Curve-based control for child path tapering.
This is an alternative method to the current fixed function with a
clump factor and "shape" parameter. This function is quite limited and
does not give the desired result in many cases (e.g. long, parallel
rasta strands are problematic). So rather than trying to add more
parameters there is now a fully user-defined optional curve for setting
the tapering shape.
2015-01-20 09:30:09 +01:00
4c82367fd8 Moved kink, clump and roughness functions into the dedicated source file. 2015-01-20 09:30:09 +01:00
4f1c0a181d Reorganizing hair child code a little bit to make it not totally insane.
This contains a few pieces of code for a future "modifier" system that
would allow more flexible combination of effects. Eventually a node
system is the way to go, but the current code makes that impossible.
2015-01-20 09:30:09 +01:00
b292d783f2 Separate context freeing from task freeing in threaded particle updates
to prevent double-freeing/invalid mem access.

This can happen with the "virtual parents" feature, which generates both
parent and child paths. Each task free function also freed the shared
context, leading to double freeing.
2015-01-20 09:30:09 +01:00
1727a165dd Properly register the mathutils.interpolate submodule. 2015-01-20 09:30:09 +01:00
1b6f5ecbf4 Fix for invalid access to undefined hair data in edge-only cloth meshes.
Cloth data is used both for hair and actual cloth, which makes things
really difficult. The face number was used for distinguishing the two
types (no faces == hair mesh), but the extra hair data necessary for
hair sim is generated by particles and not available for edge-only cloth
meshes. This really needs to be sanitized ...

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
bb76e96339 Presets for hair dynamics.
This is necessary because the hair dynamics settings are not part of the
ParticleSettings datablock, but part of the convoluted cloth modifier
inside the particle system struct. In the future this will be recoded
properly, but in the meantime presets provide a simple an unobtrusive
way to have reusable dynamics settings for hair.

Conflicts:
	release/scripts/startup/bl_ui/properties_particle.py
2015-01-20 09:30:09 +01:00
db2ac79fc7 Radical simplification of the wind effect on hair, since the previous
approach does not work very well.

Using a cross section estimate still causes large oscillations due to
varying hair force based on angles. It also requires a sensible hair
thickness value (particle radius) which is difficult to control and
visualize at this point.

The new model is based purely on per-vertex forces, which seems to be
much more stable. It's also somewhat justified by the fact that each
hair vertex represents a certain mass.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
f0e8690526 Fix for wind force function call. 2015-01-20 09:30:09 +01:00
5c7adf5be2 Improved force field effects on hair strands.
The previous calculation was modulated with the angle between the wind
direction and the segments, which leads to very oscillating behavior.

Now the formula includes an estimate for the geometric cross section
of a hair segment based on the incident angle and the hair thickness
(currently just the particle size). This gives a more stable behavior
and more realistic response to wind.

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:09 +01:00
658fc3ddbc New python submodule mathutils.interpolate for various mesh interpolation and weighting methods.
This module will contain mirrored functions for calculating and applying
weights for points on a mesh. This includes barycentric and UV weighting
and possibly more advanced global weighting such as harmonic weights.

The naming should follow this scheme:
<type>_{2d,3d}_{calc,apply}

e.g.
poly_2d_calc
poly_2d_apply
uv_3d_calc
...

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D939
2015-01-20 09:30:09 +01:00
3b938f3d7f Fix for missing library linking in blenderplayer. 2015-01-20 09:30:08 +01:00
3f3c19e391 Another fix for particle instance child lookups, was not subtracting
parent amount.
2015-01-20 09:30:08 +01:00
c3c19509b3 Fix for invalid particle pointer access in mixed particle/child loop. 2015-01-20 09:30:08 +01:00
790b931956 Better update function for particle settings affecting nested cloth
modifier.
2015-01-20 09:30:08 +01:00
60bf6c123f Fix for applying the bending randomness factor.
A stupid hack is needed here, changing the way the factor is applied to
angular bending springs. In cloth sim the bending factor of individual
springs is applied as a mix value between the bending stiffness and a
max value, but this max value isn't even used in hair sim so that
approach becomes useless.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
d031831a05 Randomness factor for hair bending stiffness.
This helps to create some variation in a hair system, which can
otherwise become very uniform and boring. It's yet another confusing
setting in a system that should have been nodified, but only option for
now (broken windows ...)

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
64a4d4ed25 Fix for particle instance initial frames.
These were not orthonormal and tended to flip with changing hair
direction, now use the particle hair matrix which is stable wrt. the
mesh surface.
2015-01-20 09:30:08 +01:00
bd033721c2 Fix for particle instance modifier: use a stable parallel-transport
framing method instead of the Frenet frame.

The Frenet frame is very succeptible to sudden twists along straight
sections of a curve where the second derivative (curvature) becomes 0.
2015-01-20 09:30:08 +01:00
674c98bd06 Nicer hashing functionality for sim debugging using a variadic macro
to support multiple hash identifiers.

Using explicit hashing functions for every sim debug call defeats the
purpose of having a quick feedback system. Now this can be done simply
by passing an arbitrary number of hash inputs (integers) at the end of
the function calls, which are then combined by a system of variadic
macros (based on the ELEM feature). Up to 8 identifiers are supported
currently, but more could be added easily if needed.

Conflicts:
	source/blender/blenkernel/intern/particle_system.c
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
52384179f4 Some tweaking of value ranges for hair target density and removed
density factor (already included in grid velocity).

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
2da21b30ae Inverted effect of target density was unstable, the divergence term
needs to be substracted instead.
2015-01-20 09:30:08 +01:00
325990ff6e Use dedicated debug values in cloth settings instead of abusing unused
other values.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:08 +01:00
faa112cd27 Fixed wrong stride values used for offsetting the index of Eigen values.
The Eigen solver for hair grids uses an extra margin of 1, which means
greater stride values.
2015-01-20 09:30:08 +01:00
d73de8f277 Hair grid code was using an invalid hair segment at each hair end with
zero vectors, leading to bad density values.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
95f9726173 A bunch of debug drawing changes.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
7c153c3a3d Corrected the divergence and gradient calculation for the hair grid
solver input and output.

This uses the central difference method (instead of combined forward/
backward difference), which makes it easier to correctly account for
grid borders.
2015-01-20 09:30:07 +01:00
42fc88de43 Fallback method for defining density in the hair grid using discrete
samples.

This is just an intermediate method to make sure the density is valid.
Eventually the closest-point method should be used, but for testing
the poisson solver this is easier to debug.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
e73df249c7 Added a margin to the number of cells used in the poisson grid solver,
to ensure we always have one layer of empty cells around the fluid.
2015-01-20 09:30:07 +01:00
e6b80eb179 Fix for merge errors and leftover unused code lines. 2015-01-20 09:30:07 +01:00
b3cbafb966 Implementation of a target density feature for the hair simulation.
This allows setting a target density which the fluid simulation will
take into account as an additional term in the pressure Poisson
equation. Based on two papers
"Detail Preserving Continuum Simulation of Straight Hair" (McAdams et al. 2009)
and
"Two-way Coupled SPH and Particle Level Set Fluid Simulation" (Losasso et al. 2008)

Currently the target pressure is specified directly, but it will be
a lot more convenient to define this in terms of a geometric value such
as "number of hairs per area" (combined with hair "thickness").

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
a754c0af40 Another fix for off-by-one hair grid resolution errors. 2015-01-20 09:30:07 +01:00
9c660f18ac Rewriting the grid rasterization function for hair segments. 2015-01-20 09:30:07 +01:00
e56bda4a02 Draw actual hair keys when the "Guide Hair" setting is enabled.
Without this certain debug tasks become very hard to visualize.
2015-01-20 09:30:07 +01:00
62d9aa05ab Fix for grid drawing in 3D view, was using one less grid cell. 2015-01-20 09:30:07 +01:00
046510fcf9 Merge branch 'hair_immediate_fixes' into gooseberry
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:07 +01:00
be24adc9ef Implemented PIC and FLIP methods for combining the fluid grid simulation
with the Lagrangian hair model.
2015-01-20 09:30:07 +01:00
926a674fe8 Main solver step for generating a divergence-free hair velocity field
on the grid.

This uses the Eigen conjugate-gradient solver to solve the implicit
Poisson equation for the pressure Laplacian:

    div(grad(p)) = div(v)

As described in "Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle, 2009).

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
7740b1671c Pampering the stupid MSVC compiler again, it fails to build valid C code. 2015-01-20 09:30:06 +01:00
aa16b5c222 Added new header for Eigen utility classes.
These make passing data between Eigen vector and matrix types and plain
C arrays more convenient.
2015-01-20 09:30:06 +01:00
74d6f31879 Updated a few comments. 2015-01-20 09:30:06 +01:00
9cd8e9f146 Compile hair volumetrics code as C++, so we can use Eigen easier. 2015-01-20 09:30:06 +01:00
46db288832 Minor debug code fix.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
bf96400558 Use a fixed, uniform cell size for hair continuum grids.
This is a bit more awkward for artists to use, but necessary for
a stable solution of the hair continuum calculation. The grid size is
defined by the user, the extent of the grid is then calculated based on
the hair geometry. A hard upper limit prevents bad memory allocation
in case too small values are entered.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
8dbb6f0d5d Removed unused voxel_filter_size DNA property.
This is an artifact of earlier attempts to implement velocity smoothing,
but doesn't work anyway.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
e3dcbc3679 Renamed HairVertexGrid to HairGrid, since it's not actually storing
hair vertex data.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
dddf088375 Removed unused "collider grid" struct from hair volumetrics.
This is a leftover from previous approach of hair collisions (with
insufficient results). The hair volumetrics actually implements
"collision" with solid objects as well, but uses a Neumann boundary
condition on the main grid for this purpose.
2015-01-20 09:30:06 +01:00
d05c653ade Better grid rasterization method for hair volumetric grids.
This is based on the paper
"Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle, Ward, 2009)

The main difference is that hair line segments are used rather than only
rasterizing velocity at the vertices. This gives a much better coverage
of the hair volume grid, otherwise gaps can be produced at smaller grid
cell sizes and the distribution is uneven along the hair curve.

The algorithm for rasterizing is a variation of Bresenham's algorithm
extended onto 3D grids.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:06 +01:00
c37de38716 New debug element "circle" for simulations, which is quite useful for
visualizing scalar fields.
2015-01-20 09:30:06 +01:00
7dda1ea396 Debug grid drawing for hair volume was drawing one subdivision too many. 2015-01-20 09:30:06 +01:00
211be0ae6e Unused leftover debug variable. 2015-01-20 09:30:06 +01:00
d42525a9b5 Reimplemented the voxel texture type for displaying hair continuum grids.
Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
cd717f145d Expose hair grid info in the RNA (read-only); it can be useful for
debugging purposes.
2015-01-20 09:30:05 +01:00
9d27b53d41 Debug visualization code of a slice of the hair velocity vector field. 2015-01-20 09:30:05 +01:00
9be290c92e Removed arbitrary factor 2.0 on volumetric hair friction factor.
This was introducing energy into the system for any factor beyond 0.5
and caused major instability.
2015-01-20 09:30:05 +01:00
54c69c4ed8 Fill the hair volume grid with the _new_ velocities from the first
solver step, instead of using the previous step's velocities.

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
c3968861b3 Debug drawing feature to visualize the hair continuum grid. 2015-01-20 09:30:05 +01:00
aea309779f Perform grid-based velocity smoothing for hair outside of the implicit
solver step.

Calculating forces and jacobians from linearly interpolated grid values
is problematic due to discontinuities at the grid boundaries. The new
approach of modifying velocities after the backward euler solver step
was suggested in a newer paper

"Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle 2009)

Conflicts:
	source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20 09:30:05 +01:00
4381fa3157 Minor fix for lost variable declaration during cherry-picking. 2015-01-20 09:30:05 +01:00
4ff68d031d Fix for warnings/errors
Conflicts:
	source/blender/blenkernel/intern/key.c
	source/blender/blenkernel/intern/particle_system.c
	source/blender/makesrna/intern/rna_particle.c
2015-01-20 09:30:05 +01:00
a351e8b6ef Reorganizing hair dynamics UI layout a bit to make settings slightly
more intuitive.

Also removed a couple of unused or useless features from the UI:
* collider friction is unused and replaced in favor of true collision
* spring damping refers to structural springs (stretch), which is
  not noticable in hair due to extreme stiffness atm.
* pressure factors are not sure since this feature is too unstable atm.

Conflicts:
	release/scripts/startup/bl_ui/properties_particle.py
2015-01-20 09:30:05 +01:00
edc9baaae4 Moved render simplification function for particle distribution into the
distribution code.
2015-01-20 09:30:05 +01:00
34762de38f Removed unused variable. 2015-01-20 09:30:05 +01:00
09f171c525 A little bit of code sanity by splitting particle distribution function
by type.

Instead of squashing totally unrelated code into the same monster
function.
2015-01-20 09:30:04 +01:00
0f43ba8235 Moved particle code for distributions into own file to make hacking
easier.

This code is badly broken and needs to be replaced, but at least having
a workable code structure might help with quick hacks to fix the worst
cases.
2015-01-20 09:30:04 +01:00
f03fc27bf7 Removed unused line. 2015-01-20 09:30:04 +01:00
c01ed4875b New hair editing feature "Shape Cut", for cutting hair based on a mesh
shape instead of a brush tool.

The brush cutting tool for hair, while useful, is not very accurate and
often requires rotating the model constantly to get the right trimming
on every side. This makes adjustments to a hair shape a very tedious
process.

On the other hand, making proxy meshes for hair shapes is a common
workflow. The new operator allows using such rough meshes as boundaries
for hair. All hairs that are outside the shape mesh are removed, while
those cutting it at some length are shortened accordingly.

The operator can be accessed in the particle edit mode toolbar via the
"Shape Cut" button. The "Shape Object" must be set first and stays
selected as a tool setting for repeatedly applying the shape.
2015-01-20 09:30:04 +01:00
117f4bbe66 Switched back to blender implicit solver for merge. 2015-01-20 09:30:04 +01:00
4cdf0ab5cf Unified the main Eigen solver function a bit for constrained/unconstrained
solver variants.
2015-01-20 09:30:04 +01:00
2356264ca9 Ported the remaining implicit solver functions for Eigen.
Also added a couple of utility wrapper functions for Eigen types to make
interfacing with plain float arrays and blenlib math easier.
2015-01-20 09:30:04 +01:00
4eac83da66 Updating Eigen implicit dynamics solver implementation to adhere to the
new mass-spring solver API.

Conflicts:
	source/blender/physics/intern/implicit_eigen.cpp
2015-01-20 09:30:04 +01:00
35d09c7ab6 Fix for inverted condition: hair data needs to be rebuilt when the
cloth DM does not exist.
2015-01-20 09:30:04 +01:00
4a16242e60 Cleanup: Removed the unnecessary cloth solver abstraction (there is only
one solver anyway), and split some particle cloth functions for clarity.

Conflicts:
	source/blender/blenkernel/BKE_particle.h
	source/blender/blenkernel/intern/particle_system.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/makesdna/DNA_particle_types.h
	source/blender/makesrna/intern/rna_particle.c
2015-01-20 09:30:04 +01:00
0b0acb6124 enum instead of #define for cloth vertex flags. 2015-01-20 09:30:04 +01:00
ce53303f61 Removed accidentally committed debug print. 2015-01-20 09:30:04 +01:00
fe8fad54b1 Use the generic task scheduler for threaded particle tasks, i.e.
distribution and path caching for child particles.

This gives a significant improvement of viewport playback performance
with higher child particle counts. Particles previously used their own
threads and had a rather high limit for threading. Also threading
apparently was disabled because only 1 thread was being used ...
2015-01-20 09:30:03 +01:00
c1f4542f0f Removed block matrix indices storage from ClothSpring struct.
This is not necessary: the implicit solver data can keep track instead
of how many off-diagonal matrix blocks are in use (provided the
allocation limit is calculated correctly). Every time a spring is
created it then simply increments this counter and uses the block index
locally - no need to store this persistently.
2015-01-20 09:30:03 +01:00
a5f207de79 Removed unused force arguments for angular bending springs and avoid
redundant calculation for counterforces.
2015-01-20 09:30:03 +01:00
173bdfe05e Guide hair drawing for hair particles.
Without this the particle system only shows the actual non-simulated
hairs ("guide hairs") during edit mode. These hairs are used for goals
as well, so showing them in the regular viewport is pretty important.

Also the usual hair curves are interpolated along the entire length,
which makes it very difficult to see exact vertex positions, unless
using exact powers of 2 for the segment number and match the display
steps.

Conflicts:
	source/blender/blenkernel/intern/particle.c
2015-01-20 09:30:03 +01:00
acf4506299 Improved child hair curling for interpolated child particles.
The curl radius for children in interpolated mode was calculated using
the total offset from the parent particle. This leads to very large
radii when the distance is large due to sparse parents. Such behavior is
also very unrealistic because the curl radius is mostly constant and
defined by the material properties.

All the child hairs are roughly parallel by default. To simulate the
agglomeration of children into hair wisps the "flatness" parameter is
now used to clump them together.
2015-01-20 09:30:03 +01:00
64b9ba06a7 Cloth solver data for edit mode is unused, removed it. 2015-01-20 09:30:03 +01:00
6097de2db9 Fix for scons files missing physics include folder. 2015-01-20 09:30:03 +01:00
48e67c49a5 Added separate damping for bending springs.
The bend damping factor was hardcoded to the same value as the stiffness.
Now it has its own factor in the settings and button in hair dynamics.
2015-01-20 09:30:03 +01:00
e694b7c04b Set the length threshold for hair simulation to 10% again (from 1%).
With the default 5 substeps the simulation can otherwise still become
unstable. This is just a preliminary measure anyway until the length
variance can be fixed properly.
2015-01-20 09:30:03 +01:00
43424a639b Fix for outdated root array size when changing the particle amount
during simulation.
2015-01-20 09:30:03 +01:00
d613c38171 Fix for hair chain testing in the cloth modifier.
Bending springs are en-bloc and not interleaved with other springs, so
this can't be used as a test for hair roots. Use consecutive indices
instead.
2015-01-20 09:30:03 +01:00
577150c635 Completed the implementation of bent rest shapes for hair.
Basically follows the Pixar approach from "Artistic Simulation of Curly
Hair".
2015-01-20 09:30:03 +01:00
520922876a Target calculation for local non-straight rest shapes.
This is more involved than using simple straight bending targets
constructed from the neighboring segments, but necessary for restoring
groomed rest shapes.

The targets are defined by parallel-transporting a coordinate frame
along the hair, which smoothly rotates to avoid sudden twisting (Frenet
frame problem). The rest positions of hair vertices defines the target
vectors relative to the frame. In the deformed motion state the frame
is then recalculated and the targets constructed in world/root space.
2015-01-20 09:30:03 +01:00
7d4799b41d Have to include BLI_utildefines before BKE_collision now to have bool
defined.
2015-01-20 09:30:02 +01:00
6394189e68 Clear forces and constraints together at the start of the time step,
easier to verify.
2015-01-20 09:30:02 +01:00
e44187cd5f Fix for missing initialization of local cloth modifier inside particle
systems.
2015-01-20 09:30:02 +01:00
c036c72284 Proper implementation of angular bending springs including jacobian
derivatives for stabilization.

The bending forces are based on a simplified torsion model where each
neighboring point of a vertex creates a force toward a local goal. This
can be extended later by defining the goals in a local curve frame, so
that natural hair shapes other than perfectly straight hair are
supported.

Calculating the jacobians for the bending forces analytically proved
quite difficult and doesn't work yet, so the fallback method for now
is a straightforward finite difference method. This works very well and
is not too costly. Even the original paper ("Artistic Simulation of
Curly Hair") suggests this approach.
2015-01-20 09:30:02 +01:00
3a8ef0ef6c Unused function declaration. 2015-01-20 09:30:02 +01:00
491e7493c7 Basic solver result feedback from the mass-spring (cloth/hair) solver.
This returns a general status (success/no-convergence/other) along with
basic statistics (min/max/average) for the error value and the number
of iterations. It allows some general estimation of the simulation
quality and detection of critical settings that could become a problem.
Better visualization and extended feedback can follow later.
2015-01-20 09:30:02 +01:00
00bb836e17 Calculate bending targets based on the direction of previous segments.
This makes the bending a truely local effect. Eventually target
directions should be based in a local coordinate frame that gets
parallel transported along the curve. This will allow non-straight
rest shapes for hairs as well as supporting twist forces. However,
calculating locally transformed spring forces is more complicated.
2015-01-20 09:30:02 +01:00
e5ae13b809 Simple debug drawing support inside the implicit solver. 2015-01-20 09:30:02 +01:00
14bd99b0f3 Added a damping term for angular bending springs. 2015-01-20 09:30:02 +01:00
7a7778d003 Simple initial implementation of angular bending springs.
These are much better suited for creating stiff hair. The previous
bending springs are based on "push" type spring along the hypothenuse
of 3 hair vertices. This sort of spring requires a very large force
in the direction of the spring for any angular effect, and is still
unstable in the equilibrium.

The new bending spring model is based on "target" vectors defined in a
local hair frame, which generates a force perpendicular to the hair
segment. For further details see
"Artistic Simulation of Curly Hair" (Pixar technical memo #12-03a)
or
"A Mass Spring Model for Hair Simulation" (Selle, Lentine, Fedkiw 2008)

Currently the implementation uses a single root frame that is not yet
propagated along the hair, so the resulting rest shape is not very
natural. Also damping and derivatives are still missing.
2015-01-20 09:30:02 +01:00
86a4da1c54 Replace the dynamic root transform in the implicit solver data with a
single transform matrix.

Dynamic properties of the transformation are only needed during the
setup phase when they should be read from external data (hair system
roots) and generate fictitious forces on each point.
2015-01-20 09:30:02 +01:00
fa1c2ba7c6 More scons fixes for physics lib. 2015-01-20 09:30:02 +01:00
09ad433179 Fixed scons build files for new physics subfolder. 2015-01-20 09:30:02 +01:00
f03d253f55 Disabled the velocity filtering feature for now, since the weighting is
incorrect.

The voxel grid needs better tool support to make it usable, so fixing
the filtering is not high priority right now.
2015-01-20 09:30:02 +01:00
226beb9866 Added basic filtering feature for velocity smoothing.
This is part of the original method from "Volumetric Methods for
Simulation and Rendering of Hair". The current filter is a simple box
filter. Other energy-preserving filters such as gaussian filtering
can be implemented later.

The filter size is currently given as a cell count. This is not ideal,
rather it should use a geometrical length value, but this is too
abstract for proper artistical use. Eventually defining the whole grid
in terms of spatial size might work better (possibly using an external
object).
2015-01-20 09:30:01 +01:00
bbae8f88b8 Made the voxel grid size for hair interaction configurable and increased
the default to 32.

Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-01-20 09:30:01 +01:00
be016daf15 Reduced the length threshold for disabling short hairs from 0.1 to 0.01. 2015-01-20 09:30:01 +01:00
0ddea77b1a Fix for rB71271bb, was replacing the force vectors entirely instead of
adding.
2015-01-20 09:30:01 +01:00
59d76a406e Fix for effector force fields on hair, using the world-to-root
transformation.
2015-01-20 09:30:01 +01:00
d43170d09d Add weak repulsion forces to hair collision response to keep the hair
at a the margin distance ("outer" softbody margin).

This has to be clamped arbitrarily unfortunately, otherwise the
repulsion force can add too much energy into the system. A factor of
4 * restitution impulse seems to give good results for now, this can
be refined later on if necessary.
2015-01-20 09:30:01 +01:00
8876429edd Added back the velocity smoothing implementation.
This is now also decoupled from the internal solver data. The grid is
created as an opaque structure, filled with vertex or collider data
(todo), and then forces can be calculated by interpolating the grid at
random locations. These forces and derivatives are then fed into the
solver.
2015-01-20 09:30:01 +01:00
a8cf092160 Fix for Sintel hair bug.
The hair solver needs sane input to converge within reasonable time
steps. In particular the spring lengths must not be too difference
(factor 0.01..100 or so max, this is comparable to rigid body simulation
of vastly different masses, which is also unstable).

The basic hair system generate strands with equally spaced points, which
is good solver material. However, the hair edit operators, specifically
the cutting tool, can move points along the strands, creating tightly
packed hair points. This puts the solver under enormous stress and
causes the "explosions" observed already during the Sintel project.

The simple solution for now is to exclude very short hairs from the
simulation. Later the cutting tool should be modified such that it
keeps the segments roughly at the same length and throws away vertices
when the hair gets too short (same goes for the extension tool).

The hair system should have a general mechanism for making sure that
situations such as this don't occur. This will have to be a design
consideration for replacements in any future hair system.
2015-01-20 09:30:01 +01:00
6623395638 Minor fix when gravity code is disabled. 2015-01-20 09:30:01 +01:00
58e33ab279 Removed unused code.
Conflicts:
	source/blender/physics/intern/implicit_blender.c
2015-01-20 09:30:01 +01:00
d0379f82d1 Added a calculation function for the fictitious forces introduced by
moving hair root reference frames.

This calculates Euler, Coriolis and Centrifugal forces which result
from describing hair in a moving reference frame.
http://en.wikipedia.org/wiki/Fictitious_force
2015-01-20 09:30:01 +01:00
a49b170b27 Fix for own misconception of fictitious forces in the moving hair root
frames.

These forces don't have to be calculated for each individual
contribution. Rather they can be split off and be calculated on top of
the basic force vector rotation (todo).
2015-01-20 09:30:01 +01:00
02c8bf99c9 Added back spring force definitions outside the implicit solver.
There are currently 3 types of springs: basic linear springs, goal
springs toward a fixed global target (not recommended, but works) and
bending springs.

These are agnostic to the specific spring definition in the cloth system
so hair systems can use the same API without converting everything to
cloth first.

Conflicts:
	source/blender/physics/intern/implicit_blender.c
2015-01-20 09:30:01 +01:00
dd0a7444d8 Main cloth force calculation function outside of implicit core code.
Still misses spring forces.
2015-01-20 09:30:00 +01:00
64de714a08 Hair volume calculation is now in its own file.
Code is currently disabled until the other main forces are in place.
2015-01-20 09:30:00 +01:00
b9b784f039 Moved the unused goal force calculation function to the main mass-spring
source file.
2015-01-20 09:30:00 +01:00
2901d6ab21 Moved most of the main cloth solver function out of implicit code core.
Force calculation is disabled, will follow shortly.
2015-01-20 09:30:00 +01:00
ac071de405 Moved init/free functions for solver data out of implicit core.
This also initializes spring matrix indices (off-diagonal 3x3 blocks),
which now uses a new API function.
2015-01-20 09:30:00 +01:00
d2e8a72d8a Moved "set_positions" for cloth out of core implicit solver.
API for the solver now has functions for setting of vertex motion state
and the associated root transform data.
2015-01-20 09:30:00 +01:00
0d60337a83 Renamed functions to make them explicitly refer to cloth, and split the
create/free functions for solver data off from the cloth solver.
2015-01-20 09:30:00 +01:00
5322def57c Moved the cloth solver code into a new subfolder/library inside Blender
code.

The implicit solver itself should remain agnostic to the specifics of
the Blender data (cloth vs. hair). This way we could avoid the bloated
data conversion chain from particles/hair to derived mesh to cloth
modifier to implicit solver data and back. Every step in this chain adds
overhead as well as rounding errors and a possibility for bugs, not to
speak of making the code horribly complicated.

The new subfolder is named "physics" since it should be the start of a
somewhat "unified" physics systems combining all the various solvers in
the same place and managing things like synchronized time steps.
2015-01-20 09:30:00 +01:00
1c8a33ab92 Desperate attempt to get stable collisions: Disable restitution and
handle only one collision contact at a time.

Collision still randomly explodes, even with differing results on the
same file. This could indicate a threading issue, possibly also related
to the dependency graph since multiple objects are involved in
collisions.
2015-01-20 09:30:00 +01:00
3007fc6eb7 Revert "Ignore velocity changes when the cloth solver does not converge."
This reverts commit c52b8ae818.

Sadly, at this point solver convergence is an exception rather than the
rule... Individual hairs can "explode" easily and thus disable the whole
simulation, which isn't helpful either.
2015-01-20 09:30:00 +01:00
8532cf206e Ignore velocity changes when the cloth solver does not converge.
This helps keep the simulation stable as long as there are only a few
substeps that become too constrained for the solver.

Eventually we need better feedback about these solver results, so that
artists can tweak situations specifically to resolve bad solver results.
This is somewhat similar to the camera tracker, which also can run into
cases that cannot be resolved and have to be fixed manually.
2015-01-20 09:30:00 +01:00
3119d718f8 Moved collision response into the main cloth sim source file and fixed
some coordinate transform issues.

Collision response should be regarded as part of the dynamics system
instead of the basic collision detection.
2015-01-20 09:30:00 +01:00
2b06b899b0 Correction for inverse constraint matrix rotation. 2015-01-20 09:30:00 +01:00
0f3cbf3f56 Transform the constraint matrix and target solver vector z according to
the root frame transforms as well.

This ensures the hair constraints are actually in root space and applied
correctly by the solver.
2015-01-20 09:30:00 +01:00
bc6fa4fa11 Use identity transform in the solver data roots to avoid possible errors
when this data is used outside the transform functions.
2015-01-20 09:29:59 +01:00
b391e963a9 Option for disabling the root frame transformation altogether, mostly
for testing.
2015-01-20 09:29:59 +01:00
c5038b12c3 Ported root frame transformation to the old cloth solver. 2015-01-20 09:29:59 +01:00
3ad7974373 Switched back to the old solver for the time being.
The Eigen solver is not quite stable currently (possibly due to
incorrect porting of force calculations). It also still lacks threading
support and optimized matrix construction, making it slower in
comparison. Eventually would still like to switch, but fixing these
issues takes time.
2015-01-20 09:29:59 +01:00
9f28ced756 Implemented gradient transformation for forces in the root frame (dFdX,
dFdV).
2015-01-20 09:29:59 +01:00
2410dc32ff Removed unused variable. 2015-01-20 09:29:59 +01:00
55a5351a03 First stage of implementing moving frames of reference for hair/cloth.
This adds transformations for each hair from world to "root space".
Currently positions and velocities are simply transformed for the solver
data and inverse-transformed when copying the results back to the cloth
data. This way the hair movement becomes independent from the movement
of the emitter object. Eventually the "fictitious" forces originating
from emitter movement can be added back in a controlled way.

http://en.wikipedia.org/wiki/Fictitious_force

Ignoring these fictitious forces or scaling their effect is physically
correct, because in the absence of external forces the hair will always
return to rest position in this root frame.

External forces currently are not yet transformed into the root space.
2015-01-20 09:29:59 +01:00
d496b308db Disable some debugging options in Eigen to make it more usable in Debug
mode.

Eigen can become very slow in debug mode, which is a bit of a problem.
It relies heavily on compiler optimizations to remove function calls
etc. More optimizations may be desirable, possibly putting the implicit
solver into its own little library and enabling optimizations in debug
mode there could help.
2015-01-20 09:29:59 +01:00
d115bdb505 Added new data in the cloth modifier for hair root information.
This will allow us to implement moving reference frames for hair and
make "fictitious" forces optional, aiding in creating stable and
controllable hair systems.

Adding data in this place is a nasty hack, but it's too difficult to
encode as a DM data layer and the whole cloth modifier/DM intermediate
data copying for hair should be removed anyway.
2015-01-20 09:29:59 +01:00
da01c884e5 Cleanup, removed unused old code. 2015-01-20 09:29:59 +01:00
d91a4cd1a1 Optimized matrix filling using the Eigen triplets method.
Otherwise the construction of matrices becomes very slow for larger
vertex counts because adding a new element is O(n), making it O(n^2) in
total.
2015-01-20 09:29:59 +01:00
e55d11478d Added back external effector forces for the cloth solver. 2015-01-20 09:29:59 +01:00
ace1b5050b Reenabled goal springs and removed the arbitrary structural scaling
factor.
2015-01-20 09:29:59 +01:00
c7932e93fa Fixed bending forces for cloth springs. 2015-01-20 09:29:58 +01:00
6d4c704f17 Correctly implemented and verified gravity, drag, structural springs. 2015-01-20 09:29:58 +01:00
f336ca5952 Minor fix in debug print, so solver prints can be diff'ed. 2015-01-20 09:29:58 +01:00
b241f23b19 A couple of defines to disable various influences on the cloth sim for
debugging.
2015-01-20 09:29:58 +01:00
1819cbd02c Debug printing code for large sparse vectors and matrices, to compare
solver input/output of the old and new methods.
2015-01-20 09:29:58 +01:00
8283122cda Added a new internal header for implicit solver defines.
Should become its own intern wrapper library eventually.
2015-01-20 09:29:58 +01:00
7896827f75 Reenabled air drag force for cloth sim. 2015-01-20 09:29:58 +01:00
e0b46b136e Arbitrary scaling factor for the structural spring forces (stretching).
This is not nice at all, but for some reason (possibly time scale) the
old force values are much too high and cause the solver to become
unstable. These will be revisited later anyway, so for now such scaling
should be fine.
2015-01-20 09:29:58 +01:00
8163fca264 Switched to the modified CG method that supports constraints, and
added back structural stretch springs.
2015-01-20 09:29:58 +01:00
c6a65ff5b8 Implemented a modifier conjugate gradient algorithm to support stable
constraining.

The algorithm is described in the paper "Large Steps in Cloth Simulation"
(Baraff/Witkin 1998). The same method was (incorrectly) implemented in
the old cloth solver.

It is based on restricting the degrees of freedom (ndof) of vertices
using a block matrix and a vector of target velocity deltas.
See chapter 5 of the paper for details.
2015-01-20 09:29:58 +01:00
722fd30a9f Reimplemented Goal springs for the Eigen CG solver method.
Note that goal springs currently are really bad ... They have a factor
on hairs that "fades" goal influence from the root to the tip. The last
point on the hair is completely free, which makes the goal springs
pretty much useless on their own without supporting bend stiffness.
Can only assume this was added to compensate unphysical behavior of
goal springs when using uniform weight, but it's a poor replacement for
true localized bending forces ...
2015-01-20 09:29:58 +01:00
d2c0503f19 To make gravity a true force vector, multiply by the mass. 2015-01-20 09:29:58 +01:00
83137358c0 Alternative new solver for cloth using the Eigen CG solver instead of
a custom built solver.

The old cloth solver is broken unfortunately. Eigen is a designated
linear algebra library and very likely their implementation is a lot
better (can't compare until it's implemented though).

Only basic gravity is active atm, spring forces, external force fields,
damping and volumetric friction have to be added back by converting
the data into the Eigen format.
2015-01-20 09:29:58 +01:00
396f7ea158 Don't try to enforce a velocity change for pinned vertices; their
velocity is defined externally by hair root motion.
2015-01-20 09:29:58 +01:00
d1cb8b08bd Use squareroot of the current epsilon error target for CG, since we
square this value anyway.
2015-01-20 09:29:57 +01:00
8ec4c31d9c Disabled collision culling on the inside of the collider faces for now,
this seems to remove too many contact points somehow ...
2015-01-20 09:29:57 +01:00
4bfd3c8f0c Fix for collision response, the impulse response was far too small. 2015-01-20 09:29:57 +01:00
27ecda9995 Use the S matrix of the modifier CG algorithm for implementing collision
responses.

The S matrix together with the z Vector encodes the degrees of freedom
of a colliding hair point and the target velocity change. In a collision
the hair vertex is restricted in the normal direction (when moving
toward the collider) and the collision dynamics define target velocity.
2015-01-20 09:29:57 +01:00
02ab74eb55 Better contact point near-test for hair.
This simply uses the position above the triangle instead of the
intersection point of the vertex path. The other method was broken
anyway, but also has a problem catching all the contacts reliably. The
new method might have a few false positives but that is acceptable.
2015-01-20 09:29:57 +01:00
93194eb0e9 Fixed for hair collision detection, old/new positions were swapped. 2015-01-20 09:29:57 +01:00
971419c27d Reduced minimum for cloth solver substeps to 1.
This is not very useful for artists, but helps with debugging.
2015-01-20 09:29:57 +01:00
b8a9579954 Removed own debug print. 2015-01-20 09:29:57 +01:00
ae162f61e7 Added a comment and use the new CG solver as the "official" version now. 2015-01-20 09:29:57 +01:00
c6e5f6afe0 Fixed implementation of the Conjugate Gradient method for the cloth
solver that properly supports constraints with some degrees-of-freedom.

The previous solver implementation only used the S matrix (constraint
filter matrix) for pinning vertices, in which case all elements are
zero and the error doesn't show up. With partial constraints (useful for
collision contacts) the matrix has non-zero off-diagonal elements and
the algorithm easily diverges.

There are also initial steps for implementing collision prevention as
described in the Baraff/Witkin paper "Large Steps in Cloth Simulation"
(http://www.cs.cmu.edu/~baraff/papers/sig98.pdf).
2015-01-20 09:29:57 +01:00
b38663338e Hair collision: Use the S matrix for enforcing contact constraints.
This is a first test, the contacts are very explosive atm because they
basically pin hair vertices globally on collision, which leads to
stretching of the springs which is then suddenly released in the next
frame.
2015-01-20 09:29:57 +01:00
fc083b4e5b Preparation for collision code fixing.
Instead of handling contact tests and collision response in the same
function in collision.c, first generate contact points and return them
as a list, then free at the end of the stepping function. This way the
contact response can be integrated into the conjugate gradient method
properly instead of using the hackish and unstable double evaluation
that is currently used.
2015-01-20 09:29:57 +01:00
0f45f4a3e2 Cleanup: added some comments to the members of Implicit_Data. 2015-01-20 09:29:57 +01:00
c6db1d0858 Cleanup: No point in passing all the implicit solver arguments
individually.
2015-01-20 09:29:56 +01:00
e9849bdf17 Cleanup: removed the unused olddV vectors from implicit solver data. 2015-01-20 09:29:56 +01:00
ccad968e26 Some more debug elements for hair collisions. 2015-01-20 09:29:56 +01:00
f98d388fd3 Extended line/face collision near-check, to allow for distance margins.
The original BLI method for line/triangle intersection returns false
in case the line does not actually intersect, but in order to generate
repulsion forces we need to also handle contacts inside the margin.
2015-01-20 09:29:56 +01:00
dbf7840643 Fix bounce/repulse calculation. 2015-01-20 09:29:56 +01:00
d43f760892 Hair debugging: use "categories" (strings) for grouping debug elements
and support clearing for categories.
2015-01-20 09:29:56 +01:00
70df8f8dd6 Fix for hair collision detection: need to use the second point of the
timestep segment.

This ensures the distance for a collision pair is the one of the current
point position, and the response gets calculated accordingly.
2015-01-20 09:29:56 +01:00
a580be6399 Use repulsion forces in combination with the one-time penalty forces
in collision.
2015-01-20 09:29:56 +01:00
67fdd5e01a Fix for crash when going into particle edit mode with baked hair
simulation.

Note that this currently generates an extreme amount of points, by
making a edit pathcache curve for each hair in every frame! But at least
doesn't simply crash now.
2015-01-20 09:29:56 +01:00
f757364fc0 Clear debug_data pointer in local cloth modifier data of the particle
systems on blend file load.
2015-01-20 09:29:56 +01:00
1ed88bb24e Partial response force for hair collisions.
This implements a penalty force as well as a repulsion force to avoid
further penetration, as suggested in
"Simulating Complex Hair with Robust Collision Handling"
(http://graphics.snu.ac.kr/publications/2005-choe-HairSim/Choe_2005_SCA.pdf)

Friction forces are still missing. More problematic is handling of
moving colliders, when face swap places with the hair vertex and a
collision is missed, putting the vertex inside the mesh volume. Larger
margins might help, but ultimately using Bullet collision detection is
probably more reliable and failsafe.
2015-01-20 09:29:56 +01:00
d8cf12fe5a Debug drawing for simulations, to aid in visualizing abstract data such
as forces, velocities, contact points etc.

This uses a hash table to store debug elements (dots, lines, vectors at
this point). The hash table allows continuous display of elements that
are generated only in certain time steps, e.g. contact points, while
avoiding massive memory allocation. In any case, this system is really
a development feature, but very helpful in finding issues with the
internal solver data.
2015-01-20 09:29:56 +01:00
5a43e8493e Some initial collision code, without actual response forces still.
This is still using the old BVH tree collision methods to generate
contact points, similar to what cloth does. This should be replaced
by a Bullet collision check, but generating contacts in this way is
easier for now, and lets us test responses and stability (although in
more complex collision cases the BVH method fails utterly, beside being
terribly inefficient with many colliders).
2015-01-20 09:29:21 +01:00
ba8b8ec998 Implemented internal hair pressure to prevent hair from collapsing in
on itself.

This uses the same voxel structure as the hair smoothing algorithm.
A slightly different method was suggested in the original paper
(Volumetric Methods for Simulation and Rendering of Hair), but this is
based on directing hair based on a target density, which is another
way of implementing global goals. Our own approach is to define a
pressure threshold above which the hair is repelled in the density
gradient direction to simulate internal pressure from collisions.
2015-01-20 09:29:21 +01:00
345c7b144d Fixed hair velocity smoothing.
This is an important hair interaction feature that simulates friction
between hairs in an efficient way. The method is based on the paper
"Volumetric Methods for Simulation and Rendering of Hair"
( http://graphics.pixar.com/library/Hair/paper.pdf )

It was partially implemented already, but didn't work in this simplified
version. The same voxel structure can be used for implemeting repelling
forces on hair based on density, which can help a hair system maintain
volume instead of collapsing in on itself.
2015-01-20 09:29:21 +01:00
b331a82910 Support for various data properties of the hair grid in the voxel
texture.
2015-01-20 09:29:21 +01:00
efc0cd1658 Fixed voxel grid initialization from hair points and colliders by using
the suggested tent function from the original paper.

Plain float->int conversion for the grid location otherwise leads to
skewed data and unnecessary loss of information.
2015-01-20 09:29:21 +01:00
5f41b19463 New voxel texture mode "Hair", for displaying the internal hair volume
structure as a texture.

This is mostly a debugging feature that may be removed again later.
2015-01-20 09:29:21 +01:00
4cd6111159 Code cleanup: Use a variable-sized array for the hair volume velocity
smoothing and collision code, split into multiple functions.
2015-01-20 09:29:21 +01:00
9e5c3a1fa9 Fix for Trusted option, loading new file
Would use the setting of the previously loaded file, now re-initialize from preferences.
2015-01-20 16:38:31 +11:00
1d56f456f7 Fix glitch in view-axis (order of drawing) 2015-01-20 16:37:07 +11:00
289960787e Fix UI glitches drawing text at different sizes
Font height was ignoring DPI in some cases (camera-name & eyedropper).
2015-01-20 15:50:20 +11:00
09eec627ed UI: cleanup UI_fontstyle_string_width, UI_draw_string
Both were maked as temp, but used often.

Now pass uiFontStyle to both, rename UI_draw_string to UI_fontstyle_draw_simple,
since its a variant of UI_fontstyle_draw that skips shadow, align... etc.
2015-01-20 15:50:20 +11:00
f8c52402d6 BLF: remove paranoid checks for unset default font 2015-01-20 15:50:20 +11:00
a1f4821b94 Fix T42212: Singular reflection pass is incorrect in regular path tracer
Issue seems to be caused by not totally proper pdf and eval values for this
closure. Changed it so they reflect to ggx/beckmann reflection with roughness
set to 0, which is effectively the same as the sharp reflection.
2015-01-20 03:03:45 +05:00
4a4297ba02 I18n tools minor update. 2015-01-19 20:49:36 +01:00
35d3b6316b D627: Memory usage optimization for the compositor.
The compostor used a fixed size of 4 floats to hold pixel data. this
patch will select size of a pixel based on its type.
It uses 1 float for Value, 3 float for vector and 4 floats for color
data types.

When benchmarking on shots (opening shot of caminandes) we get a
reduction of memory of 30% and a tiny speedup as less data
transformations needs to take place (but these are negligable.

More information of the patch can be found on
https://developer.blender.org/D627 and
http://wiki.blender.org/index.php/Dev:Ref/Proposals/Compositor2014_p1.1_TD

Developers: jbakker & mdewanchand
Thanks for Sergey for his indept review.
2015-01-19 18:17:50 +01:00
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
50cbff1851 Fix a crasher in recent own mesh remap code ('island' area... :/ ). 2015-01-19 15:51:21 +01:00
0af11a1742 Make use/computation of lnors consistant.
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.

Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).

Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
2015-01-19 15:51:20 +01:00
694806a9cf Cycles: Correction to camera in volume detection after clipping commit
The check should also become aware of the fact were using clipping plane
instead of clipping sphere now.
2015-01-19 19:28:28 +05:00
7fd4c440ec Fix T43311: using displacement shader crashes blender
Issue was caused by wrong order of scene device update, which could
lead to missing object flags in shader kernel.

This patch solves a bit more than that making sure objects flags are
always properly updated, so adding/removing volume BSDF will properly
reflect on viewport where camera might become being in volume and so.
2015-01-19 19:23:21 +05:00
18ae259cc4 Cleanup: unused Global flags. 2015-01-20 01:07:12 +11:00
45dfb3b742 Fix for security issue loading blend's
Auto-Execute option could be overridden by opening a startup.blend
2015-01-20 00:58:32 +11:00
4c74fb24a2 Fix: ActionGroups.new() UI description copy-paste error 2015-01-19 12:58:48 +01:00
2f4aef9f3b Cycles: Avoid crash in statistics when canceling BVH build
Also add missing render_time initialization in progress.
2015-01-19 13:39:35 +05:00
32ffc63d20 Bugfix T43293: Crash when editing shared GPencil datablock in VSE
The problem here was that when a Grease Pencil datablock is shared between
the 3D view and another one of the editors, all the strokes were getting handled
by the editing operators, even if those strokes could not be displayed/used
in that context. As a result, the coordinate conversion methods would fail,
as some of the needed data would not be set.

The fix here involves not including any offending strokes in such cases...
2015-01-19 19:11:18 +13:00
0a128af21d GPencil: Added asserts for checking when trying to convert coordinates for invalid stroke types (for current editor)
Added for checking on the cause of T43293, and to aid in setting up a fix to
remedy the situation.
2015-01-19 19:11:17 +13:00
09c83d6fea Viewport: Add adjustable safe areas, 3d-view & VSE
Also adds safe-area presets.

D325 by Diego Gangl with own edits.
2015-01-19 16:47:57 +11:00
9f54a73b32 WM: add a notifier for camera/viewport options
Added so viewport options only used in a camera view wont cause all 3d-views to redraw.
2015-01-19 15:42:18 +11:00
e91148e463 RNA/API: name outliner sort option like UIList 2015-01-19 14:22:02 +11:00
704494e8cd Fix own error in freestyle api 2015-01-19 11:31:23 +11:00
julianeisel
ffe56536f1 Outliner: Make alphabetical sorting optional
A new option to the Outliner's View menu is added to enable/disable sorting of items.
2015-01-19 01:01:23 +01:00
90b5697459 Fix mathutils.barycentric_transform()
Dummy typo, we need a 3D vector here...
2015-01-18 18:41:47 +01:00
ecc58da8f1 Documentation: fixed documented types to match actual types
The BGE API uses Vectors, but often this was documented as list.

Maniphest Tasks: T43240

Differential Revision: https://developer.blender.org/D1006
2015-01-18 11:08:33 +01:00
6e97db7b30 Fix T43301: Three of the 'mirror keyframes' tools were mirroring along wrong axis.
Names are rather confusing here... :/
2015-01-17 23:09:41 +01:00
119ff676e1 Fix T43283: Crash on undo/redo/ and save/reload after (new) weight transfer.
Mesh stores its dvert in a specific pointer too, in addition of regular CD layer...
That whole vgroup handling is really breaking apart the 'universality' of CD system. :(

Also added some DAG and WM updates in operators...
2015-01-17 17:42:45 +01:00
c9e5d9226b Fix T43090: Cycles + Freestyle + border render = black render.
The reported problem was due to a special case where there are no strokes
to be rendered.  Since rendering an empty scene is a waste of time, the issue
was addressed here by skipping the stroke rendering process entirely.
2015-01-18 00:39:03 +09:00
448d143ad0 Fix T43273: vector math cross product inconsistent
GLSL missed the normalization step.

Reviewers: psy-fi, sergey, mont29

Reviewed By: mont29, sergey

Subscribers: mont29

Maniphest Tasks: T43273

Differential Revision: https://developer.blender.org/D1000
2015-01-17 14:58:48 +01:00
Torsten Rupp
82223270a8 Fix T23942: Add "Delete Hierarchy" to outliner context menu.
Patch by rupp (Torsten Rupp), review and minor style edits by mont29 (Bastien Montagne).
2015-01-17 14:55:18 +01:00
f65b369f16 Fix compilation error with strict compiler rules 2015-01-17 00:22:46 +05:00
89e562e19b Cycles: Fix compilation error with latest OSL
They went back from string_view to string for compiler options.

Still having linking errors here, but maybe others will be more lucky to fully
compiler blender with new OSL.
2015-01-17 00:15:47 +05:00
09ac6cae09 Cycles: Cleanup and optimization comment update 2015-01-17 00:15:47 +05:00
eff2fe9a72 Cycles: Minot cleanup, save some cpu tics per curve segment export 2015-01-17 00:15:47 +05:00
585275325e Fix T43275: Crash on Render when using 'save buffer' and render layer name contains a '/'
Added a new BLI_path_utils func, `BLI_filename_make_safe()`, which for now simply
replaces unsafe chars for paths (like '\' or '/') by an underscore...
2015-01-16 18:48:59 +01:00
da8f16e288 FCurve RNA API: add funcs to convert to samples/to keyframes.
So far, we had an operator to 'bake' keyframe curves into samples, but no
way to make the fcurve editable again (i.e. to convert it back into a keyframes one).

Needed to fix mocap addon (see T43259).

Also, fixed a glitch in `fcurve_store_samples()`, since given end frame is included in range,
it is valid to give same start and end frame (in case you want a single point in samples,
not much practical cases, but...).
2015-01-16 17:26:28 +01:00
913e2bae19 Show buttons for particle system modifiers render/viewport toggles
in the particle buttons list.

This is much more convenient than having to switch back and forth
between particle and modifier buttons. The modifier box for particles
does not contain anything useful other than these two toggles anyway.
2015-01-16 17:08:07 +01:00
5685c43586 Select appropriate folder for MinGW-w64 gcc 4.9 2015-01-16 15:04:02 +02:00
9bb06c99f3 Cycles: Minor typo fix in debug print 2015-01-16 18:03:58 +05:00
5d5077957e Cycles; Correction to previous debug print to survive prints from multiple threads
This commit basically makes it so statistics print from different BVH trees are not
being interleaved with each other. Glog ensures this when debug print is done as a
single put to stream operator.
2015-01-16 16:39:02 +05:00
5684ad8072 Cycles: Report BVH statistics after build 2015-01-16 15:05:53 +05:00
fd58f5ac9d Fix T43271: Sequencer: RNA's 'add_effect' was not updating effect strip len correctly. 2015-01-16 10:41:38 +01:00
3f60d665bb Cycles: Fix stupid typo in the previous commit 2015-01-16 02:21:35 +05:00
146eb7947e Cycles: Tweak to leaf creation criteria in all BVH types
Since leaf node gets split further into per-primitive type leaves old check
for number of curves became a bit ridiculous -- it might lead to two leaf nodes
each of which would contain only one curve primitive (one motion curve and one
regular curve).

This lead to quite dramatic slowdown for Victor model -- around 40%, which is
totally unacceptable.

This commit is aimed to prevent such situation and from quick render test it
seems victor is now back to normal render time. Further testing is needed tho.

There are also other ideas about splitting the node, will need to look into
them next.
2015-01-16 01:42:58 +05:00
f02dba58ff Nodes: Put Blended Box Mapping properties next to each other. 2015-01-15 21:23:22 +01:00
ed8dc78691 BGE physics: get/set linear and angular damping
This patch adds the following R/W properties and method to `KX_GameObject`:

  - `linearDamping`  -- get/set linear damping
  - `angluarDamping`  -- get/set angular damping
  - `setDamping(linear, angular)` -- set both simultaneously

These allow runtime changes to the same properties that are accessible at design time in Blender's UI via `game.damping` and `game.rotation_damping`. The names of the properties were chosen to mirror the internal names of the BGE physics engine, as these are (AFAIK) also the commonly used names in physics literature.

Reviewers: campbellbarton

Projects: #game_physics

Differential Revision: https://developer.blender.org/D936
2015-01-15 18:37:22 +01:00
b675418d01 Sequencer: Allow generating proxies from script without having sequencer space active 2015-01-15 22:35:34 +05:00
1994e843d6 Sequencer: Don't crash when trying to rebuild proxy without having sequence edits 2015-01-15 22:27:58 +05:00
197dcfdc19 Cycles: Fix compilation error happened after recent render time commit 2015-01-15 21:28:04 +05:00
b8dd68cfc4 Cycles: Fix equiangular textures after recent commit
Just wrong constant used, names are indeed too close to each other.
2015-01-15 21:21:58 +05:00
1568a4b295 Bugfix: Wrong flags used in Spline IK eval for bounds limits 2015-01-16 03:02:28 +13:00
4b0007cf82 Prevent waveform drawing from continually retrying bad files
If sound_read_waveform() cannot read the file (i.e. info.length is
zero), set the sound's waveform to a valid waveform of zero
length. This indicates that reading the waveform is done so that it
doesn't get tried over and over again.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D988
2015-01-15 14:01:04 +01:00
b41ce0d1b9 Remove 'locked' parameter from sound_read_waveform()
This parameter was confusing in three ways:

1. It should have been named "lock" because it was used to take and
   release the sound mutex, not to indicate whether it was locked.

2. In the one place this function gets called the locked argument was
   set to "true", so not much point in having it optional.

3. I can't imagine that it would ever be a good idea to skip taking
   and releasing the mutex.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D988
2015-01-15 14:00:51 +01:00
588656a568 Review for the gsoc UI cleanup for the BGE
Review for the gsoc UI cleanup for the BGE.
Surviving commits are:
 - Game Engine UI cleanup: removing Scene/Active Clip
 - Game Engine UI cleanup: Adding missing 'not available' labels in empty panels
The rest was reverted for being subjective and polluting the UI code with an if for every button:
http://wiki.blender.org/index.php/User:Brita/GSoC_BGE_cleanup_and_support/reports/final#UI_Review

Reviewers: kupoman

Subscribers: dingto

Projects: #game_ui

Differential Revision: https://developer.blender.org/D982
2015-01-15 10:47:02 +01:00
1ec44b22e9 Make grumpy gcc happy (double to float conversion...). 2015-01-15 10:29:14 +01:00
a0fd7ab28d Revert "Make version_update() callback being invoked when linking/appending datablocks"
This reverts commit fbc2909cef.

The reason for revert is that the commit made it so bpy.data is not set to any
of the new main (on both file open and file link/append) which basically totally
broke versioning code.

Needs some smarter solution there.
2015-01-15 14:22:28 +05:00
08cc4bfa61 Small change for the new Lat/Long properties.
We use upper case for properties.
2015-01-15 08:23:27 +01:00
4118c1b4e6 Cycles: Adding field-of-view options to the equirectangular panorama camera
This patch adds the option to set minimum/maximum latitude/longitude values for
the equirectangular panorama camera in Cycles, as discussed in T34400.

The separate functions in kernel_projection.h are needed because the regular
ones are also used as helper functions for environment map sampling.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: dingto, sergey, brecht

Differential Revision: https://developer.blender.org/D960
2015-01-14 23:22:24 +05:00
193871ae7d Cycles: Ignore preprocessing time in ETA calculation
This patch makes Cycles ignore the time spent in BVH construction etc. when
estimating the remaining time. Considering that the remaining time is calculated
based on the average time per tile so far, as far as I understand it makes no
sense to include the preprocessing time.

Reviewers: sergey, #cycles

Reviewed By: sergey, #cycles

Subscribers: sergey

Projects: #cycles

Differential Revision: https://developer.blender.org/D895
2015-01-14 23:14:16 +05:00
0d6e88b446 Fix operator tooltip MBALL_OT_duplicate_move 2015-01-14 15:57:32 +01:00
bcd9b29a0d PyAPI: name OrientationHelper (io prefix in module name already) 2015-01-14 23:55:16 +11:00
ca0605b3ae cleanup: minor edits 2015-01-14 23:53:39 +11:00
edad3f93f6 Py IO utils: Add helper class to handle orientation (axes).
Also 'fix' T43243, since we can easily add a common better behavior now
when both axis settings are incompatible, by systematically changing
the other axis.

Will update 'main' addons in next commit, contrib ones I'll let to the authors
(old behavior is still possible anyway).
2015-01-14 13:10:18 +01:00
c8a9a563a7 Fix T42621: Glossy world ray visibility affects on transmission rays
There seems to be inconsistency in flags checks in Cycles kernel. In the interface
glossy means "Glossy Reflection" and it is properly taken into  account when doing
visibility check in BVH traversal.

The check in indirect background/light emission was treating this flags as "any of
glossy reflection or transmission" which is kind of weird.

Made it so emission code follows ray visibility assumptions in other parts of the
kernel now.
2015-01-14 15:33:38 +05:00
90a8aa2dab Fix T43201: Update the "in use" flags of sockets before drawing,
so value buttons are displayed when the link is not used.
2015-01-14 11:15:55 +01:00
dd5d31b515 Ignore "unavailable" links in the compositor, where one or both sockets
are unavailable (hidden).
2015-01-14 11:15:55 +01:00
197e889104 Transfer Data: resurrect fake AND/OR when transferring 'boolean' values like UVSeam, Freestyle marks, etc. 2015-01-14 10:51:41 +01:00
e88936a128 cleanup: bScreen (char for bools) 2015-01-14 19:11:02 +11:00
e0075f93e4 Remove redundant pad flag 2015-01-14 18:05:05 +11:00
julianeisel
f19013158a Workaround/Fix T43139: Calling bpy.ops.screen.screen_full_area() multiple times in python console causes Blender to crash
This was sort of a chicken<->egg dilemma, because after a maximized screen was restored, the screen handling used region
coordinates which weren't updated yet. I'm still not sure why, but this resulted in area coords that go beond INT_MAX.

To fix this I made sure the first screen handling after restoring a maximized screen is skipped, so that it's delayed to
the next call of wm_event_do_handlers (since this is called from main loop there shouldn't be a noticable delay or any
handling glitches).
2015-01-14 01:29:17 +01:00
3d503ea8d6 UI: Eyedropper for view-depth
Currently this is mainly useful for picking camera DOF depth.

- EKey over a distance field prompts you to pick a depth from the camera.
- WKey (Specials menu) to pick from the 3D view (when the active camera's selected).
2015-01-14 08:46:55 +11:00
54fd3f36a0 Fix T43195: Cycles uses clipping sphere instead of clipping plane
Basically the title tells it all, now Cycles uses proper clipping plane,
matching other render engines.
2015-01-14 02:34:49 +05:00
e6c79b7369 Cycles: Fix QBVH refit nodes not setting primitive type properly 2015-01-14 02:17:28 +05:00
cfd2af0d48 Fix UI messages (own stupidness even :/ ). 2015-01-13 21:03:43 +01:00
653c6f2edd SDL wrangler: Support loading SDL2 libraries of different names
Seems different distros might have different naming rules, so need
to adopt our code for that.
2015-01-14 00:26:43 +05:00
45d131ff08 Recent extrude rework caused bug with single faces
extrude_discrete_faces doesn't duplicate faces on extrude, see: T43237
2015-01-14 05:24:16 +11:00
b09563ca8c Cleanup: fixes for building with recent clang 2015-01-14 05:11:20 +11:00
ef80914c99 error in last commit 2015-01-14 05:11:19 +11:00
3f0113be4d Fix T43156: Cycles incorrect final render, proper viewport with moblur disabled
Really stupid issue caused by typo in bitfield bit lead to bit conflict,

Not sure how it was done, could be some bad merge conflict resolve in the
original commit or just pure man stupidnes.

This is a nice example when having set of small test render scenes hooked
to the ctest would really help.

It's probably not that stopper issue (even tho still quite bad) since it
was made 2 months ago. But if we ever do 'a' this time it's a nice change
to include.
2015-01-13 20:56:34 +05:00
be2994a6f1 FileBrowser: minor tweak/UI consistency: add 'viewzoom' icon to search field. 2015-01-13 16:43:55 +01:00
0d7c41d789 FileBrowser: Add an 'hidden file' icon, and use it instead of named checkbox for 'show hidden' param. 2015-01-13 16:37:27 +01:00
a97c5d1f9f Fix T42459: Knife fails at small scale
Occluding geometry failed when near overlapping (or cutting small objects).
2015-01-14 01:36:03 +11:00
a2a7260915 BMesh: option to filter out faces during raycast
This allows us to more easily cast from the surface of a mesh
without normal offsets (Which can give precision issues).
2015-01-14 01:36:03 +11:00
bd00770715 Cleanup: consistent arg order in bmesh 2015-01-14 01:36:03 +11:00
fbc2909cef Make version_update() callback being invoked when linking/appending datablocks
This way addons and render engines which needs to do versioning code on files will properly
do it when something is being linked or appended to the scene. Previously that callback was
only called for the local main only, making it impossible to do tweaks on linking.
2015-01-13 18:24:53 +05:00
117edbbf88 Fix T40616: Deformation Motion Blur for modifiers
Added extra checks for constructive modifiers which might in theory cause deformation
motion blur. it's still not totally perfect but we're getting really close to what we
can do in the best case scenario.

This commit might cause some extra time being spent on scene synchronization because
there might be now some false-positive results, but render time should stay quite the
same as before (apart from cases when there is deformation happening which was not
detected before).
2015-01-13 15:41:34 +05:00
b77dd13004 Fix T43229: Knife-project regression (broke knife-project)
There have been quite a few issues with knife precision,
tested reports (T43229, T42864, T42459, T41164) and this works with all.
2015-01-13 21:28:58 +11:00
98ad7c21c0 Blender-Internal: avoid redundant area check 2015-01-13 19:10:15 +11:00
3debcc8b51 Math Lib: improve area calculation
- area_quad_v3 now works correctly with concave quads.
- add area_squared_*** functions, to use when comparing to avoid a sqrt().
2015-01-13 19:10:15 +11:00
00ef77c1a2 Fixes for SplineIK:
* Ensure that when new constraints are created, the new settings have sensible
  default values.
  TODO: we need to version-patch old files

* Fix problem with variable shadowing (which wasn't causing problems AFAIK)
2015-01-13 19:30:31 +13:00
8787532184 Bugfix: The "bulge_min" setting for the Stretch To constraint prevented bones from shrinking below 1.0 scale
From the looks of things, this was a typo. The result was that if you had a bone
with the minimum volume restriction in place, the bone would not get any thinner
when it was stretched out.
2015-01-13 18:13:57 +13:00
f0361fcf54 Pataz-Gooseberry Request: Limits on Volume Preservation for Spline IK
This commit adds a new type of volume preservation mode to Spline IK
which makes it possible to set limits on the minimum and maximum
scaling of bone "fatness".

* The old volume preseving mode has been kept but renamed, to avoid
  breaking old rigs. "Volume Presevation" uses the new method, while
  "Inverse Preservation" is the old one.

* The code and settings for this new xz scale mode are directly lifted
  from the improved Stretch To constraint
2015-01-13 18:06:53 +13:00
julianeisel
f453df5b03 Fix T43128: Headerless panels are reorderable on Windows
Seems like a weird issue, but to sort panels "qsort" is used, which works slightly different on Windows. So all I had
to do was cleaning up the logic in find_highest_panel so that headerless panels are sorted, but that it absolutly not
allows headerless panels to be above normal panels.
I made sure it works fine on Linux as well.
2015-01-13 03:29:25 +01:00
aca329ba64 Cleanup: add missing MovieClip entry in RNA's id_type_items, and respect alphabetical sorting (on UI names for enums, on ID codes otherwise). 2015-01-12 19:56:18 +01:00
d47804cb06 correct last commit: less cryptic camera check 2015-01-13 05:55:10 +11:00
a4366497db Fix T43206: region_2d_to_origin_3d has no ortho offset
With ortho views the value would be aligned to the 'rv3d->ofs'
Now it works in camera ortho & regular ortho views.
2015-01-13 05:41:56 +11:00
dcd662c695 BMesh: Tweak behavior for select more/less
Stepping over faces gives overall nice results but it stopped wire edges from working.
Now step over wire too.
2015-01-13 02:36:51 +11:00
0996ee3bb8 Fix: Don't show filesel buttons when no operators running 2015-01-13 02:08:26 +11:00
c6d28a94be Fix T42754: File-Selector lost on fullscreen exit
There  was a hard-coded check to exit the fileselector when restoring a view.

Now, when space types differ, flag areas as temporary and switch back to the previous type only in this case.
This means you can select a file while having a file-selector space type open, and not loose it every time.
2015-01-13 01:44:40 +11:00
301433fe9d Fix OpenGL Context freeing 2015-01-13 01:44:40 +11:00
3027ff8b13 Second try to fix missing previews of mat/tex/etc. in .blend files.
This time, it's a dedicated operator user has to run before saving the file.

And it recursively check all IDs linked from each scene, therefore rendering
materials etc. previews using a scene they are used in.

Note the renderengine issue is not completely addressed this way
(existing code for icon previews seems to ignore completely other engines,
and IDs not linked anywhere (fake-user ones) will be rendered with current scene's engine
as fallback, also you can get a material linked to an hidden object in a scene, etc.).

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D980
2015-01-12 15:13:46 +01:00
51779d9407 Cycles: Fix crash after recent BVH changes on empty BVH trees
It's apparently not nice to access 0th element of zero-size vector in C++.
2015-01-12 19:11:32 +05:00
f9a4f8ada4 BLI linkstack macros: do not prepend the 'anti-namespace-collision' to var name.
Issue was, in case of using such stack within a structure, the '_' underscore
would be added in front of struct variable
(e.g. `my_struct.my_stack` would lead to (try to) using `_my_struct.my_var_pool` ...).

Now underscore is appended to var names, ugly but working.

Note did not touch to the alloca variants of those macros, since in this case enforcing
a pure local use is best I think.
2015-01-12 14:37:59 +01:00
e8730af87f Cycles: Fix compilation error on platforms without SSE support
Overview this in one of the previous BVH commits.
2015-01-12 17:14:40 +05:00
a3bfaa481f Cleanup: rename BKE's 'object_data_transfer' to 'data_transfer' to avoid same file names with ED_object's one. 2015-01-12 12:05:47 +01:00
47e47e6760 Avoid type re-definition for as long C11 is explicitly enabled in compilers 2015-01-12 15:36:18 +05:00
9d02e2626b Fix typo in OCIO configuration file 2015-01-12 15:06:03 +05:00
5719ed1225 Cycles: Add leaf primitives sanity check asserts to the kernel
This way we'll notice that leaf splitting didn't happen correct pretty easily
in debug builds.

There'll be absolutely no impact on release builds.
2015-01-12 15:05:14 +05:00
bc7ff3c2b4 Cycles: Enable leaf split by primitive type and adopt BVH traversal for this
This commit enables BVH leaf nodes split by the primitive type and makes it
so BVH traversal code is now aware and benefits from this.

As was mentioned in original commit, this change is crucial to be able to do
single ray to multiple triangle intersection. But it also appears to give
barely visible speedup in some scene.

In any case there should be no noticeable slowdown, and this change is what
we need to have anyway.
2015-01-12 15:04:52 +05:00
c707b91ce6 Cycles: Optimize leaf splitting code by avoid vector allocation
Use variables allocated in the stack and avoid heap allocation which should make
leaf splitting code a bit faster.
2015-01-12 14:49:59 +05:00
b56f5900dc Cycles: BVH params option to split leaf node by primitive types
The idea of this change is make it possible to split leaf nodes by primitive
type, making leaf containing primitives of the same type.

This would become handy when working on a single ray to multiple triangles
intersection code, plus with careful implementation it might give some extra
benefits on BVH traversal code by avoiding primitive type fetch and check for
each primitive in the node. But that's a bit tricky to have benefits on this
change only because depth of BVH increases.

This option is not exposed to the interface at all and not used even secretly,
the commit is only needed to help working further in this direction without
messing around with local patches and worrying of them running out of date.
2015-01-12 14:49:56 +05:00
d8fc404415 Cleanup: style 2015-01-12 18:56:36 +11:00
bae5826b65 Fix T42069: Fonts /w non-ascii paths fail in win32
Workaround freetype's use of fopen by swapping FT_New_Face for our own version which uses BLI_fopen.
2015-01-12 18:30:11 +11:00
f9c7cbd989 revert part of 7a1dc20
These warnings are false positives & confuses intended logic to set dummy values.
2015-01-12 11:46:44 +11:00
1864253db0 Fix T43208 material flickering in edit mode.
Happens because material setting now occurs in the derived mesh drawing
routine as it should. However that means that it also happens during
selection and that influenced the drawing state somehow.

In 2.72 this did not occur because material setting happened during draw
setting (skip or draw) instead of after the draw setting passed (so
selection would skip it by use another draw setting function). Of course
this violated design but worked.

Made it now so backbuffer selection does not enable materials (it's
redundant in those cases anyway).

This could be ported to a possible 'a' release but as is classic with
display code there may be some other places that it could backfire.

Tested fix with texture/vertex painting and selection which use
backbuffer for both subsurf and regular meshes and it seems to work OK.
2015-01-11 21:29:51 +01:00
0a5ad65512 Modifiers shall be listed in alphabetical order in UI... 2015-01-11 21:23:43 +01:00
7a1dc20560 Cleanup: quite some harmless but noisy warnings from gcc... 2015-01-11 21:14:39 +01:00
1b3b011354 Transfer data: cleanup: Remove 'vertex_group_transfer_weight' operator.
We can now use 'generic' data transfer instead.

Note new one is not an exact replacement, it should be able to do
everyting old op could do though, and more.
2015-01-11 18:33:12 +01:00
a628a8240e Data transfer: make operator able to work 'reversed' (i.e. transfer from selected objects to active).
Needed to replace weight transfer modifier in WeightPaint mode...

Note this is not exposed to users in UI, shall remain technical intern
parameter imho. Esp. since behavior when several sources is a bit 'random'
(merely uses each source in selection order...).

Also, this correct a bug, where 'lib' linked objects/meshes could not be used
as source...
2015-01-11 18:32:25 +01:00
599c8a2c8e Fix T43204: Shrinkwrap constraint, project mode: Space ignored in bone case.
Own fault in rBb154aa8c060a60d to fix T42447... Reverted that commit, and added
kind of not-so-nice hack instead.

Note root of the issue comes from the special case we are doing here re 'Local'
space of parent-less objects. In that case, local space should be the same as
world one, but instead we apply the object rotation to it... This is inconsistent
with all other cases and could very well lead to other issues as T42447, but afraid
fixing that properly would be rather hairy - not to mention it would likely break
all existing riggings etc. :(

Should be safe for a 2.73a, shall we need it.
2015-01-11 14:59:11 +01:00
cd2d84d91c Fix three issues reported by coverity in own recent code. Including two potential crashers. 2015-01-10 22:54:32 +01:00
5357474ad8 Fix building with very strict flags, use size_t rather than int for string length.
Reported on bf-committers.
2015-01-10 19:15:49 +01:00
ab3f037ccc GPencil Editing: FKEY now controls the eraser size when in Stroke Edit Mode 2015-01-11 02:15:18 +13:00
9590e77a59 cleanup: style & warnings 2015-01-10 12:40:09 +11:00
dec523da87 Fix for regression in bmesh connect-pair
T42563 fix wasn't right, fortunately this doesn't fail in most cases.
2015-01-10 12:32:14 +11:00
79d8617424 Transfer data: add modifier.
Not much to add, modifier uses same code as operator basically, only key difference
is that modifier will never create data layers itself, you have to use dedicated operator
for that.
2015-01-10 00:04:43 +01:00
8615977624 Fix: Delkey didn't activate the Grease Pencil strokes delete operator like XKEY does 2015-01-10 11:20:11 +13:00
ee4453f083 Transfer Data: add main core code and operators.
This add code needed to map a CD data layout from source mesh towards destination one,
and code needed to actually transfer data, using BKE's mesh remap generated data.

This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones
(like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly
shape keys, this is known TODO.

Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols).

Notes:
* New transfer operators transfer data from active object towards selected ones.
* Modifier will be committed separately.
* Old weight transfer code (for vgroups) is kept for now, mostly because it is the only
  usable one in weightpaint mode (it transfers from selected object to active one,
  this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon.

Again, heavily reviewed and enhanced by Campbell, thanks!
2015-01-09 19:32:44 +01:00
67b1412bc9 Radial operator number angle input should use angles.
Much more lenient if you are a human.
2015-01-09 19:23:27 +01:00
58d7153c6c BKE: Add 'mesh remap' code.
This is the (big!) core of mesh transfer data, it defines a set of structures
to represent a mapping of mesh elements (verts, edges, polys of loops) between
two arbitrary meshes, and code to compute such mappings.

No similarity is required between source and destination meshes (though results
when using complete different meshes are rather unlikely to be useful!).

This code is not bound to data transfer, it is defined to be as generic as possible,
and easy to reuse or extend as needs arise.

Several methods of mapping generation are defined for each element type,
we probably will have to adjust that in future (remove useless ones, add
new ones...).

For loops, you can also define islands (for UVs e.g.) so that loops of a same
destination polygon do not 'spread' across several source islands.

Heavily reviewed and enhanced by Campbell, thanks a lot!
2015-01-09 18:35:32 +01:00
b99687169d Fix texture sampling with generative modifiers - sample backbuffer
returns indices in mesh face range
2015-01-09 18:06:15 +01:00
1187b98d48 Fix T43174: "Record animation" does not update fcurve handles
`INSERT_FAST` implies you call `calchandles_fcurve()` at the end...
For now, since we do not store edited FCurves nor can we get them easily
(requires RNA...), just update handles of all fcurves, it's much more
performant than removing usage of `INSERT_FAST` anyway.
2015-01-09 15:29:47 +01:00
ac619aaf38 BLI_string: BLI_str_ends_with -> BLI_str_endswith
Loosely following Python str convention.
2015-01-09 23:47:17 +11:00
73955e2566 Fix for GTest 2015-01-09 23:33:02 +11:00
ca9bdf3f28 Fix rotate around selection only working if object is at origin for
texpaint
2015-01-09 13:27:49 +01:00
62cc4bab08 BKE bvhutils: cleanup and refactor to make it more flexible.
You can now use lower-level '_ex' versions of bvh creators to only use part of
the mesh's elements in the BVH, and/or create bvh from non-DM sources.

Needed for transfer data.

Note edges extend version of bvh creator is not added here, not needed so far.
2015-01-09 13:03:55 +01:00
1794186053 BLI_math: add vector's dot_v3v3v3() func, for when you have three points instead of two vectors. 2015-01-09 13:03:55 +01:00
2e72d756c4 BLI_rand: add a function returning a random point whithin given 2D triangle.
Needed by transfer data.
2015-01-09 13:03:55 +01:00
88ee44a9ac BLI: add 'A*' (AStar) shortest path solver algorithm.
Needed for transfer data.
2015-01-09 13:03:55 +01:00
2f16098d20 Gooseberry animation request: Paste flipped pose in action
and graph editor.

This was a tricky commit that was not so straightforward to make work.
The information for bones is not easy to come by in the animation curves,
however we do have some string manipulation tricks to make it happen.

Testing in gooseberry worked for the rigs there, commiting to master now
2015-01-09 12:16:58 +01:00
95847f6ac7 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Propper fix reverting most of rB60e70c0c6014e5, which was only partial specific fix.
This code uses generic `BKE_id_lib_local_paths()` func to handle all possible paths.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D977
2015-01-09 09:53:58 +01:00
1b8240f5af Fix T43154: Extrude edges ignored isolated verts
Also cleanup extrude code.

- remove normal calculation.
- remove return values for transform type.
- use enums.

Thanks to Psy-fi for finding the initial fix.
2015-01-09 07:31:05 +11:00
db0b8017cb DDS missed newline printing errors. 2015-01-09 04:23:43 +11:00
e02af840e1 Fix gtest linking on ubuntu and do minor cleanup.
Generally for build systems, libraries that do not depend on other
libraries, such as system libraries, OpenGL etc always go at the end.

We could even get rid of some duplicate dependency libraries here but
auto duplication by build systems and differences between OSs make this
difficult.

GTest still duplicates all libraries twice to solve some issues which is
weird (maybe libs are not sorted correctly for some reason? needs
investigation)
2015-01-08 17:17:40 +01:00
60e70c0c60 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Simply have to rebase onto main filepath when copying, if source datablock is lib and path is relative.

Afaict, only affected Image and Text datablocks. MovieClip would also be a candidate, but has
no copy implemented currently.
2015-01-08 14:38:48 +01:00
72ca952641 correct permissions 2015-01-08 23:01:15 +11:00
37d748cd17 exclude git/arc files from tgz archive 2015-01-08 22:53:23 +11:00
def2ef88b0 Fix crash in texture paint sampling when sampling materials without
textures slots
2015-01-08 12:47:19 +01:00
acce9f0841 Fix for wrong boolean flag check
This fixes obvious overflows when checking bitflags, who knows how much
undiscovered issues exists in the code still..
2015-01-08 14:43:18 +05:00
8f0b6a1dd1 Better check that preview seq is cleared on exit 2015-01-08 20:16:22 +11:00
4305950fc0 GHash: use reinsert instead of remove/insert 2015-01-08 19:58:01 +11:00
9fadacfd0f cleanup: style 2015-01-08 19:57:50 +11:00
8ebb552a95 Fix T40257: Frustum culling not working properly
Instead of getting fancy this time, we'll just use Mahalin's simpler
fix. This may have slight performance impacts, but it is a lot simpler
than the previous fix and shouldn't cause as many bugs.
2015-01-07 20:41:07 -08:00
4fac29ca0e Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 315609ec0c.

This fix still causes more issues than it solves.
2015-01-07 20:38:05 -08:00
ae18fd5937 Fix invalid memory access in gradient brushes - could cause a crash in
MacOS.

This looks like an oldie and should not influence release, but if we do
make an 'a' build it's safe to include.

Report by Craig Jones, thanks!
2015-01-07 23:01:42 +01:00
ef05bc5dd7 Quite warning about unused func.
(not my day...)
2015-01-07 19:47:31 +01:00
cda149b9c8 Remove 'ensure previews' call from write code.
Sorry about that, should have checked this stuff more, with Internal material
renders are very fast (unoticable), but with Cycles it can take (a lot of) time,
like several minutes or more.

Will probably fall back to a dedicated operator users will have to fire themselves
when they want previews in their files.
2015-01-07 19:38:13 +01:00
7c53c3483c PyAPI docs: minor changes to sphinx docs. 2015-01-08 03:55:01 +11:00
19169de9f7 Recalculate particle pathcache stuff for all particles instead of
trying to be smart.

This breaks child interpolation otherwise because sometimes parent
paths are not calculated and give bad clumping results.
2015-01-07 16:16:40 +01:00
e0e9cd0163 PyAPI: Call to get the pixel x,y in a text block
This allows scripts to request the screen location of any (line, column) pair.
2015-01-08 01:22:11 +11:00
14f2597d7e More tweak to preview commit - do not 'render' non-used IDs either.
Thanks to Campbell for the headup.
2015-01-07 14:10:14 +01:00
5bbb8a0d9d Ugh, forgot to invert that one in previous commit, sorry for the noise... 2015-01-07 12:46:18 +01:00
820b6b3731 Ensure mat/tex/etc. previews are generated/saved in .blend files when enabled in userprefs.
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D970
2015-01-07 12:31:31 +01:00
3f05797333 Followup to fe3e000: no need to exit pose mode on operator redo
This is to be backported to the release branch.
2015-01-07 15:38:32 +05:00
29d2c71117 Fix for bool flag use 2015-01-07 12:08:55 +11:00
848c00f7e7 cleanup: de-duplicate code 2015-01-07 12:08:54 +11:00
3bd01c6056 Fix: Segfault in Image Editor when transforming GPencil Strokes 2015-01-07 13:19:49 +13:00
45c7af6c9c Fix: Missing updates for UI panels and main region when using Grease Pencil in Image Editor 2015-01-07 13:12:37 +13:00
bafabf4eda Fix: Restored "Draw Poly" to D Ctrl RMB, as D Alt LMB was blocked by Alt-D (duplicate) keymap 2015-01-07 12:41:25 +13:00
257d513aa8 Cycles: Allow negative values in Combine XYZ node. 2015-01-06 22:53:15 +01:00
julianeisel
70f3a47d57 Event System Cleanup: Modifier Key Assignment Switch
Was quite messy previously, think this is much more readable and easier to follow.
2015-01-06 20:33:22 +01:00
c66d7359fd Submodules: Make them pointing to the master branch
Otherwise it gives all sort of weird and wonderful artifacts.
2015-01-07 00:18:18 +05:00
julianeisel
eefb393cfd Fix T40435: Fix event system modifier key handling
This partial reverts rBd800cffaf10cb7, but fixes T40435 (Background label is not
redrawn).

It now isn't possible to use single modifier keys as shortcuts anymore. But this
is something that's not really useful at all, since it breaks more than it allows.
2015-01-06 18:48:36 +01:00
8e73b770d4 Remove slurph shape-key feature
This is an old option which wasn't working in over a year without complaint.
2015-01-07 02:06:37 +11:00
0527183090 Fix copy-paste of colors to generated color not being correct. '
Change generated color property to gamma space to match the add new
image operator.
2015-01-06 15:48:18 +01:00
Dalai Felinto
d36fb8e34e Logic Bricks *must* be kept in alphabetical order 2015-01-06 12:29:48 -02:00
bf168f0600 Fix T43137: vertex bevel percent mode wasn't implemented. 2015-01-06 09:13:38 -05:00
22c9979b51 Point submodules ot latest release tags 2015-01-06 18:48:04 +05:00
e9d6350e7e Sequencer: show extensions when preview enabled 2015-01-06 23:11:20 +11:00
4b586895f2 Expose viewer panels also when backdrop is active. Allows to select
proxy size, render type etc.
2015-01-06 12:17:06 +01:00
a922be9270 Cycles: Repot CPU and CUDA capabilities to system info operator
For CPU it gives available instructions set (SSE, AVX and so).

For GPU CUDA it reports most of the attribute values returned by
cuDeviceGetAttribute(). Ideally we need to only use set of those
which are driver-specific (so we don't clutter system info with
values which we can get from GPU specifications and be sure they
stay the same because driver can't affect on them).
2015-01-06 14:13:21 +05:00
e961c06a6e Fix T43143: DPX header wrong, making it impossible to import to other software
The issue was caused by the single letter in header, which is expected to be
captial as per standard: http://www.simplesystems.org/users/bfriesen/dpx/S268M_Revised.pdf
2015-01-06 13:47:53 +05:00
77c926933b cleanup: warnings 2015-01-06 19:09:56 +11:00
1829c049be Correct args from recent mathutils refactor 2015-01-06 19:09:55 +11:00
bf0c8e116d PyAPI: add PyList_APPEND
This appends while giving ownership to the list, avoiding temp assignment.
This matches PyList_SET_ITEM which bypasses refcount's

Note, this also reduce code-size, Py_DECREF is a rather heavy macro.
2015-01-06 19:09:53 +11:00
9fd569a654 PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
ee58d44945 BGE: Fix for bugs T42520 and T42097 (mouse look actuator related).
With this fix the mouse actuator movement works well as with even screen resolutions as odd screen resolutions.
Also it fixed the movement when the border of the blenderplayer window is out of the screen limits.

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D946
2015-01-05 22:07:35 -08:00
2d2bfd416b Fix T43122: Shrinkwrap target, wrong linked object 2015-01-06 14:01:18 +11:00
62f2b751f8 UI: refactor button string get/set into functions. 2015-01-06 11:05:08 +11:00
julianeisel
ffd06de470 Correction to previous commit
Just realized menu buttons are using hardmin and hardmax for a bad hack which will make the assert fail :/
2015-01-06 00:02:57 +01:00
c91e64faa6 Fix/cleanup very ugly and unsafe usage of but->str in ui_but_update().
Currently, but->str should never be smaller than but->strdata, but code shall
not rely on this.

Further more, but->strdata is 'only' 128 chars, this could become limit with some
translations, if the org label is already rather long, leading to truncated str
(Chinese e.g. can only store about 40 chars in strdata).
2015-01-05 21:38:15 +01:00
julianeisel
e7a9bf88d2 Fix T43111: Node Editor (Slider) Draw Glitch
* don't allow Node Editor input max value to be less then min value
* avoid the num slider drawing glitch if softmin equals softmax
* assert if softmax/hardmax is smaller than softmin/hardmin

With this, we sort of allow softmin/hardmin and softmax/hardmax being the same.
2015-01-05 21:05:17 +01:00
22ce525bcd More border clamping removed. 2015-01-05 14:26:56 +01:00
8a547af2bd Remove border clamping. Usually we just want to clamp to edge instead.
Note - checked all glTexImage functions and we never use that. Border is
ifdefed out too here.
2015-01-05 14:25:22 +01:00
89b654dc56 FileBrowser: small tweak to new search feature: clear that string when changing dir.
In 99% of cases, you do not want to keep the same filter when changing dir,
and having to reset it by hand is *very* annoying!
2015-01-05 12:23:41 +01:00
caf5a325b0 Outliner 'Blender file' view: Show libs used both directly and indirectly both on main level and in nested tree.
Request from Gooseberry team. This eases a bit managing dependancies in complex .blend files.

Reviewers: campbellbarton

Subscribers: fsiddi

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D943
2015-01-05 11:28:48 +01:00
3414d01411 Use float format for high bit depth textures if available - storage
requirements are the same but we may avoid some clipping of float values
for HDRs when used in shaders.
2015-01-05 11:23:54 +01:00
1ef33968fd Recent fix for SDL2 broke joysticks for SDL1.2 2015-01-05 20:23:30 +11:00
e5063b0bd3 Cleanup: OSX: remove obsolete ppc/ppc64 sw-renderer kCGL attributes 2015-01-04 20:42:16 +01:00
a08c5e1183 Partial fix for T43113: Filebrowser: Empty folders do not contain go back arrow.
Do not allow going into un-readable directories at all.
Note we might want to reflect that 'state' in UI for users too, but that will be
for later.

Also, not quite sure this fix the windows case, will have to start my VM... :/
2015-01-04 17:57:39 +01:00
8abdc89912 Sequencer: Preview dragging playhead over strips
Bring back the 2.4x feature.

also show a highlight when a strip is being previewed.
2015-01-05 02:27:50 +11:00
c7eb83bc17 Fix sequencer border-flickering
Offscreen viewport drawing wasn't properly restoring the theme.
Add API calls to store/restore the theme so it can be temporarily overridden.
2015-01-04 23:23:17 +11:00
3447944c3f sequencer: don't return big values (fill pointer instead) 2015-01-04 22:46:54 +11:00
44e02651ab Fix for crash for 'Edit Source'
was accessing freed menu region.
2015-01-04 22:25:53 +11:00
026cb6bdeb FileBrowser: Cleanup: rename some (really ugly) enum names. 2015-01-04 12:04:47 +01:00
b240b8e231 Freestyle: reserve array sizes before filling
also use PyList_GET_ITEM when list size is known.
2015-01-04 21:23:26 +11:00
de6b546e15 Fix 8 memory leaks from bad PyList_Append use 2015-01-04 20:35:16 +11:00
e0db0f84ac Fix T43119: mathutils.intersect_point_line always returns a 2D vector as first value.
Trivial, safe for final 2.73.
2015-01-04 10:11:21 +01:00
8106a6b75d mathutils: refactor instantiation
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.

also fixes unlikely memory leak if the data-array can't be allocated.
2015-01-04 17:43:57 +11:00
c41431f1e9 cleanup: use 'coords' abbreviation for functions. 2015-01-04 14:21:16 +11:00
fd9b25df75 cleanup: create cube, use index lookups 2015-01-04 14:21:16 +11:00
julianeisel
555c1d6a63 Fix T43114: File Browser - don't highlight '..' while using border select 2015-01-04 02:36:42 +01:00
dcc5997527 FileBrowser: add search field in header bar.
Not much to add, pretty straightforward...
2015-01-03 21:55:16 +01:00
d8b00a3bf5 Freestyle: memory consumption optimization in stroke rendering.
Previously individual strokes were represented by distinct mesh objects
no matter how many vertices and materials each stroke has, although
the vertex and material counts can be quite small depending on the input
scene data.  Now stroke meshes are packed into a minimum number of
mesh objects, so as to reduce the overheads of Blender object creation.
2015-01-03 21:54:56 +09:00
babfec9e8f Bump subversion so that version patches for theme changes work 2015-01-04 01:17:53 +13:00
Diego Garcia
f329ebe38a D824: Add themeing for keyframe lines in Timeline
Reviewed by: Joshua Leung (aligorith)
2015-01-04 01:17:51 +13:00
c50003cd09 Grease Pencil: Vertex size and colours are now themable 2015-01-04 01:17:50 +13:00
b137f06d7e Cleanup: rename 'filelist' BLI funcs to consistent naming.
Also, add an optional callback to `BLI_filelist_free()` to allow freein
void poin if needed (consistency with `BLI_filelist_duplicate()`...).
2015-01-03 12:41:36 +01:00
780bb88a7a Refactor 'fit in camera view' code, and expose it to RNA.
This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of
`BKE_camera_view_frame`. This allows that code to work with orthographic projection too.

Also, two funcs were added to rna's Object, to resp. get the projection matrix of that
object (mostly useful for cameras and lamps objects), and return position this object
should be to see all (to fit) a given set of points.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D961
2015-01-03 12:05:23 +01:00
16ed20ff3c Add some BLI helpers needed by asset branch.
`BLI_strncpy_ensure_pad()` is also useful with current master code.

The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`)
are only used in asset branch currently, but think they could be useful
in other places too, and simplifies handling of asset branch & future patch review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D965
2015-01-03 10:13:44 +01:00
6b8b3badf5 GTest: test beautify with polyfill 2015-01-03 18:05:18 +11:00
0d7e8cc869 GTest was broken on Linux 2015-01-03 17:55:59 +11:00
f06335e12f Fix for view map cache not flushed by updates of edge detection options.
This fix should be considered for inclusion in the 2.73 release, since
it concerns a new feature of Freestyle introduced in 2.73.
2015-01-03 15:40:07 +09:00
8a288953cc Fix RNA Image.frame_duration.
If a video was loaded (e.g. from python) but never 'ibuf-acquired', its Image->anim
prop would still be NULL, returning useless '1' value as frame duration!
2015-01-02 22:51:51 +01:00
1369bd562c Cycles: Fix compilation error on AVX platforms with -arch-native
Was a conflict in headers between clew and util_optimization.h.
2015-01-03 00:11:28 +05:00
8e37a45ac0 Fix (unreported) 'pad9' not shown by UserPrefs' KeyBinding filter.
Minor glicth, but still... Safe for 2.73.
2015-01-02 18:24:25 +01:00
2a8a56929b Cycles: Fix unneeded int/float conversion happened in previous commit 2015-01-02 17:21:24 +05:00
4f2583ee13 Fix T43027: OpenCL kernel compilation broken after QBVH
OpenCL apparently does not support templates, so the idea of generic
function for swapping is a bit of a failure. Now it is either inlined
into the code (in triangle intersection) or has specific implementation
for QBVH.

This is probably even better, because we can't create QBVH-specific
function in util_math anyway.
2015-01-02 14:58:01 +05:00
da66a2c871 Fix T43099: Modifiers in edit mode might mess up materials
The issue was originall caused by 2e8ba17 by removing necessery call
GPU_enable_material(). It was probably removed because in some cases
material was enabled after calling setDrawOptions.

That wasn't always a case for edit mode.

This is absolutely to be included to 2.73
2015-01-02 14:28:58 +05:00
4abe548527 cleanup: style 2015-01-02 19:29:00 +11:00
bf169d6ca6 Fix T43066: Joystick broken in GE since 2.73rc
Caused by move to SDL2, fix thanks to jensverwiebe.
2015-01-02 17:14:33 +11:00
fdddd4ed66 Fix same operator (curve.separate) in double in Curve menu.
Reported by Leon Cheung on IRC, thanks.
2015-01-01 15:09:42 +01:00
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
4bdd4aa633 SpaceFile: Cleanup: fix stupid indices in filelist_from_main()
Dead code (currently), but still...
2015-01-01 11:11:37 +01:00
46bce66805 SpaceFile: Tweak thumbnail to avoid restarting the job needlessly. 2015-01-01 11:11:37 +01:00
950f2c84a3 SpaceFile: Refactor sorting and filtering of filelist.
New code shall be more easy to maintain and extend.
Sorting is now handled quite the same as filtering, and all filtering parameters
are now packed into a sub-struct to help extending it later.

Also done some optimizations in filelist refresh, and sorting/filtering area.
Now we should avoid re-sorting and re-filtering too often, also removed
calls to those in read_xxx funcs.

Note thumbnail job is still started basically on each call to `file_refresh()`,
will be addressed in next commit.
2015-01-01 11:11:37 +01:00
d8bb30d87e SpaceFile: Filelist: reorder a bit things, also cleanup some unused and pure-private funcs. 2015-01-01 11:11:37 +01:00
9de54da5a0 Fix T43079: Proxies of 100% size are ignored in sequencer 2015-01-01 15:06:22 +05:00
ec9a137bb2 Fix T43078: Strip custom proxy files did not respect color space settings 2015-01-01 14:52:37 +05:00
c24b694986 Add GPencil Copy/Paste to secondary pie + toolshelf 2015-01-01 12:50:00 +13:00
c0805722ed GPencil Editing: Copy and Paste selected stroke segments with Ctrl-C and Ctrl-V 2015-01-01 12:49:59 +13:00
e9596e5def Cycles: Post-reintegration tweaks to ensure things do compile
This commit contains all the tweaks which were missing in initial patch
re-integration from the standalone Cycles repository.

This commit also contains an utility cmake macro to help linking targets
with different libraries for release/debug builds, the name currently is

  target_link_libraries_decoupled

it gets a target and list of libraries and makes sure debug builds are
using libraries with "_d" suffix.

After all this changes it'll hopefully be easier to interchange patches
between blender and standalone repositories, because they're now quite
identical.
2015-01-01 01:31:08 +05:00
b8fc4fe5aa Cycles: Correction to previous SSE/AVX flags detection
Ensure AVX/AVX2 is not used when Cycles is configured with
WITH_CPU_SSE set to OFF.
2015-01-01 01:31:08 +05:00
93ca68b50c Cycles: Be ready for gflags namespace auto-detect
This way it is now possible to use gflags >= 2.1, where all the
functions were moved from google to gflags namespace.

This isn't currently used in blender, but for standalone repository
this change is essential.
2015-01-01 01:31:08 +05:00
405c0fddb4 CMake: Rework linking strategy a bit
Made it a dedicated macro to link release/debug targets against lib/lib_d
libraries which helps keeping code a bit more clean.

Also made it so MSVC is now happy about building debug Cycles with OSL
support.

Reshuffled code a bit and put some comments about what's going on, which
should make it a bit more clear.
2015-01-01 01:31:08 +05:00
2382c8decd Cycles: Fix compilation error with compilers which doesn't support AVX
For SSE checks still could be decoupled to be able to compile SSE2
kernel and not SSE4 depending on the CPU or so.
2015-01-01 01:31:08 +05:00
3b6b32d6a3 Cycles FTBFS: Send Boost after OIIO to the linker since the order matters 2015-01-01 01:31:08 +05:00
9b8942ac71 Cycles Standalone: Add initial support for compilation on Windows
This applies to an application comiling from the standalone Cycles repository
only.

There's still lack of proper install target, so currently pthreads
library is to be copied next to cycles.exe manually.
2015-01-01 01:31:08 +05:00
9e2e408323 Cycles: Add logging to OSL and CUDA initialization/compilation
This is what was handy troubleshooting issues in the studio,
plus this is exactly the same thing which would be helpful
when solving issues with paths to compiled shaders and cubins
for standalone repository.
2015-01-01 01:31:08 +05:00
bbf12722ed Cycles: Fully support WITH_CYCLES_LOGGING option
This commit generalizes logging module a little bit in making it possible to use
Glog logging in standalone Cycles repository.
2015-01-01 01:31:07 +05:00
f2665d52e2 CMake: Minor cleanup 2015-01-01 01:31:07 +05:00
e0a809fb1d Cycles: Fix compilation error when OIIO is compiled with external PugiXML parser
Basic idea is to check whether OIIO is compiled with embedded PugiXML parser
and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library.
2015-01-01 01:31:07 +05:00
a4c3ca8671 CMake: use pthreads on all os's 2015-01-01 01:31:07 +05:00
b6c175b27a Cycles: Solve linking error caused by missing pthreads library
Not sure why it worked on Debian but didn't work on Arch, could have
been some indirect link dependency or so.

Anyway, we explicitly depends on pthreads, so need to do corresponding
find_package().
2015-01-01 01:31:07 +05:00
4497b6ac84 Cycles: Synchronize changes with standalone repository
This changes were done in original commit of the standalone Cycles repository
and needed here for easier patch synchronization.
2015-01-01 01:31:07 +05:00
7f356c20dc Modify shader for texture coordinates of objects to also match the
rendered result more closely (all three parameters should match now)
2014-12-31 15:48:16 +01:00
59742167ce Just another attempt to make MSVC happy
No idea why standalone libmv remo was all fine with the code..
2014-12-31 19:04:29 +05:00
f31f28c3f4 Corrections to world texture coordinates to match the rendered result
more closely
2014-12-31 15:00:18 +01:00
Dotsnov Valentin
01c187fb93 Gamma node support for Blender Internal
Patch by Blend4Web Team, thanks!

Reviewers: psy-fi

Subscribers: yurikovelenov, AlexKowel, Evgeny_Rodygin

Differential Revision: https://developer.blender.org/D899
2014-12-31 13:36:14 +01:00
a3e832e68b Fix T42984 detail flood fill not respecting mask values for smooth/sharp
curves.

Issue here is that brush curve could return negative values. This would
result in overflow of mask values. Those were not visible during real
time preview because result would be clamped.

We had two functions in the code, one of which allowed negatives but I
don't think that we really want that, users have no control over the
negative values at all anyway.

Thanks to the reporter, Leon Cheung for figuring out the issue :)
2014-12-31 13:11:54 +01:00
bca434de78 Hopefully fix compilation error after recent update 2014-12-31 16:42:40 +05:00
caa2306d16 Libmv: Update to latest upstream version
Main purpose of this is to bring new gflags library which is more likely
to have a fix for undefined order of static variables initialization and
also to bring new glog where some compilation error are fixed (which are
only visible with more strict checks with clang and c++11 enabled).
2014-12-31 16:02:04 +05:00
784517dfb9 Joystick: Suppress add/remove device events
Previously they'll be printed to the console as a totally unknown events
together claim this shouldn't have happened which is just misleading.
2014-12-31 14:56:42 +05:00
f3e7369d48 Compilation error fix for strict flags 2014-12-31 14:50:27 +05:00
f80eb37e21 Remove executable flag from the build configuration files
They're not intended to be executed directly and seems mode change happened
by accident.

Setting -x for this files to avoid possible incidents by trying to run this
files in shell.
2014-12-31 14:05:53 +05:00
d5f3aee41f Operator to duplicate the active Grease Pencil layer
TODO: this needs a proper "duplicate" icon, without the "ID" label
2014-12-31 14:20:44 +13:00
70b6c82fd3 Fix an odd line that slipped in my ghost_hack_first_file commit 2014-12-30 18:31:37 +01:00
9e950ea661 Fix issue in separate rake control commit:
Mask slot still depended on regular slot to check some capabilities.
Some angle capabilities now only depend on the texture slot, not the
brush, so separate them and use the slot where appropriate.
2014-12-30 18:07:12 +01:00
016bbc8793 Fix T42780: Object linking allows to have linked armatures in pose mode
This isn't so bad for until one goes re-posing the armature and then uses undo.

It is the same issue as with edit mode which was solved back in the days.
2014-12-30 21:33:15 +05:00
cefb764269 PyAPI: geometry.normal, support polygons
Previously this only supported tri/quads,
now arbitrary size poly lines are supported.
2014-12-30 22:49:52 +11:00
68600920ce PyAPI: allow non-vector args for geometry module
Previously only vector args were accepted,
now allow generic sequence of numbers.

Was annoying to create vectors just to pass in args.
2014-12-30 22:05:34 +11:00
d993bad5e7 Fix possible NULL pointer dereference
also remove redundant NULL check
2014-12-30 08:13:15 +11:00
4748e34642 I18n scripts: minor spelling exceptions update. 2014-12-29 21:55:51 +01:00
7778f0ff20 Cycles: Fix MSVC which desn't like condition to be split by preprocessor 2014-12-29 21:10:37 +05:00
fb7ff31315 Fix stupid handling of 'Object.matrix_local' in RNA.
The getter of this matrix (actually, `BKE_object_matrix_local_get()`) was only correct
in case of pure-object parenting, bone parenting and such did not gave valid results.

Also cleaned up a bit setter code, was using as temp storage ob->obmat itself,
which is supposed to be a world matrix!

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D958
2014-12-29 15:26:38 +01:00
c5927cd977 Revert "Fix T42888: Separate and Combine HSV distorts the hue value"
This reverts commit 1549fea999.

After some further discussion with other developers in the team it becomes
clear there's no correct solution here. It is just more matter of what's
more convenient in particular case.

We're just going back to old code to avoid possible frustration with the
older files in newer blenders. This also means all HSV/HSL is considered
to be "linear" in the shading nodes.

Would be ported to 2.73 final.
2014-12-29 18:14:08 +05:00
f392f56397 Small fix for QTCreator project script, by Sybren Stüvel.
Either ./blender-git or ~/blender-git should be used, but not
.~/blender-git. This patch fixes that, by choosing ~/blender-git,
in line with the last CLI argument.
2014-12-29 13:45:05 +01:00
18854a6506 Rotate around selection now will work on last stroke position in texture
paint too.
2014-12-29 12:35:03 +01:00
51a66a5a6e fix for doc generator 2014-12-29 22:16:44 +11:00
427fbc879e Move average stroke from sculpt session to unified paint settings so it
can be reused by other paint systems too.
2014-12-29 11:35:43 +01:00
e0cb67f740 CMake: Add check for whether OIIO has bundled pugixml library
Will become handy when we'll be re-integrating changes from Cycles standalone
repository back to blender.
2014-12-29 15:08:16 +05:00
936604e801 Cleanup: get rid of sculpt minmax and reuse last stroke function (code
did that anyway, just kept the result in an intermediate variable)
2014-12-29 11:01:10 +01:00
4088fad6dd Cycles: Add asserts around BVH stack pushes
This way we're kind of safer to troubleshoot possible stack overflow issues.
2014-12-29 14:02:15 +05:00
40517283ca Cycles: Bump stack size for QBVH traversal code
Traversal now can push up to 2x of nodes to the stack, so need some tweaks
to the stack size.
2014-12-29 13:37:18 +05:00
9c4aba11c9 Cycles: Add some sanity check asserts in the traversal code
This way we'll be sure (in debug builds) that regular BVH traversal is not used
for QBVH tree (could happen because of mismatch of logic in kernel and render).
2014-12-29 13:35:31 +05:00
0a76be81b7 cleanup: redundant call to BKE_object_apply_mat4 2014-12-29 19:34:40 +11:00
ba9453f46f Cycles: Disable QBVH on 32bit systems all together
The reason for this is that we don't sue SSE optimization for 32bit platforms
because of T36316.

Things to look into:

- Nail the root of the issue of that report
- Implement non-SSE traversal code for QBVH
2014-12-29 13:23:44 +05:00
c79c48cc93 Fix T40930: Add a new option to select faces by smooth/flat shading.
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).

Reviewers: cambellbarton, mont29

Subscribers: mont29, campbellbarton

Maniphest Tasks: T40930

Differential Revision: https://developer.blender.org/D638
2014-12-28 19:08:43 +01:00
58ea1639da Cleanup: no need for hacks here, RNA allows for real read-only props, and if you define
a getter func, it won't rely on any DNA member either...
2014-12-28 18:30:33 +01:00
870941c87a Fix leak in cycles-bake 2014-12-28 16:00:08 +11:00
cadcb12292 Fix leak in select-similar regions 2014-12-28 16:00:08 +11:00
9686d3005c Fix buffer overrun calculating unique names 2014-12-28 16:00:08 +11:00
00197a668b BLI_string_utf8: add BLI_strncpy_utf8_rlen 2014-12-28 16:00:08 +11:00
e182d43d3e cleanup: avoid ref-counting None for a new matrix 2014-12-28 15:13:01 +11:00
b11a2f7075 Cycles: Mark visibility TODO as resolved 2014-12-27 23:38:29 +05:00
91bbaaa271 Cycles: Fix visibility check for instanced nodes
The issue is that only instance node contains proper visibility flags,
nodes from instanced BVH are not correct.
2014-12-27 23:33:50 +05:00
2b226d9578 Fix a very stupid memleak in own bpy_app_translations.c code...
Safe for 2.73.
2014-12-27 17:24:39 +01:00
155bb058f4 GPencil UI: Color swatches for both Stroke and Fill colors are now shown
The layers list and the Dopesheet channels now show color swatches for both the
stroke and fill colours now. This is useful when you've got layers that only
use either/or.

* Currently, these only get shown if the relevant opacity setting is high enough
  for that aspect to contribute to the result.

* The sizing of these items could do with some more tweaking (especially in the
  Dopesheet), as these may now be too small to accurately see and/or interact with.

* There are some potential issues when using near-gray (or actually, colours similar
  to the list backgrounds, but that issue exists in other areas of Blender anyway.


(NOTE: At this stage, these changes are still experimental, and not for 2.73 yet)
2014-12-28 03:05:11 +13:00
4ab5883766 Experimental fix for "random large dots" bug when using a stylus
Since I don't have a (pressure sensitive) tablet handy, I can't really test this
out, but apparently there is a bug which currently exists with the following description:
  "Small Dots, when you do just one click a single GP dot is created, it´s fine but don't recognize the pen pressure, always the maximum value of thickness, and
    It´s so easy create dots accidentally (even when you use the eraser, this dots appear spontaneously) and you start to have big screen-size-constant dots beside of you fine lines."

This commit just shuffles around the order of things a bit so that some of the misfiring
events might get skipped instead.
2014-12-28 03:05:10 +13:00
49052c61f8 Restoring all the whitespace! 2014-12-28 03:05:09 +13:00
01c04333f5 Fix T43034: beautify-fill leaves zero area tri's 2014-12-27 16:47:42 +11:00
8d7b2d69cf cleanup: redundant tri-normal calculation 2014-12-27 16:36:31 +11:00
5ea243bbec cleanup: knife tools, use generic sort function 2014-12-27 12:37:11 +11:00
b6aa936a8b Fix typo in angle commit, noticed by Kevin Dietrich, thanks! 2014-12-27 00:10:53 +01:00
eb2e4577f4 Only add a fill brush to default .blend if there isn't one already. For
some reason this happened twice here.

Likely candidate for 2.73 final
2014-12-27 00:08:58 +01:00
c7c10e5e28 Brush Texture Angle Goodies:
This commit includes a few things:

* It moves the Rake and Random flags from the brush to the MTex.
* The first change allows mask textures to have independent rake
support.
* Random rotation now has an angle value that controls the width of the
effect from the rake or default angle
* Rake and Random are now supported together.
2014-12-26 23:51:27 +01:00
e0cf86a9e2 Fix T43010 regression in material setting.
Caused by own fix for another display case.

Shoud be safe for 2.73 final.
2014-12-26 20:06:56 +01:00
julianeisel
fd47202043 GPencil: Picky whitespace cleanup 2014-12-26 20:00:52 +01:00
3253ed9e26 Put editor initialization before python.
Initially it was moved to allow setting keymaps of python defined menus
in C but looks like it breaks macro definition in python.

Thanks to Julian for tracking this down. It should fix T42485
2014-12-26 19:14:01 +01:00
julianeisel
6339ba1ee2 Fix T42977: Weights failed to display in Wireframe mode when using Face Select
D948, reviewed by @mont29 (thanks for that)
2014-12-26 16:53:40 +01:00
julianeisel
da78d2d742 GPencil: Use a different brush cursor for eraser
D783 with minor edits to increase contrast
2014-12-26 16:38:51 +01:00
cf178f71ac Fix T42641, Graphical fragments showing on Blender 2.71 and higher when baking.
Safe for 2.73...

This revert rB9b0ab890676790bb1e8e77797629b889ea66f69e - needed to set that threshold to a small
negative value to remove the last artefacts reported in T39735, but now I could not reproduce
any with the previous 0.0f value, so restoring it for the time being.

If this 'shadowed neighbor face' case re-appears, we can always choose a value in-between, like -1e-18f...
2014-12-26 13:00:36 +01:00
2b595579e3 Fix T43013: Flip with bridge aligned loops 2014-12-26 20:22:21 +11:00
836ea4b70f Fix T43019: Child of objectes used by duplis are visible in Cycles
Seems the parent check didn't go deep enough and only checked single parent.
Now it checks the chain of parents which seems to be correct but requires
much more intense testing.
2014-12-26 13:36:45 +05:00
53ec177b7f optimize interp_weights_poly_v2, v3
use line_point_factor instead of length between vertices.
2014-12-26 08:46:48 +11:00
f84defa9c0 optimize interp_weights_poly_v2, v3
halve sqrtf calls per per polygon corner.
2014-12-26 08:46:48 +11:00
445e50fd1e cleanup: use cross_tri_v2 when area isn't needed. 2014-12-26 08:46:48 +11:00
cd095aae13 Cycles: Distance optimization for QBVH
This commit implements heuristic which allows to skip nodes pushed to the stack
from intersection if distance to them is larger than the distance to the current
intersection.

This should solve speed regression which i didn't notice in the original QBVH
commit (which could have because i had WIP version of this patch applied in my
local branch).

From quick tests speed seems to be much closer to what is was with regular BVH.

There's still some possible code cleanup, but they'll need a bit of assembly
code check and now i want to make it so artists can happily use Cycles over the
holidays.
2014-12-25 22:40:02 +05:00
30e3aa1561 SCons: Don't regenerate icons if not changes
This is rather a handbook example how NOT to do things in SCons, ideally
it should be official SCons target so all the dependencies and source file
modification stops being our worry. Especially since for CMake we already
do have an app to do generate all the data.

I don't have time to clean this up now but this constant icons regeneration
just pisses me off atm.
2014-12-25 19:17:30 +05:00
c1f54bcdcc OSX: revive GHOST_HACK_getFirstFile cause it breaks things on older OSX versions.
Dunno exactly why this was done earlier, but propose not to remove code not understood.
2014-12-25 15:12:56 +01:00
3e034831de Refactor 'immediate search' feature
Currently, code just checks whether a text-edited button uses a given icon (VIEWZOOM) to decide to apply changes on each typed char.

This patch adds a propper button flag (UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA flag (PROP_TEXTEDIT_UPDATE) for that.
It's also now usable not only for text buttons, but also for example for num buttons when in 'text edit' mode, etc.

It also fixes an actual bug, which is for text properties, in 'immediate' mode, hitting escape would not restore org value, because `ui_apply_but_TEX()` would set its orgstr to NULL on first call (giving it to `but->rename_orig` instead of copying it).

Note no change in behavior is expected from user POV.
Update for addons using that 'VIEWZOOM' icon 'feature' will follow (if any).

Reviewers: campbellbarton

Reviewed By: campbellbarton

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D938
2014-12-25 12:55:29 +01:00
5f3dc592c8 Revert QBVH switch, after discussion with Sergey. 2014-12-25 12:18:51 +01:00
7bb29c5528 Fix T42938: image.save_render sometimes saved the wrong pass
Stupid mistake with non0initialized image user.

Safe for final 2.73 release branch.
2014-12-25 15:45:22 +05:00
9e57babd8d Cycles: Fix really bad bug with shadow rays on non-SSE CPUs
basically shadow rays were totally broken and most of the time did not record
any intersections, leading to really ad rendering artifacts.

This commit makes it so regardless of enabled optimization level render result
would be the same.
2014-12-25 14:30:05 +05:00
fe06ec82a9 Cycles: Workaround CUDA 6.5.16 error after watertight commit
This issue doesn't happen with 6.5.12 and there's slight piece of hope it'll be
fixed in next toolkit releases..

For now we're forcing CUDA to not inline ray precalculation. This could lead to
some speed regression, but wouldn't expect it to be huge -- this code does not
run that often comparing to actual triangle intersection.
2014-12-25 14:15:37 +05:00
010f3ee438 Cycles: Fix compilation error on non-SSE2 architectures 2014-12-25 14:11:37 +05:00
ee36e75b85 Cleanup: Fix Cycles Apache header.
This was already mixed a bit, but the dot belongs there.
2014-12-25 02:50:24 +01:00
4ab821c675 Cleanup: Typo fixes for comments. 2014-12-25 02:42:06 +01:00
6e7c2d2e43 Cycles: Expose QBVH on/off switch to the UI.
We might remove this again in the future, but for testing purposes
during the release cycle, this will be useful.

The setting defaults to QBVH, and can be found in the Performance panel.
2014-12-25 02:19:14 +01:00
deb06c457d Cycles: Correction for node tail copy on packing BVH
This is harmless for now because tail of the node is zero in there, but better
to fix it early so in the case of extending BVH nodes this code doesn't give
issues.
2014-12-25 02:50:49 +05:00
0feba652f7 Cycles: Enable QBVH optimization structure for SSE2 CPUs
This commit enables QBVH optimization structure automatically if rendering
with CPU and SSE2 support is detected.

This brings render time of agent shot back to the speed it used to be before
the watertight intersections commit, single koro and sponza scenes are about
7% faster here.
2014-12-25 02:50:49 +05:00
03f28553ff Cycles: Implement QBVH tree traversal
This commit implements traversal for QBVH tree, which is based on the old loop
code for traversal itself and Embree for node intersection.

This commit also does some changes to the loop inspired by Embree:

- Visibility flags are only checked for primitives.

  Doing visibility check for every node cost quite reasonable amount of time
  and in most cases those checks are true-positive.

  Other idea here would be to do visibility checks for leaf nodes only, but
  this would need to be investigated further.

- For minimum hair width we extend all the nodes' bounding boxes.

  Again doing curve visibility check is quite costly for each of the nodes and
  those checks returns truth for most of the hierarchy anyway.

There are number of possible optimization still, but current state is good
enough in terms it makes rendering faster a little bit after recent watertight
commit.

Currently QBVH is only implemented for CPU with SSE2 support at least. All
other devices would need to be supported later (if that'd make sense from
performance point of view).

The code is enabled for compilation in kernel. but blender wouldn't use it
still.
2014-12-25 02:50:49 +05:00
788fb8321a Cycles: Store proper empty boundbox for missing child nodes in QBVH
The idea is to make sure those childs would never be intersected with a ray
in order to make it so kernel never worries about number of child nodes.
2014-12-25 02:50:49 +05:00
30b12b1b27 Cycles: Code cleanup, de-duplicate definition of FEATURE
Previously every BVH traversal file was defining macro to check which features
should be compiled in, now this macro is defined in the parent header.
2014-12-25 02:50:49 +05:00
0476e2c87a Cycles: Rework BVH functions calls a little bit
Basic idea is to allow multiple implementation per feature-set, meaning this
commit tries to make it easier to hook new algorithms for BVH traversal.
2014-12-25 02:50:49 +05:00
ab8d9c4b88 Cycles: Add some utility functions and structures
Most of them are not currently used but are essential for the further work.

- CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i

- Added templatedversions of min4, max4 which are handy to use with register
  variables.

- Added util_swap function which gets arguments by pointers.
  So hopefully it'll be a portable version of std::swap.
2014-12-25 02:50:49 +05:00
f770bc4757 Cycles: Implement watertight ray/triangle intersection
Using this paper: Sven Woop, Watertight Ray/Triangle Intersection

  http://jcgt.org/published/0002/01/05/paper.pdf

This change is expected to address quite reasonable amount of reports from the
bug tracker, plus it might help reducing the noise in some scenes.

Unfortunately, it's currently about 7% slower than the previous solution with
pre-computed triangle plane equations, but maybe with some smart tweaks to the
code (tests reshuffle, using SIMD in a nice way or so) we can avoid the speed
regression.

But perhaps smartest thing to do here would be to change single triangle / ray
intersection with multiple triangles / ray intersections. That's how Embree does
this and it's watertight single ray intersection is not any faster that this.

Currently only triangle intersection is modified accordingly to the paper, in
the future we would also want to modify the node / ray intersection.

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D819
2014-12-25 02:50:49 +05:00
57d235d9f4 Cycles: Optimize storage of QBVH node by one float4
The idea is to store visibility flags for leaf nodes only since visibility check
for inner nodes costs too much for QBVH hence it is not optimal to perform.

Leaf QBVH nodes have plenty of space to store all sort of flags, so we can make
nodes one element smaller, saving noticeable amount of memory.
2014-12-25 02:50:49 +05:00
a888b8beaf Cycles; Code cleanup, make it more obvious what #endif belongs to 2014-12-25 02:50:49 +05:00
144096faad Cycles: Make it more clear offsets in BVH construction
Previously offsets were calculated based on the BVH node size,
which is wrong and real PITA in cases when some extra data is
to be added into (or removed from) the node.

Now use offsets which are not calculated form the node size.
2014-12-25 02:50:49 +05:00
f27d87d300 Cycles: Replace magic constant in the code with actual node size 2014-12-25 02:50:49 +05:00
f4a959f734 Cycles: Avoid over-allocation in packing BVH instances
This solves quite an over-allocation in BVH instances packing code,
unfortunately, it's not a magic bullet to solve memory bump caused
by the recent QBVH changes.

For that we'll likely need to decouple storage for leaf and inner
nodes. However, it's not really clear for now if it's something
important since that'd still be just a fraction of memory comparing
to all the hi-res textures.
2014-12-25 02:50:49 +05:00
8cfac731a5 Cycles: Implement refit_nodes for QBVH
Title says it all, quite straightforward implementation.

Would only mention that there's a bit of code duplication around packing node
into pack.nodes. Trying to de-duplicate it ends up in quite hairy code (like
functions with loads of arguments some of which could be NULL in certain
circumstances etc..). Leaving solving this duplication for later.
2014-12-25 02:50:49 +05:00
fe4905288d Cycles: Use proper node counter to allocate QBVH nodes
Before all the nodes were counted and allocated, leading to situations when
bunch of allocated memory is not used because reasonable amount of nodes are
simply ignored.
2014-12-25 02:50:49 +05:00
345ed4dd10 Cycles: Don't do node visibility check in subsurface and volume traversal
Visibility flags are set to all visibility anyway, So there was no reason
to perform that test.

TODO: We need to investigate if having primitive intersection functions
which doesn't do visibility check gives any speedup here as well.
2014-12-25 02:50:49 +05:00
f4df3ec05a Cycles: Move triangle intersection functions into own file
This way extending intersection routines with some pre-calculation step wouldn't
explode the single file size, hopefully keeping them all in a nice maintainable
state.
2014-12-25 02:50:48 +05:00
43421e9c53 Cycles: Optimize vector math node without links to single values. 2014-12-24 22:45:08 +01:00
julianeisel
76b4fad6db Fix T42879: File Browser - disable selecting ".." entry (Parent Directory) 2014-12-24 19:51:42 +01:00
julianeisel
703bb0f62d Ref T42873: Print "Camera Pano" for panoramic camera view onto viewport 2014-12-24 19:35:12 +01:00
9d230298f1 Master branch is now alpha cycle of 2.74 release 2014-12-24 20:33:14 +05:00
607c45ae6b Fix T42997: Support RGBA output for HuffYUV
More like a feature request but was simple to support.
2014-12-24 18:54:38 +05:00
0fcf9b2672 Fix rna paint update callbacks assuming meshes 2014-12-24 14:51:35 +11:00
273fa0a4ef Blender 2.73 release candidate commit
This commit contains:

- Subversion bump to 2.73
- Release cycle is set to "rc"
- Submodules are pointed to appropriate tag now
  (addons contrib just points to the latest contrib repo)
- New shiny splash screen!
2014-12-23 20:42:01 +05:00
e483a21ce6 Fix T42994: Own recent regression in fix for T42945 (rB5cc199e49581),
side/front/top ortho views would no more adapt their snapping unit to zoom factor.

This code would need slightly more refactor actually, but this will be for after release!
2014-12-23 16:12:17 +01:00
20aed660f5 Add missing keymap for paint curve 2014-12-23 20:01:47 +11:00
35f153cdc3 Fix T42928: Drag-drop of generated files to compo reloads them, loosing edits
Origins of this issue goes back to T33402, where compo wasn't sure what kind
of image it is working with (compo should know if it's multilayer or regular
image).

Now we only reload images when dar-dropping from outside of blender.
2014-12-23 10:56:30 +05:00
646a96bf8e Fix T42952: Curve modifier not taken into account when curve is created from mesh
Curve and array modifiers requires curve path to be evaluated, dependency graph
will make sure that curve eval would create such a path, but if curve was already
evaluated we might miss path.

So what we do now is: if path was not calculated for target curve we tag it for
update.
2014-12-22 19:05:56 +05:00
f78490182e partial revert ab6417aa9f was too strict 2014-12-22 13:26:35 +01:00
abf39fa31f Quick fix for UI themes, by meta-androcto (Brendon Murphy), thanks. 2014-12-22 09:57:56 +01:00
cd4fedb285 Fix T42966: Py_Initialize: Unable to get the locale encoding
This only happened for SCons builds and caused by pure human stupidnes.
2014-12-22 13:43:23 +05:00
julianeisel
59a0c11ecc GPencil: Correction to rB071ec918f4cd
* correct API convention: in rB071ec918f4cd gp_draw_data drew mulitple data blocks, I added gp_draw_data_all which now calles gp_draw_data multiple times (if needed). This follows our normal convention, e.g. see UI_panel_category_draw_all
* Draw scene data first, users may expect it like this

Points raised by @aligorith, thanks for this!
2014-12-21 15:48:30 +01:00
1fe7b84c73 Fix T42973: Render viewport not updating when switching materials in Outliner
For now, do as RNA material update functions - tag object for update too.
2014-12-21 12:40:02 +01:00
julianeisel
071ec918f4 Fix T42961: GPencil - Refactor object/scene data behaviour
D937 with minor edits (whitespace only)

@aligorith, I double checked everything runs smoothly, blame me if I missed something ;). Sorry for just taking the initiative and committing without talking to you, but I wasn't able to catch you the last days. This should be fixed before the release IMHO, but I don't think it's important enough to be committed during BCon5, so sorry again, but hopefully everything is okay :)
2014-12-20 16:18:18 +01:00
c2e56a5267 RNA Object.matrix_local: Add a big warning this matrix is only relative to parent object.
So 'advanced' parenting like e.g. bones or vertices need further processing
to get a real parent-relative matrix...
2014-12-20 14:16:06 +01:00
296a92f5f3 Fix T42972: fcurve lasso select crash 2014-12-20 13:48:36 +01:00
93c4ba7b70 Force phony targets to build (even if file exists)
This is a convenience makefile only,
files if they exist by accident shouldn't ever be used.
2014-12-20 02:15:14 +01:00
7a04c7f6d0 Ensure no integer overflow happens in SuperLU solver on memory allocation
x
2014-12-20 00:23:42 +05:00
3b639b8b3d Minor cleanup to previous commit 2014-12-19 14:43:29 +01:00
3e0ff35b4b Fix for bad file name string matching in point caches, leading to
deletion of baked caches.

This happens when objects use file names with matching prefixes:

"CubeX"   -> not baked
"CubeXYZ" -> baked

The first objects cache should be discarded up to the current frame on
file load, but the second should be left intact. But because the cache
file names for both use the same prefix as well (based on hex name
representation) they both match the "CubeX" name and get discarded.
Adding the underscore terminator solves this issue, because it is never
part of the hex file name string.

WARNING: this solution does not work with custom names for point caches.
This feature is pretty much broken, users have to ensure their names
are unique themselves. Due to the possibility of underscores in names
and the ambiguity of point cache suffixes there is no reliable way to
encode filenames in that case.
2014-12-19 13:34:50 +01:00
ef5c036d1c Fix T42543 projection painting fails when faces are perpendicular to screen.
This is UV barycentric interpolation failing for triangles where vertices are
colinear in screen space. To fix this, we detect this early on so we do the
interpolation on edges instead of triangles.

Such triangles will never be painted on unless we have occlusion and culling
off (since, arguably they are self occluded and almost back-facing).

The code still does not fill the whole area but this can be checked separately.
2014-12-19 12:27:29 +01:00
76ccc1d26b Fix reversed args in function call (float, bool vs. bool, float).
Note 'same' values are kept for now, even though it was probably meant the
other way around, it's safer to keep current behavior for now.
2014-12-19 10:15:10 +01:00
5cc199e495 Fix T42945: rv3d->gridview was not set correctly in view3d_draw_objects.
This fixes both transform snapping in persp views, and 'snap cursor to grid' feature.

Was only really visible with Imperial units.
2014-12-19 10:09:17 +01:00
5e67779d80 Code cleanup: include directory for scons
This directory does not exist even.
2014-12-19 13:43:52 +05:00
27b58f0eb2 Fix mathutils docstring typos. 2014-12-19 00:43:41 +09:00
de0b9f34d7 Flood fill in projection painting does not do bounds checking anymore.
It should now fill the whole mesh with color even if parts of it are
outside the screen - still need to be in fron of the camera though.

Thanks @Campbell for the trick :)
2014-12-18 16:28:43 +01:00
85f6fc501c Fix T42943: Crash with multiple calls to rna_info.BuildRNAInfo()
Thanks to @nesse for the fix
2014-12-18 14:31:33 +01:00
f0f1c7995b PyAPI: disallow assigning members to 'bpy.ops' 2014-12-18 13:52:31 +01:00
9f61350a05 Sequener: Move waveform-draw option into view menu
also simplify preview/sequencer checks
2014-12-18 13:47:40 +01:00
d4aaa4f9b6 cleanup: use const for smallhash & minor edits 2014-12-18 13:12:25 +01:00
c1eec5582a Fix/workaround T42944: Crash adding a shortcut in properties space 2014-12-18 12:49:48 +01:00
8627d65951 Correction to previous render border commit
Was using wrong bitfield check.
2014-12-18 14:43:08 +05:00
20006e4a67 Cycles: Do some logging when motion is detected in the scene 2014-12-18 14:40:14 +05:00
2bdd44c87a Correction to set border from render image view
It did not fully support cases when setting border from a cropped render result
and it's not totally clear how it should behave. So for now just do nothing and
inform users about this.
2014-12-18 13:24:21 +05:00
0c5eb88451 Quiet warning (harmless) 2014-12-18 02:15:42 +01:00
0ae4d7d405 Fix for GPU_materials_free accessing NULL pointer 2014-12-18 02:14:51 +01:00
3da1a75b74 correct recent cleanup for id-property types 2014-12-18 02:06:57 +01:00
b3b9e08423 Sequencer: Select sideof failed for strips touching the playhead 2014-12-17 23:11:41 +01:00
3820d44979 Cycles: Add missing entries in the Integrator constructor and some updates
to the XML API.

(Changes from the standalone repo)
2014-12-17 22:28:33 +01:00
cd4d5dcb46 Fix T42932: Drag&Drop of groups from the outliner was using undefined
event->mval.

Calculating from event->x/y like object drag/drop does works. Also fixed
a missing notifier of the object instancing operator.
2014-12-17 13:50:31 +01:00
a56e31c89c Fix triangulating concave quads
Resulting triangles could be pointing in opposing directions.
2014-12-17 11:34:16 +01:00
dc2617130b Fix: Never write previews for undo steps.
This may eat quite q bit of mem in the end (though nothing critical),
and icons (material ones e.g.) often ended up out of sync after undo.
2014-12-17 10:23:34 +01:00
b04d2f99f2 Fix T42927: Triangulate-beauty fails on quads
Regressions since 2.69.
2014-12-17 10:09:47 +01:00
15bde0dbea Docs: comments (hash table & beauty fill) 2014-12-17 09:58:23 +01:00
3e61478b1b Fix T42917 shadow maps not working on ATIs.
This is yet another issue with framebuffers. There are two issues: We
need the framebuffer fully bound to check for completeness and when we
bind a depth texture as frame buffer we need to disable read/write.
2014-12-16 21:52:55 +01:00
1b2fc74792 Fix typo in VBO 2014-12-16 20:20:41 +01:00
72330b97a2 Fix nasty typo in CPP RNA that would break on int or bool dynarrays... 2014-12-16 16:57:41 +01:00
1549fea999 Fix T42888: Separate and Combine HSV distorts the hue value
These nodes were assuming sRGB input/output which is for sure wrong for the
shader pipeline which works in the linear space.

So now conversion to/from linear space happens in these nodes which makes them
making sence in the shader context but which might change look and feel of
existing scenes.
2014-12-16 20:06:25 +05:00
137f557246 Remove NULL checking variable after using it. 2014-12-16 12:09:33 +01:00
72341537e8 Fix T42864: Knife-project fails with 'cut-through'
Removing edge-hit-doubles could incorrectly de-duplicate intersections between different edges.

Gave noticeable errors cutting through geometry that overlapped exactly.
2014-12-15 21:17:10 +01:00
76f50cd17a Fix for clip proxies builder reloading original footage frames
This isn't needed if the source is the image sequence.
2014-12-15 22:20:06 +05:00
f51b583ea0 Improve tip for simple deform origin 2014-12-15 16:10:17 +01:00
db0e2e7347 Fix T42864 (partial): knife-project included uncut backfaces
When knife-project ran with cut-through disabled,
it would still try to select faces behind the cut.

Now check if the faces are obscured.
2014-12-15 15:10:49 +01:00
2329b58fd3 Fix T42864 (partial): Knife-project had too-low precision 2014-12-15 15:10:49 +01:00
090ab750b3 Fix missing UI ID messages and/or I18N contexts for MovieClip/Mask/Palette/PaintCurve ID types. 2014-12-15 11:53:35 +01:00
c167ac1556 Tracking: Fix wrong logic in tracks synchronization
There was some stupidness in the way how tracks are synchronized from the job
to actual DNA data leading to all sort of weird and wonderful failures again.
2014-12-15 14:39:59 +05:00
06ea819c0d Tracking: Avoid possible treading issue reading the frame to sync 2014-12-15 14:34:47 +05:00
ca25fe98fc Tracking: Fix possible race condition accessing the tracks
Writing to the tracks was already inside the lock section, but
reading was not. This could have lead to race condition leading
to all sorts of weird and wonderful artifacts.
2014-12-15 14:31:19 +05:00
Severin
ae6f62c4e2 IME fix: Quit two assert failures
We could now also remove the win->ime_data assert in wm_window_IME_end,
but think it's better to leave it for further development.
2014-12-14 18:51:14 +01:00
c1d3532d2c Fix for idproperty comparison
comparing arrays had flipped logic
2014-12-14 18:24:13 +01:00
17253bec06 Fix T42892: UV pixel snap with negative values 2014-12-14 12:36:32 +01:00
9c81833430 Fix T42885: We still had a few wrong doc in mathutils about methods returning
instance of self while actually returning None...
2014-12-13 14:07:46 +01:00
d6beaad01c Fix T42875 GLSL display not correct in vertex array mode.
GLSL used a global variable to store the enabled vertex attributes which
were not set for vertex arrays after the VBO refactor.
2014-12-12 17:59:06 +01:00
28a0e1dae5 Fix T42883: ID-Prop arrays longer than 'shot' fail 2014-12-12 16:25:32 +01:00
fbd25174d1 Amend to previous 'append warning' commit.
Actually, append/link *is* converted/updated, issue here is IPO-to-FCurves
code is not called from our do_version code, but later, directly from BKE_blender's
setup_app_data. This is bad but not easily fixed it seems, so for now
keep a warning in this case.

thanks Sergey for the headup.
2014-12-12 12:38:54 +01:00
a6343696c1 Fix T42882: Now warn user when trying to append/link from older blender files.
Since we do not make any conversion in this case, worth warning user about
potential issues!
2014-12-12 12:13:30 +01:00
cea086dd97 cleanup: disallow NULL arg to uvedit_aspect
also some typo's
2014-12-12 11:18:03 +01:00
19eb700fef Fix blenderplayer compilation (tm) 2014-12-11 20:34:53 +01:00
f1ddf99580 Fix T42859 smart UV unwrap does not support aspect correction.
Can be considered TODO but it's not bad to support either. Also added
RNA api to get aspect ratio of assigned UV image - returns aspect
corrected image dimensions so needs adjustments for uv editing.
2014-12-11 19:46:35 +01:00
2309def874 Fix crash when changing worlds with world background active.
Freeing the preview will free the original gpu material so NULL that out
on copy.
2014-12-11 14:43:15 +01:00
754bdbe4b4 Cycles: Fix more wrong usages of RNA_id_pointer_create
Title says it all, just be more careful in the future.
2014-12-11 17:11:23 +05:00
cb7cf523e5 Fix T42829: Cycles crash rendering when file is saved to specific location
The issue was caused by the way how RNA pointer was created for the bMain:
namely Cycles was using RNA_id_pointer_create to create the pointer, which
would then try to refine the poniter based on the ID type.

This is just wrong and worked so far just because of co-incident, with the
file path from the bug report first letters in the ID name happened to be
NT which corresponds to NodeTree, and for sure refining such pointer will
fail.

Simple solution -- use proper way to create RNA pointer for non-ID block.
2014-12-11 16:55:10 +05:00
1999b5a814 Fix ping-pong actions when using the Action Actuator. 2014-12-11 00:05:11 -08:00
2617d37034 Libmv: Reshuffle CMake and SCons configuration files
The main idea is to share as much code between cases when feature-full built
is done and only logging is needed, so all the defines and include directories
are guaranteed to be the same.

This would hopefully make it so MinGW compilation is all happy about Cycles
logging for both CMake and SCons.
2014-12-11 11:58:03 +05:00
julianeisel
c71c7f0e0b Correction for non-Windows SCons compiling fix after IME Merge
As discussed in rB983c71931b1886d4, we should print a warning in case of building on non-Windows and WITH_BF_IME enabled. We also terminate build in this case, so the warning isn't scrolled away. Was worked out together with @sergey.
2014-12-11 00:22:17 +01:00
1e02a5ff43 Fix for object_utils.object_data_add: Now supports None obdata for
creating empties.

The documentation says None is a valid argument for obdata (making
empties), but this would cause an exception. Now obdata is only used
when it is defined. An optional name argument can be passed to override
obdata.name as well.
2014-12-10 17:22:26 +01:00
d7e4944e5b UI: add Shift-Drag to multiselect expanded enum items too.
Differential Revision: https://developer.blender.org/D928
2014-12-10 17:04:36 +01:00
aaa02bd490 startup.blend, update movie-tracking layout T41660
Layout by @sebastian_k, now includes 3D view.
2014-12-10 16:49:00 +01:00
bce0dc8cf7 cleanup: comment unused defines 2014-12-10 15:55:40 +01:00
d9ddc99a27 Fix T42184: Normal not displayed correctly in Material Viewport
There was a differences between how Cycles and BI treats Normal shader:

- Different normal direction assumption
- Different policy about vector normalization

Previous idea of trying to use single function and flip the output if
needed becomes more tricky, so i've just added new GLSL function which
corresponds to how Cycles deals with the Normal shader.
2014-12-10 19:12:54 +05:00
d68521df7b Cycles: Fix difference between SVM and OSL implementation of Normal node
SVM was normalizing the input normal, OSL did not. This lead to render
result differences across this shading systems.
2014-12-10 19:07:50 +05:00
668ffcd6e9 Fix for wrong flip of Normal node Dot output for new shading system
It was wrong to use invert(), we need to multiply by -1 instead.
2014-12-10 18:50:30 +05:00
01bda15832 Fix T42472: Undoing/Redoing repeated transform operator gives wrong final matrix on objects with no geom data.
This hack should not be needed here, quoting Sergey, the actual issue comes from BKE_object_handle_update_ex,
which is calling BKE_object_where_is_calc_ex when it shouldn't.

Propper fix is depsgraph refactor topic, though.
2014-12-10 13:57:16 +01:00
7366283c01 Fix T42818: Cycles SSS passes are incorrect for SSS size of 0
This was caused by some internal optimization which evaluated SSS with
size of zero as BSDF but used different ID so the evaluation result
didn't appear in regular diffuse pass.

This lead to situation when SSS data was nowhere stored if the
size was zero.

Now SSS with zero size and close-to-zero sizes will be handled in the
same way from the passes point of view.
2014-12-10 17:28:44 +05:00
602250d9fe Fix T42748: Crash in subsurf, threaded access
Allocating the iterator from a BLI_memarena wasn't threadsafe.
Change the API to use stack memory for iterators.

Thanks to @mont29 for finding exact cause of the bug.
2014-12-10 11:16:42 +01:00
47788b5e68 Switch to numpy 1.9 for windows platform 2014-12-10 13:50:51 +05:00
1807dcf619 Fix numpy installation on windows+cmake
The was caused by numpy never unpackign because of no
dpependnecy of any targets from the unpacked numpy.

Tried making it so blender target dpeends on it, but for
some reason it didn't work. For now added dedicated target
for unpacked numpy. A bit dirty but much better than just
totally failing.
2014-12-10 13:45:45 +05:00
8555595d17 Fixes for compilation with msvc
MSVC doesn't like caling macro argument f when using float values
in the macro, it simply replaces the f in the float value with the
argument..

CMake compilation still fails because of 77785ce708, numpy is never
getting unpacked.
2014-12-10 13:39:24 +05:00
9783d9297c cleanup: pep8 2014-12-09 21:49:46 +01:00
117a7e3545 Sequencer: optionally show strip offsets
was disabled in recent sequencer refactor, enable with view menu option.
2014-12-09 21:42:25 +01:00
17f0a01a56 Correct last commit checking knife edges 2014-12-09 20:57:37 +01:00
e77b25fabb Cycles: Code cleanup, typo 2014-12-10 00:08:33 +05:00
6fb1e1680b Knife: cuts along existing edges are now selected
This means cuts along existing edges don't have gaps in the selection.

Fixes T42616
2014-12-09 19:51:08 +01:00
2efc3211ab Knife: rename vert & edge 'draw' to 'is_cut'
More logical for checking if the edge is a cut into the mesh.
2014-12-09 17:24:19 +01:00
4d9f2f7e86 Knife: fix edge aligned cuts, could add redundant verts 2014-12-09 17:23:10 +01:00
d5abe8419d Smallhash: add support for iterating value pointers
also add reinsert function
2014-12-09 17:18:05 +01:00
233c650d55 Gooseberry request, circle select for graph editor 2014-12-09 16:54:15 +01:00
491839b3c8 Fix T42857: Inconsistency between cache line visibility and ability to change frame from image space 2014-12-09 20:34:28 +05:00
781db5f8a6 Knife: test if an edge is on the face boundary
Was checking if an edges midpoint was inside the face,
giving random results (point-inside for an edge location).
2014-12-09 15:57:59 +01:00
171a6bb5dc Fix T42488: Knife (selected_only + occlude) failed 2014-12-09 15:51:58 +01:00
8fe336ce7e Fix T4284: Drawing modified curves crashes 2014-12-09 14:38:32 +01:00
ebee593f26 Fix bug reported by kopias on irc, crash when attempting to set canvas
with a non-mesh object selected
2014-12-09 14:36:24 +01:00
59f1585d02 Fix T42175: Modifiers don't render in sculpt mode using multires
Modifier stack should ignore sculpt restrictions when creating derived render.
2014-12-09 17:21:02 +05:00
a5c3de2e49 Fix T42630: Triangulate returns invalid face-map
Triangulate with beautify caused a bug when there were existing edges
could make the bmesh-operator return an invalid face-map.

Now the beauty is calculated on the 2d-tri's resulting from polyfill,
its simpler and faster.
2014-12-09 13:08:28 +01:00
6076bedec0 Cleanup: remove scanfill define for polyfill code
also rename vars which were previously used for scanfill.
2014-12-09 12:19:26 +01:00
83cbcefac8 Add edgehash remove, clear functions, Heap clear
Edgehash was missing removal functions (remove, popkey, clear),
since it wasn't needed so far, but is based on same code as ghash which has them.

also add heap clear() method so we can reuse heaps.

(needed for upcoming fix).
2014-12-09 00:32:20 +01:00
55812e3acd Cleanup: simplify heap popmin 2014-12-09 00:13:35 +01:00
03760fed0d Cleanup: remove unused pointer in Heap 2014-12-09 00:02:50 +01:00
ab6417aa9f Fix Mesh Objects with missing textures or wrong texture path now import without texture 2014-12-08 19:57:50 +01:00
8545fb516e Fix T42824: Proxy bone custom-shape lost on undo 2014-12-08 16:46:42 +01:00
252bfc6f65 Fix T42838: Make dupli's real use_hierarchy fails
Regression since the dupli-object refactor.
2014-12-08 16:15:53 +01:00
7b6c9d23cf Cycles: Fix compilation error with MinGW and logging enabled 2014-12-08 19:37:41 +05:00
c07f6c02b3 Docs: reference the new manual 2014-12-08 11:18:58 +01:00
3e7e97f127 BMesh: ensure iterator macros assign to valid types
note, this is for C++ code which expects a cast, (will be added later)
also add a macro for nop-expressions (EXPR_NOP),
when we never want an expression to be evaluated, but it should still be valid.
2014-12-08 10:54:56 +01:00
690345a826 Cleanup: spelling 2014-12-08 09:46:21 +01:00
7ba2b37a8a Cleanup: remove unused operator-type member 2014-12-08 09:45:47 +01:00
julianeisel
b88e700df4 Cleanup: Minor edits to widget emboss code
* Rename "emboss" to "widget_emboss"
* Remove duplicated UI_GetThemeColor4ubv function

I made sure version bump and Save User Settings are working correctly ;P
2014-12-08 00:38:36 +01:00
julianeisel
983c71931b Fix non-Windows SCons compiling error after IME merge 2014-12-07 23:57:51 +01:00
Severin
12e5a32557 Forgot to add new files in recent IME commit
Sorry, my bad :/
2014-12-07 18:23:02 +01:00
fe4d0c234e Bugfix T42774: BSurface addon doesn't work on new builds
It turns out that several important modelling addons depend on the assumption
that Grease Pencil data gets created on the active object instead of on scene
level. This commit adds a toggle for setting whether new Grease Pencil data
is created on scene or object level.

These work as follows:
* "Scene" = The behaviour originally introduced as part of the GPencil_EditStrokes
  changes. New strokes are added to the scene instead of the active object, making
  it easier to manage things when working with Grease Pencil in general.
* "Object" = The previous behaviour (from 2.50 to 2.72), where new strokes are added
  to the active object. This is now being reintroduced to soften the transition
  for addons out there which have been doing this in a lazy/lax way so far.


Now, what may be slightly confusing are the "fallback" measures in place:
* "Scene" - To ensure that loading old files goes ok without needing a version patch,
   if the active object has GPencil data, that will be used in place of the scene's
   own GPencil data.
* "Object" - If there was no active object at the time of creating strokes
  (for instance, if you delete the active object immediately before drawing),
  GPencil data gets attached to the current scene instead.

Since some tweaks may still be needed here, I've decided to bump the subversion
number so that we have a reference point when doing version patches.
2014-12-08 02:42:45 +13:00
e67fd7a2cb Correct defines for binreloc
After recent moving path functions to appdir.c

patch T42826: by ldo (Lawrence D'Oliveiro)
2014-12-07 13:53:42 +01:00
Severin
e81d077c85 Input Method Editor (IME) support for text buttons
Original patch by @random (D765) with some minor work done by @campbell
and me.

At this place, I'd like call out a number of people who were involved and
deserve a big "Thank you!":
* At the first place @randon who developed and submitted the patch
* The Blendercn community which helped a lot with testing - espacially
* @yuzukyo, @leon_cheung and @kjym3
* @campbellbarton, @mont29 and @sergey for their help and advises during
* review
* @ton who realized the importance of this early on and asked me for
* reviewing

We are still not finished, as this is only the first part of the
implementaion, but there's more to come!
2014-12-07 00:58:17 +01:00
06515475b9 CMake: remove redundant include dir 2014-12-06 13:39:46 +01:00
81ae71fcd3 Fix crash in RE_AcquiredResultGet32 on debug builds introduced yesterday 2014-12-06 12:30:59 +01:00
6e8a8a72a3 OSX: change previous commit to not only make animation-player window frontmost but whole process 2014-12-06 12:13:28 +01:00
036f4e7a38 Cleanup: style from my previous commit 2014-12-06 03:48:41 -05:00
c077f5fa08 Fix T42789: support 3Dconnexion wireless devices
SpaceMouse Wireless
SpaceMouse Pro Wireless

Device info is from user reports. I don’t yet have the new devices, so
these are untested but likely to work :D
2014-12-06 02:48:51 -05:00
c8995ecc83 Fix inbetween mousemove event getting detected in hotkey buttons. 2014-12-06 02:28:05 +01:00
871cf70144 Fix playercompile after ecc03c8ed 2014-12-05 18:51:19 +01:00
825d6adef5 OSX: make sure window of new blender instance is front when playing animation 2014-12-05 18:42:10 +01:00
0493879401 Cycles: Report error via the new engine API
This way CUDA errors are visible in the image info line,
which makes things to behave the same across viewport and
final rendering.

That's right, we've got error reported via reports and info
line now. This is based on the feedback from our gooseberry
team.
2014-12-05 22:15:09 +05:00
ecc03c8ed0 Render API: Add RenderEngine.error_set() function
This function sets an error message which would be displayed after
rendering is over and info space lost the link to the engine.
2014-12-05 22:15:05 +05:00
2b4eeb79cd Cycles: Report error to the blender using report API
This way when something goes wrong in Cycles (for example out of VRAM, timelimit
launching the kernel etc) we'll have a nice report in the Info space header.

Sure it'll be nice to have mention of error in the image editor's information
line, but that's for the future.

This fixes T42747: "CUDA error" appears only momentarily, then disappears
2014-12-05 22:15:04 +05:00
bd0b9ed0c0 Cycles: Add dedicated Progress::set_error() call
Currently it acts the same as set_cancel(), but this way we're able to
distinguish situations when rendering was aborted by user demand (for
example pressing Esc in standalone renderer) or if something went horribly
wrong (for example out of VRAM error).
2014-12-05 22:15:04 +05:00
716890e864 Cycles: Early output from Scene::device_update when device error occurs
This way for example we wouldn't wait a fortune while BVH is building after
GPU run out of memory when loading images just to see the render failure
message.
2014-12-05 22:15:04 +05:00
0b67102bd6 Cycles: Code cleanup, whitespace 2014-12-05 22:15:04 +05:00
e1e984e437 Fix T42807, variance shadow map broken afterFBO changes.
This code was a bit do-it-yourself instead of relying on the API. Should
be OK now.
2014-12-05 16:01:18 +01:00
e54d571176 Amendment to previous commit: Add an option to scene strips to disable GPencil
On second thought, it is probably still worthwhile to be able to disable GPencil
drawing on strips. By default, GPencil strokes are still shown by default now,
but they can be turned off using this option if it turns out that they are
getting in the way (e.g. a director/animator make some planning notes in the shot
at an earlier stage which are hidden for normal display now, but are still there
popping up sproadically during the animatic).
2014-12-05 16:39:49 +13:00
3673a03226 Grease Pencil sketches get included when doing OpenGL previews for scene strips in sequencer
After double checking the sequencer code, there doesn't seem to be any reason to
exclude these from the sequencer previews. This makes it possible to use the
sequencer to non-destructively chain together difference Grease Pencil animated
shots together without having to render each image sequence first, allowing for
a smoother workflow.

Just in case the initial assumption isn't entirely correct, I've put in place
an extra arg to the relevant functions which can be hooked up to a suitable
option on the scene strip later to turn this on/off as needed.
2014-12-05 15:47:23 +13:00
844909b294 Fix for typo + memory leak 2014-12-05 14:15:46 +13:00
e93990dfc5 Bugfix T42697: Hiding/unhiding NLA strip doesn't update the 3D Viewport
The Toggle Muting operator was missing code to tag the animation to get recalculated.

This was also missing from a few other operators too, including Snap, and
Add/Paste FModifiers .
2014-12-05 14:14:50 +13:00
abab4f19e6 Fix scons+mingw64 compiling - Ensure WITH_BF_CYCLES_LOGGING is defined and turned off 2014-12-05 13:13:34 +13:00
030b694c7a To make Strokes Edit Mode a bit more "solid", Tab key can be used to toggle out of it 2014-12-05 12:12:03 +13:00
d87ff752af Selectmouse-drag now works to move GPencil verts 2014-12-05 12:12:03 +13:00
cf7bdb42ac BGE VideoTexture: refresh() on ImageFFmpeg should have no effect.
ImageFFmpeg objects will not refresh properly because the image
file is closed immediately after creation. Therefore refresh()
should have no effect on them.
This was causing problems with ImageMix using ImageFFmpeg as
sources: refreshing the ImageMix object is required to update
the mix but it has the side effect of refreshing the underlying
sources, hence the need to skip refresh on fixed images.
2014-12-04 23:55:53 +01:00
2892 changed files with 216850 additions and 81580 deletions

View File

@@ -53,7 +53,9 @@ if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
endif()
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN "TRUE")
set(FIRST_RUN TRUE)
else()
set(FIRST_RUN FALSE)
endif()
# this starts out unset
@@ -71,7 +73,6 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBU
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
#-----------------------------------------------------------------------------
# Set policy
@@ -129,7 +130,7 @@ macro(option_defaults_init)
set(${_var} ON)
list(APPEND _init_vars "${_var}")
endforeach()
unset(_INC)
unset(_var)
endmacro()
# remove from namespace
@@ -157,25 +158,30 @@ option_defaults_init(
_init_SDL
_init_FFTW3
_init_GAMEENGINE
_init_OPENSUBDIV
)
# customize...
if(UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE)
# some of these libraries are problematic on Linux
# disable less important dependencies by default
set(_init_BUILDINFO OFF)
set(_init_CODEC_FFMPEG OFF)
set(_init_CYCLES_OSL OFF)
set(_init_IMAGE_OPENEXR OFF)
set(_init_IMAGE_REDCODE OFF)
set(_init_INPUT_NDOF OFF)
set(_init_JACK OFF)
set(_init_LIBMV_SCHUR_SPECIALIZATION OFF)
set(_init_OPENCOLLADA OFF)
set(_init_OPENCOLORIO OFF)
set(_init_SDL OFF)
set(_init_FFTW3 OFF)
set(_init_GAMEENGINE OFF)
set(_init_OPENSUBDIV OFF)
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_INPUT_NDOF OFF)
set(_init_JACK OFF)
set(_init_OPENSUBDIV OFF)
endif()
@@ -197,10 +203,10 @@ option(WITH_PYTHON "Enable Embedded Python API (only disable for develop
option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON)
mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing.
mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option.
set(WITH_PYTHON_SECURITY ON CACHE BOOL "ON" FORCE) # temp force on.
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF)
option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development)" OFF)
mark_as_advanced(WITH_PYTHON_SAFETY)
option(WITH_PYTHON_MODULE "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)." OFF)
if(APPLE)
option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
endif()
@@ -220,7 +226,15 @@ mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_GAMEENGINE "Enable Game Engine" ${_init_GAMEENGINE})
option(WITH_PLAYER "Build Player" OFF)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
option(WITH_COMPOSITOR_WERROR "Treat warnings as errors in compositor code" OFF)
mark_as_advanced(WITH_COMPOSITOR_WERROR)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPENSUBDIV)
option(WITH_SUBSURF_WERROR "Treat warnings as errors in subsurf code" OFF)
mark_as_advanced(WITH_COMPOSITOR_WERROR)
# GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
@@ -238,7 +252,13 @@ option(WITH_HEADLESS "Build without graphical support (renderfarm, server m
mark_as_advanced(WITH_HEADLESS)
option(WITH_AUDASPACE "Build with blenders audio library (only disable if you know what you're doing!)" ON)
option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
mark_as_advanced(WITH_AUDASPACE)
mark_as_advanced(WITH_SYSTEM_AUDASPACE)
if(NOT WITH_AUDASPACE)
set(WITH_SYSTEM_AUDASPACE OFF)
endif()
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
@@ -260,6 +280,10 @@ endif()
# (unix defaults to System OpenJPEG On)
option(WITH_SYSTEM_OPENJPEG "Use the operating systems OpenJPEG library" OFF)
if(UNIX AND NOT APPLE)
option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF)
endif()
# Modifiers
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
@@ -308,16 +332,24 @@ endif()
# Compression
option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON)
option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON)
if(UNIX AND NOT APPLE)
option(WITH_SYSTEM_LZO "Use the system LZO library" OFF)
endif()
# Camera/motion tracking
option(WITH_LIBMV "Enable libmv structure from motion library" ON)
option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." ${_init_LIBMV_SCHUR_SPECIALIZATION})
option(WITH_LIBMV_WERROR "Treat warnings as errors in Libmv (and Blender's motion tracking) code")
mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
mark_as_advanced(WITH_LIBMV_WERROR)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# Misc
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
option(WITH_OPENNL "Enable use of Open Numerical Library" ON)
@@ -343,18 +375,20 @@ if(UNIX AND NOT APPLE)
endif()
# Cycles
option(WITH_CYCLES "Enable cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build cycles standalone with GUI" OFF)
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
option(WITH_CYCLES_CUDA_BINARIES "Build cycles CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 sm_50 CACHE STRING "CUDA architectures to build binaries for")
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 sm_50 sm_52 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_WERROR "Treat warnings as errors in Cycles code" OFF)
mark_as_advanced(WITH_CYCLES_LOGGING)
mark_as_advanced(WITH_CYCLES_DEBUG)
mark_as_advanced(WITH_CYCLES_WERROR)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
@@ -366,7 +400,7 @@ endif()
mark_as_advanced(LLVM_STATIC)
# disable for now, but plan to support on all platforms eventually
option(WITH_MEM_JEMALLOC "Enable malloc replacement (http://www.canonware.com/jemalloc)" OFF)
option(WITH_MEM_JEMALLOC "Enable malloc replacement (http://www.canonware.com/jemalloc)" ON)
mark_as_advanced(WITH_MEM_JEMALLOC)
# currently only used for BLI_mempool
@@ -431,6 +465,14 @@ if(MSVC)
set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${})
endif()
# Experimental support of C++11
option(WITH_CPP11 "Build with C++11 standard enabled, for development use only!" OFF)
mark_as_advanced(WITH_CPP11)
# Dependency graph
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
# avoid using again
option_defaults_clear()
@@ -634,6 +676,13 @@ endif()
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
endif()
else()
set(WITH_CYCLES_OSL OFF)
endif()
# auto enable openimageio linking dependencies
@@ -642,11 +691,6 @@ if(WITH_OPENIMAGEIO)
set(WITH_IMAGE_TIFF ON)
endif()
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
endif()
# don't store paths to libs for portable distribution
if(WITH_INSTALL_PORTABLE)
set(CMAKE_SKIP_BUILD_RPATH TRUE)
@@ -657,6 +701,7 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
endif()
if(WITH_CPU_SSE)
@@ -672,6 +717,34 @@ if(HAVE_STDBOOL_H)
add_definitions(-DHAVE_STDBOOL_H)
endif()
if(WITH_AUDASPACE)
if(WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_DEFINITIONS
-DWITH_AUDASPACE
-DWITH_SYSTEM_AUDASPACE
"-DAUD_DEVICE_H=<AUD_Device.h>"
"-DAUD_SPECIAL_H=<AUD_Special.h>"
"-DAUD_SOUND_H=<AUD_Sound.h>"
"-DAUD_HANDLE_H=<AUD_Handle.h>"
"-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
"-DAUD_TYPES_H=<AUD_Types.h>"
"-DAUD_PYTHON_H=<python/PyAPI.h>"
)
else()
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
set(AUDASPACE_DEFINITIONS
-DWITH_AUDASPACE
"-DAUD_DEVICE_H=<AUD_C-API.h>"
"-DAUD_SPECIAL_H=<AUD_C-API.h>"
"-DAUD_SOUND_H=<AUD_C-API.h>"
"-DAUD_HANDLE_H=<AUD_C-API.h>"
"-DAUD_SEQUENCE_H=<AUD_C-API.h>"
"-DAUD_TYPES_H=<AUD_Space.h>"
)
endif()
endif()
#-----------------------------------------------------------------------------
# Check for valid directories
# ... a partial checkout may cause this.
@@ -773,6 +846,14 @@ if(WITH_X11)
endif()
# ----------------------------------------------------------------------------
# Main Platform Checks
#
# - UNIX
# - WIN32
# - APPLE
if(UNIX AND NOT APPLE)
macro(find_package_wrapper)
if(WITH_STATIC_LIBS)
@@ -791,6 +872,21 @@ if(UNIX AND NOT APPLE)
find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Freetype REQUIRED)
if(WITH_LZO AND WITH_SYSTEM_LZO)
find_package_wrapper(LZO)
if(NOT LZO_FOUND)
message(FATAL_ERROR "Failed finding system LZO version!")
endif()
endif()
if(WITH_SYSTEM_EIGEN3)
find_package_wrapper(Eigen3)
if(NOT EIGEN3_FOUND)
message(FATAL_ERROR "Failed finding system Eigen3 version!")
endif()
endif()
# else values are set below for all platforms
if(WITH_PYTHON)
# No way to set py34. remove for now.
# find_package(PythonLibs)
@@ -826,6 +922,13 @@ if(UNIX AND NOT APPLE)
endif()
# Audio IO
if(WITH_SYSTEM_AUDASPACE)
find_package_wrapper(Audaspace)
if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND)
message(FATAL_ERROR "Audaspace external library not found!")
endif()
endif()
if(WITH_OPENAL)
find_package_wrapper(OpenAL)
if(NOT OPENAL_FOUND)
@@ -835,17 +938,21 @@ if(UNIX AND NOT APPLE)
if(WITH_SDL)
if(WITH_SDL_DYNLOAD)
set(SDLMAIN_LIBRARY)
set(SDL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/sdlew/include/SDL2")
set(SDL_LIBRARY)
set(SDL_LIBRARY_TEMP)
else()
find_package_wrapper(SDL)
find_package_wrapper(SDL2)
if(SDL2_FOUND)
# Use same names for both versions of SDL until we move to 2.x.
set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
set(SDL_LIBRARY "${SDL2_LIBRARY}")
set(SDL_FOUND "${SDL2_FOUND}")
else()
find_package_wrapper(SDL)
endif()
mark_as_advanced(
SDLMAIN_LIBRARY
SDL_INCLUDE_DIR
SDL_LIBRARY
SDL_LIBRARY_TEMP
)
# unset(SDLMAIN_LIBRARY CACHE)
if(NOT SDL_FOUND)
@@ -923,6 +1030,24 @@ if(UNIX AND NOT APPLE)
endif()
endif()
if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
if(NOT OSL_ROOT)
set(OSL_ROOT ${CYCLES_OSL})
endif()
find_package_wrapper(OpenShadingLanguage)
if(OSL_FOUND)
if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
# otherwise LLVM is missing the osl_allocate_closure_component function
set(OSL_LIBRARIES ${OSL_OSLCOMP_LIBRARY} -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY} -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY})
endif()
else()
message(STATUS "OSL not found, disabling it from Cycles")
set(WITH_CYCLES_OSL OFF)
endif()
endif()
if(WITH_BOOST)
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)
@@ -931,6 +1056,12 @@ if(UNIX AND NOT APPLE)
endif()
set(Boost_USE_MULTITHREADED ON)
set(__boost_packages filesystem regex system thread date_time)
if(WITH_CYCLES_OSL)
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
list(APPEND __boost_packages wave)
else()
endif()
endif()
if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale)
endif()
@@ -960,6 +1091,12 @@ if(UNIX AND NOT APPLE)
if(WITH_OPENIMAGEIO)
find_package_wrapper(OpenImageIO)
if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE)
find_package_wrapper(PugiXML)
else()
set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}")
set(PUGIXML_LIBRARIES "")
endif()
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
@@ -991,96 +1128,29 @@ if(UNIX AND NOT APPLE)
endif()
endif()
# XXX Maybe most of this section should go into an llvm module?
if(WITH_LLVM)
# Set llvm version if not specified
if(NOT LLVM_VERSION)
set(LLVM_VERSION "3.0")
endif()
find_package_wrapper(LLVM)
if(LLVM_DIRECTORY)
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
endif()
else()
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config)
endif()
if(NOT LLVM_FOUND)
set(WITH_LLVM OFF)
message(STATUS "LLVM not found")
endif()
if(NOT DEFINED LLVM_VERSION)
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
endif()
if(NOT DEFINED LLVM_DIRECTORY)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_DIRECTORY
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_DIRECTORY ${LLVM_DIRECTORY} CACHE PATH "Path to the LLVM installation")
endif()
if(NOT DEFINED LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
mark_as_advanced(LLVM_LIBPATH)
endif()
if(LLVM_STATIC)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
else()
find_library(LLVM_LIBRARY
NAMES LLVM-${LLVM_VERSION}
PATHS ${LLVM_LIBPATH})
endif()
if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
else()
message(FATAL_ERROR "LLVM not found.")
endif()
endif()
if(WITH_LLVM OR WITH_SDL_DYNLOAD)
# Fix for conflict with Mesa llvmpipe
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/source/creator/blender.map")
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'")
endif()
if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
# Note: --whole-archive is needed to force loading of all symbols in liboslexec,
# otherwise LLVM is missing the osl_allocate_closure_component function
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -Wl,--whole-archive ${OSL_LIB_EXEC} -Wl,--no-whole-archive ${OSL_LIB_QUERY})
find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
set(WITH_CYCLES_OSL OFF)
if(WITH_OPENSUBDIV)
find_package_wrapper(OpenSubdiv)
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
if(NOT OPENSUBDIV_FOUND)
set(WITH_OPENSUBDIV OFF)
message(STATUS "OpenSubdiv not found")
endif()
endif()
@@ -1089,6 +1159,8 @@ if(UNIX AND NOT APPLE)
find_package(Threads REQUIRED)
list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT})
# used by other platforms
set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
if(CMAKE_DL_LIBS)
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
@@ -1108,6 +1180,25 @@ if(UNIX AND NOT APPLE)
# GNU Compiler
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "5.0")
# GCC5 uses gnu11, until we update, force c89
# though some c11 features can still be used.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
endif()
# use ld.gold linker if available, could make optional
execute_process(
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
else()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif()
unset(LD_VERSION)
# CLang is the same as GCC for now.
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
@@ -1149,7 +1240,11 @@ elseif(WIN32)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
list(APPEND PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
list(APPEND PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp)
if(WITH_INPUT_IME)
list(APPEND PLATFORM_LINKLIBS imm32)
endif()
add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE
@@ -1234,8 +1329,8 @@ elseif(WIN32)
find_package(png)
if(NOT PNG_FOUND)
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
message(WARNING "Using HARDCODED libpng locations")
set(PNG_PNG_INCLUDE_DIR ${LIBDIR}/png/include)
set(PNG_LIBRARIES libpng)
set(PNG "${LIBDIR}/png")
set(PNG_INCLUDE_DIRS "${PNG}/include")
@@ -1322,19 +1417,19 @@ elseif(WIN32)
set(OPENEXR_VERSION "2.1")
find_package(OPENEXR REQUIRED)
if(NOT OPENEXR_FOUND)
message(WARNING "Using HARDCODED OpenEXR locations")
set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
set(OPENEXR_LIBRARIES
${OPENEXR_LIBPATH}/Iex-2_1.lib
${OPENEXR_LIBPATH}/Half.lib
${OPENEXR_LIBPATH}/IlmImf-2_1.lib
${OPENEXR_LIBPATH}/Imath-2_1.lib
${OPENEXR_LIBPATH}/IlmThread-2_1.lib
)
endif(NOT OPENEXR_FOUND)
message(WARNING "Using HARDCODED OpenEXR locations")
set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
set(OPENEXR_LIBRARIES
${OPENEXR_LIBPATH}/Iex-2_2.lib
${OPENEXR_LIBPATH}/Half.lib
${OPENEXR_LIBPATH}/IlmImf-2_2.lib
${OPENEXR_LIBPATH}/Imath-2_2.lib
${OPENEXR_LIBPATH}/IlmThread-2_2.lib
)
endif()
endif()
if(WITH_IMAGE_TIFF)
@@ -1374,10 +1469,10 @@ elseif(WIN32)
if(WITH_BOOST)
if(WITH_CYCLES_OSL)
set(boost_extra_libs wave)
endif(WITH_CYCLES_OSL)
endif()
if(WITH_INTERNATIONAL)
list(APPEND boost_extra_libs locale)
endif(WITH_INTERNATIONAL)
endif()
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
set(Boost_USE_MULTITHREADED ON) # suffix -mt
set(Boost_USE_STATIC_LIBS ON) # suffix -s
@@ -1430,20 +1525,21 @@ elseif(WIN32)
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
set(OPENCOLORIO_DEFINITIONS "-DOCIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
add_definitions(-DOIIO_STATIC_BUILD)
endif()
if(WITH_LLVM)
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_DIRECTORY}/lib/*.lib)
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
if(EXISTS ${LLVM_DIRECTORY}/debug/lib)
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
foreach(LLVM_OPTIMIZED_LIB ${LLVM_LIBRARY_OPTIMIZED})
get_filename_component(LIBNAME ${LLVM_OPTIMIZED_LIB} ABSOLUTE)
list(APPEND LLVM_LIBS optimized ${LIBNAME})
endforeach(LLVM_OPTIMIZED_LIB)
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_DIRECTORY}/debug/lib/*.lib)
file(GLOB LLVM_LIBRARY_DEBUG ${LLVM_ROOT_DIR}/debug/lib/*.lib)
foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
get_filename_component(LIBNAME ${LLVM_DEBUG_LIB} ABSOLUTE)
@@ -1478,6 +1574,30 @@ elseif(WIN32)
)
endif()
if(WITH_OPENSUBDIV)
set(OPENSUBDIV_INCLUDE_DIR ${LIBDIR}/opensubdiv/include)
set(OPENSUBDIV_LIBPATH ${LIBDIR}/opensubdiv/lib)
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBPATH}/osdCPU.lib ${OPENSUBDIV_LIBPATH}/osdGPU.lib)
find_package(OpenSubdiv)
endif()
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY SDL2)
set(SDL_LIBPATH ${SDL}/lib)
endif()
# Audio IO
if(WITH_SYSTEM_AUDASPACE)
set(AUDASPACE_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace.lib)
set(AUDASPACE_C_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_C_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-c.lib)
set(AUDASPACE_PY_INCLUDE_DIRS ${LIBDIR}/audaspace/include/audaspace)
set(AUDASPACE_PY_LIBRARIES ${LIBDIR}/audaspace/lib/audaspace-py.lib)
endif()
# used in many places so include globally, like OpenGL
blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
@@ -1495,7 +1615,12 @@ elseif(WIN32)
if(WITH_MINGW64)
message(STATUS "Compiling for 64 bit with MinGW-w64.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64_gcc49)
else()
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
endif()
else()
message(STATUS "Compiling for 32 bit with MinGW-w32.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
@@ -1505,7 +1630,12 @@ elseif(WIN32)
endif()
endif()
list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi)
list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp)
if(WITH_INPUT_IME)
list(APPEND PLATFORM_LINKLIBS -limm32)
endif()
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
if(WITH_MINGW64)
@@ -1659,11 +1789,12 @@ elseif(WIN32)
set(OPENIMAGEIO_LIBRARIES OpenImageIO)
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS "")
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
endif()
if(WITH_LLVM)
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_LIBPATH ${LLVM_DIRECTORY}/lib)
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_LIBPATH ${LLVM_ROOT_DIR}/lib)
# Explicitly set llvm lib order.
#---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! ---------
set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive
@@ -1696,6 +1827,13 @@ elseif(WIN32)
set(OPENCOLORIO_DEFINITIONS)
endif()
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY SDL)
set(SDL_LIBPATH ${SDL}/lib)
endif()
set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
## DISABLE - causes linking errors
@@ -1727,13 +1865,6 @@ elseif(WIN32)
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
endif()
if(WITH_SDL)
set(SDL ${LIBDIR}/sdl)
set(SDL_INCLUDE_DIR ${SDL}/include)
set(SDL_LIBRARY SDL2)
set(SDL_LIBPATH ${SDL}/lib)
endif()
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
add_definitions(-D__SSE__ -D__MMX__)
endif()
@@ -1748,10 +1879,10 @@ elseif(WIN32)
find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS ${CYCLES_OSL}/lib)
find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS ${CYCLES_OSL}/lib)
list(APPEND OSL_LIBRARIES optimized ${OSL_LIB_COMP} optimized ${OSL_LIB_EXEC} optimized ${OSL_LIB_QUERY} debug ${OSL_LIB_EXEC_DEBUG} debug ${OSL_LIB_COMP_DEBUG} debug ${OSL_LIB_QUERY_DEBUG})
find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
@@ -1786,6 +1917,17 @@ elseif(APPLE)
endif()
endif()
if(WITH_OPENSUBDIV)
set(OPENSUBDIV ${LIBDIR}/opensubdiv)
set(OPENSUBDIV_LIBPATH ${OPENSUBDIV}/lib)
find_library(OSL_LIB_UTIL NAMES osdutil PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSL_LIB_CPU NAMES osdCPU PATHS ${OPENSUBDIV_LIBPATH})
find_library(OSL_LIB_GPU NAMES osdGPU PATHS ${OPENSUBDIV_LIBPATH})
set(OPENSUBDIV_INCLUDE_DIR ${OPENSUBDIV}/include)
set(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
list(APPEND OPENSUBDIV_LIBRARIES ${OSL_LIB_UTIL} ${OSL_LIB_CPU} ${OSL_LIB_GPU})
endif()
if(WITH_JACK)
find_library(JACK_FRAMEWORK
NAMES jackmp
@@ -1809,14 +1951,14 @@ elseif(APPLE)
if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
# normally cached but not since we include them with blender
set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
# set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
# set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
# set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
else()
# module must be compiled against Python framework
set(PYTHON_INCLUDE_DIR "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/include/python${PYTHON_VERSION}m")
set(PYTHON_BINARY "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
set(PYTHON_EXECUTABLE "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
#set(PYTHON_LIBRARY python${PYTHON_VERSION})
set(PYTHON_LIBPATH "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled
@@ -1987,6 +2129,7 @@ elseif(APPLE)
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO}/lib/libOpenImageIO.a ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES})
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib ${JPEG_LIBPATH} ${PNG_LIBPATH} ${TIFF_LIBPATH} ${OPENEXR_LIBPATH} ${ZLIB_LIBPATH})
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
endif()
if(WITH_OPENCOLORIO)
@@ -1997,10 +2140,10 @@ elseif(APPLE)
endif()
if(WITH_LLVM)
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
if(EXISTS "${LLVM_DIRECTORY}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_DIRECTORY}/bin/llvm-config")
if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
else()
set(LLVM_CONFIG llvm-config)
endif()
@@ -2008,7 +2151,7 @@ elseif(APPLE)
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_DIRECTORY
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
@@ -2017,7 +2160,7 @@ elseif(APPLE)
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIBPATH)
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
@@ -2042,10 +2185,10 @@ elseif(APPLE)
find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
# WARNING! depends on correct order of OSL libs linking
list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
set(OSL_FOUND TRUE)
else()
message(STATUS "OSL not found")
@@ -2177,9 +2320,14 @@ endif()
if(WITH_IMAGE_OPENJPEG)
if(WITH_SYSTEM_OPENJPEG)
# dealt with above
set(OPENJPEG_DEFINES "")
else()
set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg")
add_definitions(-DOPJ_STATIC)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
# Special handling of Windows platform where openjpeg is always static.
if(WIN32)
set(OPENJPEG_DEFINES "-DOPJ_STATIC")
endif()
endif()
@@ -2188,6 +2336,9 @@ if(WITH_IMAGE_REDCODE)
set(REDCODE_INC ${REDCODE})
endif()
if(NOT WITH_SYSTEM_EIGEN3)
set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3)
endif()
#-----------------------------------------------------------------------------
# Configure OpenGL.
@@ -2445,6 +2596,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -2472,6 +2624,16 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE -Werror=return-type)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_POINTER_ARITH -Wpointer-arith)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_PARAMETER -Wunused-parameter)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -2605,6 +2767,16 @@ if(WITH_PYTHON)
endif()
endif()
if(WITH_CPP11)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC12)
# Nothing special is needed, C++11 features are available by default.
else()
message(FATAL_ERROR "Compiler ${CMAKE_C_COMPILER_ID} is not supported for C++11 build yet")
endif()
endif()
# Include warnings first, so its possible to disable them with user defined flags
# eg: -Wno-uninitialized
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
@@ -2617,12 +2789,12 @@ mark_as_advanced(
OSL_COMPILER
OSL_LIB_COMP
OSL_LIB_QUERY
OSL_INCLUDES
OSL_INCLUDE_DIR
)
mark_as_advanced(
LLVM_CONFIG
LLVM_DIRECTORY
LLVM_ROOT_DIR
LLVM_LIBRARY
LLVM_VERSION
)
@@ -2694,25 +2866,29 @@ include(build_files/cmake/packaging.cmake)
# Print Final Configuration
if(FIRST_RUN)
set(_config_msg "\n* Blender Configuration *")
macro(info_cfg_option
_setting)
set(_msg " * ${_setting}")
set(_config_msg "\nBlender Configuration\n=====================")
function(info_cfg_option
_setting
)
set(_msg " - ${_setting}")
string(LENGTH "${_msg}" _len)
while("32" GREATER "${_len}")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
set(_config_msg "${_config_msg}\n${_msg}${${_setting}}")
endmacro()
set(_config_msg "${_config_msg}\n${_msg}${${_setting}}" PARENT_SCOPE)
endfunction()
macro(info_cfg_text
_text)
set(_config_msg "${_config_msg}\n\n ${_text}")
function(info_cfg_text
_text
)
endmacro()
set(_config_msg "${_config_msg}\n\n ${_text}" PARENT_SCOPE)
endfunction()
message(STATUS "C Compiler: \"${CMAKE_C_COMPILER_ID}\"")
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")

View File

@@ -43,6 +43,11 @@ ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
endif
# Allow to use alternative binary (pypy3, etc)
ifndef PYTHON
PYTHON:=python3
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -65,7 +70,7 @@ ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
endif
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
BUILD_DIR:=$(BUILD_DIR)_headless
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
endif
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
@@ -76,18 +81,20 @@ endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
ifndef NPROCS
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
endif
@@ -113,16 +120,16 @@ endif
# -----------------------------------------------------------------------------
# Build Blender
all:
all: FORCE
@echo
@echo Configuring Blender ...
@echo Configuring Blender in \"$(BUILD_DIR)\" ...
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# $(CMAKE_CONFIG); \
# fi
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
# # $(CMAKE_CONFIG); \
# # fi
# do this always incase of failed initial build, could be smarter here...
$(CMAKE_CONFIG)
# # do this always incase of failed initial build, could be smarter here...
@$(CMAKE_CONFIG)
@echo
@echo Building Blender ...
@@ -142,13 +149,13 @@ bpy: all
# -----------------------------------------------------------------------------
# Configuration (save some cd'ing around)
config:
config: FORCE
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# Help for build targets
help:
help: FORCE
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@@ -171,7 +178,7 @@ help:
@echo ""
@echo "Package Targets"
@echo " * package_debian - build a debian package"
@echo " * package_pacman - build an arch linux pacmanpackage"
@echo " * package_pacman - build an arch linux pacman package"
@echo " * package_archive - build an archive package"
@echo ""
@echo "Testing Targets (not associated with building blender)"
@@ -201,6 +208,12 @@ help:
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Environment Variables"
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
@echo " * BUILD_DIR - override default build path."
@echo " * PYTHON - use this for the Python command (used for checking tools)."
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@echo " * doc_doxy - generate doxygen C/C++ docs"
@@ -210,17 +223,18 @@ help:
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
@echo ""
# -----------------------------------------------------------------------------
# Packages
#
package_debian:
package_debian: FORCE
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
package_pacman:
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
package_pacman: FORCE
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
package_archive:
package_archive: FORCE
make -C "$(BUILD_DIR)" -s package_archive
@echo archive in "$(BUILD_DIR)/release"
@@ -228,35 +242,35 @@ package_archive:
# -----------------------------------------------------------------------------
# Tests
#
test:
test: FORCE
cd $(BUILD_DIR) ; ctest . --output-on-failure
# run pep8 check check on scripts we distribute.
test_pep8:
python3 tests/python/pep8.py > test_pep8.log 2>&1
test_pep8: FORCE
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake:
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
test_cmake: FORCE
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
@echo "written: test_cmake_consistency.log"
# run deprecation tests, see if we have anything to remove.
test_deprecated:
python3 tests/check_deprecated.py
test_deprecated: FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c:
test_style_c: FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc:
test_style_c_qtc: FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
@@ -266,18 +280,18 @@ test_style_c_qtc:
@echo "written: test_style.tasks"
test_style_osl:
test_style_osl: FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc:
test_style_osl_qtc: FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
@@ -289,13 +303,13 @@ test_style_osl_qtc:
# Project Files
#
project_qtcreator:
python3 build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_qtcreator: FORCE
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
project_netbeans:
python3 build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_netbeans: FORCE
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
project_eclipse:
project_eclipse: FORCE
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
@@ -303,51 +317,51 @@ project_eclipse:
# Static Checking
#
check_cppcheck:
check_cppcheck: FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
check_clang_array:
check_clang_array: FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
check_splint:
check_splint: FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
check_sparse:
check_sparse: FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
check_smatch:
check_smatch: FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
check_spelling_py:
check_spelling_py: FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/release/scripts"
check_spelling_c:
check_spelling_c: FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc:
check_spelling_c_qtc: FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
@@ -356,13 +370,13 @@ check_spelling_c_qtc:
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl:
check_spelling_osl: FORCE
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 python3 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions:
check_descriptions: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
@@ -370,14 +384,14 @@ check_descriptions:
# Utilities
#
tgz:
tgz: FORCE
./build_files/utils/build_tgz.sh
icons:
icons: FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update:
update: FORCE
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
@@ -390,24 +404,24 @@ update:
#
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py:
doc_py: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy:
doc_doxy: FORCE
cd doc/doxygen; doxygen Doxyfile
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna:
doc_dna: FORCE
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man:
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
doc_man: FORCE
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features:
@python3 -c \
help_features: FORCE
@$(PYTHON) -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
@@ -417,7 +431,9 @@ help_features:
if w.startswith('WITH_')]))" | uniq
clean:
clean: FORCE
$(MAKE) -C "$(BUILD_DIR)" clean
.PHONY: all
FORCE:

View File

@@ -266,6 +266,7 @@ if 'blenderlite' in B.targets:
target_env_defs['WITH_BF_BOOLEAN'] = False
target_env_defs['WITH_BF_REMESH'] = False
target_env_defs['WITH_BF_PYTHON'] = False
target_env_defs['WITH_BF_IME'] = False
target_env_defs['WITH_BF_3DMOUSE'] = False
target_env_defs['WITH_BF_LIBMV'] = False
target_env_defs['WITH_BF_FREESTYLE'] = False
@@ -469,6 +470,14 @@ if env['OURPLATFORM']=='darwin':
################### End Automatic configuration for OSX ##################
#############################################################################
if env['OURPLATFORM'] == 'linux' and not env['C_COMPILER_ID']:
command = ["%s"%env['CC'], "--version"]
line = btools.get_command_output(command)
if line.startswith('gcc'):
env['C_COMPILER_ID'] = 'gcc'
elif 'clang' in line[0]:
env['C_COMPILER_ID'] = 'clang'
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
@@ -479,6 +488,13 @@ if env['WITH_BF_OPENMP'] == 1:
else:
env.Append(CCFLAGS=['-fopenmp'])
if env['WITH_BF_CPP11']:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
# Nothing special is needed, C++11 features are available by default.
pass
else:
env['CXXFLAGS'].append('-std=c++11')
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
@@ -498,6 +514,10 @@ if env['WITH_BF_STATICCXX']:
else:
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
# audaspace is needed for the game engine
if not env['WITH_BF_AUDASPACE']:
env['WITH_BF_GAMEENGINE'] = False
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
if 'blenderplayer' in B.targets:
env['WITH_BF_PLAYER'] = True
@@ -524,13 +544,25 @@ else:
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
# TODO, make optional (as with CMake)
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CPPFLAGS'].append('-DWITH_AVI')
env['CPPFLAGS'].append('-DWITH_OPENNL')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
# Audaspace
if env['WITH_BF_AUDASPACE']:
env['BF_AUDASPACE_C_INC'] = '#intern/audaspace/intern'
env['BF_AUDASPACE_PY_INC'] = '#intern/audaspace/intern'
env['BF_AUDASPACE_DEF'] = ['WITH_AUDASPACE']
env['BF_AUDASPACE_DEF'].append('AUD_DEVICE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SPECIAL_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SOUND_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_HANDLE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_SEQUENCE_H="<AUD_C-API.h>"')
env['BF_AUDASPACE_DEF'].append('AUD_TYPES_H="<AUD_Space.h>"')
# OpenGL
if env['WITH_BF_GL_PROFILE_COMPAT']:
@@ -750,6 +782,11 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/preview_cycles.blend")
# --- glsl ---
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_geometry.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_color_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
@@ -760,7 +797,17 @@ if B.targets != ['cudakernels']:
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex_world.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_lib.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
data_to_c_simple("intern/opensubdiv/gpu_shader_opensubd_display.glsl")
# --- blender ---
data_to_c_simple("release/datafiles/bfont.pfb")
@@ -854,19 +901,21 @@ B.init_lib_dict()
##### END SETUP ##########
if B.targets != ['cudakernels']:
# Put all auto configuration run-time tests here
## Auto-configuration run-time tests
from FindSharedPtr import FindSharedPtr
from FindUnorderedMap import FindUnorderedMap
from FindSharedPtr import FindSharedPtr
from FindUnorderedMap import FindUnorderedMap
conf = Configure(env)
old_linkflags = conf.env['LINKFLAGS']
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
FindSharedPtr(conf)
FindUnorderedMap(conf)
conf.env['LINKFLAGS'] = old_linkflags
env = conf.Finish()
conf = Configure(env)
old_linkflags = conf.env['LINKFLAGS']
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
# Put all tests here
FindSharedPtr(conf)
FindUnorderedMap(conf)
conf.env['LINKFLAGS'] = old_linkflags
env = conf.Finish()
# End of auto configuration
@@ -998,17 +1047,20 @@ if env['OURPLATFORM']!='darwin':
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel')
source=os.listdir('intern/cycles/kernel')
if '__pycache__' in source: source.remove('__pycache__')
source.remove('kernel.cpp')
source.remove('CMakeLists.txt')
source.remove('SConscript')
source.remove('svm')
source.remove('closure')
source.remove('geom')
source.remove('shaders')
source.remove('osl')
source.remove('split')
source=['intern/cycles/kernel/'+s for s in source]
source.append('intern/cycles/util/util_atomic.h')
source.append('intern/cycles/util/util_color.h')
source.append('intern/cycles/util/util_half.h')
source.append('intern/cycles/util/util_math.h')
source.append('intern/cycles/util/util_math_fast.h')
source.append('intern/cycles/util/util_transform.h')
source.append('intern/cycles/util/util_types.h')
scriptinstall.append(env.Install(dir=dir,source=source))
@@ -1030,6 +1082,12 @@ if env['OURPLATFORM']!='darwin':
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/geom/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# split
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'split')
source=os.listdir('intern/cycles/kernel/split')
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/split/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# licenses
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
@@ -1159,9 +1217,37 @@ if env['OURPLATFORM']=='linuxcross':
textlist = []
texttargetlist = []
for tp, tn, tf in os.walk('release/text'):
tf.remove("readme.html")
for f in tf:
textlist.append(tp+os.sep+f)
def readme_version_patch():
readme_src = "release/text/readme.html"
readme_dst = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "readme.html")))
if not os.path.exists(readme_dst) or (os.path.getmtime(readme_dst) < os.path.getmtime(readme_src)):
f = open(readme_src, "r")
data = f.read()
f.close()
data = data.replace("BLENDER_VERSION", VERSION)
f = open(readme_dst, "w")
f.write(data)
f.close()
textlist.append(readme_dst)
readme_version_patch()
del readme_version_patch
'''Command(
"release/text/readme.html"
)
Command("file.out", "file.in", Copy(env['BF_INSTALLDIR'], "release/text/readme.html"))
'''
# Font licenses
textlist.append('release/datafiles/LICENSE-bfont.ttf.txt')
if env['WITH_BF_INTERNATIONAL']:
@@ -1207,7 +1293,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
@@ -1234,6 +1319,15 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
# TODO(sergey): For unti we've got better way to deal with python binary
if env['WITH_BF_PYTHON']:
py_target = os.path.join(env['BF_INSTALLDIR'], VERSION, 'python', 'bin')
if env['BF_DEBUG']:
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll'])
else:
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll'])
if env['OURPLATFORM'] == 'win64-mingw':
dllsources = []

View File

@@ -27,13 +27,16 @@ getopt \
-o s:i:t:h \
--long source:,install:,tmp:,info:,threads:,help,no-sudo,with-all,with-opencollada,\
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,\
force-all,force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-opencollada,\
force-ffmpeg,\
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,skip-opencollada,\
force-all,force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-osd,\
force-ffmpeg,force-opencollada,\
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,\
skip-ffmpeg,skip-opencollada,\
required-numpy: \
-- "$@" \
)
COMMANDLINE=$@
DISTRO=""
RPM=""
SRC="$HOME/src/blender-deps"
@@ -41,6 +44,7 @@ INST="/opt/lib"
TMP="/tmp"
CWD=$PWD
INFO_PATH=$CWD
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
@@ -138,6 +142,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--force-osl
Force the rebuild of OpenShadingLanguage.
--force-osd
Force the rebuild of OpenSubdiv.
--force-opencollada
Force the rebuild of OpenCOLLADA.
@@ -174,6 +181,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--skip-osl
Unconditionally skip OpenShadingLanguage installation/building.
--skip-osd
Unconditionally skip OpenSubdiv installation/building.
--skip-opencollada
Unconditionally skip OpenCOLLADA installation/building.
@@ -209,14 +219,14 @@ OCIO_VERSION_MIN="1.0"
OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
OPENEXR_VERSION="2.1.0"
OPENEXR_VERSION="2.2.0"
OPENEXR_VERSION_MIN="2.0.1"
ILMBASE_VERSION="2.1.0"
ILMBASE_VERSION="2.2.0"
OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
_with_built_openexr=false
OIIO_VERSION="1.4.11"
OIIO_VERSION="1.4.16"
OIIO_VERSION_MIN="1.4.0"
OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
@@ -228,11 +238,17 @@ LLVM_FORCE_REBUILD=false
LLVM_SKIP=false
# OSL needs to be compiled for now!
OSL_VERSION="1.5.0"
OSL_VERSION="1.5.11"
OSL_VERSION_MIN=$OSL_VERSION
OSL_FORCE_REBUILD=false
OSL_SKIP=false
# OpenSubdiv needs to be compiled for now
OSD_VERSION="3.0.2"
OSD_VERSION_MIN=$OSD_VERSION
OSD_FORCE_REBUILD=false
OSD_SKIP=false
# Version??
OPENCOLLADA_VERSION="1.3"
OPENCOLLADA_FORCE_REBUILD=false
@@ -375,6 +391,11 @@ while true; do
OSL_VERSION_MIN=$OSL_VERSION
shift; shift; continue
;;
--ver-osd)
OSD_VERSION="$2"
OSD_VERSION_MIN=$OSD_VERSION
shift; shift; continue
;;
--force-all)
PYTHON_FORCE_REBUILD=true
NUMPY_FORCE_REBUILD=true
@@ -384,6 +405,7 @@ while true; do
OIIO_FORCE_REBUILD=true
LLVM_FORCE_REBUILD=true
OSL_FORCE_REBUILD=true
OSD_FORCE_REBUILD=true
OPENCOLLADA_FORCE_REBUILD=true
FFMPEG_FORCE_REBUILD=true
shift; continue
@@ -417,6 +439,9 @@ while true; do
--force-osl)
OSL_FORCE_REBUILD=true; shift; continue
;;
--force-osd)
OSD_FORCE_REBUILD=true; shift; continue
;;
--force-opencollada)
OPENCOLLADA_FORCE_REBUILD=true; shift; continue
;;
@@ -447,6 +472,9 @@ while true; do
--skip-osl)
OSL_SKIP=true; shift; continue
;;
--skip-osd)
OSD_SKIP=true; shift; continue
;;
--skip-opencollada)
OPENCOLLADA_SKIP=true; shift; continue
;;
@@ -485,28 +513,40 @@ BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" )
#OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
OPENEXR_SOURCE=( "https://github.com/mont29/openexr.git" )
OPENEXR_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
OPENEXR_USE_REPO=false
OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
OPENEXR_SOURCE_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
ILMBASE_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz" )
#OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio.git" )
OIIO_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
OIIO_USE_REPO=false
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage.git" )
#OSL_SOURCE=( "https://github.com/mont29/OpenShadingLanguage.git" )
#OSL_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#OSL_REPO_BRANCH="master"
OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
OSL_REPO_UID="22ee5ea298fd215430dfbd160b5aefd507f06db0"
OSL_REPO_BRANCH="blender-fixes"
OSL_USE_REPO=true
#~ OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#~ OSL_SOURCE_REPO_BRANCH="master"
OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
OSL_SOURCE_REPO_UID="22ee5ea298fd215430dfbd160b5aefd507f06db0"
OSL_SOURCE_REPO_BRANCH="blender-fixes"
OSD_USE_REPO=true
# Script foo to make the version string compliant with the archive name:
# ${Varname//SearchForThisChar/ReplaceWithThisChar}
OSD_SOURCE=( "https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${OSD_VERSION//./_}.tar.gz" )
OSD_SOURCE_REPO=( "https://github.com/PixarAnimationStudios/OpenSubdiv.git" )
OSD_SOURCE_REPO_UID="404659fffa659da075d1c9416e4fc939139a84ee"
OSD_SOURCE_REPO_BRANCH="dev"
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
OPENCOLLADA_REPO_UID="18da7f4109a8eafaa290a33f5550501cc4c8bae8"
OPENCOLLADA_REPO_UID="3335ac164e68b2512a40914b14c74db260e6ff7d"
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
@@ -979,7 +1019,7 @@ clean_ILMBASE() {
compile_ILMBASE() {
# To be changed each time we make edits that would modify the compiled result!
ilmbase_magic=9
ilmbase_magic=10
_init_ilmbase
# Clean install if needed!
@@ -1003,8 +1043,7 @@ compile_ILMBASE() {
download ILMBASE_SOURCE[@] $_src.tar.gz
INFO "Unpacking ILMBase-$ILMBASE_VERSION"
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" \
-xf $_src.tar.gz
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" -xf $_src.tar.gz
fi
@@ -1020,6 +1059,7 @@ compile_ILMBASE() {
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
if file /bin/cp | grep -q '32-bit'; then
cflags="-fPIC -m32 -march=i686"
@@ -1092,24 +1132,28 @@ compile_OPENEXR() {
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
mkdir -p $SRC
# download OPENEXR_SOURCE[@] $_src.tar.gz
# INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
# tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" \
# -xf $_src.tar.gz
git clone ${OPENEXR_SOURCE[0]} $_src
if [ $OPENEXR_USE_REPO == true ]; then
git clone ${OPENEXR_SOURCE_REPO[0]} $_src
else
download OPENEXR_SOURCE[@] $_src.tar.gz
INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" -xf $_src.tar.gz
fi
fi
cd $_src
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
git checkout $OPENEXR_REPO_UID
git reset --hard
if [ $OPENEXR_USE_REPO == true ]; then
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
git checkout $OPENEXR_SOURCE_REPO_UID
git reset --hard
oiio_src_path="../OpenEXR"
else
oiio_src_path=".."
fi
# Always refresh the whole build!
if [ -d build ]; then
@@ -1123,6 +1167,7 @@ compile_OPENEXR() {
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D ILMBASE_PACKAGE_PREFIX=$_ilmbase_inst"
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
if file /bin/cp | grep -q '32-bit'; then
cflags="-fPIC -m32 -march=i686"
@@ -1130,7 +1175,7 @@ compile_OPENEXR() {
cflags="-fPIC"
fi
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ../OpenEXR
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" $oiio_src_path
make -j$THREADS && make install
@@ -1194,24 +1239,25 @@ compile_OIIO() {
if [ ! -d $_src ]; then
mkdir -p $SRC
#download OIIO_SOURCE[@] "$_src.tar.gz"
#
#INFO "Unpacking OpenImageIO-$OIIO_VERSION"
#tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
#-xf $_src.tar.gz
git clone ${OIIO_SOURCE[0]} $_src
if [ $OIIO_USE_REPO == true ]; then
git clone ${OIIO_SOURCE_REPO[0]} $_src
else
download OIIO_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenImageIO-$OIIO_VERSION"
tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" -xf $_src.tar.gz
fi
fi
cd $_src
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
git checkout $OIIO_REPO_UID
git reset --hard
if [ $OIIO_USE_REPO == true ]; then
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
git checkout $OIIO_SOURCE_REPO_UID
git reset --hard
fi
# Always refresh the whole build!
if [ -d build ]; then
@@ -1233,6 +1279,7 @@ compile_OIIO() {
if [ $_with_built_openexr == true ]; then
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
cmake_d="$cmake_d -D OPENEXR_HOME=$INST/openexr"
INFO "ILMBASE_HOME=$INST/openexr"
fi
# Optional tests and cmd tools
@@ -1332,19 +1379,7 @@ compile_LLVM() {
cd $_src
# XXX Ugly patching hack!
cat << EOF | patch -p1
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
set(LLVM_VERSION_MAJOR 3)
set(LLVM_VERSION_MINOR 1)
-set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}svn")
+set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
EOF
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/llvm.patch"
cd $CWD
@@ -1363,7 +1398,7 @@ EOF
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
cmake_d="$cmake_d -D LLVM_ENABLE_FFI=ON"
cmake_d="$cmake_d -D LLVM_TARGETS_TO_BUILD=X86"
cmake_d="$cmake_d -D -DLLVM_ENABLE_TERMINFO=OFF"
cmake_d="$cmake_d -D LLVM_ENABLE_TERMINFO=OFF"
if [ -d $_FFI_INCLUDE_DIR ]; then
cmake_d="$cmake_d -D FFI_INCLUDE_DIR=$_FFI_INCLUDE_DIR"
@@ -1409,13 +1444,13 @@ clean_OSL() {
compile_OSL() {
# To be changed each time we make edits that would modify the compiled result!
osl_magic=16
osl_magic=17
_init_osl
# Clean install if needed!
magic_compile_check osl-$OSL_VERSION $osl_magic
if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
#~ rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
clean_OSL
fi
@@ -1427,26 +1462,29 @@ compile_OSL() {
if [ ! -d $_src ]; then
mkdir -p $SRC
#download OSL_SOURCE[@] "$_src.tar.gz"
#INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
#tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
#-xf $_src.tar.gz
git clone ${OSL_SOURCE[0]} $_src
if [ $OSL_USE_REPO == true ]; then
git clone ${OSL_SOURCE_REPO[0]} $_src
else
download OSL_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
-xf $_src.tar.gz
fi
fi
cd $_src
git remote set-url origin ${OSL_SOURCE[0]}
if [ $OSL_USE_REPO == true ]; then
git remote set-url origin ${OSL_SOURCE_REPO[0]}
# XXX For now, always update from latest repo...
git pull --no-edit -X theirs origin $OSL_SOURCE_REPO_BRANCH
# Stick to same rev as windows' libs...
git checkout $OSL_SOURCE_REPO_UID
git reset --hard
# XXX For now, always update from latest repo...
git pull --no-edit -X theirs origin $OSL_GIT_BRANCH
# Stick to same rev as windows' libs...
git checkout $OSL_REPO_UID
git reset --hard
# XXX Ugly patching hack!
patch -p1 -i "$SCRIPT_DIR/install_deps_patches/osl.patch"
fi
# Always refresh the whole build!
if [ -d build ]; then
@@ -1461,11 +1499,14 @@ compile_OSL() {
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
cmake_d="$cmake_d -D BUILDSTATIC=OFF"
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
if [ $_with_built_openexr == true ]; then
INFO "ILMBASE_HOME=$INST/openexr"
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
# XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :(
cmake_d="$cmake_d -D ILMBASE_CUSTOM=ON"
cmake_d="$cmake_d -D ILMBASE_CUSTOM_LIBRARIES='Half;Iex;Imath;IlmThread'"
fi
if [ -d $INST/boost ]; then
@@ -1479,11 +1520,14 @@ compile_OSL() {
if [ ! -z $LLVM_VERSION_FOUND ]; then
cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND"
if [ -d $INST/llvm ]; then
cmake_d="$cmake_d -D LLVM_DIRECTORY=$INST/llvm"
cmake_d="$cmake_d -D LLVM_ROOT_DIR=$INST/llvm"
cmake_d="$cmake_d -D LLVM_STATIC=ON"
fi
fi
#~ cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
#~ cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
cmake $cmake_d ..
make -j$THREADS && make install
@@ -1508,6 +1552,99 @@ compile_OSL() {
run_ldconfig "osl"
}
#### Build OSD ####
_init_osd() {
_src=$SRC/OpenSubdiv-$OSD_VERSION
_git=true
_inst=$INST/osd-$OSD_VERSION
_inst_shortcut=$INST/osd
}
clean_OSD() {
_init_osd
_clean
}
compile_OSD() {
# To be changed each time we make edits that would modify the compiled result!
osd_magic=0
_init_osd
# Clean install if needed!
magic_compile_check osd-$OSD_VERSION $osd_magic
if [ $? -eq 1 -o $OSD_FORCE_REBUILD == true ]; then
clean_OSD
fi
if [ ! -d $_inst ]; then
INFO "Building OpenSubdiv-$OSD_VERSION"
prepare_opt
if [ ! -d $_src ]; then
mkdir -p $SRC
if [ $OSD_USE_REPO == true ]; then
git clone ${OSD_SOURCE_REPO[0]} $_src
else
download OSD_SOURCE[@] "$_src.tar.gz"
INFO "Unpacking OpenSubdiv-$OSD_VERSION"
tar -C $SRC --transform "s,(.*/?)OpenSubdiv-[^/]*(.*),\1OpenSubdiv-$OSD_VERSION\2,x" \
-xf $_src.tar.gz
fi
fi
cd $_src
if [ $OSD_USE_REPO == true ]; then
git remote set-url origin ${OSD_SOURCE_REPO[0]}
# XXX For now, always update from latest repo...
git pull --no-edit -X theirs origin $OSD_SOURCE_REPO_BRANCH
# Stick to same rev as windows' libs...
git checkout $OSD_SOURCE_REPO_UID
git reset --hard
fi
# Always refresh the whole build!
if [ -d build ]; then
rm -rf build
fi
mkdir build
cd build
cmake_d="-D CMAKE_BUILD_TYPE=Release"
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
# ptex is only needed when nicholas bishop is ready
cmake_d="$cmake_d -D NO_PTEX=1"
cmake_d="$cmake_d -D NO_CLEW=1"
# maya plugin, docs, tutorials, regression tests and examples are not needed
cmake_d="$cmake_d -D NO_MAYA=1 -D NO_DOC=1 -D NO_TUTORIALS=1 -D NO_REGRESSION=1 -DNO_EXAMPLES=1"
cmake $cmake_d ..
make -j$THREADS && make install
make clean
if [ -d $_inst ]; then
_create_inst_shortcut
else
ERROR "OpenSubdiv-$OSD_VERSION failed to compile, exiting"
exit 1
fi
magic_compile_set osd-$OSD_VERSION $osd_magic
cd $CWD
INFO "Done compiling OpenSubdiv-$OSD_VERSION!"
else
INFO "Own OpenSubdiv-$OSD_VERSION is up to date, nothing to do!"
INFO "If you want to force rebuild of this lib, use the --force-osd option."
fi
run_ldconfig "osd"
}
#### Build OpenCOLLADA ####
_init_opencollada() {
_src=$SRC/OpenCOLLADA-$OPENCOLLADA_VERSION
@@ -1523,7 +1660,7 @@ clean_OpenCOLLADA() {
compile_OpenCOLLADA() {
# To be changed each time we make edits that would modify the compiled results!
opencollada_magic=8
opencollada_magic=9
_init_opencollada
# Clean install if needed!
@@ -1799,8 +1936,9 @@ install_DEB() {
THEORA_DEV="libtheora-dev"
_packages="gawk cmake cmake-curses-gui scons build-essential libjpeg-dev libpng-dev \
libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev \
libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
libfreetype6-dev libx11-dev \
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev"
@@ -1978,7 +2116,7 @@ install_DEB() {
if [ $? -eq 0 ]; then
install_packages_DEB libboost-locale$boost_version-dev libboost-filesystem$boost_version-dev \
libboost-regex$boost_version-dev libboost-system$boost_version-dev \
libboost-thread$boost_version-dev
libboost-thread$boost_version-dev libboost-wave$boost_version-dev
clean_Boost
else
compile_Boost
@@ -2075,6 +2213,20 @@ install_DEB() {
fi
fi
PRINT ""
if $OSD_SKIP; then
WARNING "Skipping OpenSubdiv installation, as requested..."
else
if $have_llvm; then
install_packages_DEB flex bison libtbb-dev
# No package currently!
PRINT ""
compile_OSD
else
WARNING "No LLVM available, cannot build OSD!"
fi
fi
if $WITH_OPENCOLLADA; then
PRINT ""
if $OPENCOLLADA_SKIP; then
@@ -2273,9 +2425,9 @@ install_RPM() {
OGG_DEV="libogg-devel"
THEORA_DEV="libtheora-devel"
_packages="gcc gcc-c++ make scons libtiff-devel freetype-devel libjpeg-devel\
libpng-devel libX11-devel libXi-devel wget ncurses-devel \
readline-devel $OPENJPEG_DEV openal-soft-devel \
_packages="gcc gcc-c++ git make cmake scons libtiff-devel libjpeg-devel\
libpng-devel libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \
libxml2-devel yaml-cpp-devel tinyxml-devel"
@@ -2287,7 +2439,7 @@ install_RPM() {
if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
OPENEXR_DEV="openexr-devel"
_packages="$_packages libsqlite3x-devel fftw-devel SDL-devel"
_packages="$_packages freetype-devel libsqlite3x-devel fftw-devel SDL-devel"
if $WITH_ALL; then
_packages="$_packages jack-audio-connection-kit-devel"
@@ -2325,7 +2477,7 @@ install_RPM() {
elif [ $RPM = "SUSE" ]; then
OPENEXR_DEV="libopenexr-devel"
_packages="$_packages cmake sqlite3-devel fftw3-devel libSDL-devel"
_packages="$_packages cmake freetype2-devel sqlite3-devel fftw3-devel libSDL-devel"
PRINT ""
install_packages_RPM $_packages
@@ -2381,7 +2533,7 @@ install_RPM() {
if $NUMPY_SKIP; then
WARNING "Skipping NumPy installation, as requested..."
else
check_package_version_match_RPM python3-numpy $NUMPY_VERSION_MIN
check_package_version_ge_RPM python3-numpy $NUMPY_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM python3-numpy
elif $NUMPY_REQUIRED; then
@@ -2502,7 +2654,7 @@ install_RPM() {
else
if $have_llvm; then
# No package currently!
install_packages_RPM flex bison git
install_packages_RPM flex bison
if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
install_packages_RPM tbb-devel
fi
@@ -2513,12 +2665,29 @@ install_RPM() {
fi
fi
PRINT ""
if $OSD_SKIP; then
WARNING "Skipping OpenSubdiv installation, as requested..."
else
if $have_llvm; then
# No package currently!
install_packages_RPM flex bison
if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then
install_packages_RPM tbb-devel
fi
PRINT ""
compile_OSD
else
WARNING "No LLVM available, cannot build OSD!"
fi
fi
if $WITH_OPENCOLLADA; then
PRINT ""
if $OPENCOLLADA_SKIP; then
WARNING "Skipping OpenCOLLADA installation, as requested..."
else
install_packages_RPM pcre-devel git
install_packages_RPM pcre-devel
# Find path to libxml shared lib...
_XML2_LIB=`rpm -ql libxml2-devel | grep -e ".*/libxml2.so"`
# No package...
@@ -2626,7 +2795,8 @@ install_ARCH() {
OGG_DEV="libogg"
THEORA_DEV="libtheora"
_packages="base-devel scons cmake libxi glew libpng libtiff wget openal \
_packages="base-devel git scons cmake \
libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \
$OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl fftw \
libxml2 yaml-cpp tinyxml"
@@ -2813,7 +2983,7 @@ install_ARCH() {
clean_OSL
else
#XXX Note: will fail to build with LLVM 3.2!
install_packages_ARCH git intel-tbb
install_packages_ARCH intel-tbb
PRINT ""
compile_OSL
fi
@@ -2822,6 +2992,20 @@ install_ARCH() {
fi
fi
PRINT ""
if $OSD_SKIP; then
WARNING "Skipping OpenSubdiv installation, as requested..."
else
if $have_llvm; then
# No package currently? Just build for now!
install_packages_ARCH intel-tbb
PRINT ""
compile_OSD
else
WARNING "No LLVM available, cannot build OSD!"
fi
fi
if $WITH_OPENCOLLADA; then
PRINT ""
if $OPENCOLLADA_SKIP; then
@@ -2832,7 +3016,7 @@ install_ARCH() {
install_packages_ARCH opencollada
clean_OpenCOLLADA
else
install_packages_ARCH pcre git
install_packages_ARCH pcre
PRINT ""
compile_OpenCOLLADA
fi
@@ -2933,6 +3117,10 @@ print_info() {
PRINT "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..."
PRINT ""
PRINT ""
PRINT "Ran with:"
PRINT " install_deps.sh $COMMANDLINE"
PRINT ""
PRINT ""
PRINT "If you're using CMake add this to your configuration flags:"
_buildargs=""
@@ -2983,7 +3171,7 @@ print_info() {
_buildargs="$_buildargs $_1"
fi
if [ -d $INST/llvm ]; then
_1="-D LLVM_DIRECTORY=$INST/llvm"
_1="-D LLVM_ROOT_DIR=$INST/llvm"
_2="-D LLVM_STATIC=ON"
PRINT " $_1"
PRINT " $_2"
@@ -2997,6 +3185,14 @@ print_info() {
_buildargs="$_buildargs $_1 $_2"
fi
if [ -d $INST/osd ]; then
_1="-D WITH_OPENSUBDIV=ON"
_2="-D OPENSUBDIV_ROOT_DIR=$INST/osd"
PRINT " $_1"
PRINT " $_2"
_buildargs="$_buildargs $_1 $_2"
fi
if $WITH_OPENCOLLADA; then
_1="-D WITH_OPENCOLLADA=ON"
PRINT " $_1"
@@ -3039,10 +3235,10 @@ print_info() {
PRINT "BF_OPENEXR = '$INST/openexr'"
_ilm_libs_ext=""
version_ge $OPENEXR_VERSION "2.1.0"
if [ $? -eq 0 ]; then
_ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
fi
#~ version_ge $OPENEXR_VERSION "2.1.0"
#~ if [ $? -eq 0 ]; then
#~ _ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
#~ fi
PRINT "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '"
# BF_OPENEXR_LIB does not work, things like '-lIlmImf-2_1' do not suit ld.
# For now, hack around!!!
@@ -3063,6 +3259,13 @@ print_info() {
PRINT "BF_OSL = '$INST/osl'"
fi
if [ "$OSD_SKIP" = false ]; then
PRINT "WITH_BF_OPENSUBDIV = True"
if [ -d $INST/osd ]; then
PRINT "BF_OPENSUBDIV = '$INST/osd'"
fi
fi
if [ "$BOOST_SKIP" = false ]; then
PRINT "WITH_BF_BOOST = True"
if [ -d $INST/boost ]; then
@@ -3109,7 +3312,27 @@ elif [ -f /etc/redhat-release -o /etc/SuSE-release ]; then
DISTRO="RPM"
install_RPM
else
ERROR "Failed to detect distribution type"
ERROR "Failed to detect distribution type."
PRINT ""
PRINT "Your distribution is not supported by this script, you'll have to install dependencies and"
PRINT "dev packages yourself (list non-exhaustive, but should cover most needs):"
PRINT " * Basics of dev environment (cmake or scons, gcc, svn , git, ...)."
PRINT " * Python$PYTHON_VERSION_MIN, numpy."
PRINT " * libboost$BOOST_VERSION_MIN (locale, filesystem, regex, system, thread, wave)."
PRINT " * libjpeg, libpng, libtiff, libopenjpeg, libopenal."
PRINT " * ffmpeg (with libvorbis, libogg, libtheora, libx264, libmp3lame, libxvidcore, libvpx, ...)."
PRINT " * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed)."
PRINT " * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp."
PRINT " * libsdl1.2, libglew, libglewmx."
PRINT " * libopencolorio$OCIO_VERSION_MIN, libopenexr$OPENEXR_VERSION_MIN, libopenimageio$OIIO_VERSION_MIN."
PRINT " * llvm-$LLVM_VERSION (with clang)."
PRINT ""
PRINT "Most of up-listed packages are available in recent distributions. The following are likely not,"
PRINT "you'll have to build them (they are all optional, though):"
PRINT " * OpenShadingLanguage (from https://github.com/Nazg-Gul/OpenShadingLanguage.git, branch blender-fixes, commit 22ee5ea298fd215430dfbd160b5aefd507f06db0)."
PRINT " * OpenSubDiv (from https://github.com/PixarAnimationStudios/OpenSubdiv.git, branch dev, commit 404659fffa659da075d1c9416e4fc939139a84ee)."
PRINT " * OpenCollada (from https://github.com/KhronosGroup/OpenCOLLADA.git, branch master, commit 3335ac164e68b2512a40914b14c74db260e6ff7d)."
PRINT ""
exit 1
fi

View File

@@ -0,0 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
set(LLVM_VERSION_MAJOR 3)
set(LLVM_VERSION_MINOR 1)
-set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}svn")
+set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

View File

@@ -0,0 +1,12 @@
--- a/src/shaders/CMakeLists.txt
+++ b/src/shaders/CMakeLists.txt
@@ -27,7 +27,7 @@ macro (osl_compile oslsrc objlist headers)
message (STATUS "cmd: ${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc ${oslsrc}")
endif ()
add_custom_command (OUTPUT ${osofile}
- COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" ${oslsrc}
+ COMMAND "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc" "-o" ${osofile} ${oslsrc}
MAIN_DEPENDENCY ${oslsrc}
DEPENDS ${${headers}} ${oslsrc} "${CMAKE_CURRENT_BINARY_DIR}/stdosl.h" "${CMAKE_CURRENT_BINARY_DIR}/../oslc/oslc"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

View File

@@ -124,13 +124,15 @@ BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_IS_NEW_OSL = False
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = False
WITH_BF_STATICOSL = BF_IS_NEW_OSL
BF_OSL = '/opt/lib/osl'
BF_OSL_INC = '${BF_OSL}/include'
# note oslexec would passed via program linkflags, which is needed to
# make llvm happy with osl_allocate_closure_component
BF_OSL_LIB = 'oslcomp oslexec oslquery'
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
@@ -157,13 +159,27 @@ BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
if BF_IS_NEW_OSL:
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# Ocean Simulation
WITH_BF_OCEANSIM = True
# OpenSubdiv
WITH_BF_OPENSUBDIV = True
WITH_BF_STATICOPENSUBDIV = True
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
if BF_IS_NEW_OSL:
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
else:
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -124,13 +124,15 @@ BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_IS_NEW_OSL = False
WITH_BF_CYCLES_OSL = True
WITH_BF_STATICOSL = False
WITH_BF_STATICOSL = BF_IS_NEW_OSL
BF_OSL = '/opt/lib/osl'
BF_OSL_INC = '${BF_OSL}/include'
# note oslexec would passed via program linkflags, which is needed to
# make llvm happy with osl_allocate_closure_component
BF_OSL_LIB = 'oslcomp oslexec oslquery'
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
BF_OSL_LIBPATH = '${BF_OSL}/lib'
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
@@ -157,13 +159,27 @@ BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
${BF_BOOST_LIBPATH}/libboost_thread.a'
if BF_IS_NEW_OSL:
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
# Ocean Simulation
WITH_BF_OCEANSIM = True
# OpenSubdiv
WITH_BF_OPENSUBDIV = True
WITH_BF_STATICOPENSUBDIV = True
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
# Compilation and optimization
BF_DEBUG = False
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
PLATFORM_LINKFLAGS = ['-lrt']
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
if BF_IS_NEW_OSL:
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
else:
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']

View File

@@ -5,3 +5,5 @@ WITH_BF_CYCLES_CUDA_BINARIES = True
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !
WITH_BF_COLLADA = False # we drop 32bit, newest collada is only x86_64 !

View File

@@ -1,5 +1,6 @@
CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True

View File

@@ -4,10 +4,10 @@
# <pep8 compliant>
# List of the branches being built automatically overnight
NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
NIGHT_SCHEDULE_BRANCHES = [None]
# List of the branches available for force build
FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
"""
Stock Twisted directory lister doesn't provide any information about last file
@@ -17,6 +17,7 @@ modification time, we hack the class a bit in order to have such functionaliity
from buildbot.status.web.base import DirectoryLister
def get_files_and_directories(self, directory):
from twisted.web.static import (getTypeAndEncoding,
formatFileSize)
@@ -97,6 +98,7 @@ all_repositories = {
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
}
def codebaseGenerator(chdict):
return all_repositories[chdict['repository']]
@@ -112,6 +114,7 @@ from buildbot.schedulers import timed, forcesched
c['schedulers'] = []
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
@@ -143,7 +146,7 @@ def schedule_build(name, hour, minute=0):
"blender-addons": {"repository": "", "branch": "master"},
"blender-addons-contrib": {"repository": "", "branch": "master"},
"scons": {"repository": "", "branch": "master"},
"lib svn": {"repository": "", "branch": "master"}},
"lib svn": {"repository": "", "branch": "trunk"}},
branch=current_branch,
builderNames=[name],
hour=hour,
@@ -302,12 +305,12 @@ add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder,
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
#add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
#add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
#add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)

View File

@@ -37,6 +37,7 @@ def strip_extension(filename):
return filename
# extract platform from package name
def get_platform(filename):
# name is blender-version-platform.extension. we want to get the
@@ -64,10 +65,11 @@ def get_platform(filename):
return '-'.join(platform_tokens)
def get_branch(filename):
tokens = filename.split("-")
branch = ""
for token in tokens:
if token == "blender":
return branch
@@ -93,7 +95,7 @@ if not os.path.exists(filename):
try:
z = zipfile.ZipFile(filename, "r")
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
sys.exit(1)
@@ -122,14 +124,16 @@ else:
directory = 'public_html/download'
try:
filename = os.path.join(directory, packagename)
zf = z.open(package)
f = file(os.path.join(directory, packagename), "wb")
f = file(filename, "wb")
shutil.copyfileobj(zf, f)
os.chmod(filename, 0644)
zf.close()
z.close()
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)
@@ -139,6 +143,6 @@ try:
if get_platform(f) == platform and get_branch(f) == branch:
if f != packagename:
os.remove(os.path.join(directory, f))
except Exception, ex:
except Exception as ex:
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
sys.exit(1)

View File

@@ -47,9 +47,9 @@ if 'cmake' in builder:
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
if 'win64' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013 Win64"'])
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
elif 'win32' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013"'])
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
@@ -57,7 +57,10 @@ if 'cmake' in builder:
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
if retcode != 0:
sys.exit(retcode)
if 'win' in builder:
if 'win32' in builder:
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/Property:PlatformToolset=v120_xp', '/p:Configuration=Release'])
elif 'win64' in builder:
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
else:
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
@@ -116,6 +119,8 @@ else:
if config.find('player') != -1:
scons_options.append('BF_BUILDDIR=%s_player' % (build_dir))
elif config.find('cuda') != -1:
scons_options.append('BF_BUILDDIR=%s_cuda' % (build_dir))
else:
scons_options.append('BF_BUILDDIR=%s' % (build_dir))
@@ -140,7 +145,7 @@ else:
retcode = subprocess.call(cur_scons_cmd + scons_options)
if retcode != 0:
print('Error building rules wuth config ' + config)
print('Error building rules with config ' + config)
sys.exit(retcode)
sys.exit(0)

View File

@@ -116,24 +116,36 @@ if builder.find('scons') != -1:
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
#cmake
# CMake
if 'win' in builder:
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
for f in files:
os.remove(f)
retcode = subprocess.call(['cpack', '-G','ZIP'])
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
os.rename(result_file, "{}.zip".format(builder))
# TODO(sergey): Such magic usually happens in SCon's packaging bu we don't have it
# in the CMake yet. For until then we do some magic here.
tokens = result_file.split('-')
blender_version = tokens[1].split('.')
blender_full_version = '.'.join(blender_version[0:2])
git_hash = tokens[2].split('.')[1]
platform = builder.split('_')[0]
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
if branch != '':
builderified_name = branch + "-" + builderified_name
os.rename(result_file, "{}.zip".format(builderified_name))
# create zip file
try:
upload_zip = "buildbot_upload.zip"
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write("{}.zip".format(builder))
z.write("{}.zip".format(builderified_name))
z.close()
sys.exit(retcode)
except Exception, ex:
except Exception as ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)
@@ -149,7 +161,7 @@ if os.path.exists(release_dir):
# create release package
try:
subprocess.call(['make', 'package_archive'])
except Exception, ex:
except Exception as ex:
sys.stderr.write('Make package release failed' + str(ex) + '\n')
sys.exit(1)
@@ -180,6 +192,6 @@ try:
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write(filepath, arcname=file)
z.close()
except Exception, ex:
except Exception as ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)

View File

@@ -0,0 +1,113 @@
# - Try to find audaspace
# Once done, this will define
#
# AUDASPACE_FOUND - system has audaspace
# AUDASPACE_INCLUDE_DIRS - the audaspace include directories
# AUDASPACE_LIBRARIES - link these to use audaspace
# AUDASPACE_C_FOUND - system has audaspace's C binding
# AUDASPACE_C_INCLUDE_DIRS - the audaspace's C binding include directories
# AUDASPACE_C_LIBRARIES - link these to use audaspace's C binding
# AUDASPACE_PY_FOUND - system has audaspace's python binding
# AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
# AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
ENDIF()
SET(_audaspace_SEARCH_DIRS
${AUDASPACE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
# Use pkg-config to get hints about paths
FIND_PACKAGE(PkgConfig)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace)
ENDIF(PKG_CONFIG_FOUND)
# Include dir
FIND_PATH(AUDASPACE_INCLUDE_DIR
NAMES ISound.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_LIBRARY
NAMES audaspace
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
# Include dir
FIND_PATH(AUDASPACE_C_INCLUDE_DIR
NAMES AUD_Sound.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_C_LIBRARY
NAMES audaspace-c
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
# Include dir
FIND_PATH(AUDASPACE_PY_INCLUDE_DIR
NAMES python/PyAPI.h
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
PATH_SUFFIXES include/audaspace
)
# Library
FIND_LIBRARY(AUDASPACE_PY_LIBRARY
NAMES audaspace-py
HINTS ${_audaspace_SEARCH_DIRS}
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
PATH_SUFFIXES lib lib64
)
FIND_PACKAGE(PackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace DEFAULT_MSG AUDASPACE_LIBRARY AUDASPACE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_C DEFAULT_MSG AUDASPACE_C_LIBRARY AUDASPACE_C_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_Py DEFAULT_MSG AUDASPACE_PY_LIBRARY AUDASPACE_PY_INCLUDE_DIR)
IF(AUDASPACE_FOUND)
SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
ENDIF(AUDASPACE_FOUND)
IF(AUDASPACE_C_FOUND)
SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
ENDIF(AUDASPACE_C_FOUND)
IF(AUDASPACE_PY_FOUND)
SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
ENDIF(AUDASPACE_PY_FOUND)
MARK_AS_ADVANCED(
AUDASPACE_LIBRARY
AUDASPACE_LIBRARIES
AUDASPACE_INCLUDE_DIR
AUDASPACE_INCLUDE_DIRS
AUDASPACE_C_LIBRARY
AUDASPACE_C_LIBRARIES
AUDASPACE_C_INCLUDE_DIR
AUDASPACE_C_INCLUDE_DIRS
AUDASPACE_PY_LIBRARY
AUDASPACE_PY_LIBRARIES
AUDASPACE_PY_INCLUDE_DIR
AUDASPACE_PY_INCLUDE_DIRS
)

View File

@@ -0,0 +1,56 @@
# - Find Eigen3 library
# Find the native Eigen3 includes and library
# This module defines
# EIGEN3_INCLUDE_DIRS, where to find spnav.h, Set when
# EIGEN3_INCLUDE_DIR is found.
# EIGEN3_ROOT_DIR, The base directory to search for Eigen3.
# This can also be an environment variable.
# EIGEN3_FOUND, If false, do not try to use Eigen3.
#
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If EIGEN3_ROOT_DIR was defined in the environment, use it.
IF(NOT EIGEN3_ROOT_DIR AND NOT $ENV{EIGEN3_ROOT_DIR} STREQUAL "")
SET(EIGEN3_ROOT_DIR $ENV{EIGEN3_ROOT_DIR})
ENDIF()
SET(_eigen3_SEARCH_DIRS
${EIGEN3_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(EIGEN3_INCLUDE_DIR
NAMES
# header has no '.h' suffix
Eigen/Eigen
HINTS
${_eigen3_SEARCH_DIRS}
PATH_SUFFIXES
include/eigen3
)
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
EIGEN3_INCLUDE_DIR)
IF(EIGEN3_FOUND)
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
ENDIF(EIGEN3_FOUND)
MARK_AS_ADVANCED(
EIGEN3_INCLUDE_DIR
)

View File

@@ -33,6 +33,7 @@ SET(_jemalloc_SEARCH_DIRS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/jemalloc
)
FIND_PATH(JEMALLOC_INCLUDE_DIR

View File

@@ -0,0 +1,94 @@
# - Find LLVM library
# Find the native LLVM includes and library
# This module defines
# LLVM_INCLUDE_DIRS, where to find LLVM.h, Set when LLVM_INCLUDE_DIR is found.
# LLVM_LIBRARIES, libraries to link against to use LLVM.
# LLVM_ROOT_DIR, The base directory to search for LLVM.
# This can also be an environment variable.
# LLVM_FOUND, If false, do not try to use LLVM.
#
# also defined, but not for general use are
# LLVM_LIBRARY, where to find the LLVM library.
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
if(LLVM_ROOT_DIR)
if(DEFINED LLVM_VERSION)
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
endif()
else()
if(DEFINED LLVM_VERSION)
message(running llvm-config-${LLVM_VERSION})
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
endif()
if(NOT LLVM_CONFIG)
find_program(LLVM_CONFIG llvm-config)
endif()
endif()
if(NOT DEFINED LLVM_VERSION)
execute_process(COMMAND ${LLVM_CONFIG} --version
OUTPUT_VARIABLE LLVM_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
endif()
if(NOT LLVM_ROOT_DIR)
execute_process(COMMAND ${LLVM_CONFIG} --prefix
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
endif()
if(NOT LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir
OUTPUT_VARIABLE LLVM_LIBPATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
mark_as_advanced(LLVM_LIBPATH)
endif()
if(LLVM_STATIC)
find_library(LLVM_LIBRARY
NAMES LLVMAnalysis # first of a whole bunch of libs to get
PATHS ${LLVM_LIBPATH})
else()
find_library(LLVM_LIBRARY
NAMES LLVM-${LLVM_VERSION}
PATHS ${LLVM_LIBPATH})
endif()
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
if(LLVM_STATIC)
# if static LLVM libraries were requested, use llvm-config to generate
# the list of what libraries we need, and substitute that in the right
# way for LLVM_LIBRARY.
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
endif()
endif()
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
LLVM_LIBRARY)
MARK_AS_ADVANCED(
LLVM_LIBRARY
)

View File

@@ -0,0 +1,68 @@
# - Find LZO library
# Find the native LZO includes and library
# This module defines
# LZO_INCLUDE_DIRS, where to find lzo1x.h, Set when
# LZO_INCLUDE_DIR is found.
# LZO_LIBRARIES, libraries to link against to use LZO.
# LZO_ROOT_DIR, The base directory to search for LZO.
# This can also be an environment variable.
# LZO_FOUND, If false, do not try to use LZO.
#
# also defined, but not for general use are
# LZO_LIBRARY, where to find the LZO library.
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If LZO_ROOT_DIR was defined in the environment, use it.
IF(NOT LZO_ROOT_DIR AND NOT $ENV{LZO_ROOT_DIR} STREQUAL "")
SET(LZO_ROOT_DIR $ENV{LZO_ROOT_DIR})
ENDIF()
SET(_lzo_SEARCH_DIRS
${LZO_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
HINTS
${_lzo_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(LZO_LIBRARY
NAMES
lzo2
HINTS
${_lzo_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
LZO_LIBRARY LZO_INCLUDE_DIR)
IF(LZO_FOUND)
SET(LZO_LIBRARIES ${LZO_LIBRARY})
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
ENDIF(LZO_FOUND)
MARK_AS_ADVANCED(
LZO_INCLUDE_DIR
LZO_LIBRARY
)

View File

@@ -51,6 +51,7 @@ SET(_openexr_SEARCH_DIRS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/openexr
)
FIND_PATH(OPENEXR_INCLUDE_DIR

View File

@@ -71,6 +71,7 @@ ENDIF()
MARK_AS_ADVANCED(
OPENGLES_EGL_INCLUDE_DIR
OPENGLES_EGL_LIBRARY
OPENGLES_LIBRARY
OPENGLES_INCLUDE_DIR
)

View File

@@ -7,6 +7,8 @@
# OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
# This can also be an environment variable.
# OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
# OPENIMAGEIO_PUGIXML_FOUND, Indicates whether OIIO has biltin PuguXML parser.
# OPENIMAGEIO_IDIFF, full path to idiff application if found.
#
# also defined, but not for general use are
# OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
@@ -54,6 +56,15 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
lib64 lib
)
FIND_FILE(OPENIMAGEIO_IDIFF
NAMES
idiff
HINTS
${OPENIMAGEIO_ROOT_DIR}
PATH_SUFFIXES
bin
)
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -63,11 +74,17 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
IF(OPENIMAGEIO_FOUND)
SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
ENDIF(OPENIMAGEIO_FOUND)
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
ENDIF()
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
OPENIMAGEIO_INCLUDE_DIR
OPENIMAGEIO_LIBRARY
OPENIMAGEIO_IDIFF
)
UNSET(_openimageio_SEARCH_DIRS)

View File

@@ -0,0 +1,98 @@
# - Find OpenShadingLanguage library
# Find the native OpenShadingLanguage includes and library
# This module defines
# OSL_INCLUDE_DIRS, where to find OSL headers, Set when
# OSL_INCLUDE_DIR is found.
# OSL_LIBRARIES, libraries to link against to use OSL.
# OSL_ROOT_DIR, the base directory to search for OSL.
# This can also be an environment variable.
# OSL_COMPILER, full path to OSL script compiler.
# OSL_FOUND, if false, do not try to use OSL.
# OSL_LIBRARY_VERSION_MAJOR, OSL_LIBRARY_VERSION_MINOR, the major
# and minor versions of OSL library if found.
#
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If OSL_ROOT_DIR was defined in the environment, use it.
IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
SET(OSL_ROOT_DIR $ENV{OSL_ROOT_DIR})
ENDIF()
SET(_osl_FIND_COMPONENTS
oslcomp
oslexec
oslquery
)
SET(_osl_SEARCH_DIRS
${OSL_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/osl
)
FIND_PATH(OSL_INCLUDE_DIR
NAMES
OSL/oslversion.h
HINTS
${_osl_SEARCH_DIRS}
PATH_SUFFIXES
include
)
SET(_osl_LIBRARIES)
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
FIND_LIBRARY(OSL_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}
HINTS
${_osl_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
FIND_PROGRAM(OSL_COMPILER oslc
HINTS ${_osl_SEARCH_DIRS}
PATH_SUFFIXES bin)
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSL DEFAULT_MSG _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
IF(OSL_FOUND)
SET(OSL_LIBRARIES ${_osl_LIBRARIES})
SET(OSL_INCLUDE_DIRS ${OSL_INCLUDE_DIR})
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
ENDIF(OSL_FOUND)
MARK_AS_ADVANCED(
OSL_INCLUDE_DIR
)
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
MARK_AS_ADVANCED(OSL_${UPPERCOMPONENT}_LIBRARY)
ENDFOREACH()

View File

@@ -0,0 +1,111 @@
# - Find OpenSubdiv library
# Find the native OpenSubdiv includes and library
# This module defines
# OPENSUBDIV_INCLUDE_DIRS, where to find OpenSubdiv headers, Set when
# OPENSUBDIV_INCLUDE_DIR is found.
# OPENSUBDIV_LIBRARIES, libraries to link against to use OpenSubdiv.
# OPENSUBDIV_ROOT_DIR, the base directory to search for OpenSubdiv.
# This can also be an environment variable.
# OPENSUBDIV_FOUND, if false, do not try to use OpenSubdiv.
#
# also defined, but not for general use are
# OPENSUBDIV_LIBRARY, where to find the OpenSubdiv library.
#=============================================================================
# Copyright 2013 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If OPENSUBDIV_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENSUBDIV_ROOT_DIR AND NOT $ENV{OPENSUBDIV_ROOT_DIR} STREQUAL "")
SET(OPENSUBDIV_ROOT_DIR $ENV{OPENSUBDIV_ROOT_DIR})
ENDIF()
SET(_opensubdiv_FIND_COMPONENTS
osdGPU
osdCPU
)
SET(_opensubdiv_SEARCH_DIRS
${OPENSUBDIV_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/opensubdiv
)
FIND_PATH(OPENSUBDIV_INCLUDE_DIR
NAMES
opensubdiv/osd/mesh.h
HINTS
${_opensubdiv_SEARCH_DIRS}
PATH_SUFFIXES
include
)
SET(_opensubdiv_LIBRARIES)
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
FIND_LIBRARY(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}
HINTS
${_opensubdiv_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
LIST(APPEND _opensubdiv_LIBRARIES "${OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
MACRO(OPENSUBDIV_CHECK_CONTROLLER
controller_include_file
variable_name)
IF(EXISTS "${OPENSUBDIV_INCLUDE_DIR}/opensubdiv/osd/${controller_include_file}")
SET(${variable_name} TRUE)
ELSE()
SET(${variable_name} FALSE)
ENDIF()
ENDMACRO()
# handle the QUIETLY and REQUIRED arguments and set OPENSUBDIV_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSubdiv DEFAULT_MSG
_opensubdiv_LIBRARIES OPENSUBDIV_INCLUDE_DIR)
IF(OPENSUBDIV_FOUND)
SET(OPENSUBDIV_LIBRARIES ${_opensubdiv_LIBRARIES})
SET(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
# Find available compute controllers.
FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
SET(OPENSUBDIV_HAS_OPENMP TRUE)
ELSE()
SET(OPENSUBDIV_HAS_OPENMP FALSE)
ENDIF()
OPENSUBDIV_CHECK_CONTROLLER("tbbEvaluator.h" OPENSUBDIV_HAS_TBB)
OPENSUBDIV_CHECK_CONTROLLER("clEvaluator.h" OPENSUBDIV_HAS_OPENCL)
OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA)
OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE)
ENDIF(OPENSUBDIV_FOUND)
MARK_AS_ADVANCED(
OPENSUBDIV_INCLUDE_DIR
)
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
MARK_AS_ADVANCED(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY)
ENDFOREACH()

View File

@@ -40,7 +40,6 @@ FIND_PATH(PCRE_INCLUDE_DIR pcre.h
${_pcre_SEARCH_DIRS}
PATH_SUFFIXES
include
include
)
FIND_LIBRARY(PCRE_LIBRARY

View File

@@ -0,0 +1,73 @@
# - Find PugiXML library
# Find the native PugiXML includes and library
# This module defines
# PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
# PugiXML is found.
# PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
# PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
# This can also be an environment variable.
# PUGIXML_FOUND, If false, do not try to use PugiXML.
#
# also defined, but not for general use are
# PUGIXML_LIBRARY, where to find the PugiXML library.
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If PUGIXML_ROOT_DIR was defined in the environment, use it.
IF(NOT PUGIXML_ROOT_DIR AND NOT $ENV{PUGIXML_ROOT_DIR} STREQUAL "")
SET(PUGIXML_ROOT_DIR $ENV{PUGIXML_ROOT_DIR})
ENDIF()
SET(_pugixml_SEARCH_DIRS
${PUGIXML_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt/lib/oiio
)
FIND_PATH(PUGIXML_INCLUDE_DIR
NAMES
pugixml.hpp
HINTS
${_pugixml_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(PUGIXML_LIBRARY
NAMES
pugixml
HINTS
${_pugixml_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
IF(PUGIXML_FOUND)
SET(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
SET(PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
ELSE()
SET(PUGIXML_PUGIXML_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
PUGIXML_INCLUDE_DIR
PUGIXML_LIBRARY
)

View File

@@ -14,6 +14,7 @@
# PYTHON_INCLUDE_CONFIG_DIRS
# PYTHON_LIBRARIES
# PYTHON_LIBPATH, Used for installation
# PYTHON_SITE_PACKAGES, Used for installation (as a Python module)
# PYTHON_LINKFLAGS
# PYTHON_ROOT_DIR, The base directory to search for Python.
# This can also be an environment variable.
@@ -65,6 +66,14 @@ IF(DEFINED PYTHON_LIBPATH)
SET(_IS_LIB_PATH_DEF ON)
ENDIF()
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/lib/python-${PYTHON_VERSION}"
)
# only search for the dirs if we havn't already
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
@@ -74,14 +83,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
"dm;dmu;du;d" # debug
)
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/lib/python-${PYTHON_VERSION}"
)
FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
#IF(CMAKE_BUILD_TYPE STREQUAL Debug)
@@ -146,6 +148,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
ENDIF()
IF(PYTHON_LIBRARY AND PYTHON_LIBPATH AND PYTHON_INCLUDE_DIR AND PYTHON_INCLUDE_CONFIG_DIR)
SET(_PYTHON_ABI_FLAGS "${_CURRENT_ABI_FLAGS}")
break()
ELSE()
# ensure we dont find values from 2 different ABI versions
@@ -168,7 +171,6 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
UNSET(_CURRENT_PATH)
UNSET(_python_ABI_FLAGS)
UNSET(_python_SEARCH_DIRS)
ENDIF()
UNSET(_IS_INC_DEF)
@@ -187,17 +189,41 @@ IF(PYTHONLIBSUNIX_FOUND)
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
FIND_FILE(PYTHON_SITE_PACKAGES
NAMES
# debian specific
dist-packages
site-packages
HINTS
${PYTHON_LIBPATH}/python${PYTHON_VERSION}
)
# we need this for installation
# XXX No more valid with debian-like py3.4 packages...
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
# not used
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
# not required for build, just used when bundling Python.
FIND_PROGRAM(
PYTHON_EXECUTABLE
NAMES
"python${PYTHON_VERSION}${_PYTHON_ABI_FLAGS}"
"python${PYTHON_VERSION}"
"python"
HINTS
${_python_SEARCH_DIRS}
PATH_SUFFIXES bin
)
ENDIF()
UNSET(_PYTHON_VERSION_NO_DOTS)
UNSET(_PYTHON_ABI_FLAGS)
UNSET(_python_SEARCH_DIRS)
MARK_AS_ADVANCED(
PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_CONFIG_DIR
PYTHON_LIBRARY
PYTHON_LIBPATH
PYTHON_SITE_PACKAGES
PYTHON_EXECUTABLE
)

View File

@@ -0,0 +1,72 @@
# - Find SDL library
# Find the native SDL includes and library
# This module defines
# SDL2_INCLUDE_DIRS, where to find SDL.h, Set when SDL2_INCLUDE_DIR is found.
# SDL2_LIBRARIES, libraries to link against to use SDL.
# SDL2_ROOT_DIR, The base directory to search for SDL.
# This can also be an environment variable.
# SDL2_FOUND, If false, do not try to use SDL.
#
# also defined, but not for general use are
# SDL2_LIBRARY, where to find the SDL library.
#=============================================================================
# Copyright 2015 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If SDL2_ROOT_DIR was defined in the environment, use it.
IF(NOT SDL2_ROOT_DIR AND NOT $ENV{SDL2_ROOT_DIR} STREQUAL "")
SET(SDL2_ROOT_DIR $ENV{SDL2_ROOT_DIR})
ENDIF()
SET(_sdl2_SEARCH_DIRS
${SDL2_ROOT_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
)
FIND_PATH(SDL2_INCLUDE_DIR
NAMES
SDL.h
HINTS
${_sdl2_SEARCH_DIRS}
PATH_SUFFIXES
include/SDL2 include
)
FIND_LIBRARY(SDL2_LIBRARY
NAMES
SDL2
HINTS
${_sdl2_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
SDL2_LIBRARY SDL2_INCLUDE_DIR)
IF(SDL2_FOUND)
SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
ENDIF(SDL2_FOUND)
MARK_AS_ADVANCED(
SDL2_INCLUDE_DIR
SDL2_LIBRARY
)

View File

@@ -12,7 +12,7 @@
#
#=============================================================================
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -32,16 +32,28 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
bf_testing_main
bf_intern_guardedalloc
extern_gtest
# needed for glog
${PTHREADS_LIBRARIES}
extern_glog)
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
if(${DO_ADD_TEST})
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
endif()
endif()
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
endmacro()
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
endmacro()

View File

@@ -10,7 +10,7 @@ set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
# The FindGit.cmake module is part of the standard distribution
include(FindGit)
find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
@@ -60,7 +60,8 @@ if(EXISTS ${SOURCE_DIR}/.git)
execute_process(COMMAND git log HEAD..@{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
@@ -96,6 +97,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE)
# May fail in rare cases
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
set(MY_WC_COMMIT_TIMESTAMP 0)
endif()
# Update GIT index before getting dirty files
execute_process(COMMAND git update-index -q --refresh

View File

@@ -28,13 +28,17 @@ if not sys.version.startswith("3"):
sys.version.partition(" ")[0])
sys.exit(1)
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
from cmake_consistency_check_config import (
IGNORE,
UTF8_CHECK,
SOURCE_DIR,
BUILD_DIR,
)
import os
from os.path import join, dirname, normpath, splitext
print("Scanning:", SOURCE_DIR)
global_h = set()
global_c = set()
global_refs = {}
@@ -134,6 +138,7 @@ def cmake_get_src(f):
if found:
cmake_base = dirname(f)
cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
while it is not None:
i += 1
@@ -154,6 +159,8 @@ def cmake_get_src(f):
# replace dirs
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
l = l.strip('"')
if not l:
pass
@@ -187,17 +194,22 @@ def cmake_get_src(f):
pass
elif new_file.endswith(".osl"): # open shading language
pass
elif new_file.endswith(".glsl"):
pass
else:
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
elif context_name == "INC":
if os.path.isdir(new_file):
if new_file.startswith(BUILD_DIR):
# assume generated path
pass
elif os.path.isdir(new_file):
new_path_rel = os.path.relpath(new_file, cmake_base)
if new_path_rel != l:
print("overly relative path:\n %s:%d\n %s\n %s" % (f, i, l, new_path_rel))
## Save time. just replace the line
# # Save time. just replace the line
# replace_line(f, i - 1, new_path_rel)
else:
@@ -228,10 +240,6 @@ def cmake_get_src(f):
filen.close()
for cmake in source_list(SOURCE_DIR, is_cmake):
cmake_get_src(cmake)
def is_ignore(f):
for ig in IGNORE:
if ig in f:
@@ -239,73 +247,83 @@ def is_ignore(f):
return False
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
is_err = False
errs = []
for f in (global_h | global_c):
if f.endswith("dna.c"):
continue
def main():
if not os.path.exists(f):
refs = global_refs[f]
if refs:
for cf, i in refs:
errs.append((cf, i))
else:
raise Exception("CMake referenecs missing, internal error, aborting!")
is_err = True
print("Scanning:", SOURCE_DIR)
errs.sort()
errs.reverse()
for cf, i in errs:
print("%s:%d" % (cf, i))
# Write a 'sed' script, useful if we get a lot of these
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
for cmake in source_list(SOURCE_DIR, is_cmake):
cmake_get_src(cmake)
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
is_err = False
errs = []
for f in (global_h | global_c):
if f.startswith(BUILD_DIR):
continue
if not os.path.exists(f):
refs = global_refs[f]
if refs:
for cf, i in refs:
errs.append((cf, i))
else:
raise Exception("CMake referenecs missing, internal error, aborting!")
is_err = True
errs.sort()
errs.reverse()
for cf, i in errs:
print("%s:%d" % (cf, i))
# Write a 'sed' script, useful if we get a lot of these
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
if is_err:
raise Exception("CMake referenecs missing files, aborting!")
del is_err
del errs
if is_err:
raise Exception("CMake referenecs missing files, aborting!")
del is_err
del errs
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf):
if cf not in global_c:
print("missing_c: ", cf)
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
if not is_ignore(cf):
if cf not in global_c:
print("missing_c: ", cf)
# check if automake builds a corrasponding .o file.
'''
if cf in global_c:
out1 = os.path.splitext(cf)[0] + ".o"
out2 = os.path.splitext(cf)[0] + ".Po"
out2_dir, out2_file = out2 = os.path.split(out2)
out2 = os.path.join(out2_dir, ".deps", out2_file)
if not os.path.exists(out1) and not os.path.exists(out2):
print("bad_c: ", cf)
'''
# check if automake builds a corrasponding .o file.
'''
if cf in global_c:
out1 = os.path.splitext(cf)[0] + ".o"
out2 = os.path.splitext(cf)[0] + ".Po"
out2_dir, out2_file = out2 = os.path.split(out2)
out2 = os.path.join(out2_dir, ".deps", out2_file)
if not os.path.exists(out1) and not os.path.exists(out2):
print("bad_c: ", cf)
'''
print("\nC/C++ Headers CMake doesnt know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf):
if hf not in global_h:
print("missing_h: ", hf)
print("\nC/C++ Headers CMake doesnt know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
if not is_ignore(hf):
if hf not in global_h:
print("missing_h: ", hf)
if UTF8_CHECK:
# test encoding
import traceback
for files in (global_c, global_h):
for f in sorted(files):
if os.path.exists(f):
# ignore outside of our source tree
if "extern" not in f:
i = 1
try:
for l in open(f, "r", encoding="utf8"):
i += 1
except:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()
if UTF8_CHECK:
# test encoding
import traceback
for files in (global_c, global_h):
for f in sorted(files):
if os.path.exists(f):
# ignore outside of our source tree
if "extern" not in f:
i = 1
try:
for l in open(f, "r", encoding="utf8"):
i += 1
except UnicodeDecodeError:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()
if __name__ == "__main__":
main()

View File

@@ -74,3 +74,6 @@ IGNORE = (
UTF8_CHECK = True
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
# doesn't have to exist, just use as reference
BUILD_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(SOURCE_DIR, "..", "build"))))

View File

@@ -29,18 +29,20 @@ Example linux usage
Windows not supported so far
"""
from project_info import (SIMPLE_PROJECTFILE,
SOURCE_DIR,
CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
# is_py,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
from project_info import (
SIMPLE_PROJECTFILE,
SOURCE_DIR,
CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
# is_py,
cmake_advanced_info,
cmake_compiler_defines,
cmake_cache_var,
project_name_get,
)
import os
@@ -70,6 +72,10 @@ def create_nb_project_main():
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get()
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
make_exe_basename = os.path.basename(make_exe)
# --------------- NB spesific
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()]
@@ -130,9 +136,9 @@ def create_nb_project_main():
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<configurationDescriptor version="94">\n')
f.write('<configurationDescriptor version="95">\n')
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
f.write(' <df name="0" root="%s">\n' % SOURCE_DIR) # base_root_rel
f.write(' <df root="%s" name="0">\n' % SOURCE_DIR) # base_root_rel
# write files!
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
@@ -184,16 +190,27 @@ def create_nb_project_main():
f.write(' <toolsSet>\n')
f.write(' <compilerSet>default</compilerSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' </toolsSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' <codeAssistance>\n')
f.write(' </codeAssistance>\n')
f.write(' <makefileType>\n')
f.write(' <makeTool>\n')
f.write(' <buildCommandWorkingDir>.</buildCommandWorkingDir>\n')
f.write(' <buildCommand>${MAKE} -f Makefile</buildCommand>\n')
f.write(' <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>\n')
if make_exe_basename == "ninja":
build_cmd = "ninja"
clean_cmd = "ninja -t clean"
else:
build_cmd = "${MAKE} -f Makefile"
clean_cmd = "${MAKE} -f Makefile clean"
f.write(' <buildCommand>%s</buildCommand>\n' % build_cmd)
f.write(' <cleanCommand>%s</cleanCommand>\n' % clean_cmd)
f.write(' <executablePath>./bin/blender</executablePath>\n')
del build_cmd, clean_cmd
def write_toolinfo():
f.write(' <incDir>\n')
@@ -220,10 +237,11 @@ def create_nb_project_main():
f.write(' \n')
for path in files_rel_local:
is_c = path.endswith(".c")
f.write(' <item path="%s"\n' % path)
f.write(' ex="false"\n')
f.write(' tool="1"\n')
f.write(' flavor2="0">\n')
f.write(' tool="%d"\n' % (0 if is_c else 1))
f.write(' flavor2="%d">\n' % (3 if is_c else 0))
f.write(' </item>\n')
f.write(' <runprofile version="9">\n')

View File

@@ -22,26 +22,27 @@
# <pep8 compliant>
"""
r"""
Example Linux usage:
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
Example Win32 usage:
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
example linux usage
python .~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
"""
from project_info import (SIMPLE_PROJECTFILE,
SOURCE_DIR,
# CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
is_py,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
from project_info import (
SIMPLE_PROJECTFILE,
SOURCE_DIR,
# CMAKE_DIR,
PROJECT_DIR,
source_list,
is_project_file,
is_c_header,
is_py,
cmake_advanced_info,
cmake_compiler_defines,
project_name_get,
)
import os
import sys
@@ -63,18 +64,19 @@ def create_qtc_project_main():
if SIMPLE_PROJECTFILE:
# --- qtcreator specific, simple format
PROJECT_NAME = "Blender"
with open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w') as f:
FILE_NAME = PROJECT_NAME.lower()
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') as f:
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
if not os.path.exists(qtc_cfg):
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")

View File

@@ -1,5 +1,4 @@
# turn everything OFF except for python which defaults to ON
# and is needed for the UI
# Turn everything ON thats expected for an official release builds.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
@@ -13,6 +12,7 @@ set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
@@ -52,11 +52,18 @@ set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependant options
if(UNIX AND NOT APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
endif()
if(APPLE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
elseif (APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
endif()

View File

@@ -16,6 +16,7 @@ set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)

View File

@@ -48,7 +48,7 @@ macro(list_insert_before
unset(_index)
endmacro()
function (list_assert_duplicates
function(list_assert_duplicates
list_id
)
@@ -104,24 +104,48 @@ macro(file_list_suffix
endmacro()
macro(target_link_libraries_optimized TARGET LIBS)
function(target_link_libraries_optimized
TARGET
LIBS
)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} optimized "${_LIB}")
endforeach()
unset(_LIB)
endmacro()
endfunction()
function(target_link_libraries_debug
TARGET
LIBS
)
macro(target_link_libraries_debug TARGET LIBS)
foreach(_LIB ${LIBS})
target_link_libraries(${TARGET} debug "${_LIB}")
endforeach()
unset(_LIB)
endmacro()
endfunction()
function(target_link_libraries_decoupled
target
libraries_var
)
if(NOT MSVC)
target_link_libraries(${target} ${${libraries_var}})
else()
# For MSVC we link to different libraries depending whether
# release or debug target is being built.
file_list_suffix(_libraries_debug "${${libraries_var}}" "_d")
target_link_libraries_debug(${target} "${_libraries_debug}")
target_link_libraries_optimized(${target} "${${libraries_var}}")
endif()
endfunction()
# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
# use it instead of include_directories()
macro(blender_include_dirs
includes)
function(blender_include_dirs
includes
)
set(_ALL_INCS "")
foreach(_INC ${ARGV})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
@@ -132,13 +156,12 @@ macro(blender_include_dirs
##endif()
endforeach()
include_directories(${_ALL_INCS})
unset(_INC)
unset(_ABS_INC)
unset(_ALL_INCS)
endmacro()
endfunction()
function(blender_include_dirs_sys
includes
)
macro(blender_include_dirs_sys
includes)
set(_ALL_INCS "")
foreach(_INC ${ARGV})
get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
@@ -148,13 +171,11 @@ macro(blender_include_dirs_sys
##endif()
endforeach()
include_directories(SYSTEM ${_ALL_INCS})
unset(_INC)
unset(_ABS_INC)
unset(_ALL_INCS)
endmacro()
endfunction()
macro(blender_source_group
sources)
function(blender_source_group
sources
)
# Group by location on disk
source_group("Source Files" FILES CMakeLists.txt)
@@ -164,23 +185,23 @@ macro(blender_source_group
if((${_SRC_EXT} MATCHES ".h") OR
(${_SRC_EXT} MATCHES ".hpp") OR
(${_SRC_EXT} MATCHES ".hh"))
source_group("Header Files" FILES ${_SRC})
else()
source_group("Source Files" FILES ${_SRC})
endif()
endforeach()
unset(_SRC)
unset(_SRC_EXT)
endmacro()
set(GROUP_ID "Header Files")
else()
set(GROUP_ID "Source Files")
endif()
source_group("${GROUP_ID}" FILES ${_SRC})
endforeach()
endfunction()
# only MSVC uses SOURCE_GROUP
macro(blender_add_lib_nolist
function(blender_add_lib_nolist
name
sources
includes
includes_sys)
includes_sys
)
# message(STATUS "Configuring library ${name}")
@@ -200,22 +221,24 @@ macro(blender_add_lib_nolist
# Not for system includes because they can resolve to the same path
# list_assert_duplicates("${includes_sys}")
endmacro()
endfunction()
macro(blender_add_lib
function(blender_add_lib
name
sources
includes
includes_sys)
includes_sys
)
blender_add_lib_nolist(${name} "${sources}" "${includes}" "${includes_sys}")
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
endmacro()
endfunction()
macro(SETUP_LIBDIRS)
function(SETUP_LIBDIRS)
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -275,19 +298,27 @@ macro(SETUP_LIBDIRS)
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()
endmacro()
endfunction()
macro(setup_liblinks
target)
function(setup_liblinks
target
)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
target_link_libraries(${target}
${BLENDER_GL_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY})
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
target_link_libraries(
${target}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY}
)
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -303,12 +334,18 @@ macro(setup_liblinks
endif()
endif()
if(WITH_LZO AND WITH_SYSTEM_LZO)
target_link_libraries(${target} ${LZO_LIBRARIES})
endif()
if(WITH_SYSTEM_GLEW)
target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
target_link_libraries(${target} ${BULLET_LIBRARIES})
endif()
if(WITH_AUDASPACE AND WITH_SYSTEM_AUDASPACE)
target_link_libraries(${target} ${AUDASPACE_C_LIBRARIES} ${AUDASPACE_PY_LIBRARIES})
endif()
if(WITH_OPENAL)
target_link_libraries(${target} ${OPENAL_LIBRARY})
endif()
@@ -336,6 +373,19 @@ macro(setup_liblinks
if(WITH_OPENCOLORIO)
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
endif()
if(WITH_OPENSUBDIV)
if(WIN32 AND NOT UNIX)
file_list_suffix(OPENSUBDIV_LIBRARIES_DEBUG "${OPENSUBDIV_LIBRARIES}" "_d")
target_link_libraries_debug(${target} "${OPENSUBDIV_LIBRARIES_DEBUG}")
target_link_libraries_optimized(${target} "${OPENSUBDIV_LIBRARIES}")
unset(OPENSUBDIV_LIBRARIES_DEBUG)
else()
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
endif()
endif()
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
if(WITH_BOOST)
target_link_libraries(${target} ${BOOST_LIBRARIES})
if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU)
@@ -357,14 +407,6 @@ macro(setup_liblinks
target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
endif()
if(WITH_CODEC_FFMPEG)
# Strange! Without this ffmpeg gives linking errors (on linux),
# even though it's linked above.
# XXX: Does FFMPEG depend on GLU?
if(WITH_GLU)
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
endif()
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
endif()
if(WITH_OPENCOLLADA)
@@ -386,11 +428,13 @@ macro(setup_liblinks
unset(EXPAT_LIB_DEBUG)
endif()
else()
target_link_libraries(${target}
${OPENCOLLADA_LIBRARIES}
${PCRE_LIBRARIES}
${XML2_LIBRARIES}
${EXPAT_LIB})
target_link_libraries(
${target}
${OPENCOLLADA_LIBRARIES}
${PCRE_LIBRARIES}
${XML2_LIBRARIES}
${EXPAT_LIB}
)
endif()
endif()
if(WITH_MEM_JEMALLOC)
@@ -402,9 +446,6 @@ macro(setup_liblinks
if(WITH_MOD_CLOTH_ELTOPO)
target_link_libraries(${target} ${LAPACK_LIBRARIES})
endif()
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
if(WITH_LLVM)
target_link_libraries(${target} ${LLVM_LIBRARY})
endif()
@@ -412,16 +453,22 @@ macro(setup_liblinks
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
endif()
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
target_link_libraries(${target} "extern_clew")
target_link_libraries(${target} "extern_cuew")
endif()
endmacro()
macro(SETUP_BLENDER_SORTED_LIBS)
#system libraries with no dependencies such as platform link libs or opengl should go last
target_link_libraries(${target}
${BLENDER_GL_LIBRARIES})
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
endfunction()
function(SETUP_BLENDER_SORTED_LIBS)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
list(APPEND BLENDER_LINK_LIBS
@@ -499,13 +546,15 @@ macro(SETUP_BLENDER_SORTED_LIBS)
bf_ikplugin
bf_modifiers
bf_bmesh
bf_gpu
bf_blenkernel
bf_physics
bf_nodes
bf_rna
bf_gpu
bf_blenloader
bf_imbuf
bf_blenlib
bf_depsgraph
bf_intern_ghost
bf_intern_string
bf_avi
@@ -524,7 +573,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
ge_phys_dummy
ge_phys_bullet
bf_intern_smoke
extern_minilzo
extern_lzma
extern_colamd
ge_logic_ketsji
@@ -543,6 +591,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
ge_videotex
bf_dna
bf_blenfont
bf_blentranslation
bf_intern_audaspace
bf_intern_mikktspace
bf_intern_dualcon
@@ -560,6 +609,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
extern_libmv
extern_glog
extern_sdlew
extern_eigen3
bf_intern_glew_mx
)
@@ -578,6 +628,10 @@ macro(SETUP_BLENDER_SORTED_LIBS)
list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
endif()
if(NOT WITH_SYSTEM_LZO)
list(APPEND BLENDER_SORTED_LIBS extern_minilzo)
endif()
if(NOT WITH_SYSTEM_GLEW)
list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
endif()
@@ -634,6 +688,10 @@ macro(SETUP_BLENDER_SORTED_LIBS)
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
endif()
if(WITH_OPENSUBDIV)
list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
endif()
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
set(REMLIB ${SORTLIB})
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
@@ -652,14 +710,12 @@ macro(SETUP_BLENDER_SORTED_LIBS)
message(STATUS "Blender Skipping: (${REM_MSG})")
endif()
unset(SEARCHLIB)
unset(SORTLIB)
unset(REMLIB)
unset(REM_MSG)
set(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} PARENT_SCOPE)
# for top-level tests
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
endmacro()
endfunction()
macro(TEST_SSE_SUPPORT
_sse_flags
@@ -881,19 +937,22 @@ endmacro()
# utility macro
macro(remove_cc_flag
flag)
_flag)
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
foreach(flag ${ARGV})
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endforeach()
unset(flag)
endmacro()
@@ -907,27 +966,34 @@ endmacro()
macro(remove_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
remove_cc_flag("-Wstrict-prototypes")
remove_cc_flag("-Wmissing-prototypes")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wwrite-strings")
remove_cc_flag("-Wredundant-decls")
remove_cc_flag("-Wundef")
remove_cc_flag("-Wshadow")
remove_cc_flag("-Wdouble-promotion")
remove_cc_flag("-Wold-style-definition")
remove_cc_flag("-Werror=[^ ]+")
remove_cc_flag("-Werror")
remove_cc_flag(
"-Wstrict-prototypes"
"-Wmissing-prototypes"
"-Wmissing-format-attribute"
"-Wunused-local-typedefs"
"-Wunused-macros"
"-Wunused-parameter"
"-Wwrite-strings"
"-Wredundant-decls"
"-Wundef"
"-Wshadow"
"-Wdouble-promotion"
"-Wold-style-definition"
"-Werror=[^ ]+"
"-Werror"
)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wunused-variable")
remove_cc_flag("-Werror=[^ ]+")
remove_cc_flag("-Werror")
remove_cc_flag(
"-Wunused-parameter"
"-Wunused-variable"
"-Werror=[^ ]+"
"-Werror"
)
# negate flags implied by '-Wall'
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
@@ -939,6 +1005,24 @@ macro(remove_strict_flags)
endmacro()
macro(remove_extra_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
remove_cc_flag(
"-Wunused-parameter"
)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
remove_cc_flag(
"-Wunused-parameter"
)
endif()
if(MSVC)
# TODO
endif()
endmacro()
# note, we can only append flags on a single file so we need to negate the options.
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
# probably add more removals here.
@@ -967,39 +1051,50 @@ macro(remove_strict_flags_file
endmacro()
macro(ADD_CHECK_C_COMPILER_FLAG
function(ADD_CHECK_C_COMPILER_FLAG
_CFLAGS
_CACHE_VAR
_FLAG)
_FLAG
)
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
if(${_CACHE_VAR})
# message(STATUS "Using CFLAG: ${_FLAG}")
set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}")
set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}" PARENT_SCOPE)
else()
message(STATUS "Unsupported CFLAG: ${_FLAG}")
endif()
endmacro()
endfunction()
macro(ADD_CHECK_CXX_COMPILER_FLAG
function(ADD_CHECK_CXX_COMPILER_FLAG
_CXXFLAGS
_CACHE_VAR
_FLAG)
_FLAG
)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}")
if(${_CACHE_VAR})
# message(STATUS "Using CXXFLAG: ${_FLAG}")
set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}")
set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}" PARENT_SCOPE)
else()
message(STATUS "Unsupported CXXFLAG: ${_FLAG}")
endif()
endmacro()
endfunction()
function(get_blender_version)
# extracts header vars and defines them in the parent scope:
#
# - BLENDER_VERSION (major.minor)
# - BLENDER_VERSION_MAJOR
# - BLENDER_VERSION_MINOR
# - BLENDER_SUBVERSION (used for internal versioning mainly)
# - BLENDER_VERSION_CHAR (a, b, c, ...or empty string)
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
# So cmake depends on BKE_blender.h, beware of inf-loops!
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
@@ -1032,25 +1127,28 @@ function(get_blender_version)
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CYCLE")
endif()
math(EXPR BLENDER_VERSION_MAJOR "${_out_version} / 100")
math(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100")
set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}" PARENT_SCOPE)
set(BLENDER_SUBVERSION ${_out_subversion} PARENT_SCOPE)
set(BLENDER_VERSION_CHAR ${_out_version_char} PARENT_SCOPE)
set(BLENDER_VERSION_CYCLE ${_out_version_cycle} PARENT_SCOPE)
math(EXPR _out_version_major "${_out_version} / 100")
math(EXPR _out_version_minor "${_out_version} % 100")
# for packaging, alpha to numbers
string(COMPARE EQUAL "${BLENDER_VERSION_CHAR}" "" _out_version_char_empty)
string(COMPARE EQUAL "${_out_version_char}" "" _out_version_char_empty)
if(${_out_version_char_empty})
set(BLENDER_VERSION_CHAR_INDEX "0" PARENT_SCOPE)
set(_out_version_char_index "0")
else()
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z)
list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index)
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1" PARENT_SCOPE)
list(FIND _char_ls ${_out_version_char} _out_version_char_index)
math(EXPR _out_version_char_index "${_out_version_char_index} + 1")
endif()
# message(STATUS "Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}")
# output vars
set(BLENDER_VERSION "${_out_version_major}.${_out_version_minor}" PARENT_SCOPE)
set(BLENDER_VERSION_MAJOR "${_out_version_major}" PARENT_SCOPE)
set(BLENDER_VERSION_MINOR "${_out_version_minor}" PARENT_SCOPE)
set(BLENDER_SUBVERSION "${_out_subversion}" PARENT_SCOPE)
set(BLENDER_VERSION_CHAR "${_out_version_char}" PARENT_SCOPE)
set(BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index}" PARENT_SCOPE)
set(BLENDER_VERSION_CYCLE "${_out_version_cycle}" PARENT_SCOPE)
endfunction()
@@ -1088,7 +1186,7 @@ endmacro()
macro(blender_project_hack_post)
# --------------
# MINGW HACK END
if (_reset_standard_libraries)
if(_reset_standard_libraries)
# Must come after projecINCt(...)
#
# MINGW workaround for -ladvapi32 being included which surprisingly causes
@@ -1135,7 +1233,7 @@ endmacro()
# pair of macros to allow libraries to be specify files to install, but to
# only install them at the end so the directories don't get cleared with
# the files in them. used by cycles to install addon.
macro(delayed_install
function(delayed_install
base
files
destination)
@@ -1148,8 +1246,7 @@ macro(delayed_install
endif()
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
endforeach()
unset(f)
endmacro()
endfunction()
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
# does not get expanded in calling but is preserved
@@ -1168,62 +1265,59 @@ function(delayed_do_install
list(GET destinations ${i} d)
install(FILES ${f} DESTINATION ${targetdir}/${d})
endforeach()
unset(f)
endif()
endfunction()
macro(data_to_c
file_from file_to
list_to_add)
function(data_to_c
file_from file_to
list_to_add
)
list(APPEND ${list_to_add} ${file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${file_to} PATH)
add_custom_command(
OUTPUT ${file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
COMMAND "$<TARGET_FILE:datatoc>" ${file_from} ${file_to}
DEPENDS ${file_from} datatoc)
set_source_files_properties(${file_to} PROPERTIES GENERATED TRUE)
unset(_file_to_path)
endmacro()
endfunction()
# same as above but generates the var name and output automatic.
macro(data_to_c_simple
file_from
list_to_add)
function(data_to_c_simple
file_from
list_to_add
)
# remove ../'s
get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
add_custom_command(
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS ${_file_from} datatoc)
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
endmacro()
endfunction()
# macro for converting pixmap directory to a png and then a c file
macro(data_to_c_simple_icons
path_from
list_to_add
)
function(data_to_c_simple_icons
path_from
list_to_add
)
# Conversion steps
# path_from -> _file_from -> _file_to
@@ -1235,6 +1329,7 @@ macro(data_to_c_simple_icons
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${path_from}.png.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
@@ -1245,8 +1340,8 @@ macro(data_to_c_simple_icons
OUTPUT ${_file_from} ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
#COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc_icon ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:datatoc_icon>" ${_path_from_abs} ${_file_from}
COMMAND "$<TARGET_FILE:datatoc>" ${_file_from} ${_file_to}
DEPENDS
${_icon_files}
datatoc_icon
@@ -1256,27 +1351,22 @@ macro(data_to_c_simple_icons
)
set_source_files_properties(${_file_from} ${_file_to} PROPERTIES GENERATED TRUE)
unset(_path_from_abs)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
unset(_icon_files)
endmacro()
endfunction()
# XXX Not used for now...
macro(svg_to_png
file_from
file_to
dpi
list_to_add)
function(svg_to_png
file_from
file_to
dpi
list_to_add
)
# remove ../'s
get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
get_filename_component(_file_to ${CMAKE_CURRENT_SOURCE_DIR}/${file_to} REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
find_program(INKSCAPE_EXE inkscape)
mark_as_advanced(INKSCAPE_EXE)
@@ -1299,15 +1389,12 @@ macro(svg_to_png
else()
message(WARNING "Inkscape not found, could not re-generate ${_file_to} from ${_file_from}!")
endif()
endfunction()
unset(_file_from)
unset(_file_to)
endmacro()
macro(msgfmt_simple
file_from
list_to_add)
function(msgfmt_simple
file_from
list_to_add
)
# remove ../'s
get_filename_component(_file_from_we ${file_from} NAME_WE)
@@ -1316,25 +1403,22 @@ macro(msgfmt_simple
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${_file_from_we}.mo REALPATH)
list(APPEND ${list_to_add} ${_file_to})
set(${list_to_add} ${${list_to_add}} PARENT_SCOPE)
get_filename_component(_file_to_path ${_file_to} PATH)
add_custom_command(
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
COMMAND "$<TARGET_FILE:msgfmt>" ${_file_from} ${_file_to}
DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
endfunction()
unset(_file_from_we)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
endmacro()
macro(find_python_package
package)
function(find_python_package
package
)
string(TOUPPER ${package} _upper_package)
@@ -1372,25 +1456,17 @@ macro(find_python_package
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
"WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_${_upper_package} OFF)
set(WITH_PYTHON_INSTALL_${_upper_package} OFF PARENT_SCOPE)
else()
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
unset(_upper_package)
endmacro()
endfunction()
# like Python's 'print(dir())'
macro(print_all_vars)
function(print_all_vars)
get_cmake_property(_vars VARIABLES)
foreach(_var ${_vars})
message("${_var}=${${_var}}")
endforeach()
unset(_vars)
unset(_var)
endmacro()
endfunction()

View File

@@ -21,13 +21,14 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
set(MY_WC_HASH "unknown")
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
include(FindGit)
find_package(Git)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short @{u}
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()
endif()
set(BUILD_REV ${MY_WC_HASH})
@@ -111,3 +112,9 @@ elseif(UNIX)
"tar.bz2")
endif()
unset(MAJOR_VERSION)
unset(MINOR_VERSION)
unset(PATCH_VERSION)
unset(BUILD_REV)

View File

@@ -130,7 +130,7 @@ def is_project_file(filename):
def cmake_advanced_info():
""" Extracr includes and defines from cmake.
""" Extract includes and defines from cmake.
"""
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")

View File

@@ -59,14 +59,21 @@ def is_c_any(filename):
CMAKE_DIR = "."
def cmake_cache_var(var):
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
cache_file.close()
def cmake_cache_var_iter():
import re
re_cache = re.compile(r'([A-Za-z0-9_\-]+)?:?([A-Za-z0-9_\-]+)?=(.*)$')
with open(join(CMAKE_DIR, "CMakeCache.txt"), 'r', encoding='utf-8') as cache_file:
for l in cache_file:
match = re_cache.match(l.strip())
if match is not None:
var, type_, val = match.groups()
yield (var, type_ or "", val)
for l in lines:
if l.split(":")[0] == var:
return l.split("=", 1)[-1]
def cmake_cache_var(var):
for var_iter, type_iter, value_iter in cmake_cache_var_iter():
if var == var_iter:
return value_iter
return None

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# <pep8 compliant>

View File

@@ -12,9 +12,9 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
# map the version a -> 1
# not to be confused with blender's internal subversions
if [ "$blender_version_char" ]; then
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
else
blender_version_full=${blender_version}
blender_version_full=${blender_version}
fi
blender_ver_string=$blender_version+git$blender_version_full
@@ -60,7 +60,7 @@ package() {
cd $srcdir/build
make DESTDIR="$pkgdir" install
python -m compileall \
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
$pkgdir/usr/share/blender/$blender_version/scripts/addons
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
$pkgdir/usr/share/blender/$blender_version/scripts/addons
}

View File

@@ -52,6 +52,8 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_AUDASPACE = True
# we use simply jack framework
WITH_BF_JACK = True
BF_JACK = '/Library/Frameworks/Jackmp.framework'
@@ -213,6 +215,12 @@ WITH_BF_FREESTYLE = True
#OpenMP ( will be checked for compiler support and turned off eventually )
WITH_BF_OPENMP = True
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = []

View File

@@ -26,6 +26,8 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
@@ -144,7 +146,7 @@ BF_REDCODE_LIB = ''
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
# Mesa Libs should go here if you're using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
@@ -206,7 +208,7 @@ WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OPENMP = True
@@ -226,11 +228,20 @@ BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = False
WITH_BF_STATICOPENSUBDIV = False
BF_OPENSUBDIV = '/usr'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV_LIBPATH}/libosdGPU.a ${BF_OPENSUBDIV_LIBPATH}/libosdCPU.a'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
##
CC = 'gcc'
CXX = 'g++'
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CFLAGS = ['-std=gnu89']
CXXFLAGS = []
CPPFLAGS = []

View File

@@ -23,6 +23,8 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
@@ -145,7 +147,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -166,10 +168,18 @@ BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
WITH_BF_IME = True
WITH_BF_OPENMP = True
#CUDA
@@ -196,7 +206,10 @@ C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-pro
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-ldbghelp']
if WITH_BF_IME:
LLIBS.append('-limm32')
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']

View File

@@ -33,7 +33,7 @@ WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_ICONV = True
@@ -42,6 +42,8 @@ BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
@@ -69,7 +71,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -151,6 +153,8 @@ BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_IME = True
WITH_BF_3DMOUSE = True
WITH_BF_OPENMP = True
@@ -206,6 +210,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = True
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@@ -235,7 +245,10 @@ C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
if WITH_BF_IME:
LLIBS.append('imm32')
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']

View File

@@ -22,6 +22,8 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
@@ -144,7 +146,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -165,10 +167,18 @@ BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49
BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_OPENSUBDIV = False
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
WITH_BF_IME = True
WITH_BF_OPENMP = True
#Freestyle
@@ -186,11 +196,15 @@ REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
if WITH_BF_IME:
LLIBS.append('-limm32')
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']

View File

@@ -34,7 +34,7 @@ WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_SNDFILE = True
@@ -55,6 +55,8 @@ BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_AUDASPACE = True
WITH_BF_JACK = False
BF_PTHREADS = LIBDIR + '/pthreads'
@@ -66,7 +68,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -154,6 +156,8 @@ BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_IME = True
WITH_BF_3DMOUSE = True
WITH_BF_OPENMP = True
@@ -210,6 +214,12 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
#Freestyle
WITH_BF_FREESTYLE = True
WITH_BF_OPENSUBDIV = True
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@@ -242,7 +252,10 @@ C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
if WITH_BF_IME:
LLIBS.append('imm32')
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']

54
build_files/scons/tools/Blender.py Executable file → Normal file
View File

@@ -216,16 +216,16 @@ def setup_staticlibs(lenv):
if lenv['WITH_BF_STATICOCIO']:
statlibs += Split(lenv['BF_OCIO_LIB_STATIC'])
if lenv['WITH_BF_BOOST']:
libincs += Split(lenv['BF_BOOST_LIBPATH'])
if lenv['WITH_BF_STATICBOOST']:
statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
if lenv['WITH_BF_CYCLES_OSL']:
libincs += Split(lenv['BF_OSL_LIBPATH'])
if lenv['WITH_BF_STATICOSL']:
statlibs += Split(lenv['BF_OSL_LIB_STATIC'])
if lenv['WITH_BF_BOOST']:
libincs += Split(lenv['BF_BOOST_LIBPATH'])
if lenv['WITH_BF_STATICBOOST']:
statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
if lenv['WITH_BF_LLVM']:
libincs += Split(lenv['BF_LLVM_LIBPATH'])
if lenv['WITH_BF_STATICLLVM']:
@@ -242,6 +242,11 @@ def setup_staticlibs(lenv):
if lenv['WITH_BF_STATIC3DMOUSE']:
statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
if lenv['WITH_BF_OPENSUBDIV']:
libincs += Split(lenv['BF_OPENSUBDIV_LIBPATH'])
if lenv['WITH_BF_STATICOPENSUBDIV']:
statlibs += Split(lenv['BF_OPENSUBDIV_LIB_STATIC'])
# setting this last so any overriding of manually libs could be handled
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
# We must remove any previous items defining this path, for same reason stated above!
@@ -325,16 +330,16 @@ def setup_syslibs(lenv):
if lenv['WITH_BF_3DMOUSE']:
if not lenv['WITH_BF_STATIC3DMOUSE']:
syslibs += Split(lenv['BF_3DMOUSE_LIB'])
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
syslibs += Split(lenv['BF_BOOST_LIB'])
if lenv['WITH_BF_INTERNATIONAL']:
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
if lenv['WITH_BF_CYCLES_OSL'] and not lenv['WITH_BF_STATICOSL']:
syslibs += Split(lenv['BF_OSL_LIB'])
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
syslibs += Split(lenv['BF_BOOST_LIB'])
if lenv['WITH_BF_INTERNATIONAL']:
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
if lenv['WITH_BF_LLVM'] and not lenv['WITH_BF_STATICLLVM']:
syslibs += Split(lenv['BF_LLVM_LIB'])
@@ -344,6 +349,13 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_STATICPNG']:
syslibs += Split(lenv['BF_PNG_LIB'])
if lenv['WITH_BF_OPENSUBDIV']:
if not lenv['WITH_BF_STATICOPENSUBDIV']:
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
syslibs += [osdlib+'_d' for osdlib in Split(lenv['BF_OPENSUBDIV_LIB'])]
else:
syslibs += Split(lenv['BF_OPENSUBDIV_LIB'])
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
for syslib in create_blender_liblist(lenv, 'system'):
syslibs.append(os.path.basename(syslib))
@@ -372,7 +384,7 @@ def propose_priorities():
def creator(env):
sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/depsgraph', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
defs = []
@@ -441,7 +453,7 @@ def buildinfo(lenv, build_type):
no_upstream = False
try :
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}'], stderr=subprocess.STDOUT).strip()
except subprocess.CalledProcessError:
# assume branch has no upstream configured
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
@@ -630,7 +642,7 @@ def WinPyBundle(target=None, source=None, env=None):
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.tar.gz'
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib')
py_target = os.path.join(py_target, VERSION, 'python')
def printexception(func,path,ex):
if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
print str(func) + ' failed on ' + str(path)
@@ -654,7 +666,7 @@ def WinPyBundle(target=None, source=None, env=None):
# Extract Numpy
if env['WITH_BF_PYTHON_INSTALL_NUMPY']:
py_tar = env.subst(env['LCGDIR']).lstrip("#")
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.8.tar.gz'
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.9.tar.gz'
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib', 'site-packages')
@@ -670,6 +682,8 @@ def WinPyBundle(target=None, source=None, env=None):
py_dir += '/release/site-packages'
# grr, we have to do one by one because the dir exists
for f in os.listdir(py_dir):
if f == '.svn':
continue
fn_src = os.path.join(py_dir, f)
fn_dst = os.path.join(py_target, f)
@@ -762,7 +776,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/kernel/split %s/kernel/kernels %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_math_fast.h %s/util/util_transform.h %s/util/util_types.h %s/util/util_atomic.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
commands.getoutput(cmd)
@@ -816,6 +830,8 @@ def AppIt(target=None, source=None, env=None):
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
cmd = 'cp %s/openmp/LICENSE.txt %s/LICENSE-libiomp5.txt'%(instname, installdir) # copy libiomp5 license
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.
@@ -839,6 +855,7 @@ def UnixPyBundle(target=None, source=None, env=None):
py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
py_target = env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] )
py_target_bin = env.subst(dir + '/python/bin')
# This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow.
if os.path.exists(py_target):
@@ -858,6 +875,11 @@ def UnixPyBundle(target=None, source=None, env=None):
except:
pass
# install the executable
run("rm -rf '%s'" % py_target_bin)
os.makedirs(py_target_bin)
run("cp '%s' '%s'" % (env.subst(env['BF_PYTHON_BINARY']), py_target_bin))
run("cp -R '%s' '%s'" % (py_src, os.path.dirname(py_target)))
run("rm -rf '%s/distutils'" % py_target)
run("rm -rf '%s/lib2to3'" % py_target)

View File

@@ -107,6 +107,7 @@ def print_arguments(args, bc):
def validate_arguments(args, bc):
opts_list = [
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
'WITH_BF_AUDASPACE', 'BF_AUDASPACE_C_INC', 'BF_AUDASPACE_PY_INC', 'BF_AUDASPACE_DEF',
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
@@ -174,6 +175,7 @@ def validate_arguments(args, bc):
'WITH_BF_CXX_GUARDEDALLOC',
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
'BUILDBOT_BRANCH',
'WITH_BF_IME',
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
@@ -181,7 +183,8 @@ def validate_arguments(args, bc):
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS'
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS',
'WITH_BF_OPENSUBDIV', 'WITH_BF_STATICOPENSUBDIV', 'BF_OPENSUBDIV', 'BF_OPENSUBDIV_INC', 'BF_OPENSUBDIV_LIB', 'BF_OPENSUBDIV_LIBPATH', 'BF_OPENSUBDIV_LIB_STATIC'
]
# Have options here that scons expects to be lists
@@ -197,7 +200,8 @@ def validate_arguments(args, bc):
'C_WARN', 'CC_WARN', 'CXX_WARN',
'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING'
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING',
'WITH_BF_CPP11', 'WITH_BF_LEGACY_DEPSGRAPH',
]
@@ -295,6 +299,11 @@ def read_opts(env, cfg, args):
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
(BoolVariable('WITH_BF_AUDASPACE', 'Build with audaspace if true', True)),
('BF_AUDASPACE_C_INC', 'audaspace-c include path', ''),
('BF_AUDASPACE_PY_INC', 'audaspace-py include path', ''),
('BF_AUDASPACE_DEF', 'audaspace defines', ''),
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
('BF_SDL', 'SDL base path', ''),
('BF_SDL_INC', 'SDL include path', ''),
@@ -507,6 +516,8 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
(BoolVariable('WITH_BF_IME', 'Enable Input Method Editor (IME) for complex Asian character input', False)),
(BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
(BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
('BF_3DMOUSE', '3d mouse library base path', ''),
@@ -650,7 +661,19 @@ def read_opts(env, cfg, args):
('BF_LLVM_LIBPATH', 'LLVM library path', ''),
('BF_LLVM_LIB_STATIC', 'LLVM static library', ''),
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', '')
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', ''),
(BoolVariable('WITH_BF_OPENSUBDIV', 'Build with OpenSubdiv library', False)),
(BoolVariable('WITH_BF_STATICOPENSUBDIV', 'Staticly link to OpenColorIO', False)),
('BF_OPENSUBDIV', 'OpenSubdiv root path', ''),
('BF_OPENSUBDIV_INC', 'OpenSubdiv include path', ''),
('BF_OPENSUBDIV_LIB', 'OpenSubdiv library', ''),
('BF_OPENSUBDIV_LIBPATH', 'OpenSubdiv library path', ''),
('BF_OPENSUBDIV_LIB_STATIC', 'OpenSubdiv static library', ''),
(BoolVariable('WITH_BF_CPP11', '"Build with C++11 standard enabled, for development use only!', False)),
(BoolVariable('WITH_BF_LEGACY_DEPSGRAPH', 'Build Blender with legacy dependency graph', True)),
) # end of opts.AddOptions()
return localopts

View File

@@ -25,7 +25,16 @@ TARBALL="blender-$VERSION.tar.gz"
cd "$blender_srcdir"
# not so nice, but works
FILTER_FILES_PY="import os, sys; [print(l[:-1]) for l in sys.stdin.readlines() if os.path.isfile(l[:-1])]"
FILTER_FILES_PY=\
"import os, sys; "\
"[print(l[:-1]) for l in sys.stdin.readlines() "\
"if os.path.isfile(l[:-1]) "\
"if os.path.basename(l[:-1]) not in {"\
"'.gitignore', "\
"'.gitmodules', "\
"'.arcconfig', "\
"}"\
"]"
# Build master list
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."

View File

@@ -1,104 +0,0 @@
Blender CMake build system
============================
Contents
---------------
1. Introduction
2. Obtaining CMake
3. Building Blender
4. Generic Setup
5. Configuring the build after SVN updates
1. Introduction
---------------
This document describes general usage of the new CMake scripts. The
inner workings will be described in blender-cmake-dev.txt (TODO).
2. Obtaining CMake
------------------
CMake for can either be downloaded using your favorite package manager
or is also available from the CMake website at http://www.cmake.org
The website also contains some documentation on CMake usage but I found
the man page alone pretty helpful.
3. Building Blender
-------------------
Building Blender requires obtaining a compiler, library dependencies,
and correct setup depending on the system. For details on how to set
up a build on various operating systems, see the wiki documentation:
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender
4. Generic Setup
----------------
CMake allows one to generate the build project files and binary objects
outside the source tree which can be pretty handy in working and experimenting
with different Blender configurations (Audio/NoAudio, GameEngine/NoGameEngine etc.)
while maintaining a clean source tree. It also makes it possible to generate files
for different build systems on the same source tree. This also has benefits for
general SVN management for the developer as patches and submit logs are much cleaner.
Create a directory outside the blender source tree where you would like to build
Blender (from now on called $BLENDERBUILD). On the commandline you can then run
the cmake command to generate your initial build files. First just run 'cmake' which
will inform you what the available generators are. Thn you can run
'cmake -G generator $BLENDERSOURCE' to generate the build files. Here is an example
of all this for Xcode:
% mkdir $BLENDERBUILD
% cd $BLENDERBUILD
% cmake
...
...
--version [file] = Show program name/version banner and exit.
Generators
The following generators are available on this platform:
KDevelop3 = Generates KDevelop 3 project files.
Unix Makefiles = Generates standard UNIX makefiles.
Xcode = Generate XCode project files.
% cmake -G Xcode $BLENDERSOURCE
...
...
-- Configuring blender
-- Configuring blenderplayer
-- Configuring done
-- Generating done
-- Build files have been written to: $BLENDERBUILD
This will generate the build files with default values. Specific features can
be enabled or disabled by running the ccmake "GUI" from $BLENDERBUILD as follows:
% ccmake $BLENDERSOURCE
A number of options appear which can be changed depending on your needs and
available dependencies (e.g. setting WITH_OPENEXR to OFF will disable support
for OpenEXR). It will also allow you to override default and detected paths
(e.g. Python directories) and compile and link flags. When you are satisfied
used ccmake to re-configure the build files and exit.
It is also possible to use the commandline of 'cmake' to override certain
of these settings.
5. Configuring the build after SVN updates
------------------------------------------
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
remembers the initial run's settings for subsequent generation runs. After
SVN updates that contain changes to the build system, rebuilding Blender will
automatically invoke CMake to regenerate the CMakeCache.txt and other files
as needed.
/Jacques Beaurain (jbinto)

View File

@@ -35,13 +35,14 @@
defaults.
Much of the actual functionality can be found in the python scripts
in the directory $BLENDERHOME/tools, with Blender.py defining the
bulk of the functionality. btools.py has some helper functions, and
bcolors.py is for the terminal colors. mstoolkit.py and crossmingw.py
are modules which set up SCons for the MS VC++ 2003 toolkit and
the cross-compile toolset for compiling Windows binaries on Linux
respectively. Note: the cross-compile doesn't work yet for Blender,
but is added in preparation for having it work in the distant future.
in the directory $BLENDERHOME/build_files/scons/tools, with
Blender.py defining the bulk of the functionality. btools.py has some
helper functions, and bcolors.py is for the terminal
colors. mstoolkit.py and crossmingw.py are modules which set up SCons
for the MS VC++ 2003 toolkit and the cross-compile toolset for
compiling Windows binaries on Linux respectively. Note: the
cross-compile doesn't work yet for Blender, but is added in
preparation for having it work in the distant future.
BlenderEnvironment
------------------

View File

@@ -29,9 +29,9 @@
a scons-local installation, which can be found in the scons/ subdirectory.
This document uses the scons-local installation for its examples.
Check from the page
http://www.blender.org/development/building-blender/getting-dependencies/
that you have all dependencies needed for building Blender. Note that for
For build instructions, including dependencies, consult the appropriate
section for your platform at
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender. Note that for
windows many of these dependencies already come in the lib/windows module
from CVS.
@@ -53,12 +53,13 @@
from the command-line is given, then all libraries and binaries to
build are configured.
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to
finally copy all needed files to get a proper setup. The BF_DOCDIR is
used to generate Blender Python documentation files to. These
variables have default values for every platform in
$BLENDERHOME/config/(platform)-config.py. After the build successfully
completes, you can find everything you need in BF_INSTALLDIR.
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to finally copy
all needed files to get a proper setup. The BF_DOCDIR is used to generate
Blender Python documentation files to. These variables have default values
for every platform in
$BLENDERHOME/build_files/scons/config/(platform)-config.py. See the next
section of this document for how to customize these paths. After the build
successfully completes, you can find everything you need in BF_INSTALLDIR.
If you want to create the installer package of Blender on Windows you'll
need to install nullsoft scriptable install system from http://nsis.sf.net.
@@ -72,8 +73,8 @@
---------------------
The default values for your platform can be found in the directory
$BLENDERHOME/config. Your platform specific defaults are in
(platform)-config.py, where platform is one of:
$BLENDERHOME/build_files/scons/config. Your platform specific defaults are
in (platform)-config.py, where platform is one of:
- linux, for machines running Linux
- win32-vc, for Windows machines, compiling with a Microsoft compiler
@@ -81,12 +82,13 @@
- darwin, for OS X machines
(TBD: add cygwin, solaris and freebsd support)
These files you will normally not change. If you need to override
a default value, make a file called $BLENDERHOME/user-config.py, and copy
settings from the config/(platform)-config.py that you want to change. Don't
copy the entire file (unless explicitely stated in the configuration file),
because you may not get updated options you don't change yourself, which may
result in build errors.
These files you will normally not change. If you need to override a
default value, make a file called $BLENDERHOME/user-config.py, and copy
settings from the build_files/scons/config/(platform)-config.py that you
want to change. Don't copy the entire file (unless explicitly stated in
the configuration file), because you may not get updated options you don't
change yourself, which may result in build errors. You should NEVER have
to modify $BLENDERHOME/build_files/scons/config/(platform)-config.py.
You can use BF_CONFIG argument to override the default user-config.py
check. This is just like the user-config.py, but just with another name:
@@ -113,11 +115,6 @@
(unless you have overridden any of them in your
$BLENDERHOME/user-config.py).
NOTE: The best way to avoid confusion is the
copy $BLENDERHOME/config/(platform)-config.py to
$BLENDERHOME/user-config.py. You should NEVER have to modify
$BLENDERHOME/config/(platform)-config.py
Configuring the output
----------------------

File diff suppressed because it is too large Load Diff

View File

@@ -10,26 +10,14 @@
* \ingroup intern
*/
/** \defgroup boolop boolop
* \ingroup intern
*/
/** \defgroup ctr container
* \ingroup intern
*/
/** \defgroup decimation decimation
* \ingroup intern
*/
/** \defgroup elbeem elbeem
* \ingroup intern
*/
/** \defgroup bsp bsp
* \ingroup intern
*/
/** \defgroup iksolver iksolver
* \ingroup intern
*/

View File

@@ -7,7 +7,7 @@
* These pages document the source code of blender.
*
* \subsection implinks Important Links
* - <a href="http://projects.blender.org">projects.blender.org</a> with <a href="http://projects.blender.org/tracker/index.php?group_id=9&atid=498">bug tracker</a>
* - <a href="http://developer.blender.org">developer.blender.org</a> with bug tracker.
* - <a href="http://wiki.blender.org/index.php/Dev:Contents">Development documents</a> on our wiki.
*
* \subsection blother Other

View File

@@ -11,7 +11,6 @@
/** \defgroup bmesh BMesh
* \ingroup blender
*/
/** \defgroup texture Texturing */
/** \defgroup compositor Compositing */
/** \defgroup python Python
@@ -93,36 +92,48 @@
/* ================================ */
/** \defgroup blender blender */
/** \defgroup blender Blender */
/** \defgroup blf blenfont
/** \defgroup blt BlenTranslation
* \ingroup blender
*/
/** \defgroup bke blenkernel
/** \defgroup blf BlenFont
* \ingroup blender
*/
/** \defgroup bli blenlib
/** \defgroup bke BlenKernel
* \ingroup blender
*/
/** \defgroup nodes nodes
/** \defgroup bli BlenLib
* \ingroup blender
*/
/** \defgroup cmpnodes cmpnodes
/** \defgroup depsgraph Dependency Graph
* \ingroup blender
*/
/** \defgroup bph Physics
* \ingroup blender
*/
/** \defgroup nodes Nodes
* \ingroup blender
*/
/** \defgroup cmpnodes Nodes (Compositor)
* \ingroup nodes
*/
/** \defgroup shdnodes shdnodes
/** \defgroup shdnodes Nodes (Shader)
* \ingroup nodes
*/
/** \defgroup texnodes texnodes
/** \defgroup texnodes Nodes (Texture)
* \ingroup nodes
*/
/** \defgroup modifiers modifiers
/** \defgroup modifiers Object Modifiers
* \ingroup blender
*/
@@ -132,29 +143,29 @@
* \ingroup blender
*/
/** \defgroup ikplugin ikplugin
/** \defgroup ikplugin IK Plugin
* \ingroup blender
*/
/** \defgroup DNA sDNA
/** \defgroup DNA Struct DNA (File Format)
* \ingroup blender data
*/
/** \defgroup RNA RNA
/** \defgroup RNA RNA (Data API)
* \ingroup blender data
*/
/** \defgroup blenloader .blend read and write functions
/** \defgroup blenloader Blend file IO
* \ingroup blender data
* \todo check if \ref blo and \ref blenloader groups can be
* merged in docs.
*/
/** \defgroup quicktime quicktime
/** \defgroup quicktime QuickTime
* \ingroup blender
/** \defgroup gui GUI */
/** \defgroup wm windowmanager
/** \defgroup wm Window Manager
* \ingroup blender gui
*/
@@ -314,7 +325,7 @@
* \ingroup gui
*/
/** \defgroup externformats external formats */
/** \defgroup externformats External Formats */
/** \defgroup collada COLLADA
* \ingroup externformats
@@ -324,7 +335,7 @@
* \ingroup externformats
*/
/** \defgroup imbuf IMage Buffer
/** \defgroup imbuf Image Buffer (ImBuf)
* \ingroup blender
*/

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# ##### BEGIN GPL LICENSE BLOCK #####
#

View File

@@ -1,6 +1,7 @@
"""
Basic Sound Playback
++++++++++++++++++++
This script shows how to use the classes: :class:`Device`, :class:`Factory` and
:class:`Handle`.
"""

View File

@@ -20,15 +20,15 @@ constraint_type = 2
physics_id_1 = object_1.getPhysicsId()
physics_id_2 = object_2.getPhysicsId()
# Use bottom right edge of Object1 for hinge position
# use bottom right edge of Object1 for hinge position
edge_position_x = 1.0
edge_position_y = 0.0
edge_position_z = -1.0
# use Object1 y axis for angle to point hinge
# rotate the pivot z axis about 90 degrees
edge_angle_x = 0.0
edge_angle_y = 1.0
edge_angle_z = 0.0
edge_angle_y = 0.0
edge_angle_z = 90.0
# create an edge constraint
constraints.createConstraint(physics_id_1, physics_id_2,

View File

@@ -1,9 +1,10 @@
"""
Texture Replacement
+++++++++++++++++++
Example of how to replace a texture in game with an external image.
createTexture() and removeTexture() are to be called from a module Python
Controller.
``createTexture()`` and ``removeTexture()`` are to be called from a
module Python Controller.
"""
from bge import logic
from bge import texture

View File

@@ -1,7 +1,8 @@
"""
Basic Video Playback
++++++++++++++++++++
Example of how to replace a texture in game with a video. It needs to run everyframe
Example of how to replace a texture in game with a video. It needs to run
everyframe.
"""
import bge
from bge import texture

View File

@@ -1,6 +1,7 @@
"""
Basic Handler Example
+++++++++++++++++++++
This script shows the most simple example of adding a handler.
"""

View File

@@ -7,8 +7,9 @@ act on specified rather than the selected or active data, or to execute an
operator in the different part of the user interface.
The context overrides are passed as a dictionary, with keys matching the context
member names in bpy.context. For example to override bpy.context.active_object,
you would pass {'active_object': object}.
member names in bpy.context.
For example to override ``bpy.context.active_object``,
you would pass ``{'active_object': object}``.
"""
# remove all objects in scene rather than the selected ones

View File

@@ -1,16 +1,19 @@
"""
.. _operator-execution_context:
Execution Context
-----------------
When calling an operator you may want to pass the execution context.
This determines the context thats given to the operator to run in, and weather
invoke() is called or execute().
This determines the context that is given for the operator to run in, and whether
invoke() is called or only execute().
'EXEC_DEFAULT' is used by default but you may want the operator to take user
interaction with 'INVOKE_DEFAULT'.
'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
call invoke() if existing.
The execution context is as a non keyword, string argument in:
The execution context is one of:
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',

View File

@@ -3,21 +3,21 @@ Calling Operators
-----------------
Provides python access to calling operators, this includes operators written in
C, Python or Macros.
C, Python or macros.
Only keyword arguments can be used to pass operator properties.
Operators don't have return values as you might expect, instead they return a
set() which is made up of: {'RUNNING_MODAL', 'CANCELLED', 'FINISHED',
'PASS_THROUGH'}.
Common return values are {'FINISHED'} and {'CANCELLED'}.
Operators don't have return values as you might expect,
instead they return a set() which is made up of:
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
Calling an operator in the wrong context will raise a RuntimeError,
Calling an operator in the wrong context will raise a ``RuntimeError``,
there is a poll() method to avoid this problem.
Note that the operator ID (bl_idname) in this example is 'mesh.subdivide',
'bpy.ops' is just the access path for python.
Note that the operator ID (bl_idname) in this example is ``mesh.subdivide``,
``bpy.ops`` is just the access path for python.
Keywords and Positional Arguments
@@ -32,9 +32,9 @@ There are 3 optional positional arguments (documented in detail below).
bpy.ops.test.operator(override_context, execution_context, undo)
* override_context - dict type
* execution_context - string (enum)
* undo - boolean
- override_context - ``dict`` type.
- execution_context - ``str`` (enum).
- undo - ``bool`` type.
Each of these arguments is optional, but must be given in the order above.

View File

@@ -3,7 +3,7 @@ PropertyGroup Example
+++++++++++++++++++++
PropertyGroups can be used for collecting custom settings into one value
to avoid many indervidual settings mixed in together.
to avoid many individual settings mixed in together.
"""
import bpy

View File

@@ -6,7 +6,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
:class:`Bone` and :class:`PoseBone`.
These properties can be animated, accessed by the user interface and python
like blenders existing properties.
like Blender's existing properties.
"""
import bpy

View File

@@ -8,7 +8,8 @@ bl_info = {
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Object"}
"category": "Object",
}
import bpy

View File

@@ -1,6 +1,7 @@
"""
Submenus
++++++++
This menu demonstrates some different functions.
"""
import bpy

View File

@@ -1,12 +1,12 @@
"""
Extending Menus
+++++++++++++++
When creating menus for addons you can't reference menus in blenders default
When creating menus for addons you can't reference menus in Blender's default
scripts.
Instead, the addon can add menu items to existing menus.
Instead the addon can add menu items to existing menus.
The function menu_draw acts like Menu.draw
The function menu_draw acts like :class:`Menu.draw`.
"""
import bpy

View File

@@ -1,21 +1,21 @@
"""
Basic Menu Example
++++++++++++++++++
This script is a simple menu, menus differ from panels in that they must
Here is an example of a simple menu. Menus differ from panels in that they must
reference from a header, panel or another menu.
Notice the 'CATEGORY_MT_name' :class:`Menu.bl_idname`, this is a naming
Notice the 'CATEGORY_MT_name' in :class:`Menu.bl_idname`, this is a naming
convention for menus.
.. note::
Menu subclasses must be registered before referencing them from blender.
.. note::
Menu's have their :class:`Layout.operator_context` initialized as
'EXEC_REGION_WIN' rather then 'INVOKE_DEFAULT', so if the operator context
needs to initialize inputs from the :class:`Operator.invoke` function
then this needs to be explicitly set.
Menus have their :class:`Layout.operator_context` initialized as
'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
If the operator context needs to initialize inputs from the
:class:`Operator.invoke` function, then this needs to be explicitly set.
"""
import bpy

View File

@@ -7,10 +7,10 @@ for more flexible mesh editing from python see :mod:`bmesh`.
Blender stores 4 main arrays to define mesh geometry.
* :class:`Mesh.vertices` (3 points in space)
* :class:`Mesh.edges` (reference 2 vertices)
* :class:`Mesh.loops` (reference a single vertex and edge)
* :class:`Mesh.polygons`: (reference a range of loops)
- :class:`Mesh.vertices` (3 points in space)
- :class:`Mesh.edges` (reference 2 vertices)
- :class:`Mesh.loops` (reference a single vertex and edge)
- :class:`Mesh.polygons`: (reference a range of loops)
Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,

View File

@@ -1,6 +1,7 @@
"""
Poll Function
+++++++++++++++
The :class:`NodeTree.poll` function determines if a node tree is visible
in the given context (similar to how :class:`Panel.poll`
and :class:`Menu.poll` define visibility). If it returns False,

View File

@@ -1,6 +1,7 @@
"""
Basic Object Operations Example
+++++++++++++++++++++++++++++++
This script demonstrates basic operations on object like creating new
object, placing it into scene, selecting it and making it active.
"""

View File

@@ -1,6 +1,7 @@
"""
Invoke Function
+++++++++++++++
:class:`Operator.invoke` is used to initialize the operator from the context
at the moment the operator is called.
invoke() is typically used to assign properties which are then used by
@@ -31,7 +32,7 @@ class SimpleMouseOperator(bpy.types.Operator):
y = bpy.props.IntProperty()
def execute(self, context):
# rather then printing, use the report function,
# rather than printing, use the report function,
# this way the message appears in the header,
self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
return {'FINISHED'}

View File

@@ -4,7 +4,7 @@ Calling a File Selector
This example shows how an operator can use the file selector.
Notice the invoke function calls a window manager method and returns
RUNNING_MODAL, this means the file selector stays open and the operator does not
``{'RUNNING_MODAL'}``, this means the file selector stays open and the operator does not
exit immediately after invoke finishes.
The file selector runs the operator, calling :class:`Operator.execute` when the

View File

@@ -1,6 +1,7 @@
"""
Dialog Box
++++++++++
This operator uses its :class:`Operator.invoke` function to call a popup.
"""
import bpy

View File

@@ -1,6 +1,7 @@
"""
Custom Drawing
++++++++++++++
By default operator properties use an automatic user interface layout.
If you need more control you can create your own layout with a
:class:`Operator.draw` function.

View File

@@ -1,8 +1,9 @@
"""
Modal Execution
+++++++++++++++
This operator defines a :class:`Operator.modal` function which running,
handling events until it returns {'FINISHED'} or {'CANCELLED'}.
handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
Grab, Rotate, Scale and Fly-Mode are examples of modal operators.
They are especially useful for interactive tools,
@@ -10,9 +11,9 @@ your operator can have its own state where keys toggle options as the operator
runs.
:class:`Operator.invoke` is used to initialize the operator as being by
returning {'RUNNING_MODAL'}, initializing the modal loop.
returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
Notice __init__() and __del__() are declared.
Notice ``__init__()`` and ``__del__()`` are declared.
For other operator types they are not useful but for modal operators they will
be called before the :class:`Operator.invoke` and after the operator finishes.
"""

View File

@@ -1,6 +1,7 @@
"""
Basic Operator Example
++++++++++++++++++++++
This script shows simple operator which prints a message.
Since the operator only has an :class:`Operator.execute` function it takes no

View File

@@ -1,6 +1,7 @@
"""
Simple Object Panel
+++++++++++++++++++
This panel has a :class:`Panel.poll` and :class:`Panel.draw_header` function,
even though the contents is basic this closely resembles blenders panels.
"""

View File

@@ -7,7 +7,7 @@ A mix-in parent class can be used to share common properties and
import bpy
class View3DPanel():
class View3DPanel:
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'

View File

@@ -1,6 +1,7 @@
"""
Basic Panel Example
+++++++++++++++++++
This script is a simple panel which will draw into the object properties
section.

View File

@@ -1,7 +1,8 @@
"""
Advanced UIList Example - Filtering and Reordering
++++++++++++++++++++++++++++++++++++++++++++++++++
This script is an extended version of the UIList subclass used to show vertex groups. It is not used 'as is',
This script is an extended version of the ``UIList`` subclass used to show vertex groups. It is not used 'as is',
because iterating over all vertices in a 'draw' function is a very bad idea for UI performances! However, it's a good
example of how to create/use filtering/reordering callbacks.
"""

View File

@@ -1,7 +1,7 @@
"""
Note that when keying data paths which contain nested properties this must be
done from the :class:`ID` subclass, in this case the :class:`Armature` rather
then the bone.
than the bone.
"""
import bpy

View File

@@ -21,3 +21,12 @@ print(quat_out)
print("%.2f, %.2f, %.2f" % tuple(math.degrees(a) for a in quat_out.to_euler()))
print("(%.2f, %.2f, %.2f), %.2f" % (quat_out.axis[:] +
(math.degrees(quat_out.angle), )))
# multiple rotations can be interpolated using the exponential map
quat_c = mathutils.Quaternion((1.0, 0.0, 0.0), math.radians(15.0))
exp_avg = (quat_a.to_exponential_map() +
quat_b.to_exponential_map() +
quat_c.to_exponential_map()) / 3.0
quat_avg = mathutils.Quaternion(exp_avg)
print("Average rotation:")
print(quat_avg)

View File

@@ -18,16 +18,16 @@ matrix = mathutils.Matrix()
# Comparison operators can be done on Vector classes:
# greater and less then test vector length.
# (In)equality operators == and != test component values, e.g. 1,2,3 != 3,2,1
vec_a == vec_b
vec_a != vec_b
# Ordering operators >, >=, > and <= test vector length.
vec_a > vec_b
vec_a >= vec_b
vec_a < vec_b
vec_a <= vec_b
# ==, != test vector values e.g. 1,2,3 != 3,2,1 even if they are the same length
vec_a == vec_b
vec_a != vec_b
# Math can be performed on Vector classes
vec_a + vec_b

View File

@@ -0,0 +1,47 @@
Application Data (bge.app)
==========================
Module to access application values that remain unchanged during runtime.
.. module:: bge.app
.. data:: version
The Blender/BGE version as a tuple of 3 ints, eg. (2, 75, 1).
.. note:: Version tuples can be compared simply with (in)equality symbols;
for example, ``(2, 74, 5) <= (2, 75, 0)`` returns True (lexical order).
:type: tuple of three ints
.. data:: version_string
The Blender/BGE version formatted as a string, eg. "2.75 (sub 1)".
:type: str
.. data:: version_char
The Blender/BGE version character (for minor releases).
:type: str
.. data:: has_texture_ffmpeg
True if the BGE has been built with FFmpeg support, enabling use of :class:`~bge.texture.ImageFFmpeg` and :class:`~bge.texture.VideoFFmpeg`.
:type: bool
.. data:: has_joystick
True if the BGE has been built with joystick support.
:type: bool
.. data:: has_physics
True if the BGE has been built with physics support.
:type: bool

View File

@@ -4,72 +4,77 @@ Physics Constraints (bge.constraints)
.. module:: bge.constraints
.. literalinclude:: ../examples/bge.constraints.py
:language: rest
:lines: 2-4
Examples
--------
.. include:: ../examples/bge.constraints.py
:start-line: 1
:end-line: 4
.. literalinclude:: ../examples/bge.constraints.py
:lines: 6-
.. function:: createConstraint(physicsid, physicsid2, constrainttype, [pivotX, pivotY, pivotZ, [axisX, axisY, axisZ, [flag]]]])
Functions
---------
.. function:: createConstraint( \
physicsid_1, physicsid_2, constraint_type, \
pivot_x=0.0, pivot_y=0.0, pivot_z=0.0, \
axis_x=0.0, axis_y=0.0, axis_z=0.0, flag=0)
Creates a constraint.
:arg physicsid: the physics id of the first object in constraint
:type physicsid: int
:arg physicsid_1: The physics id of the first object in constraint.
:type physicsid_1: int
:arg physicsid2: the physics id of the second object in constraint
:type physicsid2: int
:arg physicsid_2: The physics id of the second object in constraint.
:type physicsid_2: int
:arg constrainttype: the type of the constraint. The constraint types are:
:arg constraint_type: The type of the constraint, see `Create Constraint Constants`_.
- :class:`POINTTOPOINT_CONSTRAINT`
- :class:`LINEHINGE_CONSTRAINT`
- :class:`ANGULAR_CONSTRAINT`
- :class:`CONETWIST_CONSTRAINT`
- :class:`VEHICLE_CONSTRAINT`
- :class:`GENERIC_6DOF_CONSTRAINT`
:type constraint_type: int
:type constrainttype: int
:arg pivot_x: Pivot X position. (optional)
:type pivot_x: float
:arg pivotX: pivot X position
:type pivotX: float
:arg pivot_y: Pivot Y position. (optional)
:type pivot_y: float
:arg pivotY: pivot Y position
:type pivotY: float
:arg pivot_z: Pivot Z position. (optional)
:type pivot_z: float
:arg pivotZ: pivot Z position
:type pivotZ: float
:arg axis_x: X axis angle in degrees. (optional)
:type axis_x: float
:arg axisX: X axis
:type axisX: float
:arg axis_y: Y axis angle in degrees. (optional)
:type axis_y: float
:arg axisY: Y axis
:type axisY: float
:arg axis_z: Z axis angle in degrees. (optional)
:type axis_z: float
:arg axisZ: Z axis
:type axisZ: float
:arg flag: 128 to disable collision between linked bodies
:arg flag: 128 to disable collision between linked bodies. (optional)
:type flag: int
.. attribute:: error
Simbolic constant string that indicates error.
:return: A constraint wrapper.
:rtype: :class:`~bge.types.KX_ConstraintWrapper`
.. function:: exportBulletFile(filename)
export a .bullet file
Exports a file representing the dynamics world (usually using ``.bullet`` extension).
:arg filename: File name
:type filename: string
See `Bullet binary serialization <http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_binary_serialization>`__.
:arg filename: File path.
:type filename: str
.. function:: getAppliedImpulse(constraintId)
:arg constraintId: The id of the constraint.
:type constraintId: int
:return: the most recent applied impulse.
:return: The most recent applied impulse.
:rtype: float
.. function:: getVehicleConstraint(constraintId)
@@ -77,16 +82,16 @@ Physics Constraints (bge.constraints)
:arg constraintId: The id of the vehicle constraint.
:type constraintId: int
:return: a vehicle constraint object.
:rtype: :class:`bge.types.KX_VehicleWrapper`
:return: A vehicle constraint object.
:rtype: :class:`~bge.types.KX_VehicleWrapper`
.. function:: getCharacter(gameobj)
:arg gameobj: The game object with the character physics.
:type gameobj: :class:`bge.types.KX_GameObject`
:type gameobj: :class:`~bge.types.KX_GameObject`
:return: character wrapper
:rtype: :class:`bge.types.KX_CharacterWrapper`
:return: Character wrapper.
:rtype: :class:`~bge.types.KX_CharacterWrapper`
.. function:: removeConstraint(constraintId)
@@ -140,23 +145,8 @@ Physics Constraints (bge.constraints)
Sets the debug mode.
Debug modes:
- :class:`DBG_NODEBUG`
- :class:`DBG_DRAWWIREFRAME`
- :class:`DBG_DRAWAABB`
- :class:`DBG_DRAWFREATURESTEXT`
- :class:`DBG_DRAWCONTACTPOINTS`
- :class:`DBG_NOHELPTEXT`
- :class:`DBG_DRAWTEXT`
- :class:`DBG_PROFILETIMINGS`
- :class:`DBG_ENABLESATCOMPARISION`
- :class:`DBG_DISABLEBULLETLCP`
- :class:`DBG_ENABLECCD`
- :class:`DBG_DRAWCONSTRAINTS`
- :class:`DBG_DRAWCONSTRAINTLIMITS`
- :class:`DBG_FASTWIREFRAME`
:arg mode: The new debug mode, see `Debug Mode Constants`_.
:arg mode: The new debug mode.
:type mode: int
.. function:: setGravity(x, y, z)
@@ -175,7 +165,8 @@ Physics Constraints (bge.constraints)
.. function:: setLinearAirDamping(damping)
.. note::
Not implemented.
Not implemented
Sets the linear air damping for rigidbodies.
@@ -235,144 +226,111 @@ Physics Constraints (bge.constraints)
.. function:: setUseEpa(epa)
Not implemented.
.. note::
Not implemented
Constants
+++++++++
.. attribute:: error
Symbolic constant string that indicates error.
:type: str
Debug Mode Constants
^^^^^^^^^^^^^^^^^^^^
Debug mode to be used with :func:`setDebugMode`.
.. data:: DBG_NODEBUG
.. note::
Debug mode to be used with function :class:`setDebugMode`
No debug.
.. data:: DBG_DRAWWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw wireframe in debug.
.. data:: DBG_DRAWAABB
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw Axis Aligned Bounding Box in debug.
.. data:: DBG_DRAWFREATURESTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw freatures text in debug.
Draw features text in debug.
.. data:: DBG_DRAWCONTACTPOINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw contact points in debug.
.. data:: DBG_NOHELPTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Debug without help text.
.. data:: DBG_DRAWTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw text in debug.
.. data:: DBG_PROFILETIMINGS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw profile timings in debug.
.. data:: DBG_ENABLESATCOMPARISION
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable sat comparision in debug.
.. data:: DBG_DISABLEBULLETLCP
.. note::
Debug mode to be used with function :class:`setDebugMode`
Disable Bullet LCP.
.. data:: DBG_ENABLECCD
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable Continous Colision Detection in debug.
Enable Continous Collision Detection in debug.
.. data:: DBG_DRAWCONSTRAINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraints in debug.
.. data:: DBG_DRAWCONSTRAINTLIMITS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraint limits in debug.
.. data:: DBG_FASTWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw a fast wireframe in debug.
.. data:: POINTTOPOINT_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
Create Constraint Constants
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Constraint type to be used with :func:`createConstraint`.
.. data:: POINTTOPOINT_CONSTRAINT
.. to do
.. data:: LINEHINGE_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: ANGULAR_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: CONETWIST_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: VEHICLE_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: GENERIC_6DOF_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do

View File

@@ -258,7 +258,8 @@ General functions
Sets the world gravity.
:type gravity: list [fx, fy, fz]
:arg gravity: gravity vector
:type gravity: Vector((fx, fy, fz))
.. function:: getSpectrum()
@@ -337,6 +338,28 @@ General functions
.. warning: Not implimented yet
.. function:: getAnimRecordFrame()
Gets the current frame number used for recording animations. This
number is incremented automatically by Blender when the "Record
animation" feature is turned on.
:rtype: int
.. function:: setAnimRecordFrame(framenr)
Sets the current frame number used for recording animations. This
number is automatically incremented by Blender when the "Record
animation" feature is turned on.
The frame number Must be non-negative, unless Blender has
:attr:`bpy.types.UserPreferencesEdit.use_negative_frames` enabled
in its user preferences. Only use non-negative numbers to be on
the safe side, unless you know what you are doing.
:arg framenr: The new frame number.
:type framenr: int
.. function:: getExitKey()
Gets the key used to exit the game engine
@@ -894,6 +917,8 @@ Various
2D Filter
---------
.. _Two-D-FilterActuator-mode:
.. data:: RAS_2DFILTER_BLUR
:value: 2
@@ -1288,5 +1313,3 @@ See :class:`bge.types.KX_StateActuator.operation`
Add bits to state mask
:value: 3
.. _Two-D-FilterActuator-mode:

View File

@@ -8,9 +8,14 @@ Intro
.. module:: bge.render
Example of using a :class:`bge.types.SCA_MouseSensor`,
and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
.. note::
This can also be achieved with the :class:`bge.types.KX_MouseActuator`.
.. code-block:: python
# Example Uses an L{SCA_MouseSensor}, and two L{KX_ObjectActuator}s to implement MouseLook::
# To use a mouse movement sensor "Mouse" and a
# motion actuator to mouse look:
import bge
@@ -62,7 +67,7 @@ Constants
.. data:: KX_BLENDER_GLSL_MATERIAL
Materials approximating blender materials with GLSL.
.. DATA:: VSYNC_OFF
Disables vsync
@@ -73,7 +78,18 @@ Constants
.. DATA:: VSYNC_ADAPTIVE
Enables adaptive vsync if supported. Adaptive vsync enables vsync if the framerate is above the monitors refresh rate. Otherwise, vsync is diabled if the framerate is too low.
Enables adaptive vsync if supported.
Adaptive vsync enables vsync if the framerate is above the monitors refresh rate.
Otherwise, vsync is diabled if the framerate is too low.
.. data:: LEFT_EYE
Left eye being used during stereoscopic rendering.
.. data:: RIGHT_EYE
Right eye being used during stereoscopic rendering.
*********
Functions
@@ -82,117 +98,105 @@ Functions
.. function:: getWindowWidth()
Gets the width of the window (in pixels)
:rtype: integer
.. function:: getWindowHeight()
Gets the height of the window (in pixels)
:rtype: integer
.. function:: setWindowSize(width, height)
Set the width and height of the window (in pixels). This also works for fullscreen applications.
.. note:: Only works in the standalone player, not the Blender-embedded player.
:arg width: width in pixels
:type width: integer
:arg height: height in pixels
:type height: integer
.. function:: setFullScreen(enable)
Set whether or not the window should be fullscreen.
.. note:: Only works in the standalone player, not the Blender-embedded player.
:arg enable: ``True`` to set full screen, ``False`` to set windowed.
:type enable: bool
.. function:: getFullScreen()
Returns whether or not the window is fullscreen.
.. note:: Only works in the standalone player, not the Blender-embedded player; there it always returns False.
:rtype: bool
.. function:: getDisplayDimensions()
Get the display dimensions, in pixels, of the display (e.g., the
monitor). Can return the size of the entire view, so the
combination of all monitors; for example, ``(3840, 1080)`` for two
side-by-side 1080p monitors.
:rtype: tuple (width, height)
.. function:: makeScreenshot(filename)
Writes a screenshot to the given filename.
If filename starts with // the image will be saved relative to the current directory.
If the filename contains # it will be replaced with the frame number.
The standalone player saves .png files. It does not support color space conversion
or gamma correction.
When run from Blender, makeScreenshot supports all Blender image file formats like PNG, TGA, Jpeg and OpenEXR.
Gamma, Colorspace conversion and Jpeg compression are taken from the Render settings panels.
Writes an image file with the current displayed frame.
The image is written to *'filename'*.
The path may be absolute (eg. ``/home/foo/image``) or relative when started with
``//`` (eg. ``//image``). Note that absolute paths are not portable between platforms.
If the filename contains a ``#``,
it will be replaced by an incremental index so that screenshots can be taken multiple
times without overwriting the previous ones (eg. ``image-#``).
Settings for the image are taken from the render settings (file format and respective settings,
gamma and colospace conversion, etc).
The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
When running from the standalone player, instead of the embedded player, only PNG files are supported.
Additional color conversions are also not supported.
:arg filename: path and name of the file to write
:type filename: string
.. function:: enableVisibility(visible)
Doesn't really do anything...
Deprecated; doesn't do anything.
.. function:: showMouse(visible)
Enables or disables the operating system mouse cursor.
:arg visible:
:type visible: boolean
.. function:: setMousePosition(x, y)
Sets the mouse cursor position.
:arg x: X-coordinate in screen pixel coordinates.
:type x: integer
:arg y: Y-coordinate in screen pixel coordinates.
:type y: integer
.. function:: setBackgroundColor(rgba)
Sets the window background color.
:type rgba: list [r, g, b, a]
Deprecated and no longer functional. Use :py:meth:`bge.types.KX_WorldInfo.backgroundColor` instead.
.. function:: setMistColor(rgb)
Sets the mist color.
:type rgb: list [r, g, b]
.. function:: setAmbientColor(rgb)
Sets the color of ambient light.
:type rgb: list [r, g, b]
.. function:: setMistStart(start)
Sets the mist start value. Objects further away than start will have mist applied to them.
:type start: float
.. function:: setMistEnd(end)
Sets the mist end value. Objects further away from this will be colored solid with
the color set by setMistColor().
:type end: float
.. function:: disableMist()
Disables mist.
.. note:: Set any of the mist properties to enable mist.
.. function:: setEyeSeparation(eyesep)
Sets the eye separation for stereo mode. Usually Focal Length/30 provides a confortable value.
:arg eyesep: The distance between the left and right eye.
:type eyesep: float
@@ -200,27 +204,37 @@ Functions
.. function:: getEyeSeparation()
Gets the current eye separation for stereo mode.
:rtype: float
.. function:: setFocalLength(focallength)
Sets the focal length for stereo mode. It uses the current camera focal length as initial value.
:arg focallength: The focal length.
:arg focallength: The focal length.
:type focallength: float
.. function:: getFocalLength()
Gets the current focal length for stereo mode.
:rtype: float
.. function:: getStereoEye()
Gets the current stereoscopy eye being rendered.
This function is mainly used in a :class:`bge.types.KX_Scene.pre_draw` callback
function to customize the camera projection matrices for each
stereoscopic eye.
:rtype: LEFT_EYE, RIGHT_EYE
.. function:: setMaterialMode(mode)
Set the material mode to use for OpenGL rendering.
:arg mode: material mode
:type mode: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
.. note:: Changes will only affect newly created scenes.
@@ -229,58 +243,61 @@ Functions
.. function:: getMaterialMode(mode)
Get the material mode to use for OpenGL rendering.
:rtype: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
.. function:: setGLSLMaterialSetting(setting, enable)
Enables or disables a GLSL material setting.
:arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
:arg enable:
:type enable: boolean
.. function:: getGLSLMaterialSetting(setting, enable)
.. function:: getGLSLMaterialSetting(setting)
Get the state of a GLSL material setting.
:arg setting:
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
:rtype: boolean
.. function:: setAnisotropicFiltering(level)
Set the anisotropic filtering level for textures.
:arg level: The new anisotropic filtering level to use
:type level: integer (must be one of 1, 2, 4, 8, 16)
.. note:: Changing this value can cause all textures to be recreated, which can be slow.
.. function:: getAnisotropicFiltering()
Get the anisotropic filtering level used for textures.
:rtype: integer (one of 1, 2, 4, 8, 16)
.. function:: setMipmapping(value)
Change how to use mipmapping.
:type value: RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR
.. note:: Changing this value can cause all textures to be recreated, which can be slow.
.. function:: getMipmapping()
Get the current mipmapping setting.
:rtype: RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR
.. function:: drawLine(fromVec,toVec,color)
Draw a line in the 3D scene.
:arg fromVec: the origin of the line
:type fromVec: list [x, y, z]
:arg toVec: the end of the line
@@ -292,7 +309,7 @@ Functions
.. function:: enableMotionBlur(factor)
Enable the motion blur effect.
:arg factor: the ammount of motion blur to display.
:type factor: float [0.0 - 1.0]
@@ -305,24 +322,28 @@ Functions
Show or hide the framerate.
:arg enable:
:type enable: boolean
.. function:: showProfile(enable)
Show or hide the profile.
:arg enable:
:type enable: boolean
.. function:: showProperties(enable)
Show or hide the debug properties.
:arg enable:
:type enable: boolean
.. function:: autoDebugList(enable)
Enable or disable auto adding debug properties to the debug list.
:arg enable:
:type enable: boolean
.. function:: clearDebugList()

File diff suppressed because it is too large Load Diff

View File

@@ -7,11 +7,66 @@ base class --- :class:`PyObjectPlus`
.. class:: KX_BlenderMaterial(PyObjectPlus)
KX_BlenderMaterial
This is the interface to materials in the game engine.
Materials define the render state to be applied to mesh objects.
The example below shows a simple GLSL shader setup allowing to dynamically mix two texture channels
in a material. All materials of the object executing this script should have two textures using
separate UV maps in the two first texture channels.
The code works for both Multitexture and GLSL rendering modes.
.. code-block:: python
from bge import logic
vertex_shader = """
void main(void)
{
// simple projection of the vertex position to view space
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// coordinate of the 1st texture channel
gl_TexCoord[0] = gl_MultiTexCoord0;
// coordinate of the 2nd texture channel
gl_TexCoord[1] = gl_MultiTexCoord1;
}
"""
fragment_shader ="""
uniform sampler2D texture_0;
uniform sampler2D texture_1;
uniform float factor;
void main(void)
{
vec4 color_0 = texture2D(texture_0, gl_TexCoord[0].st);
vec4 color_1 = texture2D(texture_1, gl_TexCoord[1].st);
gl_FragColor = mix(color_0, color_1, factor);
}
"""
object = logic.getCurrentController().owner
for mesh in object.meshes:
for material in mesh.materials:
shader = material.getShader()
if shader is not None:
if not shader.isValid():
shader.setSource(vertex_shader, fragment_shader, True)
# get the first texture channel of the material
shader.setSampler('texture_0', 0)
# get the second texture channel of the material
shader.setSampler('texture_1', 1)
# pass another uniform to the shader
shader.setUniform1f('factor', 0.3)
.. attribute:: shader
The materials shader.
The material's shader.
:type: :class:`BL_Shader`
@@ -34,39 +89,83 @@ base class --- :class:`PyObjectPlus`
:return: the material's shader
:rtype: :class:`BL_Shader`
.. attribute:: alpha
The material's alpha transparency.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: hardness
How hard (sharp) the material's specular reflection is.
:type: integer between 1 and 511 inclusive
.. attribute:: emit
Amount of light to emit.
:type: float between 0.0 and 2.0 inclusive
.. attribute:: specularIntensity
How intense (bright) the material's specular reflection is.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: diffuseIntensity
The material's amount of diffuse reflection.
:type: float between 0.0 and 1.0 inclusive
.. attribute:: specularColor
The material's specular color.
:type: :class:`mathutils.Color`
.. attribute:: diffuseColor
The material's diffuse color.
:type: :class:`mathutils.Color`
.. method:: setBlending(src, dest)
Set the pixel color arithmetic functions.
:arg src: Specifies how the red, green, blue, and alpha source blending factors are computed.
:type src: Value in...
:arg src: Specifies how the red, green, blue, and alpha source blending factors are computed, one of...
* :data:`~bgl.GL_ZERO`
* :data:`~bgl.GL_ONE`
* :data:`~bgl.GL_SRC_COLOR`
* :data:`~bgl.GL_ONE_MINUS_SRC_COLOR`
* :data:`~bgl.GL_DST_COLOR`
* :data:`~bgl.GL_ONE_MINUS_DST_COLOR`
* :data:`~bgl.GL_SRC_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_SRC_ALPHA`
* :data:`~bgl.GL_DST_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_DST_ALPHA`
* :data:`~bgl.GL_SRC_ALPHA_SATURATE`
:type src: int
* GL_ZERO,
* GL_ONE,
* GL_SRC_COLOR,
* GL_ONE_MINUS_SRC_COLOR,
* GL_DST_COLOR,
* GL_ONE_MINUS_DST_COLOR,
* GL_SRC_ALPHA,
* GL_ONE_MINUS_SRC_ALPHA,
* GL_DST_ALPHA,
* GL_ONE_MINUS_DST_ALPHA,
* GL_SRC_ALPHA_SATURATE
:arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed.
:type dest: Value in...
* GL_ZERO
* GL_ONE
* GL_SRC_COLOR
* GL_ONE_MINUS_SRC_COLOR
* GL_DST_COLOR
* GL_ONE_MINUS_DST_COLOR
* GL_SRC_ALPHA
* GL_ONE_MINUS_SRC_ALPHA
* GL_DST_ALPHA
* GL_ONE_MINUS_DST_ALPHA
* GL_SRC_ALPHA_SATURATE
:arg dest: Specifies how the red, green, blue, and alpha destination blending factors are computed, one of...
* :data:`~bgl.GL_ZERO`
* :data:`~bgl.GL_ONE`
* :data:`~bgl.GL_SRC_COLOR`
* :data:`~bgl.GL_ONE_MINUS_SRC_COLOR`
* :data:`~bgl.GL_DST_COLOR`
* :data:`~bgl.GL_ONE_MINUS_DST_COLOR`
* :data:`~bgl.GL_SRC_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_SRC_ALPHA`
* :data:`~bgl.GL_DST_ALPHA`
* :data:`~bgl.GL_ONE_MINUS_DST_ALPHA`
* :data:`~bgl.GL_SRC_ALPHA_SATURATE`
:type dest: int
.. method:: getMaterialIndex()

View File

@@ -51,6 +51,18 @@ base class --- :class:`KX_GameObject`
:type: float
.. attribute:: shift_x
The camera's horizontal shift.
:type: float
.. attribute:: shift_y
The camera's vertical shift.
:type: float
.. attribute:: perspective
True if this camera has a perspective transform, False for an orthographic projection.

View File

@@ -37,7 +37,7 @@ base class --- :class:`PyObjectPlus`
The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
:type: list [x, y, z]
:type: Vector((x, y, z))
.. method:: jump()

View File

@@ -23,15 +23,14 @@ base class --- :class:`PyObjectPlus`
:arg axis:
:type axis: integer
.. note::
For each axis:
* Lowerlimit == Upperlimit -> axis is locked
* Lowerlimit > Upperlimit -> axis is free
* Lowerlimit < Upperlimit -> axis it limited in that range
.. note::
* Lowerlimit == Upperlimit -> axis is locked
* Lowerlimit > Upperlimit -> axis is free
* Lowerlimit < Upperlimit -> axis it limited in that range
For PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
axis = 3 is a constraint limit, with low/high limit value
* 3: X axis angle
:arg value0 (min): Set the minimum limit of the axis
@@ -39,7 +38,8 @@ base class --- :class:`PyObjectPlus`
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_CONE_TWIST_CONSTRAINT = 3:
For PHY_CONE_TWIST_CONSTRAINT = 4:
axis = 3..5 are constraint limits, high limit values
* 3: X axis angle
* 4: Y axis angle
@@ -50,7 +50,8 @@ base class --- :class:`PyObjectPlus`
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_GENERIC_6DOF_CONSTRAINT = 12:
For PHY_GENERIC_6DOF_CONSTRAINT = 12:
axis = 0..2 are constraint limits, with low/high limit value
* 0: X axis position
* 1: Y axis position
@@ -133,9 +134,10 @@ base class --- :class:`PyObjectPlus`
:type: integer
* 1 = POINTTOPOINT_CONSTRAINT
* 2 = LINEHINGE_CONSTRAINT
* 3 = ANGULAR_CONSTRAINT (aka LINEHINGE_CONSTRAINT)
* 4 = CONETWIST_CONSTRAINT
* 11 = VEHICLE_CONSTRAINT
* 12 = GENERIC_6DOF_CONSTRAINT
- :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
- :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
- :class:`~bge.constraints.ANGULAR_CONSTRAINT`
- :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`

View File

@@ -7,6 +7,26 @@ base class --- :class:`KX_GameObject`
.. class:: KX_FontObject(KX_GameObject)
TODO.
A Font object.
.. code-block:: python
# Display a message about the exit key using a Font object.
import bge
co = bge.logic.getCurrentController()
font = co.owner
exit_key = bge.events.EventToString(bge.logic.getExitKey())
if exit_key.endswith("KEY"):
exit_key = exit_key[:-3]
font.text = "Press key '%s' to quit the game." % exit_key
.. attribute:: text
The text displayed by this Font object.
:type: string

Some files were not shown because too many files have changed in this diff Show More