1
1

Compare commits

...

2597 Commits

Author SHA1 Message Date
32fef3040f fix attempt for conversion of multiple FM objects to keyframed shard objects 2021-01-13 17:54:26 +01:00
233ad61cb8 potential fix for incorrect external mode custom rotations after loading 2019-09-06 22:26:41 +02:00
969fca718a disabled offset based fallback in rotation calculation
it caused unwanted sudden rotation changes
2019-06-17 14:35:25 +02:00
af7032e9f0 only write rotation data to mesh if particle rotation was enabled 2019-06-17 10:59:55 +02:00
9c1016b74e fix for rotation calculation in anim bind 2019-06-17 10:45:38 +02:00
7a37dbbaeb fix attempt for binding to particles 2019-06-15 20:05:27 +02:00
a2fb21104a deform mblur fix FM
call for precalcing velocities was not always reached (only for autohide enabled)
2019-03-13 21:42:02 +01:00
33222dd8f6 grr formatting typo 2019-03-13 16:31:54 +01:00
0001491d57 update links to FM hosting pages 2019-03-13 16:28:13 +01:00
6c12b6559e partial fix for wrong rotation when converting to keyframes
forgot to initialize ob->quat for passive objects, they are most likely in euler rotation
mode still and the ob->quat seems not automatically in sync
2019-02-03 12:41:18 +01:00
38d5aa3a58 expose rigidbody apply_force and apply_torque to python via rna function 2019-01-25 18:11:57 +01:00
e510259377 crash fix for using Final Solid if derivedFinal is NULL
was missing a nullpointer check, fallback is to return a DM of the basemesh
2019-01-16 16:46:50 +01:00
74d4e4c443 pull animated bind update calls out of loop
the function does a loop on its own (over meshislands in fm)
2019-01-11 14:21:49 +01:00
8df4ac8a84 fix attempt for previous rotation fix with bound objects 2019-01-10 21:56:48 +01:00
e6ce7b9805 fix for bound object lagging behind one frame 2019-01-10 19:27:38 +01:00
463f165dbf hopefully proper rotation fix for animated mesh bind 2019-01-09 20:16:51 +01:00
c8d6bba3cc backport of master fix for https://developer.blender.org/T56969
allows to let the branch run with python 3.7 too
2018-12-02 22:16:16 +01:00
7a18c905bf transform fix for external centroid-based constraints 2018-12-02 21:52:32 +01:00
8b322524c9 small fix for minimum mass and UI float display precision changes
testing now against being smaller than minimum mass 0.001 and setting it to 0.001 instead
of testing against 0 (useless with float)
adapted displayed UI precision with breaking threshold, cluster breaking threshold, breaking distance and cluster breaking distance.
2018-12-02 21:30:39 +01:00
5183a1d0ed fixes for dynamic fracture
fixes for:
- speed transfer (shards could stop their motion)
- shards could be stuck in the air
- ghost dynamic triggers work now too (firing a contact callback)
2018-11-09 23:16:02 +01:00
7da0f0671a crash fix for compound collision + expose constraint rules ui for compound mode
parts of the constraint rules can influence compound simulation behavior too, especially
clustering. You can either simulate compounds with our without triggers. First method might be slower than with constraints, but no bending. With triggers its faster, but objects always fall apart entirely (clusters can control this a bit)
2018-11-08 15:08:59 +01:00
3fa179f341 disabled a verbose print when using many objects 2018-10-31 15:08:55 +01:00
982720cffe fix for autohide with fractal (could leave holes near inner edges before); fractal/fast bisect should now also take extra objects / helper better into account 2018-10-01 17:17:12 +02:00
cdf05d154a do not show dump writing routine in dump any more
did also use exception handler and manually set up signals
2018-09-09 16:12:31 +02:00
a607ddd66a very simple confirm dialog whether to send crash minidump or not, with xmessage 2018-09-08 18:09:33 +02:00
07e497db29 backported existing crashpad support (win, mac, needs testing) and added breakpad support (linux) 2018-09-08 02:00:56 +02:00
d6b6484931 constraint UI label / tooltip clarifications
now having Search Method, Search Limit as labels, tooltips explain that this is related to shards as well
2018-09-05 14:34:23 +02:00
5aeff9291f backport of new linux library build system to FM 2.79 branch
after upgrade to Linux Mint 19 locally, nothing did work anymore basically... and in order to use this with the blender docker build system, it needed the new(er) cmake based library building system.
2018-09-03 20:06:25 +02:00
f0aef2afe9 let neighbor shards now only be stopped if propagate trigger is enabled 2018-09-02 22:09:47 +02:00
d846f810b2 added autohide filtering based on filter object vertex positions
mesh objects now use their verts and a distance, while empties (or other non-mesh objects) still
use the maximum of the object size as radius
2018-08-12 14:54:57 +02:00
c5cf0667cb re-enabled deform mblur for FM, and hopefully fixed related crashes 2018-08-11 00:12:16 +02:00
882642157c disable deform mblur in FM for now (precalced velocities)
it caused crashes at baking and rendering, as well as on saving and loading.
Needs to be re-implemented differently without customdata, rather let cycles read the rigidbody
data directly via FM.
2018-08-10 13:49:39 +02:00
16b07fb08d allow grid spacing > 1 2018-08-03 11:22:08 +02:00
3436ed8df7 use voro particle order now correctly, fixes brick fracture problems. 2018-08-02 13:42:32 +02:00
63ec1f4f9d fix for ghost trigger (again) 2018-07-29 21:27:04 +02:00
ea4be4d1b1 execute operator warns now if current frame is not on cache startframe 2018-07-28 23:45:07 +02:00
f811c08407 restore ghost stop trigger functionality 2018-07-28 13:05:28 +02:00
0f15570266 attempt to fix incorrect (bbox) triggering behavior 2018-07-27 17:04:42 +02:00
b82de8463b do not set edges of selected faces to sharp in external mode
because in most cases only existing objects are packed into the FM mesh, and no fracturing happens,
where you want to set fracture edges to sharp.
2018-06-25 16:50:42 +02:00
1d880e8e0b enable angular limit/stiffness/damping settings for plastic constraints
in fact, only forgot to uncomment
2018-06-23 16:21:43 +02:00
9a21afd18d fix for cmake failing to detect VS 2017 properly 2018-05-24 23:55:19 +02:00
d3b52a6cbc added ghost stop triggers
stopped shards also will get their constraints disabled and still attached partners will be stopped too
2018-05-24 14:45:27 +02:00
da4854a8b8 missed in last commit: rise BM_OMPLIMIT to avoid overheads with small datasets 2018-05-02 20:45:37 +02:00
f3ce2881c3 fix a clang warning, fix an improper initialisation for gcc, remove nonfunctional omp, rise BM_OMPLIMIT to avoid overheads with small datasets 2018-05-02 20:41:56 +02:00
dac9244425 crash fix for changing shardcount and refracture when doing automerge
forgot to refresh the merge data before merging, after refracturing
2018-04-25 22:09:25 +02:00
192ae864f4 added isIntact() query to regular rigidbody constraints, too 2018-04-25 14:17:26 +02:00
18ba072f17 immediately take constraint limit changes into account during rigidbody simulation 2018-04-17 14:55:27 +02:00
d451c4e831 fix for setting lower x linear limit 2018-04-15 12:57:56 +02:00
16ccab4748 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.79b-release' into fracture_modifier 2018-04-14 20:53:09 +02:00
f4dc9f9d68 Fix T54360: FFMPEG bitrate not editable for all codecs
The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
2018-03-22 15:10:42 +01:00
6f07673ce4 Fix compilation error
Recent fix was assuming some cleanup is done.
2018-03-22 09:56:06 +01:00
150dee260e Update addons submodule hash 2018-03-22 09:51:05 +01:00
55872de560 Fix T54234, add BLENDER_VERSION_CHAR to .plist 2018-03-22 09:48:31 +01:00
6bf458dfff Fixed: cache clearing when using multiple Alembic files. 2018-03-22 09:44:12 +01:00
61c3317688 Cleanup: Use more python way of checking boolean 2018-03-22 09:41:22 +01:00
0253b16180 Tracking: Make object created form tracks active and selected 2018-03-22 09:41:18 +01:00
3ed28ccb93 Tracking: Warn when no tracks are selected when creating mesh
Makes it more clear why mesh was not created this way.

Fixes T54368: 3D markers to mesh In MovieClipEditor Not working.
2018-03-22 09:41:10 +01:00
d791f3522e Fix T54348: Bone dissolve gives invalid hierarchy
Disconnected bones weren't handled correctly.
2018-03-22 09:39:11 +01:00
557e1b02de Fix bone dissolve using wrong envelope radius
Also correctly copy bone tip selection when dissolving.
2018-03-22 09:38:47 +01:00
5da3aecefd Fix T53478, T53430: Sequencer cut edge case fails
Previous fix for T53430 caused T54200.

The edge case for soft & hard cuts weren't working,
where the strip used start/end-still & the frame was placed exactly on
the start/end of of the sequence content.

T54200 fixed the end-still case but broke hard-cuts for all other cases.

This fixes the case for soft/hard cuts with/without start/end-still.
2018-03-19 11:36:25 +01:00
241c142248 Revert "Fix T53430: Cut at the strip end fails w/ endstill"
This reverts commit 855799ecc1.

Caused T54200
2018-03-19 11:36:18 +01:00
c5db594b92 Error passing context arg to marker menu
own mistake in 6981861fcf
2018-03-19 11:36:11 +01:00
e57a1bb86b API generating script: give better version for releases builds.
Was giving '2.62.1 <sha1>' even for releases, now rather giving nicer
'2.62a <sha1>' in that case.
2018-03-19 11:36:02 +01:00
4697e491b4 Fix T54206: bevel and inset operations repeat did not remember offset.
Now repeating the operator will use the previously chosen offset, either with
the modal operator or typed in. The modal operator will still start at zero.
2018-03-19 11:35:55 +01:00
852d63b835 Fix T54204: Wrong selection on Clean Tracks (Motion Tracking)
A mistake in a fix for T53612.

Regression in 2.79a, candidate for 2.79b :S
2018-03-19 11:35:46 +01:00
8ec398d401 Fix T54003: Particles - Size and random size not present in "physics" tab in Advanced mode
The check to see if `use_advanced_hair` was enabled was actually in two places
(render panel `draw` function and physics panel `poll` function). As these
properties are only in one place now the check in `draw` isn't needed anymore.

Related: T53513, a6c69ca57f
2018-03-19 11:35:20 +01:00
9accd8852b Bl;ender 2.79b: Begin 2.79b release cycle 2018-03-19 11:33:15 +01:00
c381b3fadc added vertexgroup to influence metaball radii
note, the weight (0...1) is normed to a size factor -0.5 ... 0.5 to also allow negative mball elements.
2018-02-28 17:54:10 +01:00
3cc1faf118 when sorting objects, keep mi->object_index aligned 2018-02-25 19:48:05 +01:00
d39fb8ffbb activate by constraint impulse and regular ghost triggers 2018-02-25 15:46:40 +01:00
930b6a0540 rna build fix (error when building debug) 2018-02-25 00:02:38 +01:00
882cf08e5e only calc FM mblur velocity layer at render time
this costs some performance
2018-02-24 17:32:50 +01:00
fb8acd8b33 optionally restore old activation behavior with broken constraints
this allows easier breaking / collapsing of objects
2018-02-24 11:20:44 +01:00
e88359152a compile fixes after merge 2018-02-22 13:03:08 +01:00
fb4fcd6e01 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.79a-release' into fracture_modifier
Conflicts:
	source/blender/modifiers/intern/MOD_boolean.c
2018-02-22 13:02:34 +01:00
8928d99270 VSE: skip non image/movie w/ proxy dir storage
This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.
2018-02-21 21:41:31 +11:00
9e707802c2 Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Was accessing past the array boundaries.

Should be safe for 2.79a.
2018-02-21 10:53:05 +01:00
ae358f92e6 fix, anim bind rotation was calculated incorrectly 2018-02-20 13:45:53 +01:00
db0f53ae3c fix for bind ngon problems (jumping rotations) 2018-02-19 18:46:30 +01:00
09aaee5640 Fix T53032: Image sequence works bad with Displace modifier
We shouldn't mix image pool acuisition with and without user provided,
the fact that internally image.c uses last frame from Image datablock
confuses the logic.
2018-02-19 14:38:25 +01:00
dc5aaac3a2 Blender 2.79a: Update submodules hash for addons 2018-02-19 11:33:45 +01:00
a4dbff33c9 Blender 2.79a: Prepare for release
Enter release state and make spacing to "a" more sane.

There is still at least one fix we want to get in, before declaring we are
ready for release.
2018-02-19 10:49:46 +01:00
750798a777 crash fix for deleting connected objects before its connectors 2018-02-18 11:20:39 +01:00
76dfe5f0b4 crash fix for FM objects being copied after connect 2018-02-18 02:31:37 +01:00
446ed1c516 rigidbody sort fix for external constraints 2018-02-18 00:51:05 +01:00
4e1c31ca7b crash fix for external constraints
ensure refresh of "parent" FM object on every refresh of connected objects, also ensure evaluation order in rigidbody.c / bullet (parent always after children)
2018-02-17 13:42:26 +01:00
59cc0bfef5 Fix T54075: Align Objects fails w/ empty mesh 2018-02-15 15:49:03 +11:00
9268ff4b21 Cleanup: Python context access
Avoid access from bpy when it's already declared.
2018-02-15 15:49:03 +11:00
7ae9b96ac6 Fix T54072: Crash splitting edges 2018-02-15 15:49:03 +11:00
bc891ad124 Fix T53958: Sequencer zoom 1:1 fails 2018-02-15 15:49:03 +11:00
3982a36c10 Minor change to last commit
Keep mode checks simple, nest other checks in their body.
2018-02-15 15:49:03 +11:00
f5c0df3601 Fix T53986: Crash saving during sculpt stroke
Also remove unused struct member.
2018-02-15 15:49:02 +11:00
81697c772c Fix: msvc build error with bli_fileops.h
bli_fileops.h was using uint64_t without including the proper header.

issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004
2018-02-15 15:49:02 +11:00
6f45c9d6c6 Fix T50630: Fluid fails on win32 w/ unicode paths
Allow overriding gzip open w/ elbeem.
2018-02-15 15:49:02 +11:00
d1281bf993 Fix navmesh creation w/ multiple objects
D2976 by @dertom
2018-02-15 15:49:02 +11:00
c40e9a1ad2 Docs: invoke_search_popup uses bl_property
Also add code example in docs.
2018-02-15 15:49:02 +11:00
748ada90b5 further constraint related crash fixes 2018-02-14 21:04:00 +01:00
6868e0a7d9 crash fix attempts
can still crash if you refracture a child object while its attached to others (constraints become invalid)
2018-02-14 20:26:07 +01:00
6249febf45 re-implementation of external constraints 2018-02-14 18:41:30 +01:00
d16510425f external constraints load / refresh fix 2018-02-13 19:17:52 +01:00
c491b50139 fix potential memory leak 2018-02-13 18:19:18 +01:00
4eb44b8610 another implementation attempt for external constraints 2018-02-13 18:07:41 +01:00
97a677e788 first attempt of brickify fracture 2018-02-12 22:19:07 +01:00
21f19224f3 Fix part of T53080: don't use current scene world for icon previews.
This can be very slow if it contains a big texture, and it's not
necessarily setup in a useful way anyway, and materials can be used
in multiple scenes.
2018-02-12 20:37:41 +01:00
c3d5668516 fix for "double rotation" in bind
if both objects were rotated, rotations were added up unnecessarily.
2018-02-11 10:58:44 +01:00
032b14a951 fractal boolean with regular alignment, animation bind tweaks 2018-02-10 23:50:25 +01:00
f29a691fb4 inner material is part of presets now 2018-02-09 17:40:31 +01:00
f6abf9d0ba Fix (unreported) crash when duplicating a FileBrowser window in preview draw mode.
We did not clear preview or smoothscroll timers pointers in copy code...
2018-02-09 16:25:08 +01:00
e5917d624e Fix missing group duplicated by hair in render
Was happening when viewport visibility on the particle system is disabled.
This became an issue after c45afcf, but the actual issue goes a bit deeper
and the following aspects were involved:

- Relations builder for particle system was ignoring particle system if
  it's visibility is not enabled for viewport. This is something what
  shouldn't have been done -- depsgraph relations are supposed to be the
  same no matter if it's viewport or render.

- Relation builder was only dealing with duplication set to object, but
  was ignoring group duplication.

This is NOT a regression since 2.79, but a regression since 2.79a-rc1.
2018-02-06 15:37:24 +01:00
ea82f4ce4e fix an ffmpeg qtrle crasher 2018-02-04 22:21:20 +01:00
bac2541ffa Fix T53686: VSE Render crash when zooming timeline.
Epic fail from recent 'security' fixes (rBe04d7c49dca9). ;)

To be backported to 2.79a!
2018-02-01 15:56:37 +01:00
3e2909cf9d Fix T53962: Cycles OpenCL compile error in some scenes.
This part of 212a8d9e needed to be ported over for 2ca933f to work.
2018-01-31 15:28:19 +01:00
1052497aad Fix possible concurency issue in mesh normals computation.
Failure in own code from last December, thanks @sergey for finding it.

To be backported to 2.79a.
2018-01-31 12:46:06 +01:00
567b4fa794 Fix T52634: EditMesh Remove doubles could hang
A single diagonal axis was used for sorting coordinates,
the algorithm relied on users not having vertices axis aligned.

Use BLI_kdtree to remove doubles instead.

Overall speed varies, it's more predictable than the previous method.
Some typical tests gave speedup of ~1.4x - 1.7x.
2018-01-31 09:56:53 +11:00
d7c7ce2a7b BLI_kdtree: utility function to remove doubles 2018-01-31 09:56:53 +11:00
f5ef3a7d81 animation bind rotation fix, some dynamic mode fixes 2018-01-29 20:51:25 +01:00
de563552da IMB: Add asserts that returned fps and fps base are strictly positives.
Forgot to add that in previous commit, also related to T53003.
2018-01-26 15:18:30 +01:00
3ee1a7978f Related to T53003: tweak scene fps range.
Move restricted 'reasonable' range to ui_range, and allow wider values
for manual settings.
2018-01-26 15:18:30 +01:00
a73b390f48 Fix T53003: IMB: Invalid framerate handling due to short integer overflow.
FFMPEG uses int for the numerator, while Blender uses a short. So in
cases people gave weird exotic framerate values and we cannot reduce
enough the numerator, we'd get totally weird values (even negative frame
rates sometimes!)

Now we add checks for short overflow and approximate as best as possible
in that case (error should not matter unless you have shots of at least
several hundreds of hours ;) ).
2018-01-26 15:18:30 +01:00
0e37c98257 Fix part of T53080: all material previews re-rendering after undo.
This reverts commit dc2617130b, which disabled
writing of previews for undo. While this uses some memory, re-rendering all
previews is very expensive, especially if for example you have lots of materials
using high-res image textures.
2018-01-26 08:45:37 +01:00
8fedf97883 improved rotation calculation in bind animated mesh 2018-01-26 00:08:41 +01:00
0859c99bf2 fix for loading crash with dynamic fracture
forgot to copy the fracmesh, but this now might increase mem usage
2018-01-25 16:08:25 +01:00
4c1bed0a12 Fix T53593: sculpt brush rake spacing bug after recent bugfix. 2018-01-24 16:06:13 +01:00
95a31c8a3a fix attempt for split shard to island crashes
customdata was incorrectly freed and corrupted the memory
2018-01-24 14:28:36 +01:00
d68f53a3f3 added a limit / searchradius for animated mesh binding
bind operator now clears the simulation cache too
2018-01-23 18:05:14 +01:00
2f5a027b94 Cycles: Fix bug in user preferences with factory startup
Namely, the issue would happen when CPU device was never used before.
Issue with wrong merge conflict resolution.
2018-01-23 16:16:09 +01:00
da98a2c5ff forgot to include workaround for changing vertex counts 2018-01-22 22:42:41 +01:00
3691bf1a20 fix attempt for bind animated mesh 2018-01-22 21:33:31 +01:00
61335d853d Blender 2.79a: Use latest dev-tools
This way release checker used by Linux release environment is corrected.
2018-01-22 15:48:41 +01:00
43d1bfea40 Blender 2.79a: Show both version char and rc text on splash 2018-01-22 14:41:22 +01:00
4cda3e2d87 Blender 2.79a: Use proper version char 2018-01-22 14:38:57 +01:00
dc4afef1da Blender 2.79a: Point submodules to updated hash 2018-01-22 14:32:20 +01:00
8553449cf2 Task scheduler: Start with suspended pool to avoid threading overhead on push
The idea is to avoid any threading overhead when we start pushing tasks in a
loop. Similarly to how we do it from the new dependency graph. Gives couple of
percent of speedup here, but also improves scalability.
2018-01-22 12:57:08 +01:00
af83535dd0 Task scheduler: Clarify why do we need an atomic add of 0 2018-01-22 12:56:35 +01:00
a3616980c6 Cycles: Fix crash opening user preferences after adding extra GPU
We can not store pointers to elements of collection property in the
case we modify that collection. This is like storing pointers to
elements of array before calling realloc().
2018-01-22 12:54:00 +01:00
2f6d7946a4 Cycles tests: Add extra image tests 2018-01-22 12:39:11 +01:00
c3237cdc13 Fix T53012: Shadow catcher creates artifacts on contact area
The issue was caused by light sample being evaluated to nan at some point.
This is root of the cause which is to be fixed, but is very hard to trace down
especially via ssh (the issue only happens on AVX2 release build). Will give it
a closer look when back to my AVX2 machine.

For until then this is a good check to have anyway, it corresponds to what's
happening in regular radiance sum.
2018-01-22 12:39:11 +01:00
417170159a Fix retro-futuristical atempt to include some keymaps for non-backported feature from master.
Was making unittests unhappy.
2018-01-22 12:32:08 +01:00
6036bf7497 Revert "Node selection: Stop operator when mouse selection selected a node"
This reverts commit bf58ec9265.
2018-01-22 12:22:44 +01:00
a50c381fac Cycles: Fix difference in image Clip extension method between CPU and GPU
Our own implementation was behaving different comparing to OSL and GPU,
namely on the border pixels OSL and CUDA was doing interpolation with
black, but we were clamping coordinate.

This partially fixes issue reported in T53452.

Similar change should also be done for 3D interpolation perhaps, but this
is to be investigated separately.
2018-01-22 12:20:51 +01:00
b90f3928a3 Fix T53850: Lock to Cursor breaks 3D manipulators 2018-01-22 20:34:44 +11:00
cae8c68ca6 Fix manual lookups (data is now lowercase) 2018-01-22 10:14:20 +11:00
79563d2a33 Fix old files with changed node socket type not loading correctly.
This would lead to sock.default_value pointing to the wrong data type,
possibly causing crashes. Unfortunately, this bug will still exist for
older Blender versions that try to load newer files, which makes
changing the type of a node socket problematic.
2018-01-20 23:35:10 +01:00
82f7726549 crash fix at fracturing, customdata layer index handlng was incorrect 2018-01-19 21:30:23 +01:00
b6481cbbe5 Fix T53823: Particle weight brush crash
Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.
2018-01-19 15:06:19 +11:00
5b3538e02a Fix T53832: Particle weight paint crash
Drawing hair weights read before the hair array start.
This code could be improved since it currently copy-pastes,
from do_particle_interpolation, but this would need larger changes.

For now just correct existing logic.
2018-01-19 15:06:19 +11:00
c3873a5156 Fix memory leak in recent curve refactor
5b25605761fb7
2018-01-18 19:24:49 +01:00
8dbd5ea4c8 Fix buffer overflow vulnerability in curve, font, particles code.
Solves these security issues from T52924:
CVE-2017-12102
CVE-2017-12103
CVE-2017-12104

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 19:24:43 +01:00
9287434fa1 Fix buffer overflow vulnerabilities in mesh code.
Solves these security issues from T52924:
CVE-2017-12081
CVE-2017-12082
CVE-2017-12086
CVE-2017-12099
CVE-2017-12100
CVE-2017-12101
CVE-2017-12105

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 19:24:32 +01:00
2ae9d757b3 Fix Linux/GCC compiler warning in recent fixes. 2018-01-18 19:23:45 +01:00
04c5131281 Fix buffer overflow vulernability in thumbnail file reading.
Fixes CVE-2017-2908 from T52924.

Differential Revision: https://developer.blender.org/D3001
2018-01-18 19:23:40 +01:00
16718fe4ea Fix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.
Solves these security issues from T52924:
CVE-2017-2899
CVE-2017-2900
CVE-2017-2901
CVE-2017-2902
CVE-2017-2903
CVE-2017-2904
CVE-2017-2905
CVE-2017-2906
CVE-2017-2907
CVE-2017-2918

Differential Revision: https://developer.blender.org/D2999
2018-01-18 19:23:33 +01:00
a972729895 Memory: add MEM_malloc_arrayN() function to protect against overflow.
Differential Revision: https://developer.blender.org/D3002
2018-01-18 19:23:27 +01:00
5ddcad4377 Fix T53810: Crash removing a scene used in render
Header drawing accesses the scene too.
2018-01-17 14:06:54 +11:00
8fd65dc0e9 corrected some more special constraint breaking activation behavior (was activating too much) 2018-01-17 00:12:49 +01:00
f72e6fcdfa Revert "Fix T53752: Draw curve fails w/ stylus"
This reverts commit d0e0f33f57.

Requested by author, since it raised new issues, better not have it in
bugfix release!
2018-01-16 17:19:17 +01:00
022d64008e small transform fix for animated mesh binding 2018-01-15 16:55:29 +01:00
7ef50296e0 some corrective changes in special breaking activation behavior 2018-01-14 20:13:53 +01:00
80671518eb put animated mesh settings to new panel, some fixes 2018-01-14 20:12:53 +01:00
91ce295796 Fix T53772: Presets don't support colons 2018-01-14 14:51:59 +11:00
db72a8a6e0 fix for binding, should leave no shards behind now 2018-01-14 01:34:12 +01:00
13973a5bbf Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Differential Revision: https://developer.blender.org/D2981
2018-01-13 02:50:52 +01:00
824c039230 Fix T53567: Negative pixel values causing artifacts with denoising
Now negative color values are clamped to zero before the actual denoising.
2018-01-13 02:42:39 +01:00
Stefan Werner
a623c02569 Cycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit. 2018-01-13 02:41:57 +01:00
Stefan Werner
b3adce7766 Cycles: Workaround for performance loss with the CUDA 9.0 SDK.
CUDA 9.0.176 apparently caused some slow down on high-end Pascal cards that can be mitigated by increasing the number of registers. See https://developer.blender.org/F1142667 for a detailed comparison.
2018-01-13 02:41:25 +01:00
30a0459f2c Fix T53692: OpenCL multi GPU rendering not using all GPUs.
Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.
2018-01-13 02:40:09 +01:00
2ca933f457 Fix T53755: Cycles OpenCL lamp shaders have incorrect normal. 2018-01-13 02:38:08 +01:00
758d7350d6 fixes for bind animated mesh: transform and jump issues 2018-01-13 00:39:18 +01:00
2a41da1d91 experimental bind of animated vertices (other object) to shards
this transfers vertex motion during simulation and allows some kind of "deformation" of the fractured mesh, without
refracturing it
2018-01-12 13:15:22 +01:00
f12ab4e196 Cleanup: SGI format, remove unused struct members 2018-01-12 21:20:52 +11:00
7b8b621c1d Fix SGI foramt reader CVE-2017-2901
Integer Overflow Code Execution Vulnerability.

Reader no longer crashes on corrupt images (from own fuzz testing).
2018-01-12 21:20:52 +11:00
6a86a1f082 Cleanup: SGI format, avoid overflow
Harmless but causes warnings
2018-01-12 21:20:52 +11:00
e9548a6184 Cleanup: SGI format, use uint/short/char types 2018-01-12 21:20:52 +11:00
20cccb1561 Fix bmesh.utils.face_join arg parsing 2018-01-12 15:56:53 +11:00
57b11d8b4e Fix T53311: transform edge/normal orientation
When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.
2018-01-12 15:56:53 +11:00
38357cd004 Fix background_job template
Update attribute and use empty file operator
2018-01-12 15:55:30 +11:00
d0e0f33f57 Fix T53752: Draw curve fails w/ stylus 2018-01-11 11:22:37 +11:00
ee7042173c fixed a crasher when moving an object in dynamic fracture and when attempting to undo/redo FM removal 2018-01-10 22:00:45 +01:00
91ea5336a5 removed some performance-deadly reallocs in remesher
remesher now atleast responds again to user input and runs with 0.6fps with 60^3 particles
2018-01-10 04:09:54 +01:00
db74c06dd6 Additional fix after cherry-picking rB870840e8b7dd (in rB72151f3e36b). 2018-01-09 14:31:20 +01:00
e4e2e3a15d Add an 'atomic cas' wrapper for pointers.
Avoids having to repeat obfuscating castings everywhere...
2018-01-09 14:27:32 +01:00
71e0894e0d Fix scalability issue in threaded code of Mesh normals computation.
We tried to do as much as possible in a single threaded callback, which
lead to using some nasty tricks like fake atomic-based spinlocks to
perform some operations (like float addition, which has no atomic
intrinsics).

While OK with 'standard' low number of working threads (8-16), because
collision were rather rare and implied memory barrier not *that* much
overhead, this performed poorly with more powerful systems reaching the
100 of threads and beyond (like workstations or render farm hardware).

There, both memory barrier overhead and more frequent collisions would
have significant impact on performances.

This was addressed by splitting further the process, we now have three
loops, one over polys, loops and vertices, and we added an intermediate
storage for weighted loop normals. This allows to avoid completely any
atomic operation in body of threaded loops, which should fix scalability
issues. This costs us slightly higher temp memory usage (something like
50Mb per million of polygons on average), but looks like acceptable
tradeoff.

Further more, tests showed that we could gain an additional ~7% of speed
in computing normals of heavy meshes, by also parallelizing the last two
loops (might be 1 or 2% on overall mesh update at best...).

Note that further tweaking in this code should be possible once Sergey
adds the 'minimum batch size' option to threaded foreach API, since very
light loops like the one on loops (mere v3 addition) require much bigger
batches than heavier code (like the one on polys) to keep optimal
performances.
2018-01-09 14:14:59 +01:00
72151f3e36 Subsurf: Avoid possible use of partially initialized edge hash 2018-01-09 14:12:17 +01:00
83b0603061 Subsurf: Avoid global lock for loops and orig index layers
This is a bit annoying to have per-DM locking, but it's way better (as in, up to
4 times better) for playback speed when having lots of subsurf objects,
2018-01-09 14:11:58 +01:00
b01fe3bf01 install_deps: Fix OCIO always re-cloning its whole git repository. 2018-01-08 17:23:33 +01:00
4c8aa61be2 No groping in Blender's Tracker!
This a small cleanup of something which I think is just a typo anyway.

With all the recent talks of harrassment and groping, I think we better avoid
that within our source code! :)

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D2979
2018-01-08 17:23:22 +01:00
a1d05ac2a1 Fix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled marker
Simple fix, which is totally safe for 2.79a!
2018-01-08 17:23:09 +01:00
0c365472b6 Fix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.
Stupid mistake in material reading code, thanks to Simon Wendsche (@BYOB) for the investigation and fix!

To be backported to 2.79a.
2018-01-08 17:23:02 +01:00
010cf35e7e (Nodes) Display image name if any in the Image and Texture Image node title 2018-01-08 17:21:45 +01:00
2a9abc0f5e Fix T53650: remove hard limits on force field size and max distance.
Differential Revision: https://developer.blender.org/D2987
2018-01-08 17:21:34 +01:00
Dalai Felinto
e4dce3b3d7 Fix leak when rendering OpenGL animations
We were duplicating rectf twice :/

Patch by Clément Foucault.
2018-01-08 17:21:16 +01:00
243b961c29 Fix T52953: Crash removing material 2018-01-08 17:21:04 +01:00
42e207b599 Fix T53678: Smart Project UV margin ignores units 2018-01-08 17:19:15 +01:00
32fb50179f nstall_deps: llvm downloads new website location
Patch by Lucas Walter (@lucasw), thanks.

Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D2983
2018-01-08 17:18:52 +01:00
Dalai Felinto
c70a45027d Fix T53513: Particle size showing in multiple places
Technically this was introduced in 01b547f993 when
exposing size and randomness for particles.

This "fixes" makes sure particle size and size randomness is always in the
Render panel when it affects the particle system (i.e., always unless using
advanced hair or hair that is not rendering groups/objects).
2018-01-08 17:17:01 +01:00
8f7030e5f3 Fix T53639: text sequence strips no stamped into render.
Differential Revision: https://developer.blender.org/D2977
2018-01-08 17:16:46 +01:00
405874bd79 Fix MSVSC2017 error
The last compiler version needs this include
2018-01-08 17:16:05 +01:00
6afe655be0 bpy_extras: add missing colorband keymap to keyconfig_utils.py
fixes failing ctest script_load_keymap
2018-01-08 17:15:44 +01:00
c721f93958 Fix missing SpinLock typedef on macOS 2018-01-08 16:49:31 +01:00
dfed7c48ac Fix T53068: AMD Threadripper not working well with Blender
The issue was caused by SpinLock implementation in old pthreads we ar eusing on
Windows. Using newer one (2.10-rc) demonstrates same exact behavior. But likely
using own atomics and memory barrier based implementation solves the issue.

A bit annoying that we need to change such a core part of Blender just to make
specific CPU happy, but it's better to have artists happy on all computers.

There is no expected downsides of this change, but it is so called "works for
me" category. Let's see how it all goes.
2018-01-08 16:49:27 +01:00
391f7cc406 Cycles: Fix compilation error of standalone application 2018-01-08 16:49:22 +01:00
b6f3fec259 Cycles: Fix compilation error with OIIO compiled against system PugiXML 2018-01-08 16:49:16 +01:00
49f57e5346 Cycles: Fix compilation error with latest OIIO
There was some changes about namespaces, which causes ambiguities.

Replaces using namespace with an explicit symbols we need. Is good idea to NOT
pull in the whole namespace anyway!
2018-01-08 16:49:11 +01:00
9a5320aea3 Fix T52818: Tangent space calculation is really slow for high-density mesh with degenerated topology
Now we replace O(N^2) computational complexity with O(N) extra memory penalty.
Memory is much cheaper than CPU time. Keep in mind, memory penalty is like
4 megabytes per 1M vertices.
2018-01-08 16:47:08 +01:00
85dc915413 Mikkspace: Cleanup, reduce indentation level 2018-01-08 16:47:01 +01:00
4c46f69376 Fix T53398: Surface deform modifier says that convex polygons are concave for big faces
Dot-product for angle check need either to be divided by vectors magnitude or be
calculated for normalized vectors.
2018-01-08 16:46:50 +01:00
b8bdca8c0a Fix T53499: Cannot load DPX files
The issue was caused by unspecified color transfer. New behavior gives same
result as other viewers here, so likely is fine :)
2018-01-08 16:46:37 +01:00
ba40d8f331 Fix T53007: OpenSubdiv + transparency = artefact/crashes 2018-01-08 16:46:08 +01:00
3ad84309df Fix T52940: VSE Glow Effect Strip on transparent images has no blur 2018-01-08 16:45:57 +01:00
09c387269a Fix T52982: Join operator with context override crashes Blender 2.79 2018-01-08 16:45:45 +01:00
259e9ad00d Fix T52927: Compositor wrong scale when scale size input is connected to complex node
The issue here is that we can not read scale from socket when determining
dependent area of interest. This area will depend on current pixel. Now fall
back to more stupid but reliable thing: if scale size input is connected to some
nodes, we use the whole frame as area of interest.
2018-01-08 16:45:33 +01:00
d305c10104 Fix T52920: Saving Tiff Files type Blender crashes
Was only happening for 3 and 1 channel sources.
2018-01-08 16:45:07 +01:00
9f916baa70 Fix T52086: Graph editor "normalize" drag errors for integers 2018-01-08 16:44:42 +01:00
754630cee4 Fix T52823: New Depsgraph - Shrinkwrap crashes blender
The issue was caused by threading conflict around looptris: it was possible
that DM will return non-NULL but non-initialized array of looptris.

Thanks Campbell for second pair of eyes!
2018-01-08 16:42:36 +01:00
00d8097510 Fix T52763: Boolean problem with vertex group 2018-01-08 16:42:27 +01:00
7377b36660 Fix copy-paste error in recent particles fix
Was intersecting same triangle twice.
2018-01-08 16:42:16 +01:00
17c00d222f Fix T52732: Particle system volume grid particles out of volume
Use more watertight and robust intersection test.

It uses now ray to triangle intersection, but it's all fine because segment was
covering the whole bounding box anyway.
2018-01-08 16:42:09 +01:00
1b8e8326b4 Fix T52537: Dyntopo "detail flood fill" doesn't work in some cases
Mainly when object origin is not at the geometry bounding box center.

Seems to be straightforward to fix, hopefully it doesn't break some obscure case
where this was a desired behavior.
2018-01-08 16:41:39 +01:00
3ffb0f6983 Cycles: Tweaks to avoid compilation error of megakernel
Also moved code out of deep-inside ifdef block, otherwise it was quite confusing.
2018-01-08 16:38:36 +01:00
6f19787e52 Fix T53552: Unneeded particle cache reset on frame change
There shouldn't be a time dependency to cache reset operation.
2018-01-08 15:26:51 +01:00
0596d208a0 Depsgraph: Add missing checks from previous commit 2018-01-08 15:24:12 +01:00
76032b133c Depsgraph: Don't make non-dynamic hair dependent on time
This way hair system used for static forest does not make playblack slow.

A bit dangerous, but let's see how far we can go!
2018-01-08 15:21:21 +01:00
8cdda3d2ad Fix T53547: Metaballs as dupli objects are not updated with the new Depsgraph
Follow relations from old dependency graph.
2018-01-08 15:14:05 +01:00
7103c6ef3b Depsgraph: Fix relations for metaballs
Initially spotted and investigated by Dalai and Germano.
2018-01-08 15:12:31 +01:00
075950ad66 Cycles: Fix wrong shading when some mesh triangle has non-finite coordinate
This is fully unpredictable for artists when one damaged object makes the whole
scene to render incorrectly. This involves two main changes:

- It is not enough to check triangle bounds to be valid when building BVH.
  This is because triangle might have some finite vertices and some non-finite.

- We shouldn't add non-finite triangle area to the overall area for MIS.
2018-01-08 15:09:01 +01:00
93d711ce55 Cycles: Fix possible race condition when initializing devices list 2018-01-08 15:06:56 +01:00
d91b6099a6 Depsgraph: Fix wrong flag being assigned 2018-01-08 15:05:53 +01:00
d5dbe0c566 Fix T52741: Follow track with depth object crashes Blender with new depsgraph 2018-01-08 15:01:32 +01:00
c8f95c7829 Fix T53419: Masking "Add" menu is not present in Image editor, but shortcut is 2018-01-08 14:52:51 +01:00
26ffade5c1 Fix T53713: User remap failed w/ texface images 2018-01-08 17:00:36 +11:00
1611177ac9 Fix T53586: Surfaces collapse when joined 2018-01-08 14:50:30 +11:00
1c32d67f46 Cleanup: --help text
Sync with manual
2018-01-08 09:50:57 +11:00
c63e08863d Fix T53054: Parentless bone + IK crashes 2018-01-08 09:44:42 +11:00
528e00dae0 Fix T53696: Compositor HSV limits changed 2018-01-08 09:30:12 +11:00
a123dafdc0 fix T52831 removed enforcement of matrix decomposition when animations are exported 2018-01-06 16:38:19 +01:00
Mathieu Menuet
1f50f0676a Fix T53017: Cycles not detecting AMD GPU when there is an NVidia GPU too.
Best guess is that cuInit() somehow interferes with the AMD graphics driver
on Windows, and switching the initialization order to do OpenCL first seems
to solve the issue.
2018-01-06 16:34:50 +01:00
4f247ed07a Fix T53143: Knife Crash after Grid Fill
BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.
2018-01-05 10:48:39 +11:00
868bde5920 BLI_utildefines_iter: Use for iteration helpers 2018-01-05 10:48:39 +11:00
02b206780e BMesh: move bridge tools stepping logic into macro
Also use floor division since regular division was giving a bias
on negative error values.
2018-01-05 10:48:39 +11:00
8ca11b7084 Math Lib: add divide_floor_i
Integer division that floors on negative output (like Python's).
2018-01-05 10:48:39 +11:00
8c484d0bda Fix T53637: Keymap from app-template ignored
Addon's were also ignored
2018-01-05 10:20:16 +11:00
3815c3a324 Revert "BLI_utildefines: Support SWAP macro with two args"
This reverts commit d749320e3b.

It's possible the container struct is larger,
we could do sizeof checks that falls back to memmove
but rather avoid complicating things.
2018-01-05 10:20:16 +11:00
36971ea276 Use custom SWAP macro for swapping userdef data
Avoids complicating the common case
2018-01-05 10:20:16 +11:00
38fdfe757d Fix T53274: Saving template prefs overwrites default prefs 2018-01-05 10:20:15 +11:00
6cba84edf2 BLI_utildefines: Support SWAP macro with two args 2018-01-05 10:20:15 +11:00
9f0ebb0941 WM: load UI for new file, even when pref disabled
Loading startup file always loads the UI now.
2018-01-05 10:20:15 +11:00
571e801b27 WM: don't load preferences on 'File -> New'
User preferences are now only loaded on...

- Initial startup.
- Factory-settings.
- Setting app-templates.
2018-01-05 10:20:15 +11:00
7622563ae3 mblur for fm use centroids / use vertices was missing on remesher, some crash fixes 2018-01-05 00:00:01 +01:00
facc7658db crash fixes, was accessing non-existing layers 2018-01-04 20:44:02 +01:00
054d6d7ac3 deform motionblur support for FM and remesher with variable topology
furthermore some tweaks to final solid mesh generation and trigger stuff
option to only output particles as vertexcloud in remesher
2018-01-04 19:32:13 +01:00
71ffddfa0f fixed some crashers 2018-01-04 02:38:18 +01:00
ad2e6534cc first attempt of deform mblur with remeshed particles, but it still has issues 2018-01-04 02:08:44 +01:00
08cd50dcde crash fix in updateAccelerationMap, forgot to check for dm being null 2018-01-03 17:24:32 +01:00
d88b0ac261 fix for transformation issue with particle remeshing 2018-01-03 16:26:44 +01:00
7735128993 fix for presets, forgot some commas 2018-01-03 16:07:12 +01:00
942b6e933b BLI_heap: minor changes to the API
Recent addition of 'reinsert' didn't match logic for ghash API.

Rename to BLI_heap_node_value_update,
also add BLI_heap_insert_or_update since it's a common operation.
2018-01-03 22:49:51 +11:00
eaeb0a002e Use BLI_heap_reinsert for decimate and beautify
Improves performance for high poly meshes,
~70% faster for decimate, only ~10% for beautify.
2018-01-03 22:49:51 +11:00
71d79e6ea2 BLI_hash: add BLI_heap_reinsert
Allows avoiding remove/insert calls.
2018-01-03 22:49:51 +11:00
a68cc528dd GTest: initial BLI_heap test 2018-01-03 22:49:51 +11:00
e79e0c7483 Correct gtest error in recent beautify change 2018-01-03 22:49:50 +11:00
4a457d4f1e Polyfill Beautify: half-edge optimization
Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.
2018-01-03 22:49:50 +11:00
1b6130533f Beauty fill was skipping small faces 2018-01-03 22:49:50 +11:00
9d501d23cb Fix T52871: beauty fill error
Only lock tri's facing different directions.
Needed because scanfill creates zero area faces.
2018-01-03 22:49:50 +11:00
39fc93208a Revert "Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated"
This reverts commit a8f11f5422.

Result is no longer symmetrical, will investigate a different fix.
2018-01-03 22:49:50 +11:00
9298d99b77 Fix T52871: BLI_polyfill_beautify_quad_rotate_calc_ex was mistakenly considering the state as degenerated 2018-01-03 22:49:50 +11:00
9e18fcbb36 BLI_polyfill2d_test: script to generate test data 2018-01-03 22:49:50 +11:00
ef5b7d34a1 Cleanup: redundant casts 2018-01-03 22:49:49 +11:00
426616da43 Correct test ifdef in polyfill 2018-01-03 22:49:49 +11:00
9be59fa752 BLI_polyfill2d_test: add test for T52834
Commented since it currently fails.
2018-01-03 22:49:49 +11:00
93d3015e61 BLI_polyfill2d_test: Try flipped x/y axis
In T52834 this makes a difference.
2018-01-03 22:49:49 +11:00
fe3f504902 Missing from last commit 2018-01-03 22:49:49 +11:00
9299936726 Cleanup: use stubs for eigen gtest 2018-01-03 22:49:49 +11:00
8131eda51e Boolean Modifier: add debug options
Only show & use when running in debug mode.
2018-01-03 22:49:48 +11:00
569d2df634 Avoid bias when calculating quad split direction
Some error checks weren't being done in both directions
when calculating the best split direction for a quad.
2018-01-03 22:49:48 +11:00
6e133ad8b1 Correct recent error in boolean quad split check 2018-01-03 22:49:48 +11:00
58ab62ed6d BMesh: use less involved check for edge rotation
Was using function for edge rotation which was doing unnecessary checks
Use the face normal and BLI_polyfill_beautify_quad_rotate_calc directly.
2018-01-03 22:49:48 +11:00
0834eefae0 Polyfill Beautify: option to rotate out of degenerate state
Needed for 3D iterative edge-rotation to avoid flipping when projected
from different angles,
but could keep zero area faces in 2D polygons.
2018-01-03 22:49:48 +11:00
34857b2032 Fix error in recent boolean changes w/ quad split 2018-01-03 22:49:48 +11:00
78cc3c828f Fix T52291: Boolean fails w/ co-linear edged ngons
This means boolean tessellation wont match viewport tessellation
however it's needed to avoid zero area triangles causing problems.
2018-01-03 22:49:48 +11:00
04125d8a9c Math Lib: clamped rounding utility functions 2018-01-03 22:49:48 +11:00
659dc34823 BLI_utildefines: sync w/ 2.8 2018-01-03 22:49:47 +11:00
eaf14b1ebf fix T53230: avoid Nullpointer problems in Collada Exporter 2018-01-02 14:55:53 +01:00
866be3423c Fix incorrect MIS with principled BSDF and specular roughness 0. 2018-01-01 17:46:44 +01:00
440d647cc1 Fix part of T53038: principled BSDF clearcoat weight has no effect with 0 roughness. 2018-01-01 17:29:47 +01:00
cd9c68f0c5 CMake: support CUDA 9 toolkit, and automatically disable sm_2x binaries.
Fermi cards (GTX 4xx and 5xx) are no longer supported with this version, so
we can keep supporting both CUDA 8 and 9 for a while.
2018-01-01 17:29:26 +01:00
f1ee24a284 Fix T52801: reload scripts causes Cycles viewport render crash. 2018-01-01 17:28:45 +01:00
df1af9b349 Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
2018-01-01 17:27:16 +01:00
836a1ccf72 Fix T53600: Cycles shader mixing issue with principled BSDF and zero weights.
SVM nodes need to read all data to get the right offset for the following node.
This is quite weak, a more generic solution would be good in the future.
2018-01-01 17:13:04 +01:00
c4f8d924e1 Fix T53309: Remove default 'Clear loc/rot/scale delta transform' shortcuts.
The loc one (shift-alt-G) was same as 'remove selected from active group'
action... Clear delta transform is not a common operation, so we can
live without a default shortcut for it.

Note that using same key (G) in same space for two completely different
kind of operations is probably a rather bad thing, nice topic for future
keymap work. ;)

Probably nice to have in 2.79a.
2018-01-01 16:13:53 +01:00
08e16e0bd1 Fix: Undo pushes were missing for Add/Remove Driver Variable buttons, and Remove Driver button 2018-01-01 16:03:30 +01:00
969196069a Fix T53300: Bone Extrude via Ctrl + Click is not done from active bone tail 2018-01-01 16:03:25 +01:00
6cfc5edb86 Fix T53185: After rendering an animation (Ctrl-F12), pressing F12 no longer renders single frames only 2018-01-01 16:03:20 +01:00
99e4c819f7 Fix: When transforming GP strokes in "Local" mode, the strokes would get obscured
by the transform constraint lines

Ported over e7395c75d5 from the
greasepencil-object branch. I should've fixed this ages ago, but
couldn't figure out why at the time.
2018-01-01 16:03:14 +01:00
ca236408f3 Fix T52861: Keymap editor filter doesn't show shortcuts using "+" 2018-01-01 16:03:09 +01:00
f887b8b230 T50354: Action length calculation added unnecessary padding if some F-Curves
only contained a single key (on the last real frame of the action).
2018-01-01 16:03:03 +01:00
48079e1f11 Fix T52733 Percent mode for Bevel sometimes had nans.
Forgot some initialization.
2018-01-01 16:02:21 +01:00
bae796f0d5 Alembic import: fixed mesh corruption when changing topology
When the mesh changed topology but kept the vertex count the same, it would
result in a corrupt mesh. By checking the face & loop counts too, this has
become less likely.

I've checked IPolyMeshSchema::isConstant(), but it returns true even when
we see that the mesh changed topology.
2018-01-01 16:01:36 +01:00
Stefan Werner
02bac54fa9 Compositor: Ensured 16 byte alignment for variables accessed by SSE instructions.
Before this patch, the XBlur/YBlur compositor nodes would crash for me when run in a MSVC 2015 debug build (test scene: BMW27_cpu). I added the compiler instructions to explicitly align the local variables that the SSE instructions are accessing.
2018-01-01 16:01:29 +01:00
Dalai Felinto
8f9d9ba14e Fix logic for pinning textures users from context
This was wrong since it's concenption in 28ee0f9218.
The if statement was returning true when pinid was NULL, and false otherwise.

However when scene is pinned we also want to run this code.
Code snippet by Brecht Van Lommel.
2018-01-01 15:58:23 +01:00
José Luis Oliveira Cunha
576899b90a Fix T53116: default texture coordinates for volume materials are blank.
Differential Revision: https://developer.blender.org/D2935
2018-01-01 15:57:51 +01:00
0f841e24b0 Fix T53572: Alembic imports UV maps incorrectly
Since in Alembic the loop order seems to be reversed when exporting and
importing, and this was the only place where it was not, I was thinking
to match this to the convention of reversing the loop order as well.

Reviewers: sybren, kevindietrich

Tags: #alembic

Differential Revision: https://developer.blender.org/D2968
2018-01-01 15:57:23 +01:00
Daniel Silva
ce35151f38 Proposed fix for T53263 -- Blender crashes when rendering with Stabilizer 2D node without movie selected
The program won't crash anymore, but a warning won't be displayed. Anyway, this gives the user the chance to save the project.

https://developer.blender.org/T53263

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D2934
2018-01-01 15:56:50 +01:00
3659620b47 Fix compilation error with clang-5 2018-01-01 15:56:18 +01:00
f3002ab43b Space clip: Make it more clear that filter track does not use any settings from tool shelf 2018-01-01 15:55:46 +01:00
3a1ade22e5 GPU: Fix memory corruption in GPU_debug on GTX1080
Number of texture formats is 51, which is greater than allowed size of 32.
2018-01-01 15:54:54 +01:00
b5c629e604 Cycles: Fix possible race condition when generating Beckmann table
Two issues here:

- Checking table size to be non-zero is not a proper way to go here. This is
  because we first resize the table and then fill it in. So it was possible that
  non-initialized table was used.

  Trickery with using temporary memory and then doing table.swap() might work,
  but we can not guarantee that table size will be set after the data pointer.

- Mutex guard was useless, because every thread was using own mutex. Need to
  make mutex guard static so all threads are using same mutex.
2018-01-01 15:54:02 +01:00
89de073ea5 Fix T52835: When driven IK influence change, ik animation have 1 frame delay 2018-01-01 15:53:54 +01:00
0cdfe887b4 OpenVDB: Fix compilation error against OpenVDB 4
One crucial thing here: OpenVDB shoudl be compiled WITHOUT
OPENVDB_ENABLE_3_ABI_COMPATIBLE flag. This is how OpenVDB's Makefile is
configured and it's not really possible to detect this for a compiled library.

If we ever want to support that option, we need to add extra CMake argument and
use old version 3 API everywhere.
2018-01-01 15:53:48 +01:00
7de7e47a97 CMake: Add extra requests dependencies
Apparently, we already had some code to deal with this. So for now just
added some extra dependencies needed for latest requests.
2018-01-01 15:53:41 +01:00
2213153c27 Fix T52432: Blender crashes while using Ghost (new depsgraph) 2018-01-01 15:53:35 +01:00
ef04aa4a43 Transform: Enable recursion dependency check for new depsgraph 2018-01-01 15:53:28 +01:00
538182511a Fix T52749: New Depsgraph - Render View Mask is not initialized correctly 2018-01-01 15:53:22 +01:00
3532fe2b8b Masks: Split layer evaluation into separate function
This way we can easily re-use bits of code for new dependency graph.

Currently should be no functional changes.
2018-01-01 15:53:15 +01:00
3182336666 Fix T52113: Compositor doesnt mix unrendered render layers well
Compositor was always defaulting to all-zero s output for missing passes.

This was broken in 4cf7fc3.
2018-01-01 15:53:09 +01:00
5efc8e16e6 Compositor: Cleanup, get rid of nested ternary operators
Having single switch statement is much more readable.
2018-01-01 15:53:03 +01:00
7947eead71 Compositor: Cleanup, de-duplicate some code 2018-01-01 15:52:56 +01:00
8cd3bd99f7 Compositor: Cleanup, reduce indentation level in render layer node
There is absolute no reason to have such an indentation level, it only causes
readability and maintainability issues. It is really simple to make code more
"streamlined".
2018-01-01 15:52:49 +01:00
e7aad8fd0e Fix T53559: Auto texture space for text and font is wrong in Cycles
The issue actually goes a bit deeper, converting curve to mesh will
change texture space just because font and bezier curves are using CV
to calculate texture space.

So now when those objects are converted to mesh, we disable auto
texture space and copy evaluated space over.
2018-01-01 15:45:56 +01:00
bf58ec9265 Node selection: Stop operator when mouse selection selected a node
Previously, hitting Shift-LMB will first invoke selection operator, which
then later on is transformed to mouse tweak used for reroute operator.

This was causing problems extending selection with Shift-LMB when clicking
fast or from a tablet.
2018-01-01 15:45:07 +01:00
1c7657befb Fix T53371: Keying Node fails with values above 1
This was expected behavior for over-exposured lamps when the mode was originally
created for Tears of Steel. Turns out, there could be really bad green screen in
real production which will only have green (or rather screen) channel over
exposured.

Tweaked condition now so we use least bright channel to see if the area has
proper exposure or not.

Seems to work fine in tests, but further tweaks are possible.
2018-01-01 15:45:01 +01:00
333ef6e6f7 Tracking: Create mesh from selected tracks only
Patch by Sebastian Koenig. thanks!
2018-01-01 15:44:56 +01:00
ad7385422e Fix T53048: OSL Volume is broken in Blender 2.79
Was a mistake in optimization commit which was disconnecting closures and nodes
which does not make sense for volume output.

OSL script we can't ignore and can't currently know in advance if it's a proper
volume shader or not. So we never disconnect OSL nodes from volume output.

This is a good candidate for corrective release.
2018-01-01 15:44:50 +01:00
ad834085b7 Fix T52932: Driver with target of custom property from scene fails to update
Note that this is only supported in new depsgraph.
2018-01-01 15:44:45 +01:00
2edc2b4912 Curves: Fix wrong bitset being checked against CYCLIC bit flag
Based on report from Talos Security Advisory.
2018-01-01 15:44:39 +01:00
d87bf29399 Tracking: Followup to previous fix, need to remap frame number for sequence tracking 2018-01-01 15:44:33 +01:00
990ce0c4f0 Tracking: Cleanup, reuse existing variable 2018-01-01 15:44:27 +01:00
f0743b56ec Fix T52851: Per-frame traking is broken when sequence doesn't start at frame 1 2018-01-01 15:44:21 +01:00
350f5c6894 Tracking: Fix crash when tracking failed
Was a dangling pointer to a freed memory left behind.
2018-01-01 15:44:15 +01:00
69062cdd8d Fix T52840: New Depsgraph - Mask editor not working correctly 2018-01-01 15:44:09 +01:00
3163d0e205 Fix T52811: At any framerate selected, video exported with 1000fps 2018-01-01 15:43:31 +01:00
aafe528c7d Fix T51416: Blender Crashes while moving Sliders
The issue here was that removing datablock from main database will poke editors
update, which includes buttons context to free users of texture. Since Cycles
will free datablocks from job thread, it might crash Blender since main thread
might be in the middle of drawing.

Solved by exposing extra arguments to bpy.data.foo.remove() which indicates
whether we want to perform ID user count and interface updates. While scripts
shouldn't be using those normally, this is the only way to allow Cycles to skip
interface update when removing datablock.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2840
2018-01-01 15:43:25 +01:00
9c39f021ad Fix T52739: Crash loading corrupted video files
Affects both "normal" open as a video file and thumbnail generation.
2018-01-01 15:43:19 +01:00
cdc35e63bd Fix T52299: X resolution of 4 causes nodes to collapse
Was caused by numeric overflow when calculating preview dimensions.
Now we try to avoid really insance preview resolutions by fitting
aspect into square.
2018-01-01 15:42:39 +01:00
3a0f199aa7 Fix T52140: Align objects centers using origin for text
The issue was caused by operator redo which frees all object's evaluated data,
including bounding box. This bounding box can not be reconstructed properly
without full curve evaluation (need to at least convert font to nurbs, which is
not cheap already).
2018-01-01 15:42:32 +01:00
b0c55d5c94 Fix T52573: Cycles baking artifacts
Synchronize condition for faces split between Cycles itself and baking API.
2018-01-01 15:42:25 +01:00
759af7f1ee Fix T52679: Hole in bake normal
In fact, any type of baking might have caused holes in mesh.

The issue was caused by zspan_scanconvert() attempting to get order of traversal
'a-priori', which might have failed if check happens at the "tip" of span where
`zspan->span1[sn1] == zspan->span2[sn1]`.

Didn't see anything bad on making it a check when iterating over scanlines and
pick minimal span based on current scanline. It's slower, but unlikely to cause
measurable difference. Quality should stay the same unless i'm missing something.

Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2837
2018-01-01 15:42:16 +01:00
c616dd58c6 minor fix for collision problem with mesh 2017-12-31 01:57:54 +01:00
4bc89d815c Fix T53630: Effect strips not displaying Input data.
Fix T52977: Parent bone name disappeared in the UI in pose mode.

Regression caused by own rBc57636f060018. So instead of changing widget
type, just flag it as disabled.

Note that core of the issue is elsewhere though - there is absolutely no
reasons to have a search widget for pointers we cannot change nor
search! But fixing this is not really top priority, one of the many
glitches of our UI code, so think we can live with current code.

To be backported to 2.79a.
2017-12-30 17:52:33 +01:00
8a9d64b578 Fix T53463: Rotation numerical input shows instable behaviour.
Inverting a number in radians when user is in degrees gives rather
unexpected results. ;)
2017-12-30 17:52:28 +01:00
50ca70b275 Fix T53420: Vertex Groups: The "-" button gets a hidden function
Guess 'remove all unlocked' is new-ish feature...

To be backported to 2.79a (I think).
2017-12-30 17:52:21 +01:00
ff8c9c5931 Fix T53343: Custom Normal Data Transfer Crashes when some vertexes have no faces.
Odd nobody noticed this earlier, was obvious bug in code logic here... :/

To be backported to 2.79a.
2017-12-30 17:52:16 +01:00
06df30a415 Fix T53250: Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active.
Inner DAG code would not check against NULL pointer, and in case of an
active linked scene, scene pointer will be NULL here, so we have to
check it ourself. ;)
2017-12-30 17:51:30 +01:00
5f2307d1a7 Fix T53191: Python API Reference link wrong in splash screen.
Forgot to update splashscreen links when we switched API doc naming
scheme...
2017-12-30 17:51:25 +01:00
3193045c59 Fix bad 'poll' prop callback API doc.
This was added to all prop types, when it is only available for Pointer ones.
2017-12-30 17:51:12 +01:00
2895cb22a7 3D View: use shortest angle between quaternions
Gave incorrect smoothview speed changing between some axis and
axis locking.
2017-12-30 17:45:40 +01:00
01ff07af56 Math Lib: signed versions of quaternion angle
There was no simple way to get the shortest quaternion angle.
2017-12-30 17:45:33 +01:00
6d640504e8 bl_app_override: support empty UI layout items
Returning None from ui_ignore functions creates empty labels,
allows removing items without breaking layout in some cases.
2017-12-30 17:45:27 +01:00
5ab1897de7 Fix T53430: Cut at the strip end fails w/ endstill 2017-12-30 17:45:21 +01:00
75aec5eeaa WM: minor correction to user-pref writing
When saving templates had wrong return value.
2017-12-30 17:44:44 +01:00
0c456eb90a Docs: clarify return value for BVH API 2017-12-30 17:44:38 +01:00
6639350f92 Fix BMesh PyAPI internal flag clearing logic
Would leave the flag set on raising an exception.
2017-12-30 17:43:53 +01:00
ce6e30b3dc Fix edge-split bmesh operator giving empty result 2017-12-30 17:43:47 +01:00
69f6ab98e7 Docs: correct descriptions 2017-12-30 17:43:39 +01:00
3e3a27d089 Edit Mesh: click extrude, ensure inverse matrix
Relied on this being set elsewhere which isn't assured.
2017-12-30 17:43:33 +01:00
a253b1b7bc Docs: add note for bmesh face_split_edgenet 2017-12-30 17:43:24 +01:00
6058b651c4 Fix sculpt secondary color missing some brushes
D2841 by @uvwxyz w/ edits
2017-12-30 17:43:17 +01:00
98dc9072e5 Fix brush reset (missing notifier)
D2843 by @uvwxyz
2017-12-30 17:43:06 +01:00
6b2d1f63db Fix incorrect allocation size 2017-12-30 15:48:49 +01:00
275002106c makesdna/makesrna: silence output by default
No need to print status for basic & reliable operations,
build systems can output operations they run if needed,
or debug output changed in the source if developers are debugging.

Nice for ninja, so any printed text hints at a problem to fix.
2017-12-30 15:48:43 +01:00
413817a3d2 Fix T53577: Rake sculpt/paint wrong on first step 2017-12-30 15:48:33 +01:00
869e4a3420 Fix T53322: Collada export crash w/ shape keys
D2958 by @cmbasnett
2017-12-30 15:48:28 +01:00
84361a0709 Fix missing update for particles w/ fluids
D2955 by @GonVas
2017-12-30 15:48:22 +01:00
52a5daa404 Fix T53529: Rip crashes w/ wire edge 2017-12-30 15:48:16 +01:00
db3e3f9c24 Fix for inset when accessed from spacebar search 2017-12-30 15:48:10 +01:00
19b27d84ab Fix T53441: Inset doesn't start at zero 2017-12-30 15:48:05 +01:00
480b0b5dfc Fix T53410: 3D Text always recalculated 2017-12-30 15:47:58 +01:00
7153cee305 Fix T53342: Outliner 'select hierarchy' broken
Was using cursor position from within menu,
clicking on the same position for every selected item (toggling).

Now operate on each selected outliner element, without toggling.
2017-12-30 15:47:52 +01:00
d2d207773e Fix BGE sound actuator property access 2017-12-30 15:47:46 +01:00
8ea3f6438d Fix T53294: bpy.ops.image.open crash 2017-12-30 15:47:41 +01:00
60e8d86fb1 Fix T53131: Incorrect vert-edge angle calculation
Vertex w/ a single edge wasn't detected
2017-12-30 15:47:34 +01:00
1ab828d4bb Fix T53004: XWayland ignores cursor-warp calls
There is currently a limitation in XWayland,
the cursor needs to be hidden during warp calls.
2017-12-30 15:47:28 +01:00
7f6e9c595b Fix T52959: Local view looses clip range on exit 2017-12-30 15:47:21 +01:00
b0fbe95a1b Fix ruler access from search pop-up
D2831 by @1xundoredo
2017-12-30 15:46:26 +01:00
8c9bebfe28 Fix setting the operator name in Py operator API 2017-12-30 15:46:20 +01:00
9f032c3867 Fix error copying smoke modifier uv layer 2017-12-30 15:46:13 +01:00
eaba111bd5 Fix T52890: Crash unlinking sequencer sound 2017-12-30 15:46:07 +01:00
b969f7eb55 Fix T52860: 3D Text crashes w/ Ctrl Backspace 2017-12-30 15:46:01 +01:00
4c3e2518c8 UI: fullstop at end of tooltips
Allows for multiple sentences not to look strange.
Convention not to include in RNA remains.
2017-12-30 15:45:55 +01:00
a437b9bbbe UI: avoid int cast before clamping number input
Values outside int range would overflow.
2017-12-30 15:45:02 +01:00
d07011da71 Fix T51074: Boolean modifier inverts operation
Support for negative scaled objects.
2017-12-30 15:44:55 +01:00
acae901a10 Fix writing Iris images w/ invalid header
Regression in e142ae77ca
2017-12-30 15:44:49 +01:00
495aa77b53 Fix T52384: Bridge pair result depends on other loops
When 2x loops have different number of vertices,
the distribution for vertices fan-fill depended on the loop order
and was often lop-sided.

This caused noticeable inconstancies depending on the input
since edge-loops are flipped to match each others winding order.
2017-12-30 15:44:43 +01:00
e627620efd Docs: only show versions in changelog side-bar 2017-12-30 15:44:38 +01:00
7d872629c4 Correct error in last commit 2017-12-30 15:43:36 +01:00
60bfa969e2 Fix T52748: Select shortest face path fails 2017-12-30 15:43:29 +01:00
d89353159f Fix T52442: bl_app_templates_system not working
Portable builds LOCAL files need to be
treated as system instead of using as a fallback to USER templates.
2017-12-30 15:43:23 +01:00
21ecdacdf1 Fix bpy.utils.resource_path('SYSTEM') output
Would return the test path for developer builds:
{blender-dirname/release}

Now return an empty string when no path is found.
2017-12-30 15:43:16 +01:00
0641069778 Fix T52723: Reset UV layers failed 2017-12-30 15:43:09 +01:00
5b2d5f9077 Fix T53171: lamp specials strength tweak fails with renamed emission nodes. 2017-12-30 15:32:59 +01:00
f901bf6f47 Fix T53092: errors reading EXR files with different data/display window.
Multilayer/multiview OpenEXRs did not read the full data window like single
layer, now it should be consistent.
2017-12-30 15:32:52 +01:00
198fd0be43 Fix T53348: Cycles difference between gradient texture on CPU and GPU. 2017-12-30 15:32:45 +01:00
f968268c1e Fix build with OSL 1.9.x, automatically aligns to 16 bytes now. 2017-12-30 15:32:40 +01:00
2bc667ec79 Fix T52368: Cycles OSL trace() failing on Windows 32 bit. 2017-12-30 15:32:34 +01:00
d564beda44 Fix T53217: GLSL principled BSDF black with zero clearcoat roughness. 2017-12-30 15:32:28 +01:00
f1a4e130b3 Fix T53145: bevel tool does not start with amount at zero. 2017-12-30 15:32:18 +01:00
36f324fc55 Fix T53145: bevel tool fails when used a second time.
Pixel size was not initial early enough. For first time this was not a problem
because the bevel amount starts at 0 then, and after the mouse moves the pixel
size is initialized. For the second time the bevel amount starts at a non-zero
value, and it failed then.
2017-12-30 15:32:13 +01:00
bb89759624 Fix T53360: crash with GLSL bump mapping and missing group output node. 2017-12-30 15:32:06 +01:00
825aecaee3 Fix T53273: render bake settings properties not showing correct Python path. 2017-12-30 15:32:00 +01:00
1dbdcfe9a9 Fix incorrect color management when saving JPG previews for EXR. 2017-12-30 15:31:53 +01:00
a6e5558194 Fix T53129: Cycles missing update when changing image auto refresh.
Previously auto refresh worked, but only if it was already enabled before
starting the viewport render.
2017-12-30 15:31:46 +01:00
6bd1189e5c Fix compositor node links getting lost on file load for custom render passes. 2017-12-30 15:31:13 +01:00
625b2f5dab Fix T52514: don't clear filename when dropping directory path in file browser. 2017-12-30 15:31:06 +01:00
20c96cce86 Fix T52998: disabled menu entries responding to key shortcuts. 2017-12-30 15:30:57 +01:00
c85a305c09 Fix T52800: fix UI flickering with Mesa on Linux.
Use triple buffer by default now on all platforms, remaing ones where:
* Mesa: seems to have been working well for a long time now, and not using
  it gives issues with the latest Mesa 17.2.0.
* Windows software OpenGL: no longer supported since OpenGL 2.1 requirement
  was introduced.
* OS X with thousands of colors: this option was removed in OS X 10.6, and
  that's our minimum requirement.
2017-12-30 15:30:43 +01:00
30f53d56b6 Fix potential string buffer overruns.
Note that our library path handling is still rather dodgy on this
regards, shall take some time at some point to seriously sanitize it...
2017-12-30 15:25:04 +01:00
47a388b2a9 Fix T53002: Batch-Generate Previews generate empty or none image for large objects.
Camera clipping was left to default values, which won't work well for
very large (or small) objects. Now recompute valid clipping start/end
based on boundingbox of rendered data, and final location of camera.
2017-12-30 15:24:54 +01:00
9f6d5d679e Fix missing ID remapping in Action editor callback.
Spotted by Joshua Leung (@aligorith), thanks!

Should probably be backported to 2.79a should we do it.
2017-12-30 15:24:45 +01:00
a4116673c7 Fix T52816: regression can't open file in 2.79 (crash).
Tentative fix, since I cannot reproduce thenissue for some reason here
on linux.

Core of the problem is pretty clear though, thanks to Germano Cavalcante
(@mano-wii): another thread could try to use looptris data after worker
one had allocated it, but before it had actually computed looptris.

So now, we use a temp 'wip' pointer to store looptris being computed
(since this is protected by a mutex, other threads will have to wait on
it, no possibility for them to double-compute the looptris here).

This should probably be backported to 2.79a if done.
2017-12-30 15:05:28 +01:00
7e4be7d348 Add some security checks against future bad float UIprecision values.
This commit and previous one should be backported to 2.79a should we
release it.
2017-12-30 15:05:20 +01:00
8e43a9e9cc Fix (irc-reported by @sergey) invalid precision value in a float RNA property.
Maximum allowed UI float precision value is 6 (which means 7 digits).

Will change code checking on that in next commit.
2017-12-30 15:05:10 +01:00
5384b2a6e2 Fix T52729: Decimals not showing over 100m or 100 feet
Use same 5 digits precision as we already use for e.g. Object's
location, for Object's dimensions too.

To be backported to 2.79a, should we do it.
2017-12-30 15:04:56 +01:00
e8e40b171b Fix failure in our UI code that could allow search button without search callbacks, leading to crash.
Related to (exposed by) T52735, fixes the reported crash but not the
underlying issue.

To be backported to 2.79a should we do one.
2017-12-30 15:04:44 +01:00
882fe36f0d Fix T52984. Trackpad rotation to natural direction 2017-12-30 15:04:26 +01:00
ce058207fc acceleration maps are kinda hard to get right... another attempt 2017-12-30 11:37:31 +01:00
1dbaf88150 fix, possibly return an empty mesh and default psys index is 1 now 2017-12-30 02:14:52 +01:00
1151442204 fix for randomized particle sizes
was accessing wrong indexes after particles died
2017-12-30 01:28:43 +01:00
d165b13ee4 added override with particle size option to mball remesher 2017-12-29 21:54:02 +01:00
4945003ffd remesh modifier can now remesh particle systems as well 2017-12-29 20:38:53 +01:00
23a9504df1 small fixes for acceleration map 2017-12-29 02:07:29 +01:00
026b847bd9 refactored acceleration map, but might still have issues
also attempted to improve triggering (make exacter, but slow and error prone)
2017-12-29 01:46:36 +01:00
e8c6f05eba fix attempt for acceleration map... still issues 2017-12-28 00:17:45 +01:00
656ab1cf6a reworked the bake correction method, some smaller fixes
shuffling happens now across all individual rigidbodies
2017-12-27 19:47:47 +01:00
1da64c2540 fixes for acceleration map 2017-12-26 23:07:21 +01:00
24f93213f2 invalidate rigidbody cache/bake if rigidbody objects are duplicated or deleted as well 2017-12-26 21:15:01 +01:00
c77878abab added final solid mesh source for mesh, some sphere margin fixes 2017-12-26 17:40:40 +01:00
16f161e5f6 added acceleration maps which should be also be usable in playback 2017-12-25 23:30:15 +01:00
9bf8ba16c2 added an acceleration map (vgroup), some remesher fixes 2017-12-25 16:45:27 +01:00
01a589c0af tweak of value display in FM UI 2017-12-25 14:13:16 +01:00
3d3ece2c67 fix for collision condition, it failed for regular case 2017-12-25 14:12:45 +01:00
df7d0e5423 extended the remesh modifier by a metaball mode 2017-12-25 01:12:23 +01:00
dbd1212dfb rearranged some FM Properties in UI 2017-12-24 20:50:31 +01:00
a96832cd21 fixes for cluster constraint island detection and a couple of minor fixes in fracture RNA 2017-12-24 20:49:25 +01:00
7babce3052 added "self collision" option for constraint islands, and randomize option for sphere shape radius and margin 2017-12-24 16:05:08 +01:00
95ae90cab0 sphere shape now takes its margin into account too, allow also negative margin now (optionally) 2017-12-23 15:15:45 +01:00
93bf8fc8e1 now fixing shard order problems directly after loading and jumping to another frame as well 2017-12-23 01:25:00 +01:00
1010cdf421 added option to only output verts, meta threshold max is 100 now 2017-12-21 17:12:17 +01:00
fc58dbc186 do not invalidate cache when enabling / disabling centroid output 2017-12-21 15:14:44 +01:00
e8958954ba added option to only output centroids as vertices
might be useful in conjunction with duplicated metaballs to have simple fluid-like behavior
2017-12-21 12:59:03 +01:00
fa7a666e2b added grid fracture option, removed rigidbody shape drawing with fm, alembic importer fix 2017-12-19 23:09:01 +01:00
4bc10e6a81 allow rigidbody being a forcefield effector too
this was disabled intentionally for some unknown reason
2017-12-16 16:09:37 +01:00
aacada54f8 fix, threshold and cluster threshold application was swapped 2017-12-15 22:23:38 +01:00
d99e1dc283 exposed meshisland constraints and modifier vertex groups to python
this was done to enable a new feature in the addon, the cluster editor.
2017-12-15 16:34:48 +01:00
c5e7265b1e fix for infinite recursion with cluster percentage activation
also remove kinematic state of stopped shards (if object is triggered and not kinematic) at start frame now
2017-11-16 20:28:39 +01:00
57d70b3c87 fix for autogenerating inner material, just append at the end of the stack instead taking always the 2nd one 2017-10-08 21:42:48 +02:00
d13f6ae2bf fix: separated comparison angle/distance for break/deform, propagate weakened threshold now 2017-10-07 19:59:44 +02:00
855d2955c4 Docs: update API changelog to 2.79 2017-10-03 19:58:21 +02:00
28f2865cfa added some previously missing tooltips 2017-09-26 14:01:20 +02:00
993c98779c increased UI digits precision to 5 for almost all FM float RNA properties
exception are properties which had higher precision even
2017-09-17 17:39:30 +02:00
3955fb3dcc compile fixes after merge 2017-09-12 13:26:30 +02:00
8c97b99daf Merge remote-tracking branch 'refs/remotes/origin/blender-v2.79-release' into fracture_modifier
Conflicts:
	source/blender/blenkernel/intern/rigidbody.c
2017-09-12 13:25:40 +02:00
fa859b0d72 only break constraints with threshold >= 0 2017-09-12 12:36:00 +02:00
8ef39d5c88 Update submodules to 2.79 release commits.
Should have been done before ahoy, sorry about that. Means 2.79 tag will
be one (no functionnal changes) commit ahead from our 2.79 builds, think
we can live with that.
2017-09-12 10:47:15 +02:00
5bd8ac9abf Update release cycle to 'release'. 2017-09-11 12:43:47 +02:00
9a9e9b1c4d Fix T52696: Sculpt - Brush spacing pressure artifacts
Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

Thanks for the report!
2017-09-11 09:37:00 +02:00
904831e62e Fix T52701: Mesh shortest path fails at boundaries 2017-09-11 09:36:25 +02:00
1a7dda046b PyAPI: Fix mathutils freeze allowing owned data 2017-09-10 20:18:42 +02:00
82466852fe Fix T52531: Blender 2D stabilisation node issue when autoscale is selected
Threading conflict, should be safe for 2.79.
2017-09-10 20:18:04 +02:00
fbb4be061c Cycles: Safer fix for infinite recursion
Previous fix wasn't working correct for certain compiler and CPU intrinsics
mode, causing quite some crashes.

This should be a safer fix, which is closer in behavior to previous release
but which should still fix issues with robust curve intersection.
2017-09-08 14:47:32 +02:00
87cc8550e2 Fix T52650:Grease pencil selection its not automatically updating in Clip Editor 2017-09-08 12:33:00 +02:00
ccf1bb11b6 Math Lib: normalized vector project functions 2017-09-08 12:00:52 +02:00
9ae35fafb6 Fix T52149: LoopTriArray computation was not correctly protected against concurrency.
Note: this commit seems to work as expected (also with transform
snapping etc.). However, it is rather unsafe - not enough for 2.79 at
least, unless we get much more testing on it. It also depends on three
previous ones.

Note that using a global lock here is far from ideal, we should rather
have a lock per DM, but that will do for now, whole DM thing is doomed
to oblivion anyway in 2.8.

Also, we may need a `DM_DIRTY_LOOPTRIS` dirty flag at some point. Looks
like we can survive without it for now though... Probably because cached
looptris are never copied accross DM's?
2017-09-08 11:53:05 +02:00
7c3b435c3a Cleanup: remove useless DM_ensure_looptri().
That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...
2017-09-08 11:52:59 +02:00
9cc7e32f39 Fix transform snap code using 'allocated' flags to get verts/edges/etc. arrays again from DM.
This was... horribly wrong, CDDM will often *not* need to allocate
anything to return arrays of mesh items! Just check whether array
pointer is NULL.

Also, remove `DM_get_looptri_array`, that one is useless currently,
`dm->getLoopTriArray` will always return cached array (computing it if
needed).
2017-09-08 11:52:50 +02:00
9f0acc2c9e Cleanup: deduplicate DM's getLoopTriArray() callback.
All three functions were doing exactly the same thing, simpler to only
have one in that case!
2017-09-08 11:52:45 +02:00
300abf241e Fix T52639: Weight paint smooth tool crash 2017-09-08 11:52:30 +02:00
9da098536d UI: fix memory leak when copy-to-selected failed 2017-09-08 11:52:24 +02:00
3aaf908719 Fix T52678: Crash editing gpencil w/ frame-lock 2017-09-08 11:52:17 +02:00
a67aae98fe Screw Modifier: remove doubles option
Vertices on the axis can be optionally merged,
nice for creating objects which close at the end-points.
2017-09-08 11:52:10 +02:00
163a196f29 View3D Remap: skip defmaterial
This isn't library data.
2017-09-08 11:52:00 +02:00
b895c7337e Fix T52663: Remap used invalid local-view data
Only the camera from View3D.localvd is used,
other pointers may be invalid.

Longer term we should probably clear these to ensure no accidents.
For now just follow the rest of Blender's code and don't access.
2017-09-08 11:51:52 +02:00
a8bd08ffdd Fix T52522: VSE renders with alpha transparent PNG image incorrectly
Need some extra checks and should be probably end up in 2.79 since that's a regression.
2017-09-08 11:51:19 +02:00
e91f9f664d Rigidbody: Fix regression introduced in ee3fadd
Baking rigid body cache was broken if some cached frames already
existed.

This is just a band aid for release, the logic need to be looked into
further.
2017-09-06 09:32:46 +02:00
d84f559555 Fix T52374: Changes of rigid body related settings during simulation will break the simulation
Revert 9cd6b03, 3edc8c1, b87d10d and do a better fix for T50230.
2017-09-06 09:32:38 +02:00
ec50734106 Buildbot: Fix paths to sndfile and flac
Need this in 2.79 branch as well, since build rules are based on this files.
2017-09-06 09:32:14 +02:00
a8c7f1329b Fix T52251: Knife cur displaces surface 2017-09-06 09:31:44 +02:00
9b7d506779 T52534: Compositor artifacts when scaling
Increased the maxx and maxy area of interest when scaling in this case.
2017-09-04 15:45:27 +02:00
2deeec9e28 This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundation@blender.org
https://www.blender.org/support/faq/
2017-09-04 15:43:20 +02:00
Dalai Felinto
9ca3d4cbbd Cycles Bake: Fix overflow when using hundreds of images
We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
2017-09-04 15:43:12 +02:00
0bee126977 Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent 2017-09-04 14:12:42 +02:00
c9d653e560 Fix T52533: Blender shuts down when rendering duplicated smoke domain 2017-09-04 14:06:08 +02:00
1ae3056261 Cycles: Fix compilation warning 2017-09-04 14:06:02 +02:00
5f17d47629 Cycles: Correct logging of sued CPU intrisics 2017-09-04 14:04:35 +02:00
edded659c6 Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
2017-09-04 14:04:28 +02:00
95d871c1a2 Cycles: FIx issue with -0 being considered a non-finite value 2017-09-04 14:04:22 +02:00
4b90830cac Alembic: Fix T52579: crash when replacing slightly different alembic files
Apparently with Maya in a certain configuration, it's possible to have an
Alembic object without schema in the Alembic file. This is now handled
properly, instead of crashing on a null pointer.
2017-09-04 14:04:13 +02:00
a1e8ef264f Fix: Deleting GPencil keyframes in DopeSheet didn't redraw the view 2017-09-04 13:03:09 +02:00
f5d02f055f Fix: Border select for GPencil keyframes was including those in the "datablock" channels even though those weren't visible
This meant that it was easy to accidentally select too many keyframes
2017-09-04 13:03:01 +02:00
ed0429e7e6 Fix: GPencil Sequence Interpolation for thickness/strength was inverted
For example, if you have two keyframes:
  k1 = 1px, k2 = 10px

it was doing:
  1px, 9px, 8px, ..., 3px, 2px, 10px
instead of:
  1px, 2px, 3px, ..., 8px, 9px, 10px
2017-09-04 13:02:53 +02:00
27c42e05c4 Fix T52483: Fill is incorrect for interpolated strokes
The recalc flag must be enabled for new interpolated strokes.
2017-09-04 13:02:41 +02:00
374ddd022c BMesh: use predictable order for remove-doubles
Each qsort implementation may give different results when values match.

Now fallback to sorting by index.
2017-09-04 12:59:40 +02:00
8a254b6271 Docs: BMesh.from_mesh behavior w/ multiple calls 2017-09-04 12:59:33 +02:00
8193e50fd3 Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.

D2812 by @candreacchio
2017-09-04 12:59:27 +02:00
8c4b4fdd14 Missed last commit 2017-09-04 12:59:20 +02:00
5fd4eca8c0 Fix T52515: Crash on BMesh.to_mesh() 2017-09-04 12:59:13 +02:00
6fec06926e Fix minor Mesh -> BMesh conversion issues
- Vertex only meshes never restored their selection history.
- Select history was cleared on the source instead of the target.

Simple Optimizations:
- Avoid O(n^2) linked list looping that checked the entire list before
  adding elements (NULL values in the source array to prevent dupes).
- Re-use vert & edge lookup tables instead of allocating new ones.
2017-09-04 12:59:06 +02:00
bb92bb5329 Docs: rename var and comment how it's used
switch_from_camera wasn't right since it was used for auto-perspective.
2017-09-04 12:59:00 +02:00
7997646c2d Correction to last fix 2017-09-04 12:58:54 +02:00
0ed5605bd5 Fix T52490: NDOF orbit doesn't lock in ortho view
Regression in af3f7db caused by own fix for T51324
2017-09-04 12:58:47 +02:00
76e8dcafa3 Fix T52396: Crash loading template w/o config dir 2017-09-04 12:58:41 +02:00
73cdf00ea8 Fix T52227: Time Slide tool doesn't take NLA mapping into account
To be backported to 2.79
2017-09-04 12:57:16 +02:00
Dalai Felinto
ecdb16d1d8 Increase max/min frame range to over a million
For some specific pipelines (e.g., holographic rendering) you can easily
need over a million frames (1k * 1k view angles).

It seems a corner case, but there is no real reason not to allow users
doing that.

That said we do loose subframe precision in the highest frame range. Which can
affect motionblur. The current maximum sub-frame precision we have is 16.
While the previous limit of 500k frames has a precision of 32.

Thanks to Campbell Barton for the help here.

To be backported to 2.79
2017-09-04 12:57:10 +02:00
022b9676b0 Fix T52472: VSE Audio Volume not set immediately
Audio mixing is done with volume interpolation. A new handle started at
volume 1, now starting at volume 0 for a smooth fade in.
2017-09-04 12:57:03 +02:00
e9ca9dd5d7 Fix T52588: Shape key value driver variables of duplicated object sets refer to old objects.
Regression since 2.78, to be backported to 2.79.
2017-09-04 12:56:57 +02:00
82a6889d83 Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.

Should be safe enough for 2.79.
2017-09-04 12:56:50 +02:00
a5213924a8 Fix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
Shrinkwrap must check it does have valid target data.

Safe for 2.79 release.
2017-09-04 12:56:43 +02:00
42760d922e Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups
There's no guaranty that given ID is found in current outliner tree...

Safe for 2.79, though not a regression.
2017-09-04 12:56:36 +02:00
6f4a0c23cc Cycles: Mark pixels with negative values as outliers
If a pixel has negative components, something already went wrong, so the best option is to just ignore it.

Should be good for 2.79.
2017-09-04 12:56:29 +02:00
fc26280bcb Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.

Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.

Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...

However, that change shall be safer for now, probably good for 2.79 too.
2017-09-04 12:56:22 +02:00
75e392ae9f Cycles: Fix stack overflow during traversal caused by floating overflow
Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\

Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.
2017-09-04 12:56:15 +02:00
6825439b36 Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.
2017-09-04 12:56:08 +02:00
f2aa9bec9d Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.

Should be safe for 2.79.
2017-09-04 12:56:01 +02:00
8cb217069e Fix T52466: Silence search for button_context menu type.
We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.

To be backported to 2.79
2017-09-04 12:55:54 +02:00
9997f5ca91 Fix threading conflict when doing Cycles background render
It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.

Need more testing and port this to 2.79.
2017-09-04 12:55:47 +02:00
63e21e7218 Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
2017-09-04 12:55:40 +02:00
dd84324485 Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Please backport this to 2.79.
2017-09-04 12:55:30 +02:00
d2f20aed04 Fix T52439: Crash after adjusting lenght of hair particles.
Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles
before.

To be backported to 2.79.
2017-09-04 12:55:22 +02:00
c0a9fdd93f Cleanup: remove space from filenames 2017-09-04 12:53:48 +02:00
e00f3a6565 Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-09-04 12:53:39 +02:00
6692af3997 Fix error in PointerProperty argument list
Regression in a7b3047
2017-09-04 12:53:28 +02:00
058a358e98 Modify menu from last commit
Also correct tool-tip.
2017-09-04 12:48:17 +02:00
ba600ff7fa Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-09-04 12:48:04 +02:00
fd0fbf2564 Fix bpy library load: invalid function signature 2017-09-04 12:47:55 +02:00
beea9421bd PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-09-04 12:47:41 +02:00
c79f216066 fix for angle calculation due to usage of initially rotated rigidbodies in external mode 2017-08-28 16:27:48 +02:00
be7ef0060f fix for initial rotation in convert to object and convert to keyframes 2017-08-24 11:39:09 +02:00
e6341b5107 fix for rotated box shapes in external mode + print -1 for unbreakable threshold in phys viz 2017-08-24 10:30:28 +02:00
b25b4c550e use areabased centroid calculation again for shards + small fix in loading routine
new volumebased method gave incorrect results with nonmanifolds
2017-08-22 14:48:24 +02:00
d273e2002c added an automerge distortion cache 2017-08-22 12:37:53 +02:00
612030983d Merge remote-tracking branch 'refs/remotes/origin/blender-v2.79-release' into fracture_modifier 2017-08-21 15:21:13 +02:00
d7b094a807 fix attempt for "merge cache" 2017-08-18 18:45:25 +02:00
7b397cdfc8 Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 14:53:52 +02:00
d48f4b61c9 Blender 2.79: Point subodules to updated hash 2017-08-18 14:12:04 +02:00
9bc5549222 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 14:04:07 +02:00
48da381e37 another fix attempt to get the masses right 2017-08-17 22:50:13 +02:00
afa33574de fixes for centroid and volume calculation for non-manifolds, fix attempt for storage of merge info 2017-08-17 17:34:37 +02:00
6bc962d7bc Fix T46329: scene_update_{pre,post} doc needs clarification
The documentation for the bpy.app.handlers.scene_update_{pre,post}
handlers states that they're called "on updating the scenes data".
However, they're called even when the data hasn't changed. Of course
such handlers are useful, but the documentation should reflect the
current behaviour.

Reviewers: mont29, sergey

Subscribers: Blendify

Maniphest Tasks: T46329

Differential Revision: https://developer.blender.org/D1535
2017-08-17 16:30:01 +02:00
e6830167e2 Fixed Alembic unit test
Commit b6d7cdd3ce changed how the mesh data
is deformed, which wasn't taken into account yet in this unit test.

Instead of directly reading the mesh vertices (which aren't animated any
more), we convert the modified mesh to a new one, and inspect those
vertices instead.
2017-08-17 15:41:27 +02:00
f21020f45f Fix T52240: Alembic Not Transferring Materials Per Frame
When a mesh changes its number of vertices during the animation,
Blender rebuilds the DerivedMesh, after which the materials weren't
applied any more (causing the default to the first material slot).
2017-08-17 15:40:49 +02:00
455c016ba6 Alembic: Renamed variable assigned_name → assigned_mat
The variable is a pointer to a Material, not to a name/string.
2017-08-17 15:40:44 +02:00
6e7d962118 Fix OSX duplicate path in Python's sys.path
The '..' in the path caused simple comparisons to fail.

D2780 by @akitula
2017-08-17 14:29:19 +02:00
210f839e93 Blender 2.79: We are entering RC2 stage 2017-08-17 14:20:30 +02:00
b1d998ec5d Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself 2017-08-17 14:13:01 +02:00
78c288d377 Alembic import: report object name in face color index out of bounds error 2017-08-17 14:07:20 +02:00
2307ea88b5 Alembic import: fix crash when face color index is out of bounds.
This can happen with Alembic files exported from Maya. I'm unsure as to the
root cause, but at least this fixes the crash itself.

Thanks to @looch for reporting this with a test file. The test file has to
remain confidential, though, so it's on my workstation only.
2017-08-17 14:07:20 +02:00
8138082ab8 Fix T51701: Alembic cache screws up mesh.
Use same trick as in DataTransfer modifier e.g. to avoid modifying
existing mesh's data.
2017-08-17 14:07:20 +02:00
265d620179 Forgot to change magicnumber of OIIO built lib in previous commit... 2017-08-17 14:07:20 +02:00
2ff041b7a5 install_deps: disable PTex in our OIIO building for now, broken on newest systems. 2017-08-17 14:07:20 +02:00
edd0dbd23b Fix compilation error when building without Blender
Simply disabled python tests, they can't be run anyway (since blender target is
not enabled) and we don't have any player-related tests in that folder.
2017-08-17 14:07:20 +02:00
8604557b75 CMake: test build configuration support
D2765 by @akitula
2017-08-17 14:07:20 +02:00
a52ec5308f Fix T52278: 'Default' application template fails
Own error in 7398b3b7
2017-08-17 14:07:20 +02:00
0cb38b2875 Fix T52329: Boolean with aligned shapes failed
Creating ngons with multiple axis aligned shapes in the middle of a
single face would fail in some cases.

This exposed multiple problems in BM_face_split_edgenet_connect_islands

- Islands needed to be sorted on Y axis when X was aligned.
- Checking edge intersections needed increased endpoint bias.
- BVH epsilon needed to be increased.
2017-08-17 14:07:19 +02:00
6f935dbb38 Math Lib: add isect_seg_seg_v2_point_ex
This exposes end-point bias argument, needed in rare cases.
2017-08-17 14:07:19 +02:00
Stefan Werner
10764d31d4 Cycles: Fixed broken camera motion blur when motion was not set to center on frame
Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2787
2017-08-17 14:07:19 +02:00
69c389fd63 Cycles: Guard memcpy to potentially re-allocating memory with lock
Basically, make re-alloc and memcpy from the same lock, otherwise one
thread might be re-allocating thread while another one is trying to
copy data there.

Reported by Mohamed Sakr in IRC, thanks!
2017-08-17 14:07:19 +02:00
686b8e8fed Fix width estimation for buttons with short labels in pie menus
Differential Revision: https://developer.blender.org/D2781

To be backported to 2.79 branch
2017-08-17 14:07:19 +02:00
0aae208749 iFix T52050: Empty VSE preview for scene strips with OpenGL preview + Rendered settings.
'OpenGL Preview' checkbox was redundant now, just use seq_prev_type
value only.

Might be OK for 2.79, but should be double-checked first...
2017-08-17 14:07:19 +02:00
3689be736b Fix T52327: Entering/Exiting NLA Tweakmode disables Scene -> Only Keyframes from Selected Channels
The tweakmode flag and the selected-channels flag accidentally
used the same value, due to confusion over where these flags were
supposed to be set. The selected-channels flag has now been moved
to use a different value, so that there shouldn't be any further
conflicts.

To be ported to 2.79.
2017-08-17 14:07:19 +02:00
9a239eea68 Fix T52344: Softbody on Text.
Own previous fix (rBd5d626df236b) was not valid, curves are actually
supported by SoftBodies. It was rather a mere UI bug, which was not
including Surfaces and Font obect types in those valid for softbody UI.

Thanks to @brecht for the head up!

Also, fix safe for 2.79, btw.
2017-08-17 14:07:19 +02:00
28451a9cec Pie menu's sub-rows ignore 'EXPAND' flag
Regression, to be backported in 2.79.
2017-08-17 14:07:19 +02:00
efa840f99f Fix T52344: Softbody on Text.
For some reasons (c) softbody modifier was marked as compatible with
curves... Would need much more work though, so for now just removing
that flag!
2017-08-17 14:07:18 +02:00
518d690628 DPI: add back option to control line width, tweak default width.
Adds thin/default/thick modes to add -1/0/1 to the auto detected line width,
while leaving the overall UI scale unchanged.

Also tweaks the default line width threshold, so thicker lines start from
slightly high UI scales.

Differential Revision: https://developer.blender.org/D2778
2017-08-17 14:07:18 +02:00
35f5d80f3a Fix T52334: images with non-color data should not change color space on save. 2017-08-17 14:07:18 +02:00
0d86bc9f98 Tweak and extend POV syntax hilghting.
*Changed categories of some keywords
*reordered some longer keywords that didn't appear
*Activated another color (reserved builtins) by Leonid
*added some HGPOV and UberPOV missing keywords

Patch by Maurice Raybaud (@mauriceraybaud). Thanks to Leonid for additions, feedback and Linux testing.
Related diffs: D2754 and D2755.

While not a regression, this is new feature and would be nice to have it
backported to final 2.79.
2017-08-17 14:07:18 +02:00
ff47118c73 Fix T52324: Metaball disappears when deleting first metaball object.
Lost specific MBall 'need update' case here in last year's refactor.

While technically not a regression, nice to have in 2.79.
2017-08-17 14:07:18 +02:00
0146ab2fd5 Fix T52315: Crash on duplicating Scene without world.
Regression from rBa7b3047cefcbf, to be backported to 2.79.

Like... seriously... :|
2017-08-17 14:07:18 +02:00
e54df78c82 Fix T52280: The Image node in Compositing can't read Z buffer of openEXR in 2.79
As part of the fix for T51587, I removed the Depth output for non-Multilayer
images since it seemed weird that PNGs etc. that don't have a Z pass still get
a socket for it.
However, I forgot about non-multilayer EXRs, which are a special case that can
actually have a Z pass.

Therefore, this commit brings back the Depth output for non-multilayer images
just like it was in 2.78.
2017-08-17 14:07:17 +02:00
909320e3ff Fix fixed width box layouts
Regression, to be backported in 2.79.
2017-08-17 14:07:17 +02:00
fa34f864a2 Fix T52260: Blender 2.79 Objects made duplicates real still refer armature proxy.
New code was handling correctly ID's internal references to self, but
not references between 'made real' different objects...

Regression, to be backported in 2.79.
2017-08-17 14:07:17 +02:00
205202361c Fix width estimation for empty layouts in pie menus 2017-08-17 14:07:17 +02:00
fb73cee1ec Fix T52263: Crash When Splitting and Merging Areas with Header Text Set.
Not a regression, but safe enough to be included in 2.79.
2017-08-17 14:07:17 +02:00
8ae6e35923 Fix broken API doc generation: Partially revert rBa372638a76e0
Making those arrays static remove them from exported symbols, which
breaks API doc generation script.

To be backported to 2.79 branch.
2017-08-17 14:07:17 +02:00
ade9fc9245 Fix T52250: Glitch in UI in the addon panel regression 2017-08-17 14:07:17 +02:00
78b3061c32 fix attempt for avoiding incorrect inner collisions between constrained objects 2017-08-16 01:20:11 +02:00
f233ecd511 use exact volume calculation for convexhull and mesh when calculating masses of initial objects only 2017-08-15 03:26:44 +02:00
63ad55f295 fixes for FM mesh island rigidbody path problem and volume calculation
scaling was ignored and only half of the dimensions for the volume were used, thus the calculated mass was 1/8th of the
correct mass.
2017-08-15 02:52:59 +02:00
e3e6270241 fix, forgot to set angular spring stiffness and damping when converting to objects 2017-08-14 15:47:29 +02:00
155f2a4a52 fix for break of rigidbody behavior after 2.78c and stoptriggers are speed-dependent now 2017-08-13 13:20:08 +02:00
8af66d6088 versioning fixes for angular spring stiffness / damping and exposed those to FM python api 2017-08-13 01:39:10 +02:00
f68da08a05 fix for initial kinematic state after triggering and jumping back to startframe 2017-08-13 01:00:45 +02:00
97dd7b540f compile fixes after merge 2017-08-12 22:48:47 +02:00
86da0f4749 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.79-release' into fracture_modifier
Conflicts:
	build_files/buildbot/slave_compile.py
	build_files/cmake/buildinfo.cmake
	build_files/cmake/config/blender_release.cmake
	build_files/cmake/macros.cmake
	build_files/cmake/packaging.cmake
	build_files/cmake/platform/platform_win32_msvc.cmake
	doc/python_api/sphinx_doc_gen.py
	doc/python_api/sphinx_doc_update.py
	intern/atomic/atomic_ops.h
	intern/atomic/intern/atomic_ops_ext.h
	intern/atomic/intern/atomic_ops_unix.h
	intern/cycles/CMakeLists.txt
	intern/cycles/blender/addon/properties.py
	intern/cycles/blender/addon/ui.py
	intern/cycles/blender/blender_mesh.cpp
	intern/cycles/blender/blender_object.cpp
	intern/cycles/blender/blender_object_cull.cpp
	intern/cycles/blender/blender_object_cull.h
	intern/cycles/blender/blender_python.cpp
	intern/cycles/blender/blender_session.cpp
	intern/cycles/blender/blender_session.h
	intern/cycles/blender/blender_shader.cpp
	intern/cycles/blender/blender_util.h
	intern/cycles/bvh/bvh.cpp
	intern/cycles/bvh/bvh.h
	intern/cycles/bvh/bvh_build.cpp
	intern/cycles/bvh/bvh_node.h
	intern/cycles/device/device.cpp
	intern/cycles/device/device.h
	intern/cycles/device/device_cpu.cpp
	intern/cycles/device/device_cuda.cpp
	intern/cycles/device/device_opencl.cpp
	intern/cycles/device/device_task.cpp
	intern/cycles/device/opencl/opencl.h
	intern/cycles/device/opencl/opencl_base.cpp
	intern/cycles/device/opencl/opencl_mega.cpp
	intern/cycles/device/opencl/opencl_split.cpp
	intern/cycles/device/opencl/opencl_util.cpp
	intern/cycles/kernel/bvh/bvh.h
	intern/cycles/kernel/bvh/bvh_nodes.h
	intern/cycles/kernel/bvh/bvh_shadow_all.h
	intern/cycles/kernel/bvh/bvh_volume_all.h
	intern/cycles/kernel/bvh/qbvh_shadow_all.h
	intern/cycles/kernel/bvh/qbvh_subsurface.h
	intern/cycles/kernel/bvh/qbvh_traversal.h
	intern/cycles/kernel/bvh/qbvh_volume.h
	intern/cycles/kernel/bvh/qbvh_volume_all.h
	intern/cycles/kernel/closure/bsdf.h
	intern/cycles/kernel/closure/bsdf_microfacet.h
	intern/cycles/kernel/closure/bsdf_microfacet_multi.h
	intern/cycles/kernel/closure/bsdf_microfacet_multi_impl.h
	intern/cycles/kernel/geom/geom.h
	intern/cycles/kernel/geom/geom_curve.h
	intern/cycles/kernel/geom/geom_motion_curve.h
	intern/cycles/kernel/geom/geom_motion_triangle_intersect.h
	intern/cycles/kernel/geom/geom_motion_triangle_shader.h
	intern/cycles/kernel/geom/geom_object.h
	intern/cycles/kernel/geom/geom_triangle.h
	intern/cycles/kernel/geom/geom_triangle_intersect.h
	intern/cycles/kernel/geom/geom_volume.h
	intern/cycles/kernel/kernel_accumulate.h
	intern/cycles/kernel/kernel_bake.h
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/kernel_compat_cuda.h
	intern/cycles/kernel/kernel_emission.h
	intern/cycles/kernel/kernel_image_opencl.h
	intern/cycles/kernel/kernel_light.h
	intern/cycles/kernel/kernel_passes.h
	intern/cycles/kernel/kernel_path.h
	intern/cycles/kernel/kernel_path_branched.h
	intern/cycles/kernel/kernel_path_common.h
	intern/cycles/kernel/kernel_path_surface.h
	intern/cycles/kernel/kernel_path_volume.h
	intern/cycles/kernel/kernel_random.h
	intern/cycles/kernel/kernel_shader.h
	intern/cycles/kernel/kernel_shadow.h
	intern/cycles/kernel/kernel_subsurface.h
	intern/cycles/kernel/kernel_textures.h
	intern/cycles/kernel/kernel_types.h
	intern/cycles/kernel/kernel_volume.h
	intern/cycles/kernel/kernels/cpu/kernel_avx.cpp
	intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp
	intern/cycles/kernel/kernels/opencl/kernel.cl
	intern/cycles/kernel/split/kernel_background_buffer_update.h
	intern/cycles/kernel/split/kernel_data_init.h
	intern/cycles/kernel/split/kernel_direct_lighting.h
	intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
	intern/cycles/kernel/split/kernel_next_iteration_setup.h
	intern/cycles/kernel/split/kernel_scene_intersect.h
	intern/cycles/kernel/split/kernel_split_common.h
	intern/cycles/kernel/svm/svm_displace.h
	intern/cycles/kernel/svm/svm_image.h
	intern/cycles/kernel/svm/svm_tex_coord.h
	intern/cycles/render/buffers.cpp
	intern/cycles/render/graph.cpp
	intern/cycles/render/graph.h
	intern/cycles/render/image.cpp
	intern/cycles/render/image.h
	intern/cycles/render/mesh_subdivision.cpp
	intern/cycles/render/osl.cpp
	intern/cycles/render/session.cpp
	intern/cycles/render/session.h
	intern/cycles/render/svm.cpp
	intern/cycles/render/svm.h
	intern/cycles/render/tile.cpp
	intern/cycles/render/tile.h
	intern/cycles/util/util_atomic.h
	intern/cycles/util/util_boundbox.h
	intern/cycles/util/util_half.h
	intern/cycles/util/util_image.h
	intern/cycles/util/util_image_impl.h
	intern/cycles/util/util_math.h
	intern/cycles/util/util_path.cpp
	intern/cycles/util/util_progress.h
	intern/cycles/util/util_simd.h
	intern/cycles/util/util_task.cpp
	intern/cycles/util/util_types.h
	intern/ghost/intern/GHOST_SystemCocoa.mm
	make.bat
	release/datafiles/locale
	release/scripts/addons
	release/scripts/presets/interface_theme/24x_blues.xml
	release/scripts/presets/interface_theme/flatty_light.xml
	release/scripts/startup/bl_operators/wm.py
	release/scripts/startup/bl_ui/space_userpref.py
	source/blender/blenkernel/BKE_library_query.h
	source/blender/blenkernel/BKE_sca.h
	source/blender/blenkernel/intern/DerivedMesh.c
	source/blender/blenkernel/intern/armature.c
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_query.c
	source/blender/blenkernel/intern/mesh.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenkernel/intern/sca.c
	source/blender/blenkernel/intern/subsurf_ccg.c
	source/blender/blenlib/intern/task.c
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/blenloader/intern/writefile.c
	source/blender/collada/ArmatureImporter.cpp
	source/blender/depsgraph/DEG_depsgraph_build.h
	source/blender/depsgraph/intern/builder/deg_builder.cc
	source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/depsgraph/intern/builder/deg_builder_nodes.h
	source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
	source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations.h
	source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
	source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
	source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
	source/blender/depsgraph/intern/depsgraph.h
	source/blender/depsgraph/intern/depsgraph_build.cc
	source/blender/depsgraph/intern/depsgraph_eval.cc
	source/blender/depsgraph/intern/eval/deg_eval.cc
	source/blender/depsgraph/intern/eval/deg_eval_debug.cc
	source/blender/depsgraph/intern/nodes/deg_node.cc
	source/blender/depsgraph/intern/nodes/deg_node.h
	source/blender/depsgraph/intern/nodes/deg_node_component.cc
	source/blender/depsgraph/intern/nodes/deg_node_component.h
	source/blender/depsgraph/intern/nodes/deg_node_operation.cc
	source/blender/depsgraph/util/deg_util_foreach.h
	source/blender/editors/animation/anim_channels_defines.c
	source/blender/editors/animation/anim_draw.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/interface/interface_layout.c
	source/blender/editors/object/object_modifier.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/transform/transform_snap_object.c
	source/blender/gpu/shaders/gpu_shader_material.glsl
	source/blender/makesdna/DNA_ID.h
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesdna/DNA_rigidbody_types.h
	source/blender/makesdna/DNA_userdef_types.h
	source/blender/makesrna/intern/rna_ID.c
	source/blender/makesrna/intern/rna_main.c
	source/blender/makesrna/intern/rna_main_api.c
	source/blender/makesrna/intern/rna_mesh_api.c
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/makesrna/intern/rna_render.c
	source/blender/makesrna/intern/rna_rigidbody.c
	source/blender/makesrna/intern/rna_userdef.c
	source/blender/makesrna/intern/rna_wm_api.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_boolean.c
	source/blender/modifiers/intern/MOD_normal_edit.c
	source/blender/modifiers/intern/MOD_util.c
	source/blender/nodes/shader/nodes/node_shader_tex_brick.c
	source/blender/python/intern/bpy_rna_id_collection.c
	source/blender/render/extern/include/RE_pipeline.h
	source/blender/render/intern/source/render_result.c
	source/creator/CMakeLists.txt
	tests/gtests/CMakeLists.txt
	tests/gtests/blenlib/BLI_string_test.cc
	tests/python/CMakeLists.txt
2017-08-12 22:48:17 +02:00
5c9626721b reordered all FM related functions to the end of file 2017-08-12 16:28:18 +02:00
474ae3e5f9 renamed "Anti-Trigger" to "Stop Trigger" in python and UI now 2017-08-10 19:21:35 +02:00
3bdb65f5ed performance regression fix which reduces some static-static collision checking 2017-08-10 18:55:07 +02:00
39330a3e62 reworked the trigger system to work in narrowphase of bullet (more exact shapes) 2017-08-09 22:18:03 +02:00
0e7fb6d0bd support for "anti-triggers" which stop movement of active rigidbody shards 2017-08-09 15:30:00 +02:00
1d57779c20 using quaternions and correction of quaternion sign flips for convert to keyframes now 2017-08-08 01:26:25 +02:00
a4c953bf04 attempt to reduce memory usage with dynamic fracture
but somewhere a memory leak is still present there
2017-08-07 17:58:04 +02:00
be6e39da29 minor fix: forgot to update frame in display when converting to keyframes 2017-08-05 20:05:36 +02:00
91f02a80f5 fix for wrong centroid calculation when re-using existing mesh-islands
this affected the physics mesh and the convert to keyframes function, which created incorrect results.
2017-08-05 19:22:13 +02:00
5e9132b3b7 2.79 release: point submodules to correct branches and versions. 2017-08-01 19:31:37 +02:00
8e21378e05 take position for constraint between both rigidbodies for fixed constraints now, too 2017-06-21 14:48:34 +02:00
04896acd69 skip exceeded verts in average coord calculation in keep distort mode now too 2017-06-20 22:24:33 +02:00
5909d32aec allow a bit "cleaner" cut edges when keep distort is not set, else they keep jaggy 2017-06-20 16:59:01 +02:00
a8510408b9 added deform weakening factor
the threshold is multiplied with 1.0-fac per deform iteration, so it can automatically break at some point.
2017-06-18 19:25:57 +02:00
256aeb213a added additional distances and angles settings in order to control plastic deform better 2017-06-18 17:20:38 +02:00
e3cdc36429 refinement for plastic deformation 2017-06-18 13:41:38 +02:00
3294959446 attempt to have "plastic" constraint deform by re-constraining via angle, distance
deformation mode happens when breakable is set to false, but angle or distance is set
2017-06-18 11:08:21 +02:00
dfbcbaf7eb fix attempt for memory leak after loading FM blends in prefractured mode
note: works only with newly saved FM files, older still have unnecessary data in them which wont be automatically cleaned
2017-06-17 21:08:54 +02:00
00054e28a4 do not check constraint islands in case constraint collision is activated (allow self collision) 2017-06-16 23:00:05 +02:00
b025e3b36a check for availability of "constraint_type" in DNA struct, if not there set default value "fixed" 2017-06-16 22:00:37 +02:00
e1ea9a4afd added constraint type setting for FM constraints
previously there was only a cluster constraint setting
2017-06-16 18:43:15 +02:00
64ada2985f added Dissolve plastic constraints option, only relevant for external mode 2017-06-16 12:21:02 +02:00
c802ddb2a4 allow triggering in external mode too 2017-06-15 17:05:37 +02:00
8dc440e900 fix for distortion, should avoid snapping back of geometry 2017-06-14 22:51:13 +02:00
5caefc95a7 refactor of automerge shared vertex handling function 2017-06-14 20:55:26 +02:00
55aa21bb16 fix attempt for uncontrolled "snapping" when using keep distort 2017-06-14 19:33:30 +02:00
dce6a36932 crash fix for linking FM scene as background scene with automerge 2017-06-14 12:48:27 +02:00
afa2287ea3 fix, do not recalculate autohide when only changing automerge dist 2017-06-14 12:23:56 +02:00
d5213d70b7 performance improvement for packing many islands, avoided unnecessary listbase findlink 2017-06-14 00:02:15 +02:00
a99e840151 crash fix and minor tweaks for external mode (setting expected defaults) 2017-06-13 23:28:24 +02:00
4b560f14d7 further fixes for external mode 2017-06-13 22:37:36 +02:00
c3c488e475 fix for handling of uvs when packing objects into fracture modifier 2017-06-13 19:26:03 +02:00
2df9e4909c reset automerge (distortion, exceeded) in external mode now too on startframe 2017-06-12 12:16:55 +02:00
1941be005d more tweaks for automerge 2017-06-12 11:29:27 +02:00
2b63854ec1 allow autohide / automerge for external mode too, and some tweaks for shared vert group optimization 2017-06-12 01:40:00 +02:00
9ae6823841 disabled "optimization attempt" for automerge again, did not bring much performance and caused visual errors 2017-06-11 18:43:36 +02:00
b8cb539f2c fix for old dynamic external mode 2017-06-11 18:16:19 +02:00
83144efb4d further automerge speed optimization attempts 2017-06-11 17:48:45 +02:00
4670d18474 use separate storage for packed geometry, allows mode switching and re-use of it 2017-06-11 11:49:50 +02:00
8fe651325c recalc normals when merging (distance>0) and not using fix normals 2017-06-10 21:58:25 +02:00
9c2ca73575 clamped distortion and keep shared groups with autohide distance = 0 as well 2017-06-10 21:40:53 +02:00
170007cc4f fix for automerge, with bisect / fast bisect recalc normals on merge, also no redundant shared groups any more 2017-06-10 19:49:45 +02:00
03c11e58a9 crash fix when using ob->derivedFinal for a bbox calculation, needed to check its validity better 2017-06-08 16:50:23 +02:00
fcff61a1bd made do_merge and keep_distort optional 2017-06-08 15:40:20 +02:00
bb9f2e4037 keep distorted shape after tearing, todo, make this optional ? 2017-06-08 14:25:34 +02:00
1b19fea008 tweak for inner crease, only appear on torn edges 2017-06-08 13:19:39 +02:00
b1d786de2c fix for automerge, do not snap together after exceeding threshold, and adding optionally crease to edges, too 2017-06-08 13:00:47 +02:00
4d8b238e4b first attempt for better automerging 2017-06-08 01:15:16 +02:00
e041ca68e1 fix for packing materials, material index start value could overflow due to being a short instead of int 2017-06-07 18:08:43 +02:00
51a088cbea also store material index in shards, so it can be loaded from blend later 2017-06-07 16:15:39 +02:00
05e4103ba4 fix for material assignment when converting back to objects 2017-06-07 16:08:55 +02:00
0812e32572 prefer vector handle on adaptive keyframe in convert to keyframed objects 2017-06-04 19:59:32 +02:00
76e114180d fix attempt for particle systems supporting dynamicly changing vertexgroups 2017-06-04 19:35:26 +02:00
948ad8e88b crash fix and attempt to reduce unnecessary memory usage 2017-06-04 00:55:19 +02:00
b25edc6352 set allowed smoke timescale from 0.0 to 2.0, thus allow static and a bit faster smoke as well 2017-06-03 19:58:00 +02:00
15b3b2bdcd minor tweak, just activate clusters and keep inter-cluster constraints intact in that case 2017-06-02 15:41:03 +02:00
56f42dacd2 fix for cluster percentage, was incorrectly calculated before and only used if regular percentage was set 2017-06-02 10:02:50 +02:00
a293d028b9 new "Handle" option for convert to keyframes, if set calculates handles to be auto or vector(adaptive), but can be slower 2017-06-01 12:42:32 +02:00
899c2b921c further optimization attempts with convert to keyframed objects 2017-05-31 20:43:47 +02:00
b7327017a0 fix for convert to keyframes, needs no bake and should be initialized properly after refracture 2017-05-31 13:41:18 +02:00
fe95515de0 performance improvement with convert to keyframes and new adaptive keyframe option (threshold of changes) 2017-05-30 17:44:18 +02:00
b7f7879ad2 added step option to convert to keyframes, new parameter popup dialog, also backported fseek fix to meshcache modifier 2017-05-29 21:33:40 +02:00
f6924b23bf fix for loading bakes from official build (single objects)
also reverted from exact volume calculation of shards to bbox (faster)
removed some development printouts
2017-05-22 19:28:30 +02:00
2f6f36ef5a added rectangular alignment feature for fast bisect (works with uniform only)
the closer the factor is to 1, the more rectangular-ish the shards will look like. default is 0 which means any rotation is allowed.
2017-05-12 17:48:34 +02:00
ad99d53b8a fix for jumps in rotation when converting to keyframed objects 2017-04-21 13:14:08 +02:00
a9e14e1018 crash fix for physical rough edges (corrupted memory) 2017-03-29 20:55:48 +02:00
0decb16563 do not execute refresh operator in running sim any more 2017-03-28 21:38:59 +02:00
6806065c38 apparently fixed the cuttergroup bug (was an incorrect bbox test) + silenced 2 warnings 2017-03-28 18:35:27 +02:00
e8f0228977 fix attempt for numerical instabilty with cuttergroups + a couple of minor fixes
as workaround you could use particlehelper and uniform together with cuttergroups
2017-03-28 17:41:49 +02:00
65c86fc66b load crash fix if FM is there but hasnt been executed prior to save 2017-03-15 20:55:42 +01:00
5bac7e5ac7 fix for loading cutter group fractures and allow all algorithms now in combination with cuttergroup 2017-03-15 17:36:25 +01:00
5f56257713 added basic material handling and outputting vertexgroups for intersect/difference shards with cuttergroups 2017-03-12 13:11:52 +01:00
e63c6cd345 fix attempt for passive fakeparenting with dynamic/external, and first version of combined cuttergroup and procedural (boolean only) fracture 2017-03-11 18:52:01 +01:00
30acaddb6c fixes for constraint behavior in dynamic_external mode 2017-03-07 21:34:12 +01:00
3b0646b3ac dissolve constraint now only dissolves constraints between different clusters if clusters are used
additionally added a python-settable variable to indicate whether the dynamic fracture data has been loaded externally or not (just set it from the handler)
2017-03-07 16:41:09 +01:00
cd6e18db8a added handlers which are triggered after freeing shards and before rebuilding constraints
this is supposed to keep externally loaded data in place when changing over to dynamic fracture, the handler triggers a python script which populates the meshislands and another to populate the constraints via the FM python API.
Additionally a couple of minor fixes for dynamic fracturing.
2017-03-06 19:24:55 +01:00
57a1e434e5 fix for hair particle system, was wrong hair distribution and render error
suppressed "dynamic" particle redistribution for hair now too
2017-03-03 13:19:57 +01:00
a34e295b68 fix, forgot to copy splinter axis when duplicating FM object 2017-02-26 21:18:45 +01:00
c073d3e8a4 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.78c-release' into fracture_modifier 2017-02-25 15:44:10 +01:00
bc27652e57 tests: Update hash for OBJ
Was a recent update of UV precision.
2017-02-23 18:04:00 +01:00
27167ee3a4 Cycles: Fix compilation error on 32bit Linux 2017-02-23 17:30:54 +01:00
551265424b Fix T50243: libmv_panography_test is broken
There was fully wrong logic in comparison: was actually accessing memory
past the array boundary. Run test manually and the figure seems correct
to me now.

Spotted by @LazyDodo, thanks!
2017-02-23 17:18:03 +01:00
15fb1fdb99 [msvc] Set proper OpenSubdiv flags when not using find_package to find opensubdiv. Fixes T50548 2017-02-23 16:21:16 +01:00
7d77dcd190 Blender 2.78c: Officially move to 'c' 2017-02-23 16:07:47 +01:00
909c8ec07a Cycles: Fix wrong render results with texture limit and half-float textures 2017-02-23 15:07:45 +01:00
b95645c1ae Fix T50748: Render Time incorrect when refreshing rendered preview in GPU mode 2017-02-23 15:07:02 +01:00
67169e70d6 Fix T50687: Cycles baking time estimate and progress bar doesn't work / progress when baking with high samples 2017-02-22 16:58:37 +01:00
e89145efd3 Fix T50512: Linked Backround scene with animation not updating with new depsgraph
Was missing relations for the set scenes.

Perhaps not ideal solution, but should be good enough for now.
2017-02-22 16:48:48 +01:00
dd2e33b24d Blender 2.78c: Fix crash with material preview and image sequences
Don't use built-in API for image sequences since it's not really
finished in RNA API.

Fixes issue reported in T50616.
2017-02-22 16:46:00 +01:00
99abd1f79e Blender 2.78c: Fix wrong render result with pointiness
The issue was caused by pointiness being calculated after
faces split now. Ported all fixes we did here.

Should be safe, pointiness is used all over the barbershop.
2017-02-22 16:34:10 +01:00
92e75a54f4 Cleanup 2017-02-22 15:57:41 +01:00
8ba1dab3a2 Blender 2.78c: Fix Brick Texture GLSL, broken after Mortar Smooth addition. 2017-02-22 15:33:30 +01:00
9215848c38 Fix T50550: GPUShader: compile error - Background image not showing in
viewport.

Caused by rBd6cf28c5e15739f864fbf04614c2a50708b4b152, which forgot to
update the GLSL code for the "Light Path" node.
2017-02-22 15:25:28 +01:00
b3b4084073 Blender 2.78c: Fix wrong cycles hair render results when using BVH motion steps
This commit contains all commits required to get proper hair rendering
with BVH motion steps enabled.

The issue here was mainly coming from minimal pixel width feature
which is quite commonly enabled in production shots.

This feature will use some probabilistic heuristic in the curve
intersection function to check whether we need to return intersection
or not. This probability is calculated for every intersection check.
Now, when we use multiple BVH nodes for curve primitives we increase
probability of that primitive to be considered a good intersection
for us. This is similar to increasing minimal width of curve.

What is worst here is that change in the intersection probability
fully depends on exact layout of BVH, meaning probability might
change differently depending on a view angle, the way how builder
binned the primitives and such. This makes it impossible to do
simple check like dividing probability by number of BVH steps.

Other solution might have been to split BVH into fully independent
trees, but that will increase memory usage of all the static
objects in the scenes, which is also not something desirable.

For now used most simple but robust approach: store BVH primitives
time and test it in curve intersection functions. This solves the
regression, but has two downsides:

- Uses more memory.

  which isn't surprising, and ANY solution to this problem will
  use more memory.

  What we still have to do is to avoid this memory increase for
  cases when we don't use BVH motion steps.

- Reduces number of maximum available textures on pre-kepler cards.

  There is not much we can do here, hardware gets old but we need
  to move forward on more modern hardware..
2017-02-22 15:08:56 +01:00
c6e4a81dfb Blender 2.78c: Port all commits related on new Cycles regression tests 2017-02-22 15:07:18 +01:00
3c043732d3 Blender 2.78b: Point addons to an updated revision 2017-02-08 14:50:08 +01:00
cc6cf0cdce fix, keep bake until convert to keyframe has been finished, and delete then
Deleting the bake after changing the rigidbody count still is necessary, else the shard order and the mesh appearance of fracture modifier objects will be messed up.
Furthermore, decreased the convert to keyframe default threshold from 0.05 to 0.005, reconverting by re-using
the operator again still is somewhat broken
2017-02-05 17:24:44 +01:00
9cb21a1400 Blender release: We are officially 'b' now 2017-02-03 17:54:29 +01:00
a3e746733d [msvc] cmake fixes to support the recent for oiio/ffmpeg/numpy version changes. 2017-02-03 09:47:54 -07:00
8fa3801c49 Fix fluid sim build error with MSVC. 2017-02-03 15:48:09 +01:00
34b09852fd Fluids: improve multithreaded CPU usage.
Fixes for clamp-omp, fewer shared variables, fix some cases of threads writing
to the same memory location. Issue found by Jens Verwiebe, who reports 30%
speedup with 16 core CPU, when using this with a recent clang-omp version.
2017-02-03 15:48:06 +01:00
f6d2981ffb Cycles tests: Allow python auto-exec 2017-02-03 10:46:56 +01:00
9f6cfa3ead Cycles: Fix rng_state initialization when using resumable rendering 2017-02-01 11:48:50 +01:00
9529a96fd0 fix attempt for disappearing fm debris particles after baking 2017-01-29 19:08:38 +01:00
3c518ab4a4 crash fix, do not update tessface data while loading, only ensure it (saved fracture might have been invalid mesh) 2017-01-29 19:07:33 +01:00
7314ede784 Fix compilation error with latest OIIO 1.7.8
There are some changes in OIIO includes so now need to do some
things differently.
2017-01-26 11:27:44 +01:00
8ceed387c9 Return correct alpha for environment map in GLSL 2017-01-26 11:19:12 +01:00
672fbbfb4e Fix T49405: Crash when baking with adaptive subdivision
Blenders baking system currently doesn't support the topology used by
adaptive subdivision and primitive ids will be wrong or out of range
leading to crashes. Updating the baking system to support other
topologies would be a bit involved, so for now we simply disable
subdivision while baking to avoid crashes.
2017-01-26 11:16:34 +01:00
59c224ebc7 Cycles: Don't rely on indirectly included algorithm 2017-01-26 11:16:24 +01:00
7a9f8d0c77 Cycles: Fix typo in the panel name
No user visible changes, it was a typo in the name of the class.

Spotted by povmaniac in IRC, thanks!
2017-01-26 11:15:35 +01:00
2a757450f5 Cycles: Update current Cycles version 2017-01-26 11:15:25 +01:00
82e0127065 Fix T50491: Cycles UI breaks when pushing F8.
Cycles add-on did not actually support reloading correctly.

When you want to correctly reload sub-modules (i.e. modules of an add-on
which is a package), you need to use importlib, a mere import will do
nothing with already loaded modules (RNA classes are sort of
pre-registered when they are evaluated, through the meta-class system).
2017-01-26 11:15:18 +01:00
bfd209007d Cycles: Use more const qualifiers to avoid possible issues 2017-01-26 11:15:06 +01:00
db26c6f66c Cycles: Cleanup, split one gigantic function into two smaller ones 2017-01-26 11:15:00 +01:00
a65a988592 Cycles: Store time in BVH nodes
This way we can stop traversing BVH node early on.

Gives about 2-2.5x times render time improvement with 3 BVH steps.
Hopefully this gives no measurable performance loss for scenes with
single BVH step.

Traversal is currently only implemented for QBVH, meaning old CPUs
and GPU do not benefit from this change.
2017-01-26 11:14:51 +01:00
91fe6bdcb6 Cycles: Add option to split triangle motion primitives by time steps
Similar to the previous commit, the statistics goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0                46                    260
    1                27                    373
    2                18                    598
    3                15                    826

Scene used for the tests is the agent's body from one of the barber
shop scenes (no textures or anything, just a diffuse material).

Once again this is limited to regular (non-spatial split) BVH,
Support of spatial split to this feature will come later.
2017-01-26 11:14:42 +01:00
9bf3b4679e Cycles: Add option to split curve motion primitives by time steps
The idea is to create several smaller BVH nodes for each of the motion
curve primitives. This acts as a forced spatial split for the single
primitive.

This gives up render time speedup of motion blurred hair in the cost
of extra memory usage. The numbers goes as:

BVH Steps     Render time (sec)       Memory usage (MB)
    0               258                    191
    1               123                    278
    2                69                    453
    3                43                    627

Scene used for the tests is the agent's hair from one of the barber
shop scenes.

Currently it's only limited to scenes without spatial split enabled,
since the spatial split builder requires some changes to work properly
with motion steps coordinates.
2017-01-26 11:14:36 +01:00
be431c7cdc Cycles: Add utility function to calculate curve boundbox from given 4 keys
Also fixed some issues with motion keys calculation:

- Clamp lower and upper limits of curves so we can safely call those
  functions for the very first and very last curve segment.
- Fixed wrong indexing for the curve radius array.
- Fixed wrong motion attribute offset calculation.
2017-01-26 11:14:28 +01:00
d87caabf29 Cycles: Cleanup, trailing whitespace 2017-01-26 11:14:20 +01:00
f6742d36cd Cycles: Split motion triangle file once again, avoids annoying forward declarations 2017-01-26 11:14:12 +01:00
acbba822f7 Cycles: Move motion triangle intersection functions to own file
Mimics how regular triangles are working and makes it more clear where
the stuff is located in the kernel.

Needed to have some forward declarations because of the current placement
of things in the kernel.
2017-01-26 11:14:02 +01:00
69357d9db0 Cycles: Cleanup, better variable name 2017-01-26 11:13:54 +01:00
5a5b45374b Cycles: Add utility function to fetch motion keys while on CPU side 2017-01-26 11:13:48 +01:00
93c5388e34 Cycles: Cleanup, comments 2017-01-26 11:13:40 +01:00
df3511c96f Cycles: Add utility function to fetch motion triangle when on CPU side 2017-01-26 11:13:34 +01:00
eabb8f1d12 Cycles: Cleanup, delete trailing whitespace 2017-01-26 11:13:28 +01:00
5283a7e518 Fix T50460. Greying out issue with Cycles culling options. 2017-01-26 11:13:06 +01:00
c727bc7743 Fix T50517: Rendering expecting time is negative 2017-01-25 11:22:14 +01:00
feb2f0ae30 FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries. 2017-01-24 11:54:39 +01:00
44ffbcd254 Fix T49857: Blender crashes after adding texture node to compositing tree 2017-01-24 11:54:39 +01:00
f8a3b9b50c Cycles: Fix compilation error on with older GCC
Hopefully it works on all platforms now.
2017-01-20 12:17:11 +01:00
faaf41b330 Depsgraph: Bone parent should also include armature transform relation
It is required to have world-space bone position, which consists of armature
object transform and local bone transform.
2017-01-20 11:37:00 +01:00
8a0e91366c Depsgraph: Only re-schedule objects which are on visible layers
Otherwise it's possible to cause infinite update loop in Cycles viewport.

Gets a bit messy logic, need to revisit this..
2017-01-20 11:37:00 +01:00
85c7ecce27 Depsgraph: Use HIGH priority for scheduled tasks
This kind of keeps threads "warmer" and should in theory give better
cache coherency bringing some %% of speedup. It was already tested
few months ago and it gave few % speedup in barber shop, but was
reverted due to some bone popping. The popping is now fixed so it
should be fine to use new scheduling policy.
2017-01-20 11:37:00 +01:00
e3ede8294a Depsgraph: avoid more transitive relations for rigid body simulation 2017-01-20 11:37:00 +01:00
bff566215e Depsgraph: Rigid body simulation doesn't need explicit time relation
It'll be dependent on time via Time Source -> Rebuild RB World chain.
2017-01-20 11:36:59 +01:00
10ce1eea3f Depsgraph: Avoid transitive relation from local transform to final
There is always an uber eval node on the way. so we can avoid creating
some relations here in order to speed up both construction time and
evaluation.
2017-01-20 11:36:59 +01:00
5c4c2bebaa Fix depsgraph: hair collision is actually enabled, so add the relations. 2017-01-20 11:36:59 +01:00
85ec0446e1 Depsgraph: Fix matrix_world driver source
Reported by Dalai in IRC, thanks!
2017-01-20 11:36:59 +01:00
4a4959a647 Fix T49981: New Depsgraph - When camera is on inactive layer, it does not evaluate constraints 2017-01-20 11:36:59 +01:00
a3f66a868e Depsgraph: Fix infinite viewport object update in CYcles render mode
The issue was caused by wrong object re-tag needed to have proper dependnecies
update for OpenSubdiv.
2017-01-20 11:36:58 +01:00
8e908ae321 Depsgraph: use more explicit parenthesis 2017-01-20 11:36:58 +01:00
82cee9cb89 Depsgraph: Fix residue of debug-only code 2017-01-20 11:36:58 +01:00
b5b0354b7c Fix copy/paste typo in new depsgraph object geometry builder (found by coverity). 2017-01-20 11:36:58 +01:00
5708ec2a01 Depsgrpah: Fix missing animation update in movie clips 2017-01-20 11:36:58 +01:00
317431461f Depsgraph: Move scene builder function to own file
This way it's much easier to grasp what the graph actually contains.
2017-01-20 11:36:57 +01:00
48a8a20e2a Fix T50060: New depsgraph does not update mask animation 2017-01-20 11:36:57 +01:00
cf60343b06 Depsgraph: Use utility macro to iterate over linked list
This will be compiled into same exact code, just saves us from
doing annoying type casts all over the place.
2017-01-20 11:36:57 +01:00
c02ba89d6a Depsgraph: Move rig builder functions to own files
Those routines are rather big and started to be annoying to have
one big file.

Should be no functional changes.
2017-01-20 11:36:57 +01:00
3d2a6e7db3 Depsgraph: Fix typo in previous optimization commit
Was a residue from another experiment, caused infinite loop when
reporting dependency cycles.
2017-01-20 11:36:57 +01:00
6d6c333ee9 Atomics: Make naming more obvious about which value is being returned 2017-01-20 11:36:56 +01:00
fb2d5a9853 Fix T49994: Setting dupligroup which uses indirect relation will crash
Did similar trick to old dependency graph: tag invisible relations for update.

Might need some re-consideration, see the comment.

This should solve our issues with powerlib addon here in the studio.
2017-01-20 11:36:56 +01:00
8ddc85ab59 Depsgraph: Add missing NULL pointer check 2017-01-20 11:36:56 +01:00
d3963e2bb0 Depsgraph: Fix missing DONE flag in relations builder
Was causing relations be build twice in certain cases.
2017-01-20 11:36:56 +01:00
c0c6af2cdd Fix T49993: Indirectly used taper/bevel crashes new dependency graph
New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.
2017-01-20 11:36:56 +01:00
88d02e5433 Depsgraph: Fix typo in text on curve relation builder 2017-01-20 11:36:56 +01:00
9d2a7961fc Depsgraph: Fix missing ID node tag
Might have caused nodes created multiple times for the same object.
2017-01-20 11:36:55 +01:00
a45d648485 Depsgraph: Add some data builder logic to corresponding function 2017-01-20 11:36:55 +01:00
ad01f0d19b Depsgraph: cleanup, no functional changes 2017-01-20 11:36:55 +01:00
29ef143ef9 Depsgraph: Fix another issue which seems to be a bug
Similar to a previous commit.

Doing separately for an easy of bisect.
2017-01-20 11:36:55 +01:00
5393e78367 Depsgraph: Fix wrong relation from IK solver to pole target
Copy paste error...

How to avoid those?
2017-01-20 11:36:55 +01:00
f737bc673b Depsgraph: Disable timing profile 2017-01-20 11:36:55 +01:00
Martijn Berger
3d75a7d0dc fix building depsgraph after recent changes 2017-01-20 11:36:54 +01:00
faa8b12714 Depsgraph: Do not rely on indirectly included cstring
Also add comment why exactly cstring is needed.
2017-01-20 11:36:54 +01:00
1c5502def8 Despgraph: Optimize cycles detection algorithm
The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.

This gives about 15-20% depsgraph construction time save.
2017-01-20 11:36:54 +01:00
34199e82fc Depsgraph: Speedup initial rig build time
We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.

Gives up to 30% initial rig construction time speedup.
2017-01-20 11:36:54 +01:00
b15d218db5 Depsgraph: Move key implementation from header to dedicated file 2017-01-20 11:36:54 +01:00
93783cb176 Depsgraph: Move class implementation from header to implementation files
This is more proper way to go:

- Avoids re-compilation of all dependent files when implementation changes
  without changed API,

- Linker should have much simpler time now de-duplicating and getting rid
  of redundant implementations.
2017-01-20 11:36:54 +01:00
06c202002b Depsgraph: Fully switch from string to const char*
This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.
2017-01-20 11:36:53 +01:00
570c072020 Depsgraph: Add extra name tag for operation nodes
The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.

So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.

There should be no functional changes yet, but this work is
required for further work about replacing string with const
char*.
2017-01-20 11:36:53 +01:00
1d5833caf5 Depsgraph: Cleanup, operation has name, not description
Hopefully should make things more clear here.
2017-01-20 11:36:53 +01:00
507599270f Depsgraph: Remove unused function
A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.
2017-01-20 11:36:53 +01:00
c520c4955f Depsgraph: Use const char for component API 2017-01-20 11:36:53 +01:00
c8f942574d Depsgraph: Remove some includes which seems unused 2017-01-20 11:36:52 +01:00
4939ec8a13 Depsgraph: Use const char instead of string in part of drivers construction 2017-01-20 11:36:52 +01:00
f7f44da43d Depsgraph: Switch away form string to const char* for node names
There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.

We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).

This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.
2017-01-20 11:36:52 +01:00
fe53bdf893 Depsgraph: Remove prototype of unused and non-implemented method 2017-01-20 11:36:52 +01:00
f7c0b01c2d Depsgraph: Add code for timing despgraph builder 2017-01-20 11:36:52 +01:00
71d48a44a5 Fix T49826: NEW-DEPSGRAPH - Texture is not updated after changing its space color
The issue was caused by image ID nodes not being in the depsgraph.

Now, tricky part: we only add nodes but do not add relations yet. Reasoning:

- It's currently important to only call editor's ID update callback to solve
  the issue, without need to flush changes somewhere deeper.

- Adding relations might cause some unwanted updates, so will leave that for
  a later investigation.
2017-01-20 11:36:52 +01:00
7d9be2f44e Depsgraph: Fix wrong comparison of ID type vs. node type 2017-01-20 11:36:51 +01:00
6514cbae6b Depsgraph: Fix race condition writing drivers to array property
Animation system has separate fcurves for each of array elements and
dependency graph creates separate nodes for each of fcurve, This is
needed to keep granularity of updates, but causes issues because
animation system will actually write the whole array to property when
modifying single value (this is a limitation of RNA API).

Worked around by adding operation relation between array drivers
so we never write same array form multiple threads.
2017-01-20 11:36:51 +01:00
e4164f31fc Depsgraph: Fix some errors printed to the console
They were not real issues, it's just some areas of code tried to create
relations between non-existing nodes without checking whether such
relations are really needed.

Now it should be easier to see real bugs printed.

Hopefully should be no regressions here.
2017-01-20 11:36:51 +01:00
8b192ade96 Partial fix for T49836: Camera DOF properties not updating via graph editor
Do this for the new dependency graph: was missing handle of OB_UPDATE_TIME in tag update.

Hopefully it's all correct still.

Old dependency graph needs work, but i'm tempting to call it unsupported and move on
to 2.8 branch.
2017-01-20 11:36:51 +01:00
1c29fbed65 Depsgraph: Report proper error when modifier fails to create relation link 2017-01-20 11:36:51 +01:00
085ce77b64 Depsgraph: Avoid some false-positive time dependencies of scripted drivers
This was quite weak to consider all scripted expression to be time-dependent.
Current solution is somewhat better but still crappy. Not sure how can we make
it really nice.
2017-01-20 11:36:51 +01:00
4ad131f9f1 Solve threading conflict when calculating smooth normals
It was possible to have synchronization issues whe naccumulating smooth
normal to a vertex, causing shading artifacts during playback.

Bug found by Dalai, thanks!
2017-01-20 11:36:50 +01:00
05fd3b586f RNA: Expose autosmooth face splitting
This way render engine can request mesh to be auto-split and not
worry about implementing this functionality on it's own.

Please note that this split is to be performed prior to tessellation.
2017-01-20 11:29:02 +01:00
7e5a0c146e Fix compile error (-Werror=float-conversion). 2017-01-20 11:26:25 +01:00
4564b014be Cycles: Expose diffuse and glossy depth to Light Path node
Was a bit confusing to have transparent and translucent depth
exposed but no diffuse or glossy.

Reviewers: brecht

Subscribers: eyecandy

Differential Revision: https://developer.blender.org/D2399
2017-01-20 11:26:24 +01:00
5f2ed8ccf1 Cycles: Don't use fast math for the host code
This is important for the reliable behavior or isnan/isfinite/min/max
functions to work with nan and non-finite values. Some of the issues
with fast math are possible to work around, but didn't find a way to
have reliable min/max implementation yet.
2017-01-20 11:26:24 +01:00
a1570562f3 Cycles: Add fast-math safe isnan and isfinite
Currently unused, but might become really handy in the future.
2017-01-20 11:26:24 +01:00
46926b4b11 Cycles: Remove using namespace hell
Please NEVER EVER use such a statement, it's only causing HUGE
issues. What is even worse: it's not always possible to immediately
see that the hell is coming from such a statement.

There is still some statements in the existing code, will leave
those for a later cleanup.
2017-01-20 11:26:24 +01:00
83d7c64bc9 Cycles: Fix amount of rendered samples not being shown while rendering the last tile on CPU 2017-01-20 11:26:24 +01:00
1f390081c2 Cycles: Cleanup, spelling 2017-01-20 11:26:23 +01:00
d28035aff3 Cycles: Cleanup, avoid shadowing 2017-01-20 11:26:23 +01:00
618177640f Cycles: Fix wrong transparent shadows for motion blur hair
This was a missing bit from b53ce9a.
2017-01-20 11:26:23 +01:00
3f3463700e Cycles: Cleanup, style 2017-01-20 11:26:23 +01:00
3b454eb92c Cycles: Simplify some code in Curve BVH reference fill
makes code slightly shorter and uses idea of const qualifiers.
2017-01-20 11:26:23 +01:00
bd302ecf73 Cycles: Avoid shadowing in BVH code
Run into some nasty bugs while trying various things here.

Wouldn't mind enabling -Wshadow for Cycles actually..
2017-01-20 11:26:23 +01:00
a503e7626a Cycles: Allow up to 4 motion curve primitives per BVH node
This avoids intersection AABB of different curve primitives
which makes it less ray-to-primitive intersections.

This gives about 30% speedup of hair rendering in the barber
shop scenes here. There is still some work to be done on those
files to solve major speed issues on certain frames.
2017-01-20 11:26:22 +01:00
fb6a94170f Cycles: Prepare BVH traversal code to work with multiple curve primitives per node 2017-01-20 11:26:22 +01:00
0f5db226cf Cycles: Correct assert() for cases when there are multiple curves per BVH node 2017-01-20 11:26:22 +01:00
a1f0e53498 Cycles: Use separate limit for motion primitives for BVH node limits
This way we can have different limits for regular and motion curves
which we'll do in one of the upcoming commits in order to gain some
percents of speedup.

The reasoning here is that motion curves are usually intersecting
lots of others bounding boxes, which makes it inefficient to have
single primitive in the leaf node.
2017-01-20 11:26:22 +01:00
d3e6fe0506 Cycles: Change confusing logic of max leaf size check
Maximal number of elements is supposed to be inclusive. That is what
it was always meant in this file and what @brecht considered still
the case in 6974b69c61.

In fact, the commit message to that change mentions that we allowed
up to 2 curve primitives per leaf while in fact it was doing up to 1
curve primitive.

Making it real 2 primitives at a max gives about 5% slowdown for the
koro.blend scene. This is a reason why BVHParams.max_curve_leaf_size
was changed to 1 by this change.
2017-01-20 11:26:22 +01:00
fa1988a34f Cycles: Cleanup, space prior to semicolon
We don't have that in Blender style, no reason to violate it here.
2017-01-20 11:26:22 +01:00
e92e265559 Cycles: Cleanup, make curve functions private
Not only they don't really follow naming convention (we don't use
camel case) but also was not necessary to keep them in the global
symbol table.
2017-01-20 11:26:21 +01:00
10cef4e86f Cycles: Make it more clear message why curve motion attribute was removed 2017-01-20 11:26:21 +01:00
086390dce7 Cycles: Use dedicated debug passes for traversed nodes and intersection tests
This way it's more clear whether some issue is caused by lots of geometry in
the node or by lots of "transparent" BVH nodes.
2017-01-20 11:26:21 +01:00
e15639f1cd Cycles: Remove more duplicated code in debug passes logic 2017-01-20 11:26:21 +01:00
41ed782350 Cycles: Fix wrong scaling of traversed instances debug pass 2017-01-20 11:26:21 +01:00
3cb1398899 Cycles: Cleanup, remove duplicated code 2017-01-20 11:26:20 +01:00
0fdb16ec4d Cycles: Cleanup, indentation within preprocessor 2017-01-20 11:26:20 +01:00
e9e1c95e64 Cycles: Cleanup, use switch() instead of if-else chain
About to add extra debug passes, which will be more clear to use switch().
2017-01-20 11:26:20 +01:00
39bc6172a4 Cycles: move hair particle settings to scene context
Since the beginning of times hair settings in cycles were global for
the whole scene but were located in the particle context. This causes
quite some trickery to get shots set up for the movies here in the
studio by forcing artists to create dummy particle system to change
settings of hair on the shot.

While ideally this settings should be properly become per-particle
system for the time being it will save sweat and blood to move the
settings to scene context.

Reviewers: brecht

Subscribers: jtheninja, eyecandy, venomgfx, Blendify

Differential Revision: https://developer.blender.org/D2287
2017-01-20 11:26:20 +01:00
8e372da1b5 Cycles: Fix wrong motion blur when combining deformation motion blur with autosplit
The issue was that we used to compare number of vertices for mesh after the auto
smooth was applied (at the center of the shutter time) with number of vertices
prior to the auto smooth applied. This caused false-positive consideration of a
mesh as changing topology.

Now we do autosplit as early as possible and do it from blender side, so Cycles
does not need to re-implement splitting on it's side.
2017-01-20 11:26:20 +01:00
aeece53491 Cycles: Pass explicit subdivision type to object_to_mesh
This allows us to do some extra logic checks there based on particular
subdivision type.

Additionally avoids implicit cast of enum to bool.
2017-01-20 11:26:20 +01:00
f0d866d143 Cycles: Cleanup, whitespace around operator 2017-01-20 11:26:20 +01:00
fa73db47e8 Cycles: Improve logging of cases when motion blur is disabled
Next logical step is to expose this somehow to the interface.
2017-01-20 11:26:19 +01:00
f071e48dcf Cycles: Fix uninitialized variable issue after recent changes 2017-01-20 11:26:19 +01:00
d8a8f69c98 Cycles: Move object culling helper to own files
This is a stand-alone logic, which becomes quite comprehensive now.
2017-01-20 11:26:19 +01:00
893aa1cae3 Cycles: Fix indendation 2017-01-20 11:26:19 +01:00
166b6c9240 Cycles: Consider GGX/Beckmann/Ashikhmin of 0 roughness a singular ray
This matches behavior of Multiscatter GGX and could become handy later on
when/if we decide it would be beneficial to replace on closure with another.

Reviewers: lukasstockner97, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2413
2017-01-20 11:26:19 +01:00
14e7ac956f Cycles: Tweak curve segment (un)pack to handle more curve segments
There was 16 bits reserved for primitive type, while we only need 4.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2401
2017-01-20 11:26:18 +01:00
5030854a66 Cycles: Cleanup, variable names
Use underscore again and also solve confusing part then in BVH smae
thing is called prim_addr but in intersection funcitons it was called
triAddr.
2017-01-20 11:26:18 +01:00
b8fc22fde1 Cycles: Cleanup, variables names
Use underscore instead of camel case.
2017-01-20 11:26:18 +01:00
5edef96d77 Land D2339 by bliblu bli 2017-01-20 11:26:18 +01:00
d546f66efc Fix emissive volumes generates unexpected fireflies around intersections
Discard the whole volume stack on the last bounce (but keep
world volume if present).

Volumes are expected to be closed manifol meshes, meaning if
ray entered the volume there should be an intersection event
of ray exisintg the volume. Case when ray hit nothing and
there are still non-world volumes in the stack can happen in
either of cases.

1. Mesh is not closed manifold.

Such configurations are not really supported anyway and should
not be used.

Previous code would have consider the infinite length of the
ray to sample across, so render result wasn't really correct
anyway.

2. Exit intersection is more far away than the camera far
   clip distance.

This case also will behave differently now, but previously it
wasn't really correct either, so it's not like we're breaking
something which was working as expected.

3. We missed exit event due to intersection precision issues.

This is exact the case which this patch fixes and avoid
fireflies.

4. Volume has Camera only visibility (all the rest visibility
is set to off)

This is what could be considered a regression but could be
solved quite easily by checking volume stack's objects flags
and keep entries which doesn't have Volume Scatter visibility
(or even better: ensure Volume Scatter visibility for objects
with volume closure),

Fixes T46108: Cycles - Overlapping emissive volumes generates unexpected bright hotspots around the intersection
Also fixes fireflies appearing on the edges of cube with
emissive volue.

Reviewers: juicyfruit, brecht

Reviewed By: brecht

Maniphest Tasks: T46108

Differential Revision: https://developer.blender.org/D2212
2017-01-20 11:26:18 +01:00
e4b67e7e5e Cycles :Cleanup, indentation 2017-01-20 11:26:18 +01:00
dd156f743c Cycles: Refactor Progress system to provide better estimates
The Progress system in Cycles had two limitations so far:
 - It just counted tiles, but ignored their size. For example, when rendering a 600x500 image with 512x512 tiles, the right 88x500 tile would count for 50% of the progress, although it only covers 15% of the image.
 - Scene update time was incorrectly counted as rendering time - therefore, the remaining time started very long and gradually decreased.

This patch fixes both problems:
First of all, the Progress now has a function to ignore time spans, and that is used to ignore scene update time.
The larger change is the tile size: Instead of counting samples per tile, so that the final value is num_samples*num_tiles, the code now counts every sample for every pixel, so that the final value is num_samples*num_pixels.

Along with that, some unused variables were removed from the Progress and Session classes.

Reviewers: brecht, sergey, #cycles

Subscribers: brecht, candreacchio, sergey

Differential Revision: https://developer.blender.org/D2214
2017-01-20 11:26:17 +01:00
f2677a58a5 Cycles: Implement AVX2 path for curve intersection functions
Gives little performance improvement on Linux and gives up to 2%
speedup on koro.blend on Windows.

Inspired by Maxym Dmytrychenko, thanks!
2017-01-20 11:26:17 +01:00
7e5af7aefd Cycles: Add AVX intrinsics helpers
They are defined for MSVC but seems to be missing in GCC and CLang-3.8.

Maybe some further tweaks to policy when to define those functions is
needed, but should be fine for now.
2017-01-20 11:26:17 +01:00
6df6f8c982 Cycles: Disable AVX2 crash workarounds
I can no longer reproduce crash with neither of the files where
the crash was originally visible. This is something where other
changes (light threshold, sampling) had an effect and made code
to work as it is supposed to. Could have been optimizator issue
or something like that.

Let's see if we hit same issue again.
2017-01-20 11:26:17 +01:00
a3ef4c1470 Fix T50116: Light threshold broke branched path tracer
In fact, the issue was caused by light threshold being too high for
certain scenes. Lowered it down to 0.01.
2017-01-20 11:26:17 +01:00
5aede15fea Cycles: Fix correlation issues in certain cases
There were two cases where correlation issues were obvious:

- File from T38710 was giving issues in 2.78a again
- File from T50116 was having totally different shadow between
  sample 1 and sample 32.

Use some more simplified version of CMJ hash which seems to give
nice randomized value which solves the correlation.

This commit will break all unit test files, but it's a bug fix
so perhaps OK to commit this.

This also fixes T41143: Sobol gives nonuniform noise

Proper science paper about hash function is coming.

Reviewers: brecht

Reviewed By: brecht

Subscribers: lukasstockner97

Differential Revision: https://developer.blender.org/D2385
2017-01-20 11:26:17 +01:00
5596f970be Fix T50075: Assert during debug render of hair_geom_transmission.blend 2017-01-20 11:26:16 +01:00
921e45d82b Cycles: Pass extra array size argument to builtin image pixels functions
This is a way to avoid possible memory corruption when render threads works
in parallel with UI thread.

Not guarantees complete safe, but makes things easier to check anyway.
2017-01-20 11:26:16 +01:00
d2affb1049 Fix T50104, Race condition in SVMShaderManager::device_update_shader 2017-01-20 11:26:16 +01:00
c3fd2b98ce Cycles: Avoid divisions by zero in volume sampling code
Was giving huge artifacts in the barber shop file here in the studio,

Maybe not fully optimal solution, but committing it for now to have
closer look later.
2017-01-20 11:26:16 +01:00
c61e68f289 Fix T50100: Cycles SeparateRGBNode Red socket defined wrong
Spotted by David (bocs), thanks!
2017-01-20 11:26:16 +01:00
b66d4f5eed Cycles: Fix strict compilation warnings 2017-01-20 11:26:16 +01:00
df6256a6ea Fix Cycles device backwards compatibility error if device type is unavailable. 2017-01-20 11:26:15 +01:00
ef28892654 Fix spelling in Cycles distance culling description. 2017-01-20 11:26:15 +01:00
1e57f6f957 Cycles: Fix strict compilation warnings
Should be no functional changes.
2017-01-20 11:26:15 +01:00
c1080ff73e Fix T50034: Blender changes processor affinity unauthorized 2017-01-20 11:26:15 +01:00
4ace7e1ebf Cycles: Fix re-definition of some functions on x32 arch 2017-01-20 11:26:15 +01:00
567c42bd22 Cycles: Another attempt to fix compilation on 32bit Linux 2017-01-20 11:26:15 +01:00
f4cd05082c Cycles: Attempt to fix 32bit buildbot builds after recent commit 2017-01-20 11:26:14 +01:00
4b7b9ded91 Cycles: Implement texture size limit simplify option
Main intention is to give some quick way to control scene's memory
usage by clamping textures which are too big. This is really handy
on the early production stages when you first create really nice
looking hi-res textures and only when it all works and approved
start investing time on optimizing your scene.

This is a new option in Scene Simplify panel and it acts as
following: when texture size is bigger than the given value it'll
be scaled down by half for until it fits into given limit.

There are various possible improvements, such as:

- Use threaded scaling using our own task manager.

  This is actually one of the main reasons why image resize is
  manually-implemented instead of using OIIO's resize. Other
  reason here is that API seems limited to construct 3D texture
  description easily.

- Vectorization of uchar4/float4/half4 textures.

- Use something smarter than box filter.

  Was playing with some other filters, but not sure they are
  really better: they kind of causes more fuzzy edges.

Even with such a TODOs in the code the option is already quite
useful.

Reviewers: brecht

Reviewed By: brecht

Subscribers: jtheninja, Blendify, gregzaal, venomgfx

Differential Revision: https://developer.blender.org/D2362
2017-01-20 11:26:14 +01:00
d77dcd5896 Cycles: Attempt to fix compilation error on ppc64el
There is some define conflict between system headers and clew,
so delay include of clew.h as much as possible.]

This is something which needed to be done in the code before
the refactor, hopefully such change will still work.
2017-01-20 11:26:14 +01:00
897261c01e Cycles: Don't shadow loop variable 2017-01-20 11:26:14 +01:00
0c4b812d2d Cycles: add basic backwards compatibility for device selection, move to System tab.
For the multi-GPU case users still have to reconfigure the devices they want to use.

Based on patch from Lukas Stockner.

Differential Revision: https://developer.blender.org/D2347
2017-01-20 11:26:14 +01:00
555e21d996 Cycles: refactor culling code into utility class. 2017-01-20 11:26:13 +01:00
59af4562dd Cycles: distance culling for objects.
This can be used together with camera culling to keep nearby objects visible in
reflections, using a minimum distance within which objects are visible. It is
also useful to cull small objects far from the camera.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2332
2017-01-20 11:26:13 +01:00
Dalai Felinto
a38a8497ef Cycles: Different noise seed for stereoscopic rendering (Fix #T50024)
Patch by Sergey Sharybin.
2017-01-20 11:26:13 +01:00
fcde51fd5d Fix T50001: auto tile size addon broken after Cycles GPU device changes.
Adds a get_num_gpu_devices() utility function for the addon to use.
2017-01-20 11:26:13 +01:00
bca4af7610 Cycles: Fix different noise pattern from fix in T49838:
No need to hash subframe == 0.
2017-01-20 11:26:13 +01:00
44e996745b Atomics: Make naming more obvious about which value is being returned 2017-01-20 11:26:11 +01:00
f24d420f16 Cycles: De-duplicate image loading functions
The code was templated already, so don't see big reason to have
3 versions of templated functions. It was giving some extra code
to maintain and in fact already had divergency for support of huge
image resolution (missing size_t cast in byte image loading).

There should be no changes visible by artists.
2017-01-20 11:25:53 +01:00
6832a18198 Fix T49904: Cycles standalone missing default generated texture coordinates. 2017-01-20 11:25:53 +01:00
feff2bfce4 Fix Cycles OSL compilation based on modified time not working. 2017-01-20 11:25:53 +01:00
a684d9375a Fix Cycles standalone not finding CPU device after recent changes. 2017-01-20 11:25:52 +01:00
78c855a370 Fix T49985: cycles standalone XML missing distant lights. 2017-01-20 11:25:52 +01:00
ff1b925ab3 Fix T49985: cycles standalone using wrong socket names for XML reading. 2017-01-20 11:25:52 +01:00
c40c888a52 Cycles: Add comments to endif directives
`kernel_path.h` and `kernel_path_branched.h` have a lot of conditional code and
it was kind of hard to tell what code belonged to which directive. Should be
easier to read now.
2017-01-20 11:25:52 +01:00
4b98b86654 Fix T49838: Noise randomization for frame should be done per interframes as well
Add subframe to the animated seed hash calculation.

Should be no difference for the regular files, only for cases when scene is
rendered from sequencer with a speed effect, which is not really a common thing.
2017-01-20 11:25:52 +01:00
0e9eeccf2e Cycles: Only use new light sample threshold for new files
This is a late follow-up commit to the light sample threshold changes which
caused difference in rendering all existing .blend files which is not something
we are happy about: it is fine to use new optimized defaults for new files, but
existing ones should always be rendering in the same way as they used to be.

Sorry for the inconveniece, but such thing should have been done to begin with.
If this setting was modified it will not be reset to zero.

Now all render tests should be passing again.

P.S. Also really annoying to bump subversion for such reasons, but currently we
don't have better way to achieve what we want.
2017-01-20 11:25:51 +01:00
f6926ea3f8 Fix compilation error when CUDA toolkit is not installed
After CUDA dynload changes having CUDA toolkit became required
in order to compile Cycles. This only happened due to wrong
default value to the option.
2017-01-20 11:25:29 +01:00
4a459704c0 Cycles: Remove device settings from performance tab
This was included in the commit by accident, it doesn't belong there.
2017-01-20 11:25:29 +01:00
f840239ee0 Cycles: Refactor Device selection to allow individual GPU compute device selection
Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL).
Now, a toggle button is displayed for every device.
These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards).

From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences.
This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items.

Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Subscribers: brecht, juicyfruit, mib2berlin, Blendify

Differential Revision: https://developer.blender.org/D2338
2017-01-20 11:25:29 +01:00
c89d8dd6cb Cycles: Fix T49952: Bad MIS sampling of backgrounds with single bright pixels
With this fix, using a MIS map resolution equal to the image size for closest imterpolation or twice the size for linear interpolation gets rid of all fireflies.
Previously, a much higher resolution was needed to get acceptable noise levels.
2017-01-20 11:25:29 +01:00
Martijn Berger
259d296918 cycles, cuDeviceComputeCapability is deprecated as of cuda 5.0 2017-01-20 11:25:28 +01:00
d812d54812 Cycles: Fix missing underscore in geom_object.h 2017-01-20 11:25:28 +01:00
73753072c2 Cycles: Fix OpenCL build error caused by light termination commit 2017-01-20 11:25:28 +01:00
e961684de5 Cycles: Fix T49901: OpenCL build error after recent light texture coordinate commit
Basically, the problem here was that the transform that's used to bring texture coordinates
to world space is either fetched while setting up the shader (with Object Motion is enabled) or
fetched when needed (otherwise). That helps to save ShaderData memory on OpenCL when Object Motion isn't needed.

Now, if OM is enabled, the Lamp transform can just be stored inside the ShaderData as well. The original commit just assumed it is.
However, when it's not (on OpenCL by default, for example), there is no easy way to fetch it when needed, since the ShaderData doesn't
store the Lamp index.

So, for now the lamps just don't support local texture coordinates anymore when Object Motion is disabled.
To fix and support this properly, one of the following could be done:
- Just always pre-fetch the transform. Downside: Memory Usage increases when not using OM on OpenCL
- Add a variable to ShaderData that stores the Lamp ID to allow fetching it when needed
- Store the Lamp ID inside prim or object. Problem: Cycles currently checks these for whether an object was hit - these checks would need to be changed.
- Enable OM whenever a Texture Coordinate's Normal output is used. Downside: Might not actually be needed.
2017-01-20 11:25:28 +01:00
Martijn Berger
74dc4ef556 Cycles standalone, compile fix UINT_MAX is not defined in device_cuda.cpp 2017-01-20 11:25:28 +01:00
8f8800bbbc Cycles: Deduplicate AO calculation
No functional changes.
2017-01-20 11:25:28 +01:00
927f84af07 Cycles: Fix OpenCL compilation with the new brick texture 2017-01-20 11:25:28 +01:00
44197cafaf Cycles: Style Fix: Light sampling threshold description 2017-01-20 11:25:28 +01:00
e5a86361af Cycles: Initialize the RNG state from the kernel instead of the host
This allows to save a memory copy, which will be particularly useful for network rendering.

Reviewers: sergey, brecht, dingto, juicyfruit, maiself

Differential Revision: https://developer.blender.org/D2323
2017-01-20 11:25:27 +01:00
feb4822346 Cycles: Add optional probabilistic termination of light samples based on their expected contribution
In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways.
To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased.
This is the same approach that's also used in path termination based on length.

Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise.

Reviewers: #cycles

Subscribers: sergey, brecht

Differential Revision: https://developer.blender.org/D2217
2017-01-20 11:25:27 +01:00
199d7dc70d Cycles: Add smoothing option to the Brick Texture
This option allows to create a smoother transition between Bricks and Mortar - 0 applies no smoothing, and 1 smooths across the whole mortar width.
Mainly useful for displacement textures.

The new default value for the smoothing option is 0.1 to give some smoothing that helps with antialiasing, but existing nodes are loaded with smoothing 0 to preserve compatibility.

Reviewers: sergey, dingto, juicyfruit, brecht

Reviewed By: brecht

Subscribers: Blendify, nutel

Differential Revision: https://developer.blender.org/D2230
2017-01-20 11:25:27 +01:00
e9211860b9 Fix T49846: OpenCL rendering compilation failure 2017-01-20 11:25:27 +01:00
5306621998 Cycles: Implement texture coordinates for Point, Spot and Area Lamps
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp.
On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp.

Credit for the Area lamp part goes to Stefan Werner (from D1995).
2017-01-20 11:25:27 +01:00
468022403a Cycles: More workarounds for weird crashes on AVX2
Oh man, is it a compiler bug? Is it something we do stupid?

For now more crap to prevent crashes. During the conference will talk to
Maxyn about how can we troubleshoot such weird issues.
2017-01-20 11:25:27 +01:00
2768e623a9 Cycles: Another attempt to fix crashes on AVX2 processors
Basically don't use rcp() in areas which seems to be critical after
second look. Also disabled some multiplication operators, not sure
yet why they might be a problem.

Tomorrow will be setting up a full test with all cases which were
buggy in our farm to see if this fix is complete.
2017-01-20 11:25:26 +01:00
2b87d3b6cc Cycles: Fix compilation error of AVX2 kernel without SSE math 2017-01-20 11:25:26 +01:00
d00172217b Cycles: Completely disable transform SSE for now
Was causing issues on another frame.

On a tight schedule, disabling for now so artists are happy.

Still looking into root of the issue!
2017-01-20 11:25:26 +01:00
d6e01042b9 Cycles: Fix crashes after recent optimization commits
There is some precision issues for big magnitude coordinates which started
to give weird behavior of release builds. Some weird memory usage in BVH
which is tricky to nail down because only happens in release builds and GDB
reports all variables as optimized out when trying to use RelWithDebInfo.

There are two things in this commit:

- Attempt to make vectorized code closer to original one, hoping that it'll
  eliminate precision issue.
  This seems to work for transform_point().
- Similar trick did not work for transform_direction() even tho absolute
  error here is much smaller. For now disabled that function, need a more
  careful look here.
2017-01-20 11:25:26 +01:00
2956203221 Cycles: Fix for fix (tm)
Sorry guys, for some reason read the expression back-to-front
and did wrong fix :S
2017-01-20 11:25:26 +01:00
c1d25de806 Cycles: Fix typo in previous commit for BVH improvements 2017-01-20 11:25:26 +01:00
98bdc56e4e Cycles: Enable SSE math optimization for AVX kernels
This gives about 5% speedup for AVX processors.

Benefit of such optimization on other microarchitectures is still
under investigation.
2017-01-20 11:25:25 +01:00
cdf556d974 Cycles: Use new SSE version of offset calculation for all QBVH flavors
Gives up to ~1% speedup again.

While it seems to be small, still nice since the code now is actually more
clean that it used to be before.
2017-01-20 11:25:25 +01:00
8ea5cbd89b Cycles: Move QBVH near/far offset calculation to an utility function
Just preparing for new optimization to be used in all traversal implementation.

Should be no measurable difference.
2017-01-20 11:25:25 +01:00
612604f23a Cycles: BVH-related SSE optimization
Several ideas here:

- Optimize calculation of near_{x,y,z} in a way that does not require
  3 if() statements per update, which avoids negative effect of wrong
  branch prediction.

- Optimization of direction clamping for BVH.

- Optimization of point/direction transform.

Brings ~1.5% speedup again depending on a scene (unfortunately, this
speedup can't be sum across all previous commits because speedup of
each of the changes varies from scene to scene, but it still seems to
be nice solid speedup of few percent on Linux and bigger speedup was
reported on Windows).

Once again ,thanks Maxym for inspiration!

Still TODO: We have multiple places where we need to calculate near
x,y,z indices in BVH, for now it's only done for main BVH traversal.
Will try to move this calculation to an utility function and see if
that can be easily re-used across all the BVH flavors.
2017-01-20 11:25:25 +01:00
4db44cee9f Cycles: Avoid branching in SSE version of intersection pre-calculation
Similar to the previous commit, avoid negative effect of bad branch prediction.

Gives measurable performance up to ~2% in tests here.

Once again, thanks to Maxym Dmytrychenko!
2017-01-20 11:25:25 +01:00
c5f4837603 Cycles: Implement SSE-optimized path of util_max_axis()
The idea here is to avoid if statements which could cause wrong
branch prediction.

Gives a bit of measurable speedup up to ~1%. Still nice :)

Inspired by Maxym Dmytrychenko, thanks!
2017-01-20 11:25:25 +01:00
10e583533b Cycles: Add AVX2 path to subsurface triangle intersection
Similar to regular triangle intersection case. Gives about 3% speedup rendering
SSS object on my desktop,

Question: how to avoid such a code duplication in a nice way without speed loss?
2017-01-20 11:25:24 +01:00
3a142ec55a Cycles: Cleanup, style 2017-01-20 11:25:23 +01:00
Hristo Gueorguiev
e2dd5f15d9 Cycles: OpenCL 3d textures support.
Note that volume rendering is not supported yet, this is a step towards that.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2299
2017-01-20 11:25:03 +01:00
7bddb79f49 Cycles: Fix another OpenCL logging issue
Previously an error message would be printed whenever the OpenCL build produced output.
However, some frameworks seem to print extra information even if the build succeeded, so now the actual returned error is checked as well.
When --debug-cycles is activated, the build output will always be printed, otherwise it only gets printed if there was an error.
2017-01-20 11:25:03 +01:00
3778475c61 Fix T49630: Cycles: Swapped shader and bake kernels
The problem here was, as the title says, that the two kernels were swapped.
Since shader evaluation is only used for building the samling map when World MIS is enabled, rendering without it would still work fine, although baking also was broken.
2017-01-20 11:25:03 +01:00
edac0e7b17 Cycles: Improve OpenCL kernel compilation logging
The previous refactor changed the code to use a separate logging mechanism to support multithreaded compilation.
However, since that's not supported by any frameworks yes, it just resulted in bad logging behaviour.
So, this commit changes the logging to go diectly to stdout/stderr once again by default.
2017-01-20 11:25:03 +01:00
290e37dce1 Cycles: Disable optimization of operator / for float3
This was giving some speedup but made intersection tests to fail
from watertight point of view.

Needs deeper investigation, but need to quickly get it fixed for
the studio.
2017-01-20 11:25:03 +01:00
f9b0c10d04 Fix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes. 2017-01-20 11:25:03 +01:00
87ca259433 Cycles: Use const reference for register variables in non-OpenCL code
This is something tested by @LazyDodo and suggested by Maxym to make
MSVC happier.
2017-01-20 11:25:03 +01:00
73bae90620 Cycles: Use more SSE intrinsics for float3 type
This gives about 5% speedup on AVX2 kernels (other kernels still
have SSE disabled for math operations) and this solves the slowdown
of koro scene mention in the previous commit.

The title says it all actually. This commit also contains
changes to pass float3 as const reference in affected functions.

This should make MSVC happier without breaking OpenCL because it's
only done in areas which are ifdef-ed for non-OpenCL.

Another patch based on inspiration from Maxym Dmytrychenko, thanks!
2017-01-20 11:25:02 +01:00
c01d7c8a8f Cycles: Implement AVX2 version of triangle_intersect
This commit basically vectorizes existing code using AVX2 instructions
(without modifying algorithm itself). This gives quite nice speedups:

  BMW:        -8%
  Classroom:  -5%
  Cat:        -5%
  Koro:       +1%
  Barcelona:  -8%

That's on Linux machine, reported performance improvement on Windows
goes up to 20%.

Not currently sure why Koro is somewhat slower because it mainly uses
curve intersection tests, could be a time noise? Or osmething with the
cache utilization perhaps? In any case speedup in other scenes makes
me thinking that current state is acceptable for initial implementation.

This is again inspired by Maxym Dmytrychenko.
2017-01-20 11:25:02 +01:00
804d4719c6 Cycles: Add new avxf vectorized data type
Based on existing ssef data type and to my knowledge it's also what happens in
Embree nowadays.

Inspired by Maxym Dmytrychenko and required for the upcoming triangle
intersection commit.

Hopefully the copyright message is correct.
2017-01-20 11:25:02 +01:00
19203b42ed Cycles: Enable SSE options of math module for AVX2 kernels
Currently this does not give measurable difference, but is required
ground work for some upcoming further optimization of AVX2 kernels.
2017-01-20 11:25:02 +01:00
dff65a0e6f Cycles: Cleanup, style 2017-01-20 11:25:02 +01:00
3d7eb44707 Cycles: Split device_opencl.cpp into multiple files for easier maintenance
There are no user-visible changes, just some internal restructuring.

Differential Revision: https://developer.blender.org/D2231
2017-01-20 11:25:02 +01:00
acd02c7848 [Windows/Cycles/Clang] Fix compilation error with clang-cl on windows 2017-01-20 11:25:02 +01:00
2482bb1d72 Cycles: implement partial constant folding for exponentiation.
This is also an important mathematical operation that can be folded
if it is known that one argument is a certain constant. For colors
the operation is provided as a Gamma node.

The SVM Gamma node needs a small fix to make it follow the 0 ^ 0 == 1
rule, same as the Power node, or the Gamma node itself in OSL mode.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2263
2017-01-20 11:25:01 +01:00
7ef3dfef6e Cycles: Cleanup, indentation 2017-01-20 11:25:01 +01:00
e716f10ba9 Cycles: Use correct light sampling PDF for MIS calculation with Branched Path Tracing
The light sampling functions calculate light sampling PDF for the case that the light has been randomly selected out of all lights.
However, since BPT handles lamps and meshlights separately, this isn't the case. So, to avoid a wrong result, the code just included the 0.5 factor in the throughput.

In theory, however, the correction should be made to the sampling probability, which needs to be doubled. Now, for the regular calculation, that's no real difference since the throughput is divided by the pdf.
However, it does matter for the MIS calculation - it's unbiased both ways, but including the factor in the PDF instead of the throughput should give slightly better results.

Reviewers: sergey, brecht, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2258
2017-01-20 11:25:01 +01:00
e04cc46b83 Cycles: Cleanup, whitespace 2017-01-20 11:25:01 +01:00
35346dc8e7 Cycles: Make code more uniform across two versions of shadow_blocked()
Just to make it easier to research ways of possible code de-duplication.
2017-01-20 11:25:01 +01:00
3f4bac1fe1 Cycles: Remove out of date comment 2017-01-20 11:25:01 +01:00
a27dd4bf85 Cycles: Make regular bvh traversal functions close to each other 2017-01-20 11:25:00 +01:00
2f2849fca8 Cycles: Re-group ifdef so we check for particular feature only once 2017-01-20 11:25:00 +01:00
1b9ea14782 Cycles: Avoid conversion from bool to uint 2017-01-20 11:25:00 +01:00
518f88efaa Cycles: Cleanup code style in split kernel 2017-01-20 11:25:00 +01:00
3cc7567607 Cycles: More tweaks to make specialized BVH traversal matching 2017-01-20 11:25:00 +01:00
a9b92fc29b Cycles: Avoid redundant intersection pre-calculation 2017-01-20 11:25:00 +01:00
c526932b31 Cycles: Cleanup, sync some comments across different traversal 2017-01-20 11:24:59 +01:00
85225c56b5 Cycles: Cleanup, always use parenthesis
Makes it simpler to compare different traversal algorithms.
2017-01-20 11:24:59 +01:00
92e70d7d8f Revert "Cycles: Tweak empty boundbox children"
This reverts commit ecbfa31caa.

Original commit broke logic in nodes re-fitting. That area can
access non-existing children momentarely. Not sure what would
be best solution here, for now simply reverting the change/
2017-01-20 11:24:59 +01:00
9c15fad5c5 Cycles: Deduplicate light pass code 2017-01-20 11:24:59 +01:00
9f4fe1df8d Cycles: Stop lamp sampling if the lamp isn't visible
Both spot and area light have large areas where they're not visible.
Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated.
In the case of the area light, the solid angle sampling can also be skipped.

In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec.

Reviewers: brecht, sergey, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2216
2017-01-20 11:24:59 +01:00
f1fe4eb3d1 Cycles: Also support the constant emission speedup for mesh lights
Reviewers: brecht, sergey, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2220
2017-01-20 11:24:59 +01:00
da234142b8 Cycles: Implement threaded SVM nodes compilation
The title says it all actually. From tests with barber shop scene here
gives 2-3x speedup for shader compilation on my oldie i7 machine. The
gain is mainly due to textures metadata query from jpeg files (which
seems to requite de-compression before metadata can be read). But in
theory could give nice improvements for scenes with huge node trees
as well (i'm talking about node trees of complexity of fractal which
we had reports about in the past).

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: monio, Blendify

Differential Revision: https://developer.blender.org/D2215
2017-01-20 11:24:58 +01:00
78b472bfa9 Cycles: Tweak empty boundbox children
The idea here is to make assert failure to fail sooner on an incorrect
node address rather than later with stack overflow.
2017-01-20 11:24:58 +01:00
a1c8b3e886 Cycles: Fix compilation error after recent commits 2017-01-20 11:24:58 +01:00
ad0d00e551 Cycles: Use XDG's .cache folder for cached kernels
Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to
~/.cache/cycles/kernels. This has following benefits:

- Follows XDG specification more closely,
  not as if it's totally crucial or measurable by users, but still nice.

- Prevents unexpected sizes of config folder, makes disk space used in more
  predictable for users way.

- Allows to share kernels across multiple Blender versions,
  which makes it easier debugging at the times close to release.

- "Copy Previous Settings" operator will no longer be copying possibly
  gigabytes of cached kernels, which used to lead to really nast disk usage
  and annoying delays of copying settings.

- In the future we can have some smart logic to clear old unused cached
  kernels.

Currently only done for Linux and OSX. Windows still follows old "cache"
folder logic, but it's not really important for now because we don't
support kernel compilation on this platform yet.

Reviewers: dingto, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2197
2017-01-20 11:24:58 +01:00
c9adc55801 Cycles: Add overall timing log to SVNShaderManager 2017-01-20 11:24:58 +01:00
6ba920dec1 Cycles: Deduplicate QBVH node packing across BVH build and refit 2017-01-20 11:24:58 +01:00
e439892b14 Cycles: Don't run full shader evaluation for constant emission lamps
Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful.
To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader.
Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary.

In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2193
2017-01-20 11:24:57 +01:00
c9dd9fceaa Cycles: Revert cleanup commit, will make it easier to cherry-pick 2017-01-20 11:02:20 +01:00
d159161155 retain existing creases, added inner crease and interpolate edge data with carve now 2017-01-08 14:31:01 +01:00
0bc63068ce crash fix for particle grid emission, do not allow to re-distribute particles there... 2017-01-05 01:39:28 +01:00
32e56f5d55 fix when using inner vertexgroup, weights of other vgroups on the same mesh were deleted by accident then 2017-01-03 00:12:18 +01:00
039be9e3c9 fracture modifier RNA refactor, outsourced FM RNA code and python API code to separate files 2016-12-31 00:33:57 +01:00
cde4150d7b fix for crash with physical rough edges (via addon)
caused by not checking whether objects in rigidbody group are rigidbodies, actually.
2016-12-30 17:10:25 +01:00
cbdb75682d let weights fade out at breaking locations with dynamic fracture 2016-12-23 20:25:00 +01:00
809d1aa1e0 transfer all speeds with dynamic fracture now, not only those above the sleep threshold 2016-12-23 20:24:08 +01:00
4916e0b79b particles, only suppress unborn particles when density vgroup is empty / has zero weight 2016-12-23 20:23:28 +01:00
f16d7f481f fix for external FM mode, take object locations into account as centroids for physics shapes, too 2016-12-22 03:05:34 +01:00
420ea4423e particle system: allow changing vgroups over time, suppress emission on empty assigned density vgroups 2016-12-22 00:31:42 +01:00
229688fee1 fix attempt for avoiding unintentional dissolve of all constraints in dynamic fracture 2016-12-22 00:25:24 +01:00
90d644fca4 fix : inner vertexgroups created with fractal boolean now too 2016-12-22 00:24:32 +01:00
751d2354c2 crash fix with FM and forcefields 2016-12-19 22:34:49 +01:00
41ae74df12 added some random rotation for fast bisect, to reduce parallel cuts 2016-12-16 00:48:30 +01:00
025aae4413 support for keeping edge data in fracture modifier (like sharp edges) 2016-12-16 00:15:12 +01:00
a5047171b9 inter-objects constraint objects can now determine which shards (closest) will be connected to the other object 2016-12-15 18:34:50 +01:00
ae9d247ea5 small fix for compounds, new collision suppression is disabled for them now
it caused wrong behavior - one shard always fell off unintendedly.
2016-12-15 00:30:40 +01:00
e5fc4218c7 fix for constraint loop detection (meshislands indirectly connected by a loop should get the same constraint index now) 2016-12-14 01:40:05 +01:00
2984406082 limit the collision check to objects which are actually constrained (whether disabled or not)
additionally take value of "disable collisions flag" into account, omit check if constrainted objects shall collide
2016-12-14 00:27:47 +01:00
f39585c387 hrm forgot something in last commit 2016-12-13 23:49:04 +01:00
a0d52d8e02 further attempt to suppress "unnecessary" collisions when constraints are intact 2016-12-13 23:46:12 +01:00
be4bd5ee69 optimization attempt to suppress collisions among partially constrained objects 2016-12-13 17:10:10 +01:00
d74d156c96 fix for rotational and splinter (with splitshards) issues in dynamic fracture 2016-12-13 11:25:11 +01:00
ef78283dd3 fix attempt for getting better fractal details, using bbox center and a smaller fractal plane now 2016-12-12 22:11:27 +01:00
c01dc55212 crash fix for having less shards than connections in connected fractured objects 2016-12-12 22:08:52 +01:00
3d7b6b6b34 crash fix attempt for connected fm objects 2016-12-12 20:43:36 +01:00
30fc776a68 improvements for inter-object constraints and fix for dissolve constraint when not kinematic (needs to be triggered still) 2016-12-12 14:24:04 +01:00
88fc1dd846 first attempt of inter-object constraints with fracture modifier, via regular constraint / connect operator 2016-12-12 00:26:25 +01:00
0749338492 added new trigger settings: propagate trigger, dynamic trigger and constraint dissolve
propagate trigger allows to propagate impulses across different FM objects, dynamic trigger can start a dynamic fracture independent from force, and constraint dissolve means that all constraints of activated shards will be disabled immediately
2016-12-11 19:44:01 +01:00
10d2c861dd fix for constraint calculation, transform of meshisland centroid was calculated incorrectly 2016-12-07 22:53:59 +01:00
069be54c87 speed optimization for fractal boolean, about 10x (note, Inner UV might not work with fractal still)
before there was a regression, 10 shards with default settings ~ 7 secs, now 100 in same time (left uv boxpacking out)
2016-12-06 23:30:18 +01:00
da2e66e106 small typo fix for mousebased fracture, used wrong index variable name 2016-12-01 23:50:58 +01:00
4777b17ec5 fix for physics visualization in FM, strings for constraint identifiers were not displayed properly under windows 2016-12-01 11:32:02 +01:00
2b25fe3e1c fix for possibly different object / shard order after loading a baked simulation 2016-11-28 22:45:49 +01:00
77599a6be0 fix for crash of loading files with split shards or island detection in fracture 2016-11-28 00:52:46 +01:00
1eabe30d34 stability fix for dynamic fractal, use triangulated cutter planes now and ensure they go through the shard's centroid 2016-11-26 11:47:10 +01:00
672c7d72c2 fixes / cleanup after static analysis of code which showed some potential issues 2016-11-25 21:00:33 +01:00
5148fd7f14 typo fix 2016-11-25 19:04:08 +01:00
8dfff7d339 partial crash fix for dynamic fractal fracture, can still crash in carve and bullet (todo) 2016-11-25 18:19:27 +01:00
509ffe1002 fix for missing omp condition evaluation (should work for boolean now only, because it causes errors with other algorithms) 2016-11-24 19:42:47 +01:00
b472f86804 bugfix / performance fix and new option "constrained collison"
bugfix: switching from kinematic to simulated should work now, performance improvements with dynamic fracture,
new option just exposes the disable collision flag to FM (works inverted here, enable it to let constrained objects collide, disable for default behavior)
2016-11-20 16:35:24 +01:00
ed840c8efb fix, let the FM shards respond to animated gravity in scene 2016-11-07 21:26:59 +01:00
f5da9bc306 corrected centroid calculation by using exact center of mass centroid 2016-11-07 18:10:57 +01:00
d7651d65de fix for crash when appending node groups if Fracture Modifier is active and frame > 1 2016-11-02 20:40:31 +01:00
2d1c068048 argh, missed some default setting for FM for grease pencil edge mode, before this fix no fracture at all was performed, and added bmesh tool flag for grease pencil fracture, too 2016-11-02 19:44:14 +01:00
b674ffb6da Merge remote-tracking branch 'refs/remotes/origin/blender-v2.78-release' into fracture_modifier
Conflicts:
	source/blender/makesrna/intern/rna_modifier.c
2016-10-26 19:30:29 +02:00
e8299c8100 Cycles: Don't use guarded vector for statically initialized data
This will confuse hell of a guarded allocators because it is possible
to have allocation happened prior to Blender's guarded allocator is
fully initialized.

This was causing crashes and assert failures when running blender
with fully guarded memory allocator.
2016-10-24 14:20:27 +02:00
21bf863934 Cycles: Fix shadowing variable which also causes use of uninitialized variable
Was causing wrong aperture for panorama cameras.

Seems to be a regression in 371d357.
2016-10-24 14:05:55 +02:00
0b734f0b59 Fix: Grease Pencil palettes were missing a RNA path callback 2016-10-24 13:51:57 +02:00
759b5fb2a6 Fix Cycles address space OpenCL error after recent fix. 2016-10-24 13:46:45 +02:00
f0adb875cf Cycles: Fix static initialization order fiasco
Initialization order of global stats and node types was not strictly
defined and it was possible to have node types initialized first and
stats after that. This will zero out memory which was allocated from
the statistics causing assert failure when de-initializing node types.
2016-10-24 13:43:55 +02:00
f55221e0a1 Cycles: Fix uninitialized variable from the previous commit 2016-10-24 12:55:05 +02:00
59689bed7b Blender 2.78: Point submodules to a new hash 2016-10-24 12:40:14 +02:00
20e54c99d2 Cycles: Remove explicit std:: from types where possible
We have our own abstraction level on top of the STL's implementation.
This commit will guarantee our tweaks are used for all cases.
2016-10-24 12:39:15 +02:00
faaf033d36 Blender 2.78: Port style cleanup from Cycles
Kinda nice to have official release code to be really clean.
2016-10-24 12:38:33 +02:00
66ed7d7566 Fix T49818: Crash when rendering with motion blur
It was possible to have non-initialized unaligned BVH split
to be used when regular BVH split SAH was inf. Now we ensure
that unaligned splitter is only used when it's really initialized.

It's a regression and should be in 2.78a.
2016-10-24 12:34:02 +02:00
a80104fb31 Cycles: Cleanup, spaces 2016-10-24 12:34:02 +02:00
452d43b1c8 Fix T49827L Crash linking material while in Material viewport shading mode
Material linking might and does change the way how drawObject is calculated
but does not tag drawObject for recalculation in any way.

Now use dependency graph to tag draw object for reclaculation. Currently do
this using OB_RECALC_DATA taq since tagging is not very granular yet. In the
future we can introduce ore granular tagging in the new dependency graph
easily.

Simple and safe for 2.78a.
2016-10-24 12:34:02 +02:00
602b2dbd8c Fix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.
Typo, spoted by Coverity scan.

To be backported to 2.78a.
2016-10-24 12:34:01 +02:00
4c94e327a2 Fix T49750: Cycles wrong ray differentials for perspective and stereo cameras. 2016-10-24 12:34:01 +02:00
7b311c07ee Fix T49656: Crash when starting playback while using JACK audio with A/V sync
When ED_screen_animation_play is called from wm_event_do_handlers,ScrArea *sa = CTX_wm_area(C); is NULL in ED_screen_animation_timer.
Informing the audio system in CTX_data_main_set, that a new Main has been set.
2016-10-24 12:34:01 +02:00
1bcddea00e Fix T49764: Audio strips crackle when animating the volume
- Implemented linear interpolation for volume changes in the software
mixer.
- Using this in the software device.
2016-10-24 12:34:01 +02:00
e1cf002ee6 Fix T49789: Compositor mix node interpolation bug 2016-10-24 12:34:01 +02:00
dac53963a8 Fix T49797: Exception from scene update handler might leak external engine descriptors
This was causing memory leaks in Cycles.

Some more detailed information in the comment in the code.

Seems to be safe and nice enough for 2.78a.
2016-10-24 12:34:01 +02:00
53cbda0f7f Fix T49793 : Fix enabling SSE2 globally for msvc.
When feeding msvc both /arch:sse2 and /arch:sse it's not smart enough to pick the best option, just goes with the last option
2016-10-24 12:34:01 +02:00
Scott Wu
cb44a3e5d7 Cycles: use near clipping distance in panorama camera.
Reviewed By: sergey, brecht, dfelinto

Differential Revision: https://developer.blender.org/D1952
2016-10-24 12:34:01 +02:00
07c886e976 Blender 2.78a release: Use proper "a' on the splash 2016-10-19 16:56:44 +02:00
2e77ad7f99 Blender 2.78a release: Update addons submodule hash 2016-10-19 15:16:04 +02:00
3da4560143 Fix T49775: Appending data with internal dependency cycles prevents correct clearing of linked data-blocks.
This is not a simple fix, but imho still needs to be backported to 2.78a...
2016-10-19 14:53:52 +02:00
4d043db0db [windows] Create A Blender Desktop Shortcut in the msi installer , fixes T49522 2016-10-19 14:27:30 +02:00
44372d6441 Fix T49722: Appending Bug (Groups).
One day we'll have to reconsider why some many 'real' ID usages are not
refcounting... :(

To be backported to 2.78a.
2016-10-19 14:27:28 +02:00
50751d62e9 Fix T49738: Hair Add Brush doesn't work
the issue was caused by wrong default value for brush particle count
which was clamped on display from 0 to 1. This is technically a regression
but how to port this to 2.78a?
2016-10-19 14:27:08 +02:00
a6220f459b Fix T49746: crash loading user preferences with missing operators. 2016-10-19 14:26:42 +02:00
Chase Willden
8030c4832a Fix assert in the wrong place, should be moved earlier to do anything.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2304
2016-10-19 14:26:42 +02:00
Julian Eisel
00d08c909d Fix missing outliner redraw when adding VSE strip
Needed for outliner "Sequence" display mode.
2016-10-19 14:26:42 +02:00
d1f5c0fe48 Fix T49571: 2d stabilize keys not visible in the Graph Editor and Dope Sheet 2016-10-19 14:26:42 +02:00
dacb53ff71 Fix T49601: Material menu length problem.
Regression from rB69b66d549bcc8, was supposed to be non-functionnal
change, so not sure why search menu was reduced here? For now, restore
to 2.77 width.
2016-10-19 14:26:42 +02:00
e6d9b15ab3 Fix T49646: Switching from large to small image can get stuck zoom at max zoom distance.
Allow for zooming in at max zoom distance.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D2291
2016-10-19 14:26:42 +02:00
3fb0c1b8e7 Fix T49534: 2.78 Wrong texture scaling in material viewport
Seems to be a bug in original implementation of a830280: code was always
using tangent space instead of UV map because it had the same name. Now
prefer UVMap over tangent because this is how Cycles works. At least it's
closer to.

Not sure it the save+reload issue is still relevant after this fix, that
needs to be double-checked.

Thanks @dfelinto for looking into the report and simplifying the case.

Should be included into 2.78a.
2016-10-19 14:26:42 +02:00
fd9aa06440 Fix OLD pre-git links in the API, add missing factory-startup option to blender executions.
Reviewers: mont29

Reviewed By: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision: https://developer.blender.org/D2290
2016-10-19 14:26:41 +02:00
03f935961a Fix T49635: column_flow Layout - last column is too small.
Column flow layout was abuse ui_item_fit in a weird way, which was
broken for last column items.

Now rather use own code, which basically spread available width as
equally as possible between all columns.
2016-10-19 14:26:41 +02:00
15134cf227 Cleanup: UI layout: remove unsed and confusing parameter.
Things are complicated enough like that, no need to add useless noise on
top of it!
2016-10-19 14:26:41 +02:00
106ff0df99 Normal edit modifier: Fix relation builder for the new dependency graph 2016-10-19 14:26:41 +02:00
7ab972fd63 Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.
This code is confusing, such dirty details should not sneak out of
particles' own private code. :(
2016-10-19 14:26:41 +02:00
97bba76e8c Fix T49631: radial control operators not using DPI properly. 2016-10-19 14:26:41 +02:00
10598c084e Fix T49640: Cycles constant folding incorrect for texture coordinates. 2016-10-19 14:26:41 +02:00
c9b5253cfc Fix T49636: material draw mode crash with displacement and missing group input node. 2016-10-19 14:26:41 +02:00
2002334813 Cycles: Get rid of ifdef-ed noinline policy 2016-10-19 14:26:41 +02:00
b42e4c3c40 Cycles: Fix use of uninitialized variable in SSS
When ray hits curve segment with SSS shader it was possible to have
uninitialized hit_P variable used for sampling.

Seems that was a reason of our headache of difference between AVX2
and SSE4 render results here, so now we can revert all the nasty
ifdef-ed inline policies.
2016-10-19 14:26:41 +02:00
9d4e3b0e63 Fix T49622: Grease pencil not rendering out of VSE 2016-10-19 14:26:40 +02:00
4736664da6 Fix T49502: file browser on OS X not highlighting external drives. 2016-10-19 14:26:40 +02:00
8ebc7565e7 Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value
Technically it is a regression in behavior and should be 2.78a.
2016-10-19 14:26:40 +02:00
012bbce453 Make console message more clear for --scene argument 2016-10-19 14:26:40 +02:00
be254b52dc Fix T49623: Immediately crash trying to render attached file in Cycles
Original fix in this area was not really complete (but was the safest at
the release time). Now all the crazy configurations of slots going out
of sync should be handled here.
2016-10-19 14:26:40 +02:00
cdedd082f3 Fix viewport camera gets out of sync in certain cases
It was possible to have two viewports opened and start using Ctrl-0
to make different objects an active camera for the viewport. This
worked fine for viewports which had decoupled camera from the scene,
but if viewport was locked to scene camera it was possible to run into
situation when two different viewports are locked to scene camera but
had different v3d->camera pointers.
2016-10-19 14:26:40 +02:00
880ebfff58 Fix T49609: Point density textures: vertex colors are not properly averaged in BI
Nice to have in 2.78a, though not a regression.
2016-10-19 14:26:40 +02:00
29fdcbbf9f Fix T49608: runtime-only particle's boid->ground Object pointer was left dangling to invalid value in read code... 2016-10-19 14:26:40 +02:00
cb6c43b61c Fix a few compile errors with C++11 on macOS. 2016-10-19 14:26:40 +02:00
4dbcbf5ba9 BLI_task: fix case were some pool could work in more threads than allowed.
We were checking for number of tasks from given pool already active, and
then atomically increasing it if allowed - this is not correct, number
could be increased by another thread between check and atomic op!

Atomic primitives are nice, but you must be very careful with *how* you
use them... Now we atomically increase counter, check result, and if we
end up over max value, abort and decrease counter again.

Spotted by Sergey, thanks!
2016-10-19 14:26:40 +02:00
117329ae6d Cycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix 2016-10-19 14:26:39 +02:00
6601b4cbdc Datablock management: remove 'proxy_from' pointer from 'is ID used' checks.
Pretty much same reason as for the 'from' pointer of shapekeys - runtime
data creating loops and 'ghost' dependencies between datablocks.

We need to handle them in cases like remapping, but whall not take them
into account to check dependencies between datablocks... :/
2016-10-19 14:26:39 +02:00
02eec191fb Fix T49595: bpy - negative skin_vertices radius crashes Blender
This is unsigned value (negative radius does not have much sense anyway!).
2016-10-19 14:26:39 +02:00
Julian Eisel
2525c4e129 Fix wrong separator line width after drawing vec icon
Was visible in Dynamic Context Menu add-on.
2016-10-19 14:26:39 +02:00
0d1bc587fa Fix T49523: very slow normal map tangent computation for rendering in 2.78. 2016-10-19 14:26:39 +02:00
e65e5045de Fix T49501: Animations imported via alembic render with wrong or no motion blur 2016-10-19 14:26:39 +02:00
b9c996e16b [msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on it's own. 2016-10-19 14:26:39 +02:00
96ac3bd4bf [msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can now be properly build with 8.0 2016-10-19 14:26:39 +02:00
1d36092627 Cleanup: Update links to online py API doc, and remove old commented stuff. 2016-10-19 14:26:39 +02:00
b8194a52a0 Fix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews
New recursive iteration over IDs in BKE_library_foreach_ID_link() was
broken by the infamous nodetree case. We cannot really recusively call
this function in that case, so better to deffer handling of
non-datablock NodeTrees as if real IDs here.

Also fixed initial ID not being stored as handled, in rare cases this
could also lead to infinite looping.

To be backported to 2.78a.
2016-10-19 14:26:39 +02:00
f87a81afb4 Cycles CUDA: make CUDA 8.0 the officially supported version for all platforms. 2016-10-19 14:26:39 +02:00
fd0dea585c Fix Cycles CUDA performance on CUDA 8.0.
Mostly this is making inlining match CUDA 7.5 in a few performance critical
places. The end result is that performance is now better than before, possibly
due to less register spilling or other CUDA 8.0 compiler improvements.

On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory
usage is reduced a little too.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2269
2016-10-19 14:26:38 +02:00
Julian Eisel
4d14bd10c0 Fix memory leak caused by unknown opeartor of keymap item 2016-10-19 14:26:38 +02:00
4640bf890e Fix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.
We *always* want to increase mat user count when from Object (and not
Data), because in that case we are moving mat from object to temp
generated mesh, material can never be 'borrowed' in that case.

To be backported to 2.78a
2016-10-19 14:26:38 +02:00
Julian Eisel
e145990fdd Fix missing operator-type registration
Removed in a7dbc0704f, but only should've removed default keymap entry.
2016-10-19 14:26:38 +02:00
Julian Eisel
11120c2981 Fix T49506: Remove unused File Browser theme settings
If I didn't miss anything these are indeed not used. Old themes should still work (will only print info on redundant theme defines into console), but updated non-contrib themes already.
2016-10-19 14:26:38 +02:00
07508c8b93 Fix missing new eyedropper keymap entry in keyconfig_utils.py
Missing from rBe9bcdcdbbd91d9.
2016-10-19 14:26:38 +02:00
e96e66b05b Fix T49520: broken vertex colors in the game engine. 2016-10-19 14:26:38 +02:00
52e601f0c6 [Fix unreported bug] Snap align with normal was not working in derivade mesh
The `use_snapp_align_rotation` option was using only the first vertex
2016-10-19 14:26:38 +02:00
01b71b564b [msvc] make.bat - Fix:msbuild platform wasn't set when the architecture was auto detected. 2016-10-19 14:26:38 +02:00
9fea90ba36 Fix T49502: file browser on OS X not highlighting system folders and bookmarks. 2016-10-19 14:26:38 +02:00
4a8c43d756 [MSVC] Make.bat updates.
- Explicitly specify the platform for msbuild, to facilitate builds with just the Visual C++ Build Tools installed.
- When vs2013 is not found, try looking for 2015 as a fallback
- Clear up any batch variables that might have been set from previous runs
2016-10-19 14:26:37 +02:00
4da266f48c Fix wrong Cycles GLSL pointiness, still not supported but should be neutral 0.5. 2016-10-19 14:26:37 +02:00
90e1adabba Fix MSVC compiler warning due to using */* to start comment. 2016-10-19 14:26:37 +02:00
02605b72f1 CUEW: Use latest upstream version
Fixes typo in README :)

Thanks to @jesterKing!
2016-10-19 14:26:37 +02:00
7b43307508 Fix T49489: Pose marker in camera action + marker bound to camera -> crash.
'camera' Object pointer of TimeMarkers is a 'temp' hack since Durian project...
Would need to be either made definitive now, or removed/reworked/whatever.

But since we intend to use that object pointer for other needs, and current code
could lead to crashing .blend files, for now let's fix that mess (was missing
some bits in read code, and also totally ignored in libquery code).

Should be safe for 2.78a.
2016-10-19 14:26:37 +02:00
f978deddf8 UPBGE: Fix crash when calling shade_light texture when mtex has no tex. 2016-10-19 14:26:37 +02:00
dadd017d06 Cycles: Support earlier tile rendering termination on cancel
It will discard the whole tile, but it's still kind of more friendly than
fully locked interface (sort of) for until tile is fully sampled.

Sorry if it causes PITA to merge for the opencl split work, but this issue
bothering a lot when collecting benchmarks.
2016-10-19 14:26:37 +02:00
08d21ff582 Cycles: Fix typo in shader cancel routines 2016-10-19 14:26:37 +02:00
1733141db8 Adopt referenced scene in the context when evaluating sequences within a Scene Strip
This change makes it so that when the sequences within a Scene strip are
evaluated, they use the Scene that they come from as the context as opposed
the Scene that the Scene strip is in. This is necessary, for example, in the
case of the MulticamSelector where it needs to reference strips in the original
Scene as opposed to the Scene where the Scene strip is located.

Patch by @Matt (HyperSphere), thanks!
2016-10-19 14:26:37 +02:00
0df78d11e0 Cycles: Improve OpenCL line information handling
Previously it was falling back to just a path after #include
statement was finished. Now we fall back to a proper current
file name after dealing with the preprocessor statement.
2016-10-19 14:26:37 +02:00
acaa046e5e Update source tgz builder script
Was broken since splitting BKE_blender_version from BKE_blender.
2016-10-19 14:26:36 +02:00
7466603910 [MSVC] make.bat updates.
- The build folder name used to be depended on the order of the parameters, this is now normalized to
"build_windows_[Release/Full/Lite/Headless/Cycles/Bpy]_[x86/x64]_vc[12/14]_[Release/Debug]" regardless of the order of the parameters.

-Use CUDA8 for all kernels when building the release convenience target with visual studio 2015
2016-10-19 14:26:36 +02:00
08e4846540 Fix T49478: triangulate of face hangs Blender.
Another case of float imprecision leading to endless loop. INcreasing a bit 'noise threashold' seems to work OK.

Not a regression, but might be nice to have in 2.78a.
2016-10-19 14:26:36 +02:00
6c2f93aa7a Cycles: Fix compilation error with minimal feature set 2016-10-19 14:26:36 +02:00
949b23d29b Fix T49471: Vertex Connect randomly broken.
Not sure where this comes from, but code was converting BMEdge* to BMVert* to check oflags,
i.e. not accessing correct memory.

Regression, to be backported to 2.78a.
2016-10-19 14:26:36 +02:00
8aa04160ba Fix T49460: Particle group instance 'Use Count' value gets reset on file-load.
Regression caused rBbcc863993ad, write code was assuming dw->ob was always valid,
wich is no more the case right after reading file e.g.

Another good example of how bad it is to use 'hidden' dependencies between datablocks. :(
And another fix to be backported to 2.78a. :(((
2016-10-19 14:26:36 +02:00
d78a4b0c62 Fix T49466: Stupid typo in logicbricks new copy code from rB776a8548f03a
Moved that code forth and back a few times while creating rB776a8548f03a fix,
ended up forgetting to update it correctly for function where it layed down in the end.

Last-minute fixes are never a good thing... Now we already have real reason for 2.78 'a' release :(
2016-10-19 14:26:36 +02:00
a05f9bef3f Fix T49423: Data Preview of group containing only group instances is empty.
Code was not getting correct boundbox in some cases (group only instancing other groups e.g.), now
compute our own bbox in those cases.

Based on patch by @lichtwerk, but extended the fix to include linked datablocks in some cases
(linked objects in local groups, linked objects in local scene, etc.), this was also broken in existing code.

Reviewers: mont29

Subscribers: duarteframos

Differential Revision: https://developer.blender.org/D2257
2016-10-19 14:26:36 +02:00
a88af3e576 Fix T49461: Dynamic paint wetmap flickers.
Regression from rBa4a968f, we would adjust current point's wetness without actually protecting it
in new multi-threaded context, leading to concurrent access mess.

Now delay applying wetness reduction to current point to end of function, allows us to avoid having
to lock current point twice together with neighbor one (and reducing spinlock awainting too).

To be backported to 2.78a.
2016-10-19 14:26:36 +02:00
ff27b58b4c Fix T49464: Data Transfer modifier slows down redraw of window.
Never call function that might recompute a DM in an RNA itemf callback (or any UI-related func in general)!
There was an XXX comment asking if this was OK - well, no, it was not. :P

Could be ported back to some 2.78 flavour should we need it.
2016-10-19 14:26:35 +02:00
3bf9cbe7a2 Fix export image generated by export UV layout
Was only happening with new dependency graph.

The issue here is that scene's depsgraph layers will be 0 unless
it was ever visible. Worked around by checking for 0 layer in the
update_tagged of new depsgraph. This currently kind of following
logic of visible_layers, but is weak.

Committing so studio is unlocked here, will re-evaluate this layer.
2016-10-19 14:26:35 +02:00
cb9d010421 Fix Scene datablocks being created with a real user while never having any real datablock user.
Now using new system dedicated to that kind of cases, id_ensure_real_user(), instead.
That way, usercount of Scenes is handled correctly at deletion time.

Reported by @sergey over IRC, thanks.
2016-10-19 14:26:35 +02:00
c1205fd5ec [Windows/make.bat] Clean only after all parameters have been processed so the full path is known, and require a convenience target to be set. Also added a helpful error message if any of the required data is not available. 2016-10-19 14:26:35 +02:00
c9361c6935 Cycles: Cleanup file headers
Some of the files were wrongly attributing code to some other
organizations and in few places proper attribution was missing.

This is mainly either a copy-paste error (when new file was
created from an existing one and header wasn't updated) or due
to some refactor which split non-original-BF code with purely
BF code.

Should solve some confusion around.
2016-10-19 14:26:35 +02:00
711421a90f Cycles: Move BVH constants to an own files, so they are easily re-usable 2016-10-19 14:26:35 +02:00
0972786fa4 Buildbot: Another attempt to have OSX builder fixed 2016-10-19 14:26:35 +02:00
61ae5f1b23 Buildbot: Temporary disable CUBIN compilation 2016-10-19 14:26:35 +02:00
d882d4e91d Buildbot: Attempt to use proper Clang for CUDA binaries 2016-10-19 14:26:35 +02:00
bd4185b03b Buildbot: Disable QuickTime for the time being
Buildbot machine was updated to the new SDK which seems to have
QTKit removed.

For until we've installed older SDK or ported our code to a new
AVFramework disabling QuickTime.
2016-10-19 14:26:35 +02:00
Julian Eisel
483b4f0567 Fix missing properties editor update when changing 3D View camera
Actually two errors here:
* Properties editor wasn't refreshing on (NC_SCENE | ND_RENDER_OPTIONS) notifiers
* Was using notifier info bits wrongly, needs to send two separate notifiers

Decided to remove ND_RENDER_OPTIONS rather than adding properties editor scene context refresh for it, this is more than a render option change.
2016-10-19 14:26:34 +02:00
bdbf608941 OpenGL render: Skip GP passes if viewport has GP visibility disabled 2016-10-19 14:26:34 +02:00
b148eda5a7 dynamic fracture, divide force by mass to get higher probability of secondary fractures 2016-10-13 23:22:28 +02:00
bf3bb95097 added dynamic minimum shard size as option 2016-10-13 21:51:35 +02:00
eb45c12ef0 dynamic fracture, fix for passive shards... dynamic cache was not used at all for it 2016-10-13 20:10:52 +02:00
6276e3d174 dynamic fracture, added a third new constraint option "none" 2016-10-13 00:52:23 +02:00
41481a1be6 dynamic frac fixes (better activation, ability to merge cluster count and group) 2016-10-12 22:32:47 +02:00
a3704e9b6b crash fixes for dynamic split, also attempt to get rotations correct with limit impact 2016-10-12 17:25:13 +02:00
8e166a5926 fix, break anyway if there are no constraints at all 2016-10-12 12:13:37 +02:00
d22d1bae7c added constraint dynamic percentage and dynamic constraint building option 2016-10-12 12:06:21 +02:00
f8a043a106 another fix attempt for rotational anomalies 2016-10-12 01:23:07 +02:00
0a15defd44 partial fix attempt for incorrect rotation issue with dynafrac 2016-10-11 21:40:57 +02:00
d735ec0a2e minor fix for dynamic fracture, there was an off by 1 error which caused strange behavior on single shards 2016-10-11 01:22:34 +02:00
0b0fe66838 vary the seed when using presplit in dynafrac and fix for error when applying split to a single island 2016-10-10 23:24:16 +02:00
c9446653e9 improvement of pre-split dynamic fracture 2016-10-10 18:56:47 +02:00
d6574abb83 added split shards to island support for dynamic fracture (works only good if there are multiple islands) 2016-10-09 13:36:50 +02:00
5d6a36eb59 dynamic fracture, further minor transform tweak 2016-10-08 15:27:00 +02:00
794f85516c another minor tweak for transform issue 2016-10-08 00:22:59 +02:00
b5834d39ac fix for dynafrac, disallow passive objects as triggers again (to avoid the ground being a trigger) 2016-10-07 22:45:31 +02:00
5ce8f72a12 further attempt to fix / get the transform issues under control with dynafrac 2016-10-07 22:35:09 +02:00
81a67d8e98 fixed some more transform issues with dynamic fracture, added openmp for loop for boolean fracturing 2016-10-06 22:20:58 +02:00
5a46ad276c dynamic fracture, attempt to better control the higher level fractures via threshold 2016-10-06 17:49:32 +02:00
7c4489be8f partial fix for dynamic fracture transform issues, impact points might be calculated incorrectly still. 2016-10-05 22:16:18 +02:00
05c64b674a dynamic fracture, fix for texture propagation and autohide on secondary fractures 2016-10-05 17:29:22 +02:00
f0058e4980 Fix elbeem omp for msvc 2016-10-04 00:03:07 +02:00
8bd2323829 further tweaks for dynamic fracture 2016-10-03 15:11:24 +02:00
cc00da895e dynamic fracture: added back constraint support for it 2016-10-03 01:21:23 +02:00
63f90d1099 dynamic fracture, crash fix for autohide 2016-10-02 18:24:00 +02:00
030bb2f7e0 8% faster fluidbaking with gcc and 30% faster with clang 2016-10-02 17:58:40 +02:00
ed54923768 attempt to keep shards not affected by fracture kinematic if the object is kinematic / triggered 2016-10-02 13:51:47 +02:00
009dacd317 fixed some warning issues (const vs non const, wrong variable type in format string) 2016-10-01 18:06:52 +02:00
72f52c2dae backport of "fix Mac build for Xcode < 8" to FM branch
This was added to 2.78 release branch after the merge, so adding it here too.
2016-10-01 16:22:01 +02:00
723cb3c1ae added README 2016-10-01 14:31:28 +02:00
1f88e48d08 dynamic fracture can now react to multiple impacts on initial shard and 1st level shards 2016-10-01 14:25:27 +02:00
6b550a563e crash fix for direct text fracture (prefractured) -> bmesh use_toolflags set incorrectly 2016-09-28 22:52:10 +02:00
a6ebe080f7 windows compile fix 2016-09-28 12:47:22 +02:00
0b13b7adef fix Mac build for Xcode < 8
We need a long-term fix, but this will get 2.78 out the door.
2016-09-28 10:41:56 +02:00
192a18a99d added new bmesh boolean solver to fracture modifier as well 2016-09-28 00:01:28 +02:00
07e45ea86c merge compile fixes 2016-09-27 21:46:59 +02:00
23aabf5c81 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.78-release' into fracture_modifier
Conflicts:
	CMakeLists.txt
	build_files/build_environment/install_deps.sh
	build_files/cmake/macros.cmake
	doc/python_api/sphinx_doc_gen.sh
	intern/cycles/app/CMakeLists.txt
	intern/cycles/blender/addon/properties.py
	intern/cycles/blender/blender_sync.cpp
	intern/cycles/kernel/bvh/bvh.h
	intern/cycles/kernel/geom/geom_bvh_volume.h
	intern/cycles/kernel/geom/geom_bvh_volume_all.h
	intern/cycles/kernel/kernel_volume.h
	intern/cycles/kernel/kernels/opencl/kernel.cl
	intern/cycles/kernel/shaders/node_subsurface_scattering.osl
	intern/cycles/kernel/svm/svm_closure.h
	intern/cycles/util/util_vector.h
	release/datafiles/splash.png
	release/datafiles/splash_2x.png
	release/scripts/addons
	source/blender/blenfont/intern/blf_font.c
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenkernel/BKE_mesh_mapping.h
	source/blender/blenkernel/CMakeLists.txt
	source/blender/blenkernel/intern/blender.c
	source/blender/blenkernel/intern/image.c
	source/blender/blenkernel/intern/particle_distribute.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenkernel/intern/scene.c
	source/blender/blenkernel/intern/speaker.c
	source/blender/blenloader/intern/readfile.c
	source/blender/bmesh/intern/bmesh_core.c
	source/blender/bmesh/intern/bmesh_polygon.c
	source/blender/editors/gpencil/gpencil_brush.c
	source/blender/editors/gpencil/gpencil_ops.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/physics/particle_edit.c
	source/blender/editors/space_view3d/drawarmature.c
	source/blender/editors/space_view3d/drawvolume.c
	source/blender/editors/transform/transform_snap.c
	source/blender/gpu/shaders/gpu_shader_material.glsl
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesdna/intern/makesdna.c
	source/blender/makesrna/intern/rna_camera.c
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/makesrna/intern/rna_sculpt_paint.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_util.c
	source/blender/nodes/shader/nodes/node_shader_bump.c
	source/blender/nodes/shader/nodes/node_shader_fresnel.c
	source/blender/nodes/shader/nodes/node_shader_normal_map.c
	source/blender/render/intern/source/render_result.c
	source/blender/render/intern/source/render_texture.c
	source/blender/windowmanager/WM_api.h
	source/creator/CMakeLists.txt
2016-09-27 21:46:27 +02:00
4bb1e224ba Blender 2.78: Update submodule hashes 2016-09-26 14:42:18 +02:00
2c19ddf4a6 Cycles: Fix T49411: Multiscatter GGX with zero roughness when Filter Glossy is enabled 2016-09-26 10:51:51 +02:00
6d483e20e0 Fix T49310: incorrect Cycles standalone normals with negative scale. 2016-09-26 10:51:51 +02:00
599e560a68 Cycles: Fix overflow caused by wrong size calculation in Mesh::add_undisplaced 2016-09-26 10:51:51 +02:00
daa1487425 Cycles: Prevent crash in special cases when object has less slots than mesh
This is something what was guaranteed in give_current_material(), just
copied some range checking logic from there.

Not sure what would be a proper fix here tho.
2016-09-26 10:51:51 +02:00
abc8810911 Cycles: Don't sum up memory usage of all devices together for the stats 2016-09-26 10:51:50 +02:00
5cb1251222 Fix T49417: Cycles crash - can't use 5 Gigabyte Tile EXR texture file
Was an integer overflow issue when calculating offsets.
2016-09-26 10:51:50 +02:00
c5558b3ccd Fix crash in own recent rB776a8548f03a049.
New ID may be null, have to check this too!

Reported by @panzergame over IRC, thanks.

To be ported to 2.78 as well.
2016-09-26 10:51:50 +02:00
94e91ca7e5 Fix T49430: append scene with gamelogic broken.
In fact, it was the whole remapping process that was broken in logic bricks area,
due to terrible design of links between those bricks...

Object copying was also broken in that case, fixed as well.

To be backported to 2.78.

Note that issue was actually probably there since ages, hidden behind dirty hacks
used in previous append code (though likely visible in some corner cases).

Listen kids: do not, never, ever, do what has been done for links between logic bricks. Never. Ever.
Even as pure runtime data it would have been bad, but as stored data...
2016-09-26 10:51:50 +02:00
4ed7fb581a Fix T49441: Grease Pencil - pie menu - brush name field crashes blender
Using context.active_gpencil_brush to access the active Grease Pencil brush
would result in a crash if trying to rename the brush, because the "ID" pointer
was not set.

To be backported to 2.78
2016-09-26 10:51:50 +02:00
08d14a86d4 Collada: Trying to get rid of some warning messages on linux 2016-09-26 10:51:50 +02:00
a5d8efe16c Collada: Trying to get rif of some warning messages on linux 2016-09-26 10:51:49 +02:00
01ed1de0d8 Fix: Collada Importer did not import the Blender Profile information correctly when multiple objects are bound to same armature. This caused Bone tails to be placed wrong. 2016-09-26 10:51:49 +02:00
a2e105186f some improvement for dynamic fracture, it now takes location and size of impact object into account with "Limit Impact" 2016-09-25 21:38:06 +02:00
35f81587b5 Fix T49427: Drivers of Shapekeys break when Append a group.
Optimization attempt with BKE_library_idtype_can_use_idtype() was not taking into account
the fact that drivers may link virtually against any datablock...

Has to be rethinked, but for after 2.78 release, this commit is safe to backport.
2016-09-22 16:52:10 +02:00
d32ae028ba Buildinfo: Improve behavior with detached HEAD
Try real hard to detect which branch we've detached from.
2016-09-22 15:02:52 +02:00
42f42cbfdc Fix T49425: Freestyle in viewport keeps updating over and over.
Regression caused by rBb27ba26, we would always tag datablocks to update in G.main,
ignoring given bmain, now always use this one instead.

To be backported to 2.78.
2016-09-22 15:02:32 +02:00
Julian Eisel
53ff09bc97 GPencil: Fix memory leak using stroke arrange OP 2016-09-22 15:02:25 +02:00
de311a0a15 Blender 2.78: Point locales to the latest branch 2016-09-22 12:37:35 +02:00
f3fe4e736f Cycles: Soft minimum for dice rates
Use 0.5 as a soft minimum for dice rates to help from setting them too
low. Lower values can still be set by typing in the value.
2016-09-22 12:33:32 +02:00
5ef46c1ef1 Cycles: Fix update of subdivision meshes when global dice rates change
When subdivision settings were moved from meshes to objects this was missed,
should work fine now.
2016-09-22 12:33:32 +02:00
7da7611c0b Cycles: Adaptive isolation
Idea here is to select the lowest isolation level that wont compromise quality.
By using the lowest level we save memory and processing time. This will also
help avoid precision issues that have been showing up from using the highest
level (T49179, T49257).

This is a pretty simple heuristic that gives ok results. There's more we could
do here, such as filtering for vertices/edges adjacent geometric features that
need isolation instead of checking them all, but the logic there could get a
bit involved.

There's potential for slight popping of edges during animation if the dice
rate is low, but I don't think this should be a problem since low dice rates
really shouldn't be used in animation anyways.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D2240
2016-09-22 12:33:32 +02:00
d14603021c Blender 2.78: Point addons to an updated branch 2016-09-22 11:14:48 +02:00
bca6aa47bc Blender 2.78: Move to release cycle 2016-09-22 11:13:58 +02:00
d63505e42e CMake: Fix copy-paste error 2016-09-22 11:07:37 +02:00
9836940d4d Bring blender_release.cmake uptodate with the changes from D2227 2016-09-22 11:07:37 +02:00
c6ab7c31a1 [windows] add some helpers to make.bat to facilitate making release builds.
New features:
1) Release target that checks for both cuda 7.5 and 8 with WITH_CYCLES_CUDA_BINARIES=ON and CYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 options set.
2) Option to switch between x86 and x64 builds, the default remains (auto detect the architecture) but can be overridden.
3) Option to switch between vs12(2013) and vs14(2015) default is 2013.

Reviewers: juicyfruit, sergey

Reviewed By: sergey

Tags: #platform:_windows

Differential Revision: https://developer.blender.org/D2180
2016-09-22 11:07:37 +02:00
22b39901e3 Fix non-finite normalization factor in certain cases 2016-09-22 11:07:37 +02:00
213e9aeb8c Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes
Reported by @loochmunz. I've also gone through checking for and fixing other places
where this was also occurring.


To be included in 2.78
2016-09-22 11:07:37 +02:00
9d976a4f7a GPencil D+W Pie: Don't show editing operators when not in editmode
These operators only operate on the selected strokes, but when not in editmode,
stroke vertices are not shown.

Safe for 2.78
2016-09-22 11:07:37 +02:00
83bbf57b5b regression fix for 1346482d23: The length of leaf bones should always be set to the length of the smallest bone. since the mentioned commit the importer did only recalculate the leaf bone length when the 'fix leaf bones' option was also enabled. 2016-09-22 11:07:36 +02:00
ea7d500b6d Fix T49386: Blender crashes when told to load an OCIO LUT that does not exist 2016-09-22 11:07:36 +02:00
0a97e63246 Fix T49375: align rotation with snap target isn't toggleable in edit mode.
Based on D2237, but fixed patch always hiding 'snap on self' button...

Should be safe for 2.78.
2016-09-22 11:07:36 +02:00
Martijn Berger
0247547b6b Lowercase includes for psapi.h and dbghelp.h windows includes.
This makes cross compilation a little less painful
2016-09-22 11:07:36 +02:00
1782263ef8 CacheFile: make sure SpinLock is destroyed when exiting Blender.
Missed in rB62b1cdd6.
2016-09-22 11:07:36 +02:00
c8c829360b Cycles: Fix typo that would sometimes result in subsurf modifier being disabled 2016-09-22 11:07:36 +02:00
750650c737 Fix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance 2016-09-22 11:07:36 +02:00
8e6aaa08c2 Fix T49384: crash in tangent space calculation with NaN mesh vertices. 2016-09-22 11:07:35 +02:00
fc2b8c9793 Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output 2016-09-22 11:07:35 +02:00
8909ff0e67 Fix filebrowser not getting back to valid dir in Release builds.
Stupid mistake wrapping path validation code inside a BLI_assert, which means it was
only called in Debug builds...

Found by Sergey, thanks.

Should be backported to 2.78.
2016-09-22 11:07:35 +02:00
7b748e9478 Fix crash in some cases when deleting particle systems.
Those 'never null' ID pointers are really a PITA to handle... luckily we don't have much of those around!

Found by Sybren, thanks.

Should be backported to 2.78.
2016-09-22 11:07:35 +02:00
4733544195 Fix Py's IDs user mapping: do not consider ShapeKeys' from here.
This is internal pointer helper for scene evaluation and tools, though exposed to bpy API,
it can give false 'dependency cycles' in bpy.data.user_map() results.

That's followup to rBe007552442634 really, both should be backported to 2.78
2016-09-22 11:07:35 +02:00
ca5f91951c Fix Py's IDs user mapping: do not consider proxy_from here.
This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway,
and can give false 'dependency cycles' in bpy.data.user_map() results.

Found by sybren in his Splode work.
2016-09-22 11:07:35 +02:00
0960d523a2 Fix T49179: Parts of mesh disappear with adaptive subdivision
Problem was zero length normal caused by a precision issue in patch evaluation.
This is somewhat of a quick fix, but is better than allowing possible NaNs to
occur and cause problems elsewhere.
2016-09-22 11:07:35 +02:00
91966eeefa fix Mac build with Xcode 8
Small issues in GHOST
- use NSApplicationDelegate protocol for our app delegate
- make sure NSApp is initialized before using
(cherry picked from commit df7be04ca6)
2016-09-22 11:07:34 +02:00
fb85484e6c Fix memory leak in copy pose operator 2016-09-22 11:07:34 +02:00
9d70344620 Blender 2.78: Point locales to a new branch hash 2016-09-14 16:46:07 +02:00
d5eb0b58a0 Cleanup: Fix epic indent failure in previous commit :/ 2016-09-14 16:24:16 +02:00
c11fcc34c4 Fix missing PaintCurves list in bpy.data
Minimal list features for now, no add/remove stuff, that we can add later...

Reported by sybren.

Should be safe for 2.78.
2016-09-14 16:15:58 +02:00
a37e4d4738 Fix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer
Cycles was thinking it always rendering integer frame, which is not correct.
2016-09-14 16:14:17 +02:00
14d26df2f1 Fix T49342: TypeError when autocompleting bpy.app.something.
Regression from rB036c006cefe471. We can't use self here, self is bpy.app, not pydescriptor of python path getsetter...

So for now, do not try to replace getsetter by actual value in bpy.app's dict,
just return static var generated on first run.

Should be safe for 2.78.
2016-09-14 15:58:17 +02:00
e02c63df1b Attempt to fix broken path remapping in own rB443b3ca9b9cb. 2016-09-14 13:26:30 +02:00
b6508da380 Code Cleanup: Deduplicate undo node freeing code 2016-09-14 13:26:04 +02:00
929701931d Fix: GPencil drawing sessions now respect limits for maximum undo steps
When drawing with Grease Pencil "continous drawing" for a long time
(i.e. basically, drawing a very large number of strokes), it could be
possible to cause lower-specced machines to run out of RAM and start
swapping. This was because there was no limit on the number of undo
states that the GP undo code was storing; since the undo states grow
exponentially on each stroke (i.e. each stroke results in another undo
state which contains all the existing strokes AND the newest stroke), this
could cause issues when taken to the extreme.
2016-09-14 13:26:01 +02:00
e5f49efe25 Blender 2.78 release: Update addons hash once again 2016-09-14 12:39:07 +02:00
0d7f3d01d7 CMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2227
2016-09-14 12:37:34 +02:00
9a35ebc1ea Fix two issues related to 'partial' .blend files:
I) Filename was not put in temp Main generated to save selected data only,
this was breaking readcode when trying to open partial file, leading to missing
filename in final loaded Main data.

II) Read code would confuse partial .blend files with Undo ones, when they had no screen in them
(which happens to 99.999% of partial .blend files I guess).

Reported by @sybren, thanks.

Should be safe enough for 2.78 release.
2016-09-14 11:41:16 +02:00
df4602ee3b Fix compilation error: Shadowing of variable 2016-09-14 11:04:34 +02:00
fa47bd1796 2.78 release: Update splash screen label 2016-09-14 10:37:35 +02:00
e38acc2191 2.78 release: Update hash for addons submodule 2016-09-14 10:28:48 +02:00
c6e0c674ee Fix T35333: Update some WM/UI API functions docstrings.
Based on patch by @codemanx, but with slightly less verbose descriptions.

More detailed behavior etc. rather belongs to doc/python_api/examples/bpy.ops.x.py imho.
2016-09-14 10:26:22 +02:00
1e5ac3b648 Fix bpy.data.user_map() ignoring unused datablocks.
Should be backported to 2.78.
Found by Sybren here in studio, thanks!
2016-09-14 10:26:22 +02:00
dcccf4be30 Outliner: Report linked datablock edit failure when trying to rename linked data in outliner 2016-09-14 10:26:22 +02:00
50452f5b67 Fix T49323: Ineffective bone roll calculation with low rig scale
The code was expecting vector to be normalized, however after
applying inverted object matrix it was possible to have scale
applied to it.
2016-09-14 10:26:21 +02:00
4271c1cc71 Fix T49336: Outliner allows to edit restrict flags for linked objects 2016-09-14 10:26:21 +02:00
290e650590 Fix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render
The issue was caused by some false-positive empty non-AABB intersection.
Tried to tweak it a bit so it does not record intersection anymore.

Hopefully will work for all platforms. Tested here on iMac and Debian.
2016-09-14 10:26:21 +02:00
5de77bf8dc Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images
To be backported to 2.78 release.
2016-09-14 10:26:21 +02:00
90f920c138 Fix T49296, assert failure in Bevel code.
The mesh interpolation function failed to fill a fractions-of-the-way
array properly when the distances are very small but nonzero.
2016-09-14 10:26:21 +02:00
b11f073ca0 Cycles: Fix wrong SSS in combination with hair on AVX2 platform
Not sure why exactly that happened, need a closer look.
2016-09-14 10:26:21 +02:00
293d5db895 Cycles: Fix shading and crashes resulting from constant folding on displacement
Constant folding was removing all nodes connected to the displacement output
if they evaluated to a constant, causing there to be no valid graph for
displacement even when there was displacement to be applied, and sometimes
caused crashes.
2016-09-14 10:26:21 +02:00
fd01cd7d06 Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED
Using ones complement for detecting if transform has been applied was confusing
and led to several bugs. With this proper checks are made.

Also added a few transforms where they were missing, mostly affecting baking
and displacement when `P` is used in the shader (previously `P` was in the
wrong space for these shaders)

Also removed `TIME_INVALID` as this may have resulted in incorrect
transforms in some cases.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2192
2016-09-14 10:26:21 +02:00
2c1201502d Cycles: Fix bump mapping to use object space when used with true displacement
Bump mapping was happening in world space while displacement happens in object
space, causing shading errors when displacement type was used with bump mapping.

To fix this the proper transforms are added to bump nodes. This is only done
for automatic bump mapping however, to avoid visual changes from other uses of
bump mapping. It would be nice to do this for all bump mapping to be consistent
but that will have to wait till we can break compatibility.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2191
2016-09-14 10:26:20 +02:00
b67db67b01 [CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC 2016-09-14 10:26:20 +02:00
Dmitry Dygalo
872065e19e Fix undefined variable on errors in Cycles ctests.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2201
2016-09-14 10:26:20 +02:00
f6fb072ab2 Fix OpenSubdiv related buffer overrun with multiple FVar channels.
The existing code uses the input value count of the first channel
for all of them. If the first channel is the largest, it leads to
a crash-causing buffer overrun in memcpy below. Likely this was
left since the time when only one channel was supported.

As a crash fix, probably should go into 2.78
2016-09-14 10:26:20 +02:00
16135990cd Fix missing 'prop_required' flags in some ID RNA funcs.
Not critical, but would rather have this in 2.78 (for API doc reasons mostly).
2016-09-14 10:26:20 +02:00
00abe6ecf1 Fix/Workaround T49297: Crash related to custom data draw (Blender with ASAN)
Root of the issue is that active render index became wrong. This is the actual
thing to be fixed, but as usual this is quite tricky to reproduce. Since such
bad situation might have happened more and fix isn't really difficult or
intruisive let's avoid crash for now.

Can be revisited once we figure out root of the issue.

Nice for 2.78 release.
2016-09-14 10:26:20 +02:00
3f5960b869 Fix T49299: Removing offset object in modifiers doesn't update mesh.
Own fault in new ID management work, thought rebuild the DAG itself was
enough to actually update whole scene, but we actually need to tag datablocks
for update as well, when we change (or remove) one of their ID pointers...
2016-09-14 10:26:20 +02:00
fb2a412b56 Cycles: Fix regular BVH nodes refit
For proper indexing to work we need to use unaligned node with
identity transform instead of aligned nodes when doing refit.

To be backported to 2.78 release.
2016-09-14 10:26:20 +02:00
30aaa92a19 Cycles: Add asserts to BVH node packing 2016-09-14 10:26:19 +02:00
979a4a613c Cycles: Cleanup: line wrapping 2016-09-14 10:26:19 +02:00
faec666bbe Fix T49283: Crash in BKE_ptcache_make_particle_key.
This is really hack-fix actually, not sure why `get_pointcache_keys_for_time()` seems to assume
it will always find key for given part index at least for current frame, and whether this assumption
is wrong or whether bug happens elsewhere...

Anyway, this is to be wiped out in 2.8, so no point loosing too much time on it, for now merely
returning unchanged (i.e. zero'ed) ParticleKeys in case index2 is invalid. Won't hurt anyway,
even if this did not crash in release builds, would be returning giberish values.
2016-09-14 10:26:19 +02:00
320d601e01 Fix T49286: Compilation error with XCode 7.0
Weirdly enough, this version of XCode seems to have static_assert()
even when NOT using C++11. This is totally weird and counter intuitive
since static_assert() is supposed to be C++11 onlky feature.

Can XCode stop using future, please? :)
2016-09-14 10:26:19 +02:00
e6071056a4 Cycles: Fix OpenCL speed regression introduced with the improved bump mapping
The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not.
In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown.

Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both).

Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now.

Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code.

This fix might be relevant for 2.78, but it should be tested further before including it.
2016-09-14 10:26:19 +02:00
4929de9df7 Fix T49273: Crash during access to dupli weights at launch time.
See commit's comments for details, but this boils down to: do not try to use
purely runtime cache data as a 'real' ID pointer in readcode, it's likely
doomed to fail in some cases, and is bad practice in any case!

Thix fix implies dupliweight's object will be invalid until first scene update
(i.e. first particles evaluation).
2016-09-14 10:26:19 +02:00
9663471bb7 OpenSubdiv: Support multiple materials drawing in Cycles textured view
Consider for inclusion into 2.78.
2016-09-14 10:26:19 +02:00
abe4c38410 [cmake/cpack] allow override of package name
Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

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

ammended to fix: wrong variable name in main CMakeLists.txt
2016-09-14 10:26:19 +02:00
7aa0103ca2 Revert "Depsgraph: Prioritize evaluation of the new scheduled nodes"
This reverts commit 9444cd56db.

This commit caused some flickering in the bones when swapping IK to Fk.

While it's unclear why such change caused any regressions, let's revert
it to unlock the studio.
2016-09-14 10:26:18 +02:00
fcb7973849 [cmake/cpack] allow override of package name
Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D2199
2016-09-14 10:26:18 +02:00
b281df01c7 Fix T41883: Strip keyframes not respected for scenes rendered by other scenes 2016-09-14 10:26:18 +02:00
8e7d6561f5 Add script which scales splash screen down
Based on reading documentation around. This particular version
is based on the ImageMagic documentation which could be found
there:

  http://www.imagemagick.org/Usage/filter/
  http://www.imagemagick.org/Usage/filter/nicolas/

Current filter is based on measuring mean error with the current
splash screen and choosing combination of parameters which
gives minimal mean error.
2016-09-14 10:26:18 +02:00
559e116a36 Fix cast shadows (material option) in the viewport
Fix cast shadows options (in material tab) not working in the viewport.
An off-by-one error. See D2194 for more.

Committing for Ulysse Martin (youle) who found & fixed this.
2016-09-14 10:26:18 +02:00
989ca313be Fix T49252: Crash when image textures used with true displacement 2016-09-14 10:26:18 +02:00
29f7a4abbd OpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry
Was causing huge viewport lags.

Reported by angavrilov in IRC, thanks!

Safe and nice for 2.78.
2016-09-14 10:26:18 +02:00
802d253a46 Fix T49251: moving smoke domain with additional resolution causes crash.
This is a bug in the multithreaded task manager in negative value range.

The problem here is that if previter is unsigned, the comparison in the
return statement is unsigned, and works incorrectly if stop < 0 &&
iter >= 0. This in turn can happen if stop is close to 0, because this
code is designed to overrun the stop by chunk_size*num_threads as
the threads terminate.

This probably should go into 2.78 as it prevents a crash.
2016-09-14 10:26:18 +02:00
a2e08ef997 Fix own mistake in recent rB8b2a45052093, broke saving render results as images in some cases.
Reported by sebastian_k over IRC, thanks.

To be backported to 2.78.
2016-09-14 10:26:18 +02:00
44df27dc71 Attempt to fix compilation error with static boost on certain platforms
This was reported in T49231.
2016-09-14 10:26:17 +02:00
98b2411b30 Fix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit mode for an object with Array modifier
Was incorrect indexing done in the array. Caused by 5abae51.

Not sure why it needed to be changed here, but array here is supposed to be
a loop data, so bringing back loop index as it originally was. The shading was
wrong in edit mode with BI active as well (so it's not like it's needed for
BI only).

Patch in collaboration with Alexander Gavrilov (angavrilov), thanks!

Should be double-checked and ported to 2.78.
2016-09-14 10:26:17 +02:00
3ea30ce1d0 Fix glUniform called from glBegin/glEnd blocks
Was causing some invalid operations in OpenGL.

After more testing should be fine for 2.78.
2016-09-14 10:26:17 +02:00
f496a34700 Fix T49220: Vertex paint doesn't work with OpenSubdiv
It's a bit tricky to align vertex color data between Blender and OpenSubdiv
so for now we simply disable OpenSubdiv in the paint modes.

Safe for 2.78.
2016-09-14 10:26:17 +02:00
7a6a7d9f7c CMake: Skip addons_contrib for release candidate builds
Nowadays release candidates are supposed to be as close to the final
release as possible.

Safe for 2.78 release branch.
2016-09-14 10:26:17 +02:00
41141248ef API doc update script: Fix generated zipfile name, was broken in 'release' case... 2016-09-14 10:26:17 +02:00
e1c1a0c3ee API doc: add new pure-rsync py script to update API doc on Blender server.
The other one (sphinx_doc_gen.sh) needs an ssh account on the server to work - and I hate bash, too! :P
2016-09-14 10:26:17 +02:00
2ef4db4077 Cycles: Fix unreported - Missing node group for the Camera Node
Thanks to linda2 for reporting in IRC.
2016-09-14 10:26:17 +02:00
579e8c707b Alembic: fix parenting issues when an object has multiple curves/points
subobjects.
2016-09-14 10:26:17 +02:00
4be5fae30c Fix T49249: Alembic export with multiple hair systems crash blender
Crash was due to a name collision in Alembic objects caused by the fact
that names derive from the one of the Blender object. An object having
multiple particles system would thus give its name to various
subobjects.

Now use the name of the particles system for the Alembic object.
2016-09-14 10:26:17 +02:00
184c781657 Fix a few OpenCL compiler warnings. 2016-09-14 10:26:16 +02:00
91705ad477 fix: not initialised variable can crash blender (related to modifiers with cage editing enabled) 2016-09-14 10:26:16 +02:00
ab934e7d61 Fix T49228: Separate by material, materials dissappear after reload.
Yet another mismatch where code would decrease usercount (of Material here) but never increase it again
when re-assigning the datablock...
2016-09-14 10:26:16 +02:00
894a4f5230 Fix T49229: ID user decrement error when deleting group instance twice.
Another great example of inconsistency in usercount handling - dupli_group was considered
as refcounted by readfile.c code (and hence by library_query.c one, which is based on it),
but not by editor/BKE_object code, which never increased group's usercount when creating
an instance of it etc.

To be backported to 2.78.
2016-09-14 10:26:16 +02:00
eb85bb008f windows compile fix, use portable BLI_snprintf instead of snprintf 2016-09-12 19:52:20 +02:00
57c9742438 added global keep shards mode for cutter groups 2016-09-09 14:12:09 +02:00
c04b4d393b fixes: activating clusters via percentage, add meshisland id as name in fracture too, load crash fix 2016-09-09 13:33:34 +02:00
0e5089c30a 2.78 release: Point locales to a proper updated branch 2016-09-02 11:54:54 +02:00
0dd4c3bde7 fix, enabled threading for autoexecute 2016-08-08 20:13:08 +02:00
659ca6a7d6 added threaded checkbox next to execute fracture operator 2016-08-08 14:53:47 +02:00
be6d3df29b made threading optional via a checkbox 2016-08-08 14:07:30 +02:00
af118bd3ec fallback to singlethreaded for dynamic, mousebased and fast bisect.. also changed back fast bisect orderding to have more uniform shapes 2016-08-08 12:38:48 +02:00
0f1f3ca292 first attempt to multithread fracturing, works only for prefractured for now 2016-08-08 00:37:08 +02:00
fe55273199 some more optimizations at bisect, bit faster and less memory consumption, and removing bakes now when refracturing 2016-08-07 16:02:13 +02:00
480a8c2bce fixes for bisect and bisect+fill, should look correct again and be a bit faster as well
using a kdtree based preselection method to speed up bisecting
2016-08-06 11:18:00 +02:00
36f511f9c3 small fix for loading possibly different jack shared library versions on different linux distributions, thanks to sergey for the fix 2016-08-02 15:53:29 +02:00
aaef4310e9 small enhancement for voronoi + bisect and solidify after FM use case
if you use voronoi+bisect and solidify after FM, you can automerge now without having autohideable inner faces. This should have the same effect as autohide in regular use case has.
2016-07-25 23:08:46 +02:00
c6f7f3bc38 memory optimization for smoke compressibility fix, dont use recursion but a queue to avoid potential stack overflows, thanks to angavrilov for this optimization 2016-07-23 16:39:25 +02:00
5c8804d6ae fixes to prevent unwanted smoke "explosions" in the domain when using moving colliders, thanks to angavrilov for investigating those problems and providing this fixes. 2016-07-17 21:31:44 +02:00
8f53838675 attempt to make fast bisect usable with mousebased fracture... now the user has a bit control how the halving is performed via the helpers 2016-07-11 16:42:58 +02:00
d8f5a81a9a some tweaks for the faster voronoi+bisect method, its faster but not interactive yet... but should mostly lead to correct results 2016-07-09 13:43:36 +02:00
0f48c6a392 attempt to make voronoi+bisect faster, but it has problems with selfintersection, so unfortunately not useable on any
model out of the box
2016-07-09 01:35:43 +02:00
89c8718872 fix for converting fm external mode back to objects, used wrong transformation for objects 2016-06-12 17:17:30 +02:00
126e443035 crash fix for starting sim after convert to objects in external mode
stale data was around in depsgraph, missed a relations update tag call
2016-06-11 15:56:28 +02:00
785ac13c39 partial solution for FM autoexecute, auto disables when sim runs and is enabled again on startframe
note: cache will always be overwritten in autoexec sim mode, because keeping it may lead to incorrect sim results
furthermore a couple of changes for external mode (attempt to be more BCB compatible)
2016-06-02 10:48:29 +02:00
0935d32ffb fix, force autohide facepair generation only from valid DM
if primary source is invalid, force fallback to secondary source earlier now
2016-05-27 20:28:33 +02:00
c6388928e6 crash fix, could happen that the internal ob->derivedFinal DM structures were invalid
happened in some cases and most notably under windows when attempting to calculate the DMs bounding box
2016-05-27 10:07:05 +02:00
97f6dc3d10 backport for missing smoke viewport display due to using "min" as variable name
This was a fix for T47991 and affects OSX only.
2016-05-23 10:30:56 +02:00
d47aab201f fix: seems autohide refresh was not triggered each time after loading a file
since this is runtime only data force to refresh it now.
2016-04-27 13:30:59 +02:00
4cf48bbe1f fix for solver / cluster solver iterations override, it caused different behavior at loading / refresh
solver iteration override was taken into account too late, after first validation which probably caused different simulation behavior using the default value for one frame
2016-04-08 13:52:38 +02:00
470d0cd6e8 set version char to "a" and cycle to "release" 2016-04-05 20:00:49 +02:00
1e321b998c Merge remote-tracking branch 'refs/remotes/origin/blender-v2.77-release' into fracture_modifier 2016-04-05 19:58:20 +02:00
89f6987953 Fix UV-Editor crashes w/ over SHRT_MAX UV's 2016-04-05 20:45:38 +10:00
63e0d3a47f Fix T47705: Freestyle line glitch.
The addressed issue is a regression from Blender 2.75, after the internal
switch from double to single precision floating-point numbers in the
Freestyle code base.  Face normal calculations require the higher
precision during the computations, even though the results can be stored
as single precision numbers.
2016-04-05 19:34:50 +10:00
2490779013 Correct merge error 2016-04-05 19:02:39 +10:00
8b55e0e877 Remove newly added function (harmless but unused) 2016-04-05 18:58:42 +10:00
d979ba0f73 Blender 2.77a: Point addons to a new submodule hash 2016-04-05 10:55:38 +02:00
19f323012a Particles: Fix broken grid distribution in some case from own recent rB201d3938622. 2016-04-05 10:51:07 +02:00
e97db72ae4 Fix T47902: Particle grid not using modifier stack, Take II.
Now only fix correct handling of use_modifier_stack for grid distribution,
fixing it globally breaks all existing edited hair systems. :/
2016-04-05 10:51:01 +02:00
2d887ae200 Revert "Fix T47902: Particle grid not using modifier stack."
This reverts commit 2bd3acf7cd.

Commit is valid in theory - but in practice, it means nearly all edited hair systems
would need to be re-created from scratch... Not nice, so better revert and note in code
that particle distribution is ugly and does not respect 'use modifier stack' option in most cases.
2016-04-05 10:50:56 +02:00
ebceb93bb4 Fix T47902: Particle grid not using modifier stack.
Disclaimer: this is tentative fix, seems to be working but you never know with particles.
If issue arise, we'll just revert this commit and hide 'use modifier stack' option
for grid distribution instead.

This commit also try to make choice of which dm to use during distribution more generic
(deduplication of code), again hopping not to break anything. :P
2016-04-05 10:50:55 +02:00
828c7956c8 Fix error in ghash/gset_ensure_p_ex
The key is needed in the case the ghash resizes.
Caused regression T47984.
2016-04-05 18:48:37 +10:00
275ca01eac Fix T47939, take II: Check clang package version, not llvm-devel one.
Looks like some distro still provide llvm-3.4-devel, while no more clang-3.4.
Since clang depends on llvm of same version, check clang only should ensure
us we also have matvhing llvm... *sigh*
2016-04-05 10:46:37 +02:00
95de7b9a5f Fix T47939: Install Deps OSL 1.7.1 and clang-3.5
Until we officially support llvm3.5 or more, only allow for 3.4 llvm packages,
and build own stuff otherwise...
2016-04-05 10:46:28 +02:00
f36de27339 Fix T47848: Fix regression in sequencer GL render
Own changes in 2.77 broke off-screen render with scene render size doesn't match output.
2016-04-05 18:45:36 +10:00
fc78a58337 Cycles: Fix wrong camera in volume check when domain is only visible to camera rays 2016-04-05 10:41:46 +02:00
37ab16d075 Cycles: Fix regression caused by recent camera-in-volume commit
Stupid me forgot that we don't have stop-element in the stack yet.
2016-04-05 10:36:15 +02:00
da0ce86a3c Cycles: Make curves modified by a taper object with modifier considered a deform modified
That might consider a bit more objects to be considered deform modified,
but it covers common case of using taper object without require of doing
recursive checks.

In worst case it'll be just some extra synchronization time, no render
time difference will happen for false-positive because of extra checks
happening in Cycles.
2016-04-05 10:36:14 +02:00
f615b57379 Fix curve editmode adding 3D primitives w/ 2D curves 2016-04-05 10:36:14 +02:00
a5cfe0f9dc Fix curve adding 3D nurbs when 2D is set
Ctrl-LMB ignored 2D constraint
2016-04-05 10:36:14 +02:00
e63a8e7ded Fix curve hide keeping spline active 2016-04-05 10:36:14 +02:00
f2ae9c6f85 Fix curve, missing update on Ctrl-LMB 2016-04-05 10:36:14 +02:00
45e68e190d Fix T47971: rigid body baking crash due to thread race condition. 2016-04-05 10:36:14 +02:00
754566cf5b Fix T48030: Can't zoom VSE properties panel 2016-04-05 10:36:14 +02:00
3ed49f8bc9 Fix T47505: Cycles OpenCL rendering crash on Windows.
Restore the boost bug workaround, but without changing the locale.
2016-04-05 10:36:13 +02:00
0f3d558982 Cycles: Fix wrong camera-in-volume stack when camera ray hits volume domain twice 2016-04-05 10:36:13 +02:00
8e1e3e0228 Fix T48001: Highlighting selected item in filtered lists.
active index was not reset to 'nothing' in case actual active item was filtered out.
2016-04-05 10:36:13 +02:00
f4eb7e149a Knife Project: revert fix for T43896
For now leave precision at half a pixel until we have real fix.
Resolves T48023.
2016-04-05 10:36:12 +02:00
713669f7e6 Cycles: Support deformation motion blur for curves deformed by taper 2016-04-05 10:36:12 +02:00
Philipp Oeser
18875f6aa3 Fix T48013: UV Sculpt Brush Does not appear in UV window - but does show up in uv panels (t, n)
Epic fail in recent rB2c3985 :/

To be backported to 2.77a!
2016-04-05 10:36:12 +02:00
f590b2f89f Fix When using keying sets, the toggling "all items" in the array target only goes from the index value down, instead of keying all 2016-04-05 10:36:12 +02:00
81e8bd107f Hide layers from UI in template 2016-04-05 10:36:12 +02:00
a66116f543 Fix T48012: Knife Project crash 2016-04-05 10:36:12 +02:00
b3f08cddf3 Fix NULL check before free 2016-04-05 10:36:12 +02:00
3108861981 Cycles: Fix wrong initialization order of mesh flags and object transform 2016-04-05 10:36:12 +02:00
0fcb17fc4f Remove the obsolete windows launcher 2016-04-05 10:36:11 +02:00
02081f86d1 CMAKE disable building the windows launcher, fix type in delayloading of debug dll 2016-04-05 10:36:11 +02:00
8efe90f0a0 CMAKE / msvc openmp, delay loading of openmp dll so we can set environment
variable before it is loaded
2016-04-05 10:36:11 +02:00
315703d725 Cycles: Aligned vector was not covered by guarded stat
This was making stats printed by the logging being wrong: they did not
include such memory as BVH storage.
2016-04-05 10:36:11 +02:00
e69c02a392 cmake fix full debug builds on msvc 2016-04-05 10:36:11 +02:00
4960006b27 Fix T47985: VSE GL-render scene strip hangs
Regression in d5f1b9c22,
threading deadlock rendering a scene from the OpenGL preview.
2016-04-05 10:36:11 +02:00
e4b1b00884 Fix T47983: Particles - Emit from Verts emits double on one vert.
When non-random, particle distribution used a small start offset (to avoid
zero-weight faces), which is fine with "continuous" entities like faces, but not
for discrete ones like vertices - in that case it was generating some undesired
"jump" over a few verts in case step was small enough
(i.e. total number of verts/particles was big enough).
2016-04-05 10:36:11 +02:00
96b9f45d7a Partly fix (unreported) particles not updating correctly when changing settings.
Point-cached particles (those using simulations) would not update at all outside of
first frame, due to PSYS_RECALC_RESET flag being ingnored in `system_step()`...

For some mysterious reasons, udate is still non-fully functional outside of startframe
(e.g. changing face distribution between random and jittered), but at least when choosing
'Vertices' you get particles from verts and not faces!
2016-04-05 10:36:11 +02:00
4fc9178af9 CMake cleanup target_link_libraries_decoupled 2016-04-05 10:36:10 +02:00
357787b06b Fix T46623: OSX bpy.app.binary_path_python incorrect
CMake's PYTHON_EXECUTABLE wasn't set.
2016-04-05 10:36:10 +02:00
a80f3d7ddb Fix T48000: Eyedropper sample-merged ignored at first 2016-04-05 10:36:10 +02:00
97836b7250 Fix T47814: VSE Scene 'Use Sequence' fails
Conflict with flags between depsgraph and sequencer caused error.
Now pass state of sequencer parents to avoid recursion.
2016-04-05 10:36:10 +02:00
37a785241b Fix T47961: Wipe effects should have 2 inputs 2016-04-05 10:36:10 +02:00
2ad02b63e5 Fix T47967: Select next active fails in some cases
For cases when there are multiple matches,
find the closest match (with increasingly fuzzy tests) instead of failing.
2016-04-05 10:36:10 +02:00
d17f3c6d56 Fix T47987: Blender Cycles standalone does not properly read UV coordinates from XML 2016-04-05 10:36:10 +02:00
2265628964 Fix T47986: OBJ Import fails w/ imagepath encoding 2016-04-05 10:36:09 +02:00
261c12aab4 Fix T47958: Crash in Walk or Fly Navigation in Camera mode when invoking from non-3DView region 2016-04-05 10:36:09 +02:00
0f5ca755fc Fix T47969: Select Random always uses same seed
Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
2016-04-05 10:36:09 +02:00
611e544191 Fix T47972: Blender crash showing particle system.
Do same as with faces - if no orcodata is available, fill orco with current location...
2016-04-05 10:36:09 +02:00
8aed449528 Fix T47973: Render stamp ignores font alpha 2016-04-05 10:36:09 +02:00
f3259ae602 BLF: alpha support for drawing to buffer 2016-04-05 10:36:09 +02:00
49573b8e39 Fix T47931: Missed world shader update when having object dependency 2016-04-05 10:36:09 +02:00
edb1cc6fa8 Fix T47697: Smoke simulation doesn't work in viewport
Seems to be a division by zero error.

Should be safe for an upcoming 'a' release.
2016-04-05 10:36:09 +02:00
ee128c348f Fix T47962: It's possible to set a Sound strip as a modifier Mask. 2016-04-05 10:36:08 +02:00
18029edf1f Fix T47758: rigidbody bug with constraint breaking and disable collisions.
This is a regression in Bullet, reverted the problematic change for now with
a custom patch.
2016-04-05 10:36:08 +02:00
fa429b3f0c Fix T47668: Cycles OpenCL glass not rendering correctly on AMD.
Work around what appears to be a compiler bug.
2016-04-05 10:36:08 +02:00
7ea29d69df Fix T47935: Hair particles; The display percentage parameter breaks after a render is done.
Follow same logic in `psys_render_restore` as in `psys_render_set` - if hair and
display percentage is not 100%, we have to recompute particles...

With regular 'emitter' particles just hiding some is fine (though using random here
will not give a precise proportion...).
2016-04-05 10:36:08 +02:00
61aea37d35 Fix T47951: UserId problem on reload.
readfile.c would increment object usercount in three places, where it should not.
Remember kids: Objects are **only** refcounted by Scene's bases, and Object->proxy!
2016-04-05 10:36:08 +02:00
8aefea0c3a Fix Cycles debug panel, being shown in BI as well. 2016-04-05 10:36:08 +02:00
721f0089aa Fix T47928: Crashing save corruption with dynamic paint drip effector groups.
Dynapaint's `foreachIDLink` was mnot handling effector_weights->group pointer...
2016-04-05 10:36:08 +02:00
70d417cbe8 Revert "Fix T47263: numpad4/6 rotates around worl Z axis and not view Y axis."
This reverts commit fe0ca82b23.

This is a design issue, needs more thinking, for now just revert back to old behavior.
2016-04-05 10:36:08 +02:00
1af7bf3a20 Fix T47910: Knife project fails
Regression in fix for T43896, using screen-space precision here is very problematic,
using lower precision here works for both reports.
2016-04-05 10:36:07 +02:00
9a7d576332 Fix T47838: Walk gravity fails w/ intersecting objects
Regression in 3ad0344, fix from @mano-wii.

More comprehensive fix can be done after 2.77a.
2016-04-05 10:36:07 +02:00
5bfa814dcb Fix T47900: VSE adjustment crashes on blank frame 2016-04-05 10:36:07 +02:00
d21ed9af21 Fix T47893: BGE crashes w/ generated mesh data 2016-04-05 10:36:07 +02:00
e71398f3c7 Fix T47890: Vertex mask w/ subsurf select fails
Regression in GL refactor
2016-04-05 10:36:07 +02:00
744ef820d1 Fix incorrect strncat use 2016-04-05 10:36:07 +02:00
f601a4b4f7 Fix T47830: Multi-edit w/ ui-list wont highlight
Regression from 4d6b892.
2016-04-05 10:36:07 +02:00
0889f8c127 Fix for crash of point density textures due to undefined point_data on loading. 2016-04-05 10:36:06 +02:00
a3ef7c986c Fix add mesh template 2016-04-05 10:36:06 +02:00
Philipp Oeser
5ac7186633 Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.
rB5b3af3dd made the poll function here slightly too laxist.

To be backported to 2.77 should we make an 'a' release.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D1861
2016-04-05 10:36:06 +02:00
7a7b242007 Fix T47862: VSE hard cut fails
Regression caused by changing how video length is calculated,
however similar problems could be caused by strip length changing on-disk.
2016-04-05 10:36:06 +02:00
f036e1875f GPU: avoid redundant logic for non-spot lamps 2016-04-05 10:36:06 +02:00
7e29ce8e96 Fix for non spot lamps calculating spot values
Logical error in D1378, also incorrectly used lamp type as a flag.
2016-04-05 10:36:06 +02:00
a5bc674e88 Include requests' cacert.pem file
This allows us to verify certificates of HTTPS connections, which is
mandatory for logins like on Blender ID.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1845
2016-04-05 10:36:06 +02:00
4717824f55 Fix T47670: cycles GLSL incorrect normal map node. 2016-04-05 10:36:06 +02:00
4f3178e4a5 Fix T47670: cycles GLSL incorrect layer weight / fresnel.
World space and view space normals were mixed up, we should only convert from
world to view space if a custom normal is connected, otherwise it is already in
view space.
2016-04-05 10:36:05 +02:00
a8ee74ed61 fix for rare crash at loading stored constraints
added a null pointer check so to prevent a crash atleast
2016-04-04 10:54:19 +02:00
d7eeff23bf another fix attempt for occasional loading crashes 2016-04-01 16:30:46 +02:00
47adafe20d fix, forgot to set userpointer in point constraint 2016-04-01 09:46:58 +02:00
0ba11ae9b1 fix, forgot to load participating constraints per meshisland
this caused crashes when trying to simulate with percentage breaking
2016-04-01 01:53:56 +02:00
e62c4c822b fix attempt for crash on loading last blend (quit.blend with dynamic fracture) 2016-03-31 21:36:01 +02:00
790af966a3 crash fix for loading files with dynamic fracture enabled
forgot to set runtime listbase pointers of fractureIDs to NULL
2016-03-31 20:07:07 +02:00
b26e1ad0f1 fix for occasional crashes with dynamic fracture while freeing the modifier
crash happened with scene objects which had a freed rigidbody world but didnt set the pointer to NULL.
2016-03-31 13:19:14 +02:00
7befec292b fix for loading splitshards to island blends and clusters properly
was necessary to skip "empty shards" properly and keep cluster index
2016-03-31 11:27:06 +02:00
8c70dd87c6 a bit clean up and attempt to reduce dynamic fracture memory leaks 2016-03-30 23:09:52 +02:00
603b9dfbe9 dont suppress undo save/load with dynamic any more
this seems a bit more stable, but does crash occasionally too, and may even
corrupt the blend. Workaround, open with official blender and FM is gone, save
and blend should be usable again.
2016-03-30 15:17:54 +02:00
d3cdd5c237 fix for different constraint behavior after refracturing / reloading / param change
constraint enabled flags were changed during sim and next sim started with pre-broken
constraints this way... thus different behavior.
2016-03-30 15:05:21 +02:00
fc5ffd9694 store constraints for prefractured mode now too in blend
this automatically creates constraints from scratch as fallback for older files
2016-03-30 10:24:08 +02:00
9c79a5151e Fix T47758: rigidbody bug with constraint breaking and disable collisions.
This is a regression in Bullet, reverted the problematic change for now with
a custom patch (backported to Fracture Modifier)
2016-03-30 10:21:20 +02:00
dce55610df allow multiple dynamic destruction with extra particles or verts
this should allow triggered dynamic destruction with different colliders at different times. Note: WIP and crashes often in relation with undo
2016-03-29 15:24:13 +02:00
536578a189 fix attempt for some dynamic fracture rotation glitches 2016-03-27 23:19:32 +02:00
738bcd8a0c fix: crash when removing FM, ob->derivedFinal can become NULL in this case 2016-03-27 15:12:47 +02:00
3e2ed11690 keep objects completely intact with compounds and stability factor = 1 2016-03-27 15:11:46 +02:00
e1e6e2d04b stability factor should now influence overall stability of object more directly.
This should allow to control breaking behavior of the compounds better.
As before the masses still have the biggest influence to the breaking behavior, followed by thresholds and
connection count per shard.
2016-03-26 18:50:39 +01:00
45dbc3d19c attempt to make compounds a bit more predictable, they should work now when colliding with passive objects too 2016-03-26 16:07:04 +01:00
cfec6debb6 removed a double bad level call stub, found by jensverwiebe, thanks :) 2016-03-21 16:04:53 +01:00
3990ee1bb8 Merge remote-tracking branch 'refs/remotes/origin/blender-v2.77-release' into fracture_modifier
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-03-21 11:39:38 +01:00
22a2853b5d Blender 2.77: Point submodules to an updated hashes 2016-03-18 17:34:06 +05:00
870f911e36 Revert "Fix button display clamping values"
This reverts commit e4e21480d6.
2016-03-18 16:45:58 +05:00
4522ee109b Blender 2.77; We are now at release cycle 2016-03-18 16:43:43 +05:00
fc37440216 Sequencer: expose GL preview alpha in scene UI
While this isn't essential, accessing this setting required navigating to each scene and using render menu.
Expose in sequencer UI for more convenient access.
2016-03-18 15:44:39 +05:00
6f49d970e0 Fix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel while sculpting 2016-03-18 15:44:25 +05:00
4e53ca9ed2 Fix T47760: Toggling GPencil's "Selection Mask" via Python does not update UI
Add rna updates to greasepencil sculpt properties

D1849 by @lichtwerk, reviewed by @aligorith
2016-03-18 15:44:25 +05:00
48ae702c3c Fix missing 'anim_data' in RNA API of Freestyle's linestyle.
Reported by Manuel Rais on ML, thanks.
2016-03-18 15:44:25 +05:00
2b0f0ffe0a Fix T47763: 2.77 RC2 (Fluid) Particle Baking slower compared to 2.67b.
Static schedule was responsible here...

Also, made a minor optimization in case adaptative (auto) subframes are enabled,
gives a few percent of speedup here.
2016-03-18 15:44:25 +05:00
1e5c7e7a0d Fix T47807: Toggle header shortcut doesn't work 2016-03-18 15:44:25 +05:00
bbaffd7ede Fix T47759: Mesh 'Select less', leaves isolated verts
Select less in mesh edit-mode would leave selected vertices/edges
in edge/face mode which don't support selecting these elements.
2016-03-18 15:44:24 +05:00
bcfa73dfd3 Fix T47784: BMesh.from_object broken keyword args 2016-03-18 15:44:24 +05:00
4bb12140e3 Fix T47772: Randomize stroke has direction bias 2016-03-18 15:44:24 +05:00
e100a8598f Fix T47788: Symmetrize flips multi-res data
Symmetrize was unusable with multi-res data,
add an option for the bmesh operator not to flip the multi-res depth.
2016-03-18 15:44:24 +05:00
f0e52274ad Correct UI active state w/ bevel-factor
D1838 by @JacquesLucke
2016-03-18 15:44:24 +05:00
e511c7a34e Fix/workaround T47685: Drag keymap slider fails
This is a special case where the UI update function re-creases the keymap we're currently editing.
Making it so dragging values fails.
2016-03-18 15:44:24 +05:00
3d1f050608 Fix crash loading some library blend files
Blend files with screen but no scene would crash.
2016-03-18 15:44:23 +05:00
90758ed2e8 Fix T47827: Single Channel Preview Error
Fix by @sergey with own fix for big endian.
2016-03-18 15:44:23 +05:00
80b906cb31 Fix T47787: When performing operation 'Make single user' -> 'obj&data', object could be removed from group.
Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage,
leading to inconsistent behavior depending on order of operations e.g.

Here, was object used by a group but not linked in any scene - once linked in scene,
their usercount would be 2, leading to 'making single copy', when it's actually not needed.
We now have better control here, so let's use it!

Note that other ID 'make single user' code will likely need similar fix (Images, etc.).

Safe to be backported to 2.77.
2016-03-18 15:44:23 +05:00
8b49fa29ca Fix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash
Regressions after 2.76, to be backported to 2.77.
2016-03-18 15:44:23 +05:00
6d4f51212b Fix T47773: Particle System with Boids Crash.
Problem was, during initialization of boids particles in `dynamics_step()`,
psys of target objects was not obtained with generic `psys_get_target_system()`
as later in code, which could lead to some uninitialized `psys->tree` usage...

Think it's safe enough for 2.77, though not a regression.
2016-03-18 15:44:22 +05:00
ab44c20409 Fix bad UI range of convergence distance which was above the hard limit
That was rather confusing to slide the value.

Perhaps makesrna can check cases like this?
2016-03-18 15:44:22 +05:00
45b0e93b2e Cycles: Do no limit viewport samples to USHRT_MAX when value is at 0.
We don't limit manually setting higher values, this was probably overlooked here.

Found by @Blendify in IRC.
2016-03-18 15:44:21 +05:00
34510e3cce Fix crash adding EditNormals modifier to NURBS object (or other types but mesh).
Kinda stupid, but that eModifierTypeFlag_AcceptsCVs could really use a comment alongside
its definition!

Safe to be backported to 2.77.
2016-03-18 15:44:21 +05:00
de80ecc8fb Fix T47753: World equirectangular regression
D1729 fixed 'View' projection but broke 'Equirectangular'.

This commit also changes equirectangular projection to match Cycles and the viewport.
2016-03-18 15:44:21 +05:00
fc2f0a1a25 Fix T47749: Crash subdividing wire edge w/ mdisps 2016-03-18 15:44:21 +05:00
d402611c1d CMake: remove OSX version lookup table
This assumed the OSX SDK version matched the OSX version, which isn't always true.

Also problematic for maintenance and would make building older Blender versions on OSX fail.

Passing in pre-defined OSX_SYSTEM is also supported,
if you have multiple and want to select one.
2016-03-18 15:44:20 +05:00
6ebd48f353 Skip scopes update for render result during rendering 2016-03-18 15:44:20 +05:00
7268e6c58f Fix T47681: Bump node doesn't work with SSS shader when using OSL 2016-03-18 15:44:20 +05:00
Julian Eisel
c20bcba363 Fix T47706: 'CTRL ALT Left Mouse' clicking on the dope sheet summary line crashes Blender
Simple NULL-check seems fine here, working as it should now. Most likely caused by rBc4dc14b079d81.
2016-03-18 15:44:20 +05:00
1e2c8ca6ea Fix T47688: Regression in gl_load
Error caused by 771f73b6
2016-03-18 15:44:20 +05:00
88a3b68610 BMesh: avoid assert dissolving degenerate faces
For dissolving 2-sided faces, theres no need to check they are valid before removal.
2016-03-18 15:44:19 +05:00
1e1118e7e7 Blender 2.77: We are now RC2 2016-03-04 22:08:19 +05:00
1e7458258c Blender 2.77: Point translations submodule to updated branch 2016-03-04 22:03:16 +05:00
3636693612 Fix typo in 'Vietnamese' language label (must have sneaked in while adding Basque one, grr). 2016-03-04 21:47:54 +05:00
7cd6a5c221 Fix T47683: broken BBox logic when drawing duplis.
Once a dupli had a valid bbox, that bbox would be used for all following objects
without bbox, instead of skipping clipping check.

Issue unveiled by rB3fa0a1a5bc0ff2, but not related at all (in fact, bug was present before that commit).
2016-03-04 21:12:00 +05:00
15ac4b4f9b Fix uninitialized memory use lattice-boundbox
Many other places weren't clearing boundbox dirty flag after calculation.
2016-03-04 21:12:00 +05:00
ce4a8210b3 Curve/line width change broke outline drawing
Partially revert e29a5ba6
2016-03-04 21:11:59 +05:00
Julian Eisel
67d310459d Fix T47674: "Change Data/Files" setting incorrect filter
Image filter was not set, but only if invoked from toolbar (image strip needs to be selected to see the button).
Caused by rB7fa72b8970, Wasn't aware there's another button for this for image strips.
2016-03-04 21:11:59 +05:00
b805b3735c Render Save Buffers: Use proper memory buffer size for a display buffer 2016-03-04 21:11:59 +05:00
ff32f81fd2 UI: move checkbox for missing add-ons to LHS 2016-03-04 21:11:59 +05:00
a78d679ddd Fix RNA property clamp assigning in Python
On first assignment the value was clamped, but successive assignments weren't.
2016-03-04 21:11:59 +05:00
5cbd14241f Edit Mesh: Edge tag toggle when no active path is found
User request, this matches 2.6x behavior more closely.
2016-03-04 21:11:59 +05:00
c82e6fe80b PyAPI: correct function name w/ arg parsing 2016-03-04 21:11:58 +05:00
50f188814f Fix T47676: Broken default values for particle brush strength.
Current startup .blend has old (percent?) values for particle brush strength.

Since rBe4e21480d6331903c90ab073746484498441e1ac, UI controls do not clamp automatically values anymore,
which means when you first enable comb (or any other brush) you get a 50 strength, waaaayyyy to powerful.

This commit fixes this in `BLO_update_defaults_startup_blend`, note that it does not fix custom users'
startup files, nothing to do here...
2016-03-04 21:11:58 +05:00
b00822e42d Fix T47644: crash (use-after-free) regression from rB7a74738914a66e.
Handling `me` data here is not good idea anyway, we override it completly with data
from `tmp` (crash came from freeing already existing bb from me, while pointer still existed in tmp).

(rediscovered it while working on T47676...).

To be backported to 2.77.
2016-03-04 21:11:58 +05:00
67b16c6170 Fix T47564: Unwrapping the same mesh results in different UVs.
Pointers of faces were passed as face keys during parametrizer's face creation. Since those
addresses were different for every run, the layout of the faces ended up being different
in the internal hash, leading to inconsistent order of their evaluation during LSCM solving,
and slightly different UV maps.

Solved by simply using faces' indices as key instead, which ensures we always get same results
with exact same input data now.

Many thanks to Roman Nagornov (RomanN) for raising the issue, investigating it and finding
the solution! And thanks to Brecht for quick review too.
2016-03-04 21:11:58 +05:00
3382ba0238 Cycles: Fix wrong default value for volume samples 2016-03-04 21:11:58 +05:00
d1efd44c1d Fix assert in UI code
Dont attempt to clip empty string
2016-03-04 21:11:57 +05:00
198700a36d Fix T47642: Crash baking w/ cycles 2016-03-04 21:11:57 +05:00
322fa27829 Fix T47635: Texture paint performance regression
Flipped bindcode check in D1414 caused projection paint to always do full updates.
2016-03-04 21:11:57 +05:00
562a488fb0 Add Basque (Euskara) new language.
Nothing critical, but would be nice to backport this to 2.77.
2016-03-04 21:11:57 +05:00
0c32f755a6 Fix T47643: Blender crash. Linked speaker issue.
Speaker's localization func would not make direct-linked its used sound datablock...
2016-03-04 21:11:57 +05:00
aa177d48c7 Fix T47638: Bad auto-smooth value for new meshes
Code was using degrees as radians.

Still unclear why default cube will have 180 degrees angle, but new meshes 30,
but that's kinda separate topic which is to be addressed separately.

This is a subject for final 2.77 release.
2016-03-04 21:11:57 +05:00
6a97b9c4a2 Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled.
See rB935e241fa6ea095493 for details of the issue, but first fix caused regression T47632.

So for now handling the issue in a localized way, this is not a real solution (since this could happen
in other cases), but will do for 2.77.

This commit is to be backported to 2.77.
2016-03-04 21:11:57 +05:00
01485b389a Fix T47632: Revert "Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled."
This reverts commit 935e241fa6.

Issue will be fixed in a more localized way for now (not that nice, since this use-after-free can possibly happen
in other places too, but only safe solution for 2.77).

This commit is to be backported in 2.77.
2016-03-04 21:11:57 +05:00
91457def83 Fix T47604: Sculpt + Modifier undo gives invalid normals 2016-03-04 21:11:56 +05:00
28e4f8eb5c Fix T47615: crash trying to use point density with lamp object. 2016-03-04 21:11:56 +05:00
550215a65e Cycles: Fix compilation error of certain OpenCL split kernels 2016-03-04 21:11:56 +05:00
77f96266e8 Fix T47608: Cycles cage baking crash after recent uv derivative fixes. 2016-03-04 21:11:56 +05:00
42fd804cca Fix T47605: Elsyiun theme info text hard to read 2016-03-04 21:11:56 +05:00
2d5343cd92 Fix T47582: Curve handle thickness regression 2016-03-04 21:11:56 +05:00
86bb5f70d6 Fix T47586: Nurbs handle thickness regression 2016-03-04 21:11:56 +05:00
9fcc849aa3 Fix T47583: Mesh wire edge thickness regression 2016-03-04 21:11:55 +05:00
9867042ab0 Fix T47592: Wrong line width w/ custom-bones 2016-03-04 21:11:55 +05:00
2c3c8fbaed Docs: early exist build process on error
Don't attempt to build docs when generation fails.
2016-03-04 21:11:55 +05:00
02b0f51164 Docs: Add missing context members 2016-03-04 21:11:55 +05:00
61e848280e Fix T47596: Bone motion path - confusing UI in 3DView tools.
Now using same UI as in object/armature properties, also save one line in 3DView panesl. ;)

Nothing crucial there, but nice & safe to backport to 2.77 imho.
2016-03-04 21:11:55 +05:00
e956ebd0f9 Fix T47593: 'Move to layer' will be crash in blender 2.77rc1.
To be backported to 2.77.
2016-03-04 21:11:54 +05:00
43429578d3 fix, should need to fracture only once now in case you enable split shards to islands with constraints or clusters on 2016-03-01 20:36:36 +01:00
9c33f3db3f partial fix for suddenly missing self-collision of shards of the same object, this happened even after converting to regular rigidbodies when disable collisions was active ! (so this is now off by default) 2016-03-01 18:27:42 +01:00
66ffb880bc fix for loading inner vertex groups and set min weight for passive vertexgroups to 0.01, just keeping it > 0 did not yield correct results when passive vertexgroups were used 2016-02-28 10:24:37 +01:00
1b85ceabc5 fix for loading files, need to skip "empty" shards which dont have any mesh info because they didnt intersect with the original geometry, before this each meshisland stored a temp shard, now we lookup shards out of the shard map instead, but this could point to such empty shards, leading to incorrectly loaded files. 2016-02-27 14:06:33 +01:00
b594b25dad Fix: "Twist" GP Sculpt brush in 2D Editors was unusable... now mostly usable, if still slightly offset 2016-02-26 13:32:47 +01:00
9c474b187a Fix: "Twist" GP Sculpt brush didn't work well in 3D View 2016-02-26 13:32:44 +01:00
4df911aa58 2.77 splash
by Pokedstudio
2016-02-26 12:53:40 +01:00
00ca17acaa Blender 2.77 release: Point submodules to a release branches 2016-02-26 12:12:11 +01:00
f0f38731db fix for wrong transformation of shards after loading (and fix for potential crashers while loading) 2016-02-21 19:53:04 +01:00
3db5b76201 compile fix after merge 2016-02-21 13:27:46 +01:00
1c09344dba Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	CMakeLists.txt
	SConstruct
	build_files/build_environment/install_deps.sh
	build_files/scons/tools/Blender.py
	build_files/scons/tools/btools.py
	extern/CMakeLists.txt
	extern/SConscript
	extern/bullet2/CMakeLists.txt
	intern/cycles/blender/blender_camera.cpp
	intern/cycles/blender/blender_texture.cpp
	intern/cycles/kernel/geom/geom_triangle_intersect.h
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/svm/svm_voxel.h
	intern/cycles/util/util_path.cpp
	intern/ghost/intern/GHOST_ContextGLX.cpp
	intern/iksolver/intern/IK_Solver.cpp
	release/datafiles/locale
	release/scripts/addons
	release/scripts/startup/bl_ui/space_userpref.py
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenkernel/BKE_bvhutils.h
	source/blender/blenkernel/SConscript
	source/blender/blenkernel/intern/DerivedMesh.c
	source/blender/blenkernel/intern/armature.c
	source/blender/blenkernel/intern/cdderivedmesh.c
	source/blender/blenkernel/intern/editderivedmesh.c
	source/blender/blenkernel/intern/image.c
	source/blender/blenkernel/intern/mesh_remap.c
	source/blender/blenkernel/intern/particle.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenlib/intern/string.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/interface/interface.c
	source/blender/editors/interface/interface_handlers.c
	source/blender/editors/mesh/editmesh_knife.c
	source/blender/editors/mesh/editmesh_select.c
	source/blender/editors/object/object_bake_api.c
	source/blender/editors/space_graph/graph_ops.c
	source/blender/editors/space_outliner/outliner_intern.h
	source/blender/editors/space_outliner/outliner_tools.c
	source/blender/editors/space_sequencer/sequencer_edit.c
	source/blender/editors/space_view3d/drawmesh.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_input.c
	source/blender/editors/transform/transform_snap.c
	source/blender/makesdna/intern/makesdna.c
	source/blender/makesrna/SConscript
	source/blender/makesrna/intern/SConscript
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/makesrna/intern/rna_nodetree.c
	source/blender/makesrna/intern/rna_rigidbody.c
	source/blender/modifiers/SConscript
	source/blender/python/mathutils/mathutils_geometry.c
	source/blender/render/extern/include/RE_render_ext.h
	source/blender/render/intern/source/bake_api.c
	source/blender/render/intern/source/pipeline.c
	source/blender/render/intern/source/pointdensity.c
	source/blender/render/intern/source/renderdatabase.c
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_files.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
	source/gameengine/Ketsji/BL_Action.cpp
2016-02-21 13:27:17 +01:00
eca5449a29 change: let fluid move down across other modifiers in case it will be added after fracture which has a couple of other modifiers above it (exception for fluid only, since it can handle shards) 2016-02-11 11:55:30 +01:00
1051f71291 fix for material loading in FM external mode and generally decreased file loading times, especially noticeable with large FM objects, by using sorted fd->datamap in readfile.c (avoids linear search) 2016-02-09 17:45:34 +01:00
ca21fc8b55 fix, forgot to activate plastic connection handler in external mode 2016-02-08 21:49:40 +01:00
f66e70a855 fix for external mode material collection function 2016-02-08 17:24:51 +01:00
00ccb99a67 fix for name and indexbased meshisland and meshconstraint lookup via python inside the FM 2016-02-05 12:29:23 +01:00
9c744358a5 fix: there was a speed regression when building many constraints during fracture or after loading 2016-02-04 23:14:10 +01:00
80def34da1 some more mutex locking for dynamic fracture, there still were crashes when interactively moving dynamic objects during running sim 2016-02-04 20:19:57 +01:00
25057ba379 added threading lock to modifier sync during rigidbody object sync, helps against crashes in dynamic mode 2016-02-04 19:53:45 +01:00
2b0a6aa5bc improved output of constraint impulse visualization a bit, included name, impulse and threshold as well as attempted to offset strings at same position 2016-02-03 19:37:54 +01:00
03db2ca8e7 windows compile fix 2016-02-03 16:14:28 +01:00
5a834c1608 added constraint impulse visualization (very basic only) and reworked the mesh constraint name system 2016-02-03 14:46:31 +01:00
55b2d46f15 compile fix for windows and mac 2016-02-02 15:47:06 +01:00
b1e4964ede added basic physics visualization for viewport rigidbodies like in game engine (its optional and can be turned off) 2016-02-02 14:01:46 +01:00
9e9bbed144 ignore individual mesh island transforms in rigidbody system again and just re-apply them when converting back to objects, it just caused trouble and brought not the expected result 2016-02-01 14:02:30 +01:00
509bf61c21 fixes for: did assume autohide material was always at number 1, did change to find inner material number, own verts transformation bug, shards to islands delay bug (needed to click twice before), and some crashers with dynamic and prefractured as well as reduced a memoryleak in prefracture mode 2016-01-31 22:45:30 +01:00
87f895311f some more effort to make FM simulation results looking closer to BCB simulation results 2016-01-31 01:59:35 +01:00
12f7fd5a08 attempt to reduce a memoryleak 2016-01-30 16:42:34 +01:00
03a4109930 exposed bullet tick callback to bpy.app.handlers, also wrapped the passed timestep into the rigidbody world, so it can be accessed too 2016-01-30 16:03:26 +01:00
b85da312f0 fixes for dynamic and external mode, in external mode each simulation run should be consistent with the prior ones now 2016-01-30 15:57:56 +01:00
819bc74e22 fix, small typo in appliedImpulse soft limit (read only) 2016-01-29 11:11:37 +01:00
c073d7cf60 added appliedImpulse() to regular constraints too 2016-01-28 23:30:39 +01:00
0c4939c013 added a RNA function to read the appliedImpulse from each constraints live, during simulation (slow when done from a python frame handler over all constraints) 2016-01-28 23:04:12 +01:00
39e00e5959 fix: dynamic mode didnt work at all anymore and has still some issues like flickering after baking and a crasher on exiting blender, also testwise enabled autoexecute on prefracture during sim 2016-01-28 21:01:14 +01:00
0ab52e7f51 fix: added extra update call on hook object in custom modifier evaluation 2016-01-27 23:46:38 +01:00
84696d3c75 fix: forgot to accumulate differences of multiple hook modifier changes 2016-01-27 21:58:08 +01:00
d5d33dbd40 fix: fake parenting in testfile didnt work anymore after fake hook was added to code, now both should work depending on whether the kinematic flag is set (=parenting) or not (=hook, if vertexgroup and hookmodifiers are used) 2016-01-27 21:19:05 +01:00
45435120f3 fix for silly brace mistake, which led to crash with fracturing a default cube 2016-01-27 20:08:21 +01:00
bcc260c778 improved the fake hook system, should behave now exactly as a regular hook and added some FM code comments to plan further work. 2016-01-27 18:23:15 +01:00
2cbd8c9d44 added handling of vertexgroups and a fake hook system inside the FM, so passive shards can be influenced by hook modifiers via vertexgroups. 2016-01-26 21:34:05 +01:00
5ad7a248a3 fixed two crashers: 1) when object had no material, that assignment failed. 2) constraints with empty meshislands crashed too 2016-01-26 01:03:12 +01:00
0adaddd4c4 fix for passive parenting hack, it was not taken into account after transforming the object interactively 2016-01-25 17:58:27 +01:00
1dd3595443 added a fake parenting for passive shards, those are simply moved with the object itself, so you can parent the entire object and have exact motion data in the passive shards 2016-01-25 17:47:18 +01:00
e29680e0e2 forgot to take some rigidbody settings into account during object conversion 2016-01-24 19:11:03 +01:00
6efacde5c0 fix for possible rotation glitch when converting back to objects 2016-01-24 17:46:35 +01:00
7023be40be fix for Fracture Modifier to object converter (external mode), not all settings were taken into account, and object disappeared when not being on startframe, but as converting mid-sim yields unexpected results, still limiting conversion to startframe, added a notification for this 2016-01-24 17:18:28 +01:00
d50a3d7097 added dynamic threshold adaption in case of changing timesteps for plastic constraints, also enabling plastic constraints in case they enter plastic state now 2016-01-24 15:51:13 +01:00
62ac065a4c fix for windows only: avoiding changing the global locale avoids slowdown in windows string operations 2016-01-24 13:02:34 +01:00
e476e50b61 fix: spring constraints were not created properly while setting up the simulation 2016-01-24 00:57:17 +01:00
90b76659ca some more fixes to have proper plastic constraint support 2016-01-23 21:40:40 +01:00
0384b49e14 fix for material assignment to meshislands, dont create unnecessary material slots any more 2016-01-22 10:33:20 +01:00
50e308c19c taking now all constraint properties into account when converting back to objects 2016-01-22 01:56:31 +01:00
7b4a37b1b0 partial fix, take proper constraint locations and rotations into account when converting back to objects, but todo, take own object transform into account too 2016-01-22 00:36:14 +01:00
8e79bae2eb added names for meshislands, can now convert back to named objects, added load / save support (was missing) 2016-01-22 00:00:29 +01:00
3d36d357c2 fixes for the monitoring logic of plastic constraints, again 2016-01-21 19:42:27 +01:00
e2670b3814 fixes for correct rotation calculation in prefractured and external mode 2016-01-21 12:02:00 +01:00
7c3c6f8310 used more exact angle calculation method for external mode, different formulae for tolerances, and some cleanup of obsolete stuff. 2016-01-21 02:12:48 +01:00
7761311305 added material handling (so meshislands get correct materials from original objects) and added plastic tolerance values, which are taken into account with special simulation mode only. 2016-01-20 23:30:55 +01:00
340798fe56 reduced a performance bottleneck when adding many constraints in a loop, do not trigger modifier updates or set validate flags or even call bullet functions... but todo is to keep a useful update mechanism 2016-01-20 18:42:49 +01:00
b8c63aead5 avoid resetting cache (and iterating possibly through the rigidbody group) when adding mesh constraints 2016-01-20 00:40:22 +01:00
3553669d12 attempt to make mesh island packing faster when being called in a loop, create the dm only once after packing 2016-01-20 00:23:33 +01:00
35701ed26e crash fix in FM refresh operator (null pointer access) 2016-01-19 23:23:43 +01:00
982f94f269 rigidbody type on meshisland should be taken into account now properly and be settable, also adding new constraints should happen faster now (when called in a loop) 2016-01-19 21:20:28 +01:00
eb8af755dd further attempt to fix "plastic constraint" logic (external fracturing mode only) 2016-01-19 19:02:55 +01:00
dede676e90 implemented some special constraint breaking method further (plastic constraint breaking), for external fracturing mode 2016-01-18 21:59:07 +01:00
1ae8bcc8e6 exposed per-constraint breaking angle and distance to python (for external mode only, for now) 2016-01-18 19:55:10 +01:00
b800df49d7 fixed constraint restore with external fracture mode (using participants instead of jumping around in list, which messes up the iteration loop) 2016-01-18 18:03:20 +01:00
66242f5e76 constraints transformation fix, transformations are updated on validation now 2016-01-18 01:33:45 +01:00
df389e31d6 first successful simulation attempt with a bigger test data set, todo... set constraints relative to object , multiply with obmat during evaluation 2016-01-18 00:51:44 +01:00
8d58ffe0be extended FM python API: constraints have now settable locations and rotations, additionally there is an highly experimental constraint breaking mode (for external fracture mode ONLY) 2016-01-17 19:33:06 +01:00
f7fa6906e6 initial, basic python API for Fracture Modifier contents: mesh_islands and mesh_constraints are createable, removable externally prior to running the simulation (in special "External" fracturing mode) so you can pack objects into the modifier (as mesh islands) and set constraints to connect them. This can happen in immediate update mode or updating is done via refresh operator. You can also have read access for island data after simulation, to dump the results. 2016-01-17 16:14:48 +01:00
b1c3782c46 added activation by force, if force exceeds an adjustable threshold, kinematic rigidbodies get activated / triggered by a force field 2016-01-14 13:04:10 +01:00
84d8b15a18 set shards to passive if shard weight (average vertex weight) is > 0.0f instead of 0.5f, this allows to keep shards passive in case they dont get enough weightpaint (in case they are inside, and interpolation of weights is not enough) 2016-01-06 18:27:46 +01:00
d34550c126 fixes: lower stability factor now lets the object break earlier ( effect was inverted) and added uv_layer to fracture presets (was missing) 2016-01-05 15:55:20 +01:00
093a5501bf taking stability factor now into account at dummy constraint calculation for compounds, it influences search radius and limit now, too 2016-01-04 21:08:49 +01:00
9ad72754c6 attempt to get more control over compound destruction behavior during simulation, with stability factor; recursive breaking of neighborhood happens if one connection breaks 2016-01-04 19:46:13 +01:00
f1981b3cfc partial fix for displacement / autohide flicker problem, happens now only with automerge (occasionally) and with automerge + fix normals (regularly), but for displacement and glass you mostly need only autohide; automerge and fix normals are for smooth objects where cracks should be nearly invisible (after fracturing) 2015-12-30 20:47:25 +01:00
24ff36d84b added an autohide filter group, its helpers can be used to animate revelation of cracks which are hidden otherwise. This is basic revelation functionality via object locations and sizes only. 2015-12-28 15:04:07 +01:00
d8b561de76 fix: make sure a rigidbody exists on each mesh island after loading when trying to access it 2015-11-29 19:59:47 +01:00
5d554ca7ea enabled trigger in dynamic fracture again, fix for cache stopping problem as well 2015-11-10 09:54:55 +01:00
2ea86a8817 fix for dynamic fracture rotation glitch (was wrong calculation) 2015-11-09 10:59:46 +01:00
5f796ef1ef attempt to fix customdata related memoryleak... it has been reduced, but isnt completely gone yet 2015-11-06 12:55:58 +01:00
e237ef3a40 minor fix for removed fracture setting in preset 2015-11-04 18:07:30 +01:00
e141527ddb Merge remote-tracking branch 'refs/remotes/origin/blender-v2.76-release' into fracture_modifier
Conflicts:
	release/scripts/addons
	source/blender/windowmanager/intern/wm_operators.c
2015-11-04 18:01:12 +01:00
0076ba4833 deactivated the unfinished multiple fracture settings per object for now, didnt work properly 2015-11-04 15:21:27 +01:00
ca18f5ddd4 added inner uv map setting, which will contain only inner face's UVs, useful for texture based inner smoke in conjunction with fracture modifier 2015-11-04 15:05:19 +01:00
f337feaf5a BLender 2.76: We go 'b' series now 2015-11-03 15:56:35 +05:00
936a685ea8 Don't expand toggle brush on linking
Toggle brush is more a runtime only feature, not really supposed to be used
as real ID linking as it's done for modifiers i.e.
2015-11-03 15:49:54 +05:00
b8438a870d Fix T46626: Crash generating previews
Brush.toggle_brush was allowed to be an invalid pointer,
it worked for the one operator that used it - but in general bad practice,
requiring a lookup on every access.

Ensure the pointer is kept valid now.
2015-11-03 15:49:38 +05:00
e5ccc1e19d Fix/workaround T46622: crash w/ metas & particles
Metas are scanning all scenes duplis,
which can go into particle systems without an initialized derived-mesh.

For now just do NULL check, its not correct but real fix is not fitting well with current design.
2015-11-03 15:49:18 +05:00
3c54514354 dynamic fracture should be bake and saveable now, but still has rotation glitches and glitches with change in mesh island sequence. 2015-11-02 14:12:15 +01:00
d7daecccbd Fix T46651: Select linked crash w/ wire seam edges 2015-10-31 19:26:47 +11:00
b611bdb629 Revert "Fix T46494: Can't de-select a face w/ mixed modes"
This reverts commit 381501ab45.
2015-10-31 19:26:11 +11:00
c9cd41547c added basic support to clean up keyframes directly after converting to keyframed objects, but you need cache to bake so the operator can run again (and it will refracture automatically, too) 2015-10-30 19:12:17 +01:00
c794d87f12 optimization: when converting to keyframed objects, do not key passive shards any more (as they dont move anyway) 2015-10-30 11:46:51 +01:00
12e4da6c1a Fix T46507: Cycles baking re-orders face
Regression in 2.76, order of tessellated vertices needs to follow MFace tessellation.
2015-10-30 13:43:59 +05:00
de96d1acd1 Blender 2.76a: Fix CUDA compilation on 32bit platform 2015-10-29 20:11:22 +05:00
379a754b83 changed volume calculation method for convex hull and triangle meshes, mass fractions should be calculated more accurately now, but note, might change behavior of older simulations !!! 2015-10-29 15:58:27 +01:00
b5e4cc820b BLender 2.76a: Update addons submodule 2015-10-29 17:26:14 +05:00
bc9f118169 Set blender version to '2.76a' 2015-10-29 22:08:52 +11:00
74055fb813 Cleanup: quiet warning
Not cherry picked, just included for release build.
2015-10-29 21:32:47 +11:00
Dalai Felinto
b1eff080bd Temporary "fix" for crash when saving OpenEXR Multi-View from Image Editor 2015-10-29 21:10:17 +11:00
Dalai Felinto
c2337748e5 Fix T46617 File Output Node seems to save only black images into OpenEXR image data
If the node output had only one layer, it would be detected as singlelayer, and it would miss the blender exr header string
2015-10-29 21:10:17 +11:00
f30a270a70 Freestyle: Fix for 'Distance from Object' modifiers without a target object.
'Distance from Object' color/alpha/thickness modifiers without a target
object were raising a run-time exception although it is not considered an
error condition.
2015-10-29 21:10:17 +11:00
424ea476b1 Fix T44231: Freestyle causes crash on render.
The reported crash was confirmed as a segmentation fault in std::sort().
The cause of the crash was traced down to a binary comparison function
that was not satisfying the so-called strict weak ordering requirements of
the C++ standard sorting function.  Specifically, the comparison operator
has to return false when two objects are equivalent (i.e., comp(a, a) must
be false), but that requirement was not met.

Since the binary comparison operator in question could be a user-defined
Python function, here a safety measure is implemented in the C++ layer to
make sure the aforementioned requirement is always satisfied.
2015-10-29 21:10:17 +11:00
1823e56625 Follow up to previous commit, proper fix for T46284, incorrect Texture
shading in Texture paint mode and cycles
2015-10-29 21:10:17 +11:00
25beefa8dd Revert "Fix T46284: Texture paint, wrong shading mode"
Should fix T46616 but will reintroduce T46284.
The second, original bug needs different handling

This reverts commit 904db487a7.
2015-10-29 21:10:17 +11:00
887e5cb7b0 Fix T46605: Compositing causes access violation when rendering from command line
Seems was caused by the race condition in the stats printing, should be all fine now.

Nice for 'a' release.
2015-10-29 21:10:16 +11:00
4eb34dbc88 OpenSubdiv: Fix wrong handling of vertex parent
Vertex parent was not registered as CPU data requirement.

Should be in the 'a' release.
2015-10-29 21:10:16 +11:00
8026a1d543 Fix T46606: Trackball Rotate jumps releasing shift 2015-10-29 21:10:16 +11:00
13c473f707 Fix broken comment about our WM progress report for python (its not a progress bar at all). 2015-10-29 21:10:16 +11:00
c2e7f6d5b4 Fix T46604: Crash in ChainPredicateIterator instantiated without predicates.
Also fixed a potential crash in the copy constructor case.
2015-10-29 21:10:16 +11:00
349abb5f58 Freestyle: minor speed-up by omitting the calculation of the smallest edge size.
BlenderFileLoader tries to find the smallest edge size but the computed value is not used.
2015-10-29 21:10:16 +11:00
299f647004 Fix: Prevent warnings from popping up when trying to edit driver expressions from buttons
Previously, a warning was added to provide feedback to users trying to change the values
of driven properties why their edits would not have any effect on the propeerty. However,
it turned out that instead of only showing up when the user tried to increment/decrement/slide
the property's value, it was also firing everytime they were trying to edit the expression.
That however is not what we want at all!

This fix assumes that BUTTON_STATE_TEXT_EDITING is used for expression editing, and
BUTTON_STATE_NUM_EDITING (or everything else) refers to the user trying to adjust the
value normally.
2015-10-29 21:10:16 +11:00
1ce73aa72b Fix T46599: Copy Rotation behaves erratically when Use Y is disabled
When the "Use Y" option in the Copy Rotation constraint is disabled, the constraint
behaves eratically when rotating all the target on all axes at the same time.
This is partially to be expected due to the way that euler rotations work
(i.e. the rotation orders stuff - you should use a rotation order based on most to
least important/significant rotations). Hence, by locking Y, you're causing accuracy
problems for Z.

What was not expected though was that changing the rotation orders on the objects
involved (for the record, it's the constraint owner that counts) did nothing.
It turns out that for objects, the rotation order settings were getting ignored!
This commit fixes this problem, and this particular case can be resolved by using
"XZY".

Notes:
* Since all object constraints were previously working on the assumption that they
  used XYZ (default) order, it is possible that this change may have the unintended
  consequence of changing the behaviour of some rigs which relied on the buggy
  behaviour. Hopefully this will be a rare occurrence.
2015-10-29 21:10:15 +11:00
4081dab9d5 Fix: Missing update after scrubbing time in Graph Editor
Sometimes the timeline header didn't update after time-scrubbing in the graph
editor ends, leaving the "Pause" button visible until the next refresh of the
timeline (e.g. on mouse over)
2015-10-29 21:10:15 +11:00
ebc899790b Fix: X-axis values in Graph Editor should not be displayed as timecodes in "Drivers" mode 2015-10-29 21:10:15 +11:00
95cc31fdcd Fix error in bone UI 2015-10-29 21:10:15 +11:00
50ecd510bb Fix invalid exceptions w/ preview API
D1575 by @januz
2015-10-29 21:10:15 +11:00
ca51398fd8 Fix T46538: Mark and Clear Seam in UV Editor, assigning Hotkeys.
UV Editor keymap is not bound to a given editor (spacetype)...
2015-10-29 21:10:15 +11:00
ff5a34e370 Fix related to T46538: do not popup choice menu of mark/clear seam UV editor op invoke when prop is already set! 2015-10-29 21:10:15 +11:00
4aac73a86f Correct own error w/ snap-scale T46503
Don't use nan for comparisons.
2015-10-29 21:10:15 +11:00
d1c6364099 Fix ffmpeg memory leaks
- audio_stream wasn't freed.
- audio/video stream + context weren't freed on failure.
2015-10-29 21:10:15 +11:00
c01e9cefe1 Fix ffmpeg saving long paths
Was checking wrong length on string copy.
2015-10-29 21:10:14 +11:00
e54f38ebf0 Fix for error w/ RenderView in ImageView list 2015-10-29 21:10:14 +11:00
15364094d0 Fix snap-scale w/ axis constraint
Related to T46503,
fix only worked when the snap target was axis-aligned.
2015-10-29 21:10:14 +11:00
62a973db31 BGE: Fix T46556: check on null sound datablock pointer. 2015-10-29 21:10:14 +11:00
3f067c61a0 Cycles: Watertight fix for SSS intersection
Same as previous commit, just was missing in there.
2015-10-29 21:10:14 +11:00
673bc6d65a Cycles: Fix for watertight intersection
It was possible to miss some intersection caused by wrong barycentric
coordinates sign.

Cases when one of the coordinate is zero and other are negative was not
handled correct.
2015-10-29 21:10:14 +11:00
ce268f6005 Fix T46521: Python: bvh.ray_cast doesn't find a plane facing in the other direction under certain circumstances
The issue was caused by wrong sign check. It originally came from more optimized
Cycles code where because of other reasons it wasn't visible yet. But in fact it
should be solved there as well.
2015-10-29 21:10:14 +11:00
54f1e682c6 Fix T46569: Crash w/ mask & locked-track enabled 2015-10-29 21:10:14 +11:00
4d581c01cc Fix T46561: Crash in outliner delete hierarchy
When children & parents were selected in the outliner,
it attempted to free the the object twice.
2015-10-29 21:10:14 +11:00
e1f5433f1d Fix T46565: Movie render crash w/o permissions
Rendering to a path that didn't have write permissions would crash.

Also fix error where `G.is_rendering` was left set when rendering failed.
2015-10-29 21:10:13 +11:00
7d070f97ad Fix T46524: Use Alpha (Straight/Premultiply) option missing in 2.76, part II.
Different issue actually, here RAWTGA was simply forgotten in the alpha-capable formats...
2015-10-29 21:10:13 +11:00
e8b3ba2983 BGE: Fix physics meshes conversion with modifiers.
Previously meshes with modifiers were considerate as empty (no polys).
2015-10-29 21:10:13 +11:00
be4ee42e1c Fix T46544: Can't unpack generated image 2015-10-29 21:10:13 +11:00
bedc58ac4e BGE: Fix T46381 : last action frame not updated.
It fix T46381. Normally BL_Action::Update (manage action time, end, loop…) should be called the same number of times as BL_Action::UpdateIPO (update action position, scale ect… in the game object).
But the bug report shows that UpdateIPO is called one less time than Update. To fix it i revert the commit 362b25b382 and implement a mutex in BL_Action::Update.
Example file : {F245823}

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

Reviewed By: youle, moguri, sybren

Maniphest Tasks: T39928, T46381

Differential Revision: https://developer.blender.org/D1562
2015-10-29 21:10:13 +11:00
349609c743 Fix T46529: Unwrap UV w/ use-subsurf fails
Regression since moving to looptri.
2015-10-29 21:10:13 +11:00
60ad008162 Fix T46531: Cannot use % in filenames.
Same case as with space char really, one should not use those special chars in
filenames, but they are globally supported by all current FS/OS, so no real reason
to enforce that behvior on users here.

To be backported to 'a' release.
2015-10-29 21:10:13 +11:00
34def18764 Fix T46520: mathutils.bvhtree crashes with distance input.
Should be backported to 'a' release.
2015-10-29 21:10:13 +11:00
0afdd1139b Fix T46524: Use Alpha (Straight/Premultiply) option missing in 2.76 for DDS files.
All optional image format are not #define'd in submodules like DDS read/write code.
This means values of `eImbTypes` would not always be the same in all contexts, yuck!

This is a regression and should be backported to 'a' release.
2015-10-29 21:10:12 +11:00
59c1a96975 Fix T46429: Movie clip is deformed by resolution multiplier when offset is added in sequence editor. 2015-10-29 21:10:12 +11:00
f81ecf117f Fix broken CD_NORMAL interpolation callback (would generate non-unit vectors).
Even if the weights are normalized, the weighted sum of normalized vectors
usually does **not** give a normalized vector (unless all source vectors
are aligned).

This probably was not a big issue in most cases, since we usually interpolate
similar vectors here - but still!
2015-10-29 21:10:12 +11:00
cde725e26f Fix T46508: data_transfer of normals fails in case objects are transformed.
The final stage of the process (copying/interpolating new dst cddata from src cddata)
was simply broken in normal case, where we need to convert from source to destination
object space.

This patch is a bit verbose, but I cannot see how to avoid it really.

To think this code is in master since over 6 months and it only gets reported now... :/
2015-10-29 21:10:12 +11:00
42b6d843bd Mesh remapping: fix loop 'best matching normals' not using transform space.
Also, cleanup, reduce declarations of tmp_co/_no...
2015-10-29 21:10:12 +11:00
6c1b73c0da error in last commit 2015-10-29 21:10:07 +11:00
ff3913d1ec Fix for missing id_lib_extern, assigning ID's 2015-10-29 21:08:50 +11:00
dfba50bf6a Fix T46502: Linked dupli-group lost on reload 2015-10-29 21:06:42 +11:00
9a5d74a998 Fix T46503: Snap scale fails using corner pivot 2015-10-29 21:06:41 +11:00
40e69a6e95 Fix crash pressing +/- in file-selector
Filenames over 128 chars would crash.
Move BLI_newname into file_ops,
this was only used in one place and isn't all that re-usable.
Also remove special behavior for 4 digits.
2015-10-29 21:06:41 +11:00
ab6c7c5888 Fix crash w/ PlayAnim & long filenames
Paths >128 chars could crash.
Replace BLI_newname with direct BLI_stringenc/dec use which makes more sense in this case.
2015-10-29 21:06:41 +11:00
040c9ae55c Fix T46493: Wrong camera zoom blur with non-unit pixel aspect 2015-10-29 21:06:41 +11:00
381501ab45 Fix T46494: Can't de-select a face w/ mixed modes 2015-10-29 21:06:41 +11:00
7d25105290 Fix memory leaks in PlayAnim
Was never freeing filenames or pictures.
2015-10-29 21:06:41 +11:00
2f1bab75d7 Fix T46465: Lag scrubbing w/ PlayAnim 2015-10-29 21:06:41 +11:00
c1990affac PlayAnim: avoid list count setting frame from mouse 2015-10-29 21:06:41 +11:00
5acb0ba569 Fix T45900: Allow again white spaces in file names.
Should probably be added to 'a' release, should we do one...
2015-10-29 21:06:41 +11:00
ae1335f7cf Fix T46483: vertex/edge slide with correct UVs sometimes pinning UVs. 2015-10-29 21:06:40 +11:00
e5ee9d1eff Fix related to T46223: memory leak when loading multilayer multiview images.
Differential Revision: https://developer.blender.org/D1549
2015-10-29 21:06:40 +11:00
061f20112e Fix T46223: multiview image sequences crashing.
Differential Revision: https://developer.blender.org/D1549
2015-10-29 21:06:40 +11:00
7d31777d71 BGE: Fix animations update when scene is suspended. 2015-10-29 21:06:40 +11:00
50dd619e88 Fix T46487: OpenSubdiv objects are invisible in Blender Internal "Rendered" viewport mode 2015-10-29 21:06:40 +11:00
228625b9fb Fix T46453: JPEG quality not stored in file
This is a feature unique to jpeg that would store the quality it was saved.

- Use struct instead of bit-shifting.
- No longer store the 'flag'.
2015-10-29 21:06:40 +11:00
57d919c1ec Cleanup: remove historic, blender-only jpeg io 2015-10-29 21:06:40 +11:00
a5a58ec140 Fix T46284: Texture paint, wrong shading mode
Project-paint now supports painting to cycles materials.
2015-10-29 21:06:40 +11:00
1632a5503b Missed this in previous commit... 2015-10-29 21:06:39 +11:00
51a13869bc Fix T46467: Clean Keyframes removes the channels. 2015-10-29 21:06:39 +11:00
f4c22ac4b6 Fix T46002: mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments.
Ugly issue really, but at least doc now matches behavior of the function. :|
2015-10-29 21:06:39 +11:00
2e4d580f9d Fix T46450: Seams from islands, wont show 'Sharp' 2015-10-29 21:06:39 +11:00
8af2029ca5 Fix T46458: BGE Crash on load
regression from 96dd213e7
2015-10-29 21:06:39 +11:00
5ea4f5b4a3 Fix T46447: fix build on non-x86 platforms. 2015-10-29 21:06:39 +11:00
ff01b24ecd Fix T46446: texture nodes image node not working with image sequences. 2015-10-29 21:06:39 +11:00
cdc8f4d65a Fix T46434: Shear w/ local-center & editmode fails 2015-10-29 21:06:39 +11:00
ae4b02c6bb Fix T46444: Crash importing DAE w/ empty armature 2015-10-29 21:06:39 +11:00
a5938e01e5 Cycles: Increase number of textures allowed for OpenCL render
Currently OpenCL devices are packing images into a single texture,
which means technically number of textures is not limited here.

Now OpenCL will use same number of textures as CPU. If we want
to bump number of textures further, this values are to be modified
in sync.

NOTE OpenCL still does not support float textures.

Original patch from a guy called bliblubli in the tracker with
some own modifications.

Reviewers: brecht, dingto, sergey

Differential Revision: https://developer.blender.org/D1530
2015-10-29 21:06:38 +11:00
d039cc69dc Fix T46441: texture paint soften brush at 0 strength works at full strength. 2015-10-29 21:06:38 +11:00
70549fe8e0 Fix T45152: multiview/stereo render not working with Freestyle + Cycles. 2015-10-29 21:06:38 +11:00
9bfc5fc7b5 Fix T44048: freestyle lines in Cycles are in the wrong color space. 2015-10-29 21:06:38 +11:00
c24d88d488 Fix T46437: Make progress report py helper resitent to 'zero steps' passed value...
To be backported, should we need an 'a' release.
2015-10-29 21:06:38 +11:00
a66d700fa7 small fix for potentially unintended calculation 2015-10-28 19:43:01 +01:00
2ccdaf398e changed calculation of stability factor for compounds and adapted UI a bit (for compounds) 2015-10-28 17:38:34 +01:00
12806f5ef8 disabled damage propagation (and settings) in code and ui, was slow and not really necessary, also fixed a crash which happened when freed bullet manifolds were used again. 2015-10-28 16:43:40 +01:00
e6d181c01a tiny fixes for autohide and attempt to get rid of propagateDamage crashes (again) 2015-10-27 13:19:46 +01:00
e3254e3615 attempted fixes for : autohide, damage propagation in compounds (was crashing after some time) and compound parameter changes do reset the cache now, too 2015-10-27 11:32:48 +01:00
2dfdbe4081 calculating minimum impulse per object now, also made solver iteration settings not visible for compounds any more (they relate only to constraints) 2015-10-26 20:25:59 +01:00
5cb7c07e31 attempt to fix some (stack overflow related ?) crashes 2015-10-26 15:34:40 +01:00
fe4909e752 tiny fix, forgot to assign ids to meshislands in splitshards to island mode 2015-10-26 14:43:36 +01:00
e2a01d408d small fix for ui description of mass_threshold_factor 2015-10-25 09:41:32 +01:00
3c8876c5a1 new parameter "stability factor" (for constraints, compounds) and resetting all shards by default now on refracture, except in mousebased fracture (faster to keep unchanged shards there) 2015-10-25 09:27:37 +01:00
d64c367560 some enhancement attempts for compounding, supposed to be better controllable in some cases, but still odd behavior with multiple compound objects 2015-10-24 13:01:03 +02:00
5019780664 fix for triggers and multiple compound objects (but compound building is slower again, due to necessary broadphase handles for triggers) 2015-10-23 18:45:28 +02:00
d72a489ddb exposed a couple of compound damage propagation parameters, need to test still to find good values 2015-10-23 12:02:41 +02:00
42f644204c windows compile fix 2015-10-22 21:53:18 +02:00
8611d01c68 crash fix in propagateDamage, checking for index being smaller than connection size now 2015-10-22 19:58:08 +02:00
ba39be6bc3 speed enhancement for building compounds (omitting broadphase handles) and successful test with clusters, values need a bit tweaking but basic principle works 2015-10-22 13:16:42 +02:00
a7b45823be added very basic damage propagation scheme to compoundbased fracture (direct damage is too small, can be increased this way, but you mostly get single parts falling off only) 2015-10-21 17:32:01 +02:00
b212d62340 some fixes for compound method, but still not very well controllable 2015-10-21 15:18:26 +02:00
597936b3fb new feature: attempt to accelerate simulation of many adjacent shards by compounds; todo... improve connectivity check 2015-10-20 21:31:29 +02:00
962480865a fracturing multiple settings seems to work (again) but todo: splinters, multiple islands / setting, constraints 2015-10-18 11:25:52 +02:00
0eae9ab115 fix attempt for splinters, did crash.. now works but its incorrect for multiple settings 2015-10-17 17:49:10 +02:00
9168aface9 small fix for multiple fracture settings (but, other files still dont work with it, investigating... 2015-10-17 15:47:03 +02:00
4a2dad0f8d multiple fracturing settings seem to work, but tested with 1 file only for now... 2015-10-17 15:28:21 +02:00
ade29c9713 fix for older blends, so they work as before again 2015-10-16 21:13:32 +02:00
e0fdc8279c experimental new feature: multiple fracture setting per predefined mesh island, delimited by a vertexgroup per island 2015-10-16 20:48:15 +02:00
c2730a8554 dynamic fracture, another improvement attempt, still a bit jerky movement 2015-10-14 20:01:41 +02:00
45d9914ac3 dynamic fracture: attempt of fixing rotation, its better than before but still not 100% correct 2015-10-14 18:16:31 +02:00
9dcabad07b fix for trimesh shape, in case of fracture modifier take physical mesh from each meshisland as shape mesh now 2015-10-11 21:51:58 +02:00
bd5d172bb3 allow to update deforming rigidbody mesh even when vertex count changes (by revalidating it), good for having fluids as deforming rigidbodies for example 2015-10-11 20:53:32 +02:00
48f7dd68f8 Fix T46403: motion tracking not workig with Xcode 7 on OS X.
Caused by use of the uninitialized shape_ variable in Resize().
2015-10-11 11:55:11 +05:00
3ed22c3f3c Revert "Fix T46406: Cycles ignores default socket value associated with group socket"
Fixes T46442.
2015-10-11 11:54:51 +05:00
23f7e16960 Fix/Workaround T46431: blender-softwaregl crashes
Order of initialization bug only impacted mesa's software-gl.

For now effectively revert support for glx-context-flags.
2015-10-10 13:48:35 +05:00
a3cf9c54d8 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-10-09 23:01:22 +11:00
d53af76420 Blender 2.76: Point submodules to updated release branches 2015-10-09 16:40:54 +05:00
51384e7e36 Blender 2.76: Entering release stage 2015-10-09 16:31:46 +05:00
48c50bea72 Fix T46420: Segfault when instancing smoke domain.
Looks like instancing of smoke sim is not supported at all
(was fake-working in 3DView in 2.74, but not rendered).

But it should not crash - code was adding temp 'fromdupli' base to the delayed
drawing list...

Nice to backport this to 2.76 I think.
2015-10-09 16:23:41 +05:00
31d3d434aa Correct own error in editmesh bvh
Flag mix-up and uninitialized var.
2015-10-09 16:23:41 +05:00
f39babc9d6 Fix leak creating 'empty' looptri bvh tree 2015-10-09 16:23:41 +05:00
a67433bc19 Fix T46415: empty node group in GLSL shader has incorrect socket type conversion. 2015-10-09 16:23:40 +05:00
7a93fbc807 Fix T46407: Enabling OSL breaks Vector Transform node 2015-10-09 16:23:40 +05:00
68d5e1d3ae Fix: Do not show "Paste Flipped" in the Dope Sheet's Grease Pencil mode 2015-10-09 16:23:40 +05:00
323851fa71 Fix: "Tweak user" red-alert flag was not getting set on strips on active track
The "tweak user" flag used to flag strips using the same action as the active strip
was not getting set on other strips that live on the same track as the active one.
Strips with this flag set are shown with a red colour to indicate that editing the
action may have the unintended consequence of modifying another strip.
2015-10-09 16:23:40 +05:00
85f5c1a362 Fix T46406: Cycles ignores default socket value associated with group socket 2015-10-09 16:23:40 +05:00
f4ac865367 Cycles: Fix wrong float3->float3 conversion node 2015-10-09 16:23:40 +05:00
dc018d4f61 Fix bplayer (c) 2015-10-09 16:23:40 +05:00
ef7a3fb2fb Fix T46405: Cycles point density missing update when modifying source object 2015-10-09 16:23:39 +05:00
5d0a99b6ee Cycles: Fix for point density always using render settings for modifiers 2015-10-09 16:23:39 +05:00
7980891a13 Fix T46410: VSE Mask ignores animated properties 2015-10-09 16:23:39 +05:00
8d22715d67 Fix T46401: bad step size w/ radians 2015-10-09 16:23:39 +05:00
fe32c438ac BMesh: maintain select-history when sorting 2015-10-09 16:23:39 +05:00
5d59a51aca Fix T45886: cont.deactivate(ActionActuatorInPropertyMode) does not work
Make sure the Action Actuator actually deactivates when given a negative
event while using the property play mode.
2015-10-09 16:23:38 +05:00
ad950be67c Fix mesh validate: 'r_changed' ignored loop edits 2015-10-09 16:23:38 +05:00
a79f439580 Fix game-property use-after-free error
D1538 by @hal01
2015-10-09 16:23:38 +05:00
9713b11644 Fix FileBrowser: do not show 'advanced filter' panel outside of lib browsing context,
it’s only used there so far.

Reported by Thomas Beck (plasmasolutions) over IRC, thanks.

Safe enough for 2.76.
2015-10-09 16:23:38 +05:00
d5e1c9ab9f Fix T46390: Sound sequencer API doesnt' work when built with SCons
The issue was caused by original patch efde4dbb.

This seems to be really old bug, but safe for 2.76.
2015-10-09 16:23:38 +05:00
1b7fc80ecd Fix T46392: Navmesh generator error.
We now have to explicitely enure tesselation of DMs when we need it.

Notes: Maybe we could use looptris here as well?

Not a regression (bug already present in 2.75, but not 2.74), nice to backport to 2.76 nontheless.
2015-10-09 16:23:38 +05:00
9ccec0a288 Fix T46389: Shrinkwrap fails in editmode
Own regression caused by fix for T46067,
edit-mode bvh only contained unselected faces.

This commit adds support for an edit-mode bvh containing all faces.
2015-10-09 16:23:38 +05:00
e95a213f7a Fix T46333: Particle Info Node broken w/ BI
Patch from @a.romanov

This also fixes multiple particle systems - which never worked.
2015-10-09 16:23:37 +05:00
e5a6c542af Cleanup: warning 2015-10-09 16:23:37 +05:00
c647685538 Fix T46375: Inverted scroll in node template menus 2015-10-09 16:23:37 +05:00
1a37144ecd Fix T46354: Curve Modifier does not update (new Dependency graph)
Result of curve modifier depends on transform of the object which should
be reflected by the depsgraph relations.
2015-10-09 16:23:37 +05:00
3b17a650b6 Fix T46377: No python executable in 2.76 rc3 distribution for OSX 2015-10-09 16:23:37 +05:00
f7bc573b60 SCons: Support compilation with 10.11 SK on OS X 2015-10-09 16:23:36 +05:00
971566ba46 Fix T46352: Cycles fails to render when material contains UV mapped texture as volume input 2015-10-09 16:23:36 +05:00
365dadeecc Cycles: Remove redundant coordinate clipping in voxel SVM node
It is now handled via texture extension type.
2015-10-09 16:23:36 +05:00
5c0d68d687 Cycles: Fix missing z-coordinate check in volume sampling 2015-10-09 16:23:36 +05:00
b5ca4ee5b0 Fix T46358: Cycles point density uses repeat extension type 2015-10-09 16:23:36 +05:00
a142beb888 Fix T46305: normal map display issues in viewport when using VBOs. 2015-10-09 16:23:36 +05:00
690621bd24 CMake: detect OS X 10.11 / Xcode 7. 2015-10-09 16:23:35 +05:00
8621f480bf Fix T46368: Subtitle Export: Subtitles are not sorted by time.
We need a temp list of Text effect strips here, to be able to sort it as we want...
2015-10-09 16:23:35 +05:00
b2d325a768 Fix (unreported) broken export of timecodes in SubRip VSE exporter.
Would write 1.04 seconds as `00:00:01,40` instead of `00:00:01,040`...

Anyway, we already have BLI API for timecodes, much better to add
SubRip timecode format there, heavily simplifies code.

To be backported to final 2.76.
2015-10-09 16:23:35 +05:00
9b153763a3 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-09 16:23:35 +05:00
1bc28db0ef Fix memory leak in compositor code with RGB curve nodes. 2015-10-09 16:23:35 +05:00
0c6346379f Cycles: Correction to point density with particle source and world mapping 2015-10-09 16:23:35 +05:00
2976a94c84 BGE: Fix T46302: abort call for unnormalized quaterions. 2015-10-09 16:23:35 +05:00
ea835c8a73 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-09 16:23:34 +05:00
c2d070a3fb Fix T46321: 3D view not refreshed immediatelly after pasting keyframe in dope sheet (for a single channel) 2015-10-09 16:23:34 +05:00
2f7eb53ed0 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-10-09 16:23:34 +05:00
596bf1aff6 allow freeslip / partialslip in fluid with export animated mesh on obstacle, for testing purpose with fracture modifier, attempting to reduce fluid jitter on moving shards 2015-10-08 19:51:42 +02:00
3e4ce322c4 allow deforming rigidbodies now with mesh_source 'FINAL' as well 2015-10-06 22:47:25 +02:00
fb78f6d518 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 21:05:13 +05:00
035d27dca6 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 21:05:06 +05:00
e1c77fb98d 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-30 20:22:59 +05:00
e0a08d50a2 Blender 2.76: Update Release Candidate splashscreen label 2015-09-30 20:09:46 +05:00
7914d04d13 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 20:08:26 +05:00
67dffa60ae 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-09-30 20:08:26 +05:00
ae4fcdc7ba 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-30 20:08:26 +05:00
24615ecab5 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-30 20:08:26 +05:00
6cb20d6287 Cycles: Fix wrong particles min/max calculation for point density
Solves wrong object mapping reported in T46301.
2015-09-30 20:08:26 +05:00
2ecc405b69 Fix T46285: "Select parent" if there is no parent doesn't work correctly. 2015-09-30 20:08:26 +05:00
c3dbb533b2 Fix T46271: switching between textures in texture buttons not updating preview. 2015-09-30 20:08:26 +05:00
0191a618ef Fix T46212: blender internal lights in exclusive light group wrong in viewport. 2015-09-30 20:08:25 +05:00
c31bace2a4 Fix crash reporting render errors during baking. 2015-09-30 20:08:25 +05:00
Julian Eisel
4d76fdd3e9 Fix file browser not sorting file list when opened from editor menu 2015-09-30 20:08:25 +05:00
Julian Eisel
b3d12f65c0 Fix node auto-offset to left broken
Own, really stupid mistake in rBc653077bf56 :| Kids, don't commit at night!
2015-09-30 20:08:25 +05:00
7dcd3a0e0d 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-30 20:08:25 +05:00
7a81cccd1d Fix T46239: Cross effect strip input fields can't be changed (in its properties panel).
Those shall not be editable in UI...
2015-09-30 20:08:25 +05:00
fd964bbf1c 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-30 20:08:25 +05:00
Dalai Felinto
a985bf73e5 Multiview: fix Image Editor not showing Views menu when rendering
non-stereo Multi-View camera rigs (unreported)
2015-09-30 20:08:24 +05:00
ca1809988a Fix T46226: Bake normals multi-res crash 2015-09-30 20:08:24 +05:00
21c00cbd0e 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-30 20:08:24 +05:00
eae90798b6 Fix T46232: Boids crash w/ random rule selection 2015-09-30 20:08:24 +05:00
34bcd2f0ea Fix T46219: Knife cuts fail away from center 2015-09-30 20:08:24 +05:00
Dalai Felinto
99cdafc651 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-30 20:08:24 +05:00
7ea1e5de8d Fix T46222: Eyedrop picking objects inconsistently 2015-09-30 20:08:23 +05:00
3399314a6f Blender 2.76: Point submodules to new commits 2015-09-30 20:07:06 +05:00
39155c1c46 Revert last commit where attempt of keeping autohide state was made 2015-09-27 21:15:44 +02:00
a2ff84c66a attempt to reduce flickering with autohide by memorizing which faces were not deleted in one autohide pass and keeping them, side effect: when playing the sim backwards autohiding wont work properly until reset to start frame again. 2015-09-27 20:50:07 +02:00
479a1a9a1a separate autohide and automerge distances, autohide alone is ok for glass and is faster, while automerge is more useful in conjunction with smooth objects and fix normals, to hide the cracks better, also automerge caused errors with thin glass objects like window panes 2015-09-26 17:47:18 +02:00
e24ea81d65 Fix T46215: Explode modifier looses textures 2015-09-23 19:02:27 +05:00
f6445cd6ae Fix T46217: Make normal artifacts 2015-09-23 19:02:26 +05:00
8db7ca1cca 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-23 19:02:26 +05:00
05ed4a4da1 Update module test to pass w/o freestyle enabled 2015-09-23 19:02:26 +05:00
eca8d9aa02 Update test to RNA API 2015-09-23 19:02:26 +05:00
6b9d496aa5 prevent assert: select-linked UV delimit w/o UV's 2015-09-23 19:02:26 +05:00
c8670f45b9 OpenSubdiv: Fix crash with empty mesh
Reported by newbz in IRC, thanks!
2015-09-23 19:02:26 +05:00
65a56a10bb FFmpeg: Solve memory leak happening on encoding video 2015-09-23 19:02:25 +05:00
96c0aebeae Fix T46194: Crash rendering particles
Off by one error in 38940662
2015-09-23 19:02:25 +05:00
d26fc19fd8 Remove arbitrary simulation time limit in liquid sim. Tested and works fine with more than 100s 2015-09-23 19:02:25 +05:00
f6b0194746 Fix T46201: Popup menu in post_load handler crash
Match regular file loading logic for new-file operator.
2015-09-23 19:02:25 +05:00
a41bdb77d3 Fix bplayer (c). 2015-09-23 19:02:25 +05:00
fe98ce1375 Sequencer: show X,Y in text effect location 2015-09-23 19:02:25 +05:00
a457ad0057 Render: Free persistent image storage when loading new file 2015-09-23 19:02:25 +05:00
d16ee90b9c 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-23 19:02:24 +05:00
c0384c4645 Fix T46159: OpenSubdiv does not always give same results as Blender own subsurf code with crease edges 2015-09-23 19:02:24 +05:00
23427bfebf Fix view-selected w/ custom bone shapes
Was ignoring bone-length, also check that drawing shapes is enabled.
2015-09-23 19:02:24 +05:00
574e859e38 Fix T46186: Panel doesn't update on brush change 2015-09-23 19:02:24 +05:00
869c3344c9 Fix T43715: IK pole target + stretch not working for a single bone chain. 2015-09-23 19:02:24 +05:00
78f4e22dc3 RNA: angle step-sizes were too small
These were ignored previously, so it wasn't noticeable.
2015-09-23 19:02:23 +05:00
Julian Eisel
869736b5d6 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-23 19:02:23 +05:00
cec28ebf5e Fix T46050: blender internal geometry node UV not working inside node group. 2015-09-23 19:02:23 +05:00
3c30467cda Fix T46144: blender internal face texture color wrong in raytraced reflection. 2015-09-23 19:02:23 +05:00
c8200c000a fix build error w/ clang 2015-09-23 19:02:23 +05:00
74b210387f 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-23 19:02:23 +05:00
c08896e2c4 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-23 19:02:22 +05:00
aabb8db753 Fix leak in UI Panels
Switching screens quickly didn't free the panels activedata.
2015-09-23 19:02:22 +05:00
Julian Eisel
139cab0937 Correction to previous commit 2015-09-23 19:02:22 +05:00
Julian Eisel
1358920716 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-23 19:02:22 +05:00
42eb1cc64e 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-23 19:02:22 +05:00
07c3311475 Fix UI crash entering very long strings
Strings exceeding UI_MAX_DRAW_STR weren't null terminated.
2015-09-23 19:02:21 +05:00
141de0cc7f Fix T46148: Sculpt view-clip fails in ortho mode 2015-09-23 19:02:21 +05:00
b0a6d48659 Doc: escape enum name & description
Needed since key enum now uses many characters as they're typed.
2015-09-23 19:02:21 +05:00
c586e30053 Blender 2.76: Update translations submodule 2015-09-17 19:48:06 +05:00
7b8bfec06d Merge branch 'master' into blender-v2.76-release 2015-09-17 19:46:21 +05:00
20bc9aadc6 Blender 2.76: Point submodules to latest release branch from according repos
No tagging is done yet, will happen in a bit.
2015-09-17 18:03:23 +05:00
c86186f030 small crash fix for fast bisect / fast bisect fill 2015-09-12 15:20:35 +02:00
1bd9a911c4 crash fixes for greasepencil edge fracture 2015-08-07 15:38:23 +02:00
f870eee4d4 fix: remove doubles on internal cutter mesh created by (nearly) cyclic greasepencil strokes (so non-manifolds are avoided there) 2015-08-06 21:10:57 +02:00
9263098a7f fix: set cutter axis correctly (RNA called a different function there) 2015-08-06 19:33:05 +02:00
aa8c0143d2 mark "Dynamic Fracture" as WIP 2015-08-06 14:41:32 +02:00
d05a85cd7f compile fixes due to merge 2015-08-06 14:23:10 +02:00
4c52ad04b1 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	CMakeLists.txt
	build_files/cmake/macros.cmake
	intern/cycles/kernel/geom/geom_triangle_intersect.h
	intern/cycles/kernel/kernel_shader.h
	intern/cycles/kernel/svm/svm_closure.h
	release/scripts/modules/bpy_extras/io_utils.py
	release/scripts/startup/bl_ui/properties_data_modifier.py
	release/scripts/startup/bl_ui/space_view3d.py
	release/scripts/startup/bl_ui/space_view3d_toolbar.py
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenkernel/BKE_deform.h
	source/blender/blenkernel/BKE_mesh_mapping.h
	source/blender/blenkernel/BKE_object.h
	source/blender/blenkernel/BKE_rigidbody.h
	source/blender/blenkernel/CMakeLists.txt
	source/blender/blenkernel/SConscript
	source/blender/blenkernel/intern/cdderivedmesh.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/blenloader/intern/writefile.c
	source/blender/editors/animation/keyframes_general.c
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/gpencil/gpencil_ops.c
	source/blender/editors/object/object_intern.h
	source/blender/editors/object/object_shapekey.c
	source/blender/editors/space_action/action_edit.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_fluidsim.c
	source/blender/modifiers/intern/MOD_normal_edit.c
	source/blender/modifiers/intern/MOD_util.c
	source/gameengine/Converter/KX_BlenderSceneConverter.cpp
2015-08-06 14:22:23 +02:00
2c58498e6d fix: properly initialize cluster indices of mesh islands, failing to do so caused different activation behavior when triggering 2015-07-23 17:47:02 +02:00
840cc057a1 crash fix, do not reset shards in dynamic fracture 2015-06-13 10:55:45 +02:00
a8226be315 automatically trigger entire clusters now, if any 2015-06-13 09:22:18 +02:00
a051a76c8a attempt to add a cut by objects / geometry (other FM) option as well as properly resetting shards after fracture parameter change (the latter didnt work properly) 2015-06-07 21:21:06 +02:00
929b0fb444 added possibility to brickify objects, but you need to craft a brick helper object which consists of several islands and covers atleast the bbox of the object to be fractured, and you need to put a fracture modifier which creates just islands on the helper object as well 2015-06-07 16:45:09 +02:00
9a891f26dd fix: limit speed transfer to dynamic objects only, caused severe glitches with prefractured objects 2015-06-06 23:04:44 +02:00
2421696f60 fix : fast bisect algorithms caused misbehavior when refracturing, also removed the forced settings (Mesh shape, constraints) with fractal boolean 2015-06-06 15:50:36 +02:00
73f1c37871 fix: display glitch when triggering shards due to own error in pointcache 2015-06-06 11:19:44 +02:00
c1447bc9ba fix: reducing the shard count didnt work with new, faster refracture method in prefracture 2015-06-05 21:22:48 +02:00
289d8b247e dynamic fracture: some crash fixes when changing between prefractured and dynamic mode (memory was partially overwritten instead of cleared) 2015-06-05 19:23:47 +02:00
40f3759482 dynamic fracture: disabled loading / saving of dynamic mode again, it still has too many issues 2015-06-04 20:34:17 +02:00
cd603674c9 dynamic fracture: re-added modified version of speed transfer, it depends now on linear / angular deactivation threshold whether speed is transferred or not (to reduce "jumping" of shards on the ground) 2015-06-04 14:20:13 +02:00
52ef935b7d dynamic fracture: relocated some functions and removed speed transfer from parent to child shards, it looked unrealistic, but TODO, animation often stops in case of fracture events.... 2015-06-04 10:28:04 +02:00
3a40e2b657 dynamic fracture: new option to limit the first impact (shard activation area can be limited to impact object) 2015-06-03 16:43:05 +02:00
90d6041f4e for now, deactivate loading for dynamic files again, there are still issues to solve (like proper cache handling after loading) 2015-06-03 11:25:46 +02:00
6f71cb361e dynamic fracture: cache works much better now 2015-06-03 11:01:32 +02:00
89e2e80ef6 dynamic fracture: slightly improved caching behavior, but it still flickers and doesnt continue simulation properly after cache ends 2015-06-02 15:44:25 +02:00
d79851ba2f fix: small rotation fix for dynamic fracture and fix for shard lookup 2015-06-02 14:27:10 +02:00
0e5638c04b fix: crash when repeatedly refracturing in prefractured mode with same settings 2015-06-01 21:27:06 +02:00
9888d30bb6 fix: crashes with dynamic fracture, but this is still WIP ! 2015-06-01 20:26:57 +02:00
2c26325272 some performance improvement with mouse based fracture (addon), only attempting to refracture necessary shards 2015-06-01 15:40:23 +02:00
3392741d19 dynamic fracture: do reset after settings changes and clean up constraints now too in dynamic fracture events 2015-05-27 18:29:25 +02:00
e4fbcce537 dynamic fracture: now multiple dynamic objects can exist, need to test interaction with prefractured, though 2015-05-21 18:28:18 +02:00
07ce06d212 dynamic fracture: fix for loss of rotation, and transferring speeds of parent shards to children now 2015-05-21 12:02:33 +02:00
9161459515 dynamic fracture: finally the transforms seem correct... but this mode still is highly unstable, and is prone to crash often, use sparsely ! 2015-05-20 23:03:31 +02:00
0d27ecdc04 hrm, now somethings with caching is broken... need to investigate 2015-05-19 16:35:45 +02:00
809402e927 still fighting with proper transformations in case of multiple fractures 2015-05-19 15:55:40 +02:00
30b3ebb59a dynamic fracture: fixed transformation calculation 2015-05-18 22:40:41 +02:00
d00f6177ae dynamic fracture: works a bit more stable now, but still lacks proper transformation calculation and speed takeover from parent to child rigidbodies 2015-05-18 20:33:24 +02:00
360c01cb86 dynamic fracture: attempts with loading and saving, and proper caching, still highly unstable 2015-05-18 16:29:39 +02:00
ec90dcb5b7 first commit of dynamic fracture, still highly unstable, needs fixes in storage handling and memory management 2015-05-17 22:04:55 +02:00
1e5c376e0f fix: crash when using fractal boolean with 1 shard and split shards and other misbehavior (boolean did not create valid rigidbodies, so objects were stuck in the air with 1 shard and fast bisect / fast bisect fill created 1 shard too much everytime) 2015-05-07 19:52:26 +02:00
f168ba85a9 fix: passive vertexgroup was ignored 2015-04-19 09:54:22 +02:00
728f259329 fix: loading subobject group modifiers correctly again 2015-04-07 18:46:06 +02:00
4f9941afcb fix: modifier will respond now to manual changes in transformation (setting values numerically, clear transformations, apply transformations and origins) and ghost setting should be respected properly now with mesh collision shape 2015-04-07 17:10:48 +02:00
f369be74d3 previous merge went wrong somehow, several parts of mesh data transfer code were missing 2015-04-01 13:43:48 +02:00
4e7f37c6e8 compile fixes due to merge 2015-04-01 11:32:33 +02:00
85cb9a2b0d Merge remote-tracking branch 'refs/remotes/origin/blender-v2.74-release' into fracture_modifier
Conflicts:
	intern/cycles/render/scene.cpp
	release/datafiles/blender_icons.svg
	release/datafiles/blender_icons16/icon16_mod_data_transfer.dat
	release/datafiles/blender_icons32/icon32_mod_data_transfer.dat
	release/scripts/startup/bl_ui/properties_data_modifier.py
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenkernel/BKE_customdata.h
	source/blender/blenkernel/BKE_data_transfer.h
	source/blender/blenkernel/BKE_mesh_remap.h
	source/blender/blenkernel/intern/customdata.c
	source/blender/blenkernel/intern/data_transfer.c
	source/blender/blenkernel/intern/data_transfer_intern.h
	source/blender/blenkernel/intern/deform.c
	source/blender/blenkernel/intern/mesh_mapping.c
	source/blender/blenkernel/intern/mesh_remap.c
	source/blender/blenkernel/intern/object.c
	source/blender/editors/include/UI_icons.h
	source/blender/editors/object/object_data_transfer.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_datatransfer.c
	source/blender/modifiers/intern/MOD_util.c
2015-04-01 11:31:53 +02:00
000dfc0319 Point submodules to the final release tag 2015-03-31 18:39:23 +05:00
dedfd0cfa9 Branch is not really a release state! 2015-03-31 18:26:53 +05:00
08f7b20ebb 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-31 18:18:05 +05:00
4f57f15648 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 18:18:05 +05:00
a555fa5b28 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 18:18:05 +05:00
abb92632f8 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 18:18:04 +05:00
5ca59f7134 Fix T41191: Custom Loop Normals Viewport shading not updating when set from py script
Missing update tagging...

Safe for 2.74.
2015-03-31 18:18:04 +05:00
accd6083a5 Fix for invalid buffer access on zero-face meshes 2015-03-31 18:18:04 +05:00
e6b81ae69a 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-31 18:18:04 +05:00
5ca0cf3702 Remove use_invert_vertex_group use_ prefix
To match other modifiers.
2015-03-31 18:18:04 +05:00
6410b1bd59 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-31 18:18:04 +05:00
5e92d1254e Fix T44137: bpy.path.is_subdir fails
`bpy.path.is_subdir("/abc/def/ghi","/abc/de")` incorrectly returned True
2015-03-31 18:18:04 +05:00
3593082a75 Point addons to 2.74-rc4 tag 2015-03-26 21:12:32 +05:00
cb19df1c45 Bump splashscreen to rc4 2015-03-26 21:04:56 +05:00
b2a3796b2d Fix T44133 SSAO in OpenGL rendering from orthographic camera did not
work

Safe to include in final release
2015-03-26 16:18:41 +05:00
01a29487e8 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 16:18:41 +05:00
1311f2d8f1 Yet another fix for crashing particles. 2015-03-26 16:18:41 +05:00
30e06a1775 Fix 2 typos ( shakin' hands ) 2015-03-26 16:18:40 +05:00
1c8ee52423 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-26 16:18:40 +05:00
dcfbffcf57 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-26 16:18:40 +05:00
fa1fc11344 Simplify recent commit 2015-03-26 16:18:40 +05:00
143dbfb33e Fix T44118: Rotated background image disappears
Image clipping didn't take rotation into account.
2015-03-26 16:18:40 +05:00
f1f797599f 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-26 16:18:40 +05:00
8804e6493c Point addons to v2.74-rc3 2015-03-24 20:31:27 +05:00
3ec48d3bd8 We're now RC3 2015-03-24 19:49:40 +05:00
eb9826d8d9 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.

Conflicts:
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenloader/intern/versioning_270.c
2015-03-24 19:49:18 +05:00
c7dc142c1b 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 19:47:50 +05:00
d2d3a41ce8 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 19:47:50 +05:00
03d662d7bd Fix T44065: fixed vehicle constraint
Commit ffee7f1a58 broke vehicle constraints; this fixes that.
2015-03-24 19:47:50 +05:00
33bf1e0e18 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-24 19:47:50 +05:00
6289d5b8d1 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 19:47:50 +05:00
6b1638cf79 tweaks to packman build
remove --asroot arg to makepkg
2015-03-24 19:47:50 +05:00
07e815df4b 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-24 19:47:49 +05:00
a10e7ca830 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-24 19:47:49 +05:00
01ee21ffb9 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-24 19:47:49 +05:00
3cf120be67 OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74 2015-03-24 19:47:49 +05:00
d22c56819c OSX/GHOST: need one more release in error case 2015-03-24 19:47:49 +05:00
ff455f1ae1 Partly fix T44025, pixelFormat retain was left, for 2.74 backport 2015-03-24 19:47:49 +05:00
9bbb53ef68 Cycles: Avoid memcpy of intersecting memory
Could happen when assignment happens to self during sorting.
2015-03-24 19:47:49 +05:00
7b9a8337ad Disable IME for headless builds 2015-03-24 19:47:49 +05:00
210f90cb77 Fix for building win32 headless 2015-03-24 19:47:48 +05:00
856da320e7 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-24 19:47:48 +05:00
2967c07a61 Add missing update adding a shape-key
Noticeable when pin is enabled.
2015-03-24 19:47:48 +05:00
638368a930 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-24 19:47:48 +05:00
bef0649151 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-24 19:47:48 +05:00
8108fc77c6 Fix out-of-bounds read BKE_deform_flip_side_name 2015-03-24 19:47:48 +05:00
d62e3e7001 Use fabsf for floats 2015-03-24 19:47:48 +05:00
16cc6ae80e Fix for crash adding mask modifier 2015-03-24 19:47:48 +05:00
37172e7e49 Fix bad memory access freeing viewport which uses movie clip 2015-03-24 19:47:47 +05:00
f71f559d03 Fix crash using "Copy to selected" on ID-props 2015-03-24 19:47:47 +05:00
163d99b7a9 Fix crash using removed data as function arguments 2015-03-24 19:47:47 +05:00
06adae7b43 Fix RNA active spline assignment 2015-03-24 19:47:47 +05:00
9f69f7f700 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-24 19:47:47 +05:00
4f08b3cf83 BLI math vec: add 'abs' functions to get absolute values of a vector.
Unseful when handling e.g. scale, sometimes.
2015-03-24 19:47:47 +05:00
c6f1be0728 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-24 19:47:47 +05:00
584aed0721 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-24 19:47:47 +05:00
337ce035b6 Make sure disabling attribute arrays also resets the counter so we don't
do it twice.
2015-03-24 19:47:46 +05:00
1ad57f287b Fix T43853: Audio animation bug (fcurves)
For a detailed bug explanation see the comments in the report.
2015-03-24 19:47:46 +05:00
3523a136d0 use center between objects for constraint types different than fixed, note: other types only work between clusters and settings for them are limited to the type currently.... 2015-03-22 18:17:11 +01:00
25397ea355 fix: some speed improvement for converting to objects or to keyframed objects and proper renaming of shards and constraints being created 2015-03-22 10:13:39 +01:00
9fa84d09e4 fix: another possible fix for loading correct vertexbased constraints 2015-03-20 00:32:10 +01:00
b3bc2166a6 fix: vertexbased constraints should be rebuilt correctly now after loading 2015-03-19 23:54:30 +01:00
fa116391df added a new vertex coordinate based constraint build method, as alternative to meshisland centroid based constraint building 2015-03-19 18:06:15 +01:00
d11592a700 fix: crash with fast bisect and fast bisect / fill due to refactoring 2015-03-18 16:06:13 +01:00
9775830ef7 fix: bugfixes for fractal boolean and greasepencil edge cutting due to refactoring 2015-03-18 00:00:49 +01:00
14a023abdd refactoring of FractureModifier: split very long functions into more, shorter ones 2015-03-17 20:48:03 +01:00
1f547c14ec Point submodules to 2.74-rc2 2015-03-17 20:11:30 +05:00
a1bb0d698b Fix an incorrect assert in lnor code.
There is one case where we do can have only two edges for two loops...
2015-03-17 18:19:46 +05:00
48d4b80246 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-17 18:18:19 +05:00
8d31c7f452 Use "Release Candidate 2" string on the splash 2015-03-17 16:49:59 +05:00
ee87056fd9 Correct assert 2015-03-17 15:49:40 +05:00
9c154d5b58 Fix T43997: Paste fcurve keeps handle selection 2015-03-17 15:49:36 +05:00
a40d7b93ac PyAPI: bpy.ops enum error was cut short 2015-03-17 15:49:33 +05:00
8c3853a9b5 Update themes for 2.74 2015-03-17 15:49:29 +05:00
Julian Eisel
b64d3bde8b 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-17 15:49:25 +05:00
931f876ddd 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-17 15:49:21 +05:00
2d1879b714 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-17 15:49:17 +05:00
86b862ecc9 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-17 15:49:08 +05:00
651689fc62 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-17 15:49:04 +05:00
f0e37fceb2 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-17 15:48:56 +05:00
d21c1dc1b4 partial material deletion fix for Fracture Modifier, effectively keeping necessary slots, else the mesh gets messed up which leads to crashes, and... making visible_mesh_cached now necessary for returning a dm out of the modifier 2015-03-13 10:32:54 +01:00
13551302c0 fix: correction for material handling with sub object groups, it could happen that the index was calculated incorrectly, thus leading to black faces (no material) 2015-03-12 21:37:51 +01:00
151b6f25db added material handling for sub object groups, target object gets all materials of group (no duplicate slots, with proper index remapping) 2015-03-12 19:42:34 +01:00
8bd7d43ae0 added different constraint types which can be applied between clusters, with sub object groups meshes from different objects are converted to clusters automatically, so you can have in a limited way different constraint types between different objects 2015-03-10 12:42:37 +01:00
29c1dfcf8a combined cutter group with other point sources now, and moved it under Advanced Options, and some cleanup of ifdef 0 code 2015-03-07 12:29:07 +01:00
546eee7005 crash fix: forgot to "walk" over the cutter_group inside the modifier, effectively forgetting to set references to the helper group, thus resulting in a crash at loading time 2015-03-05 20:55:56 +01:00
006d6cfaf4 fix: greasepencil by edges did not take object transformation into account properly 2015-03-05 20:23:41 +01:00
70f7052a54 possible fix for loading subobject group objects with textures 2015-02-25 22:43:38 +01:00
9b6c9a8299 fix: crasher at loading objects with subobject groups, but TODO, sometimes odd mesh error (like missing texture or even 1 displaced vertex, probably due to threading issues ?) 2015-02-23 21:01:07 +01:00
28da4a786e fix: loading for subobject groups partially fixed, needs manual refresh afterwards still, TODO, proper material handling ("merge" object materials) 2015-02-23 14:20:56 +01:00
55df8ba231 fix: sub object groups should work a bit more reliable now, did crash very often before 2015-02-23 10:51:07 +01:00
e2669381e2 simplified greasepencil to mesh code (in fracture by greasepencil edge) a bit 2015-02-22 11:05:33 +01:00
c7b2cbe3b4 good performance improvement for autohide, using BM_face_at_index() now instead of BM_face_at_index_find(), which makes it reasonably faster 2015-02-22 01:44:27 +01:00
61ad3f80b7 fix: improved "fix normals" in conjunction with autohide, might be slower, but looks way better with the right settings (as in fix normals search radius and autohide distance) now, using limited dissolve with keep normals operator (during autohide) 2015-02-21 22:55:07 +01:00
f1714a370e fix: skip invalid shards when doing voronoi+bisect+fill, (less than 3 verts), this caused crashes when trying to load files with fracture results being stored this way 2015-02-21 14:04:05 +01:00
a6b53d6892 fix: some performance optimization when rebuilding constraints on triggered objects (was calling unnecessary restoreKinematic() function in this case) 2015-02-20 12:57:07 +01:00
bb64f588dd fix: rewrote clustering so it operates on the mesh islands now prior to constraint generation, instead of operating on shards only during fracture time 2015-02-19 18:58:23 +01:00
f5414f989b fix: mesh was messed up if you used no pointsource, just the islands. 2015-02-18 23:33:22 +01:00
2d1b5121df added greasepencil edge fracture, the direction of cutting is currently limited to global X, Y or Z axis 2015-02-18 20:46:15 +01:00
66affa5cf3 fix: cutter groups should work mostly now 2015-02-18 11:57:24 +01:00
eebf770f1d fix : set some better default values for Fractal Boolean, so the object / default cube should not explode automatically, but its far from optimal still this way.... (active objects with Mesh Shape cause unstable simulation behavior) 2015-02-17 22:39:25 +01:00
3014c07906 fix : forgot to set inner material with fractal boolean 2015-02-17 22:13:21 +01:00
61ca70df40 added cutter groups, this is intended to define custom sets of objects to make boolean cuts against, but its still WIP, as it still fails too often 2015-02-17 21:37:55 +01:00
0a604079b6 revert bad activation fix for triggering, caused crashes in some cases (like on non-kinematic triggers) 2015-02-15 19:32:47 +01:00
30de8274a3 fix: trigger system now triggers in time, there was a delay before due to unnecessary postponed revalidation, now the shards are directly activated on hit 2015-02-13 16:47:30 +01:00
4d82812e13 fix: for severe performance issue with fractal, did unnecessary unwrapping operations there 2015-02-10 22:37:46 +01:00
ef47b883cd crash fix: removing the fracture modifier again from object without executing fracture first did crash 2015-02-10 10:49:10 +01:00
02d82a9035 limit autohide distance between 0.0 and 10.0 (mostly very low positive values are used, like 0.001) 2015-02-09 14:24:09 +01:00
a238bbf323 crash fix: changing constraint settings prior to execute fracture caused a crash 2015-02-09 14:23:26 +01:00
f085584c71 fix: do not write shards with only 1 vertex, this causes problems when loading the file afterwards, omitting those shards and islands seems not having a negative effect up to now 2015-02-09 14:11:48 +01:00
43d426bb26 fix: crasher when appending object with modifier and when trying to remove rigidbody traces when no rigidbody world is available 2015-02-07 15:06:44 +01:00
28efc108ed fix: added cluster_group to presets 2015-02-06 21:28:53 +01:00
3fb798666a fix: clustergroup centroid search didnt take obmat into account 2015-02-06 21:24:00 +01:00
d4fce19d4f added a cluster group setting, where helper objects can define locations of cluster cores (shards will be added to its clostest core always), converted objects belong to a group now also 2015-02-06 16:26:21 +01:00
5cabdd394f fix: inner vertex group was empty after refracture 2015-02-04 14:49:59 +01:00
841d916796 fix : autosmooth didnt work on all faces when boolean fractal with smooth inner faces was used (added unnecessary sharp edges before) 2015-02-03 19:07:18 +01:00
a715ef9f7f allow independent setting of cuts and iterations (please PLEASE keep low like about 5 max but not at the same time ! or computation time will explode) but this allows some control over fractal pattern,
also allow smoothing of inner faces
2015-02-03 18:02:13 +01:00
5263d91491 first attempt of fractal boolean fracture, but speed is slow, result may be messed up and sim is unstable (use mesh shape and margin = 0, as well as scale down the physics mesh... or use constraints to keep the object together) 2015-02-03 14:41:17 +01:00
746c5035c2 Revert "splash screen update for branch"
This reverts commit 53efacd78c.

In future please don't commit custom splashes to branches, adds unnecessary binary file overhead to the whole repo

Noted here:
http://wiki.blender.org/index.php/Dev:Doc/New_Committer_Info#Branch_Usage
2015-02-02 09:40:21 +11:00
53efacd78c splash screen update for branch 2015-02-01 20:04:10 +01:00
3bc11a9cf2 fix: crasher when removing the modifier on frame > 1 and trying to rerun the sim , fix: crasher when reverting the file with fracture modifier on it 2015-02-01 18:44:44 +01:00
9f987ae2d0 remove version hack for MeshDataTransfer (since this is reverted now) 2015-01-24 13:17:34 +01:00
3dda7a4312 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_util.c (reverse-merged from commit 4401500cac)
2015-01-24 13:15:58 +01:00
fd490f416f Revert "Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier"
This reverts commit 4401500cac, reversing
changes made to bdb170ca60.
2015-01-24 12:58:35 +01:00
bbf09d9ee6 Point 2.73a release to updated addons revision 2015-01-20 23:16:03 +05:00
ced2738049 Show 'a' on the splash screen 2015-01-20 20:40:25 +05:00
e076fca578 Point addons to the backported revision 2015-01-20 19:10:39 +05:00
9bd38a1796 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...

Conflicts:
	source/blender/editors/gpencil/gpencil_edit.c
2015-01-20 21:17:56 +11:00
aee458d674 Fix error in freestyle api 2015-01-20 20:20:17 +11:00
08eabd1997 Fix own error in freestyle api
Conflicts:
	source/blender/freestyle/intern/python/BPy_ViewShape.cpp
2015-01-20 20:20:03 +11:00
c9ca7b816e 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-20 20:18:23 +11:00
dd1be8ccc5 Fix for security issue loading blend's
Auto-Execute option could be overridden by opening a startup.blend
2015-01-20 20:18:23 +11:00
41cb67647d Fix T43301: Three of the 'mirror keyframes' tools were mirroring along wrong axis.
Names are rather confusing here... :/
2015-01-20 20:18:23 +11:00
1bae0566b2 Sequencer: Don't crash when trying to rebuild proxy without having sequence edits 2015-01-20 20:18:23 +11:00
5374cfae78 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-20 20:18:23 +11:00
57087245a4 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-20 20:18:23 +11:00
e51d7f1fb3 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-20 20:18:22 +11:00
f9aa8c64e6 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-20 20:18:22 +11:00
0073b17d03 Fix OpenGL Context freeing 2015-01-20 20:18:22 +11:00
324d0448b1 Fix typo in OCIO configuration file 2015-01-20 20:18:22 +11:00
c08ef9c62a 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-20 20:18:22 +11:00
ba43ea24a7 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-20 20:18:22 +11:00
1253a46370 Fix for regression in bmesh connect-pair
T42563 fix wasn't right, fortunately this doesn't fail in most cases.
2015-01-20 20:18:22 +11:00
9a0c2c734c Fix texture sampling with generative modifiers - sample backbuffer
returns indices in mesh face range
2015-01-20 20:18:21 +11:00
973e387247 Fix for GTest 2015-01-20 20:18:21 +11:00
fdbedfef69 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-20 20:18:21 +11:00
1d0c23823d Fix crash in texture paint sampling when sampling materials without
textures slots
2015-01-20 20:18:21 +11:00
a1a182c268 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-20 20:18:21 +11:00
e5fbe7466e Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 315609ec0c.

This fix still causes more issues than it solves.
2015-01-20 20:18:21 +11:00
012f7ca1b5 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-20 20:18:21 +11:00
22cc938056 ugly modifier numbering "fix" for fracture modifier... just for the branch! 2015-01-11 18:04:32 +01:00
4401500cac Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_util.c
2015-01-11 17:35:46 +01:00
bdb170ca60 refactored function for loading fracture modifier out 2015-01-11 17:21:39 +01:00
53034cf102 compile fix due to function name cleanup 2015-01-09 15:12:47 +01:00
4c6b50c8ab Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier 2015-01-09 14:54:19 +01:00
67439dfe06 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.
2015-01-08 23:44:29 +05:00
96629dfe0e exclude git/arc files from tgz archive 2015-01-08 23:44:02 +05:00
1a7c5ccbfb correct permissions 2015-01-08 23:43:55 +05:00
Dalai Felinto
b4d8fb573e Logic Bricks *must* be kept in alphabetical order 2015-01-07 18:17:20 +05:00
a52fe40c84 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:44:49 +05:00
fedb34c592 Fix: Segfault in Image Editor when transforming GPencil Strokes 2015-01-07 15:44:30 +05:00
9f5223e4d2 Fix: Missing updates for UI panels and main region when using Grease Pencil in Image Editor 2015-01-07 15:44:20 +05:00
2db46a6045 Fix: Restored "Draw Poly" to D Ctrl RMB, as D Alt LMB was blocked by Alt-D (duplicate) keymap 2015-01-07 15:44:15 +05:00
f7aab6ca5b Blender 2.73 release commit
Hopefully this one would eb the exact revision used for 2.73 final release
2015-01-06 17:58:44 +05:00
110459c0da GTest was broken on Linux 2015-01-06 14:57:07 +05:00
ee045d2bd5 BLI_string_utf8: add BLI_strncpy_utf8_rlen 2015-01-06 14:55:57 +05:00
d93ccef052 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 14:33:39 +05:00
0b5a64fe7f Fix T43122: Shrinkwrap target, wrong linked object 2015-01-06 14:33:39 +05:00
f322362363 Recent fix for SDL2 broke joysticks for SDL1.2 2015-01-06 14:33:38 +05:00
b8b7bd0e6a Fix for crash for 'Edit Source'
was accessing freed menu region.
2015-01-06 14:33:38 +05:00
ff09547f80 Fix 8 memory leaks from bad PyList_Append use 2015-01-06 14:33:38 +05:00
91a975100c 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-06 14:33:38 +05:00
5be01ff4b3 Cycles: Fix compilation error on AVX platforms with -arch-native
Was a conflict in headers between clew and util_optimization.h.
2015-01-06 14:33:38 +05:00
a912699792 Fix (unreported) 'pad9' not shown by UserPrefs' KeyBinding filter.
Minor glicth, but still... Safe for 2.73.
2015-01-06 14:33:38 +05:00
b7b5c99215 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-06 14:33:38 +05:00
84dde30662 Fix T43066: Joystick broken in GE since 2.73rc
Caused by move to SDL2, fix thanks to jensverwiebe.
2015-01-06 14:33:38 +05:00
6fab0a4643 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.
2015-01-06 14:33:38 +05:00
137ddd665e Fix an odd line that slipped in my ghost_hack_first_file commit 2015-01-06 14:33:37 +05:00
fe3e000511 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.
2015-01-06 14:33:37 +05:00
b0dc79c14b 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.
2015-01-06 14:33:37 +05:00
6b6b28a9d4 fix for doc generator 2015-01-06 14:33:37 +05:00
0a1deaf89c Fix leak in cycles-bake 2015-01-06 14:33:37 +05:00
71d16196f3 Fix leak in select-similar regions 2015-01-06 14:33:37 +05:00
2a72518af7 Fix buffer overrun calculating unique names 2015-01-06 14:33:37 +05:00
a04f7de6b7 Fix a very stupid memleak in own bpy_app_translations.c code...
Safe for 2.73.
2015-01-06 14:33:37 +05:00
9cc8a5c673 Fix T43034: beautify-fill leaves zero area tri's 2015-01-06 14:33:37 +05:00
4508642489 cleanup: redundant tri-normal calculation 2015-01-06 14:33:36 +05:00
e436c83be0 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
2015-01-06 14:33:36 +05:00
950be80ab8 Fix T43010 regression in material setting.
Caused by own fix for another display case.

Shoud be safe for 2.73 final.
2015-01-06 14:33:36 +05:00
julianeisel
919ec85f6c Fix T42977: Weights failed to display in Wireframe mode when using Face Select
D948, reviewed by @mont29 (thanks for that)
2015-01-06 14:33:36 +05:00
cde1351578 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...
2015-01-06 14:33:36 +05:00
9556f61013 Fix T43013: Flip with bridge aligned loops 2015-01-06 14:33:36 +05:00
880f4fbc38 cleanup: use cross_tri_v2 when area isn't needed. 2015-01-06 14:33:36 +05:00
ae1d416aec 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.
2015-01-06 14:33:36 +05:00
31862bc562 Fix T42938: image.save_render sometimes saved the wrong pass
Stupid mistake with non0initialized image user.

Safe for final 2.73 release branch.
2015-01-06 14:33:36 +05:00
f1ab8f8930 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.
2015-01-06 14:33:35 +05:00
3fcc5520fd Fix rna paint update callbacks assuming meshes 2015-01-06 14:33:35 +05:00
5a51b93aa5 fix: restore kinematic state for regular triggered rigidbodies always now, they very likely were kinematic before, user must disable triggered checkbox if this is not desired 2015-01-02 15:15:01 +01:00
6c4c1fbb3c fix for unnecessary activation of all parts again and again, this resulted in never ending movement... now this applies to kinematic objects only, which lose their kinematic state due to being triggered 2015-01-01 12:54:51 +01:00
752dd1c567 fix for incorrect merge in MOD_boolean_util.c, old functionality isnt necessary any more 2014-12-31 15:46:21 +01:00
6be2aab8d6 compile fixes due to merge 2014-12-31 14:00:22 +01:00
6b6a968053 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	extern/SConscript
	release/datafiles/splash.png
	release/datafiles/splash_2x.png
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/editors/physics/rigidbody_constraint.c
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/intern/MOD_boolean_util.c
	source/blender/windowmanager/WM_api.h
2014-12-31 13:59:45 +01:00
480ed9df62 crash fix: automatic material names management was wrong (got internally longer and longer and caused a stack overflow after some fracture attempts) 2014-12-27 16:21:34 +01:00
c93971e49e fix: convert to keyframes works directly from bake now, too 2014-12-27 14:40:05 +01:00
be30a2cd18 added a trigger flag, only rigidbody objects with this flag can trigger other objects (which themselves must be animated and have their "triggered" flag enabled 2014-12-27 13:27:10 +01:00
d46632d4cf fix: apply scale only prior to fracture again, preserve rotation because splinter rotation needs to be local 2014-12-27 13:08:27 +01:00
b0921d3f99 activate objects now when constraints are broken, this is an attempt to get rid of single shards stuck in the air, not being connected visually to other shards 2014-12-18 20:20:23 +01:00
fab16ef5d6 windows crash fix: material name had incorrect length 2014-12-17 21:00:28 +01:00
29434373dd fix for: splinters (axises should be local X, Y, Z again), added object name into material name, and allow conversion-to-keyframed-objects of multiple objects at once 2014-12-17 18:34:46 +01:00
d7a9e5ac94 fix: load inner vertex group now directly after blend has been loaded (no additional refracture necessary) 2014-12-15 20:51:52 +01:00
904dc50fd4 fix for inner vertex groups (contains real inner shards vertices now only) and option for smooth inner faces (useful with following subsurf and displacement modifier, works properly with boolean only 2014-12-15 13:36:42 +01:00
42f7a29f57 small fix, need to check for context.object being possibly None 2014-12-10 23:35:51 +01:00
5bb20444c6 added hack to enable loading fracture presets via python (bpy.context.fracture is not known otherwise when using python_file_run, it needed a fake context 2014-12-10 23:30:18 +01:00
05fdb2e63f added a breakable checkbox for fracture modifier, this is an attempt to enable destructability later on when needed 2014-12-06 22:53:50 +01:00
88ddeb3edc Modifier GUI "redesign", second revision 2014-12-01 20:23:49 +01:00
b4b0eb6315 splash update 2014-12-01 19:52:43 +01:00
420dff8cd3 Modifier GUI "redesign", first revision 2014-12-01 13:12:49 +01:00
8e2b30f1eb rename "Initial Particle Coordinates" to "Particle Birth Coordinates" 2014-11-24 16:39:23 +01:00
c890d60651 cluster breaking angle, distance, percentage added, rename contact distance to search radius, jump back to start frame of rigidbody cache now automatically at fracture time (or frame 1) 2014-11-24 16:36:27 +01:00
f09b89df01 automatically apply scale and rotation when executing fracture now 2014-11-21 20:41:15 +01:00
07d652a840 crash fix for convert to objects and fix for invalid positions after conversion as well (was all zeroed out) 2014-11-21 15:41:54 +01:00
1922d5e6d2 fix for convert to keyframed objects, had oddly rotating objects and NaN values in transform panel 2014-11-21 14:58:43 +01:00
b463ffc52c small improvement for autohide, removing inner edges now as well 2014-11-17 15:48:58 +01:00
95ccb70e1d fix for "fix normals", used incorrect float to short and back conversion and ignore global rotation of object in normals rotation now 2014-11-17 02:35:53 +01:00
60c776d014 limit autohide to faces with inner material and fix attempt for convert to keyframes bug (messed up object locations / rotations) 2014-11-16 16:23:09 +01:00
b89f7af287 added ghost objects, they do not collide but can activate animated objects 2014-11-16 03:07:31 +01:00
dcb0c61495 autohide now automatically removes doubles as well to close small gaps between shards due to constraint movement, tweaks to pointcache (no reset of cache) and a new bm operator (no normal recalc) were necessary 2014-11-15 00:35:18 +01:00
c519abe466 tweaks for convert to keyframe objects and fix normals 2014-11-14 16:49:34 +01:00
949be0f50a change order of checked expressions in rigidbody object creation -> could crash on non-mesh object 2014-11-13 22:43:08 +01:00
1dc314342d memory leak fix in find_normal 2014-11-13 01:43:07 +01:00
9283c5e96c fix normals improvement: take only normals pointing to same direction into account inside a certain search radius 2014-11-13 00:12:39 +01:00
fdb18c9d64 can activate constrained objects too, new setting: cluster solver iterations override, attempt to show only cracks between clusters during activation 2014-11-12 13:14:00 +01:00
96aac3fa6f rigidbody trigger activation fix, works better with constraints now and let objects with passive group appear as active 2014-11-12 11:46:36 +01:00
f7d25d5c6d for rigidbodies with mesh shape, take only the mesh into account when triggering rigidbodies (instead of boundingbox) 2014-11-10 18:46:57 +01:00
985df04b87 only take active objects into account with kinematic deactivation (trigger) 2014-11-09 20:08:46 +01:00
f3d0a7591f automatically create inner (and outer) material if not specified 2014-11-09 12:55:21 +01:00
0a59c0132e Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	source/blender/blenkernel/intern/pointcache.c
	source/blender/blenkernel/intern/rigidbody.c
2014-11-08 12:58:48 +01:00
608a662ecb triggered objects dont need to be fractured any more and restore kinematic after load 2014-11-08 12:14:36 +01:00
16ee031bb7 only activate actually touched shards (todo, maybe override this with a global setting) 2014-11-06 21:16:01 +01:00
b306d0de39 had to disable trigger of constrained object by other non-triggers, this lead to permanent bullet crashes 2014-11-06 19:06:08 +01:00
18675f77fc another crash fix if simulation was continued after cache end with trigger and constraints, cache might behave incorrectly still if an object is refractured for example, but the others are not 2014-11-06 15:47:53 +01:00
ee199c563d crash fix for trigger when used with constraints, they were attempted to be removed multiple times 2014-11-06 14:10:32 +01:00
1fb3642cda added a new "Triggered" checkbox to rigidbodies, which allows them to be triggered in case they are kinematic. this will reset the kinematic state and make them dynamic 2014-11-06 12:39:58 +01:00
fcad67e087 fake trigger, disable animated checkbox on collision, (but this should be done by hand, earlier, to get better impact speeds) 2014-11-06 02:33:21 +01:00
936bb32d45 new splash screen and fixes for convert to keyframe operator, empty was parented incorrectly (depgraph update missing, but threaded option is broken now) 2014-11-02 01:44:22 +01:00
32a4b43dbc bugfix, convert to keyframed objects didnt work when escape was used to stop the simulation before 2014-11-01 17:10:18 +01:00
88a66ded74 optional job system for convert to keyframed objects, faster conversion, and taking bakes into account 2014-11-01 14:37:58 +01:00
026ffafb1b Bake modifier simulation to keyframed objects directly 2014-11-01 01:28:20 +01:00
d7bc7de7a9 customdata support with sub object groups 2014-10-31 11:46:12 +01:00
f12479c458 support fractured mesh as fluid obstacle 2014-10-31 02:08:34 +01:00
d2fa5668ae centroid fix / point cloud fix, forgot to multiply with splinter matrix 2014-10-30 13:20:59 +01:00
f64eef7a5f simplified wood splinter settings, can set scale factor and direction now directly 2014-10-30 12:10:37 +01:00
27521b0671 crash fix: when fracture is triggered on disabled modifier, modifier is re-enabled and fracturing again, simulation can crash. Also fix for not being able to fracture afterwards (push button twice or alternatively hit Alt A or remove and re-add the modifier 2014-10-24 20:48:25 +02:00
cfec1eea63 reordered functions and made them static in MOD_fracture.c, leaving out some unnecessary info for writing to blend in writefile.c (still have that read_struct memoryleak sometimes) 2014-10-21 18:55:18 +02:00
a6a38e56f4 compile fixes after using more strict compilation settings, quiet some warnings effectively this way 2014-10-19 20:59:34 +02:00
aa7ccbff35 crash fix: deleting fracture modifier helper objects left group objects with go->ob == NULL, which caused crashes in depgraph update, now also deleting group objects with go->ob == NULL 2014-10-19 13:28:34 +02:00
79392ccad9 simpler and cleaner reimplementation of clustering algorithm, caused crash before 2014-10-18 10:27:46 +02:00
a98a70dd0c Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier 2014-10-12 17:13:29 +02:00
8cea11e1a7 memoryleak fix, forgot to free nor_tree in some cases 2014-10-11 15:22:25 +02:00
120b572367 fix for messed up mesh if object is moved out of particle range, and some clarification for sub object group (last attempt to fix failed again, hrm) 2014-10-11 14:31:16 +02:00
3aa6de7e43 fix for: comparison with wrong rigidbody count caused deactivation of the cache and simulation was not cached any more 2014-10-10 20:30:00 +02:00
a468002406 dont use BLI_findlink for first shard (can access directly) and load shards into correct "parent" struct 2014-10-10 16:29:33 +02:00
7ccbc6651b crash fix when fracturing, missed initalization of listbase and quiet some warnings 2014-10-10 16:07:17 +02:00
3fbbb2752c replaced Shard pointer to arraypointer by ListBase for FracMesh->shard_map in DNA, for fracture modifier 2014-10-10 15:55:50 +02:00
92dbf1c9da forgot to calculate volume of whole object in mass calculation, leading to each shard having the same mass 2014-10-10 10:43:57 +02:00
e0712fc38b Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier 2014-10-09 23:34:39 +02:00
556476ab22 reactivate fracture modifier object deform motionblur support, was disabled with last commit 2014-10-09 22:55:27 +02:00
b5ab717f88 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	source/blender/editors/physics/CMakeLists.txt (reverse-merged from commit c9769a6808)
2014-10-09 22:28:51 +02:00
1c256222dd memory leak fix for text fracture / sub object groups 2014-10-09 19:27:04 +02:00
c9769a6808 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	source/blender/editors/physics/CMakeLists.txt
2014-10-09 17:13:27 +02:00
c4b94f3049 explaining comment: "need to distinguish between mesh and non-mesh objects for fracture modifier" and quiet some warnings 2014-10-09 16:29:33 +02:00
bec396fc96 removed unnecessary conversion from radians to degrees (internally) and using degrees just in the UI 2014-10-09 16:24:55 +02:00
4048c4ddae replaced rigidbody count function (avoiding 3 different loops over rigidbodies) and quiet some warnings 2014-10-09 14:55:42 +02:00
e75530e435 cleanup: automatic code styling with uncrustify_clean.sh 2014-10-09 13:52:13 +02:00
bc99752aa2 closed some memory leaks when calculating shard mass and after fracture (C++ cell struct) 2014-10-08 21:27:11 +02:00
ee936bc922 added new setting for fracturing with particle sources, in most cases you want to use the particle
birth coordinates as pointsource, but you can override this to get the coordinates of the current particle simulation state. But as the particle cache is kinda broken and shows wrong positions at beginning if simulation has been run before, this can lead to errors. Best practice is to keep this option enabled, only disable if you really need to !
2014-10-08 13:02:08 +02:00
255fe8a9b1 cleanup: removed unused code and quiet some warnings 2014-10-08 11:01:41 +02:00
aeaf5d2967 crash fix for fracturing with particles, missed proper initialization of voro++ interface struct (in case no computation takes place we need to zeroize the structs in the array though) and usage of particle_state instead of particle_birth coordinates, to be able to use particles not directly at birth position (after particle simulation has run a while) 2014-10-07 23:20:45 +02:00
78c9142163 crash fix for: appending objects with fracture modifier from library blends without their respective scenes and attempting to fracture then to build up the modifier structures 2014-10-07 16:54:34 +02:00
78a1999a2b windows compile fix for inner shard unwrapping, used C99 standard array before there 2014-10-06 10:59:22 +02:00
556c4ae27f scons compiling fixes 2014-10-05 20:35:59 +02:00
36fa6826a8 cleanup, removed old unused code (old access method with filepointer) 2014-10-05 20:35:26 +02:00
249ccbdca7 rewrote access to voro++ to direct memory access, no file descriptors needed any more, needs test under win / mac as well 2014-10-05 15:54:18 +02:00
6812ad4a82 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier_oldsim
Conflicts:
	source/blender/modifiers/SConscript
2014-10-03 17:41:41 +02:00
c6c495d7bf forgot copying cluster count when copying modifier settings 2014-10-03 16:38:30 +02:00
3a4344a9fa attempts to fix one small memleak in read_struct, but fail.... grrr where on earth this is supposed to be freed again ? 2014-10-03 11:55:04 +02:00
07a4b5c8e2 set voronoi + boolean as default fracture algorithm 2014-10-02 18:33:32 +02:00
96c15edf23 quick fix: copy modifier settings when copying the object 2014-10-02 16:33:29 +02:00
d8f0f75896 memory leak fixes while fracturing, but small leak while loading still present 2014-10-02 15:47:40 +02:00
de4e6a8c74 re-enabled a bullet(!) assertion which earlier caused frequent crashes in fracture modifier, its not acceptable to disable it (and probably wont help much, either) 2014-10-01 19:45:18 +02:00
86dc5b4e91 fix for compiler errors due to obviously missing includes 2014-09-30 11:03:09 +02:00
0320a2818a pre-review cleanup part 2 (style, comment cleanup) 2014-09-30 11:02:27 +02:00
454f6f7790 pre-review cleanup part 1 (until object.c, rest will follow in part 2) 2014-09-29 20:26:06 +02:00
fbed421177 removed some old demolition remainders (that was accidentally merged in before) 2014-09-25 12:47:16 +02:00
c9db5f28a5 merge related compile fix 2014-09-24 20:22:49 +02:00
249a962bf4 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier_oldsim
Conflicts:
	source/blender/bmesh/intern/bmesh_operators.c
2014-09-24 18:38:59 +02:00
174b4e3c39 Merge pull request #4 from JT-a/fracture_modifier_oldsim
Updated and added GPL headers w/Scorpion81 as contributor.
2014-09-24 18:22:54 +02:00
JT Nelson
39a080a238 Updated and added GPL headers w/Scorpion81 as contributor.
NOTE: did not assign author as copyright holder.  BF is assigned as copyright holder.
2014-09-19 08:26:21 -07:00
f323034489 preset update (covering newer settings) and inner vgroup now usable without inner material; but not very useful, hmm (because at higher shardcounts the entire object is selected, due to vgroup selection mechanism) 2014-09-09 21:09:20 +02:00
fa9e582898 inner faces are added to the existing active UVMap now 2014-09-09 08:58:28 +02:00
e5ff9cb892 first attempt of adding UVs to inner faces, need to pack them correctly still and put into separate UV Map.... 2014-09-08 15:00:02 +02:00
1a39125f7b fix for percentage (0 means deactivated again if not weighted) and used minimum again for weights 2014-09-05 00:02:20 +02:00
5a5cfba4a6 some bugfixes related to cleanup and taking averages for island weights again 2014-09-04 23:37:45 +02:00
837d3430bc constraint crash fix and breaking conditions fix (were evaluated incorrectly) 2014-09-04 01:48:21 +02:00
fb95e45983 take minimum of island weight instead of average as threshold modifier 2014-09-04 00:10:44 +02:00
d5e20f82c2 cleanup related compile fixes 2014-09-03 23:32:23 +02:00
c9e7a26d2a Cleanup for master, part 1, WARNING: Incompatible to older blends to to changes in DNA / loader 2014-09-03 22:41:46 +02:00
8a78bce10b added weighted percentage, distance, angle 2014-09-02 22:46:56 +02:00
1f1573019c fix attempt for own / extra vertices (was wrong transformation) 2014-09-01 13:03:34 +02:00
8bebaf6e29 fix for: customdata related crash in conjunction with split shards to islands 2014-08-31 23:11:18 +02:00
151d42c4bc fix for: fix normals (will be stored and loaded now, and transferred to convert objects too, BUT: split shards to islands has a bug there still) and convert to objects (get rid of all modifiers before fracture in stack, so the result wont be messed up) 2014-08-31 13:32:30 +02:00
21a070ec33 marking inner edges as sharp for boolean and bisect fill, additional option to fix normals (with edgesplit modifier) 2014-08-30 22:09:43 +02:00
77a2313ee6 fix for bake to keyframes 2014-08-30 11:21:44 +02:00
a955cb0fe8 attempt for customdata warning fix 2014-08-29 22:15:17 +02:00
bb8f482b27 own particles transform fix (forgot to multiply with imat) 2014-08-29 20:41:57 +02:00
689909d027 added fast bisect + fill algorithm 2014-08-29 15:09:34 +02:00
9874aa532d memory leak fix (autohide) 2014-08-28 23:00:23 +02:00
f8d4e67c4c some depgraph fix (related to fracture modifier, and scene_sort_group() 2014-08-28 22:26:46 +02:00
fe30202984 some depgraph attempts... WARNING: unstable ! 2014-08-28 21:33:13 +02:00
1d8c635499 fix for calculate mass crash, and attempt for edgebased fracture with voronoi (disabled, not working yet) 2014-08-28 18:18:32 +02:00
b2d7241473 crash fix when loading blend (due to new autohide option) 2014-08-26 11:54:55 +02:00
9f0017e426 added autohide distance, by default 0 and deactivated, as it slows down the sim and causes a big memory leak, also crashes randomly sometimes 2014-08-26 02:33:24 +02:00
149c6ed4b5 using inner material for finding inner vertex group now, other direct attempt was not successful 2014-08-24 13:21:54 +02:00
e79f713a66 float breaking angle and automatic deactivation (manual re-activation) of auto-execute when sim is started 2014-08-22 21:35:59 +02:00
8f9b3ee41b fix: mesh shape related memory leak and rebuild constraints after refracture 2014-08-19 23:59:06 +02:00
9486eee9bf attempt to create sub-objects by referencing a group of "child" objects within the modifier, but customdata transfer (like textures) wont work for some reason 2014-08-17 16:08:24 +02:00
1bec8ebf5c fix for inner vertexgroup, it worked on 1 shard only because it was always deleted and recreated for each shard, instead of sharing it (split shard to islands needs an inner material still) 2014-08-13 09:37:24 +02:00
5c7774e166 memory leak reduction, there still is a smaller one in readfile.c somewhere, sigh... 2014-07-30 11:05:32 +02:00
c605ce3974 fix for crash at changing mass when not at frame 1 2014-07-29 19:51:18 +02:00
924fbed8bc delete constraints always now before deleting meshislands, may crash otherwise 2014-07-28 16:50:44 +02:00
10b03edbc1 allow convert to object for modifier on non mesh objects too 2014-07-27 20:28:45 +02:00
6accd5ec1d typo: used SURF instead of SURFACE, prevented panels showing up correctly 2014-07-27 17:27:00 +02:00
870c06a9f5 added possibility to fracture text directly 2014-07-27 17:21:21 +02:00
765d2addc2 fix for editmode selection bug, added new option "auto execute" -> enable for editing, disable for simulation 2014-07-27 12:36:52 +02:00
7d6f7b161b crash fix for pressing "use constraints" prior to execute fracture 2014-07-26 18:47:30 +02:00
9a4ab59f33 another fix for the update bug, this time it really should work... 2014-07-26 13:33:01 +02:00
7e3190a51f added support for inner vertex group... WARNING: this is still UNSTABLE 2014-07-26 11:57:23 +02:00
f21c0c9a4b forgot to change one BLI_temporary_dir() call to BLI_temp_dir_base() 2014-07-25 23:57:10 +02:00
aaf82e554c change: rebuilding constraints should work now, BUT you have to put a modifier on all rigidbody objects now, otherwise the regular active rigidbody object will be reset when continuing an interrupted simulation, need to investigate why... 2014-07-25 21:16:01 +02:00
6301adb673 fix for re-enabling the constraints, takes now all objects into account in the first sim step 2014-07-25 20:32:39 +02:00
36ed23d6d5 fix for constraint update bug, all constraints must be re-enabled after a fracturing run if they are not recreated 2014-07-25 16:55:57 +02:00
391c09519c removed compound shape from RNA (did not work with modifier) 2014-07-25 16:55:15 +02:00
39945517e4 crash fix with other pointsources, forgot to initialize counts to 0... 2014-07-25 12:08:41 +02:00
a3b7f55d56 fix for losing texture images after load (pink object) but this still adds the image to the inner faces unintendedly, only should affect viewport and viewport render, glsl and rendering looks ok 2014-07-23 21:28:43 +02:00
9933f8ce80 convert to objects fix: now should take textures into account too 2014-07-21 10:29:02 +02:00
6b428cfb09 windows compile fix: replace BLI_temporary_dir() by BLI_temp_dir_base() 2014-07-21 08:37:35 +02:00
2101aaef83 fix for: fix normals, can use modifiers before fracture now too to get correct result 2014-07-21 08:36:57 +02:00
ed27f45665 revert last change again, was just a test 2014-07-20 21:00:15 +02:00
ead157ff39 gitmodules test 2014-07-20 20:43:18 +02:00
e67bba1100 merge related compile fixes 2014-07-20 10:13:57 +02:00
f1d6d5ab95 Merge branch 'master' into fracture_modifier_oldsim
Conflicts:
	extern/CMakeLists.txt
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/editors/interface/interface_templates.c
	source/blender/editors/object/object_edit.c
	source/creator/CMakeLists.txt
2014-07-20 06:34:51 +02:00
79888418c7 forgot to initialize totvert variable prior to building a kdtree 2014-05-27 19:02:43 +02:00
1ccf1b3e8b fix attempt for halving case, passive groups didnt work properly there 2014-05-27 16:42:00 +02:00
1f2077a8e4 added inner material support for boolean and bisect fill 2014-05-27 14:55:25 +02:00
eace5891ec added a fix normals option to let cracks in smooth objects nearly disappear, also rotates the vertex normals with the verts... WIP... because i need somehow to get the derivedmesh of the previous modifier in stack if there is one 2014-05-26 22:58:42 +02:00
feee2a4a77 added vertweight display for fracture modifier, and attempt to update data in case vgroups are changed, but this doesnt work, seems to require a refracture to interpolate data again 2014-05-26 16:15:06 +02:00
5bac249193 added vertex group support to mark passive areas of an object (which remain static)
also rudimentary ground toggle / ground connect toggle operators
2014-05-25 22:05:46 +02:00
c1515ce482 compile fixes after merge 2014-05-17 13:32:39 +02:00
21c06c40f4 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier_oldsim
Conflicts:
	source/blender/blenkernel/intern/DerivedMesh.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenkernel/intern/smoke.c
	source/blender/editors/space_buttons/buttons_context.c
2014-05-17 12:56:31 +02:00
1e8aca99a8 just crash prevention, but mesh can still be messed up when attempting to move mesh out of fracture point location, especially with greasepencil 2014-05-14 23:47:42 +02:00
dd957e2be3 bah, other pointsources than uniform tend to crash, this is a fix attempt for greasepencil (but generally, dont try to move the object after fracturing with greasepencil by hand.... 2014-05-14 23:37:38 +02:00
65b6952a6f small gui fix in regular rigidbody constraints panel 2014-05-14 10:36:40 +02:00
f533d01fc8 well, a crash "prevention" with autosmooth, but it doesnt work anymore with the fracture modifier this way. 2014-05-13 23:22:40 +02:00
3b8eccb58f added threshold vertexgroup support (a single vertexgroup with weightpainting) 2014-05-13 17:23:06 +02:00
d1bbe76be8 reactivated modifier editmode "support" (but well, it doesnt really work...) and removed fracture edit mode (didnt work at all) 2014-05-13 09:28:54 +02:00
bfd5143aa2 added fracture preset storage and fix for loading files -> mesh was doubled there 2014-05-13 01:07:33 +02:00
576c3c5f94 re-added contact distance and mass dep. thresholds, also fixed a python gui error -> override solver iterations in scene 2014-05-12 23:07:06 +02:00
3a9261dbdf fix for automatical recreation of constraints after loading 2014-05-12 13:35:23 +02:00
a0ed785e78 fix for not updating fractured mesh with constraints enabled 2014-05-12 13:07:43 +02:00
dc96f8014d fix attempt for messed up bake data after linking objects 2014-05-11 20:35:49 +02:00
c9e920de81 copy rigidbody world when linking objects to scenes (if it exists) 2014-05-11 19:10:26 +02:00
92b42ef2aa can copy rb bakedata now with scene 2014-05-11 18:15:57 +02:00
4e5c2af871 crash fix for loading data with halving applied only (and no fracture) 2014-05-11 11:01:05 +02:00
04b00078d8 progress bar display fix attempt, still glitchy... 2014-05-10 16:54:59 +02:00
9f83814cb5 partial fix for progress display (can still exceed progressbar) and fix of a memoryleak when halving only 2014-05-10 14:19:21 +02:00
fb7ef3aed4 copied derivedmesh was not freed after usage 2014-05-09 20:55:46 +02:00
c9ad3c2da2 and even more gui cleanup 2014-05-08 19:34:12 +02:00
35cfca7a2c further gui cleanup 2014-05-08 14:16:34 +02:00
4396f9df88 fracture gui cleanup 2014-05-08 01:09:59 +02:00
4e59fa1b4b another crash fix attempt for refreshing constraint data on running / cancelled fracture 2014-05-07 18:31:55 +02:00
9687cb268c partial fix for crash at refresh constraints during fracture, or after cancelling it 2014-05-07 17:43:30 +02:00
f4ff8ff505 prevent fracture modifier removal when job is running 2014-05-07 10:52:39 +02:00
2cced6f6ff added running flag to prevent main thread from modifier execution when job runs, avoids crashes 2014-05-07 10:16:10 +02:00
27ef95a4b9 added (as experimental setting) the possibility to execute the fracture process as separate threaded job, but this crashes still very often, need to copy the modifier and stuff to a separate context and copy back afterwards 2014-05-07 01:59:48 +02:00
5f286bde0c some code cleanup, and attempt to find memoryleaks, but some are still present, sigh... again customdata related... 2014-05-06 14:38:36 +02:00
f158870a9a avoid crash when refresh after split to islands was missing and file was saved, but this is inconsistent sometimes, requiring an additional refresh possibly (due to memoryleaks possibly) 2014-05-05 23:33:08 +02:00
43e4a5b71e customdata fix for split islands 2014-05-05 13:02:26 +02:00
9df14f9c67 storage of split islands should work now... 2014-05-05 12:55:58 +02:00
202fd41d1a halving "improvement" made it only much worse performancewise, so keep the old one 2014-05-04 17:38:13 +02:00
44d97d0f47 added split shards to islands option... but with complex objects you need gazillions of constraints to hold this together... very very slow... 2014-05-04 14:47:58 +02:00
b986107829 another pointcache interpolation fix.... 2014-05-04 11:11:21 +02:00
3279e9227f possible fix for pointcache interpolation error with rigidbodies and subframes 2014-05-04 02:45:04 +02:00
cad0e8f07e hmm motionblur did work now ? strange... so commiting this as well 2014-05-02 20:10:45 +02:00
991100912a attempt to enable deform motionblur, FAIL... (object is not rendered at all) 2014-05-02 20:03:54 +02:00
e47b30595f enabled dependsOnTime... 2014-05-02 17:50:04 +02:00
1cdc116566 fixed the halving again 2014-05-02 16:18:47 +02:00
3453390bad deactivate plain voronoi fracture 2014-05-02 15:16:30 +02:00
ed2c7c7322 crash fix, return null if visible mesh is null 2014-05-02 14:23:52 +02:00
cffb510e65 some constraint change crash fixes 2014-05-02 13:46:09 +02:00
caf9d082cd some memory leak hunting, but some are still there 2014-05-02 11:22:33 +02:00
d7bbdab2f4 removed "fracture level" stuff, did not work properly under windows... 2014-05-02 10:37:23 +02:00
0da7bcb78c fix for warning; unnecessary semicolon... 2014-05-01 19:45:00 +02:00
13b97bbc0b crash fix attempt for loading fractured blends 2014-05-01 19:15:40 +02:00
82ff09ef1a attempt for saving / loading and texture preservation 2014-05-01 17:45:30 +02:00
0f80a3faaf split the processing loops to an openmp one and an openmp free, due to crappy windows compiler error 2014-04-30 23:59:41 +02:00
94c50f1277 removed additional customdata markings, added openmp again (first was not working with textures) 2014-04-30 16:10:05 +02:00
2decc0c647 doubled the shard count internally for fast bisect so input count and output count match 2014-04-30 14:04:57 +02:00
3f8806d394 using malloc instead of calloc for bisect fracture 2014-04-30 12:38:01 +02:00
3e26dfc02e nullify noisemap, for now to prevent crash on loaded file, modifier free 2014-04-30 11:32:25 +02:00
e3adc6e820 changed qsort to BLI_qsort_r 2014-04-30 00:32:50 +02:00
90e500c918 added a fast but inaccurate bisection method 2014-04-29 22:03:34 +02:00
5697d6f26d attempt to speedup bisect, but cant use OpenMP now, so a bit slower... but less cpu load... 2014-04-29 12:46:47 +02:00
f5e17e1f59 extended the critical section, hopefully this stabilizes it a bit 2014-04-27 16:45:16 +02:00
9877852266 tried to increase speed by openmp, but crashes more often now, especially when freeing things (double free...) hrm 2014-04-27 14:59:00 +02:00
fb2198dfe3 some cleanup ... 2014-04-26 23:30:21 +02:00
c2382339d2 all "optimizations" made it actually slower, so using full copy now... 2014-04-26 23:21:00 +02:00
26d7665c09 hrm bisect does not get faster... 2014-04-26 22:13:07 +02:00
4ab0f421a7 attempt to accelerate bisect fracture, but no real success... 2014-04-26 18:26:12 +02:00
8d20bf15c5 mac does not support memorystreams (fmemopen and open_memorystream) as well... using regular file there too 2014-04-24 11:12:39 +02:00
f487116c32 was merged incorrectly as well... 2014-04-24 09:52:39 +02:00
5208108373 those were merged incorrectly from and older branch, error was visible in windows. (crashes) 2014-04-24 01:16:07 +02:00
cef5642825 removed incorrect include stdbool.h 2014-04-24 00:53:56 +02:00
3f87907478 argh, Windows did not support memorystreams, so had to add regular file as fallback 2014-04-23 23:43:59 +02:00
9f34788ad6 memory leak hunting, there is still one unfixable related to customdata behavior (need to alloc twice there somehow, grr...) 2014-04-23 14:51:04 +02:00
9831a6b3e2 attempt to store fracture result and read it, failed, so deactivated for now 2014-04-22 20:21:16 +02:00
74d486b56e fix for crash at removing modifier 2014-04-22 17:46:00 +02:00
2c77a4da8c fix : dont create meshislands for empty shards, causes trouble with rigidbody sim 2014-04-22 17:36:11 +02:00
b34d1f8f8b rigidbody should work without fracture now too 2014-04-22 15:10:12 +02:00
6eb641b93a some more crash fixes 2014-04-22 11:47:17 +02:00
4777e74694 some fixes and a bit performance optimization 2014-04-22 02:17:42 +02:00
2b718bda3f small crash fix in case fracturing goes wrong (sometimes 0 shards...) 2014-04-21 22:58:41 +02:00
6d27993ad8 removed temporary material coloring of clusters and added support for uvs (boolean) 2014-04-21 22:41:44 +02:00
90d22621f5 fix for saving and loading 2014-04-21 13:55:44 +02:00
fe9c308bb1 sim should work again now 2014-04-21 00:46:50 +02:00
22dea61d55 hopefully simulation fixes... 2014-04-20 18:28:18 +02:00
0aa4f1d594 compile fixes... 2014-04-20 15:37:48 +02:00
462f1436c3 Merge branch 'refs/heads/rigid_fracture' into fracture_modifier_oldsim
Conflicts:
	extern/CMakeLists.txt
	extern/voro++/CMakeLists.txt
	extern/voro++/src/Doxyfile
	extern/voro++/src/c_interface.cc
	extern/voro++/src/c_interface.hh
	extern/voro++/src/c_loops.hh
	extern/voro++/src/container.cc
	extern/voro++/src/container.hh
	extern/voro++/src/container_prd.hh
	extern/voro++/src/wall.cc
	extern/voro++/src/worklist_gen.pl
	intern/rigidbody/RBI_api.h
	release/scripts/startup/bl_ui/properties_physics_softbody.py
	source/blender/blenkernel/BKE_rigidbody.h
	source/blender/blenkernel/intern/curve.c
	source/blender/blenkernel/intern/gpencil.c
	source/blender/blenkernel/intern/mask.c
	source/blender/blenkernel/intern/node.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/pointcache.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenloader/CMakeLists.txt
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/editors/animation/anim_markers.c
	source/blender/editors/animation/keyframing.c
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/curve/editcurve.c
	source/blender/editors/include/UI_view2d.h
	source/blender/editors/interface/interface_handlers.c
	source/blender/editors/interface/interface_templates.c
	source/blender/editors/interface/view2d_ops.c
	source/blender/editors/mask/mask_ops.c
	source/blender/editors/mask/mask_select.c
	source/blender/editors/object/object_edit.c
	source/blender/editors/object/object_modifier.c
	source/blender/editors/physics/physics_fracture.c
	source/blender/editors/physics/physics_intern.h
	source/blender/editors/screen/area.c
	source/blender/editors/sculpt_paint/paint_hide.c
	source/blender/editors/space_action/action_edit.c
	source/blender/editors/space_clip/tracking_ops.c
	source/blender/editors/space_graph/graph_edit.c
	source/blender/editors/space_sequencer/sequencer_edit.c
	source/blender/editors/space_sequencer/sequencer_select.c
	source/blender/editors/uvedit/uvedit_ops.c
	source/blender/makesdna/DNA_modifier_types.h
	source/blender/makesdna/DNA_rigidbody_types.h
	source/blender/makesdna/intern/makesdna.c
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/modifiers/CMakeLists.txt
	source/blender/modifiers/MOD_modifiertypes.h
	source/blender/modifiers/intern/MOD_explode.c
	source/blender/modifiers/intern/MOD_util.c
	source/blender/windowmanager/intern/wm_event_system.c
	source/blenderplayer/CMakeLists.txt
2014-04-20 14:43:14 +02:00
1972f7bd01 clustering for fracture 2014-04-20 12:41:40 +02:00
7bb6bf21d2 added point sources and seed 2014-04-17 12:13:19 +02:00
f49ddd310d bisect fix, geometry disappeared before 2014-04-16 13:25:56 +02:00
35e4e8a4fd missing brace caused compile errors... 2014-04-16 12:18:52 +02:00
15f50655e8 fixing compile.... 2014-04-16 11:20:05 +02:00
a04214d107 Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier
Conflicts:
	extern/carve/carve-capi.cc
	extern/carve/carve-capi.h
	extern/carve/carve-util.cc
	extern/carve/carve-util.h
	extern/carve/patches/series
	intern/bsp/intern/BSP_CSGException.h
	release/datafiles/locale
	source/blender/blenkernel/BKE_mesh.h
	source/blender/editors/space_view3d/view3d_select.c
	source/blender/makesrna/intern/rna_fracture.c
	source/blender/modifiers/intern/MOD_boolean_util.c
	source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.h
2014-04-16 11:05:38 +02:00
cc8bb235b9 pick attempts, fail 2014-04-16 10:32:24 +02:00
82285878f4 stuck / failing attempt for picking shards :( 2014-02-09 13:53:36 +01:00
de70b4e317 added (empty) fracture edit mode 2014-02-09 12:40:50 +01:00
e15f781ffd integrated latest crash fix (empty mesh at union operands) from sergey 2014-02-07 10:56:05 +01:00
413a80f966 small typo fix from sergeys patch 2014-02-06 11:06:34 +01:00
af818d32b3 Better handling of flipped face normals coming from voro++.
Instead of flipping the normals on the derived mesh, produce the face
loops in the correct order for shards.
2014-02-05 19:27:58 +01:00
5b4caa03ac Allow the fracture modifier to apply in editmode. 2014-02-05 18:51:48 +01:00
0daab1ef32 Fix for last terminator in voro++ output: this is just a single char. 2014-02-05 18:09:58 +01:00
310514c14e Simplified neighbor parsing from voro++ output.
Number of neighbors is exactly the same as number of faces - each face
has one neighbor. Moved this into the face section of voro++ output too,
since it's essentially face data.
2014-02-05 17:57:52 +01:00
d20aec59bd Fix for voro++ output parsing.
Use available print options from voro++ to get number of verts and loops
in advance, to avoid realloc. Also fixed bad mesh results with missing
vertices.
2014-02-05 17:16:59 +01:00
a3b452d752 Removed old dummy code for fracture. 2014-02-05 16:00:05 +01:00
9ca13f6e0e Added fracture_util.h to keep internal utility function declarations
out of the actual blenkernel header.
2014-02-05 15:02:29 +01:00
2befce02af a bit reduction of allocs, but still needed for loops (cant determine loop count fast / reliable for now in advance) 2014-02-04 20:37:01 +01:00
cbe0972d99 fix attempt for boolean 2014-02-04 13:54:17 +01:00
063d438054 Use a memstream again instead of a temporary file. But to avoid crappy
performance when directly parsing the stream, use a read-only string
stream afterward to do the actual parsing on the resulting char buffer.
2014-02-04 09:07:26 +01:00
bf59c1bc66 Use void argument to avoid compiler warning. 2014-02-04 08:54:12 +01:00
40fb7592f9 Applied diffs 837 and 838 from D274. 2014-02-03 13:25:42 +01:00
165bfecbc1 Merge branch 'master' into fracture 2014-02-03 12:39:30 +01:00
e66d3e5d0c Merge branch 'arcpatch-D274' into fracture
Conflicts:
	extern/carve/carve-util.h
	intern/bsp/extern/CSG_BooleanOps.h
	intern/bsp/intern/BOP_CarveInterface.cpp
2014-02-03 11:56:42 +01:00
9675ba189f Merge branch 'master' into fracture
The previous master merge was squashed, this has been reverted to avoid
unnecessary conflicts.

Conflicts:
	extern/carve/patches/series
2014-02-03 11:39:03 +01:00
4aeb8ea28f Revert "Merge remote-tracking branch 'refs/remotes/origin/master' into boolean_fracture"
This reverts commit ecc10dbe29.
2014-02-03 11:37:38 +01:00
15bb397fbb Rework carve integration into boolean modifier
Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Reviewers: lukastoenne, campbellbarton

CC: scorpion81, karja, jsm

Differential Revision: https://developer.blender.org/D274
2014-02-03 10:50:01 +01:00
c7a3a79da1 new boolean patch by sergey and small fracture bisect fix (need unity_m4 obmat instead of ob->obmat) 2014-02-02 20:30:03 +01:00
ecc10dbe29 Merge remote-tracking branch 'refs/remotes/origin/master' into boolean_fracture
Conflicts:
	extern/carve/patches/series
2014-02-01 15:53:38 +01:00
56beb2effe testing new boolean patch, CRASH ! in intersect.cpp, line 438 from carve 2014-02-01 15:24:29 +01:00
c2edd4cf8c memory leaks fixed 2014-02-01 13:11:52 +01:00
fe93f08d57 made fill optional with bisect 2014-01-31 23:31:56 +01:00
94c111072b tested different bisect fill algorithms; triangle fill on triangulated input turns out to be best 2014-01-31 22:12:58 +01:00
ae25dc66df changed memorystream back to real file, what a performance boost ! 2014-01-31 19:33:00 +01:00
0de34dcda1 added shard count / shard id to gui, tested performance, its very lousy compared to my earlier modifiers 2014-01-31 18:10:24 +01:00
cd6a1f503a made fracture algorithm selectable 2014-01-31 12:50:55 +01:00
87f2b86cd8 added bisect as second fracture algorithm 2014-01-31 12:23:25 +01:00
bffce8c727 tiny fix, boolean works without flipping the loops as well (except suzanne) 2014-01-31 10:08:38 +01:00
c20718e9d5 boolean fracture works ! (atleast partially, suzanne produces still errors) 2014-01-30 22:36:28 +01:00
5f8997a7a4 still a "negative" result, somewhere the normals need to be flipped, but how ?? 2014-01-30 21:03:11 +01:00
98e0ec4850 Merge branch 'refs/heads/boolean_fracture' into fracture
Conflicts:
	intern/bsp/extern/CSG_BooleanOps.h
	intern/bsp/intern/BOP_CarveInterface.cpp
2014-01-30 19:08:35 +01:00
2993b02b8e some fix attempts for flipping the face orientation, fail... 2014-01-26 23:56:30 +01:00
653a951ea3 first attempt of direct communication between blender<->carve layer and fracmesh, fail because normals are inverted.... 2014-01-26 22:53:32 +01:00
b257850ce2 saving fracture to blend and loading from it 2014-01-26 13:48:05 +01:00
de2e6a7004 Removed the vertco member in Shard, this was previously used for
simulation but is not needed any longer.
2014-01-26 12:05:15 +01:00
98ae9b083b Extended the BKE_create_fracture_shard funktion with a 'copy' argument,
so we can pass over arrays without having to do double alloc.
2014-01-26 11:58:09 +01:00
dd278f6a50 some memory leaks fixed, but some left, and attempt for writefile 2014-01-26 11:50:29 +01:00
57f8d0721f parsing and createdm makes valid mesh now 2014-01-26 11:13:26 +01:00
d1393032a2 parsing of voro++ data should work now, but a crappy mesh appears, hmm 2014-01-26 01:42:17 +01:00
7ff93f27ea attempt to parse voro++ data from string, not working yet 2014-01-25 23:36:03 +01:00
ca0b5ca635 Fix for point cloud construction: Use a point struct to avoid difficult
float arrays.
Also added Frac prefixes to prevent potential name collisions.
2014-01-25 20:41:03 +01:00
64e9066f4f A few small fixes for the voro++ C API, which seem to have fixed a
freezing issue when building with clang.

Also min/max initialization for point cloud construction.
2014-01-25 20:29:13 +01:00
f91218cbdf cmake cleanup: removed the ++ suffix from VORO cmake variables and
defines.
2014-01-25 20:02:03 +01:00
a511e86ebf Stub code for voro++ integration.
Not functional yet, but needs testing for potential voro++ bug.
2014-01-25 19:26:05 +01:00
34c07eed51 Removed the ShardList return value of the fracture function.
This is not used atm and it's a bit ugly to return such allocated
values. If necessary this can be added back later.
2014-01-25 17:28:53 +01:00
f86d71b025 Updated the pseudo-fracture method to new Mesh types. 2014-01-25 16:29:58 +01:00
3c310d565a New method for constructing the DerivedMesh for the fracture modifier.
Uses a simple union of all the shard mesh data.
2014-01-25 15:52:31 +01:00
f5e624aaad Create the initial fracmesh geometry by copying the input DerivedMesh
as a single shard.
2014-01-25 15:23:31 +01:00
fa1ace9f2d Removed the BMesh reference from FracMesh.
With the new Mesh data types this will no longer be needed.
2014-01-25 15:03:08 +01:00
5c21d96e5c Use plain Mesh types (MVert, MPoly, MLoop) in shards instead of copying
BMesh element arrays.

This will make Shard work more like a mini-Mesh struct and allow storing
of mesh data in blend files.

Larger construction methods currently disabled, TODO.
2014-01-25 14:36:30 +01:00
77cfd4e2f8 Partial revert of previous commit: DerivedMesh should be released by
setting needsFree and then calling dm->release.
2014-01-25 13:43:55 +01:00
414352fced fixed majority of memory leaks (of fracture) 2014-01-25 13:24:06 +01:00
090016f9d1 Moved the render_mesh DerivedMesh from FracMesh into the
FractureModifierData.

This keeps the derived mesh inside the modifier system and is more
in line with common principles in other modifiers.

Also did lots of style cleanup.
2014-01-24 17:15:22 +01:00
7e50455b8d basic foundation for fracture modifier / operator laid; todo fix memoryleaks... 2014-01-18 22:01:24 +01:00
d832011b82 modifier initial setup 2014-01-18 15:23:54 +01:00
c0907a6aa7 initial commit for new fracture system 2014-01-18 10:30:57 +01:00
30467f8e5c Code cleanup: As Sergey stated on bf-committers one should use id_us_min() if the user counter has to be decremented and not decrement the counter by hand. 2013-11-25 21:54:58 +01:00
3f8bd4fe15 Correct fix for T37617, (own recent regression) 2013-11-25 21:37:07 +01:00
375b6f5a57 Fix T37617: "Add plane" was adding a 2*2 grid
Was a regression from rBaa3c06b41ca9, hope this time all things are OK again (note the X/Y subdivision values still are different than before (-1 for same result), but imho they make more sense this way).
2013-11-25 21:27:35 +01:00
3f661c6355 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-25 21:27:35 +01:00
a3050d4b2d fix: marking edges as sharp in modifier did not work any more 2013-11-25 20:09:53 +01:00
f3007c42fc partial fix for fracturing meshes where origin is not in bounds center 2013-11-25 20:09:53 +01:00
c1ae472a10 some hacks to keep baked files with clipping working... 2013-11-25 20:09:53 +01:00
f6b0828870 hopefully fixed atleast the fracture with text converted to mesh/remeshed and objects whose origin is not at bounds center 2013-11-25 20:09:53 +01:00
81fb6d5261 changed (i think corrected) the centroid calculation for fractured objects with boolean 2013-11-25 20:09:53 +01:00
b7a772f567 fixing crash at refreshing fractured text, cause was improper handling of the necessary temp object for boolean function (yuck) 2013-11-25 20:09:53 +01:00
d612fd67b4 attempt to make text and curves work with rigidbody modifiers too, still failing (flying apart... crashes...) 2013-11-25 20:09:53 +01:00
8d25904e52 fix for autorefresh and depgraph callback, strangely did only work for the testblend and not for others... 2013-11-25 20:09:53 +01:00
fb6afeedce using direct function for dissolve in object conversion too 2013-11-25 20:09:53 +01:00
d58cbd01dd using dissolve function now directly to circumvent (hopefully) the va_arg problems under windows 2013-11-25 20:09:53 +01:00
29766b78c3 cosmetical update in gui 2013-11-25 20:09:53 +01:00
f35868f1b3 fix for use_animation and no autorefresh, mesh was reset to initial state always... 2013-11-25 20:09:52 +01:00
75bd4dabbe making ngons in boolean case now too 2013-11-25 20:09:52 +01:00
a926f7afe7 attempt to fix strange misbehavior of va_list / va_arg under windows by passing it as pointer to BM_op_vinitf instead of as value 2013-11-25 20:09:52 +01:00
7e0258de36 using bool variables (true, false) instead of int TRUE/FALSE now 2013-11-25 20:09:52 +01:00
0a62a7f52d making real ngons in convert to object as well now 2013-11-25 20:09:52 +01:00
e62419008f added depgraph callback for autorefresh 2013-11-25 20:09:52 +01:00
0bd32da174 crash fix and graphical error fix when rigidbody modifier is used with autorefresh, for now must disable autorefresh manually to make sim work again 2013-11-25 20:09:52 +01:00
91d018bb76 added autorefresh for explode modifier and particle selection mask (still crashing with rigidbody modifier attached, hmm) 2013-11-25 20:09:52 +01:00
ac6b1d923d added solver iterations override and proportional solver iterations options 2013-11-25 20:09:52 +01:00
80f71bf21c dont convert unnecessarily in clipping mode as well 2013-11-25 20:09:52 +01:00
f718c1cdbe fixes for making explode "applyable" again, did not work anymore 2013-11-25 20:09:52 +01:00
6b7ab62c94 increased cache playback speed by atleast 10fps (from 14 to 24 in a 5000 shard testcube) by eliminating unnecessary bmesh conversions in explode modifier 2013-11-25 20:09:52 +01:00
70e1988a1c some attempt to reduce memory usage, but no luck, hrm. 2013-11-25 20:09:52 +01:00
d76ead8e13 fix for null-pointer crash when attempting to create a cached derivedmesh from nonexistent bmesh 2013-11-25 20:09:52 +01:00
ab4ddd008f free vertices_cached if present before re-allocating -> prevent memory leak 2013-11-25 20:09:52 +01:00
3be53ebfde init explode modifier right after addition 2013-11-25 20:09:51 +01:00
1291b54616 changed visible mesh to derivedmesh, some performance gain, but still need to copy it in modifier 2013-11-25 20:09:51 +01:00
1de7452ba5 made parenting to empty default, it also cleans up the outliner a bit, so removed the 2nd operator button and the operator property again, was confusing 2013-11-25 20:09:51 +01:00
6f6bf095d6 added "convenience" support for blender destructability editor -> convert with parenting, usable together with addon in "Loose Parts" mode 2013-11-25 20:09:51 +01:00
a584f90abc crash fix for bake to keyframes 2013-11-25 20:09:51 +01:00
b95df881af partial crash fix for outer constraints, convert to objects takes mass / dist dependent thresholds into account now 2013-11-25 20:09:51 +01:00
353892bb14 better refresh manually after duplicating objects with modifiers 2013-11-25 20:09:51 +01:00
728db50b65 some (failing) attempts to fix boolean intersection (often has "inverted" results) 2013-11-25 20:09:51 +01:00
a4f7e80d76 remove gitignore files from commits 2013-11-25 20:09:51 +01:00
9c9e8808c2 making ngons and marking edges as sharp for object convert operator 2013-11-25 20:09:51 +01:00
29d8e09c4c another attempt to fix baking, doesnt show negative side effects up to now 2013-11-25 20:09:51 +01:00
7d320da003 fix for baking regular rigidbodies, (hopefully) 2013-11-25 20:09:51 +01:00
48e8faeac9 hide the constraint empties after bake to keyframes, make sure you select the constraints as well prior to bake to keyframes or blender crashes afterwards (because of stray constraints not being removed properly) 2013-11-25 20:09:51 +01:00
5d4538ab29 fix for converting classic explode modifier to objects, objects had holes 2013-11-25 20:09:51 +01:00
169033992d compile fixes due to merge 2013-11-25 20:09:51 +01:00
24cf767e15 convert to objects takes textures into account now and makes ngons 2013-11-25 20:09:50 +01:00
b2459b805c crash fix for bake to keyframes and crash at quitting blender 2013-11-25 20:09:50 +01:00
a2d10e9848 throw away whole Rigidbodyworld and recreate when converting to objects to circumvent crashes 2013-11-25 20:09:50 +01:00
c2b0603e7a attempt for selecting the shards, doesnt work for some reason... hmm 2013-11-25 20:09:50 +01:00
69db68e8eb added experimental "convert to objects" operator, doesnt take textures into account yet 2013-11-25 20:09:50 +01:00
94a039ac52 fixed a memory leak; framemap was not deleted in some cases 2013-11-25 20:09:50 +01:00
e631dbb9af crash fix for using baked data with compounds 2013-11-25 20:09:50 +01:00
030423e7e2 mark edges from faces with inner material as sharp (for usage with smooth shading and edgesplit modifier to hide the fracture cracks) 2013-11-25 20:09:50 +01:00
11d23a9f61 silently ignore refresh requests when not on startframe now, otherwise internally (bullet userpointers) get freed but not nulled which can lead to crashes 2013-11-25 20:09:50 +01:00
99e70a6faf fix: clusters did not work with booleans 2013-11-25 20:09:50 +01:00
3c1701d498 activate collision between intact/destroyed compounds when compound shape is chosen 2013-11-25 20:09:50 +01:00
869ad992de use normal breaking threshold with cluster size 1 (means no clustering at all) 2013-11-25 20:09:50 +01:00
e90872ca24 fix (attempt) for cluster refreshing, clusters fall apart without this unexpectedly 2013-11-25 20:09:50 +01:00
6886a42d7f added cluster size and cluster percentage in explode modifier, and a new inner-cluster threshold in rigidbody modifier, removed map delay and emit continously options (they were misleading) 2013-11-25 20:09:49 +01:00
0f21491fa2 apply clustering with "Map Delay" to rigidbody modifier as well, by comparing particle indexes, need still a threshold value entry for "inside" the clusters 2013-11-25 20:09:49 +01:00
298b8a25e9 compile fix 2013-11-25 20:09:49 +01:00
3a838c01f6 crash fix for compound shape and making particle animation work again 2013-11-25 20:09:49 +01:00
506edfefb9 modifiers need to say whether they depend on normals, update due to changes in solidify modifier and normal calculation 2013-11-25 20:09:49 +01:00
90892008bd crash fix for compound shape 2013-11-25 20:09:49 +01:00
c262e138e6 crash fix when moving object interactively and only one object is in list (did not fall) 2013-11-25 20:09:49 +01:00
90b777c18a crash fix after merge, NULL seems to be invalid here now 2013-11-25 20:09:49 +01:00
4d60d54fa8 compile fixes 2013-11-25 20:09:49 +01:00
ce044b6740 crash fix (hopefully) for NULL cache_offset_map 2013-11-25 20:09:49 +01:00
776da90407 recenter fix (again) car roof was clipped away and refresh logic fix, hopefully 2013-11-25 20:09:49 +01:00
2857a137f5 crash fix for uninitialized modifiers 2013-11-25 20:09:49 +01:00
070162b490 make compounds of different objects collide with each other 2013-11-25 20:09:49 +01:00
85351b8bd8 fix for unwanted rigidbody settings reset (with modifiers) when simulation is recalculated 2013-11-25 20:09:49 +01:00
5eb9a24efa do not construct modifiers automatically after loading, can cause crashes in case of important related objects not loaded yet, but need to refresh manually each time after loading 2013-11-25 20:09:49 +01:00
c99f531ae9 object recenter fix, need to refresh to correct wrong translation of object in case of changing the origin 2013-11-25 20:09:48 +01:00
31eabfc221 copying rigidbody objects before modifiers now, in case of rigidbody modifiers changes should be taken into account 2013-11-25 20:09:48 +01:00
afdd86826e fixes for crash after loading file with classic explode and rigidbody and fix for memory leak 2013-11-25 20:09:48 +01:00
b208c6730d using classical explode retains its shapes in rigidbody modfier, only centroids seem not completely correct yet 2013-11-25 20:09:48 +01:00
3a3fa959b9 fix attempt for corrupt Memory blocks with cache_index_map / cache_offset_map 2013-11-25 20:09:48 +01:00
79934f6bdc refresh on modifiers works over a whole selection now 2013-11-25 20:09:48 +01:00
b7aed3b37f crash fix for duplicating objects with explo and rigidbody modifier 2013-11-25 20:09:48 +01:00
b91192d454 long faces support, part 2, still have double faces 2013-11-25 20:09:48 +01:00
ddac6fbea1 hmm, there is a bug in MOD_rigidbody.c but fixing it causes worse behavior, so keeping it for now 2013-11-25 20:09:48 +01:00
f5f1515fe9 first step of adding "long face" support 2013-11-25 20:09:48 +01:00
947653bbf3 added option to enable/disable self collision of constrained objects, does not affect compounds yet (led to strange results there) 2013-11-25 20:09:48 +01:00
fa1ac8c040 keep using neighborhood info with VERTS target if explomodifier is available, need this for correct wood bar, compounds wont really work with scaled objects yet. 2013-11-25 20:09:48 +01:00
4af38f7067 dont use neighborhood info for boolean any more, use bounds center for convex hull compounds without constraints 2013-11-25 20:09:48 +01:00
0854457667 some fix for scaled objects, cell grid was not aligned with object 2013-11-25 20:09:48 +01:00
ecc278fe46 further attempt to get scaling with compounds correctly working, still no luck, hrm. 2013-11-25 20:09:47 +01:00
17c81aac12 partial fix for using compounds on scaled objects, but not solved fully yet 2013-11-25 20:09:47 +01:00
87d693e112 fix for non-compound case, was not working with baking anymore 2013-11-25 20:09:47 +01:00
ed619166da small fix against possible corrupt end block (reallocating NULL pointer) 2013-11-25 20:09:47 +01:00
e3ff45781c baking with compounds should work now, finally... 2013-11-25 20:09:47 +01:00
007e2507c3 baking almost fixed... 2013-11-25 20:09:47 +01:00
da2014727e little progress only, breaking in baked mode, but some rigidbodies or so still missing 2013-11-25 20:09:47 +01:00
8cc646b531 stupid baking does not work after save and load yet... means compounds wont disintegrate visually, hrm. 2013-11-25 20:09:47 +01:00
53db50a9b4 damn baking errors, not fully solved yet... 2013-11-25 20:09:47 +01:00
4bb76122d2 missing some properties to copy 2013-11-25 20:09:47 +01:00
4977e05c53 not using old cell neighborhood anymore in case of compound usage 2013-11-25 20:09:47 +01:00
3563f48435 bmesh asserts do not occur anymore, yay ! 2013-11-25 20:09:47 +01:00
77e8608d73 small fix: use_experimental did invalidate cache, which is nonsense in this case 2013-11-25 20:09:47 +01:00
d3736eefd6 fix for explo and rigidbody modifier combination: simple fractured cube did not fall any more 2013-11-25 20:09:47 +01:00
3c89a23c2b crash fix for missing particlesystem and changes being made to explo modifier while rigidbodymodifier is enabled too 2013-11-25 20:09:47 +01:00
a1b1750253 partial fix for bmesh asserts, still got a lot of them, need to investigate further 2013-11-25 20:09:46 +01:00
06a30364b8 rigidbody modifier gui cleanup 2013-11-25 20:09:46 +01:00
61977f80cb fix for windows crash, tried to write at freed location, gcc must have "optimized" that out 2013-11-25 20:09:46 +01:00
04cdf953dd small hack for reducing clipping time and hopefully a fix for windows crashes... 2013-11-25 20:09:46 +01:00
b08b930a8b accelerated clipping by 50 % total, and it does increase less then linear for more cells now 2013-11-25 20:09:46 +01:00
ba1c830df1 auto-recenter should work now 2013-11-25 20:09:46 +01:00
c960f7eb89 accelerated clipping by approximately 30%(in a smaller testfile), not so much but its noticeable 2013-11-25 20:09:46 +01:00
4e8c7adeb3 windows crash fix (hopefully) for removing cells (was a warning in linux only) 2013-11-25 20:09:46 +01:00
94b265a2e2 increased voronoi container size, sometimes it is too small (when bbox is too small!!) 2013-11-25 20:09:46 +01:00
9bbfc0623e attempt for acceleration of clipping, failed due to incorrectness (holes appear), and was not so much faster at all 2013-11-25 20:09:46 +01:00
df92812fdc hole problem solved by 98 % or so, only 2 wrong triangles at whole car !! 2013-11-25 20:09:46 +01:00
4c21dd4e6f hole problem seems to be solved, need more tests still 2013-11-25 20:09:46 +01:00
8cafbff1c2 creating hole filling shapes separately from mesh 2013-11-25 20:09:46 +01:00
e0eaff4a78 successful test with clipping and car 2013-11-25 20:09:46 +01:00
2e377fb40d hole problem almost solved, need to deal with a special case still (wrong vert selected..) 2013-11-25 20:09:46 +01:00
cbb385043a clipping works mostly, mesh has some leftover holes, hmm 2013-11-25 20:09:45 +01:00
d9d6d13f39 first steps towards mesh clipping 2013-11-25 20:09:45 +01:00
4f41011f66 fix for compound creation, was throwing unnecessary error there 2013-11-25 20:09:45 +01:00
2901a846ee fix for wrong compound rotation 2013-11-25 20:09:45 +01:00
b79c97163d fix for crash while changing contact dist, changing back collision condition 2013-11-25 20:09:45 +01:00
a42e2efb3b improved refresh logic, can do updates with rigidbody constraint refresh mostly, which is called automatically on value changes as well 2013-11-25 20:09:45 +01:00
eade7e9baa small collision tweak for compounds (no implosions) 2013-11-25 20:09:45 +01:00
0e0cc39079 added compound shapes and disabled collision between compound/compound and compound/shard, reduces the "explosions" 2013-11-25 20:09:45 +01:00
3babd5a0f0 windows NAN fix, better do this elsewhere... 2013-11-25 20:09:45 +01:00
05c4b50d1d cache should work now mostly, but still need full refresh to do it properly, hmm, maybe reset the frame data... 2013-11-25 20:09:45 +01:00
c54e7bfd54 compound sim need still refresh constraints, cache works only partially because compound parents disappear from simulation (better deactivate them only or so) 2013-11-25 20:09:45 +01:00
b996b71df2 compound needs some work still, but becomes usable step by step 2013-11-25 20:09:45 +01:00
d6d0931d91 still working on proper compound / constraint cooperation 2013-11-25 20:09:44 +01:00
085975ad4a compound basic principle working, but very uncomfortable to control still, needs to be rebuilt once broken correctly 2013-11-25 20:09:44 +01:00
a6d3d775b0 first attempt for cell based simulation, not very good yet, needs improvement 2013-11-25 20:09:44 +01:00
019d927188 fix for last commit, still accelerating but correctly now 2013-11-25 20:09:44 +01:00
068ee02ed8 accelerated the check for existing constraints 2013-11-25 20:09:44 +01:00
13d5400054 added separate constraint update operator (only updating constraints) for quicker workflow 2013-11-25 20:09:44 +01:00
be39771bc7 opticall separation of values which need refresh and which dont 2013-11-25 20:09:44 +01:00
53515ddec4 changes for cell calculation, but this mode does not really work, still (just in for testing purposes) 2013-11-25 20:09:44 +01:00
7cc1fe1f45 added cell/centroid based approach again, delivers only the most necessary constraints in good time 2013-11-25 20:09:44 +01:00
c57a476494 added new cellbased search, performance not so ok... 2013-11-25 20:09:44 +01:00
0137ee3038 calculation fix for cell/meshisland assignment 2013-11-25 20:09:44 +01:00
801ab516c0 attempt for cellbased search, but loss of performance instead of gain, hrm. 2013-11-25 20:09:44 +01:00
4cbc15449f breking threshold 0 means undestructible now 2013-11-25 20:09:44 +01:00
11132108b9 added time printouts in seconds 2013-11-25 20:09:44 +01:00
72a46c10c0 fix for 0 limit and prop checked, was creating 0 constraints instead of "all" 2013-11-25 20:09:44 +01:00
972a73b316 added proportional limit and proportional distance for reducing number of neighborhood lookups in dense areas with many small parts 2013-11-25 20:09:43 +01:00
6adf68d8b5 expose bullet activation state and use it to deactivate both constraint partners in case of one is deactivated (avoids objects jittering around) 2013-11-25 20:09:43 +01:00
b399d9ce6c reset cache on moving objects and reenable all constraints 2013-11-25 20:09:43 +01:00
da029a6d97 fix for: canceling transforms with rigidbody modifier, was not done properly before 2013-11-25 20:09:43 +01:00
787a49d4fc ensure updateability of noise (when it changes) 2013-11-25 20:09:43 +01:00
a29cf33e61 yes! baking fixed finally now, need to rebake once to include a noisemap, which will be applied instead of generating new noise 2013-11-25 20:09:43 +01:00
ec9d5a45a2 added 3 more breakup options: breaking percentage, breaking angle and breaking distance 2013-11-25 20:09:43 +01:00
d482007dfd fix mass and centroid calculation for 1 vertex objects 2013-11-25 20:09:43 +01:00
408f931dd9 fix for separation method, did not work correctly if an unsuccessful halve occurred 2013-11-25 20:09:43 +01:00
1eb3d85e13 fix for crash when deleting objects with modifier (and cache is valid) 2013-11-25 20:09:43 +01:00
a5363ff015 fix for crash at object deletion when cache is valid 2013-11-25 20:09:43 +01:00
7e7b4708f3 sim startup time with applied array modifiers (on 20x20x20 test cube) reduced, removed unnecessary bmesh conversions 2013-11-25 20:09:43 +01:00
aa11c52611 fixed baking (to earlier state, with old errors, but works again), added mass calculation again was omitted testwise (long sim startup time) 2013-11-25 20:09:43 +01:00
999441106f pointcache and crash fix 2013-11-25 20:09:43 +01:00
3ce0957f1b cache index lookup speedup, WARNING, buggy 2013-11-25 20:09:42 +01:00
d4b41cf4a6 now properly deleted objects in open scenes as well, there were remainders in depsgraph causing crashes after incomplete delete 2013-11-25 20:09:42 +01:00
3b18a17010 added threshold and solver iterations, but its all still crash prone (when exchanging objects after simulation, DAG_tag updates makes this visible, probably object is STILL not properly deleted... 2013-11-25 20:09:42 +01:00
8fdc3b10d5 rotation and scale was not taken into account, fixed that 2013-11-25 20:09:42 +01:00
26c2fd49f5 further attempts to restore recent functionality of modifiers 2013-11-25 20:09:42 +01:00
db8a69f076 fracture works sorta, but cleaning up own mess in new run not. Very hard to get rid of objects actually. 2013-11-25 20:09:42 +01:00
512598da0a first steps to make operators from modifiers 2013-11-25 20:09:42 +01:00
e467249f35 hrm, fix for volume calculation and mass setting 2013-11-25 20:09:42 +01:00
0af63c9859 add a test for 0 length in volume calculation and set a minimum mass for 0 mass active objects 2013-11-25 20:09:42 +01:00
7a7d7165d2 do not abort at 0 verts, its too early, potential constraints are skipped 2013-11-25 20:09:42 +01:00
1713964d69 abort with 0 shared verts 2013-11-25 20:09:42 +01:00
13644afe9a fix for vertexbased constraint lookup: bboxtest continues loop instead of breaking it, and atleast 1 vertex is enough now for a constraint 2013-11-25 20:09:42 +01:00
1c4106ada2 fix for crash with missing particle texture (and no fracture mesh available) 2013-11-25 20:09:42 +01:00
d9a39262c4 added old constraint code (vertex distances) again, maybe it turns out to be useful in some cases 2013-11-25 20:09:42 +01:00
6803ed3265 forgot to add function to header 2013-11-25 20:09:42 +01:00
1deafe9d6d added dist dependent Threshold, but does it really help ? 2013-11-25 20:09:41 +01:00
ab004e58ee fix for crash applying/deleting explo modifier with rigidbody modifier below 2013-11-25 20:09:41 +01:00
26edda3db4 changed physics mesh from bmesh to derived mesh, reduces memory usage 2013-11-25 20:09:41 +01:00
030ce80a73 changed select linked walker method from island to shell, works on non manifolds too 2013-11-25 20:09:41 +01:00
f09d82a541 some fix for bigger undividable islands 2013-11-25 20:09:41 +01:00
501785846d regular explode modifier and rigidbody should not crash anymore 2013-11-25 20:09:41 +01:00
c060f042dc another fix for missed unvisited seed vertices and check if island is dividable 2013-11-25 20:09:41 +01:00
4dd4479970 Halving approach fixed now, still very fast compared to before 2013-11-25 20:09:41 +01:00
51fad3521a Halving Approach successfully implemented, very fast and correct now 2013-11-25 20:09:41 +01:00
b4eb9fe87d first attempt of halving method, fast but still incorrect 2013-11-25 20:09:41 +01:00
b649feaf59 mainly performance optimization attempts and some cleanup 2013-11-25 20:09:41 +01:00
ed6726c9f3 automerge quick fix 2013-11-25 20:09:41 +01:00
6a35f695ef performance fix, if array and subsurf modifiers before rigidbody were in a certain sequence, performance was extremely bad due to incorrect mesh_separate_tagged function 2013-11-25 20:09:41 +01:00
76620e8d53 crash fix for cache_offset_map (needed to nullify) 2013-11-25 20:09:41 +01:00
460bfa85dd oddly, in rigidbody.c not everywhere MEM_ functions were used, fixed that due to odd crash 2013-11-25 20:09:40 +01:00
5090b47a03 fixes to allow other constraint types and (mostly) correct outer constraints again 2013-11-25 20:09:40 +01:00
37aa3b1d0c cache_offset_map, store offset instead of calculating, but only 1fps speed gain, hrm 2013-11-25 20:09:40 +01:00
1ba6e997f5 memory leaks fixed 2013-11-25 20:09:40 +01:00
4b71477299 automerge fix applied again (was not working any more) 2013-11-25 20:09:40 +01:00
eb1fce1cd1 attempt for fixing bake error, unfortunately no luck yet 2013-11-25 20:09:40 +01:00
dc388537ab some stabilization (refreshing modifiers crashed before) but still error with baked data and memory leak 2013-11-25 20:09:40 +01:00
3151004efe seems to run faster now, but still have a big memory leak 2013-11-25 20:09:40 +01:00
9875537458 further work at speedup, automerge needs to be tackled still 2013-11-25 20:09:40 +01:00
d52a57ee9d partial success with speedup attempt, but automerge still slow and wrong 2013-11-25 20:09:40 +01:00
36c17c46fe minor correctional fixes, enable automerge workaround again 2013-11-25 20:09:40 +01:00
edbe775ebe some attempts to increase performance, only a bit faster now 2013-11-25 20:09:40 +01:00
d03b5110bb first attempt to increase performance: disable storage of fracture results, this costs more performance instead improving it, and added a boundbox test for constraints calculation (but often those intersect each other, so not much performance gain, also need to fix for not touching islands which possibly should act as fixed too (using higher contact distance) 2013-11-25 20:09:40 +01:00
4335d31689 merge related compile fix 2013-11-25 20:09:39 +01:00
0ffa93618f correction: calculate only (many) fixed constraints faster, the other outer constraint types connect to 1 shard basically and work incorrectly if calculation stops at 0 shared vertices. 2013-11-25 20:09:39 +01:00
4cce73db0f small performance plus when building constraints, stop when 0 shared vertices occur (because meshislands are sorted by distance, kdtree) 2013-11-25 20:09:39 +01:00
665ae32809 adapt change from BMesh Operator "recalc face normals", removed some printouts 2013-11-25 20:09:39 +01:00
0d36d920aa merge related fixes 2013-11-25 20:09:39 +01:00
e69f1e80f5 can move constrained objects now during sim, will be autorefreshed next time, a bit more overall stability, but especially with constraint groups still bullet assertions possible when moving objects 2013-11-25 20:09:39 +01:00
c83727f844 some minor cleanup 2013-11-25 20:09:39 +01:00
71106384d7 a bit more stabilization for outer constraints, but cache shows still unexpected behavior 2013-11-25 20:09:39 +01:00
5787989733 disable auto-refresh in rigidbody modifier (can be very slow, but ... always remember to hit refresh before starting the sim now !) 2013-11-25 20:09:39 +01:00
ee239cce8f fix for scrubbing around in timeline while cache is not full yet -> did reshape too often (at saving, not at loading) accidentally 2013-11-25 20:09:39 +01:00
d6ae5785b7 a bit code cleanup 2013-11-25 20:09:39 +01:00
5f6659b35e re-introduce Group Contact Distance (has effect for fixed type only) fix for changing passive to active unexpectedly 2013-11-25 20:09:39 +01:00
bccb1971ab allow explode/voronoi modifer usage of previous modifier data 2013-11-25 20:09:39 +01:00
f77608aca2 fix for outer constraints, should work more reliably now 2013-11-25 20:09:39 +01:00
db73e4e4da closed some memory leaks 2013-11-25 20:09:39 +01:00
fe0dbf7ea2 crash fix for using customdata like e.g. textures, need manual refresh after load ! 2013-11-25 20:09:38 +01:00
36933e4bc2 compile fixes related to merge 2013-11-25 20:09:38 +01:00
6f8fa4182e fix for ownVertices, extraParticles (noise and coordinate correction) 2013-11-25 20:09:38 +01:00
ebf21db092 small fix for crash with outer constraints between more than 2 objects (after duplicating object with modifier) 2013-11-25 20:09:38 +01:00
a68f7159f9 added more constraint types for outer (and inner) constraints and outer constraint location (still subject to change) 2013-11-25 20:09:38 +01:00
5372591d0f additional test whether modifier is active (and not only there) when running rigidbody sim 2013-11-25 20:09:38 +01:00
60d80857d3 crash fix for selecting own verts on default cube 2013-11-25 20:09:38 +01:00
2ec4973d69 crash fix for constraint groups in conjunction with automerge 2013-11-25 20:09:38 +01:00
b76ab4e343 crash fix for loading files with constraint group enabled 2013-11-25 20:09:38 +01:00
a9f33f51d7 merge related compile fixes 2013-11-25 20:09:38 +01:00
9c20a46f5a small tweak for automerge 2013-11-25 20:09:38 +01:00
8f86353b88 storing vertco now, crash fix for adding new rigidbody modifier, attempt to fix glitch when simulation is interrupted and continued before cache is full (everything gets reset->why ?) 2013-11-25 20:09:38 +01:00
5e48a020d5 copying object with modifiers active should not crash anymore now 2013-11-25 20:09:38 +01:00
78a0670728 crash fixes for saving and loading, some tweaks for automerge 2013-11-25 20:09:38 +01:00
5242899aad added automerge distance, the whole automerge still needs tweaking, not reliable enough yet 2013-11-25 20:09:37 +01:00
093f437356 crash fixes for running sim / saving / undo after applying modifier 2013-11-25 20:09:37 +01:00
cba006d52e missed some null pointer checks 2013-11-25 20:09:37 +01:00
9ac7ac04ac 4th attempt, memory leaks eliminated 2013-11-25 20:09:37 +01:00
92928c0b00 3rd attempt, saving /loading working now, need to test still with customdata and undo 2013-11-25 20:09:37 +01:00
cd345412c8 second attempt for storing fracture result, its incorrect and slower than regenerating, so deactivated as well, but might be usable as reference later 2013-11-25 20:09:37 +01:00
add28fe4ce first attempt for storing fracture results, deactivated for now 2013-11-25 20:09:37 +01:00
7ce7f8a453 added null test for meshisland again, workaround when removing mesh islands and cache data is still there (would crash otherwise) 2013-11-25 20:09:37 +01:00
c8ad1ba65a added limited dissolve, crash fix when less constraints than expected 2013-11-25 20:09:37 +01:00
ba6e6a932d improved version of automerge, taking constraints into account 2013-11-25 20:09:37 +01:00
1f34dfef18 automerging inner geometry if object has not been hit, works for very low threshold only (settable via group contact property) and for now globally only, its possibly easier to fake an intact rigidbody with traceable settings or cycles nodes 2013-11-25 20:09:37 +01:00
3391e7a84c additional NULL check (but sometimes that area isnt NULL, just FREE, need still to investigate) 2013-11-25 20:09:37 +01:00
8711e3c6d8 allow modifier settings to be copied (when duplicating objects) 2013-11-25 20:09:37 +01:00
73f0b2d22d some code cleanup 2013-11-25 20:09:37 +01:00
3359d02d12 calling updateCell now in each case->evade corner case for one frame lag 2013-11-25 20:09:36 +01:00
964bdd434a catch possible NULL pointers 2013-11-25 20:09:36 +01:00
41fc551a86 fix for frame-lag when using kinematic fractured objects 2013-11-25 20:09:36 +01:00
46e81cf749 some code cleanup 2013-11-25 20:09:36 +01:00
0ce1f2b886 properly syncing shards now with RNA rigidbody settings of object, should allow correct animation now 2013-11-25 20:09:36 +01:00
194816da67 added (internally) a collision callback, allows partial activation of fractured deactivated objects 2013-11-25 20:09:36 +01:00
2ceb96f479 attempt for testing for group slave (deactivated in code) 2013-11-25 20:09:36 +01:00
02573fe35d -option for mass dependent threshold (constraint with max mass gets set threshold, the others are relative to that mass) -attempt for automating the refresh process (needs manual refreshes still now, even more) 2013-11-25 20:09:36 +01:00
7dcc5e692a some stabilization attempts for constraint groups, but still crashy and not intuitive enough 2013-11-25 20:09:36 +01:00
9212bd6832 compile fix (hopefully, at least here it works) 2013-11-25 20:09:36 +01:00
816e67e537 added group breaking threshold and group contact distance, now evalulating each modifiers settings in group constraints when overriding 2013-11-25 20:09:36 +01:00
91bba9bcbb added feature: Can connect multiple fractured rigidbody objects together automatically, fixed constraint for now only. To Use add another fractured object into constraint group of "parent" object (where others will be attached to) 2013-11-25 20:09:36 +01:00
31248db13c forgot to free some memory blocks 2013-11-25 20:09:36 +01:00
89aa38094c fixed wrong calculation and memory handling of point clouds, which led to often crashes. made explode a single modifier (removed copy), added outliner icon for rigidbody modifier 2013-11-25 20:09:35 +01:00
313adc270d fixing attempt for crash when using no pointsource and boolean intersection, change how noise is applied (memory access) 2013-11-25 20:09:35 +01:00
f2ec6d41ca added noise / percentage for pointsource, replaced child options by a group selection, made only one breaking threshold, removal of unused options, rename of Use Rigidbody, added refresh operator for explode voronoi mode (behavior still a bit inconsistent) 2013-11-25 20:09:35 +01:00
1a83942915 support smooth shards (if atleast one original object face is smooth), but looks bad still 2013-11-25 20:09:35 +01:00
c97f0437ad added some null checks, a bit cleanup 2013-11-25 20:09:35 +01:00
4a464602f9 calculating shard mass at creation/change, coordinate calculation fixes with own verts and greasepencil 2013-11-25 20:09:35 +01:00
433126d856 removing invalid faces in (very small area and less than 3 verts) in explode modifier (geometry fix) 2013-11-25 20:09:35 +01:00
8d89c7d8be small correction for constraints, atleast 3 shared vertices are needed to build a constraint fixes for incorrect meshes with radial point clouds step 1 (still non-manifold edges/faces) 2013-11-25 20:09:35 +01:00
083cc275fd ignore symlinks 2013-11-25 20:09:35 +01:00
c7d6fded16 child vertex wrong coordinate fix, but still problems with radial pointclouds (triangles miss, tessface fails ?) 2013-11-25 20:09:35 +01:00
fbe4d474ea make constraints optional, its very slow to set them up between many shards 2013-11-25 20:09:35 +01:00
ec8cacf7ae correction for cluster calculation 2013-11-25 20:09:35 +01:00
e9c1b187ce its possible to set inner and outer breaking threshold now for shard constraints 2013-11-25 20:09:35 +01:00
80c81856dd inner constraints work now basically, but need to have user interface to define strengths yet. 2013-11-25 20:09:34 +01:00
48663dd9df first steps with inner constraints, but moving the object when we have cached frames crashes bullet 2013-11-25 20:09:34 +01:00
d162008d5d small cleanup 2013-11-25 20:09:34 +01:00
3375afa3fe using polygons instead of tessfaces for voronoi cells now, but still faces miss 2013-11-25 20:09:34 +01:00
9439e57fc4 attempt for fixing missing faces problem (due to bm->dm->bm conversion ?) 2013-11-25 20:09:34 +01:00
80b6e52c09 fix for freeing NULL pointer, fix for visual errors with kinematic objects and interactive rotation and wrong mass calculation for shards 2013-11-25 20:09:34 +01:00
d635f222a1 correctly initializing ob->imat before using it, fixes bug where object was positioned at camera after render 2013-11-25 20:09:34 +01:00
29a64d71f2 scaling problem should be fixed now 2013-11-25 20:09:34 +01:00
d5e87fc445 fix for uneven scaling (mesh was distorted at collision before) 2013-11-25 20:09:34 +01:00
3d0795b044 attempt for getting scale properly to work, no success yet 2013-11-25 20:09:34 +01:00
4f47f0fc68 partial fix for scaling problem, but scaled fractured objects still lead to display errors, workaround: apply scale before fracture 2013-11-25 20:09:34 +01:00
4ad2bd8c0e fix for animation "jump" bug when rigidbody modifier is on animated object 2013-11-25 20:09:34 +01:00
ad7e1c124b attempt for fix for MeshIsland Null Pointer in Pointcache (index calculation fix) 2013-11-25 20:09:34 +01:00
ca216d9e7e crash fix when selected no point source, fix for using child vertices 2013-11-25 20:09:34 +01:00
1d195e6362 Fix NULL checks when dealing with pointcache
This needs to be cleaned up further but should be at least correct.
2013-11-25 20:09:34 +01:00
94eeeb9c4b Style and warning fixes 2013-11-25 20:09:33 +01:00
4ff02f7fc3 there should be only one rigidbody modifier per object, so it must not be copyable as well 2013-11-25 20:09:33 +01:00
862d098125 small fix, attempted to free some NULL pointers before. 2013-11-25 20:09:33 +01:00
055c5c91a7 ok, values are passed through now at once to shards at change (tested with kinematic) 2013-11-25 20:09:33 +01:00
2e1de279d3 first attempt to apply settings to each shard and calculate mass, maybe better move this into modifier/refresh ? 2013-11-25 20:09:33 +01:00
91eea4a3de fixed a rotation bug (each shard was rotated differently) and a small memory leak, although rotating objects during simulation (by hand) yields still an error (objects breaks apart at once) 2013-11-25 20:09:33 +01:00
54517891d8 fix for wrong pos calculation after moving objects 2013-11-25 20:09:33 +01:00
cd806601fb added refresh operator for rigidbody modifier to recalculate rigidbodies when mesh changes 2013-11-25 20:09:33 +01:00
3f2658bb99 calculating centers of mass now correctly for shards 2013-11-25 20:09:33 +01:00
d5aea12969 small fix for grabbing and moving objects during the sim 2013-11-25 20:09:33 +01:00
7b53f675bd this fix resets the simulation on esc properly 2013-11-25 20:09:33 +01:00
e39fc2c8ab added new rigidbody modifier doing the mesh island handling, instead of explode modifier 2013-11-25 20:09:33 +01:00
e81c5cec0a crash fix (wrong cache mapping) and white space cleanup (tabs only) 2013-11-25 20:09:33 +01:00
c593241cc7 fixes for: moving the object during rigidbody sim (no crash anymore) and one piece was always stuck in the air (wrong calculation in cache) 2013-11-25 20:09:32 +01:00
c8a4744ca5 some cache fixes to allow multiple (duplicated) rigidbodies with modifiers on them 2013-11-25 20:09:32 +01:00
e509a65885 added use rigidbody as new option, some smaller fixes 2013-11-25 20:09:32 +01:00
5516678889 can run simulation backwards now too (update mesh from cache, but still sometimes crashes) 2013-11-25 20:09:32 +01:00
1a77e9f316 very basic collision works, but unreliably for now (sometime cache crashes, center of mass still wrong 2013-11-25 20:09:32 +01:00
a89196af1b sorta optical feedback (but massively wrong) 2013-11-25 20:09:32 +01:00
776cd94b77 crash fixes, wip 2013-11-25 20:09:32 +01:00
c0ab26b8a7 attempts for integrating fractured objects into rigidbody sim, still wrong and incomplete 2013-11-25 20:09:32 +01:00
427783a3ac adapting rigidbody sim to accept mesh shards too (in progress) 2013-11-25 20:09:32 +01:00
0508f7be8d small build and link fixes 2013-11-25 20:09:32 +01:00
fbea1a566c update and merge code branches - voronoi modifier 2013-11-25 20:09:32 +01:00
e48616d08a test commit 2013-11-25 20:09:32 +01:00
710 changed files with 67530 additions and 4719 deletions

6
.gitmodules vendored
View File

@@ -2,7 +2,7 @@
path = release/scripts/addons
url = ../blender-addons.git
ignore = all
branch = master
branch = blender-v2.79-release
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
@@ -12,9 +12,9 @@
path = release/datafiles/locale
url = ../blender-translations.git
ignore = all
branch = master
branch = blender-v2.79-release
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
ignore = all
branch = master
branch = blender-v2.79-release

View File

@@ -243,6 +243,7 @@ else()
endif()
option(WITH_PLAYER "Build Player" OFF)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_VORO "Enable Voronoi Fracture based on Voro++" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
@@ -285,6 +286,7 @@ endif()
if(WITH_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
option(WITH_X11_ALPHA "Enable X11 transparent background" ON)
endif()
@@ -374,6 +376,13 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
# Freestyle
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# Crashpad / Breakpad
option(WITH_CRASHPAD "Enable crashpad or breakpad (crash reporting)" OFF)
set(CRASHPAD_URL "http://127.0.0.1:1234" CACHE STRING "URL to report crash reports to")
mark_as_advanced(WITH_CRASHPAD)
mark_as_advanced(CRASHPAD_URL)
# Misc
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
@@ -686,6 +695,7 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
set(WITH_X11_ALPHA OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
@@ -830,6 +840,14 @@ if(WITH_X11)
endif()
endif()
if(WITH_X11_XFIXES)
if(X11_Xfixes_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
else()
set(WITH_X11_XFIXES OFF)
endif()
endif()
if(WITH_X11_ALPHA)
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xrender_LIB)
@@ -1684,6 +1702,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_VORO)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
@@ -1696,6 +1715,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_INSTALL_PORTABLE)
info_cfg_option(WITH_X11_ALPHA)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XFIXES)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)

17
README.md Normal file
View File

@@ -0,0 +1,17 @@
# Blender Fracture Modifier
The Fracture Modifier is a system to interactively destroy and physically simulate the shards of objects in an easy, performant and
non-destructive way. This allows you to shatter and simulate the objects as you like while the original geometry of the object remains
untouched and intact.
## Support and builds
[BlenderArtists.org support forum thread](http://blenderartists.org/forum/showthread.php?343637)<br>
[BlenderPhysics Hosted Fracture Modifier Builds](http://blenderphysics.com/fracturemodifier/)<br>
[Kai Kostack Hosted Fracture Modifier Builds](http://kaikostack.com/fracture/)
## Main Documentation
[BlenderWiki page about Fracture Modifier](https://wiki.blender.org/index.php/User:Scorpion81/Fracture_Documentation)
## Useful Videos
[Development and experimental videos from the fracture modifier build & helpers addon by Dennis Fassbaender](https://www.youtube.com/playlist?list=PLyWdRVpqt5ZdQ6SdPuLQ76nShiuwXu_uC)<br>
[Simulation Videos made by Kai Kostack](https://www.youtube.com/playlist?list=PLGYnM-Mk7-OeqpCBmw6ZjFyiopkvkE6_S)

View File

@@ -0,0 +1,136 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################
#
# This is a build system used by platform maintainers to build library dependencies on
# Windows and macOS. There is some support for Linux as well, but not ready for releases.
#
# Windows and macOS users should download the precompiled libraries in lib/, Linux users
# should run install_deps.sh for building dependencies.
#
# WINDOWS USAGE:
# Don't call this cmake file your self, use build_deps.cmd
# build_deps 2013 x64 / build_deps 2013 x86
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake libtool yasm openssl xz
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler, cmake, autoconf, automake, libtool, yasm
# Run "make deps" from main Blender directory
#
####################################################################################################
project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/options.cmake)
include(cmake/versions.cmake)
#if(UNIX AND NOT APPLE)
# include(cmake/breakpad.cmake)
#endif()
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/ilmbase.cmake)
include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
include(cmake/glew.cmake)
include(cmake/alembic.cmake)
include(cmake/glfw.cmake)
include(cmake/clew.cmake)
include(cmake/cuew.cmake)
include(cmake/opensubdiv.cmake)
include(cmake/sdl.cmake)
include(cmake/opencollada.cmake)
include(cmake/opencolorio.cmake)
include(cmake/llvm.cmake)
include(cmake/clang.cmake)
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
include(cmake/flexbison.cmake)
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WIN32)
include(cmake/hidapi.cmake)
endif()
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/openjpeg.cmake)
if(BUILD_MODE STREQUAL Release)
if(WIN32)
include(cmake/zlib_mingw.cmake)
endif()
include(cmake/lame.cmake)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/vpx.cmake)
include(cmake/orc.cmake)
include(cmake/schroedinger.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
if(WIN32)
include(cmake/iconv.cmake)
include(cmake/lapack.cmake)
endif()
if(UNIX)
include(cmake/flac.cmake)
if(NOT APPLE)
include(cmake/spnav.cmake)
include(cmake/jemalloc.cmake)
include(cmake/xml2.cmake)
endif()
endif()
endif()
endif()
include(cmake/harvest.cmake)

View File

@@ -0,0 +1,80 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DALEMBIC_LIB_USES_BOOST=ON
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DILMBASE_ROOT=${LIBDIR}/ilmbase
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/ilmbase/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
-DUSE_MAYA=0
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
-DALEMBIC_ILMBASE_LINK_STATIC=On
-DALEMBIC_SHARED_LIBS=OFF
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ALEMBIC_MD5}
PREFIX ${BUILD_DIR}/alembic
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/alembic
)
add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
)

View File

@@ -0,0 +1,67 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb32
)
add_dependencies(
external_blendthumb_32
external_zlib_32
)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb64
)
add_dependencies(
external_blendthumb_64
external_zlib_64
)
endif()
endif()

View File

@@ -0,0 +1,49 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BLOSC_EXTRA_ARGS
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DBUILD_TESTS=OFF
-DBUILD_BENCHMARKS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DThreads_FOUND=1
-DPTHREAD_LIBS=${LIBDIR}/pthreads/lib/pthreadVC2.lib
-DPTHREAD_INCLUDE_DIR=${LIBDIR}/pthreads/inc
)
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BLOSC_HASH}
PREFIX ${BUILD_DIR}/blosc
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/blosc/src/external_blosc < ${PATCH_DIR}/blosc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blosc ${DEFAULT_CMAKE_FLAGS} ${BLOSC_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/blosc
)
add_dependencies(
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
endif()

View File

@@ -0,0 +1,114 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
endif()
if(MSVC12)
set(BOOST_TOOLSET toolset=msvc-12.0)
set(BOOST_COMPILER_STRING -vc120)
set(PYTHON_COMPILER_STRING v120)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
set(PYTHON_COMPILER_STRING v140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_BUILD_COMMAND bjam)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
endif()
set(BOOST_PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff)
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./bjam)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
set(BOOST_PATCH_COMMAND echo .)
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
${BOOST_TOOLSET}
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(BOOST_ADDRESS_MODEL 64)
else()
set(BOOST_ADDRESS_MODEL 32)
endif()
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BOOST_MD5}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
add_dependencies(
external_boost
Make_Python_Environment
)
endif()

View File

@@ -0,0 +1,49 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_breakpad
GIT_REPOSITORY ${BREAKPAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${BREAKPAD_MD5}
PREFIX ${BUILD_DIR}/breakpad
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/breakpad/src/external_breakpad < ${PATCH_DIR}/breakpad.diff
UPDATE_COMMAND git -c user.name=test -c user.email=test@test.test stash create
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${BREAKPAD_ENV} cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && aclocal && automake && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/breakpad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/breakpad/src/external_breakpad/ && make install
#INSTALL_DIR ${LIBDIR}/breakpad
)
#the new file is included in the breakpad.diff now
#set(LSS_URI https://chromium.googlesource.com/linux-syscall-support)
#set(LSS_HARVEST_COMMAND
# cd ${BUILD_DIR} &&
# git clone ${LSS_URI} &&
# mkdir ${BUILD_DIR}/breakpad/src/external_breakpad/src/third_party/lss &&
# cp ${BUILD_DIR}/linux-syscall-support/linux_syscall_support.h ${BUILD_DIR}/breakpad/src/external_breakpad/src/third_party/lss/linux_syscall_support.h)
#set(GIT_ENVIRONMENT COMMAND
# export GIT_COMMITTER_NAME="Test" &&
# export GIT_COMMITTER_EMAIL="test@test.test")
#ExternalProject_Add_Step(external_breakpad after_patch
# #COMMAND ${LSS_HARVEST_COMMAND}
# COMMAND ${GIT_ENVIRONMENT}
# DEPENDEES patch #mkdir update patch download configure build install
#)

View File

@@ -0,0 +1,54 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
)
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PATCH_COMMAND ${PATCH_CMD} -p 2 -N -R -d ${BUILD_DIR}/clang/src/external_clang < ${PATCH_DIR}/clang.diff
PREFIX ${BUILD_DIR}/clang
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clang ${DEFAULT_CMAKE_FLAGS} ${CLANG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clang
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(CLANG_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/ ${HARVEST_TARGET}/llvm/)
else()
set(CLANG_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(external_clang after_install
COMMAND ${CLANG_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()
add_dependencies(
external_clang
ll
)

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLEW_HASH}
PREFIX ${BUILD_DIR}/clew
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/clew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/clew
)

View File

@@ -0,0 +1,29 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CUEW_HASH}
PREFIX ${BUILD_DIR}/cuew
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/cuew/src/external_cuew < ${PATCH_DIR}/cuew.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/cuew -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${CUEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/cuew
)

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FAAD_EXTRA_ARGS)
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/faad/src/external_faad < ${PATCH_DIR}/libfaad.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,136 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/dirac/include/dirac -I${mingw_LIBDIR}/schroedinger/include/schroedinger-1.0 -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/dirac/lib -L${mingw_LIBDIR}/schroedinger/lib -L${mingw_LIBDIR}/orc/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/schroedinger/lib/pkgconfig:${mingw_LIBDIR}/orc/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--disable-static
--enable-shared
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
)
else()
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--enable-static
--disable-shared
# --enable-libopenjpeg
)
endif()
if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
endif()
ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
--disable-avfilter
--disable-vdpau
--disable-bzlib
--disable-libgsm
--disable-libspeex
--enable-libvpx
--prefix=${LIBDIR}/ffmpeg
--enable-libschroedinger
--enable-libtheora
--enable-libvorbis
--enable-zlib
--enable-stripping
--enable-runtime-cpudetect
--disable-vaapi
--disable-nonfree
--enable-gpl
--disable-postproc
--disable-x11grab
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--disable-libopencore-amrnb
--disable-libopencore-amrwb
--disable-libdc1394
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
--disable-indev=avfoundation
--disable-indev=qtkit
--disable-sdl
--disable-gnutls
--disable-vda
--disable-videotoolbox
--disable-libxcb
--disable-xlib
--disable-audiotoolbox
--disable-cuvid
--disable-nvenc
--disable-indev=jack
--disable-indev=alsa
--disable-outdev=alsa
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
if(MSVC)
set_target_properties(external_ffmpeg PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_schroedinger
external_vpx
external_theora
external_vorbis
external_ogg
external_lame
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib_mingw
)
endif()

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
endif()
ExternalProject_Add(external_fftw3
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_DIR ${LIBDIR}/fftw3
)
if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${FLAC_HASH}
PREFIX ${BUILD_DIR}/flac
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
INSTALL_DIR ${LIBDIR}/flac
)
if(MSVC)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,31 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FLEXBISON_HASH}
PREFIX ${BUILD_DIR}/flexbison
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flexbison ${DEFAULT_CMAKE_FLAGS} ${FLEXBISON_EXTRA_ARGS}
CONFIGURE_COMMAND echo .
BUILD_COMMAND echo .
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/flexbison/src/external_flexbison/ ${LIBDIR}/flexbison/
INSTALL_DIR ${LIBDIR}/flexbison
)

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(FREEGLUT_EXTRA_ARGS
-DFREEGLUT_BUILD_SHARED_LIBS=Off
-DFREEGLUT_BUILD_STATIC_LIBS=On
)
ExternalProject_Add(external_freeglut
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREEGLUT_HASH}
PREFIX ${BUILD_DIR}/freeglut
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freeglut ${DEFAULT_C_FLAGS} ${DEFAULT_CXX_FLAGS} ${FREEGLUT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freeglut
)
endif()
endif()

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(FREETYPE_EXTRA_ARGS -DCMAKE_RELEASE_POSTFIX:STRING=2ST -DCMAKE_DEBUG_POSTFIX:STRING=2ST_d -DWITH_BZip2=OFF -DWITH_HarfBuzz=OFF)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FREETYPE_HASH}
PREFIX ${BUILD_DIR}/freetype
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/freetype ${DEFAULT_CMAKE_FLAGS} ${FREETYPE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/freetype
)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLEW_EXTRA_ARGS
-DBUILD_UTILS=Off
-DBUILD_SHARED_LIBS=Off
)
ExternalProject_Add(external_glew
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLEW_HASH}
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt
PREFIX ${BUILD_DIR}/glew
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glew
)

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GLFW_HASH}
PREFIX ${BUILD_DIR}/glfw
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glfw -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${GLFW_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/glfw
)

View File

@@ -0,0 +1,280 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
########################################################################
# Copy all generated files to the proper strucure as blender prefers
########################################################################
if(NOT DEFINED HARVEST_TARGET)
set(HARVEST_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/Harvest)
endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
# Zlib Rename the lib file and copy the include/bin folders
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
# jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# FreeType, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype &&
# pthreads, rename include dir
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib &&
# ffmpeg copy include+bin
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/include ${HARVEST_TARGET}/ffmpeg/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ffmpeg/bin ${HARVEST_TARGET}/ffmpeg/lib &&
# sdl merge bin/lib folder, copy include
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/include/sdl2 ${HARVEST_TARGET}/sdl/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/lib ${HARVEST_TARGET}/sdl/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sdl/bin ${HARVEST_TARGET}/sdl/lib &&
# openal
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/lib/openal32.lib ${HARVEST_TARGET}/openal/lib/openal32.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openal/bin/openal32.dll ${HARVEST_TARGET}/openal/lib/openal32.dll &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openal/include/ ${HARVEST_TARGET}/openal/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# openEXR
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/ilmbase ${HARVEST_TARGET}/openexr &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
# fftw3
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h &&
# freeglut-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# iconv
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/lib/libiconv.a ${HARVEST_TARGET}/iconv/lib/iconv.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/iconv/include/iconv.h ${HARVEST_TARGET}/iconv/include/iconv.h &&
# opencolorIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenColorIO/ ${HARVEST_TARGET}/opencolorio &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenColorIO/lib/OpenColorIO.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO.dll &&
# Osl
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl &&
# OpenVDB
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/ &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ &&
# opencollada
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ &&
# opensubdiv
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/alembic ${HARVEST_TARGET}/alembic &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}.tar.gz &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}.tar.gz &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
DEPENDS
)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# ilmbase+openexr
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Half.lib ${HARVEST_TARGET}/openexr/lib/Half_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Iex-2_2.lib ${HARVEST_TARGET}/openexr/lib/Iex-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IexMath-2_2.lib ${HARVEST_TARGET}/openexr/lib/IexMath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmThread-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/ilmbase/lib/Imath-2_2.lib ${HARVEST_TARGET}/openexr/lib/Imath-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImf-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImf-2_2_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/lib/IlmImfUtil-2_2.lib ${HARVEST_TARGET}/openexr/lib/IlmImfUtil-2_2_d.lib &&
# opencollada
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/buffer.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/buffer_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/ftoa.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/ftoa_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/GeneratedSaxParser.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/GeneratedSaxParser_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/MathMLSolver.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/MathMLSolver_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADABaseUtils.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADABaseUtils_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAFramework.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAFramework_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADASaxFrameworkLoader_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/OpenCOLLADAStreamWriter_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/pcre.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/pcre_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/UTF.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/UTF_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
# blosc
${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
# osl
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib &&
# opensubdiv
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib &&
# tbb
${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib &&
# openvdb
${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# alembic
${CMAKE_COMMAND} -E copy ${LIBDIR}/alembic/lib/alembic.lib ${HARVEST_TARGET}/alembic/lib/alembic_d.lib &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif()
else(WIN32)
function(harvest from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
endforeach()
if(pattern STREQUAL "")
get_filename_component(dirpath ${to} DIRECTORY)
get_filename_component(filename ${to} NAME)
install(
FILES ${LIBDIR}/${from}
DESTINATION ${HARVEST_TARGET}/${dirpath}
RENAME ${filename})
else()
install(
DIRECTORY ${LIBDIR}/${from}/
DESTINATION ${HARVEST_TARGET}/${to}
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN ${pattern}
PATTERN "pkgconfig" EXCLUDE
PATTERN "cmake" EXCLUDE
PATTERN "clang" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "tests" EXCLUDE)
endif()
endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest(alembic/bin alembic/bin "*")
harvest(blosc/lib blosc/lib "*.a")
harvest(blosc/include blosc/include "*.h")
harvest(boost/include boost/include "*")
harvest(boost/lib boost/lib "*.a")
harvest(ffmpeg/include ffmpeg/include "*.h")
harvest(ffmpeg/lib ffmpeg/lib "*.a")
harvest(fftw3/include fftw3/include "*.h")
harvest(fftw3/lib fftw3/lib "*.a")
harvest(flac/lib sndfile/lib "libFLAC.a")
harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(ilmbase openexr "*")
harvest(ilmbase/include openexr/include "*.h")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
harvest(jpg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
#harvest(breakpad/lib breakpad/lib "*.a")
#harvest(breakpad/include/breakpad breakpad/include "*.h")
#harvest(breakpad/bin breakpad/bin "*")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
harvest(opencolorio/include opencolorio/include "*.h")
harvest(opencolorio/lib opencolorio/lib "*.a")
harvest(openexr/include openexr/include "*.h")
harvest(openexr/lib openexr/lib "*.a")
harvest(openimageio/bin openimageio/bin "idiff")
harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openjpeg/include/openjpeg-1.5 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(orc/lib/liborc-0.4.a ffmpeg/lib/liborc.a)
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(schroedinger/lib/libschroedinger-1.0.a ffmpeg/lib/libschroedinger.a)
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
endif()

View File

@@ -0,0 +1,42 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -0,0 +1,29 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

View File

@@ -0,0 +1,34 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ICONV_HASH}
PREFIX ${BUILD_DIR}/iconv
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/iconv
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/iconv/src/external_iconv/ && make install
INSTALL_DIR ${LIBDIR}/iconv
)
if(MSVC)
set_target_properties(external_iconv PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
endif()
set(ILMBASE_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${ILMBASE_CMAKE_CXX_STANDARD_LIBRARIES}
)
ExternalProject_Add(external_ilmbase
URL ${ILMBASE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ILMBASE_HASH}
PREFIX ${BUILD_DIR}/ilmbase
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ilmbase ${DEFAULT_CMAKE_FLAGS} ${ILMBASE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JEMALLOC_HASH}
PREFIX ${BUILD_DIR}/jemalloc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jemalloc --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/jemalloc/src/external_jemalloc/ && make install
INSTALL_DIR ${LIBDIR}/jemalloc
)

View File

@@ -0,0 +1,65 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_jpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpegd${LIBEXT} ${LIBDIR}/jpg/lib/jpeg${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Release)
set(JPEG_LIBRARY jpeg-static${LIBEXT})
else()
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif(WIN32)

View File

@@ -0,0 +1,47 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAME_EXTRA_ARGS)
if(MSVC)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAME_HASH}
PREFIX ${BUILD_DIR}/lame
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
--enable-export=full
--with-fileio=sndfile
--without-vorbis
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--enable-export=full
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,43 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LAPACK_EXTRA_ARGS)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw64/bin/gfortran.exe)
else()
set(LAPACK_EXTRA_ARGS -G "MSYS Makefiles" -DCMAKE_Fortran_COMPILER=${DOWNLOAD_DIR}/mingw/mingw32/bin/gfortran.exe)
endif()
endif()
ExternalProject_Add(external_lapack
URL ${LAPACK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LAPACK_HASH}
PREFIX ${BUILD_DIR}/lapack
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && ${CMAKE_COMMAND} ${LAPACK_EXTRA_ARGS} -DBUILD_TESTING=Off -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lapack .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lapack/src/external_lapack/ && make install
INSTALL_DIR ${LIBDIR}/lapack
)
if(MSVC)
set_target_properties(external_lapack PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
)
if(WIN32)
set(LLVM_GENERATOR "NMake Makefiles")
else()
set(LLVM_GENERATOR "Unix Makefiles")
endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm-alloca-fix.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
else()
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include/ ${HARVEST_TARGET}/llvm/debug/include/
)
endif()
ExternalProject_Add_Step(ll after_install
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
endif()

View File

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
set(NUMPY_BUILD_OPTION --debug)
else()
set(NUMPY_DIR_POSTFIX)
set(NUMPY_ARCHIVE_POSTFIX)
set(NUMPY_BUILD_OPTION)
endif()
endif()
set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
set(NUMPY_PATCH ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff )
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install
INSTALL_COMMAND ${NUMPY_INSTALL}
)
add_dependencies(
external_numpy
Make_Python_Environment
)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
INSTALL_DIR ${LIBDIR}/ogg
)
if(MSVC)
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OPENAL_EXTRA_ARGS
-DALSOFT_UTILS=Off
-DALSOFT_NO_CONFIG_UTIL=On
-DALSOFT_EXAMPLES=Off
-DALSOFT_TESTS=Off
-DALSOFT_CONFIG=Off
-DALSOFT_HRTF_DEFS=Off
-DALSOFT_INSTALL=On
-DALSOFT_BACKEND_SNDIO=Off
)
if(UNIX)
set(OPENAL_EXTRA_ARGS ${OPENAL_EXTRA_ARGS} -DLIBTYPE=STATIC)
endif()
ExternalProject_Add(external_openal
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENAL_HASH}
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
endif()

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX AND NOT APPLE)
set(OPENCOLLADA_EXTRA_ARGS
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
endif()
ExternalProject_Add(external_opencollada
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLLADA_HASH}
PREFIX ${BUILD_DIR}/opencollada
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencollada
)
if(UNIX AND NOT APPLE)
add_dependencies(
external_opencollada
external_xml2
)
endif()

View File

@@ -0,0 +1,73 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENCOLORIO_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_60/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_DEBUG=ON
-DBoost_MAJOR_VERSION=1
-DBoost_MINOR_VERSION=60
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
)
if(WIN32)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=ON
-DOCIO_BUILD_STATIC=OFF
-DOCIO_BUILD_SHARED=ON
)
else()
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
)
endif()
ExternalProject_Add(external_opencolorio
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opencolorio
)
if(NOT WIN32)
add_custom_command(
OUTPUT ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libtinyxml.a ${LIBDIR}/opencolorio/lib/libtinyxml.a
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/libyaml-cpp.a
)
add_custom_target(external_opencolorio_extra ALL DEPENDS external_opencolorio ${LIBDIR}/opencolorio/lib/libtinyxml.a)
endif()
add_dependencies(
external_opencolorio
external_boost
)

View File

@@ -0,0 +1,45 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
endif()
set(OPENEXR_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_CXX_STANDARD_LIBRARIES=${OPENEXR_CMAKE_CXX_STANDARD_LIBRARIES}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase
)
ExternalProject_Add(external_openexr
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/openexr/src/external_openexr < ${PATCH_DIR}/openexr.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr
)
add_dependencies(
external_openexr
external_zlib
external_ilmbase
)

View File

@@ -0,0 +1,152 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
set(OIIO_TOOLS ON)
else()
set(OIIO_TOOLS OFF)
endif()
if(UNIX AND NOT APPLE)
# This causes linking to static pthread libraries which gives link errors.
# Since we manually specify library paths it should static link other libs.
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=OFF)
else()
set(OPENIMAGEIO_LINKSTATIC -DLINKSTATIC=ON)
endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
set(OIIO_SIMD_FLAGS)
endif()
if(WITH_WEBP)
set(WEBP_ARGS
-DWEBP_INCLUDE_DIR=${LIBDIR}/webp/include
-DWEBP_LIBRARY=${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT}
)
set(WEBP_DEP external_webp)
endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjpeg${LIBEXT}
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf-2_2${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-OIIO_BUILD_CPP11=ON
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
-DUSE_QT=OFF
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
-DBUILD_TESTING=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_LIBRARY=${LIBDIR}/png/lib/${PNG_LIBNAME}
-DPNG_PNG_INCLUDE_DIR=${LIBDIR}/png/include
-DTIFF_LIBRARY=${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT}
-DTIFF_INCLUDE_DIR=${LIBDIR}/tiff/include
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_staticexr.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png external_zlib
external_ilmbase
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
endif()

View File

@@ -0,0 +1,64 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
# library itself does not depend on them, so should give no problems.
set(OPENJPEG_EXTRA_ARGS -DBUILD_SHARED_LIBS=OFF)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles")
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
ExternalProject_Add(external_openjpeg
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF ${BUILD_DIR}/openjpeg/src/external_openjpeg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPENJPEG_HASH}
PREFIX ${BUILD_DIR}/openjpeg_msvc
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openjpeg_msvc after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
DEPENDEES install
)
endif()
endif()
set(OPENJPEG_LIBRARY libopenjpeg${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,78 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OPENSUBDIV_EXTRA_ARGS
-DNO_EXAMPLES=ON
-DNO_REGRESSION=ON
-DNO_PYTHON=ON
-DNO_MAYA=ON
-DNO_PTEX=ON
-DNO_DOC=ON
-DNO_CLEW=OFF
-DNO_OPENCL=OFF
-DNO_TUTORIALS=ON
-DGLEW_INCLUDE_DIR=${LIBDIR}/glew/include
-DGLEW_LIBRARY=${LIBDIR}/glew/lib/libGLEW${LIBEXT}
-DGLFW_INCLUDE_DIR=${LIBDIR}/glfw/include
-DGLFW_LIBRARIES=${LIBDIR}/glfw/lib/glfw3${LIBEXT}
)
if(WIN32)
#no cuda support for vc15 yet
if(msvc15)
set(OPENSUBDIV_CUDA ON)
else()
set(OPENSUBDIV_CUDA ON)
endif()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=${OPENSUBDIV_CUDA}
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
else()
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DNO_CUDA=ON
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/static/${LIBPREFIX}clew${LIBEXT}
)
endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
PREFIX ${BUILD_DIR}/opensubdiv
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv
)
add_dependencies(
external_opensubdiv
external_glew
external_glfw
external_clew
external_cuew
)

View File

@@ -0,0 +1,80 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
set(OPENVDB_EXTRA_ARGS
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_CUSTOM=ON
-DILMBASE_CUSTOM_LIBRARIES=Half;Imath-2_2;IlmThread-2_2;Iex-2_2
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DILMBASE_HALF_LIBRARIES=${LIBDIR}/ilmbase/lib/Half${LIBEXT}
-DILMBASE_IMATH_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DILMBASE_ILMTHREAD_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DILMBASE_IEX_LIBRARIES=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DOPENEXR_USE_STATIC_LIBS=ON
-DOPENEXR_CUSTOM=ON
-DOPENEXR_CUSTOM_LIBRARY=IlmImf-2_2
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DTBB_ROOT_DIR=${LIBDIR}/tbb/
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARY=${LIBDIR}/tbb/lib/tbb_static${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DWITH_BLOSC=ON
-DBLOSC_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBLOSC_LIBRARY=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
)
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS})
# CMake script for OpenVDB based on https://raw.githubusercontent.com/diekev/openvdb-cmake/master/CMakeLists.txt
# can't be in external_openvdb because of how the includes are setup.
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_openvdb.txt ${BUILD_DIR}/openvdb/src/openvdb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy_directory ${PATCH_DIR}/cmake/ ${BUILD_DIR}/openvdb/src/openvdb/cmake/ &&
${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb_vc2013.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openvdb
)
add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
)

View File

@@ -0,0 +1,214 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
message(STATUS "Build type not specified: defaulting to a release build.")
endif()
message("BuildMode = ${BUILD_MODE}")
if(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Debug)
else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
set(PATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/build)
message("LIBDIR = ${LIBDIR}")
message("DOWNLOAD_DIR = ${DOWNLOAD_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(LIBEXT ".lib")
set(LIBPREFIX "")
# For OIIO and OSL
set(COMMON_DEFINES /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
if(MSVC_VERSION GREATER 1909)
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)
set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
else()
set(PATCH_CMD patch)
set(LIBEXT ".a")
set(LIBPREFIX "lib")
if(APPLE)
# Let's get the current Xcode dir, to support xcode-select
execute_process(
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.9)
set(OSX_SDK_VERSION 10.12)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SDK_VERSION}.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
set(PLATFORM_BUILD_TARGET)
set(PLATFORM_CMAKE_FLAGS)
endif()
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-O2 -DNDEBUG")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "-g")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "-g ${PLATFORM_CXXFLAGS}")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG ${PLATFORM_CXXFLAGS}")
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
)
set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
set(CONFIGURE_COMMAND_NO_TARGET ./configure)
endif()
set(DEFAULT_CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
-DCMAKE_C_FLAGS_DEBUG=${BLENDER_CMAKE_C_FLAGS_DEBUG}
-DCMAKE_C_FLAGS_MINSIZEREL=${BLENDER_CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELEASE=${BLENDER_CMAKE_C_FLAGS_RELEASE}
-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_CXX_FLAGS_DEBUG=${BLENDER_CMAKE_CXX_FLAGS_DEBUG}
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
set(ZLIB_LIBRARY zlibstatic${LIBEXT})
else()
set(ZLIB_LIBRARY libz${LIBEXT})
endif()
if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
set(CMAKE_INSTALL_MESSAGE LAZY)

View File

@@ -0,0 +1,32 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_orc
URL ${ORC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${ORC_HASH}
PREFIX ${BUILD_DIR}/orc
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/orc --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/orc/src/external_orc/ && make install
INSTALL_DIR ${LIBDIR}/orc
)
if(MSVC)
set_target_properties(external_orc PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,98 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES "kernel32${LIBEXT} user32${LIBEXT} gdi32${LIBEXT} winspool${LIBEXT} shell32${LIBEXT} ole32${LIBEXT} oleaut32${LIBEXT} uuid${LIBEXT} comdlg32${LIBEXT} advapi32${LIBEXT} psapi${LIBEXT}")
set(OSL_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -DFLEX_EXTRA_OPTIONS="--wincompat" -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/libpng16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=0)
else()
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
endif()
else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON)
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}")
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath-2_2.lib^^${LIBDIR}/ilmbase/lib/Half.lib^^${LIBDIR}/ilmbase/lib/IlmThread-2_2.lib^^${LIBDIR}/ilmbase/lib/Iex-2_2.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath-2_2${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread-2_2${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex-2_2${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf-2_2${LIBEXT}
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DOSL_BUILD_CPP11=ON
-DUSE_LLVM_BITCODE=OFF
${OSL_SIMD_FLAGS}
)
ExternalProject_Add(external_osl
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND
${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/osl
)
add_dependencies(
external_osl
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PNG_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DPNG_STATIC=ON
)
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png
)
add_dependencies(
external_png
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,46 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(PTHREAD_XCFLAGS /MD)
if(MSVC14) # vs2015 has timespec
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H /D_TIMESPEC_DEFINED ")
else() # everything before doesn't
set(PTHREAD_CPPFLAGS "/I. /DHAVE_PTW32_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XCFLAGS=${PTHREAD_XCFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA512=${PTHREADS_SHA512}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2.dll ${LIBDIR}/pthreads/lib/pthreadVC2.dll &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthreadVC2${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC2${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h
INSTALL_DIR ${LIBDIR}/pthreads
)
endif()

View File

@@ -0,0 +1,140 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
endif()
if(WIN32)
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python.diff &&
${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/pc < ${PATCH_DIR}/pyshell.diff
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE} -k ${PYTHON_COMPILER_STRING}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
)
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# we need to manually add homebrew headers to get ssl module building
set(PYTHON_CFLAGS "-I/usr/local/opt/openssl/include -I${OSX_SYSROOT}/usr/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L/usr/local/opt/openssl/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && export CFLAGS=${PYTHON_CFLAGS} && export LDFLAGS=${PYTHON_LDFLAGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_apple.diff)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
if(MSVC12)
set(PYTHON_DISTUTIL_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/python/src/external_python/run/lib/distutils < ${PATCH_DIR}/python_runtime_vc2013.diff)
else()
set(PYTHON_DISTUTIL_PATCH echo "No patch needed")
endif()
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
COMMAND ${PYTHON_DISTUTIL_PATCH}
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
endif()

View File

@@ -0,0 +1,41 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
)
add_dependencies(
external_python_site_packages
Make_Python_Environment
)

View File

@@ -0,0 +1,48 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SCHROEDINGER_EXTRA_FLAGS "CFLAGS=-g -I./ -I${LIBDIR}/orc/include/orc-0.4" "LDFLAGS=-Wl,--as-needed -static-libgcc -L${LIBDIR}/orc/lib" ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a ORCC=${LIBDIR}/orc/bin/orcc.exe)
else()
set(SCHROEDINGER_CFLAGS "${PLATFORM_CFLAGS} -I./ -I${LIBDIR}/orc/include/orc-0.4")
set(SCHROEDINGER_LDFLAGS "${PLATFORM_LDFLAGS} -L${LIBDIR}/orc/lib")
set(SCHROEDINGER_EXTRA_FLAGS CFLAGS=${SCHROEDINGER_CFLAGS} LDFLAGS=${SCHROEDINGER_LDFLAGS} ORC_CFLAGS=-I${LIBDIR}/orc/include/orc-0.4 ORC_LDFLAGS=-L${LIBDIR}/orc/lib ORCC=${LIBDIR}/orc/bin/orcc) # ORC_LIBS=${LIBDIR}/orc/lib/liborc-0.4.a
endif()
ExternalProject_Add(external_schroedinger
URL ${SCHROEDINGER_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${SCHROEDINGER_HASH}
PREFIX ${BUILD_DIR}/schroedinger
PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/schroedinger/src/external_schroedinger < ${PATCH_DIR}/schroedinger.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/schroedinger --disable-shared --enable-static ${SCHROEDINGER_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/schroedinger/src/external_schroedinger/ && make install
INSTALL_DIR ${LIBDIR}/schroedinger
)
add_dependencies(
external_schroedinger
external_orc
)
if(MSVC)
set_target_properties(external_schroedinger PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,39 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(SDL_EXTRA_ARGS
-DSDL_STATIC=Off
)
else()
set(SDL_EXTRA_ARGS
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
-DSDL_VIDEO=OFF
)
endif()
ExternalProject_Add(external_sdl
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SDL_HASH}
PREFIX ${BUILD_DIR}/sdl
PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/sdl/src/external_sdl < ${PATCH_DIR}/sdl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sdl ${DEFAULT_CMAKE_FLAGS} ${SDL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/sdl
)

View File

@@ -0,0 +1,218 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw32 Builds
####################################################################################################################
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z" "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/mingw32env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-w64-mingw32-gcc-4.8.0-win32_rubenvb.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win32/nasm-2.12.01-win32.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -0,0 +1,218 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw64")
# download ming64
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
message("Downloading mingw64")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z" "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw64
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/mingw64env.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z"))
message("Extracting mingw64")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-w64-mingw32-gcc-4.8.0-win64_rubenvb.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip" "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.12.01-win64.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.12.01/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
)
endif()
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
message("Installing ming64sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
endif()
message("checking x86_64-w64-mingw32-strings.exe")
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
message("fixing x86_64-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
)
endif()
message("checking x86_64-w64-mingw32-ar.exe")
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
message("fixing x86_64-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
)
endif()
message("checking x86_64-w64-mingw32-strip.exe")
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
message("fixing x86_64-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
)
endif()
message("checking x86_64-w64-mingw32-ranlib.exe")
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
message("fixing x86_64-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -0,0 +1,62 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
if(UNIX)
set(SNDFILE_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/sndfile/src/external_sndfile < ${PATCH_DIR}/sndfile.diff)
else()
set(SNDFILE_PATCH_CMD)
endif()
ExternalProject_Add(external_sndfile
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
PATCH_COMMAND ${SNDFILE_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
INSTALL_DIR ${LIBDIR}/sndfile
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
external_sndfile
external_ogg
external_vorbis
)
if(UNIX)
add_dependencies(
external_sndfile
external_flac
)
endif()

View File

@@ -0,0 +1,28 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${SPNAV_HASH}
PREFIX ${BUILD_DIR}/spnav
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
INSTALL_DIR ${LIBDIR}/spnav
)

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
if(TBB_VERSION MATCHES 2018)
set(TBB_VS_VERSION vs2013)
elseif(TBB_VERSION MATCHES 2017)
set(TBB_VS_VERSION vs2012)
else()
set(TBB_VS_VERSION vs2010)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_theora
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
--with-vorbis=${LIBDIR}/vorbis
--disable-examples
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
INSTALL_DIR ${LIBDIR}/theora
)
add_dependencies(
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,47 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
-DPNG_STATIC=ON
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
)
ExternalProject_Add(external_tiff
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff ${DEFAULT_CMAKE_FLAGS} ${TIFF_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tiff
)
add_dependencies(
external_tiff
external_zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tiff after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,270 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(BREAKPAD_URI https://chromium.googlesource.com/breakpad/breakpad)
set(ZLIB_VERSION 1.2.8)
set(ZLIB_URI https://netcologne.dl.sourceforge.net/project/libpng/zlib/${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 44d667c142d7cda120332623eab69f40)
set(OPENAL_VERSION 1.17.2)
#set(OPENAL_URI http://kcat.strangesoft.net/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_URI https://www.openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 1764e0d8fec499589b47ebc724e0913d)
set(PNG_VERSION 1.6.21)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.gz)
set(PNG_HASH aca36ec8e0a3b406a5912243bc243717)
set(JPEG_VERSION 1.4.2)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH f9804884c1c41eb7f4febb9353a2cb27)
set(BOOST_VERSION 1.60.0)
set(BOOST_VERSION_NODOTS 1_60_0)
#set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
#set(BOOST_MD5 5d8b4503582fffa9eefdb9045359c239)
set(BOOST_URI http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_NODOTS}.tar.bz2/download)
set(BOOST_MD5 65a840e1a0b13a558ff19eeb2c4f0cbe)
set(BLOSC_VERSION 1.7.0)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.zip)
set(BLOSC_HASH 397f724c2834cee86b09ac0848e8e787)
set(PTHREADS_VERSION 2-9-1)
set(PTHREADS_URI ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PTHREADS_VERSION}-release.tar.gz)
set(PTHREADS_SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551)
set(ILMBASE_VERSION 2.2.0)
set(ILMBASE_URI http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILMBASE_VERSION}.tar.gz)
set(ILMBASE_HASH b540db502c5fa42078249f43d18a4652)
set(OPENEXR_VERSION 2.2.0)
set(OPENEXR_URI http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz)
set(OPENEXR_HASH b64e931c82aa3790329c21418373db4e)
set(FREETYPE_VERSION 263)
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/ft${FREETYPE_VERSION}.zip)
set(FREETYPE_HASH 0db2a43301572e5c2b4a0864f237aeeb)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.1)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.zip)
set(ALEMBIC_MD5 cf7705055501d5ea0cb8256866496f79)
## hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
#latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
#latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_1_1)
set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip)
set(SDL_VERSION 2.0.4)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 44fc4a023349933e7f5d7a582f7b886e)
set(OPENCOLLADA_VERSION v1.6.51)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH 23db5087faed4bc4cc1dfe456c0d4701)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c7f552300f669ed69ca0b6cf5a70843.zip)
set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
set(LLVM_VERSION 3.4.2)
#set(LLVM_VERSION 6.0.1)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.gz) #3.4.2 uses tar.gz, same with clang
set(LLVM_HASH a20669f75967440de949ac3b1bad439c)
#set(LLVM_HASH c88c98709300ce2c285391f387fecce0)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.gz)
set(CLANG_HASH 87945973b7c73038871c5f849a818588)
#set(CLANG_HASH 4e419bd4e3b55aa06d872320f754bd85)
set(OPENIMAGEIO_VERSION 1.7.15)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.zip)
set(OPENIMAGEIO_HASH_178 e156e3669af0e1373142ab5e8f13de66)
set(OPENIMAGEIO_HASH_179 4121cb0e0433bda6a7ef32c8628a149f)
set(OPENIMAGEIO_HASH_1713 42a662775b834161ba88c6abdb299360)
set(OPENIMAGEIO_HASH_1715 e2ece0f62c013d64c478f82265988b0b)
set(OPENIMAGEIO_HASH ${OPENIMAGEIO_HASH_1715})
set(TIFF_VERSION 4.0.6)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH d1d2e940dea0b5ad435f21f03d96dd72)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(OSL_VERSION 1.7.5)
#set(OSL_VERSION 1.9.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
#set(OSL_HASH 1c34112d8f3cf81f2fc415424bd38ae8)
set(PYTHON_VERSION 3.5.3)
set(PYTHON_SHORT_VERSION 3.5)
set(PYTHON_SHORT_VERSION_NO_DOTS 35)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 57d1f8bfbabf4f2500273fb0706e6f21)
if(UNIX AND NOT APPLE)
# Needed to be compatible with GCC 7, other platforms can upgrade later
set(TBB_VERSION 2017_U7)
#set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
#set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH af1c799fe754924de7d5b00a6fb5f514)
else()
set(TBB_VERSION 44_20160128)
set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz)
set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc)
endif()
set(OPENVDB_VERSION 3.1.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 30a7e9571a03ab7bcf1a39fb62aa436f)
set(IDNA_VERSION 2.6)
set(CHARDET_VERSION 3.0.2)
set(URLLIB3_VERSION 1.22)
set(CERTIFI_VERSION 2017.7.27.1)
set(REQUESTS_VERSION 2.18.4)
set(NUMPY_VERSION v1.10.1)
set(NUMPY_SHORT_VERSION 1.10)
set(NUMPY_URI https://files.pythonhosted.org/packages/a5/2e/5412784108f5dc0f827fb460ccdeaa9d76286979fe5ddd070d526d168a59/numpy-1.10.1.zip)
set(NUMPY_HASH 6f57c58bc5b28440fbeccd505da63d58)
set(LAME_VERSION 3.99.5)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.99/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 84835b313d4a8b68f5349816d33e07ce)
set(OGG_VERSION 1.3.2)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692)
set(VORBIS_VERSION 1.3.5)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce)
set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.1)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c)
set(VPX_VERSION 1.5.0)
set(VPX_URI http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-${VPX_VERSION}.tar.bz2)
set(VPX_HASH 306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797)
set(ORC_VERSION 0.4.25)
set(ORC_URI https://gstreamer.freedesktop.org/src/orc/orc-${ORC_VERSION}.tar.xz)
set(ORC_HASH c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1)
set(SCHROEDINGER_VERSION 1.0.11)
set(SCHROEDINGER_URI https://download.videolan.org/contrib/schroedinger/schroedinger-${SCHROEDINGER_VERSION}.tar.gz)
set(SCHROEDINGER_HASH 1e572a0735b92aca5746c4528f9bebd35aa0ccf8619b22fa2756137a8cc9f912)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20160401-2245-stable.tar.bz2)
set(X264_HASH 1e9a7b835e80313aade53a9b6ff353e099de3856bf5f30a4d8dfc91281f786f5)
set(XVIDCORE_VERSION 1.3.4)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 1.5.2)
set(OPENJPEG_SHORT_VERSION 1.5)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/version.${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 3734e95edd0bef6e056815591755efd822228dc3cd866894e00a2c929026b16d)
set(FAAD_VERSION 2-2.7)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.bz2)
set(FAAD_HASH 4c332fa23febc0e4648064685a3d4332)
set(FFMPEG_VERSION 3.2.1)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH cede174178e61f882844f5870c35ce72)
set(FFTW_VERSION 3.3.4)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 2edab8c06b24feeb3b82bbb3ebf3e7b3)
set(ICONV_VERSION 1.14)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH e34509b1623cec449dfeb73d7ce9c6c6)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
set(HIDAPI_HASH b6e22f6b514f8bcf594989f20ffc46fb)
set(WEBP_VERSION 0.5.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH 3d7db92ebba5b4f679413d25c6040881)
set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(JEMALLOC_VERSION 5.0.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(XML2_VERSION 2.9.4)
set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)

View File

@@ -0,0 +1,41 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VORBIS_HASH}
PREFIX ${BUILD_DIR}/vorbis
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
--disable-shared
--enable-static
--with-pic
--with-ogg=${LIBDIR}/ogg
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
INSTALL_DIR ${LIBDIR}/vorbis
)
add_dependencies(
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc)
else()
set(VPX_EXTRA_FLAGS --target=x86-win32-gcc)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
--enable-static
--disable-install-bins
--disable-install-srcs
--disable-sse4_1
--disable-sse3
--disable-ssse3
--disable-avx
--disable-avx2
--disable-unit-tests
--disable-examples
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,50 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
# Note the utility apps may use png/tiff/gif system libraries, but the
# library itself does not depend on them, so should give no problems.
set(WEBP_EXTRA_ARGS
-DWEBP_HAVE_SSE2=ON
-DWEBP_HAVE_SSE41=OFF
-DWEBP_HAVE_AVX2=OFF
)
if(WIN32)
set(WEBP_BUILD_DIR ${BUILD_MODE}/)
else()
set(WEBP_BUILD_DIR)
endif()
ExternalProject_Add(external_webp
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${WEBP_HASH}
PREFIX ${BUILD_DIR}/webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp-build/${WEBP_BUILD_DIR}${LIBPREFIX}webp${LIBEXT} ${LIBDIR}/webp/lib/${LIBPREFIX}webp${LIBEXT} &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/decode.h ${LIBDIR}/webp/include/webp/decode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/encode.h ${LIBDIR}/webp/include/webp/encode.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/demux.h ${LIBDIR}/webp/include/webp/demux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/extras.h ${LIBDIR}/webp/include/webp/extras.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/format_constants.h ${LIBDIR}/webp/include/webp/format_constants.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux.h ${LIBDIR}/webp/include/webp/mux.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/mux_types.h ${LIBDIR}/webp/include/webp/mux_types.h &&
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/webp/src/external_webp/src/webp/types.h ${LIBDIR}/webp/include/webp/types.h
INSTALL_DIR ${LIBDIR}/webp
)

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
${X264_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,36 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XML2_HASH}
PREFIX ${BUILD_DIR}/xml2
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && ${CONFIGURE_COMMAND}
--prefix=${LIBDIR}/xml2
--disable-shared
--enable-static
--with-pic
--with-python=no
--with-lzma=no
--with-zlib=no
--with-iconv=no
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xml2/src/external_xml2/ && make install
INSTALL_DIR ${LIBDIR}/xml2
)

View File

@@ -0,0 +1,44 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,33 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
DEPENDEES install
)
endif()

View File

@@ -0,0 +1,39 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/ && make -f win32/makefile.gcc -j${MAKE_THREADS}
INSTALL_COMMAND echo .
INSTALL_DIR ${LIBDIR}/zlib_mingw
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zlib_mingw after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/zlib_mingw/src/external_zlib_mingw/libz.a ${LIBDIR}/zlib/lib/z.lib
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
endif()

View File

@@ -761,8 +761,8 @@ OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION
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" )
LLVM_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
LLVM_CLANG_SOURCE=( "http://releases.llvm.org/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
OSL_USE_REPO=false
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
@@ -1262,7 +1262,11 @@ compile_Boost() {
#### Build OCIO ####
_init_ocio() {
_src=$SRC/OpenColorIO-$OCIO_VERSION
_git=false
if [ "$OCIO_USE_REPO" = true ]; then
_git=true
else
_git=false
fi
_inst=$INST/ocio-$OCIO_VERSION
_inst_shortcut=$INST/ocio
}
@@ -1599,7 +1603,7 @@ compile_OIIO() {
fi
# To be changed each time we make edits that would modify the compiled result!
oiio_magic=16
oiio_magic=17
_init_oiio
# Clean install if needed!
@@ -1663,6 +1667,9 @@ compile_OIIO() {
INFO "ILMBASE_HOME=$INST/openexr"
fi
# ptex is only needed when nicholas bishop is ready
cmake_d="$cmake_d -D USE_PTEX=OFF"
# Optional tests and cmd tools
cmake_d="$cmake_d -D USE_QT=OFF"
cmake_d="$cmake_d -D USE_PYTHON=OFF"

View File

@@ -0,0 +1,35 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e09c57..26565ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,7 +116,7 @@ IF (NOT ${ALEMBIC_LIB_USES_TR1} AND NOT ${ALEMBIC_LIB_USES_BOOST})
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF (COMPILER_SUPPORTS_CXX1X)
+ IF (COMPILER_SUPPORTS_CXX11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSEIF (COMPILER_SUPPORTS_CXX0X)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
--- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
+++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
@@ -47,7 +47,18 @@
#define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst )
// Windows
#elif defined( _MSC_VER )
-#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExhange64( &V, EXCH, COMP ) == COMP
+#define COMPARE_EXCHANGE( V, COMP, EXCH ) InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP
+int ffsll(long long value)
+{
+ if (!value)
+ return 0;
+
+ for (int bit = 0; bit < 63; bit++)
+ {
+ if (value & (1 << bit))
+ return bit + 1;
+ }
+}
// gcc 4.8 and above not using C++11
#elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8
#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST )

View File

@@ -0,0 +1,33 @@
diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
--- src/blosc/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -61,6 +61,8 @@
set(SOURCES ${SOURCES} win32/pthread.c)
else(NOT Threads_FOUND)
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
+ set(LIBS ${LIBS} ${PTHREAD_LIBS})
+ include_directories( ${PTHREAD_INCLUDE_DIR} )
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur src/blosc/blosc.c external_blosc/blosc/blosc.c
--- src/blosc/blosc.c 2016-02-03 10:26:28 -0700
+++ external_blosc/blosc/blosc.c 2017-03-03 09:01:50 -0700
@@ -49,12 +49,12 @@
#include <inttypes.h>
#endif /* _WIN32 */
-#if defined(_WIN32) && !defined(__GNUC__)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
+//#if defined(_WIN32) && !defined(__GNUC__)
+// #include "win32/pthread.h"
+ //#include "win32/pthread.c"
+//#else
#include <pthread.h>
-#endif
+//#endif
/* If C11 is supported, use it's built-in aligned allocation. */
#if __STDC_VERSION__ >= 201112L

View File

@@ -0,0 +1,37 @@
--- a/boost/config/compiler/visualc.hpp 2015-12-08 11:55:19 -0700
+++ b/boost/config/compiler/visualc.hpp 2018-03-17 10:29:52 -0600
@@ -287,12 +287,3 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
-//
-// last known and checked version is 19.00.23026 (VC++ 2015 RTM):
-#if (_MSC_VER > 1900)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# else
-# pragma message("Unknown compiler version - please run the configure tests and report the results")
-# endif
-#endif
--- a/boost/type_traits/has_nothrow_assign.hpp 2015-12-13 05:49:42 -0700
+++ b/boost/type_traits/has_nothrow_assign.hpp 2018-05-27 11:11:02 -0600
@@ -24,7 +24,7 @@
#include <boost/type_traits/remove_reference.hpp>
#endif
#endif
-#if defined(__GNUC__) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(__clang__)
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/is_assignable.hpp>
--- a/boost/type_traits/has_nothrow_constructor.hpp 2015-12-13 05:49:42 -0700
+++ b/boost/type_traits/has_nothrow_constructor.hpp 2018-05-27 11:11:02 -0600
@@ -17,7 +17,7 @@
#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
#include <boost/type_traits/has_trivial_constructor.hpp>
#endif
-#if defined(__GNUC__ ) || defined(__SUNPRO_CC)
+#if defined(__GNUC__ ) || defined(__SUNPRO_CC) || defined(__clang__)
#include <boost/type_traits/is_default_constructible.hpp>
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,127 @@
--- cfe/trunk/lib/Serialization/ASTWriter.cpp
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp
@@ -56,14 +56,14 @@
using namespace clang::serialization;
template <typename T, typename Allocator>
-static StringRef bytes(const std::vector<T, Allocator> &v) {
+static StringRef data(const std::vector<T, Allocator> &v) {
if (v.empty()) return StringRef();
return StringRef(reinterpret_cast<const char*>(&v[0]),
sizeof(T) * v.size());
}
template <typename T>
-static StringRef bytes(const SmallVectorImpl<T> &v) {
+static StringRef data(const SmallVectorImpl<T> &v) {
return StringRef(reinterpret_cast<const char*>(v.data()),
sizeof(T) * v.size());
}
@@ -1385,7 +1385,7 @@
Record.push_back(INPUT_FILE_OFFSETS);
Record.push_back(InputFileOffsets.size());
Record.push_back(UserFilesNum);
- Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, bytes(InputFileOffsets));
+ Stream.EmitRecordWithBlob(OffsetsAbbrevCode, Record, data(InputFileOffsets));
}
//===----------------------------------------------------------------------===//
@@ -1771,7 +1771,7 @@
Record.push_back(SOURCE_LOCATION_OFFSETS);
Record.push_back(SLocEntryOffsets.size());
Record.push_back(SourceMgr.getNextLocalOffset() - 1); // skip dummy
- Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, bytes(SLocEntryOffsets));
+ Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record, data(SLocEntryOffsets));
// Write the source location entry preloads array, telling the AST
// reader which source locations entries it should load eagerly.
@@ -2087,7 +2087,7 @@
Record.push_back(MacroOffsets.size());
Record.push_back(FirstMacroID - NUM_PREDEF_MACRO_IDS);
Stream.EmitRecordWithBlob(MacroOffsetAbbrev, Record,
- bytes(MacroOffsets));
+ data(MacroOffsets));
}
void ASTWriter::WritePreprocessorDetail(PreprocessingRecord &PPRec) {
@@ -2185,7 +2185,7 @@
Record.push_back(PPD_ENTITIES_OFFSETS);
Record.push_back(FirstPreprocessorEntityID - NUM_PREDEF_PP_ENTITY_IDS);
Stream.EmitRecordWithBlob(PPEOffsetAbbrev, Record,
- bytes(PreprocessedEntityOffsets));
+ data(PreprocessedEntityOffsets));
}
}
@@ -2548,7 +2548,7 @@
Record.push_back(CXX_BASE_SPECIFIER_OFFSETS);
Record.push_back(CXXBaseSpecifiersOffsets.size());
Stream.EmitRecordWithBlob(BaseSpecifierOffsetAbbrev, Record,
- bytes(CXXBaseSpecifiersOffsets));
+ data(CXXBaseSpecifiersOffsets));
}
//===----------------------------------------------------------------------===//
@@ -2623,7 +2623,7 @@
Decls.push_back(std::make_pair((*D)->getKind(), GetDeclRef(*D)));
++NumLexicalDeclContexts;
- Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, bytes(Decls));
+ Stream.EmitRecordWithBlob(DeclContextLexicalAbbrev, Record, data(Decls));
return Offset;
}
@@ -2642,7 +2642,7 @@
Record.push_back(TYPE_OFFSET);
Record.push_back(TypeOffsets.size());
Record.push_back(FirstTypeID - NUM_PREDEF_TYPE_IDS);
- Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, bytes(TypeOffsets));
+ Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, data(TypeOffsets));
// Write the declaration offsets array
Abbrev = new BitCodeAbbrev();
@@ -2655,7 +2655,7 @@
Record.push_back(DECL_OFFSET);
Record.push_back(DeclOffsets.size());
Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS);
- Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, bytes(DeclOffsets));
+ Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets));
}
void ASTWriter::WriteFileDeclIDsMap() {
@@ -2680,7 +2680,7 @@
unsigned AbbrevCode = Stream.EmitAbbrev(Abbrev);
Record.push_back(FILE_SORTED_DECLS);
Record.push_back(FileSortedIDs.size());
- Stream.EmitRecordWithBlob(AbbrevCode, Record, bytes(FileSortedIDs));
+ Stream.EmitRecordWithBlob(AbbrevCode, Record, data(FileSortedIDs));
}
void ASTWriter::WriteComments() {
@@ -2893,7 +2893,7 @@
Record.push_back(SelectorOffsets.size());
Record.push_back(FirstSelectorID - NUM_PREDEF_SELECTOR_IDS);
Stream.EmitRecordWithBlob(SelectorOffsetAbbrev, Record,
- bytes(SelectorOffsets));
+ data(SelectorOffsets));
}
}
@@ -3253,7 +3253,7 @@
Record.push_back(IdentifierOffsets.size());
Record.push_back(FirstIdentID - NUM_PREDEF_IDENT_IDS);
Stream.EmitRecordWithBlob(IdentifierOffsetAbbrev, Record,
- bytes(IdentifierOffsets));
+ data(IdentifierOffsets));
}
//===----------------------------------------------------------------------===//
@@ -4046,7 +4046,7 @@
Record.clear();
Record.push_back(TU_UPDATE_LEXICAL);
Stream.EmitRecordWithBlob(TuUpdateLexicalAbbrev, Record,
- bytes(NewGlobalDecls));
+ data(NewGlobalDecls));
// And a visible updates block for the translation unit.
Abv = new llvm::BitCodeAbbrev();

View File

@@ -0,0 +1,72 @@
# - Find BLOSC library
# Find the native BLOSC includes and library
# This module defines
# BLOSC_INCLUDE_DIRS, where to find blosc.h, Set when
# BLOSC is found.
# BLOSC_LIBRARIES, libraries to link against to use BLOSC.
# BLOSC_ROOT_DIR, The base directory to search for BLOSC.
# This can also be an environment variable.
# BLOSC_FOUND, If false, do not try to use BLOSC.
#
# also defined, but not for general use are
# BLOSC_LIBRARY, where to find the BLOSC library.
#=============================================================================
# Copyright 2016 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 BLOSC_ROOT_DIR was defined in the environment, use it.
IF(NOT BLOSC_ROOT_DIR AND NOT $ENV{BLOSC_ROOT_DIR} STREQUAL "")
SET(BLOSC_ROOT_DIR $ENV{BLOSC_ROOT_DIR})
ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/blosc
)
FIND_PATH(BLOSC_INCLUDE_DIR
NAMES
blosc.h
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(BLOSC_LIBRARY
NAMES
blosc
HINTS
${_blosc_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set BLOSC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BLOSC DEFAULT_MSG
BLOSC_LIBRARY BLOSC_INCLUDE_DIR)
IF(BLOSC_FOUND)
SET(BLOSC_LIBRARIES ${BLOSC_LIBRARY})
SET(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIR})
ELSE()
SET(BLOSC_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
BLOSC_INCLUDE_DIR
BLOSC_LIBRARY
)

View File

@@ -0,0 +1,72 @@
# - Find CPPUNIT library
# Find the native CPPUNIT includes and library
# This module defines
# CPPUNIT_INCLUDE_DIRS, where to find cppunit.h, Set when
# CPPUNIT is found.
# CPPUNIT_LIBRARIES, libraries to link against to use CPPUNIT.
# CPPUNIT_ROOT_DIR, The base directory to search for CPPUNIT.
# This can also be an environment variable.
# CPPUNIT_FOUND, If false, do not try to use CPPUNIT.
#
# also defined, but not for general use are
# CPPUNIT_LIBRARY, where to find the CPPUNIT library.
#=============================================================================
# Copyright 2016 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 CPPUNIT_ROOT_DIR was defined in the environment, use it.
IF(NOT CPPUNIT_ROOT_DIR AND NOT $ENV{CPPUNIT_ROOT_DIR} STREQUAL "")
SET(CPPUNIT_ROOT_DIR $ENV{CPPUNIT_ROOT_DIR})
ENDIF()
SET(_cppunit_SEARCH_DIRS
${CPPUNIT_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/cppunit
)
FIND_PATH(CPPUNIT_INCLUDE_DIR
NAMES
cppunit/Test.h
HINTS
${_cppunit_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(CPPUNIT_LIBRARY
NAMES
cppunit
HINTS
${_cppunit_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG
CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR)
IF(CPPUNIT_FOUND)
SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY})
SET(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
ELSE()
SET(CPPUNIT_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
CPPUNIT_INCLUDE_DIR
CPPUNIT_LIBRARY
)

View File

@@ -0,0 +1,264 @@
# Module to find IlmBase
#
# This module will first look into the directories defined by the variables:
# - ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom IlmBase:
# - Set the variable ILMBASE_CUSTOM to True
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
# - Optionally set the variable ILMBASE_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable ILMBASE_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# ILMBASE_INCLUDE_DIR - where to find half.h, IlmBaseConfig.h, etc.
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
# ILMBASE_FOUND - True if IlmBase was found.
# Other standarnd issue macros
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
include(SelectLibraryConfigurations)
if( ILMBASE_USE_STATIC_LIBS )
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro(SET_STATE_VAR varname)
set(tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(tmp_ilmbaselibs)
set(tmp_lst
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
)
set(${varname} "${tmp_lst}")
unset(tmp_ilmbaselibs)
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if(ILMBASE_CUSTOM)
set(ILMBASE_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${ILMBASE_FIND_OPTIONS}
)
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${ILMBASE_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR(ILMBASE_CURRENT_STATE)
# If the state has changed, clear the cached variables
if(ILMBASE_CACHED_STATE AND
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
foreach(libvar ${ILMBASE_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set(IlmBase_generic_include_paths
${ILMBASE_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(IlmBase_generic_library_paths
${ILMBASE_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
# Search paths for the IlmBase files
if(ILMBASE_HOME)
if(ILMBASE_VERSION)
set(IlmBase_include_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION}
)
set(IlmBase_library_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib
${ILMBASE_HOME}/lib/ilmbase-${ILMBASE_VERSION}
)
endif()
list(APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set(IlmBase_library_paths
${ILMBASE_HOME}/lib
${ILMBASE_HOME}/lib64
${ILMBASE_LIB_AREA}
${IlmBase_library_paths})
endif()
list(APPEND IlmBase_include_paths ${IlmBase_generic_include_paths})
list(APPEND IlmBase_library_paths ${IlmBase_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR(IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
if(ILMBASE_INCLUDE_DIR)
# Get the version from config file, if not already set.
if(NOT ILMBASE_VERSION)
FILE(STRINGS "${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h" ILMBASE_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(ILMBASE_BUILD_SPECIFICATION)
if(NOT IlmBase_FIND_QUIETLY)
message(STATUS "${ILMBASE_BUILD_SPECIFICATION}")
endif()
string(REGEX REPLACE ".*#define[ \t]+ILMBASE_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION})
set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib")
endif()
endif()
endif()
if(ILMBASE_CUSTOM)
if(NOT ILMBASE_CUSTOM_LIBRARIES)
message(FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
endif()
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else()
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif()
# Locate the IlmBase libraries
set(IlmBase_libvars "")
set(IlmBase_cachevars "")
foreach(ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB(IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach()
# Create the list of variables that might need to be cleared
set(ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set(ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
# Link with pthreads if required
if(NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file(STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
ILMBASE_HAVE_PTHREAD
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
)
if(ILMBASE_HAVE_PTHREAD)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
set(ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif()
endif()
endif()
# Use the standard function to handle ILMBASE_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IlmBase DEFAULT_MSG
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
if(ILMBASE_FOUND)
set(ILMBASE_LIBRARIES "")
foreach(tmplib ${IlmBase_libvars})
list(APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
if(NOT IlmBase_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(ILMBASE
"Found IlmBase: ${ILMBASE_LIBRARIES}"
"[${ILMBASE_INCLUDE_DIR}][${ILMBASE_LIBRARIES}][${ILMBASE_CURRENT_STATE}]"
)
endif()
endif()
# Restore the original find library ordering
if( ILMBASE_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset(ILMBASE_CURRENT_STATE)
unset(IlmBase_include_paths)
unset(IlmBase_library_paths)
unset(IlmBase_generic_include_paths)
unset(IlmBase_generic_library_paths)
unset(IlmBase_libvars)
unset(IlmBase_cachevars)
unset(ILMBASE_PTHREADS)

View File

@@ -0,0 +1,72 @@
# - Find LOGC4PLUS library
# Find the native LOGC4PLUS includes and library
# This module defines
# LOGC4PLUS_INCLUDE_DIRS, where to find logc4plus.h, Set when
# LOGC4PLUS is found.
# LOGC4PLUS_LIBRARIES, libraries to link against to use LOGC4PLUS.
# LOGC4PLUS_ROOT_DIR, The base directory to search for LOGC4PLUS.
# This can also be an environment variable.
# LOGC4PLUS_FOUND, If false, do not try to use LOGC4PLUS.
#
# also defined, but not for general use are
# LOGC4PLUS_LIBRARY, where to find the LOGC4PLUS library.
#=============================================================================
# Copyright 2016 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 LOGC4PLUS_ROOT_DIR was defined in the environment, use it.
IF(NOT LOGC4PLUS_ROOT_DIR AND NOT $ENV{LOGC4PLUS_ROOT_DIR} STREQUAL "")
SET(LOGC4PLUS_ROOT_DIR $ENV{LOGC4PLUS_ROOT_DIR})
ENDIF()
SET(_logc4plus_SEARCH_DIRS
${LOGC4PLUS_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/logc4plus
)
FIND_PATH(LOGC4PLUS_INCLUDE_DIR
NAMES
logc4plus.h
HINTS
${_logc4plus_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(LOGC4PLUS_LIBRARY
NAMES
logc4plus
HINTS
${_logc4plus_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LOGC4PLUS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LOGC4PLUS DEFAULT_MSG
LOGC4PLUS_LIBRARY LOGC4PLUS_INCLUDE_DIR)
IF(LOGC4PLUS_FOUND)
SET(LOGC4PLUS_LIBRARIES ${LOGC4PLUS_LIBRARY})
SET(LOGC4PLUS_INCLUDE_DIRS ${LOGC4PLUS_INCLUDE_DIR})
ELSE()
SET(LOGC4PLUS_LOGC4PLUS_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
LOGC4PLUS_INCLUDE_DIR
LOGC4PLUS_LIBRARY
)

View File

@@ -0,0 +1,246 @@
# Module to find OpenEXR.
#
# This module will first look into the directories defined by the variables:
# - OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom OpenEXR
# - Set the variable OPENEXR_CUSTOM to True
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
# use, e.g. "SpiIlmImf"
# - Optionally set the variable OPENEXR_CUSTOM_INCLUDE_DIR to any
# particularly weird place that the OpenEXR/*.h files may be found
# - Optionally set the variable OPENEXR_CUSTOM_LIB_DIR to any
# particularly weird place that the libraries files may be found
#
# This module defines the following variables:
#
# OPENEXR_INCLUDE_DIR - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
# This list does NOT include the IlmBase libraries.
# These are defined by the FindIlmBase module.
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standarnd issue macros
include(SelectLibraryConfigurations)
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
if(OPENEXR_USE_STATIC_LIBS)
set(_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
# Macro to assemble a helper state variable
macro(SET_STATE_VAR varname)
set(tmp_lst
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
)
set(${varname} "${tmp_lst}")
unset(tmp_lst)
endmacro()
# To enforce that find_* functions do not use inadvertently existing versions
if(OPENEXR_CUSTOM)
set(OPENEXR_FIND_OPTIONS "NO_DEFAULT_PATH")
endif()
# Macro to search for an include directory
macro(PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string(TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATH_SUFFIXES include
${OPENEXR_FIND_OPTIONS}
)
if(${tmp_varname})
mark_as_advanced(${tmp_varname})
endif()
unset(tmp_varname)
endmacro()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro(PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string(TOUPPER ${prefix}_${libname} tmp_prefix)
# Handle new library names for OpenEXR 2.1 build via cmake
string(REPLACE "." "_" _ILMBASE_VERSION ${ILMBASE_VERSION})
string(SUBSTRING ${_ILMBASE_VERSION} 0 3 _ILMBASE_VERSION )
find_library(${tmp_prefix}_LIBRARY_RELEASE
NAMES ${libname} ${libname}-${_ILMBASE_VERSION}
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
find_library(${tmp_prefix}_LIBRARY_DEBUG
NAMES ${libname}d ${libname}_d ${libname}debug ${libname}_debug
HINTS ${${libpath_var}}
PATH_SUFFIXES lib
${OPENEXR_FIND_OPTIONS}
)
# Properly define ${tmp_prefix}_LIBRARY (cached) and ${tmp_prefix}_LIBRARIES
select_library_configurations(${tmp_prefix})
list(APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list(APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
mark_as_advanced(
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset(tmp_prefix)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR(OPENEXR_CURRENT_STATE)
# If the state has changed, clear the cached variables
if(OPENEXR_CACHED_STATE AND
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
foreach(libvar ${OPENEXR_CACHED_VARS})
unset(${libvar} CACHE)
endforeach()
endif()
# Generic search paths
set(OpenEXR_generic_include_paths
${OPENEXR_CUSTOM_INCLUDE_DIR}
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(OpenEXR_generic_library_paths
${OPENEXR_CUSTOM_LIB_DIR}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
# Search paths for the OpenEXR files
if(OPENEXR_HOME)
set(OpenEXR_library_paths
${OPENEXR_HOME}/lib
${OPENEXR_HOME}/lib64)
if(OPENEXR_VERSION)
set(OpenEXR_include_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include
${OPENEXR_HOME}/include/openexr-${OPENEXR_VERSION})
list(APPEND OpenEXR_library_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib
${OPENEXR_HOME}/lib/openexr-${OPENEXR_VERSION})
endif()
list(APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if(OPENEXR_LIB_AREA)
list(INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif()
endif()
if(ILMBASE_HOME AND OPENEXR_VERSION)
list(APPEND OpenEXR_include_paths
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
endif()
list(APPEND OpenEXR_include_paths ${OpenEXR_generic_include_paths})
list(APPEND OpenEXR_library_paths ${OpenEXR_generic_library_paths})
# Locate the header files
PREFIX_FIND_INCLUDE_DIR(OpenEXR
OpenEXR/ImfArray.h OpenEXR_include_paths)
if(OPENEXR_INCLUDE_DIR)
# Get the version from config file, if not already set.
if(NOT OPENEXR_VERSION)
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
if(OPENEXR_BUILD_SPECIFICATION)
if(NOT OpenEXR_FIND_QUIETLY)
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
endif()
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif()
if(OPENEXR_CUSTOM)
if(NOT OPENEXR_CUSTOM_LIBRARY)
message(FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
endif()
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else()
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
set(OpenEXR_Library IlmImf)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif()
# Locate the OpenEXR library
set(OpenEXR_libvars "")
set(OpenEXR_cachevars "")
PREFIX_FIND_LIB(OpenEXR ${OpenEXR_Library}
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
# Create the list of variables that might need to be cleared
set(OPENEXR_CACHED_VARS
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set(OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
# Always link explicitly with zlib
set(OPENEXR_ZLIB ${ZLIB_LIBRARIES})
# Use the standard function to handle OPENEXR_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
if(OPENEXR_FOUND)
set(OPENEXR_LIBRARIES "")
foreach(tmplib ${OpenEXR_libvars})
list(APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach()
list(APPEND OPENEXR_LIBRARIES ${ZLIB_LIBRARIES})
if(NOT OpenEXR_FIND_QUIETLY)
FIND_PACKAGE_MESSAGE(OPENEXR
"Found OpenEXR: ${OPENEXR_LIBRARIES}"
"[${OPENEXR_INCLUDE_DIR}][${OPENEXR_LIBRARIES}][${OPENEXR_CURRENT_STATE}]"
)
endif()
endif()
# Restore the original find library ordering
if( OPENEXR_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
# Unset the helper variables to avoid pollution
unset(OPENEXR_CURRENT_STATE)
unset(OpenEXR_include_paths)
unset(OpenEXR_library_paths)
unset(OpenEXR_generic_include_paths)
unset(OpenEXR_generic_library_paths)
unset(OpenEXR_libvars)
unset(OpenEXR_cachevars)

View File

@@ -0,0 +1,72 @@
# - Find TBB library
# Find the native TBB includes and library
# This module defines
# TBB_INCLUDE_DIRS, where to find tbb.h, Set when
# TBB is found.
# TBB_LIBRARIES, libraries to link against to use TBB.
# TBB_ROOT_DIR, The base directory to search for TBB.
# This can also be an environment variable.
# TBB_FOUND, If false, do not try to use TBB.
#
# also defined, but not for general use are
# TBB_LIBRARY, where to find the TBB library.
#=============================================================================
# Copyright 2016 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 TBB_ROOT_DIR was defined in the environment, use it.
IF(NOT TBB_ROOT_DIR AND NOT $ENV{TBB_ROOT_DIR} STREQUAL "")
SET(TBB_ROOT_DIR $ENV{TBB_ROOT_DIR})
ENDIF()
SET(_tbb_SEARCH_DIRS
${TBB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/tbb
)
FIND_PATH(TBB_INCLUDE_DIR
NAMES
tbb/tbb.h
HINTS
${_tbb_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(TBB_LIBRARY
NAMES
tbb
HINTS
${_tbb_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set TBB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG
TBB_LIBRARY TBB_INCLUDE_DIR)
IF(TBB_FOUND)
SET(TBB_LIBRARIES ${TBB_LIBRARY})
SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
ELSE()
SET(TBB_TBB_FOUND FALSE)
ENDIF()
MARK_AS_ADVANCED(
TBB_INCLUDE_DIR
TBB_LIBRARY
)

View File

@@ -0,0 +1,81 @@
# select_library_configurations( basename )
#
# This macro takes a library base name as an argument, and will choose good
# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and
# basename_LIBRARY_RELEASE depending on what has been found and set. If only
# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG,
# and basename_LIBRARY_RELEASE will be set to the release value. If only
# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY,
# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value.
#
# If the generator supports configuration types, then basename_LIBRARY and
# basename_LIBRARIES will be set with debug and optimized flags specifying the
# library to be used for the given configuration. If no build type has been set
# or the generator in use does not support configuration types, then
# basename_LIBRARY and basename_LIBRARIES will take only the release values.
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Will Dicharry <wdicharry@stellarscience.com>
# Copyright 2005-2009 Kitware, Inc.
#
# 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.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This macro was adapted from the FindQt4 CMake module and is maintained by Will
# Dicharry <wdicharry@stellarscience.com>.
# Utility macro to check if one variable exists while another doesn't, and set
# one that doesn't exist to the one that exists.
macro( _set_library_name basename GOOD BAD )
if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} )
endif( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} )
endmacro( _set_library_name )
macro( select_library_configurations basename )
# if only the release version was found, set the debug to be the release
# version.
_set_library_name( ${basename} RELEASE DEBUG )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( ${basename}_LIBRARY
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
set( ${basename}_LIBRARIES
optimized ${${basename}_LIBRARY_RELEASE}
debug ${${basename}_LIBRARY_DEBUG} )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
# If there are no configuration types or build type, just use
# the release version
set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} )
endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE )
set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
"The ${basename} library" )
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif( ${basename}_LIBRARY )
mark_as_advanced( ${basename}_LIBRARY
${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro( select_library_configurations )

View File

@@ -0,0 +1,2 @@
cmake_minimum_required (VERSION 2.4)
add_subdirectory(build/cmake)

View File

@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8)
project(hidapi)
set(SRC_FILES
windows/hid.c
)
set(HEADER_FILES
hidapi/hidapi.h
)
include_directories(hidapi)
add_definitions(-DHID_API_STATIC)
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
install(TARGETS hidapi DESTINATION lib)
INSTALL(FILES hidapi/hidapi.h
DESTINATION "include"
)

View File

@@ -0,0 +1,398 @@
# --------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
# --------------------------------------------------------------------------------
project(OpenVDB)
# --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# --------------------------------------------------------------------------------
set(CMAKE_BUILD_TYPE_INIT "Release")
# --------------------------------------------------------------------------------
# Options
option(WITH_BLOSC "Enable Blosc support for compression" OFF)
option(WITH_LOGC4PLUS "Enable logging" OFF)
option(WITH_OPENVDB_2_ABI "Enable building the library to be compability with the OpenVDB 2 ABI" OFF)
option(WITH_PRINTER "Enable building the OpenVDB print executable" OFF)
option(WITH_PYTHON "Enable building the OpenVDB python API" OFF)
option(WITH_RENDERER "Enable building the OpenVDB render executable" OFF)
option(WITH_UNITTEST "Enable building the unit tests" OFF)
option(WITH_VIEWER "Enable building the OpenVDB viewer executable" OFF)
# --------------------------------------------------------------------------------
# Find packages
#set(BOOST_LIBRARIES boost_iostreams boost_system boost_thread)
find_package(IlmBase)
find_package(OpenEXR)
find_package(TBB)
find_package(Boost)
if(WITH_BLOSC)
find_package(Blosc)
if(NOT BLOSC_FOUND)
set(WITH_BLOSC OFF)
endif()
endif()
# todo
if(WITH_VIEWER)
set(GLFW_INCLUDE_DIRS ${GLFW_INCLUDE_PATH})
set(GLFW_LIBRARY_DIRS ${GLFW_LIBRARY_PATH})
endif()
if(WITH_LOGC4PLUS)
find_package(LogC4Plus)
if(NOT LOGC4PLUS_FOUND)
set(WITH_LOGC4PLUS OFF)
endif()
endif()
# todo
if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
set(PYTHON_LIBRARY_DIRS ${PYTHON_LIBRARY_PATH})
endif()
if(WITH_UNITTEST)
find_package(CppUnit)
if(NOT CPPUNIT_FOUND)
set(WITH_UNITTEST OFF)
endif()
endif()
# --------------------------------------------------------------------------------
message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
message (STATUS "Boost found ${Boost_FOUND} ")
message (STATUS "Boost version ${Boost_VERSION}")
message (STATUS "Boost include dirs ${Boost_INCLUDE_DIRS}")
message (STATUS "Boost library dirs ${Boost_LIBRARY_DIRS}")
message (STATUS "Boost libraries ${Boost_LIBRARIES}")
message (STATUS "ILMBase found ${ILMBASE_FOUND} ")
message (STATUS "ILMBase include dir ${ILMBASE_INCLUDE_DIR}")
message (STATUS "ILMBase libraries ${ILMBASE_LIBRARIES}")
message (STATUS "TBB found ${TBB_FOUND} ")
message (STATUS "TBB include dir ${TBB_INCLUDE_DIR}")
message (STATUS "TBB libraries ${TBB_LIBRARIES}")
if(MSVC)
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
endif()
set(OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${BOOST_LIBRARIES} ${OPENEXR_LIBRARIES} ${ILMBASE_LIBRARIES} ${TBB_LIBRARIES} ${ZLIB_LIBRARY} )
include_directories(. ${CMAKE_CURRENT_SOURCE_DIR}/../ ${Boost_INCLUDE_DIRS} ${ILMBASE_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR} ${TBB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS} ${OPENEXR_LIBRARY_DIRS} ${TBB_INCLUDE_DIRS})
add_definitions(-DNOMINMAX -D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_STATICLIB -DOPENVDB_OPENEXR_STATICLIB)
if(WITH_BLOSC)
add_definitions(-DOPENVDB_USE_BLOSC)
include_directories(${BLOSC_INCLUDE_DIRS})
link_directories(${BLOSC_LIBRARY_DIRS})
endif()
if(WITH_LOGC4PLUS)
add_definitions(-DOPENVDB_USE_LOG4CPLUS)
include_directories(${LOG4CPLUS_INCLUDE_DIRS})
link_directories(${LOG4CPLUS_LIBRARY_DIRS})
endif()
if(WITH_OPENVDB_2_ABI)
add_definitions(-DOPENVDB_2_ABI_COMPATIBLE)
endif()
# todo
if(WITH_OPENVDB_USE_GLFW_3)
add_definitions(-DOPENVDB_USE_GLFW_3)
endif()
if(WITH_UNITTEST)
include_directories(${CPPUNIT_INCLUDE_DIRS})
link_directories(${CPPUNIT_LIBRARY_DIRS})
endif()
# --------------------------------------------------------------------------------
set(SRC_FILES
openvdb/openvdb.cc
openvdb/io/Compression.cc
openvdb/io/File.cc
openvdb/io/Queue.cc
openvdb/io/Stream.cc
openvdb/io/TempFile.cc
openvdb/io/GridDescriptor.cc
openvdb/io/Archive.cc
openvdb/metadata/MetaMap.cc
openvdb/metadata/Metadata.cc
openvdb/math/Maps.cc
openvdb/math/Transform.cc
openvdb/math/QuantizedUnitVec.cc
openvdb/math/Proximity.cc
openvdb/Grid.cc
openvdb/util/Formats.cc
openvdb/util/Util.cc
)
set(HEADER_FILES
openvdb/openvdb.h
openvdb/version.h
openvdb/PlatformConfig.h
openvdb/Metadata.h
openvdb/Exceptions.h
openvdb/Grid.h
openvdb/Types.h
openvdb/Platform.h
openvdb/tree/ValueAccessor.h
openvdb/tree/NodeUnion.h
openvdb/tree/Tree.h
openvdb/tree/Iterator.h
openvdb/tree/LeafNodeBool.h
openvdb/tree/TreeIterator.h
openvdb/tree/LeafNode.h
openvdb/tree/NodeManager.h
openvdb/tree/LeafManager.h
openvdb/tree/InternalNode.h
openvdb/tree/RootNode.h
openvdb/tools/PointScatter.h
openvdb/tools/VolumeAdvect.h
openvdb/tools/LevelSetTracker.h
openvdb/tools/Composite.h
openvdb/tools/Morphology.h
openvdb/tools/ValueTransformer.h
openvdb/tools/ChangeBackground.h
openvdb/tools/GridTransformer.h
openvdb/tools/Prune.h
openvdb/tools/LevelSetUtil.h
openvdb/tools/VolumeToSpheres.h
openvdb/tools/LevelSetAdvect.h
openvdb/tools/Statistics.h
openvdb/tools/LevelSetMeasure.h
openvdb/tools/VectorTransformer.h
openvdb/tools/RayIntersector.h
openvdb/tools/PointPartitioner.h
openvdb/tools/Interpolation.h
openvdb/tools/VelocityFields.h
openvdb/tools/PointIndexGrid.h
openvdb/tools/LevelSetRebuild.h
openvdb/tools/Clip.h
openvdb/tools/SignedFloodFill.h
openvdb/tools/MeshToVolume.h
openvdb/tools/Dense.h
openvdb/tools/Filter.h
openvdb/tools/RayTracer.h
openvdb/tools/Diagnostics.h
openvdb/tools/VolumeToMesh.h
openvdb/tools/PoissonSolver.h
openvdb/tools/LevelSetFracture.h
openvdb/tools/GridOperators.h
openvdb/tools/DenseSparseTools.h
openvdb/tools/ParticlesToLevelSet.h
openvdb/tools/LevelSetSphere.h
openvdb/tools/LevelSetMorph.h
openvdb/tools/LevelSetFilter.h
openvdb/tools/PointAdvect.h
openvdb/io/Queue.h
openvdb/io/TempFile.h
openvdb/io/Stream.h
openvdb/io/GridDescriptor.h
openvdb/io/Archive.h
openvdb/io/io.h
openvdb/io/Compression.h
openvdb/io/File.h
openvdb/metadata/StringMetadata.h
openvdb/metadata/MetaMap.h
openvdb/metadata/Metadata.h
openvdb/math/DDA.h
openvdb/math/Vec2.h
openvdb/math/FiniteDifference.h
openvdb/math/Stencils.h
openvdb/math/BBox.h
openvdb/math/Mat3.h
openvdb/math/Mat.h
openvdb/math/Proximity.h
openvdb/math/Ray.h
openvdb/math/ConjGradient.h
openvdb/math/Quat.h
openvdb/math/Vec3.h
openvdb/math/Vec4.h
openvdb/math/QuantizedUnitVec.h
openvdb/math/Coord.h
openvdb/math/Operators.h
openvdb/math/Stats.h
openvdb/math/Math.h
openvdb/math/Tuple.h
openvdb/math/LegacyFrustum.h
openvdb/math/Mat4.h
openvdb/math/Maps.h
openvdb/math/Transform.h
openvdb/util/PagedArray.h
openvdb/util/CpuTimer.h
openvdb/util/Formats.h
openvdb/util/NullInterrupter.h
openvdb/util/Util.h
openvdb/util/Name.h
openvdb/util/MapsUtil.h
openvdb/util/NodeMasks.h
openvdb/util/logging.h
)
add_library(openvdb STATIC ${SRC_FILES} ${HEADER_FILES})
# --------------------------------------------------------------------------------
target_link_libraries(openvdb ${OPENVDB_LIBRARIES})
set(OPENVDB_VERSION_MAJOR 3)
set(OPENVDB_VERSION_MINOR 1)
set(OPENVDB_VERSION_PATCH 0)
set(OPENVDB_VERSION_STRING ${OPENVDB_VERSION_MAJOR}.${OPENVDB_VERSION_MINOR}.${OPENVDB_VERSION_PATCH})
set_target_properties(openvdb PROPERTIES VERSION ${OPENVDB_VERSION_STRING} SOVERSION ${OPENVDB_VERSION_MAJOR})
install(TARGETS openvdb DESTINATION lib)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include COMPONENT Development FILES_MATCHING PATTERN "*.h"
PATTERN ".git" EXCLUDE PATTERN "build" EXCLUDE PATTERN "cmake" EXCLUDE)
# --------------------------------------------------------------------------------
if(WITH_PRINTER)
set(PRINT_SRC
openvdb/cmd/openvdb_print/main.cc
)
add_executable(vdb_print ${PRINT_SRC})
target_link_libraries(vdb_print openvdb)
install(TARGETS vdb_print RUNTIME DESTINATION bin)
endif()
if(WITH_RENDER)
set(RENDER_SRC
openvdb/cmd/openvdb_render/main.cc
)
add_executable(vdb_render ${RENDER_SRC})
target_link_libraries(vdb_render openvdb)
install(TARGETS vdb_render RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_VIEWER)
set(VIEWER_SRC
openvdb/viewer/Camera.cc
openvdb/viewer/ClipBox.cc
openvdb/viewer/Font.cc
openvdb/viewer/RenderModules.cc
openvdb/viewer/Viewer.cc
openvdb/viewer/Camera.h
openvdb/viewer/ClipBox.h
openvdb/viewer/Font.h
openvdb/viewer/RenderModules.h
openvdb/viewer/Viewer.h
openvdb/cmd/openvdb_viewer/main.cc
)
include_directories(${GLFW_INCLUDE_DIRS})
link_directories(${GLFW_LIBRARY_DIRS})
add_executable(vdb_viewer ${VIEWER_SRC})
target_link_libraries(vdb_viewer openvdb)
install(TARGETS vdb_viewer RUNTIME DESTINATION bin)
endif()
# todo
if(WITH_PYTHON)
# add_library(pyopenvdb SHARED )
endif()
set(UNITTEST_SRC
openvdb/unittest/main.cc
openvdb/unittest/TestBBox.cc
openvdb/unittest/TestConjGradient.cc
openvdb/unittest/TestCoord.cc
openvdb/unittest/TestCpt.cc
openvdb/unittest/TestCurl.cc
openvdb/unittest/TestDense.cc
openvdb/unittest/TestDenseSparseTools.cc
openvdb/unittest/TestDiagnostics.cc
openvdb/unittest/TestDivergence.cc
openvdb/unittest/TestDoubleMetadata.cc
openvdb/unittest/TestExceptions.cc
openvdb/unittest/TestFile.cc
openvdb/unittest/TestFloatMetadata.cc
openvdb/unittest/TestGradient.cc
openvdb/unittest/TestGrid.cc
openvdb/unittest/TestGridBbox.cc
openvdb/unittest/TestGridDescriptor.cc
openvdb/unittest/TestGridIO.cc
openvdb/unittest/TestGridTransformer.cc
openvdb/unittest/TestInit.cc
openvdb/unittest/TestInt32Metadata.cc
openvdb/unittest/TestInt64Metadata.cc
openvdb/unittest/TestInternalOrigin.cc
openvdb/unittest/TestLaplacian.cc
openvdb/unittest/TestLeaf.cc
openvdb/unittest/TestLeafBool.cc
openvdb/unittest/TestLeafIO.cc
openvdb/unittest/TestLeafOrigin.cc
openvdb/unittest/TestLevelSetRayIntersector.cc
openvdb/unittest/TestLevelSetUtil.cc
openvdb/unittest/TestLinearInterp.cc
openvdb/unittest/TestMaps.cc
openvdb/unittest/TestMat4Metadata.cc
openvdb/unittest/TestMath.cc
openvdb/unittest/TestMeanCurvature.cc
openvdb/unittest/TestMeshToVolume.cc
openvdb/unittest/TestMetadata.cc
openvdb/unittest/TestMetadataIO.cc
openvdb/unittest/TestMetaMap.cc
openvdb/unittest/TestName.cc
openvdb/unittest/TestNodeIterator.cc
openvdb/unittest/TestNodeMask.cc
openvdb/unittest/TestParticlesToLevelSet.cc
openvdb/unittest/TestPointIndexGrid.cc
openvdb/unittest/TestPointPartitioner.cc
openvdb/unittest/TestPoissonSolver.cc
openvdb/unittest/TestPrePostAPI.cc
openvdb/unittest/TestQuadraticInterp.cc
openvdb/unittest/TestQuantizedUnitVec.cc
openvdb/unittest/TestQuat.cc
openvdb/unittest/TestRay.cc
openvdb/unittest/TestStats.cc
openvdb/unittest/TestStream.cc
openvdb/unittest/TestStringMetadata.cc
openvdb/unittest/TestTools.cc
openvdb/unittest/TestTransform.cc
openvdb/unittest/TestTree.cc
openvdb/unittest/TestTreeCombine.cc
openvdb/unittest/TestTreeGetSetValues.cc
openvdb/unittest/TestTreeIterators.cc
openvdb/unittest/TestTreeVisitor.cc
openvdb/unittest/TestUtil.cc
openvdb/unittest/TestValueAccessor.cc
openvdb/unittest/TestVec2Metadata.cc
openvdb/unittest/TestVec3Metadata.cc
openvdb/unittest/TestVolumeRayIntersector.cc
openvdb/unittest/TestVolumeToMesh.cc
)
# todo
if(WITH_UNITTEST)
add_executable(test ${UNITTEST_SRC} ${HEADER_FILES})
target_link_libraries(test openvdb ${CPPUNIT_LIBRARIES})
endif()

View File

@@ -0,0 +1,204 @@
cmake_minimum_required (VERSION 2.8)
project(tbb CXX)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
include_directories(include src src/rml/include )
option(TBB_BUILD_SHARED "Build TBB shared library" ON)
option(TBB_BUILD_STATIC "Build TBB static library" ON)
option(TBB_BUILD_TBBMALLOC "Build TBB malloc library" ON)
option(TBB_BUILD_TBBMALLOC_PROXY "Build TBB malloc proxy library" ON)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
file(GLOB tbb_src "${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/src/old/*.cpp")
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/rml/client/rml_tbb.cpp)
file(GLOB to_remove "${CMAKE_CURRENT_SOURCE_DIR}/src/old/test*.cpp")
list(REMOVE_ITEM tbb_src ${to_remove})
set(tbbmalloc_static_src
src/tbbmalloc/backend.cpp
src/tbbmalloc/large_objects.cpp
src/tbbmalloc/backref.cpp
src/tbbmalloc/tbbmalloc.cpp
src/tbbmalloc/frontend.cpp
src/tbb/itt_notify.cpp)
set(tbbmalloc_src ${tbbmalloc_static_src})
set(tbbmalloc_proxy_src
src/tbbmalloc/proxy.cpp
src/tbbmalloc/tbb_function_replacement.cpp)
if (NOT APPLE)
add_definitions(-DDO_ITT_NOTIFY)
else()
# Disable annoying "has no symbols" warnings
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
if (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DUSE_PTHREAD")
if(NOT CMAKE_CXX_FLAGS MATCHES "-mno-rtm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mrtm")
endif()
if (APPLE)
set(ARCH_PREFIX "mac")
else()
set(ARCH_PREFIX "lin")
endif()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_PREFIX "${ARCH_PREFIX}64")
else()
set(ARCH_PREFIX "${ARCH_PREFIX}32")
endif()
set(ENABLE_RTTI "-frtti -fexceptions ")
set(DISABLE_RTTI "-fno-rtti -fno-exceptions ")
elseif(WIN32)
cmake_minimum_required (VERSION 3.1)
enable_language(ASM_MASM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS- /Zc:wchar_t /Zc:forScope /DUSE_WINTHREAD")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE /D_WIN32_WINNT=0x0600 /volatile:iso")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4800 /wd4146 /wd4244 /wd4018")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND tbb_src src/tbb/intel64-masm/atomic_support.asm
src/tbb/intel64-masm/itsx.asm src/tbb/intel64-masm/intel64_misc.asm)
list(APPEND tbbmalloc_src src/tbb/intel64-masm/atomic_support.asm)
set(CMAKE_ASM_MASM_FLAGS "/DEM64T=1")
set(ARCH_PREFIX "win64")
else()
list(APPEND tbb_src src/tbb/ia32-masm/atomic_support.asm
src/tbb/ia32-masm/itsx.asm src/tbb/ia32-masm/lock_byte.asm)
list(APPEND tbbmalloc_src src/tbb/ia32-masm/atomic_support.asm)
set(ARCH_PREFIX "win32")
endif()
set(ENABLE_RTTI "/EHsc /GR ")
set(DISABLE_RTTI "/EHs- /GR- ")
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-flifetime-dse=1" SUPPORTS_FLIFETIME)
if (SUPPORTS_FLIFETIME)
add_definitions(-flifetime-dse=1)
endif()
endif()
# Linker export definitions
if (WIN32)
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} /TC /EP ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include > tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def
COMMENT "Preprocessing tbb.def"
)
add_custom_command(OUTPUT tbbmalloc.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbbmalloc.def
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
endif()
add_custom_target(tbb_def_files DEPENDS tbb.def tbbmalloc.def)
# TBB library
if (TBB_BUILD_STATIC)
add_library(tbb_static STATIC ${tbb_src})
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
set_property(TARGET tbb_static APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
install(TARGETS tbb_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbb SHARED ${tbb_src})
set_property(TARGET tbb APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
add_dependencies(tbb tbb_def_files)
if (APPLE)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(UNIX)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
# Quench a warning on GCC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/governor.cpp COMPILE_FLAGS "-Wno-missing-field-initializers ")
elseif(MSVC)
# Quench a warning on MSVC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/scheduler.cpp COMPILE_FLAGS "/wd4458 ")
endif()
if(TBB_BUILD_TBBMALLOC)
# TBB malloc library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_static STATIC ${tbbmalloc_static_src})
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc SHARED ${tbbmalloc_src})
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
add_dependencies(tbbmalloc tbb_def_files)
if (APPLE)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(UNIX)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
elseif(WIN32)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def")
endif()
install(TARGETS tbbmalloc DESTINATION lib)
endif()
endif()
if(TBB_BUILD_TBBMALLOC_PROXY)
# TBB malloc proxy library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_proxy_static STATIC ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy_static tbbmalloc)
install(TARGETS tbbmalloc_proxy_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()
install(DIRECTORY include/tbb DESTINATION include)

View File

@@ -0,0 +1,26 @@
--- CmakeLists.txt.orig 2015-12-31 03:46:41 -0700
+++ CMakeLists.txt 2016-04-01 13:28:33 -0600
@@ -22,3 +22,10 @@
add_executable(testcuew cuewTest/cuewTest.c include/cuew.h)
target_link_libraries(testcuew cuew ${CMAKE_DL_LIBS})
+
+install(TARGETS cuew
+ LIBRARY DESTINATION lib COMPONENT libraries
+ ARCHIVE DESTINATION lib/static COMPONENT libraries)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/cuew.h
+ DESTINATION include/)
\ No newline at end of file
--- src/cuew.c 2016-04-01 13:41:43 -0600
+++ src/cuew.c 2016-04-01 13:41:11 -0600
@@ -15,7 +15,9 @@
*/
#ifdef _MSC_VER
+#if _MSC_VER < 1900
# define snprintf _snprintf
+#endif
# define popen _popen
# define pclose _pclose
# define _CRT_SECURE_NO_WARNINGS

View File

@@ -0,0 +1,11 @@
--- _msvccompiler.py.orig 2017-01-17 00:57:48 -0700
+++ _msvccompiler.py 2017-05-20 09:47:26 -0600
@@ -237,7 +237,7 @@
ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
ldflags_debug = [
- '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
]
self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']

View File

@@ -0,0 +1,32 @@
--- libavutil/common.h 2016-02-14 19:29:42 -0700
+++ libavutil/common.h 2016-03-30 09:50:29 -0600
@@ -99,6 +99,11 @@
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+//msvc helper
+#ifdef _MSC_VER
+#define inline __inline
+#endif
+
/* misc math functions */
#ifdef HAVE_AV_CONFIG_H
--- configure 2016-11-26 03:12:05.000000000 +0100
+++ configure 2017-04-05 03:24:35.000000000 +0200
@@ -1899,7 +1899,6 @@
access
aligned_malloc
arc4random
- clock_gettime
closesocket
CommandLineToArgvW
CoTaskMemFree
@@ -5494,7 +5493,6 @@
check_func access
check_func_headers stdlib.h arc4random
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork
check_func gethrtime

View File

@@ -0,0 +1,25 @@
--- config.h.in 2014-03-04 11:44:58 -0700
+++ config.h.in 2016-03-30 11:42:49 -0600
@@ -142,9 +142,6 @@
/* Define to 1 if you have the `gethrtime' function. */
#undef HAVE_GETHRTIME
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
/* Define to 1 if hrtime_t is defined in <sys/time.h> */
#undef HAVE_HRTIME_T
--- kernel/assert.c 2014-03-04 11:41:03 -0700
+++ kernel/assert.c 2016-04-01 09:41:05 -0600
@@ -24,8 +24,10 @@
void X(assertion_failed)(const char *s, int line, const char *file)
{
+#if 0
fflush(stdout);
fprintf(stderr, "fftw: %s:%d: assertion failed: %s\n", file, line, s);
+#endif
#ifdef HAVE_ABORT
abort();
#else

View File

@@ -0,0 +1,11 @@
--- UserMacros.cmake
+++ UserMacros.cmake
@@ -16,6 +16,8 @@
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif (BUILD_USER_DEFINED_LIBS)
+
+include(Config/cmake/usermacros/windows_mt.cmake)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------

View File

@@ -0,0 +1,15 @@
--- hidapi/hidapi.h 2011-10-25 20:58:16 -0600
+++ hidapi/hidapi.h 2016-11-01 12:05:58 -0600
@@ -30,7 +30,11 @@
#include <wchar.h>
#ifdef _WIN32
- #define HID_API_EXPORT __declspec(dllexport)
+ #ifdef HID_API_STATIC
+ #define HID_API_EXPORT
+ #else
+ #define HID_API_EXPORT __declspec(dllexport)
+ #endif
#define HID_API_CALL
#else
#define HID_API_EXPORT /**< API export macro */

View File

@@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@
set(LLVM_VERSION_MINOR 4)
if (NOT PACKAGE_VERSION)
- set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
+ set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
endif()
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)

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

@@ -0,0 +1,10 @@
--- frontend/main.c 2008-09-22 11:55:09 -0600
+++ frontend/main.c 2016-04-06 15:20:36 -0600
@@ -31,7 +31,6 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#define off_t __int64
#else
#include <time.h>
#endif

View File

@@ -0,0 +1,111 @@
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp 2014-04-11 23:04:44.000000000 +0200
+++ lib/Target/X86/X86ISelLowering.cpp (working copy)
@@ -15493,12 +15493,36 @@
// non-trivial part is impdef of ESP.
if (Subtarget->isTargetWin64()) {
+ const char *StackProbeSymbol =
+ Subtarget->isTargetCygMing() ? "___chkstk" : "__chkstk";
+
+ MachineInstrBuilder MIB;
+
+ if (getTargetMachine().getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(*BB, MI, DL, TII->get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
+
if (Subtarget->isTargetCygMing()) {
// ___chkstk(Mingw64):
// Clobbers R10, R11, RAX and EFLAGS.
// Updates RSP.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("___chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::RSP, RegState::Implicit)
.addReg(X86::RAX, RegState::Define | RegState::Implicit)
@@ -15507,8 +15531,7 @@
} else {
// __chkstk(MSVCRT): does not update stack pointer.
// Clobbers R10, R11 and EFLAGS.
- BuildMI(*BB, MI, DL, TII->get(X86::W64ALLOCA))
- .addExternalSymbol("__chkstk")
+ MIB
.addReg(X86::RAX, RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit);
// RAX has the offset to be subtracted from RSP.
Index: lib/Target/X86/X86FrameLowering.cpp
===================================================================
--- lib/Target/X86/X86FrameLowering.cpp 2013-10-24 01:37:01.000000000 +0200
+++ lib/Target/X86/X86FrameLowering.cpp (working copy)
@@ -635,25 +635,49 @@
.addReg(X86::EAX, RegState::Kill)
.setMIFlag(MachineInstr::FrameSetup);
}
+
+ MachineInstrBuilder MIB;
if (Is64Bit) {
+
// Handle the 64-bit Windows ABI case where we need to call __chkstk.
// Function prologue is responsible for adjusting the stack pointer.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX)
.addImm(NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ if (TM.getCodeModel() == CodeModel::Large) {
+ // For large code model we need to do indirect call to __chkstk.
+
+
+ // R11 will be used to contain the address of __chkstk.
+ // R11 is a volotiale register and assumed to be destoyed by the callee,
+ // so there is no need to save and restore it.
+ BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::R11)
+ .addExternalSymbol(StackProbeSymbol);
+ // Create a call to __chkstk function which address contained in R11.
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALL64r))
+ .addReg(X86::R11, RegState::Kill);
+ } else {
+
+ // For non-large code model we can do direct call to __chkstk.
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::W64ALLOCA))
+ .addExternalSymbol(StackProbeSymbol);
+ }
} else {
// Allocate NumBytes-4 bytes on stack in case of isEAXAlive.
// We'll also use 4 already allocated bytes for EAX.
BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
.addImm(isEAXAlive ? NumBytes - 4 : NumBytes)
.setMIFlag(MachineInstr::FrameSetup);
+
+ MIB = BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32))
+ .addExternalSymbol(StackProbeSymbol);
}
- BuildMI(MBB, MBBI, DL,
- TII.get(Is64Bit ? X86::W64ALLOCA : X86::CALLpcrel32))
- .addExternalSymbol(StackProbeSymbol)
- .addReg(StackPtr, RegState::Define | RegState::Implicit)
+
+ MIB.addReg(StackPtr, RegState::Define | RegState::Implicit)
.addReg(X86::EFLAGS, RegState::Define | RegState::Implicit)
.setMIFlag(MachineInstr::FrameSetup);

View File

@@ -0,0 +1,7 @@
@title MinGW-w64 32-bit GCC build environment
@echo Setting up environment for MinGW-w64 GCC 32-bit...
@set PATH=%CD%\bin;%CD%\msys\1.0\bin;%cd%\..\..\perl32\site\bin;%cd%\..\..\perl32\bin;%cd%\..\..\c\bin;%PATH%

View File

@@ -0,0 +1,7 @@
@title MinGW-w64 64-bit GCC build environment
@echo Setting up environment for MinGW-w64 GCC 64-bit...
@set PATH=%CD%\bin;%CD%\msys\1.0\bin;%cd%\..\..\perl\site\bin;%cd%\..\..\perl\bin;%cd%\..\..\c\bin;%PATH%

View File

@@ -0,0 +1,23 @@
diff -Naur numpy-1.11.1/numpy/distutils/ccompiler.py numpy-1.11.1/numpy/distutils/ccompiler.py
--- numpy-1.11.1/numpy/distutils/ccompiler.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/ccompiler.py 2016-08-04 12:33:43 -0600
@@ -29,6 +29,7 @@
# Using customized CCompiler.spawn.
def CCompiler_spawn(self, cmd, display=None):
+ cmd = quote_args(cmd)
"""
Execute a command in a sub-process.
diff -Naur numpy-1.11.1/numpy/distutils/misc_util.py numpy-1.11.1/numpy/distutils/misc_util.py
--- numpy-1.11.1/numpy/distutils/misc_util.py 2016-06-25 08:38:34 -0600
+++ numpy-1.11.1/numpy/distutils/misc_util.py 2016-08-04 12:34:56 -0600
@@ -116,7 +116,7 @@
args = list(args)
for i in range(len(args)):
a = args[i]
- if ' ' in a and a[0] not in '"\'':
+ if ' ' in a and a[0] not in '"\'' and a[len(a)-1] not in '"\'':
args[i] = '"%s"' % (a)
return args

View File

@@ -0,0 +1,13 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

View File

@@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fc9be5..5112ce6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,11 +254,11 @@
endif()
#adding PCRE
-find_package(PCRE)
+#find_package(PCRE)
if (PCRE_FOUND)
message(STATUS "SUCCESSFUL: PCRE found")
else () # if pcre not found building its local copy from ./Externals
- if (WIN32 OR APPLE)
+ if (1)
message("WARNING: Native PCRE not found, taking PCRE from ./Externals")
add_definitions(-DPCRE_STATIC)
add_subdirectory(${EXTERNAL_LIBRARIES}/pcre)
diff --git a/DAEValidator/library/include/no_warning_begin.orig b/DAEValidator/library/include/no_warning_begin
index 3fc9be5..5112ce6 100644
--- a/DAEValidator/library/include/no_warning_begin.orig 2017-05-31 16:56:39 -0600
+++ b/DAEValidator/library/include/no_warning_begin 2017-06-07 10:18:45 -0600
@@ -2,6 +2,9 @@
#if defined(_WIN32)
# pragma warning(push)
# pragma warning(disable:4668)
+# if _MSC_VER >=1900
+# pragma warning(disable:5031)
+# endif
# if defined(_MSC_VER) && defined(_DEBUG)
# pragma warning(disable:4548)
# endif

View File

@@ -0,0 +1,21 @@
diff -ru ./CMakeLists.txt ./CMakeLists.txt
--- ./CMakeLists.txt 2014-09-11 21:08:18.000000000 +0200
+++ ./CMakeLists.txt 2016-05-15 17:17:01.000000000 +0200
@@ -186,7 +186,7 @@
PATCH_COMMAND patch -f -p1 < ${CMAKE_SOURCE_DIR}/ext/tinyxml_${TINYXML_VERSION}.patch
BINARY_DIR ext/build/tinyxml
INSTALL_DIR ext/dist
- CMAKE_ARGS ${TINYXML_CMAKE_ARGS}
+ CMAKE_ARGS ${TINYXML_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
if(WIN32)
set(TINYXML_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/tinyxml.lib)
@@ -254,7 +254,7 @@
BINARY_DIR ext/build/yaml-cpp
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/ext/yaml-cpp-${YAML_CPP_VERSION}.patch
INSTALL_DIR ext/dist
- CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS}
+ CMAKE_ARGS ${YAML_CPP_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG} -DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
set(YAML_CPP_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ext/dist/include)
set(YAML_CPP_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)

View File

@@ -0,0 +1,33 @@
--- IlmImf/CMakeLists.txt 2014-08-10 06:23:56.000000000 +0200
+++ IlmImf/CMakeLists.txt 2017-01-08 04:06:04.931723800 +0100
@@ -8,8 +8,8 @@
TARGET_LINK_LIBRARIES ( b44ExpLogTable
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -25,8 +25,8 @@
TARGET_LINK_LIBRARIES ( dwaLookups
Half
- Iex${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB}
)
@@ -138,9 +138,9 @@
TARGET_LINK_LIBRARIES ( IlmImf
Half
- Iex${ILMBASE_LIBSUFFIX}
Imath${ILMBASE_LIBSUFFIX}
IlmThread${ILMBASE_LIBSUFFIX}
+ Iex${ILMBASE_LIBSUFFIX}
${PTHREAD_LIB} ${ZLIB_LIBRARIES}
)

Some files were not shown because too many files have changed in this diff Show More