1
1

Compare commits

..

1566 Commits

Author SHA1 Message Date
889c4ca9c2 Merge branch 'asset-uuid--archived' into asset-engine--archived 2020-07-01 17:25:04 +02:00
0829cebeb0 Merge branch 'master' into asset-uuid--archived 2020-07-01 17:13:57 +02:00
87df151902 Merge branch 'asset-uuid' into asset-engine 2020-06-16 11:31:58 +02:00
cfde6ebf45 Merge branch 'master' into asset-uuid 2020-06-16 11:31:33 +02:00
d73920831d Merge branch 'asset-uuid' into asset-engine 2020-06-13 22:54:26 +02:00
5e50380ddc Merge branch 'master' into asset-uuid 2020-06-13 22:54:07 +02:00
9dffdfc84b Fixes for changes in master after last merge 2020-06-11 15:50:11 +02:00
26428a3e00 Merge branch 'asset-uuid' into asset-engine 2020-06-11 15:49:47 +02:00
15e6f9012c Merge branch 'master' into asset-uuid 2020-06-11 11:55:40 +02:00
0b6def7059 Fixes for changes in master 2020-06-11 11:54:45 +02:00
a8b24ca61b Merge branch 'master' into asset-uuid 2020-06-11 10:13:12 +02:00
4ae30b9f63 Merge branch 'asset-uuid' into asset-engine 2019-11-26 18:18:12 +01:00
15a97791c8 Remove the Amber asset engine code, this has nothing to do in that patch. 2019-11-26 18:15:21 +01:00
4da29610d6 Fix after recent merge... 2019-11-26 18:13:59 +01:00
9fd98f9570 Merge branch 'asset-uuid' into asset-engine
Conflicts:
	source/blender/makesrna/intern/rna_asset.c
2019-11-26 18:06:12 +01:00
f3ae50c765 Rename some variables in AssetUUID struct. 2019-11-26 17:59:51 +01:00
c263dbe996 Merge branch 'asset-uuid' into asset-engine 2019-11-26 17:46:25 +01:00
cdacfc2f47 Some more minor fixes/cleanups. 2019-11-26 17:45:55 +01:00
ab324e8ea3 Merge branch 'asset-uuid' into asset-engine
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/writefile.c
2019-11-26 17:37:24 +01:00
67ee496c1b Updates from code review.
Mostly various cleanups, and a few important fixes too (some potential
memleaks, missing writing of UUID struct for ID placeholders of linked
data-block in writefile.c).
2019-11-26 17:34:11 +01:00
9945fab5d5 Merge branch 'asset-uuid' into asset-engine 2019-11-26 15:50:17 +01:00
2563953366 Merge branch 'master' into asset-uuid 2019-11-26 15:49:49 +01:00
e7ac5954c9 Merge branch 'asset-uuid' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_asset_engine.h
	source/blender/blenkernel/intern/asset_engine.c
	source/blender/blenloader/BLO_readfile.h
	source/blender/makesdna/DNA_ID.h
	source/blender/makesdna/DNA_space_types.h
	source/blender/makesrna/RNA_access.h
	source/blender/makesrna/intern/rna_ID.c
	source/blender/makesrna/intern/rna_asset.c
2019-11-25 18:11:05 +01:00
a05cc483f1 Merge branch 'master' into asset-engine 2019-11-25 17:55:20 +01:00
bc13ceba27 Merge branch 'master' into asset-uuid 2019-11-25 17:54:58 +01:00
0eda3bae64 Add 'asset uuid' to IDs.
This commit is a subset of the asset-engine branch, only adding the uuid
struct to data-blocks, with a basic minimal RNA/Python API to use it.

it does not contain anything regarding asset engines and asset
management itself.

Besides being a first step towards full integration of asset engine work
into master, it is also the 'minimal requirement' from the studio here
for next Cosmos production pipeline (regarding own in-house management
tools).
2019-11-25 17:42:01 +01:00
eb62837c32 Merge branch 'master' into asset-engine 2019-11-25 16:07:13 +01:00
870bc1aa66 Merge branch 'master' into asset-engine 2019-11-18 12:37:19 +01:00
b14b335a41 Merge branch 'master' into asset-engine 2019-11-07 16:25:24 +01:00
249646f19d AssetUUID: add basic default init value for asset part of it to rna creator.
Reauest from Cosmos pipeline R&D team.
2019-11-06 17:08:17 +01:00
ffb581e7f4 AssetUUID: add basic search for Asset UUIDs in current .blend file.
Needed for Cosmos pipeline R&D.
2019-11-06 16:52:27 +01:00
c258ff967d Initial basic support for assets definition in .blend file itself, and RNA api access.
This still *very* basic, but should be usable as proof of concept for
Cosmos pipeline tests...

Note that the question of where to put all asset metadata remains open,
we could extend AssetUUID struct, and/or add support of IDProps to it,
or just use some special-named IDProp in IDs themselves (like the
_RNA_UI thing for custo; props UI settings...).
2019-11-05 14:37:43 +01:00
836883f1d2 Merge branch 'master' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/editors/space_file/file_ops.c
2019-11-05 14:35:04 +01:00
52151821c0 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/editors/space_file/file_ops.c
2019-10-14 21:14:03 +02:00
bf72a5ba90 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/editors/space_file/filesel.c
2019-10-10 11:02:13 +02:00
cbbe76a564 Merge branch 'master' into asset-engine 2019-09-30 11:34:29 +02:00
54b60eb1b0 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_files_link.c
2019-09-19 20:51:09 +02:00
a644b3aba7 Merge branch 'master' into asset-engine
Note: reworking filebrowser UI is still TODO.

Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/blenloader/intern/versioning_280.c
	source/blender/editors/include/ED_fileselect.h
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_view3d/space_view3d.c
2019-09-12 15:45:01 +02:00
93e1e3e532 Merge branch 'master' into asset-engine 2019-09-05 09:46:32 +02:00
b5e502982a Merge branch 'master' into asset-engine 2019-09-05 09:24:54 +02:00
f7eec7e19f Merge branch 'master' into asset-engine
Partial merge only, UI in filebrowser has been heavily changed and need
more work...

Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/blenloader/intern/versioning_280.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/intern/wm_operator_props.c
2019-09-04 22:57:38 +02:00
6ccb1999fd Merge branch 'master' into asset-engine 2019-09-02 11:25:00 +02:00
25caef24a8 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenloader/intern/versioning_280.c
	source/blender/makesdna/DNA_ID.h
2019-08-30 09:55:59 +02:00
9a6aef2694 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-08-23 10:42:24 +02:00
f398eb0668 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2019-08-19 19:14:10 +02:00
95b12e4fb9 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/windowmanager/intern/wm_files.c
2019-08-06 12:42:58 +02:00
ec822defc6 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
2019-07-28 14:58:37 +02:00
faf47d75ae Merge branch 'master' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/makesrna/intern/rna_space.c
	source/blender/windowmanager/WM_api.h
2019-07-14 20:58:20 +02:00
38ea78d664 AssetEngines: fix memleaks in append case... 2019-05-23 21:34:43 +02:00
7553424511 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/editors/space_file/space_file.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/intern/wm_init_exit.c
2019-05-23 21:12:09 +02:00
9c43fc8e84 Merge 'master' into 'asset-engine' 2019-04-17 12:30:44 +02:00
42a2d2bdee Merge 'master' into 'asset-engine' 2019-04-17 12:30:44 +02:00
02780596b4 Merge 'master' into 'asset-engine' 2019-04-17 12:30:42 +02:00
b5cb4021fa Merge 'master' into 'asset-engine' 2019-04-17 12:30:40 +02:00
b1a15bc54e Merge 'master' into 'asset-engine' 2019-04-17 12:30:39 +02:00
a4cac7b066 Merge branch 'master' into asset-engine 2019-04-16 14:47:49 +02:00
3ff7a5991a Merge branch 'master' into asset-engine
Conflicts:
    source/blender/windowmanager/intern/wm_operator_props.c
2019-04-16 12:10:48 +02:00
e782910b18 Merge branch 'master' into asset-engine
Kinda painful merge thanks to extensive changes to things like Main
listbases names, linking code, etc.

Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/intern/wm_files_link.c
2019-03-18 20:28:49 +01:00
edce196beb Merge branch 'master' into asset-engine 2019-02-19 10:33:03 +01:00
b0b7c2482f Merge branch 'master' into asset-engine 2019-02-09 20:08:35 +01:00
6b0dd041e1 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_global.h
	source/blender/python/intern/bpy_app.c
2019-02-04 11:30:02 +01:00
43985368a1 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenloader/BLO_readfile.h
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/intern/wm_files_link.c
2019-01-30 23:04:39 +01:00
2ed89aab44 Merge branch 'master' into asset-engine 2019-01-14 14:35:42 +01:00
a57e03a17a Update Amber & generic Asset Engine code for changes in 2.8.
Many noisy changes in past 6 months... ;)
2019-01-09 17:13:36 +01:00
be2da10260 Merge branch 'master' into asset-engine 2019-01-09 17:09:18 +01:00
080deff077 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_ID.h
	source/blender/makesdna/DNA_space_types.h
2019-01-09 13:46:58 +01:00
93712fed2c Merge branch 'master' into asset-engine
Rather painful, too much cleanup/renamings in between...

Note that this is not currently functionnal, builds but does not show
AEs in filebrowser selector for some reason. No time to track that now.

Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/space_script/script_edit.c
	source/blender/editors/space_script/script_intern.h
	source/blender/editors/space_script/script_ops.c
	source/blender/makesrna/intern/rna_internal.h
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_files_link.c
2019-01-06 17:27:42 +01:00
5f61756f46 Merge branch 'blender2.8' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_280.c
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/editors/include/UI_interface.h
	source/blender/editors/space_view3d/space_view3d.c
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_dragdrop.c
	source/blender/windowmanager/intern/wm_files_link.c
2018-09-10 19:12:10 +02:00
b838d869c6 Merge branch 'blender2.8' into asset-engine 2018-07-01 16:53:32 +02:00
ce490e9846 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenloader/intern/versioning_280.c
	source/blender/blenloader/intern/versioning_defaults.c
	source/blender/windowmanager/WM_api.h
2018-07-01 16:49:59 +02:00
16b540f39e Fix broken Amber after Group -> Collection change. 2018-06-18 13:03:08 +02:00
e1380ed958 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_intern.h
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_view3d/space_view3d.c
	source/blender/makesrna/intern/rna_ID.c
	source/blender/makesrna/intern/rna_space.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/intern/wm_init_exit.c
2018-06-18 12:59:27 +02:00
8211eaa6dc Merge branch 'blender2.8' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_info.py
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/versioning_280.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesrna/intern/rna_space.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-05-29 11:15:02 +02:00
eeec0e3ae6 Merge branch 'blender2.8' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2018-04-13 12:25:55 +02:00
77c164439f Typo 2018-04-13 11:58:31 +02:00
b54f31c84c Merge branch 'blender2.8' into asset-engine 2018-04-11 15:24:18 +02:00
2fa019fa65 Fix again 'auto override' system.
Got lost in big undo refactor.

Note that this is probably (maybe) not how we want to have it in the
end, things like EditMode undo should probably not trigger this check?
2018-04-11 15:16:10 +02:00
4aa300ef91 Merge branch 'blender2.8' into asset-engine 2018-04-11 15:09:02 +02:00
966fef9d34 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/makesrna/intern/rna_ID.c
2018-04-10 18:24:09 +02:00
7824b6e506 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_init_exit.c
2018-04-03 17:53:20 +02:00
fd75f7d3e0 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/makesrna/intern/rna_ID.c
2018-03-29 14:27:03 +02:00
571c1ff720 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/WM_types.h
2018-03-19 16:35:17 +01:00
7bd39f4584 Merge branch 'blender2.8' into asset-engine 2018-02-13 09:50:04 +01:00
0daf29b8ea Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/blender.c
2018-02-12 12:55:06 +01:00
10733b356d Add last missing piece of asset engine API, load_post callback.
This allows asset engine to perform whatever they need on data-blocks
(either linked or appended ones), once they have been added to Blender
data (Main).

This is an optional callback intended for advanced/complex asset
management (and possibly also for generative procesing), basic asset
engines should typically not need it.

Amber uses it just to do some dummy testing prints right now.
2018-02-12 12:42:33 +01:00
6169388d0d Merge branch 'blender2.8' into asset-engine 2018-02-09 17:24:44 +01:00
d771d11bf0 Merge branch 'blender2.8' into asset-engine 2018-02-09 16:26:32 +01:00
d4effd9e7b Merge branch 'blender2.8' into asset-engine 2018-02-09 14:43:01 +01:00
baa5f2fca1 Fixes for last merge. 2018-02-07 22:40:11 +01:00
f9dc415114 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2018-02-07 22:30:05 +01:00
33adb5e41b Merge branch 'blender2.8' into asset-engine 2018-02-07 11:57:12 +01:00
55755fa3f7 Merge branch 'blender2.8' into asset-engine 2018-02-07 10:26:44 +01:00
9c9bc6e131 Cleanup/internal renaming. 2018-02-07 10:26:35 +01:00
6cfd91f59e Cleanup: remove asyncio version of Amber, and Claude, from branch for now.
They make review patch even more confusing, and are useless/broken
currently anyway. Claude will be redone later.
2018-02-07 10:26:21 +01:00
70bcbc5569 Merge branch 'blender2.8' into asset-engine 2018-02-02 10:48:02 +01:00
eb6b5b74a8 Merge branch 'blender2.8' into asset-engine 2018-02-01 16:42:42 +01:00
3176da61cb Merge branch 'blender2.8' into asset-engine 2018-01-29 12:58:16 +01:00
e04d94cdab Merge branch 'blender2.8' into asset-engine 2018-01-29 10:28:01 +01:00
2491a8e416 Merge branch 'blender2.8' into asset-engine 2018-01-28 17:50:38 +01:00
8f8f5a6588 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/makesdna/DNA_ID.h
2018-01-21 17:37:33 +01:00
288e30ead0 Merge branch 'blender2.8' into asset-engine 2018-01-11 13:27:36 +11:00
1ceff9329c Fix generating dummy pixel data
Range was for an unsigned int instead of an int,
caused overflow error
2018-01-11 12:40:52 +11:00
bf1a34d000 Amber: Fix several issues with edit code when there was no repo present yet.
Reported by Campbell on IRC, thanks.
2018-01-09 11:02:12 +01:00
ec1e3ba904 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_280.c
	source/blender/makesdna/DNA_ID.h
2018-01-09 10:04:02 +01:00
255764cb8b Merge branch 'blender2.8' into asset-engine 2017-12-14 20:26:55 +01:00
61c33428bd Merge branch 'blender2.8' into asset-engine 2017-12-08 10:37:38 +01:00
25f3fe52cd Correct comments. 2017-12-08 10:36:54 +01:00
90adddceb3 Merge branch 'blender2.8' into asset-engine 2017-12-05 22:39:37 +01:00
4f1926fba8 Assets/lib drag'n'drop: append by default, link when shift is held. 2017-12-05 20:45:18 +01:00
21c9ec813d Make Amber a real add-on.
Well, real add-on... since we want to keep it in main repo for now, it
still needs some hacks to 'behave' like a regular add-on. :/

Anyway, it's now removed from startup files, and will live in modules
until we go to master itself.

Also, make it enabled by default in factory startup.
2017-12-05 15:27:08 +01:00
b58165970d Merge branch 'blender2.8' into asset-engine 2017-12-05 12:00:08 +01:00
c87440c91b Fix linking from temp filebrowser.
We should only set mouse coordinates when we are actually invoked to
link something, not when we are invoked to show filebrowser.

Else (filebrowser invoke case) we have a mouse coordinates sticking
around, which we try to use later in wrong context.

For some reasons, in master that was not an issue, but in 2.8
ED_view3d_give_base_under_cursor() will crash when context is wrong. :/
2017-12-04 15:45:55 +01:00
2188483456 Merge branch 'blender2.8' into asset-engine
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_files_link.c
2017-12-04 14:38:47 +01:00
b870590009 Various cleanup and minor fixes. 2017-12-01 14:20:11 +01:00
8f6c42a79f Merge branch 'blender2.8' into asset-engine 2017-12-01 12:26:18 +01:00
a571bee4af Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
	source/blender/windowmanager/intern/wm_files_link.c
2017-11-29 19:55:47 +01:00
172aa404d8 Merge branch 'blender2.8' into id_override_static 2017-11-29 17:45:14 +01:00
62d5a0353d Merge branch 'blender2.8' into id_override_static 2017-11-29 17:23:12 +01:00
e7a364ba8f ID static override: add basic support for overriding animation.
This is very bold right now - you simply can replace (or add) an action
to an override data-block. Actions themselves are not 'customizable'
through override at all currently (we may at least add
'add/remove/replace fcurves' feature in future), and nothing else in
animdata is overridable currently.
2017-11-29 17:20:00 +01:00
0b963b784a Make basic object & bones transformations overridable.
You can now override loc/rot/scale of objects and posebones.

Also added a basic operator to make an override of active linked object,
but this is very limited/wip/testing feature (you have to manually override
object and its armature, and relink to proper local overrides
yourself...). Final 'make proxy killer' will be much more automated of
course.
2017-11-29 17:14:27 +01:00
8a4155eb34 ID static override: Make most Image properties overridable.
First real 'usable' commit, will be needed by the 'virtual data-block'
asset feature (i.e. to be able to link a mere image file as if it was a
linked datablock, and generate automatically an override of it to make
it editable).
2017-11-29 17:10:24 +01:00
322433f18f ID static override: automatically detect new overrides as part of undo step.
We could do that in several different way, e.g. adding some tag during
DEG evaluation, etc. But this is not a critical process (it's main
purpose is user feedback), so current solution seems to work well enough
- and it's dead simple! ;)
2017-11-29 17:06:28 +01:00
e79d9048f3 ID Static Override: add basic generic UI tools to control override of properties. 2017-11-29 17:03:52 +01:00
fc6a116f83 ID Static Override: add basic UI feedback.
For now, using a new color for overridden properties (similar to
animated/driven status), UI team will need to work on a better solution
maybe...
2017-11-29 15:47:37 +01:00
00a6ce878d ID Static Override, part II: RNA changes.
This is essentially a huge refactor/extension of our existing RNA
compare & copy code, since static override needs more advanced handling here.

Note that not all new features are implemented yet, advanced things like
collections insertion/deletion are still TODO (medium priority).

This completes the ground work for overrides, remaining commits will be
about UI and some basic/testing activation of overrides for a limited
set of data-blocks & properties.

For details see https://developer.blender.org/D2417
2017-11-29 15:31:31 +01:00
adc165e651 Define RNA_STACK_ARRAY (usable everywhere in RNA), and make PYRNA_STACK_ARRAY use it. 2017-11-29 15:16:12 +01:00
0b6ff084a9 Merge branch 'blender2.8' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library_override.c
2017-11-29 15:09:22 +01:00
850a193f64 Merge ID static override, part I: core changes in DNA, BKE and .blend read/write.
See https://developer.blender.org/D2417 for details.

Note that since static overrides rely heavily on RNA, this commit is
essentially invisible from user PoV, more in next commits.
2017-11-29 15:05:03 +01:00
79324d3ca8 Merge branch 'blender2.8' into id_override_static 2017-11-29 13:19:25 +01:00
65fab5b17f Preparing merge of id_override_static: add BKE_id_swap().
This function swaps the memory content of two data-blocks (of same type
obviously), while preserving most of the ID 'header' itself.

It is intended to be used to quickly and easily replace the data of an
existing ID by another one, presumably a temporary 'working' one,
without having to suffer from things like name changes,
registering/removing from Main database, etc.
2017-11-29 13:14:59 +01:00
7051746a6b Merge branch 'blender2.8' into id_override_static 2017-11-29 12:45:41 +01:00
88ed3e37de Rename 'override' to 'override_static' (and similar).
Initially there was hope at least part of this work could be used for
dynamic overrides as well... but looks like not, so better be specific
and avoid any confusion.

PS: this commit break any file saved with static overrides, should not
be an issue though.
2017-11-29 12:40:18 +01:00
61a7f8b015 Address review points (mainly some missing usages of RNA_STACK_ARRAY). 2017-11-28 17:28:42 +01:00
dd4d5e42b0 Merge branch 'blender2.8' into id_override_static 2017-11-28 16:42:30 +01:00
140f7ac389 Cleanup: remove timer-like check for auto-ID-override generation. 2017-11-24 17:10:30 +01:00
5d0deaeb8b Merge branch 'blender2.8' into id_override_static 2017-11-24 17:07:21 +01:00
4f79d68c03 Remove override update from DEG, simply do it on undo push. 2017-11-24 16:57:58 +01:00
4a71ca6351 Merge branch 'blender2.8' into id_override_static 2017-11-24 11:55:44 +01:00
c9b4094808 Address points from initial review. 2017-11-23 23:33:29 +01:00
4ee4eed9e9 Merge branch 'blender2.8' into id_override_static 2017-11-23 22:18:46 +01:00
62aa672d63 Merge branch 'blender2.8' into id_override_static 2017-11-21 12:04:42 +01:00
b780c86a33 Hide override timing stuff behind some debug define. 2017-11-16 16:08:24 +01:00
f457eeacb1 Merge branch 'id_override_static' into asset-engine 2017-11-16 13:22:28 +01:00
3c905e49fd Merge branch 'blender2.8' into id_override_static 2017-11-16 13:05:42 +01:00
bc5381f154 Some cleanup/renaming, and move 'self remapping' into new id_swap function.
I can't think of any case where we would swap content of two IDs while
wanting to keep old 'self' ID pointers after the swap!
2017-11-16 12:29:25 +01:00
72346e6114 Rename destination and source parameters in override_apply.
local and reference are awfully confusing names here, since destination
is a copy of reference that will become local override once applied, and
source is .blend-file-written version of local override...
2017-11-16 10:24:03 +01:00
61ca31f28b Add custom override_apply func for animdata.
This makes creating animation in overridden ID working, at least in the
most basic case...
2017-11-16 10:10:33 +01:00
abd49fb871 Merge branch 'id_override_static' into asset-engine 2017-11-15 11:04:08 +01:00
4c8bcb3a8d Merge branch 'blender2.8' into id_override_static 2017-11-15 10:51:49 +01:00
058b6ea3e9 Merge branch 'id_override_static' into asset-engine 2017-11-14 22:36:02 +01:00
7e909a564f Heavy refactor of new RNA override/comparison code.
Main reason here is to make comparison/override_diff/override_store/override_apply
customizable per RNA property if needed.

This should allow us especially to get advanced behavior on case-by-case
basis, when dealing with Pointer and Collection properties mostly.

Note that IDProps remain fuzzy area for now, a big part of the code
tries to take them into account, but it's most likely still missing some
bits, and definitively not tested at all yet!
2017-11-14 22:31:55 +01:00
dfb541342b Some cleanup, fix auto-override handling in NULL pointer case.
Also, attempt to enable animation override, not yet working though think
we need some re-design of how override is handled per-property type...
2017-11-13 18:05:48 +01:00
f7a7c8d950 Merge branch 'blender2.8' into id_override_static 2017-11-13 17:44:45 +01:00
14132eded0 Merge branch 'id_override_static' into asset-engine 2017-11-10 17:22:14 +01:00
80904de485 Cleanup while attempting to fix auto-override detection in DEG.
Not sure why that piece of code stopped working, but now this operation
is pretty much never evaluated... Will have to either dig deeper in DEG
or ask Sergey about it, but not a crucial issue for now.
2017-11-10 17:16:29 +01:00
560097b499 Auto-override detection: ignore animated properties.
Animation is by definition another kind of (dynamic) override of properties,
which supersedes static override.

Note that this could be debated in some corner cases ('differential'
animation, like dloc/drot/dscale), but think we can ignore that for now,
and expect user to handle those manually when needed.
2017-11-10 17:16:09 +01:00
8f222a0ba0 Cleanup while attempting to fix auto-override detection in DEG.
Not sure why that piece of code stopped working, but now this operation
is pretty much never evaluated... Will have to either dig deeper in DEG
or ask Sergey about it, but not a crucial issue for now.
2017-11-10 17:12:11 +01:00
a08a2ec54f Auto-override detection: ignore animated properties.
Animation is by definition another kind of (dynamic) override of properties,
which supersedes static override.

Note that this could be debated in some corner cases ('differential'
animation, like dloc/drot/dscale), but think we can ignore that for now,
and expect user to handle those manually when needed.
2017-11-10 17:09:08 +01:00
4d8e034ab8 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_files_link.c
2017-11-10 10:45:20 +01:00
7a609a16eb Merge branch 'blender2.8' into id_override_static
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
2017-11-10 10:40:12 +01:00
f6f7127320 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
2017-11-07 15:47:43 +01:00
0a15b7da92 Merge branch 'blender2.8' into id_override_static 2017-11-07 15:40:48 +01:00
d5e9c1f4ab Merge blender2.8 branch.
This means that from now own, we work based on Blender2.8!

Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/space_file/filesel.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/space_view3d/space_view3d.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesdna/DNA_scene_types.h
	source/blender/makesdna/DNA_text_types.h
	source/blender/windowmanager/intern/wm_event_system.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2017-11-07 15:19:40 +01:00
731e848cff Merge blender2.8 branch.
Means that from now on, we work based on blender2.8, no more master!

Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/editors/interface/interface_ops.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesrna/intern/rna_ID.c
2017-11-07 15:17:59 +01:00
1e97e0a671 Merge branch 'id_override_static' into id_o2.8
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
	source/blender/editors/interface/interface_ops.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesrna/intern/rna_ID.c
2017-11-07 10:59:40 +01:00
5a1a6dfd1e Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/node.c
	source/blender/makesdna/DNA_ID.h
2017-11-06 20:26:37 +01:00
d60a1c3095 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/makesrna/intern/rna_access.c
2017-11-06 20:18:58 +01:00
420cc7c2b5 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/editors/interface/interface_regions.c
2017-11-06 17:01:25 +01:00
0dce80ad43 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/editors/interface/interface_handlers.c
2017-11-06 16:08:23 +01:00
116613ac4d Fix type of itemf RNA callback... 2017-10-31 17:33:35 +01:00
3403eea6f4 Merge branch 'id_override_static' into asset-engine 2017-10-31 17:25:46 +01:00
e47a2a8d75 Merge branch 'master' into id_override_static 2017-10-31 17:16:17 +01:00
c01cf979e0 Fix issues from recent UI API changes in master. 2017-10-31 17:07:24 +01:00
0dd184550f Merge branch 'master' into id_override_static 2017-10-31 16:58:56 +01:00
92a06831a8 Add drag'n'drop-linking of material onto object in 3DView.
Probably needs to be reorganized a bit better, but basically working.
2017-10-30 17:35:18 +01:00
15305950a5 Amber: fix some more stupid issues/mistakes. 2017-10-30 16:23:48 +01:00
0e256653b2 Amber: Add icon of data type to 'all data' assets add operator. 2017-10-30 14:28:29 +01:00
b4d8e949d8 Amber: Fix bad tag handling in case of empty set. 2017-10-30 14:23:11 +01:00
b1da5716fd Merge branch 'id_override_static' into asset-engine 2017-10-30 13:47:40 +01:00
dd2b82e90f Merge branch 'master' into id_override_static 2017-10-30 13:41:53 +01:00
b9f4a8d75f Add more 'generic' way to select datablock to add as asset.
Faaarrrrr from UI/UX nice thing, but working  for now...
2017-10-27 14:07:50 +02:00
8256007429 Merge branch 'id_override_static' into asset-engine 2017-10-27 12:21:47 +02:00
6016c7ab58 Merge branch 'master' into id_override_static 2017-10-27 12:10:24 +02:00
0f72a2916c Amber: some more dev (tags UIList ordering, some WIP on adding new assets...) 2017-10-26 15:23:59 +02:00
dce7e076da Amber: add new assets with relative path to repo, fix a bug in asset listing when path was aboslute. 2017-10-26 10:01:31 +02:00
7a68cd0298 Amber: Add initial real asset preview.
Design is a bit weak, ideally we'd rathe use directly .blend files
previews, but we need some RNA API work to handle that...
2017-10-26 09:07:17 +02:00
0f0b544c6e Fix a bug in filedraw, when we have only entries, with no variant etc. below. 2017-10-26 09:06:30 +02:00
e524370158 Add way to remove Amber repo, and initial step fro previews. 2017-10-23 17:54:58 +02:00
ff6e79091d Merge branch 'id_override_static' into asset-engine 2017-10-23 10:34:11 +02:00
59f0ca9adf Merge branch 'master' into id_override_static 2017-10-23 10:26:11 +02:00
2a71f1e29e Factorize repo editing 'write on disk' code, and add relevant update callbacks to repo's RNA properties.
Also made writing repo DB on disk slightly safer (using atomic file
swapping instead of directly writing into real repo DB file).
2017-10-20 16:15:05 +02:00
8b501b2a7d Fix mistakes (wrong copy/paste :/ ) in previous commit. 2017-10-20 15:35:31 +02:00
bac215bc67 Amber assets: add more editing UI. 2017-10-20 15:26:19 +02:00
d1dbe241e1 Merge branch 'id_override_static' into asset-engine 2017-10-19 17:22:27 +02:00
7376ebf678 Merge branch 'master' into id_override_static 2017-10-19 15:02:27 +02:00
1ba198a375 Merge branch 'id_override_static' into asset-engine 2017-10-17 09:50:43 +02:00
f97ba5cd3a Merge branch 'master' into id_override_static 2017-10-17 09:39:51 +02:00
9fb243f96d Add one main 'Edit' toggle to Amber.
That way user shall not be allowed to change anything in Amber
repositories unless they goes into 'editing' Amber mode...
2017-10-15 20:32:54 +02:00
ad5a7dc2bd Merge branch 'id_override_static' into asset-engine 2017-10-14 15:30:33 +02:00
5f2707075f Merge branch 'master' into id_override_static 2017-10-14 15:24:41 +02:00
f7722b1ad3 Cleanup: rename uuid's related operator properties to match names used everywhere else. 2017-10-11 20:37:58 +02:00
b13024327a Fix several issues found while working on drag and drop linking.
Append/link exec code was not handling correctly asset cases in 'single
item' case.

Also, first drag'n'drop code was slitghly too much simple, losing uuid's
on the way, had to make things a bit more convoluted...
2017-10-11 20:28:50 +02:00
c6d11f8c13 Fix crash when opening a .blend file with an opened FileBrowser editor. 2017-10-11 10:08:54 +02:00
0b7dcb3252 Merge branch 'id_override_static' into asset-engine 2017-10-10 21:01:50 +02:00
b884046e2a Merge branch 'master' into id_override_static 2017-10-10 20:21:32 +02:00
504287b987 Add initial, very basic/proof-of-concept drag and drop linking.
Essentially works, will still need (as usual :P) lots of extension and
fixes and enhancements...
2017-10-09 20:12:45 +02:00
e40b8cb231 Merge branch 'id_override_static' into asset-engine 2017-10-08 16:34:10 +02:00
8b1759d11a Merge branch 'master' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
2017-10-08 16:33:44 +02:00
063ddf5958 Merge branch 'master' into id_override_static 2017-10-08 16:16:02 +02:00
9134d2c01f Merge branch 'id_override_static' into asset-engine 2017-10-06 12:03:04 +02:00
05bfb8b905 Merge branch 'master' into id_override_static 2017-10-06 11:49:12 +02:00
f49b7031f0 Merge branch 'id_override_static' into asset-engine 2017-10-04 22:03:28 +02:00
942353d8b0 Add needed option to handle or not override's reference pointer when remapping.
There are cases where we'll want to also override the reference pointer
(when we actually switch that datablock itself), but in some specific
situations, like when creating a new override, we need to keep org
pointer here!
2017-10-04 22:01:30 +02:00
ff6caedb47 Merge branch 'master' into id_override_static 2017-10-04 21:00:44 +02:00
8327eb99e0 Merge branch 'master' into id_override_static 2017-10-04 17:13:48 +02:00
9b0f0f7f1f Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/editors/sculpt_paint/paint_vertex.c
2017-10-03 12:40:34 +02:00
c1191102bc Merge branch 'master' into id_override_static 2017-10-03 12:33:06 +02:00
551ed636a6 Merge branch 'master' into id_override_static 2017-10-03 12:19:04 +02:00
7e38180fbe Add basic override generation for virtually linked assets.
Roughly working, most certainly oceans of worms are squirming
under the surface though...
2017-09-28 19:50:24 +02:00
cd33257798 Revert hack making linked virtual datablock editables.
Essentially, this reverts most ID_IS_LINKED_DATABLOCK() checks to
ID_IS_LINKED() one.

Idea of making virtual linked IDs editable was nice as a temp hack to do
quick experiment, but was never intended as final solution, correct way
to do that is to use static override, will be implemented soon.

Note that virtual library/virtually linked ID concept remains, it's
mandatory to handle mere files as assets (and potentially other, more
advanced cases in the future).
2017-09-28 16:37:49 +02:00
05daa1f1a1 Re-enable Amber asset engine. 2017-09-25 22:01:18 +02:00
17cf9445ca Update Amber to take into account new View level.
Also get rid of hack mixing repo and asset uuid into same UUID, now we
do have a real repo UUID in API.

Everything seems to be be back on par with pre-View changes status.
2017-09-25 21:59:50 +02:00
e29ff1adb5 Fix various mistakes and forgotten bits in previous 'Views' adding commit.
Core API code shall now be mostly functional again.
2017-09-25 21:42:25 +02:00
ef056018c0 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_scene_types.h
2017-09-25 12:59:48 +02:00
4b2d0faedd Merge branch 'master' into id_override_static 2017-09-25 10:02:45 +02:00
114d200df8 Asset API: add Views.
This commit add new 'View' forth layer, below history one (Revision).

It also adds a real UUID for the asset repository (as usual, asset
engines not needing it can just set it to zeros), will make Amber's life
(and all multi-repositories engines) easier.

Also fix one or two issues found on the road.

Code builds and links datablocks from libraries in the 'old way'. Real
test will come when re-enabling Amber and adapting it to new API though.
2017-09-21 18:01:19 +02:00
fb5425abba Disable for now asset engines (in preparation of core code changes). 2017-09-21 18:00:55 +02:00
b13b7f53f4 Merge branch 'id_override_static' into asset-engine 2017-09-21 12:29:21 +02:00
913991262b Merge branch 'master' into asset-engine 2017-09-21 12:29:13 +02:00
dd5d8b050b Merge branch 'master' into id_override_static 2017-09-21 12:11:57 +02:00
637206e5c5 Add basic addition support to create new assets.
Again, very basic and limited, to be fleshed out later.
2017-09-13 10:52:54 +02:00
7454f83cca Working basic repository list.
Also, fixed uuids generation.

And finalized/added to UI operator to add a new, empty Amber repo in
current directory.
2017-09-11 16:20:37 +02:00
a25930449e Merge branch 'id_override_static' into asset-engine 2017-09-11 13:06:08 +02:00
058a0cbc91 Merge branch 'master' into asset-engine 2017-09-11 13:05:57 +02:00
d83bdbac2d Merge branch 'master' into id_override_static 2017-09-11 12:55:05 +02:00
f44ffa5035 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2017-09-08 15:06:36 +02:00
9e394424c1 Merge branch 'master' into id_override_static 2017-09-08 14:19:16 +02:00
61bb923c4f Add basic handling of 'bookmarks' of Amber repositories.
Still some glitches to fix (and missing features), but mostly working on
basic level.
2017-09-05 17:38:08 +02:00
8ab97aa2ff Fix two bugs with Amber engine:
* Reported number of assets was -1 in list_dir callback, incorrect and
would loop endlessly in case of empty repo!

* Conversion from main asset classes to their propertygroup
representations was not clearing extra entries in proplists.
2017-09-05 11:08:16 +02:00
f7544fbff4 Merge branch 'id_override_static' into asset-engine 2017-09-05 10:14:03 +02:00
ca68eeab6c Merge branch 'master' into id_override_static 2017-09-05 10:07:07 +02:00
bc9fe321a1 Moar WIP work towards editing Amber repo.
Adding skeleton for adding Amber repos, adding new assets... Not
finished yet, by far.
2017-08-24 20:55:45 +02:00
a88e406d3f Merge branch 'id_override_static' into asset-engine 2017-08-23 16:51:10 +02:00
c493ab5ed8 Merge branch 'master' into id_override_static 2017-08-23 16:43:47 +02:00
09f6f1ad6c Make Amber engine actually refresh repo listing when one hit refresh button in filebrowser, and do refresh after deleting an asset from repo. 2017-08-21 19:56:07 +02:00
7e905b0cf6 All blendlib (ID types) filters ON by default for operator-less filebrowser. 2017-08-21 19:33:01 +02:00
3d755243a2 Add first edit operation on Amber repository - we can now remove an asset, houra :P
Also fixed more various issues.
2017-08-21 17:37:12 +02:00
26b829c936 First basic (useless) step towards UI for editing Amber repository. 2017-08-21 16:41:38 +02:00
ed7ce9251d Fix tag filtering, move repo reading to AmberDataRepository class, cleanup some uuid utils. 2017-08-21 16:28:23 +02:00
b2ff136f9d Fix various misc points, including Assets reloading, in Amber asset engine. 2017-08-21 15:31:20 +02:00
c2e8855777 Merge branch 'id_override_static' into asset-engine 2017-08-21 14:47:45 +02:00
f6f5474deb Merge branch 'master' into id_override_static 2017-08-21 14:41:22 +02:00
0fa9f796bb Heavily rework Amber's data model.
Since we want to be able to edit repo from within Blender, we'll need
UI-compatible representation of the repo.

Alas, PropertyGroup py instances are regenerated all the time, which
means we cannot store py-only data in those, so we have to go to a
triple representation of repo here (the JSON/dict one, the effective py
classes, and the UI-compatible PropertyGroup-based one).

Note that this is rather heavily WIP commit, it most certainly breaks
several things, but at least the basic repo listing from filebrowser is
working again...
2017-08-19 18:23:46 +02:00
5bfab333fd Add some more protection against invalid data from asset engine. 2017-08-19 18:21:01 +02:00
6b2f125d02 Celanup debug print from previous commit. 2017-08-16 12:11:44 +02:00
b266e14bff Make 'non-operator' filebrowser 'library browsing' one.
Will allow to use it to brwose & edit repositories of asset engines.
2017-08-16 12:09:36 +02:00
d96308252e Merge branch 'id_override_static' into asset-engine 2017-08-16 11:59:19 +02:00
1ec38f8ac9 Merge branch 'master' into id_override_static 2017-08-16 11:51:01 +02:00
e3d1361c75 Merge branch 'id_override_static' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
	source/blender/makesrna/intern/rna_ID.c
2017-08-10 17:08:39 +02:00
3f9bea4f0f Merge branch 'master' into id_override_static 2017-08-10 16:07:23 +02:00
1126b83c9b Merge branch 'id_copy_refactor' into id_override_static 2017-08-10 15:46:40 +02:00
496b510438 Merge branch 'master' into id_copy_refactor
Conflicts:
	source/blender/blenkernel/BKE_sequencer.h
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/sequencer.c
	source/blender/editors/space_sequencer/sequencer_edit.c
2017-08-10 15:43:52 +02:00
c116bb0c7f Merge branch 'master' into id_copy_refactor 2017-08-07 16:06:39 +02:00
881ee4fb26 Merge branch 'master' into id_copy_refactor 2017-08-07 12:52:25 +02:00
4263484bd4 Split Amber into pieces! 2017-07-20 15:47:03 +02:00
fe2d096816 Merge branch 'master' into asset-engine 2017-07-20 12:59:16 +02:00
7db3994c4b Merge branch 'id_copy_refactor' into id_override_static 2017-07-20 12:50:49 +02:00
b54335b273 Merge branch 'master' into id_copy_refactor 2017-07-20 12:31:35 +02:00
a8a3674bad Merge branch 'master' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.h
2017-07-18 16:40:20 +02:00
2579acf652 Move Amber into own folder. 2017-07-18 15:13:40 +02:00
2a1df41ae7 Fix typo within Claude engine.
Not working though, something about handshake failing when trying to
update credentials...
2017-07-18 14:17:55 +02:00
880579b670 Merge branch 'master' into asset-engine 2017-07-18 12:21:55 +02:00
c6bda91482 Add more BKE generic way to create an override, make Image mostly overridable, fix a bug in RNA. 2017-07-18 12:08:09 +02:00
238187e640 Merge branch 'id_copy_refactor' into id_override_static 2017-07-18 11:08:30 +02:00
2f2b3149ee Merge branch 'master' into id_copy_refactor 2017-07-18 11:08:03 +02:00
52c4d51fca Merge branch 'master' into id_override_static 2017-07-18 11:07:50 +02:00
24b1371b36 Merge branch 'id_copy_refactor' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenloader/intern/writefile.c
2017-07-17 15:21:57 +02:00
a8e4aae091 Extend a bit 'NO_MAIN'/'NO_USER_REFCOUNT'/etc. flags to ID allocation itself.
No real reason we keep this only to copying, creating ID outside of
database is handy as well!

Also, add helpers to add/remove an ID from Main, and to set/clear its
'user refcounting' status. Those will be useful in future complex ID
manipulation cases (like static override...).
2017-07-17 15:16:41 +02:00
a70e941fd0 Some cosmetic renaming. 2017-07-17 14:00:06 +02:00
2a992c2464 Merge branch 'master' into id_copy_refactor 2017-07-17 13:50:53 +02:00
0c30245b01 Merge branch 'master' into id_override_static 2017-07-17 13:24:59 +02:00
a721ee8835 Merge branch 'id_copy_refactor' into id_override_static
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenloader/intern/writefile.c
2017-07-17 12:35:10 +02:00
377ab54dad Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenkernel/BKE_library.h
2017-07-17 12:17:21 +02:00
f9904b05cc Merge branch 'master' into id_copy_refactor 2017-07-17 11:48:50 +02:00
5019fc1c8d Merge branch 'master' into id_copy_refactor 2017-07-11 15:57:40 +02:00
2f812e1d7b Fix stupid mistake in new LineStyle copying code. 2017-07-11 15:56:43 +02:00
e75db0e61b Fix several crashes and other issues in new ID copying code.
Mostly in core and animdata area. Code should now also be more robust,
and slightly simpler & cleaner.
2017-07-11 14:16:48 +02:00
524e03cae1 Huuuuge refactor of Scene copying, added to generic library ID copying.
Note: there are several known issues with this commit (and most likely
more unknown ones), to be fixed in next ones.
2017-07-11 10:31:04 +02:00
d3abcf3318 Merge branch 'master' into id_copy_refactor 2017-07-10 21:30:31 +02:00
0dc428410a Merge branch 'master' into id_copy_refactor 2017-07-10 15:23:44 +02:00
0698e892c7 Add VFont copying.
Not much happy, have to include BKE_curve in BLI_freetypefont to copy
nurbs... Not sure why fonts are in BLI tbh. We are already replicating
quite a bit of nurbs logic there. :(
2017-07-10 13:57:05 +02:00
a7bf34cc0b Add Sound copying callback. 2017-07-10 12:59:11 +02:00
0b009edbde Move Palette, PaintCurve and CacheFIle to new ID copying system. 2017-07-10 09:56:52 +02:00
8bcf950c28 Move Mask and FreestyleLineStyle to new ID copying code. 2017-07-09 22:44:21 +02:00
6637530b81 Move Text, Brush and GPencil datablocks to new copying code. 2017-07-09 22:14:00 +02:00
dcfbe9a6f0 Move Action to new copying code. 2017-07-09 21:41:24 +02:00
f5f013d231 Merge branch 'master' into id_copy_refactor 2017-07-09 21:21:48 +02:00
caae973b8a Move Group and ParticleSettings to new copying system.
Also fix several mistakes from previous commits.
2017-07-08 17:09:52 +02:00
5a1cae541a Move World and MovieClip to new copying system. 2017-07-08 12:46:33 +02:00
fe46bb8b0e Rename new BKE_<foo>_copy_ex to BKE_<foo>_copy_data.
Those are not actually copying the ID, only its internal subdata (and
other ID-specific handling). Generic processing common to all ID copying
is done by `BKE_id_copy_ex()`!
2017-07-08 12:20:54 +02:00
17ceb807dd Move Material, Texture and Image datablocks to new copying code.
Note that this is also bringing back Image copying code into 'regular'
process, instead of doing its own dirty cooking.
2017-07-08 12:14:31 +02:00
fc6619a9ff Merge branch 'master' into id_copy_refactor 2017-07-07 12:35:35 +02:00
022ad8f769 Change a bit ideas behind new copying code, now ID-specific copying never handles usercount.
Makes things much simpler, and more consistent.

Also fix issue with new copying and bloody nodetrees, using same hack as
in original ntree copying code to detect 'root' ntrees that shall never
be put into bmain :(((((((
2017-07-06 15:46:14 +02:00
8af813fee9 Merge branch 'master' into id_copy_refactor 2017-07-06 12:26:34 +02:00
af46458c62 Merge branch 'master' into id_copy_refactor 2017-06-26 11:01:21 +02:00
b7145a2662 Initial work on new copying for nodetrees.
Note that those are an nightmare to handle correctly, current code is
like a plate of noodle, so... most likeley not fully working, think I'll
have to nuke localize code as well :(
2017-06-26 10:53:51 +02:00
48a85f99eb Add remaining 'new copying' for obdata ID types. 2017-06-22 22:46:52 +02:00
6635284917 Merge branch 'master' into id_copy_refactor 2017-06-22 10:44:33 +02:00
c907b16065 Add mball and lattice new copying, tweak a bit more skey handling. 2017-06-21 11:08:50 +02:00
797a696734 Merge branch 'master' into id_copy_refactor 2017-06-21 10:49:39 +02:00
90a463dcfc Add new Curve copying code. 2017-06-20 21:34:18 +02:00
1f7c6fda5d Fix wrong assert, and issue with Key ID freeing tag after copying from mesh... 2017-06-20 21:20:43 +02:00
39b0c6f060 Add Mesh and Key support to new copying code. 2017-06-20 17:55:38 +02:00
3a86873b68 Make object copying fully compatible/aware of new copy flag system.
(continuation of previous WIP commit, sorry about that one :/ ).

This commits changes quite a few things, distributing new copying flags
into sub-data copying code (mostly concerns ID refcounting or not).

It also removes ID refcounting handling from Modifiers' copy callback
(this was ugly from the start, proved to be problematic in current
master, and generally bad practice). This is now done by calling code.

Also, it brings back ID refcounting handling to main BKE_library's copy
code, which means in generic ID copying lower-level IDType-specific copy
code should not use it at all. Support at lower-level remains needed
though, unfortunately, to cope with partial copying tools etc.
2017-06-20 17:55:38 +02:00
596c20c677 Alembic tests: make failures a bit easier to diagnose. 2017-06-20 17:55:38 +02:00
d0af31b317 Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
2017-06-20 17:55:38 +02:00
12a5a628f3 Fixed bl_load_py_modules / script_load_modules unit test
It tried to assert that
addons/io_blend_utils/blender_bam-unpacked.whl/__init__.py was loaded when
the io_blend_utils module was imported. However, this happens only on
demand, and not directly when importing the add-on.
2017-06-20 17:55:38 +02:00
b72ba5c78d Use for/else instead of setting 'ok' variable.
This is more efficient, and this use case is exactly what the else clause
is for.
2017-06-20 17:55:38 +02:00
0687d8bdce Removed trailing spaces 2017-06-20 17:55:38 +02:00
258634b43c Fix (unreported) missing Image usercount increase when copying UVProject modifier. 2017-06-20 17:55:38 +02:00
babc0c9bd7 Fix (unreported) bad copying code of Surface Deform modifier. 2017-06-20 17:55:38 +02:00
749a8daf26 Fix compiler warnings from own recent rB0d5c7e5e36b9. 2017-06-20 17:55:38 +02:00
2d3b6b5ad7 Fix (unreported) bad copying of Ocean modifier.
Was needlessly complicated code, forgot to copy a value (foam_fade), and
was utterly leaking memory!
2017-06-20 17:55:38 +02:00
20e3434c5f Fix (unreported) bad copying code in Mesh Deform modifier. 2017-06-20 17:55:38 +02:00
77046ba9d8 Fix (unreported) Dynamic Paint modifier not increasing ID usercount in copy function.
*Sigh* One more example of why we should keep ID management handling in
as few places as possible! It's impossible to keep more than a few
places in sync regarding which ID pointer is refcounted etc.
2017-06-20 17:55:38 +02:00
147735587c Fix (unreported) memory leak in Fluid modifier copying.
Also generally simplify/sanitize this copy code.
2017-06-20 17:55:38 +02:00
44b1680fbf WIP 2017-06-20 17:55:38 +02:00
46af186d21 Cleanup: doxygen comments
Also remove duplicate & mismatching comments from grease-pencil header.
Keep comments close to implementation to avoid getting out of sync.
2017-06-20 17:55:38 +02:00
e61dbcd284 Fix T51774: Children particles hair interpolation not correct with textures or dp.
Children where always getting at least one segment of fixed length...

Now fully hidden ones (zero length) get no segment at all.

Note that even very short ones keep getting one 'unit' length segment - would
rather avoid changing that at this point, given how complex children
particles 'length' can get with all kind of modifiers... Think we can
live with that for now anyway.
2017-06-20 17:55:38 +02:00
5f6725337a Fix T51840: UI redraw in node editor header missing on pointcache bake
Missing a notifier handler in the node editor
2017-06-20 17:55:38 +02:00
780310578a Fix unreported: Copy-pasting nodes crashes when they have an undefined type 2017-06-20 17:55:38 +02:00
d8de772410 Docs: Fix file:line links in generated API docs 2017-06-20 17:55:38 +02:00
f45300856c Add Cone: tip soft-min should be zero
Default value should be included in range.
2017-06-20 17:55:38 +02:00
6493328e37 Guarded allocator: Fix type in macro definition
The crash did not happen yet because we always had proper vmemh defined in
the parent scope.

Patch by Ivan Ivanov (aka obiwanus), thanks!

Differential Revision: https://developer.blender.org/D2715
2017-06-20 17:55:38 +02:00
2e9580e417 PyAPI: Fix warning about indent 2017-06-20 17:55:38 +02:00
0e78b3b794 Fix T51810: Add minimal example of usage of translation API for non-official addons. 2017-06-20 17:55:38 +02:00
09e5d1bc84 Usual i18n/UI messages fixes.
Please do not add useless tooltips! We have enough messages to translate
already...
2017-06-20 17:55:38 +02:00
23941b425e Add same new ID freeing API as copying one.
Idea is the same, looks like it will be a tad simpler than with copy
though, since we should not need to change each ID type freeing func, as
ID usercount handling is done in main BKE_library code (would like to do
that for copy as well, but it's not that simple).
2017-06-16 10:48:42 +02:00
fa64dfa449 On second thought, avoid adding new stuff to ID.
We can extend ID->tag and store there our few alloc-related tags.
2017-06-16 10:48:42 +02:00
7edeccf81d Fleshing a bit new copy logic (using Object datablock as Guinea pig). 2017-06-16 10:48:42 +02:00
8d22d5a2a9 Layout initial ideas/code structure of new ID copying. 2017-06-16 10:48:42 +02:00
945c062cf7 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
2017-06-14 15:34:08 +02:00
5ecbc7c0f2 Merge branch 'master' into id_override_static 2017-06-14 15:20:15 +02:00
f4455faf4c Cleanup/expose template status in RNA utils API. 2017-06-14 15:19:16 +02:00
0e41f5c158 Rename override operation defines, add some operation flags. 2017-06-13 12:51:03 +02:00
352f9ed27b Some more cleanup, add (limited) copying of static override.
Working towards override template, still some work to do though.
2017-06-13 10:25:59 +02:00
470613cdf2 Cleanup: remove unused testcode. 2017-06-12 15:44:48 +02:00
e57bd4e786 Fix for removed stuff from DEG. 2017-06-12 15:31:30 +02:00
0697398af1 Merge branch 'master' into id_override_static 2017-06-12 15:18:01 +02:00
4ce7ad37fe Merge branch 'master' into id_override_static 2017-06-12 15:07:00 +02:00
9505209b1d Fix various issues in RNA diff handling, and make some more props overridable.
Namely, those allowing to link an object to an armature.

Thing is, we cannnot and absolutely do not want to use same trick as
armature proxies regarding deforming their related geometries.

So instead, we'll automatically make override of objects using
overridden armature as deformer, ultimately. This also allows for
several overrides of a same linked data.

Not sure how much good/bad this is, will have to ask artists once it's
ready for testing (cannot think of any non-ugly way to do that 'magic
trick' tbh).
2017-05-31 17:55:08 +02:00
734a889056 Some cleanup, introduce idea of 'override template'.
Nothing functionnal for now, just made it possible for override to have
NULL reference ID.

Those overrides would be used as templates (created in original file of
the ID, they define some kind of default overriding settings). They
should also allow to forcefully lock some properties (forbid users of
that library ID to override some properties).
2017-05-31 12:55:53 +02:00
4813ed0e4a Merge branch 'master' into asset-engine 2017-05-30 17:22:45 +02:00
3489874770 Merge branch 'master' into id_override_static 2017-05-30 16:20:58 +02:00
8aae0549df Make 'set override type' menu option of buttons functional.
There's still lots of things to fix or tweak, but basics are now
working.
2017-04-05 21:53:41 +02:00
ef6045a473 Add finer controll over 'strict' finding of override property operations. 2017-04-05 18:12:18 +02:00
558119854d Bring closer RNA and BKE ...override_..._find() functions, add RNA ..._get() ones. 2017-04-05 17:45:18 +02:00
15937c1f8e Rename RNA_property_override_..._get() functions to ..._find()
Matches functions defined in BKE_library_override!
2017-04-05 17:15:28 +02:00
8811f4cfa3 Merge branch 'master' into id_override_static 2017-04-05 15:34:26 +02:00
404f9ce6ee Merge branch 'master' into asset-engine 2017-03-28 13:39:17 +02:00
a48f5e991d Merge branch 'master' into id_override_static 2017-03-28 10:49:55 +02:00
8698624d1e Merge branch 'master' into id_override_static 2017-03-24 12:48:33 +01:00
f025c57cb4 Implement 'delete override' from UI menu options. 2017-03-24 12:47:34 +01:00
b03542b61f Add public API to BKE's lib override to delete override properties & operations. 2017-03-24 12:44:53 +01:00
da6a2def64 Fix bug in new copy/applyoverride code of RNA property. 2017-03-24 12:43:39 +01:00
78ccdfa0a0 Fix stupid mistake in new BLI_listbase_bytes_find(). 2017-03-24 12:39:55 +01:00
bf145a1a4c Merge branch 'master' into id_override_static 2017-03-23 17:04:35 +01:00
c54f045daf WIP UI menu entries for Override.
Empty shells for now...
2017-03-23 17:03:44 +01:00
6520e2a455 Merge branch 'master' into id_override_static 2017-03-22 19:45:55 +01:00
41f2393e0e Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-03-20 12:49:00 +01:00
9ff989e3f1 Fix missing removal of asset UUID from ID made local... 2017-03-20 12:31:51 +01:00
a8698b4ef3 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_files.c
2017-03-20 10:28:05 +01:00
9ee6995a35 Merge branch 'writefile_rework' into id_override_static 2017-03-16 11:11:30 +01:00
d14298403f Merge branch 'master' into writefile_rework 2017-03-16 10:52:40 +01:00
ee04a72196 Merge branch 'master' into asset-engine 2017-03-16 10:31:33 +01:00
9ed186ecdb Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
	source/blender/windowmanager/intern/wm_files.c
2017-03-16 10:15:59 +01:00
836194d4a2 Merge branch 'writefile_rework' into id_override_static 2017-03-02 10:27:36 +01:00
fb02b4d4de Merge branch 'master' into writefile_rework 2017-03-02 10:27:16 +01:00
2fa16018b8 Add some basic UI and RNA feedback for overriden properties.
For now chose some teal blue to mark overridden state of prop in UI,
kind of last nicely different tint available...
2017-03-02 09:53:41 +01:00
1ca3fd0b81 Merge branch 'writefile_rework' into id_override_static 2017-03-01 16:32:06 +01:00
e56e0dd75c Merge branch 'master' into writefile_rework 2017-03-01 16:31:50 +01:00
e15af8a978 Merge branch 'writefile_rework' into id_override_static 2017-02-28 14:16:22 +01:00
7572ba85c6 Merge branch 'master' into writefile_rework 2017-02-28 14:16:05 +01:00
18387ad496 Big refactor of differential override storage.
On second thought, modifying real data-block to store diff in it is...
just bad. Because it affects actual data, because it involves complicated
and heavy processes like remapping, and because it stores useless values
in .blend file (i.e. values that would give garbage results if e.g.
opening .blend file with older version of Blender, etc.).

So instead, decided to save an extra data-block in .blend file each time
we have some differential overrides.

Note that for now, we do full copy of datablock into its extra 'storage'
sibbling for .blend file. This is bad (think about double copy of heavy
mesh...) and will have to be fixed. Whole copy process will need serious
work anyway, for that kind of features we need to be able to copy
without increase usercount of IDs etc.

In fact, here, maybe we even need a smarter version of copy that would
only duplicate sub-data as needed by diff-overriden properties...
2017-02-28 14:06:56 +01:00
b08a5d1e57 Merge branch 'writefile_rework' into id_override_static.
That way we don't have to add the same stupid few lines to *all*
datatypes writers! Obvious gain on efficiency and security from coding PoV.

Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-02-27 14:50:21 +01:00
8c2caee7f4 Merge branch 'master' into writefile_rework 2017-02-27 10:03:49 +01:00
54107e6c40 Merge branch 'master' into id_override_static 2017-02-27 09:58:22 +01:00
441ca0202c Merge branch 'master' into id_override_static 2017-02-23 19:41:36 +01:00
15822d9d32 Refactor writefile handling of data-blocks.
Instead of calling a function looping over whole list of a given ID
type, make whole loop over Main in parent function, and call functions
writing a single datablock at a time.

This design is more in line with all other places in Blender where we
handle whole content of Main (including readfile.c), and much more easy
to extend and add e.g. some generic processing of IDs before/after
writing, etc.

From user point, there should be no change at all, only difference is
that data-block types won't be saved in same order as before (.blend
file specs enforces no order here, so this is not an issue, but it could
bug some third party users using other, simplified .blend file reader
maybe).

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2510
2017-02-13 14:57:14 +01:00
68ea57a09b Fix some crashes when ID would reference itself.
Typical case: bones having constraints targetting other bones from same
armature. ID swap needs remapping here.

Really have to find something better than regular ID copy + swap + relinking
for override operations, this is horribly inneficient, complicated
and... most likely a nest of bugs and worms.

(pretty sure e.g. we still can generate same pointers during writefile
with current code :( ).
2017-02-10 09:23:09 +01:00
cad99ae1a5 Merge branch 'master' into id_override_static 2017-02-09 14:54:33 +01:00
dce4e6139f Use a smaller cross icon for clearing search box contents 2017-02-09 14:51:42 +01:00
42249eb9b3 More tweaks to Normalisation options in Graph Editor
* Added a new dedicated icon for normalize
* Only use an icon for "Auto"
2017-02-09 14:51:42 +01:00
a8edfba122 Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons
These take less space, fit in better with rest of the UI, and make their relationship clearer
2017-02-09 14:51:42 +01:00
c42f64ab50 Fix: GPencil delete operators did not respect color locking 2017-02-09 14:51:42 +01:00
b2a0571a46 Cycles: Fix regression with transparent shadows in volume 2017-02-09 14:51:42 +01:00
4e9e577b88 Cycles: Solve speed regression by casting opaque ray first 2017-02-09 14:51:42 +01:00
1899f6c66d Cycles: Fix compilation error on OpenCL 2017-02-09 14:51:42 +01:00
b745195785 Cycles: Split shadow functions to avoid some duplicated calculations 2017-02-09 14:51:42 +01:00
beb6677119 Cycles: Store shadow intersections in the kernel globals
Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.

Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.
2017-02-09 14:51:42 +01:00
7765614eb3 Cycles: Speedup transparent shadows on CUDA
This commit enables record-all behavior of transparent shadows
rays.

Render times difference goes as following:

               GTX 1080 render time
BMW                  -0.5%
Fishy Cat            -0.0%
Pabellon Barcelona   -11.6%
Classroom            +1.2%
Koro                 -58.6%

Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.
2017-02-09 14:51:42 +01:00
1a222aaf9f Cycles: Implement record-all transparent shadow function for GPU
The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing  on
CPU already).

This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.

This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.
2017-02-09 14:51:42 +01:00
92ecd3218a Cycles: Use an utility function to sort intersections array 2017-02-09 14:51:42 +01:00
e4280e0e36 Cycles: Make GPU version of shadow_blocked() closer to CPU
Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.
2017-02-09 14:51:42 +01:00
b728e9ffbe Cycles: De-duplicate transparent shadows attenuation
Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.
2017-02-09 14:51:42 +01:00
54cde6d096 Fix T49249: Alembic export with multiple hair systems crash blender
Removed unnecessary call to DM_update_tessface_data(). This call is
already performed by DM_ensure_tessface(dm). The call being performed
twice caused a failing BLI_assert().

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
6b5dde499b Alembic export: avoid infinite loops trying to find parent objects.
Also added some assertions for debugging purposes

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
7fc974f89f Alembic export: only create transform writer if the object should be exported
Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
154b045f54 Alembic: #undef'ed the correct macro
TEST_RET is not defined anywhere in Blender's sources, and LAYER_CMP
is no longer used after this function ends.
2017-02-09 14:51:42 +01:00
bc7a33f1fc Alembic: Use getXForm() in check, because it's used in rest of the function too
This makes the code within the function consistent.
2017-02-09 14:51:42 +01:00
d4cc008af9 Alembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)
With the new names the arguments (yup, zup) are in the same order as
they appear in the function name. The old names used copy_src_dst(dst,
src), which I found very confusing. Furthermore, now it is clear from
where to where the copy is made.

This makes the function names a little bit longer, though. If that is
a real issue, we can just name them zup_from_yup(zup, yup).

Reviewed by: Kévin Dietrich
2017-02-09 14:51:42 +01:00
fbae5a994c Various minor fixes & tweaks. 2017-02-08 20:26:11 +01:00
e029b754fe Some naive solution to avoid running 'generate auto override' code too often.
Proper solution will come later (probably based on some background job
or so...).
2017-02-08 15:38:25 +01:00
9a94b71c75 Merge branch 'master' into id_override_static 2017-02-08 09:59:31 +01:00
c2cece8b29 Preliminary step to support static override of armatures.
I.e. support override of loc/rot/scale of posechannels.

Also implied to add some minimal support of collections in 'diff
generating' RNA code.

Still much to be done of course.
2017-02-07 20:14:57 +01:00
0cc7ecd1dd Merge branch 'master' into id_override_static 2017-02-07 10:16:19 +01:00
98b868c399 Make write code theorically fully compatible with static override.
Readfile.c already was, since it's more generic code there (ID level).
2017-02-06 21:39:22 +01:00
c4d5ba4c7b Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenloader/intern/writefile.c
2017-02-06 21:01:28 +01:00
e1fc14c358 Merge branch 'master' into id_override_static 2017-02-06 20:54:08 +01:00
7b61d5f5b0 Minor cleanup (comments mostly). 2017-02-06 12:26:41 +01:00
3bab4e1136 Merge branch 'master' into id_override_static 2017-02-05 15:30:00 +01:00
9faf1d18b8 Merge branch 'master' into asset-engine 2017-02-05 15:24:34 +01:00
2cc420f409 Merge branch 'master' into id_override_static
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2017-01-31 11:46:34 +01:00
bf0dff1fe7 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_query.c
2017-01-31 11:34:02 +01:00
d9d247cf26 Merge branch 'master' into id_override_static 2017-01-23 12:27:36 +01:00
14eb249f25 Merge branch 'master' into asset-engine 2017-01-23 12:13:09 +01:00
aa53d26c0e Merge branch 'master' into id_override_static
Conflicts:
	source/blender/makesrna/RNA_types.h
2017-01-12 12:58:57 +01:00
2130d16076 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
2017-01-12 12:45:20 +01:00
d5a7a15083 Merge branch 'master' into id_override_static 2017-01-09 10:50:20 +01:00
9f80107862 Working proof-of-concept of differential override operations.
So, now 'proportional' RNA properties (here, Object's scale) is stored
as 'multiply' override op.

Once again, this is mostly testing for now, there are a lot of potential
issues and traps in current code that'll need more background work to
address later if we keep working in this direction.

Main remaining TODO to complete the proof of concept now is sketching
out a bit of UI/UX control over override!
2017-01-09 10:27:44 +01:00
ffe3fa601c Merge branch 'master' into id_override_static 2017-01-08 12:09:48 +01:00
575e62f051 More WIP work towards supporting override differentila operations.
Code compiles, is mostly neither tested nor hooked to anything yet.
2017-01-05 20:50:51 +01:00
5e0db31f79 Merge branch 'master' into id_override_static 2017-01-04 17:36:33 +01:00
95fac91fb5 Merge branch 'master' into id_override_static 2017-01-04 10:32:24 +01:00
d5e5ce62af Add basic code to prevent editing non-overridable properties. 2017-01-03 21:01:05 +01:00
8684e1566d More work and refactor in RNA override part mostly.
This commit mainly extend/refactor RNA prop copy and equals functions
into more advanced override utils (since equals is a subset of
aurooverride operations generation, and copy is a subset of override
operations application).

And some other work needed on the road...
2017-01-03 18:45:09 +01:00
2fd55e1443 Add first basic working auto-override.
Still called from pre-depsgraph eval step, does an RNA comparison and
generate overriding rules for changed props...

Note: we most certainly do not want to run this on all depsgraph eval.
Own current idea would be to just tag IDs e.g. in depsgraph callback,
and run actual auto-generation e.g. in a low-priority job, maybe? not
sure... :|

Also, fix stupid mistake in RNA applying of override (used when reading
file to apply static override), and add object's loc/rot/scale as
overridable properties.
2017-01-02 22:08:50 +01:00
a634ee733f ID override static: Various minor fixes and tweaks. 2017-01-02 14:45:36 +01:00
b81333106e Merge branch 'master' into id_override_static 2017-01-02 12:57:28 +01:00
b318a3a811 Add ways to forbid override/auto-override.
Add a 'NOOP' override ruul to prevent any kind of override on a given
RNA path, and an ID flag 'AUTOOVERRIDE' to allow automatic definition of
override rules based on changed data.

Again, just defines, do not do anything yet.
2016-12-30 18:15:49 +01:00
453aef97be Include "static override rules generator" operation into new depsgraph.
Note that this is dummy empty placeholder for now!

Idea here is that depsgraph is best place to generate our override rules
based on data changes. That way all tools in Blender keep working as
usual, on local data, and overrides are generated when needed just
before IDs get actually evaluated.

Depsgraph has key advantage of only running over *changed* data-blocks
already.

Not sure this is actually valid idea, but for tests will do the work.
If we want to keep it, we'll have to find a way to prevent this running
too often though, especially not during most animation-triggered
evaluations.
2016-12-30 16:54:50 +01:00
4c224e861b Merge branch 'master' into override_static
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-12-30 12:27:30 +01:00
b76f2c0b6c Some cleanup and refactoring. 2016-12-14 16:03:51 +01:00
de87411544 Revert initial hack to get a new overridable RNA prop flag.
Now that we have some new free ones...
2016-12-14 16:03:51 +01:00
b827ca78c7 Final bits to get first (very raw, limited and experimental) override working.
Mostly code using override data to selectively update a copy of linked one
with local data.

As said, still totally hackish and experimental, but it works - you can
create overrides of linked Objects, and override their position, yeha! :P
2016-12-14 16:03:51 +01:00
4f67a79eac Moar WIP: add operator to make override of linked object.
Mostly nasty testing code, only overriding location of object for now.
And of course, we are still missing bits in read/write code to actually
do the override.

Also, add some minimal exposure of override in RNA, here again, most to
be done still.
2016-12-14 16:03:51 +01:00
64f78e15af More WIP: add basic new BKE and RNA override API, update DNA structs.
Still much to do to even get a first dead simple working prototype, not
doing anything yet (except compiling and not crashing when ran :P ).
2016-12-14 16:03:51 +01:00
d982122f79 Some initial, WIP DNA/RNA/readwrite code for static ID override.
Quite obviously totally useless (and harmless) currently, compiles but
does nothing.
2016-12-14 16:03:51 +01:00
49ab100383 Some changes to RNA property/struct comparison.
Could very easily get into infinite loop when comparing Pointer
properties... And in any case, comparing ID pointer should be enough, no
need to dive into all ID properties!
2016-12-14 16:03:51 +01:00
f5a9f4a584 Quick and dirty hack to get overridable RNA prop flag.
To be reverted once D2400 is committed.
2016-12-14 16:03:51 +01:00
342cc1212f Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-12-12 16:32:11 +01:00
c6c28eacf6 Some more comments etc. to AssetEngine API. 2016-12-05 14:58:28 +01:00
d33ab08132 Fix bad behavior when switching between asset engines with incompatible paths.
A path valid for a given AE can be invalid with another, we need to
check current path when switching between AEs.

Also do proper check of valid path for Amber engines.
2016-12-05 14:40:24 +01:00
9b98bddc11 Merge branch 'master' into asset-engine 2016-12-05 09:05:17 +01:00
e6fc7ea873 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library_remap.c
2016-11-16 16:48:49 +01:00
b0e7c4ded9 Merge branch 'master' into asset-engine 2016-11-07 15:29:48 +01:00
9eca8837d3 Merge branch 'master' into asset-engine 2016-10-15 10:12:06 +02:00
0b61b53c9c Merge branch 'master' into asset-engine 2016-10-07 12:02:41 +02:00
c8b4ef2a59 Merge branch 'master' into asset-engine 2016-09-30 16:00:02 +02:00
ddb61b1a8a Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-09-20 12:28:46 +02:00
909084bafc Merge branch 'master' into asset-engine 2016-09-17 10:27:02 +02:00
923edbf04f Claude: forgot to 'backport' this to actual git repo... 2016-09-16 16:41:02 +02:00
f9b12c8e07 Claude: Add previews handling.
Using PIL right now to load thumbnails, so won't work with 'stock' blender builds :/
2016-09-16 16:11:08 +02:00
32b7fc1433 Merge branch 'master' into asset-engine 2016-09-16 12:24:25 +02:00
2fd24b9c92 Claude: add basic loading of selected images...
Note that you can link several images in a single run.

Also, images are using current 'link file as datablock' hack, awaiting for propper ID override to get really sane behavior here...
2016-09-15 16:55:49 +02:00
13207e388f Merge branch 'master' into asset-engine 2016-09-15 14:40:38 +02:00
8c732bd0f2 Merge branch 'master' into asset-engine 2016-09-14 17:27:56 +02:00
148b3fc212 Merge branch 'master' into asset-engine 2016-09-14 17:20:41 +02:00
d6f0d1f3f5 Claude: Fix erroneous uuid generation.
This uuid generation is just temp placeholder anyway, we want something based on actual uuid of Cloud items,
but at least let's avoid generating several time the same ID in current listing!
2016-09-13 18:50:03 +02:00
dbeabcd953 Merge branch 'master' into asset-engine 2016-09-13 18:00:40 +02:00
0099b34531 Claude: WIP, listing is kind of working, mush to be fixed still though, and of course no import yet. 2016-09-10 22:42:41 +02:00
e204168710 Merge branch 'master' into asset-engine 2016-09-10 16:14:43 +02:00
a8d05f4cde Claude: More WIP work - repo listing starts to work - partially! :P 2016-09-09 22:27:07 +02:00
f7252eb9ab Merge branch 'master' into asset-engine 2016-09-09 19:28:22 +02:00
037e761f1f Claude: more WIP work towards listing content on Cloud repository. 2016-09-08 15:26:36 +02:00
75d77a3475 Allow asset engines to change current dir also from list_dir function.
Rational is, in case of online repo, it may not be practical to decide
whether a path is valid or not from check_dir() callback, which should return
immediately.

So instead, check_dir() can only check whether path **looks** good, and
delegate actual path validation to list_dir (and maybe other similar functions).

That’s what is being tested with Claude engine at least.
2016-09-08 15:23:33 +02:00
44c099d549 Merge branch 'master' into asset-engine 2016-09-08 12:00:26 +02:00
e3d026416c Merge branch 'master' into asset-engine 2016-09-07 13:59:40 +02:00
e11f7a2bb2 Forgot to 'backport' those fixes in last commit :/ 2016-09-07 11:36:08 +02:00
a53e883678 Merge branch 'master' into asset-engine 2016-09-07 09:25:38 +02:00
0da8bae85a Claude: Fix asyncio handling!
Turns out using worker thread to run asyncio loop is not working with pillar, this code is totally
not blender-independent and hence cannot safely work in another thread.

So instead using same technique as in AmberAIO - 'stepping' of asyncio loop, instead of blindly
run_forever() and hoping loop will stop some day...

Note that we may rather call e.g. loop.run_later(1e-5, loop.stop), to actually give a bit more
time to the loop... Time will say what's best option here.
2016-09-06 14:38:51 +02:00
e48e0c1b9a Claude: Fix pillar api url to new value. 2016-09-06 14:38:28 +02:00
f4f6e6f525 AmberAIO: Fix asyncio loop handling.
Finally found the right way to do this (at least, I think! :P).
2016-09-06 14:12:08 +02:00
3ba2133e52 Merge branch 'master' into asset-engine 2016-09-06 12:27:28 +02:00
aa7b74acf1 Merge branch 'master' into asset-engine 2016-09-05 15:10:03 +02:00
655ccef095 Merge branch 'master' into asset-engine 2016-08-31 20:59:49 +02:00
6018191d79 Claude: add Pillar 'login' to Blender CLoud.
Reusing again mostly code from NlenderCloud add-on, adapted to asset engine system...
2016-08-31 12:51:18 +02:00
f346687ef2 Merge branch 'master' into asset-engine 2016-08-31 10:17:05 +02:00
ae3d5ddc7d First (totally experimental and useless) version of a future 'BlenderCloud' asset engine.
For now it's nothing but an empty shell - but a working proof of concept of how to 'embed'
that ugly asyncio-based stuff into a background working thread for asset engines.

Hopefully more funny stuff to come soon(ish).
2016-08-29 17:10:39 +02:00
9897132731 Merge branch 'master' into asset-enginea, and update for new 'checkdir' behavior/expectations.
Conflicts:
	source/blender/editors/space_file/filelist.c
2016-08-29 17:05:45 +02:00
a2a9f12ef3 Grr, forgot that fix in previous commit... 2016-08-28 16:44:59 +02:00
991194f49d Add experimental 'asyncio-based' version of Amber.
This was done to both test asyncio usage in an 'asset engine' context, and wet my feet with this lib.

All in all, am really not convinced by asyncio in this use-case. async and coroutines are much more
complex to grasp and get working correctly (and efficiently!) than mere threading.
Further more, most python lib callbacks (os.listdir, os.ls_stat, etc.) are not async-ready,
so you have to call them through asyncio's executor (aka threads or processes),
which means using asyncio in this context is only adding overhead.

I think asyncio is only really relevant when you have to handle tens (and much more) concurrent I/O tasks,
otherwise threading (or multi-processing if compute-intensive) are much, much simpler to get working,
and also probably lighter in terms of overload?

Further more, asyncio paradigm is not so easy to adapt to the 'AssetEngine' paradigm, i.e. a
python interface that gets called to start, query and finalize jobs that are supposed to keep running
in-between (think event loop should run in a background thread actually...).
2016-08-27 14:27:44 +02:00
cb69195967 Merge branch 'master' into asset-engine 2016-08-26 22:03:58 +02:00
e545d5e21d Merge branch 'master' into asset-engine 2016-08-24 18:07:31 +02:00
8dfb5b8305 Merge branch 'master' into asset-engine 2016-08-21 15:31:35 +02:00
c33f98f6ae AssetEngine previews: fix some issues, make Amber generate dummy ones as test/example.
So now, amber generates dummy mosaic-like random previews (with a 100ms delay to mimic
really slow process), everything seems to work just fine. ;)
2016-08-14 13:14:10 +02:00
85739dabef Add initial support for previews to AssetEngine.
Code not really tested (it just builds and does not crash :P ).

Will also have to rethink a bit API and data structs imho... AssetUUID is starting to become a bit annoying.
2016-08-13 18:40:40 +02:00
70b7333142 Merge branch 'master' into asset-engine 2016-08-13 15:18:52 +02:00
c349b2a5bf Merge branch 'master' into asset-engine 2016-08-10 22:06:45 +02:00
7c263af84a Merge branch 'master' into asset-engine 2016-08-10 15:18:17 +02:00
d55b7416f5 Merge branch 'master' into asset-engine 2016-08-07 21:19:29 +02:00
24430e0902 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/WM_api.h
2016-08-07 10:25:09 +02:00
948f20e74a Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2016-08-02 16:48:31 +02:00
b6540eb4a4 Merge branch 'master' into asset-engine 2016-07-26 15:31:31 +02:00
3f36cd3f33 Changed most of ID_IS_LINKED_foo checks as needed.
Basically, due to new 'virtual' libraries & 'path' assets, we consider those 'virtualmy  linked' IDs as:
* Local for editing purpose (i.e. they are editable).
* Linked for datablock management purposes (i.e. they can be made local, etc.).

Note: all this is more like a quick hack to test 'file-based' asset repositories (like cloud)
in comming weeks. I really do not think we should use that in the end, an full-featured
'overriding ID' system (as proposed in replacement of proxies for 2.8) would be much saner imho.
2016-07-25 17:37:34 +02:00
521222b545 Merge branch 'master' into asset-engine 2016-07-25 16:42:35 +02:00
4a298b10ec Merge branch 'master' into asset-engine 2016-07-25 15:07:44 +02:00
784f7f3264 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2016-07-24 18:13:36 +02:00
70e3f86809 Some more small fixes regarding ID/library asset handling. 2016-07-24 15:58:16 +02:00
d8da816a7c Add more macros to differentiate actual linked datablocks from 'virtually' linked ones (assets only).
Not yet used in code.
2016-07-16 15:54:46 +02:00
5e469bbd95 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_init_exit.c
2016-07-16 15:39:50 +02:00
b0760a5c8f Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-07-07 15:15:48 +02:00
581a819432 Merge branch 'master' into asset-engine 2016-07-02 15:30:54 +02:00
6ba8498307 Fix memleak whene deleting IDs with uuid! 2016-06-30 13:02:09 +02:00
b18270f43a Add utility to print UUID (could make it nicer, but for now will do). 2016-06-30 10:44:10 +02:00
3db91def28 Reduce re-allocation while fetching UUIDs per asset engine (asset reload area). 2016-06-30 10:41:03 +02:00
4dd6ffaf37 Split Library/ID asset-related management into own library_asset file.
This is specific enough to deserve its own file imho, and though rather small
currently, it's likely to grow...
2016-06-29 22:38:49 +02:00
4137cc79f2 Cleanup: rename BKE_asset to BKE_asset_engine.
Since this file mostly defines/handles interactions with asset engines...

Asset handling itself is more done in library area (will split it too in next commit).
2016-06-29 22:09:37 +02:00
b25c224d90 Merge branch 'master' into asset-engine 2016-06-29 18:01:35 +02:00
732cd96737 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-06-28 18:21:53 +02:00
71278cc22a Merge branch 'master' into asset-experiments 2016-06-27 17:44:15 +02:00
99869dab7c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/brush.c
	source/blender/blenkernel/intern/library.c
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/mesh.c
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/blenloader/intern/writefile.c
	source/blender/editors/space_action/space_action.c
	source/blender/editors/space_clip/space_clip.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_graph/space_graph.c
	source/blender/editors/space_image/space_image.c
	source/blender/editors/space_logic/space_logic.c
	source/blender/editors/space_nla/space_nla.c
	source/blender/editors/space_node/space_node.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_sequencer/space_sequencer.c
	source/blender/editors/space_text/space_text.c
	source/blender/editors/space_view3d/space_view3d.c
	source/blender/makesrna/intern/rna_ID.c
	source/blender/makesrna/intern/rna_main_api.c
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/wm_files.h
2016-06-27 17:29:09 +02:00
d012380cae Merge branch 'asset-engine' into asset-experiments 2016-06-16 23:45:02 +02:00
4c086f6b80 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library.c
2016-06-16 23:44:43 +02:00
56677f4f14 Fix remaining cases of datablocks' BKE_foo_free() touching usercount of their IDs.
Note that a few sub-data (like animdata) needs to keep option to unlink their
own ID usages themselves for now, this is not ideal, but need some more time
to mumble on this and find an elegant fix. Nothing blocking here anyway.
2016-06-16 22:06:32 +02:00
bb4c87a130 Merge branch 'master' into asset-engine 2016-06-16 21:17:45 +02:00
4853f75073 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-06-16 21:13:15 +02:00
04ee81a081 Merge branch 'master' into id-remap 2016-06-16 19:24:14 +02:00
42dda95e89 Merge branch 'master' into id-remap 2016-06-16 18:12:53 +02:00
21b5ce57f5 Fix bad handling of RegionView3Ds in View3D ID remap callback. 2016-06-16 18:10:44 +02:00
c24ba18d7a Found more id-remap missing cases in spaces (new(?) ads of anim editors). 2016-06-16 17:16:25 +02:00
1eac4fde27 Fix missing mask ID pointer update in Clip/Image spaces' remap callbacks. 2016-06-16 16:56:20 +02:00
fc10e42de3 Finish TODOs related to buttons space and ID remapping. 2016-06-16 16:47:32 +02:00
0256d5dde9 Fix reload/relocate trying to use invalid lib path. 2016-06-16 16:06:10 +02:00
7cbe356c4f Fix broken compilation after recent refactor. 2016-06-16 15:59:30 +02:00
bde19b57d6 Cleanup from review comments. 2016-06-16 15:54:22 +02:00
dbf7d30744 Merge branch 'master' into id-remap 2016-06-16 15:39:54 +02:00
d430237282 Cleanup: headers 2016-06-16 20:43:34 +10:00
5fd97c6e85 Move remapping functions into BKE_library_remap.h
This is done since remapping is quite an involved process.
2016-06-16 20:28:54 +10:00
1880cb6c75 Merge branch 'master' into id-remap 2016-06-16 20:03:53 +10:00
25e0f5e9f2 Fixes/updates needed to make asset reload work with new virtual lib stuff. 2016-06-14 17:41:29 +02:00
b74ad975fd Merge branch 'id-remap' into asset-experiments 2016-06-14 16:39:53 +02:00
0d8e70600b Merge branch 'asset-engine' into asset-experiments 2016-06-14 16:39:47 +02:00
beaf33dfb2 Merge branch 'master' into id-remap 2016-06-14 16:36:42 +02:00
46cf8ba269 Cleanup. 2016-06-14 16:36:15 +02:00
f7b21186b5 Merge branch 'master' into asset-engine 2016-06-14 16:31:58 +02:00
fe41942a90 Cleanup: move 'virtual lib' linking code into own helper. 2016-06-14 15:56:32 +02:00
c6d3f76e69 Fix save/load issues with new virtual-lib assets. 2016-06-14 15:47:54 +02:00
69ae86193c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenloader/intern/writefile.c
2016-06-14 15:07:18 +02:00
5aaf18c39c WIP experimental support of direct image-as-linkeddata.
Works okish, but break on load (or save) of .blend file currently...
2016-06-13 21:40:48 +02:00
cbf241510d First step towards supporting non-blender-data as assets.
Idea is to avoid the need for asset engines to generate whole .blend files
with relevant datablocks in case they just need/want to provide files (images, videos, sounds...).

This commit introduces the concept of 'virtual' library, which in fact only exists to store
asset repository data. Datablocks from those virtual libs are then fully written in .blend file.

Much to do still, this is only preliminary/experimental work.
2016-06-13 17:39:02 +02:00
088d32d159 Some minor fixes/enhancements.
Asset engines are now only selectable and used in link/append case. Makes no real sense to have
those in other cases (like regular file opening, or even worse when saving a file!).
Also allows to get back asset engine persistance accross filebrowser usage.
2016-06-13 15:06:52 +02:00
d24c85fc12 Merge branch 'asset-engine' into asset-experiments 2016-06-13 12:54:44 +02:00
595159614f Merge branch 'id-remap' into asset-experiments 2016-06-13 12:54:38 +02:00
98654a9c9a Merge branch 'master' into asset-experiments 2016-06-13 12:54:32 +02:00
4286b606b3 Merge branch 'master' into asset-engine 2016-06-13 12:50:06 +02:00
09df8bd2e0 Merge branch 'master' into id-remap 2016-06-13 12:47:09 +02:00
836ecc6142 Merge branch 'asset-engine' into asset-experiments 2016-06-07 10:17:23 +02:00
0f5642b155 Merge branch 'id-remap' into asset-experiments 2016-06-07 10:17:16 +02:00
b1171ea31c Merge branch 'master' into asset-engine 2016-06-07 10:12:59 +02:00
3f4113ce3e Merge branch 'master' into id-remap 2016-06-07 10:10:14 +02:00
aa5f4d98fc Merge branch 'asset-engine' into asset-experiments 2016-06-07 09:44:08 +02:00
6f20d64f3a Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/makesdna/DNA_ID.h
2016-06-07 09:43:56 +02:00
fd12edebf4 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_ID.h
2016-06-07 09:42:52 +02:00
18f87c8dcb Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-06-07 09:27:56 +02:00
434a851703 Merge branch 'asset-engine' into asset-experiments 2016-05-31 09:58:19 +02:00
7282c6592a Merge branch 'id-remap' into asset-experiments 2016-05-31 09:58:08 +02:00
77cdf1fb49 Merge branch 'master' into asset-engine 2016-05-31 09:53:40 +02:00
2c9f6714a7 Fix merge error. 2016-05-31 09:53:16 +02:00
9400ea0647 Merge branch 'master' into id-remap 2016-05-31 09:38:38 +02:00
8346805963 Merge branch 'asset-engine' into asset-experiments 2016-05-24 15:49:11 +02:00
050209d16e Merge branch 'id-remap' into asset-experiments 2016-05-24 15:49:03 +02:00
0929283ddc Merge branch 'master' into asset-experiments 2016-05-24 15:48:55 +02:00
5afc102357 Fix alignement issues in some DNA struct due to ID one now being properly aligned. 2016-05-24 15:48:15 +02:00
6bae015985 Merge branch 'master' into asset-engine 2016-05-24 14:44:13 +02:00
ba1af2e1bf Some cleanup. 2016-05-24 14:43:48 +02:00
adbd9cb1de Better name handling in case we remap an ID adn cannot replace it totally. 2016-05-24 14:10:28 +02:00
16641d4c02 Merge branch 'master' into id-remap 2016-05-24 12:29:07 +02:00
4795d6bdb1 Merge branch 'master' into id-remap 2016-05-23 18:18:36 +02:00
542302e3f6 Revert "Squashed commit of the atomic-operations branch."
This reverts commit ffe7f4175a.
2016-05-09 15:12:16 +02:00
ffe7f4175a Squashed commit of the atomic-operations branch. 2016-05-09 15:11:40 +02:00
cb530ad07e Merge branch 'asset-engine' into asset-experiments 2016-05-06 13:34:15 +02:00
084f5e9a4d Merge branch 'id-remap' into asset-experiments 2016-05-06 13:34:06 +02:00
4c8e2ebde2 Merge branch 'master' into asset-experiments 2016-05-06 13:33:59 +02:00
d27bae4432 Merge branch 'master' into asset-engine 2016-05-06 13:30:37 +02:00
cbe6475383 Merge branch 'master' into id-remap 2016-05-06 13:28:20 +02:00
93c9ff858a First 'working' version of asset reload.
Dead dummy simplistic test runs (nearly) OK here (only have a memleak from versionning code...),
but obviously will need much serious tests to validate everything.

Also, many things in code will need cleanup/refactor. Not to mention UI/UX.

But we do have asset version check & reload on file opening now! :D

Process summary:
I) Open .blend file exactly as in master, load assets just like any other linked data (add placeholders in case not found).
II) Check all asset engines and ask them whether each asset is OK, needs to be updated/reloaded, is missing...
III) User then can decide to actually reload the asset, or not.

Step II) happens in an async job (since engines using remote storage/database could take some time to answer),
step III) is a locking task (just like initial linking). This should allow user to not be blocked at all by that
asset update process.
2016-05-06 13:16:24 +02:00
7cf890e126 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
2016-05-06 13:05:49 +02:00
961ebfa8c4 Set a main's version to current one after do_version is done.
With current master this is not an issue, but with all the reload stuff,
a same main could end up going several time into 'do_version', which is absolutely
not desired (multi-allocations, repeating conversions over some values, etc.).
2016-05-06 13:03:31 +02:00
341237035f Merge branch 'asset-engine' into asset-experiments 2016-05-06 11:09:56 +02:00
82359a7997 Do not update asset repo info inside link code.
Whole 'database' is rebuilt later anyway, and in more complex 'asset reload' cases
(where we may actually be reloading same asset with same uuid from same lib file),
this creates confusion...
2016-05-06 11:07:53 +02:00
4a429f1525 Merge branch 'asset-engine' into asset-experiments 2016-05-05 17:20:10 +02:00
fa21019745 Add global 'asset search by uuid' helper. 2016-05-05 17:19:27 +02:00
f4e4575e3c Merge branch 'asset-engine' into asset-experiments 2016-05-03 17:52:31 +02:00
a6f085f3c9 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
2016-05-03 17:52:19 +02:00
39da83e974 Merge branch 'master' into asset-experiments 2016-05-03 17:45:25 +02:00
783d63f6af Merge branch 'master' into asset-engine 2016-05-03 17:45:05 +02:00
a6a8ff103d Lib relocate/reload: serious rework of code.
Idea here is to both factorize it seriously (reload and relocate are very similar, let's
avoid as much as possible twice the same code...), and make new `lib_relocate_do()`
much more flexible - now it should be able to reload individual IDs as well
(plan is to use it to reload assets in relelvant branch too).
2016-05-03 17:42:23 +02:00
a97da9842c Merge branch 'master' into id-remap 2016-05-03 16:58:34 +02:00
861318bbb9 Merge branch 'master' into asset-engine 2016-05-03 15:32:30 +02:00
41c5ec21b3 Merge branch 'master' into id-remap 2016-05-03 15:32:05 +02:00
b7525de284 Merge branch 'asset-engine' into asset-experiments 2016-05-03 09:57:24 +02:00
071a27f918 Amber: Fix load_pre not using correct repo! 2016-05-03 09:56:44 +02:00
90af45d5b5 Merge branch 'asset-engine' into asset-experiments 2016-05-02 20:51:58 +02:00
56ea898ade Merge branch 'id-remap' into asset-experiments 2016-05-02 20:51:51 +02:00
d95671442d Merge branch 'master' into asset-experiments 2016-05-02 20:51:44 +02:00
26658afad1 Amber: fix missing '..' parent dir entry when inside a repo. 2016-05-02 20:50:57 +02:00
70eb04328c Change how Amber (and all other engines) are expected to work.
So far, we were accepting the idea of several repositories per asset engine (e.g. different
directories in case of Amber). However, if this works OK during listing/initial linking,
it makes things way more complicated later in asset management, since asset uuid is no more
enough to unically indentify an asset!

Now an asset UUID is assumed to be really unique inside an asset engine.

For Amber, we 'salt' assets' uuids with new repo uuids (both being only 2 ints long now),
and keep a config 'cache' of mapping repo uuid -> path to repo.
2016-05-02 20:35:08 +02:00
a47653e5d4 Merge branch 'master' into asset-engine 2016-05-02 14:31:25 +02:00
dd63b849f8 Merge branch 'master' into id-remap 2016-05-02 14:28:49 +02:00
266d99ee42 More WIP code for actual assets reload.
Nothing working yet, need to solve some issue with rootpath actually...
2016-04-28 23:15:46 +02:00
5ad251770b Merge branch 'asset-engine' into asset-experiments 2016-04-28 22:40:03 +02:00
6c478490ea Refactor load_pre helper to work from both DirEntries and uuids... 2016-04-28 22:39:12 +02:00
e451d9b56a WIP (mostly empty for now) code to actually reload assets reported as needing it by update_check. 2016-04-28 21:44:59 +02:00
8bf511ef0b Merge branch 'asset-engine' into asset-experiments 2016-04-28 21:34:46 +02:00
ef14700089 Cleanup: get rid of blocking asset update_check code. 2016-04-28 21:32:32 +02:00
20bf7d949f Some refactor in asset update_check code.
Fetching assets' uuids by engines is now in own func (will be used by update op itself too).

Also, each AssetRef has only *one* asset ID, the first one, avoids us a useless loop!

And early out of update_check op in case we have no asset in current Main, no need to start
job in this case.
2016-04-28 21:30:14 +02:00
60cd55692d Merge branch 'asset-engine' into asset-experiments 2016-04-27 13:16:04 +02:00
b3be710e19 Some tweaks to flags & versionning handling for assets update check. 2016-04-27 13:15:39 +02:00
03d23c42a2 Merge branch 'master' into asset-experiments 2016-04-27 11:02:04 +02:00
42ea7490e5 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_files_link.c
	source/blender/windowmanager/wm_files.h
2016-04-27 11:01:48 +02:00
d4a9111f08 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-27 10:58:41 +02:00
e812fb4825 Add some header info about asset errors or reload needs.
Again, rather rough UI but enough to be useful for now.
2016-04-26 16:42:00 +02:00
cf08eec187 Add simple dummy code in outliner to show assets and their status.
This is purely WIP helper stuff, final UI will need real work - but that's for later.
2016-04-26 16:02:51 +02:00
32c83ba950 Merge branch 'master' into asset-engine 2016-04-26 14:42:05 +02:00
c2a5f95122 Merge branch 'master' into id-remap 2016-04-26 14:33:54 +02:00
b1c715a5fa Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/blender.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_init_exit.c
2016-04-25 16:55:41 +02:00
60474d11c7 Merge branch 'master' into id-remap 2016-04-25 16:41:26 +02:00
6e1fdd6f2d Actually hook async job of asset updating! 2016-04-20 17:11:14 +02:00
6cdc7c9587 Add 'ensure_uuids' callback to API, fix some flags in RNA code. 2016-04-20 17:08:42 +02:00
8154ee7bb2 Make opening .blend file use new async 'check asset updates' operator.
Nothing much exciting really, just not blocking anymore.
2016-04-20 16:44:07 +02:00
68eaa00290 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-19 23:21:05 +02:00
8055eae905 Merge branch 'master' into id-remap
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-04-19 23:03:53 +02:00
7cb1438035 Asset update: WIP proof-of-concept async (job-based) update code.
Builds, but not tested nor hoocked to anything yet!
2016-04-19 13:07:33 +02:00
e1c0b2ff25 Merge branch 'master' into asset-engine 2016-04-16 15:02:16 +02:00
54307d778d Merge branch 'master' into id-remap 2016-04-16 14:59:16 +02:00
1d40cfafea Move core of update check to BKE's asset area, add an operator for that too. 2016-04-15 10:38:49 +02:00
f36307db4b Merge branch 'master' into asset-engine 2016-04-12 12:30:40 +02:00
9437647f5d Merge branch 'master' into id-remap 2016-04-12 12:21:00 +02:00
9804f9181f Make 'check update' async, and add possibilities for engines to make async callbacks 'immediate'.
So now, jobs callback (async ones) of asset may return a specific job id value in case they actually
complete (or fail) on the first run.

This allows engines that do not need slow async stuff to perform an action to use simpler code
(e.g. imagine an engine able to list its assets from a cached DB, in most cases its list_dir
callback can execute instantaneously (from a user PoV), no need for a listing job then).
2016-04-11 17:35:31 +02:00
09f134aa6c Make asset engine's load_pre callback mandatory now.
Reason is, even if paths returned by `list_dir` are OK, we will also use `load_pre`
during 'reload'/'update' scenarii, where we only have uuids, to retrieve final
.blend datablock paths.
2016-04-11 16:14:05 +02:00
cb926ab6c9 Merge branch 'master' into asset-engine 2016-04-09 15:44:26 +02:00
28382bad00 Merge branch 'master' into id-remap 2016-04-09 15:41:46 +02:00
5b67ec9c9f Always reset to default asset engine (i.e. regular filebrowser code) when opening a new browser.
Else we'd have the last used engine even when saving a .blend or picture, ugly!
2016-04-07 16:35:34 +02:00
7dea5c2462 Finish implementing 'reports' in asset engine (not used yet). 2016-04-07 16:18:42 +02:00
f53c4dd29e Some minor fixes/updates of AE API comments. 2016-04-07 15:50:53 +02:00
1e3d75604d Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/blender.c
2016-04-07 15:26:32 +02:00
897249b254 Merge branch 'id-remap' into asset-experiments 2016-04-07 15:25:42 +02:00
718f8fe55f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_library_query.h
	source/blender/blenkernel/intern/blender.c
	source/blender/blenkernel/intern/library_query.c
2016-04-07 15:25:23 +02:00
698b15538b Fix issue with uuid generation in Amber. 2016-04-06 18:05:02 +02:00
aec80da8f8 More or less finished shell of 'update' code.
Code only reports which datablocks/assets shall be reloaded etc. so far, actual
reloading needs id-remap code (and hence will be implemented in asset-experiment
branch later).
2016-04-06 17:38:12 +02:00
9a31359e07 Merge branch 'master' into asset-engine 2016-04-06 15:23:45 +02:00
b111e0f645 Merge branch 'master' into id-remap 2016-04-06 15:16:39 +02:00
8b81b71cf2 Merge branch 'master' into asset-engine 2016-04-04 14:45:52 +02:00
46206fd9a5 Merge branch 'master' into id-remap 2016-04-04 14:39:59 +02:00
96aa445527 Add a 'check_dir' callback to asset engines, allowing them to control current 'root dir'.
Note that this is hacked around bpyrna incapacity to handle strings as return values of functions callbacks...
2016-03-31 20:50:29 +02:00
d63895ee30 Merge branch 'master' into asset-engine 2016-03-30 21:39:09 +02:00
f820643e9f Merge branch 'master' into id-remap 2016-03-30 21:37:49 +02:00
e9d7c741ca Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-03-30 21:31:21 +02:00
826ba124b6 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-03-30 21:10:10 +02:00
0ab784332a Merge branch 'libquery-recursive' into asset-engine 2016-03-23 17:16:52 +01:00
cab4bd90c1 Merge branch 'master' into asset-engine 2016-03-23 17:16:45 +01:00
c1452617fb Merge branch 'libquery-recursive' into id-remap 2016-03-23 17:08:32 +01:00
50d2c7f8f4 Merge branch 'master' into id-remap 2016-03-23 17:08:26 +01:00
f0f46e9ef6 Rework library_query foreach looper - add optional recursivity.
This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Used this new recursive behavior in ID preview generation as an example, would obviously be committed separately.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1869
2016-03-23 13:15:41 +01:00
be5c2a5266 Finish RNA flags for asset UUIDs! 2016-03-17 14:54:29 +01:00
484f1bc226 Merge branch 'libquery-recursive' into asset-engine 2016-03-17 12:52:10 +01:00
97cb96720c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/blender.c
2016-03-17 12:51:53 +01:00
37c4db1125 Merge branch 'libquery-recursive' into id-remap 2016-03-17 12:26:34 +01:00
cb770e58ad Merge branch 'master' into id-remap 2016-03-17 12:26:25 +01:00
09444bca5f Merge branch 'master' into libquery-recursive 2016-03-17 12:23:42 +01:00
a639446614 More WIP work towards designing Updated feature for assets/engines. 2016-03-09 20:33:38 +01:00
22f5772b44 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/creator/creator.c
2016-03-07 16:42:19 +01:00
8403577397 Merge branch 'id-remap' into asset-experiments 2016-03-07 15:37:43 +01:00
ebe52b71a5 Merge branch 'libquery-recursive' into asset-experiments 2016-03-07 15:37:35 +01:00
59aeb07895 Merge branch 'master' into asset-experiments
Conflicts:
	source/creator/creator.c
2016-03-07 15:37:22 +01:00
b0a541a76c Slightly modified way to check for assets on loadfile.
Since we now build a list of assets and their dependencies in Library datablocks, use it!
2016-03-07 15:03:28 +01:00
c93a86909c Merge branch 'libquery-recursive' into asset-engine 2016-03-06 14:57:20 +01:00
204ec489b8 Merge branch 'master' into asset-engine 2016-03-06 14:57:10 +01:00
873e90be65 Merge branch 'libquery-recursive' into id-remap 2016-03-06 14:54:06 +01:00
30b90cbb01 Merge branch 'master' into id-remap 2016-03-06 14:53:57 +01:00
f500019eac Merge branch 'master' into libquery-recursive 2016-03-06 14:51:03 +01:00
3cfea6eadc Merge branch 'libquery-recursive' into asset-engine 2016-03-04 14:35:18 +01:00
304cdfa476 Merge branch 'master' into asset-engine 2016-03-04 14:35:05 +01:00
cea847738a Merge branch 'libquery-recursive' into id-remap 2016-03-04 14:25:27 +01:00
bb3d3cc9cf Merge branch 'master' into id-remap 2016-03-04 14:25:20 +01:00
3d4ac80157 Merge branch 'master' into libquery-recursive 2016-03-04 14:24:59 +01:00
8b4997c6c7 WIP dummy code to update assets on file (re)load.
Actual code will be implemented in asset-experiment (we need id-remap code for this),
but will first try to define dummy API in this branch.
2016-03-01 16:58:31 +01:00
beff4ca725 Merge branch 'libquery-recursive' into asset-engine 2016-02-29 15:33:21 +01:00
982dd93357 Merge branch 'master' into asset-engine 2016-02-29 15:33:07 +01:00
2fa8db4ec6 Merge branch 'libquery-recursive' into id-remap 2016-02-29 15:21:54 +01:00
fa4d7deac0 Merge branch 'master' into id-remap 2016-02-29 15:21:39 +01:00
2a09cb62e2 Merge branch 'master' into libquery-recursive 2016-02-29 15:15:49 +01:00
0588ca9c08 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_operators.c
2016-02-25 15:07:27 +01:00
bb75900289 Merge branch 'id-remap' into asset-experiments 2016-02-25 14:55:56 +01:00
49e2a441cb Merge branch 'libquery-recursive' into asset-engine 2016-02-25 14:45:49 +01:00
ae9ae24c95 Merge branch 'libquery-recursive' into id-remap 2016-02-25 14:43:04 +01:00
d1dd9b6261 Merge branch 'master' into id-remap 2016-02-25 14:42:55 +01:00
5b5f55067b Merge branch 'master' into libquery-recursive 2016-02-25 14:21:30 +01:00
37f58ffec9 Forgot to include AnimationData into new recursive libquery foreach... 2016-02-25 14:20:58 +01:00
59a1340714 Add asset dependencies (re)build.
Is rebuilt when we link a new asset, or when we (re)load a .blend file.
Runtime data only, not saved in .blend file.
2016-02-24 20:42:58 +01:00
adfd89d9bd Merge branch 'libquery-recursive' into asset-engine 2016-02-24 10:35:00 +01:00
85959e8b4a Merge branch 'master' into asset-engine 2016-02-24 10:34:50 +01:00
c448d4422e Merge branch 'libquery-recursive' into id-remap 2016-02-24 10:34:14 +01:00
3dfd063697 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-02-24 10:26:50 +01:00
e714e1c5ef Merge branch 'master' into libquery-recursive 2016-02-24 10:18:38 +01:00
3054a8a91b Merge branch 'master' into libquery-recursive 2016-02-20 18:06:13 +01:00
dc34313dc9 Merge branch 'libquery-recursive' into asset-engine 2016-02-19 10:53:52 +01:00
afdf2a3fb2 Merge branch 'master' into asset-engine 2016-02-19 10:53:38 +01:00
aabe83d4c0 Merge branch 'libquery-recursive' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-02-19 10:50:26 +01:00
9bb32dd445 Merge branch 'master' into id-remap 2016-02-19 10:48:24 +01:00
87a385b838 Cleanup (remove some useless diff compared to master). 2016-02-19 10:47:32 +01:00
3652a0e7da Merge branch 'master' into libquery-recursive 2016-02-19 10:29:18 +01:00
b6022f1488 Fix for new libquery callback API. 2016-02-18 23:11:03 +01:00
6a951054d0 Merge branch 'libquery-recursive' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-02-18 18:10:57 +01:00
6ec0026f8d Merge branch 'libquery-recursive' into asset-engine 2016-02-18 17:56:58 +01:00
827b1457ca Rework library_query foreach looper - add optional recursivity.
This commit:
* Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually
  stop in helper functions too, and jumping to a finalize label instead of raw return, to
  allow propper clean up).
* Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp
  from recursion. Note that this implies 'readonly', modifying IDs while recursing is not
  something we want to support!
* Changes callback signature/expected behavior: return behavior is now handled through flags,
  and 'parent' ID of id_pp is also passed (since it may not always be root id anymore).

Used this new recursive behavior in ID preview generation as an example, still needs more testing!
2016-02-18 17:53:42 +01:00
40562d0e11 Merge branch 'master' into asset-engine 2016-02-18 17:35:12 +01:00
cd43bd241f Merge branch 'master' into asset-engine 2016-02-16 14:35:54 +01:00
a9054360c6 Merge branch 'master' into id-remap 2016-02-15 19:46:24 +01:00
66375326b4 Merge branch 'master' into asset-engine 2016-02-15 19:39:57 +01:00
3eefdc0ed7 WIP Add asset sub-data dependency info.
We need that info (knowing which non-asset IDs are used by which asset-IDs),
otherwise managing reloading, updates etc. of assets would be impossible
(or rather, would leave a mess of unused IDs behind them).
Only partially done, non-functional yet.

This commit also adds asset repository references in libraries.
2016-02-15 16:52:12 +01:00
14d11c1609 Merge branch 'asset-engine' into asset-experiments 2016-02-14 20:31:37 +01:00
6b61c25815 Merge branch 'id-remap' into asset-experiments 2016-02-14 20:31:31 +01:00
576eca8ab3 Merge branch 'master' into asset-engine 2016-02-14 20:27:48 +01:00
ad72025611 Merge branch 'master' into id-remap 2016-02-14 20:24:53 +01:00
65e357fe56 Merge branch 'asset-engine' into asset-experiments 2016-02-12 10:06:03 +01:00
46903fbccf Merge branch 'id-remap' into asset-experiments 2016-02-12 10:05:56 +01:00
ac2e25986c Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-02-12 10:05:28 +01:00
71b65b417c Merge branch 'master' into id-remap 2016-02-12 09:55:22 +01:00
30db6e0cb7 Merge branch 'master' into asset-engine 2016-02-03 10:06:45 +01:00
2ca8421987 Assets: add uuid to linked data, write and read it from file.
Note that this is only very first steps, I think we'll need to 'propagate'
uuid to all data used/linked by asset itself, otherwise most things won't get
updated/reloaded. Still have to think about this.
2016-02-02 14:14:15 +01:00
11c6fed3ee Merge branch 'master' into asset-engine 2016-02-02 14:10:27 +01:00
f3de9752fd Merge branch 'id-remap' into asset-experiments 2016-02-01 14:05:11 +01:00
1b34246af2 Merge branch 'master' into id-remap 2016-02-01 14:04:48 +01:00
dded3bb21f Merge branch 'asset-engine' into asset-experiments 2016-01-31 15:09:24 +01:00
3f63cb8843 Merge branch 'id-remap' into asset-experiments 2016-01-31 15:09:17 +01:00
d1b4471012 Merge branch 'master' into asset-engine 2016-01-31 15:05:09 +01:00
5b16d59ffc Merge branch 'master' into id-remap 2016-01-31 14:59:57 +01:00
f1fc8959db Assets: add uuid to linked data, write and read it from file.
Note that this is only very first steps, I think we'll need to 'propagate'
uuid to all data used/linked by asset itself, otherwise most things won't get
updated/reloaded. Still have to think about this.
2016-01-21 16:12:08 +01:00
955cb4a8db Merge branch 'asset-engine' into asset-experiments 2016-01-21 09:46:46 +01:00
351f74dee9 Merge branch 'id-remap' into asset-experiments 2016-01-21 09:46:39 +01:00
da81c78fc7 Merge branch 'master' into asset-engine 2016-01-21 09:45:52 +01:00
911095d372 Merge branch 'master' into id-remap
Conflicts:
	source/blender/editors/space_outliner/outliner_tools.c
2016-01-21 09:45:18 +01:00
d9a93eb3bd Merge branch 'asset-engine' into asset-experiments 2016-01-20 15:31:01 +01:00
27470754b6 Merge branch 'id-remap' into asset-experiments 2016-01-20 15:30:53 +01:00
6b1065b11c Merge branch 'master' into asset-engine 2016-01-20 15:02:49 +01:00
1705fd66d8 Merge branch 'master' into id-remap 2016-01-20 15:02:29 +01:00
28adc7d248 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2016-01-20 14:27:45 +01:00
f4214d1d1c Merge branch 'asset-engine' into asset-experiments 2016-01-15 16:31:13 +01:00
48f9931257 Merge branch 'id-remap' into asset-experiments 2016-01-15 16:31:06 +01:00
a0803fabfe Merge branch 'master' into asset-engine 2016-01-15 16:24:55 +01:00
6eec8eaa57 Merge branch 'master' into id-remap 2016-01-15 15:26:34 +01:00
498b712a37 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2016-01-14 20:32:03 +01:00
0fa187e4b5 Fix handling of asset uuid in WMLinkAppendDataItem helper struct.
We need a pointer here (reduces mem footprint, and allows to say 'we have no uuid' with a NULL value!).
2016-01-14 20:29:40 +01:00
a9284fd093 Merge branch 'asset-engine' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:23:06 +01:00
8af7d783c7 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:21:34 +01:00
a7cfb5fc22 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-12 16:08:05 +01:00
a414edc0af Merge branch 'master' into id-remap 2016-01-12 16:01:17 +01:00
4c535c07c6 Fix & cleanup in outliner area.
Now all new entries in items' menus should behave correctly!
2016-01-07 21:47:47 +01:00
22f5a17b9c Fix some bad id->flag/tag mismatch from not-so-recent merge with master... 2016-01-07 16:14:16 +01:00
07b8b90f39 Fix assert when deleting obdata.
Issue here is again with NEVER_NULL usages: obdata (& co) would be dereferenced twice.

I'm not totally happy with this solution, ideally remap should never leave Main
in invalid state, but for now it will do...
2016-01-07 16:11:14 +01:00
5a65830830 Fix a crash when deleting a lib featuring some proxyob source... 2016-01-07 14:51:37 +01:00
f2db96fbaf Merge branch 'master' into id-remap 2016-01-07 10:28:55 +01:00
2e8297108d Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library_query.h
	source/blender/blenkernel/intern/library_query.c
	source/blender/makesrna/intern/rna_ID.c
2016-01-06 21:40:12 +01:00
eaa892c14f Merge branch 'asset-engine' into asset-experiments 2016-01-04 20:41:15 +01:00
f3077f411d Merge branch 'id-remap' into asset-experiments 2016-01-04 20:41:08 +01:00
46e6f3b420 Merge branch 'master' into asset-engine 2016-01-04 20:35:05 +01:00
fc7f086f4b Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2016-01-04 20:34:31 +01:00
74393f8f15 Merge branch 'asset-engine' into asset-experiments 2016-01-04 12:10:26 +01:00
9c3e0b558c Merge branch 'id-remap' into asset-experiments 2016-01-04 12:10:19 +01:00
e49966dd96 Merge branch 'master' into asset-engine 2016-01-04 11:55:56 +01:00
e921ecabaf Merge branch 'master' into id-remap 2016-01-04 10:58:39 +01:00
e58cae1b7a Merge branch 'asset-engine' into asset-experiments 2015-12-31 12:56:53 +01:00
e28986aa8f Merge branch 'id-remap' into asset-experiments 2015-12-31 12:56:45 +01:00
19e6c23b75 Merge branch 'master' into asset-engine 2015-12-31 12:50:34 +01:00
9ae928ff9d Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/BKE_material.h
2015-12-31 12:50:08 +01:00
b40d4ba517 Merge branch 'asset-engine' into asset-experiments 2015-12-27 13:09:54 +01:00
8d3129cba2 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-27 13:09:42 +01:00
009ccfecb6 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/blenkernel/intern/library.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-27 13:06:34 +01:00
f4e7fec73c Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/makesdna/DNA_ID.h
2015-12-27 12:54:57 +01:00
a6e9aba17f Merge branch 'master' into id-remap 2015-12-20 15:41:27 +01:00
b9c5da9ba8 Merge branch 'master' into id-remap
Conflicts:
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_intern.h
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-18 22:17:25 +01:00
4eaa6c4a7b Merge branch 'master' into id-remap 2015-12-18 21:23:27 +01:00
b46b921738 Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
2015-12-17 19:39:05 +01:00
dab1a1dd5f Merge main remap funcs' bool parameters into a single bitflag.
Too much bools kill bools.
2015-12-17 19:32:33 +01:00
24556b3c3d More cleanup - remove unused stuff, some simplifications. 2015-12-17 14:56:15 +01:00
817fee305f Cleanup: mostly removes useless diff from master. 2015-12-17 13:21:18 +01:00
613bf6755e Merge branch 'id-remap' into asset-experiments
Conflicts:
	source/blender/blenloader/BLO_readfile.h
	source/blender/blenloader/intern/readfile.c
	source/blender/windowmanager/intern/wm_operators.c
2015-12-16 22:28:31 +01:00
f2ce01f844 Merge branch 'asset-engine' into asset-experiments 2015-12-16 21:50:17 +01:00
3de18048b3 Merge branch 'master' into asset-experiments 2015-12-16 21:50:02 +01:00
d02c201814 Merge branch 'master' into asset-engine 2015-12-16 21:39:49 +01:00
c089f28504 Merge branch 'master' into id-remap 2015-12-16 21:34:04 +01:00
cddbeaeec8 Merge branch 'master' into asset-engine 2015-12-14 16:26:49 +01:00
d0b037d0ef Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/text.c
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-14 16:26:14 +01:00
8bbfd2729a Merge branch 'master' into id-remap 2015-12-07 17:45:41 +01:00
6dffedc75e Fix several issues with logic of core id-remap:
* We need to clear the 'user-one' flags and potential usercount for old_id.
* We need to consider ID usages inside a same lib as **never** being indirect ones.

Also re-enabled proxy checking for now (not sure why I commented it, think testing stuff or so...).
2015-12-07 17:33:35 +01:00
49b67b58aa Fix id-remap looper not 'freeing' 'use-one' id usercount. 2015-12-07 15:54:03 +01:00
67cc51d32d Merge branch 'master' into id-remap 2015-12-07 11:01:09 +01:00
574d63cf65 Merge branch 'master' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_intern.h
	source/blender/editors/space_file/file_ops.c
2015-12-07 11:00:38 +01:00
05bd9572a6 Some more fixes, and make Outliner's delete available for all IDs, not only libraries! 2015-12-04 17:48:00 +01:00
56679ae31c Merge branch 'master' into id-remap 2015-12-04 17:24:43 +01:00
705a247e2e Better handling of usercount during ID deletion, also add this to ID RNA API.
Seems to work for simple cases, but deletion of complex libs from complex files
(Gooseberry ones) still generates lots of assert failures, and crashes in some cases.
2015-12-03 16:34:11 +01:00
e8b46461e6 Merge branch 'master' into id-remap 2015-12-03 14:25:05 +01:00
9584c88b6b Fix a bunch of more stuff, more correct handling of ID/Lib deletion...
Still have some usercount issues here, though things seems to start working...
2015-12-01 21:37:25 +01:00
84d25cb87a Merge branch 'master' into id-remap.
Also, changing how library delete works (not functional currently).

Conflicts:
	source/blender/editors/space_outliner/outliner_edit.c
	source/blender/editors/space_outliner/outliner_ops.c
	source/blender/editors/space_outliner/outliner_tools.c
2015-12-01 17:45:22 +01:00
1da2edfb25 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library_query.c
2015-11-30 15:38:42 +01:00
6f90aa2016 Fix issue when reloading a lib with selected object. 2015-11-30 10:48:55 +01:00
81edad9966 Merge branch 'master' into id-remap 2015-11-28 21:45:12 +01:00
3319e460e6 Merge branch 'master' into id-remap 2015-11-28 15:00:57 +01:00
f66e14611d Attempt to fix RNA nightmare with ListBase used as Collection return type for functions.
This is hacky to make work on Linux, and seems to totally break on Windows.

So now, instead, we define a CollectionListBase (exact copy of ListBase), to be used inside RNA...

Seems to work nicely on Linux, lets see what win buildbot says.
2015-11-26 15:26:05 +01:00
7ce594b544 Merge branch 'master' into id-remap 2015-11-26 15:04:45 +01:00
a0df6ce03b Merge branch 'master' into id-remap 2015-11-26 12:42:56 +01:00
df10b4d7a8 Fix mysterious AC IDs refcount issue when reloading some gooseberry files' libs.
Turned out our libquery ID looper was ignoring constraints' 'reference' parameter in callback, grrr...
2015-11-26 12:00:50 +01:00
bfad4bba7a Add helpers to BKE_library_query to find which datablocks are using/referencing a given ID.
Also expose this in RNA. Priceless to debug ID usages...
2015-11-25 20:48:22 +01:00
d35d72893e Merge branch 'master' into id-remap 2015-11-25 16:23:22 +01:00
b47b035f57 Merge branch 'master' into id-remap 2015-11-25 15:16:26 +01:00
0c161e23d9 Merge branch 'master' into id-remap 2015-11-25 12:48:38 +01:00
a6df054b02 Merge branch 'master' into id-remap 2015-11-24 15:52:04 +01:00
7fa92ad950 Merge branch 'master' into id-remap 2015-11-24 09:50:29 +01:00
91be63e127 Merge branch 'master' into id-remap 2015-11-23 14:21:50 +01:00
387b120579 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenloader/intern/readfile.c
2015-11-19 22:39:11 +01:00
f1a7118c04 Add missing AnimData ID to foreach_ID_loop.
Atempt to fix missing action remapping, but no luck so far. :|
2015-11-12 11:50:01 +01:00
c9df632175 Merge branch 'master' into id-remap 2015-11-12 09:54:20 +01:00
11d4cbb04c Merge branch 'master' into id-remap 2015-11-11 20:22:02 +01:00
e74ce5bd86 Merge branch 'master' into id-remap 2015-11-11 19:53:14 +01:00
ab5a591f91 Do not try to reload directly non-linkable datablocks (shapekeys),
those will get reloaded by 'owner' mesh anyway.

Why, why, why are shapekeys datablocks???
2015-11-11 18:12:08 +01:00
483247d756 Fix Text usage by TextEditor (USER_REAL, not USER_ONE). 2015-11-11 17:43:26 +01:00
ded1333f3c Rework a bit IDRemap struct to separate input flags from output status, and fix
issues with unlinking ParticleSettings.

We now have the option to still decrement user count of old_id, even if we could not
replace it with NULL new_id (aka unlinking), needed to keep proper user count when
unlinking and ID from datablocks it uses, to delete it.
2015-11-11 16:52:15 +01:00
4cf00de7d4 Merge branch 'master' into id-remap 2015-11-11 16:15:53 +01:00
61bad3cfe0 Merge branch 'master' into id-remap 2015-11-11 15:06:32 +01:00
75c5f6135c Silence a bit debug prints! 2015-11-11 12:44:47 +01:00
73c8d3abcc Merge branch 'master' into id-remap 2015-11-11 12:43:51 +01:00
12292d441d Merge branch 'master' into id-remap 2015-11-11 11:49:33 +01:00
9e6cdd8e3a Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/BKE_library.h
	source/blender/blenkernel/intern/library.c

Also clears now useless 'bool is_user_one' flag from editors' ID remap callback.
2015-11-11 10:48:11 +01:00
7a62ac4127 Some minor tweaks. 2015-11-10 20:15:01 +01:00
d2913c1409 Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/object.c
2015-11-10 19:59:44 +01:00
5f0299898d Hopefully fix the 'real user' nightmare.
Idea is to add two new flags, one saying 'we need to ensure a real user exists',
the other 'we had to increment user count to ensure we have a real user'.

This allows us to easily control the extra user in release/delete/remap cases,
and also fixes the infamous 'add new image to texture, open image in ImageEditor,
delete image from texture, have a zero-user red image in Image Editor' issue.

There is still much to be done here, more places where we can use those flags,
also clear them when we force usercount to zero, etc.

All this allows us to fix unsolvable issues (like Group being ensure_user'ed
in loading code, but only if they do have objects in them), and to avoid returning
ugly bool from editors' callbacks (this is still to be cleaned up in the branch too).

Bad news - this means we cannot use short ID->flag anymore (not enough flags), for now
added a new int ID->flag2 (replacing pad int), not sure how to best manage change here,
maybe for 2.8 we can totally wipe ID->flag? But this would totally break forward compat.
2015-11-10 16:56:54 +01:00
9ddc60bc10 Merge branch 'master' into id-remap 2015-11-10 16:21:37 +01:00
959e2e8cfe Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/library.c
2015-11-10 14:51:42 +01:00
965d9649c4 Minor update/cleanup on usercount, from work done in master. 2015-11-10 14:47:38 +01:00
033a89957c Merge branch 'master' into id-remap
Conflicts:
	source/blender/blenkernel/intern/curve.c
	source/blender/blenkernel/intern/linestyle.c
	source/blender/blenkernel/intern/material.c
	source/blender/blenkernel/intern/mball.c
	source/blender/blenkernel/intern/mesh.c
	source/blender/blenkernel/intern/object.c
	source/blender/blenkernel/intern/particle.c
	source/blender/blenkernel/intern/scene.c
	source/blender/blenkernel/intern/world.c
2015-11-10 12:45:42 +01:00
e43d70a60f Merge branch 'master' into id-remap 2015-11-08 17:59:08 +01:00
7f53cbb556 Cleanup: get rid of bmain in foreach ID callback.
messing with depsgraph here is not a good idea I think... and makes things simpler!
2015-11-07 11:31:28 +01:00
8b6928b2fb Merge branch 'master' into id-remap 2015-11-07 10:54:48 +01:00
f0c6c85788 Attempt to fix the 'user_one' mess...
Seems to work (though will need much more tests), but makes code more ugly. :|
2015-11-06 18:00:09 +01:00
0c8b1a8c37 Merge branch 'master' into id-remap 2015-11-06 12:35:45 +01:00
77231eeb2f Merge branch 'master' into asset-engine 2015-11-02 19:27:48 +01:00
9521d71735 Merge branch 'master' into id-remap 2015-11-02 19:22:14 +01:00
3ad17b9405 Merge branch 'master' into asset-engine 2015-10-27 15:05:17 +01:00
6bf915e925 Merge branch 'master' into id-remap 2015-10-27 15:04:51 +01:00
c7f48be47c Merge branch 'master' into asset-engine 2015-10-17 11:47:35 +02:00
2d7bc36462 Merge branch 'missing-libs' into id-remap 2015-10-17 11:39:48 +02:00
177295f856 Merge branch 'master' into missing-libs 2015-10-17 11:34:29 +02:00
06b38491f1 Merge branch 'master' into asset-engine 2015-10-15 17:13:29 +02:00
de71f7ab8a Fix deadlock. Would be really cool if Main spinlock could be re-entrant. :| 2015-10-15 17:03:54 +02:00
6da735e81c Merge branch 'missing-libs' into id-remap 2015-10-15 16:55:43 +02:00
59ff3b5498 Merge branch 'master' into missing-libs 2015-10-15 16:12:57 +02:00
9a9796564a Fix broken ID placeholder code (from recent merges).
Here we need a bit different handling than in missing-lib branch...
2015-10-15 15:33:24 +02:00
a2aafbe656 Merge branch 'master' into asset-engine 2015-10-15 14:29:50 +02:00
d899710952 Merge branch 'missing-libs' into id-remap
Huge load of conflicts, hope it did not break too much things...
Current code build, but crashes easily :|
2015-10-14 21:24:14 +02:00
a6028f8e6b Merge branch 'master' into id-remap 2015-10-14 20:38:27 +02:00
3ffc5c9209 Moar cleanup. 2015-10-14 20:24:05 +02:00
f15741f830 Merge branch 'master' into missing-libs 2015-10-14 17:17:30 +02:00
b89530845a Cleanup. 2015-10-14 16:22:57 +02:00
4dac0afa9c Merge branch 'free-refcount-ids' into missing-libs 2015-10-13 15:48:18 +02:00
168604ecbe Revert to master - those changes are globally valid, but remain incomplete,
and total new code is being done in id-remap anyway, not worth bothering with this for now...
2015-10-13 15:44:58 +02:00
9d5cdf92b2 Merge branch 'master' into free-refcount-ids 2015-10-13 15:41:54 +02:00
67d922f61a Merge branch 'master' into free-refcount-ids 2015-10-13 14:41:33 +02:00
4ed3a36e31 Merge branch 'missing-libs' into id-remap 2015-10-12 21:01:53 +02:00
9442a43853 Merge branch 'free-refcount-ids' into id-remap 2015-10-12 21:00:47 +02:00
13faefaf6a Merge branch 'master' into id-remap 2015-10-12 21:00:02 +02:00
5f2276a553 Merge branch 'free-refcount-ids' into missing-libs 2015-10-12 20:46:28 +02:00
e95ba11ce6 Merge branch 'master' into free-refcount-ids 2015-10-12 20:31:39 +02:00
7d1e429d7c Attempt to fix the NodeTree issue.
So, idea is, since mat/tex/scene/etc. nodetrees are owned by their respective IDs
(those nodetree do not exist in Main, they are systematically freed with their ower IDs, etc.),
we should not treat them as IDs in IDlooper, but rather as mere sub-data, and hence directly
loop over the IDs of those nodetrees.

From quick check it seems to work, but this needs to be confirmed as a valid idea!
2015-10-08 20:35:47 +02:00
cb08f47121 Merge branch 'master' into id-remap 2015-10-08 15:18:08 +02:00
84c6bcac0d Merge branch 'master' into id-remap 2015-10-08 13:15:29 +02:00
74ac2beba2 Again, fix for stupid broken relinking of Objects... 2015-10-08 13:07:06 +02:00
741ceed378 Fix stupid crash... 2015-10-08 12:54:10 +02:00
f0ffe42858 Merge branch 'missing-libs' into id-remap 2015-10-08 12:45:48 +02:00
d8a171f8a7 Merge branch 'lib-link-rework-temp' into id-remap 2015-10-08 12:44:35 +02:00
d4b5b8f1bc Merge branch 'free-refcount-ids' into id-remap 2015-10-08 12:44:28 +02:00
e0c7dcba5b Merge branch 'master' into id-remap 2015-10-08 12:43:41 +02:00
6188d17623 Merge branch 'lib-link-rework-temp' into missing-libs 2015-10-08 12:13:43 +02:00
a219728914 Merge branch 'free-refcount-ids' into missing-libs 2015-10-08 12:13:28 +02:00
92bcc7dd19 Merge branch 'master' into missing-libs 2015-10-08 12:08:29 +02:00
32d9f75660 Merge branch 'master' into lib-link-rework-temp 2015-10-08 12:06:57 +02:00
249aa6c649 Merge branch 'master' into free-refcount-ids 2015-10-08 12:03:03 +02:00
f2293df9a6 Replace 'do_id_user' param of BKE_xxx_free() funcs by generic BKE_libblock_relink().
Heavily simplfies that freeing area, but again a rather risky and likely-to-break change.

At least, NodeTree is known to be a trouble-maker here, due to how it seems to be
'owned' by its mat/tex/sce/etc. Have to dig deeper here, this is still quite unclear
what exactly happens with those, and how to handle them correctly.
2015-10-07 23:15:03 +02:00
1daa502f87 Add BKE_libblock_relink(), which works as _libblock_remap(), but only over one given ID
(instead of whole Main content).

Could replace maybe things like constraint, rigisbody world, etc. '_relink' func,
but for now it's only intended to replace custom 'id releasing' code in _free()
funcs of all IDs!
2015-10-07 21:56:27 +02:00
06c6492d7d Avoid fexplicit conversion to ID * for remap parameters (use void pointers instead).
Also found another missing ID in foreach_id (sound pointer of sequences).
2015-10-07 21:10:50 +02:00
6ed0fcc187 Merge branch 'master' into id-remap 2015-10-07 20:56:54 +02:00
dca705d1c3 Huuuuuuuge commit - replace ugly scene/object/group_unlink by new generic libblock_unlink.
Previous situation was pretty much horrible, a few data types having their own coocking to
unlink, often doing more than only unlinking, often doing the same thing two times or more,
often messing with areas they should not have touched (like editors from withing BKE)...

Now we hope to have something generic, working the same way for all ID types
(we do have to add some specific handling for groups/objects/scene unfortunately,
but this remains reasonable).

Needless to say such a change is calling for troubles - I tried to follow and reproduce
as best as I could previous code, but most likely some areas will become buggy. Do not think
previous code was 100% correct anyway, things like Objects have a really big and complicated
usage of IDs...

Also, foreach_id tool has been enhanced, again for complex types like objects & co, we should
cover much better all possible IDs now (e.g. rigidbody & logic bricks were
totally missing from there).

And there is more to come...
2015-10-07 20:32:59 +02:00
ad8fa268a4 Adding game sensors/controllers/actuators to foreachid libquery.
Those were totally missing, cannot see a good reason for it...
Seems to work OK, but only very quickly tested code.
2015-10-07 10:31:36 +02:00
34c608d010 Make use of new IDWALK_REFCOUNTED flag in our ID remap code.
Think core of the system is getting pretty much OK, now we'll likely have to deal
with tons of specific cases, given how Blender is totally inconsistent when it comes to
handling user counts (e.g. spaceimage...).

Also, still have to make generic ID_unlink and ID_release_datablocks func to replace
redundant code in BKE we have currently.
2015-10-06 14:47:35 +02:00
b8e224507f Merge branch 'missing-libs' into id-remap 2015-10-06 12:25:56 +02:00
f3e2e92f5c Merge branch 'lib-link-rework-temp' into id-remap 2015-10-06 12:25:49 +02:00
64f0cd7b33 Merge branch 'free-refcount-ids' into id-remap 2015-10-06 12:25:38 +02:00
7a7b5bc6d3 Merge branch 'master' into missing-libs 2015-10-06 12:23:50 +02:00
2a3e261554 Merge branch 'master' into lib-link-rework-temp 2015-10-06 12:20:57 +02:00
913938514d Merge branch 'master' into free-refcount-ids 2015-10-06 12:19:29 +02:00
bb6da9cbea ID foreach: add support for modifiers to indicate whether given ID pointer is refcounted or not. 2015-10-05 16:30:33 +02:00
45b83f6fd5 Merge branch 'master' into id-remap 2015-10-05 16:00:33 +02:00
650efcf2d9 Update foreach ID (add a few missing IDs, and add new flag, REFCOUNTED, to indicate when a given ID pointer affects id->us count).
Still missing: at least modifiers (have to change all modifiers callbacks, yuck).
AFAIK constraints never refcount thier IDs so we can keep current code here.
2015-10-05 15:04:39 +02:00
09dcfbbe46 Merge branch 'free-refcount-ids' into id-remap 2015-10-05 13:58:49 +02:00
a33cc08a99 Fix for object freeing. 2015-10-05 13:58:21 +02:00
5327de0f40 Merge branch 'missing-libs' into id-remap 2015-10-05 12:32:19 +02:00
e0adc0b705 Merge branch 'lib-link-rework-temp' into id-remap 2015-10-05 12:32:10 +02:00
0548a1dc6f Merge branch 'free-refcount-ids' into id-remap 2015-10-05 12:32:00 +02:00
3b37921e01 Merge branch 'master' into id-remap 2015-10-05 12:31:52 +02:00
8bb7031dec Minor cleanup. 2015-10-05 12:17:51 +02:00
d7d236ce5c Merge branch 'master' into lib-link-rework-temp 2015-10-05 12:09:19 +02:00
a5d1709771 Merge branch 'master' into missing-libs 2015-10-05 12:05:50 +02:00
794a977bad Merge branch 'master' into free-refcount-ids 2015-10-05 12:05:00 +02:00
44e62635c5 Cleanup , and remove public '_release_datablocks' funcs for now.
On second thaought, will end up doing this differently in id-remap branch,
so for now just make this branch a cleanup, consistency-fixing one.
2015-10-05 10:59:38 +02:00
f00f3496a0 Merge branch 'master' into free-refcount-ids 2015-10-05 09:23:08 +02:00
d5f35c6c4e Merge branch 'free-refcount-ids' into id-remap 2015-10-03 19:22:35 +02:00
e2aab5750b Merge branch 'master' into asset-engine 2015-10-03 19:03:38 +02:00
a4c3d645ed Add note about object release func... 2015-10-01 17:44:02 +02:00
b63872cd5e Free IDs: MovieClip & Mask.
Mask freeing was doing really bad (as in, not consistent with other ID freeing code) things (unlinking, and even not freeing animdata!).
2015-10-01 17:38:04 +02:00
e734bef9d6 Free IDs: Nodes & Groups. 2015-10-01 17:13:16 +02:00
105c6a6c26 Free IDs: Action & Armature. 2015-10-01 16:57:28 +02:00
45f25c6241 Free IDs: Sound & Speaker.
Also cleanup, removed horrible `BKE_sound_delete()`!
2015-10-01 16:47:12 +02:00
1a8727fea0 Free IDs: vfont & text. 2015-10-01 16:34:09 +02:00
ad6495d14b ID free: another round of cleanup & fixes (mostly insconsitancies among IDs code)... 2015-09-30 21:59:24 +02:00
fe3c796c31 Free ID: Brush & World. 2015-09-30 21:34:57 +02:00
099eb3111e ID free: GP & particles... 2015-09-30 21:15:20 +02:00
dd266202b0 ID free: freestylelinestyle & other minor types, some cleanups (mostly use MEM_SAFE_FREE where possible). 2015-09-30 20:52:33 +02:00
1636b12d4d Merge branch 'master' into free-refcount-ids 2015-09-30 20:23:47 +02:00
9e64ad1ad5 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-30 20:23:14 +02:00
6fb87bc545 Merge branch 'master' into missing-libs 2015-09-30 20:23:07 +02:00
919a887399 Merge branch 'master' into lib-link-rework-temp 2015-09-30 20:22:37 +02:00
921a86b51f Free IDs; lattice & camera. 2015-09-27 15:50:28 +02:00
5b02b2429a Free IDs: images & lamps. 2015-09-27 15:28:57 +02:00
2282a80697 ID freeing: materials and textures. 2015-09-27 15:12:27 +02:00
931570b480 ID free: tackle Scene (and Library, but not much to do there). 2015-09-27 14:43:49 +02:00
063aea9124 Merge branch 'asset-experiments' into asset-engine 2015-09-27 11:30:21 +02:00
b5ee93c1a3 Merge branch 'master' into asset-engine 2015-09-27 11:30:08 +02:00
e6fa18cebf Merge branch 'master' into asset-experiments 2015-09-27 11:29:39 +02:00
0b4439994f Merge branch 'missing-libs' into id-remap 2015-09-27 11:28:20 +02:00
f330da10db Merge branch 'lib-link-rework-temp' into id-remap 2015-09-27 11:28:15 +02:00
53c28a790b Merge branch 'master' into id-remap 2015-09-27 11:28:07 +02:00
ff7b6d36e3 Merge branch 'master' into free-refcount-ids 2015-09-27 11:26:46 +02:00
0b8a47d1b0 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-27 11:24:50 +02:00
9960295484 Merge branch 'master' into missing-libs 2015-09-27 11:24:42 +02:00
113979e658 Merge branch 'master' into lib-link-rework-temp 2015-09-27 11:19:31 +02:00
c4a3c9d006 Merge branch 'free-refcount-ids' into id-remap 2015-09-24 20:49:58 +02:00
a7e540d7c8 Clean up BKE_object_free() and add BKE_object_release_datablocks().
Similar changed to those done for mesh/curve/mball.

Also, systematically nullify pointers in `_free()` functions, this does not cost
much and can help troubleshooting later.

And tag `BKE_object_unlink()` as an horrible piece of code...
2015-09-24 20:43:35 +02:00
56dae06c56 Cleanup of free/unlink/release of ID: mesh/curve/mball.
Renamed their `_unlink()` functions to `_release_datablocks()`, since they do not
unlink anything (not in the sense `BKE_object_unklink()` does, at least)!

Also, added a `const bool do_id_user` to their `_free()`, for consistency, now
relevant `_release_datablocks()` func only gets called when this option is set.
2015-09-24 19:53:38 +02:00
2cdd19de0b Merge branch 'missing-libs' into id-remap 2015-09-24 13:19:08 +02:00
96092913fb Merge branch 'lib-link-rework-temp' into id-remap 2015-09-24 13:18:59 +02:00
6e88990a4b Merge branch 'master' into id-remap 2015-09-24 13:18:51 +02:00
19f05f274a Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-24 13:15:24 +02:00
4c486c075e Merge branch 'master' into missing-libs 2015-09-24 13:14:48 +02:00
6b49cc1221 Merge branch 'master' into lib-link-rework-temp 2015-09-24 13:13:02 +02:00
4058333c49 Half-working workaround for image refcount in SpaceImage.
Our ID refcount handling is really flacky in many places, this is going to be a serious
issue for this work I'm afraid... :/
2015-09-24 13:10:20 +02:00
d5c69ffeb9 Fix bad handling of non-linkable IDs on reload.
They would be removed from bmain, but never added again nor freed - in this case
we can simply explicitely reload them in fact, non-linkable is only a user-related status...
2015-09-22 21:26:41 +02:00
8da4413ba3 Merge branch 'missing-libs' into id-remap 2015-09-22 10:03:37 +02:00
fc3822988c Merge branch 'lib-link-rework-temp' into id-remap 2015-09-22 10:03:23 +02:00
2665b3ee83 Merge branch 'master' into id-remap 2015-09-22 10:01:20 +02:00
5186e5a0c9 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-22 10:00:28 +02:00
cf7e75ad53 Merge branch 'master' into missing-libs 2015-09-22 10:00:20 +02:00
1b75f74086 We do not require anymore linking datablocks grouped by types, makes code even simpler. 2015-09-22 09:58:59 +02:00
7a5edf3b45 Merge branch 'master' into lib-link-rework-temp 2015-09-22 09:49:24 +02:00
2c0faad6d5 Minor picky fix... 2015-09-22 09:44:14 +02:00
a508d49e33 Better handling of missing datablocks in reload case.
We need to generate a placeholder for those here... Also, enhances handling
of direct/indirect flags & co.
2015-09-21 21:57:54 +02:00
5bc6608ea5 Merge branch 'missing-libs' into id-remap 2015-09-21 21:37:49 +02:00
06eb69b892 Correct handling of name in placeholder generator (this is a name, not an idname...). 2015-09-21 21:37:05 +02:00
9b9dbb5865 Merge branch 'missing-libs' into id-remap 2015-09-21 21:27:25 +02:00
f0d843cf56 Sort placeholder in its listbase! 2015-09-21 21:25:28 +02:00
47328499cb Merge branch 'missing-libs' into id-remap 2015-09-21 21:09:21 +02:00
62fdf030c6 Change ID placeholder generator to not need an ID as reference (we only need type, name and flag here). 2015-09-21 21:08:25 +02:00
db33f64a89 Fix cases where previously indirect lib becomes direct one after some relocate... 2015-09-21 20:48:31 +02:00
3f9a6f9fea Unlock around core of linking code in reload/relocate context too, for now. 2015-09-21 20:40:46 +02:00
d990888686 Fix for recent merges. 2015-09-21 18:11:26 +02:00
37e21ea855 Merge branch 'missing-libs' into id-remap 2015-09-21 18:04:38 +02:00
1d75fe5b95 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-21 18:04:17 +02:00
5a53d20efc Merge branch 'master' into id-remap 2015-09-21 18:04:08 +02:00
bcf4cc37ff Make placeholder ID creation its own function (we'll need it too in reload context...). 2015-09-21 18:02:56 +02:00
e6a84d5a48 Merge branch 'lib-link-rework-temp' into missing-libs 2015-09-21 17:50:27 +02:00
3391a5ed2f Merge branch 'master' into missing-libs 2015-09-21 17:48:12 +02:00
e91d614e4e Merge branch 'master' into lib-link-rework-temp 2015-09-21 17:46:09 +02:00
ac797f03ef Fix broken multi-lib linking, and remove Main locking around core linking code for now.
We need to append to linklist, or our library indices would be reversed compared to lib list...

As for locking, we need reentrant one here if we want to use it. :(
2015-09-21 17:42:32 +02:00
c18849bb1b Lock bmain around core part of linking code now, this is much safer imho!
This also means we need to ensure no code called from there tries to lock again bmain
(no reentrant spinlock, arg :/).
2015-09-21 16:35:29 +02:00
8cbc05c1cd Add reload lib code, and various fixes (some to be backported to other working branches actually). 2015-09-21 16:15:21 +02:00
99008d4841 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-21 15:11:17 +02:00
d02aa8c4fd Merge branch 'missing-libs' into id-remap 2015-09-21 15:11:10 +02:00
0e62a00bc4 Merge branch 'master' into id-remap 2015-09-21 15:11:00 +02:00
33b7772563 Merge branch 'master' into missing-libs 2015-09-21 15:10:39 +02:00
f7a3ead1c7 Merge branch 'master' into lib-link-rework-temp 2015-09-21 15:10:20 +02:00
c7d931b6d2 Merge branch 'lib-link-rework-temp' into id-remap 2015-09-20 15:46:38 +02:00
2e564ce19c Merge branch 'missing-libs' into id-remap 2015-09-20 15:46:30 +02:00
1d4e36a4c9 Merge branch 'master' into lib-link-rework-temp 2015-09-20 15:41:37 +02:00
bcbbee4f73 Merge branch 'master' into missing-libs 2015-09-20 14:54:33 +02:00
f5b0c53531 Relocate: remove old lib datablocks after relocate, if no ID comes from it anymore. 2015-09-19 20:03:25 +02:00
aaab73d54d Attempt to handle correctly LIB_EXTERN vs. LIB_INDIRECT ID flags.
This is far from simple, and most likely not yet fully working, but we have a base...
2015-09-19 19:56:43 +02:00
38670bc9a9 Some fixes, add basic wrapper code needed for reload feature (not yet implemented). 2015-09-19 18:26:36 +02:00
98efbb312c Merge branch 'lib-link-rework-temp' into id-remap
Also, fix some issues in previous code.
2015-09-18 22:42:05 +02:00
5ac9844083 Some naming cleanup. 2015-09-18 22:27:35 +02:00
856ef065b2 Rework a bit new liblink code, to use our beloved memarena instead of ugly pile of malloc.
Performances are not an issue at all here, but it makes code slightly simpler, avoids
a loop over ghash of libs, avoids some potential mem fragmentation, and will be easier
with lib relocate code too in future...
2015-09-18 22:22:56 +02:00
f011cdcc11 Consider proxy objects as 'linked' ones when it comes to ID remapping.
Reason is, on next fileread, proxy will be assigned with its target's data again...
Note that this may not be true about all its datablocks pointers - but proxy objects
are really brittle in current code anyway, they could use a serious work as well.
2015-09-18 21:31:56 +02:00
32ea612fcc Moar cleanup, some fixes towards sanier handling of remap & indirect data...
Proxy are still not correctly handled here though.
2015-09-18 18:09:13 +02:00
80ddd9afd9 Merge branch 'master' into asset-engine 2015-09-18 16:20:21 +02:00
5d8b0a8bcc Merge branch 'lib-link-rework-temp' into id-remap 2015-09-18 16:12:58 +02:00
33a4a4ed8f Merge branch 'missing-libs' into id-remap 2015-09-18 16:12:40 +02:00
7df45b2a49 Merge branch 'master' into id-remap 2015-09-18 16:12:31 +02:00
1ba2646706 Some cleanup & tweaks. 2015-09-18 16:11:55 +02:00
c7e14ac1f8 Merge branch 'master' into lib-link-rework-temp 2015-09-18 15:47:07 +02:00
87a3de5852 Merge branch 'master' into missing-libs 2015-09-18 15:44:10 +02:00
f9eef9a678 Some cleanup & tweaks. 2015-09-18 15:01:59 +02:00
185c216743 Relocate library: first working code.
Basics seem to be working, proving idea is valid. There is much to do yet though,
handling correctly all possible scenarii (especially those including indirect libs
used by several libraries, or libs used both directly and indirectly, etc.)
is not going to be a piece of cake...
2015-09-18 14:44:08 +02:00
4ee210857a Merge branch 'lib-link-rework-temp' into id-remap 2015-09-17 21:00:55 +02:00
49156ee77b Serious rework (again) of append/link code, to make it more generic.
Making the code in WM area more generic (will be used by relocate libs feature too in future).
And multi-append/link shall no more close & re-open lib files for each and every idcode!

Also, serious cleanup of BLO_append_... API (renamed BLO_link_..., since it links and never appends!),
main real changes there are removing the bContext arg in favor of scene/v3d (a bit more verbose, but does
not requires a valid context anymore to be able to instanciate ob/groups!). And logic behind instanciating
or not has been simplified, previous code was really obscure and sometimes redondant, from quick tests
it still works as expected.

This is temp branch for until 2.76 is over, shall be merged in master asap then.
2015-09-17 20:45:51 +02:00
0df9a4ae3d Merge branch 'master' into id-remap 2015-09-17 19:12:01 +02:00
18cddb58c4 Merge branch 'master' into id-remap 2015-09-17 13:54:36 +02:00
3cce86e4d3 Merge branch 'master' into id-remap 2015-09-16 17:46:32 +02:00
ab9126b7b5 Move most of (currently NoP) relocate code to WM area. 2015-09-16 15:28:19 +02:00
2622e4b208 More work towards relocate operator for libraries (still pretty much empty shell).
Note that this op will have to be moved to WM area in fact, it's way too generic for Outliner only...
and we need to re-use most of append/link operator code!
2015-09-15 22:14:35 +02:00
258725cf49 Merge branch 'master' into id-remap 2015-09-15 14:24:44 +02:00
962751c1a0 Outliner: add a dedicated ID_LI operation handler, and add skeletton for 'relocate' tool... 2015-09-14 22:30:48 +02:00
2f43d7a099 Merge branch 'master' into id-remap 2015-09-14 15:55:15 +02:00
648ce6a080 Some minor fixes and refactor of core id-remap code. Will also allow us to call it when bmain is already locked higher in code. 2015-09-13 15:41:13 +02:00
b428df5408 Merge branch 'missing-libs' into id-remap 2015-09-13 15:19:53 +02:00
6fda73fe0e Merge branch 'master' into missing-libs 2015-09-13 15:19:31 +02:00
68096bb8e8 Merge branch 'missing-libs' into id-remap 2015-09-13 15:19:11 +02:00
8f496e7ebf Add remaining missing id_remap editors' callbacks.
This is far from being done though... :/
2015-09-12 17:15:06 +02:00
8ae125e946 Merge branch 'master' into id-remap 2015-09-12 15:40:35 +02:00
5c029b1628 Add support id-remap for 3Dview bgpic and Image space.
SpaceImage seems to have a weird handling of image ID user count :/
2015-09-11 17:22:40 +02:00
15f08697e7 Rework our 'space id remapping' code by adding a new 'id_remap' callback to SpaceType, and add one for View3D.
Think it's much cleaner this way.

View3D new id_remap only handles camera/ob_center pointers for now, images will need some more work I think...
2015-09-11 16:27:42 +02:00
efb2d755c1 Merge branch 'master' into id-remap 2015-09-11 15:53:37 +02:00
07136e6176 Merge branch 'master' into id-remap 2015-09-10 22:47:25 +02:00
0abb0ee156 Merge branch 'master' into missing-libs 2015-09-10 22:39:39 +02:00
1fd6979bdb Some minor UI updates... 2015-09-10 14:35:49 +02:00
13d9d33158 Merge branch 'asset-experiments' into asset-engine 2015-09-10 14:14:25 +02:00
93fb699e20 Merge branch 'master' into asset-experiments 2015-09-10 14:13:57 +02:00
6d2519250a Add some (mostly commented) debug prints... 2015-09-10 14:13:18 +02:00
06f937c9b1 Fix nasty hidden RNA/bool related bug.
**NEVER** pass a boolean as address (pointer) to a RNA property function - it will read (or write) it as an integer!
2015-09-10 14:08:36 +02:00
8094de89ce Fix filelist_file_create_entry() adding the generated entry twice to the cached list in AE case. 2015-09-10 13:01:37 +02:00
b4861a9ec1 Merge branch 'asset-experiments' into asset-engine 2015-09-09 21:45:37 +02:00
283da2a596 Merge branch 'master' into asset-experiments 2015-09-09 21:38:07 +02:00
2d861d68a7 Merge branch 'asset-experiments' into asset-engine 2015-09-09 17:25:22 +02:00
ec99859c44 Merge branch 'master' into asset-experiments 2015-09-09 17:20:14 +02:00
a77cd3e953 Fix 3DView and others not updating after ID remapping.
Notifiers usage could really use a good cleanup imho...
2015-09-03 17:56:03 +02:00
3f22fbf32b Merge branch 'master' into id-remap 2015-09-03 16:16:50 +02:00
65a108cf35 Merge branch 'master' into missing-libs 2015-09-03 16:16:26 +02:00
62ff31971a Merge branch 'master' into id-remap 2015-08-30 12:06:02 +02:00
75db37e80f Merge branch 'master' into missing-libs 2015-08-30 11:55:38 +02:00
baa1513603 Merge branch 'asset-experiments' into asset-engine 2015-08-30 11:44:35 +02:00
2420f8a32e Merge branch 'master' into asset-experiments 2015-08-30 11:40:49 +02:00
e8af25479d Merge branch 'asset-experiments' into asset-engine 2015-08-30 11:29:03 +02:00
aa4896317d Merge branch 'master' into id-remap 2015-08-23 18:45:13 +02:00
031aab8d0c Some minor tweaks & cleanup. 2015-08-23 16:34:19 +02:00
317474e231 Merge branch 'master' into id-remap 2015-08-23 15:08:17 +02:00
b9110048f9 Merge branch 'master' into id-remap 2015-08-22 15:38:58 +02:00
6711e9d15f Merge branch 'master' into missing-libs 2015-08-22 15:11:32 +02:00
173ffb140a Minor tweak: adjust icon size to thumbnail size.
Avoids too big 'data type' icon in tiny display...
2015-08-19 22:38:27 +02:00
211ef292ba Merge branch 'master' into asset-experiments 2015-08-19 21:54:20 +02:00
f5140d4e82 Merge branch 'asset-experiments' into asset-engine 2015-08-18 14:51:52 +02:00
03829f7c48 Merge branch 'master' into asset-experiments 2015-08-18 14:35:56 +02:00
9fc2d1e35b Merge branch 'master' into asset-experiments 2015-08-18 13:24:09 +02:00
f5f06db832 Merge branch 'master' into asset-experiments 2015-08-18 12:43:35 +02:00
3a21279bc8 Merge branch 'master' into asset-experiments 2015-08-18 12:24:06 +02:00
0baa1469d0 Merge branch 'master' into asset-experiments 2015-08-11 12:01:12 +02:00
dc659c05d4 Merge branch 'master' into asset-experiments 2015-08-10 18:04:13 +02:00
47e73e6b72 Merge branch 'master' into asset-experiments 2015-08-10 17:47:00 +02:00
67282959af Fix bug in preview generator. 2015-08-10 17:21:11 +02:00
979d22b361 Some cleanup re master... 2015-08-10 15:52:18 +02:00
53312d1fac Merge branch 'master' into asset-experiments 2015-08-10 15:44:20 +02:00
a2a3e40cf1 Merge branch 'master' into asset-experiments 2015-08-10 15:10:16 +02:00
2aab8c7a95 Some ultimate cleanups. 2015-08-10 14:36:39 +02:00
14786d653a Merge branch 'master' into asset-experiments 2015-08-10 14:18:23 +02:00
386efee483 Minor tweak - adapt a bit number of preview workers to number of available physical threads! 2015-08-09 18:08:33 +02:00
9ebdab0e17 Merge branch 'master' into asset-experiments 2015-08-09 16:09:23 +02:00
6b34b4f066 Merge branch 'master' into id-remap 2015-08-02 18:02:16 +02:00
d2bdc66143 Merge branch 'master' into missing-libs 2015-08-02 17:50:29 +02:00
231237f1b5 Merge branch 'asset-experiments' into asset-engine 2015-08-02 17:17:57 +02:00
37e679772e Merge branch 'master' into asset-experiments 2015-08-02 17:13:42 +02:00
574a7da03e Fix several issues, add a quick and dirty new action in Outliner to remap IDs.
We have to take care of Object->data aside from main foreach loop, since we can
only replace that pointer if object is **not** in Edit mode!

Also, added a "Remap" action to ID context menu of outliner. This is **very far**
from nice and pretty code/feature, but it allows to quickly test the code.

Only did very quick tests with meshes so far...
2015-07-21 22:42:06 +02:00
1ebdfb4d45 Fix some dummy mistake, add simple RNA callback to 'remap' IDs.
Also, added Object.data to BKE_library_foreach_ID_link(), wonder if there was a good reason
for this to not be here???
2015-07-21 22:42:06 +02:00
df50b8cabf Add main 'ID remap' function.
Theoretical code, compiles, but needs to be tested!
2015-07-21 22:42:06 +02:00
f2d6e85212 ID remapping: first step - modify some editors callback to not only support ID freeing, but also ID remapping.
This seems to be OK, but will obviously need much more testing - and is useless as-is, we need
the big ID remapping code itself still.

Also, Nodetrees' remapping of Scene IDs is still TODO, not sure yet how to do this.
2015-07-21 22:42:06 +02:00
313fabd310 Merge branch 'master' into missing-libs 2015-07-21 08:07:42 +02:00
93563c5522 Merge branch 'asset-experiments' into asset-engine 2015-07-21 08:01:47 +02:00
c1589b71c5 Merge branch 'master' into asset-experiments 2015-07-21 07:55:51 +02:00
aee44d5070 Merge branch 'master' into missing-libs 2015-07-17 21:13:03 +02:00
09787f03b7 Merge branch 'master' into missing-libs 2015-07-16 19:53:31 +02:00
4e2f5a6461 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-16 19:46:35 +02:00
f37adc4312 Merge branch 'master' into asset-experiments 2015-07-16 19:45:22 +02:00
2bfd60e54f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-16 16:53:55 +02:00
610a04ab5d Fix rebase mess :/ 2015-07-15 20:38:51 +02:00
222a199f99 Add outliner's visualization for broken libs, and also tag lib ID itself as missing. 2015-07-15 20:36:22 +02:00
82d166df72 Add remaning 'init' callbacks for needed ID types.
Note all this remains a bit theoretical, some cases (ID types) are a bit delicate to handle here.7
Time and tests will say if it's OK as is.
2015-07-15 20:36:22 +02:00
83dd16a6d6 Add some checks in BKE_xxx_init() that data is really NULLified.
Needed, since trying to (re)init data already set could lead to many issues,
and handling this is not in the scope of this function.

Note that definition of BLI_memcmp_null stuff is rather bad currently, no good idea where to place this. :|
2015-07-15 20:36:22 +02:00
4181f35014 Handling missing libs: changed idea, now adding 'real' empty data.
Just having 'NULL' data as placeholder is not really possible, too much places
to check against that.

WIP commit, still much to be done!

See T43351 for details.

Differential Revision: https://developer.blender.org/D1394
2015-07-15 20:36:22 +02:00
266f0d3e77 Very first step to handle missing libs/datablocks when reading a file.
Idea is, instead of ignoring completely missing linked datablocks, to
create void placeholders for them.

That way, you can work on your file, save it, and find again your missing data once
lib becomes available again.

Plans are also to be able to locate missing libs and reload them at runtime.

To support all that, we must be able to make Blender survive those missing data
(i.e. empty datablocks) all over the place. This commit contains some early work
in that direction, but this will need much much more work!
2015-07-15 20:36:21 +02:00
9a2ae72156 Icons: Add new 'library_data_broken' one. 2015-07-15 20:36:21 +02:00
37a6a92f76 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-07-11 23:00:56 +02:00
5a16f29700 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-07-11 22:51:30 +02:00
80acaa3009 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-07-04 13:16:30 +02:00
05017bc9a3 Merge branch 'master' into asset-experiments 2015-07-04 12:59:37 +02:00
047525019a Expose fewest more generic ID filtering options.
Full precise filtering remains possible in new 'Advanced filter' panel.
2015-07-04 12:56:09 +02:00
6cb2f6e870 UI-fix (bad 'recusion level' value in RNA enum, 1 is only valid in library listing case). 2015-07-04 01:48:43 +02:00
9f176db5ea Merge branch 'master' into asset-experiments 2015-07-04 01:42:37 +02:00
c2049e740e Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/BLI_ghash.h
2015-07-02 21:22:07 +02:00
665ac71aee Add API to IMB_thumb to enable thread safety.
Indeed, though rather unlucky, we may end up handling same source file from
different preview threads, which could lead to conflicts and bugs.

So idea is to add a simple way of locking a given source file path, since
thumb handling of different paths shall never conflict.

Note that this adds some 'generic' stuff to GHash and Threads area, that are to
be committed separately of course.
2015-07-02 13:31:38 +02:00
dd15ef2528 Previews: do not keep preview task and timer running continuously in 'Preview' mode.
The task was not so annoying (workers are just sleeping anyway), but having the timer
always checking for updates was not so nice. This remains quite minor optimization probably...

So now, we do not start anymore preview task when enabling previews. This is deferred
to the moment we really need it (i.e. when we cache block of entries currently visible).
Preview timer is started at the same time.

Further more, when preview task has been inactive for about one second (i.e. all
queued previews have been handled, and no new one have been queued), we free it
(switching to some kind of 'standby' mode).

This also allows to avoid stoping/restarting preview tasks on each redraw when user is scrolling.
2015-07-02 12:01:09 +02:00
effabf0ce7 Remove queing TODO previews when starting preview task, this is already handled
(in a better way) by filelist_file_cache_block().
2015-07-01 17:43:49 +02:00
a1c8d693a8 Fix windows bug with scons builds.
Classical bool vs char value mismatch... Here it was leading to a constant re-filtering
of the list, which invalidates cached previews.

Strange thing is, it would look as if Windows CMake builds are using 'real' bool,
while scons ones are using fake char-based one?
2015-07-01 16:40:07 +02:00
2cac2ec784 Merge branch 'master' into asset-experiments 2015-07-01 16:28:57 +02:00
23c81d8990 Merge branch 'master' into asset-experiments 2015-06-30 19:17:34 +02:00
633e3d2545 Merge branch 'master' into asset-experiments 2015-06-29 14:55:38 +02:00
cd980e85d7 Merge branch 'master' into asset-experiments 2015-06-28 20:22:14 +02:00
857d5f3580 Be much smarter with file size display... 2015-06-28 00:16:14 +02:00
b5a65fd7be Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
2015-06-27 23:42:06 +02:00
9379b7f968 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/editors/space_file/filelist.c
2015-06-27 23:26:32 +02:00
fb43c07681 Merge branch 'master' into asset-experiments 2015-06-27 23:15:58 +02:00
6c8e34e59b Filebrowser internal listing & UUIDs: simpler & safer UUIDs generation.
Instead of computing MD5sum of paths, just use incremental UUIDs!
There meaning and lifetime for internal listing is very limited anyway,
they shall only be unique for a given listing.

Note about using atomic op here: did it because it's nice use case,
not sure it's worth adding atomic stuff to /editors area though?
2015-06-19 14:31:00 +02:00
011061ab5e Remove copying of preview data for objects and groups datablocks.
Those get temporarily duplicated by renderers (Cycles, Freestyle),
not nice to have useless memory usage here.
2015-06-19 13:04:04 +02:00
7b84fa5927 Various minor cleanup & fixes from review. 2015-06-19 13:01:39 +02:00
6f236221c6 Merge branch 'master' into asset-experiments 2015-06-19 12:33:18 +02:00
c3492716ee Merge branch 'master' into asset-experiments 2015-06-19 11:44:23 +02:00
ae569a4e76 Merge branch 'master' into asset-experiments 2015-06-18 11:53:14 +02:00
924ff970cc Merge branch 'asset-experiments' into asset-engine 2015-06-17 14:28:53 +02:00
d6b5f82bae Merge branch 'master' into asset-experiments 2015-06-17 14:28:24 +02:00
1e1cc1409b Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-06-16 18:11:21 +02:00
9a7d5130ec Cleanup: get rid of ugly bool in structs, replaced by bitflags. 2015-06-16 17:32:46 +02:00
649b09debb Make selection & co really working even during listing process.
This commit replaces `filelist_numfiles()` by `filelist_files_ensure()`. The later
also returns number of visible files (i.e. filtered ones), but also ensures filelist
is filetered and sorted.

Otherwise, during listing process, operators could be executed between an update of the listing job,
and the refresh from the file space - i.e. at a time filelist is virtually empty (from filebrowser PoV).

Also, got rid of 'need_refresh', this ended up being unused...
2015-06-16 16:59:29 +02:00
f616871e62 Selection/UUIDs handling enhancements:
* Do not systematically clear selection_state's uuids GHash when updating filelist
  during listing process - uuids used here should remain valid.
  Allows to not lose selections during listing background job!
* Use new BLI_ghash_lookup_p to handle selection state setting, symbolic optimization but...
2015-06-16 16:19:06 +02:00
3d9da00815 Make imbuf_thumb for .blend a bit less stupid & noisy regarding missing previews.
A file which does not have *any* preview is perfectly valid, error is only when there
are some previews, but not the same number as actual datablocks...
2015-06-16 15:45:52 +02:00
bfb6155466 Fix some fileops operators that could try to get out-of-bound indices.
Also, some minor reordering in full-block-recaching, currently could not create
issues but better be safe & logic here.
2015-06-16 15:40:58 +02:00
edb87ecd75 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-06-16 14:24:05 +02:00
bc43854651 Merge branch 'asset-experiments' into asset-engine 2015-06-12 10:43:14 +02:00
5fbd8997c2 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-06-12 10:42:44 +02:00
27ed6ef95c Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-06-11 20:17:30 +02:00
c3866a0fe1 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_ops.c
2015-06-11 20:07:29 +02:00
04f7493588 Fix/adapt new 'keyboard select' code to changes from branch. 2015-06-11 19:58:23 +02:00
a4965036a7 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/space_file.c

NOTE: Tagged some parts in new code to be fixed, rather do that in a separate commit.
      This means this commit is broken and won't compile.
2015-06-11 18:16:43 +02:00
22abc19145 Merge branch 'asset-experiments' into asset-engine 2015-06-11 16:35:53 +02:00
b5635fb70d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/idcode.c
2015-06-11 16:31:30 +02:00
7793df2491 Merge branch 'asset-experiments' into asset-engine 2015-06-03 17:11:27 +02:00
edf50e3a5d Fix error when batch-rendering preview of scene with no world. 2015-06-03 17:07:48 +02:00
7cc52cc8dd Fix bad ID preview clearing in RNA API.
Logic here was piece of crap... sigh.
2015-06-03 16:55:35 +02:00
44adb244bc Merge branch 'master' into asset-experiments 2015-06-03 16:48:17 +02:00
e1a3c1d4e7 Arg, missed those in previous 'review' commit. 2015-06-03 16:29:03 +02:00
aab3ec8624 Merge branch 'asset-experiments' into asset-engine 2015-06-03 15:49:33 +02:00
89db98c0be Address new review points. 2015-06-03 15:47:43 +02:00
221142275c Merge branch 'master' into asset-experiments 2015-06-03 14:15:53 +02:00
c436a00372 Fix broken behavior e.g. for 'save as' operator...
We need to set filename/filepath from sfile->params in case operator does not support multi-files!
2015-06-02 15:34:10 +02:00
f2f4c4c93d WIP more work towards inclusion of asset engine/asset uuids in linking process. 2015-06-02 14:04:06 +02:00
d4e5cad70e Merge branch 'asset-experiments' into asset-engine 2015-06-02 10:20:13 +02:00
0f285b566d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/imbuf/intern/thumbs.c
2015-06-02 10:19:50 +02:00
b57abacd8c Merge branch 'asset-experiments' into asset-engine 2015-05-29 10:56:19 +02:00
7f59c846a7 Add comment about why we need to store fileselection state outside of filelist items now. 2015-05-29 10:38:55 +02:00
21e498acdd Tweaks and fixes in py part (preview handling). 2015-05-29 10:32:31 +02:00
5301ea7b96 Address most points from first reviewing pass.
Nothing new here, just some cleanup and refactor.
2015-05-29 10:12:46 +02:00
2a5d07773e Merge branch 'master' into asset-experiments 2015-05-29 09:30:08 +02:00
ab049a335d More WIP towards integrating AE/assets_uuids in append/link process... 2015-05-28 19:51:25 +02:00
74aeb8ef11 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2015-05-28 14:46:10 +02:00
99a3e09088 Refactor code in multi-append/link operator.
Avoid writing a big chunck of code doing nearly the same thing twice...
2015-05-28 14:42:12 +02:00
b87e275429 WIP more AE/uuid in append/link operator. 2015-05-28 10:37:01 +02:00
a4c5aa208d Merge branch 'asset-experiments' into asset-engine 2015-05-27 15:47:19 +02:00
bae3805edb Merge branch 'master' into asset-experiments 2015-05-27 15:44:38 +02:00
9ab309901d Add asset engine version to uuids list struct. 2015-05-26 21:18:28 +02:00
bd0e78bb23 Add needed asset-related data to Library and ID structs. 2015-05-26 20:47:43 +02:00
f34c098f0c Add 'bl_version' to asset engine type, needed to support asset engine in file read/write! 2015-05-26 17:21:10 +02:00
23beab242a Fix asset engine resetting on every resize!
Only reset AE type to default in `file_init()` if current type is invalid!

Also, better handling of getting default AE type now.
2015-05-26 17:02:45 +02:00
99cf8b2188 Merge branch 'asset-experiments' into asset-engine 2015-05-26 16:32:36 +02:00
180958cb2c Merge branch 'master' into asset-experiments 2015-05-26 15:50:19 +02:00
f6dc0573f8 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/makesrna/intern/rna_space.c
2015-05-25 15:58:24 +02:00
ac516fddb2 Merge branch 'master' into asset-experiments 2015-05-25 15:38:14 +02:00
a5c580c9e4 Some tweaking to UI, try to make filebrowser header a bit more compact... 2015-05-21 15:20:53 +02:00
b5db0c903c Merge branch 'asset-experiments' into asset-engine 2015-05-21 14:37:02 +02:00
59a8cbc49b Merge branch 'master' into asset-experiments 2015-05-21 14:36:41 +02:00
0a52a358fa Better handling of tags in Amber.
Also adds some 'state' flags to AssetEngine, so that custom AE's setting changes
can be notified to filebrowser, as default internal ones are.

For now, we only have 'dirty filtering' and 'dirty sorting'.
2015-05-21 14:15:46 +02:00
223e098ca1 Some minor cleanup in Amber code. 2015-05-20 10:28:46 +02:00
7f7f296475 Merge branch 'asset-experiments' into asset-engine 2015-05-20 09:39:06 +02:00
a9efb6a5ae Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-05-20 09:19:23 +02:00
b5c72b15ed Merge branch 'master' into asset-experiments 2015-05-13 17:14:46 +02:00
85499bb5e8 Fix crash in append/link on windows (sigh). 2015-05-13 17:06:44 +02:00
952ef0fedf Fix newly created dir not going into rename state anymore.
Due to async dir listing...
2015-05-13 14:07:49 +02:00
044398c786 Merge branch 'master' into asset-experiments 2015-05-13 13:58:39 +02:00
b0f1a9e27f Merge branch 'master' into asset-experiments 2015-05-13 12:52:11 +02:00
3bef09f672 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/blenkernel/CMakeLists.txt
2015-05-12 19:39:44 +02:00
9706ec852d Restore drag'n'drop from filebrowser.
We need to store non-static data here, so had to tweak drag and drop button code...
2015-05-12 19:21:13 +02:00
ade786b30c Some cleanup and reducing diff from master. 2015-05-12 17:00:12 +02:00
63d52d7bb1 Merge branch 'master' into asset-experiments 2015-05-12 15:33:32 +02:00
113c17ea76 Merge branch 'asset-experiments' into asset-engine 2015-05-11 17:25:43 +02:00
9346891c3c Merge branch 'master' into asset-experiments 2015-05-11 17:24:24 +02:00
acd076a9f3 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_icons.h
	source/blender/blenkernel/intern/icons.c
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/interface/interface_icons.c
	source/blender/makesrna/intern/rna_ID.c
2015-05-11 17:09:53 +02:00
51a3024f33 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-05-11 09:46:17 +02:00
bf583c8c95 Merge branch 'master' into asset-experiments 2015-05-11 09:36:20 +02:00
f2ceb38ce8 Add variable sliding window for cached filebrowser items.
With big screens and tiny drawing, we can show much more than 1k items at once...
Also allows to reduce number of cached items in case we show few things big!
2015-05-10 17:15:59 +02:00
47a7246a5c Merge branch 'master' into asset-experiments 2015-05-10 15:26:26 +02:00
dd2034623c Merge branch 'asset-experiments' into asset-engine 2015-05-09 16:43:22 +02:00
b1ce5e6772 Fix bad behavior in case of 'refresh' while still listing.
Mismatch in 'owner' of job, not giving right one to stoping helper, sigh.

Note that this was also affecting any 'interrupting' task (like changing level of flat listing...).
2015-05-09 16:42:13 +02:00
c77f3b57bc Fix flickering of previews during listing process.
We cannot keep 'stable' list of items during listing process (each time new
entries are added, we have to filter and sort the whole lot again, which
means rebuilding 'draw' data from scratch - previews included).

Just wait until our filelist is complete to generate/use previews.
2015-05-09 16:06:30 +02:00
abed546672 Fix crash due to some missing final jop update in some rare cases. 2015-05-09 16:00:07 +02:00
71a061bc1a Merge branch 'master' into asset-experiments 2015-05-09 14:29:46 +02:00
6cae0ccded Merge branch 'asset-experiments' into asset-engine 2015-05-07 19:31:48 +02:00
4767de15b8 Fix win build... 2015-05-07 19:30:56 +02:00
97798c6125 Merge branch 'master' into asset-experiments 2015-05-07 19:17:45 +02:00
9d9ee6699a Get rid of nice 'static' in array args of functions, MSVC does not like them. :( 2015-05-06 19:59:02 +02:00
b943f6fd28 Merge branch 'master' into asset-experiments 2015-05-06 18:13:20 +02:00
3745062bf9 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-05-05 17:23:32 +02:00
0e5789c43c Some cleanup and addressing TODOs in ID preview generation module. 2015-05-05 17:18:49 +02:00
ef484c7a59 Expose preview/icon render sizes in bpy.app 2015-05-05 17:18:30 +02:00
d0799901f7 Merge branch 'master' into asset-experiments 2015-05-05 14:26:58 +02:00
fc5adb63a0 Merge branch 'master' into asset-experiments 2015-05-04 21:14:47 +02:00
85406569e1 FileBrowser: enhance handling of most compact drawing by also reducing size of static strings like file size. 2015-05-04 17:00:45 +02:00
54e753f85e Fix size of files not showing in default Filebrowser mode. 2015-05-04 16:23:54 +02:00
0bdf85afde FileBrowser: make (fixed) column size user-configurable (re[ab]using new thumbnail size). 2015-05-04 16:15:12 +02:00
1ca9c549f9 Merge branch 'asset-experiments' into asset-engine 2015-05-04 15:55:56 +02:00
056f11ec8d Merge branch 'master' into asset-engine 2015-05-04 15:55:45 +02:00
bc8ad4c739 Cleanup/reduce needless diff with master. 2015-05-04 15:54:48 +02:00
870c2040bc Merge branch 'master' into asset-experiments 2015-05-04 14:59:13 +02:00
2f477065a0 Merge branch 'asset-experiments' into asset-engine 2015-05-02 17:05:17 +02:00
cc02a0a7e5 Merge branch 'master' into asset-experiments 2015-05-02 17:03:45 +02:00
e0c275e239 Merge branch 'master' into asset-engine 2015-05-02 17:03:22 +02:00
92123e578a Fix T44586: Viet language problem for Blender Interface
We were missing many of the complex diacritics combinations in latin extended additional code block...

Alawyas a pleasure to edit this font... :|
2015-05-02 16:49:12 +02:00
56b3d8d273 Fix stupid crash. 2015-05-02 15:25:35 +02:00
40dd7cbe21 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-05-02 15:10:31 +02:00
756bb6b404 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/makesrna/intern/rna_space.c
2015-05-02 15:01:34 +02:00
839cc7b2a1 Merge branch 'asset-experiments' into asset-engine 2015-04-27 18:25:48 +02:00
59d5f5c253 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/object.c
	source/blender/windowmanager/intern/wm_operators.c
2015-04-27 18:21:59 +02:00
c31c62c7ec Merge branch 'asset-experiments' into asset-engine 2015-04-18 12:20:18 +02:00
863f19431d Merge branch 'master' into asset-experiments 2015-04-18 12:05:23 +02:00
45164ac6e3 WIP work to pass asset data to operator.
Asset engine ID, asset/variant/revision uuids, root path...
First goal is link code!
2015-04-16 18:28:59 +02:00
eca9cb2adb Merge branch 'asset-experiments' into asset-engine 2015-04-16 14:55:58 +02:00
31e89b1fcf Merge branch 'master' into asset-experiments 2015-04-16 14:49:04 +02:00
ba20e06227 Merge branch 'asset-experiments' into asset-engine 2015-04-16 10:46:37 +02:00
b3c8192715 Merge branch 'master' into asset-experiments 2015-04-16 10:45:24 +02:00
00e451015b Merge branch 'asset-experiments' into asset-engine 2015-04-15 19:21:11 +02:00
399b2927df Merge branch 'master' into asset-experiments 2015-04-15 19:18:57 +02:00
a9d5eddc52 Rename RNA's 'IDPreview' to 'Preview' - there is no reason to keep that for IDs only,
we likely will want to use it in other cases...
2015-04-15 19:17:34 +02:00
eb9784dea2 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-15 17:48:26 +02:00
b239c249ac FileBrowser: only generate size/date/time strings when needed!
Also, cleanup remaining cruft from modes/owner stuff.
2015-04-15 17:43:05 +02:00
ab9f937bd8 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/makesrna/intern/rna_space.c
2015-04-15 16:45:35 +02:00
8124e69a91 Backport some changes from asset-engine branch:
* uuids as int[4] instead of char[16];
* move use_library_browsing to params instead of spacefile.
2015-04-15 16:40:52 +02:00
5ffbf49439 AssetEngine: Various fixes and new features:
* Let asset engine draw most of header bar itself!
* Pass whole FileSelectParams to AE's sort_filter function.
* Move 'use_library_browsing' to params level (this way AE's sort_filter can be ware of it too).

Amber:
* Now supports real basic sorting/filtering modes
* Also basic support of tags (needs a way to refresh though, currently).
2015-04-15 16:26:33 +02:00
fde14db489 Switch definitively to int32[4] for uuid's, mixing mixing it with char[16] is confusing at least.
This is only on human-level anyway... And endianess should not be an issue
either, hopefully, that way!
2015-04-15 12:50:04 +02:00
c4a1d5143e Merge branch 'asset-experiments' into asset-engine 2015-04-15 12:23:00 +02:00
163ad29b58 Merge branch 'master' into asset-experiments 2015-04-15 12:20:32 +02:00
52db10355b WIP better/fixed support of uuid's in asset engines.
Still not working as expected it seems... Not having a real bytes type in RNA is a real PITA. :/
2015-04-14 22:49:28 +02:00
68bab334e0 More fixes...
Amber engine seems to be running nice again in new system, pfew!
2015-04-14 16:58:38 +02:00
18f18ec8b3 Fix issue in final selection in some cases. 2015-04-14 16:23:26 +02:00
80c0f3da22 Merge branch 'asset-experiments' into asset-engine 2015-04-14 16:10:00 +02:00
63318a2a4c Merge branch 'master' into asset-experiments 2015-04-14 16:07:04 +02:00
476a1b9eff Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-13 22:13:16 +02:00
2842949e13 Add uuids ghash to filelist's cache. 2015-04-13 21:54:37 +02:00
b3ad658b45 Merge branch 'master' into asset-experiments 2015-04-13 21:19:53 +02:00
449e1d8074 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c

... And fixes for code specific to that branch.
2015-04-13 20:22:27 +02:00
11ef8d9797 Small refactor (will allow better factorization with AE listing code). 2015-04-13 17:40:32 +02:00
2feeea8328 Caching of FileDirEntry: simplify things, fix some more mem bugs. 2015-04-13 17:36:11 +02:00
026f967dff Various fixes with asset engine and new code...
Still not working completely, and need small rework in asset-experiments first.
2015-04-13 17:27:06 +02:00
6adc839e40 Fix stupid freeing issues. 2015-04-13 16:20:24 +02:00
e39242c4ce Merge branch 'asset-experiments' into asset-engine 2015-04-13 15:55:30 +02:00
0e3a9530da Merge branch 'master' into asset-experiments 2015-04-13 15:53:37 +02:00
23bba70da5 Merge branch 'asset-experiments' into asset-engine 2015-04-10 23:43:20 +02:00
bf19bf0110 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/imbuf/IMB_thumbs.h
	source/blender/imbuf/intern/thumbs.c
2015-04-10 23:42:43 +02:00
eb8b2413de Merge branch 'master' into asset-experiments 2015-04-10 14:27:18 +02:00
336c7f9ba5 AssetEngine WIP support of new filelisting behavior in filebrowser...
Nearly working, still have some mem issues to fix.
2015-04-09 20:35:36 +02:00
96f060d32d Merge branch 'asset-experiments' into asset-engine 2015-04-09 12:05:47 +02:00
126e1aa60a Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/BLI_filelist.c
	source/blender/editors/space_file/filelist.c
2015-04-09 12:05:09 +02:00
bfb977534f Merge branch 'asset-experiments' into asset-engine 2015-04-08 14:38:44 +02:00
57786fda42 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-08 14:38:18 +02:00
9763ba8f72 Merge branch 'asset-experiments' into asset-engine 2015-04-08 14:21:32 +02:00
990598e60c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
	source/blender/imbuf/IMB_thumbs.h
	source/blender/imbuf/intern/thumbs.c
	source/blender/imbuf/intern/thumbs_blend.c
2015-04-08 14:21:00 +02:00
485a9abf29 Merge branch 'asset-experiments' into asset-engine 2015-04-07 15:40:34 +02:00
d9c690b559 Misc cleanup, fix previews memleak. 2015-04-07 15:38:06 +02:00
a2b4d96b65 Merge branch 'asset-experiments' into asset-engine 2015-04-07 15:07:47 +02:00
b3de44cc01 Cleanup: get rid of preview handling in lib listing code. 2015-04-07 15:07:09 +02:00
6e8cc0bc05 Move handling of ID blocks previews in thumbnail handler.
this is mandatory, since we do not keep previews for all listed items anymore
(with 10k datablocks would start to take too much mem). So we now generate (read)
them from thumbnailing threaded task as any other image, has several advantages:
* Quicker initial listing of data from .blend files.
* Since thumbnails are cached on disk, re-generating them is rather quick.
* General consistency!

Note thumbnail generation of datablocks could (should!) be enhanced, right now
it reads all previews for a given datatype in a file each time it has to generate
a single datablock thumbnail, we should generate all of those previews in a single
run. But this means handling cache dirty things (TBH_FAIL, outdating, etc.) on another
level so need some more work.

Also, still some memleaks issues with thumbnails, have to track those dose!
2015-04-07 15:00:40 +02:00
b6ef6da231 Merge branch 'master' into asset-experiments 2015-04-07 09:30:50 +02:00
fc543da843 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-06 20:27:04 +02:00
eaf71f7f17 Some minor tweaks for asset-engine branch... 2015-04-06 20:23:22 +02:00
bdf2e64255 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-06 20:15:29 +02:00
5cee945744 Merge branch 'master' into asset-experiments 2015-04-06 19:51:34 +02:00
c539aaf19d FileBrowser: internal listing: use own, much lighter struct to store whole list.
Since with internal listing we have no choice but to list everything, store
those data in the smallest possible struct - note we do not even store preview
here, these are only handled in full FileDirEntry cache (re-loading them from
cached thumbnails is really quick anyway).

Still not complete, have to re-do ID previews now, among other things...
And some memleaks again with previews, ugh.
2015-04-06 19:51:07 +02:00
979d16e52f BLI filelist: get rid of strings for size/time/mode/etc.
Those were eating quite a bit of bites, not neglectable with thousands of entries...
Also, useless to print those info most of the time, they are not used!

So now, we only store 'raw' stat data, and expose funcs to convert them to readable
strings on demand.
2015-04-05 15:47:59 +02:00
718e84201a Merge branch 'master' into asset-experiments 2015-04-05 11:49:35 +02:00
5e593dd851 Resurrect filelist_selection_get()...
Still not working though.
2015-04-04 15:14:03 +02:00
75ef507e70 Merge branch 'asset-experiments' into asset-engine 2015-04-04 15:07:21 +02:00
51bb1cef39 FileBrowser: add dummy accessor to entries from their uuid.
Needed for assets branch, to be rework seriously later of course.
2015-04-04 15:06:23 +02:00
6704abce7f Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-04 13:19:25 +02:00
868a4288ab FileBrowser: block caching: minor tweak (mostly needed in ae branch actually). 2015-04-04 13:17:43 +02:00
4696bce257 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
2015-04-04 13:15:17 +02:00
bbfe0652eb FileBrowser: rewrite 'entry selection' code.
Since we do not store anymore ell entries, we cannot use them to hold selection status.

So we now use a ghash in FileList struct, with entry UUID's as keys.

Also cleanuped up / refactored selection handling, filelist.c now features a nice intern
api and all other code uses it instead of accessing directly entries' selflag!
2015-04-04 12:43:53 +02:00
c0748c4292 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenlib/intern/storage.c
	source/blender/editors/space_file/filesel.c
2015-04-04 10:50:17 +02:00
e836c116ac Internal FileListing: generate a valid UUID, we'll need this for things like selection state... 2015-04-02 20:12:18 +02:00
f2e55db040 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-04-02 17:34:47 +02:00
e75c5c35cc FileBrowser Preview: enhance handling of previews when modifying cache of entries... 2015-04-02 17:29:31 +02:00
744c029d01 AssetEngine: Add needed API for new 'on demand' entries listing from FileBrowser.
Also use that new API in filebrowser - only partially for now, at least
it does not crash anymore even if 100% empty...
2015-04-02 17:11:33 +02:00
0d4ac96da0 Fixes needed to make it compile again. Remains broken though! 2015-04-02 15:29:21 +02:00
e70139964d Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/makesrna/intern/rna_internal.h

Notes:
* asset-experiments branch still needs some work (e.g. entires selection is to be reworked too),
  but was more than time to do a first merge...
* This is raw merge, code is hence broken and needs more fixes to take into account new changes!
2015-04-02 15:20:52 +02:00
6ec52ce5eb Merge branch 'master' into asset-experiments 2015-04-02 14:53:27 +02:00
d07aeb2fce FileBrowser: cleanup.
Get rid of cache iterator code (not needed, and don't think we'll need it later,
easy to add back if needed). Also comment some debug prints.

New preview (thumbnails) handling seems to be working pretty nice now.
2015-04-02 14:41:19 +02:00
7bfe994093 FileBrowser: Fix stupid cache clear on each redraw while previews where updating.
Missing 'need filter' flag clearing...
2015-04-02 14:06:56 +02:00
d8169c2db7 FileBrowser - fix two crashers.
* Full path is no more static, so we need dynamic tooltips to use it (still an
  issue with drag stuff here :| ).
* Remove timer would attempt to free timer's customdata, which is mere int-in-pointer
  in case of new notifier timer, so we need a special tweak on remove here.
2015-04-02 13:51:13 +02:00
a592525a7e FileBrowser: cleanup (remove) all the thumbnails job stuff, no more needed. 2015-04-02 10:38:19 +02:00
c61d6e36ba FileBrowser: Fix sorting/filtering (we need to clear the cache in those cases!). 2015-04-02 10:27:07 +02:00
49951df23d Merge branch 'master' into asset-experiments 2015-04-02 10:17:11 +02:00
0dc6b92fe6 FileBrowser new preview code: bunch of fixes.
Start to looks good... This commit adds a new timer helper, that only send notifiers
(kind of very restricted subset of wm_job stuff), since using jobs for previews
would be now counter-productive and way too much heavy.

Also fix/enhance how previews are generated (order), etc. etc.

Still WIP though, having some weird crashes and such lurking around.
2015-04-01 22:26:25 +02:00
ce3a8f9f5b Merge branch 'master' into asset-experiments 2015-04-01 15:07:24 +02:00
46d777f017 FileBrowser previews: first fixing round.
Nearly working now (no more freeze or huge mem leak), still need to
find a way to get refresh as long as all previews have not been generated...
2015-03-31 16:44:46 +02:00
fd5e70fc99 Merge branch 'master' into asset-experiments 2015-03-31 15:43:06 +02:00
f970994cd3 Some minor cleanups. 2015-03-31 15:42:51 +02:00
982fdbf506 FileBrowser: Various fixes...
Stupid useless allocations, memleaks, etc.

WIP, thumbnails still not working.
2015-03-31 15:41:04 +02:00
c1617cccd1 Merge branch 'master' into asset-experiments 2015-03-30 22:02:34 +02:00
e7c7b00fe0 WIP FileBrowser thumbnails: get rid of job here, use lighter threaded tasks.
Fully WIP, compiles but not yet working!
2015-03-30 21:35:56 +02:00
8093c5c2a8 Merge branch 'master' into asset-experiments 2015-03-30 14:59:25 +02:00
bf3bba802d Quick attempt to resume thumbnails generation on cache.
Note this is rather stupid anyway, we need to rewrite this from scratch,
using a	 job for that makes no sense now, we should stick to a lighter
threading schema with a queue, or something like that!
2015-03-30 14:54:31 +02:00
2984d39a46 Fix and use block caching from UI draw code.
Seems to work nice now.
2015-03-30 12:24:00 +02:00
11df07e53f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/space_file/filelist.h
2015-03-30 11:56:35 +02:00
ef0367d094 Merge branch 'master' into asset-experiments 2015-03-27 22:23:47 +01:00
188419ac3d WIP cache system for filebrowser entries.
Core part seems to be working, but this is still heavy WIP, much to do
to resume complete features from existing code. Mainly:

* Previews (those should only be ran on cached items now).
* Use block-caching to load in-display entries.
* Rework things like selection (cannot store selected states in entires anymore).

Also, internal listing is stupid currently (since it still stores everything
as FileDirEntry & co), not really crucial currently, but ultimately it'll
use its own, compact struct to keep full listing!

Also did some minor cleanup/renaming.
2015-03-27 22:05:36 +01:00
7a749ebbcf BLI listbase: add an helper to remove a constinuous chunk of the list in a single call. 2015-03-26 17:49:15 +01:00
e7dbb4b217 FileBrowser: First step towards allowing partial "storage" of entries.
That code is currently pretty stupid, but we need to clearly separate
what is handled by filebrowser itself, and what is by listing code
(be it internal one or future asset engines).

Plan/idea is to have a dual cache system (one 'block' of entries - centered
on currently viewed ones -, and one 'random' FIFO for random access to any entry).

This implies filebrowser itself shall now only be aware of the number of (filtered)
entries, and it then requests entries as needed.

Also, made size of columns in filebrowser fixed (ultimately, user configurable),
since it has no more access to the whole list of entries!

Still heavy WIP.
2015-03-26 15:24:03 +01:00
fca4cda7f9 Merge branch 'master' into asset-experiments 2015-03-26 11:04:37 +01:00
26d28b755b Reduce uuids size to 16 (as 'official' ones), more than enough! 2015-03-23 15:55:52 +01:00
9fbec44247 Merge branch 'master' into asset-experiments 2015-03-23 15:25:21 +01:00
a9f02fda07 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/makesdna/DNA_space_types.h
2015-03-21 16:48:34 +01:00
8834875281 Merge branch 'master' into asset-experiments 2015-03-21 16:44:40 +01:00
8bc8015657 WIP Amber: very quick, dirty, primitive and broken first implementation of tags handling.
We cannot do that correctly with current listdir system, have to rework again
in asset-experiments brnach first, so that listing, filtering and sorting is
completely "delocalized" to asset engine (will also try to solve scalability issues).
2015-03-21 16:42:00 +01:00
9553016ec1 WIP 2015-03-19 16:15:42 +01:00
01b6fd1f3e Merge branch 'master' into asset-experiments 2015-03-19 14:01:16 +01:00
3f860e0e73 AssetEngine: add IDProps, and RNA access to actual asset engine from filespace.
Also, some quick dummy test/demo code for that in Amber.
2015-03-17 21:07:57 +01:00
cdfd3c17f5 Merge branch 'asset-experiments' into asset-engine
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-03-17 16:27:39 +01:00
bc40f4852d Fix broken 'sort by type' in filebrowser.
Also, take advantage of blentype stored in entries now,
this greatly simplifies (and make quicker) that sorting
for blendlib items!
2015-03-17 16:02:12 +01:00
99373c918f Add a 'comment' field to listdir revisions.
Also, make clear tags are only informative here.

Reason is, if the project is a success, we have to think big and
imagine asset engines managing catalogs of tens or hundreds of thousands
of entries (web ones e.g.), we cannot hold list of those in filebrowser!
So most of filetring will be 'deffered' to asset-engine.

We'll also probably have to implement a 'chunck listing' behavior
(to only list at most n entries in a row), for same reasons.

This will make things slightly more complicated :|
2015-03-17 15:39:20 +01:00
920bf9f2f3 Merge branch 'master' into asset-experiments 2015-03-17 14:47:54 +01:00
18baac2502 Amber: Some cleanup and atempt to fix repeated entries, not yet working. 2015-03-16 21:23:43 +01:00
9cf2583126 I18n: update for new akward algo names in UI messages... 2015-03-16 20:51:35 +01:00
0661b80aa0 Continue fleshing out Amber.
Start to add real asset engine behavior. Still completely uncomplete and not even half working.
2015-03-16 20:18:42 +01:00
0473ff213e Merge branch 'asset-experiments' into asset-engine 2015-03-16 13:51:42 +01:00
025b502f98 Merge branch 'master' into asset-experiments 2015-03-16 13:48:19 +01:00
f3c6cc9f32 Fix nasty bug preventing any navigation in directories!
Think issue also exists in master code actually, where some op properties
could be left uninitialized in 'params_to_op' helper func... But it does not
backfire like that for sure.
2015-03-15 20:34:42 +01:00
60783fd64e Amber: only list dirs from real filesystem.
Actual data (assets) are to be 'listed' by another way!

Also, fix mem leak.
2015-03-15 17:28:10 +01:00
7059cd538f Merge branch 'asset-experiments' into asset-engine 2015-03-15 15:48:40 +01:00
4621ac3ac1 Merge branch 'master' into asset-experiments 2015-03-15 15:31:10 +01:00
f9adc7fbac Start to make Amber a bit more serious!
Still useless - behaves more or less like a very basic, broken filebrowser.

But basics are here, and listing process seems to be working pretty well.
2015-03-13 22:26:22 +01:00
e615009ae4 Revert "Revert "Merge branch 'asset-engine' into asset-experiments""
This reverts commit f751e34f91.
2015-03-13 15:21:55 +01:00
f751e34f91 Revert "Merge branch 'asset-engine' into asset-experiments"
This reverts commit ccd1479200, reversing
changes made to 8da3bb3885.

Conflicts:
	release/scripts/startup/bl_operators/__init__.py
	release/scripts/startup/bl_operators/amber.py
	source/blender/blenkernel/BKE_asset.h
	source/blender/blenkernel/intern/asset.c
	source/blender/editors/space_file/file_ops.c
	source/blender/makesrna/intern/rna_asset.c
2015-03-13 15:18:24 +01:00
47ce2c5574 Merge branch 'master' into asset-experiments 2015-03-13 14:45:08 +01:00
ec3eec1ac5 Add load_pre callback to RNA, and stupid dummy code in Amber to make quick test of it. 2015-03-12 19:41:12 +01:00
47e3d34d94 RNA listdir: add some more accessors, and ability to remove/clear list of entries (assets). 2015-03-12 15:19:27 +01:00
ab463cb324 Rename 'Flame' to 'Amber'! 2015-03-12 11:07:10 +01:00
ccd1479200 Merge branch 'asset-engine' into asset-experiments 2015-03-12 11:03:40 +01:00
8da3bb3885 Merge branch 'master' into asset-experiments 2015-03-12 11:00:14 +01:00
473e702d5d First step to add 'load_pre' behavior.
This will allow asset engines to:
* Actually ensure requested data is available (downloading it, generating it, etc. as needed).
* Change entries generated for user by actual data paths (allows e.g. to present
  a set of different paths to load as a single 'asset' to user).

As usual, had to change existing filebrowser code... Seems to be working fine
from quick tests (i.e. regular filebrowser not being broken).
2015-03-12 10:59:10 +01:00
da53656be1 Add refcounting and shallow copy to AssetEngine.
Reason is, we want operator to 'inherit' ae instance from spacefile too.
2015-03-10 12:52:25 +01:00
99404d3a70 Fix initialization of AssetEngine type in new filebrowser. 2015-03-10 12:11:07 +01:00
4504d50012 Merge branch 'asset-experiments' into asset-engine 2015-03-09 16:26:04 +01:00
9c6abdff3a Merge branch 'master' into asset-experiments 2015-03-09 15:32:52 +01:00
8f0709f9eb Add more stuff to filelist RNA. 2015-03-05 10:08:33 +01:00
32f4fb952a Cleanup - remove big commented blocks from renderengine initial copy/paste. 2015-03-05 10:08:33 +01:00
5d732ddcae Add some asset engine-aware stuff in filebrowser.
Basically, filelisting code in space_file becomes default, internal 'asset engine',
and user can switch to any other available engine instead.

Note filelisting with asset engines is fully main-thread from C code PoV,
parallelization/asynchronism is responsability of the py code!

Also, added a basic (dummy currently) AssetEngine py implementation.
Not much there, but helps checking things works as expected before
writing whole interface!

All this is very basic early code yet, much much to do before we get anything really usable...
2015-03-05 10:08:33 +01:00
9f61207b23 Minor updates to asset engine API, and add some more basic file listing stuff to RNA. 2015-03-05 10:08:33 +01:00
1dcff09045 Further rework of file listing handling - complete decouple from OS-related direntry.
Remove everything not really related to OS representation of file entries.

FileBrowser will now use a complete decoupled version of file representation,
much easier to keep sane behavior this way, easy integration with RNA, etc.
2015-03-05 10:08:33 +01:00
7142e653b6 Add RNA structs for assets listing (with variants, revisions, etc.). 2015-03-05 10:08:33 +01:00
f6c3f08690 WIP start defining asset engine API. 2015-03-05 10:08:33 +01:00
beee21d045 Void skeleton of asset engine.
Mostly copied from RenderEngines code. Compiles, now we have to flesh this!
2015-03-05 10:08:33 +01:00
c5fde2845e Merge branch 'master' into asset-experiments 2015-03-05 09:48:28 +01:00
f2bff41cd5 Merge branch 'master' into asset-experiments 2015-03-03 17:10:30 +01:00
65b49051fb Add name/description fields to entries themselves too.
This allows us to greatly simplifies sorting (and avoid recomputing UI name each and everytime!).
Also, correctly free entries/variants names/descriptions.
2015-03-01 11:42:28 +01:00
de58d865b6 Spread (future assets) uuid over entries/variants/revisions.
Makes more sense this way, and will probably save memory in the end even.
2015-03-01 11:21:01 +01:00
6771aeeff5 Merge branch 'master' into asset-experiments 2015-03-01 10:54:02 +01:00
02c09be238 Merge branch 'master' into asset-experiments 2015-02-28 15:21:44 +01:00
25e0d0d63d Filelisting: switch from mere arrays to listbases.
Was not sure about that (adds two pointers to entries, variants **and** revisions :/ ),
but with the incremental process of listing we are using now, it makes things sooooo
much easy to handle (and also avoids tons of (deep)copy and mem (re)alloc), that it's
definitively worth it.

And since most (if not all) of 'public' access to filelist is done through filtered ones,
we can easily keep this a mere array of pointers, and hence keep quick index lookup.

Also, quite noticiably simplified the whole listing code (less functions, less levels of subcalls...).

Note: for now we stick to mere alloc, we may benefit from either memarena or mempool,
but those are not threadsafe (which means we could not so easily pass mem from worker
thread to main one), so not quite sure it would be worth it.

Note: thumbnail stuff is to be reworked from scratch too, have the feeling it's not yet
100% thread safe, and using a job here is probably way overkill, since we do not show
any progress in UI.
2015-02-27 19:18:33 +01:00
543984ffff Merge branch 'master' into asset-experiments 2015-02-27 14:23:37 +01:00
a35de360d0 Merge branch 'master' into asset-experiments 2015-02-26 15:38:59 +01:00
ae294763aa Merge branch 'master' into asset-experiments 2015-02-24 20:15:13 +01:00
52d3e71302 Move back path, image etc. to FileDirEntry.
Also, reduce revision's uuid to 64bytes, should be more than enough!

Thing is, we can expect tens (if not hundreds) of thousands of revisions from a
big assets repository with history storage (vcs). So we want that struct
to be as small as possible.

Also, we do not expect to handle several variants/revisions of a same asset within
a same 'context' (there is always only one active variant & rev). So storing
path & co at entry level shall be enough. And helps make code simpler/nicer.
2015-02-24 16:20:19 +01:00
21ae02a327 Get rid of abspath storage, this is storing twice the same data, not nice memory-wise.
We may suffer a little performance loss here, but would not expect it to be really important,
since rebuilding a full abspath is not needed that often.
2015-02-24 14:46:45 +01:00
da7092ff7d Restore size/date sorting.
Also, get rid of modes/owner crap, this is quite advanced UNIX fs info, not much to
do in our filebrowser imho, and takes time, UI space and Mem space!
2015-02-24 14:14:27 +01:00
cf89c7aa28 Merge branch 'master' into asset-experiments 2015-02-24 12:48:23 +01:00
f7f71bb152 Merge branch 'master' into asset-experiments 2015-02-23 16:13:26 +01:00
fb94004e6f Merge branch 'master' into asset-experiments 2015-02-23 15:08:14 +01:00
29d3cbc6f9 Filelisting: First step of sanitanization...
Move typeflag and selflag back to FileDirEntry, and add blentype there too,
this will be needed by asset engines, and avoids rechecking lib ID types over and over!

There's much more to do here though. Also, FileDirEntryRevision is going to be
used quite higly, we want to keep it as light as possible (much lighter than
its current state for sure!). Think we can move back to FileDirEntry paths
(and try to get rid of abspath on the run, too), but also most likely
preview (we won't store a preview for all possible revisions anyway),
owner/permissions, etc.

Rev should probably only have its uuid, and date/time.

Also, simplified filetype generation (from extensions for real files, and BLO helpers
for libdata), now it's nicely encapsulated into each reading callback.
2015-02-23 14:47:34 +01:00
156c5bc41e Merge branch 'master' into asset-experiments 2015-02-23 12:27:29 +01:00
e08fd1ebe5 Merge branch 'master' into asset-experiments 2015-02-22 15:21:38 +01:00
b32de3eaff Merge branch 'master' into asset-experiments 2015-02-19 15:30:51 +01:00
a759d0190b Big refactor of filelisting in filebrowser - decouple os/fs-related direntry from actual blender listing.
Main idea is that direntry had quite a bit of things already absolutely useless
in the mere 'file listing' context (image pointer, void 'data' pointer, etc.).

On the other end, to handle future asset stuff, we need *more* 'meta data' for our 'files'
(tags, variants, revisions...).

Further more, we need all this to be easily usable through RNA, i.e. we need it to
be defined in DNA.

So instead of trying to use direntry in DNA, mixing low-level system stuff like stat
where we do not want to see it, we define our own 'file' representation,
with only what we really need (who cares about chars or block or dev files in filebrowser?
we only need to know whether it's a regular file or a directory, period).

That way, low-level dirlisting remains clean, and we can easily extend our own
data as needed.

Note this new code works, does not crash (so far...) nor memleak, but it
needs quite a bit of work still, we are still storing useless stuff in direntry
(all those strings representing modes, size etc.!), and mem handling
during dir/lib listing is confusing at best (would like to use a memarena
or mempool here, but it's not that easy).
2015-02-18 21:36:48 +01:00
3e6aa7bd08 Merge branch 'master' into asset-experiments 2015-02-18 19:30:06 +01:00
a35ced0b97 Merge branch 'master' into asset-experiments 2015-02-17 15:37:20 +01:00
14ff7cdf76 Merge branch 'master' into asset-experiments 2015-02-16 16:21:28 +01:00
ecb79a5bd5 Preview generation on Windows: attempt to fix mysterious error by using even more ID's names.
Passing around ID's themselves is not safe - they may change their mem addresses.

Yet, I had no issue on linux, but on win build this is still not enough,
have to use a super strange hack (add an 'import sys' line just before where error happens)
to get things running...
2015-02-16 14:54:19 +01:00
d893c9f198 Merge branch 'master' into asset-experiments 2015-02-16 14:01:44 +01:00
07042a8d5d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
2015-02-15 16:54:08 +01:00
d78819caf9 Cleanup of ugly allocation stuff (cast of void pointer, not-so-safe sizeof()'s, etc.). 2015-02-15 15:28:43 +01:00
ec071eb76a Merge branch 'master' into asset-experiments 2015-02-15 15:10:34 +01:00
5e25fdd514 Merge branch 'master' into asset-experiments 2015-02-15 10:39:38 +01:00
fb2c646dee Rework job multi-level listing - factorize even more and avoid recursion.
This is much cleaner than previous code...
2015-02-13 22:28:36 +01:00
3e603b606c Merge branch 'master' into asset-experiments 2015-02-13 19:47:00 +01:00
4c02644a58 Merge branch 'master' into asset-experiments 2015-02-12 19:45:25 +01:00
c6ea9e8f48 Merge branch 'master' into asset-experiments 2015-02-12 19:35:41 +01:00
05390dc4b5 Cleanup. 2015-02-12 18:01:02 +01:00
09a09c1010 Merge branch 'master' into asset-experiments 2015-02-12 17:55:07 +01:00
5144dcaeab Add previews to scenes, and enhance batch preview generation.
Batch preview generation can now also generate 'internal' previews (materials, textures etc.),
as well as scene ones. Also, some basic Cycles handling is there now.
You can now chose which kind of data to generate previews for, and whether the files are
trusted or not (for py autorun and drivers).
And rendering happens in background again, issue was actually a bug in creator.c, fixed in master.
Main TODOs reamining here: OpenGL rendering, and find a way to prevent '.blend1' when
saving over (either as a new option of save op, or simply by removing those files in script?).

Added a batch cleanup of previews too.

Also, added path of files as their tooltip 'image' button in main filebrowser view,
quite useful with the 'recursive' option...
2015-02-12 17:53:00 +01:00
e9484fa25e Merge branch 'master' into asset-experiments 2015-02-11 17:32:41 +01:00
92ef1b997b Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/space_file.c
2015-02-11 11:18:42 +01:00
6f603ea0d2 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
	source/blender/editors/include/ED_fileselect.h
	source/blender/editors/interface/interface_intern.h
	source/blender/editors/interface/interface_templates.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/fsmenu.c
	source/blender/editors/space_file/space_file.c
	source/blender/makesrna/intern/rna_space.c
2015-02-11 11:14:42 +01:00
67eb234783 Merge branch 'master' into asset-experiments 2015-02-10 12:40:24 +01:00
ec4b79fb60 Merge branch 'master' into asset-experiments 2015-02-09 10:15:02 +01:00
08bccfed6c Merge branch 'master' into asset-experiments 2015-02-09 09:20:39 +01:00
d8567fc45d Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-02-06 17:31:55 +01:00
51bc0a2b5d Fix crash when appending/linking (double free...). 2015-02-04 20:41:13 +01:00
8374fe855e Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2015-02-04 20:14:04 +01:00
399ae5d41a Make 'recursion' work as expected.
Now, recursion  0 = previous behavior,
     recursion  1 = only show content of immediate .blend files, do not recurse in actual dir hierarchy,
     recursion >1 = complete recursion!
2015-02-03 21:47:51 +01:00
ad1399acc4 Flat listing of libs: do not show the 'categories' directories unless we are
inside a single .blend lib in this case, useless and heavily clutters space.
2015-02-03 21:18:07 +01:00
d04a0baae7 Merge branch 'master' into asset-experiments 2015-02-03 20:45:25 +01:00
c0d0b3db66 Merge branch 'master' into asset-experiments 2015-02-02 12:16:00 +01:00
8b19837b83 Cleanup: add 'ED_' prefix to public fsmenu functions... 2015-02-01 21:02:29 +01:00
f6b9cad064 Cleanup: get rid of unused stuff! 2015-02-01 20:49:45 +01:00
9a4eb983be Merge branch 'master' into asset-experiments 2015-02-01 20:35:48 +01:00
93da0a8187 Prepare assets UI: switch filebrowser to tools + tool props areas, instead of channels.
This will allow us to keep op panel independent, and have tabs for future assets tools!

Note 'conversion' from previous file area (channels) is not perfect, you have to hit 'T'
twice currently if you had a filebrowser in your .blend file...
2015-01-30 18:38:02 +01:00
b3cd561032 Merge branch 'master' into asset-experiments 2015-01-30 13:58:45 +01:00
8ebe85f733 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_operators/wm.py
2015-01-29 19:37:50 +01:00
9efd36bac0 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/windowmanager/intern/wm_operators.c
2015-01-27 19:51:35 +01:00
d41e1c00e6 Merge branch 'master' into asset-experiments 2015-01-27 12:02:40 +01:00
1c83d9ddbb Fix filtering in new UIList bookmarks & co. 2015-01-26 21:41:31 +01:00
ce765ad441 Better sorting when we are displaying several levels at once, for 'lib' append/link.
Consider blendfiles and 'categories' inside them as regular dirs, but with this hierachy:
    real dir > blende file lib > category in a blend lib.

This gives a much better sorting (among other things, gives more importance to
blend files!).
2015-01-26 21:30:00 +01:00
b3c0b59825 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/file_ops.c
	source/blender/editors/space_file/filelist.c
2015-01-26 17:38:16 +01:00
6f1e2e562d Merge branch 'master' into asset-experiments 2015-01-26 12:28:00 +01:00
6199ce89a8 Reworked from scratch 'icon over previews' feature.
Previous implementation was horribly complicated in the end... sigh.
2015-01-25 15:30:46 +01:00
bdda315260 Fix crasher (Looks like PointerRNA->type can be NULL...). 2015-01-25 14:59:04 +01:00
50d25aa395 Merge branch 'master' into asset-experiments 2015-01-25 12:43:36 +01:00
b1a885ab16 Merge branch 'master' into asset-experiments 2015-01-20 14:07:41 +01:00
8ff6e455fa Merge branch 'master' into asset-experiments 2015-01-18 18:50:31 +01:00
f1d1073046 Merge branch 'master' into asset-experiments 2015-01-17 20:09:37 +01:00
956d8e0ddd Fix for Windows - 'foobar.blend\' is a valid file path to that OS, sigh...
Also, store temp nullified pathsep in chars now, better.
2015-01-17 20:08:12 +01:00
03b7104b72 Fix stupid UI/py bug after recent refactor. 2015-01-17 00:04:06 +01:00
2d98ce2e72 Merge branch 'master' into asset-experiments 2015-01-17 00:03:33 +01:00
de3fd8a45c Merge branch 'master' into asset-experiments 2015-01-15 16:23:19 +01:00
d7b0bc9522 Merge branch 'master' into asset-experiments 2015-01-13 16:44:36 +01:00
548029c000 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
2015-01-13 16:42:33 +01:00
0715b73e18 Recursive listdir: let user set level of recursion... 2015-01-13 15:41:10 +01:00
912cdb2acb Merge branch 'master' into asset-experiments 2015-01-13 14:57:27 +01:00
5fccc64f6d Merge branch 'master' into asset-experiments 2015-01-13 14:15:01 +01:00
c944362fcd Merge branch 'master' into asset-experiments 2015-01-12 19:58:43 +01:00
27ce761880 Reorganization:
* Make 'clear preview' a C operator;
* Move 'object preview generator' op in wm namespace;
* Add those two to file-> data preview submenu.
2015-01-12 17:45:45 +01:00
517b06c296 Reorganization: move ID filters to DNA_ID.h, and add helpers in bke's idcode.c to convert between idcode and idfilter. 2015-01-12 17:44:44 +01:00
3118756854 Merge branch 'master' into asset-experiments 2015-01-12 15:50:35 +01:00
d35bbc2a15 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/intern/group.c
	source/blender/blenkernel/intern/object.c
2015-01-10 10:18:23 +01:00
2c7ee72167 Add moving around bookmarks (same system as for vgroups etc.). 2015-01-07 21:13:45 +01:00
884603573a Merge branch 'master' into asset-experiments 2015-01-07 14:22:12 +01:00
67231a22a2 Merge branch 'master' into asset-experiments 2015-01-07 12:47:51 +01:00
e53cdbf62f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/include/UI_interface_icons.h
	source/blender/editors/interface/interface_icons.c
	source/blender/windowmanager/intern/wm_files.c
2015-01-07 12:44:45 +01:00
d46c9b876c Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
2015-01-07 12:05:23 +01:00
dbd766f827 Nearly finished 'UIList for bookmarks'.
Got completely rid of C code for those panels.

Added full path in ttips of each 'bookmark' entry, as in current master.
Note this forced me to make tip in uiBut dynamic (like label). Not so sure
about this, but seems to me forcing tooltips to be static is actually quite
bad and limitating? we'll see...

Only remaining TODO (new feature) is reordering of bookmarks, should be easy now.

Also fixed some stupid (again!) mistake with RNA access to paths of bookmark entries.
2015-01-05 21:12:23 +01:00
de229b4085 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/space_file.c
2015-01-05 16:15:37 +01:00
3993965bd7 Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/file_draw.c
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filesel.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/windowmanager/intern/wm_operators.c
2015-01-04 18:43:08 +01:00
97a00b9199 Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/space_filebrowser.py
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
	source/blender/makesdna/DNA_space_types.h
	source/blender/makesrna/intern/rna_space.c
2015-01-03 22:05:01 +01:00
d237ac45fe Get rid of this stupid string len def, RNA knows this better! 2015-01-03 21:34:17 +01:00
0f44f5506f Fix some issues with image previews.
* When overlaying icon, we have to also ensure background pict is always the same size
  (else you get usgly icon size changes). Still not perfect though, suspect some more issues
  in filrdraw code, probably should systematiacally run the 'ensure size' code during thumbnail
  generation?
* Sharing of img ImBuf between thumbnail job and main thread could still happen,
  leading to random crashes.
2015-01-03 18:43:51 +01:00
d730ff663b Fix py script generating obj/group previews after recent merge. 2015-01-03 17:39:23 +01:00
8f4d6f62ea Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenkernel/BKE_camera.h
	source/blender/blenkernel/intern/camera.c
	source/blender/blenlib/BLI_fileops.h
	source/blender/blenlib/intern/storage.c
	source/blender/editors/space_file/filelist.c
	source/blender/makesrna/intern/rna_object_api.c
	tests/gtests/blenlib/BLI_path_util_test.cc
2015-01-03 17:07:16 +01:00
55c792df8e Add 'dup_poin' callback param to new BLI_duplicate_filelist() func, to allow handling direntry's poin if needed. 2015-01-02 17:38:25 +01:00
7b05fd5830 Merge branch 'master' into asset-experiments 2015-01-02 17:24:39 +01:00
67040e08d3 Fix issues when giving a non-existent dir to filebrowser.
Note: unlike in current master, path is checked immediately when setting it
into filelist (simpler now that filelist building itself is threaded).
`filelist_setdir()` modifies in place given path if this one is not valid.
2015-01-01 16:58:30 +01:00
87518faa20 Use new BLI fnmatch helpers to fix wrong update in some cases when editing
string search filter.
2015-01-01 15:30:02 +01:00
e660793896 Add BLI helpers for fnmatch head/tail wildcards handling.
`BLI_fnmatch_strncpy_add_endswildcards()` will copy and add '*' wildcards on both ends of given string, if needed.

`BLI_fnmatch_strcmp_ignore_endswildcards()` is same as strcmp, but ignores any '*' wildcards on both ends of given strings.
2015-01-01 15:23:16 +01:00
224eb0025f Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/interface/interface_icons.c
2015-01-01 15:18:38 +01:00
31043d87cd Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-01-01 11:35:21 +01:00
de0b270014 Merge branch 'master' into asset-experiments 2015-01-01 11:11:10 +01:00
0fa91e1723 SpaceFile: Cleanup: fix stupid indices in filelist_from_main()
Dead code (currently), but still...
2015-01-01 11:10:12 +01:00
aa336809fa Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/editors/space_file/filelist.c
	source/blender/editors/space_file/filelist.h
	source/blender/editors/space_file/space_file.c
2015-01-01 11:08:21 +01:00
425e8119de SpaceFile: Tweak thumbnail to avoid restarting the job needlessly. 2014-12-31 20:45:39 +01:00
4f241d3d36 SpaceFile: Refactor sorting and filtering of filelist.
New code shall be more easy to maintain and extend.
Sorting is now handled quite the same as filtering, and all filtering parameters
are now packed into a sub-struct to help extending it later.

Also done some optimizations in filelist refresh, and sorting/filtering area.
Now we should avoid re-sorting and re-filtering too often, also removed
calls to those in read_xxx funcs.

Note thumbnail job is still started basically on each call to `file_refresh()`,
will be addressed in next commit.
2014-12-31 20:13:21 +01:00
6a7076c9d4 SpaceFile: Filelist: reorder a bit things, also cleanup some unused and pure-private funcs. 2014-12-31 19:25:41 +01:00
ba0294cfe0 Merge branch 'master' into asset-experiments 2014-12-31 12:00:06 +01:00
0350111424 Merge branch 'master' into asset-experiments 2014-12-29 16:50:37 +01:00
8fa24594ce Merge branch 'master' into asset-experiments 2014-12-28 12:52:52 +01:00
1d42f07d58 Change timer of readdir job to 10ms, this gives an 'immediate' listing for most
usual cases, as in current master.
2014-12-28 12:49:24 +01:00
dc0a4fde63 Merge branch 'master' into asset-experiments 2014-12-27 17:26:17 +01:00
00cb0035a7 Fix one more issue - we need a string length callback too, for pure 'virtual' RNA strings... 2014-12-26 21:50:36 +01:00
4e19102964 Fix a mem leak in file listing threaded code, and another bug in fsmenu.c (new named bookmarks). 2014-12-26 19:58:08 +01:00
3c52c4ab0a Merge branch 'master' into asset-experiments
Conflicts:
	release/scripts/startup/bl_ui/__init__.py
	source/blender/editors/interface/interface_utils.c
2014-12-26 18:37:01 +01:00
0357a4928f Fix some 'minor' errors in fsmenuentry RNA name handling.
Still have a nice mem leak somewhere too... :/
2014-12-22 16:01:19 +01:00
4b1f410012 Add buttons to add/remove bookmarks, and to reset recent list. 2014-12-22 15:20:33 +01:00
cfc61a9337 Filebrowser uilist bookmarks: add icons as expected. 2014-12-22 14:47:12 +01:00
acaa5b2748 You can now edit bookmarks (and recent) names... 2014-12-22 14:39:54 +01:00
aa87764d13 WIP UILists for filebrowser: add access to three remaining types.
This also change update of active bookmark indices to happen in file_refresh().

Still not fully working, of course.
2014-12-22 12:25:40 +01:00
1a5caea321 Merge branch 'master' into asset-experiments 2014-12-22 10:26:07 +01:00
242fdf5e60 WIP: merge work on local branch about using UILists for bookmarks, be able to rename them, etc.
Doing it mostly because I need some update work done here so far to get py uilists/bookmarks working.

This exposes/moves part of bookmark code to ED_ area, so that it becomes available from e.g. RNA.
And adds RNA struct and such to represent a bookmark entry.

Also, Bookmark format is ammended to store optional custom names.

All this is still *very* crappy, should probably take some time soon to cleanup the whole branch!

See also T42777.
2014-12-21 16:02:12 +01:00
b734d9bf17 Merge branch 'master' into asset-experiments 2014-12-21 15:20:21 +01:00
4478ddc3d9 Add group preview generation too. 2014-12-20 16:47:41 +01:00
aa24a7d0a5 Merge branch 'master' into asset-experiments 2014-12-20 13:44:41 +01:00
d1743e3783 Fix stupid error (CMake install does not clean removed files it seems :/ ) 2014-12-19 14:54:35 +01:00
1dab208eb8 Various improvements to obj preview generation:
* Do not render cameras, lamps etc. for now.
* Generate bbox in camera local space, gives much better results.
* Add an op to clear previews from files.
2014-12-19 14:29:06 +01:00
db9310ac67 Merge branch 'master' into asset-experiments 2014-12-19 13:59:13 +01:00
d0187bf624 Merge branch 'master' into asset-experiments 2014-12-18 19:38:29 +01:00
baeeacc62d First basic pyscripts to generate previews for objects.
Much to be done still, but with it you can select some blender file,
and generate a basic rendered preview of each object.
2014-12-18 19:36:51 +01:00
88ffc9767c Finalized working new 'fit in camera view' code.
Now for any object, we have an rna func to call with a set of (flatten :/)
coordinates, and we get back location this object should be to 'see'
all given points.

Would need more refinements, but will do for now.
2014-12-18 15:26:34 +01:00
95b103c73b Merge branch 'master' into asset-experiments 2014-12-18 12:37:32 +01:00
a79a8fa111 Full WIP work to get better control regarding 'camera' aspect of objects.
First expose a method in Object RNA to get camera projection matrix (done).

Then, expose a method to get camera position (and scale for ortho) so that
it fits a given set of coordinates (still unfinished).

this among other things implied rewriting `BKE_camera_view_frame_fit_to_scene()`
underlying logic so that it uses `CameraParams` system, instead of `BKE_camera_view_frame()` one.
2014-12-17 21:56:09 +01:00
5cc7df849f Fix stupid merge error. 2014-12-17 10:43:31 +01:00
12e3347a5a Merge branch 'master' into asset-experiments
Conflicts:
	source/blender/blenloader/intern/writefile.c
2014-12-17 10:42:52 +01:00
c440c22d18 RNA access to previews (image and icons).
Note since this gives python possibility to change those previews,
we add flags to PreviewImage to tag as user_defined.

TODO: replace all those shorts-used-as-bools by bitflags!
2014-12-16 18:03:28 +01:00
46d6d74386 Merge branch 'master' into asset-experiments 2014-12-16 16:59:01 +01:00
e1a345b3fe Ensure previews are up to date when saving .blend file.
Previuosly, we would only write existing data - and big previews were
nearly never generated by default.

Now, if saving previews is enabled, `wm_file_write()` will ensure
all 'common' previewable datablocks do have up-to-date previews
(brushes remain TODO here for now, they have both a preview **and**
an icon_imbuf, sigh...).

This implied adding an 'immediate' non-job-background version of
`ED_preview_icon_job()`.

Note this does not include objects/groups/etc. It's not simple to generate
previews for those, will probably go for a user-launched py operator here...

Also, cleanup some debug prints!
2014-12-16 14:41:44 +01:00
3c738b301f Never write preview data when doing memsave (i.e. undo).
Takes useless space, and they even could easily get out of sync.

Also, some minor preparative work to (re)generate previews on file write,
if needed!
2014-12-16 11:50:15 +01:00
b3b362a212 Reshufle a bit icon/preview size defines.
We now have a _RENDER_ variant of those, used when creating the previews,
so that we create 32x32 icons needed for those special screens...
2014-12-16 11:12:14 +01:00
9516d3fafc Some minor refinement regarding overlayed icons.
Note, even when unpremultiplying alpha, we still have 'breadcrumbs' around
icons, not sure why...
2014-12-16 09:56:57 +01:00
ddf519096d Merge branch 'master' into asset-experiments 2014-12-16 09:18:45 +01:00
02290ec582 A bit crappy, but working 'ID icons' over previews. 2014-12-15 19:55:15 +01:00
b36d5570c8 Refactor 'immediate search'
Previous implementation was uglyly relying on button using a specific
icon (VIEWZOOM) to enable this feature. Now we have a dedicated button flag
(UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA subtype (PROP_SEARCH) for that.

Also, if no icon is specified, it automatically set VIEWZOOM for it,
which saves us explicitely defining it in UI py code!

NOTE: this is to be committed asap in master, but has to wait for
after 2.73, so storing it here for now.
2014-12-15 14:52:10 +01:00
66f3def3b4 Cleanup: use ICON_DEFAULT_HEIGHT everywhere for ICON_SIZE_ICON
If we need bigger icon size for previews (like 32 instead of 16), then
it should be handled everywhere!
2014-12-15 13:02:54 +01:00
05926f7253 Do not set filetype to IMAGEFILE when we get a preview, this is absolutely stupid! 2014-12-15 12:28:17 +01:00
002e71f255 Merge branch 'master' into asset-experiments 2014-12-15 12:02:07 +01:00
f12f6ddd04 Fix stupid buggy behavior when init (root) dir had no trailing slash. 2014-12-15 11:19:43 +01:00
dfe8884e7a Add missing 'ID' icons, and a 'blenlib' filter to filetypes. 2014-12-15 11:03:44 +01:00
4f2e8c0315 Merge branch 'master' into asset-experiments 2014-12-15 09:37:56 +01:00
812f40c493 More borring boiling code for ob/group previews.
Also, try to make brushes also save their previews.

Anyway, something fishy is going on here, in theory we should get
previews for brushes, worlds, lamps... for free, but so far looks like
lib 'peek' code only handles mat/texture previews correctly?
2014-12-13 15:48:18 +01:00
3c634400a0 Add preview pointers to Object and Group, with read/write logic.
Doing nothing useful yet, though!

Note: ultimately we may want to move that preview stuff to ID struct,
so that we get a real basic generic handling of it, but for now
simpler to keep it as is.
2014-12-13 15:14:04 +01:00
8058d7d04f Merge branch 'master' into asset-experiments 2014-12-13 14:25:59 +01:00
35554d43b1 Merge branch 'master' into asset-experiments 2014-12-11 20:10:47 +01:00
8644862fac Add progressbar to dirlist job.
Progressbar value is quite chaotic currently, will check that later.

Also, fixed G.main still being used in job, and factorized once more time code.
2014-12-11 20:07:32 +01:00
5cf39b228d More cleanup, rename and commentting.
Also, definitively removed 'G.main.name protection' from lib reading
code. I do absolutely not see how listing a separate blend file handle
could possibly affect that anyway - and we do not want to access
G from non-main thread I'd bet...
2014-12-11 18:37:58 +01:00
b81d5a194a Atomic Cleanup: get rid of 'old' stuff no more used (mostly non-job read/list funcs)! 2014-12-11 18:16:32 +01:00
d211c58856 Merge branch 'master' into asset-experiments 2014-12-11 17:49:47 +01:00
7cb8a89aa0 Fix that stupid memleak in job-dir-listing code. 2014-12-11 17:46:46 +01:00
cb0272ceab Full rework of job (background) filereading code.
Now it works reasonably OK for filesystem, and also for .blend libs.

Code is even quite simpler than previous one. Now it needs some serious cleanup,
and find where (new) memleak comes from too.
2014-12-11 17:33:16 +01:00
9a7ff0f4fe Merge branch 'master' into asset-experiments 2014-12-11 09:57:06 +01:00
769de4ff1e Merge branch 'master' into asset-experiments 2014-12-10 21:16:42 +01:00
5d3ee3d695 WIP code to make readfilelists jobs.
Only very partially working in this state, still needs some work.
Proof of concept seems rather interesting though.

Also, only pure filesystem stuff is implemented for now.
2014-12-10 21:14:26 +01:00
3ff51cd5df Merge branch 'master' into asset-experiments 2014-12-10 17:05:04 +01:00
e4d9f9b772 Merge branch 'master' into asset-experiments 2014-12-10 15:58:39 +01:00
09b3e44b22 Reduce recursion to one level (.blend libs do not take that into account anyway).
Quicker, and in most cases I think this will be enough for libs and file browsing.

Real asset handling is another question.
2014-12-10 11:51:25 +01:00
c5fccb7caf Merge branch 'master' into asset-experiments 2014-12-10 11:40:01 +01:00
0add26e60b Merge branch 'master' into asset-experiments 2014-12-09 17:46:10 +01:00
c725d868af Filter completely 'dot-files', even when hidden in paths. 2014-12-09 17:44:29 +01:00
8f1df9fbba Fix wrong update when switching 'flat' state, also fix remaining memleak. 2014-12-09 17:23:32 +01:00
f06ed97ce7 Do not show ID-types filtering when we are not browsing libs! 2014-12-09 14:56:30 +01:00
f13f85676d Merge branch 'master' into asset-experiments 2014-12-09 14:15:35 +01:00
21030e3ae6 Merge branch 'master' into asset-experiments 2014-12-09 11:10:35 +01:00
677c716c0f Fix two very stupid bugs! 2014-12-08 19:21:39 +01:00
e28fb66186 More sorting fixes and tweaks (things should work rather OK now). 2014-12-08 18:51:38 +01:00
da7f20e385 Merge branch 'master' into asset-experiments 2014-12-08 17:37:49 +01:00
6b07e8e31d Take IDTypes into account when sorting by types.
Also:
* Changed BLO_library_path_explode, now r_group and r_name must be pointers of char pointer,
  if found they will point to right place in r_dir 'memspace'.
* Select everything in IDTypes filtering by default.
2014-12-08 16:40:43 +01:00
ffb0fc35a9 Get rid of BLO_is_a_library. 2014-12-08 13:59:32 +01:00
4e96fe77b1 Add ID-types filtering. 2014-12-08 12:45:54 +01:00
337d7b2a6a Merge branch 'master' into asset-experiments 2014-12-08 10:56:15 +01:00
f92e64f207 Merge branch 'master' into asset-experiments 2014-12-06 18:12:09 +01:00
5eaa8739c5 Moar fixes (re ;ostly filtering mixed lib/data and regular files). 2014-12-06 18:10:59 +01:00
c689af14d8 Make 'append/link' code handle data from several different sources at once.
Nothing really magic here, just grouping the imports by libfile/grouptype.
We could probably get better code (loop less on given list of 'files' to import)
but not sure it'd be worth it, this is not supposed to be a performance-critical point.
2014-12-06 18:05:54 +01:00
951dbff60e Moar fixes to sorting code and such. 2014-12-06 15:40:00 +01:00
53148b5ebc Some flatmode fixes:
* Delete filelist when changing flat setting (so that we get immediate update when changing that setting).
* Disable flat when going up in tree (we ;ight actually want to do this everytime).
2014-12-06 14:50:03 +01:00
429cc6072f Merge branch 'master' into asset-experiments 2014-12-06 12:57:54 +01:00
b3e2cbac79 Merge branch 'master' into asset-experiments 2014-12-05 16:47:05 +01:00
9939e783a9 Reworked 'flat' mode, added it outside of blendfiles (libraries).
Note this is WIP, it 'breaks' load/append/etc. operators to some points,
and many other 'details' that need to be addressed.
2014-12-05 16:43:57 +01:00
276286aa85 Merge branch 'master' into asset-experiments 2014-12-05 12:45:31 +01:00
5ceec532b7 Merge branch 'master' into asset-experiments 2014-12-04 18:46:11 +01:00
9ea42ae3ba Add basic 'glob' filter by name feature.
Not much to add, we'll likely add more filtering options (tags, categories...) later,
maybe for now we just need an 'exclude' option for name filter...
2014-12-04 18:43:17 +01:00
f8f82821ef Refactor: do not filter each item twice! Mem usage here is not really an issue anyway. 2014-12-04 17:45:55 +01:00
d9b4186e6e Refactor filtering code, should be easier to add new filter options now. 2014-12-04 17:30:51 +01:00
c728f537ae Fix issues when data name have slash inside.
Adding `BLO_library_path_explode` simplies things. We might end getting rid of
`BLO_is_a_library` (or rather, merge back both things) later, though.
2014-12-04 16:51:46 +01:00
1089d97f04 Fix stupid mistake preventing 'traditional' append/link 2014-12-04 15:23:56 +01:00
d00d1d5622 Cleanup: more. 2014-12-04 15:03:33 +01:00
f02bc0cda8 Cleanup, remove tons of debug prints 2014-12-04 14:53:55 +01:00
b65d8de56a Add icons to datatypes (IDs) in browser, when appending/linking.
Not yet previews, but still better than anonymous icon!
2014-12-04 14:48:56 +01:00
158e6fd7f3 Merge branch 'master' into asset-experiments 2014-12-04 11:19:31 +01:00
ff1ff9823d Merge branch 'master' into asset-experiments 2014-12-04 11:11:33 +01:00
ca70271876 Append/link from 'global' level works.
Note I had to implement 'relative' path handling for 'filenames' in
append/link op, we may want to do this a bit differently later?
2014-12-03 18:55:07 +01:00
b29258922f Fix name issue (stupid really), show them better in UI. 2014-12-03 16:39:05 +01:00
99a1f8172b Do not shoz/consider at all inner '..'
Also more debug code that'll need to be cleaned up
2014-12-03 16:07:28 +01:00
74ae847cfa First (awful) tests to get a whole blend file content shown flat
Main goal is to see whether we can use existing filelist to handle that
(by default it is 100% tree-oriented).

Also, getting some strange issues with ID name currently...
2014-12-03 15:29:18 +01:00
7840 changed files with 461881 additions and 738718 deletions

View File

@@ -2,7 +2,7 @@
# Configuration of clang-format
# =============================
#
# Tested to work with versions: 8 to 11.
# Tested to work with versions: 6 to 8.
# This causes parameters on continuations to align to the opening brace.
#
@@ -161,7 +161,6 @@ PenaltyBreakString: 1000000
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
ForEachMacros:
- BEGIN_ANIMFILTER_SUBCHANNELS
- BKE_pbvh_vertex_iter_begin
- BLI_FOREACH_SPARSE_RANGE
- BLI_SMALLSTACK_ITER_BEGIN
- BMO_ITER
@@ -239,7 +238,6 @@ ForEachMacros:
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- LISTBASE_FOREACH_INDEX
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
@@ -254,8 +252,8 @@ ForEachMacros:
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQ_ALL_BEGIN
- SEQ_ITERATOR_FOREACH
- SEQP_BEGIN
- SEQ_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter
@@ -264,6 +262,8 @@ ForEachMacros:
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
StatementMacros:
- PyObject_HEAD
- PyObject_VAR_HEAD
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
# StatementMacros:
# - PyObject_VAR_HEAD
# - STRINGIFY

View File

@@ -1,47 +0,0 @@
# The warnings below are disabled because they are too pedantic and not worth fixing.
# Some of them will be enabled as part of the Clang-Tidy task, see T78535.
Checks: >
-*,
readability-*,
-readability-uppercase-literal-suffix,
-readability-magic-numbers,
-readability-isolate-declaration,
-readability-convert-member-functions-to-static,
-readability-implicit-bool-conversion,
-readability-avoid-const-params-in-decls,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-misleading-indentation,
-readability-use-anyofallof,
-readability-function-cognitive-complexity,
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
-bugprone-branch-clone,
-bugprone-macro-parentheses,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-redundant-branch-condition,
modernize-*,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-nodiscard,
-modernize-loop-convert,
-modernize-pass-by-value,
# Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently.
-modernize-raw-string-literal
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: 1

View File

@@ -1,104 +0,0 @@
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# After running the above, commits listed in this file will be
# ignored by git blame. The blame will be shifted to the person
# who edited the line(s) before the ignored commit.
#
# To disable this ignorance for a command, run as follows
# git blame --ignore-revs-file="" <other options>
#
# Changes that belong here:
# - Massive comment, doxy-sections, or spelling corrections.
# - Clang-format, PEP8 or other automated changes which are *strictly* "no functional change".
# - Several commits should be added to this list at once, because adding
# one extra commit (to edit this file) after every cleanup is noisy.
# - No clang-tidy changes.
#
# Note:
# - The comment above the SHA should be the first line of the commit.
# - It is fine to pack together similar commits if they have the same explanatory comment.
# - Use only 40 character git SHAs; not smaller ones, not prefixed with rB.
#
# https://git-scm.com/docs/git-blame/2.23.0
# white space commit. (2 spaces -> tab).
0a3694cd6ebec710da7110e9f168a72d47c71ee0
# Cycles: Cleanup, spacing after preprocessor
cb4b5e12abf1fc6cf9ffc0944e0a1bc406286c63
# ClangFormat: apply to source, most of intern
e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
# Code Style: use "#pragma once" in source directory
91694b9b58ab953f3b313be9389cc1303e472fc2
# Code Style: use "#pragma once" in some newer headers
8198dbb888856b8c11757586df02aca15f132f90
# Code Style: use "#pragma once" in intern/ghost
1b1129f82a9cf316b54fbc025f8cfcc1a74b8589
# Cleanup: mostly comments, use doxy syntax & typos
e0cb02587012b4b2f4b18363dc7d0a7da2c02093
# Cleanup: use C comments for descriptive text
2abfcebb0eb7989e3d1e7d03f37ecf5c088210af
# use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed.
afacd184982e58a9c830a3d5366e25983939a7ba
# Spelling: It's Versus Its
3a7fd309fce89213b0224b3c6807adb2d1fe7ca8
# Spelling: Then Versus Than
d1eefc421544e2ea632fb35cb6bcaade4c39ce6b
# Spelling: Miscellaneous
84ef3b80de4915a24a9fd2fd214d0fa44e59b854
# Spelling: Loose Versus Lose
c0a6bc19794c69843c38451c762e91bc10136e0f
# Spelling: Apart Versus A Part
3d26cd01b9ba6381eb165e11536345ae652dfb41
# Cleanup: use 2 space indentation for CMake
3076d95ba441cd32706a27d18922a30f8fd28b8a
# Cleanup: use over-line for doxy comments
4b188bb08cf5aaae3c68ab57bbcfa037eef1ac10
# Cleanup: General comment style clean up of graph_edit.c and fcurve.c
0105f146bb40bd609ccbda3d3f6aeb8e14ad3f9e
# Cleanup: pep8 (indentation, spacing, long lines)
41d2d6da0c96d351b47acb64d3e0decdba16cb16
# Cleanup: pep8, blank lines
bab9de2a52929fe2b45ecddb1eb09da3378e303b
# Cleanup: PEP8 for python changes
1e7e94588daa66483190f45a9de5e98228f80e05
# GPencil: Cleanup pep8
a09cc3ee1a99f2cd5040bbf30c8ab8c588bb2bb1
# Cleanup: trailing space, remove tabs, pep8
c42a6b77b52560d257279de2cb624b4ef2c0d24c
# Cleanup: use C style doxygen comments
8c1726918374e1d2d2123e17bae8db5aadde3433
# Cleanup: use doxy sections for imbuf
c207f7c22e1439e0b285fba5d2c072bdae23f981
# Cleanup: clang-format
c4d8f6a4a8ddc29ed27311ed7578b3c8c31399d2
b5d310b569e07a937798a2d38539cfd290149f1c
8c846cccd6bdfd3e90a695fabbf05f53e5466a57
4eac03d821fa17546f562485f7d073813a5e5943
1166110a9d66af9c5a47cee2be591f50fdc445e8
# Cleanup: clang-format.
40d4a4cb1a6b4c3c2a486e8f2868f547530e0811

3
.gitignore vendored
View File

@@ -46,6 +46,3 @@ Desktop.ini
# smoke simulation noise tile (generated)
waveletNoiseTile.bin
# testing environment
/Testing

View File

@@ -41,10 +41,10 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.5)
# Prefer LEGACY OpenGL to be compatible with all the existing releases and
# platforms which don't have GLVND yet. Only do it if preference was not set
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't hare GLVND yet. Only do it if preference was not set
# externally.
if(NOT DEFINED OpenGL_GL_PREFERENCE)
set(OpenGL_GL_PREFERENCE "LEGACY")
@@ -63,9 +63,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/platform")
# avoid having empty buildtype
if(NOT DEFINED CMAKE_BUILD_TYPE_INIT)
set(CMAKE_BUILD_TYPE_INIT "Release")
# Internal logic caches this variable, avoid showing it by default
# since it's easy to accidentally set instead of the build type.
mark_as_advanced(CMAKE_BUILD_TYPE_INIT)
endif()
# Omit superfluous "Up-to-date" messages.
@@ -105,15 +102,6 @@ if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif()
# find_package() uses <PackageName>_ROOT variables.
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
# Install CODE|SCRIPT allow the use of generator expressions.
if(POLICY CMP0087)
cmake_policy(SET CMP0087 NEW)
endif()
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
@@ -135,9 +123,7 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
if(MSVC)
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/$<CONFIG>/ CACHE INTERNAL "" FORCE)
else()
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests/ CACHE INTERNAL "" FORCE)
@@ -171,6 +157,10 @@ if(APPLE)
endif()
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
# add_library OBJECT arg unsupported
set(WITH_BUILDINFO OFF)
endif()
set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducible builds (empty string disables this option)")
set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducible builds (empty string disables this option)")
set(CPACK_OVERRIDE_PACKAGENAME "" CACHE STRING "Use instead of the standard packagename (empty string disables this option)")
@@ -181,7 +171,6 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON)
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
@@ -194,7 +183,6 @@ if(APPLE)
else()
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ON)
endif()
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
@@ -202,13 +190,10 @@ option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)
option(WITH_POTRACE "Enable features relying on potrace" ON)
option(WITH_OPENVDB "Enable features relying on OpenVDB" ON)
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
option(WITH_NANOVDB "Enable usage of NanoVDB data structure for rendering on the GPU" ON)
option(WITH_HARU "Enable features relying on Libharu (Grease pencil PDF export)" ON)
# GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
@@ -240,7 +225,9 @@ option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on
mark_as_advanced(WITH_AUDASPACE)
mark_as_advanced(WITH_SYSTEM_AUDASPACE)
set_and_warn_dependency(WITH_AUDASPACE WITH_SYSTEM_AUDASPACE OFF)
if(NOT WITH_AUDASPACE)
set(WITH_SYSTEM_AUDASPACE OFF)
endif()
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
if(UNIX AND NOT APPLE)
@@ -302,33 +289,15 @@ option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.or
# Sound output
option(WITH_SDL "Enable SDL for sound and joystick support" ON)
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
if(APPLE)
option(WITH_COREAUDIO "Enable CoreAudio for audio support on macOS" ON)
else()
set(WITH_COREAUDIO OFF)
endif()
if(NOT WIN32)
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ON)
if(UNIX AND NOT APPLE)
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
endif()
else()
set(WITH_JACK OFF)
endif()
if(UNIX AND NOT APPLE)
option(WITH_SDL_DYNLOAD "Enable runtime dynamic SDL libraries loading" OFF)
endif()
if(UNIX AND NOT APPLE)
option(WITH_PULSEAUDIO "Enable PulseAudio for audio support on Linux" ON)
option(WITH_PULSEAUDIO_DYNLOAD "Enable runtime dynamic PulseAudio libraries loading" OFF)
else()
set(WITH_PULSEAUDIO OFF)
endif()
if(WIN32)
option(WITH_WASAPI "Enable Windows Audio Sessions API for audio support on Windows" ON)
else()
set(WITH_WASAPI OFF)
endif()
# Compression
option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON)
@@ -353,7 +322,7 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# Misc
if(WIN32 OR APPLE)
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
@@ -367,21 +336,16 @@ if(UNIX AND NOT APPLE)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
if((WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE) OR WITH_MOD_FLUID)
option(WITH_PYTHON_NUMPY "Include NumPy in Blender (used by Audaspace and Mantaflow)" ON)
endif()
if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries.
elseif(WITH_PYTHON_INSTALL OR WITH_PYTHON_NUMPY)
elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
mark_as_advanced(PYTHON_NUMPY_PATH)
set(PYTHON_NUMPY_INCLUDE_DIRS "" CACHE PATH "Path to the include directory of the NumPy module")
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
endif()
if(WITH_PYTHON_INSTALL)
option(WITH_PYTHON_INSTALL_NUMPY "Copy system NumPy into the blender install folder" ON)
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
if(UNIX AND NOT APPLE)
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
@@ -390,8 +354,8 @@ if(WITH_PYTHON_INSTALL)
endif()
endif()
option(WITH_CPU_SIMD "Enable SIMD instruction if they're detected on the host machine" ON)
mark_as_advanced(WITH_CPU_SIMD)
option(WITH_CPU_SSE "Enable SIMD instruction if they're detected on the host machine" ON)
mark_as_advanced(WITH_CPU_SSE)
# Cycles
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
@@ -403,18 +367,17 @@ option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
set(CYCLES_TEST_DEVICES CPU CACHE STRING "Run regression tests on the specified device types (CPU CUDA OPTIX OPENCL)" )
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 compute_75 CACHE STRING "CUDA architectures to build binaries for")
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG_NAN "Build Cycles with additional asserts for detecting NaNs and invalid values" OFF)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
option(WITH_CYCLES_KERNEL_ASAN "Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even if it's very slow" OFF)
mark_as_advanced(WITH_CYCLES_KERNEL_ASAN)
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
mark_as_advanced(WITH_CYCLES_LOGGING)
mark_as_advanced(WITH_CYCLES_DEBUG_NAN)
mark_as_advanced(WITH_CYCLES_DEBUG)
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles CUDA compute support" ON)
@@ -428,10 +391,6 @@ mark_as_advanced(WITH_CYCLES_NETWORK)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
mark_as_advanced(WITH_CUDA_DYNLOAD)
# Draw Manager
option(WITH_DRAW_DEBUG "Add extra debug capabilities to Draw Manager" OFF)
mark_as_advanced(WITH_DRAW_DEBUG)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
if(APPLE)
@@ -440,7 +399,6 @@ else()
option(LLVM_STATIC "Link with LLVM static libraries" OFF)
endif()
mark_as_advanced(LLVM_STATIC)
option(WITH_CLANG "Use Clang" OFF)
# disable for now, but plan to support on all platforms eventually
option(WITH_MEM_JEMALLOC "Enable malloc replacement (http://www.canonware.com/jemalloc)" ON)
@@ -457,11 +415,6 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT)
if((UNIX AND NOT APPLE) OR (CMAKE_GENERATOR MATCHES "^Visual Studio.+"))
option(WITH_CLANG_TIDY "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang, or Windows using the Visual Studio IDE)" OFF)
mark_as_advanced(WITH_CLANG_TIDY)
endif()
option(WITH_BOOST "Enable features depending on boost" ON)
option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
@@ -470,14 +423,6 @@ if(WIN32)
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
endif()
# This should be turned off when Blender enter beta/rc/release
if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR
"${BLENDER_VERSION_CYCLE}" STREQUAL "rc")
set(WITH_EXPERIMENTAL_FEATURES OFF)
else()
set(WITH_EXPERIMENTAL_FEATURES ON)
endif()
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
@@ -528,10 +473,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
mark_as_advanced(WITH_LINKER_LLD)
endif()
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
mark_as_advanced(WITH_COMPILER_ASAN)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_ASAN "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)." OFF)
mark_as_advanced(WITH_COMPILER_ASAN)
if(WITH_COMPILER_ASAN)
set(_asan_defaults "\
-fsanitize=address \
@@ -548,22 +493,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-fno-sanitize=alignment \
")
if(MSVC)
# clang-cl doesn't support all sanitizers, but leak and object-size give errors/warnings.
set(_asan_defaults "${_asan_defaults}")
elseif(APPLE)
# AppleClang doesn't support all sanitizers, but leak gives error.
# Build type is not known for multi-config generator, so don't add object-size sanitizer.
if(CMAKE_BUILD_TYPE MATCHES "Debug" OR GENERATOR_IS_MULTI_CONFIG)
# Silence the warning that object-size is not effective in -O0.
set(_asan_defaults "${_asan_defaults}")
else()
string(APPEND _asan_defaults " -fsanitize=object-size")
endif()
else()
string(APPEND _asan_defaults " -fsanitize=leak -fsanitize=object-size")
if(NOT MSVC) # not all sanitizers are supported with clang-cl, these two however are very vocal about it
set(_asan_defaults "${_asan_defaults} -fsanitize=leak -fsanitize=object-size" )
endif()
set(COMPILER_ASAN_CFLAGS "${_asan_defaults}" CACHE STRING "C flags for address sanitizer")
mark_as_advanced(COMPILER_ASAN_CFLAGS)
set(COMPILER_ASAN_CXXFLAGS "${_asan_defaults}" CACHE STRING "C++ flags for address sanitizer")
@@ -571,47 +503,31 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
unset(_asan_defaults)
if(MSVC)
find_library(
COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
if(NOT MSVC)
find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
else()
find_library(
COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
)
elseif(APPLE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER}
-print-file-name=lib
OUTPUT_VARIABLE CLANG_LIB_DIR
)
string(STRIP "${CLANG_LIB_DIR}" CLANG_LIB_DIR)
find_library(
COMPILER_ASAN_LIBRARY
NAMES
libclang_rt.asan_osx_dynamic.dylib
PATHS
"${CLANG_LIB_DIR}/darwin/"
)
unset(CLANG_LIB_DIR)
else()
find_library(
COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
)
endif()
mark_as_advanced(COMPILER_ASAN_LIBRARY)
endif()
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_SHORT_FILE_MACRO "Make paths in macros like __FILE__ relative to top level source and build directories." ON)
mark_as_advanced(WITH_COMPILER_SHORT_FILE_MACRO)
endif()
if(WIN32)
# Use hardcoded paths or find_package to find externals
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
option(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS "Organize the source files in filters matching the source folders." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
@@ -629,24 +545,6 @@ if(WIN32)
endif()
if(WIN32 OR XCODE)
option(IDE_GROUP_SOURCES_IN_FOLDERS "Organize the source files in filters matching the source folders." ON)
mark_as_advanced(IDE_GROUP_SOURCES_IN_FOLDERS)
option(IDE_GROUP_PROJECTS_IN_FOLDERS "Organize the projects according to source folder structure." ON)
mark_as_advanced(IDE_GROUP_PROJECTS_IN_FOLDERS)
if (IDE_GROUP_PROJECTS_IN_FOLDERS)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
endif()
if(UNIX)
# See WITH_WINDOWS_SCCACHE for Windows.
option(WITH_COMPILER_CCACHE "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)" OFF)
mark_as_advanced(WITH_COMPILER_CCACHE)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
if("${CMAKE_GENERATOR}" MATCHES "Ninja")
option(WITH_NINJA_POOL_JOBS
@@ -701,11 +599,16 @@ if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
)
endif()
set_and_warn_dependency(WITH_AUDASPACE WITH_OPENAL OFF)
set_and_warn_dependency(WITH_AUDASPACE WITH_COREAUDIO OFF)
set_and_warn_dependency(WITH_AUDASPACE WITH_JACK OFF)
set_and_warn_dependency(WITH_AUDASPACE WITH_PULSEAUDIO OFF)
set_and_warn_dependency(WITH_AUDASPACE WITH_WASAPI OFF)
if(NOT WITH_AUDASPACE)
if(WITH_OPENAL)
message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
set(WITH_OPENAL OFF)
endif()
if(WITH_JACK)
message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
set(WITH_JACK OFF)
endif()
endif()
if(NOT WITH_SDL AND WITH_GHOST_SDL)
message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL")
@@ -716,8 +619,10 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
set_and_warn_dependency(WITH_PYTHON WITH_CYCLES OFF)
set_and_warn_dependency(WITH_PYTHON WITH_DRACO OFF)
if(NOT WITH_PYTHON)
set(WITH_CYCLES OFF)
set(WITH_DRACO OFF)
endif()
if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
@@ -734,8 +639,6 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
@@ -749,15 +652,8 @@ set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
# NanoVDB requires OpenVDB to convert the data structure
set_and_warn_dependency(WITH_OPENVDB WITH_NANOVDB OFF)
# OpenVDB and OpenColorIO uses 'half' type from OpenEXR
# OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled.
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENCOLORIO OFF)
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
# auto enable openimageio for cycles
if(WITH_CYCLES)
@@ -766,7 +662,6 @@ if(WITH_CYCLES)
# auto enable llvm for cycles_osl
if(WITH_CYCLES_OSL)
set(WITH_LLVM ON CACHE BOOL "" FORCE)
set(WITH_CLANG ON CACHE BOOL "" FORCE)
endif()
else()
set(WITH_CYCLES_OSL OFF)
@@ -789,7 +684,6 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
message(STATUS "Disabling Ghost Wayland, X11, Input IME, and OpenXR")
set(WITH_GHOST_WAYLAND OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11_XINPUT OFF)
@@ -801,6 +695,14 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_XR_OPENXR OFF)
endif()
if(WITH_CPU_SSE)
TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
else()
message(STATUS "SSE and SSE2 optimizations are DISABLED!")
set(COMPILER_SSE_FLAG)
set(COMPILER_SSE2_FLAG)
endif()
if(WITH_BUILDINFO)
find_package(Git)
if(NOT GIT_FOUND)
@@ -820,7 +722,7 @@ endif()
if(NOT WITH_CUDA_DYNLOAD)
find_package(CUDA)
if(NOT CUDA_FOUND)
message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead")
message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
set(WITH_CUDA_DYNLOAD ON)
endif()
endif()
@@ -849,8 +751,8 @@ if(WITH_PYTHON)
# Do this before main 'platform_*' checks,
# because UNIX will search for the old Python paths which may not exist.
# giving errors about missing paths before this case is met.
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.9")
message(FATAL_ERROR "At least Python 3.9 is required to build, but found Python ${PYTHON_VERSION}")
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
message(FATAL_ERROR "At least Python 3.7 is required to build")
endif()
file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/scripts/addons")
@@ -884,10 +786,11 @@ set(CXX_WARNINGS)
set(C_REMOVE_STRICT_FLAGS)
set(CXX_REMOVE_STRICT_FLAGS)
# Libraries to link to targets in setup_platform_linker_libs
# libraries to link the binary with passed to target_link_libraries()
# known as LLIBS to scons
set(PLATFORM_LINKLIBS "")
# Added to target linker flags in setup_platform_linker_flags
# Added to linker flags in setup_liblinks
# - CMAKE_EXE_LINKER_FLAGS
# - CMAKE_EXE_LINKER_FLAGS_DEBUG
set(PLATFORM_LINKFLAGS "")
@@ -895,29 +798,15 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(WITH_COMPILER_ASAN)
if(NOT APPLE)
# Avoid passing address sanitizer compiler flags to `try_compile`.
# Since linker flags are not set, all compiler checks and `find_package`
# calls that rely on `try_compile` will fail.
# See CMP0066 also.
string(APPEND CMAKE_C_FLAGS_DEBUG " ${COMPILER_ASAN_CFLAGS}")
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${COMPILER_ASAN_CFLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMPILER_ASAN_CXXFLAGS}")
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${COMPILER_ASAN_CXXFLAGS}")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
if(MSVC)
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
endif()
if(APPLE AND COMPILER_ASAN_LIBRARY)
string(REPLACE " " ";" _list_COMPILER_ASAN_CFLAGS ${COMPILER_ASAN_CFLAGS})
set(_is_CONFIG_DEBUG "$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>")
add_compile_options("$<${_is_CONFIG_DEBUG}:${_list_COMPILER_ASAN_CFLAGS}>")
add_link_options("$<${_is_CONFIG_DEBUG}:-fno-omit-frame-pointer;-fsanitize=address>")
unset(_list_COMPILER_ASAN_CFLAGS)
unset(_is_CONFIG_DEBUG)
elseif(COMPILER_ASAN_LIBRARY)
if(COMPILER_ASAN_LIBRARY)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
@@ -925,18 +814,6 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
endif()
endif()
# Test SIMD support, before platform includes to determine if sse2neon is needed.
if(WITH_CPU_SIMD)
set(COMPILER_SSE_FLAG)
set(COMPILER_SSE2_FLAG)
# Test Neon first since macOS Arm can compile and run x86-64 SSE binaries.
TEST_NEON_SUPPORT()
if(NOT SUPPORT_NEON_BUILD)
TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
endif()
endif()
# ----------------------------------------------------------------------------
# Main Platform Checks
#
@@ -992,49 +869,22 @@ if(WITH_INTERNATIONAL)
endif()
endif()
# Enable SIMD support if detected by TEST_SSE_SUPPORT() or TEST_NEON_SUPPORT().
#
# This is done globally, so that all modules can use it if available, and
# because these are used in headers used by many modules.
if(WITH_CPU_SIMD)
if(SUPPORT_NEON_BUILD)
# Neon
if(SSE2NEON_FOUND)
blender_include_dirs_sys("${SSE2NEON_INCLUDE_DIRS}")
add_definitions(-DWITH_SSE2NEON)
endif()
else()
# SSE
if(SUPPORT_SSE_BUILD)
string(PREPEND PLATFORM_CFLAGS "${COMPILER_SSE_FLAG} ")
add_definitions(-D__SSE__ -D__MMX__)
endif()
if(SUPPORT_SSE2_BUILD)
string(APPEND PLATFORM_CFLAGS " ${COMPILER_SSE2_FLAG}")
add_definitions(-D__SSE2__)
if(NOT SUPPORT_SSE_BUILD) # don't double up
add_definitions(-D__MMX__)
endif()
endif()
endif()
# See TEST_SSE_SUPPORT() for how this is defined.
# Print instructions used
if(SUPPORT_NEON_BUILD)
if(SSE2NEON_FOUND)
message(STATUS "Neon SIMD instructions enabled")
else()
message(STATUS "Neon SIMD instructions detected but unused, requires sse2neon")
endif()
elseif(SUPPORT_SSE2_BUILD)
message(STATUS "SSE2 SIMD instructions enabled")
elseif(SUPPORT_SSE_BUILD)
message(STATUS "SSE SIMD instructions enabled")
else()
message(STATUS "No SIMD instructions detected")
endif()
else()
message(STATUS "SIMD instructions disabled")
# Do it globally, SSE2 is required for quite some time now.
# Doing it now allows to use SSE/SSE2 in inline headers.
if(SUPPORT_SSE_BUILD)
set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
add_definitions(-D__SSE__ -D__MMX__)
endif()
if(SUPPORT_SSE2_BUILD)
set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}")
add_definitions(-D__SSE2__)
if(NOT SUPPORT_SSE_BUILD) # don't double up
add_definitions(-D__MMX__)
endif()
endif()
# set the endian define
if(MSVC)
@@ -1045,7 +895,7 @@ if(MSVC)
# endianess-detection and auto-setting is counterproductive
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64)
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
add_definitions(-D__LITTLE_ENDIAN__)
elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64)
add_definitions(-D__BIG_ENDIAN__)
@@ -1080,9 +930,6 @@ if(WITH_OPENVDB)
list(APPEND OPENVDB_DEFINITIONS -DOPENVDB_3_ABI_COMPATIBLE)
endif()
# OpenVDB headers use deprecated TBB headers, silence warning.
list(APPEND OPENVDB_DEFINITIONS -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1)
list(APPEND OPENVDB_INCLUDE_DIRS
${BOOST_INCLUDE_DIR}
${TBB_INCLUDE_DIRS}
@@ -1243,10 +1090,8 @@ if(WITH_OPENMP)
if(OPENMP_FOUND)
if(NOT WITH_OPENMP_STATIC)
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
# Typically avoid adding flags as defines but we can't
# pass OpenMP flags to the linker for static builds, meaning
@@ -1257,7 +1102,6 @@ if(WITH_OPENMP)
find_library_static(OpenMP_LIBRARIES gomp ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
endif()
else()
message(STATUS "OpenMP not found, disabling WITH_OPENMP")
set(WITH_OPENMP OFF)
endif()
@@ -1333,7 +1177,6 @@ list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
find_package(Bullet)
if(NOT BULLET_FOUND)
message(STATUS "Bullet not found, disabling WITH_BULLET")
set(WITH_BULLET OFF)
endif()
else()
@@ -1502,7 +1345,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
endif()
# versions before gcc4.6 give many BLI_math warnings
@@ -1540,7 +1382,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -1567,14 +1408,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-uninitialized)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_VARIABLE -Wno-uninitialized)
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
@@ -1598,17 +1435,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
# Using C++20 features while having C++17 as the project language isn't allowed by MSVC.
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_CXX20_DESIGNATOR -Wc++20-designator)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL -Wno-overloaded-virtual) # we get a lot of these, if its a problem a dev needs to look into it.
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
# Apple Clang (tested on version 12) doesn't support this flag while LLVM Clang 11 does.
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override)
# gives too many unfixable warnings
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS -Wunused-macros)
@@ -1618,7 +1450,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISLEADING_INDENTATION -Wno-misleading-indentation)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
@@ -1629,18 +1460,15 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNDEFINED_VAR_TEMPLATE -Wno-undefined-var-template)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_INSTANTIATION_AFTER_SPECIALIZATION -Wno-instantiation-after-specialization)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_MISLEADING_INDENTATION -Wno-misleading-indentation)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -1653,8 +1481,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
# disable numbered, false positives
string(APPEND C_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
string(APPEND CXX_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
# most msvc warnings are C & C++
set(_WARNINGS
@@ -1685,7 +1513,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
if(MSVC_VERSION GREATER_EQUAL 1911)
# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
string(APPEND _WARNINGS " /w35038") # order of initialization in c++ constructors
set(_WARNINGS "${_WARNINGS} /w35038") # order of initialization in c++ constructors
endif()
string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
@@ -1709,31 +1537,32 @@ if(WITH_PYTHON)
if(WIN32 OR APPLE)
# Windows and macOS have this bundled with Python libraries.
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR WITH_PYTHON_NUMPY)
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
find_python_package(numpy "core/include")
find_python_package(numpy)
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
endif()
endif()
if(WIN32 OR APPLE)
# pass, we have this in lib/python/site-packages
elseif(WITH_PYTHON_INSTALL_REQUESTS)
find_python_package(requests "")
find_python_package(requests)
endif()
endif()
# Select C++17 as the standard for C++ projects.
set(CMAKE_CXX_STANDARD 17)
# If C++17 is not available, downgrading to an earlier standard is NOT OK.
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Do not enable compiler specific language extentions.
set(CMAKE_CXX_EXTENSIONS OFF)
# Make MSVC properly report the value of the __cplusplus preprocessor macro
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
# of the C++ standard chosen above.
if(MSVC AND MSVC_VERSION GREATER 1913)
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus")
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
elseif(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR
CMAKE_C_COMPILER_ID MATCHES "Intel"
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build")
endif()
# Visual Studio has all standards it supports available by default
@@ -1744,47 +1573,12 @@ if(
(CMAKE_C_COMPILER_ID MATCHES "Intel")
)
# Use C11 + GNU extensions, works with GCC, Clang, ICC
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
if(UNIX AND NOT APPLE)
if(NOT WITH_CXX11_ABI)
string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0")
endif()
endif()
if(WITH_COMPILER_SHORT_FILE_MACRO)
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
ADD_CHECK_C_COMPILER_FLAG(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_PREFIX_MAP_FLAGS CXX_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
if(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
if(APPLE)
if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
# with Xcode-11 (the Clang of which doesn't support the flag).
message(WARNING
"-fmacro-prefix-map flag is NOT supported by Clang shipped with Xcode-${XCODE_VERSION}."
" Some Xcode functionality in Product menu may not work. Disabling WITH_COMPILER_SHORT_FILE_MACRO."
)
set(WITH_COMPILER_SHORT_FILE_MACRO OFF)
endif()
endif()
if(WITH_COMPILER_SHORT_FILE_MACRO)
path_ensure_trailing_slash(_src_dir "${CMAKE_SOURCE_DIR}")
path_ensure_trailing_slash(_bin_dir "${CMAKE_BINARY_DIR}")
# Keep this variable so it can be stripped from build-info.
set(PLATFORM_CFLAGS_FMACRO_PREFIX_MAP
"-fmacro-prefix-map=\"${_src_dir}\"=\"\" -fmacro-prefix-map=\"${_bin_dir}\"=\"\"")
string(APPEND PLATFORM_CFLAGS " ${PLATFORM_CFLAGS_FMACRO_PREFIX_MAP}")
unset(_src_dir)
unset(_bin_dir)
endif()
else()
message(WARNING
"-fmacro-prefix-map flag is NOT supported by C/C++ compiler."
" Disabling WITH_COMPILER_SHORT_FILE_MACRO."
)
set(WITH_COMPILER_SHORT_FILE_MACRO OFF)
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
endif()
endif()
@@ -1829,6 +1623,10 @@ endif()
#-----------------------------------------------------------------------------
# Libraries
if(WITH_GTESTS)
include(GTestTesting)
endif()
if(WITH_BLENDER)
add_subdirectory(intern)
add_subdirectory(extern)
@@ -1837,20 +1635,8 @@ if(WITH_BLENDER)
# internal and external library information first, for test linking
add_subdirectory(source)
elseif(WITH_CYCLES_STANDALONE)
add_subdirectory(intern/glew-mx)
add_subdirectory(intern/guardedalloc)
add_subdirectory(intern/libc_compat)
add_subdirectory(intern/numaapi)
add_subdirectory(intern/sky)
add_subdirectory(intern/cycles)
add_subdirectory(extern/clew)
if(WITH_CYCLES_LOGGING)
if(NOT WITH_SYSTEM_GFLAGS)
add_subdirectory(extern/gflags)
endif()
add_subdirectory(extern/glog)
endif()
if(WITH_CUDA_DYNLOAD)
add_subdirectory(extern/cuew)
endif()
@@ -1859,10 +1645,6 @@ elseif(WITH_CYCLES_STANDALONE)
endif()
endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
#-----------------------------------------------------------------------------
# Blender Application
if(WITH_BLENDER)
@@ -1870,6 +1652,11 @@ if(WITH_BLENDER)
endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
#-----------------------------------------------------------------------------
# Define 'heavy' submodules (for Ninja builder when using pools).
setup_heavy_lib_pool()
@@ -1899,7 +1686,7 @@ if(FIRST_RUN)
set(_msg " - ${_setting}")
string(LENGTH "${_msg}" _len)
while("32" GREATER "${_len}")
string(APPEND _msg " ")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
@@ -1917,29 +1704,23 @@ if(FIRST_RUN)
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
info_cfg_text("Build Options:")
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_BULLET)
info_cfg_option(WITH_CLANG)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FFTW3)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_GMP)
info_cfg_option(WITH_HARU)
info_cfg_option(WITH_IK_ITASC)
info_cfg_option(WITH_IK_SOLVER)
info_cfg_option(WITH_INPUT_NDOF)
info_cfg_option(WITH_INPUT_IME)
info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_IK_ITASC)
info_cfg_option(WITH_OPENCOLLADA)
info_cfg_option(WITH_FFTW3)
info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_INPUT_NDOF)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_XR_OPENXR)
info_cfg_option(WITH_OPENIMAGEDENOISE)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_POTRACE)
info_cfg_option(WITH_PUGIXML)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_TBB)
info_cfg_option(WITH_USD)
info_cfg_option(WITH_XR_OPENXR)
info_cfg_option(WITH_TBB)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)
@@ -1947,62 +1728,58 @@ if(FIRST_RUN)
info_cfg_text("System Options:")
info_cfg_option(WITH_INSTALL_PORTABLE)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)
info_cfg_option(WITH_SYSTEM_GLEW)
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)
info_cfg_option(WITH_SYSTEM_GLEW)
info_cfg_text("Image Formats:")
info_cfg_option(WITH_OPENIMAGEIO)
info_cfg_option(WITH_IMAGE_CINEON)
info_cfg_option(WITH_IMAGE_DDS)
info_cfg_option(WITH_IMAGE_HDR)
info_cfg_option(WITH_IMAGE_OPENEXR)
info_cfg_option(WITH_IMAGE_OPENJPEG)
info_cfg_option(WITH_IMAGE_TIFF)
info_cfg_option(WITH_OPENIMAGEIO)
info_cfg_text("Audio:")
info_cfg_option(WITH_OPENAL)
info_cfg_option(WITH_SDL)
info_cfg_option(WITH_SDL_DYNLOAD)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_JACK_DYNLOAD)
info_cfg_option(WITH_CODEC_AVI)
info_cfg_option(WITH_CODEC_FFMPEG)
info_cfg_option(WITH_CODEC_SNDFILE)
info_cfg_option(WITH_COREAUDIO)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_JACK_DYNLOAD)
info_cfg_option(WITH_OPENAL)
info_cfg_option(WITH_PULSEAUDIO)
info_cfg_option(WITH_PULSEAUDIO_DYNLOAD)
info_cfg_option(WITH_SDL)
info_cfg_option(WITH_SDL_DYNLOAD)
info_cfg_option(WITH_WASAPI)
info_cfg_text("Compression:")
info_cfg_option(WITH_LZMA)
info_cfg_option(WITH_LZO)
info_cfg_text("Python:")
if(APPLE)
info_cfg_option(WITH_PYTHON_FRAMEWORK)
endif()
info_cfg_option(WITH_PYTHON_INSTALL)
info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY)
if(APPLE)
info_cfg_option(WITH_PYTHON_FRAMEWORK)
endif()
info_cfg_text("Modifiers:")
info_cfg_option(WITH_MOD_REMESH)
info_cfg_option(WITH_MOD_FLUID)
info_cfg_option(WITH_MOD_OCEANSIM)
info_cfg_option(WITH_MOD_REMESH)
info_cfg_text("OpenGL:")
info_cfg_option(WITH_GLEW_ES)
info_cfg_option(WITH_GL_EGL)
info_cfg_option(WITH_GL_PROFILE_ES20)
if(WIN32)
info_cfg_option(WITH_GL_ANGLE)
endif()
info_cfg_option(WITH_GL_EGL)
info_cfg_option(WITH_GL_PROFILE_ES20)
info_cfg_option(WITH_GLEW_ES)
info_cfg_text("")

View File

@@ -26,31 +26,25 @@
define HELP_TEXT
Blender Convenience Targets
Convenience Targets
Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* release: Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* release Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers).
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options.
* ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
Other Convenience Targets
Provided for other building operations.
* config: Run cmake configuration tool to set build options.
* deps: Build library dependencies (intended only for platform maintainers).
The existance of locally build dependancies overrides the pre-built dependencies from subversion.
These must be manually removed from '../lib/' to go back to using the pre-compiled libraries.
Project Files
Generate project files for development environments.
@@ -63,7 +57,7 @@ Package Targets
* package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package.
* package_archive: Build an archive package.
Testing Targets
Not associated with building Blender.
@@ -87,22 +81,11 @@ Static Source Code Checking
* check_splint: Run blenders source through splint (C only).
* check_sparse: Run blenders source through sparse (C only).
* check_smatch: Run blenders source through smatch (C only).
* check_descriptions: Check for duplicate/invalid descriptions.
Spell Checkers
This runs the spell checker from the developer tools repositor.
* check_spelling_c: Check for spelling errors (C/C++ only),
* check_spelling_c: Check for spelling errors (C/C++ only).
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
* check_spelling_osl: Check for spelling errors (OSL only).
* check_spelling_py: Check for spelling errors (Python only).
Note: an additional word-list is maintained at: 'source/tools/check_source/check_spelling_c_config.py'
Note: that spell checkers can take a 'CHECK_SPELLING_CACHE' filepath argument,
so re-running does not need to re-check unchanged files.
Example:
make check_spelling_c CHECK_SPELLING_CACHE=../spelling_cache.data
* check_descriptions: Check for duplicate/invalid descriptions.
Utilities
Not associated with building Blender.
@@ -128,16 +111,10 @@ Utilities
* source_archive:
Create a compressed archive of the source code.
* source_archive_complete:
Create a compressed archive of the source code and all the libraries of dependencies.
* update:
Updates git and all submodules and svn.
updates git and all submodules
* update_code:
Updates git and all submodules but not svn.
* format:
* format
Format source code using clang (uses PATHS if passed in). For example::
make format PATHS="source/blender/blenlib source/blender/blenkernel"
@@ -167,7 +144,7 @@ endef
# This makefile is not meant for Windows
ifeq ($(OS),Windows_NT)
$(error On Windows, use "cmd //c make.bat" instead of "make")
$(error On Windows, use "cmd //c make.bat" instead of "make")
endif
# System Vars
@@ -197,13 +174,8 @@ endif
ifndef DEPS_INSTALL_DIR
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
# Add processor type to directory name, except for darwin x86_64
# which by convention does not have it.
ifeq ($(OS_NCASE),darwin)
ifneq ($(CPU),x86_64)
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
else
ifneq ($(OS_NCASE),darwin)
# Add processor type to directory name
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
endif
endif
@@ -217,7 +189,7 @@ endif
# in libraries, or python 2 for running make update to get it.
ifeq ($(OS_NCASE),darwin)
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=$(DEPS_INSTALL_DIR)/python/bin/python3.7m
PYTHON:=../lib/darwin/python/bin/python3.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
@@ -261,10 +233,6 @@ ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring ccache, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=-DWITH_COMPILER_CCACHE=YES $(CMAKE_CONFIG_ARGS)
endif
# -----------------------------------------------------------------------------
# build tool
@@ -364,7 +332,6 @@ headless: all
bpy: all
developer: all
ninja: all
ccache: all
# -----------------------------------------------------------------------------
# Build dependencies
@@ -379,7 +346,7 @@ deps: .FORCE
@cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo
@echo Building dependencies ...
@@ -456,8 +423,7 @@ project_eclipse: .FORCE
check_cppcheck: .FORCE
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
$(PYTHON) \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
@@ -481,9 +447,6 @@ check_smatch: .FORCE
cd "$(BUILD_DIR)" ; \
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
check_mypy: .FORCE
$(PYTHON) "$(BLENDER_DIR)/source/tools/check_source/check_mypy.py"
check_spelling_py: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
@@ -494,17 +457,26 @@ check_spelling_c: .FORCE
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc: .FORCE
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl: .FORCE
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
--cache-file=$(CHECK_SPELLING_CACHE) \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions: .FORCE
@@ -516,24 +488,14 @@ check_descriptions: .FORCE
#
source_archive: .FORCE
python3 ./build_files/utils/make_source_archive.py
source_archive_complete: .FORCE
cmake \
-S "$(BLENDER_DIR)/build_files/build_environment" -B"$(BUILD_DIR)/source_archive" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE) -DPACKAGE_USE_UPSTREAM_SOURCES=OFF
# This assumes CMake is still using a default `PACKAGE_DIR` variable:
python3 ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
./build_files/utils/make_source_archive.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/alert_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
icons_geom: .FORCE
BLENDER_BIN=$(BLENDER_BIN) \
@@ -542,12 +504,9 @@ icons_geom: .FORCE
update: .FORCE
$(PYTHON) ./build_files/utils/make_update.py
update_code: .FORCE
$(PYTHON) ./build_files/utils/make_update.py --no-libraries
format: .FORCE
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
# -----------------------------------------------------------------------------
@@ -556,11 +515,10 @@ format: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0:${ASAN_OPTIONS} \
$(BLENDER_BIN) \
--background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
ASAN_OPTIONS=halt_on_error=0 \
$(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/python_api/sphinx_doc_gen.py
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
doc_doxy: .FORCE
@@ -568,9 +526,8 @@ doc_doxy: .FORCE
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE
$(BLENDER_BIN) \
--background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
$(BLENDER_BIN) --background -noaudio --factory-startup \
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: .FORCE

View File

@@ -30,12 +30,11 @@
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install autoconf automake bison cmake libtool pkg-config yasm
# Additional requirements for macOS arm64: brew install flex
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
# Install compiler cmake autoconf automake libtool yasm tcl
# Install compiler cmake autoconf automake libtool yasm nasm tcl
# Run "make deps" from main Blender directory
#
####################################################################################################
@@ -47,7 +46,6 @@ include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
include(cmake/download.cmake)
if(ENABLE_MINGW64)
include(cmake/setup_mingw64.cmake)
@@ -56,10 +54,10 @@ else()
endif()
include(cmake/zlib.cmake)
include(cmake/zstd.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/openexr.cmake)
@@ -73,39 +71,28 @@ 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)
if(APPLE)
include(cmake/openmp.cmake)
endif()
if(UNIX)
include(cmake/nasm.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
if(WIN32)
include(cmake/flexbison.cmake)
elseif(UNIX AND NOT APPLE)
include(cmake/flex.cmake)
endif()
include(cmake/flexbison.cmake)
include(cmake/osl.cmake)
include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/nanovdb.cmake)
include(cmake/python.cmake)
option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
set(USE_PIP_NUMPY ON)
else()
include(cmake/numpy.cmake)
endif()
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
include(cmake/usd.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
@@ -113,21 +100,20 @@ if(NOT APPLE)
include(cmake/xr_openxr.cmake)
endif()
# OpenColorIO and dependencies.
include(cmake/expat.cmake)
include(cmake/yamlcpp.cmake)
include(cmake/opencolorio.cmake)
if(BLENDER_PLATFORM_ARM)
include(cmake/sse2neon.cmake)
endif()
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WIN32)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
# include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
@@ -169,7 +155,6 @@ endif()
if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake)
include(cmake/mesa.cmake)
include(cmake/wayland_protocols.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -19,6 +19,16 @@
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=OFF
-DBoost_DEBUG=ON
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DILMBASE_ROOT=${LIBDIR}/openexr
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
@@ -44,9 +54,9 @@ set(ALEMBIC_EXTRA_ARGS
)
ExternalProject_Add(external_alembic
URL file://${PACKAGE_DIR}/${ALEMBIC_FILE}
URL ${ALEMBIC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ALEMBIC_HASH_TYPE}=${ALEMBIC_HASH}
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
@@ -71,6 +81,7 @@ endif()
add_dependencies(
external_alembic
external_boost
external_zlib
external_openexr
)

View File

@@ -29,16 +29,16 @@ set(BLOSC_EXTRA_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
# Prevent blosc from including its own local copy of zlib in the object file
# Prevent blosc from including it's own local copy of zlib in the object file
# and cause linker errors with everybody else.
set(BLOSC_EXTRA_ARGS ${BLOSC_EXTRA_ARGS}
-DPREFER_EXTERNAL_ZLIB=ON
)
ExternalProject_Add(external_blosc
URL file://${PACKAGE_DIR}/${BLOSC_FILE}
URL ${BLOSC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BLOSC_HASH_TYPE}=${BLOSC_HASH}
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}

View File

@@ -18,27 +18,33 @@
set(BOOST_ADDRESS_MODEL 64)
if(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
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/)
set(BOOST_ADDRESS_MODEL 32)
endif()
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_COMMAND bjam)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
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-${BOOST_VERSION_NODOTS_SHORT}/ ${HARVEST_TARGET}/boost/include/)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
set(BOOST_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
@@ -54,21 +60,6 @@ else()
endif()
endif()
if(WITH_BOOST_PYTHON)
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
@@ -85,28 +76,19 @@ set(BOOST_OPTIONS
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL file://${PACKAGE_DIR}/${BOOST_FILE}
URL ${BOOST_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
URL_HASH MD5=${BOOST_HASH}
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=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WITH_BOOST_PYTHON)
add_dependencies(
external_boost
external_python
external_numpy
)
endif()

View File

@@ -30,9 +30,9 @@ else()
endif()
ExternalProject_Add(external_bzip2
URL file://${PACKAGE_DIR}/${BZIP2_FILE}
URL ${BZIP2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BZIP2_HASH_TYPE}=${BZIP2_HASH}
URL_HASH SHA256=${BZIP2_HASH}
PREFIX ${BUILD_DIR}/bzip2
CONFIGURE_COMMAND echo .
BUILD_COMMAND ${BZIP2_CONFIGURE_ENV} && cd ${BUILD_DIR}/bzip2/src/external_bzip2/ && make CFLAGS=${BZIP2_CFLAGS} LDFLAGS=${BZIP2_LDFLAGS} -j${MAKE_THREADS}

View File

@@ -26,23 +26,12 @@ if(UNIX)
set(_required_software
autoconf
automake
bison
${_libtoolize_name}
pkg-config
tclsh
nasm
yasm
tclsh
)
if(NOT APPLE)
set(_required_software
${_required_software}
# Needed for Mesa.
meson
ninja
)
endif()
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
@@ -51,18 +40,6 @@ if(UNIX)
unset(_software_find CACHE)
endforeach()
if(APPLE)
# Homebrew has different default locations for ARM and Intel macOS.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(HOMEBREW_LOCATION "/opt/homebrew")
else()
set(HOMEBREW_LOCATION "/usr/local")
endif()
if(NOT EXISTS "${HOMEBREW_LOCATION}/opt/bison/bin/bison")
string(APPEND _software_missing " bison")
endif()
endif()
if(_software_missing)
message(
"\n"
@@ -70,13 +47,10 @@ if(UNIX)
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n"
" apt install autoconf automake libtool yasm nasm tcl\n"
"\n"
"On macOS Intel (with homebrew):\n"
" brew install autoconf automake bison libtool pkg-config yasm\n"
"\n"
"On macOS ARM (with homebrew):\n"
" brew install autoconf automake bison flex libtool pkg-config yasm\n"
"On macOS (with homebrew):\n"
" brew install cmake autoconf automake libtool yasm nasm\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")

View File

@@ -0,0 +1,61 @@
# ***** 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=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
if(WIN32)
set(CLANG_GENERATOR "Ninja")
else()
set(CLANG_GENERATOR "Unix Makefiles")
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${CLANG_HASH}
PREFIX ${BUILD_DIR}/clang
CMAKE_GENERATOR ${CLANG_GENERATOR}
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/
)
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

@@ -19,9 +19,9 @@
set(CLEW_EXTRA_ARGS)
ExternalProject_Add(external_clew
URL file://${PACKAGE_DIR}/${CLEW_FILE}
URL ${CLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CLEW_HASH_TYPE}=${CLEW_HASH}
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

@@ -19,9 +19,9 @@
set(CUEW_EXTRA_ARGS)
ExternalProject_Add(external_cuew
URL file://${PACKAGE_DIR}/${CUEW_FILE}
URL ${CUEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${CUEW_HASH_TYPE}=${CUEW_HASH}
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}

View File

@@ -1,96 +0,0 @@
function(download_source dep)
set(TARGET_FILE ${${dep}_FILE})
set(TARGET_HASH_TYPE ${${dep}_HASH_TYPE})
set(TARGET_HASH ${${dep}_HASH})
if(PACKAGE_USE_UPSTREAM_SOURCES)
set(TARGET_URI ${${dep}_URI})
else()
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
endif()
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
message("Checking source : ${dep} (${TARGET_FILE})")
if(NOT EXISTS ${TARGET_FILE})
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
TIMEOUT 1800 # seconds
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
TLS_VERIFY ON
SHOW_PROGRESS
)
endif()
endfunction(download_source)
download_source(ZLIB)
download_source(OPENAL)
download_source(PNG)
download_source(JPEG)
download_source(BOOST)
download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
download_source(FREETYPE)
download_source(GLEW)
download_source(FREEGLUT)
download_source(ALEMBIC)
download_source(GLFW)
download_source(CLEW)
download_source(GLFW)
download_source(CUEW)
download_source(OPENSUBDIV)
download_source(SDL)
download_source(OPENCOLLADA)
download_source(OPENCOLORIO)
download_source(LLVM)
download_source(OPENMP)
download_source(OPENIMAGEIO)
download_source(TIFF)
download_source(OSL)
download_source(PYTHON)
download_source(TBB)
download_source(OPENVDB)
download_source(NANOVDB)
download_source(NUMPY)
download_source(LAME)
download_source(OGG)
download_source(VORBIS)
download_source(THEORA)
download_source(FLAC)
download_source(VPX)
download_source(OPUS)
download_source(X264)
download_source(XVIDCORE)
download_source(OPENJPEG)
download_source(FFMPEG)
download_source(FFTW)
download_source(ICONV)
download_source(SNDFILE)
if(WITH_WEBP)
download_source(WEBP)
endif()
download_source(SPNAV)
download_source(JEMALLOC)
download_source(XML2)
download_source(TINYXML)
download_source(YAMLCPP)
download_source(EXPAT)
download_source(PUGIXML)
download_source(FLEXBISON)
download_source(BZIP2)
download_source(FFI)
download_source(LZMA)
download_source(SSL)
download_source(SQLITE)
download_source(EMBREE)
download_source(USD)
download_source(OIDN)
download_source(LIBGLU)
download_source(MESA)
download_source(NASM)
download_source(XR_OPENXR_SDK)
download_source(WL_PROTOCOLS)
download_source(ISPC)
download_source(GMP)
download_source(POTRACE)
download_source(HARU)
download_source(ZSTD)
download_source(FLEX)

View File

@@ -29,7 +29,6 @@ set(EMBREE_EXTRA_ARGS
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
@@ -43,36 +42,19 @@ endif()
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
if(BUILD_MODE STREQUAL Debug)
list(APPEND EMBREE_EXTRA_ARGS
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_debug
-DEMBREE_TBB_LIBRARY_NAME=tbb_debug
)
endif()
else()
set(EMBREE_BUILD_DIR)
endif()
if(BLENDER_PLATFORM_ARM)
ExternalProject_Add(external_embree
GIT_REPOSITORY ${EMBREE_ARM_GIT}
GIT_TAG "blender-arm"
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/embree
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
else()
ExternalProject_Add(external_embree
URL file://${PACKAGE_DIR}/${EMBREE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EMBREE_HASH_TYPE}=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
endif()
ExternalProject_Add(external_embree
URL ${EMBREE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
add_dependencies(
external_embree

View File

@@ -1,35 +0,0 @@
# ***** 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(EXPAT_EXTRA_ARGS
-DEXPAT_BUILD_DOCS=OFF
-DEXPAT_BUILD_EXAMPLES=OFF
-DEXPAT_BUILD_TESTS=OFF
-DEXPAT_BUILD_TOOLS=OFF
-DEXPAT_SHARED_LIBS=OFF
)
ExternalProject_Add(external_expat
URL file://${PACKAGE_DIR}/${EXPAT_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${EXPAT_HASH_TYPE}=${EXPAT_HASH}
PREFIX ${BUILD_DIR}/expat
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/expat ${DEFAULT_CMAKE_FLAGS} ${EXPAT_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/expat
SOURCE_SUBDIR expat
)

View File

@@ -17,8 +17,8 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ffi
URL file://${PACKAGE_DIR}/${FFI_FILE}
URL_HASH ${FFI_HASH_TYPE}=${FFI_HASH}
URL ${FFI_URI}
URL_HASH SHA256=${FFI_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/ffi
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ffi/src/external_ffi/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ffi

View File

@@ -30,7 +30,6 @@ if(WIN32)
--enable-w32threads
--disable-pthreads
--enable-libopenjpeg
--disable-mediafoundation
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS
@@ -51,19 +50,13 @@ if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
elseif(UNIX)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
)
endif()
ExternalProject_Add(external_ffmpeg
URL file://${PACKAGE_DIR}/${FFMPEG_FILE}
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFMPEG_HASH_TYPE}=${FFMPEG_HASH}
URL_HASH MD5=${FFMPEG_HASH}
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
# want for maximum runtime performance, but due to static nature of that library we
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
@@ -101,6 +94,8 @@ ExternalProject_Add(external_ffmpeg
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
@@ -148,12 +143,6 @@ if(WIN32)
external_zlib_mingw
)
endif()
if(UNIX)
add_dependencies(
external_ffmpeg
external_nasm
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install

View File

@@ -28,9 +28,9 @@ else()
endif()
ExternalProject_Add(external_fftw3
URL file://${PACKAGE_DIR}/${FFTW_FILE}
URL ${FFTW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_flac
URL file://${PACKAGE_DIR}/${FLAC_FILE}
URL ${FLAC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
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}

View File

@@ -1,28 +0,0 @@
# ***** 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_flex
URL file://${PACKAGE_DIR}/${FLEX_FILE}
URL_HASH ${FLEX_HASH_TYPE}=${FLEX_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/flex
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flex
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make install
INSTALL_DIR ${LIBDIR}/flex
)

View File

@@ -19,9 +19,9 @@
set(FLEXBISON_EXTRA_ARGS)
ExternalProject_Add(external_flexbison
URL file://${PACKAGE_DIR}/${FLEXBISON_FILE}
URL ${FLEXBISON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FLEXBISON_HASH_TYPE}=${FLEXBISON_HASH}
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 .

View File

@@ -24,9 +24,9 @@ if(WIN32)
)
ExternalProject_Add(external_freeglut
URL file://${PACKAGE_DIR}/${FREEGLUT_FILE}
URL ${FREEGLUT_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREEGLUT_HASH_TYPE}=${FREEGLUT_HASH}
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

View File

@@ -24,13 +24,12 @@ set(FREETYPE_EXTRA_ARGS
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
ExternalProject_Add(external_freetype
URL file://${PACKAGE_DIR}/${FREETYPE_FILE}
URL ${FREETYPE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FREETYPE_HASH_TYPE}=${FREETYPE_HASH}
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

@@ -22,9 +22,9 @@ set(GLEW_EXTRA_ARGS
)
ExternalProject_Add(external_glew
URL file://${PACKAGE_DIR}/${GLEW_FILE}
URL ${GLEW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLEW_HASH_TYPE}=${GLEW_HASH}
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}

View File

@@ -19,9 +19,9 @@
set(GLFW_EXTRA_ARGS)
ExternalProject_Add(external_glfw
URL file://${PACKAGE_DIR}/${GLFW_FILE}
URL ${GLFW_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GLFW_HASH_TYPE}=${GLFW_HASH}
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

@@ -1,108 +0,0 @@
# ***** 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(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
if(APPLE AND NOT BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
)
elseif(UNIX AND NOT APPLE)
set(GMP_OPTIONS
${GMP_OPTIONS}
--with-pic
--enable-fat
)
endif()
if(BLENDER_PLATFORM_ARM)
set(GMP_OPTIONS
${GMP_OPTIONS}
--disable-assembly
)
endif()
ExternalProject_Add(external_gmp
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmp
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
INSTALL_DIR ${LIBDIR}/gmp
)
if(MSVC)
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
DEPENDEES install
)
endif()
if(WIN32)
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
# with MSVC, while GMP can only be build with mingw.
ExternalProject_Add(external_gmpxx
URL file://${PACKAGE_DIR}/${GMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmpxx
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
INSTALL_DIR ${LIBDIR}/gmpxx
)
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
add_dependencies(
external_gmpxx
external_gmp
)
ExternalProject_Add_Step(external_gmpxx after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
DEPENDEES install
)
endif()

View File

@@ -1,46 +0,0 @@
# ***** 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(HARU_EXTRA_ARGS
-DLIBHPDF_SHARED=OFF
-DLIBHPDF_STATIC=ON
-DLIBHPDF_EXAMPLES=OFF
-DLIBHPDF_ENABLE_EXCEPTIONS=ON
)
ExternalProject_Add(external_haru
URL file://${PACKAGE_DIR}/${HARU_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${HARU_HASH_TYPE}=${HARU_HASH}
PREFIX ${BUILD_DIR}/haru
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/haru/src/external_haru < ${PATCH_DIR}/haru.diff
CMAKE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/haru
${DEFAULT_CMAKE_FLAGS} ${HARU_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/haru
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_haru after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/haru/include ${HARVEST_TARGET}/haru/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/haru/lib/libhpdfs.lib ${HARVEST_TARGET}/haru/lib/libhpdfs.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -26,7 +26,6 @@ endif()
message("HARVEST_TARGET = ${HARVEST_TARGET}")
if(WIN32)
if(BUILD_MODE STREQUAL Release)
add_custom_target(Harvest_Release_Results
COMMAND # jpeg rename libfile + copy include
@@ -43,7 +42,7 @@ if(BUILD_MODE STREQUAL Release)
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# 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/
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
DEPENDS
)
endif()
@@ -90,30 +89,20 @@ 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(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
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 "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(llvm/bin llvm/bin "clang-tidy")
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(clang/bin llvm/bin "clang-format")
harvest(clang/include llvm/include "*")
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a")
harvest(llvm/lib/clang llvm/lib/clang "*.h")
if(APPLE)
harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h")
endif()
if(BLENDER_PLATFORM_ARM)
harvest(sse2neon sse2neon "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
@@ -127,8 +116,6 @@ if(UNIX AND NOT APPLE)
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
@@ -147,26 +134,21 @@ harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(openjpeg/include/openjpeg-2.3 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/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(nanovdb/nanovdb nanovdb/include/nanovdb "*.h")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
@@ -186,19 +168,15 @@ harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a")
harvest(zstd/include zstd/include "*.h")
harvest(zstd/lib zstd/lib "*.a")
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
harvest(mesa/lib64 mesa/lib "*.so*")
harvest(mesa/lib mesa/lib "*.so*")
endif()
endif()

View File

@@ -19,9 +19,9 @@
set(ICONV_EXTRA_ARGS)
ExternalProject_Add(external_iconv
URL file://${PACKAGE_DIR}/${ICONV_FILE}
URL ${ICONV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ICONV_HASH_TYPE}=${ICONV_HASH}
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}

View File

@@ -21,53 +21,27 @@ if(WIN32)
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
-DARM_ENABLED=Off
)
elseif(APPLE)
# Use bison and flex installed via Homebrew.
# The ones that come with Xcode toolset are too old.
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex
-DARM_ENABLED=On
)
else()
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex
-DARM_ENABLED=Off
)
endif()
elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++
-DARM_ENABLED=Off
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
)
endif()
set(ISPC_EXTRA_ARGS
-DARM_ENABLED=Off
-DISPC_NO_DUMPS=On
-DISPC_INCLUDE_EXAMPLES=Off
-DISPC_INCLUDE_TESTS=Off
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang
-DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++
-DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang
-DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
-DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include
${ISPC_EXTRA_ARGS_WIN}
${ISPC_EXTRA_ARGS_APPLE}
${ISPC_EXTRA_ARGS_UNIX}
)
ExternalProject_Add(external_ispc
URL file://${PACKAGE_DIR}/${ISPC_FILE}
URL ${ISPC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ISPC_HASH_TYPE}=${ISPC_HASH}
URL_HASH MD5=${ISPC_HASH}
PREFIX ${BUILD_DIR}/ispc
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ispc/src/external_ispc < ${PATCH_DIR}/ispc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ispc -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ISPC_EXTRA_ARGS} ${BUILD_DIR}/ispc/src/external_ispc
@@ -77,6 +51,7 @@ ExternalProject_Add(external_ispc
add_dependencies(
external_ispc
ll
external_clang
)
if(WIN32)
@@ -84,9 +59,5 @@ if(WIN32)
external_ispc
external_flexbison
)
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_ispc
external_flex
)
endif()

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_jemalloc
URL file://${PACKAGE_DIR}/${JEMALLOC_FILE}
URL ${JEMALLOC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JEMALLOC_HASH_TYPE}=${JEMALLOC_HASH}
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}

View File

@@ -21,9 +21,9 @@ if(WIN32)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
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
@@ -50,13 +50,13 @@ else(WIN32)
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
ExternalProject_Add(external_jpeg
URL file://${PACKAGE_DIR}/${JPEG_FILE}
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${JPEG_HASH_TYPE}=${JPEG_HASH}
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
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
endif()
endif(WIN32)

View File

@@ -24,9 +24,9 @@ if(MSVC)
endif()
ExternalProject_Add(external_lame
URL file://${PACKAGE_DIR}/${LAME_FILE}
URL ${LAME_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LAME_HASH_TYPE}=${LAME_HASH}
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

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(LCMS_EXTRA_ARGS
)
ExternalProject_Add(external_lcms
URL ${LCMS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
# Patch taken from ocio.
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms
)

View File

@@ -27,9 +27,9 @@ set(LIBGLU_EXTRA_FLAGS
)
ExternalProject_Add(external_libglu
URL file://${PACKAGE_DIR}/${LIBGLU_FILE}
URL ${LIBGLU_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LIBGLU_HASH_TYPE}=${LIBGLU_HASH}
URL_HASH MD5=${LIBGLU_HASH}
PREFIX ${BUILD_DIR}/libglu
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&

View File

@@ -16,32 +16,15 @@
#
# ***** END GPL LICENSE BLOCK *****
if(BLENDER_PLATFORM_ARM)
set(LLVM_TARGETS AArch64$<SEMICOLON>ARM)
else()
set(LLVM_TARGETS X86)
endif()
if(APPLE)
set(LLVM_XML2_ARGS
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
)
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
set(BUILD_CLANG_TOOLS ON)
endif()
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS}
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
-DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
${LLVM_XML2_ARGS}
)
if(WIN32)
@@ -52,13 +35,11 @@ endif()
# short project name due to long filename issues on windows
ExternalProject_Add(ll
URL file://${PACKAGE_DIR}/${LLVM_FILE}
URL ${LLVM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LLVM_HASH_TYPE}=${LLVM_HASH}
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
LIST_SEPARATOR ^^
PREFIX ${BUILD_DIR}/ll
SOURCE_SUBDIR llvm
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
@@ -66,11 +47,7 @@ ExternalProject_Add(ll
if(MSVC)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib ${HARVEST_TARGET}/llvm/lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/include ${HARVEST_TARGET}/llvm/include &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/llvm/bin/clang-format.exe ${HARVEST_TARGET}/llvm/bin/clang-format.exe
)
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/ &&
@@ -82,11 +59,3 @@ if(MSVC)
DEPENDEES mkdir update patch download configure build install
)
endif()
# We currently do not build libxml2 on Windows.
if(APPLE)
add_dependencies(
ll
external_xml2
)
endif()

View File

@@ -19,9 +19,9 @@
set(LZMA_PATCH_CMD echo .)
ExternalProject_Add(external_lzma
URL file://${PACKAGE_DIR}/${LZMA_FILE}
URL ${LZMA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${LZMA_HASH_TYPE}=${LZMA_HASH}
URL_HASH SHA256=${LZMA_HASH}
PREFIX ${BUILD_DIR}/lzma
PATCH_COMMAND ${LZMA_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lzma/src/external_lzma/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lzma

View File

@@ -20,48 +20,31 @@ set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
# The 'native-file', used for overrides with the meson build system.
# meson does not provide a way to do this using command line arguments.
#
# Note that we can't output to "${BUILD_DIR}/mesa/src/external_mesa" as
# it doesn't exist when CMake first executes.
file(WRITE ${BUILD_DIR}/mesa/tmp/native-file.ini "\
[binaries]
llvm-config = '${LIBDIR}/llvm/bin/llvm-config'"
)
set(MESA_EXTRA_FLAGS
-Dbuildtype=release
-Dc_args=${MESA_CFLAGS}
-Dcpp_args=${MESA_CXXFLAGS}
-Dc_link_args=${MESA_LDFLAGS}
-Dcpp_link_args=${MESA_LDFLAGS}
-Dglx=gallium-xlib
-Dgallium-drivers=swrast
-Ddri-drivers=
-Dvulkan-drivers=
-Dgbm=disabled
-Degl=disabled
-Dgles1=disabled
-Dgles2=disabled
-Dshared-llvm=disabled
# Without this, the build fails when: `wayland-scanner` is not found.
# At some point we will likely want to support Wayland.
# Disable for now since it's not officially supported.
-Dplatforms=x11
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
CFLAGS=${MESA_CFLAGS}
CXXFLAGS=${MESA_CXXFLAGS}
LDFLAGS=${MESA_LDFLAGS}
--enable-glx=gallium-xlib
--with-gallium-drivers=swrast
--disable-dri
--disable-gbm
--disable-egl
--disable-gles1
--disable-gles2
--disable-llvm-shared-libs
--with-llvm-prefix=${LIBDIR}/llvm
)
ExternalProject_Add(external_mesa
URL file://${PACKAGE_DIR}/${MESA_FILE}
URL ${MESA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${MESA_HASH_TYPE}=${MESA_HASH}
URL_HASH MD5=${MESA_HASH}
PREFIX ${BUILD_DIR}/mesa
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
meson ${BUILD_DIR}/mesa/src/external_mesa-build --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja install
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make install
INSTALL_DIR ${LIBDIR}/mesa
)

View File

@@ -1,54 +0,0 @@
# ***** 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(NANOVDB_EXTRA_ARGS
# NanoVDB is header-only, so only need the install target
-DNANOVDB_BUILD_UNITTESTS=OFF
-DNANOVDB_BUILD_EXAMPLES=OFF
-DNANOVDB_BUILD_BENCHMARK=OFF
-DNANOVDB_BUILD_DOCS=OFF
-DNANOVDB_BUILD_TOOLS=OFF
-DNANOVDB_CUDA_KEEP_PTX=OFF
# Do not need to include any of the dependencies because of this
-DNANOVDB_USE_OPENVDB=OFF
-DNANOVDB_USE_OPENGL=OFF
-DNANOVDB_USE_OPENCL=OFF
-DNANOVDB_USE_CUDA=OFF
-DNANOVDB_USE_TBB=OFF
-DNANOVDB_USE_BLOSC=OFF
-DNANOVDB_USE_ZLIB=OFF
-DNANOVDB_USE_OPTIX=OFF
-DNANOVDB_ALLOW_FETCHCONTENT=OFF
)
ExternalProject_Add(nanovdb
URL file://${PACKAGE_DIR}/${NANOVDB_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NANOVDB_HASH_TYPE}=${NANOVDB_HASH}
PREFIX ${BUILD_DIR}/nanovdb
SOURCE_SUBDIR nanovdb
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanovdb
)
if(WIN32)
ExternalProject_Add_Step(nanovdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/nanovdb/nanovdb ${HARVEST_TARGET}/nanovdb/include/nanovdb
DEPENDEES install
)
endif()

View File

@@ -1,38 +0,0 @@
# ***** 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_nasm
URL file://${PACKAGE_DIR}/${NASM_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NASM_HASH_TYPE}=${NASM_HASH}
PREFIX ${BUILD_DIR}/nasm
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/nasm/src/external_nasm < ${PATCH_DIR}/nasm.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && ./autogen.sh && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/nasm
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make -j${MAKE_THREADS} && make manpages
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install
INSTALL_DIR ${LIBDIR}/nasm
)
if(UNIX)
# `touch nasm.1 ndisasm.1` helps to create the manual pages files, even when
# local `asciidoc` and `xmlto` packages are not installed.
ExternalProject_Add_Step(external_nasm after_configure
COMMAND ${CMAKE_COMMAND} -E touch ${BUILD_DIR}/nasm/src/external_nasm/nasm.1 ${BUILD_DIR}/nasm/src/external_nasm/ndisasm.1
DEPENDEES configure
)
endif()

View File

@@ -32,13 +32,12 @@ endif()
set(NUMPY_POSTFIX)
ExternalProject_Add(external_numpy
URL file://${PACKAGE_DIR}/${NUMPY_FILE}
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NUMPY_HASH_TYPE}=${NUMPY_HASH}
URL_HASH MD5=${NUMPY_HASH}
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ""
@@ -47,5 +46,4 @@ ExternalProject_Add(external_numpy
add_dependencies(
external_numpy
external_python
external_python_site_packages
)

View File

@@ -17,11 +17,10 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_ogg
URL file://${PACKAGE_DIR}/${OGG_FILE}
URL ${OGG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
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

View File

@@ -46,9 +46,9 @@ if(BUILD_MODE STREQUAL Release)
endif()
ExternalProject_Add(external_openal
URL file://${PACKAGE_DIR}/${OPENAL_FILE}
URL ${OPENAL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENAL_HASH_TYPE}=${OPENAL_HASH}
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

View File

@@ -23,9 +23,9 @@ if(UNIX)
endif()
ExternalProject_Add(external_opencollada
URL file://${PACKAGE_DIR}/${OPENCOLLADA_FILE}
URL ${OPENCOLLADA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH}
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}

View File

@@ -18,84 +18,95 @@
set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_BUILD_APPS=OFF
-DOCIO_BUILD_PYTHON=OFF
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_NUKE=OFF
-DOCIO_BUILD_JAVA=OFF
-DBUILD_SHARED_LIBS=OFF
-DOCIO_USE_BOOST_PTR=OFF
-DOCIO_BUILD_STATIC=ON
-DOCIO_BUILD_SHARED=OFF
-DOCIO_BUILD_TRUELIGHT=OFF
-DOCIO_BUILD_DOCS=OFF
-DOCIO_BUILD_TESTS=OFF
-DOCIO_BUILD_GPU_TESTS=OFF
-DOCIO_USE_SSE=ON
# Manually build ext packages except for pystring, which does not have
# a CMake or autotools build system that we can easily use.
-DOCIO_INSTALL_EXT_PACKAGES=MISSING
-DHalf_ROOT=${LIBDIR}/openexr
-DHalf_STATIC_LIBRARY=ON
-Dexpat_ROOT=${LIBDIR}/expat
-Dyaml-cpp_ROOT=${LIBDIR}/yamlcpp
-DOCIO_BUILD_PYGLUE=OFF
-DOCIO_BUILD_JNIGLUE=OFF
-DOCIO_STATIC_JNIGLUE=OFF
)
if(BLENDER_PLATFORM_ARM)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_SSE=OFF
)
endif()
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_BUILD_TESTS=OFF
-DOCIO_USE_SSE=ON
-DOCIO_INLINES_HIDDEN=OFF
-DOCIO_PYGLUE_LINK=OFF
-DOCIO_PYGLUE_RESPECT_ABI=OFF
-DOCIO_PYGLUE_SONAME=OFF
-DOCIO_PYGLUE_LIB_PREFIX=OFF
-DUSE_EXTERNAL_TINYXML=ON
-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
-DUSE_EXTERNAL_YAML=ON
-DYAML_CPP_FOUND=ON
-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
# Lie because ocio cmake is demanding boost even though it is not needed.
-DYAML_CPP_VERSION=0.5.0
)
else()
set(OCIO_PATCH opencolorio.diff)
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
)
endif()
ExternalProject_Add(external_opencolorio
URL file://${PACKAGE_DIR}/${OPENCOLORIO_FILE}
URL ${OPENCOLORIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENCOLORIO_HASH_TYPE}=${OPENCOLORIO_HASH}
URL_HASH MD5=${OPENCOLORIO_HASH}
PREFIX ${BUILD_DIR}/opencolorio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
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_yamlcpp
external_expat
external_openexr
external_boost
)
if(WIN32)
add_dependencies(
external_opencolorio
external_tinyxml
external_yamlcpp
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatdMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatdMD.lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)
endif()
else()
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND cp ${LIBDIR}/yamlcpp/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${LIBDIR}/expat/lib/libexpat.a ${LIBDIR}/opencolorio/lib/
COMMAND cp ${BUILD_DIR}/opencolorio/src/external_opencolorio-build/ext/dist/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
DEPENDEES install
)
endif()

View File

@@ -42,9 +42,9 @@ set(OPENEXR_EXTRA_ARGS
)
ExternalProject_Add(external_openexr
URL file://${PACKAGE_DIR}/${OPENEXR_FILE}
URL ${OPENEXR_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENEXR_HASH_TYPE}=${OPENEXR_HASH}
URL_HASH MD5=${OPENEXR_HASH}
PREFIX ${BUILD_DIR}/openexr
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openexr

View File

@@ -41,9 +41,9 @@ else()
endif()
ExternalProject_Add(external_openimagedenoise
URL file://${PACKAGE_DIR}/${OIDN_FILE}
URL ${OIDN_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OIDN_HASH_TYPE}=${OIDN_HASH}
URL_HASH MD5=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimagedenoise

View File

@@ -68,6 +68,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-OIIO_BUILD_CPP11=ON
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DUSE_NUKE=OFF
@@ -111,17 +112,14 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
ExternalProject_Add(external_openimageio
URL file://${PACKAGE_DIR}/${OPENIMAGEIO_FILE}
URL ${OPENIMAGEIO_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENIMAGEIO_HASH_TYPE}=${OPENIMAGEIO_HASH}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
@@ -136,7 +134,6 @@ add_dependencies(
external_jpeg
external_boost
external_tiff
external_pugixml
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)

View File

@@ -28,9 +28,9 @@ else()
endif()
ExternalProject_Add(external_openjpeg
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
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}
@@ -42,9 +42,9 @@ ExternalProject_Add(external_openjpeg
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
URL ${OPENJPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
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

View File

@@ -16,24 +16,18 @@
#
# ***** END GPL LICENSE BLOCK *****
if(APPLE)
set(OPENMP_PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff)
else()
set(OPENMP_PATCH_COMMAND)
endif()
ExternalProject_Add(external_openmp
URL file://${PACKAGE_DIR}/${OPENMP_FILE}
URL ${OPENMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENMP_HASH_TYPE}=${OPENMP_HASH}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
PATCH_COMMAND ${OPENMP_PATCH_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @rpath/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp
)
add_dependencies(
external_openmp
ll
external_clang
)

View File

@@ -65,9 +65,9 @@ else()
endif()
ExternalProject_Add(external_opensubdiv
URL file://${PACKAGE_DIR}/${OPENSUBDIV_FILE}
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENSUBDIV_HASH_TYPE}=${OPENSUBDIV_HASH}
URL_HASH MD5=${OPENSUBDIV_HASH}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv

View File

@@ -20,14 +20,6 @@ if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
if(WIN32)
set(OPENVDB_SHARED ON)
set(OPENVDB_STATIC OFF)
else()
set(OPENVDB_SHARED OFF)
set(OPENVDB_STATIC ON)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
@@ -50,12 +42,8 @@ set(OPENVDB_EXTRA_ARGS
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
# All libs live in openexr, even the ilmbase ones
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_CORE_SHARED=Off
-DOPENVDB_BUILD_BINARIES=Off
-DCMAKE_DEBUG_POSTFIX=_d
-DILMBASE_USE_STATIC_LIBS=On
-DOPENEXR_USE_STATIC_LIBS=On
)
if(WIN32)
@@ -77,9 +65,9 @@ else()
endif()
ExternalProject_Add(openvdb
URL file://${PACKAGE_DIR}/${OPENVDB_FILE}
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENVDB_HASH_TYPE}=${OPENVDB_HASH}
URL_HASH MD5=${OPENVDB_HASH}
PREFIX ${BUILD_DIR}/openvdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
@@ -98,16 +86,14 @@ add_dependencies(
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include/openvdb ${HARVEST_TARGET}/openvdb/include/openvdb
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
DEPENDEES install
)
endif()

View File

@@ -20,9 +20,7 @@ if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
endif()
option(WITH_WEBP "Enable building of oiio with webp support" OFF)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
set(BUILD_MODE "Release")
@@ -36,19 +34,13 @@ else(BUILD_MODE STREQUAL "Debug")
set(LIBDIR ${CMAKE_CURRENT_BINARY_DIR}/Release)
endif()
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files")
# This path must be hard-coded like this, so that the GNUmakefile knows where it is and can pass it to make_source_archive.py:
set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages")
option(PACKAGE_USE_UPSTREAM_SOURCES "Use soures upstream to download the package sources, when OFF the blender mirror will be used" ON)
option(DOWNLOAD_DIR "Path for downloaded files" ${CMAKE_CURRENT_SOURCE_DIR}/downloads)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_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("PACKAGE_DIR = ${PACKAGE_DIR}")
message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
@@ -63,7 +55,7 @@ if(WIN32)
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()
string(APPEND COMMON_MSVC_FLAGS " /bigobj")
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
@@ -121,44 +113,20 @@ else()
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT CMAKE_OSX_ARCHITECTURES)
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Detected native architecture ${ARCHITECTURE}.")
set(CMAKE_OSX_ARCHITECTURES "${ARCHITECTURE}")
endif()
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(OSX_DEPLOYMENT_TARGET 10.13)
else()
set(OSX_DEPLOYMENT_TARGET 11.00)
endif()
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.11)
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
else()
set(PLATFORM_BUILD_TARGET --build=aarch64-apple-darwin20.0.0) # macOS 11.00
endif()
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-darwin15.0.0) # OS X 10.11
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set(BLENDER_PLATFORM_ARM ON)
endif()
set(PLATFORM_CFLAGS "-fPIC")
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
set(PLATFORM_LDFLAGS)
@@ -187,7 +155,6 @@ else()
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
@@ -210,6 +177,18 @@ set(DEFAULT_CMAKE_FLAGS
${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)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_opus
URL file://${PACKAGE_DIR}/${OPUS_FILE}
URL ${OPUS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
URL_HASH SHA256=${OPUS_HASH}
PREFIX ${BUILD_DIR}/opus
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
--disable-shared

View File

@@ -19,14 +19,22 @@
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 -DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe)
set(OSL_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
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${OPENEXR_VERSION_POSTFIX}${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()
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
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${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
SET(OSL_PLATFORM_FLAGS)
endif()
set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_VERSION_POSTFIX}.lib")
set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/${LIBPREFIX}LLVMipo${LIBEXT}")
set(OSL_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
@@ -37,8 +45,13 @@ set(OSL_EXTRA_ARGS
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DOpenEXR_ROOT=${LIBDIR}/openexr/
-DIlmBase_ROOT=${LIBDIR}/openexr/
-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}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
@@ -46,36 +59,46 @@ set(OSL_EXTRA_ARGS
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOpenImageIO_ROOT=${LIBDIR}/openimageio/
-DOSL_BUILD_TESTS=OFF
-DOSL_BUILD_MATERIALX=OFF
-DPNG_ROOT=${LIBDIR}/png
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_INCLUDE_DIR=${LIBDIR}/openimageio/include
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILD_SHARED_LIBS=OFF
-DLINKSTATIC=ON
-DOSL_BUILD_PLUGINS=OFF
-DBUILDSTATIC=ON
${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=Off
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DLLVM_ROOT=${LIBDIR}/llvm/
-DLLVM_DIRECTORY=${LIBDIR}/llvm/
-DUSE_PARTIO=OFF
-DUSE_QT=OFF
-DUSE_Qt5=OFF
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-Dpugixml_ROOT=${LIBDIR}/pugixml
-DUSE_PYTHON=OFF
-DCMAKE_CXX_STANDARD=14
-DPARTIO_LIBRARIES=
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
)
endif()
ExternalProject_Add(external_osl
URL file://${PACKAGE_DIR}/${OSL_FILE}
URL ${OSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
LIST_SEPARATOR ^^
URL_HASH ${OSL_HASH_TYPE}=${OSL_HASH}
URL_HASH MD5=${OSL_HASH}
PREFIX ${BUILD_DIR}/osl
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
@@ -86,20 +109,19 @@ add_dependencies(
external_osl
external_boost
ll
external_clang
external_openexr
external_zlib
external_flexbison
external_openimageio
external_pugixml
)
if(WIN32)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(
external_osl
external_flexbison
)
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_osl
external_flex
external_pugixml
)
endif()

View File

@@ -22,14 +22,10 @@ set(PNG_EXTRA_ARGS
-DPNG_STATIC=ON
)
if(BLENDER_PLATFORM_ARM)
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=on -DCMAKE_SYSTEM_PROCESSOR="aarch64")
endif()
ExternalProject_Add(external_png
URL file://${PACKAGE_DIR}/${PNG_FILE}
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PNG_HASH_TYPE}=${PNG_HASH}
URL_HASH SHA256=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png

View File

@@ -1,38 +0,0 @@
# ***** 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(POTRACE_EXTRA_ARGS
)
if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
ExternalProject_Add(external_potrace
URL file://${PACKAGE_DIR}/${POTRACE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${POTRACE_HASH_TYPE}=${POTRACE_HASH}
PREFIX ${BUILD_DIR}/potrace
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_potrace.txt ${BUILD_DIR}/potrace/src/external_potrace/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/potrace ${DEFAULT_CMAKE_FLAGS} ${POTRACE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/potrace
)
if(WIN32)
ExternalProject_Add_Step(external_potrace after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
DEPENDEES install
)
endif()
endif()

View File

@@ -27,9 +27,9 @@ if(WIN32)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
ExternalProject_Add(external_pthreads
URL file://${PACKAGE_DIR}/${PTHREADS_FILE}
URL ${PTHREADS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PTHREADS_HASH_TYPE}=${PTHREADS_HASH}
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff

View File

@@ -20,9 +20,9 @@ set(PUGIXML_EXTRA_ARGS
)
ExternalProject_Add(external_pugixml
URL file://${PACKAGE_DIR}/${PUGIXML_FILE}
URL ${PUGIXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PUGIXML_HASH_TYPE}=${PUGIXML_HASH}
URL_HASH MD5=${PUGIXML_HASH}
PREFIX ${BUILD_DIR}/pugixml
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/pugixml
@@ -30,14 +30,14 @@ ExternalProject_Add(external_pugixml
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
DEPENDEES install
)
endif()
endif()
endif()
endif()

View File

@@ -37,23 +37,18 @@ if(WIN32)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
else()
if(APPLE)
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.
#
# Disable libintl (gettext library) as it might come from Homebrew, which makes
# it so test program compiles, but the Python does not. This is because for Python
# we use isysroot, which seems to forbid using libintl.h.
# The gettext functionality seems to come from CoreFoundation, so should be all fine.
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
@@ -65,34 +60,28 @@ else()
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no &&
export ac_cv_header_libintl_h=no &&
export ac_cv_lib_intl_textdomain=no
)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
endif()
export ac_cv_func_timingsafe_bcmp=no)
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
# Link against zlib statically (Unix). Avoid rpath issues (macOS).
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff)
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include ${PLATFORM_CFLAGS}")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib ${PLATFORM_LDFLAGS}")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/bzip2/lib -L${LIBDIR}/lzma/lib -L${LIBDIR}/zlib/lib")
set(PYTHON_CONFIGURE_EXTRA_ENV
export CFLAGS=${PYTHON_CFLAGS} &&
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL file://${PACKAGE_DIR}/${PYTHON_FILE}
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${PYTHON_HASH_TYPE}=${PYTHON_HASH}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND ${PYTHON_PATCH}
CONFIGURE_COMMAND ${PYTHON_CONFIGURE_ENV} && ${PYTHON_CONFIGURE_EXTRA_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/python ${PYTHON_CONFIGURE_EXTRA_ARGS}

View File

@@ -16,27 +16,14 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug)
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 ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
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:
)
if(USE_PIP_NUMPY)
# Use only wheel (and not build from source) to stop NumPy from linking against buggy
# Accelerate framework backend on macOS. Official wheels are built with OpenBLAS.
ExternalProject_Add_Step(external_python_site_packages after_install
COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir numpy==${NUMPY_VERSION} --only-binary :all:
DEPENDEES install
)
endif()
add_dependencies(
external_python_site_packages
external_python

View File

@@ -30,9 +30,9 @@ else()
endif()
ExternalProject_Add(external_sdl
URL file://${PACKAGE_DIR}/${SDL_FILE}
URL ${SDL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SDL_HASH_TYPE}=${SDL_HASH}
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}

View File

@@ -34,9 +34,9 @@ else()
endif()
ExternalProject_Add(external_sndfile
URL file://${PACKAGE_DIR}/${SNDFILE_FILE}
URL ${SNDFILE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
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

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_spnav
URL file://${PACKAGE_DIR}/${SPNAV_FILE}
URL ${SPNAV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
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}

View File

@@ -42,29 +42,16 @@ if(UNIX)
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-fPIC")
set(SQLITE_CONFIGURE_ENV ${SQLITE_CONFIGURE_ENV} && export LDFLAGS=${SQLITE_LDFLAGS} && export CFLAGS=${SQLITE_CFLAGS})
set(SQLITE_CONFIGURATION_ARGS
${SQLITE_CONFIGURATION_ARGS}
--enable-threadsafe
--enable-load-extension
--enable-json1
--enable-fts4
--enable-fts5
# While building `tcl` is harmless, it causes problems when the install step
# tries to copy the files into the system path.
# Since this isn't required by Python or Blender this can be disabled.
# Note that Debian (for example), splits this off into a separate package,
# so it's safe to turn off.
--disable-tcl
--enable-shared=no
)
set(SQLITE_CONFIGURATION_ARGS ${SQLITE_CONFIGURATION_ARGS} --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5
--enable-shared=no)
endif()
ExternalProject_Add(external_sqlite
URL file://${PACKAGE_DIR}/${SQLITE_FILE}
URL ${SQLITE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SQLITE_HASH_TYPE}=${SQLITE_HASH}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
PATCH_COMMAND ${SQLITE_PATCH_CMD}
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install

View File

@@ -1,28 +0,0 @@
# ***** 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_sse2neon
GIT_REPOSITORY ${SSE2NEON_GIT}
GIT_TAG ${SSE2NEON_GIT_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/sse2neon
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
BUILD_COMMAND echo sse2neon - nothing to build
INSTALL_COMMAND mkdir -p ${LIBDIR}/sse2neon && cp ${BUILD_DIR}/sse2neon/src/external_sse2neon/sse2neon.h ${LIBDIR}/sse2neon
INSTALL_DIR ${LIBDIR}/sse2neon
)

View File

@@ -20,11 +20,9 @@ set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
set(SSL_OS_COMPILER "blender-darwin-x86_64")
else()
if(BLENDER_PLATFORM_ARM)
set(SSL_OS_COMPILER "blender-linux-aarch64")
elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
set(SSL_OS_COMPILER "blender-linux-x86_64")
else()
@@ -33,9 +31,9 @@ else()
endif()
ExternalProject_Add(external_ssl
URL file://${PACKAGE_DIR}/${SSL_FILE}
URL ${SSL_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SSL_HASH_TYPE}=${SSL_HASH}
URL_HASH SHA256=${SSL_HASH}
PREFIX ${BUILD_DIR}/ssl
PATCH_COMMAND ${SSL_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl

View File

@@ -8,18 +8,8 @@ my %targets = (
inherit_from => [ "linux-x86_64" ],
cflags => add("-fPIC"),
},
"blender-linux-aarch64" => {
inherit_from => [ "linux-aarch64" ],
cxxflags => add("-fPIC"),
cflags => add("-fPIC"),
},
"blender-darwin-x86_64" => {
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
"blender-darwin-arm64" => {
inherit_from => [ "darwin-common" ],
cxxflags => add("-fPIC -arch arm64"),
cflags => add("-fPIC -arch arm64"),
},
);

View File

@@ -21,8 +21,6 @@ if(WIN32)
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
-DTBB_BUILD_TESTS=Off
-DCMAKE_DEBUG_POSTFIX=_debug
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
@@ -32,7 +30,6 @@ else()
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
-DTBB_BUILD_TESTS=Off
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
@@ -40,13 +37,12 @@ endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
URL file://${PACKAGE_DIR}/${TBB_FILE}
URL ${TBB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TBB_HASH_TYPE}=${TBB_HASH}
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/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/build/version_string.ver.in &&
${PATCH_CMD} -p 1 -d ${BUILD_DIR}/tbb/src/external_tbb < ${PATCH_DIR}/tbb.diff
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/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
)
@@ -56,17 +52,17 @@ if(WIN32)
ExternalProject_Add_Step(external_tbb after_install
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${LIBDIR}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${LIBDIR}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.dll
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb.dll ${HARVEST_TARGET}/tbb/bin/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
@@ -77,12 +73,11 @@ if(WIN32)
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbb_debug.dll ${HARVEST_TARGET}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy_debug.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/bin/tbbmalloc_proxy_debug.dll ${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
DEPENDEES install
)
endif()

View File

@@ -23,11 +23,10 @@ else()
endif()
ExternalProject_Add(external_theora
URL file://${PACKAGE_DIR}/${THEORA_FILE}
URL ${THEORA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static

View File

@@ -16,12 +16,6 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WITH_WEBP)
set(WITH_TIFF_WEBP ON)
else()
set(WITH_TIFF_WEBP OFF)
endif()
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
@@ -29,14 +23,12 @@ set(TIFF_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-Dzstd=OFF
-Dwebp=${WITH_TIFF_WEBP}
)
ExternalProject_Add(external_tiff
URL file://${PACKAGE_DIR}/${TIFF_FILE}
URL ${TIFF_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TIFF_HASH_TYPE}=${TIFF_HASH}
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

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(TINYXML_EXTRA_ARGS
)
ExternalProject_Add(external_tinyxml
URL ${TINYXML_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
# patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml
)

View File

@@ -53,9 +53,9 @@ set(USD_EXTRA_ARGS
)
ExternalProject_Add(external_usd
URL file://${PACKAGE_DIR}/${USD_FILE}
URL ${USD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${USD_HASH_TYPE}=${USD_HASH}
URL_HASH MD5=${USD_HASH}
PREFIX ${BUILD_DIR}/usd
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}

View File

@@ -19,54 +19,37 @@
set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(OPENAL_HASH_TYPE MD5)
set(OPENAL_FILE openal-soft-${OPENAL_VERSION}.tar.bz2)
set(PNG_VERSION 1.6.37)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(PNG_HASH_TYPE SHA256)
set(PNG_FILE libpng-${PNG_VERSION}.tar.xz)
set(JPEG_VERSION 2.0.4)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
set(JPEG_HASH_TYPE MD5)
set(JPEG_FILE libjpeg-turbo-${JPEG_VERSION}.tar.gz)
set(BOOST_VERSION 1.73.0)
set(BOOST_VERSION_NODOTS 1_73_0)
set(BOOST_VERSION_NODOTS_SHORT 1_73)
set(BOOST_URI https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH 4036cd27ef7548b8d29c30ea10956196)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_VERSION 1.70.0)
set(BOOST_VERSION_NODOTS 1_70_0)
set(BOOST_VERSION_NODOTS_SHORT 1_70)
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH fea771fe8176828fabf9c09242ee8c26)
# Using old version as recommended by OpenVDB build documentation.
set(BLOSC_VERSION 1.5.0)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH 6e4a49c8c06f05aa543f3312cfce3d55)
set(BLOSC_HASH_TYPE MD5)
set(BLOSC_FILE blosc-${BLOSC_VERSION}.tar.gz)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://prdownloads.sourceforge.net/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(PTHREADS_HASH_TYPE MD5)
set(PTHREADS_FILE pthreads4w-code-${PTHREADS_VERSION}.zip)
set(OPENEXR_VERSION 2.5.5)
set(OPENEXR_VERSION 2.4.0)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 85e8a979092c9055d10ed103062d31a0)
set(OPENEXR_HASH_TYPE MD5)
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 9e4d69cf2a12c6fb19b98af7c5e0eaee)
if(WIN32)
# Openexr started appending _d on its own so now
# we need to tell the build the postfix is _s while
@@ -86,294 +69,197 @@ endif()
set(FREETYPE_VERSION 2.10.2)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(FREETYPE_HASH_TYPE MD5)
set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz)
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(GLEW_HASH_TYPE MD5)
set(GLEW_FILE glew-${GLEW_VERSION}.tgz)
set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(FREEGLUT_HASH_TYPE MD5)
set(FREEGLUT_FILE freeglut-${FREEGLUT_VERSION}.tar.gz)
set(ALEMBIC_VERSION 1.7.16)
set(ALEMBIC_VERSION 1.7.12)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_HASH effcc86e42fe6605588e3de57bde6677)
set(ALEMBIC_HASH_TYPE MD5)
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 e2b3777f23c5c09481a008cc6f0f8a40)
# 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)
set(GLFW_HASH_TYPE MD5)
set(GLFW_FILE glfw-${GLFW_GIT_UID}.zip)
# 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)
set(CLEW_HASH_TYPE MD5)
set(CLEW_FILE clew-${CLEW_GIT_UID}.zip)
# 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(CUEW_HASH_TYPE MD5)
set(CUEW_FILE cuew-${CUEW_GIT_UID}.zip)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(OPENSUBDIV_HASH_TYPE MD5)
set(OPENSUBDIV_FILE opensubdiv-${OPENSUBDIV_VERSION}.tar.gz)
set(SDL_VERSION 2.0.12)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_HASH_TYPE MD5)
set(SDL_FILE SDL2-${SDL_VERSION}.tar.gz)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
set(OPENCOLLADA_HASH_TYPE MD5)
set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLORIO_VERSION 2.0.0)
set(OPENCOLORIO_VERSION 1.1.1)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0)
set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 23d8b9ac81599305539a5a8674b94a3d)
set(LLVM_VERSION 12.0.0)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH 5a4fab4d7fc84aefffb118ac2c8a4fc0)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_VERSION 9.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc)
if(APPLE)
# Cloth physics test is crashing due to this bug:
# https://bugs.llvm.org/show_bug.cgi?id=50579
set(OPENMP_VERSION 9.0.1)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
else()
set(OPENMP_VERSION ${LLVM_VERSION})
set(OPENMP_HASH ac48ce3e4582ccb82f81ab59eb3fc9dc)
endif()
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
set(OPENIMAGEIO_VERSION 2.2.15.1)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENIMAGEIO_VERSION 2.1.15.0)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH 3db5c5f0b3dc91597c75e5df09eb9072)
set(OPENIMAGEIO_HASH_TYPE MD5)
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
set(TIFF_VERSION 4.1.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(OSL_VERSION 1.11.14.1)
set(OSL_VERSION 1.10.10)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 1abd7ce40481771a9fa937f19595d2f2)
set(OSL_HASH_TYPE MD5)
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
set(OSL_HASH 00dec08a93c8084e53848b9ad047889f)
set(PYTHON_VERSION 3.9.2)
set(PYTHON_SHORT_VERSION 3.9)
set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_VERSION 3.7.7)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH f0dc9000312abeb16de4eccce9a870ab)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 172c650156f7bea68ce31b2fd01fa766)
set(TBB_VERSION 2020_U2)
set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 1b711ae956524855088df3bbf5ec65dc)
set(TBB_HASH_TYPE MD5)
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
set(TBB_HASH 26263622e9187212ec240dcf01b66207)
set(OPENVDB_VERSION 8.0.1)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461)
set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_VERSION 7.0.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8)
set(NANOVDB_GIT_UID dc37d8a631922e7bef46712947dc19b755f3e841)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH e7b9e863ec2f3b04ead171dec2322807)
set(NANOVDB_HASH_TYPE MD5)
set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz)
set(IDNA_VERSION 2.9)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.25.9)
set(CERTIFI_VERSION 2020.4.5.2)
set(REQUESTS_VERSION 2.23.0)
set(IDNA_VERSION 2.10)
set(CHARDET_VERSION 4.0.0)
set(URLLIB3_VERSION 1.26.3)
set(CERTIFI_VERSION 2020.12.5)
set(REQUESTS_VERSION 2.25.1)
set(CYTHON_VERSION 0.29.21)
set(NUMPY_VERSION 1.19.5)
set(NUMPY_SHORT_VERSION 1.19)
set(NUMPY_VERSION 1.17.5)
set(NUMPY_SHORT_VERSION 1.17)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH f6a1b48717c552bbc18f1adc3cc1fe0e)
set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 763a5646fa6eef7a22f4895bca0524f2)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(LAME_HASH_TYPE MD5)
set(LAME_FILE lame-${LAME_VERSION}.tar.gz)
set(OGG_VERSION 1.3.4)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(OGG_HASH_TYPE SHA256)
set(OGG_FILE libogg-${OGG_VERSION}.tar.gz)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
set(VORBIS_HASH 6ed40e0241089a42c48604dc00e362beee00036af2d8b3f46338031c9e0351cb)
set(VORBIS_HASH_TYPE SHA256)
set(VORBIS_FILE libvorbis-${VORBIS_VERSION}.tar.gz)
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(THEORA_HASH_TYPE SHA256)
set(THEORA_FILE libtheora-${THEORA_VERSION}.tar.bz2)
set(FLAC_VERSION 1.3.3)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(FLAC_HASH_TYPE SHA256)
set(FLAC_FILE flac-${FLAC_VERSION}.tar.xz)
set(VPX_VERSION 1.8.2)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(VPX_HASH_TYPE SHA256)
set(VPX_FILE libvpx-v${VPX_VERSION}.tar.gz)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(OPUS_HASH_TYPE SHA256)
set(OPUS_FILE opus-${OPUS_VERSION}.tar.gz)
set(X264_VERSION 33f9e1474613f59392be5ab6a7e7abf60fa63622)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/${X264_VERSION}/x264-${X264_VERSION}.tar.gz)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/33f9e1474613f59392be5ab6a7e7abf60fa63622/x264-33f9e1474613f59392be5ab6a7e7abf60fa63622.tar.gz)
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
set(X264_HASH_TYPE SHA256)
set(X264_FILE x264-${X264_VERSION}.tar.gz)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
set(XVIDCORE_HASH_TYPE SHA256)
set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(OPENJPEG_VERSION 2.3.1)
set(OPENJPEG_SHORT_VERSION 2.3)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(OPENJPEG_HASH_TYPE SHA256)
set(OPENJPEG_FILE openjpeg-v${OPENJPEG_VERSION}.tar.gz)
set(FFMPEG_VERSION 4.4)
set(FFMPEG_VERSION 4.2.3)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e)
set(FFMPEG_HASH_TYPE SHA256)
set(FFMPEG_FILE ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(FFTW_HASH_TYPE MD5)
set(FFTW_FILE fftw-${FFTW_VERSION}.tar.gz)
set(ICONV_VERSION 1.16)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(ICONV_HASH_TYPE MD5)
set(ICONV_FILE libiconv-${ICONV_VERSION}.tar.gz)
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(SNDFILE_HASH_TYPE MD5)
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
# 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.6.1)
set(WEBP_URI https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-${WEBP_VERSION}.tar.gz)
set(WEBP_HASH b49ce9c3e3e9acae4d91bca44bb85a72)
set(WEBP_HASH_TYPE MD5)
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
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(SPNAV_HASH_TYPE MD5)
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
set(JEMALLOC_VERSION 5.2.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
set(JEMALLOC_HASH_TYPE MD5)
set(JEMALLOC_FILE jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(XML2_VERSION 2.9.10)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH 10942a1dc23137a8aa07f0639cbfece5)
set(XML2_HASH_TYPE MD5)
set(XML2_FILE libxml2-${XML2_VERSION}.tar.gz)
set(TINYXML_VERSION 2_6_2)
set(TINYXML_VERSION_DOTS 2.6.2)
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
set(TINYXML_HASH_TYPE MD5)
set(TINYXML_FILE tinyxml_${TINYXML_VERSION}.tar.gz)
set(YAMLCPP_VERSION 0.6.3)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
set(YAMLCPP_HASH_TYPE MD5)
set(YAMLCPP_FILE yaml-cpp-${YAMLCPP_VERSION}.tar.gz)
set(EXPAT_VERSION 2_2_10)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
set(EXPAT_HASH 7ca5f09959fcb9a57618368deb627b9f)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.10)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(PUGIXML_HASH_TYPE MD5)
set(PUGIXML_FILE pugixml-${PUGIXML_VERSION}.tar.gz)
set(FLEXBISON_VERSION 2.5.24)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEXBISON_HASH 6b549d43e34ece0e8ed05af92daa31c4)
set(FLEXBISON_HASH_TYPE MD5)
set(FLEXBISON_FILE win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEX_VERSION 2.6.4)
set(FLEX_URI https://github.com/westes/flex/releases/download/v${FLEX_VERSION}/flex-${FLEX_VERSION}.tar.gz)
set(FLEX_HASH 2882e3179748cc9f9c23ec593d6adc8d)
set(FLEX_HASH_TYPE MD5)
set(FLEX_FILE flex-${FLEX_VERSION}.tar.gz)
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)
# Libraries to keep Python modules static on Linux.
@@ -382,120 +268,46 @@ set(FLEX_FILE flex-${FLEX_VERSION}.tar.gz)
set(BZIP2_VERSION 1.0.8)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
set(BZIP2_HASH_TYPE SHA256)
set(BZIP2_FILE bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(FFI_VERSION 3.3)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
set(FFI_HASH_TYPE SHA256)
set(FFI_FILE libffi-${FFI_VERSION}.tar.gz)
set(LZMA_VERSION 5.2.5)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(LZMA_HASH_TYPE SHA256)
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
if(BLENDER_PLATFORM_ARM)
# Need at least 1.1.1i for aarch64 support (https://github.com/openssl/openssl/pull/13218)
set(SSL_VERSION 1.1.1i)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
else()
set(SSL_VERSION 1.1.1g)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
set(SSL_HASH_TYPE SHA256)
set(SSL_FILE openssl-${SSL_VERSION}.tar.gz)
endif()
set(SSL_VERSION 1.1.1g)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
set(SQLITE_VERSION 3.31.1)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(SQLITE_HASH_TYPE SHA1)
set(SQLITE_FILE sqlite-src-3240000.zip)
set(EMBREE_VERSION 3.10.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
set(EMBREE_HASH_TYPE MD5)
set(EMBREE_FILE embree-v${EMBREE_VERSION}.zip)
set(EMBREE_ARM_GIT https://github.com/brechtvl/embree.git)
set(USD_VERSION 21.02)
set(USD_VERSION 20.05)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc)
set(OIDN_VERSION 1.4.1)
set(OIDN_VERSION 1.2.1)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH df4007b0ab93b1c41cdf223b075d01c0)
set(OIDN_HASH_TYPE MD5)
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH cbebc1a25eb6de62af3a59e943063608)
set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(LIBGLU_HASH_TYPE MD5)
set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz)
set(MESA_VERSION 21.1.5)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH 022c7293074aeeced2278c872db4fa693147c70f8595b076cf3f1ef81520766d)
set(MESA_HASH_TYPE SHA256)
set(MESA_FILE mesa-${MESA_VERSION}.tar.xz)
set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)
set(NASM_VERSION 2.15.02)
set(NASM_URI https://github.com/netwide-assembler/nasm/archive/nasm-${NASM_VERSION}.tar.gz)
set(NASM_HASH aded8b796c996a486a56e0515c83e414116decc3b184d88043480b32eb0a8589)
set(NASM_HASH_TYPE SHA256)
set(NASM_FILE nasm-${NASM_VERSION}.tar.gz)
set(XR_OPENXR_SDK_VERSION 1.0.17)
set(XR_OPENXR_SDK_VERSION 1.0.8)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH bf0fd8828837edff01047474e90013e1)
set(XR_OPENXR_SDK_HASH_TYPE MD5)
set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(WL_PROTOCOLS_VERSION 1.21)
set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz)
set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/${WL_PROTOCOLS_FILE})
set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a)
set(WL_PROTOCOLS_HASH_TYPE MD5)
set(ISPC_VERSION v1.16.0)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
set(ISPC_VERSION v1.13.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 2e3abedbc0ea9aaec17d6562c632454d)
set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz)
set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
set(POTRACE_VERSION 1.16)
set(POTRACE_URI http://potrace.sourceforge.net/download/${POTRACE_VERSION}/potrace-${POTRACE_VERSION}.tar.gz)
set(POTRACE_HASH 5f0bd87ddd9a620b0c4e65652ef93d69)
set(POTRACE_HASH_TYPE MD5)
set(POTRACE_FILE potrace-${POTRACE_VERSION}.tar.gz)
set(HARU_VERSION 2_3_0)
set(HARU_URI https://github.com/libharu/libharu/archive/RELEASE_${HARU_VERSION}.tar.gz)
set(HARU_HASH 4f916aa49c3069b3a10850013c507460)
set(HARU_HASH_TYPE MD5)
set(HARU_FILE libharu-${HARU_VERSION}.tar.gz)
set(ZSTD_VERSION 1.5.0)
set(ZSTD_URI https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz)
set(ZSTD_HASH 5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94)
set(ZSTD_HASH_TYPE SHA256)
set(ZSTD_FILE zstd-${ZSTD_VERSION}.tar.gz)
set(SSE2NEON_GIT https://github.com/DLTcollab/sse2neon.git)
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)
set(ISPC_HASH 4bf5e8d0020c4b9980faa702c1a6f25f)

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_vorbis
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
URL ${VORBIS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
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

View File

@@ -24,20 +24,16 @@ if(WIN32)
endif()
else()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(VPX_EXTRA_FLAGS --target=generic-gnu)
else()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin17-gcc)
endif()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
endif()
ExternalProject_Add(external_vpx
URL file://${PACKAGE_DIR}/${VPX_FILE}
URL ${VPX_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VPX_HASH_TYPE}=${VPX_HASH}
URL_HASH SHA256=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&

View File

@@ -1,27 +0,0 @@
# ***** 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_wayland_protocols
URL file://${PACKAGE_DIR}/${WL_PROTOCOLS_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH}
PREFIX ${BUILD_DIR}/wayland-protocols
CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
BUILD_COMMAND ninja
INSTALL_COMMAND ninja install
)

View File

@@ -32,9 +32,9 @@ else()
endif()
ExternalProject_Add(external_webp
URL file://${PACKAGE_DIR}/${WEBP_FILE}
URL ${WEBP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${WEBP_HASH_TYPE}=${WEBP_HASH}
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_DIR ${LIBDIR}/webp

View File

@@ -20,25 +20,13 @@ if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
if(BLENDER_PLATFORM_ARM)
set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm")
endif()
if((APPLE AND NOT BLENDER_PLATFORM_ARM) OR (UNIX AND NOT APPLE))
set(X264_CONFIGURE_ENV
export AS=${LIBDIR}/nasm/bin/nasm
)
else()
set(X264_CONFIGURE_ENV echo .)
endif()
ExternalProject_Add(external_x264
URL file://${PACKAGE_DIR}/${X264_FILE}
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${X264_HASH_TYPE}=${X264_HASH}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
@@ -51,10 +39,3 @@ ExternalProject_Add(external_x264
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()
if(UNIX)
add_dependencies(
external_x264
external_nasm
)
endif()

View File

@@ -17,9 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_xml2
URL file://${PACKAGE_DIR}/${XML2_FILE}
URL ${XML2_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XML2_HASH_TYPE}=${XML2_HASH}
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

View File

@@ -35,9 +35,9 @@ if(UNIX AND NOT APPLE)
endif()
ExternalProject_Add(external_xr_openxr_sdk
URL file://${PACKAGE_DIR}/${XR_OPENXR_SDK_FILE}
URL ${XR_OPENXR_SDK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XR_OPENXR_SDK_HASH_TYPE}=${XR_OPENXR_SDK_HASH}
URL_HASH MD5=${XR_OPENXR_SDK_HASH}
PREFIX ${BUILD_DIR}/xr_openxr_sdk
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
@@ -53,7 +53,7 @@ if(WIN32)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loaderd.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loaderd.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loader.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loader_d.lib
DEPENDEES install
)
endif()

View File

@@ -21,9 +21,9 @@ if(WIN32)
endif()
ExternalProject_Add(external_xvidcore
URL file://${PACKAGE_DIR}/${XVIDCORE_FILE}
URL ${XVIDCORE_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XVIDCORE_HASH_TYPE}=${XVIDCORE_HASH}
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}

View File

@@ -17,22 +17,17 @@
# ***** END GPL LICENSE BLOCK *****
set(YAMLCPP_EXTRA_ARGS
-DBUILD_GMOCK=OFF
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DYAML_MSVC_SHARED_RT=ON
)
if(WIN32)
set(YAMLCPP_EXTRA_ARGS
${YAMLCPP_EXTRA_ARGS}
-DBUILD_GMOCK=OFF
-DYAML_MSVC_SHARED_RT=ON)
endif()
ExternalProject_Add(external_yamlcpp
URL file://${PACKAGE_DIR}/${YAMLCPP_FILE}
URL ${YAMLCPP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${YAMLCPP_HASH_TYPE}=${YAMLCPP_HASH}
URL_HASH MD5=${YAMLCPP_HASH}
PREFIX ${BUILD_DIR}/yamlcpp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/yamlcpp

View File

@@ -17,8 +17,9 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
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

View File

@@ -17,8 +17,8 @@
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_zlib_mingw
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
URL ${ZLIB_URI}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib_mingw
CONFIGURE_COMMAND echo .

View File

@@ -1,51 +0,0 @@
# ***** 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(ZSTD_EXTRA_ARGS
-DZSTD_BUILD_PROGRAMS=OFF
-DZSTD_BUILD_SHARED=OFF
-DZSTD_BUILD_STATIC=ON
-DZSTD_BUILD_TESTS=OFF
-DZSTD_LEGACY_SUPPORT=OFF
-DZSTD_LZ4_SUPPORT=OFF
-DZSTD_LZMA_SUPPORT=OFF
-DZSTD_MULTITHREAD_SUPPORT=ON
-DZSTD_PROGRAMS_LINK_SHARED=OFF
-DZSTD_USE_STATIC_RUNTIME=OFF
-DZSTD_ZLIB_SUPPORT=OFF
)
ExternalProject_Add(external_zstd
URL file://${PACKAGE_DIR}/${ZSTD_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${ZSTD_HASH_TYPE}=${ZSTD_HASH}
PREFIX ${BUILD_DIR}/zstd
SOURCE_SUBDIR build/cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zstd ${DEFAULT_CMAKE_FLAGS} ${ZSTD_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/zstd
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_zstd after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zstd/lib/zstd_static${LIBEXT} ${HARVEST_TARGET}/zstd/lib/zstd_static${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zstd/include/ ${HARVEST_TARGET}/zstd/include/
DEPENDEES install
)
endif()
endif()

File diff suppressed because it is too large Load Diff

View File

@@ -91,41 +91,3 @@ diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
/* Some useful units */
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index 84b5095..23053b4 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -490,12 +490,12 @@ void unshuffle(size_t bytesoftype, size_t blocksize,
#else /* no __SSE2__ available */
void shuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_shuffle(bytesoftype, blocksize, _src, _dest);
}
void unshuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_unshuffle(bytesoftype, blocksize, _src, _dest);
}
--- a/cmake/FindSSE.cmake
+++ b/cmake/FindSSE.cmake
@@ -49,6 +49,17 @@
set(AVX_FOUND false CACHE BOOL "AVX available on host")
ENDIF (AVX_TRUE)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Detected architecture ${ARCHITECTURE}")
+ IF("${ARCHITECTURE}" STREQUAL "arm64")
+ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+ set(AVX_FOUND false CACHE BOOL "AVX available on host")
+ return()
+ ENDIF()
+
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

View File

@@ -1,4 +0,0 @@
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
: @LIBDIR@/python/libs
;

View File

@@ -20,7 +20,7 @@
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
# ILMBASE_FOUND - True if IlmBase was found.
# Other standard issue macros
# Other standarnd issue macros
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)
include(SelectLibraryConfigurations)

View File

@@ -22,7 +22,7 @@
# These are defined by the FindIlmBase module.
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standard issue macros
# Other standarnd issue macros
include(SelectLibraryConfigurations)
include(FindPackageHandleStandardArgs)
include(FindPackageMessage)

View File

@@ -1,22 +0,0 @@
cmake_minimum_required(VERSION 3.1)
project(libgmpxx)
include_directories(. cxx ${GMP_INCLUDE_DIR})
add_definitions(-D__GMP_WITHIN_GMPXX)
add_library(libgmpxx SHARED
cxx/dummy.cc
cxx/isfuns.cc
cxx/ismpf.cc
cxx/ismpq.cc
cxx/ismpz.cc
cxx/ismpznw.cc
cxx/limits.cc
cxx/osdoprnti.cc
cxx/osfuns.cc
cxx/osmpf.cc
cxx/osmpq.cc
cxx/osmpz.cc
)
target_link_libraries(libgmpxx ${GMP_LIBRARY})
install(TARGETS libgmpxx DESTINATION lib)

View File

@@ -1,54 +0,0 @@
project(potrace)
cmake_minimum_required(VERSION 2.8)
include_directories(src/include)
set(SOURCES
src/backend_dxf.c
src/backend_eps.c
src/backend_geojson.c
src/backend_pdf.c
src/backend_pgm.c
src/backend_svg.c
src/backend_xfig.c
src/bbox.c
src/bitmap_io.c
src/curve.c
src/decompose.c
src/flate.c
src/greymap.c
src/lzw.c
src/potracelib.c
src/progress_bar.c
src/render.c
src/trace.c
src/trans.c
)
set(HEADERS
src/potracelib.h
)
if(WIN32)
add_definitions(/D_USE_MATH_DEFINES)
endif()
add_definitions(/DPOTRACE="POTrace")
add_definitions(/DVERSION="Blender")
add_definitions(/DHAVE_INTTYPES_H)
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES
LIBRARY_OUTPUT_NAME "${PROJECT_NAME}"
PUBLIC_HEADER "${HEADERS}"
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)

View File

@@ -1,32 +1,5 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
if (POLICY CMP0048)
# cmake warns if loaded from a min-3.0-required parent dir, so silence the warning:
cmake_policy(SET CMP0048 NEW)
endif()
project (tbb CXX)
include(CheckCXXCompilerFlag)
include(CheckCXXSourceRuns)
if(POLICY CMP0058)
cmake_policy(SET CMP0058 NEW)
endif()
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif()
if (POLICY CMP0078)
# swig standard target names
cmake_policy(SET CMP0078 NEW)
endif ()
if (POLICY CMP0086)
# UseSWIG honors SWIG_MODULE_NAME via -module flag
cmake_policy(SET CMP0086 NEW)
endif ()
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.")
@@ -35,43 +8,18 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"MinSizeRel" "RelWithDebInfo")
endif()
if(NOT TBB_INSTALL_RUNTIME_DIR)
set(TBB_INSTALL_RUNTIME_DIR bin)
endif()
if(NOT TBB_INSTALL_LIBRARY_DIR)
set(TBB_INSTALL_LIBRARY_DIR lib)
endif()
if(NOT TBB_INSTALL_ARCHIVE_DIR)
set(TBB_INSTALL_ARCHIVE_DIR lib)
endif()
if(NOT TBB_INSTALL_INCLUDE_DIR)
set(TBB_INSTALL_INCLUDE_DIR include)
endif()
if(NOT TBB_CMAKE_PACKAGE_INSTALL_DIR)
set(TBB_CMAKE_PACKAGE_INSTALL_DIR lib/cmake/tbb)
endif()
include_directories(include src src/rml/include ${CMAKE_CURRENT_BINARY_DIR})
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)
option(TBB_BUILD_TESTS "Build TBB tests and enable testing infrastructure" ON)
option(TBB_NO_DATE "Do not save the configure date in the version string" OFF)
option(TBB_BUILD_PYTHON "Build TBB Python bindings" OFF)
option(TBB_SET_SOVERSION "Set the SOVERSION (shared library build version suffix)?" OFF)
# When this repository is part of a larger build system of a parent project
# we may not want TBB to set up default installation targets
option(TBB_INSTALL_TARGETS "Include build targets for 'make install'" 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(REMOVE_ITEM tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_bind.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})
@@ -90,143 +38,66 @@ set(tbbmalloc_proxy_src
src/tbbmalloc/proxy.cpp
src/tbbmalloc/tbb_function_replacement.cpp)
add_library (tbb_interface INTERFACE)
add_definitions(-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(i386|x86_64)")
if (NOT APPLE AND NOT MINGW)
target_compile_definitions(tbb_interface INTERFACE DO_ITT_NOTIFY)
endif()
endif()
if (APPLE)
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>")
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()
macro(CHECK_CXX_COMPILER_AND_LINKER_FLAGS _RESULT _CXX_FLAGS _LINKER_FLAGS)
set(CMAKE_REQUIRED_FLAGS ${_CXX_FLAGS})
set(CMAKE_REQUIRED_LIBRARIES ${_LINKER_FLAGS})
set(CMAKE_REQUIRED_QUIET TRUE)
check_cxx_source_runs("#include <iostream>\nint main(int argc, char **argv) { std::cout << \"test\"; return 0; }" ${_RESULT})
set(CMAKE_REQUIRED_FLAGS "")
set(CMAKE_REQUIRED_LIBRARIES "")
endmacro()
# Prefer libc++ in conjunction with Clang
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
message(STATUS "TBB: using libc++.")
else()
CHECK_CXX_COMPILER_AND_LINKER_FLAGS(HAS_LIBCPP "-stdlib=libc++" "-stdlib=libc++")
if (HAS_LIBCPP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -D_LIBCPP_VERSION")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
message(STATUS "TBB: using libc++.")
else()
message(STATUS "TBB: NOT using libc++.")
endif()
endif()
endif()
set (CMAKE_CXX_STANDARD 11)
if (UNIX)
target_compile_definitions(tbb_interface INTERFACE USE_PTHREAD)
check_cxx_compiler_flag ("-mrtm -Werror" SUPPORTS_MRTM)
if (SUPPORTS_MRTM)
target_compile_options(tbb_interface INTERFACE "-mrtm")
endif ()
elseif(WIN32)
target_compile_definitions(tbb_interface INTERFACE USE_WINTHREAD _WIN32_WINNT=0x0600)
if (MSVC)
enable_language(ASM_MASM)
target_compile_options(tbb_interface INTERFACE /GS- /Zc:wchar_t /Zc:forScope)
check_cxx_compiler_flag ("/volatile:iso" SUPPORTS_VOLATILE_FLAG)
if (SUPPORTS_VOLATILE_FLAG)
target_compile_options(tbb_interface INTERFACE /volatile:iso)
endif ()
target_compile_options(tbb_interface INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/wd4267 /wd4800 /wd4146 /wd4244 /wd4577 /wd4018>)
if (NOT CMAKE_SIZEOF_VOID_P)
message(FATAL_ERROR "'CMAKE_SIZEOF_VOID_P' is undefined. Please delete your build directory and rerun CMake again!")
endif()
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 ${CMAKE_ASM_MASM_FLAGS}")
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)
# Enable SAFESEH feature for assembly (x86 builds only).
set(CMAKE_ASM_MASM_FLAGS "/safeseh ${CMAKE_ASM_MASM_FLAGS}")
endif()
elseif (MINGW)
target_compile_options(tbb_interface INTERFACE "-mthreads")
endif ()
endif()
if (MSVC)
set(ENABLE_RTTI "/EHsc /GR ")
set(DISABLE_RTTI "/EHs- /GR- ")
elseif (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 ")
endif ()
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")
##--------
# - Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU
# libstdc++ when it cannot be properly recognized, e.g. when used
# with Clang on Linux* OS. Inspired by a contribution from David A.
if (NOT TBB_USE_GLIBCXX_VERSION AND UNIX AND NOT APPLE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
string(REPLACE "." "0" TBB_USE_GLIBCXX_VERSION ${CMAKE_CXX_COMPILER_VERSION})
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 (TBB_USE_GLIBCXX_VERSION)
target_compile_definitions(tbb_interface INTERFACE TBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION})
endif()
##-------
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
check_cxx_compiler_flag ("-flifetime-dse=1" SUPPORTS_FLIFETIME)
if (SUPPORTS_FLIFETIME)
target_compile_options(tbb_interface INTERFACE -flifetime-dse=1)
endif()
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 (APPLE)
set (ARCH_PREFIX "mac")
elseif(WIN32)
set (ARCH_PREFIX "win")
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()
if (MINGW)
set (ARCH_PREFIX "${ARCH_PREFIX}-gcc")
# there's no win32-gcc-tbb-export.def, use lin32-tbb-export.def
execute_process (COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/lin32-tbb-export.def ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/win32-gcc-tbb-export.def)
endif()
if (MSVC)
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
@@ -238,15 +109,18 @@ if (MSVC)
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_resource.rc)
list(APPEND tbbmalloc_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
list(APPEND tbbmalloc_proxy_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -std=c++11 -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o 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++ -std=c++11 -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o 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"
)
@@ -257,80 +131,34 @@ add_custom_target(tbb_def_files DEPENDS tbb.def tbbmalloc.def)
# TBB library
if (TBB_BUILD_STATIC)
add_library(tbb_static STATIC ${tbb_src})
target_link_libraries(tbb_static PRIVATE tbb_interface)
target_include_directories(tbb_static INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:${TBB_INSTALL_INCLUDE_DIR}>")
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})
if (TBB_INSTALL_TARGETS)
install(TARGETS tbb_static ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR})
endif()
target_compile_definitions(tbb_static
PRIVATE
-D__TBB_BUILD=1
-D__TBB_DYNAMIC_LOAD_ENABLED=0
-D__TBB_SOURCE_DIRECTLY_INCLUDED=1)
if (MSVC)
target_compile_definitions(tbb_static
PUBLIC -D__TBB_NO_IMPLICIT_LINKAGE=1
PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif()
if (UNIX AND NOT APPLE)
target_link_libraries(tbb_static PUBLIC pthread dl)
endif()
install(TARGETS tbb_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbb SHARED ${tbb_src})
target_link_libraries(tbb PRIVATE tbb_interface)
target_include_directories(tbb INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:${TBB_INSTALL_INCLUDE_DIR}>")
set_property(TARGET tbb APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_BUILD=1")
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
if (TBB_SET_SOVERSION)
set_property(TARGET tbb PROPERTY SOVERSION 2)
endif ()
target_compile_definitions(tbb
PRIVATE -D__TBB_BUILD=1)
if (MSVC)
target_compile_definitions(tbb
PUBLIC -D__TBB_NO_IMPLICIT_LINKAGE=1
PRIVATE -D_CRT_SECURE_NO_WARNINGS)
endif()
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 (MSVC)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_BINARY_DIR}/tbb.def\"")
else ()
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,\"${CMAKE_CURRENT_BINARY_DIR}/tbb.def\"")
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()
if (TBB_INSTALL_TARGETS)
install(TARGETS tbb EXPORT TBB
LIBRARY DESTINATION ${TBB_INSTALL_LIBRARY_DIR}
ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR}
RUNTIME DESTINATION ${TBB_INSTALL_RUNTIME_DIR})
if (MSVC)
install(FILES $<TARGET_PDB_FILE:tbb> DESTINATION ${TBB_INSTALL_RUNTIME_DIR} OPTIONAL)
endif()
endif()
if (UNIX AND NOT APPLE)
target_link_libraries(tbb PUBLIC pthread dl)
install(TARGETS tbb DESTINATION lib)
if(WIN32)
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb$<$<CONFIG:Debug>:_debug>")
endif()
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
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("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Quench a warning on Clang
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/itt_notify.cpp COMPILE_FLAGS "-Wno-varargs ")
elseif(MSVC)
# Quench a warning on MSVC
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/scheduler.cpp COMPILE_FLAGS "/wd4458 ")
@@ -340,50 +168,24 @@ if(TBB_BUILD_TBBMALLOC)
# TBB malloc library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_static STATIC ${tbbmalloc_static_src})
target_link_libraries(tbbmalloc_static PRIVATE tbb_interface)
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_DYNAMIC_LOAD_ENABLED=0")
set_property(TARGET tbbmalloc_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
set_property(TARGET tbbmalloc_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (MSVC)
target_compile_definitions(tbbmalloc_static PUBLIC __TBB_NO_IMPLICIT_LINKAGE=1 __TBBMALLOC_NO_IMPLICIT_LINKAGE=1)
endif()
if (TBB_INSTALL_TARGETS)
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR})
endif()
install(TARGETS tbbmalloc_static ARCHIVE DESTINATION lib)
endif()
if (TBB_BUILD_SHARED)
add_library(tbbmalloc SHARED ${tbbmalloc_src})
target_link_libraries(tbbmalloc PRIVATE tbb_interface)
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (TBB_SET_SOVERSION)
set_property(TARGET tbbmalloc PROPERTY SOVERSION 2)
endif ()
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 (MSVC)
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "/DEF:\"${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def\"")
else ()
set_property(TARGET tbbmalloc APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,\"${CMAKE_CURRENT_BINARY_DIR}/tbbmalloc.def\"")
endif()
if (MSVC)
target_compile_definitions(tbbmalloc PUBLIC __TBB_NO_IMPLICIT_LINKAGE=1 __TBBMALLOC_NO_IMPLICIT_LINKAGE=1)
endif()
if (TBB_INSTALL_TARGETS)
install(TARGETS tbbmalloc EXPORT TBB
LIBRARY DESTINATION ${TBB_INSTALL_LIBRARY_DIR}
ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR}
RUNTIME DESTINATION ${TBB_INSTALL_RUNTIME_DIR})
if (MSVC)
install(FILES $<TARGET_PDB_FILE:tbbmalloc> DESTINATION ${TBB_INSTALL_RUNTIME_DIR} OPTIONAL)
endif()
endif()
if (UNIX AND NOT APPLE)
target_link_libraries(tbbmalloc PUBLIC pthread dl)
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()
@@ -391,298 +193,19 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
# TBB malloc proxy library
if (TBB_BUILD_STATIC)
add_library(tbbmalloc_proxy_static STATIC ${tbbmalloc_proxy_src})
target_link_libraries(tbbmalloc_proxy_static PRIVATE tbb_interface)
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_DYNAMIC_LOAD_ENABLED=0")
set_property(TARGET tbbmalloc_proxy_static APPEND PROPERTY COMPILE_DEFINITIONS "__TBB_SOURCE_DIRECTLY_INCLUDED=1")
set_property(TARGET tbbmalloc_proxy_static APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (TBB_INSTALL_TARGETS)
install(TARGETS tbbmalloc_proxy_static ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR})
endif()
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})
target_link_libraries(tbbmalloc_proxy PRIVATE tbb_interface)
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (TBB_SET_SOVERSION)
set_property(TARGET tbbmalloc_proxy PROPERTY SOVERSION 2)
endif ()
target_link_libraries(tbbmalloc_proxy PUBLIC tbbmalloc)
if (TBB_INSTALL_TARGETS)
install(TARGETS tbbmalloc_proxy EXPORT TBB
LIBRARY DESTINATION ${TBB_INSTALL_LIBRARY_DIR}
ARCHIVE DESTINATION ${TBB_INSTALL_ARCHIVE_DIR}
RUNTIME DESTINATION ${TBB_INSTALL_RUNTIME_DIR})
if (MSVC)
install(FILES $<TARGET_PDB_FILE:tbbmalloc_proxy> DESTINATION ${TBB_INSTALL_RUNTIME_DIR} OPTIONAL)
endif()
endif()
if (UNIX AND NOT APPLE)
target_link_libraries(tbbmalloc_proxy PUBLIC pthread dl)
endif()
target_link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()
if (TBB_INSTALL_TARGETS)
install(DIRECTORY include/tbb DESTINATION ${TBB_INSTALL_INCLUDE_DIR})
if (TBB_BUILD_SHARED)
install(EXPORT TBB DESTINATION ${TBB_CMAKE_PACKAGE_INSTALL_DIR} NAMESPACE TBB:: FILE TBBConfig.cmake)
endif()
endif()
# version file
if (TBB_INSTALL_TARGETS)
set (_VERSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/include/tbb/tbb_stddef.h)
file (STRINGS ${_VERSION_FILE} _VERSION_MAJOR_STRING REGEX ".*define[ ]+TBB_VERSION_MAJOR[ ]+[0-9]+.*")
file (STRINGS ${_VERSION_FILE} _VERSION_MINOR_STRING REGEX ".*define[ ]+TBB_VERSION_MINOR[ ]+[0-9]+.*")
string (REGEX REPLACE ".*TBB_VERSION_MAJOR[ ]+([0-9]+)" "\\1" TBB_MAJOR_VERSION ${_VERSION_MAJOR_STRING})
string (REGEX REPLACE ".*TBB_VERSION_MINOR[ ]+([0-9]+)" "\\1" TBB_MINOR_VERSION ${_VERSION_MINOR_STRING})
set (TBB_VERSION_STRING "${TBB_MAJOR_VERSION}.${TBB_MINOR_VERSION}")
include (CMakePackageConfigHelpers)
write_basic_package_version_file (TBBConfigVersion.cmake VERSION "${TBB_VERSION_STRING}" COMPATIBILITY AnyNewerVersion)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/TBBConfigVersion.cmake DESTINATION "${TBB_CMAKE_PACKAGE_INSTALL_DIR}")
endif()
# version_string.ver
if (UNIX AND NOT TBB_NO_DATE)
execute_process (COMMAND date "+%a, %d %b %Y %H:%M:%S %z"
OUTPUT_VARIABLE _configure_date
OUTPUT_STRIP_TRAILING_WHITESPACE)
elseif (WIN32 AND NOT TBB_NO_DATE)
execute_process (COMMAND cmd " /C date /T"
OUTPUT_VARIABLE _configure_date
OUTPUT_STRIP_TRAILING_WHITESPACE)
else ()
set (_configure_date "Unknown")
endif()
set (TBB_CONFIG_DATE "${_configure_date}" CACHE STRING "First time that TBB was configured")
set (_configure_date "${TBB_CONFIG_DATE}")
include_directories (${CMAKE_BINARY_DIR})
configure_file (build/version_string.ver.in version_string.ver @ONLY)
if (TBB_BUILD_TESTS)
enable_language (C)
enable_testing ()
find_library (LIBRT_LIBRARIES rt)
find_library (LIDL_LIBRARIES dl)
find_package (Threads)
if (NOT APPLE)
find_package (OpenMP)
endif()
macro (tbb_add_test testname)
set (full_testname tbb_test_${testname})
add_executable (${full_testname} src/test/test_${testname}.cpp)
target_link_libraries(${full_testname} PRIVATE tbb_interface)
if (TBB_BUILD_SHARED)
target_link_libraries (${full_testname} PRIVATE tbb tbbmalloc)
target_compile_definitions (${full_testname} PRIVATE __TBB_LIB_NAME=tbb)
else ()
target_link_libraries (${full_testname} PRIVATE tbb_static tbbmalloc_static)
target_compile_definitions (${full_testname} PRIVATE __TBB_LIB_NAME=tbb_static)
endif ()
if (LIBRT_LIBRARIES)
target_link_libraries (${full_testname} PRIVATE ${LIBRT_LIBRARIES})
endif ()
if (LIDL_LIBRARIES)
target_link_libraries (${full_testname} PRIVATE ${LIDL_LIBRARIES})
endif ()
if (Threads_FOUND)
target_link_libraries (${full_testname} PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif ()
if (OPENMP_FOUND AND "${testname}" MATCHES "openmp")
set_target_properties (${full_testname} PROPERTIES COMPILE_FLAGS "${OpenMP_CXX_FLAGS}")
set_target_properties (${full_testname} PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}")
endif()
if (MINGW)
target_link_libraries (${full_testname} PRIVATE psapi)
endif ()
add_test (NAME ${full_testname} COMMAND ${full_testname})
endmacro ()
tbb_add_test (aggregator)
tbb_add_test (aligned_space)
tbb_add_test (assembly)
if (NOT WIN32)
tbb_add_test (async_msg) # msvc64/debug timeouts
endif()
tbb_add_test (async_node)
# tbb_add_test (atomic) # msvc64/debug timeouts: Compile-time initialization fails for static tbb::atomic variables
tbb_add_test (blocked_range2d)
tbb_add_test (blocked_range3d)
tbb_add_test (blocked_range)
tbb_add_test (broadcast_node)
tbb_add_test (buffer_node)
tbb_add_test (cache_aligned_allocator)
if (NOT WIN32)
tbb_add_test (cache_aligned_allocator_STL)
endif()
tbb_add_test (cilk_dynamic_load)
tbb_add_test (cilk_interop)
tbb_add_test (combinable)
tbb_add_test (composite_node)
tbb_add_test (concurrent_hash_map)
tbb_add_test (concurrent_lru_cache)
# tbb_add_test (concurrent_monitor) # too long
# tbb_add_test (concurrent_priority_queue)
if (NOT WIN32)
tbb_add_test (concurrent_queue) # msvc64/debug timeouts
endif()
# tbb_add_test (concurrent_queue_whitebox)
tbb_add_test (concurrent_unordered_map)
# tbb_add_test (concurrent_unordered_set)
tbb_add_test (concurrent_vector)
tbb_add_test (continue_node)
tbb_add_test (critical_section)
tbb_add_test (dynamic_link)
# tbb_add_test (eh_algorithms)
tbb_add_test (eh_flow_graph)
# tbb_add_test (eh_tasks)
tbb_add_test (enumerable_thread_specific)
tbb_add_test (examples_common_utility)
# tbb_add_test (fast_random)
tbb_add_test (flow_graph)
tbb_add_test (flow_graph_whitebox)
# tbb_add_test (fp) # mingw: harness_fp.h:66, assertion !checkConsistency || (ctl.mxcsr & SSE_RND_MODE_MASK) >> 3 == (ctl.x87cw & FE_RND_MODE_MASK): failed
# tbb_add_test (function_node) # mingw:random timeout
# tbb_add_test (global_control)
# tbb_add_test (global_control_whitebox)
tbb_add_test (halt)
tbb_add_test (handle_perror)
# tbb_add_test (hw_concurrency)
tbb_add_test (indexer_node)
tbb_add_test (inits_loop)
tbb_add_test (intrusive_list)
tbb_add_test (ittnotify)
# tbb_add_test (join_node) #msvc/64: fatal error C1128: number of sections exceeded object file format limit: compile with /bigob
tbb_add_test (lambda)
tbb_add_test (limiter_node)
# tbb_add_test (malloc_atexit)
# tbb_add_test (malloc_compliance) #mingw: Limits should be decreased for the test to work
tbb_add_test (malloc_init_shutdown)
# tbb_add_test (malloc_lib_unload)
# tbb_add_test (malloc_overload)
tbb_add_test (malloc_pools)
tbb_add_test (malloc_regression)
# tbb_add_test (malloc_used_by_lib)
# tbb_add_test (malloc_whitebox)
tbb_add_test (model_plugin)
# tbb_add_test (multifunction_node) # too long
tbb_add_test (mutex)
tbb_add_test (mutex_native_threads)
# tbb_add_test (opencl_node)
if (OPENMP_FOUND)
tbb_add_test (openmp)
endif ()
tbb_add_test (overwrite_node)
# tbb_add_test (parallel_do)
# This seems to fail on CI platforms (AppVeyor/Travis), perhaps because the VM exposes just 1 core?
tbb_add_test (parallel_for)
tbb_add_test (parallel_for_each)
tbb_add_test (parallel_for_vectorization)
tbb_add_test (parallel_invoke)
tbb_add_test (parallel_pipeline)
tbb_add_test (parallel_reduce)
tbb_add_test (parallel_scan)
tbb_add_test (parallel_sort)
tbb_add_test (parallel_while)
# tbb_add_test (partitioner_whitebox) # too long
tbb_add_test (pipeline)
# tbb_add_test (pipeline_with_tbf) # takes forever on appveyor
tbb_add_test (priority_queue_node)
tbb_add_test (queue_node)
tbb_add_test (reader_writer_lock)
# tbb_add_test (runtime_loader) # LINK : fatal error LNK1104: cannot open file 'tbbproxy.lib' [C:\projects\tbb\test_runtime_loader.vcxproj]
tbb_add_test (rwm_upgrade_downgrade)
# tbb_add_test (ScalableAllocator)
if (NOT WIN32)
tbb_add_test (ScalableAllocator_STL)
endif()
tbb_add_test (semaphore)
# tbb_add_test (sequencer_node) # msvc: timeout
tbb_add_test (source_node)
tbb_add_test (split_node)
tbb_add_test (static_assert)
tbb_add_test (std_thread)
tbb_add_test (tagged_msg)
# tbb_add_test (task_arena) # LINK : fatal error LNK1104: cannot open file '__TBB_LIB_NAME.lib' [C:\projects\tbb\test_task_arena.vcxproj]
# tbb_add_test (task_assertions)
tbb_add_test (task_auto_init)
tbb_add_test (task)
# tbb_add_test (task_enqueue) # too long
tbb_add_test (task_group)
# tbb_add_test (task_leaks)
# tbb_add_test (task_priority)
# tbb_add_test (task_scheduler_init) # msvc: test_task_scheduler_init.cpp:68, assertion !test_mandatory_parallelism || Harness::CanReachConcurrencyLevel(threads): failed
tbb_add_test (task_scheduler_observer)
tbb_add_test (task_steal_limit)
tbb_add_test (tbb_condition_variable)
tbb_add_test (tbb_fork)
# tbb_add_test (tbb_header)
tbb_add_test (tbb_thread)
# tbb_add_test (tbb_version)
tbb_add_test (tick_count)
tbb_add_test (tuple)
tbb_add_test (write_once_node)
tbb_add_test (yield)
endif ()
if (TBB_BUILD_PYTHON)
find_package(PythonInterp)
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
find_package(SWIG 3)
if (PythonLibs_FOUND AND SWIG_FOUND AND TBB_BUILD_SHARED)
include (${SWIG_USE_FILE})
set_source_files_properties (python/tbb/api.i PROPERTIES CPLUSPLUS ON)
set (CMAKE_SWIG_FLAGS "-threads")
# swig_add_module is deprecated
if (CMAKE_VERSION VERSION_LESS 3.8)
swig_add_module (api python python/tbb/api.i)
else ()
swig_add_library (api LANGUAGE python SOURCES python/tbb/api.i)
endif ()
# UseSWIG generates now standard target names
if (CMAKE_VERSION VERSION_LESS 3.13)
set (module_target ${SWIG_MODULE_api_REAL_NAME})
else ()
set (module_target api)
endif ()
target_include_directories(${module_target} PRIVATE ${PYTHON_INCLUDE_DIRS})
target_link_libraries(${module_target} PRIVATE tbb)
if(WIN32)
target_link_libraries(${module_target} ${PYTHON_LIBRARIES})
elseif(APPLE)
set_target_properties(${module_target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
if (WIN32)
set (PYTHON_SITE_PACKAGES Lib/site-packages)
else ()
set (PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
endif ()
if (TBB_INSTALL_TARGETS)
install(FILES python/TBB.py
DESTINATION ${PYTHON_SITE_PACKAGES})
install(FILES python/tbb/__init__.py python/tbb/pool.py python/tbb/test.py python/tbb/__main__.py ${CMAKE_CURRENT_BINARY_DIR}/api.py
DESTINATION ${PYTHON_SITE_PACKAGES}/tbb)
install(TARGETS ${module_target}
DESTINATION ${PYTHON_SITE_PACKAGES}/tbb)
endif()
if(UNIX AND NOT APPLE)
add_library(irml SHARED python/rml/ipc_server.cpp python/rml/ipc_utils.cpp src/tbb/cache_aligned_allocator.cpp src/tbb/dynamic_link.cpp src/tbb/tbb_misc_ex.cpp src/tbb/tbb_misc.cpp)
target_compile_definitions(irml PRIVATE DO_ITT_NOTIFY=0 USE_PTHREAD=1)
target_link_libraries(irml PRIVATE tbb)
set_target_properties(irml PROPERTIES VERSION 1)
if (TBB_INSTALL_TARGETS)
install(TARGETS irml DESTINATION ${TBB_INSTALL_LIBRARY_DIR})
endif()
endif ()
endif ()
endif ()
install(DIRECTORY include/tbb DESTINATION include)

View File

@@ -1,668 +0,0 @@
/* config.h. Generated from config.in by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/*
Copyright 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your
option) any later version.
or
* 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.
or both in parallel, as here.
The GNU MP Library 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 copies of the GNU General Public License and the
GNU Lesser General Public License along with the GNU MP Library. If not,
see https://www.gnu.org/licenses/.
*/
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* The gmp-mparam.h file (a string) the tune program should suggest updating.
*/
#define GMP_MPARAM_H_SUGGEST "./mpn/x86_64/coreisbr/gmp-mparam.h"
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if alloca() works (via gmp-impl.h). */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */
//#define HAVE_ATTRIBUTE_CONST 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */
//#define HAVE_ATTRIBUTE_MALLOC 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX)))
*/
//#define HAVE_ATTRIBUTE_MODE 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */
//#define HAVE_ATTRIBUTE_NORETURN 1
/* Define to 1 if you have the `attr_get' function. */
/* #undef HAVE_ATTR_GET */
/* Define to 1 if tests/libtests has calling conventions checking for the CPU
*/
/* #undef HAVE_CALLING_CONVENTIONS */
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
/* Define to 1 if you have the `clock_gettime' function */
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if you have the `cputime' function. */
/* #undef HAVE_CPUTIME */
/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't.
*/
#define HAVE_DECL_FGETC 1
/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't.
*/
#define HAVE_DECL_FSCANF 1
/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
*/
#define HAVE_DECL_OPTARG 1
/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you
don't. */
#define HAVE_DECL_SYS_ERRLIST 0
/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you
don't. */
#define HAVE_DECL_SYS_NERR 0
/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't.
*/
#define HAVE_DECL_UNGETC 1
/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you
don't. */
#define HAVE_DECL_VFPRINTF 1
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define one of the following to 1 for the format of a `double'.
If your format is not among these choices, or you don't know what it is,
then leave all undefined.
IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves
swapped, as used by ARM CPUs in little endian mode. */
/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */
#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1
/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */
/* #undef HAVE_DOUBLE_VAX_D */
/* #undef HAVE_DOUBLE_VAX_G */
/* #undef HAVE_DOUBLE_CRAY_CFP */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrusage' function. */
/* #undef HAVE_GETRUSAGE */
/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((visibility))
and __attribute__ ((alias)) */
#define HAVE_HIDDEN_ALIAS 1
/* Define one of these to 1 for the host CPU family.
If your CPU is not in any of these families, leave all undefined.
For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */
/* #undef HAVE_HOST_CPU_FAMILY_alpha */
/* #undef HAVE_HOST_CPU_FAMILY_m68k */
/* #undef HAVE_HOST_CPU_FAMILY_power */
/* #undef HAVE_HOST_CPU_FAMILY_powerpc */
/* #undef HAVE_HOST_CPU_FAMILY_x86 */
#define HAVE_HOST_CPU_FAMILY_x86_64 1
/* Define one of the following to 1 for the host CPU, as per the output of
./config.guess. If your CPU is not listed here, leave all undefined. */
/* #undef HAVE_HOST_CPU_alphaev67 */
/* #undef HAVE_HOST_CPU_alphaev68 */
/* #undef HAVE_HOST_CPU_alphaev7 */
/* #undef HAVE_HOST_CPU_m68020 */
/* #undef HAVE_HOST_CPU_m68030 */
/* #undef HAVE_HOST_CPU_m68040 */
/* #undef HAVE_HOST_CPU_m68060 */
/* #undef HAVE_HOST_CPU_m68360 */
/* #undef HAVE_HOST_CPU_powerpc604 */
/* #undef HAVE_HOST_CPU_powerpc604e */
/* #undef HAVE_HOST_CPU_powerpc750 */
/* #undef HAVE_HOST_CPU_powerpc7400 */
/* #undef HAVE_HOST_CPU_supersparc */
/* #undef HAVE_HOST_CPU_i386 */
/* #undef HAVE_HOST_CPU_i586 */
/* #undef HAVE_HOST_CPU_i686 */
/* #undef HAVE_HOST_CPU_pentium */
/* #undef HAVE_HOST_CPU_pentiummmx */
/* #undef HAVE_HOST_CPU_pentiumpro */
/* #undef HAVE_HOST_CPU_pentium2 */
/* #undef HAVE_HOST_CPU_pentium3 */
/* #undef HAVE_HOST_CPU_pentium4 */
/* #undef HAVE_HOST_CPU_core2 */
/* #undef HAVE_HOST_CPU_nehalem */
/* #undef HAVE_HOST_CPU_westmere */
/* #undef HAVE_HOST_CPU_sandybridge */
#define HAVE_HOST_CPU_ivybridge 1
/* #undef HAVE_HOST_CPU_haswell */
/* #undef HAVE_HOST_CPU_broadwell */
/* #undef HAVE_HOST_CPU_skylake */
/* #undef HAVE_HOST_CPU_silvermont */
/* #undef HAVE_HOST_CPU_goldmont */
/* #undef HAVE_HOST_CPU_k8 */
/* #undef HAVE_HOST_CPU_k10 */
/* #undef HAVE_HOST_CPU_bulldozer */
/* #undef HAVE_HOST_CPU_piledriver */
/* #undef HAVE_HOST_CPU_steamroller */
/* #undef HAVE_HOST_CPU_excavator */
/* #undef HAVE_HOST_CPU_zen */
/* #undef HAVE_HOST_CPU_bobcat */
/* #undef HAVE_HOST_CPU_jaguar */
/* #undef HAVE_HOST_CPU_s390_z900 */
/* #undef HAVE_HOST_CPU_s390_z990 */
/* #undef HAVE_HOST_CPU_s390_z9 */
/* #undef HAVE_HOST_CPU_s390_z10 */
/* #undef HAVE_HOST_CPU_s390_z196 */
/* Define to 1 iff we have a s390 with 64-bit registers. */
/* #undef HAVE_HOST_CPU_s390_zarch */
/* Define to 1 if the system has the type `intmax_t'. */
#define HAVE_INTMAX_T 1
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <invent.h> header file. */
/* #undef HAVE_INVENT_H */
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
/* Define one of these to 1 for the endianness of `mp_limb_t'.
If the endianness is not a simple big or little, or you don't know what
it is, then leave both undefined. */
/* #undef HAVE_LIMB_BIG_ENDIAN */
#define HAVE_LIMB_LITTLE_ENDIAN 1
/* Define to 1 if you have the `localeconv' function. */
#define HAVE_LOCALECONV 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if the system has the type `long double'. */
#define HAVE_LONG_DOUBLE 1
/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mmap' function. */
/* #undef HAVE_MMAP */
/* Define to 1 if you have the `mprotect' function. */
#define HAVE_MPROTECT 1
/* Define to 1 each of the following for which a native (ie. CPU specific)
implementation of the corresponding routine exists. */
#define HAVE_NATIVE_mpn_add_n 1
/* #undef HAVE_NATIVE_mpn_add_n_sub_n */
#define HAVE_NATIVE_mpn_add_nc 1
/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */
#define HAVE_NATIVE_mpn_addlsh1_n 1
#define HAVE_NATIVE_mpn_addlsh2_n 1
#define HAVE_NATIVE_mpn_addlsh_n 1
#define HAVE_NATIVE_mpn_addlsh1_nc 1
#define HAVE_NATIVE_mpn_addlsh2_nc 1
#define HAVE_NATIVE_mpn_addlsh_nc 1
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addmul_1c */
#define HAVE_NATIVE_mpn_addmul_2 1
/* #undef HAVE_NATIVE_mpn_addmul_3 */
/* #undef HAVE_NATIVE_mpn_addmul_4 */
/* #undef HAVE_NATIVE_mpn_addmul_5 */
/* #undef HAVE_NATIVE_mpn_addmul_6 */
/* #undef HAVE_NATIVE_mpn_addmul_7 */
/* #undef HAVE_NATIVE_mpn_addmul_8 */
/* #undef HAVE_NATIVE_mpn_addmul_2s */
#define HAVE_NATIVE_mpn_and_n 1
#define HAVE_NATIVE_mpn_andn_n 1
#define HAVE_NATIVE_mpn_bdiv_dbm1c 1
#define HAVE_NATIVE_mpn_bdiv_q_1 1
#define HAVE_NATIVE_mpn_pi1_bdiv_q_1 1
#define HAVE_NATIVE_mpn_cnd_add_n 1
#define HAVE_NATIVE_mpn_cnd_sub_n 1
#define HAVE_NATIVE_mpn_com 1
#define HAVE_NATIVE_mpn_copyd 1
#define HAVE_NATIVE_mpn_copyi 1
/* #undef HAVE_NATIVE_mpn_div_qr_1n_pi1 */
/* #undef HAVE_NATIVE_mpn_div_qr_2 */
#define HAVE_NATIVE_mpn_divexact_1 1
/* #undef HAVE_NATIVE_mpn_divexact_by3c */
#define HAVE_NATIVE_mpn_divrem_1 1
/* #undef HAVE_NATIVE_mpn_divrem_1c */
#define HAVE_NATIVE_mpn_divrem_2 1
/* #undef HAVE_NATIVE_mpn_gcd_1 */
#define HAVE_NATIVE_mpn_gcd_11 1
/* #undef HAVE_NATIVE_mpn_gcd_22 */
#define HAVE_NATIVE_mpn_hamdist 1
#define HAVE_NATIVE_mpn_invert_limb 1
#define HAVE_NATIVE_mpn_ior_n 1
#define HAVE_NATIVE_mpn_iorn_n 1
#define HAVE_NATIVE_mpn_lshift 1
#define HAVE_NATIVE_mpn_lshiftc 1
/* #undef HAVE_NATIVE_mpn_lshsub_n */
/* #undef HAVE_NATIVE_mpn_mod_1 */
#define HAVE_NATIVE_mpn_mod_1_1p 1
/* #undef HAVE_NATIVE_mpn_mod_1c */
#define HAVE_NATIVE_mpn_mod_1s_2p 1
#define HAVE_NATIVE_mpn_mod_1s_4p 1
#define HAVE_NATIVE_mpn_mod_34lsub1 1
#define HAVE_NATIVE_mpn_modexact_1_odd 1
#define HAVE_NATIVE_mpn_modexact_1c_odd 1
#define HAVE_NATIVE_mpn_mul_1 1
#define HAVE_NATIVE_mpn_mul_1c 1
#define HAVE_NATIVE_mpn_mul_2 1
/* #undef HAVE_NATIVE_mpn_mul_3 */
/* #undef HAVE_NATIVE_mpn_mul_4 */
/* #undef HAVE_NATIVE_mpn_mul_5 */
/* #undef HAVE_NATIVE_mpn_mul_6 */
#define HAVE_NATIVE_mpn_mul_basecase 1
#define HAVE_NATIVE_mpn_mullo_basecase 1
#define HAVE_NATIVE_mpn_nand_n 1
#define HAVE_NATIVE_mpn_nior_n 1
#define HAVE_NATIVE_mpn_popcount 1
#define HAVE_NATIVE_mpn_preinv_divrem_1 1
/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */
#define HAVE_NATIVE_mpn_redc_1 1
/* #undef HAVE_NATIVE_mpn_redc_2 */
#define HAVE_NATIVE_mpn_rsblsh1_n 1
#define HAVE_NATIVE_mpn_rsblsh2_n 1
#define HAVE_NATIVE_mpn_rsblsh_n 1
#define HAVE_NATIVE_mpn_rsblsh1_nc 1
/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */
/* #undef HAVE_NATIVE_mpn_rsblsh_nc */
#define HAVE_NATIVE_mpn_rsh1add_n 1
#define HAVE_NATIVE_mpn_rsh1add_nc 1
#define HAVE_NATIVE_mpn_rsh1sub_n 1
#define HAVE_NATIVE_mpn_rsh1sub_nc 1
#define HAVE_NATIVE_mpn_rshift 1
/* #undef HAVE_NATIVE_mpn_sbpi1_bdiv_r */
#define HAVE_NATIVE_mpn_sqr_basecase 1
/* #undef HAVE_NATIVE_mpn_sqr_diagonal */
#define HAVE_NATIVE_mpn_sqr_diag_addlsh1 1
#define HAVE_NATIVE_mpn_sub_n 1
#define HAVE_NATIVE_mpn_sub_nc 1
#define HAVE_NATIVE_mpn_sublsh1_n 1
#define HAVE_NATIVE_mpn_sublsh2_n 1
/* #undef HAVE_NATIVE_mpn_sublsh_n */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc */
/* #undef HAVE_NATIVE_mpn_sublsh_nc */
/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_submul_1c */
/* #undef HAVE_NATIVE_mpn_tabselect */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */
/* #undef HAVE_NATIVE_mpn_umul_ppmm */
/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */
#define HAVE_NATIVE_mpn_xor_n 1
#define HAVE_NATIVE_mpn_xnor_n 1
/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */
/* Define to 1 if you have the <nl_types.h> header file. */
/* #undef HAVE_NL_TYPES_H */
/* Define to 1 if you have the `obstack_vprintf' function. */
/* #undef HAVE_OBSTACK_VPRINTF */
/* Define to 1 if you have the `popen' function. */
#define HAVE_POPEN 1
/* Define to 1 if you have the `processor_info' function. */
/* #undef HAVE_PROCESSOR_INFO */
/* Define to 1 if <sys/pstat.h> `struct pst_processor' exists and contains
`psp_iticksperclktick'. */
/* #undef HAVE_PSP_ITICKSPERCLKTICK */
/* Define to 1 if you have the `pstat_getprocessor' function. */
/* #undef HAVE_PSTAT_GETPROCESSOR */
/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
/* Define to 1 if the system has the type `quad_t'. */
/* #undef HAVE_QUAD_T */
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
/* Define to 1 if you have the `read_real_time' function. */
/* #undef HAVE_READ_REAL_TIME */
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
/* Define to 1 if you have the `sigaltstack' function. */
/* #undef HAVE_SIGALTSTACK */
/* Define to 1 if you have the `sigstack' function. */
/* #undef HAVE_SIGSTACK */
/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */
#define HAVE_SPEED_CYCLECOUNTER 2
/* Define to 1 if you have the <sstream> header file. */
#define HAVE_SSTREAM 1
/* Define to 1 if the system has the type `stack_t'. */
/* #undef HAVE_STACK_T */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if the system has the type `std::locale'. */
#define HAVE_STD__LOCALE 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `sysconf' function. */
/* #undef HAVE_SYSCONF */
/* Define to 1 if you have the `sysctl' function. */
/* #undef HAVE_SYSCTL */
/* Define to 1 if you have the `sysctlbyname' function. */
/* #undef HAVE_SYSCTLBYNAME */
/* Define to 1 if you have the `syssgi' function. */
/* #undef HAVE_SYSSGI */
/* Define to 1 if you have the <sys/attributes.h> header file. */
/* #undef HAVE_SYS_ATTRIBUTES_H */
/* Define to 1 if you have the <sys/iograph.h> header file. */
/* #undef HAVE_SYS_IOGRAPH_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/processor.h> header file. */
/* #undef HAVE_SYS_PROCESSOR_H */
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */
/* Define to 1 if you have the <sys/syssgi.h> header file. */
/* #undef HAVE_SYS_SYSSGI_H */
/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */
/* Define to 1 if you have the <sys/times.h> header file. */
/* #undef HAVE_SYS_TIMES_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `times' function. */
/* #undef HAVE_TIMES */
/* Define to 1 if the system has the type `uint_least32_t'. */
#define HAVE_UINT_LEAST32_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vsnprintf' function and it works properly. */
/* #undef HAVE_VSNPRINTF */
/* Define to 1 for Windos/64 */
#define HOST_DOS64 1
/* Assembler local label prefix */
#define LSYM_PREFIX "L"
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Define to 1 to disable the use of inline assembly */
/* #undef NO_ASM */
/* Name of package */
#define PACKAGE "gmp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU MP"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU MP 6.2.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gmp"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.2.0"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* The size of `mp_limb_t', as computed by sizeof. */
#define SIZEOF_MP_LIMB_T 8
/* The size of `unsigned', as computed by sizeof. */
#define SIZEOF_UNSIGNED 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if sscanf requires writable inputs */
/* #undef SSCANF_WRITABLE_INPUT */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */
/* #undef TUNE_SQR_TOOM2_MAX */
/* Version number of package */
#define VERSION "6.2.0"
/* Define to 1 to enable ASSERT checking, per --enable-assert */
/* #undef WANT_ASSERT */
/* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */
/* #undef WANT_FAKE_CPUID */
/* Define to 1 when building a fat binary. */
/* #undef WANT_FAT_BINARY */
/* Define to 1 to enable FFTs for multiplication, per --enable-fft */
#define WANT_FFT 1
/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per
--enable-old-fft-full */
/* #undef WANT_OLD_FFT_FULL */
/* Define to 1 if --enable-profiling=gprof */
/* #undef WANT_PROFILING_GPROF */
/* Define to 1 if --enable-profiling=instrument */
/* #undef WANT_PROFILING_INSTRUMENT */
/* Define to 1 if --enable-profiling=prof */
/* #undef WANT_PROFILING_PROF */
/* Define one of these to 1 for the desired temporary memory allocation
method, per --enable-alloca. */
#define WANT_TMP_ALLOCA 1
/* #undef WANT_TMP_REENTRANT */
/* #undef WANT_TMP_NOTREENTRANT */
/* #undef WANT_TMP_DEBUG */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to 1 if the assembler understands the mulx instruction */
/* #undef X86_ASM_MULX */
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
/* #undef YYTEXT_POINTER */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */

View File

@@ -9,91 +9,3 @@
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopus && {
enabled libopus_decoder && {
--- a/libavcodec/cfhddata.c
+++ b/libavcodec/cfhddata.c
@@ -276,10 +276,10 @@
av_cold int ff_cfhd_init_vlcs(CFHDContext *s)
{
int i, j, ret = 0;
- uint32_t new_cfhd_vlc_bits[NB_VLC_TABLE_18 * 2];
- uint8_t new_cfhd_vlc_len[NB_VLC_TABLE_18 * 2];
- uint16_t new_cfhd_vlc_run[NB_VLC_TABLE_18 * 2];
- int16_t new_cfhd_vlc_level[NB_VLC_TABLE_18 * 2];
+ uint32_t *new_cfhd_vlc_bits = av_calloc(sizeof(uint32_t), NB_VLC_TABLE_18 * 2);
+ uint8_t *new_cfhd_vlc_len = av_calloc(sizeof(uint8_t), NB_VLC_TABLE_18 * 2);
+ uint16_t *new_cfhd_vlc_run = av_calloc(sizeof(uint16_t), NB_VLC_TABLE_18 * 2);
+ int16_t *new_cfhd_vlc_level = av_calloc(sizeof(int16_t), NB_VLC_TABLE_18 * 2);
/** Similar to dv.c, generate signed VLC tables **/
@@ -305,8 +305,13 @@
ret = init_vlc(&s->vlc_9, VLC_BITS, j, new_cfhd_vlc_len,
1, 1, new_cfhd_vlc_bits, 4, 4, 0);
- if (ret < 0)
+ if (ret < 0) {
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
return ret;
+ }
for (i = 0; i < s->vlc_9.table_size; i++) {
int code = s->vlc_9.table[i][0];
int len = s->vlc_9.table[i][1];
@@ -346,8 +351,14 @@
ret = init_vlc(&s->vlc_18, VLC_BITS, j, new_cfhd_vlc_len,
1, 1, new_cfhd_vlc_bits, 4, 4, 0);
- if (ret < 0)
+ if (ret < 0) {
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
return ret;
+ }
+
av_assert0(s->vlc_18.table_size == 4572);
for (i = 0; i < s->vlc_18.table_size; i++) {
@@ -367,5 +378,10 @@
s->table_18_rl_vlc[i].run = run;
}
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
+
return ret;
}
--- a/libavcodec/rl.c
+++ b/libavcodec/rl.c
@@ -71,7 +71,7 @@ av_cold void ff_rl_init(RLTable *rl,
av_cold void ff_rl_init_vlc(RLTable *rl, unsigned static_size)
{
int i, q;
- VLC_TYPE table[1500][2] = {{0}};
+ VLC_TYPE (*table)[2] = av_calloc(sizeof(VLC_TYPE), 1500 * 2);
VLC vlc = { .table = table, .table_allocated = static_size };
av_assert0(static_size <= FF_ARRAY_ELEMS(table));
init_vlc(&vlc, 9, rl->n + 1, &rl->table_vlc[0][1], 4, 2, &rl->table_vlc[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC);
@@ -80,8 +80,10 @@ av_cold void ff_rl_init_vlc(RLTable *rl, unsigned static_size)
int qmul = q * 2;
int qadd = (q - 1) | 1;
- if (!rl->rl_vlc[q])
+ if (!rl->rl_vlc[q]){
+ av_free(table);
return;
+ }
if (q == 0) {
qmul = 1;
@@ -113,4 +115,5 @@ av_cold void ff_rl_init_vlc(RLTable *rl, unsigned static_size)
rl->rl_vlc[q][i].run = run;
}
}
+ av_free(table);
}

View File

@@ -1,12 +0,0 @@
diff --git a/src/hpdf_image_ccitt.c b/src/hpdf_image_ccitt.c
index 8672763..9be531a 100644
--- a/src/hpdf_image_ccitt.c
+++ b/src/hpdf_image_ccitt.c
@@ -21,7 +21,6 @@
#include <memory.h>
#include <assert.h>
-#define G3CODES
#include "t4.h"
typedef unsigned int uint32;

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