Compare commits

..

154 Commits

Author SHA1 Message Date
206f3352dd fix missing type conversion 2021-06-28 15:46:59 +02:00
dd92220f0b Merge branch 'master' into temp-attribute-processor 2021-06-28 13:32:16 +02:00
5639dcef62 Fix after merge 2021-06-23 18:54:05 +02:00
a20e0fd1a5 fix 2021-06-23 14:23:06 +02:00
448710996b Merge branch 'master' into temp-attribute-processor 2021-06-23 14:00:05 +02:00
3b41749245 initial support for voronoi node
Only 3D in F1 mode with euclidean distance is support right now.
2021-06-23 08:34:54 +02:00
00944353be cleanup menu 2021-06-22 09:47:28 +02:00
623818f2d5 initial support for noise texture 2021-06-22 09:44:25 +02:00
4b7eae5cd3 Merge branch 'master' into temp-attribute-processor 2021-06-16 15:16:04 +02:00
1172c0ae44 Merge branch 'master' into temp-attribute-processor 2021-06-15 15:22:10 +02:00
7f17d15125 fix bugs 2021-06-10 14:56:30 +02:00
b33fd7e89e add Position Input/Output and Attribute Input node 2021-06-10 12:52:45 +02:00
10b78013eb support default mode again and have separate default attribute name 2021-06-10 12:07:37 +02:00
3d057de976 Merge branch 'master' into temp-attribute-processor 2021-06-10 09:35:41 +02:00
3817b408e0 fix crash when creating group 2021-06-09 14:01:03 +02:00
b8d3ad515a fix copying default value from node group inputs 2021-06-09 12:50:44 +02:00
022b541cb3 node group fixes 2021-06-09 12:44:33 +02:00
e294e7a99c fixes 2021-06-09 12:26:29 +02:00
7928578f18 support Set Attribute node 2021-06-09 12:13:44 +02:00
369aa3a8a0 improve Set Attribute node 2021-06-09 11:41:25 +02:00
243b5ac98c add initial Set Attribute node 2021-06-09 11:19:05 +02:00
b63483baec cleanup 2021-06-09 11:08:07 +02:00
4ee0e62986 cleanup 2021-06-09 10:54:59 +02:00
b2184402ae support selection 2021-06-09 10:52:13 +02:00
028777bdba cleanup 2021-06-09 10:41:50 +02:00
e43c171455 Cleanup 2021-06-09 10:37:02 +02:00
e433e4ae42 cleanup 2021-06-09 10:18:47 +02:00
f22aa19845 cleanup 2021-06-09 10:17:56 +02:00
3391649edd cleanup 2021-06-09 10:17:21 +02:00
9e95222cb7 Geometry Nodes: New Attribute Processor.
Differential Revision: https://developer.blender.org/D11547
2021-06-09 10:14:55 +02:00
ef07d5a297 fix 2021-06-08 16:42:41 +02:00
09ec88413b fix 2021-06-08 16:36:11 +02:00
b9c8bb4254 Merge branch 'master' into temp-attribute-processor 2021-06-08 16:32:51 +02:00
64eb1df4b3 move Index node to input category 2021-06-07 16:59:08 +02:00
9a9b87d9c5 support attribute node 2021-06-07 16:59:08 +02:00
257b6bcc61 move operator from python to c++ 2021-06-07 16:59:08 +02:00
b53babaae7 update socket names 2021-06-07 16:59:08 +02:00
aa9efbedf1 remove default modes 2021-06-07 16:59:08 +02:00
93a5fe3a37 use enum for socket types 2021-06-07 16:59:08 +02:00
90de4edc06 improve add node group interface operator 2021-06-07 16:59:08 +02:00
138a0c8109 make attribute processor more prominent in the menu 2021-06-07 16:59:08 +02:00
3a06d098da Fix T88899: __file__ not set for text.as_module() 2021-06-07 16:59:08 +02:00
10636857f8 Event Simulate: and a --keep-open command line argument
It can be useful to investigate the state of the file
after event simulation runs.
2021-06-07 16:59:08 +02:00
e69f9fe0ca Cleanup: unused argument 2021-06-07 16:59:08 +02:00
3b39482e2c LineArt: Fix edge clipping index error.
Small bug that's causing edge count to be incorrect in
final culled list, just being offset exactly 1 entry.

Reviewed By: Sebastian Parborg (zeddb)

Differential Revision: https://developer.blender.org/D11513
2021-06-07 16:59:08 +02:00
82c72ccdbc VSE: Remove seq->tmp usage from transform code
This field was used for extend feature to get handle position of
metastrip children. Since D9972 extend feature works only on meta
strip itself, not it's children.
So `SEQ_transform_get_left_handle_frame()` second argument is always
false and can be removed.

Another instance of `seq->tmp usage` is hack to distinguish strips to be
shuffled, which is not covered by this patch.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D10321
2021-06-07 16:59:08 +02:00
6ea2f106a0 Exact Boolean: fix last commit: pass an arg by reference instead of value. 2021-06-07 16:59:08 +02:00
c9d4f5d625 Exact Boolean: speed up when there are many separate components.
Use bounding box tests quickly tell that two components cannot
have a containment relation between each other. This change
cut about 0.6s off a test with 25 big icospheres.
2021-06-07 16:59:08 +02:00
22c7967205 Limit Rotation: explicitly orthogonalize the matrix before processing.
Add a call to orthogonalize the matrix before processing for the
same reasons as D8915, and an early exit in case no limits are
enabled for a bit of extra efficiency.

Since the constraint goes through Euler decomposition, it would
in fact remove shear even before this change, but the resulting
rotation won't make much sense.

This change allows using the constraint without any enabled limits
purely for the purpose of efficiently removing shear.

Differential Revision: https://developer.blender.org/D9626
2021-06-07 16:59:08 +02:00
56088650be Limit Rotation: add an Euler Order option.
Since Limit Rotation is based on Euler decomposition, it should allow
specifying the order to use for the same reasons as Copy Rotation does,
namely, if the bone uses Quaternion rotation for its animation channels,
there is no way to choose the order for the constraint.

Ref D9626
2021-06-07 16:59:08 +02:00
14ec1f4e13 Fix T88859: Assert when changing view modes
The `loose_lines`' ibo was not being initialized.
2021-06-07 16:59:08 +02:00
33d262a7c8 BMesh: avoid extra faces-of-edges loop building partial update data 2021-06-07 16:59:08 +02:00
ec04ff8a33 Fix assert check in BLI_polyfill_beautify 2021-06-07 16:59:08 +02:00
c5c607bdaa Fix assert in gpencil_batches_ensure 2021-06-07 16:59:08 +02:00
f4392d1423 Cleanup: use ternary operator for icon argument 2021-06-07 16:59:08 +02:00
005f7318b2 Fix T88828: View/Navigation(Walk/Fly) disappeared from keymap
This was unintentionally removed in
f92f5d1ac6.
2021-06-07 16:59:08 +02:00
93e08fdf90 Cleanup: indentation 2021-06-07 16:59:08 +02:00
92e16e35dc Cleanup: spelling in comments
Also remove reference to function that never existed for adding `bNode`.
2021-06-07 16:59:08 +02:00
2abb09aa2b FFmpeg: Fix seeking not returning the correct frame when not using TC index
Fixed the logic for seeking in ffmpeg video files.
The main fix is that we now apply a small offset in ffmpeg_get_seek_pos
to make sure we don't get the frame in front of the seek position when
seeking backward.

The rest of the changes is general cleanup and untangling code.

Reviewed By: Richard Antalik

Differential Revision: http://developer.blender.org/D11492
2021-06-07 16:59:07 +02:00
a371d4bb2b Fix T88813: Scalable allocator not used on win10
Due to the way we ship the CRT on windows TBB's
malloc proxy was unable to attach it self to
the memory management functions on windows 10.

This change moves ucrtbase.dll out of the blender.crt
folder and back into the main blender folder to side
step some undesirable behaviour on win10 making TBB
once more able to attach it self.

Having this work again, should give a speed
boost in memory allocation heavy workloads
such as mantaflow.

For details on how this only failed on Win10
see T88813
2021-06-07 16:59:07 +02:00
03f9dba616 Edit Mesh: partial updates for normal and face tessellation
This patch exposes functionality for performing partial mesh updates
for normal calculation and face tessellation while transforming a mesh.

The partial update data only needs to be generated once,
afterwards the cached connectivity information can be reused
(with the exception of changing proportional editing radius).

Currently this is only used for transform, in the future it could be
used for other operators as well as the transform panel.

The best-case overall speedup while transforming geometry is about
1.45x since the time to update a small number of normals and faces is
negligible.

For an additional speedup partial face tessellation is multi-threaded,
this gives ~15x speedup on my system (timing tessellation alone).
Exact results depend on the number of CPU cores available.

Ref D11494

Reviewed By: mano-wii
2021-06-07 16:59:07 +02:00
Charlie Jolly
5f2ad6751c Nodes: Add Multiply Add to Vector Math nodes
Cycles, Eevee, OSL, Geo, Attribute

This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation.

Reviewed By: HooglyBoogly, brecht

Differential Revision: https://developer.blender.org/D10808
2021-06-07 16:59:07 +02:00
04e6656ff1 windows/deps: Fix TBB build issues.
rB847579b42250 updated the TBB build script
which had some unintended consequences for
windows as the directory layout slightly
changed.

This change adjusts the builder to the new
structure, there are no version/functional
changes.
2021-06-07 16:59:07 +02:00
Philipp Oeser
0ed005d48a Texture Paint: changing paint slots and viewport could go out of sync
When changing to another texture paint slot, the texture displayed in
the viewport should change accordingly (as well as the image displayed
in the Image Editor).

The procedure to find the texture to display in the viewport
(BKE_texpaint_slot_material_find_node) could fail
though because it assumed iterating nodes would always happen in the
same order (it was index based). This is not the case though, nodes can
get sorted differently based on selection (see ED_node_sort).

Now check the actual image being referenced in the paint slot for
comparison.

ref T88788 (probably enough to call this a fix, the other issue(s)
mentioned in the report are more likely a feature request)

Reviewed By: mano-wii

Maniphest Tasks: T88788

Differential Revision: https://developer.blender.org/D11496
2021-06-07 16:59:07 +02:00
1f33e20f55 LibOverride: Fix early break in some of the resync code.
This `break` moved out of its braces at some point in the previous
fixes/refctors... :(
2021-06-07 16:59:07 +02:00
946f53d86e GPencil: Change Fill Boundary icon
The icon has been changed to `eye` because is more consistent with other areas.
2021-06-07 16:59:07 +02:00
7ab79ac6ba GPencil: Change Fill extend lines icon
The icon has been changed to `eye` because is more consistent with other areas.
2021-06-07 16:59:07 +02:00
Fynn Grotehans
049924c240 Update Camera presets
The (tracking) camera presets have not been updated in the last 7 or
more years, so they are very outdated. I found it pointless to have a
few specific camera models in the list and instead add the most commonly
used sensor sizes/film sizes. This way the list is shorter, easier to
maintain/becomes later outdated, and is more user friendly for most people
who don't own any of the specific cameras. I added the Crop Factor to the
Beginning of the name, so it gets sortet in the correct order and presets
are easier to find based on the size.

Reviewed By: #render_cycles, #motion_tracking, brecht, sergey

Differential Revision: https://developer.blender.org/D10739
2021-06-07 16:59:07 +02:00
6118cbb78e Greasepencil: show pressure curve widgets in the sidebar
These were only showing in the Properties Editor, but there is no reason
to have the panels be different in the sidebar (they should not show in
the top bar though).

agreed upon by both @anoniov and @mendio

ref T88787
2021-06-07 16:59:07 +02:00
bb2e2ad3ff BlenLoad: Ensure linked IDs are properly sorted.
So far, linked IDs were not properly sorted at all, only the ones
explicitely linked from WM code would be, but any indirectly linked
data-blocks would end up in some random order in their lists.

While not ideal, this is not a huge issue in itself, but it had bad
side-effects, e.g. causing (recursive) resync of overrides to happen in
random order, leading to mismatches between name indices of newly-generated
override IDs and the one existings e.g.

And in general, it is much better to be consistent here.

Note that the file sub-version is bumped for this commit, since some
sorting (the directly linked IDs which we keep a reference to) should
never need to be re-done after relevant doversion process.
2021-06-07 16:59:07 +02:00
467f97fb57 GPencil: Cleanup unneeded variable assign
The variable is assigned below again and the initial value is not used.
2021-06-07 16:59:07 +02:00
236ff239bb Fix T88803: GPencil Thickness modifier produces thicker lines
There was a double apply of the thickness due a bug in the fading new parameter.

Differential Revision: https://developer.blender.org/D11483
2021-06-07 16:59:07 +02:00
5e0068f3f7 Math: Added max_uu/min_uu variations. 2021-06-07 16:59:07 +02:00
Johnny Matthews
dfcb4abd4c Geometry Nodes: Curve Length Node
This commit adds a node that outputs the total length of all
evalauted curve splines in a geometry set as a float value.

Differential Revision: https://developer.blender.org/D11459
2021-06-07 16:59:04 +02:00
60bd05f920 Geometry Nodes: Support curve data in the geometry delete node
This commit implements support for deleting curve data in the geometry
delete node. Spline domain and point domain attributes are supported.

Differential Revision: https://developer.blender.org/D11464
2021-06-07 16:58:32 +02:00
688671b9d7 Cleanup: Add comment explaining assert
This triggers fairly often during development, so it might save some
frustration at some point to have a comment here.
2021-06-07 16:58:32 +02:00
07961e5358 Overlay: Flash on Mode Transfer overlay
This implements T87633

This overlay renders a flash animation on the target object when
transfering the mode to it using the mode transfer operator.
This provides visual feedback when switching between objects without
extra overlays that affect the general color and lighting in the scene.

Differences with the design task:

- This uses just a fade out animation instead of a fade in/out animation.
The code is ready for fade in/out, but as the rest of the overlays
(face sets, masks...) change instantly without animation, having a fade
in/out effect gives the impression that the object flashes twice (once
for the face sets, twice for the peak alpha of the flash animation).

- The rendering uses a flat color without fresnel for now, but this can
be improved in the future to make it look more like the shader in the
prototype.

- Not enabled by default (can be enabled in the overlays panel), maybe
the defaults can change for 3.0 to disable fade inactive and enable this
instead.

Reviewed By: jbakker, JulienKaspar

Differential Revision: https://developer.blender.org/D11055
2021-06-07 16:58:32 +02:00
01f2dad596 VSE: Add refresh_all operator to all sequencer regions
This operator is needed in some cases to update image preview.
In workspaces with smaller timelines this is limiting, because users
need to first check that mouse cursor is in correct place, then press
CTRL+R shortcut.
2021-06-07 16:58:32 +02:00
ffa4c53d10 VSE: Remove JPEG reference from proxy panel
Proxies doesn't use MJPEG codec anymore, but text still referenced it.
2021-06-07 16:58:32 +02:00
88c16c4e7a GHOST/wayland: fix restoring hidden cursor 2021-06-07 16:58:32 +02:00
fed3c58f92 GHOST/wayland: fix non-moving normal cursor 2021-06-07 16:58:32 +02:00
77f3b9ea9f GHOST/wayland: add 'xdg-decoration' support 2021-06-07 16:58:32 +02:00
1dd65919e5 GHOST/wayland: adapt window and cursor surface scale to support HiDPI screens 2021-06-07 16:58:32 +02:00
bdada925e3 GHOST/wayland: handle return values for data sources 2021-06-07 16:58:32 +02:00
89602a8366 GHOST/wayland: set parent relation only for dialogs to mimic X11 behaviour 2021-06-07 16:58:32 +02:00
96a8189d74 GHOST/wayland: handle missing relative-pointer and pointer-constraints support 2021-06-07 16:58:32 +02:00
8f18d076e9 GHOST/wayland: get cursor settings via D-Bus 2021-06-07 16:58:32 +02:00
1077c37f1b GHOST/wayland: inhibit warning 2021-06-07 16:58:32 +02:00
f54fc8ac6e cmake: use absolute path for Wayland libraries 2021-06-07 16:58:32 +02:00
a7e337957d GHOST/wayland: set swap interval to 0
The Wayland server will not update hidden surfaces. This will block the
main event loop and thus also block updates to visible windows in a multi-
window setup.
2021-06-07 16:58:32 +02:00
d6a773345b WM: only use the tablet drag threshold for mouse button events
Keyboard click-drag events now use the "Drag Threshold".
This resolves a problem where keyboard click drag events
used a much smaller threshold when using a tablet.
2021-06-07 16:58:32 +02:00
ff0259de92 LibOverride: fix previous commit (rB826bed4349fa). 2021-06-07 16:58:32 +02:00
6dac1211b1 LibOverride: Fix some fail cases with auto-resync.
In some cases e.g. only objects would actually need resync, so
collections on the override character would not be resynced, and if some
objects were sharing relationships with others those could be
lost/destroyed.
2021-06-07 16:58:32 +02:00
7568501934 Fix missing updates in RNA override create functions. 2021-06-07 16:58:32 +02:00
2200c5f761 LibOverride: Add override_hierarchy_createto ID's RNA API. 2021-06-07 16:58:32 +02:00
f11182b1be Fix T88762: UI using tab to enter next button could clamp the hard min/
max unneccessarily

Since rB298d5eb66916 [which was needed to update buttons with custom
property range functions correctly], using tab would always clamp
(hardmin/hardmax) properties which were using FLT_MAX / INT_MAX as range
in their property definitions.

The clamping of rB298d5eb66916 was copied over from rB9b7f44ceb56c
[where it was used for the softmin/softmax], and while the re-evaluation
of hardmin/hardmax is needed for custom property range functions, the
clamping should actually not take place.

There are many properties using FLT_MAX / INT_MAX etc. and while it
probably would be good to update these with ranges that make more sense
-- not using FLT_MAX / INT_MAX would not have done the clamping here --
there should not be an arbitrary limit to these and they should stay as
they are.

Maniphest Tasks: T88762

Differential Revision: https://developer.blender.org/D11473
2021-06-07 16:58:32 +02:00
a069bd219c Cleanup: make format 2021-06-07 16:58:32 +02:00
3d1a0f97f7 LibOverride: ensure proper indirect tag for 'virtual' linked IDs.
Ensure 'virtual' linked override IDs generated by the recursive resync
process are tagged as indirectly linked data.

This is needed to avoid the 'missing data' messages on those virtual
data-blocks after saving and reloading.
2021-06-07 16:58:32 +02:00
2d37e469a2 IDManagement: Collection: Fix several issues in relationships building code.
`BKE_main_collections_parent_relations_rebuild`,
`BKE_collection_parent_relations_rebuild` anf their internal
dependencies had two issues fixed by this commit:

* Main one was that a same collection could be processed several times,
  sometimes even in an infinite loop (in some rare corner cases), by
  `collection_parents_rebuild_recursive`.
* More exotic, code here would not ensure that the collections it was
  processing were actually in Main (or a master one from a scene in
  Main), which became an issue with some advanced ID management
  processes involving partially out-of-main remapping, like liboverride
  resync.
2021-06-07 16:58:32 +02:00
20b0de7db1 Cleanup: use ascii characters instead of unicode where possible
Follow own code style docs.
2021-06-07 16:58:32 +02:00
1b5288b87f Cleanup: spelling in comments, correct outdated comments 2021-06-07 16:58:32 +02:00
e83d96753c Cleanup: use doxy sections for node_relationships.cc 2021-06-07 16:58:32 +02:00
de5e3ef8e5 Fix invalid return values from file_execute
Error in 6c8c30d865
2021-06-07 16:58:32 +02:00
91544db137 Draw Mesh Extractor: Fix used thread count
Some threads were always idle because of this.
2021-06-07 16:58:32 +02:00
2cc7f32f18 Cleanup: Remove unused 'ExtractTaskData's members 2021-06-07 16:58:32 +02:00
9e16740ca1 Cleanup: Fix build warnings 2021-06-07 16:58:32 +02:00
fc94932596 VSE: Add strip-time intersection test function
Use SEQ_time_strip_intersects_frame function to test if strip intersects with frame.

Note: There are cases where this function should not be used. For example splitting
strips require at least 1 frame "inside" strip. Another example is drawing, where
playhead technically doesn't intersect strip, but it is rendered, because current
frame has "duration" or "thickness" of 1 frame.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11320
2021-06-07 16:58:32 +02:00
97e363a06a Cleanup: Strip duplication code
Remove unused flag `SEQ_DUPE_ANIM` and code used by this flag.
Remove flag `SEQ_DUPE_CONTEXT` and refactor code, to split operator
logic from duplication code.
Reduce indentation level in for loop.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11318
2021-06-07 16:58:32 +02:00
7d47eea06d Fix T57397: Movies are blurred after sws_scale
Images with 4:2:2 and 4:4:4 chroma subsampling were blurred when
`SWS_FAST_BILINEAR` interpolation is set for `anim->img_convert_ctx`.

Use `SWS_BILINEAR` interpolation for all movies, as performance is
not impacted by this change.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11457
2021-06-07 16:58:32 +02:00
5dbe82f129 FFmpeg: Update proxy settings
Changes in rBce649c73446e, affected established proxy codec preset.
Presets were not working and all presets were similar to `veryfast`.
Tunes are now working too, so `fastdecode` tune can be used. I have
measured little improvement, but I tested this only on 2 machines and
I have been informed that `fastdecode` tune does influence decoding
performance for some users.

Change preset from `slow` to `veryfast` and add tune `fastdecode`

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D11454
2021-06-07 16:58:32 +02:00
9bd5dff790 FFmpeg: Fix H264 lossless render not lossless
While encoder parameters for lossless encoding are set correctly,
output is not lossless due to pixel format being set to
`AV_PIX_FMT_YUV420P` which is inherently lossy due to chroma subsampling.

This was reported in T61569 and was merged to T57397, but there were
2 bugs - one for encoding and one for decoding.

Set pixel format to `AV_PIX_FMT_YUV444P` when rendering lossless H264
files. This format isn't available in `codec->pix_fmts[0]` and it looks,
that it has to be hard-coded.

Reviewed By: sergey

Differential Revision: D11458
2021-06-07 16:58:32 +02:00
c3427196c2 Boolean exact: speedup by parallelizing a plane calculation.
This patch is from erik85, who says:
This patch makes populate_plane inside polymesh_from_trimesh_with_dissolve run in parallel.
On a test file with a boolean between two subdivided cubes (~6 million verts) this gives a 10% speed increase (49.5s to 45s) on my 6 core CPU.

Also there is an optimization of other_tri_if_manifold to skip the contains-call and get the pointer directly.
This reduces CPU time for find_patches from 5s to 2.2s on the same test file.
2021-06-07 16:58:32 +02:00
21c61092f0 Boolean exact: speedup when there are many components.
When there are many components (separate pieces of connected mesh),
a part of the algorithm to determine component containment was slow.
Using a float version of finding the nearest point on a triangle
as a prefilter sped this up enormously. A case of 25 icospheres
subdivided twice goes 11 seconds faster on my Macbook pro with this
change.
2021-06-07 16:58:32 +02:00
59ffc4945a Nodes: move some files to C++
This just moves a couple of files in `space_node` to C++ and fixes
related errors.

The goal is to be able to use C++ data structures to simplify the code.

Differential Revision: https://developer.blender.org/D11451
2021-06-07 16:58:32 +02:00
07b7158c29 Cleanup: unused variable 2021-06-07 16:58:32 +02:00
1b29d18790 Fix swapped x/y in event simulation script
Incorrect area center calculation, also correct comments.
2021-06-07 16:58:31 +02:00
f68eac3945 Fix T88732: Curve to mesh node crash with empty input curve
The mesh to curve node generated an empty curve because no edges were
selected. This commit changes that node to not add a curve in that case.

This also changes the curve to mesh node to not add a material when
no mesh was created. Even though we don't expect null curves or meshes
in this case, the change is harmless.
2021-06-07 16:58:31 +02:00
e99d523901 EEVEE: AOVs not same as cycles.
EEVEE uses hashing to sync aov names and types with the gpu.
For the type a hashed value was overridden making `decalA`
and `decalB` choose the same hash. This patches fixes this
by removing the most significant bit.
2021-06-07 16:58:31 +02:00
aa46b36a3f Revert "EEVEE: AOVs not same as cycles."
This reverts commit 730a46e87d.
2021-06-07 16:58:31 +02:00
cf84056954 EEVEE: AOVs not same as cycles.
EEVEE uses hashing to sync aov names and types with the gpu. For the type a hashed value was overridden making `decalA` and `decalB` choose the same hash. This patches fixes this by removing the most significant bit.
2021-06-07 16:58:31 +02:00
47d90d9a96 GPencil: New operator to Normalize strokes
Sometimes is required to reset the thickness or the opacity of the strokes. Actually this was done using a modifier, but this operators solves this.

Reviewed By: mendio, filedescriptor

Maniphest Tasks: T87427

Differential Revision: https://developer.blender.org/D11453
2021-06-07 16:58:31 +02:00
bbf78af3c5 Merge branch 'master' into temp-attribute-processor 2021-06-02 10:11:28 -04:00
3da0ad6bb2 add node to access iteration index 2021-05-31 11:41:51 +02:00
002e75fa24 Merge branch 'master' into temp-attribute-processor 2021-05-31 11:13:42 +02:00
427ea6e4ec create attribute node group in attribute tree 2021-05-28 12:16:59 +02:00
c1e587bc46 add initial attribute group 2021-05-28 11:28:05 +02:00
0a082f9ccd Merge branch 'master' into temp-attribute-processor 2021-05-28 10:55:42 +02:00
01321c7825 support other component types 2021-05-27 13:30:13 +02:00
abbd01aff0 support other input modes 2021-05-27 12:39:40 +02:00
40cbdf56fd fix socket recreation 2021-05-27 12:03:34 +02:00
29e5a8b200 cleanup 2021-05-27 11:27:46 +02:00
aa363a71cd improve naming 2021-05-27 11:27:30 +02:00
d42a2cfef4 Merge branch 'master' into temp-attribute-processor 2021-05-27 10:47:05 +02:00
1564743475 Merge branch 'master' into temp-attribute-processor 2021-05-27 10:42:04 +02:00
d932728ac1 initial working version 2021-05-25 18:41:45 +02:00
dcc7786f14 Merge branch 'master' into temp-attribute-processor 2021-05-25 16:58:15 +02:00
27fc7ca66c start creating network 2021-05-25 16:40:37 +02:00
9807cb0eef Merge branch 'master' into temp-attribute-processor 2021-05-25 16:30:02 +02:00
1f25ab4bb9 Merge branch 'master' into temp-attribute-processor 2021-05-25 11:38:01 +02:00
cadfba7aad support changing sockets 2021-05-25 11:13:20 +02:00
be5f911e2a add rna for group inputs 2021-05-25 09:52:57 +02:00
c37de30fdb add initial info for inputs and outputs 2021-05-24 17:53:58 +02:00
95d64038f4 show domain 2021-05-24 17:22:10 +02:00
7f32a3ddd3 start creating correct sockets 2021-05-24 17:13:20 +02:00
fcba670314 create nodes in new group 2021-05-24 17:07:18 +02:00
4fe0ef5eab fix showing menu items of wrong tree type 2021-05-24 16:57:31 +02:00
4a6a755afd support tab on attribute processor 2021-05-24 16:50:32 +02:00
64b4e66afb cleanup 2021-05-24 16:39:15 +02:00
ec77f2d11d support creating attribute processor 2021-05-24 16:36:00 +02:00
e36fe7b78f initial sockets on attribute processor 2021-05-24 16:13:50 +02:00
a795d243cb reference group in attribute processor 2021-05-24 16:07:24 +02:00
4c322f3fba initial attribute processor geometry node 2021-05-24 15:51:26 +02:00
03d31e568f add initial nodes to menu 2021-05-24 15:37:16 +02:00
1291e369f9 initial attribute nodes 2021-05-24 15:29:27 +02:00
5158 changed files with 208421 additions and 398988 deletions

View File

@@ -180,7 +180,6 @@ ForEachMacros:
- CTX_DATA_BEGIN_WITH_ID - CTX_DATA_BEGIN_WITH_ID
- DEG_OBJECT_ITER_BEGIN - DEG_OBJECT_ITER_BEGIN
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN - DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
- DRW_ENABLED_ENGINE_ITER
- DRIVER_TARGETS_LOOPER_BEGIN - DRIVER_TARGETS_LOOPER_BEGIN
- DRIVER_TARGETS_USED_LOOPER_BEGIN - DRIVER_TARGETS_USED_LOOPER_BEGIN
- FOREACH_BASE_IN_EDIT_MODE_BEGIN - FOREACH_BASE_IN_EDIT_MODE_BEGIN
@@ -268,6 +267,3 @@ ForEachMacros:
StatementMacros: StatementMacros:
- PyObject_HEAD - PyObject_HEAD
- PyObject_VAR_HEAD - PyObject_VAR_HEAD
MacroBlockBegin: "^BSDF_CLOSURE_CLASS_BEGIN$"
MacroBlockEnd: "^BSDF_CLOSURE_CLASS_END$"

View File

@@ -12,8 +12,6 @@ Checks: >
-readability-avoid-const-params-in-decls, -readability-avoid-const-params-in-decls,
-readability-simplify-boolean-expr, -readability-simplify-boolean-expr,
-readability-make-member-function-const, -readability-make-member-function-const,
-readability-suspicious-call-argument,
-readability-redundant-member-init,
-readability-misleading-indentation, -readability-misleading-indentation,
@@ -27,8 +25,6 @@ Checks: >
-bugprone-branch-clone, -bugprone-branch-clone,
-bugprone-macro-parentheses, -bugprone-macro-parentheses,
-bugprone-reserved-identifier, -bugprone-reserved-identifier,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-sizeof-expression, -bugprone-sizeof-expression,
-bugprone-integer-division, -bugprone-integer-division,
@@ -44,8 +40,7 @@ Checks: >
-modernize-pass-by-value, -modernize-pass-by-value,
# Cannot be enabled yet, because using raw string literals in tests breaks # Cannot be enabled yet, because using raw string literals in tests breaks
# the windows compiler currently. # the windows compiler currently.
-modernize-raw-string-literal, -modernize-raw-string-literal
-modernize-return-braced-init-list
CheckOptions: CheckOptions:
- key: modernize-use-default-member-init.UseAssignment - key: modernize-use-default-member-init.UseAssignment

View File

@@ -1,5 +0,0 @@
This repository is only used as a mirror of git.blender.org. Blender development happens on
https://developer.blender.org.
To get started with contributing code, please see:
https://wiki.blender.org/wiki/Process/Contributing_Code

View File

@@ -30,7 +30,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
"CMake generation for blender is not allowed within the source directory!" "CMake generation for blender is not allowed within the source directory!"
"\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:" "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:"
"\n " "\n "
"\n rm -rf CMakeCache.txt CMakeFiles" "\n rm CMakeCache.txt"
"\n cd .." "\n cd .."
"\n mkdir cmake-make" "\n mkdir cmake-make"
"\n cd cmake-make" "\n cd cmake-make"
@@ -110,10 +110,6 @@ if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW) cmake_policy(SET CMP0074 NEW)
endif() endif()
# Install CODE|SCRIPT allow the use of generator expressions.
if(POLICY CMP0087)
cmake_policy(SET CMP0087 NEW)
endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Load some macros. # Load some macros.
include(build_files/cmake/macros.cmake) include(build_files/cmake/macros.cmake)
@@ -156,15 +152,6 @@ get_blender_version()
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON) option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER) mark_as_advanced(WITH_BLENDER)
if(APPLE)
# Currently this causes a build error linking, disable.
set(WITH_BLENDER_THUMBNAILER OFF)
elseif(WIN32)
option(WITH_BLENDER_THUMBNAILER "Build \"BlendThumb.dll\" helper for Windows explorer integration" ON)
else()
option(WITH_BLENDER_THUMBNAILER "Build \"blender-thumbnailer\" thumbnail extraction utility" ON)
endif()
option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON) option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
@@ -187,13 +174,6 @@ mark_as_advanced(CPACK_OVERRIDE_PACKAGENAME)
mark_as_advanced(BUILDINFO_OVERRIDE_DATE) mark_as_advanced(BUILDINFO_OVERRIDE_DATE)
mark_as_advanced(BUILDINFO_OVERRIDE_TIME) mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16")
option(WITH_UNITY_BUILD "Enable unity build for modules that support it to improve compile times" ON)
mark_as_advanced(WITH_UNITY_BUILD)
else()
set(WITH_UNITY_BUILD OFF)
endif()
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON) 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_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_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
@@ -369,7 +349,7 @@ mark_as_advanced(WITH_SYSTEM_GLOG)
option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON) option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
# Misc # Misc
if(WIN32 OR APPLE) if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON) option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
endif() endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON) option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
@@ -404,73 +384,45 @@ if(WITH_PYTHON_INSTALL)
set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module") set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module")
mark_as_advanced(PYTHON_REQUESTS_PATH) mark_as_advanced(PYTHON_REQUESTS_PATH)
endif() endif()
option(WITH_PYTHON_INSTALL_ZSTANDARD "Copy zstandard into the blender install folder" ON)
set(PYTHON_ZSTANDARD_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'zstandard' module")
mark_as_advanced(PYTHON_ZSTANDARD_PATH)
endif() endif()
option(WITH_CPU_SIMD "Enable SIMD instruction if they're detected on the host machine" ON) option(WITH_CPU_SIMD "Enable SIMD instruction if they're detected on the host machine" ON)
mark_as_advanced(WITH_CPU_SIMD) mark_as_advanced(WITH_CPU_SIMD)
# Cycles # Cycles
option(WITH_CYCLES "Enable Cycles Render Engine" ON) option(WITH_CYCLES "Enable Cycles Render Engine" ON)
option(WITH_CYCLES_OSL "Build Cycles with OpenShadingLanguage support" ON) option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" ON) option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON) option(WITH_CYCLES_OSL "Build Cycles with OSL support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with options useful for debugging (e.g., MIS)" OFF) option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" ON)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF) option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" 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)
option(WITH_CYCLES_DEBUG_NAN "Build Cycles with additional asserts for detecting NaNs and invalid values" OFF) set(CYCLES_TEST_DEVICES CPU CACHE STRING "Run regression tests on the specified device types (CPU CUDA OPTIX OPENCL)" )
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF) 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")
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(CYCLES_CUDA_BINARIES_ARCH)
set(CYCLES_TEST_DEVICES CPU CACHE STRING "Run regression tests on the specified device types (CPU CUDA OPTIX HIP)" ) unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
option(WITH_CYCLES_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_KERNEL_ASAN)
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
mark_as_advanced(WITH_CYCLES_LOGGING) 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) mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
# NVIDIA CUDA & OptiX option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles CUDA compute support" ON)
if(NOT APPLE) option(WITH_CYCLES_DEVICE_OPTIX "Enable Cycles OptiX support" OFF)
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles NVIDIA CUDA compute support" ON) option(WITH_CYCLES_DEVICE_OPENCL "Enable Cycles OpenCL compute support" ON)
option(WITH_CYCLES_DEVICE_OPTIX "Enable Cycles NVIDIA OptiX support" ON) option(WITH_CYCLES_NETWORK "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA) mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
mark_as_advanced(WITH_CYCLES_DEVICE_OPENCL)
mark_as_advanced(WITH_CYCLES_NETWORK)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles NVIDIA CUDA binaries" OFF) option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime" ON)
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") mark_as_advanced(WITH_CUDA_DYNLOAD)
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)
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON)
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
mark_as_advanced(WITH_CUDA_DYNLOAD)
endif()
# AMD HIP
if(NOT APPLE)
if(WIN32)
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
else()
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" OFF)
endif()
option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF)
set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 CACHE STRING "AMD HIP architectures to build binaries for")
mark_as_advanced(WITH_CYCLES_DEVICE_HIP)
mark_as_advanced(CYCLES_HIP_BINARIES_ARCH)
endif()
# Apple Metal
if(APPLE)
option(WITH_CYCLES_DEVICE_METAL "Enable Cycles Apple Metal compute support" ON)
endif()
# Draw Manager
option(WITH_DRAW_DEBUG "Add extra debug capabilities to Draw Manager" OFF)
mark_as_advanced(WITH_DRAW_DEBUG)
# LLVM # LLVM
option(WITH_LLVM "Use LLVM" OFF) option(WITH_LLVM "Use LLVM" OFF)
@@ -511,10 +463,11 @@ if(WIN32)
endif() endif()
# This should be turned off when Blender enter beta/rc/release # This should be turned off when Blender enter beta/rc/release
if("${BLENDER_VERSION_CYCLE}" STREQUAL "alpha") if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR
set(WITH_EXPERIMENTAL_FEATURES ON) "${BLENDER_VERSION_CYCLE}" STREQUAL "rc")
else()
set(WITH_EXPERIMENTAL_FEATURES OFF) set(WITH_EXPERIMENTAL_FEATURES OFF)
else()
set(WITH_EXPERIMENTAL_FEATURES ON)
endif() endif()
# Unit testsing # Unit testsing
@@ -651,6 +604,12 @@ if(WIN32)
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF) option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
mark_as_advanced(WITH_WINDOWS_FIND_MODULES) 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) option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
mark_as_advanced(WINDOWS_PYTHON_DEBUG) mark_as_advanced(WINDOWS_PYTHON_DEBUG)
@@ -663,23 +622,11 @@ if(WIN32)
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON) option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
mark_as_advanced(WITH_WINDOWS_PDB) mark_as_advanced(WITH_WINDOWS_PDB)
option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" ON) option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB) mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
endif() 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) if(UNIX)
# See WITH_WINDOWS_SCCACHE for Windows. # See WITH_WINDOWS_SCCACHE for Windows.
option(WITH_COMPILER_CCACHE "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)" OFF) option(WITH_COMPILER_CCACHE "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)" OFF)
@@ -856,7 +803,7 @@ if(WITH_AUDASPACE)
endif() endif()
# Auto-enable CUDA dynload if toolkit is not found. # Auto-enable CUDA dynload if toolkit is not found.
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_CUDA AND NOT WITH_CUDA_DYNLOAD) if(NOT WITH_CUDA_DYNLOAD)
find_package(CUDA) find_package(CUDA)
if(NOT CUDA_FOUND) if(NOT CUDA_FOUND)
message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead") message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead")
@@ -864,11 +811,6 @@ if(WITH_CYCLES AND WITH_CYCLES_DEVICE_CUDA AND NOT WITH_CUDA_DYNLOAD)
endif() endif()
endif() endif()
if(WITH_CYCLES_DEVICE_HIP)
# Currently HIP must be dynamically loaded, this may change in future toolkits
set(WITH_HIP_DYNLOAD ON)
endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Check check if submodules are cloned # Check check if submodules are cloned
@@ -1086,7 +1028,7 @@ if(MSVC)
add_definitions(-D__LITTLE_ENDIAN__) add_definitions(-D__LITTLE_ENDIAN__)
# OSX-Note: as we do cross-compiling with specific set architecture, # OSX-Note: as we do cross-compiling with specific set architecture,
# endianness-detection and auto-setting is counterproductive # endianess-detection and auto-setting is counterproductive
# so we just set endianness according CMAKE_OSX_ARCHITECTURES # 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 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64)
@@ -1642,9 +1584,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter) ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall) 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_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_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_CHAR_SUBSCRIPTS -Wno-char-subscripts)
@@ -1764,26 +1703,24 @@ if(WITH_PYTHON)
elseif(WITH_PYTHON_INSTALL_REQUESTS) elseif(WITH_PYTHON_INSTALL_REQUESTS)
find_python_package(requests "") find_python_package(requests "")
endif() endif()
if(WIN32 OR APPLE)
# pass, we have this in lib/python/site-packages
elseif(WITH_PYTHON_INSTALL_ZSTANDARD)
find_python_package(zstandard "")
endif()
endif() endif()
# Select C++17 as the standard for C++ projects. if(MSVC)
set(CMAKE_CXX_STANDARD 17) string(APPEND CMAKE_CXX_FLAGS " /std:c++17")
# If C++17 is not available, downgrading to an earlier standard is NOT OK. # Make MSVC properly report the value of the __cplusplus preprocessor macro
set(CMAKE_CXX_STANDARD_REQUIRED ON) # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
# Do not enable compiler specific language extensions. # of the C++ standard chosen above
set(CMAKE_CXX_EXTENSIONS OFF) if(MSVC_VERSION GREATER 1913)
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus")
# Make MSVC properly report the value of the __cplusplus preprocessor macro endif()
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless elseif(
# of the C++ standard chosen above. CMAKE_COMPILER_IS_GNUCC OR
if(MSVC AND MSVC_VERSION GREATER 1913) CMAKE_C_COMPILER_ID MATCHES "Clang" OR
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus") CMAKE_C_COMPILER_ID MATCHES "Intel"
)
string(APPEND CMAKE_CXX_FLAGS " -std=c++17")
else()
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build")
endif() endif()
# Visual Studio has all standards it supports available by default # Visual Studio has all standards it supports available by default
@@ -1904,9 +1841,6 @@ elseif(WITH_CYCLES_STANDALONE)
if(WITH_CUDA_DYNLOAD) if(WITH_CUDA_DYNLOAD)
add_subdirectory(extern/cuew) add_subdirectory(extern/cuew)
endif() endif()
if(WITH_HIP_DYNLOAD)
add_subdirectory(extern/hipew)
endif()
if(NOT WITH_SYSTEM_GLEW) if(NOT WITH_SYSTEM_GLEW)
add_subdirectory(extern/glew) add_subdirectory(extern/glew)
endif() endif()
@@ -1981,7 +1915,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_IK_ITASC) info_cfg_option(WITH_IK_ITASC)
info_cfg_option(WITH_IK_SOLVER) info_cfg_option(WITH_IK_SOLVER)
info_cfg_option(WITH_INPUT_NDOF) info_cfg_option(WITH_INPUT_NDOF)
info_cfg_option(WITH_INPUT_IME)
info_cfg_option(WITH_INTERNATIONAL) info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_OPENCOLLADA) info_cfg_option(WITH_OPENCOLLADA)
info_cfg_option(WITH_OPENCOLORIO) info_cfg_option(WITH_OPENCOLORIO)
@@ -2041,7 +1974,6 @@ if(FIRST_RUN)
endif() endif()
info_cfg_option(WITH_PYTHON_INSTALL) info_cfg_option(WITH_PYTHON_INSTALL)
info_cfg_option(WITH_PYTHON_INSTALL_NUMPY) info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_INSTALL_ZSTANDARD)
info_cfg_option(WITH_PYTHON_MODULE) info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY) info_cfg_option(WITH_PYTHON_SAFETY)

View File

@@ -27,7 +27,7 @@
define HELP_TEXT define HELP_TEXT
Blender Convenience Targets Blender Convenience Targets
Provided for building Blender (multiple targets can be used at once). Provided for building Blender, (multiple at once can be used).
* debug: Build a debug binary. * debug: Build a debug binary.
* full: Enable all supported dependencies & options. * full: Enable all supported dependencies & options.
@@ -40,8 +40,6 @@ Blender Convenience Targets
* ninja: Use ninja build tool for faster builds. * ninja: Use ninja build tool for faster builds.
* ccache: Use ccache for faster rebuilds. * ccache: Use ccache for faster rebuilds.
Note: when passing in multiple targets their order is not important.
So for a fast build you can for e.g. run 'make lite ccache ninja'.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir. 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. Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
@@ -51,7 +49,7 @@ Other Convenience Targets
* config: Run cmake configuration tool to set build options. * config: Run cmake configuration tool to set build options.
* deps: Build library dependencies (intended only for platform maintainers). * deps: Build library dependencies (intended only for platform maintainers).
The existance of locally build dependencies overrides the pre-built dependencies from subversion. 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. These must be manually removed from '../lib/' to go back to using the pre-compiled libraries.
Project Files Project Files
@@ -65,7 +63,7 @@ Package Targets
* package_debian: Build a debian package. * package_debian: Build a debian package.
* package_pacman: Build an arch linux pacman package. * package_pacman: Build an arch linux pacman package.
* package_archive: Build an archive package. * package_archive: Build an archive package.
Testing Targets Testing Targets
Not associated with building Blender. Not associated with building Blender.
@@ -169,7 +167,7 @@ endef
# This makefile is not meant for Windows # This makefile is not meant for Windows
ifeq ($(OS),Windows_NT) 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 endif
# System Vars # System Vars
@@ -381,7 +379,7 @@ deps: .FORCE
@cmake -H"$(DEPS_SOURCE_DIR)" \ @cmake -H"$(DEPS_SOURCE_DIR)" \
-B"$(DEPS_BUILD_DIR)" \ -B"$(DEPS_BUILD_DIR)" \
-DHARVEST_TARGET=$(DEPS_INSTALL_DIR) -DHARVEST_TARGET=$(DEPS_INSTALL_DIR)
@echo @echo
@echo Building dependencies ... @echo Building dependencies ...
@@ -458,8 +456,7 @@ project_eclipse: .FORCE
check_cppcheck: .FORCE check_cppcheck: .FORCE
$(CMAKE_CONFIG) $(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \ cd "$(BUILD_DIR)" ; \
$(PYTHON) \ $(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt" "$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt" @echo "written: check_cppcheck.txt"
@@ -521,9 +518,8 @@ source_archive: .FORCE
python3 ./build_files/utils/make_source_archive.py python3 ./build_files/utils/make_source_archive.py
source_archive_complete: .FORCE source_archive_complete: .FORCE
cmake \ cmake -S "$(BLENDER_DIR)/build_files/build_environment" -B"$(BUILD_DIR)/source_archive" \
-S "$(BLENDER_DIR)/build_files/build_environment" -B"$(BUILD_DIR)/source_archive" \ -DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE) -DPACKAGE_USE_UPSTREAM_SOURCES=OFF
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE) -DPACKAGE_USE_UPSTREAM_SOURCES=OFF
# This assumes CMake is still using a default `PACKAGE_DIR` variable: # 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" python3 ./build_files/utils/make_source_archive.py --include-packages "$(BUILD_DIR)/source_archive/packages"
@@ -531,11 +527,9 @@ source_archive_complete: .FORCE
INKSCAPE_BIN?="inkscape" INKSCAPE_BIN?="inkscape"
icons: .FORCE icons: .FORCE
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \ BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py" "$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
INKSCAPE_BIN=$(INKSCAPE_BIN) \ BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py" "$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
INKSCAPE_BIN=$(INKSCAPE_BIN) \
"$(BLENDER_DIR)/release/datafiles/alert_icons_update.py"
icons_geom: .FORCE icons_geom: .FORCE
BLENDER_BIN=$(BLENDER_BIN) \ BLENDER_BIN=$(BLENDER_BIN) \
@@ -549,7 +543,7 @@ update_code: .FORCE
format: .FORCE format: .FORCE
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \ 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)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
@@ -559,9 +553,8 @@ format: .FORCE
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation. # Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
doc_py: .FORCE doc_py: .FORCE
ASAN_OPTIONS=halt_on_error=0:${ASAN_OPTIONS} \ ASAN_OPTIONS=halt_on_error=0:${ASAN_OPTIONS} \
$(BLENDER_BIN) \ $(BLENDER_BIN) --background -noaudio --factory-startup \
--background -noaudio --factory-startup \ --python doc/python_api/sphinx_doc_gen.py
--python doc/python_api/sphinx_doc_gen.py
sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out sphinx-build -b html -j $(NPROCS) doc/python_api/sphinx-in doc/python_api/sphinx-out
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'" @echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/index.html'"
@@ -570,9 +563,8 @@ doc_doxy: .FORCE
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'" @echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna: .FORCE doc_dna: .FORCE
$(BLENDER_BIN) \ $(BLENDER_BIN) --background -noaudio --factory-startup \
--background -noaudio --factory-startup \ --python doc/blender_file_format/BlendFileDnaExporter_25.py
--python doc/blender_file_format/BlendFileDnaExporter_25.py
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'" @echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man: .FORCE doc_man: .FORCE

View File

@@ -56,7 +56,6 @@ else()
endif() endif()
include(cmake/zlib.cmake) include(cmake/zlib.cmake)
include(cmake/zstd.cmake)
include(cmake/openal.cmake) include(cmake/openal.cmake)
include(cmake/png.cmake) include(cmake/png.cmake)
include(cmake/jpeg.cmake) include(cmake/jpeg.cmake)
@@ -82,11 +81,7 @@ if(UNIX)
endif() endif()
include(cmake/openimageio.cmake) include(cmake/openimageio.cmake)
include(cmake/tiff.cmake) include(cmake/tiff.cmake)
if(WIN32) include(cmake/flexbison.cmake)
include(cmake/flexbison.cmake)
elseif(UNIX AND NOT APPLE)
include(cmake/flex.cmake)
endif()
include(cmake/osl.cmake) include(cmake/osl.cmake)
include(cmake/tbb.cmake) include(cmake/tbb.cmake)
include(cmake/openvdb.cmake) include(cmake/openvdb.cmake)
@@ -169,7 +164,6 @@ endif()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake) include(cmake/libglu.cmake)
include(cmake/mesa.cmake) include(cmake/mesa.cmake)
include(cmake/wayland_protocols.cmake)
endif() endif()
include(cmake/harvest.cmake) include(cmake/harvest.cmake)

View File

@@ -87,10 +87,7 @@ download_source(LIBGLU)
download_source(MESA) download_source(MESA)
download_source(NASM) download_source(NASM)
download_source(XR_OPENXR_SDK) download_source(XR_OPENXR_SDK)
download_source(WL_PROTOCOLS)
download_source(ISPC) download_source(ISPC)
download_source(GMP) download_source(GMP)
download_source(POTRACE) download_source(POTRACE)
download_source(HARU) download_source(HARU)
download_source(ZSTD)
download_source(FLEX)

View File

@@ -30,7 +30,6 @@ if(WIN32)
--enable-w32threads --enable-w32threads
--disable-pthreads --disable-pthreads
--enable-libopenjpeg --enable-libopenjpeg
--disable-mediafoundation
) )
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(FFMPEG_EXTRA_FLAGS set(FFMPEG_EXTRA_FLAGS

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

@@ -17,7 +17,7 @@
# ***** END GPL LICENSE BLOCK ***** # ***** END GPL LICENSE BLOCK *****
######################################################################## ########################################################################
# Copy all generated files to the proper structure as blender prefers # Copy all generated files to the proper strucure as blender prefers
######################################################################## ########################################################################
if(NOT DEFINED HARVEST_TARGET) if(NOT DEFINED HARVEST_TARGET)
@@ -106,7 +106,6 @@ harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config") harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a") harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a") harvest(llvm/lib llvm/lib "libclang*.a")
harvest(llvm/lib/clang llvm/lib/clang "*.h")
if(APPLE) if(APPLE)
harvest(openmp/lib openmp/lib "*") harvest(openmp/lib openmp/lib "*")
harvest(openmp/include openmp/include "*.h") harvest(openmp/include openmp/include "*.h")
@@ -127,8 +126,6 @@ if(UNIX AND NOT APPLE)
harvest(xml2/include xml2/include "*.h") harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a") harvest(xml2/lib xml2/lib "*.a")
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
else() else()
harvest(blosc/lib openvdb/lib "*.a") harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a") harvest(xml2/lib opencollada/lib "*.a")
@@ -193,8 +190,6 @@ harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a") harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h") harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a") harvest(haru/lib haru/lib "*.a")
harvest(zstd/include zstd/include "*.h")
harvest(zstd/lib zstd/lib "*.a")
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*") harvest(libglu/lib mesa/lib "*.so*")

View File

@@ -35,7 +35,6 @@ elseif(APPLE)
else() else()
set(ISPC_EXTRA_ARGS_APPLE set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
-DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex
-DARM_ENABLED=Off -DARM_ENABLED=Off
) )
endif() endif()
@@ -44,7 +43,6 @@ elseif(UNIX)
-DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang -DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++ -DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++
-DARM_ENABLED=Off -DARM_ENABLED=Off
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
) )
endif() endif()
@@ -84,9 +82,4 @@ if(WIN32)
external_ispc external_ispc
external_flexbison external_flexbison
) )
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_ispc
external_flex
)
endif() endif()

View File

@@ -66,11 +66,7 @@ ExternalProject_Add(ll
if(MSVC) if(MSVC)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND set(LLVM_HARVEST_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/ ${HARVEST_TARGET}/llvm/ )
${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
)
else() else()
set(LLVM_HARVEST_COMMAND set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&

View File

@@ -42,7 +42,6 @@ ExternalProject_Add(nanovdb
URL_HASH ${NANOVDB_HASH_TYPE}=${NANOVDB_HASH} URL_HASH ${NANOVDB_HASH_TYPE}=${NANOVDB_HASH}
PREFIX ${BUILD_DIR}/nanovdb PREFIX ${BUILD_DIR}/nanovdb
SOURCE_SUBDIR nanovdb SOURCE_SUBDIR nanovdb
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/nanovdb/src/nanovdb < ${PATCH_DIR}/nanovdb.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanovdb ${DEFAULT_CMAKE_FLAGS} ${NANOVDB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanovdb INSTALL_DIR ${LIBDIR}/nanovdb
) )

View File

@@ -38,6 +38,7 @@ ExternalProject_Add(external_numpy
PREFIX ${BUILD_DIR}/numpy PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH} PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
LOG_BUILD 1 LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND "" INSTALL_COMMAND ""

View File

@@ -45,6 +45,7 @@ ExternalProject_Add(external_openimagedenoise
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OIDN_HASH_TYPE}=${OIDN_HASH} URL_HASH ${OIDN_HASH_TYPE}=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise PREFIX ${BUILD_DIR}/openimagedenoise
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/oidn.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS} CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimagedenoise INSTALL_DIR ${LIBDIR}/openimagedenoise
) )

View File

@@ -16,20 +16,15 @@
# #
# ***** END GPL LICENSE BLOCK ***** # ***** 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 ExternalProject_Add(external_openmp
URL file://${PACKAGE_DIR}/${OPENMP_FILE} URL file://${PACKAGE_DIR}/${OPENMP_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${OPENMP_HASH_TYPE}=${OPENMP_HASH} URL_HASH ${OPENMP_HASH_TYPE}=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp PREFIX ${BUILD_DIR}/openmp
PATCH_COMMAND ${OPENMP_PATCH_COMMAND} PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS} 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 INSTALL_DIR ${LIBDIR}/openmp
) )

View File

@@ -39,7 +39,7 @@ endif()
set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files") 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: # 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") set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages")
option(PACKAGE_USE_UPSTREAM_SOURCES "Use sources upstream to download the package sources, when OFF the blender mirror will be used" ON) option(PACKAGE_USE_UPSTREAM_SOURCES "Use soures upstream to download the package sources, when OFF the blender mirror will be used" ON)
file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR) file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR)
file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_DIR) file(TO_CMAKE_PATH ${PACKAGE_DIR} PACKAGE_DIR)

View File

@@ -20,10 +20,12 @@ 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_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_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_SIMD_FLAGS -DOIIO_NOSIMD=1 -DOIIO_SIMD=sse2)
SET(OSL_PLATFORM_FLAGS -DLINKSTATIC=ON)
else() else()
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES) set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
set(OSL_FLEX_BISON) 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_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() 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_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")
@@ -49,13 +51,12 @@ set(OSL_EXTRA_ARGS
-DOpenImageIO_ROOT=${LIBDIR}/openimageio/ -DOpenImageIO_ROOT=${LIBDIR}/openimageio/
-DOSL_BUILD_TESTS=OFF -DOSL_BUILD_TESTS=OFF
-DOSL_BUILD_MATERIALX=OFF -DOSL_BUILD_MATERIALX=OFF
-DPNG_ROOT=${LIBDIR}/png
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY} -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/ -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${OSL_FLEX_BISON} ${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES} -DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DLINKSTATIC=ON ${OSL_PLATFORM_FLAGS}
-DOSL_BUILD_PLUGINS=OFF -DOSL_BUILD_PLUGINS=OFF
-DSTOP_ON_WARNING=OFF -DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF -DUSE_LLVM_BITCODE=OFF
@@ -68,9 +69,13 @@ set(OSL_EXTRA_ARGS
${OSL_SIMD_FLAGS} ${OSL_SIMD_FLAGS}
-Dpugixml_ROOT=${LIBDIR}/pugixml -Dpugixml_ROOT=${LIBDIR}/pugixml
-DUSE_PYTHON=OFF -DUSE_PYTHON=OFF
-DCMAKE_CXX_STANDARD=14
) )
# Apple arm64 uses LLVM 11, LLVM 10+ requires C++14
if (APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
list(APPEND OSL_EXTRA_ARGS -DCMAKE_CXX_STANDARD=14)
endif()
ExternalProject_Add(external_osl ExternalProject_Add(external_osl
URL file://${PACKAGE_DIR}/${OSL_FILE} URL file://${PACKAGE_DIR}/${OSL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR} DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -88,20 +93,10 @@ add_dependencies(
ll ll
external_openexr external_openexr
external_zlib external_zlib
external_flexbison
external_openimageio external_openimageio
external_pugixml external_pugixml
) )
if(WIN32)
add_dependencies(
external_osl
external_flexbison
)
elseif(UNIX AND NOT APPLE)
add_dependencies(
external_osl
external_flex
)
endif()
if(WIN32) if(WIN32)
if(BUILD_MODE STREQUAL Release) if(BUILD_MODE STREQUAL Release)

View File

@@ -24,7 +24,7 @@ if(MSVC)
add_custom_command( add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
@@ -43,7 +43,7 @@ if(MSVC)
add_custom_command( add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python COMMAND echo packaging python
COMMAND echo this should output at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe

View File

@@ -23,7 +23,7 @@ set(PNG_EXTRA_ARGS
) )
if(BLENDER_PLATFORM_ARM) if(BLENDER_PLATFORM_ARM)
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=on -DCMAKE_SYSTEM_PROCESSOR="aarch64") set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=ON -DCMAKE_SYSTEM_PROCESSOR="aarch64")
endif() endif()
ExternalProject_Add(external_png ExternalProject_Add(external_png

View File

@@ -18,20 +18,14 @@
if(WIN32 AND BUILD_MODE STREQUAL Debug) if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug) set(SITE_PACKAGES_EXTRA --global-option build --global-option --debug)
# zstandard is determined to build and link release mode libs in a debug
# configuration, the only way to make it happy is to bend to its will
# and give it a library to link with.
set(PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib)
else()
set(PIP_CONFIGURE_COMMAND echo ".")
endif() endif()
ExternalProject_Add(external_python_site_packages ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND "" DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND} CONFIGURE_COMMAND ""
BUILD_COMMAND "" BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} --no-binary :all: 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:
) )
if(USE_PIP_NUMPY) if(USE_PIP_NUMPY)

View File

@@ -152,28 +152,35 @@ set(OPENCOLORIO_HASH 1a2e3478b6cd9a1549f24e1b2205e3f0)
set(OPENCOLORIO_HASH_TYPE MD5) set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz) set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
set(LLVM_VERSION 12.0.0) if(BLENDER_PLATFORM_ARM)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz) # Newer version required by ISPC with arm support.
set(LLVM_HASH 5a4fab4d7fc84aefffb118ac2c8a4fc0) set(LLVM_VERSION 11.0.1)
set(LLVM_HASH_TYPE MD5) set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz) set(LLVM_HASH e700af40ab83463e4e9ab0ba3708312e)
set(LLVM_HASH_TYPE MD5)
set(LLVM_FILE llvm-project-${LLVM_VERSION}.src.tar.xz)
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_VERSION 9.0.1)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf) set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
else() else()
set(OPENMP_VERSION ${LLVM_VERSION}) set(LLVM_VERSION 9.0.1)
set(OPENMP_HASH ac48ce3e4582ccb82f81ab59eb3fc9dc) set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.tar.xz)
endif() set(LLVM_HASH b4268e733dfe352960140dc07ef2efcb)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${OPENMP_VERSION}/openmp-${OPENMP_VERSION}.src.tar.xz) set(LLVM_HASH_TYPE MD5)
set(OPENMP_HASH_TYPE MD5) set(LLVM_FILE llvm-project-${LLVM_VERSION}.tar.xz)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
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(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${LLVM_VERSION}.src.tar.xz)
endif()
set(OPENIMAGEIO_VERSION 2.1.15.0)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz) set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH 3db5c5f0b3dc91597c75e5df09eb9072) set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
set(OPENIMAGEIO_HASH_TYPE MD5) set(OPENIMAGEIO_HASH_TYPE MD5)
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz) set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
@@ -183,17 +190,17 @@ set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(TIFF_HASH_TYPE MD5) set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz) set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(OSL_VERSION 1.11.14.1) set(OSL_VERSION 1.11.10.0)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz) set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 1abd7ce40481771a9fa937f19595d2f2) set(OSL_HASH dfdc23597aeef083832cbada62211756)
set(OSL_HASH_TYPE MD5) set(OSL_HASH_TYPE MD5)
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz) set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
set(PYTHON_VERSION 3.9.7) set(PYTHON_VERSION 3.9.2)
set(PYTHON_SHORT_VERSION 3.9) set(PYTHON_SHORT_VERSION 3.9)
set(PYTHON_SHORT_VERSION_NO_DOTS 39) set(PYTHON_SHORT_VERSION_NO_DOTS 39)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz) set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH fddb060b483bc01850a3f412eea1d954) set(PYTHON_HASH f0dc9000312abeb16de4eccce9a870ab)
set(PYTHON_HASH_TYPE MD5) set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz) set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
@@ -209,24 +216,23 @@ set(OPENVDB_HASH 01b490be16cc0e15c690f9a153c21461)
set(OPENVDB_HASH_TYPE MD5) set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz) set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
set(NANOVDB_GIT_UID dc37d8a631922e7bef46712947dc19b755f3e841) set(NANOVDB_GIT_UID e62f7a0bf1e27397223c61ddeaaf57edf111b77f)
set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz) set(NANOVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/${NANOVDB_GIT_UID}.tar.gz)
set(NANOVDB_HASH e7b9e863ec2f3b04ead171dec2322807) set(NANOVDB_HASH 90919510bc6ccd630fedc56f748cb199)
set(NANOVDB_HASH_TYPE MD5) set(NANOVDB_HASH_TYPE MD5)
set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz) set(NANOVDB_FILE nano-vdb-${NANOVDB_GIT_UID}.tar.gz)
set(IDNA_VERSION 3.2) set(IDNA_VERSION 2.10)
set(CHARSET_NORMALIZER_VERSION 2.0.6) set(CHARDET_VERSION 4.0.0)
set(URLLIB3_VERSION 1.26.7) set(URLLIB3_VERSION 1.26.3)
set(CERTIFI_VERSION 2021.10.8) set(CERTIFI_VERSION 2020.12.5)
set(REQUESTS_VERSION 2.26.0) set(REQUESTS_VERSION 2.25.1)
set(CYTHON_VERSION 0.29.24) set(CYTHON_VERSION 0.29.21)
set(ZSTANDARD_VERSION 0.15.2 )
set(NUMPY_VERSION 1.21.2) set(NUMPY_VERSION 1.19.5)
set(NUMPY_SHORT_VERSION 1.21) set(NUMPY_SHORT_VERSION 1.19)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip) set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 5638d5dae3ca387be562912312db842e) set(NUMPY_HASH f6a1b48717c552bbc18f1adc3cc1fe0e)
set(NUMPY_HASH_TYPE MD5) set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip) set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
@@ -364,18 +370,12 @@ set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(PUGIXML_HASH_TYPE MD5) set(PUGIXML_HASH_TYPE MD5)
set(PUGIXML_FILE pugixml-${PUGIXML_VERSION}.tar.gz) set(PUGIXML_FILE pugixml-${PUGIXML_VERSION}.tar.gz)
set(FLEXBISON_VERSION 2.5.24) set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip) set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison/win_flex_bison-${FLEXBISON_VERSION}.zip)
set(FLEXBISON_HASH 6b549d43e34ece0e8ed05af92daa31c4) set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
set(FLEXBISON_HASH_TYPE MD5) set(FLEXBISON_HASH_TYPE MD5)
set(FLEXBISON_FILE win_flex_bison-${FLEXBISON_VERSION}.zip) 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)
# Libraries to keep Python modules static on Linux. # Libraries to keep Python modules static on Linux.
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download # NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
@@ -432,9 +432,9 @@ set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a)
set(USD_HASH_TYPE MD5) set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz) set(USD_FILE usd-v${USD_VERSION}.tar.gz)
set(OIDN_VERSION 1.4.1) set(OIDN_VERSION 1.4.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz) 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 421824019becc5b664a22a2b98332bc5)
set(OIDN_HASH_TYPE MD5) set(OIDN_HASH_TYPE MD5)
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz) set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
@@ -444,10 +444,10 @@ set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(LIBGLU_HASH_TYPE MD5) set(LIBGLU_HASH_TYPE MD5)
set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz) set(LIBGLU_FILE glu-${LIBGLU_VERSION}.tar.xz)
set(MESA_VERSION 21.1.5) set(MESA_VERSION 20.3.4)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz) set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa/mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH 022c7293074aeeced2278c872db4fa693147c70f8595b076cf3f1ef81520766d) set(MESA_HASH 556338446aef8ae947a789b3e0b5e056)
set(MESA_HASH_TYPE SHA256) set(MESA_HASH_TYPE MD5)
set(MESA_FILE mesa-${MESA_VERSION}.tar.xz) set(MESA_FILE mesa-${MESA_VERSION}.tar.xz)
set(NASM_VERSION 2.15.02) set(NASM_VERSION 2.15.02)
@@ -456,23 +456,25 @@ set(NASM_HASH aded8b796c996a486a56e0515c83e414116decc3b184d88043480b32eb0a8589)
set(NASM_HASH_TYPE SHA256) set(NASM_HASH_TYPE SHA256)
set(NASM_FILE nasm-${NASM_VERSION}.tar.gz) set(NASM_FILE nasm-${NASM_VERSION}.tar.gz)
set(XR_OPENXR_SDK_VERSION 1.0.17) set(XR_OPENXR_SDK_VERSION 1.0.14)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz) 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 0df6b2fd6045423451a77ff6bc3e1a75)
set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_HASH_TYPE MD5)
set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(WL_PROTOCOLS_VERSION 1.21) if(BLENDER_PLATFORM_ARM)
set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) # Unreleased version with macOS arm support.
set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/${WL_PROTOCOLS_FILE}) set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip)
set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) set(ISPC_HASH d382fea18d01dbd0cd05d9e1ede36d7d)
set(WL_PROTOCOLS_HASH_TYPE MD5) set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip)
set(ISPC_VERSION v1.16.0) else()
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz) set(ISPC_VERSION v1.14.1)
set(ISPC_HASH 2e3abedbc0ea9aaec17d6562c632454d) set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH_TYPE MD5) set(ISPC_HASH 968fbc8dfd16a60ba4e32d2e0e03ea7a)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz) set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz)
endif()
set(GMP_VERSION 6.2.0) set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz) set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
@@ -492,11 +494,5 @@ set(HARU_HASH 4f916aa49c3069b3a10850013c507460)
set(HARU_HASH_TYPE MD5) set(HARU_HASH_TYPE MD5)
set(HARU_FILE libharu-${HARU_VERSION}.tar.gz) 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 https://github.com/DLTcollab/sse2neon.git)
set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525) set(SSE2NEON_GIT_HASH fe5ff00bb8d19b327714a3c290f3e2ce81ba3525)

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

@@ -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

@@ -68,34 +68,3 @@
+ +
return ret; return ret;
} }
--- a/libavcodec/rl.c
+++ b/libavcodec/rl.c
@@ -71,17 +71,19 @@
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));
+ av_assert0(static_size < 1500);
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);
for (q = 0; q < 32; q++) {
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 @@
rl->rl_vlc[q][i].run = run;
}
}
+ av_free(table);
}

View File

@@ -1,374 +0,0 @@
Index: nanovdb/nanovdb/NanoVDB.h
===================================================================
--- a/nanovdb/nanovdb/NanoVDB.h (revision 62751)
+++ b/nanovdb/nanovdb/NanoVDB.h (working copy)
@@ -152,8 +152,8 @@
#endif // __CUDACC_RTC__
-#ifdef __CUDACC__
-// Only define __hostdev__ when using NVIDIA CUDA compiler
+#if defined(__CUDACC__) || defined(__HIP__)
+// Only define __hostdev__ when using NVIDIA CUDA or HIP compiler
#define __hostdev__ __host__ __device__
#else
#define __hostdev__
@@ -461,7 +461,7 @@
/// Maximum floating-point values
template<typename T>
struct Maximum;
-#ifdef __CUDA_ARCH__
+#if defined(__CUDA_ARCH__) || defined(__HIP__)
template<>
struct Maximum<int>
{
@@ -1006,10 +1006,10 @@
using Vec3i = Vec3<int>;
/// @brief Return a single precision floating-point vector of this coordinate
-Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
+inline __hostdev__ Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
/// @brief Return a double precision floating-point vector of this coordinate
-Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
+inline __hostdev__ Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
// ----------------------------> Vec4 <--------------------------------------
@@ -1820,7 +1820,7 @@
}; // Map
template<typename Mat4T>
-void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
+__hostdev__ void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
{
float * mf = mMatF, *vf = mVecF;
float* mif = mInvMatF;
@@ -2170,7 +2170,7 @@
}; // Class Grid
template<typename TreeT>
-int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
+__hostdev__ int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
{
for (uint32_t i = 0, n = blindDataCount(); i < n; ++i)
if (blindMetaData(i).mSemantic == semantic)
@@ -2328,7 +2328,7 @@
}; // Tree class
template<typename RootT>
-void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
+__hostdev__ void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
{
min = this->root().valueMin();
max = this->root().valueMax();
@@ -2336,7 +2336,7 @@
template<typename RootT>
template<typename NodeT>
-const NodeT* Tree<RootT>::getNode(uint32_t i) const
+__hostdev__ const NodeT* Tree<RootT>::getNode(uint32_t i) const
{
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: unvalid node type");
NANOVDB_ASSERT(i < DataType::mCount[NodeT::LEVEL]);
@@ -2345,7 +2345,7 @@
template<typename RootT>
template<int LEVEL>
-const typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i) const
+__hostdev__ const typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i) const
{
NANOVDB_ASSERT(i < DataType::mCount[LEVEL]);
return reinterpret_cast<const TreeNodeT<LEVEL>*>(reinterpret_cast<const uint8_t*>(this) + DataType::mBytes[LEVEL]) + i;
@@ -2353,7 +2353,7 @@
template<typename RootT>
template<typename NodeT>
-NodeT* Tree<RootT>::getNode(uint32_t i)
+__hostdev__ NodeT* Tree<RootT>::getNode(uint32_t i)
{
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: invalid node type");
NANOVDB_ASSERT(i < DataType::mCount[NodeT::LEVEL]);
@@ -2362,7 +2362,7 @@
template<typename RootT>
template<int LEVEL>
-typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i)
+__hostdev__ typename TreeNode<Tree<RootT>, LEVEL>::type* Tree<RootT>::getNode(uint32_t i)
{
NANOVDB_ASSERT(i < DataType::mCount[LEVEL]);
return reinterpret_cast<TreeNodeT<LEVEL>*>(reinterpret_cast<uint8_t*>(this) + DataType::mBytes[LEVEL]) + i;
@@ -2370,7 +2370,7 @@
template<typename RootT>
template<typename NodeT>
-uint32_t Tree<RootT>::getNodeID(const NodeT& node) const
+__hostdev__ uint32_t Tree<RootT>::getNodeID(const NodeT& node) const
{
static_assert(is_same<TreeNodeT<NodeT::LEVEL>, NodeT>::value, "Tree::getNodeID: invalid node type");
const NodeT* first = reinterpret_cast<const NodeT*>(reinterpret_cast<const uint8_t*>(this) + DataType::mBytes[NodeT::LEVEL]);
@@ -2380,7 +2380,7 @@
template<typename RootT>
template<typename NodeT>
-uint32_t Tree<RootT>::getLinearOffset(const NodeT& node) const
+__hostdev__ uint32_t Tree<RootT>::getLinearOffset(const NodeT& node) const
{
return this->getNodeID(node) + DataType::mPFSum[NodeT::LEVEL];
}
@@ -3366,7 +3366,7 @@
}; // LeafNode class
template<typename ValueT, typename CoordT, template<uint32_t> class MaskT, uint32_t LOG2DIM>
-inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
+inline __hostdev__ void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
{
static_assert(LOG2DIM == 3, "LeafNode::updateBBox: only supports LOGDIM = 3!");
if (!this->isActive()) return;
Index: nanovdb/nanovdb/util/SampleFromVoxels.h
===================================================================
--- a/nanovdb/nanovdb/util/SampleFromVoxels.h (revision 62751)
+++ b/nanovdb/nanovdb/util/SampleFromVoxels.h (working copy)
@@ -22,7 +22,7 @@
#define NANOVDB_SAMPLE_FROM_VOXELS_H_HAS_BEEN_INCLUDED
// Only define __hostdev__ when compiling as NVIDIA CUDA
-#ifdef __CUDACC__
+#if defined(__CUDACC__) || defined(__HIP__)
#define __hostdev__ __host__ __device__
#else
#include <cmath> // for floor
@@ -136,7 +136,7 @@
template<typename TreeOrAccT>
template<typename Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
{
const CoordT ijk = Round<CoordT>(xyz);
if (ijk != mPos) {
@@ -147,7 +147,7 @@
}
template<typename TreeOrAccT>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
{
if (ijk != mPos) {
mPos = ijk;
@@ -158,7 +158,7 @@
template<typename TreeOrAccT>
template<typename Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
{
return mAcc.getValue(Round<CoordT>(xyz));
}
@@ -195,7 +195,7 @@
}; // TrilinearSamplerBase
template<typename TreeOrAccT>
-void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
+__hostdev__ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
{
v[0][0][0] = mAcc.getValue(ijk); // i, j, k
@@ -224,7 +224,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
+__hostdev__ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
{
#if 0
auto lerp = [](ValueT a, ValueT b, ValueT w){ return fma(w, b-a, a); };// = w*(b-a) + a
@@ -239,7 +239,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
{
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::gradient requires a floating-point type");
#if 0
@@ -270,7 +270,7 @@
}
template<typename TreeOrAccT>
-bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
+__hostdev__ bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
{
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
const bool less = v[0][0][0] < ValueT(0);
@@ -363,7 +363,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
{
this->cache(xyz);
return BaseT::sample(xyz, mVal);
@@ -370,7 +370,7 @@
}
template<typename TreeOrAccT>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
{
return ijk == mPos ? mVal[0][0][0] : BaseT::mAcc.getValue(ijk);
}
@@ -377,7 +377,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
{
this->cache(xyz);
return BaseT::gradient(xyz, mVal);
@@ -393,7 +393,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
{
CoordT ijk = Floor<CoordT>(xyz);
if (ijk != mPos) {
@@ -406,7 +406,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
{
ValueT val[2][2][2];
CoordT ijk = Floor<CoordT>(xyz);
@@ -418,7 +418,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
{
auto lerp = [](ValueT a, ValueT b, RealT w) { return a + ValueT(w) * (b - a); };
@@ -463,7 +463,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
+inline __hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
{
ValueT val[2][2][2];
CoordT ijk = Floor<CoordT>(xyz);
@@ -473,7 +473,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
{
ValueT val[2][2][2];
CoordT ijk = Floor<CoordT>(xyz);
@@ -510,7 +510,7 @@
}; // TriquadraticSamplerBase
template<typename TreeOrAccT>
-void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
+__hostdev__ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
{
CoordT p(ijk[0] - 1, 0, 0);
for (int dx = 0; dx < 3; ++dx, ++p[0]) {
@@ -526,7 +526,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
+__hostdev__ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
{
auto kernel = [](const ValueT* value, double weight)->ValueT {
return weight * (weight * (0.5f * (value[0] + value[2]) - value[1]) +
@@ -545,7 +545,7 @@
}
template<typename TreeOrAccT>
-bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
+__hostdev__ bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
{
static_assert(std::is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
const bool less = v[0][0][0] < ValueT(0);
@@ -624,7 +624,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
{
this->cache(xyz);
return BaseT::sample(xyz, mVal);
@@ -631,7 +631,7 @@
}
template<typename TreeOrAccT>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
{
return ijk == mPos ? mVal[1][1][1] : BaseT::mAcc.getValue(ijk);
}
@@ -646,7 +646,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
{
CoordT ijk = Floor<CoordT>(xyz);
if (ijk != mPos) {
@@ -657,7 +657,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
{
ValueT val[3][3][3];
CoordT ijk = Floor<CoordT>(xyz);
@@ -667,7 +667,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
{
ValueT val[3][3][3];
CoordT ijk = Floor<CoordT>(xyz);
@@ -710,7 +710,7 @@
}; // TricubicSampler
template<typename TreeOrAccT>
-void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
+__hostdev__ void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
{
auto fetch = [&](int i, int j, int k) -> ValueT& { return C[((i + 1) << 4) + ((j + 1) << 2) + k + 1]; };
@@ -929,7 +929,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
{
this->cache(xyz);
return BaseT::sample(xyz, mC);
@@ -937,7 +937,7 @@
template<typename TreeOrAccT>
template<typename RealT, template<typename...> class Vec3T>
-void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
{
CoordT ijk = Floor<CoordT>(xyz);
if (ijk != mPos) {

View File

@@ -0,0 +1,27 @@
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index ba2b1f4..b10f7df 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -2164,8 +2164,8 @@ class accelerate_info(system_info):
'accelerate' in libraries):
if intel:
args.extend(['-msse3'])
- else:
- args.extend(['-faltivec'])
+# else:
+# args.extend(['-faltivec'])
args.extend([
'-I/System/Library/Frameworks/vecLib.framework/Headers'])
link_args.extend(['-Wl,-framework', '-Wl,Accelerate'])
@@ -2174,8 +2174,8 @@ class accelerate_info(system_info):
'veclib' in libraries):
if intel:
args.extend(['-msse3'])
- else:
- args.extend(['-faltivec'])
+# else:
+# args.extend(['-faltivec'])
args.extend([
'-I/System/Library/Frameworks/vecLib.framework/Headers'])
link_args.extend(['-Wl,-framework', '-Wl,vecLib'])

View File

@@ -0,0 +1,10 @@
--- external_openimagedenoise/cmake/oidn_ispc.cmake 2021-02-15 17:29:34.000000000 +0100
+++ external_openimagedenoise/cmake/oidn_ispc.cmake2 2021-02-15 17:29:28.000000000 +0100
@@ -98,7 +98,7 @@
elseif(OIDN_ARCH STREQUAL "ARM64")
set(ISPC_ARCHITECTURE "aarch64")
if(APPLE)
- set(ISPC_TARGET_OS "--target-os=ios")
+ set(ISPC_TARGET_OS "--target-os=macos")
endif()
endif()

View File

@@ -34,3 +34,24 @@ diff -Naur orig/src/include/OpenImageIO/platform.h external_openimageio/src/incl
# include <windows.h> # include <windows.h>
#endif #endif
diff -Naur orig/src/libutil/ustring.cpp external_openimageio/src/libutil/ustring.cpp
--- orig/src/libutil/ustring.cpp 2020-05-11 05:43:52.000000000 +0200
+++ external_openimageio/src/libutil/ustring.cpp 2020-11-26 12:06:08.000000000 +0100
@@ -337,6 +337,8 @@
// the std::string to make it point to our chars! In such a case, the
// destructor will be careful not to allow a deallocation.
+ // Disable internal std::string for Apple silicon based Macs
+#if !(defined(__APPLE__) && defined(__arm64__))
#if defined(__GNUC__) && !defined(_LIBCPP_VERSION) \
&& defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI
// NEW gcc ABI
@@ -382,7 +384,7 @@
return;
}
#endif
-
+#endif
// Remaining cases - just assign the internal string. This may result
// in double allocation for the chars. If you care about that, do
// something special for your platform, much like we did for gcc and

View File

@@ -1,3 +1,18 @@
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700
+++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600
@@ -0,0 +1,11 @@
+--- src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
++++ src/cmake/flexbison.cmake 2018-08-24 10:24:03 -0600
+@@ -77,7 +77,7 @@
+ DEPENDS ${${compiler_headers}}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
+ ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
+- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
++ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
+ MAIN_DEPENDENCY ${flexsrc}
+ DEPENDS ${${compiler_headers}}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h
--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600 --- OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h 2018-05-01 16:39:02 -0600
+++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600 +++ external_osl/src/include/OSL/llvm_util.h 2018-08-25 14:05:00 -0600
@@ -48,50 +63,19 @@ diff -Naur org/CMakeLists.txt external_osl/CMakeLists.txt
set (OSL_NO_DEFAULT_TEXTURESYSTEM OFF CACHE BOOL "Do not use create a raw OIIO::TextureSystem") set (OSL_NO_DEFAULT_TEXTURESYSTEM OFF CACHE BOOL "Do not use create a raw OIIO::TextureSystem")
if (OSL_NO_DEFAULT_TEXTURESYSTEM) if (OSL_NO_DEFAULT_TEXTURESYSTEM)
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
index 990f50d69..46ef7351d 100644 index 445f6400..3d468de2 100644
--- a/CMakeLists.txt --- a/src/liboslexec/llvm_util.cpp
+++ b/CMakeLists.txt +++ b/src/liboslexec/llvm_util.cpp
@@ -252,11 +252,9 @@ install (EXPORT OSL_EXPORTED_TARGETS @@ -3430,8 +3430,9 @@ LLVM_Util::call_function (llvm::Value *func, cspan<llvm::Value *> args)
FILE ${OSL_TARGETS_EXPORT_NAME} #endif
NAMESPACE ${PROJECT_NAME}::) //llvm_gen_debug_printf (std::string("start ") + std::string(name));
#if OSL_LLVM_VERSION >= 110
- - OSL_DASSERT(llvm::isa<llvm::Function>(func));
- - llvm::Value *r = builder().CreateCall(llvm::cast<llvm::Function>(func), llvm::ArrayRef<llvm::Value *>(args.data(), args.size()));
- + llvm::Value* r = builder().CreateCall(
-osl_add_all_tests() + llvm::cast<llvm::FunctionType>(func->getType()->getPointerElementType()), func,
- + llvm::ArrayRef<llvm::Value*>(args.data(), args.size()));
+if (${PROJECT_NAME}_BUILD_TESTS AND NOT ${PROJECT_NAME}_IS_SUBPROJECT) #else
+ osl_add_all_tests() llvm::Value *r = builder().CreateCall (func, llvm::ArrayRef<llvm::Value *>(args.data(), args.size()));
+endif ()
if (NOT ${PROJECT_NAME}_IS_SUBPROJECT)
include (packaging)
diff -Naur external_osl_orig/src/cmake/externalpackages.cmake external_osl/src/cmake/externalpackages.cmake
--- external_osl_orig/src/cmake/externalpackages.cmake 2021-06-01 13:44:18 -0600
+++ external_osl/src/cmake/externalpackages.cmake 2021-06-28 07:44:32 -0600
@@ -80,6 +80,7 @@
checked_find_package (ZLIB REQUIRED) # Needed by several packages
+checked_find_package (PNG REQUIRED) # Needed since OIIO needs it
# IlmBase & OpenEXR
checked_find_package (OpenEXR REQUIRED
diff -Naur external_osl_orig/src/liboslcomp/oslcomp.cpp external_osl/src/liboslcomp/oslcomp.cpp
--- external_osl_orig/src/liboslcomp/oslcomp.cpp 2021-06-01 13:44:18 -0600
+++ external_osl/src/liboslcomp/oslcomp.cpp 2021-06-28 09:11:06 -0600
@@ -21,6 +21,13 @@
#if !defined(__STDC_CONSTANT_MACROS)
# define __STDC_CONSTANT_MACROS 1
#endif #endif
+
+// clang uses CALLBACK in its templates which causes issues if it is already defined
+#ifdef _WIN32 && defined(CALLBACK)
+# undef CALLBACK
+#endif
+
+//
#include <clang/Basic/TargetInfo.h>
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/TextDiagnosticPrinter.h>

View File

@@ -197,38 +197,3 @@ index 67ec0d15f..6dc3e85a0 100644
#else #else
#error Unknown architecture. #error Unknown architecture.
#endif #endif
diff --git a/pxr/base/arch/demangle.cpp b/pxr/base/arch/demangle.cpp
index 67ec0d15f..6dc3e85a0 100644
--- a/pxr/base/arch/demangle.cpp
+++ b/pxr/base/arch/demangle.cpp
@@ -36,6 +36,7 @@
#if (ARCH_COMPILER_GCC_MAJOR == 3 && ARCH_COMPILER_GCC_MINOR >= 1) || \
ARCH_COMPILER_GCC_MAJOR > 3 || defined(ARCH_COMPILER_CLANG)
#define _AT_LEAST_GCC_THREE_ONE_OR_CLANG
+#include <cxxabi.h>
#endif
PXR_NAMESPACE_OPEN_SCOPE
@@ -138,7 +139,6 @@
#endif
#if defined(_AT_LEAST_GCC_THREE_ONE_OR_CLANG)
-#include <cxxabi.h>
/*
* This routine doesn't work when you get to gcc3.4.
diff --git a/pxr/base/work/singularTask.h b/pxr/base/work/singularTask.h
index 67ec0d15f..6dc3e85a0 100644
--- a/pxr/base/work/singularTask.h
+++ b/pxr/base/work/singularTask.h
@@ -120,7 +120,7 @@
// case we go again to ensure the task can do whatever it
// was awakened to do. Once we successfully take the count
// to zero, we stop.
- size_t old = count;
+ std::size_t old = count;
do { _fn(); } while (
!count.compare_exchange_strong(old, 0));
});

View File

@@ -79,9 +79,6 @@ set STAGING=%BUILD_DIR%\S
rem for python module build rem for python module build
set MSSdk=1 set MSSdk=1
set DISTUTILS_USE_SDK=1 set DISTUTILS_USE_SDK=1
rem if you let pip pick its own build dirs, it'll stick it somewhere deep inside the user profile
rem and cython will refuse to link due to a path that gets too long.
set TMPDIR=c:\t\
rem for python externals source to be shared between the various archs and compilers rem for python externals source to be shared between the various archs and compilers
mkdir %BUILD_DIR%\downloads\externals mkdir %BUILD_DIR%\downloads\externals

View File

@@ -1,81 +0,0 @@
# - Find HIP compiler
#
# This module defines
# HIP_HIPCC_EXECUTABLE, the full path to the hipcc executable
# HIP_VERSION, the HIP compiler version
#
# HIP_FOUND, if the HIP toolkit is found.
#=============================================================================
# Copyright 2021 Blender Foundation.
#
# Distributed under the OSI-approved BSD 3-Clause License,
# see accompanying file BSD-3-Clause-license.txt for details.
#=============================================================================
# If HIP_ROOT_DIR was defined in the environment, use it.
if(NOT HIP_ROOT_DIR AND NOT $ENV{HIP_ROOT_DIR} STREQUAL "")
set(HIP_ROOT_DIR $ENV{HIP_ROOT_DIR})
endif()
set(_hip_SEARCH_DIRS
${HIP_ROOT_DIR}
)
find_program(HIP_HIPCC_EXECUTABLE
NAMES
hipcc
HINTS
${_hip_SEARCH_DIRS}
PATH_SUFFIXES
bin
)
if(HIP_HIPCC_EXECUTABLE AND NOT EXISTS ${HIP_HIPCC_EXECUTABLE})
message(WARNING "Cached or directly specified hipcc executable does not exist.")
set(HIP_FOUND FALSE)
elseif(HIP_HIPCC_EXECUTABLE)
set(HIP_FOUND TRUE)
set(HIP_VERSION_MAJOR 0)
set(HIP_VERSION_MINOR 0)
set(HIP_VERSION_PATCH 0)
# Get version from the output.
execute_process(COMMAND ${HIP_HIPCC_EXECUTABLE} --version
OUTPUT_VARIABLE HIP_VERSION_RAW
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Parse parts.
if(HIP_VERSION_RAW MATCHES "HIP version: .*")
# Strip the HIP prefix and get list of individual version components.
string(REGEX REPLACE
".*HIP version: ([.0-9]+).*" "\\1"
HIP_SEMANTIC_VERSION "${HIP_VERSION_RAW}")
string(REPLACE "." ";" HIP_VERSION_PARTS "${HIP_SEMANTIC_VERSION}")
list(LENGTH HIP_VERSION_PARTS NUM_HIP_VERSION_PARTS)
# Extract components into corresponding variables.
if(NUM_HIP_VERSION_PARTS GREATER 0)
list(GET HIP_VERSION_PARTS 0 HIP_VERSION_MAJOR)
endif()
if(NUM_HIP_VERSION_PARTS GREATER 1)
list(GET HIP_VERSION_PARTS 1 HIP_VERSION_MINOR)
endif()
if(NUM_HIP_VERSION_PARTS GREATER 2)
list(GET HIP_VERSION_PARTS 2 HIP_VERSION_PATCH)
endif()
# Unset temp variables.
unset(NUM_HIP_VERSION_PARTS)
unset(HIP_SEMANTIC_VERSION)
unset(HIP_VERSION_PARTS)
endif()
# Construct full semantic version.
set(HIP_VERSION "${HIP_VERSION_MAJOR}.${HIP_VERSION_MINOR}.${HIP_VERSION_PATCH}")
unset(HIP_VERSION_RAW)
else()
set(HIP_FOUND FALSE)
endif()

View File

@@ -33,23 +33,11 @@ FIND_PATH(OPTIX_INCLUDE_DIR
include include
) )
IF(EXISTS "${OPTIX_INCLUDE_DIR}/optix.h")
FILE(STRINGS "${OPTIX_INCLUDE_DIR}/optix.h" _optix_version REGEX "^#define OPTIX_VERSION[ \t].*$")
STRING(REGEX MATCHALL "[0-9]+" _optix_version ${_optix_version})
MATH(EXPR _optix_version_major "${_optix_version} / 10000")
MATH(EXPR _optix_version_minor "(${_optix_version} % 10000) / 100")
MATH(EXPR _optix_version_patch "${_optix_version} % 100")
SET(OPTIX_VERSION "${_optix_version_major}.${_optix_version_minor}.${_optix_version_patch}")
ENDIF()
# handle the QUIETLY and REQUIRED arguments and set OPTIX_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set OPTIX_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs) INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX DEFAULT_MSG
REQUIRED_VARS OPTIX_INCLUDE_DIR OPTIX_INCLUDE_DIR)
VERSION_VAR OPTIX_VERSION)
IF(OPTIX_FOUND) IF(OPTIX_FOUND)
SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR}) SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR})
@@ -57,7 +45,6 @@ ENDIF()
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
OPTIX_INCLUDE_DIR OPTIX_INCLUDE_DIR
OPTIX_VERSION
) )
UNSET(_optix_SEARCH_DIRS) UNSET(_optix_SEARCH_DIRS)

View File

@@ -1,66 +0,0 @@
# - Find Zstd library
# Find the native Zstd includes and library
# This module defines
# ZSTD_INCLUDE_DIRS, where to find zstd.h, Set when
# ZSTD_INCLUDE_DIR is found.
# ZSTD_LIBRARIES, libraries to link against to use Zstd.
# ZSTD_ROOT_DIR, The base directory to search for Zstd.
# This can also be an environment variable.
# ZSTD_FOUND, If false, do not try to use Zstd.
#
# also defined, but not for general use are
# ZSTD_LIBRARY, where to find the Zstd library.
#=============================================================================
# Copyright 2019 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If ZSTD_ROOT_DIR was defined in the environment, use it.
IF(NOT ZSTD_ROOT_DIR AND NOT $ENV{ZSTD_ROOT_DIR} STREQUAL "")
SET(ZSTD_ROOT_DIR $ENV{ZSTD_ROOT_DIR})
ENDIF()
SET(_zstd_SEARCH_DIRS
${ZSTD_ROOT_DIR}
)
FIND_PATH(ZSTD_INCLUDE_DIR
NAMES
zstd.h
HINTS
${_zstd_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(ZSTD_LIBRARY
NAMES
zstd
HINTS
${_zstd_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set ZSTD_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Zstd DEFAULT_MSG
ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
IF(ZSTD_FOUND)
SET(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
SET(ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})
ENDIF()
MARK_AS_ADVANCED(
ZSTD_INCLUDE_DIR
ZSTD_LIBRARY
)

View File

@@ -168,7 +168,7 @@ def function_parm_wash_tokens(parm):
# if tokens[-1].kind == To # if tokens[-1].kind == To
# remove trailing char # remove trailing char
if tokens[-1].kind == TokenKind.PUNCTUATION: if tokens[-1].kind == TokenKind.PUNCTUATION:
if tokens[-1].spelling in {",", ")", ";"}: if tokens[-1].spelling in (",", ")", ";"):
tokens.pop() tokens.pop()
# else: # else:
# print(tokens[-1].spelling) # print(tokens[-1].spelling)
@@ -179,7 +179,7 @@ def function_parm_wash_tokens(parm):
t_spelling = t.spelling t_spelling = t.spelling
ok = True ok = True
if t_kind == TokenKind.KEYWORD: if t_kind == TokenKind.KEYWORD:
if t_spelling in {"const", "restrict", "volatile"}: if t_spelling in ("const", "restrict", "volatile"):
ok = False ok = False
elif t_spelling.startswith("__"): elif t_spelling.startswith("__"):
ok = False # __restrict ok = False # __restrict

View File

@@ -114,7 +114,7 @@ def is_c_header(filename: str) -> bool:
def is_c(filename: str) -> bool: def is_c(filename: str) -> bool:
ext = splitext(filename)[1] ext = splitext(filename)[1]
return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl", ".metal"}) return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"})
def is_c_any(filename: str) -> bool: def is_c_any(filename: str) -> bool:

View File

@@ -8,9 +8,6 @@ IGNORE_SOURCE = (
# specific source files # specific source files
"extern/audaspace/", "extern/audaspace/",
# Use for `WIN32` only.
"source/creator/blender_launcher_win32.c",
# specific source files # specific source files
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp", "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp", "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",

View File

@@ -82,7 +82,7 @@ def create_nb_project_main():
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM") make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
make_exe_basename = os.path.basename(make_exe) make_exe_basename = os.path.basename(make_exe)
# --------------- NetBeans specific. # --------------- NB specific
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines] defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()] defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()]
@@ -180,7 +180,7 @@ def create_nb_project_main():
f.write(' </logicalFolder>\n') f.write(' </logicalFolder>\n')
f.write(' </logicalFolder>\n') f.write(' </logicalFolder>\n')
# default, but this dir is in fact not in blender dir so we can ignore it # default, but this dir is infact not in blender dir so we can ignore it
# f.write(' <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n') # f.write(' <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>\n')
f.write(r' <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n') f.write(r' <sourceFolderFilter>^(nbproject|__pycache__|.*\.py|.*\.html|.*\.blend)$</sourceFolderFilter>\n')

View File

@@ -24,7 +24,6 @@ import project_source_info
import subprocess import subprocess
import sys import sys
import os import os
import tempfile
from typing import ( from typing import (
Any, Any,
@@ -36,6 +35,7 @@ USE_QUIET = (os.environ.get("QUIET", None) is not None)
CHECKER_IGNORE_PREFIX = [ CHECKER_IGNORE_PREFIX = [
"extern", "extern",
"intern/moto",
] ]
CHECKER_BIN = "cppcheck" CHECKER_BIN = "cppcheck"
@@ -47,19 +47,13 @@ CHECKER_ARGS = [
"--max-configs=1", # speeds up execution "--max-configs=1", # speeds up execution
# "--check-config", # when includes are missing # "--check-config", # when includes are missing
"--enable=all", # if you want sixty hundred pedantic suggestions "--enable=all", # if you want sixty hundred pedantic suggestions
# Quiet output, otherwise all defines/includes are printed (overly verbose).
# Only enable this for troubleshooting (if defines are not set as expected for example).
"--quiet",
# NOTE: `--cppcheck-build-dir=<dir>` is added later as a temporary directory.
] ]
if USE_QUIET: if USE_QUIET:
CHECKER_ARGS.append("--quiet") CHECKER_ARGS.append("--quiet")
def cppcheck() -> None: def main() -> None:
source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX) source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
source_defines = project_source_info.build_defines_as_args() source_defines = project_source_info.build_defines_as_args()
@@ -84,10 +78,7 @@ def cppcheck() -> None:
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush() sys.stdout.flush()
sys.stdout.write("%s %s\n" % ( sys.stdout.write("%s " % percent_str)
percent_str,
os.path.relpath(c, project_source_info.SOURCE_DIR)
))
return subprocess.Popen(cmd) return subprocess.Popen(cmd)
@@ -99,11 +90,5 @@ def cppcheck() -> None:
print("Finished!") print("Finished!")
def main() -> None:
with tempfile.TemporaryDirectory() as temp_dir:
CHECKER_ARGS.append("--cppcheck-build-dir=" + temp_dir)
cppcheck()
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -7,6 +7,7 @@
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE) set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE) set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE) set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEBUG ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE) set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE) set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_GTESTS ON CACHE BOOL "" FORCE) set(WITH_GTESTS ON CACHE BOOL "" FORCE)

View File

@@ -29,7 +29,6 @@ set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_IME ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE) set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE) set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)

View File

@@ -9,7 +9,6 @@ set(WITH_INSTALL_PORTABLE ON CACHE BOOL "" FORCE)
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE) set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE) set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_BLENDER_THUMBNAILER OFF CACHE BOOL "" FORCE)
set(WITH_BOOST OFF CACHE BOOL "" FORCE) set(WITH_BOOST OFF CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE) set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_BULLET OFF CACHE BOOL "" FORCE) set(WITH_BULLET OFF CACHE BOOL "" FORCE)
@@ -19,6 +18,9 @@ set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE) set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE) set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE) set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_OPTIX OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE) set(WITH_DRACO OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE) set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE) set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)

View File

@@ -30,7 +30,6 @@ set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE) set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE) set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE) set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_IME ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE) set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE) set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE) set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
@@ -61,7 +60,6 @@ set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependent options # platform dependent options
if(APPLE) if(APPLE)
set(WITH_COREAUDIO ON CACHE BOOL "" FORCE) set(WITH_COREAUDIO ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEVICE_METAL ON CACHE BOOL "" FORCE)
endif() endif()
if(NOT WIN32) if(NOT WIN32)
set(WITH_JACK ON CACHE BOOL "" FORCE) set(WITH_JACK ON CACHE BOOL "" FORCE)
@@ -82,5 +80,4 @@ if(NOT APPLE)
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE) set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE) set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE) set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_HIP_BINARIES ON CACHE BOOL "" FORCE)
endif() endif()

View File

@@ -208,7 +208,7 @@ function(blender_source_group
) )
# if enabled, use the sources directories as filters. # if enabled, use the sources directories as filters.
if(IDE_GROUP_SOURCES_IN_FOLDERS) if(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
foreach(_SRC ${sources}) foreach(_SRC ${sources})
# remove ../'s # remove ../'s
get_filename_component(_SRC_DIR ${_SRC} REALPATH) get_filename_component(_SRC_DIR ${_SRC} REALPATH)
@@ -240,8 +240,8 @@ function(blender_source_group
endforeach() endforeach()
endif() endif()
# if enabled, set the FOLDER property for the projects # if enabled, set the FOLDER property for visual studio projects
if(IDE_GROUP_PROJECTS_IN_FOLDERS) if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir}) string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir}) set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
@@ -529,7 +529,7 @@ function(SETUP_LIBDIRS)
# NOTE: For all new libraries, use absolute library paths. # NOTE: For all new libraries, use absolute library paths.
# This should eventually be phased out. # This should eventually be phased out.
# APPLE platform uses full paths for linking libraries, and avoids link_directories. # APPLE plaform uses full paths for linking libraries, and avoids link_directories.
if(NOT MSVC AND NOT APPLE) if(NOT MSVC AND NOT APPLE)
link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH}) link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})

View File

@@ -257,6 +257,9 @@ if(WITH_BOOST)
if(WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
list(APPEND _boost_FIND_COMPONENTS locale) list(APPEND _boost_FIND_COMPONENTS locale)
endif() endif()
if(WITH_CYCLES_NETWORK)
list(APPEND _boost_FIND_COMPONENTS serialization)
endif()
if(WITH_OPENVDB) if(WITH_OPENVDB)
list(APPEND _boost_FIND_COMPONENTS iostreams) list(APPEND _boost_FIND_COMPONENTS iostreams)
endif() endif()
@@ -336,7 +339,7 @@ if(WITH_LLVM)
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl) set(CYCLES_OSL ${LIBDIR}/osl)
find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib) find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
@@ -356,7 +359,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
endif() endif()
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_EMBREE) if(WITH_CYCLES_EMBREE)
find_package(Embree 3.8.0 REQUIRED) find_package(Embree 3.8.0 REQUIRED)
# Increase stack size for Embree, only works for executables. # Increase stack size for Embree, only works for executables.
if(NOT WITH_PYTHON_MODULE) if(NOT WITH_PYTHON_MODULE)
@@ -401,16 +404,32 @@ endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags. # CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP) if(WITH_OPENMP)
if(CMAKE_C_COMPILER_ID MATCHES "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
# Use OpenMP from our precompiled libraries. # Use OpenMP from our precompiled libraries.
message(STATUS "Using ${LIBDIR}/openmp for OpenMP") message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
set(OPENMP_CUSTOM ON) set(OPENMP_CUSTOM ON)
set(OPENMP_FOUND ON) set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'") set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'") set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/") set(OpenMP_LINKER_FLAGS "-L'${LIBDIR}/openmp/lib' -lomp")
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib") # Copy libomp.dylib to allow executables like datatoc and tests to work.
# `@executable_path/../Resources/lib/` `LC_ID_DYLIB` is added by the deps builder.
# For single config generator datatoc, tests etc.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
)
# For multi-config generator datatoc, etc.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
)
# For multi-config generator tests.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib/libomp.dylib
)
endif() endif()
endif() endif()
@@ -438,9 +457,6 @@ if(WITH_HARU)
endif() endif()
endif() endif()
set(ZSTD_ROOT_DIR ${LIBDIR}/zstd)
find_package(Zstd REQUIRED)
if(EXISTS ${LIBDIR}) if(EXISTS ${LIBDIR})
without_system_libs_end() without_system_libs_end()
endif() endif()
@@ -464,8 +480,10 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic")
endif() endif()
# Clang has too low template depth of 128 for libmv. if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024") # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024")
endif()
# Avoid conflicts with Luxrender, and other plug-ins that may use the same # Avoid conflicts with Luxrender, and other plug-ins that may use the same
# libraries as Blender with a different version or build options. # libraries as Blender with a different version or build options.
@@ -495,15 +513,3 @@ if(WITH_COMPILER_CCACHE)
endif() endif()
endif() endif()
endif() endif()
# For binaries that are built but not installed (also not distributed) (datatoc,
# makesdna, tests, etc.), we add an rpath to the OpenMP library dir through
# CMAKE_BUILD_RPATH. This avoids having to make many copies of the dylib next to each binary.
#
# For the installed Python module and installed Blender executable, CMAKE_INSTALL_RPATH
# is modified to find the dylib in an adjacent folder. Install step puts the libraries there.
set(CMAKE_SKIP_BUILD_RPATH FALSE)
list(APPEND CMAKE_BUILD_RPATH "${OpenMP_LIBRARY_DIR}")
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/../Resources/${BLENDER_VERSION}/lib")

View File

@@ -99,7 +99,6 @@ endif()
find_package_wrapper(JPEG REQUIRED) find_package_wrapper(JPEG REQUIRED)
find_package_wrapper(PNG REQUIRED) find_package_wrapper(PNG REQUIRED)
find_package_wrapper(ZLIB REQUIRED) find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Zstd REQUIRED)
find_package_wrapper(Freetype REQUIRED) find_package_wrapper(Freetype REQUIRED)
if(WITH_PYTHON) if(WITH_PYTHON)
@@ -241,7 +240,7 @@ if(WITH_INPUT_NDOF)
endif() endif()
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation") set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT) if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
set(OSL_ROOT ${CYCLES_OSL}) set(OSL_ROOT ${CYCLES_OSL})
@@ -314,7 +313,7 @@ if(WITH_BOOST)
endif() endif()
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
set(__boost_packages filesystem regex thread date_time) set(__boost_packages filesystem regex thread date_time)
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")) if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6"))
list(APPEND __boost_packages wave) list(APPEND __boost_packages wave)
else() else()
@@ -323,6 +322,9 @@ if(WITH_BOOST)
if(WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale) list(APPEND __boost_packages locale)
endif() endif()
if(WITH_CYCLES_NETWORK)
list(APPEND __boost_packages serialization)
endif()
if(WITH_OPENVDB) if(WITH_OPENVDB)
list(APPEND __boost_packages iostreams) list(APPEND __boost_packages iostreams)
endif() endif()
@@ -400,7 +402,7 @@ if(WITH_OPENCOLORIO)
endif() endif()
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_EMBREE) if(WITH_CYCLES_EMBREE)
find_package(Embree 3.8.0 REQUIRED) find_package(Embree 3.8.0 REQUIRED)
endif() endif()

View File

@@ -27,7 +27,7 @@ if(NOT MSVC)
endif() endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang") if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_CLANG ON) set(MSVC_CLANG On)
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables") set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR}) set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
if(DEFINED MSVC_REDIST_DIR) if(DEFINED MSVC_REDIST_DIR)
@@ -53,10 +53,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif() endif()
if(WITH_WINDOWS_STRIPPED_PDB) if(WITH_WINDOWS_STRIPPED_PDB)
message(WARNING "stripped pdb not supported with clang, disabling..") message(WARNING "stripped pdb not supported with clang, disabling..")
set(WITH_WINDOWS_STRIPPED_PDB OFF) set(WITH_WINDOWS_STRIPPED_PDB Off)
endif() endif()
endif() endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
if(NOT WITH_PYTHON_MODULE) if(NOT WITH_PYTHON_MODULE)
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender) set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender)
endif() endif()
@@ -151,15 +153,15 @@ if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ") string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
else() else()
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj /Zc:inline") string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj /Zc:inline") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
endif() endif()
# X64 ASAN is available and usable on MSVC 16.9 preview 4 and up) # X64 ASAN is available and usable on MSVC 16.9 preview 4 and up)
if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG) if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828)
#set a flag so we don't have to do this comparison all the time #set a flag so we don't have to do this comparison all the time
SET(MSVC_ASAN ON) SET(MSVC_ASAN On)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address")
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO") string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO")
@@ -179,22 +181,22 @@ endif()
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND) if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
message(WARNING "Disabling sccache, sccache is not supported with msbuild") message(WARNING "Disabling sccache, sccache is not supported with msbuild")
set(WITH_WINDOWS_SCCACHE OFF) set(WITH_WINDOWS_SCCACHE Off)
endif() endif()
# Debug Symbol format # Debug Symbol format
# sccache # MSVC_ASAN # format # why # sccache # MSVC_ASAN # format # why
# ON # ON # Z7 # sccache will only play nice with Z7 # On # On # Z7 # sccache will only play nice with Z7
# ON # OFF # Z7 # sccache will only play nice with Z7 # On # Off # Z7 # sccache will only play nice with Z7
# OFF # ON # Zi # Asan will not play nice with Edit and Continue # Off # On # Zi # Asan will not play nice with Edit and Continue
# OFF # OFF # ZI # Neither asan nor sscache is enabled Edit and Continue is available # Off # Off # ZI # Neither asan nor sscache is enabled Edit and Continue is available
# Release Symbol format # Release Symbol format
# sccache # MSVC_ASAN # format # why # sccache # MSVC_ASAN # format # why
# ON # ON # Z7 # sccache will only play nice with Z7 # On # On # Z7 # sccache will only play nice with Z7
# ON # OFF # Z7 # sccache will only play nice with Z7 # On # Off # Z7 # sccache will only play nice with Z7
# OFF # ON # Zi # Asan will not play nice with Edit and Continue # Off # On # Zi # Asan will not play nice with Edit and Continue
# OFF # OFF # Zi # Edit and Continue disables some optimizations # Off # Off # Zi # Edit and Continue disables some optimizations
if(WITH_WINDOWS_SCCACHE) if(WITH_WINDOWS_SCCACHE)
@@ -215,8 +217,8 @@ else()
endif() endif()
if(WITH_WINDOWS_PDB) if(WITH_WINDOWS_PDB)
set(PDB_INFO_OVERRIDE_FLAGS "${SYMBOL_FORMAT_RELEASE}") set(PDB_INFO_OVERRIDE_FLAGS "${SYMBOL_FORMAT_RELEASE}")
set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO") set(PDB_INFO_OVERRIDE_LINKER_FLAGS "/DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
endif() endif()
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /MDd ${SYMBOL_FORMAT}") string(APPEND CMAKE_CXX_FLAGS_DEBUG " /MDd ${SYMBOL_FORMAT}")
@@ -259,7 +261,7 @@ if(NOT DEFINED LIBDIR)
else() else()
message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder") message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder")
endif() endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.30.30423) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30130)
message(STATUS "Visual Studio 2022 detected.") message(STATUS "Visual Studio 2022 detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15) set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15)
elseif(MSVC_VERSION GREATER 1919) elseif(MSVC_VERSION GREATER 1919)
@@ -288,7 +290,7 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND # Only supported in the VS IDE
"EnableMicrosoftCodeAnalysis=false" "EnableMicrosoftCodeAnalysis=false"
"EnableClangTidyCodeAnalysis=true" "EnableClangTidyCodeAnalysis=true"
) )
set(VS_CLANG_TIDY ON) set(VS_CLANG_TIDY On)
endif() endif()
# Mark libdir as system headers with a lower warn level, to resolve some warnings # Mark libdir as system headers with a lower warn level, to resolve some warnings
@@ -469,7 +471,7 @@ if(WITH_PYTHON)
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/include) set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/include)
set(PYTHON_NUMPY_INCLUDE_DIRS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/lib/site-packages/numpy/core/include) set(PYTHON_NUMPY_INCLUDE_DIRS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/lib/site-packages/numpy/core/include)
set(NUMPY_FOUND ON) set(NUMPY_FOUND On)
unset(_PYTHON_VERSION_NO_DOTS) unset(_PYTHON_VERSION_NO_DOTS)
# uncached vars # uncached vars
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
@@ -477,7 +479,7 @@ if(WITH_PYTHON)
endif() endif()
if(WITH_BOOST) if(WITH_BOOST)
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
set(boost_extra_libs wave) set(boost_extra_libs wave)
endif() endif()
if(WITH_INTERNATIONAL) if(WITH_INTERNATIONAL)
@@ -520,7 +522,7 @@ if(WITH_BOOST)
debug ${BOOST_LIBPATH}/libboost_thread-${BOOST_DEBUG_POSTFIX} debug ${BOOST_LIBPATH}/libboost_thread-${BOOST_DEBUG_POSTFIX}
debug ${BOOST_LIBPATH}/libboost_chrono-${BOOST_DEBUG_POSTFIX} debug ${BOOST_LIBPATH}/libboost_chrono-${BOOST_DEBUG_POSTFIX}
) )
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
set(BOOST_LIBRARIES ${BOOST_LIBRARIES} set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX} optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX}
debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX}) debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX})
@@ -708,7 +710,7 @@ if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib) set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_OSL) if(WITH_CYCLES_OSL)
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation") set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
set(OSL_SHADER_DIR ${CYCLES_OSL}/shaders) set(OSL_SHADER_DIR ${CYCLES_OSL}/shaders)
# Shaders have moved around a bit between OSL versions, check multiple locations # Shaders have moved around a bit between OSL versions, check multiple locations
@@ -741,7 +743,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
endif() endif()
endif() endif()
if(WITH_CYCLES AND WITH_CYCLES_EMBREE) if(WITH_CYCLES_EMBREE)
windows_find_package(Embree) windows_find_package(Embree)
if(NOT EMBREE_FOUND) if(NOT EMBREE_FOUND)
set(EMBREE_INCLUDE_DIRS ${LIBDIR}/embree/include) set(EMBREE_INCLUDE_DIRS ${LIBDIR}/embree/include)
@@ -853,18 +855,18 @@ if(WITH_GMP)
set(GMP_INCLUDE_DIRS ${LIBDIR}/gmp/include) set(GMP_INCLUDE_DIRS ${LIBDIR}/gmp/include)
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/libgmp-10.lib optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib) set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/libgmp-10.lib optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
set(GMP_ROOT_DIR ${LIBDIR}/gmp) set(GMP_ROOT_DIR ${LIBDIR}/gmp)
set(GMP_FOUND ON) set(GMP_FOUND On)
endif() endif()
if(WITH_POTRACE) if(WITH_POTRACE)
set(POTRACE_INCLUDE_DIRS ${LIBDIR}/potrace/include) set(POTRACE_INCLUDE_DIRS ${LIBDIR}/potrace/include)
set(POTRACE_LIBRARIES ${LIBDIR}/potrace/lib/potrace.lib) set(POTRACE_LIBRARIES ${LIBDIR}/potrace/lib/potrace.lib)
set(POTRACE_FOUND ON) set(POTRACE_FOUND On)
endif() endif()
if(WITH_HARU) if(WITH_HARU)
if(EXISTS ${LIBDIR}/haru) if(EXISTS ${LIBDIR}/haru)
set(HARU_FOUND ON) set(HARU_FOUND On)
set(HARU_ROOT_DIR ${LIBDIR}/haru) set(HARU_ROOT_DIR ${LIBDIR}/haru)
set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include) set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib) set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
@@ -873,6 +875,3 @@ if(WITH_HARU)
set(WITH_HARU OFF) set(WITH_HARU OFF)
endif() endif()
endif() endif()
set(ZSTD_INCLUDE_DIRS ${LIBDIR}/zstd/include)
set(ZSTD_LIBRARIES ${LIBDIR}/zstd/lib/zstd_static.lib)

View File

@@ -27,7 +27,7 @@ if(WITH_WINDOWS_BUNDLE_CRT)
# Install the CRT to the blender.crt Sub folder. # Install the CRT to the blender.crt Sub folder.
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries) install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
# Generating the manifest is a relatively expensive operation since # Generating the manifest is a relativly expensive operation since
# it is collecting an sha1 hash for every file required. so only do # it is collecting an sha1 hash for every file required. so only do
# this work when the libs have either changed or the manifest does # this work when the libs have either changed or the manifest does
# not exist yet. # not exist yet.

View File

@@ -243,9 +243,7 @@ def build_defines_as_args() -> List[str]:
# use this module. # use this module.
def queue_processes( def queue_processes(
process_funcs: Sequence[Tuple[Callable[..., subprocess.Popen[Any]], Tuple[Any, ...]]], process_funcs: Sequence[Tuple[Callable[..., subprocess.Popen[Any]], Tuple[Any, ...]]],
*,
job_total: int =-1, job_total: int =-1,
sleep: float = 0.1,
) -> None: ) -> None:
""" Takes a list of function arg pairs, each function must return a process """ Takes a list of function arg pairs, each function must return a process
""" """
@@ -273,20 +271,14 @@ def queue_processes(
if len(processes) <= job_total: if len(processes) <= job_total:
break break
time.sleep(sleep) else:
time.sleep(0.1)
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
processes.append(func(*args)) processes.append(func(*args))
# Don't return until all jobs have finished.
while 1:
processes[:] = [p for p in processes if p.poll() is None]
if not processes:
break
time.sleep(sleep)
def main() -> None: def main() -> None:
if not os.path.exists(join(CMAKE_DIR, "CMakeCache.txt")): if not os.path.exists(join(CMAKE_DIR, "CMakeCache.txt")):

View File

@@ -1,10 +1,8 @@
Pipeline Config Pipeline Config
=============== ===============
The `yaml` configuration file is used by buildbot build pipeline `update-code` step. This configuration file is used by buildbot new pipeline for the `update-code` step.
The file allows to set branches or specific commits for both git submodules and svn artifacts. Can also define various build package versions for use by build workers. Especially useful in experimental and release branches. It will soon be used by the ../utils/make_update.py script.
NOTE: Both buildbot and developers will eventually use the same configuration file.
* The configuration file is ```NOT``` used by the `../utils/make_update.py` script.
* That will implemented in the future.

View File

@@ -0,0 +1,87 @@
{
"update-code":
{
"git" :
{
"submodules":
[
{ "path": "release/scripts/addons", "branch": "master", "commit_id": "HEAD" },
{ "path": "release/scripts/addons_contrib", "branch": "master", "commit_id": "HEAD" },
{ "path": "release/datafiles/locale", "branch": "master", "commit_id": "HEAD" },
{ "path": "source/tools", "branch": "master", "commit_id": "HEAD" }
]
},
"svn":
{
"tests": { "path": "lib/tests", "branch": "trunk", "commit_id": "HEAD" },
"libraries":
{
"darwin-x86_64": { "path": "lib/darwin", "branch": "trunk", "commit_id": "HEAD" },
"darwin-arm64": { "path": "lib/darwin_arm64", "branch": "trunk", "commit_id": "HEAD" },
"linux-x86_64": { "path": "lib/linux_centos7_x86_64", "branch": "trunk", "commit_id": "HEAD" },
"windows-amd64": { "path": "lib/win64_vc15", "branch": "trunk", "commit_id": "HEAD" }
}
}
},
"buildbot":
{
"gcc":
{
"version": "9.0"
},
"sdks":
{
"optix":
{
"version": "7.1.0"
},
"cuda10":
{
"version": "10.1"
},
"cuda11":
{
"version": "11.3"
}
},
"cmake":
{
"default":
{
"version": "any",
"overrides":
{
}
},
"darwin-x86_64":
{
"overrides":
{
}
},
"darwin-arm64":
{
"overrides":
{
}
},
"linux-x86_64":
{
"overrides":
{
}
},
"windows-amd64":
{
"overrides":
{
}
}
}
}
}

View File

@@ -1,70 +0,0 @@
#
# Used by Buildbot build pipeline make_update.py script only for now
# We intended to update the make_update.py in the branches to use this file eventually
#
update-code:
git:
submodules:
- branch: master
commit_id: HEAD
path: release/scripts/addons
- branch: master
commit_id: HEAD
path: release/scripts/addons_contrib
- branch: master
commit_id: HEAD
path: release/datafiles/locale
- branch: master
commit_id: HEAD
path: source/tools
svn:
libraries:
darwin-arm64:
branch: trunk
commit_id: HEAD
path: lib/darwin_arm64
darwin-x86_64:
branch: trunk
commit_id: HEAD
path: lib/darwin
linux-x86_64:
branch: trunk
commit_id: HEAD
path: lib/linux_centos7_x86_64
windows-amd64:
branch: trunk
commit_id: HEAD
path: lib/win64_vc15
tests:
branch: trunk
commit_id: HEAD
path: lib/tests
benchmarks:
branch: trunk
commit_id: HEAD
path: lib/benchmarks
#
# Buildbot only configs
#
buildbot:
gcc:
version: '9.0.0'
cuda10:
version: '10.1.243'
cuda11:
version: '11.4.1'
optix:
version: '7.3.0'
cmake:
default:
version: any
overrides: {}
darwin-arm64:
overrides: {}
darwin-x86_64:
overrides: {}
linux-x86_64:
overrides: {}
windows-amd64:
overrides: {}

View File

@@ -31,7 +31,6 @@ def parse_arguments():
parser.add_argument("--no-submodules", action="store_true") parser.add_argument("--no-submodules", action="store_true")
parser.add_argument("--use-tests", action="store_true") parser.add_argument("--use-tests", action="store_true")
parser.add_argument("--svn-command", default="svn") parser.add_argument("--svn-command", default="svn")
parser.add_argument("--svn-branch", default=None)
parser.add_argument("--git-command", default="git") parser.add_argument("--git-command", default="git")
parser.add_argument("--use-centos-libraries", action="store_true") parser.add_argument("--use-centos-libraries", action="store_true")
return parser.parse_args() return parser.parse_args()
@@ -47,7 +46,7 @@ def svn_update(args, release_version):
svn_non_interactive = [args.svn_command, '--non-interactive'] svn_non_interactive = [args.svn_command, '--non-interactive']
lib_dirpath = os.path.join(get_blender_git_root(), '..', 'lib') lib_dirpath = os.path.join(get_blender_git_root(), '..', 'lib')
svn_url = make_utils.svn_libraries_base_url(release_version, args.svn_branch) svn_url = make_utils.svn_libraries_base_url(release_version)
# Checkout precompiled libraries # Checkout precompiled libraries
if sys.platform == 'darwin': if sys.platform == 'darwin':
@@ -171,28 +170,26 @@ def submodules_update(args, release_version, branch):
sys.stderr.write("git not found, can't update code\n") sys.stderr.write("git not found, can't update code\n")
sys.exit(1) sys.exit(1)
# Update submodules to appropriate given branch, # Update submodules to latest master or appropriate release branch.
# falling back to master if none is given and/or found in a sub-repository. if not release_version:
branch_fallback = "master" branch = "master"
if not branch:
branch = branch_fallback
submodules = [ submodules = [
("release/scripts/addons", branch, branch_fallback), ("release/scripts/addons", branch),
("release/scripts/addons_contrib", branch, branch_fallback), ("release/scripts/addons_contrib", branch),
("release/datafiles/locale", branch, branch_fallback), ("release/datafiles/locale", branch),
("source/tools", branch, branch_fallback), ("source/tools", branch),
] ]
# Initialize submodules only if needed. # Initialize submodules only if needed.
for submodule_path, submodule_branch, submodule_branch_fallback in submodules: for submodule_path, submodule_branch in submodules:
if not os.path.exists(os.path.join(submodule_path, ".git")): if not os.path.exists(os.path.join(submodule_path, ".git")):
call([args.git_command, "submodule", "update", "--init", "--recursive"]) call([args.git_command, "submodule", "update", "--init", "--recursive"])
break break
# Checkout appropriate branch and pull changes. # Checkout appropriate branch and pull changes.
skip_msg = "" skip_msg = ""
for submodule_path, submodule_branch, submodule_branch_fallback in submodules: for submodule_path, submodule_branch in submodules:
cwd = os.getcwd() cwd = os.getcwd()
try: try:
os.chdir(submodule_path) os.chdir(submodule_path)
@@ -200,20 +197,10 @@ def submodules_update(args, release_version, branch):
if msg: if msg:
skip_msg += submodule_path + " skipped: " + msg + "\n" skip_msg += submodule_path + " skipped: " + msg + "\n"
else: else:
# Find a matching branch that exists. if make_utils.git_branch(args.git_command) != submodule_branch:
call([args.git_command, "fetch", "origin"]) call([args.git_command, "fetch", "origin"])
if make_utils.git_branch_exists(args.git_command, submodule_branch): call([args.git_command, "checkout", submodule_branch])
pass call([args.git_command, "pull", "--rebase", "origin", submodule_branch])
elif make_utils.git_branch_exists(args.git_command, submodule_branch_fallback):
submodule_branch = submodule_branch_fallback
else:
submodule_branch = None
# Switch to branch and pull.
if submodule_branch:
if make_utils.git_branch(args.git_command) != submodule_branch:
call([args.git_command, "checkout", submodule_branch])
call([args.git_command, "pull", "--rebase", "origin", submodule_branch])
finally: finally:
os.chdir(cwd) os.chdir(cwd)
@@ -227,10 +214,6 @@ if __name__ == "__main__":
# Test if we are building a specific release version. # Test if we are building a specific release version.
branch = make_utils.git_branch(args.git_command) branch = make_utils.git_branch(args.git_command)
if branch == 'HEAD':
sys.stderr.write('Blender git repository is in detached HEAD state, must be in a branch\n')
sys.exit(1)
tag = make_utils.git_tag(args.git_command) tag = make_utils.git_tag(args.git_command)
release_version = make_utils.git_branch_release_version(branch, tag) release_version = make_utils.git_branch_release_version(branch, tag)

View File

@@ -8,19 +8,14 @@ import subprocess
import sys import sys
def call(cmd, exit_on_error=True, silent=False): def call(cmd, exit_on_error=True):
if not silent: print(" ".join(cmd))
print(" ".join(cmd))
# Flush to ensure correct order output on Windows. # Flush to ensure correct order output on Windows.
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
if silent: retcode = subprocess.call(cmd)
retcode = subprocess.call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
else:
retcode = subprocess.call(cmd)
if exit_on_error and retcode != 0: if exit_on_error and retcode != 0:
sys.exit(retcode) sys.exit(retcode)
return retcode return retcode
@@ -43,11 +38,6 @@ def check_output(cmd, exit_on_error=True):
return output.strip() return output.strip()
def git_branch_exists(git_command, branch):
return call([git_command, "rev-parse", "--verify", branch], exit_on_error=False, silent=True) == 0 or \
call([git_command, "rev-parse", "--verify", "remotes/origin/" + branch], exit_on_error=False, silent=True) == 0
def git_branch(git_command): def git_branch(git_command):
# Get current branch name. # Get current branch name.
try: try:
@@ -80,11 +70,9 @@ def git_branch_release_version(branch, tag):
return release_version return release_version
def svn_libraries_base_url(release_version, branch=None): def svn_libraries_base_url(release_version):
if release_version: if release_version:
svn_branch = "tags/blender-" + release_version + "-release" svn_branch = "tags/blender-" + release_version + "-release"
elif branch:
svn_branch = "branches/" + branch
else: else:
svn_branch = "trunk" svn_branch = "trunk"
return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/" return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/"

View File

@@ -1,9 +1,9 @@
echo No explicit msvc version requested, autodetecting version. echo No explicit msvc version requested, autodetecting version.
call "%~dp0\detect_msvc2019.cmd" call "%~dp0\detect_msvc2017.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2017.cmd" call "%~dp0\detect_msvc2019.cmd"
if %ERRORLEVEL% EQU 0 goto DetectionComplete if %ERRORLEVEL% EQU 0 goto DetectionComplete
call "%~dp0\detect_msvc2022.cmd" call "%~dp0\detect_msvc2022.cmd"

View File

@@ -1,34 +0,0 @@
set SOURCEDIR=%BLENDER_DIR%/doc/python_api/sphinx-in
set BUILDDIR=%BLENDER_DIR%/doc/python_api/sphinx-out
if "%BF_LANG%" == "" set BF_LANG=en
set SPHINXOPTS=-j auto -D language=%BF_LANG%
call "%~dp0\find_sphinx.cmd"
if EXIST "%SPHINX_BIN%" (
goto detect_sphinx_done
)
echo unable to locate sphinx-build, run "set sphinx_BIN=full_path_to_sphinx-build.exe"
exit /b 1
:detect_sphinx_done
call "%~dp0\find_blender.cmd"
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe"
exit /b 1
:detect_blender_done
%BLENDER_BIN% ^
--background -noaudio --factory-startup ^
--python %BLENDER_DIR%/doc/python_api/sphinx_doc_gen.py
"%SPHINX_BIN%" -b html %SPHINXOPTS% %O% %SOURCEDIR% %BUILDDIR%
:EOF

View File

@@ -1,28 +0,0 @@
REM First see if there is an environment variable set
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
REM Check the build folder next, if ninja was used there will be no
REM debug/release folder
set BLENDER_BIN=%BUILD_DIR%\bin\blender.exe
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
REM Check the release folder next
set BLENDER_BIN=%BUILD_DIR%\bin\release\blender.exe
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
REM Check the debug folder next
set BLENDER_BIN=%BUILD_DIR%\bin\debug\blender.exe
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
REM at this point, we don't know where blender is, clear the variable
set BLENDER_BIN=
:detect_blender_done

View File

@@ -3,7 +3,7 @@ for %%X in (svn.exe) do (set SVN=%%~$PATH:X)
for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X) for %%X in (cmake.exe) do (set CMAKE=%%~$PATH:X)
for %%X in (ctest.exe) do (set CTEST=%%~$PATH:X) for %%X in (ctest.exe) do (set CTEST=%%~$PATH:X)
for %%X in (git.exe) do (set GIT=%%~$PATH:X) for %%X in (git.exe) do (set GIT=%%~$PATH:X)
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\37\bin\python.exe
if NOT "%verbose%" == "" ( if NOT "%verbose%" == "" (
echo svn : "%SVN%" echo svn : "%SVN%"
echo cmake : "%CMAKE%" echo cmake : "%CMAKE%"

View File

@@ -1,21 +0,0 @@
REM First see if there is an environment variable set
if EXIST "%INKSCAPE_BIN%" (
goto detect_inkscape_done
)
REM Then see if inkscape is available in the path
for %%X in (inkscape.exe) do (set INKSCAPE_BIN=%%~$PATH:X)
if EXIST "%INKSCAPE_BIN%" (
goto detect_inkscape_done
)
REM Finally see if it is perhaps installed at the default location
set INKSCAPE_BIN=%ProgramFiles%\Inkscape\bin\inkscape.exe
if EXIST "%INKSCAPE_BIN%" (
goto detect_inkscape_done
)
REM If still not found clear the variable
set INKSCAPE_BIN=
:detect_inkscape_done

View File

@@ -1,23 +0,0 @@
REM First see if there is an environment variable set
if EXIST "%SPHINX_BIN%" (
goto detect_sphinx_done
)
REM Then see if inkscape is available in the path
for %%X in (sphinx-build.exe) do (set SPHINX_BIN=%%~$PATH:X)
if EXIST "%SPHINX_BIN%" (
goto detect_sphinx_done
)
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINX_BIN environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
REM If still not found clear the variable
set SPHINX_BIN=
:detect_sphinx_done

View File

@@ -10,7 +10,7 @@ exit /b 1
echo found clang-format in %CF_PATH% echo found clang-format in %CF_PATH%
if EXIST %PYTHON% ( if EXIST %PYTHON% (
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\37\bin\python.exe
goto detect_python_done goto detect_python_done
) )

View File

@@ -1,42 +0,0 @@
if EXIST "%PYTHON%" (
goto detect_python_done
)
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe
if EXIST %PYTHON% (
goto detect_python_done
)
echo python not found at %PYTHON%
exit /b 1
:detect_python_done
echo found python (%PYTHON%)
call "%~dp0\find_inkscape.cmd"
if EXIST "%INKSCAPE_BIN%" (
goto detect_inkscape_done
)
echo unable to locate inkscape, run "set inkscape_BIN=full_path_to_inkscape.exe"
exit /b 1
:detect_inkscape_done
call "%~dp0\find_blender.cmd"
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe"
exit /b 1
:detect_blender_done
%PYTHON% -B %BLENDER_DIR%\release\datafiles\blender_icons_update.py
%PYTHON% -B %BLENDER_DIR%\release\datafiles\prvicons_update.py
%PYTHON% -B %BLENDER_DIR%\release\datafiles\alert_icons_update.py
:EOF

View File

@@ -1,29 +0,0 @@
if EXIST %PYTHON% (
goto detect_python_done
)
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe
if EXIST %PYTHON% (
goto detect_python_done
)
echo python not found at %PYTHON%
exit /b 1
:detect_python_done
echo found python (%PYTHON%)
call "%~dp0\find_blender.cmd"
if EXIST "%BLENDER_BIN%" (
goto detect_blender_done
)
echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe"
exit /b 1
:detect_blender_done
%PYTHON% -B %BLENDER_DIR%\release\datafiles\blender_icons_geom_update.py
:EOF

View File

@@ -107,18 +107,6 @@ if NOT "%1" == "" (
set FORMAT=1 set FORMAT=1
set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9 set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9
goto EOF goto EOF
) else if "%1" == "icons" (
set ICONS=1
goto EOF
) else if "%1" == "icons_geom" (
set ICONS_GEOM=1
goto EOF
) else if "%1" == "doc_py" (
set DOC_PY=1
goto EOF
) else if "%1" == "svnfix" (
set SVN_FIX=1
goto EOF
) else ( ) else (
echo Command "%1" unknown, aborting! echo Command "%1" unknown, aborting!
goto ERR goto ERR

View File

@@ -31,6 +31,3 @@ set PYDEBUG_CMAKE_ARGS=
set FORMAT= set FORMAT=
set TEST= set TEST=
set BUILD_WITH_SCCACHE= set BUILD_WITH_SCCACHE=
set ICONS=
set ICONS_GEOM=
set DOC_PY=

View File

@@ -31,10 +31,6 @@ echo - 2019 ^(build with visual studio 2019^)
echo - 2019pre ^(build with visual studio 2019 pre-release^) echo - 2019pre ^(build with visual studio 2019 pre-release^)
echo - 2019b ^(build with visual studio 2019 Build Tools^) echo - 2019b ^(build with visual studio 2019 Build Tools^)
echo.
echo Documentation Targets ^(Not associated with building^)
echo - doc_py ^(Generate sphinx python api docs^)
echo. echo.
echo Experimental options echo Experimental options
echo - with_opengl_tests ^(enable both the render and draw opengl test suites^) echo - with_opengl_tests ^(enable both the render and draw opengl test suites^)

View File

@@ -1,26 +0,0 @@
if "%BUILD_VS_YEAR%"=="2017" set BUILD_VS_LIBDIRPOST=vc15
if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc15
if "%BUILD_VS_YEAR%"=="2022" set BUILD_VS_LIBDIRPOST=vc15
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
echo Starting cleanup in %BUILD_VS_LIBDIR%.
cd %BUILD_VS_LIBDIR%
:RETRY
"%SVN%" cleanup
"%SVN%" update
if errorlevel 1 (
set /p LibRetry= "Error during update, retry? y/n"
if /I "!LibRetry!"=="Y" (
goto RETRY
)
echo.
echo Error: Download of external libraries failed.
echo This is needed for building, please manually run 'svn cleanup' and 'svn update' in
echo %BUILD_VS_LIBDIR% , until this is resolved you CANNOT make a successful blender build
echo.
exit /b 1
)
echo Cleanup complete

View File

@@ -123,7 +123,7 @@ def Align(handle):
class BlendFile: class BlendFile:
''' '''
Reads a blendfile and store the header, all the fileblocks, and catalogue Reads a blendfile and store the header, all the fileblocks, and catalogue
structs found in the DNA fileblock structs foound in the DNA fileblock
- BlendFile.Header (BlendFileHeader instance) - BlendFile.Header (BlendFileHeader instance)
- BlendFile.Blocks (list of BlendFileBlock instances) - BlendFile.Blocks (list of BlendFileBlock instances)

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = V3.1 PROJECT_NUMBER = V3.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a

View File

@@ -6,90 +6,91 @@
* as part of the normal development process. * as part of the normal development process.
*/ */
/* TODO: other modules. /** \defgroup MEM Guarded memory (de)allocation
* - `libmv` * \ingroup intern
* - `cycles`
* - `opencolorio`
* - `opensubdiv`
* - `openvdb`
* - `quadriflow`
*/ */
/** \defgroup intern_atomic Atomic Operations /** \defgroup clog C-Logging (CLOG)
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_clog C-Logging (CLOG) /** \defgroup ctr container
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_eigen Eigen /** \defgroup iksolver iksolver
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_glew-mx GLEW with Multiple Rendering Context's /** \defgroup itasc itasc
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_iksolver Inverse Kinematics (Solver) /** \defgroup memutil memutil
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_itasc Inverse Kinematics (ITASC) /** \defgroup mikktspace mikktspace
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_libc_compat libc Compatibility For Linux /** \defgroup moto moto
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_locale Locale /** \defgroup eigen eigen
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_mantaflow Manta-Flow Fluid Simulation /** \defgroup smoke smoke
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_mem Guarded Memory (de)allocation /** \defgroup string string
* \ingroup intern */ * \ingroup intern
*/
/** \defgroup intern_memutil Memory Utilities (memutil)
* \ingroup intern */
/** \defgroup intern_mikktspace MikktSpace
* \ingroup intern */
/** \defgroup intern_numaapi NUMA (Non Uniform Memory Architecture)
* \ingroup intern */
/** \defgroup intern_rigidbody Rigid-Body C-API
* \ingroup intern */
/** \defgroup intern_sky_model Sky Model
* \ingroup intern */
/** \defgroup intern_utf_conv UTF-8/16 Conversion (utfconv)
* \ingroup intern */
/** \defgroup audaspace Audaspace /** \defgroup audaspace Audaspace
* \ingroup intern undoc * \ingroup intern undoc
* \todo add to doxygen */ * \todo add to doxygen
*/
/** \defgroup audcoreaudio Audaspace CoreAudio /** \defgroup audcoreaudio Audaspace CoreAudio
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audfx Audaspace FX /** \defgroup audfx Audaspace FX
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audopenal Audaspace OpenAL /** \defgroup audopenal Audaspace OpenAL
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audpulseaudio Audaspace PulseAudio /** \defgroup audpulseaudio Audaspace PulseAudio
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audwasapi Audaspace WASAPI /** \defgroup audwasapi Audaspace WASAPI
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audpython Audaspace Python /** \defgroup audpython Audaspace Python
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audsdl Audaspace SDL /** \defgroup audsdl Audaspace SDL
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audsrc Audaspace SRC /** \defgroup audsrc Audaspace SRC
* \ingroup audaspace */ *
* \ingroup audaspace
*/
/** \defgroup audffmpeg Audaspace FFMpeg /** \defgroup audffmpeg Audaspace FFMpeg
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audfftw Audaspace FFTW /** \defgroup audfftw Audaspace FFTW
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audjack Audaspace Jack /** \defgroup audjack Audaspace Jack
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup audsndfile Audaspace sndfile /** \defgroup audsndfile Audaspace sndfile
* \ingroup audaspace */ * \ingroup audaspace
*/
/** \defgroup GHOST GHOST API /** \defgroup GHOST GHOST API
* \ingroup intern GUI * \ingroup intern GUI

View File

@@ -5,8 +5,7 @@
/** \defgroup bmesh BMesh /** \defgroup bmesh BMesh
* \ingroup blender * \ingroup blender
*/ */
/** \defgroup compositor Compositing /** \defgroup compositor Compositing */
* \ingroup blender */
/** \defgroup python Python /** \defgroup python Python
* \ingroup blender * \ingroup blender
@@ -79,8 +78,7 @@
* \ingroup blender * \ingroup blender
*/ */
/** \defgroup data DNA, RNA and .blend access /** \defgroup data DNA, RNA and .blend access*/
* \ingroup blender */
/** \defgroup gpu GPU /** \defgroup gpu GPU
* \ingroup blender * \ingroup blender
@@ -103,12 +101,11 @@
* merged in docs. * merged in docs.
*/ */
/** /** \defgroup gui GUI */
* \defgroup gui GUI
* \ingroup blender */
/** \defgroup wm Window Manager /** \defgroup wm Window Manager
* \ingroup gui */ * \ingroup blender gui
*/
/* ================================ */ /* ================================ */
@@ -282,8 +279,7 @@
* \ingroup gui * \ingroup gui
*/ */
/** \defgroup externformats External Formats /** \defgroup externformats External Formats */
* \ingroup blender */
/** \defgroup collada COLLADA /** \defgroup collada COLLADA
* \ingroup externformats * \ingroup externformats
@@ -312,7 +308,4 @@
/* ================================ */ /* ================================ */
/** \defgroup undoc Undocumented /** \defgroup undoc Undocumented
* * \brief Modules and libraries that are still undocumented, or lacking proper integration into the doxygen system, are marked in this group. */
* \brief Modules and libraries that are still undocumented,
* or lacking proper integration into the doxygen system, are marked in this group.
*/

View File

@@ -61,7 +61,7 @@ def blender_extract_info(blender_bin: str) -> Dict[str, str]:
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
).stdout.decode(encoding="utf-8") ).stdout.decode(encoding="utf-8")
blender_version_output = subprocess.run( blender_version_ouput = subprocess.run(
[blender_bin, "--version"], [blender_bin, "--version"],
env=blender_env, env=blender_env,
check=True, check=True,
@@ -73,7 +73,7 @@ def blender_extract_info(blender_bin: str) -> Dict[str, str]:
# check for each lines prefix to ensure these aren't included. # check for each lines prefix to ensure these aren't included.
blender_version = "" blender_version = ""
blender_date = "" blender_date = ""
for l in blender_version_output.split("\n"): for l in blender_version_ouput.split("\n"):
if l.startswith("Blender "): if l.startswith("Blender "):
# Remove 'Blender' prefix. # Remove 'Blender' prefix.
blender_version = l.split(" ", 1)[1].strip() blender_version = l.split(" ", 1)[1].strip()
@@ -122,7 +122,7 @@ is a full-featured 3D application. It supports the entirety of the 3D pipeline -
'''modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing. '''modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing.
Use Blender to create 3D images and animations, films and commercials, content for games, ''' Use Blender to create 3D images and animations, films and commercials, content for games, '''
r'''architectural and industrial visualizations, and scientific visualizations. r'''architectural and industrial visualizatons, and scientific visualizations.
https://www.blender.org''') https://www.blender.org''')

View File

@@ -14,7 +14,7 @@ sound = aud.Sound('music.ogg')
# play the audio, this return a handle to control play/pause # play the audio, this return a handle to control play/pause
handle = device.play(sound) handle = device.play(sound)
# if the audio is not too big and will be used often you can buffer it # if the audio is not too big and will be used often you can buffer it
sound_buffered = aud.Sound.cache(sound) sound_buffered = aud.Sound.buffer(sound)
handle_buffered = device.play(sound_buffered) handle_buffered = device.play(sound_buffered)
# stop the sounds (otherwise they play until their ends) # stop the sounds (otherwise they play until their ends)

View File

@@ -12,7 +12,6 @@ such cases, lock the interface (Render → Lock Interface or
Below is an example of a mesh that is altered from a handler: Below is an example of a mesh that is altered from a handler:
""" """
def frame_change_pre(scene): def frame_change_pre(scene):
# A triangle that shifts in the z direction # A triangle that shifts in the z direction
zshift = scene.frame_current * 0.1 zshift = scene.frame_current * 0.1

View File

@@ -11,17 +11,15 @@ import queue
execution_queue = queue.Queue() execution_queue = queue.Queue()
# This function can safely be called in another thread. # This function can savely be called in another thread.
# The function will be executed when the timer runs the next time. # The function will be executed when the timer runs the next time.
def run_in_main_thread(function): def run_in_main_thread(function):
execution_queue.put(function) execution_queue.put(function)
def execute_queued_functions(): def execute_queued_functions():
while not execution_queue.empty(): while not execution_queue.empty():
function = execution_queue.get() function = execution_queue.get()
function() function()
return 1.0 return 1.0
bpy.app.timers.register(execute_queued_functions) bpy.app.timers.register(execute_queued_functions)

View File

@@ -31,13 +31,11 @@ owner = object()
subscribe_to = bpy.context.object.location subscribe_to = bpy.context.object.location
def msgbus_callback(*args): def msgbus_callback(*args):
# This will print: # This will print:
# Something changed! (1, 2, 3) # Something changed! (1, 2, 3)
print("Something changed!", args) print("Something changed!", args)
bpy.msgbus.subscribe_rna( bpy.msgbus.subscribe_rna(
key=subscribe_to, key=subscribe_to,
owner=owner, owner=owner,

View File

@@ -1,40 +0,0 @@
"""
This method enables conversions between Local and Pose space for bones in
the middle of updating the armature without having to update dependencies
after each change, by manually carrying updated matrices in a recursive walk.
"""
def set_pose_matrices(obj, matrix_map):
"Assign pose space matrices of all bones at once, ignoring constraints."
def rec(pbone, parent_matrix):
matrix = matrix_map[pbone.name]
## Instead of:
# pbone.matrix = matrix
# bpy.context.view_layer.update()
# Compute and assign local matrix, using the new parent matrix
if pbone.parent:
pbone.matrix_basis = pbone.bone.convert_local_to_pose(
matrix,
pbone.bone.matrix_local,
parent_matrix=parent_matrix,
parent_matrix_local=pbone.parent.bone.matrix_local,
invert=True
)
else:
pbone.matrix_basis = pbone.bone.convert_local_to_pose(
matrix,
pbone.bone.matrix_local,
invert=True
)
# Recursively process children, passing the new matrix through
for child in pbone.children:
rec(child, matrix)
# Scan all bone trees from their roots
for pbone in obj.pose.bones:
if not pbone.parent:
rec(pbone, None)

View File

@@ -44,7 +44,7 @@ class OBJECT_OT_object_to_curve(bpy.types.Operator):
# Remove temporary curve. # Remove temporary curve.
obj.to_curve_clear() obj.to_curve_clear()
# Invoke to_curve() with applying modifiers. # Invoke to_curve() with applying modifiers.
curve_with_modifiers = obj.to_curve(depsgraph, apply_modifiers=True) curve_with_modifiers = obj.to_curve(depsgraph, apply_modifiers = True)
self.report({'INFO'}, f"{len(curve_with_modifiers.splines)} splines in new curve with modifiers.") self.report({'INFO'}, f"{len(curve_with_modifiers.splines)} splines in new curve with modifiers.")
# Remove temporary curve. # Remove temporary curve.
obj.to_curve_clear() obj.to_curve_clear()

View File

@@ -42,13 +42,8 @@ class SimpleMouseOperator(bpy.types.Operator):
self.y = event.mouse_y self.y = event.mouse_y
return self.execute(context) return self.execute(context)
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(SimpleMouseOperator.bl_idname, text="Simple Mouse Operator")
# Register and add to the view menu (required to also use F3 search "Simple Mouse Operator" for quick access)
bpy.utils.register_class(SimpleMouseOperator) bpy.utils.register_class(SimpleMouseOperator)
bpy.types.VIEW3D_MT_view.append(menu_func)
# Test call to the newly defined operator. # Test call to the newly defined operator.
# Here we call the operator and invoke it, meaning that the settings are taken # Here we call the operator and invoke it, meaning that the settings are taken

View File

@@ -43,7 +43,7 @@ def menu_func(self, context):
self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator") self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
# Register and add to the file selector (required to also use F3 search "Text Export Operator" for quick access) # Register and add to the file selector
bpy.utils.register_class(ExportSomeData) bpy.utils.register_class(ExportSomeData)
bpy.types.TOPBAR_MT_file_export.append(menu_func) bpy.types.TOPBAR_MT_file_export.append(menu_func)

View File

@@ -27,14 +27,8 @@ class DialogOperator(bpy.types.Operator):
wm = context.window_manager wm = context.window_manager
return wm.invoke_props_dialog(self) return wm.invoke_props_dialog(self)
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(DialogOperator.bl_idname, text="Dialog Operator")
# Register and add to the object menu (required to also use F3 search "Dialog Operator" for quick access)
bpy.utils.register_class(DialogOperator) bpy.utils.register_class(DialogOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)
# Test call. # Test call.
bpy.ops.object.dialog_operator('INVOKE_DEFAULT') bpy.ops.object.dialog_operator('INVOKE_DEFAULT')

View File

@@ -41,13 +41,8 @@ class CustomDrawOperator(bpy.types.Operator):
col.prop(self, "my_string") col.prop(self, "my_string")
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(CustomDrawOperator.bl_idname, text="Custom Draw Operator")
# Register and add to the object menu (required to also use F3 search "Custom Draw Operator" for quick access)
bpy.utils.register_class(CustomDrawOperator) bpy.utils.register_class(CustomDrawOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)
# test call # test call
bpy.ops.object.custom_draw('INVOKE_DEFAULT') bpy.ops.object.custom_draw('INVOKE_DEFAULT')

View File

@@ -55,13 +55,8 @@ class ModalOperator(bpy.types.Operator):
context.window_manager.modal_handler_add(self) context.window_manager.modal_handler_add(self)
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(ModalOperator.bl_idname, text="Modal Operator")
# Register and add to the object menu (required to also use F3 search "Modal Operator" for quick access)
bpy.utils.register_class(ModalOperator) bpy.utils.register_class(ModalOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)
# test call # test call
bpy.ops.object.modal_operator('INVOKE_DEFAULT') bpy.ops.object.modal_operator('INVOKE_DEFAULT')

View File

@@ -31,13 +31,8 @@ class SearchEnumOperator(bpy.types.Operator):
context.window_manager.invoke_search_popup(self) context.window_manager.invoke_search_popup(self)
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(SearchEnumOperator.bl_idname, text="Search Enum Operator")
# Register and add to the object menu (required to also use F3 search "Search Enum Operator" for quick access)
bpy.utils.register_class(SearchEnumOperator) bpy.utils.register_class(SearchEnumOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)
# test call # test call
bpy.ops.object.search_enum_operator('INVOKE_DEFAULT') bpy.ops.object.search_enum_operator('INVOKE_DEFAULT')

View File

@@ -22,13 +22,8 @@ class HelloWorldOperator(bpy.types.Operator):
print("Hello World") print("Hello World")
return {'FINISHED'} return {'FINISHED'}
# Only needed if you want to add into a dynamic menu
def menu_func(self, context):
self.layout.operator(HelloWorldOperator.bl_idname, text="Hello World Operator")
# Register and add to the view menu (required to also use F3 search "Hello World Operator" for quick access)
bpy.utils.register_class(HelloWorldOperator) bpy.utils.register_class(HelloWorldOperator)
bpy.types.VIEW3D_MT_view.append(menu_func)
# test call to the newly defined operator # test call to the newly defined operator
bpy.ops.wm.hello_world() bpy.ops.wm.hello_world()

View File

@@ -21,7 +21,6 @@ batch = batch_for_shader(
}, },
) )
def draw(): def draw():
shader.bind() shader.bind()
shader.uniform_sampler("image", texture) shader.uniform_sampler("image", texture)

View File

@@ -31,8 +31,7 @@ def draw():
context.space_data, context.space_data,
context.region, context.region,
view_matrix, view_matrix,
projection_matrix, projection_matrix)
do_color_management=True)
gpu.state.depth_mask_set(False) gpu.state.depth_mask_set(False)
draw_texture_2d(offscreen.texture_color, (10, 10), WIDTH, HEIGHT) draw_texture_2d(offscreen.texture_color, (10, 10), WIDTH, HEIGHT)

View File

@@ -1,13 +1,13 @@
sphinx==4.1.1 sphinx==3.5.4
# Sphinx dependencies that are important # Sphinx dependencies that are important
Jinja2==3.0.1 Jinja2==2.11.3
Pygments==2.10.0 Pygments==2.9.0
docutils==0.17.1 docutils==0.16
snowballstemmer==2.1.0 snowballstemmer==2.1.0
babel==2.9.1 babel==2.9.1
requests==2.26.0 requests==2.25.1
# Only needed to match the theme used for the official documentation. # Only needed to match the theme used for the official documentation.
# Without this theme, the default theme will be used. # Without this theme, the default theme will be used.
sphinx_rtd_theme==1.0.0 sphinx_rtd_theme==0.5.2

View File

@@ -106,6 +106,24 @@ including advanced features.
floating-point values. These values are interpreted as a plane equation. floating-point values. These values are interpreted as a plane equation.
.. function:: glColor (red, green, blue, alpha):
B{glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub, glColor3ui, glColor3us,
glColor4b, glColor4d, glColor4f, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us,
glColor3bv, glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv,
glColor3usv, glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv,
glColor4uiv, glColor4usv}
Set a new color.
.. seealso:: `OpenGL Docs <https://khronos.org/registry/OpenGL-Refpages/gl4/html/glColor.xhtml>`__
:type red, green, blue, alpha: Depends on function prototype.
:arg red, green, blue: Specify new red, green, and blue values for the current color.
:arg alpha: Specifies a new alpha value for the current color. Included only in the
four-argument glColor4 commands. (With '4' colors only)
.. function:: glColorMask(red, green, blue, alpha): .. function:: glColorMask(red, green, blue, alpha):
Enable and disable writing of frame buffer color components Enable and disable writing of frame buffer color components

View File

@@ -728,7 +728,7 @@ Abusing RNA property callbacks
------------------------------ ------------------------------
Python-defined RNA properties can have custom callbacks. Trying to perform complex operations Python-defined RNA properties can have custom callbacks. Trying to perform complex operations
from there, like calling an operator, may work, but is not officially recommended nor supported. from there, like calling an operator, may work, but is not officialy recommended nor supported.
Main reason is that those callback should be very fast, but additionally, it may for example Main reason is that those callback should be very fast, but additionally, it may for example
create issues with undo/redo system (most operators store an history step, and editing an RNA create issues with undo/redo system (most operators store an history step, and editing an RNA

View File

@@ -254,8 +254,6 @@ else:
"gpu.shader", "gpu.shader",
"gpu.state", "gpu.state",
"gpu.texture", "gpu.texture",
"gpu.platform",
"gpu.capabilities",
"gpu_extras", "gpu_extras",
"idprop.types", "idprop.types",
"mathutils", "mathutils",
@@ -1039,21 +1037,16 @@ context_type_map = {
# context_member: (RNA type, is_collection) # context_member: (RNA type, is_collection)
"active_annotation_layer": ("GPencilLayer", False), "active_annotation_layer": ("GPencilLayer", False),
"active_bone": ("EditBone", False), "active_bone": ("EditBone", False),
"active_file": ("FileSelectEntry", False),
"active_gpencil_frame": ("GreasePencilLayer", True), "active_gpencil_frame": ("GreasePencilLayer", True),
"active_gpencil_layer": ("GPencilLayer", True), "active_gpencil_layer": ("GPencilLayer", True),
"active_node": ("Node", False), "active_node": ("Node", False),
"active_object": ("Object", False), "active_object": ("Object", False),
"active_operator": ("Operator", False), "active_operator": ("Operator", False),
"active_pose_bone": ("PoseBone", False), "active_pose_bone": ("PoseBone", False),
"active_sequence_strip": ("Sequence", False),
"active_editable_fcurve": ("FCurve", False), "active_editable_fcurve": ("FCurve", False),
"active_nla_strip": ("NlaStrip", False),
"active_nla_track": ("NlaTrack", False),
"annotation_data": ("GreasePencil", False), "annotation_data": ("GreasePencil", False),
"annotation_data_owner": ("ID", False), "annotation_data_owner": ("ID", False),
"armature": ("Armature", False), "armature": ("Armature", False),
"asset_library_ref": ("AssetLibraryReference", False),
"bone": ("Bone", False), "bone": ("Bone", False),
"brush": ("Brush", False), "brush": ("Brush", False),
"camera": ("Camera", False), "camera": ("Camera", False),
@@ -1078,7 +1071,6 @@ context_type_map = {
"gpencil_data": ("GreasePencil", False), "gpencil_data": ("GreasePencil", False),
"gpencil_data_owner": ("ID", False), "gpencil_data_owner": ("ID", False),
"hair": ("Hair", False), "hair": ("Hair", False),
"id": ("ID", False),
"image_paint_object": ("Object", False), "image_paint_object": ("Object", False),
"lattice": ("Lattice", False), "lattice": ("Lattice", False),
"light": ("Light", False), "light": ("Light", False),
@@ -1101,34 +1093,26 @@ context_type_map = {
"scene": ("Scene", False), "scene": ("Scene", False),
"sculpt_object": ("Object", False), "sculpt_object": ("Object", False),
"selectable_objects": ("Object", True), "selectable_objects": ("Object", True),
"selected_asset_files": ("FileSelectEntry", True),
"selected_bones": ("EditBone", True), "selected_bones": ("EditBone", True),
"selected_editable_actions": ("Action", True),
"selected_editable_bones": ("EditBone", True), "selected_editable_bones": ("EditBone", True),
"selected_editable_fcurves": ("FCurve", True), "selected_editable_fcurves": ("FCurve", True),
"selected_editable_keyframes": ("Keyframe", True), "selected_editable_keyframes": ("Keyframe", True),
"selected_editable_objects": ("Object", True), "selected_editable_objects": ("Object", True),
"selected_editable_sequences": ("Sequence", True), "selected_editable_sequences": ("Sequence", True),
"selected_ids": ("ID", True),
"selected_files": ("FileSelectEntry", True),
"selected_ids": ("ID", True),
"selected_nla_strips": ("NlaStrip", True), "selected_nla_strips": ("NlaStrip", True),
"selected_movieclip_tracks": ("MovieTrackingTrack", True),
"selected_nodes": ("Node", True), "selected_nodes": ("Node", True),
"selected_objects": ("Object", True), "selected_objects": ("Object", True),
"selected_pose_bones": ("PoseBone", True), "selected_pose_bones": ("PoseBone", True),
"selected_pose_bones_from_active_object": ("PoseBone", True), "selected_pose_bones_from_active_object": ("PoseBone", True),
"selected_sequences": ("Sequence", True), "selected_sequences": ("Sequence", True),
"selected_visible_actions": ("Action", True),
"selected_visible_fcurves": ("FCurve", True), "selected_visible_fcurves": ("FCurve", True),
"sequences": ("Sequence", True), "sequences": ("Sequence", True),
"soft_body": ("SoftBodyModifier", False), "soft_body": ("SoftBodyModifier", False),
"speaker": ("Speaker", False), "speaker": ("Speaker", False),
"texture": ("Texture", False), "texture": ("Texture", False),
"texture_slot": ("TextureSlot", False), "texture_slot": ("MaterialTextureSlot", False),
"texture_user": ("ID", False), "texture_user": ("ID", False),
"texture_user_property": ("Property", False), "texture_user_property": ("Property", False),
"ui_list": ("UIList", False),
"vertex_paint_object": ("Object", False), "vertex_paint_object": ("Object", False),
"view_layer": ("ViewLayer", False), "view_layer": ("ViewLayer", False),
"visible_bones": ("EditBone", True), "visible_bones": ("EditBone", True),
@@ -1210,7 +1194,6 @@ def pycontext2sphinx(basepath):
"text_context_dir", "text_context_dir",
"clip_context_dir", "clip_context_dir",
"sequencer_context_dir", "sequencer_context_dir",
"file_context_dir",
) )
unique = set() unique = set()
@@ -1226,10 +1209,7 @@ def pycontext2sphinx(basepath):
while char_array[i] is not None: while char_array[i] is not None:
member = ctypes.string_at(char_array[i]).decode(encoding="ascii") member = ctypes.string_at(char_array[i]).decode(encoding="ascii")
fw(".. data:: %s\n\n" % member) fw(".. data:: %s\n\n" % member)
try: member_type, is_seq = context_type_map[member]
member_type, is_seq = context_type_map[member]
except KeyError:
raise SystemExit("Error: context key %r not found in context_type_map; update %s" % (member, __file__)) from None
fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type)) fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type))
unique.add(member) unique.add(member)
i += 1 i += 1
@@ -2011,15 +1991,13 @@ def write_rst_importable_modules(basepath):
"blf": "Font Drawing", "blf": "Font Drawing",
"imbuf": "Image Buffer", "imbuf": "Image Buffer",
"imbuf.types": "Image Buffer Types", "imbuf.types": "Image Buffer Types",
"gpu": "GPU Module", "gpu": "GPU Shader Module",
"gpu.types": "GPU Types", "gpu.types": "GPU Types",
"gpu.matrix": "GPU Matrix Utilities", "gpu.matrix": "GPU Matrix Utilities",
"gpu.select": "GPU Select Utilities", "gpu.select": "GPU Select Utilities",
"gpu.shader": "GPU Shader Utilities", "gpu.shader": "GPU Shader Utilities",
"gpu.state": "GPU State Utilities", "gpu.state": "GPU State Utilities",
"gpu.texture": "GPU Texture Utilities", "gpu.texture": "GPU Texture Utilities",
"gpu.platform": "GPU Platform Utilities",
"gpu.capabilities": "GPU Capabilities Utilities",
"bmesh": "BMesh Module", "bmesh": "BMesh Module",
"bmesh.ops": "BMesh Operators", "bmesh.ops": "BMesh Operators",
"bmesh.types": "BMesh Types", "bmesh.types": "BMesh Types",
@@ -2256,7 +2234,7 @@ def main():
# First monkey patch to load in fake members. # First monkey patch to load in fake members.
setup_monkey_patch() setup_monkey_patch()
# Perform changes to Blender itself. # Perform changes to Blender it's self.
setup_data = setup_blender() setup_data = setup_blender()
# eventually, create the dirs # eventually, create the dirs

View File

@@ -67,12 +67,9 @@ endif()
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV) if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
add_subdirectory(clew) add_subdirectory(clew)
if((WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX) AND WITH_CUDA_DYNLOAD) if(WITH_CUDA_DYNLOAD)
add_subdirectory(cuew) add_subdirectory(cuew)
endif() endif()
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
add_subdirectory(hipew)
endif()
endif() endif()
if(WITH_GHOST_X11 AND WITH_GHOST_XDND) if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
@@ -114,5 +111,5 @@ if(WITH_MOD_FLUID)
endif() endif()
if (WITH_COMPOSITOR) if (WITH_COMPOSITOR)
add_subdirectory(smaa_areatex) add_subdirectory(smaa_areatex)
endif() endif()

View File

@@ -129,7 +129,6 @@ set(SRC
src/util/Barrier.cpp src/util/Barrier.cpp
src/util/Buffer.cpp src/util/Buffer.cpp
src/util/BufferReader.cpp src/util/BufferReader.cpp
src/util/RingBuffer.cpp
src/util/StreamBuffer.cpp src/util/StreamBuffer.cpp
src/util/ThreadPool.cpp src/util/ThreadPool.cpp
) )
@@ -153,7 +152,6 @@ set(PUBLIC_HDR
include/devices/ThreadedDevice.h include/devices/ThreadedDevice.h
include/Exception.h include/Exception.h
include/file/File.h include/file/File.h
include/file/FileInfo.h
include/file/FileManager.h include/file/FileManager.h
include/file/FileWriter.h include/file/FileWriter.h
include/file/IFileInput.h include/file/IFileInput.h
@@ -246,7 +244,6 @@ set(PUBLIC_HDR
include/util/BufferReader.h include/util/BufferReader.h
include/util/ILockable.h include/util/ILockable.h
include/util/Math3D.h include/util/Math3D.h
include/util/RingBuffer.h
include/util/StreamBuffer.h include/util/StreamBuffer.h
include/util/ThreadPool.h include/util/ThreadPool.h
) )
@@ -963,10 +960,7 @@ endif()
if(BUILD_DEMOS) if(BUILD_DEMOS)
include_directories(${INCLUDE}) include_directories(${INCLUDE})
set(DEMOS audainfo audaplay audaconvert audaremap signalgen randsounds dynamicmusic playbackmanager) set(DEMOS audaplay audaconvert audaremap signalgen randsounds dynamicmusic playbackmanager)
add_executable(audainfo demos/audainfo.cpp)
target_link_libraries(audainfo audaspace)
add_executable(audaplay demos/audaplay.cpp) add_executable(audaplay demos/audaplay.cpp)
target_link_libraries(audaplay audaspace) target_link_libraries(audaplay audaspace)

View File

@@ -39,7 +39,7 @@ extern AUD_API void AUD_PlaybackManager_free(AUD_PlaybackManager* manager);
* Plays a sound through the playback manager, adding it into a category. * Plays a sound through the playback manager, adding it into a category.
* \param manager The PlaybackManager object. * \param manager The PlaybackManager object.
* \param sound The sound to be played. * \param sound The sound to be played.
* \param catKey The key of the category into which the sound will be added. If it doesn't exist a new one will be created. * \param catKey The key of the category into which the sound will be added. If it doesn't exist a new one will be creatd.
*/ */
extern AUD_API void AUD_PlaybackManager_play(AUD_PlaybackManager* manager, AUD_Sound* sound, unsigned int catKey); extern AUD_API void AUD_PlaybackManager_play(AUD_PlaybackManager* manager, AUD_Sound* sound, unsigned int catKey);

View File

@@ -94,40 +94,6 @@ AUD_API int AUD_Sound_getLength(AUD_Sound* sound)
return (*sound)->createReader()->getLength(); return (*sound)->createReader()->getLength();
} }
AUD_API int AUD_Sound_getFileStreams(AUD_Sound* sound, AUD_StreamInfo **stream_infos)
{
assert(sound);
std::shared_ptr<File> file = std::dynamic_pointer_cast<File>(*sound);
if(file)
{
try
{
auto streams = file->queryStreams();
size_t size = sizeof(AUD_StreamInfo) * streams.size();
if(!size)
{
*stream_infos = nullptr;
return 0;
}
*stream_infos = reinterpret_cast<AUD_StreamInfo*>(std::malloc(size));
std::memcpy(*stream_infos, streams.data(), size);
return streams.size();
}
catch(Exception&)
{
}
}
*stream_infos = nullptr;
return 0;
}
AUD_API sample_t* AUD_Sound_data(AUD_Sound* sound, int* length, AUD_Specs* specs) AUD_API sample_t* AUD_Sound_data(AUD_Sound* sound, int* length, AUD_Specs* specs)
{ {
assert(sound); assert(sound);
@@ -286,12 +252,6 @@ AUD_API AUD_Sound* AUD_Sound_bufferFile(unsigned char* buffer, int size)
return new AUD_Sound(new File(buffer, size)); return new AUD_Sound(new File(buffer, size));
} }
AUD_API AUD_Sound* AUD_Sound_bufferFileStream(unsigned char* buffer, int size, int stream)
{
assert(buffer);
return new AUD_Sound(new File(buffer, size, stream));
}
AUD_API AUD_Sound* AUD_Sound_cache(AUD_Sound* sound) AUD_API AUD_Sound* AUD_Sound_cache(AUD_Sound* sound)
{ {
assert(sound); assert(sound);
@@ -312,12 +272,6 @@ AUD_API AUD_Sound* AUD_Sound_file(const char* filename)
return new AUD_Sound(new File(filename)); return new AUD_Sound(new File(filename));
} }
AUD_API AUD_Sound* AUD_Sound_fileStream(const char* filename, int stream)
{
assert(filename);
return new AUD_Sound(new File(filename, stream));
}
AUD_API AUD_Sound* AUD_Sound_sawtooth(float frequency, AUD_SampleRate rate) AUD_API AUD_Sound* AUD_Sound_sawtooth(float frequency, AUD_SampleRate rate)
{ {
return new AUD_Sound(new Sawtooth(frequency, rate)); return new AUD_Sound(new Sawtooth(frequency, rate));

View File

@@ -36,15 +36,7 @@ extern AUD_API AUD_Specs AUD_Sound_getSpecs(AUD_Sound* sound);
* \return The length of the sound in samples. * \return The length of the sound in samples.
* \note This function creates a reader from the sound and deletes it again. * \note This function creates a reader from the sound and deletes it again.
*/ */
extern AUD_API int AUD_Sound_getLength(AUD_Sound* sound); extern AUD_API int AUD_getLength(AUD_Sound* sound);
/**
* Retrieves the stream infos of a sound file.
* \param sound The sound to retrieve from which must be a file sound.
* \param infos A pointer to a AUD_StreamInfo array that will be allocated and must afterwards be freed by the caller.
* \return The number of items in the infos array.
*/
extern AUD_API int AUD_Sound_getFileStreams(AUD_Sound* sound, AUD_StreamInfo** stream_infos);
/** /**
* Reads a sound's samples into memory. * Reads a sound's samples into memory.
@@ -97,15 +89,6 @@ extern AUD_API AUD_Sound* AUD_Sound_buffer(sample_t* data, int length, AUD_Specs
*/ */
extern AUD_API AUD_Sound* AUD_Sound_bufferFile(unsigned char* buffer, int size); extern AUD_API AUD_Sound* AUD_Sound_bufferFile(unsigned char* buffer, int size);
/**
* Loads a sound file from a memory buffer.
* \param buffer The buffer which contains the sound file.
* \param size The size of the buffer.
* \param stream The index of the audio stream within the file if it contains multiple audio streams.
* \return A handle of the sound file.
*/
extern AUD_API AUD_Sound* AUD_Sound_bufferFileStream(unsigned char* buffer, int size, int stream);
/** /**
* Caches a sound into a memory buffer. * Caches a sound into a memory buffer.
* \param sound The sound to cache. * \param sound The sound to cache.
@@ -120,14 +103,6 @@ extern AUD_API AUD_Sound* AUD_Sound_cache(AUD_Sound* sound);
*/ */
extern AUD_API AUD_Sound* AUD_Sound_file(const char* filename); extern AUD_API AUD_Sound* AUD_Sound_file(const char* filename);
/**
* Loads a sound file.
* \param filename The filename of the sound file.
* \param stream The index of the audio stream within the file if it contains multiple audio streams.
* \return A handle of the sound file.
*/
extern AUD_API AUD_Sound* AUD_Sound_fileStream(const char* filename, int stream);
/** /**
* Creates a sawtooth sound. * Creates a sawtooth sound.
* \param frequency The frequency of the generated sawtooth sound. * \param frequency The frequency of the generated sawtooth sound.

View File

@@ -107,7 +107,7 @@ AUD_API AUD_SoundInfo AUD_getInfo(AUD_Sound* sound)
AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float high, AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float high,
float attack, float release, float threshold, float attack, float release, float threshold,
int accumulate, int additive, int square, int accumulate, int additive, int square,
float sthreshold, double samplerate, int* length, int stream) float sthreshold, double samplerate, int* length)
{ {
Buffer buffer; Buffer buffer;
DeviceSpecs specs; DeviceSpecs specs;
@@ -115,7 +115,7 @@ AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float high,
specs.rate = (SampleRate)samplerate; specs.rate = (SampleRate)samplerate;
std::shared_ptr<ISound> sound; std::shared_ptr<ISound> sound;
std::shared_ptr<ISound> file = std::shared_ptr<ISound>(new File(filename, stream)); std::shared_ptr<ISound> file = std::shared_ptr<ISound>(new File(filename));
int position = 0; int position = 0;
@@ -245,7 +245,7 @@ AUD_API int AUD_readSound(AUD_Sound* sound, float* buffer, int length, int sampl
buffer[i * 3] = min; buffer[i * 3] = min;
buffer[i * 3 + 1] = max; buffer[i * 3 + 1] = max;
buffer[i * 3 + 2] = std::sqrt(power / len); buffer[i * 3 + 2] = sqrt(power) / len;
if(overallmax < max) if(overallmax < max)
overallmax = max; overallmax = max;

View File

@@ -37,7 +37,7 @@ extern AUD_API float* AUD_readSoundBuffer(const char* filename, float low, float
float attack, float release, float threshold, float attack, float release, float threshold,
int accumulate, int additive, int square, int accumulate, int additive, int square,
float sthreshold, double samplerate, float sthreshold, double samplerate,
int* length, int stream); int* length);
/** /**
* Pauses a playing sound after a specific amount of time. * Pauses a playing sound after a specific amount of time.

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