1
1

Compare commits

...

430 Commits

Author SHA1 Message Date
32432d91bb Pydoc: Fix multiple bpy.type modules 2018-05-26 17:51:39 -04:00
cd46b356a5 Pydocs: Expand bge.contraint docs
Takes information from the manual and dumps it here.
2018-05-26 17:51:22 -04:00
274f382616 PyDoc: Merge manual docs for bge.texture
https://docs.blender.org/manual/en/dev/game_engine/python_api/videotexture.html

Had a few things that this file did not while this file having things the other did not.
To fix, I merged both documents into the python api.
2018-05-26 17:50:58 -04:00
f4dc9f9d68 Fix T54360: FFMPEG bitrate not editable for all codecs
The bitrate selection was hidden when a CRF mode was chosen and then
switched to a codec that doesn't support CRF.
2018-03-22 15:10:42 +01:00
6f07673ce4 Fix compilation error
Recent fix was assuming some cleanup is done.
2018-03-22 09:56:06 +01:00
150dee260e Update addons submodule hash 2018-03-22 09:51:05 +01:00
55872de560 Fix T54234, add BLENDER_VERSION_CHAR to .plist 2018-03-22 09:48:31 +01:00
6bf458dfff Fixed: cache clearing when using multiple Alembic files. 2018-03-22 09:44:12 +01:00
61c3317688 Cleanup: Use more python way of checking boolean 2018-03-22 09:41:22 +01:00
0253b16180 Tracking: Make object created form tracks active and selected 2018-03-22 09:41:18 +01:00
3ed28ccb93 Tracking: Warn when no tracks are selected when creating mesh
Makes it more clear why mesh was not created this way.

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

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

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

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

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

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

Related: T53513, a6c69ca57f
2018-03-19 11:35:20 +01:00
9accd8852b Bl;ender 2.79b: Begin 2.79b release cycle 2018-03-19 11:33:15 +01:00
8928d99270 VSE: skip non image/movie w/ proxy dir storage
This would use uninitialized filename variable,
looked into supporting this however generating proxies currently only
works for movies.
2018-02-21 21:41:31 +11:00
9e707802c2 Depsgraph: Fix crash using --debug-depsgraph and --debug-depsgraph-no-threads
Was accessing past the array boundaries.

Should be safe for 2.79a.
2018-02-21 10:53:05 +01:00
09aaee5640 Fix T53032: Image sequence works bad with Displace modifier
We shouldn't mix image pool acuisition with and without user provided,
the fact that internally image.c uses last frame from Image datablock
confuses the logic.
2018-02-19 14:38:25 +01:00
dc5aaac3a2 Blender 2.79a: Update submodules hash for addons 2018-02-19 11:33:45 +01:00
a4dbff33c9 Blender 2.79a: Prepare for release
Enter release state and make spacing to "a" more sane.

There is still at least one fix we want to get in, before declaring we are
ready for release.
2018-02-19 10:49:46 +01:00
59cc0bfef5 Fix T54075: Align Objects fails w/ empty mesh 2018-02-15 15:49:03 +11:00
9268ff4b21 Cleanup: Python context access
Avoid access from bpy when it's already declared.
2018-02-15 15:49:03 +11:00
7ae9b96ac6 Fix T54072: Crash splitting edges 2018-02-15 15:49:03 +11:00
bc891ad124 Fix T53958: Sequencer zoom 1:1 fails 2018-02-15 15:49:03 +11:00
3982a36c10 Minor change to last commit
Keep mode checks simple, nest other checks in their body.
2018-02-15 15:49:03 +11:00
f5c0df3601 Fix T53986: Crash saving during sculpt stroke
Also remove unused struct member.
2018-02-15 15:49:02 +11:00
81697c772c Fix: msvc build error with bli_fileops.h
bli_fileops.h was using uint64_t without including the proper header.

issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004
2018-02-15 15:49:02 +11:00
6f45c9d6c6 Fix T50630: Fluid fails on win32 w/ unicode paths
Allow overriding gzip open w/ elbeem.
2018-02-15 15:49:02 +11:00
d1281bf993 Fix navmesh creation w/ multiple objects
D2976 by @dertom
2018-02-15 15:49:02 +11:00
c40e9a1ad2 Docs: invoke_search_popup uses bl_property
Also add code example in docs.
2018-02-15 15:49:02 +11:00
21f19224f3 Fix part of T53080: don't use current scene world for icon previews.
This can be very slow if it contains a big texture, and it's not
necessarily setup in a useful way anyway, and materials can be used
in multiple scenes.
2018-02-12 20:37:41 +01:00
f6abf9d0ba Fix (unreported) crash when duplicating a FileBrowser window in preview draw mode.
We did not clear preview or smoothscroll timers pointers in copy code...
2018-02-09 16:25:08 +01:00
e5917d624e Fix missing group duplicated by hair in render
Was happening when viewport visibility on the particle system is disabled.
This became an issue after c45afcf, but the actual issue goes a bit deeper
and the following aspects were involved:

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

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

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

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

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

Use BLI_kdtree to remove doubles instead.

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

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

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

This partially fixes issue reported in T53452.

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

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

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

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

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

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

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

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

Requested by author, since it raised new issues, better not have it in
bugfix release!
2018-01-16 17:19:17 +01:00
91ce295796 Fix T53772: Presets don't support colons 2018-01-14 14:51:59 +11:00
13973a5bbf Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Differential Revision: https://developer.blender.org/D2981
2018-01-13 02:50:52 +01:00
824c039230 Fix T53567: Negative pixel values causing artifacts with denoising
Now negative color values are clamped to zero before the actual denoising.
2018-01-13 02:42:39 +01:00
Stefan Werner
a623c02569 Cycles: Fixed compilation of CUDA kernels. Follow-up fix for my last commit. 2018-01-13 02:41:57 +01:00
Stefan Werner
b3adce7766 Cycles: Workaround for performance loss with the CUDA 9.0 SDK.
CUDA 9.0.176 apparently caused some slow down on high-end Pascal cards that can be mitigated by increasing the number of registers. See https://developer.blender.org/F1142667 for a detailed comparison.
2018-01-13 02:41:25 +01:00
30a0459f2c Fix T53692: OpenCL multi GPU rendering not using all GPUs.
Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.
2018-01-13 02:40:09 +01:00
2ca933f457 Fix T53755: Cycles OpenCL lamp shaders have incorrect normal. 2018-01-13 02:38:08 +01:00
f12ab4e196 Cleanup: SGI format, remove unused struct members 2018-01-12 21:20:52 +11:00
7b8b621c1d Fix SGI foramt reader CVE-2017-2901
Integer Overflow Code Execution Vulnerability.

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

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

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

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

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

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

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

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

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

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

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

Reviewers: mont29

Reviewed By: mont29

Subscribers: mont29

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

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

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

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

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

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

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

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

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

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

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

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

- Initial startup.
- Factory-settings.
- Setting app-templates.
2018-01-05 10:20:15 +11:00
942b6e933b BLI_heap: minor changes to the API
Recent addition of 'reinsert' didn't match logic for ghash API.

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

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

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

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

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

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

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

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

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

Reviewers: sybren, kevindietrich

Tags: #alembic

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

https://developer.blender.org/T53263

Reviewers: lukastoenne

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: mont29

Reviewed By: mont29

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

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

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

Reviewers: brecht, dfelinto

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2837
2018-01-01 15:42:16 +01:00
4bc89d815c Fix T53630: Effect strips not displaying Input data.
Fix T52977: Parent bone name disappeared in the UI in pose mode.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

To be backported to 2.79a should we do one.
2017-12-30 15:04:44 +01:00
882fe36f0d Fix T52984. Trackpad rotation to natural direction 2017-12-30 15:04:26 +01:00
855d2955c4 Docs: update API changelog to 2.79 2017-10-03 19:58:21 +02:00
8ef39d5c88 Update submodules to 2.79 release commits.
Should have been done before ahoy, sorry about that. Means 2.79 tag will
be one (no functionnal changes) commit ahead from our 2.79 builds, think
we can live with that.
2017-09-12 10:47:15 +02:00
5bd8ac9abf Update release cycle to 'release'. 2017-09-11 12:43:47 +02:00
9a9e9b1c4d Fix T52696: Sculpt - Brush spacing pressure artifacts
Was caused by divide-by-zero in paint_stroke_integrate_overlap()
in paint_stroke.c, as identified by Bob Smith (uvwxyz).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thanks to Campbell Barton for the help here.

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

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

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

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

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

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

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

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

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

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

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

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

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

To be backported to 2.79.
2017-09-04 12:55:22 +02:00
c0a9fdd93f Cleanup: remove space from filenames 2017-09-04 12:53:48 +02:00
e00f3a6565 Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-09-04 12:53:39 +02:00
6692af3997 Fix error in PointerProperty argument list
Regression in a7b3047
2017-09-04 12:53:28 +02:00
058a358e98 Modify menu from last commit
Also correct tool-tip.
2017-09-04 12:48:17 +02:00
ba600ff7fa Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-09-04 12:48:04 +02:00
fd0fbf2564 Fix bpy library load: invalid function signature 2017-09-04 12:47:55 +02:00
beea9421bd PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
2017-09-04 12:47:41 +02:00
7b397cdfc8 Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 14:53:52 +02:00
d48f4b61c9 Blender 2.79: Point subodules to updated hash 2017-08-18 14:12:04 +02:00
9bc5549222 PyAPI: Fix memory leak w/ empty, allocated enums 2017-08-18 14:04:07 +02:00
6bc962d7bc Fix T46329: scene_update_{pre,post} doc needs clarification
The documentation for the bpy.app.handlers.scene_update_{pre,post}
handlers states that they're called "on updating the scenes data".
However, they're called even when the data hasn't changed. Of course
such handlers are useful, but the documentation should reflect the
current behaviour.

Reviewers: mont29, sergey

Subscribers: Blendify

Maniphest Tasks: T46329

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

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

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

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

This exposed multiple problems in BM_face_split_edgenet_connect_islands

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

Reviewed By: #cycles, sergey

Subscribers: sergey

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

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

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

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

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

Thanks to @brecht for the head up!

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

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

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

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

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

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

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

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

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

To be backported to 2.79 branch.
2017-08-17 14:07:17 +02:00
ade9fc9245 Fix T52250: Glitch in UI in the addon panel regression 2017-08-17 14:07:17 +02:00
5e9132b3b7 2.79 release: point submodules to correct branches and versions. 2017-08-01 19:31:37 +02:00
541 changed files with 13184 additions and 4082 deletions

6
.gitmodules vendored
View File

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

View File

@@ -285,6 +285,7 @@ endif()
if(WITH_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
option(WITH_X11_ALPHA "Enable X11 transparent background" ON)
endif()
@@ -686,6 +687,7 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
set(WITH_X11_ALPHA OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
@@ -830,6 +832,14 @@ if(WITH_X11)
endif()
endif()
if(WITH_X11_XFIXES)
if(X11_Xfixes_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
else()
set(WITH_X11_XFIXES OFF)
endif()
endif()
if(WITH_X11_ALPHA)
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xrender_LIB)
@@ -1696,6 +1706,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_INSTALL_PORTABLE)
info_cfg_option(WITH_X11_ALPHA)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XFIXES)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_option(WITH_MEM_VALGRIND)

View File

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

View File

@@ -70,7 +70,7 @@ set(FFMPEG_LIBRARIES
)
# SndFile libraries
set(SNDFILE_LIBRARY "/usr/lib/libsndfile.a;/usr/lib/libFLAC.a" CACHE STRING "" FORCE)
set(SNDFILE_LIBRARY "/usr/lib${MULTILIB}/libsndfile.a;/usr/lib${MULTILIB}/libFLAC.a" CACHE STRING "" FORCE)
# OpenAL libraries
set(OPENAL_ROOT_DIR "/opt/lib/openal" CACHE STRING "" FORCE)

View File

@@ -76,6 +76,8 @@ IF(OPENIMAGEIO_FOUND)
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
ENDIF()
ELSE()
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)

View File

@@ -61,10 +61,8 @@ def replace_line(f, i, text, keep_indent=True):
def source_list(path, filename_check=None):
for dirpath, dirnames, filenames in os.walk(path):
# skip '.git'
if dirpath.startswith("."):
continue
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
for filename in filenames:
if filename_check is None or filename_check(filename):

View File

@@ -84,10 +84,8 @@ def init(cmake_path):
def source_list(path, filename_check=None):
for dirpath, dirnames, filenames in os.walk(path):
# skip '.svn'
if dirpath.startswith("."):
continue
# skip '.git'
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
for filename in filenames:
filepath = join(dirpath, filename)

View File

@@ -1,8 +1,11 @@
"""
Basic Video Playback
++++++++++++++++++++
Example of how to replace a texture in game with a video. It needs to run
everyframe.
Example of how to replace a texture in game with a video.
It needs to run everyframe.
To avoid any confusion with the location of the file,
we will use ``GameLogic.expandPath()`` to build an absolute file name,
assuming the video file is in the same directory as the blend-file.
"""
import bge
from bge import texture
@@ -26,8 +29,18 @@ if not hasattr(logic, 'video'):
logic.video.source = texture.VideoFFmpeg(movie)
logic.video.source.scale = True
# Note that we can change the ``Texture`` source at any time.
# Suppose we want to switch between two movies during the game:
logic.mySources[0] = texture.VideoFFmpeg('movie1.avi')
logic.mySources[1] = texture.VideoFFmpeg('movie2.avi')
#And then assign (and reassign) the source during the game
logic.video.source = logic.mySources[movieSel]
# quick off the movie, but it wont play in the background
logic.video.source.play()
# you need to call this function every frame to ensure update of the texture.
# Video playback is not a background process: it happens only when we refresh the texture.
# So you need to call this function every frame to ensure update of the texture.
logic.video.refresh(True)

View File

@@ -0,0 +1,38 @@
"""
Enum Search Popup
+++++++++++++++++
You may want to have an operator prompt the user to select an item
from a search field, this can be done using :class:`bpy.types.Operator.invoke_search_popup`.
"""
import bpy
from bpy.props import EnumProperty
class SearchEnumOperator(bpy.types.Operator):
bl_idname = "object.search_enum_operator"
bl_label = "Search Enum Operator"
bl_property = "my_search"
my_search = EnumProperty(
name="My Search",
items=(
('FOO', "Foo", ""),
('BAR', "Bar", ""),
('BAZ', "Baz", ""),
),
)
def execute(self, context):
self.report({'INFO'}, "Selected:" + self.my_search)
return {'FINISHED'}
def invoke(self, context, event):
context.window_manager.invoke_search_popup(self)
return {'RUNNING_MODAL'}
bpy.utils.register_class(SearchEnumOperator)
# test call
bpy.ops.object.search_enum_operator('INVOKE_DEFAULT')

View File

@@ -2,12 +2,33 @@
Physics Constraints (bge.constraints)
=====================================
Bullet Physics provides collision detection
and rigid body dynamics for the Blender Game Engine.
Features:
- Vehicle simulation.
- Rigid body constraints: hinge and point to point (ball socket).
- Access to internal physics settings,
like deactivation time, and debugging features
.. module:: bge.constraints
.. note:: Note about parameter settings
Since this API is not well documented, it can be unclear what kind of values to use for setting parameters.
In general, damping settings should be in the range of 0 to 1 and
stiffness settings should not be much higher than about 10.
Examples
--------
.. seealso::
For more examples of Bullet physics and how to use them
see the `pybullet forum <https://pybullet.org/Bullet/phpBB3/viewforum.php?f=17>`__.
.. include:: __/examples/bge.constraints.py
:start-line: 1
:end-line: 4
@@ -333,4 +354,3 @@ Constraint type to be used with :func:`createConstraint`.
.. data:: GENERIC_6DOF_CONSTRAINT
.. to do

View File

@@ -6,18 +6,15 @@ Video Texture (bge.texture)
Introduction
************
The bge.texture module allows you to manipulate textures during the game.
Several sources for texture are possible: video files, image files, video capture, memory buffer,
camera render or a mix of that.
The video and image files can be loaded from the internet using an URL instead of a file name.
In addition, you can apply filters on the images before sending them to the GPU, allowing video effect:
blue screen, color band, gray, normal map.
bge.texture uses FFmpeg to load images and videos.
All the formats and codecs that FFmpeg supports are supported by this module, including but not limited to:
The ``bge.texture`` module allows you to manipulate textures during the game.
Several sources for texture are possible: video files, image files, video capture,
memory buffer, camera render or a mix of that.
The video and image files can be loaded from the Internet using a URL instead of a file name.
In addition, you can apply filters on the images before sending them to the GPU,
allowing video effect: blue screen, color band, gray, normal map.
``bge.texture`` uses FFmpeg to load images and videos.
All the formats and codecs that FFmpeg supports are supported by ``bge.texture``,
including but not limited to:
* AVI
* Ogg
@@ -28,16 +25,45 @@ All the formats and codecs that FFmpeg supports are supported by this module, in
* videoForWindows capture card (this includes many webcams)
* JPG
The principle is simple: first you identify a texture on an existing object using
the :class:`~bge.texture.materialID` function, then you create a new texture with dynamic content
How it works
------------
The principle is simple: first you identify a texture on an existing object using the
:class:`~bge.texture.materialID` function, then you create a new texture with dynamic content
and swap the two textures in the GPU.
The GE is not aware of the substitution and continues to display the object as always,
The game engine is not aware of the substitution and continues to display the object as always,
except that you are now in control of the texture.
When the texture object is deleted, the new texture is deleted and the old texture restored.
.. module:: bge.texture
Game Preparation
----------------
Before you can use the :mod:`bge.texture` module,
you must have objects with textures applied appropriately.
Imagine you want to have a television showing live broadcast programs in the game.
You will create a television object and UV-apply a different texture at the place of the screen,
for example ``tv.png``. What this texture looks like is not important;
probably you want to make it dark gray to simulate power-off state.
When the television must be turned on, you create a dynamic texture from a video capture card
and use it instead of ``tv.png``: the TV screen will come to life.
You have two ways to define textures that ``bge.texture`` can grab:
- Simple UV texture.
- Blender material with image texture channel.
Because ``bge.texture`` works at texture level, it is compatible with all
the Blender Game Engine's fancy texturing features: GLSL, multi-texture, custom shaders, etc.
********
Examples
********
.. include:: __/examples/bge.texture.py
:start-line: 1
@@ -53,7 +79,6 @@ When the texture object is deleted, the new texture is deleted and the old textu
.. literalinclude:: __/examples/bge.texture.1.py
:lines: 8-
.. include:: __/examples/bge.texture.2.py
:start-line: 1
:end-line: 6
@@ -62,13 +87,15 @@ When the texture object is deleted, the new texture is deleted and the old textu
:lines: 8-
.. module:: bge.texture
*************
Video classes
*************
.. class:: VideoFFmpeg(file, capture=-1, rate=25.0, width=0, height=0)
FFmpeg video source.
FFmpeg video source, used for video files, video captures, or video streams.
:arg file: Path to the video to load; if capture >= 0 on Windows, this parameter will not be used.
:type file: str
@@ -90,19 +117,20 @@ Video classes
.. attribute:: range
Replay range.
The start and stop time of the video playback, expressed in seconds from beginning.
By default the entire video.
:type: sequence of two floats
.. attribute:: repeat
Repeat count, -1 for infinite repeat.
Number of times to replay the video, -1 for infinite repeat.
:type: int
.. attribute:: framerate
Frame rate.
Relative frame rate, <1.0 for slow, >1.0 for fast.
:type: float
@@ -126,21 +154,26 @@ Video classes
.. attribute:: scale
Fast scale of image (near neighbour).
Set to True to activate fast nearest neighbor scaling algorithm.
Texture width and height must be a power of 2.
If the video picture size is not a power of 2, rescaling is required.
By default ``bge.texture`` uses the precise but slow ``gluScaleImage()`` function.
Best is to rescale the video offline so that no scaling is necessary at runtime!
:type: bool
.. attribute:: flip
Flip image vertically.
If True the imaged will be flipped vertically.
FFmpeg always delivers the image upside down, so this attribute is set to True by default.
:type: bool
.. attribute:: filter
Pixel filter.
An additional filter that is applied on the video before sending it to the GPU.
:type: one of...
:type: one of:
* :class:`FilterBGR24`
* :class:`FilterBlueScreen`
@@ -207,7 +240,7 @@ Image classes
.. class:: ImageFFmpeg(file)
FFmpeg image source.
FFmpeg image source, used for image files and web based images.
:arg file: Path to the image to load.
:type file: str
@@ -286,7 +319,8 @@ Image classes
.. class:: ImageBuff(width, height, color=0, scale=False)
Image source from image buffer.
Image from application memory.
For computer generated images, drawing applications.
:arg width: Width of the image.
:type width: int
@@ -477,7 +511,7 @@ Image classes
.. class:: ImageMix
Image mixer.
Image mixer used to mix multiple image sources together.
.. attribute:: filter
@@ -592,7 +626,7 @@ Image classes
.. class:: ImageRender(scene, camera)
Image source from render.
Image source from a render of a non active camera.
The render is done on a custom framebuffer object if fbo is specified,
otherwise on the default framebuffer.
@@ -723,7 +757,8 @@ Image classes
.. class:: ImageViewport
Image source from viewport.
Image source from viewport rendered by the active camera.
To render from a non active camera see :class:`ImageRender`.
.. attribute:: alpha
@@ -774,11 +809,10 @@ Image classes
Refresh video - copy the viewport to an external buffer (optional) then invalidate its current content.
:arg buffer: An optional object that implements the buffer protocol.
If specified, the image is copied to the buffer, which must be big enough or an exception is thrown.
The transfer to the buffer is optimal if no processing of the image is needed.
This is the case if ``flip=False, alpha=True, scale=False, whole=True, depth=False, zbuff=False``
and no filter is set.
:arg buffer: An optional object that implements the buffer protocol. If specified,
the image is copied to the buffer, which must be big enough or an exception is thrown.
The transfer to the buffer is optimal if no processing of the image is needed. This is the case if
``flip=False, alpha=True, scale=False, whole=True, depth=False, zbuff=False`` and no filter is set.
:type buffer: any buffer type
:arg format: An optional image format specifier for the image that will be copied to the buffer.
Only valid values are "RGBA" or "BGRA"
@@ -838,18 +872,16 @@ Image classes
:arg capture: Card number from which the input video must be captured.
:type capture: int
The format argument must be written as ``<displayMode>/<pixelFormat>[/3D][:<cacheSize>]`` where ``<displayMode>``
describes the frame size and rate and <pixelFormat> the encoding of the pixels.
The format argument must be written as ``<displayMode>/<pixelFormat>[/3D][:<cacheSize>]``
where ``<displayMode>`` describes the frame size and rate and <pixelFormat> the encoding of the pixels.
The optional ``/3D`` suffix is to be used if the video stream is stereo with a left and right eye feed.
The optional ``:<cacheSize>`` suffix determines the number of the video frames kept in cache, by default 8.
Some DeckLink cards won't work below a certain cache size.
The default value 8 should be sufficient for all cards.
Some DeckLink cards won't work below a certain cache size. The default value 8 should be sufficient for all cards.
You may try to reduce the cache size to reduce the memory footprint. For example the The 4K Extreme is known
to work with 3 frames only, the Extreme 2 needs 4 frames and the Intensity Shuttle needs 6 frames, etc.
Reducing the cache size may be useful when Decklink is used in conjunction with GPUDirect:
all frames must be locked in memory in that case and that puts a lot of pressure on memory.
If you reduce the cache size too much,
you'll get no error but no video feed either.
If you reduce the cache size too much, you'll get no error but no video feed either.
The valid ``<displayMode>`` values are copied from the ``BMDDisplayMode`` enum in the DeckLink API
without the 'bmdMode' prefix. In case a mode that is not in this list is added in a later version
@@ -1006,15 +1038,20 @@ Texture classes
.. class:: Texture(gameObj, materialID=0, textureID=0, textureObj=None)
Texture object.
Class that creates the ``Texture`` object that loads the dynamic texture on the GPU.
:arg gameObj: Game object to be created a video texture on.
:type gameObj: :class:`~bge.types.KX_GameObject`
:arg materialID: Material ID. (optional)
:arg materialID: Material ID default, 0 is the first material. (optional)
:type materialID: int
:arg textureID: Texture ID. (optional)
:arg textureID: Texture index in case of multi-texture channel, 0 = first channel by default.
In case of UV texture, this parameter should always be 0. (optional)
:type textureID: int
:arg textureObj: Texture object with shared bindId. (optional)
:arg textureObj: Reference to another ``Texture`` object with shared bindId
which he user might want to reuse the texture.
If this argument is used, you should not create any source on this texture
and there is no need to refresh it either: the other ``Texture`` object will
provide the texture for both materials/textures.(optional)
:type textureObj: :class:`Texture`
.. attribute:: bindId
@@ -1094,7 +1131,7 @@ Texture classes
.. attribute:: source
This attribute must be set to one of the image source. If the image size does not fit exactly
This attribute must be set to one of the image sources. If the image size does not fit exactly
the frame size, the extend attribute determines what to do.
For best performance, the source image should match exactly the size of the output frame.
@@ -1368,7 +1405,7 @@ Functions
Returns a :class:`~bgl.Buffer` corresponding to the current image stored in a texture source object.
:arg image: Image source object of type ...
:arg image: Image source object of type:
* :class:`VideoFFmpeg`
* :class:`ImageFFmpeg`
@@ -1387,7 +1424,7 @@ Functions
- "BGR" will return 3 bytes per pixel with the
Blue, Green and Red channels in that order.
- "RGB1" will return 4 bytes per pixel with the
- "RGB1" will return 4 bytes per pixel with the
Red, Green, Blue channels in that order and the alpha channel forced to 255.
- A special mode "F" allows to return the image as an array of float.
@@ -1429,9 +1466,10 @@ Functions
.. function:: setLogFile(filename)
Sets the name of a text file in which runtime error messages will be written, in addition to the printing
of the messages on the Python console. Only the runtime errors specific to the VideoTexture module
are written in that file, ordinary runtime time errors are not written.
Sets the name of a text file in which runtime error messages will be written,
in addition to the printing of the messages on the Python console.
Only the runtime errors specific to the VideoTexture module are written in that file,
ordinary runtime time errors are not written.
:arg filename: Name of the error log file.
:type filename: str
@@ -1517,4 +1555,3 @@ See Wikipedia's `Blend Modes <https://en.wikipedia.org/wiki/Blend_modes>`_ for r
.. data:: IMB_BLEND_COPY_RGB
.. data:: IMB_BLEND_COPY_ALPHA

View File

@@ -35,4 +35,3 @@ Types
:glob:
bge.types.*

View File

@@ -1,8 +1,6 @@
BL_ActionActuator(SCA_IActuator)
================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: BL_ActionActuator(SCA_IActuator)
@@ -75,4 +73,3 @@ base class --- :class:`SCA_IActuator`
The name of the property that is set to the current frame number.
:type: string

View File

@@ -1,8 +1,6 @@
BL_ArmatureActuator(SCA_IActuator)
==================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: BL_ArmatureActuator(SCA_IActuator)
@@ -58,4 +56,3 @@ base class --- :class:`SCA_IActuator`
The influence this actuator will set on the constraint it controls.
:type: float.

View File

@@ -1,8 +1,6 @@
BL_ArmatureBone(PyObjectPlus)
=============================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: BL_ArmatureBone(PyObjectPlus)

View File

@@ -1,8 +1,6 @@
BL_ArmatureChannel(PyObjectPlus)
================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: BL_ArmatureChannel(PyObjectPlus)
@@ -275,4 +273,3 @@ base class --- :class:`PyObjectPlus`
.. note::
You can read the result of the calculation in rotation or euler_rotation attributes after setting this attribute.

View File

@@ -1,8 +1,6 @@
BL_ArmatureConstraint(PyObjectPlus)
===================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: BL_ArmatureConstraint(PyObjectPlus)
@@ -126,4 +124,3 @@ base class --- :class:`PyObjectPlus`
Additional mode for IK constraint. Currently only used for Distance constraint:
:type: integer

View File

@@ -1,8 +1,6 @@
BL_ArmatureObject(KX_GameObject)
================================
.. module:: bge.types
base class --- :class:`KX_GameObject`
.. class:: BL_ArmatureObject(KX_GameObject)
@@ -31,4 +29,3 @@ base class --- :class:`KX_GameObject`
This action is unecessary if a KX_ArmatureActuator with mode run is active
or if an action is playing. Use this function in other cases. It must be called
on each frame to ensure that the armature is updated continously.

View File

@@ -1,8 +1,6 @@
BL_Shader(PyObjectPlus)
=======================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: BL_Shader(PyObjectPlus)
@@ -227,4 +225,3 @@ base class --- :class:`PyObjectPlus`
.. method:: validate()
Validate the shader object.

View File

@@ -1,8 +1,6 @@
BL_ShapeActionActuator(SCA_IActuator)
=====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: BL_ShapeActionActuator(SCA_IActuator)

View File

@@ -1,8 +1,6 @@
CListValue(CPropValue)
======================
.. module:: bge.types
base class --- :class:`CPropValue`
.. class:: CListValue(CPropValue)
@@ -69,4 +67,3 @@ base class --- :class:`CPropValue`
.. warning::
The id can't be stored as an integer in game object properties, as those only have a limited range that the id may not be contained in. Instead an id can be stored as a string game property and converted back to an integer for use in from_id lookups.

View File

@@ -1,11 +1,8 @@
CPropValue(CValue)
==================
.. module:: bge.types
base class --- :class:`CValue`
.. class:: CPropValue(CValue)
This class has no python functions

View File

@@ -1,8 +1,6 @@
CValue(PyObjectPlus)
====================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: CValue(PyObjectPlus)

View File

@@ -1,8 +1,6 @@
KX_ArmatureSensor(SCA_ISensor)
==============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: KX_ArmatureSensor(SCA_ISensor)

View File

@@ -1,8 +1,6 @@
KX_BlenderMaterial(PyObjectPlus)
================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_BlenderMaterial(PyObjectPlus)
@@ -182,4 +180,3 @@ base class --- :class:`PyObjectPlus`
:return: the material's index
:rtype: integer

View File

@@ -1,8 +1,6 @@
KX_Camera(KX_GameObject)
========================
.. module:: bge.types
base class --- :class:`KX_GameObject`
.. class:: KX_Camera(KX_GameObject)

View File

@@ -1,8 +1,6 @@
KX_CameraActuator(SCA_IActuator)
================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_CameraActuator(SCA_IActuator)
@@ -44,4 +42,3 @@ base class --- :class:`SCA_IActuator`
the object this actuator tracks.
:type: :class:`KX_GameObject` or None

View File

@@ -1,8 +1,6 @@
KX_CharacterWrapper(PyObjectPlus)
=================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_CharacterWrapper(PyObjectPlus)
@@ -42,4 +40,3 @@ base class --- :class:`PyObjectPlus`
.. method:: jump()
The character jumps based on it's jump speed.

View File

@@ -1,8 +1,6 @@
KX_ConstraintActuator(SCA_IActuator)
====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_ConstraintActuator(SCA_IActuator)

View File

@@ -1,8 +1,6 @@
KX_ConstraintWrapper(PyObjectPlus)
==================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_ConstraintWrapper(PyObjectPlus)
@@ -140,4 +138,3 @@ base class --- :class:`PyObjectPlus`
- :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`

View File

@@ -1,8 +1,6 @@
KX_FontObject(KX_GameObject)
============================
.. module:: bge.types
base class --- :class:`KX_GameObject`
.. class:: KX_FontObject(KX_GameObject)
@@ -29,4 +27,3 @@ base class --- :class:`KX_GameObject`
The text displayed by this Font object.
:type: string

View File

@@ -1,8 +1,6 @@
KX_GameActuator(SCA_IActuator)
==============================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_GameActuator(SCA_IActuator)
@@ -20,4 +18,3 @@ base class --- :class:`SCA_IActuator`
The mode of this actuator. Can be on of :ref:`these constants <game-actuator>`
:type: Int

View File

@@ -1,8 +1,6 @@
KX_GameObject(SCA_IObject)
==========================
.. module:: bge.types
base class --- :class:`SCA_IObject`
.. class:: KX_GameObject(SCA_IObject)

View File

@@ -1,8 +1,6 @@
KX_LibLoadStatus(PyObjectPlus)
==============================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_LibLoadStatus(PyObjectPlus)
@@ -48,4 +46,3 @@ base class --- :class:`PyObjectPlus`
The amount of time, in seconds, the lib load took (0 until the operation is complete).
:type: float

View File

@@ -1,8 +1,6 @@
KX_LightObject(KX_GameObject)
=============================
.. module:: bge.types
base class --- :class:`KX_GameObject`
.. class:: KX_LightObject(KX_GameObject)
@@ -161,4 +159,3 @@ base class --- :class:`KX_GameObject`
.. note::
Higher values result in a more focused light source.

View File

@@ -1,8 +1,6 @@
KX_MeshProxy(SCA_IObject)
=========================
.. module:: bge.types
base class --- :class:`SCA_IObject`
.. class:: KX_MeshProxy(SCA_IObject)
@@ -131,4 +129,3 @@ base class --- :class:`SCA_IObject`
:type uv_index: integer
:arg uv_index_from: optional uv index to copy from, -1 to transform the current uv.
:type uv_index_from: integer

View File

@@ -1,8 +1,6 @@
KX_MouseActuator(SCA_IActuator)
====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_MouseActuator(SCA_IActuator)
@@ -100,4 +98,3 @@ base class --- :class:`SCA_IActuator`
The current rotational offset caused by the mouse actuator in degrees.
:type: list (vector of 2 floats)

View File

@@ -1,8 +1,6 @@
KX_MouseFocusSensor(SCA_MouseSensor)
====================================
.. module:: bge.types
base class --- :class:`SCA_MouseSensor`
.. class:: KX_MouseFocusSensor(SCA_MouseSensor)

View File

@@ -1,8 +1,6 @@
KX_NavMeshObject(KX_GameObject)
===============================
.. module:: bge.types
base class --- :class:`KX_GameObject`
.. class:: KX_NavMeshObject(KX_GameObject)
@@ -44,4 +42,3 @@ base class --- :class:`KX_GameObject`
Rebuild the navigation mesh.
:return: None

View File

@@ -1,8 +1,6 @@
KX_NearSensor(KX_TouchSensor)
=============================
.. module:: bge.types
base class --- :class:`KX_TouchSensor`
.. class:: KX_NearSensor(KX_TouchSensor)
@@ -20,4 +18,3 @@ base class --- :class:`KX_TouchSensor`
The near sensor deactivates when the object exceeds this distance.
:type: float

View File

@@ -1,8 +1,6 @@
KX_NetworkMessageActuator(SCA_IActuator)
========================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_NetworkMessageActuator(SCA_IActuator)
@@ -32,4 +30,3 @@ base class --- :class:`SCA_IActuator`
Send a property instead of a regular body message.
:type: boolean

View File

@@ -1,8 +1,6 @@
KX_NetworkMessageSensor(SCA_ISensor)
====================================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: KX_NetworkMessageSensor(SCA_ISensor)
@@ -34,5 +32,3 @@ base class --- :class:`SCA_ISensor`
The list of message bodies received. (read-only).
:type: list of strings

View File

@@ -1,8 +1,6 @@
KX_ObjectActuator(SCA_IActuator)
================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_ObjectActuator(SCA_IActuator)
@@ -126,4 +124,3 @@ base class --- :class:`SCA_IActuator`
The object that is used as reference to compute the velocity for the servo controller.
:type: :class:`KX_GameObject` or None

View File

@@ -1,8 +1,6 @@
KX_ParentActuator(SCA_IActuator)
================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_ParentActuator(SCA_IActuator)
@@ -35,4 +33,3 @@ base class --- :class:`SCA_IActuator`
Effective only if the shape is not added to the parent compound shape.
:type: boolean

View File

@@ -1,8 +1,6 @@
KX_PolyProxy(SCA_IObject)
=========================
.. module:: bge.types
base class --- :class:`SCA_IObject`
.. class:: KX_PolyProxy(SCA_IObject)
@@ -136,4 +134,3 @@ base class --- :class:`SCA_IObject`
:return: mesh proxy
:rtype: :class:`MeshProxy`

View File

@@ -1,8 +1,6 @@
KX_RadarSensor(KX_NearSensor)
=============================
.. module:: bge.types
base class --- :class:`KX_NearSensor`
.. class:: KX_RadarSensor(KX_NearSensor)
@@ -41,4 +39,3 @@ base class --- :class:`KX_NearSensor`
KX_RADAR_AXIS_POS_X, KX_RADAR_AXIS_POS_Y, KX_RADAR_AXIS_POS_Z,
KX_RADAR_AXIS_NEG_X, KX_RADAR_AXIS_NEG_Y, KX_RADAR_AXIS_NEG_Z

View File

@@ -1,8 +1,6 @@
KX_RaySensor(SCA_ISensor)
=========================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: KX_RaySensor(SCA_ISensor)
@@ -75,4 +73,3 @@ base class --- :class:`SCA_ISensor`
* KX_RAY_AXIS_NEG_X
* KX_RAY_AXIS_NEG_Y
* KX_RAY_AXIS_NEG_Z

View File

@@ -1,8 +1,6 @@
KX_SCA_AddObjectActuator(SCA_IActuator)
=======================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SCA_AddObjectActuator(SCA_IActuator)
@@ -52,4 +50,3 @@ base class --- :class:`SCA_IActuator`
adds the object without needing to calling SCA_PythonController.activate()
.. note:: Use objectLastCreated to get the newly created object.

View File

@@ -1,8 +1,6 @@
KX_SCA_DynamicActuator(SCA_IActuator)
=====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SCA_DynamicActuator(SCA_IActuator)
@@ -26,4 +24,3 @@ base class --- :class:`SCA_IActuator`
the mass value for the KX_DYN_SET_MASS operation.
:type: float

View File

@@ -1,8 +1,6 @@
KX_SCA_EndObjectActuator(SCA_IActuator)
=======================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SCA_EndObjectActuator(SCA_IActuator)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IActuator`
Edit Object Actuator (in End Object mode)
This actuator has no python methods.

View File

@@ -1,8 +1,6 @@
KX_SCA_ReplaceMeshActuator(SCA_IActuator)
=========================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SCA_ReplaceMeshActuator(SCA_IActuator)
@@ -86,4 +84,3 @@ base class --- :class:`SCA_IActuator`
.. method:: instantReplaceMesh()
Immediately replace mesh without delay.

View File

@@ -1,8 +1,6 @@
KX_Scene(PyObjectPlus)
======================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_Scene(PyObjectPlus)
@@ -183,4 +181,3 @@ base class --- :class:`PyObjectPlus`
.. method:: drawObstacleSimulation()
Draw debug visualization of obstacle simulation.

View File

@@ -1,8 +1,6 @@
KX_SceneActuator(SCA_IActuator)
===============================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SceneActuator(SCA_IActuator)
@@ -46,4 +44,3 @@ base class --- :class:`SCA_IActuator`
The mode of the actuator.
:type: integer from 0 to 5.

View File

@@ -1,8 +1,6 @@
KX_SoundActuator(SCA_IActuator)
===============================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SoundActuator(SCA_IActuator)
@@ -112,4 +110,3 @@ base class --- :class:`SCA_IActuator`
Stops the sound.
:return: None

View File

@@ -1,8 +1,6 @@
KX_StateActuator(SCA_IActuator)
===============================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_StateActuator(SCA_IActuator)
@@ -26,4 +24,3 @@ base class --- :class:`SCA_IActuator`
The bits that are 0 are will be left unmodified expect for the Copy operation which copies the mask to the object state.
:type: integer

View File

@@ -1,8 +1,6 @@
KX_SteeringActuator(SCA_IActuator)
==================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_SteeringActuator(SCA_IActuator)
@@ -68,4 +66,3 @@ base class --- :class:`SCA_IActuator`
Path update period
:type: int

View File

@@ -1,8 +1,6 @@
KX_TouchSensor(SCA_ISensor)
===========================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: KX_TouchSensor(SCA_ISensor)
@@ -44,4 +42,3 @@ base class --- :class:`SCA_ISensor`
The material of the object in the face hit by the ray. (read-only).
:type: string

View File

@@ -1,8 +1,6 @@
KX_TrackToActuator(SCA_IActuator)
=================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_TrackToActuator(SCA_IActuator)

View File

@@ -1,8 +1,6 @@
KX_VehicleWrapper(PyObjectPlus)
===============================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_VehicleWrapper(PyObjectPlus)
@@ -163,4 +161,3 @@ base class --- :class:`PyObjectPlus`
:arg wheelIndex: the wheel index
:type wheelIndex: integer

View File

@@ -1,8 +1,6 @@
KX_VertexProxy(SCA_IObject)
===========================
.. module:: bge.types
base class --- :class:`SCA_IObject`
.. class:: KX_VertexProxy(SCA_IObject)
@@ -206,4 +204,3 @@ base class --- :class:`SCA_IObject`
:type: sequence of floats [r, g, b]
:arg normal: the new normal of this vertex.

View File

@@ -1,8 +1,6 @@
KX_VisibilityActuator(SCA_IActuator)
====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_VisibilityActuator(SCA_IActuator)
@@ -26,4 +24,3 @@ base class --- :class:`SCA_IActuator`
whether the visibility/occlusion should be propagated to all children of the object.
:type: boolean

View File

@@ -1,8 +1,6 @@
KX_WorldInfo(PyObjectPlus)
=============================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: KX_WorldInfo(PyObjectPlus)

View File

@@ -1,8 +1,6 @@
PyObjectPlus
============
.. module:: bge.types
.. class:: PyObjectPlus
PyObjectPlus base class of most other types in the Game Engine.
@@ -18,4 +16,3 @@ PyObjectPlus
The invalid attribute allows testing for this case without exception handling.
:type: boolean

View File

@@ -1,8 +1,6 @@
SCA_2DFilterActuator(SCA_IActuator)
===================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: SCA_2DFilterActuator(SCA_IActuator)
@@ -46,4 +44,3 @@ base class --- :class:`SCA_IActuator`
argument for motion blur filter.
:type: float (0.0-100.0)

View File

@@ -1,8 +1,6 @@
SCA_ANDController(SCA_IController)
==================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_ANDController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An AND controller activates only when all linked sensors are activated.
There are no special python methods for this controller.

View File

@@ -1,8 +1,6 @@
SCA_ActuatorSensor(SCA_ISensor)
===============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_ActuatorSensor(SCA_ISensor)
@@ -16,4 +14,3 @@ base class --- :class:`SCA_ISensor`
the name of the actuator that the sensor is monitoring.
:type: string

View File

@@ -1,11 +1,8 @@
SCA_AlwaysSensor(SCA_ISensor)
=============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_AlwaysSensor(SCA_ISensor)
This sensor is always activated.

View File

@@ -1,8 +1,6 @@
SCA_DelaySensor(SCA_ISensor)
============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_DelaySensor(SCA_ISensor)
@@ -36,4 +34,3 @@ base class --- :class:`SCA_ISensor`
1 if the OFF-ON cycle should be repeated indefinately, 0 if it should run once.
:type: integer

View File

@@ -1,11 +1,8 @@
SCA_IActuator(SCA_ILogicBrick)
==============================
.. module:: bge.types
base class --- :class:`SCA_ILogicBrick`
.. class:: SCA_IActuator(SCA_ILogicBrick)
Base class for all actuator logic bricks.

View File

@@ -1,8 +1,6 @@
SCA_IController(SCA_ILogicBrick)
================================
.. module:: bge.types
base class --- :class:`SCA_ILogicBrick`
.. class:: SCA_IController(SCA_ILogicBrick)
@@ -52,4 +50,3 @@ base class --- :class:`SCA_ILogicBrick`
.. note::
Order of execution between high priority controllers is not guaranteed.

View File

@@ -1,8 +1,6 @@
SCA_ILogicBrick(CValue)
=======================
.. module:: bge.types
base class --- :class:`CValue`
.. class:: SCA_ILogicBrick(CValue)
@@ -26,4 +24,3 @@ base class --- :class:`CValue`
The name of this logic brick (read-only).
:type: string

View File

@@ -1,11 +1,8 @@
SCA_IObject(CValue)
===================
.. module:: bge.types
base class --- :class:`CValue`
.. class:: SCA_IObject(CValue)
This class has no python functions

View File

@@ -1,8 +1,6 @@
SCA_ISensor(SCA_ILogicBrick)
============================
.. module:: bge.types
base class --- :class:`SCA_ILogicBrick`
.. class:: SCA_ISensor(SCA_ILogicBrick)
@@ -98,4 +96,3 @@ base class --- :class:`SCA_ILogicBrick`
Reset sensor internal state, effect depends on the type of sensor and settings.
The sensor is put in its initial state as if it was just activated.

View File

@@ -1,8 +1,6 @@
SCA_JoystickSensor(SCA_ISensor)
===============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_JoystickSensor(SCA_ISensor)
@@ -130,4 +128,3 @@ base class --- :class:`SCA_ISensor`
:type buttonIndex: integer
:return: The current pressed state of the specified button.
:rtype: boolean

View File

@@ -1,8 +1,6 @@
SCA_KeyboardSensor(SCA_ISensor)
===============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_KeyboardSensor(SCA_ISensor)
@@ -61,4 +59,3 @@ base class --- :class:`SCA_ISensor`
:type keycode: integer
:return: The state of the given key, can be one of :ref:`these constants<input-status>`
:rtype: int

View File

@@ -1,8 +1,6 @@
SCA_MouseSensor(SCA_ISensor)
============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_MouseSensor(SCA_ISensor)
@@ -36,4 +34,3 @@ base class --- :class:`SCA_ISensor`
:type button: int
:return: The state of the given key, can be one of :ref:`these constants<input-status>`
:rtype: int

View File

@@ -1,8 +1,6 @@
SCA_NANDController(SCA_IController)
===================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_NANDController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An NAND controller activates when all linked sensors are not active.
There are no special python methods for this controller.

View File

@@ -1,8 +1,6 @@
SCA_NORController(SCA_IController)
==================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_NORController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An NOR controller activates only when all linked sensors are de-activated.
There are no special python methods for this controller.

View File

@@ -1,8 +1,6 @@
SCA_ORController(SCA_IController)
=================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_ORController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An OR controller activates when any connected sensor activates.
There are no special python methods for this controller.

View File

@@ -1,8 +1,6 @@
SCA_PropertyActuator(SCA_IActuator)
===================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: SCA_PropertyActuator(SCA_IActuator)
@@ -26,4 +24,3 @@ base class --- :class:`SCA_IActuator`
TODO - add constants to game logic dict!.
:type: integer

View File

@@ -1,8 +1,6 @@
SCA_PropertySensor(SCA_ISensor)
===============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_PropertySensor(SCA_ISensor)
@@ -38,4 +36,3 @@ base class --- :class:`SCA_ISensor`
the maximum value of the range used to evaluate the property when in interval mode.
:type: string

View File

@@ -1,8 +1,6 @@
SCA_PythonController(SCA_IController)
=====================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_PythonController(SCA_IController)
@@ -51,4 +49,3 @@ base class --- :class:`SCA_IController`
:arg actuator: The actuator to operate on.
:type actuator: actuator or the actuator name as a string

View File

@@ -1,8 +1,6 @@
SCA_PythonJoystick(PyObjectPlus)
================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: SCA_PythonJoystick(PyObjectPlus)
@@ -74,4 +72,3 @@ base class --- :class:`PyObjectPlus`
The number of hats for the joystick at this index. (read-only).
:type: integer

View File

@@ -1,8 +1,6 @@
SCA_PythonKeyboard(PyObjectPlus)
================================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: SCA_PythonKeyboard(PyObjectPlus)
@@ -34,4 +32,3 @@ base class --- :class:`PyObjectPlus`
:arg text: New clipboard text
:type text: string

View File

@@ -1,8 +1,6 @@
SCA_PythonMouse(PyObjectPlus)
=============================
.. module:: bge.types
base class --- :class:`PyObjectPlus`
.. class:: SCA_PythonMouse(PyObjectPlus)
@@ -32,4 +30,3 @@ base class --- :class:`PyObjectPlus`
The visibility of the mouse cursor.
:type: boolean

View File

@@ -1,8 +1,6 @@
SCA_RandomActuator(SCA_IActuator)
=================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: SCA_RandomActuator(SCA_IActuator)
@@ -124,4 +122,3 @@ base class --- :class:`SCA_IActuator`
The half-life 'time' is characterized by half_life.
:type half_life: float

View File

@@ -1,8 +1,6 @@
SCA_RandomSensor(SCA_ISensor)
=============================
.. module:: bge.types
base class --- :class:`SCA_ISensor`
.. class:: SCA_RandomSensor(SCA_ISensor)
@@ -20,4 +18,3 @@ base class --- :class:`SCA_ISensor`
The seed of the random number generator.
:type: integer

View File

@@ -1,8 +1,6 @@
SCA_XNORController(SCA_IController)
===================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_XNORController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An XNOR controller activates when all linked sensors are the same (activated or inative).
There are no special python methods for this controller.

View File

@@ -1,8 +1,6 @@
SCA_XORController(SCA_IController)
==================================
.. module:: bge.types
base class --- :class:`SCA_IController`
.. class:: SCA_XORController(SCA_IController)
@@ -10,4 +8,3 @@ base class --- :class:`SCA_IController`
An XOR controller activates when there is the input is mixed, but not when all are on or off.
There are no special python methods for this controller.

File diff suppressed because it is too large Load Diff

View File

@@ -417,19 +417,28 @@ MODULE_GROUPING = {
# -------------------------------BLENDER----------------------------------------
blender_version_strings = [str(v) for v in bpy.app.version]
is_release = bpy.app.version_cycle in {"rc", "release"}
# converting bytes to strings, due to T30154
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
BLENDER_DATE = str(bpy.app.build_date, 'utf_8')
BLENDER_VERSION_DOTS = ".".join(blender_version_strings) # '2.62.1'
if is_release:
# '2.62a'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings[:2]) + bpy.app.version_char
else:
# '2.62.1'
BLENDER_VERSION_DOTS = ".".join(blender_version_strings)
if BLENDER_REVISION != "Unknown":
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION # '2.62.1 SHA1'
# '2.62a SHA1' (release) or '2.62.1 SHA1' (non-release)
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION
BLENDER_VERSION_PATH = "_".join(blender_version_strings) # '2_62_1'
if bpy.app.version_cycle in {"rc", "release"}:
if is_release:
# '2_62a_release'
BLENDER_VERSION_PATH = "%s%s_release" % ("_".join(blender_version_strings[:2]), bpy.app.version_char)
else:
# '2_62_1'
BLENDER_VERSION_PATH = "_".join(blender_version_strings)
# --------------------------DOWNLOADABLE FILES----------------------------------

View File

@@ -568,6 +568,22 @@ void cleanupFaceEdgeAttrsCallback(const MeshSet<3> *left,
&descr->orig_face_edge_mapping);
}
void copyVertexAttrsCallback(const carve::mesh::MeshSet<3>::vertex_t *orig_vert,
const carve::mesh::MeshSet<3>::vertex_t *new_vert,
void *descr_v)
{
CarveMeshDescr *descr = (CarveMeshDescr *) descr_v;
if (!descr->orig_vert_mapping.hasAttribute(orig_vert)) {
return;
}
if (descr->orig_vert_mapping.hasAttribute(new_vert)) {
return;
}
OrigIndex attr = descr->orig_vert_mapping.getAttribute(orig_vert);
descr->orig_vert_mapping.setAttribute(new_vert, attr);
descr->orig_vert_mapping.removeAttribute(orig_vert);
}
} // namespace
CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
@@ -751,6 +767,7 @@ bool carve_performBooleanOperation(CarveMeshDescr *left_mesh,
// done properly. The only way to make such situations working is to
// union intersecting meshes of the same operand.
carve_unionIntersections(&csg, &left, &right,
copyVertexAttrsCallback,
cleanupFaceEdgeAttrsCallback,
(void *) output_descr);

View File

@@ -141,6 +141,11 @@ void carve_getRescaleMinMax(const MeshSet<3> *left,
namespace {
struct UnionIntersectionContext {
VertexAttrsCallback vertex_attr_callback;
void *user_data;
};
void copyMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes,
std::vector<MeshSet<3>::mesh_t*> *new_meshes)
{
@@ -154,24 +159,73 @@ void copyMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes,
}
}
MeshSet<3> *meshSetFromMeshes(const std::vector<MeshSet<3>::mesh_t*> &meshes)
struct NewMeshMapping {
std::map<const MeshSet<3>::edge_t*, MeshSet<3>::vertex_t*> orig_edge_vert;
};
void prepareNewMeshMapping(const std::vector<MeshSet<3>::mesh_t*> &meshes,
NewMeshMapping *mapping)
{
std::vector<MeshSet<3>::mesh_t*> new_meshes;
copyMeshes(meshes, &new_meshes);
return new MeshSet<3>(new_meshes);
for (size_t m = 0; m < meshes.size(); ++m) {
MeshSet<3>::mesh_t *mesh = meshes[m];
for (size_t f = 0; f < mesh->faces.size(); ++f) {
MeshSet<3>::face_t *face = mesh->faces[f];
MeshSet<3>::edge_t *edge = face->edge;
do {
mapping->orig_edge_vert[edge] = edge->vert;
edge = edge->next;
} while (edge != face->edge);
}
}
}
MeshSet<3> *meshSetFromTwoMeshes(const std::vector<MeshSet<3>::mesh_t*> &left_meshes,
void runNewMeshSetHooks(UnionIntersectionContext *ctx,
NewMeshMapping *mapping,
MeshSet<3> *mesh_set)
{
for (size_t m = 0; m < mesh_set->meshes.size(); ++m) {
MeshSet<3>::mesh_t *mesh = mesh_set->meshes[m];
for (size_t f = 0; f < mesh->faces.size(); ++f) {
MeshSet<3>::face_t *face = mesh->faces[f];
MeshSet<3>::edge_t *edge = face->edge;
do {
const MeshSet<3>::vertex_t *orig_vert = mapping->orig_edge_vert[edge];
const MeshSet<3>::vertex_t *new_vert = edge->vert;
ctx->vertex_attr_callback(orig_vert, new_vert, ctx->user_data);
edge = edge->next;
} while (edge != face->edge);
}
}
}
MeshSet<3> *newMeshSetFromMeshesWithAttrs(
UnionIntersectionContext *ctx,
std::vector<MeshSet<3>::mesh_t*> &meshes)
{
NewMeshMapping mapping;
prepareNewMeshMapping(meshes, &mapping);
MeshSet<3> *mesh_set = new MeshSet<3>(meshes);
runNewMeshSetHooks(ctx, &mapping, mesh_set);
return mesh_set;
}
MeshSet<3> *meshSetFromMeshes(UnionIntersectionContext *ctx,
const std::vector<MeshSet<3>::mesh_t*> &meshes)
{
std::vector<MeshSet<3>::mesh_t*> new_meshes;
copyMeshes(meshes, &new_meshes);
return newMeshSetFromMeshesWithAttrs(ctx, new_meshes);
}
MeshSet<3> *meshSetFromTwoMeshes(UnionIntersectionContext *ctx,
const std::vector<MeshSet<3>::mesh_t*> &left_meshes,
const std::vector<MeshSet<3>::mesh_t*> &right_meshes)
{
std::vector<MeshSet<3>::mesh_t*> new_meshes;
copyMeshes(left_meshes, &new_meshes);
copyMeshes(right_meshes, &new_meshes);
return new MeshSet<3>(new_meshes);
return newMeshSetFromMeshesWithAttrs(ctx, new_meshes);
}
bool checkEdgeFaceIntersections_do(Intersections &intersections,
@@ -349,7 +403,8 @@ void getIntersectedOperandMeshes(std::vector<MeshSet<3>::mesh_t*> *meshes,
}
}
MeshSet<3> *getIntersectedOperand(std::vector<MeshSet<3>::mesh_t*> *meshes,
MeshSet<3> *getIntersectedOperand(UnionIntersectionContext *ctx,
std::vector<MeshSet<3>::mesh_t*> *meshes,
const MeshSet<3>::aabb_t &otherAABB,
RTreeCache *rtree_cache,
IntersectCache *intersect_cache)
@@ -360,13 +415,14 @@ MeshSet<3> *getIntersectedOperand(std::vector<MeshSet<3>::mesh_t*> *meshes,
if (operandMeshes.size() == 0)
return NULL;
return meshSetFromMeshes(operandMeshes);
return meshSetFromMeshes(ctx, operandMeshes);
}
MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
MeshSet<3> *poly,
const MeshSet<3> *other_poly,
const MeshSet<3>::aabb_t &otherAABB,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data)
{
@@ -380,7 +436,12 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
RTreeCache rtree_cache;
IntersectCache intersect_cache;
MeshSet<3> *left = getIntersectedOperand(&orig_meshes,
UnionIntersectionContext ctx;
ctx.vertex_attr_callback = vertex_attr_callback;
ctx.user_data = user_data;
MeshSet<3> *left = getIntersectedOperand(&ctx,
&orig_meshes,
otherAABB,
&rtree_cache,
&intersect_cache);
@@ -391,7 +452,8 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
}
while (orig_meshes.size()) {
MeshSet<3> *right = getIntersectedOperand(&orig_meshes,
MeshSet<3> *right = getIntersectedOperand(&ctx,
&orig_meshes,
otherAABB,
&rtree_cache,
&intersect_cache);
@@ -422,7 +484,9 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
catch (carve::exception e) {
std::cerr << "CSG failed, exception " << e.str() << std::endl;
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, right->meshes);
MeshSet<3> *result = meshSetFromTwoMeshes(&ctx,
left->meshes,
right->meshes);
callback(result, other_poly, user_data);
@@ -448,7 +512,9 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
// Append all meshes which doesn't have intersection with another operand as-is.
if (orig_meshes.size()) {
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, orig_meshes);
MeshSet<3> *result = meshSetFromTwoMeshes(&ctx,
left->meshes,
orig_meshes);
delete left;
left = result;
@@ -464,6 +530,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
void carve_unionIntersections(carve::csg::CSG *csg,
MeshSet<3> **left_r,
MeshSet<3> **right_r,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data)
{
@@ -477,9 +544,9 @@ void carve_unionIntersections(carve::csg::CSG *csg,
MeshSet<3>::aabb_t rightAABB = right->getAABB();;
left = unionIntersectingMeshes(csg, left, right, rightAABB,
callback, user_data);
vertex_attr_callback, callback, user_data);
right = unionIntersectingMeshes(csg, right, left, leftAABB,
callback, user_data);
vertex_attr_callback, callback, user_data);
if (left != *left_r) {
delete *left_r;

View File

@@ -70,6 +70,10 @@ void carve_getRescaleMinMax(const carve::mesh::MeshSet<3> *left,
carve::geom3d::Vector *min,
carve::geom3d::Vector *max);
typedef void (*VertexAttrsCallback) (const carve::mesh::MeshSet<3>::vertex_t *orig_vert,
const carve::mesh::MeshSet<3>::vertex_t *new_vert,
void *userdata);
typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
const carve::mesh::MeshSet<3> *right,
void *userdata);
@@ -77,6 +81,7 @@ typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
void carve_unionIntersections(carve::csg::CSG *csg,
carve::mesh::MeshSet<3> **left_r,
carve::mesh::MeshSet<3> **right_r,
VertexAttrsCallback vertex_attr_callback,
UnionIntersectionsCallback callback,
void *user_data);
@@ -148,6 +153,13 @@ namespace carve {
void setAttribute(const meshset_t::vertex_t *v, const attr_t &attr) {
attrs[v] = attr;
}
void removeAttribute(const meshset_t::vertex_t *v) {
typename attrmap_t::iterator it = attrs.find(v);
if (it != attrs.end()) {
attrs.erase(it);
}
}
};
template<typename attr_t>

View File

@@ -107,6 +107,8 @@ ATOMIC_INLINE unsigned int atomic_fetch_and_add_u(unsigned int *p, unsigned int
ATOMIC_INLINE unsigned int atomic_fetch_and_sub_u(unsigned int *p, unsigned int x);
ATOMIC_INLINE unsigned int atomic_cas_u(unsigned int *v, unsigned int old, unsigned int _new);
ATOMIC_INLINE void *atomic_cas_ptr(void **v, void *old, void *_new);
/* WARNING! Float 'atomics' are really faked ones, those are actually closer to some kind of spinlock-sync'ed operation,
* which means they are only efficient if collisions are highly unlikely (i.e. if probability of two threads
* working on the same pointer at the same time is very low). */

View File

@@ -168,6 +168,18 @@ ATOMIC_INLINE unsigned int atomic_cas_u(unsigned int *v, unsigned int old, unsig
#endif
}
/******************************************************************************/
/* Pointer operations. */
ATOMIC_INLINE void *atomic_cas_ptr(void **v, void *old, void *_new)
{
#if (LG_SIZEOF_PTR == 8)
return (void *)atomic_cas_uint64((uint64_t *)v, *(uint64_t *)&old, *(uint64_t *)&_new);
#elif (LG_SIZEOF_PTR == 4)
return (void *)atomic_cas_uint32((uint32_t *)v, *(uint32_t *)&old, *(uint32_t *)&_new);
#endif
}
/******************************************************************************/
/* float operations. */

View File

@@ -89,7 +89,7 @@ bool AUD_SoftwareDevice::AUD_SoftwareHandle::pause(bool keep)
}
AUD_SoftwareDevice::AUD_SoftwareHandle::AUD_SoftwareHandle(AUD_SoftwareDevice* device, boost::shared_ptr<AUD_IReader> reader, boost::shared_ptr<AUD_PitchReader> pitch, boost::shared_ptr<AUD_ResampleReader> resampler, boost::shared_ptr<AUD_ChannelMapperReader> mapper, bool keep) :
m_reader(reader), m_pitch(pitch), m_resampler(resampler), m_mapper(mapper), m_keep(keep), m_user_pitch(1.0f), m_user_volume(1.0f), m_user_pan(0.0f), m_volume(1.0f), m_old_volume(1.0f), m_loopcount(0),
m_reader(reader), m_pitch(pitch), m_resampler(resampler), m_mapper(mapper), m_keep(keep), m_user_pitch(1.0f), m_user_volume(1.0f), m_user_pan(0.0f), m_volume(0.0f), m_old_volume(0.0f), m_loopcount(0),
m_relative(true), m_volume_max(1.0f), m_volume_min(0), m_distance_max(std::numeric_limits<float>::max()),
m_distance_reference(1.0f), m_attenuation(1.0f), m_cone_angle_outer(M_PI), m_cone_angle_inner(M_PI), m_cone_volume_outer(0),
m_flags(AUD_RENDER_CONE), m_stop(NULL), m_stop_data(NULL), m_status(AUD_STATUS_PLAYING), m_device(device)

View File

@@ -205,6 +205,10 @@ if(WITH_CYCLES_DEBUG)
add_definitions(-DWITH_CYCLES_DEBUG)
endif()
if(NOT OPENIMAGEIO_PUGIXML_FOUND)
add_definitions(-DWITH_SYSTEM_PUGIXML)
endif()
include_directories(
SYSTEM
${BOOST_INCLUDE_DIR}

View File

@@ -70,9 +70,9 @@ struct XMLReadState : public XMLReader {
/* Attribute Reading */
static bool xml_read_int(int *value, pugi::xml_node node, const char *name)
static bool xml_read_int(int *value, xml_node node, const char *name)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr) {
*value = atoi(attr.value());
@@ -82,9 +82,9 @@ static bool xml_read_int(int *value, pugi::xml_node node, const char *name)
return false;
}
static bool xml_read_int_array(vector<int>& value, pugi::xml_node node, const char *name)
static bool xml_read_int_array(vector<int>& value, xml_node node, const char *name)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr) {
vector<string> tokens;
@@ -99,9 +99,9 @@ static bool xml_read_int_array(vector<int>& value, pugi::xml_node node, const ch
return false;
}
static bool xml_read_float(float *value, pugi::xml_node node, const char *name)
static bool xml_read_float(float *value, xml_node node, const char *name)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr) {
*value = (float)atof(attr.value());
@@ -111,9 +111,9 @@ static bool xml_read_float(float *value, pugi::xml_node node, const char *name)
return false;
}
static bool xml_read_float_array(vector<float>& value, pugi::xml_node node, const char *name)
static bool xml_read_float_array(vector<float>& value, xml_node node, const char *name)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr) {
vector<string> tokens;
@@ -128,7 +128,7 @@ static bool xml_read_float_array(vector<float>& value, pugi::xml_node node, cons
return false;
}
static bool xml_read_float3(float3 *value, pugi::xml_node node, const char *name)
static bool xml_read_float3(float3 *value, xml_node node, const char *name)
{
vector<float> array;
@@ -140,7 +140,7 @@ static bool xml_read_float3(float3 *value, pugi::xml_node node, const char *name
return false;
}
static bool xml_read_float3_array(vector<float3>& value, pugi::xml_node node, const char *name)
static bool xml_read_float3_array(vector<float3>& value, xml_node node, const char *name)
{
vector<float> array;
@@ -154,7 +154,7 @@ static bool xml_read_float3_array(vector<float3>& value, pugi::xml_node node, co
return false;
}
static bool xml_read_float4(float4 *value, pugi::xml_node node, const char *name)
static bool xml_read_float4(float4 *value, xml_node node, const char *name)
{
vector<float> array;
@@ -166,9 +166,9 @@ static bool xml_read_float4(float4 *value, pugi::xml_node node, const char *name
return false;
}
static bool xml_read_string(string *str, pugi::xml_node node, const char *name)
static bool xml_read_string(string *str, xml_node node, const char *name)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr) {
*str = attr.value();
@@ -178,9 +178,9 @@ static bool xml_read_string(string *str, pugi::xml_node node, const char *name)
return false;
}
static bool xml_equal_string(pugi::xml_node node, const char *name, const char *value)
static bool xml_equal_string(xml_node node, const char *name, const char *value)
{
pugi::xml_attribute attr = node.attribute(name);
xml_attribute attr = node.attribute(name);
if(attr)
return string_iequals(attr.value(), value);
@@ -190,7 +190,7 @@ static bool xml_equal_string(pugi::xml_node node, const char *name, const char *
/* Camera */
static void xml_read_camera(XMLReadState& state, pugi::xml_node node)
static void xml_read_camera(XMLReadState& state, xml_node node)
{
Camera *cam = state.scene->camera;
@@ -210,7 +210,7 @@ static void xml_read_camera(XMLReadState& state, pugi::xml_node node)
/* Shader */
static void xml_read_shader_graph(XMLReadState& state, Shader *shader, pugi::xml_node graph_node)
static void xml_read_shader_graph(XMLReadState& state, Shader *shader, xml_node graph_node)
{
xml_read_node(state, shader, graph_node);
@@ -220,7 +220,7 @@ static void xml_read_shader_graph(XMLReadState& state, Shader *shader, pugi::xml
XMLReader graph_reader;
graph_reader.node_map[ustring("output")] = graph->output();
for(pugi::xml_node node = graph_node.first_child(); node; node = node.next_sibling()) {
for(xml_node node = graph_node.first_child(); node; node = node.next_sibling()) {
ustring node_name(node.name());
if(node_name == "connect") {
@@ -349,7 +349,7 @@ static void xml_read_shader_graph(XMLReadState& state, Shader *shader, pugi::xml
shader->tag_update(state.scene);
}
static void xml_read_shader(XMLReadState& state, pugi::xml_node node)
static void xml_read_shader(XMLReadState& state, xml_node node)
{
Shader *shader = new Shader();
xml_read_shader_graph(state, shader, node);
@@ -358,7 +358,7 @@ static void xml_read_shader(XMLReadState& state, pugi::xml_node node)
/* Background */
static void xml_read_background(XMLReadState& state, pugi::xml_node node)
static void xml_read_background(XMLReadState& state, xml_node node)
{
/* Background Settings */
xml_read_node(state, state.scene->background, node);
@@ -385,7 +385,7 @@ static Mesh *xml_add_mesh(Scene *scene, const Transform& tfm)
return mesh;
}
static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
static void xml_read_mesh(const XMLReadState& state, xml_node node)
{
/* add mesh */
Mesh *mesh = xml_add_mesh(state.scene, state.tfm);
@@ -531,7 +531,7 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
/* Light */
static void xml_read_light(XMLReadState& state, pugi::xml_node node)
static void xml_read_light(XMLReadState& state, xml_node node)
{
Light *light = new Light();
@@ -543,7 +543,7 @@ static void xml_read_light(XMLReadState& state, pugi::xml_node node)
/* Transform */
static void xml_read_transform(pugi::xml_node node, Transform& tfm)
static void xml_read_transform(xml_node node, Transform& tfm)
{
if(node.attribute("matrix")) {
vector<float> matrix;
@@ -572,7 +572,7 @@ static void xml_read_transform(pugi::xml_node node, Transform& tfm)
/* State */
static void xml_read_state(XMLReadState& state, pugi::xml_node node)
static void xml_read_state(XMLReadState& state, xml_node node)
{
/* read shader */
string shadername;
@@ -605,9 +605,9 @@ static void xml_read_state(XMLReadState& state, pugi::xml_node node)
static void xml_read_include(XMLReadState& state, const string& src);
static void xml_read_scene(XMLReadState& state, pugi::xml_node scene_node)
static void xml_read_scene(XMLReadState& state, xml_node scene_node)
{
for(pugi::xml_node node = scene_node.first_child(); node; node = node.next_sibling()) {
for(xml_node node = scene_node.first_child(); node; node = node.next_sibling()) {
if(string_iequals(node.name(), "film")) {
xml_read_node(state, state.scene->film, node);
}
@@ -657,8 +657,8 @@ static void xml_read_scene(XMLReadState& state, pugi::xml_node scene_node)
static void xml_read_include(XMLReadState& state, const string& src)
{
/* open XML document */
pugi::xml_document doc;
pugi::xml_parse_result parse_result;
xml_document doc;
xml_parse_result parse_result;
string path = path_join(state.base, src);
parse_result = doc.load_file(path.c_str());
@@ -667,7 +667,7 @@ static void xml_read_include(XMLReadState& state, const string& src)
XMLReadState substate = state;
substate.base = path_dirname(path);
pugi::xml_node cycles = doc.child("cycles");
xml_node cycles = doc.child("cycles");
xml_read_scene(substate, cycles);
}
else {

View File

@@ -1366,37 +1366,49 @@ class CyclesPreferences(bpy.types.AddonPreferences):
devices = bpy.props.CollectionProperty(type=CyclesDeviceSettings)
def get_devices(self):
import _cycles
# Layout of the device tuples: (Name, Type, Persistent ID)
device_list = _cycles.available_devices()
def find_existing_device_entry(self, device):
for device_entry in self.devices:
if device_entry.id == device[2] and device_entry.type == device[1]:
return device_entry
return None
cuda_devices = []
opencl_devices = []
def update_device_entries(self, device_list):
for device in device_list:
if not device[1] in {'CUDA', 'OPENCL'}:
if not device[1] in {'CUDA', 'OPENCL', 'CPU'}:
continue
entry = None
# Try to find existing Device entry
for dev in self.devices:
if dev.id == device[2] and dev.type == device[1]:
entry = dev
break
entry = self.find_existing_device_entry(device)
# Create new entry if no existing one was found
if not entry:
entry = self.devices.add()
entry.id = device[2]
entry.name = device[0]
entry.type = device[1]
elif entry.name != device[0]:
# Update name in case it changed
entry.name = device[0]
# Sort entries into lists
def get_devices(self):
import _cycles
# Layout of the device tuples: (Name, Type, Persistent ID)
device_list = _cycles.available_devices()
# Make sure device entries are up to date and not referenced before
# we know we don't add new devices. This way we guarantee to not
# hold pointers to a resized array.
self.update_device_entries(device_list)
# Sort entries into lists
cuda_devices = []
opencl_devices = []
for device in device_list:
entry = self.find_existing_device_entry(device)
if entry.type == 'CUDA':
cuda_devices.append(entry)
elif entry.type == 'OPENCL':
opencl_devices.append(entry)
return cuda_devices, opencl_devices
return cuda_devices, opencl_devices
def get_num_gpu_devices(self):
import _cycles

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