Compare commits

...

1327 Commits

Author SHA1 Message Date
30bebec477 Intensity and color are now adjusted upon import to get correct values 2014-08-09 20:43:37 +02:00
Dalai Felinto
1f9657ecc7 Style and related cleanups 2014-08-08 11:09:36 +02:00
704d710ddc remove unused import 2014-08-08 05:52:13 +10:00
315d00f76b Merge branch 'master' into pie-menus 2014-08-08 05:48:40 +10:00
7d20ad6a1b ignore conflict files 2014-08-08 05:47:15 +10:00
f03e2bf47a remove accidental committed file 2014-08-08 05:45:13 +10:00
9a8e889dfc Fix T41173: CM view selection is difficult with multiple views
Use drop-down menu instead of expanded enum for the view select.
There are usually more views than displays and using drop-down
for display device and expanded enum for view is kindof strange.
2014-08-08 01:30:22 +06:00
e1819cc918 Fix T40948: Fill holes fails in certain case 2014-08-08 04:30:24 +10:00
57c4871146 Tweaks to the recent wrapper on windows
- Forgot to handle command line arguments

- Because of the fact we need to be able to
  use stdout and stderr we need to use regular
  console application for the wrapper.

- Because of using regular application for the
  wrapper we need to check forparent PID in the
  isStartedFromCommandPrompt().

I really hope it's not gonna to become any more
complicated.
2014-08-08 00:22:57 +06:00
a108532eb9 Fix for mathutils.Euler on big endian systems
D719 from jrestemeier with edits
2014-08-08 02:11:54 +10:00
29eb567288 Cleanup: unused defines 2014-08-08 02:11:54 +10:00
0e9c677343 Add blender launcher application when building with MSVC
Main idea of this change is to make a small executable which
will set OMP_WAIT_POLICY environment variable and then will
launch blender itself.

This is a teporary solution for the time being we'll have a
more clear solution to high CPU usage with OpenMP when building
with MSVC.

Reviewers: campbellbarton, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D717
2014-08-07 21:45:24 +06:00
d42b85e2d8 Change template to an edit mode selection pie menu. 2014-08-07 17:07:57 +02:00
ec6043cd66 picky - prefer braces 2014-08-08 00:21:20 +10:00
4ce9447b08 remove rna_Space_transform_manipulators_update
Better not have settings manipulate eachother where possible,
in this case an operator could be used to manage mixing manipulator options
2014-08-08 00:21:20 +10:00
26dc8b7c18 T41354, cursor never gets reactivated in uv sculpting. 2014-08-07 16:14:33 +02:00
e6e5fd5475 remove rna_Space_transform_manipulators_update
Better not have settings manipulate eachother where possible,
in this case an operator could be used to manage mixing manipulator options
2014-08-08 00:09:38 +10:00
d73a57698b minor tweaks 2014-08-08 00:02:19 +10:00
c8794563f1 Correct example 2014-08-07 23:48:40 +10:00
ba4bc4c58e Merge branch 'master' into pie-menus
Conflicts:
	source/blender/editors/interface/interface_intern.h
2014-08-07 23:20:57 +10:00
05935b54fa Fix crash on dyntopo when show diffuse option + collapse is used
Some nodes could end up without any faces and in that case getting a
face material would fail.
2014-08-07 14:58:15 +02:00
ab8bcd4038 Fix T41333: Selected mask points don't stand out visually.
Looks like mask points coloring was recently changed, and IMAGE space colors were left uninitialized...
Factorized a bit the code about vertex_handle & co too, was quite duplicated.
2014-08-07 14:37:40 +02:00
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
f82dda557c Experimental gooseberry request:
Expose radial control properties. That way, the operator can be tweaked
in the input preferences to tweak other properties as well.
2014-08-07 12:29:50 +02:00
8323d88ef8 According to final verdict:
* Remove sticky keys
* Remove all pie menus

Left some icon changes to some properties and some reordering of enums
to look better for pie menus (Might go away in a later iteration).

Some pies will make it back as an Add-On (will be a separate commit)
2014-08-07 11:49:29 +02:00
Martijn Berger
d1217cc4b2 change scons default to be visual studio 2013 2014-08-07 10:06:13 +02:00
0b6412607f Comments 2014-08-07 14:42:47 +10:00
e13d6e2768 BMesh: use existing lookup tables when remapping 2014-08-07 11:50:53 +10:00
1b6864752f GHash/EdgeHash: avoid NULL check on iterator init 2014-08-07 11:19:55 +10:00
ea30641d90 Fix T41047: Text objects flipping 2014-08-07 09:14:54 +10:00
1923a5c134 UI: move button to set dupli-offset into group menu 2014-08-07 04:45:37 +10:00
f37c3dd6a6 Fix T41323: Sequencer: video window taking all the place when switching to split view.
Issue is that, when we switch from full preview view to combined view, preview area has
its `sizey` set to use all available height, which leaves nothing for poor main area.

For now, make checks when switching mode to combined one, so that both areas have
resonable `sizey` values. Not perfect, but works.
2014-08-06 20:44:33 +02:00
910d9d4589 Cleanup: mostly move together main area init/draw/handler callback, and some generic cleanup (tabs, comments...). 2014-08-06 20:44:33 +02:00
ef68faa2f9 Fix T41343, hard to remove group from objects.
Added a small menu with a few helper oerators next to each group panel:

* Remove group from all objects
* Select objects in group

More could be added possibly in the future.

Thanks to Campbell for the advice here.
2014-08-06 20:03:16 +02:00
dd5acaaa6c Correct Python exceptions
T35358 by Codemanx
2014-08-07 00:44:55 +10:00
c9dee2b054 Add some missng casts to the size_t 2014-08-06 20:22:24 +06:00
c0c037f41d OSX/clang: Fix T41123, crashing osl when optimization level > O0 is used for osl_shaders.cpp 2014-08-06 13:25:06 +02:00
7ae187c5e4 OSX/cmake: allow for llvm dynamic builds too, but prefer static 2014-08-06 12:48:06 +02:00
9ece95de48 Fix for out of bounds write while dragging 2014-08-06 12:13:11 +10:00
4cf531f7a0 Fix T41318: API change in OSL, I see no other cases but there might be 2014-08-05 23:49:42 +02:00
c82e256ad3 Remove confusing word "faculative" from comments
Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D711
2014-08-05 16:07:10 -04:00
e56de9d9d5 Remove SVN references 2014-08-06 05:46:31 +10:00
ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
e6957bc1d4 Correct change to dupli-drawing
Need exceptions so dupli-frames objects draw in render-only mode.
2014-08-06 04:57:11 +10:00
86e9f84be7 OSX/cmake: move last commited line to a better place 2014-08-05 20:21:22 +02:00
e4146e6fa3 OSX/cmake: force LLVM_STATIC ON, to fix linking issues 2014-08-05 20:15:44 +02:00
5336e68e11 Fix T41062: "copy to selected" doens't work for all attributes.
The issue was that some properties are no direct children of the struct we support in 'copy to selected'
(RNA_Sequence in this case). Since we can't use the ID of sequences here (it's the scene, while we need
a sequence level of control), we had to add a new API helper to RNA path, which takes a RNA type
and return a path relative to the closest ancester of that type.

This way, we get a path from the RNA_Sequence, and can easily apply it to all other valid sequences
to copy the property.

Review, suggestions and edits by Campbell Barton, thanks!
2014-08-05 19:21:14 +02:00
b37b317173 Add RNA access to packed libraries 2014-08-06 03:12:22 +10:00
Dalai Felinto
a48b372b04 Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU
In collaboration with Sergey Sharybin.

Also thanks to Wolfgang Faehnle (mib2berlin) for help testing the
solutions.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-05 13:50:50 -03:00
9855edcacf Fix T41328: Saving a copy changes lib paths 2014-08-06 02:48:37 +10:00
5d5b0db724 API Docs: typos 2014-08-06 02:12:52 +10:00
07da01ddb2 Replace explicit object type check with already-existing macro 2014-08-05 10:57:54 -04:00
f81b6e57cb Add missing forward declaration and missing 'struct' keyword 2014-08-05 10:50:35 -04:00
371fb516cc UI: remove tip when dragging a popup 2014-08-06 00:41:20 +10:00
e123434397 Fix a few typos in carve-capi.h
The typos didn't cause any bug, but the mis-ordered parameter names in CarveExporter_InitGeomArrays were confusing.

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D709
2014-08-05 10:36:45 -04:00
1c8ac33970 Fix incorrect comments in listbase, add unit test to verify change
Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D708
2014-08-05 10:33:24 -04:00
4c3b25ec9e Correct another issue in recent menu handling
mouse clicks to exit a menu were ignored for non-floating popups
2014-08-06 00:06:38 +10:00
4071719ae7 Fix to commit rB77b7e1fe9ab: need ${target} instead of blender in cmake macro. 2014-08-05 07:55:25 -04:00
a192facd8c Fix T41276: OSL bug in getmessage ("trace", "geom:name" , output) 2014-08-05 17:54:08 +06:00
5efa7fa534 Fix possible harmful warning: the value of the size argument in 'strncat' is too large, change the argument to be the free space in the destination buffer minus the terminating null byte 2014-08-05 12:03:31 +02:00
b3e3ca7464 Fix T41318: OSL broken on Linux kubuntu 14.04
Now for real, hopefully.
2014-08-05 15:53:00 +06:00
b9c8572d71 Fix wrong assert happening in the CUEW 2014-08-05 15:28:59 +06:00
Martijn Berger
b9e4929846 Fix: T41318
OSL compiler signature changed with 1.5.
2014-08-05 11:11:52 +02:00
77b7e1fe9a Deduplicate CUDA and OpenCL wranglers
For now it was mainly about OpenCL wrangler being duplicated
between Cycles and Compositor, but with OpenSubdiv work those
wranglers were gonna to be duplicated just once again.

This commit makes it so Cycles and Compositor uses wranglers
from this repositories:

  - https://github.com/CudaWrangler/cuew
  - https://github.com/OpenCLWrangler/clew

This repositories are based on the wranglers we used before
and they'll be likely continued maintaining by us plus some
more players in the market.

Pretty much straightforward change with some tricks in the
CMake/SCons to make this libs being passed to the linker
after all other libraries in order to make OpenSubdiv linked
against those wranglers in the future.

For those who're worrying about Cycles being less standalone,
it's not truth, it's rather more flexible now and in the future
different wranglers might be used in Cycles. For now it'll
just mean those libs would need to be put into Cycles repository
together with some other libs from Blender such as mikkspace.

This is mainly platform maintenance commit, should not be any
changes to the user space.

Reviewers: juicyfruit, dingto, campbellbarton

Reviewed By: juicyfruit, dingto, campbellbarton

Differential Revision: https://developer.blender.org/D707
2014-08-05 13:57:50 +06:00
a3fac84c73 Cleanup: indentation 2014-08-05 13:36:35 +10:00
f0259d0a53 Fix for double freeing of MEM_guardedalloc'ed memory originating from BLF_lang_set(). 2014-08-05 11:21:02 +09:00
6b6ea0485f Macros: replace UNPACK#OP -> UNPACK#_EX, allow suffix 2014-08-05 08:06:19 +10:00
e4a13e40eb Fix memory leak of main lock when reading from library files. 2014-08-04 16:01:48 +02:00
6ba4db2906 Fix T41175: Quad View - Properties Region - Clip Tickable option bug? 2014-08-04 14:27:18 +02:00
a90e49e40a Tweaks to macros 2014-08-04 11:43:10 +10:00
a039f2bfc4 Macros: prevent instantiation of args for type checks
also make CHECK_TYPE_INLINE more strict
2014-08-04 11:18:33 +10:00
cc28e02a85 Cleanup: replace int cast with floorf when comparing time 2014-08-04 10:22:45 +10:00
7848bf00b8 Correct cu->pathlen treated as a float 2014-08-04 10:15:25 +10:00
784c99f53c Correct glitch in recent menu commit, click-drag locked menus 2014-08-04 06:03:56 +10:00
6fa6fa2fa2 Fix T41284: The python ops log doesn't work. 2014-08-03 21:17:41 +02:00
b3faabae2f Fixed linking OIIO on Windows. The debug and optimized options need to be before each individual library in a list. 2014-08-03 11:35:39 -05:00
2b67bf7510 Bring back extrude menu (was removed on earlier iteration of the code,
no need to have this anymore)
2014-08-03 16:52:59 +02:00
02b66f8a55 OSX/buildsystem: prepare usage on OSX 10.10 - Yosemite
- important: requires cmake >= 2.8.12 to read minor version right,
aka older cmake rates 10.10 lower than 10.6 for example ! ( sigh )
2014-08-03 12:51:35 +02:00
47e7ce696c Fix for glitch with menus not reliably setting an active item (D674)
When menus are clamped to the window bounds,
its was possible not to have an active menu-item under the mouse,
Making Ctrl+S,Enter not completely reliable.

Changes needed to support this are:

- menu item is activated on popup menus
  (to avoid relying on mouse-over)
- moving mouse away from menu items only de-activates when over a new menu-item.
- Mouse clicks are ignored if they are not directly over the menu item.
2014-08-03 20:35:28 +10:00
863fd8a4fc rename ui_pie -> ui_(but/block)_pie 2014-08-03 04:14:53 +10:00
8e12efb431 set UI_RADIAL_NONE to -1 so we can use the enum to undex arrays 2014-08-03 02:28:31 +10:00
485f9b88db minor formatting 2014-08-03 02:17:43 +10:00
c3b87fced2 Minor edits to draw_disk_shaded 2014-08-03 02:15:27 +10:00
4e52fac147 replace switches with lookups 2014-08-03 02:14:15 +10:00
20cb5f7a3e Hide Center Points option if not in object mode 2014-08-02 18:11:07 +02:00
5b5c8afb60 Attempt to support retina also cleanup on identifier 2014-08-02 17:26:54 +02:00
e7b396c954 fix check for not llvm 2014-08-02 15:30:28 +02:00
249fbbf764 Collada and llvm both use the same functions and they clash.
Since we have older llvm for msvc2008 and new one for msvc2013 we need to work around it.
2014-08-02 15:20:03 +02:00
d5b471eec1 CMake: add header 2014-08-02 19:16:00 +10:00
88a0d5ebe8 Make CHECK_TYPE_NONCONST macro portable
also replace __typeof -> typeof
2014-08-02 18:08:44 +10:00
d98b6a289c BMesh: typecheck iterator 2014-08-02 18:05:13 +10:00
bc9bbca41b Move to OIIO 1.4 also for windows x86 2014-08-02 09:59:09 +02:00
9c3025cd26 Spelling 2014-08-02 16:53:52 +10:00
4fe223ab0e Simplify some 2d vector use 2014-08-02 04:29:37 +10:00
b7ad6b4437 Minor changes, sync with master 2014-08-02 04:12:47 +10:00
567e062102 Merge branch 'master' into pie-menus 2014-08-02 03:13:58 +10:00
7b83e3d6d7 CMake: tweak so 2.8.7 and older still work (disable WITH_BUILDINFO) 2014-08-02 03:08:29 +10:00
ed62c38730 Final fix for X11 weirdness.
Fortunately the extra keypress that comes after keyrelease has a time
signature less or equal than the last keyrelease of the same type, so
the included code will enable us to detect and reject such keypresses
safely and without many hacks.
2014-08-01 17:51:30 +02:00
3c9e11df37 Cleanup: Move SpaceTransform helpers from BKE_shrinkwrap to BLI_math_matrix. 2014-08-01 16:31:06 +02:00
c11777b211 Cleanup: Move object_get_derived_final from BKE_shrinkwrap to BKE_DerivedMesh
Note this func needs some love, but this will be for later (should never have been in shrinkwrap code!).
2014-08-01 16:31:06 +02:00
59f4ba854b Cycles: Update stdosl.h for OSL 1.5. 2014-08-01 15:23:58 +02:00
f51282fc57 Cmake prefers NOT to ! 2014-08-01 15:18:34 +02:00
0d1484e4ad Make function definition consistent with function declaration (as discussed with campbell) 2014-08-01 14:32:04 +02:00
6d7333a2f5 Fix msvc 2013 / win64 to use new OIIO and llvm and resulting linking
requirements
2014-08-01 14:28:00 +02:00
7f32cf4605 Prevent macros hiding casts from const pointers 2014-08-01 22:03:03 +10:00
c9366a2969 Make build work with llvm3.4 and oiio 1.4 2014-08-01 13:43:12 +02:00
42aef164f4 Fix T41197: Blender freezes to infinite loop when switching to PAUSED Cycles rendered viewport 2014-08-01 16:57:43 +06:00
b8801997b2 Revert "X11 code that disables autorepeat."
This reverts commit b892c8a452.

It's difficult to count exit and entrance for pie menus, since it can be done
in many different ways and there are cases where defocusing from blender window
can make the system confused. This is not so serious in itself but this disables
autocomplete -everywhere- on the system and it really is troubling when
it doesn't work. Even navigation on webpages by holding directional keys
breaks. We will use dufferent code to detect autorepeats here.
2014-08-01 12:11:56 +02:00
2f2bf513e9 Revert "Fix T41226: Wrong Undo on curves and hooks"
This reverts commit e042c8428f.

Proper fix will come later, or be declared a TODO.
2014-08-01 12:30:41 +06:00
3e607f61b5 OSX/cmake: adapt bundle structure according scons 2014-08-01 01:23:31 +02:00
Dalai Felinto
7f9a4c0c42 Bake-API: cleanup - missing (size_t) promotion 2014-07-31 20:09:07 -03:00
23190c3c73 OSX: updated codesigning README and removed not longer valid rule plists 2014-08-01 01:01:12 +02:00
a4c287ed7d OSX/scons: Change Blender bundle datastructures + referennces to match the upcoming codesigning needs
- i used deprecated rules up to now which will break in OSX > 10.9.5 and 10.10 > dp4
- todo: adapt cmake due it will break with this commit
2014-08-01 00:57:17 +02:00
b892c8a452 X11 code that disables autorepeat.
This makes it so as long as there is a pie menu active, autorepeat is
off. It is meant to cater for support for multiple coexisting pies in
the future too but no tests can be really made here yet.
2014-07-31 18:38:06 +02:00
54472df750 Fix T41236: Rendered viewport doesn't update with material actions
The issue was caused by NLA evaluation without actions not setting
id's flag as updated (as that's happening when action writes data
to the ID datablock).

Added the same flag set for the NLA evaluation as what's happening
for actions.
2014-07-31 22:06:05 +06:00
da638d49e3 Style cleanup 2014-08-01 02:03:09 +10:00
664dc55305 Remove force click argument, now pies detect click style automatically 2014-07-31 18:00:15 +02:00
0a3f279855 Remove X11 hack.
Cannot reproduce original issue on studio pc anymore, will try on other
pcs too to make sure it is unneeded now (maybe issue was fixed upstream
or pie interaction system now hides this better.)
2014-07-31 17:38:08 +02:00
5e3af04b08 Fix build player... 2014-07-31 17:34:13 +02:00
f52cdcf97c Merge branch 'master' into pie-menus 2014-07-31 17:08:35 +02:00
4f18ab1b20 Fix T40958 align rotation + project individual elements not working
This is another example of transform code crappiness. Projection
snapping for objects is handled separately than regular snapping.
Luckilly for us, we have the normal ready from the raycast result and a
copy of code from ElementRotation function can do the necessary
rotations for us.

I have not enforced constraints here (arguably, maybe I should, and the
already present projection snapping should do that too but seems it is
commented out and the unorthodox order of operations here has me a bit
scared. Leaving as TODO)
2014-07-31 17:02:17 +02:00
bcbbed0ccf Use dynamically linked SDL 1.2.15 on windows x64 2014-07-31 16:43:02 +02:00
eb016eb3ae Fix T41258: Crash when entering edit mode while viewport render is enabled
The issue was caused by the render engine loading edit mesh, which re-allocates
mesh array which might be referenced by other object's derived meshed.

Worst thing about this is that updating render engine happens from the end of
scene update function, after all the objects are updated and so. This is needed
so render engine gets the update objects which is correct.

The only proper way to solve the issue is to make it so viewport engine does not
leave objects in inconsistent state, meaning nobody will reference to freed data.

In order to reach this we do edit mesh loading before running objects update so
all the objects which uses that mesh will have proper references in the derived
mesh.

This also solves old creepyness which happened before when having single object
in edit mode. tweaking it will calculate derived mesh as a part of scene update,
then this derived mesh will be freed by edit mesh loading and viewport will be
creating derived mesh again.

Now render engine is expected to do nothing with meshes which are in edit mode,
but they still need to load edit data for non0meshes. It's not really easy to
do from the BKE level because needed functions are implemented in the editor.

Thanks Campbell for the review!

Differential Revision: https://developer.blender.org/D697
2014-07-31 20:25:11 +06:00
0ae03b6fa1 minor edits - sync with master
also use ***_menu_pie for operator names
2014-07-31 23:13:18 +10:00
3ccd9b78a9 Partial fix of T40824,
Fill selection for file browser moves to ctrl-shift click due to
collision with emulate middle mouse button option
2014-07-31 14:26:06 +02:00
e042c8428f Fix T41226: Wrong Undo on curves and hooks 2014-07-31 18:21:57 +06:00
cba027c8c3 Fix T41140
Yet another attempt to fix the annoying lines that crop up in texture
painting on edges and quads. I feel this needs better investigation but
using pixel tolerance here looks like alleviates the issue.
2014-07-31 12:15:38 +02:00
e7dbf553e8 Fix T41257.
We need to allow faces without slots to initialize a UV layer or seam
checking code will go bananas.
2014-07-31 11:46:28 +02:00
eb20ebe5c2 Change blender subversion correctly for pie menus. Also no need for
conditionals here.
2014-07-31 11:05:34 +02:00
Dalai Felinto
5c3c3abb45 Cycles Bake: use size_t instead of width, height
(original patch by Sergey Sharybin)

Note: RNA API can't use size_t at the moment. Once it does this patch
can be tweaked a bit to fully benefit from size_t larger dimensions.
(right now num_pixels is passed as int)

Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D688
2014-07-31 00:35:17 -03:00
Dalai Felinto
9952699978 Bake-API: use size_t instead of width, height
(original patch by Sergey Sharybin)

Note: RNA API can't use size_t at the moment. Once it does this patch
can be tweaked a bit to fully benefit from size_t larger dimensions.
(right now num_pixels is passed as int)

Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D688
2014-07-31 00:35:16 -03:00
5e4a97d109 Default LLVM_STATIC to OFF (it's kinda broken currently, gives various linking issues). 2014-07-30 20:31:13 +02:00
d60804b72d Fixes:
* Space sticky did not call search menu
* Cancelling and confirming with no active button would respawn the pie
menu immediately in drag style interaction
* Area now covers the whole screen, collision with pie buttons is done
always.
2014-07-30 19:01:48 +02:00
b4bda0390d user lower threshold for Harris feature detector 2014-07-30 22:27:41 +06:00
e38cafbe51 Fix issue with navigation pie/search menu 2014-07-30 18:20:02 +02:00
099038a6f9 BLI_path_utils: rename BLI_clean -> BLI_path_native_slash 2014-07-31 01:40:47 +10:00
fa8d38da74 Fix T41241: VSE: cropping strips puts a transparent line through the image. 2014-07-30 17:29:06 +02:00
dcf5c52e44 Change the enum fetching code to be order independent.
This is done by checking each item in a dynamic enum for existence.

This can result in n^2 cost in worst case (for 8 items about 64 steps)
but since this is done once on initialization and makes the system more
robust, better prefer it.
2014-07-30 17:20:26 +02:00
b844da7750 Code cleanup, move function to correct header 2014-07-30 16:29:54 +02:00
5eae52ae96 Quiet double promotion warnings 2014-07-31 00:00:18 +10:00
759d772408 Merge branch 'master' into pie-menus 2014-07-30 15:51:35 +02:00
70d69aa2ae Code cleanup, make pie-menus code be closer to master 2014-07-30 15:51:12 +02:00
517d28ea26 Change rename to one proposed by Campbell 2014-07-30 15:47:56 +02:00
90906db4fd Address Dalai's concerns 2014-07-30 15:37:05 +02:00
3a58c4679a Fix addon crash when trying listdir a directory we have no permission to. 2014-07-30 15:35:19 +02:00
0f34796ed9 * Move view pie to sticky space (to avoid clashes with many add-ons)
* Fix naming
2014-07-30 14:57:20 +02:00
6c4bab22db add ui_radial_dir_to_num lookup to avoid long switch () 2014-07-30 22:40:36 +10:00
ba3acdeba0 Fix tooltips for numpad numbering 2014-07-30 13:53:23 +02:00
7a4cec4c22 use macro for numpad direction & deduplicate 2014-07-30 21:31:39 +10:00
c18e168c09 Numbers appear on pie menu items, showing which number corresponds to
them
2014-07-30 13:24:57 +02:00
9643f78cfe Pie menus:
Numeric input support.

After a bit of thought, I chose a scheme based on directions, starting
from top and going clockwise. We count empty positions too, so each
number from 1-8 is bound to a specific direction. There are no text
indicators on the menu items yet for the numbers.
2014-07-30 13:01:45 +02:00
ba918f2f3d Clamp pies against window borders only, not screen borders.
Added after Dalai's suggestion. Initially i was against this but
clamping against editor area makes pies feel cramped indeed and more
often than not causes a shift in the spawned menu position.

It's not 100% certain still we'll keep this, but having a nice commit
with the feature is not bad either.
2014-07-30 12:25:56 +02:00
74758576fc Cleanup: general cleanup in BLI_math code (mostly, use 'const' where possible, true/false for booleans, format for float litterals). 2014-07-30 12:19:41 +02:00
eea7521e21 leanup: style, use 'const' where possible, and simplified blend funcs.
Much better to use small loops when doing complex operations over color elements
(any serious compiler will flatten them anyway), avoids (some!) stupid mistakes when
editing their code.

Also, use min/max funcs instead of lengthier 'if (foo < 0) foo = 0'.
2014-07-30 12:19:41 +02:00
14297dd2fd Automatic commit by arc 2014-07-30 12:02:33 +02:00
4849583e24 BMesh: callback for bmbvh so caller can choose faces 2014-07-30 16:50:28 +10:00
3a4e8f8184 Bugfix T41240: Home key doesn't show everything on F-Curves
Own copy and paste typo in 73d157e meant that this was not in some cases,
the bounds calculated may be incorrect.
2014-07-30 18:16:09 +12:00
f06be2b4f4 missed last commit 2014-07-30 15:02:42 +10:00
b64e36d26d BLI_listbase: consistent name prefix 2014-07-30 15:01:16 +10:00
ce0ff266e9 GHash: generic comparison for int[4] 2014-07-30 07:30:18 +10:00
Dalai Felinto
f6fc2f5991 small cleanup against mater to avoid conflict when merge-testing with multiview 2014-07-29 17:49:28 -03:00
c4dd294f40 OSX/buildbot: after recent scons fix, UTF lib linkage is handled dependent on config, so remove now obsolete lines 2014-07-29 20:08:41 +02:00
f557b477ad OSX/cmake: fix linking utf-functions if llvm is disabled 2014-07-29 19:46:15 +02:00
0b064ce2d4 Only modify outline of selected pie items. 2014-07-29 17:50:21 +02:00
da844af3a0 Proper fix for previous fix (tm) 2014-07-29 17:42:07 +02:00
4a17f1bd62 Manipulator property toggle did not work. Add toggle operator instead 2014-07-29 16:19:49 +02:00
65df2781fd Proper fix of tooltips not exiting 2014-07-29 15:46:41 +02:00
42ba931fed Fix T41223: F-Curve sliders won't update values during playback when mouse cursor is outside the left panel. 2014-07-29 15:31:53 +02:00
ea3a11fa69 Fix tooltip sticking to button 2014-07-29 15:13:02 +02:00
ab409e645d Pies:
* Fix issue with repositioned pie menus
* Reduce default animation time
2014-07-29 15:08:17 +02:00
976526559d Fix T41228: Selection of bones bug.
Turns out to be mostly some cleanup in Pose select code, got rid of magic numbers
(now understand usual SEL_xxx enums) in ED_pose_deselectall(), which was renamed
to ED_pose_de_selectall, and have a new bool parameter to ignore visibility status
in its process (was the root of the reported issue).

Also factorized slightly "(de)select all" code. Yet this area could use much more
cleanup probably...
2014-07-29 15:02:28 +02:00
bc11096db4 Change to pie iinteraction:
After discussion with Campbell use combination of drag/click style
interaction and ommit option:

If initial button is released while the menu is still within the
threshold then switch to click style. If not then do regular selection.
2014-07-29 14:36:03 +02:00
336ca4e398 Use UI_DPI_WINDOW_FAC define 2014-07-29 21:31:28 +10:00
e0fd1bf432 Fix T41227: Do not select unselectable items when unhiding them! 2014-07-29 12:58:12 +02:00
0ed8058347 Pie radius scales correctly with DPI 2014-07-29 12:53:22 +02:00
06278f03dd Bring back good ole regular menu here so people can use number
accelerators as they are used to.
2014-07-29 12:48:24 +02:00
5fd10b15a6 Revert "Pie Menus:"
This reverts commit 0d92435a71.

The reason is that the operator needs greater changes for this to work
correctly, may even better to have a new operator for this operation
2014-07-29 12:12:21 +02:00
946f291c46 Fix T41174: Tangent space required UV map in Cycles
Now Cycles behaves in the same way as BI in terms of using
sphere projection of orco coordinates if there's no UV map
when calculating tangent space.
2014-07-29 16:08:47 +06:00
0d92435a71 Pie Menus:
* Editmesh selection pie can spawn combinations.

* Remove extraneous flag from operators.
2014-07-29 11:44:27 +02:00
a9c8a117a2 OSX/scons: Fix linking if llvm is not used ( new osl/llvm/oiio related ) 2014-07-29 10:59:57 +02:00
564c48a068 Cycles: Make Glass Shader Color default to 1.0.
This came up a few times already, most of the time you want a clear white glass, and not a greyish like one. :)
2014-07-29 10:11:30 +02:00
65bf694331 Implement get_split_task_count to make device_network compile again. 2014-07-29 07:40:04 +02:00
8f947ff34a BGE: Constraint wrapper fix.
1. This patch fix the KX_ConstraintWrapper documentation (radian instead of degrees).
2. It also adds the missing GENERIC_6DOF_CONSTRAINT constant.

Reviewers: dfelinto

Reviewed By: dfelinto

Differential Revision: https://developer.blender.org/D672
2014-07-29 00:22:13 -03:00
Dalai Felinto
a21a9ddbce Fix T41204 Python KX_lightObject.distance bug by Jon Szabo (thatonejonguy)
Reviewers: dfelinto

Subscribers: thatonejonguy

Projects: #game_engine

Differential Revision: https://developer.blender.org/D689
2014-07-29 00:19:26 -03:00
939503ac83 Install_deps: Raise openexr/ilmbase magic numbers, looks to be needed...
Btw, if someone can explain me why OPENEXR_FORCE_REBUILD does not work like
all other force options... :/
2014-07-28 21:13:57 +02:00
e3e9cab149 OSX/buildbot: Fix 32bit compile by removing OSL/LLVM and add back UTF to Collada
- due OSL i386 never worked on OSX, the new libs do not even contain this arch !
- As we had to fix duplicated symbols from generic UTF finctions same in LLVM and COLLADA,
LLVM-less build must have UTF lib reenabled
2014-07-28 21:03:42 +02:00
6355e3a45d As suggested by Campbell, rather use BVHTree to get len_diff in this morning's fix.
Note than it's using nearest faces, since it showed to be much more performant than
nearest vertex (quite odd, it's about 40% slower for the first element, then 50 times quicker
for all others, as if BVH was cached, and building face was slower than verts one,
but then using it, much quicker!).
2014-07-28 20:34:23 +02:00
c3f8a08fe4 Add simple pie menu template 2014-07-28 20:22:41 +02:00
dfccfeb447 CMake: add glew-mx library 2014-07-29 03:53:15 +10:00
02b6ba8874 CMake: use our template for finding the glew library 2014-07-29 03:43:49 +10:00
435d19f772 Fix bundling of requests on debian-like systems
Couple of issues:

- Debian systems doesn't use site-packages but uses
  dist-packages instead.

- Requetss from ubuntu repository depends on urlllib3
  and chardet, which also implies six. copy those libs
  as well.

I know it's all rather annoying, but no that much
choise is in here..
2014-07-28 23:16:39 +06:00
2c51978d2b Switch buildbot to new llvm/oiio/osl 2014-07-28 23:00:21 +06:00
b5ce99ddf7 Calculate correct segment when offsetting the pie menu. 2014-07-28 17:13:44 +02:00
8359fa245e Pie menus:
* Rename Align -> Center points in pivot menu
* Turn Manipulator on when a manipulator is selected in manipulator pie
2014-07-28 16:56:07 +02:00
c85265b455 Make requests python package to be detected in the same way as numpy
This solves missing requests package reported on the systems where it's
located in dist-packages rather than in site-packages.

To do this there's now a helper macros which handles both requests and
numpy now and could be used for more packages in the future.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D686
2014-07-28 20:53:02 +06:00
cae1d7dab0 Merge branch 'master' into pie-menus 2014-07-28 16:25:10 +02:00
09977b40c4 Pie Menus:
* Do not recenter items for animation if animation timeout is zero. Avoids
flickering at start of animation

* Initialize pies with invalid direction
2014-07-28 16:19:00 +02:00
c4b47b89f7 Fix T41191: Face snapping doesn't work properly.
Issue was caused by rB47ec0394ca3d, which disabled BBox check in editmode - but bbox check was also
setting `len_diff`, which is mandatory when doing ray_start_local correction for ortho view...

Now, in this case, we do a quick rough compute of len_diff from vertices coordinates (accuracy is not
needed here, we just have to be sure corrected `ray_start_local` remains 'before' (outside) of the
geometry).
2014-07-28 15:21:42 +02:00
45bff7af39 New pies:
* Snapping sticky pie (comma key)
* Pivot sticky pie (period key)
2014-07-28 14:46:25 +02:00
b192c1da74 Expose pie animation timeo to user preferences. 2014-07-28 14:00:58 +02:00
69c0e5f175 Fix some remaining issues with the shade pie menu 2014-07-28 13:21:20 +02:00
1a9252d97e Fix T41206: Render Border - Operator Panel - Only Camera - Broken?
This is rather internal use only, no need to expose this option to
the redo panel.
2014-07-28 17:18:08 +06:00
d49b86d0f9 Fix T41201: Blender Crashes when UV Editing
Disable adding snapping point outside of 3D space for now,
visualization of the points is not implemented outside of
this space and silently adding them wouldn't really be a
good idea.
2014-07-28 17:11:41 +06:00
6ac1a646ec Pies:
* Remove testing pie menu
* Fix enums with missing items not using radial layout
* Fix recentering on bounds not working anymore
* View pie was missing material mode in blender internal.
2014-07-28 13:11:11 +02:00
93d0a2c224 Warnings 2014-07-28 20:45:36 +10:00
baa58c7db4 Reduce OM limit for sculpting after discussion with Antony
That's rather tricky to think of a good threshold here, and
maybe we'd better use something based on the number of faces
instead.

Anyway, let's give it a try this way and see what happens.
2014-07-28 16:42:08 +06:00
ff37a1d7fc Fix T41221: 3d view rendered mode crashes on new scene 2014-07-28 16:32:36 +06:00
5bfbe64a21 Fix T40831: Shrink wrap modifier causes very high CPU usage when targeting meshes with shaped keys
Same issue as revious one -- need to start OMP threads only
when there's enough data to crunch.
2014-07-28 16:14:52 +06:00
df01833477 RNA: check for valid ranges with int properties (C11 only) 2014-07-28 20:08:25 +10:00
115458b53e Fix T41193: 2.71 use 100% of CPU at sculpt
Issue wascaused by the famous OpenMP crap in MSVC2013,
so only way is to use openmp threading if number of BVH
nodes is high enough.

Made it 8 for now, which seems to work rather fine on my
laptop and adult dragon from sintel. But maybe it's to be
adjusted a bit more.
2014-07-28 15:47:32 +06:00
82ceab593c Fix invalid RNA limits 2014-07-28 17:47:06 +10:00
046d7590a6 UI: Change appearance for panel drag area (D637)
Patch by blakenator with own edits
2014-07-28 15:01:01 +10:00
34937f6547 Fix T41139: Cycles Hair BSDF roughness problem 2014-07-27 19:51:28 +06:00
Dalai Felinto
234ae0b5ac T41196: Python call of bake operator cause Blender Crash
We could make the exec to also show the progress bar, but I think it is not needed.
2014-07-27 10:37:05 -03:00
45846d6779 ignore in-source doc building dirs 2014-07-27 22:04:10 +10:00
5cab28290c Fix uninitialized vars 2014-07-27 18:15:18 +10:00
313ce5aa85 Install_deps: forgot to cleanup that in latest commits. 2014-07-27 09:15:20 +02:00
2d84072ada CMake/MSVC: use '/SAFESEH:NO' linker flag, needed for some systens (D682) 2014-07-27 13:50:21 +10:00
648ee669b7 Style cleanup GHOST/Win32 2014-07-27 13:40:39 +10:00
698a9a2434 Fix T41180: Crash when using motion blur with Freestyle.
In pipeline.c, do_render_3d() is called multiple times for each frame when
motion blur is used.  This caused duplicates of the same struct Render instance
in re->freestyle_renders, resulting in fatal double freeing of allocated memory.
2014-07-27 03:12:54 +09:00
333aaca294 OSX/GHOST: Using lion_fullscreen suffers from an uncovered problem when called from operator, disabled for now so ALT-F11
uses old behavior again. OSX menu and CTL-CMD-F still work as lion fullscreen as well as right-upper corner fs window-icon
- We must investigate here why double promotion happens from op calls ( dispatchEvents on redraw cause duplicated calls here )
- The actual op calls cause fs to be in a wrong state, so also mousehandles fail and CTX_wm_window(C) is not valid.
- similar problem is with quit op, which does not close the app right ( totblocks )
- i would prefer to try getting direct os function call here rather
2014-07-26 18:51:39 +02:00
cd59daca53 OSX/cmake: little tweak for last commit 2014-07-26 18:39:45 +02:00
d4dadaea96 OSX/cmake: update buildsys for new osl/llvm/oiio usage, also use osx_locals.map in cmake
- fixes T40887
2014-07-26 18:10:26 +02:00
a6eeeee4ab Adding Mask select mode to Assign weights from Bone Heat (when called in Weight Paint mode)
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D681
2014-07-26 17:54:18 +02:00
e15cdec2d4 New compositor node "Sun Beams"
This allows adding a "fake" sun beam effect, simulating crepuscular rays
from light being scattered in a medium like the atmosphere or deep water.
Such effects can be created also by renderers using volumetric lighting,
but the compositor feature is a lot cheaper and is independent from 3D
rendering. This makes it ideally suited for motion graphics.

The implementation uses am optimized accumulation method for gathering
color values along a line segment. The inner buffer loop uses fixed
offset increments to avoid unnecessary multiplications and avoids
variables by using compile-time specialization (see inline comments
for further details).
2014-07-26 12:59:29 +02:00
08725cce5a Correct includes on different endian systems 2014-07-26 18:39:27 +10:00
87799657fe Transform manipulator sticky pie menu (ctrl-space) 2014-07-25 22:03:15 +02:00
51120efbce Fix bug in validate mesh code (could use index out of range). 2014-07-25 18:44:32 +02:00
Dalai Felinto
fc55c41bba Cycles Bake: show progress bar during bake
Baking progress preview is not possible, in parts due to the way the API
was designed. But at least you get to see the progress bar while baking.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D656
2014-07-25 11:42:53 -03:00
2e50b4dc51 Minor changes:
* Changing UV map updates the UV editor.
* UV Layer -> UV Map
2014-07-25 15:27:17 +02:00
84b7035227 Pie menus:
* Click and close for drag style pie menus to work better
* Pie menus now handle letter events for quick selecting items
* Double buttons do not enforce click style (left the code in just in
case, but deactivated the argument for now)
2014-07-25 15:06:15 +02:00
Martijn Berger
bae2b3a688 Switch to Cuda 4.0 style api for kernel invocation. This is a small clean-up that has no functional changes but makes code a bit more readable.
Differential revision: https://developer.blender.org/D659

Reviewed by: Sergey Sharybin, Thomas Dinges
2014-07-25 13:33:19 +02:00
d0f0d82205 Install_deps: Force to always compile OCIO for now.
This is a much simpler fix to that libyaml-cpp mess, since doing it that way we get our static own
libyaml-cpp... And this should work for all platforms (realized libymal-cpp-ver option was only
implemented for deb-like distro, since it was the first place where issue showed up :/ ).
2014-07-25 12:54:55 +02:00
8bda8ec006 Install_deps: Update OSL to 1.5.10, llvm to 3.4 and oiio to 1.4.11.
Note: had to swicth back to own repo for osl as well, ILM guys seem unable to handle
CMake build system properly!
2014-07-25 12:54:55 +02:00
af585e843b Fix inconsistent use of print_error() and fprintf(stderr, ...) in MEM_guarded_printmemlist_internal().
Also extended the size of buf[] in print_error() to prevent mem_printmemlist_pydict_script[]
from getting truncated when MEM_printmemlist_pydict() is used.

Differential revision: https://developer.blender.org/D675

Reviewed by: Campbell Barton
2014-07-25 19:24:24 +09:00
c0a9337caa Yet another OSL compilation fix...sorry. 2014-07-25 11:42:21 +02:00
6cff19a0bf Cycles: Drop old OSL closure compatibility code.
This was added to keep custom OSL scripts with Toon and SSS closure calls working. 1 year after the change, we can drop the compatibility code now.
2014-07-25 11:42:01 +02:00
dadf31f0b8 One more fix for new OSL libs. 2014-07-25 11:23:15 +02:00
9a904a3857 OSX: adaptions needed for renewed osl/oiio/llvm 2014-07-25 10:27:30 +02:00
Matteo F. Vescovi
c3f09c06cb Fix atomix operations on unofficial 64bit archs 2014-07-25 12:26:10 +06:00
2dc139cd89 Source Checkers: Include intern/ libs we maintain in spelling checks 2014-07-25 15:17:29 +10:00
369d96bacc CMake: use a list for PLATFORM_LINKLIBS 2014-07-25 14:35:53 +10:00
6582215f87 Cycles: Updates for new OSL 1.5 API.
Differential Revision: https://developer.blender.org/D662

Patch by Sergey and myself.
2014-07-24 23:07:49 +02:00
35f07cfc1b Buildbot: Never write 'master' branch in packed file names. 2014-07-24 19:34:32 +02:00
9241221ff1 Pie Menus:
* Fix flickering in pie menus.
* Start from center position initially.
* Fix memory over-cleanup.
* All stroke selections in paint systems use pie menus.
2014-07-24 17:20:18 +02:00
157fc43369 Implement option to parent object to undistorted position of 2D track 2014-07-24 21:01:19 +06:00
37e9ab73e1 Merge branch 'master' into pie-menus
Conflicts:
	source/blender/editors/interface/interface_handlers.c
	source/blender/editors/sculpt_paint/paint_ops.c
	source/blender/editors/space_api/spacetypes.c
2014-07-24 16:30:27 +02:00
d2cf9f0c4b Fix UI still allowing addition of slots in cycles if material did not
use nodes.
2014-07-24 15:28:02 +02:00
41c31b8e55 Correction to recent rip-tear 2014-07-24 23:25:01 +10:00
de4629880e Fix T40925: Scene gravity hard limited
Remove hard limit, but keep soft limit because it might cause some
negative effect on physics stability.
2014-07-24 19:19:12 +06:00
36b6b69173 Fixes:
* Crash with image drag'n'drop
* Drag'n drop color to paint 2d canvas not working
* Change "Layers" to "Slots" to appease purists.
2014-07-24 15:18:49 +02:00
b7b1c09766 Code cleanup: ghost style 2014-07-24 21:40:01 +10:00
638bb78507 Fix T41160: Rendering duplifaces crashed blender (cycles) 2014-07-24 16:53:46 +06:00
6a933c858c Move stencil options to own panel under layer tab. 2014-07-24 12:41:39 +02:00
a93ec34ac8 Fix minor issues from recent commits.
* Clone from layer UI not working
* Get trash color when entering texture painting for the first time
2014-07-24 12:08:23 +02:00
029be6f4b5 Change to previous commit, allow tweaking name at creation time. 2014-07-24 12:01:25 +02:00
cc40925c36 UI cleanup:
New layer in texture painting will now allow entering image parameters,
similar to new image.
2014-07-24 11:39:04 +02:00
6e41b008e3 Allow renaming images from list in layers panel by double clicking.
Thanks to Sebastian Koenig for the report!
2014-07-24 11:05:37 +02:00
390752a11c Material could end up with invalid texture paint slots on changing
engine.
2014-07-24 10:29:55 +02:00
f5cee25a12 Fix T41149: Dissolve Crash Due to AutoSmooth.
bmesh's 'Join Edge Kill Vert' was using own code to delete loops, instead of
using `bm_kill_only_loop()`, which did not tag loop indices as dirty (causing
the crash), but also did not free loop's CDData...
2014-07-24 09:18:33 +02:00
1cbe85b156 UI: prevent dragging a popup from activating a button 2014-07-24 16:53:10 +10:00
cf521f198a Correct last commit 2014-07-24 16:27:56 +10:00
dca61a6b20 Cleanup: ui_but_is_editable flip return value 2014-07-24 16:19:31 +10:00
d5d540615b Freestyle: minor revisions of Python API docstrings and comments. 2014-07-24 14:29:38 +09:00
1819fa2b5a A follow-up to Patch D623: minor code updates and style cleanup. 2014-07-24 14:29:36 +09:00
b408d8af31 Freestyle Python API: Updates and speedups for the parameter editor
In addition to D319, this patch updates the parameter editor, the UI of Freestyle.

Using new API functionality and experience gained in making D319, this patch
provides a quite noticable speedup for commonly-used Freestyle linestyle modifiers.

As this patch touches a lot of code (and mainly the foundations) it is likely that
mistakes are made.  The patch has been tested with a regression suite for Freestyle
(https://github.com/folkertdev/freestyle-regression-tests/tree/master), but testing
with scenes used in production is very much appreciated.

Differential revision: https://developer.blender.org/D623

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-07-24 14:29:35 +09:00
4eedec8681 UI: Correct code cleanup
Old code commented to reverse list in fact did nothing, replacing with call to reverse broke menu arrowkeys direction.
2014-07-24 15:08:52 +10:00
23660438ad Buildbot: proper fix for 'testbuild overriding master builds' issue. 2014-07-23 22:33:37 +02:00
b2170b9194 Revert "Buildbot: more fixes, this time to upload logic."
This reverts commit b1e1646d94.

Sorry, was a bit too quick on this one... :/
2014-07-23 22:28:02 +02:00
b1e1646d94 Buildbot: more fixes, this time to upload logic.
We do not want testbuild to override 'official' (master) builds!
2014-07-23 22:21:04 +02:00
ffea67ca57 Updates/fixes for new UI messages. 2014-07-23 20:59:40 +02:00
15b5f84a1e Buildbot: fix to previous commit, to handle svn libs... 2014-07-23 20:59:40 +02:00
af162658e1 Texture painting:
Add ability to select UV layer from the layer panel.
2014-07-23 20:06:41 +02:00
1f55044617 Editmesh: Add option to tear boundary vertices when dissolving 2014-07-24 03:29:17 +10:00
554829dc9e Buildbot: rework to support branch selection.
Issue with previous code was that branch selected was applied to all repositories.
To be able to control branch on a per-repo basis, we need to use codebases instead.

This commit only enables branch (master/testbuild) and revision selection for master,
we probably do not need this for submodules currently (easy to enable anyway).

Note: tested on local buildbot setup, for linux only (up to build step, have no build env).
2014-07-23 18:10:18 +02:00
Dalai Felinto
e0d4047136 Bake-API: Test for cyclic node connection
If the active image node contributes to the final material shader
(meaning it's either directly or indirectly connected to an Output Node)
the user will receive an alert about circular dependency.

Similar to what we do for Blender internal the baking will still happen,
but the user will receive the alert which should prevent the image
saving to happen if the result was not intentional.

Core function to check for node output written by Lukas Toenne.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D673
2014-07-23 11:46:13 -03:00
8d3bfef538 Extended mathutils.Vector.orthogonal() to accept a 2D vector.
Reviewer: Campbell Barton

Differential revision: https://developer.blender.org/D668
2014-07-23 23:10:03 +09:00
1134ca7420 Fix T41157
Was an issue with python interpretation error. Second part of the bug is
fixed by Campbell.
also minor UI tweak for occlusion UI.
2014-07-23 16:05:35 +02:00
17021171f1 Occlusion Query based selection.
This patch creates an interface for selection mechanisms in opengl. This
makes it possible to switch between occlusion query based or select
rendermode based selection transparently.

This is really useful on graphics drivers that do not accelerate the
select rendermode path (some ATI cards are notorious for this, and the
new path is used by default there), since occlusion queries are always
hardware accelerated due to their use in games.

The option can be found under system - selection. Auto just enables
occlusion queries for ATI users while the rest of the options enforce
one of the two methods always.

There is just one known change, previous code enforced nearest bone to
always get selected, even when mouse selecting near the same position, I
couldn't replicate the behaviour though.

patch by me with edits and review by Campbell.

Thanks!
2014-07-23 15:26:08 +02:00
cf9d5db75b Fix T41156: UILayout.prop_enum() does not observe "text" parameter override
We do have odd behaviors with name and expanded enums, but in this case it did
not made any sense at all! :)

Note the error was not in RNA, but in C UILayout api itself...
2014-07-23 14:34:21 +02:00
eb8f85d8be Fix T41116: Motion Blur causes random black surfaces on rigged models
Fix T41115: Motion Blur renders Objects Black - But not in Viewport Preview

This actually extends previous fix to normals and makes it all much nicer now.

Worth doing some intense testing, quick one worked just fine but there always
could be some corner cases.
2014-07-23 18:01:35 +06:00
82f16f81fd Cleanup: BKE_scene_set_name mixed G.main & bmain arg 2014-07-23 20:30:55 +10:00
f88593df69 Fix for mixup in startup.blend data init when userprefs.blend was missing
Rename UI_init_userdef_factory to BLO_update_defaults_userpref_blend
This closely matches BLO_update_defaults_startup_blend so makes sense for them to be together.
2014-07-23 20:23:05 +10:00
9fcaac5009 Fix T41147: Static BVH shading problem
Fix T41079: Solid black render of object with negative scale and smooth shading

In both cases the issue was caused by negative scaled objects with single mesh
users for which scale gets applied when using static BVH.

Since the on-fly normals calculation land normals for such cases weren't flipped
leading them to point to a wrong direction.

Added a special object flag for this, which is a bit of a bummer because now
we've got less bits for real useful things, but this is the only way to get
proper normals without adding more complexity in the on-fly calculations.
2014-07-23 13:00:52 +06:00
54109add65 Freestyle: minor speedup by omitting unnecessary transform matrix operations in the file loader.
Previously the imported mesh data were transformed by a local-to-world projection matrix
through NodeTransform.  Now that the file loader assumes the imported mesh data already
in the camera coordinate system, an indentity matrix was supplied to NodeTransform.
The present commit avoids this redundant matrix operation by using NodeGroup instead of
NodeTransform, recalling the latter is a subclass of the former with extra matrix computations.
2014-07-23 13:03:55 +09:00
c32a671b3a Fix T41141, can't paint texture in cycles.
The issue is actually that creating a new image in texture paint mode
will set it always as a stencil image. Internally, the code checks if
the painted image is the same as the stencil and if it is, no painting
is done.

Solution is to expose a boolena to the operator for setting the image as
a stencil (could be an enum in th future for more uses)

Stencil UI is a bit weird here, will definitely redesign.
2014-07-22 21:06:10 +02:00
895f0f3dff Fix crash in cases when first BA step happens with all zero-weighted tracks 2014-07-23 00:46:26 +06:00
8a52e7eeba Buildbot: fix submodule branch issue (we have to fix it on 'master', since default
one can be overriden by custom setting for force scheduler).
2014-07-22 20:24:56 +02:00
65d135a040 Texture paint:
* paint slots from cycles only include texture image types
* tweaking with select mouse no longer confirms on release
2014-07-22 19:55:00 +02:00
63fcaa8002 Update buildbot conf, to enable a 'testbuild' branch in 'force' scheduler. 2014-07-22 19:46:36 +02:00
c2ef52c5e8 Tiny change for gsoc paint curve drawing: numpad enter now draws the curve too. 2014-07-22 19:12:34 +02:00
5215ab0acf Code cleanup, unneeded variable, always true when used, not used when
set
2014-07-22 11:57:03 +02:00
12720352a0 Freestyle: removed the context switch button from the Freestyle panel in the Render properties window.
The button was intended to guide new users of Freestyle, but actually that is a matter
of documentation.  The button is unlikely to be frequently used once users get familiar
with Freestyle panels in other contexts.  Now that Freestyle has been part of Blender
since a while, it seems time to clean the UI.
2014-07-22 16:39:29 +09:00
aa7f9197c7 Freestyle: added a note on #include "DNA_material_types.h". 2014-07-22 12:24:44 +09:00
8cf2b3879a Freestyle: Fix for UI text of the "use_tips" line style property. 2014-07-22 12:24:43 +09:00
200dd87de1 Cleanup: pep8 & redundant vars 2014-07-22 12:03:15 +10:00
88f126f2eb Fix missing include 2014-07-22 11:53:24 +10:00
2e436173aa Fix T41086: VSE separate images increases file size abnormally.
We were copying everything from the old sequence into each new ones... including the stripdata,
which for image sequences is an array with one item per image!

So bug was an exponential one, separating strips of a few tens of images was insensible, while
separating a strip of 1000 images would add above 250MB to file size (and RAM usage too)!
2014-07-21 22:55:06 +02:00
86059f03eb Make clone tool UI slightly less horrible.
Move clone tool options as well as layer selection to the brush panel.
That should make its use more apparent and, most importantly, easy.
2014-07-21 19:24:22 +02:00
6a2cefc061 Fix T40839: Object Font Text Rendering Bug
The issue was caused by the wrong objects order for
convertblender.c. Dependency graph totally missed
handling of this situation.

Fixed now, but it's not that pretty, don't try this
at home obviously. But consider this to be good enough
for the current dependency graph.

Details are in the build_dag_object().
2014-07-21 21:32:58 +06:00
577bdfbb5b Transform: edit to recent commit
Copying long comments about & `#if 0` is hint it could be defined in one place.
2014-07-22 01:24:43 +10:00
1526620416 Fix T40432: Scaling to zero with manipulate center points works precisely on second time
Commented out the 'no zero' protection of scaling transforms for numinput.

Issue is, once an axis has null scale, you can't regrow it from transform code
(you have to directly edit the scale property). This is not ideal, but getting
good behavior in this case is hairy...

Yet, when using numinput, you type precise values, so if you want to set it to zero,
set it to zero. User is assumed responsible, we should avoid too much 'invisible magic'
when handling precise inputs. ;)

Note: an idea for possible future feature would be to have an 'absolute' mode for numinput
(allowing to type in real value, not factors).
2014-07-21 17:13:48 +02:00
6a43ee6e38 Fix T41128: Box selection bug with armatures.
Calling `glLoadName()` was possible with '-1' value (65535 actually), in `draw_pose_bones()`...

Note I think bug exists since ages (at least, seems to be already present in 2008
when drawarmature.c was added in repo)!

Odd behavior reported (issue only affected objects once parented to the armature) was
due to ordering stuff, since only objects drawn *after* the armature were affected.
2014-07-21 15:54:32 +02:00
a7d8f602a6 Py/API: Improve intersect_line_line with parallel lines
Now comparing the distance between line-intersection points
to see how close lines are - doesn't fail in the parallel case.
2014-07-21 23:22:10 +10:00
31e1a31fee Bugfix T41133: Audio: Speakers with animated pitch cause clicks in rendered animations, crashes or huge filesizes in rendered audio
Crash happened when the pitch value got <= 0, preventing this now.
2014-07-21 14:25:10 +02:00
25fab54e09 Fix errors in hsv calculation from recent optimization patch.
Code was different from original here, result was apparent in color
picker wedge position.
2014-07-21 12:34:45 +02:00
256706ce7e Cleanup 2014-07-21 20:23:17 +10:00
f745564e4e GSOC 2013 paint
Yep, at last it's here!

There are a few minor issues remaining but development can go on in
master after discussion at blender institute.

For full list of features see:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting

Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
2014-07-21 12:02:05 +02:00
8489b94e07 Math Lib: rename mul_serie_m3 to mul_m3_series & reorder args
Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)
2014-07-21 18:57:35 +10:00
1fdaf5862f Optimisation to rgb <-> hsv/l conversion
Basically avoid redundant computations. Gives ~1-4% speedup in the compositor depending on the use case.

For more info see: http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv

Reviewers: psy-fi, sergey

Subscribers: campbellbarton

Differential Revision: https://developer.blender.org/D596
2014-07-21 09:26:39 +02:00
ce47231cdb Math Lib: Add isect_point_tri_v3
Add to Python via mathutils.geometry
2014-07-21 16:58:17 +10:00
cbde56572f bmesh py api: face_split_edgenet missed NULL check 2014-07-21 12:42:00 +10:00
13a8f650df Cleanup 2014-07-21 10:53:07 +10:00
6f1f5771ff Correction to 7c7b730, multiplication order was flipped
That's really annoying that multiplication order is flipped
comparing mat3 and mat4 cases, but for the purposes of not
breaking all the branches which might use this stuff we'd
better keep order consistent with old version for now.

Suggestion here would be to make order consistent but rename
this functions to mult_* to make compilation fail instead
of failing and using wrong order silently.
2014-07-20 20:44:42 +06:00
cf9d03494b Update buildbot config to latest actual version 2014-07-20 18:00:39 +06:00
5f3fc624a5 Sequencer: Fix wrong blur result when one of the sizes is zero 2014-07-20 15:37:07 +06:00
5290c3a145 Early out from gaussian blur if both sizes are zero 2014-07-20 14:32:28 +06:00
73d157e6f5 Bugfix T41042: Irrelevant Bezier handles still affect Graph Editor Show All
The "Show All" and "Show Selected" operators in the Graph Editor was taking into
account all handles on keyframes, even when some of those would be invalid and/or
set to nonsense values (e.g. for any interpolation mode other than "Bezier")
2014-07-20 19:22:22 +12:00
17d35f9e80 Merge branch 'master' into pie-menus
Conflicts:
	source/blender/editors/interface/interface.c
	source/blender/windowmanager/intern/wm_event_system.c
2014-07-20 16:32:16 +10:00
c03d8a17f1 Bugfix T41077: Dope sheet's column select (alt + click) gets ignored with NLA Strips
NLA mapping corrections were being applied twice, causing column select to fail
2014-07-20 17:19:46 +12:00
7c7b7302d3 Math Lib: use variable length args for mul_serie_m3,m4 (instead of trailing NULL's) 2014-07-20 14:01:42 +10:00
3ca78a40e8 Fix T41122: Mask modifier followed by hair particles causes crash on render (cycles).
There were several small issues/inconsistencies if how particles' org face index was checked,
leading in some cases to invalid indices and hence mem access, in RNA UV/VCol compute for particles.
Note org code RNA one was copied from (in BI's convertblender.s) is much more complicated,
and seems to never reach those breaking conditions.

Also deduplicated most code in those UV/VCol particles funcs, they were doing mostly the same thing!

Finally, also got rid of annoying `NO CD_ORIGSPACE, error out of range` error message in console,
was another case of not checking whether we did have any faces in final mesh!
2014-07-20 00:52:36 +02:00
3b2f6dbf98 Sequencer: Add gaussian blur effect
Currently this gaussian blur implementation accumulates values in the
square kernel rather that doing X direction and then Y direction because
of the lack of using multiple-staged filters.

Once we can we'll implement a way to apply filter as multiple stages we
can optimize hell of a lot in here.

Another thing we can do is to use SSE2 instructions here.
2014-07-19 22:17:22 +06:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
7e8626bbce Code cleanup: warnings 2014-07-20 00:38:52 +10:00
21f15e2c45 CMake FindOpenEXR.cmake was using OPENEXR_VERSION unset 2014-07-20 00:01:51 +10:00
1161b00c76 Fix T40658: UV map node not working for GLSL materials. 2014-07-19 14:59:41 +02:00
1f3c8466a8 Fix T41100: draw other object UVs doesn't work when both objects have no image. 2014-07-19 14:26:24 +02:00
00cb9e5f1c Editmesh: Add options for selecting manifold
Manifold was defined as any edges not using 2 faces,
however its useful to have some options here.

You can now select between Wire/Boundary/Multi-Face/Non-Contiguous/Verts

Note the Non-Contiguous option is new,
it selects edges between faces pointing in different directions.
2014-07-19 21:25:53 +10:00
f7d6749e2f Cleanup: test naming 2014-07-19 20:02:14 +10:00
8ad607bbe0 Cleanup: Use more logically constructed ELEM macros
- name primary comparison var 'v'
- names remain same when expanded
- no odd mixing of macros, use prev ELEM + extra arg
- use 16, even if not used yet, saves adding more in future
2014-07-19 15:00:09 +10:00
e0d8e62f2b Fix T41010: MetaBall Duplivert Unwanted Movement Bug.
BKE_scene_base_iter_next() was completely messing poor dupli objects' matrices...

Note this func should be reworked, but as stated in comments, it should not exist at all,
DAG should be used here, so until we have new shinny one we can live with this.

Also, mballs do not behave correctly when used as duplis (org object remains visible/rendered,
unlike any other object type). This will be fixed in a separate patch/commit,
since it proved to be rather tricky to handle.
2014-07-19 00:41:13 +02:00
a474125893 MBall cleanup: remove unused F_ERROR references, als fix/enhance BKE_mball_basis_find()
BKE_mball_basis_find() was making a bunch of string manipulations for all MBall objects
(including duplis), and then making a (broken!) check to do nothing in case of duplis mball!

Now it makes correct check in early stage.
2014-07-19 00:40:58 +02:00
eb7eafbf19 Fix RGN_DRAW_REFRESH_UI flag being overwritten 2014-07-19 08:11:52 +10:00
78d84d78a1 Cleanup: warning 2014-07-19 08:11:41 +10:00
0e324b19f9 Cleanup in MBALL/displist: no need to create curvecache for non-basis mballs, will never be used anyway! 2014-07-18 18:08:56 +02:00
b8f04e010a Cleanup: curvecaches for curves, not mballs! 2014-07-18 17:51:44 +02:00
9a45c9dadf Fix T41109: Reloading image that has been modified outside Blender does not update image in Image Texture nodes 2014-07-18 19:37:32 +06:00
b984489181 Fix T41114: Particle systems cause memory corruption due to invalid
dmcache index (again).
2014-07-18 11:53:35 +02:00
cf3bb40c62 Fix T41081: Presets not working on pinned properties panels.
Preset operators should avoid using `bpy.context.object.data` as a base
path to properties. This path is not available in the buttons context
when using pinned datablocks! Instead use the specific
`bpy.context.camera` and `bpy.context.lamp.sky` paths now, which lead to
the correct datablocks in any case.
2014-07-18 11:37:57 +02:00
813ece7f79 Fix T41035: Scale Manipulator CTRL-ALT-S issue with maya shortcuts 2014-07-18 15:30:36 +06:00
e28ffaf81c Fix wrong interface flags combination in inverse kinematics panel 2014-07-18 15:14:52 +06:00
397bc87486 Fix T41039: Hook modifier sometimes fails to retain correct bezier curve point assignment 2014-07-18 14:44:05 +06:00
543f7b7053 Fix wrong index update when removing CV points 2014-07-18 13:38:09 +06:00
7307973063 BGE: Add property/material detection and X-Ray for mouse over any sensor
This patch adds a Property/Material detection and a X-Ray mode to the mouse over any sensor like on the ray sensor.

Proposal:
http://blenderartists.org/forum/showthread.php?261847-BGE-proposal-Mouse-Over-Any-sensor-with-Property-and-X-Ray&highlight=proposal

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D653
2014-07-17 23:00:30 -07:00
841ade32be BGE: Add missing documentation and attribute constraint_type for ConstraintWrapper
1. Add attribute to get the constraint type.
2. Add missing documentation for getParent, setParam, constraint_id in bge.types.KX_ConstraintWrapper.rst.
3. Add missing documentation for GENERIC_6DOF_CONSTRAINT and flag bit in bge.constraints.rst.
4. Fix typo in CcdPhysicsEnvironment.cpp

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D654
2014-07-17 22:52:23 -07:00
12a0cccfbf BGE: Add level mode to property actuator
This patch adds to the existing property actuator a level mode, which is switching the property depending on the input level.

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D652
2014-07-17 22:49:40 -07:00
a04a8039f0 Code cleanup 2014-07-18 11:55:59 +10:00
6a58557794 Fix -1 passed as bool 2014-07-18 11:55:58 +10:00
80d3eb6964 Fix a BI bug: when an object had dupliobjects children, it was never rendered at all,
even if having particle systems.

This was not matching behavior of Cycles and 3DView!
2014-07-18 00:06:15 +02:00
8620008ccd Fix T41113: Hide doesn't work on particle systems
Particles could completely cancel Hide flag! 'Accumulative' bool is not a really good idea here,
hide (or render-hide) are some kind of 'absolute' no-go.

Found another issue in that area, duplicated objects would still show in 'render override' mode,
when object was render-disabled.

Hopefully things are better now.
2014-07-17 23:49:08 +02:00
1097a3f70d Add helper to validate (and fix) material indices of meshes' polygons, curves' splines and texts' letters.
Useful especially for importer addons.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D650
2014-07-17 17:16:07 +02:00
Dalai Felinto
f46223f29e Bake-API: progress (bar) working
Note: This makes no change to the user, the render engine (Cycles) still
need to update the progress during baking. But this is the Blender side
of this.
2014-07-17 10:30:46 -03:00
Dalai Felinto
6f846da2fb BGE: rtsp support for VideoTexture (video streaming)
In collaboration with Benoit Bolsee (mainly doing it under his
directions).

Note: FFmpeg lib needs to be compiled with rtsp support for this to
work.

Bug 1/2 of T41004
2014-07-17 10:30:44 -03:00
70453c578d Fix T34664: bevel face material can be set in tool and modifier.
Now the bevel tool, modifier, and internal operator have a material
slot # parameter that the user can set. If left at default of -1,
behavior is as current -- bevel face material is taken from the
closest original face (this may be ambiguous). If material slot
is >= 0, it gives the material slot index number for the material
to use.
2014-07-17 09:20:22 -04:00
737cb8cf7c Use compiler attributes for more BLI libs 2014-07-17 18:58:58 +10:00
1ce15f8efa Fix for bmesh_vert_separate adding to visithash multiple times 2014-07-17 17:46:55 +10:00
ebd04f581d Correct error in recelty added BM_face_split_edgenet
Was copying UV's to unrelated faces
2014-07-17 17:12:32 +10:00
9c36b2be57 Correct previous commit - space crept in patch 2014-07-17 15:02:02 +10:00
4cc93123c8 Add thousands separators to scene stats (D646)
by januz with own modifications
2014-07-17 14:54:12 +10:00
49a5115497 bmesh py api: add bmesh.utils.vert_splice(...) 2014-07-17 12:25:40 +10:00
7f4735ab3b bmesh py api: BPY_BM_CHECK_SOURCE_* macro now accepts multiple args 2014-07-17 11:56:08 +10:00
a798e01dc3 Follow-up to code cleanup in rB415af0b: Keep compound terms as they are. 2014-07-17 09:23:30 +09:00
11e03eea4e Cleanup: dead code 2014-07-17 08:25:48 +10:00
eebeb55bf2 BMesh: use compiler attributes for queries, structure 2014-07-17 08:20:04 +10:00
58659fc207 BMesh: Add BM_vert_pair_share_face_check
Use to assert if BM_vert_splice is used incorrectly
2014-07-17 08:20:04 +10:00
85c7fce3de Cleanup / Cycles: Remove unused defines and some other minor changes. 2014-07-16 22:36:52 +02:00
57a3403bc0 Fix T41075: Segfault when attempting to escape from bone translation.
Minor logical error in rBb617d6d5 ;)
2014-07-16 17:29:03 +02:00
0ab59d9a32 Clean up of dead code.
dm can’t be NULL here (found by Coverity).
2014-07-16 16:25:41 +02:00
10da6ddbee Automatic commit by arc 2014-07-16 14:03:37 +02:00
7eb539c04b Sort vertex groups by Armature Hierarchy
Sort vertex groups by Armature Hierarchy

Reviewers: mont29

Differential Revision: https://developer.blender.org/D649
2014-07-16 14:03:36 +02:00
0fd194c2cb Fix T41088: Canceling pose library preview does not reset to previous pose. 2014-07-16 12:53:17 +02:00
d4726c9a40 BMesh: optimize BM_vert_splice to avoid getting a loop array first 2014-07-16 16:42:32 +10:00
415af0bec8 Cleanup: Adhere to our naming convention for BKE_linestyle.h API 2014-07-16 15:13:40 +10:00
647969f9b6 Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene().
The function is to retrieve the active line style ID datablock from a scene and
there is nothing related to bContext.
2014-07-16 13:38:58 +09:00
de379c05de bmesh py api: add BMesh.calc_tessface() 2014-07-16 11:57:28 +10:00
28940d79b1 bmesh py api: add typed tuple-from-array functions 2014-07-16 11:50:34 +10:00
b26daac398 BLI_kdopbvh: assert for bad input
also hint UNLIKELY branches
2014-07-16 11:12:19 +10:00
1ae11f71ff BLF: avoid float/int conversion drawing glyphs
also use UNLIKELY for error cases
2014-07-16 11:12:19 +10:00
dfe1b9b7a7 Fix T40146: BGE Compound parent crash 2014-07-15 17:52:46 -07:00
Martijn Berger
490da48d78 Selective changes picked from: e01449fa4b
Author: Jason Wilkins

Improves cmake's ability to find our libraries on Windows / MSVC 2013
2014-07-15 16:33:05 +02:00
c2dba7e344 BLI_kdopbvh: Replace realloc's with BLI_stack 2014-07-15 21:35:50 +10:00
5c4180d898 BLI_stack: various small additions
- add BLI_stack_count
- add BLI_stack_pop_n to pop into an array
- add BLI_stack_push_r, which returns a pointer that can be filled in

Also remove sanity check in BLI_stack_pop, assert if the stack is empty.
2014-07-15 21:09:03 +10:00
a378f8d2d8 Fix T40964: Massive shading failures with glass node mixing, whiteouts and blackouts 2014-07-15 15:59:00 +06:00
2f03cccecd No preemptive removal of muted and reroute nodes from compositor node
trees for localization (previews and viewer evaluation).

This is handled entirely by the compositor already. Doing this during
localization is redundant and risks divergent behavior.
2014-07-15 11:03:07 +02:00
2bdb872cfb Fix T41067: Muted nodes still do data type conversions.
Proxy operations from muted nodes would still create conversion
operations where the datatypes don't match, which creates unexpected
behavior. Arguably datatype conversion could still happen even when the
main operation is muted, but this would be a design change and so is
disabled now.
2014-07-15 11:03:07 +02:00
fa8ff63b48 Edgehash: Improve magic number for hashing
Gives consistently better results. Tested with wide variety of meshes.
2014-07-15 13:08:46 +10:00
dbc79e7aba Fix T41074: Several Mouse Look actuators not working well together when reset button are set in one or several of them
Fix provided by lordloki (Jorge Bernal)
2014-07-14 18:36:27 -07:00
1bf87fa26c BGE: TrackTo actuator: increasing up & track axis options
This is related to Task T34861 to increase up & track axis options for TrackTo actuator. I've just added it to differential to facilitate an easier review.

With the patch applied you can select X, Y and Z axis for the Up axis, and X, Y, Z, -X, -Y and -Z for the track axis.

Related to the implementation I have used the algorithm from Trackto constrain placed in constrain.c but adapted to be used with MOTO library.

The wiki docs are here (http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Actuators/Edit_Object#Trackto_Actuator).

Test file is here: {F97623}

I have also uploaded 2 screenshots showing the UI modifications to the TrackTo actuator:

{F91992} {F91990}

Reviewers: moguri, dfelinto

Reviewed By: moguri

CC: Genome36

Differential Revision: https://developer.blender.org/D565
2014-07-14 18:30:27 -07:00
Dalai Felinto
50d30148b6 Fix T41044 Cycles Bake: world space location affects object space normal pass 2014-07-14 17:49:30 -03:00
48eececdba Follow up to previous commit.
* Expose is_tablet property to events to determine if event contains
tablet data.
* Expose tablet tilt for events as a 2D vector in python
2014-07-14 17:49:00 +03:00
45f0bd6eb1 Feature request:
Expose pressure from event system to python. This will return the tablet
pressure, if a tablet is present, or 1.0 if not.
2014-07-14 17:06:53 +03:00
8554fa2fad GHash, EdgeHash: add debugging function to measure the hash quality
Can use to check on improvements to hash functions.
2014-07-14 23:59:47 +10:00
8a04bed724 Error in last commit 2014-07-14 21:34:51 +10:00
a8e338cee5 Py/API: add bmesh.utils.face_split_edgenet 2014-07-14 21:32:37 +10:00
1bda27f692 Tooltip improvements for modifier functions 2014-07-14 11:50:21 +02:00
98cb7ad237 Remove redundant NULL check 2014-07-14 14:23:23 +10:00
3b81aae5c1 BMesh: avoid redundant normalize comparing angles 2014-07-14 14:22:15 +10:00
d9f39257f4 Math Lib: add compare_len_squared_v3v3 from paint branch 2014-07-14 11:55:38 +10:00
d56e6bf1bf Math Lib: accept a limit of 0.0 when comparing vectors 2014-07-14 11:33:19 +10:00
a720c4715b Tooltip improvements for modifier functions 2014-07-13 21:52:35 +02:00
c7ba6eaacc Freestyle: minor docstring fixes. 2014-07-13 23:17:52 +09:00
0fc05c1c03 Followup to rB320b7a59c3eed: also handle background image ID refcount when duplicating/freeing View3D. 2014-07-13 15:16:01 +02:00
e35845d37c Fix T40987: Distant Lamps have no influence on Volumes.
Differential Revision: https://developer.blender.org/D639
2014-07-13 12:06:54 +02:00
cfbc495b8d BMesh: minor speedup to BM_face_split_edgenet 2014-07-13 13:53:08 +10:00
15a6911dd1 BMesh: remove error check on radial loops and consistent naming 2014-07-13 12:58:08 +10:00
c04f301fc3 Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc) 2014-07-12 16:48:52 +10:00
5e3e095e2e Code Cleanup: use const 2014-07-12 09:09:24 +10:00
984d6c8677 BGE debug API and actuator
This patch adds some new debug methods to the KX_GameObject for manually adding the debug list and bge.render for controlling the debug visualization.
It also adds a new debug actuator, which allows to control the same functions.

This patch is a updated version of T33701.

Thread on Blenderartists:
http://blenderartists.org/forum/showthread.php?264745-Debug-proerties-for-added-objects-patch&p=2256018&viewfull=1#post2256018

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D635
2014-07-11 16:00:14 -07:00
9327816593 Correct error in BM_face_split_edgenet when no faces are split 2014-07-12 08:44:19 +10:00
db1ab7b150 Fix potential bug in loop normals code.
Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
2014-07-11 19:52:43 +02:00
4097f9c3c4 Another attempt for T40981, clipping border does not work with GLSL on
ATIs.

This is actually a test to see if this can be enabled on ATI cards.
According to various sources, newer ATI cards supporting GLSL 3.0
support gl_ClippingDistance in shaders, which is the forward compatible
way to do custom clipping.

This fix will bind 6 additional varying variables on ATIs, which may
lead to some shaders not compiling due to limiting out of those
variables, or to performance degradation. Also I do not have an ATI
handy to test.

Having those in mind, this commit may well be reverted later.

Clipping planes are usually 4 (6 is for cube clipping), but making
shaders depend on viewport state is really bad, and would lead to
recompilation, so I took the worst case here to avoid that.
Hopefully driver does some optimization there.
2014-07-11 19:17:40 +03:00
Dalai Felinto
1aabbf8476 View3D Walk: Use scene gravity instead of hardcoded value (fix T40921)
Differential Revision: https://developer.blender.org/D636
2014-07-11 11:44:05 -03:00
Dalai Felinto
92c8dd16df View3D Walk: Rename gravity by gravity_state (cleanup) 2014-07-11 11:43:39 -03:00
594ff72bfe Fix T41023: Specific material cause bad render result, different on CPU/GPU
Issue was caused by too much aggressive optimization, which skipped execution
of some nodes leading to an uninitialized memory read in SVM stack.
2014-07-11 18:21:52 +06:00
4633e655dc Fix T41019: Calculate Mass does not calculate actual volume.
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex)
the operator was simply using the bounding box volume, which can grossly
overestimate the volume and mass.

Calculating the actual volume of a mesh is not so difficult after all,
see e.g.
http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf

This patch also allows calculating the center-of-mass in the same way.
This is currently unused, because the rigid body system assumes the CoM
to be the same as the geometric object center. This is fine most of the
time, adding such user settings for "center-of-mass offset" would also
add quite a bit of complexity in user space, but it could be necessary
at some point. A number of other physical properties could be calculated
using the same principle, e.g. the moment of inertia.
2014-07-11 12:16:32 +02:00
78d38a9033 BLI_array: avoid mixing terms count/length 2014-07-11 15:30:42 +10:00
315609ec0c Fix T40257: Frustum culling not working properly
This is mostly the same fix as before, but now code depending on culling
checks is executed after KX_Scene->CalculateVisibleMeshes(). As a
side-effect, LoD checks and animation culling now use the current
frame's culling information rather than the previous frame's.
2014-07-10 22:14:30 -07:00
d419e2e90c WM: add WM_operator_properties_create_ptr
Call operator types directly and avoid a lookup when their known.
2014-07-11 15:07:55 +10:00
dd9a33dc83 Add mesh tool to split faces by wire edges (face menu)
This can be used in a similar way to the knife tool, but the edges are manually setup first.
2014-07-11 10:32:33 +10:00
48abc65c39 BMesh: new face splitting function BM_face_split_edgenet
This takes a face and an edge-net, splitting the face into regions
defined by the edge-net.
2014-07-11 10:29:53 +10:00
49c73f2f22 Cycles: Add link to a paper used for Beckmann table calculation
This is for those who'll be reading code and trying to improve it.
2014-07-10 19:04:03 +06:00
5e216a6aa9 Fix T41005: Seemingly random crashes with cycles rendering
Fix T41013: OSL and Crash
Fix T40989: Intermittent crash clicking material color selector

Issue was caused by not enough precision for inversion threshold.
Use double precision for this threshold now. We might want to
investigate this code a bit more further, stock implementation
uses doubles for all computation. Using floats might be a reason
of bad rows distribution in theory.
2014-07-10 19:04:03 +06:00
19f89a083f Fix for invalid memory access in graph editor when deleting the last
vertex in a fcurve.
2014-07-10 13:03:05 +02:00
42615d88b6 Fix compilation error with scons when building from detached head 2014-07-10 16:23:48 +06:00
a1aa96940c Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 978dba4616. The change
still doesn't provide accurate culling information, and actually breaks
animation culling.
2014-07-09 22:36:55 -07:00
30b4d0c0ec Need to disable Libmv for cudakernels target
This way no access to automated tests variables will happen.

Ideally it should be something more like using blenderlite
with just Cycles enabled, but let's keep it for a bigger
clean up.
2014-07-10 10:56:38 +06:00
430efd4228 SCons: Hopefully final fix for 32bit linux buildbot
No need to run automated tests for cudakernels target. TThis could
be harmless because CUDA binaries are built in the another chroot.
2014-07-10 10:48:31 +06:00
3a9e588d1a Fix T40909: BGE softbodies broken.
Looks like softbody settings got lost in a recent cleanup.
2014-07-09 21:32:33 -07:00
83f5d41071 Cleanup: Same thing in path trace setup, we can safely always assign the proper value. 2014-07-10 01:49:34 +02:00
dda60dd261 Cleanup: Always assign num_samples, there is no need for this special define. 2014-07-10 01:43:53 +02:00
b2e9fffc3d Further tweaks to SCons's auto tests
We should do autotests only after setting path to sconsign,
otherwise using the same working directory and different
build directories will eventually break.
2014-07-10 03:53:37 +06:00
f0c06e71ba Another attempt to fix issues with 32bit OSX and scons 2014-07-10 02:33:44 +06:00
2788d5f385 Attempt to fix compilation error on 32bit OSX and SCons 2014-07-10 02:19:41 +06:00
6b5384f637 Buildbot: enable cubins fox OSX
With new buildbot env they should be all fine.
2014-07-10 01:43:30 +06:00
a498d88918 Attempt to mitigate issue T40981
Clipping border causes a software fallback on ATIs. We have disabled it
in that case but from minor digging on the net seems like Intels support
this, so enable.
2014-07-09 21:24:37 +03:00
f5caab2cf7 Fix T40997, artifacts when unhiding part of the mesh in dyntopo.
Tagging a face as hidden should not be done only when hiding.
2014-07-09 20:13:22 +03:00
b617d6d5e6 Fix T40991, mirrored armatures not restored properly when cancelling.
Issue here is that we force mirroring even if original armature is not
mirrored.

We could be smart and store only unselected mirrored bones here (since
those will get restored from transdata), however not all properties were
getting stored and restored; rolling bones still suffered from the bug
for instance.

To fix this we need to restore all properties that armature mirroring
overrides. Transdata obviously does not offer a lot of space here, so I
used TransInfo->customdata to store an array of initial parameters of
the mirrored bones.
2014-07-09 19:58:56 +03:00
5b0e4cd8c9 Fix T41003: Object Info's Random socket produces erratic results when
material is applied to multiple Dupli instances of an object.

One of the random_id initialization lines for cycles objects slipped
into the basic update part in this commit:
rBb98ff5cb5b2c14c33b16e3b129e1e08810e90a6c

This would constantly re-shuffle the random_id ...
2014-07-09 17:26:54 +02:00
f14e740dee Implement Start Resolution for preview render in BI
So now viewport render resolution division works exactly the same as in Cycles.
2014-07-09 19:55:40 +06:00
2af99b7437 Cleanup: silent C++11 warning (implicit double to float conversion) in Collada code. 2014-07-09 15:12:48 +02:00
e81b1c54d2 Cleanup: get rid of magic numbers. 2014-07-09 15:12:48 +02:00
e34e0c2c26 Fix T40939: Border render and SSS doesn't work correct in rendered viewport
There were some missing updates in the viewport render job which lead to
wrong SSS mapping on the final resolution.

There was also wrong scaling applying when border render is used.

And last but not least(?) strands render was using first level of the
resolution leading to really thick strands in the final viewport.
2014-07-09 18:26:47 +06:00
c9ac51ec1f Fix T40164: Linking a Group of linked Groups don't take Dupli Visibility
correctly.

Problem was that object layers are defined by duplis as the top-level
duplicator layers. This happens //during// the duplilist construction,
which breaks group layer checks for subsequent instances and hides them.
Now the duplilist generators leave Object DNA untouched, the
modification of layers for drawing, rendering, etc. happens afterward
in the duplilist_apply/restore functions, as a kind of second pass.
2014-07-09 12:25:54 +02:00
6c70559f58 Fix T40980: Exporting animation in MPEG Matroska using ffv1 and FLAC codecs fails 2014-07-09 15:44:16 +06:00
08eac0c367 Add bone_groups.new() and bone_groups.remove() methods to RNA.
To do so, matching BKE 'API' was also refactored a bit:
* Get Pose data instead of Object, as parameter;
* Removed some sanity checks not needed at such a low level (callers are supposed to do that);
* You can now remove an arbitrary bone group, not only the active one.

Based on patch by pkrime (Paolo Acampora), with own edits.

Reviewers: #python, pkrime, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D522
2014-07-09 10:28:40 +02:00
02eb03f868 Freestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator. 2014-07-09 14:52:08 +09:00
9c48ea3979 Math Lib: add function to get signed angle about an axis 2014-07-09 11:15:08 +10:00
f4484daed3 Correct IS_EMPTY macro
also prevent reading from BM_ELEM_API_FLAG_ get/setters
2014-07-09 07:53:43 +10:00
a83c6293f4 OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
2014-07-08 23:35:04 +02:00
5529e51a21 Extrude operator sticky key pie:
* Press once to extrude along normals
* Hold to spawn pie with options
* Removed the Alt-E shortcut.
2014-07-08 22:57:50 +03:00
42143ce873 Add internal operator for enum pies supporting paths.
Used in proportinal editing in edit mode currently.

Also moved all macro definitions after python initialization to enable
referencing of python defined operators in all macros.
2014-07-08 22:30:23 +03:00
02c7aa4455 Proper implementation of click style override:
Guide: This is added for double key combinations. In these situations,
holding the second key can be taxing and stretching for the hand.

Forcing a click style here is better. Ctrl-Tab for edit mode selection
uses this override currently.
2014-07-08 19:33:06 +03:00
53a1708860 Separate property for viewport shade pies.
This is fine tuned for using with pie menus, where solid/wire mode
is given the most important west/east positions.

There were two possibilities with supporting custom pie enums for an
existing property. One is to add an extra function that dynamically
fills the pie items to fit a pie scheme. The other is make a separate
python property. I feel this is the correct way because it does not
burden all enum properties with extra function storage and it does not
always need to be dynamic either.

Also cleanup minor debug line
2014-07-08 18:14:56 +03:00
9605e0bfb6 OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated
2014-07-08 17:03:44 +02:00
8df8824f3a Change enum behaviour:
Enums now get completely expanded and any items not present in a dynamic
enum are filled by separators. This makes it possible to have
predictable positions even if some items are missing.

The iteration code expects that the dynamic and initial enum lists have
the same ordering of items, which is not unreasonable.
2014-07-08 17:50:54 +03:00
330633f063 Fix T40785: "Select Grouped" Pass Index mode is redundant.
Revert "Object Select Similar tool now has a Pass Index option."

This reverts commit 7a6919a74e.
2014-07-08 16:18:04 +02:00
06d943cfd6 Fix T40983 Particle Texture use of generated coordinates is wrong.
Particle texture eval was not taking the actual texture space for orco/
generated textures into account at all.
2014-07-08 13:44:58 +02:00
838c692b93 Change user preference for drag/click style.
Use explicit chooser instead of timeout.
2014-07-08 14:32:18 +03:00
a5902fb276 Fix T40986: crash on using the viewer node inside of group nodes.
Viewers were activated both inside the active group as well as the top
level tree (the latter being a quick fix for getting a fallback viewer).
This caused a race condition on the shared viewer image.

Now the active viewer is defined at node conversion time in the converter
so that only one can be active at a time without each node having to
follow complicated rules for exclusion.
2014-07-08 12:51:35 +02:00
bd7fbd4327 Install_deps: minor cleanup.
Patch D633 by simonrepp (Simon Repp), thx.
2014-07-08 12:37:00 +02:00
ac6b5f2d1d OSX/cmake: more work on T40887 and a tentative fix
- test fail due libiomp5 is not available @ testing time
- must solve this by adding requred flags/includes to tests
- atm release builds are possible with this hack
2014-07-08 00:29:53 +02:00
97ab366e44 Merge branch 'master' into pie-menus 2014-07-08 00:00:49 +03:00
ea1f1fe0c2 BLI_string, dont pass unicode to ascii BLI_str_partition functions 2014-07-08 06:06:34 +10:00
aac283966f OSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing, breaking all other tests following
- tested gcc 4.8.1 works again
- tested clang-omp in libs works again
- i assume atm., if we only use vanilla clang it is the one in darwin libs
2014-07-07 19:20:33 +02:00
1f43b083a9 BGE: Fix for applyImpulse function
This is related to task T29419. Credit also goes to Goran Milovanovic
(goran) for proposing an initial fix for this issue.

The issue is the current behavior of applyImpulse doesn't match the behavior
described in the documentation as instead of a impulse point in world coordinates,
it seems to require a coordinate in a local space.

Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc)
as it doesn't allow  to choose in which space (local or global) the impulse is applied.

Now, we have the following function:

applyImpulse(point, impulse, local=False)
being "point" the point to apply the impulse to (in world or local coordinates). When local is False will
have both point and impulse in World space and when local is True will have point and impulse in local space.

Reviewers: moguri, dfelinto, brita_

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D567
2014-07-07 08:06:39 -07:00
ef22e972b1 Code cleanup: Simplify decoupled scattering code a bit. 2014-07-07 13:28:10 +02:00
a472a544d3 Fix compilation error with Freestyle after recent DAG changes 2014-07-07 16:29:04 +06:00
180a7acd41 Fix T40775: Clearing material texture slot through Python does not update 3D View render 2014-07-07 15:38:40 +06:00
aa620b5fed Fix T40791: Changing path to movie file does not mark the project as changed 2014-07-07 15:27:24 +06:00
2fe0cf54a5 Fix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport preview.
Fix T39286: Display percentage ignored in Cycles viewport.

The threaded depsgraph update changes included a cleanup of the global
is_rendering flag, which was replaced by a general EvalContext being
passed to dupli functions.

Problem is that the global flag was true for viewport duplis before
(ugly hack), which was used as a check for generating dupli orco/UV from
mesh data layers. The new flag is stricter and only true for actual
renders, which disables these attributes and breaks the Cycles
Texture Coordinates and UVMap nodes.

The solution is to extend the simple for_render boolean to an enum:
* VIEWPORT: OpenGL viewport drawing (dupli tex coords omitted)
* PREVIEW: Viewport preview render (simplified modifiers)
* RENDER: Full render with all details and attributes

There are still some areas that need to be examined, in particular
modifiers seem to totally ignore the EvaluationContext!
Instead they generally execute without render params from the depsgraph
(BKE_object_handle_update_ex) and are built with render settings
explicitly.

Differential Revision: https://developer.blender.org/D613
2014-07-07 10:54:14 +02:00
7481d2aad1 Follow-up to my last commit: Fixed a wrong property name in the versioning code. 2014-07-07 16:53:30 +09:00
f4cf84507b Fix T40877: Bezier Hook to New Object does not work properly 2014-07-07 13:44:24 +06:00
7915d7277a Per-material line color settings for Freestyle.
New properties 'line_color' and 'line_priority' are added to Material ID data blocks.

The 'line_color' property allows users to specify a per-material line color that can be
used as a Freestyle line color through Material color modifiers of line style settings.

The new line color property is intended to provide a solution for line color
stylization when a proper Freestyle support for Cycles is implemented (likely
as part of the upcoming Blender 2.72 release; see Patch D632).  Materials in
Cycles are usually set up using shader nodes, and Freestyle won't be capable
of retrieving colors and other properties from node-based materials any soon.

The new line color property of materials addresses this foreseen limitation by
providing artists with an intuitive alternative mean to specify line colors on a
per-material basis independently from node trees.

The 'line_priority' property gives users a way to control line colors at material
boundaries.  When a line is drawn along a feature edge at material boundaries,
one of the two materials on both sides of the edge has to be picked up to
determine the line color.  So far there was no way to control this selection
(which was in effect at random).  Now the material with a higher line color
priority will be selected.

The new per-material line settings are shown in the new Freestyle Line tab in
the Material context of the Properties window (only when Freestyle is enabled).
2014-07-07 16:19:51 +09:00
dc40928087 Cycles: Fix crash with environment maps and packed images 2014-07-07 12:37:45 +06:00
4299b00019 UI: tooltips, blurry and incorrect rhs-padding in recent update
D634 by Severin
2014-07-07 10:43:32 +10:00
4bc62b31af Fix for RNA_int/enum mixup 2014-07-07 06:46:57 +10:00
cfc62a97a5 Add support to lasso masking/flood fill for inverted values.
This can be used to subtract a region from masks but it's not very
user friendly yet. To male this work better, the tool will probably be
brushified later.
2014-07-06 18:30:09 +03:00
1c329fc54b OSX/Scons: after doublechecking. take out sdk_flags from cflags again, looks as we always get sdk properly fron ccflags in subcompiles 2014-07-06 15:46:16 +02:00
2440b3e158 OSX/scons: Try to get rid of buildproblems with openjpeg enabled in certain build environments and prepend SDK_FLAGS to CFLAGS always 2014-07-06 14:10:41 +02:00
5fefc84783 Cycles: Equi-Angular and MIS Volume sampling work on GPU now.
* malloc() is used now, which is supported since sm_20: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations The performance of this needs to be tested on various cards still.
* This also works for Heterogeneous Decoupled Ray Marching, but in this case I get sporadic "Illegal Address" errors on my Geforce 540, therefore I did not remove the GPU check in kernel_volume_use_decoupled() yet.

I would appreciate some tests from people who compile themselves, enable Volumetrics in kernel_types.h.
2014-07-06 14:00:11 +02:00
22fa83173b Fix T40548: After canceling, F-Curve handlers don't go back to original position.
Handle vectors for the initial location were only stored when the handles are actually
selected for transform. When only the master vertex is moved this can still affect
the handles though, since they are constraint to one side of the master vertex.

Now the handle data is stored regardless of whether handles are included in the transform,
so on cancel their location is reset correctly as well.
2014-07-06 13:10:22 +02:00
e929dc2d8c Fix part of T40964: Glass shader was giving wrong results with OSL. 2014-07-06 13:07:35 +02:00
7f4cb0237b Outliner: Added option to RMB menu for "Animation" entries to remove these and their data 2014-07-06 20:55:10 +12:00
89aee74c81 Bugfix: Selecting object channels in NLA editor didn't make the object active 2014-07-06 20:27:24 +12:00
145998c776 Code cleanup
- Fixed incorrect section heading
- Missed one place where short was still used when the specific enum type would be
  more appropriate
2014-07-06 19:35:24 +12:00
a4c4145800 NLA/AnimEditors: Added operator to remove all "empty" AnimData blocks
It is sometimes possible to end up with a lot of datablocks which have old + unused
"AnimData" containers still attached. This most commonly happens when doing motion
graphics work (i.e. when some linked-in objects may have previously been used to develop
a set of reusable assets), and is particularly distracting in the NLA Editor.

This commit adds an operator which removes AnimData blocks (restricted to only those
which are visible in the animation editor where it is run from) which are "empty"
(i.e. that is, have no active action, drivers, and nla tracks or strips).

This operator can be found from the "Edit" menu in the NLA Editor. Although it also
works when run from the DopeSheet or Graph Editors, it is of less use there since
those won't show these empty AnimData blocks by default (since by definition, such
AnimData blocks necesarily have no keyframes or drivers that can be shown), hence
there will be no feedback if the operator fails or succeeds.
2014-07-06 19:35:24 +12:00
b144a8961b Fix for typo in comment 2014-07-06 19:35:23 +12:00
2ec0077408 Fix uninitialized bool in recent own 'sode_select_groupe' commit.
Found by CoverityScan.
2014-07-05 17:58:21 +02:00
f473607014 Cycles: Some tweaks to baking UI.
* Put Normal Settings beneath the other ones, wild button jumping should be avoided.
* Remove Cage prefix for Object and Extrusion, it's clear from the button placement, the former UI was too squeezed...
2014-07-05 15:39:08 +02:00
9acabc13de Cleanup: Typo fixes. 2014-07-05 14:25:34 +02:00
5aec61f849 Cycles: Compile fixes for CUDA Volumetrics.
* CUDA can be compiled with Volume support again, change line 78 kernel_types.h for that.

Volumes are still fragile on GPU though, got some Memory/Address CUDA errors in tests.. needs to be investigated more deeply.
2014-07-05 02:04:07 +02:00
b4b5d9c24e Style cleanup 2014-07-05 05:26:32 +10:00
c4eeda2673 OSX: Jpeg2000 was formely handled by quicktime, after QT removal it was forgotten to move it to openjpeg, doing this now
Note: In releases this was missing since 2.69, so we may want an ‘a’ release for 2.71
2014-07-04 15:02:05 +02:00
52d7c35778 Refactor of Node's 'Select by type' op, to also handle color and name handling.
Ne op is similar to other 'Select Grouped' ones in Blender.

Based on patch D288 by Cruentus_Nex (Steve).

Reviewed by Campbell Barton, thanks!

Revision: D288.
2014-07-04 14:23:26 +02:00
e3c8cf0a9e Add (r)partition funcs to BLI_string, to get left-most/right-most first occurence of delimiters.
Inspired by Python (r)partition str functions. Also added some Gtest cases for those new funcs.

Reviewed by Campbell Barton, many thanks!
2014-07-04 14:14:06 +02:00
85c4feab02 Install_deps: Final (hopefully!) fix for dual clang/cfe name (*sigh*).
Patch by simonrepp (Simon Repp), thanks!
2014-07-04 14:04:51 +02:00
6ff6883f99 Fix T40843: Cycles does not support viewport render override 2014-07-04 16:34:15 +06:00
006b550f6f Fix the ABIFLAGS order for detecting Python debug builds
D631 by mva
2014-07-04 20:02:58 +10:00
ef801eb1ff Fix T40941: Bevel factor in Text
Bevel factor is not supported by text, hide it from the interface.
2014-07-04 15:12:20 +06:00
944e576717 Fix for a wrong threads count shown in Freestyle debug mode (--debug-freestyle). 2014-07-04 15:18:44 +09:00
ce0596ed16 Bugfix T40945: Typo in tooltip for SSS property 2014-07-04 16:35:54 +12:00
81c3fc9726 cloth: Speed up collision detection
Noticed this while looking into something else.
The change is trivial, but gives a rather nice preformance improvement,
so why not.
Theres's actually a lot one can do to improve collision performance if
one wanted to, the triangle-triangle check alone has a lot of room for
improvement.
2014-07-03 21:40:04 +02:00
6cc78927a3 Select Grouped -> KeyingSet for bones also shows error messages now when the Keying Set is inappropriate 2014-07-04 00:09:36 +12:00
796aef081b Code Cleanup - Replaced magic numbers with defines 2014-07-04 00:09:35 +12:00
26eae6315c Make Cursor placement operation a modal operator.
* Allows drag and place workflow in addition to click workflow
* Should be compatible with future use of calling operator and placing
instead of left-clicking
2014-07-03 13:04:29 +03:00
d5297b6283 Fix T39825: Crash on startup with tablet 2014-07-03 16:33:47 +10:00
04fdd35ba5 Slight cleanup for 4af848e. 2014-07-02 22:55:39 -07:00
4af848e557 Fix T40923: An error from a python controller on a LibFreed object causes a crash 2014-07-02 21:58:08 -07:00
eaf6f9fc5d Correct version check for tip color 2014-07-03 14:46:23 +10:00
49aff416f8 Fix T40912: Collision Callbacks Don't Work if Set Directly 2014-07-02 20:17:17 -07:00
3f1ed437c1 Follow-up to rBcc1372546ad5: Fix for segmentation fault in pipeline (freestyle/wm related).
Render->freestyle_bmain is set to NULL after BKE_main_free() so that
the struct Main is not considered for tagging any longer.
2014-07-03 11:09:11 +09:00
fedbb88825 Mistake in last commit 2014-07-03 07:40:40 +10:00
0c78ba1ba8 Correct recent fix for knife in camera ortho mode
now use real view clip ranges for win-to-ray segment
2014-07-03 06:57:06 +10:00
e81b938631 Fix scons unable to build with sources tar archive (no git repo available in this case).
Reported by Clouclou over IRC, thanks!
2014-07-02 20:30:50 +02:00
241a9b5c6e Fix T40823 LoD Add and Remove crash without valid object
Changed the polling method used for both the add and remove LoD operators
to a more appropriate one.
2014-07-02 06:12:31 -07:00
259a436197 Fix T40815: Particle birth times not initialized correctly.
In rB78c491e the `initialize_particle` function was split into 2 parts for particle texture initialization.
The texture init part however also initializes birth times, which is now missing in the main init function
in some cases (notably when setting start/end directly without a subsequent time step).
2014-07-02 12:20:51 +02:00
7587e82c28 Fix T40364: Texture images are not properly displayed in the material preview in BI when using SSS
Blender Internal only uses materials with non-zero user counter for SSS and new
mutable libblock copy was keeping users counter at zero.

Now it sets user counter to 1, which is a bit of arguable decision, but which
also kind of makes sense -- meaning callee owns the copied block.
2014-07-02 14:03:02 +06:00
b6e0dc2237 Added missing G_DEBUG_DEPSGRAPH flag entry in the bpy.app.debug getters/setters list. 2014-07-02 09:31:14 +02:00
5898abe99d Cycles: Update CUDA error messages, based on Toolkit 6.0.
* Removed deprecated erros, and added some new ones, which might help to figure out problems in the future.
2014-07-02 01:50:42 +02:00
4800c52700 Cleanup: Remove unused checks in CUDA device code. 2014-07-02 01:12:13 +02:00
6ac0652395 Cleanup: Update list and remove ifdef here. 2014-07-02 00:58:06 +02:00
978dba4616 Fix T40257: Frustum culling not working properly
Adding a hack so that KX_GameObjects' culling status is updated based on
mesh slots.
2014-07-01 12:39:17 -07:00
cc1372546a Fix for segmentation fault in pipeline (freestyle/wm related) 2014-07-01 19:43:52 +02:00
ecc2e298e8 Fix T40903: Rendering: Alpha Channel is Broken 2014-07-01 22:25:25 +06:00
6c6fa749f6 Second attempt to fix T40833: Crash when rendering with freestyle.
The cause of the crash was identified in an uninitialized member variable
`Main->lock`.  Now that struct Main has a few member variables whose
values are dynamically allocated, per-render Freestyle-specific Main data
structures will be allocated and released using `BKE_main_new()` and
`BKE_main_free()`, respectively.

This revision complements the commit rB6135556f4556.
2014-07-01 23:36:53 +09:00
61e5f81e37 Fix T40556: Curve Modifier does not work when used in a Background scene
A bit hackish solution for now, cleaner solution we'll look into as a
part of the new DAG project, when it's clear what kind of data is passed
to the evaluation callbacks.
2014-07-01 17:46:55 +06:00
8c9c93ca6f Fix T40888: Memory error when selecting Cycles render engine 2014-07-01 15:44:50 +06:00
fe9110edc4 Code cleanup: use scene variable rather then calling CTX_data_scene 2014-07-01 18:58:41 +10:00
2575be541b Correct enum size incase compiler makes enum signed 2014-07-01 18:38:34 +10:00
f004893e49 Fix T40895: Curves panel, zooming out a lot crashes Blender 2014-07-01 13:22:55 +06:00
3f55de5613 Fix strict flags compilation 2014-07-01 13:13:11 +06:00
e9da412454 Code cleanup: use enum for setup_app_data 2014-07-01 17:06:44 +10:00
fef9463123 Fix T40065: Pressing Esc in separate render result window does not focus main window.
The problem is that the render window keeps keybord input focus even after it has been
lowered. Windows maintains the Z-order of windows, so the present solution is to raise
the window that has been just below the render window.

Differential revision: https://developer.blender.org/D594
Reviewed by: campbellbarton
2014-07-01 15:01:35 +09:00
9f05588b68 Python: remove redundant casts 2014-07-01 14:10:59 +10:00
c92c3ef611 Fix T40761: Bone constraints broken in the BGE
Extra bonus: calculating bone constraints now happens parallel!
2014-06-30 21:00:46 -07:00
2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
17f6d8337d Usual UI messages fixes. 2014-06-30 20:48:02 +02:00
00e98bf3ec Correct use-after-free in recent commit 2014-07-01 04:11:05 +10:00
fba08b9092 Pie Menus:
Add code to force a certain pie menu to be in hold style interaction
mode always. This is useful for tap/hold operator/pie menus

Move operator enum operator in C, this allows us to fire it up
internally without resorting to operators.

Deleted python code for this since it's not used and it's really easy to
code. May do if scripters want though.
2014-06-30 20:57:07 +03:00
ed871df836 Fix odd situation where you could assign a background image without increasing its usercount.
Probably a leftover from old code, I don't think this invoke usage of VIEW3D_OT_background_image_add
was actually reachable anywhere from the UI, but managed to get it working from py, without increasing
user count...
2014-06-30 19:37:36 +02:00
320b7a59c3 Fix image user count not being decreased when deleting a 3DView background image.
Patch by julien (Julien DUROURE) as T40568 (with own minor style edits), many thanks!
2014-06-30 19:37:36 +02:00
a51aeedade Experiment with the compositor border in editor
Preserve buffer form previous runs so it's possible to make
a compo of full frame, then draw a border and start tweaking
nodes and see updates in that border.

Main idea is to make it able to visually compare difference
between what was changed inside the border and how frame
looked before the tweaks outside of the border.

Also implemented Clear Viewer Border in compositor, shortcut
it Ctrl-Alt-B.

Reviewers: lukastoenne, jbakker

CC: venomgfx, sebastian_k

Differential Revision: https://developer.blender.org/D582
2014-06-30 23:01:20 +06:00
d00f63627b Tweaks:
* Increase the animation timeout slightly
* Remove separator from shade menu.

Custom pies are really OK, but enums are somewhat problematic because
we don't have a way yet to explicitly set the ordering and positions
while expanding them. This is for immediate todo.
2014-06-30 18:49:39 +03:00
921b8d6907 Fix issue on X11 where fake keyrelease events can fire.
This could happen but was not too noticable before, however on pie menus
where holding a key and releasing is common, such double events could
fire the pie menu again or even call the tap operator on tap/hold
operator/pies, which was especially noticable on object mode selection.
2014-06-30 18:19:10 +03:00
e919a37e97 Fix T40818: libpng warning: iCCP: known incorrect sRGB profile
Suppress warning for now, it's harmless and only happens
with new libpng.

In the future we might try enabling it for non-datatoc-ed
files, but it's really not worth spending lots of time on.
2014-06-30 21:08:33 +06:00
2e64b8354b Fix T40885: "Reset Curve" is backwards on Custom Falloff Curves (Lights).
Add ability to define negative slope by default to curvemapping template...
2014-06-30 16:23:47 +02:00
03929ae202 Fix T40878: Translate node is inconsistent 2014-06-30 18:22:27 +06:00
bdbb4229b5 Compositor: Get rid of hardcoded constants 2014-06-30 18:09:40 +06:00
ca8d8f5e52 Fix for subpixel sampling was broken for render layers node 2014-06-30 18:04:26 +06:00
a69ab5509a Merge branch 'master' into pie-menus 2014-06-30 14:58:35 +03:00
a71a8be5cf OSX/cmake: Fix T40887 by detecting if we use an Apple compiler, disable omp in this case 2014-06-30 13:37:10 +02:00
0b5fda5678 Condition was inverted in the previous transparent shadows commit
Handbook example what happens when you've got loads of patches
and not double-check stuff before committing.
2014-06-30 17:00:51 +06:00
7b5221c6da Cmake: Remove warning for pre CUDA 5.0 Toolkit, not supported anymore 2014-06-30 12:37:34 +02:00
7dbedf6d4a Fix T40795: Dot output is inverted in viewport with Cycles 2014-06-30 16:24:43 +06:00
cb95544e41 Fix T40836: Cycles volume scattering shader crash
Volume scatter might happen before path termination, so
need to check transparent bounces and consider shadow an
opaque when max transparent bounces are reached.

TODO: CPU code seems to have different branching in conditions
which made me thinking it does different things with volume
attenuation, but from the render results it seems the same
exact things are happening there. Worth looking into making
simplifying code a bit here to improve readability.
2014-06-30 16:24:43 +06:00
cadf77d5ef Fix T40862: numinput transform did not take into account scale_length. 2014-06-30 10:57:39 +02:00
61e1ea382b Use text cursor for py-console 2014-06-30 18:12:29 +10:00
730a1556a6 Fix T40867: Autokeyframe in camera view 2014-06-30 13:37:37 +10:00
5588e45f01 BLI_stack, use memory chunks rather then realloc when resizing 2014-06-30 11:55:01 +10:00
228361973d Add BLI_stack test 2014-06-30 11:55:01 +10:00
47c2250a7e Do not display pie menu items with embossing. 2014-06-30 04:49:46 +03:00
ea3c2eb15d Attempt to fix T40833: Crash when rendering with freestyle.
Constant crashes under Linux seem due to an uninitialized variable.
2014-06-30 09:42:37 +09:00
eade6e7b66 Animated pie menus!
Nuff said :)
2014-06-30 01:26:09 +03:00
af8d5d2b24 Make the pie menu macro definition into a function.
Also set Z key as hybrid toggle/hold type menu.
To make this work, the macro definition must be set after python
initialization because we use operators defined in python (maybe it's
worth doing that for all macros?)
2014-06-29 22:11:21 +03:00
285bea9949 Pies:
* Make position function simpler
* Fix some tooltips
2014-06-29 21:05:56 +03:00
f3f991c80f Install_deps: fix for clang url issue.
Newest clang would use 'cfe-' prefix instead of 'clang-' one - don’t ask me why...
Had to make a wrapper around wget, that:
* Accepts an array of URLs as first parameter;
* Errors and exits when wget fails for some reason (was silent before).

Issue reported in T40871 by simonrepp (Simon Repp), thanks.
2014-06-29 18:40:38 +02:00
d7d9e98352 Fix compilation error on OSX+Scons
Issue was caused by OSX tweaks happening in the SConstruct
after the old location of autotest.
2014-06-29 20:27:54 +06:00
d8b0470fd0 Fix T40733: Segfault with hair particles cache and vgroups.
The "fix" is just a stupid index sanity check to avoid crashing. Underlying issue is not identified and probably never will ...
2014-06-29 15:53:13 +02:00
ccfe845ff4 Freestyle: Fix for "cast shadows only" materials not handled properly.
Problem report by Light BWK through personal communications, thanks!
2014-06-29 22:24:28 +09:00
481e8ab3c9 Fix: NLA editor not being updated on using "Make Links" (Ctrl)+(L). We're emitting a ND_NLA_ACTCHANGE signal now to make that work.
Found while documenting the NLA for my upcoming book
2014-06-29 14:22:09 +02:00
4236e3bebf Fix T40850: object emitter of particles not visible in viewport when GLSL and "only render" checked.
Objects were hidden in "only render" mode if they were duplicators. This is correct in general, but for particles should be disabled by the "show emitter" option.
2014-06-29 13:31:46 +02:00
50ca320f57 Fix T40792: Pack all into and Blender report Missing Files.
Do not check packed files' paths in BKE_bpath_missing_files_check()!
2014-06-29 09:42:34 +02:00
b5982f7130 CMake: attempt to resolve OSX+clang failing with OpenMP 2014-06-29 06:19:51 +10:00
b5acd1aa87 Fix T40829: Collada Export with 'Include Material Textures' selected crashes.
Code would not check a texture did have a valid image pointer...
2014-06-28 22:13:04 +02:00
683743b360 Correction to last commit 2014-06-29 06:08:41 +10:00
f32079d4b9 BLI_stackdefines
Bounds check the stack while debugging, also add STACK_PEEK
2014-06-29 05:57:48 +10:00
00c8a691e9 Cycles: use SYSTEM for external includes 2014-06-29 04:00:31 +10:00
78cdc707ab Add render result caching.
Simply add an option to render settings to save an EXR cache,
just when the render is finished. Also changed RE_ReadRenderResult() to read
cache instead of temp sample files (those are fully volatile now anyway).

Path to save cached render results is an UserPreferences setting.

Also added 'Reload render' feature to the Image Editor (so one can now re-open a blend,
and in an Image Editor hit ctrl-R to (try to) reload last render from cache).

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D553
2014-06-28 19:23:34 +02:00
0caee7843e Fix T40851: "Sequencer" auto-check after changing spaceview and scene.
Mere typo, leading to restore a flag from another scene's flag value...
2014-06-28 18:33:26 +02:00
dcc361708c BLI_stack: use strict flags
also use size_t, rename BLI_stack_empty
2014-06-28 23:17:11 +10:00
c0c75ff1ac Cleanup: typo 2014-06-28 23:17:11 +10:00
8df6769040 CMake: update source files 2014-06-28 23:17:11 +10:00
4c83fae16d Fix 40841: Copy and Paste objects no longer functions from one running instance of Blender to another.
Own mistake in recent temp data handling refactor, copy/paste temp .blend file needs to
be in non-session-specific temp dir...
2014-06-28 15:01:04 +02:00
a8233d7c44 Fix T40797: Crash on render on specific file with volumentrics and 'use hair' clicked on render layer 2014-06-28 01:20:07 +06:00
3a969f52ee Fix blenderplayer compilation, fire timer for pie timeout in 100ths of
second.
2014-06-27 21:16:21 +03:00
9327538f0a UI: increase contrast for active colorband handle 2014-06-27 23:17:39 +10:00
b9522e557a UI: use cursor x-location for tooltip placement (T37478) 2014-06-27 22:56:31 +10:00
beedb0b274 BMesh: more edits to vertex dissolve, handle mixing wire edges with faces better 2014-06-27 22:06:49 +10:00
c73505fb43 Get rid of usage of non-existing module 2014-06-27 17:30:17 +06:00
9bcb2e7603 warning fix: use of __restrict was inconsistent in BLI_dynstr between declaration and definition 2014-06-27 06:02:59 -05:00
b97d3bc198 Fix T40834, grab brush not working after recent jittering fix.
Some brushes do not require location always. Made a list here, there may
be others but I think this pretty much covers this.
2014-06-27 13:57:16 +03:00
d6ab81809e BMesh: tweaks to dissolve, remove wire edges before other calculations
also avoid feedback loop when checking topology giving nondeterministic results.
2014-06-27 20:28:36 +10:00
e947dd8cd7 BMesh: add BM_vert_is_edge_pair(), faster then checking (BM_vert_edge_count(v) == 2) 2014-06-27 20:28:32 +10:00
c3deb16c16 BMesh: add ability not to delete vertex when collapsing 2014-06-27 20:28:02 +10:00
07a5caad5f BMesh: use slightly faster method of stepping over edge-disks 2014-06-27 20:28:02 +10:00
cba3498629 Update Carve to latest upstream version
This brings new copyright header which supports GPL2 and 3.

It wasn't really an issue before because we had agreement with
Tobias, but now it's all documented in sources.
2014-06-27 15:56:50 +06:00
52f63da512 MSVC: quiet harmless linker warnings 2014-06-27 19:50:34 +10:00
a9bb96e659 Fix transparency issues in 3d viewport
The issue was introduced by 0f95149 and it only worked before
because default game material alpha blending was set to alpha.

Now it'll check whether material has transparency enabled and
will use alpha blending by default in this case.
2014-06-27 15:33:57 +06:00
72ac596e19 Update Ceres to latest upstream version
Brings new bounds limiting and also prepares build system
for the changes in the upstream.

Namely shared_ptr header and namespace is now being detected
by a build system rather than by hacks in the code.

This commit includes some changes to auto-detection flags
in SCons, presumably adding more consistency there. This
is main changes which are suppoed to be reviewed here.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D581
2014-06-27 14:08:27 +06:00
0a0e4e0e69 Fix for DeviceScene::attributes_uchar4 not released properly
Reviewed by: dingto
Differential Revision: https://developer.blender.org/D620
2014-06-27 08:56:57 +02:00
795592dc90 Pies:
* Add pretty icons to Q menu

* Add an operator to sculpt Q pie for testing.
2014-06-27 04:26:06 +03:00
83d713c606 Pies:
* Modify timed pie macro with own timeout property.
* Times are now counted in 100ths of second, gives more needed
precision.
* Add whole event argument to pie creation so we can spawn at custom
initial position
* Escape key also exits pie menus now.
2014-06-27 03:42:48 +03:00
4c84e89761 Merge branch 'refs/heads/master' into pie-menus 2014-06-27 02:24:05 +03:00
bd777ffd3b Follow up to previous commit, do not calculate normal now with front
facing.
2014-06-27 01:55:30 +03:00
dbc04c594b Fix T40758 Front facing not consistent in sculpt mode.
Some tools used view vector while others used the area normal.

Area Normal -is- useful and it will have to be incorporated to the
system better, but I'd like to do it in a way that is well
collaborating with sculpt plane calculation too, because it will have
to be slightly more expensive, i.e normal calculated before the plane,
never together, so only front to the area normal influence can be kept.

Currently sculpt plane takes into consideration view vector, but that
can produce an unwanted normal/plane at glancing angles on mesh edges.

Another issue that arises here is whether we do an actual calculation of
sculpt normal for each symmetry pass or we just flip the initial (former
is more expensive but more correct)
2014-06-27 01:48:49 +03:00
92ecbd2998 Fix T40823, crash with LoD operator without valid object. 2014-06-26 23:51:44 +02:00
dcc6300ddd Fix T40691, dyntopo changes lost on save if sculpting on multiple
objects.

Flush edits for all objects, not just the active one. Here we might want
to disallow leaving an object on sculpt mode when selecting another, but
this works, no need to enforce it.
2014-06-26 23:57:33 +03:00
2aca720bff Fix T40813: Dissolve verts with adjacent regions, removes the dividing edge 2014-06-27 05:39:39 +10:00
8ef2314597 Fix T40816, SSS brightness difference with Sample All Direct Lights.
This has been fixed before, but somehow got reverted in d644753319.
2014-06-26 21:30:42 +02:00
Nicholas Bishop
48b7c983da Fix parallel CMake builds failing due to missing buildinfo.h
Reviewed in #blendercoders by ideasman42
2014-06-26 14:09:45 -04:00
974d2dc54a BLI_array: avoid accidental assignment to BLI_array_count 2014-06-27 00:31:50 +10:00
898667b497 Fix BLI_array_staticdeclare size 2014-06-27 00:20:17 +10:00
0ea7302349 Fix for dissolve faces iterating over verts while removing 2014-06-26 23:29:45 +10:00
a5d5f7fe16 Another attempt to solve compilation error
Sorry for the noise, but it's tricky to troubleshoot stuff
which only happens on buildbot..
2014-06-26 16:22:04 +06:00
ee20433cf3 Tweak to previous commit, fixes scons to survive when upstream is not found 2014-06-26 16:18:38 +06:00
283abdf3b2 Fix compilation error with scons and older pythons 2014-06-26 16:03:52 +06:00
0503dc3d02 Forgot this in previous commit 2014-06-26 15:29:16 +06:00
6135556f45 Replace Main->lock with an anoynous structure pointer
This way it's not needed to include BLI_threads.h from the
BKE_main.h which helps avoiding adding PThreads includes to
each library which uses Main on Windows.

From the API point of view it's now MainLock* and to lock or
unlock the main you're to use BKE_main_(un)lock().

This solves compilation error on Windows with SCons.
2014-06-26 15:22:21 +06:00
33e8451d4b Better description for the "make links" operator.
This is a misnomer: the operator copies data (mostly pointers) of
various types from the active to selected objects. "Make Link" implies
creating a permanent connection between these objects ...
2014-06-26 10:41:54 +02:00
1b76c638ad Code cleanup: remove MAT3/4_UNITY defines, just call unit_m3/4 2014-06-26 16:09:59 +10:00
a4d9c8f579 Code cleanup: casts, dead assignment & arg order. 2014-06-26 15:46:42 +10:00
e3e56971eb Reverted part of my previous commit causing a crash. 2014-06-26 12:54:55 +09:00
2c004708f2 Freestyle: code cleanup: removed unused (outdated) static variables. 2014-06-26 12:13:39 +09:00
8d6f546f32 Whitespace fix 2014-06-26 14:42:36 +12:00
11e0dddf91 Bugfix T40801: Select grouped objects by Keying Set not working with builtin Keying Sets
Most of the default builtin Keying Sets (e.g. Loc, Rot, Available, etc.) depend
on the currently selected objects, making them unsuitable for use with this feature.
As a result, this feature would silently fail. This commit adds some error messages
which at least let users know what's going on so that they can make other plans
2014-06-26 14:39:44 +12:00
7d99a4ded9 BGE: New Mouse Actuator
Disclaimer: The author of this patch is Geoffrey Gollmer (gomer). I only updated the patch to the current git master status, reworked several parts to fit well with current coding style and applied several fixes.

This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE.
The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls.

{F94520}

{F91859}

Blend file for testing Mouse actuator (with default parameters and crosshair): {F94920}

Reviewers: moguri

Reviewed By: moguri

CC: gomer, lordodin

Differential Revision: https://developer.blender.org/D559
2014-06-25 15:47:37 -07:00
11d1fea285 Windows: Enable numpy again, as we do have libs again for vc2013 and against py3.4. 2014-06-25 22:23:47 +02:00
04683a769e Updating submodule to point to v2.71
Now for real!
2014-06-26 00:53:49 +06:00
47366e0d45 Updating submodule to point to v2.71 2014-06-26 00:39:48 +06:00
42959f05a4 Fix T40759: "Add Shortcut" operator was leaving new keymap items on
cancel.
2014-06-25 17:42:01 +02:00
f430127bbd Fix T40757: Video Texture - Video frames dropped from beginning and end
it's actually a followup for 04f81c8, no need to apply offset for video files.
2014-06-25 17:52:21 +06:00
deb3999696 Fix T40776: Crash when using empty curve as a deformation target 2014-06-25 16:25:43 +06:00
da64e8ae05 Fix T40800: Crash when editing material nodes
it was caused by ee5f432. Not sure why exactly blender runs into
threading conflicts here since material preview works.

Let's keep it simple for now and disable material nodes preview,
because it's not supported by the interface anyway.

This is to be included to the final release.
2014-06-25 15:38:40 +06:00
0529766f32 Use api function for flipping button list & rename to BLI_listbase_reverse 2014-06-25 19:33:35 +10:00
833c03791f Use fill function for setting origindex 2014-06-25 19:29:06 +10:00
92733179ae Speedup for skin modifier, avoid calculating normals many times 2014-06-25 19:02:49 +10:00
72f77dd69a Fix T40786: Crash setting negative sound offset 2014-06-25 16:45:03 +10:00
a613ef67df Proof of concept pie interaction:
Press for calling operator, hold to spawn pie menu.

Test on object mode operator, pressing TAB toggles to edit mode, keeping
TAB pressed more that the drag timeout spawns a pie menu.

Still needs a way to enforce the menu to not listen for further drag
timeouts but looks like the concept holds.

This is implemented using the previous operator,
WM_OT_call_pie_menu_timer, in a macro. When the calling button is
pressed too long, the operator is cancelled (thus cancelling the macro)
but spawning a pie menu before that. If the timeout is not reached and
a key release event is detected, the operator finishes and the macro
continues, calling the next operator instead (object mode set, in our
case).
2014-06-24 23:56:21 +03:00
e748662785 Fix minor issue, pie menu is set as cancelled only for hold/release
style menus.
2014-06-24 23:32:59 +03:00
dc77502804 Experimental:
Add timer wm operator that spawns pie menus after a certain time.

For now this timeout is the same as the drag timeout, should probably be
a separate option
2014-06-24 23:29:40 +03:00
6c9216fc49 Tweaks to the central pie menu widget:
Adopt a disc based design, also serves to better identify the threshold
value for a valid selection and is now fully themeable.
2014-06-24 22:27:44 +03:00
d411e1548c Correction to last commit 2014-06-25 04:22:14 +10:00
df1c400420 Use gnu-libc arg order for BLI_sort_r
When building on gnu-libc don't use our own implementation.
2014-06-25 04:04:52 +10:00
04648767fa Make main library safe(er) for the threaded usage
Added a lock to the Main which is getting acquired and released
when modifying it's lists.

Should not be any functional changes now, it just means Main is
now considered safe without worrying about locks in the callee.
2014-06-24 23:35:17 +06:00
6a27e8ed0b Merge branch 'master' into pie-menus 2014-06-24 20:22:08 +03:00
fc1040cc47 Fix example 2014-06-25 03:04:53 +10:00
1731d47976 Fix own error in recent tooltip commit 2014-06-25 02:40:53 +10:00
9563bde9a5 Freestyle: use mathutils_array_parse() instead of its own helper functions.
Patch contribution by flokkievids (Folkert de Vries).  Thanks!
2014-06-24 23:13:56 +09:00
252eaed483 Freestyle: use bool instead of int.
Patch contribution by flokkievids (Folkert de Vries).  Thanks!
2014-06-24 23:13:55 +09:00
c5ccbacdaa move STACK_* macros into BLI_stackdefines.h 2014-06-25 00:01:33 +10:00
d19d1b5497 Add MEMCPY_STRUCT_OFS macro for copying values after a struct member
use for DM_to_mesh to avoid clobbering the ListBase
2014-06-24 23:50:12 +10:00
77616cbe11 add STACK_REMOVE macro 2014-06-24 22:14:22 +10:00
0bc94f8c7d Code Cleanup - Using the enum types in more API signatures instead of relying on coders to do the right thing 2014-06-24 22:01:06 +12:00
95b39acdb1 Code Cleanup - Replacing shorts with bools and enum types 2014-06-24 22:01:05 +12:00
4b209f063c Fix T40695: world surface shader incorrectly visible with world volume. 2014-06-24 11:35:48 +02:00
16baa8c273 Update the design of tooltips
- left aligned
- higher contrast between tip text and py-text
- use monospace for py-text

D611 by Severin, design by Plyczkowski, with own minor changes.
2014-06-24 19:07:41 +10:00
e7c92f1145 Freestyle: Progress bar updates during mesh loading. 2014-06-24 17:25:04 +09:00
dd96be356d Freestyle: Fix for a couple of missing names in freestyle.chainingiterators.__all__. 2014-06-24 17:25:02 +09:00
4f0e42489f Followup for the previous commit
Need to do the same for render exec() because it doesn't
use the job system.
2014-06-24 14:23:33 +06:00
cc0c94d535 Switch allocator to thread-safe when rendering from the command line
This is needed because render threads would do some allocations like
part buffer allocation and so. This is likely harmless with the lock
free allocator (not on Windows tho), but when using guarded allocator
we need to be sure access to the list of MemHead is safe.
2014-06-24 14:15:21 +06:00
65bb121401 Fix compilation on OSX after own rB414c70435dcd...
Sigh, why can't all unix have same includes? :/
2014-06-24 08:31:29 +02:00
9ca0c7eea3 Ctrl-F now activates the filter-by-name functionality for Animation Editors 2014-06-24 17:53:13 +12:00
afaf6e8d71 Improve doxygen comment to include some type info to make it more useful 2014-06-24 17:53:12 +12:00
a64e9ba83f Polyfill2d: Correct boundbox check (Fix T40777) 2014-06-24 15:32:49 +10:00
ce729677db D319: Freestyle Python scripts update.
This revision is meant to update Freestyle's Python scripts to make full usage
of the new features of Python and Freestyle's Python API.

Freestyle's Python scripts are pretty old already, and were never given much
attention. With the 2.7x generation of Blender coming up, this is an excellent
time to update Freestyle's Python scripts, hopefully adding some new features
and achieving some speed improvements on the way.

Main goals:
* use for loops where possible
* general cleanup, making use of more recent python features (generators,
  ternary operator, ect.)
* update the documentation on the way (it's lacking atm)


Differential revision: https://developer.blender.org/D319

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-06-24 13:53:14 +09:00
f37ec65f80 OSX: Fix T40749, own mistake for m_lionStyleFullScreen condition 2014-06-23 21:27:38 +02:00
7e7a85f907 Fix own typo in temp_data patch, (windows-only)
Don't know when this sneaked in, I did wrote that part of the patch on win VM with MSVC2013... :/

Note: letting asside warnings for now, then should not prevent building anyway.
2014-06-23 16:56:35 +02:00
647870bc6a Use toolbar tabs for node categories instead of just a long list of
panels.

Patch by @Severin (with minor modifications by me). As discussed in
{D535} the node editor does not have real modal operator tools like the
3D view or image editors for instance, so it makes sense to utilise it
this way. Tabs really help in this area due to the large amount of node
types and categories. Further tweaks could be made later if the need
arises.
2014-06-23 16:37:41 +02:00
b82e84f179 BMesh: we actually can set loop indices too while converting from Mesh to BMesh... 2014-06-23 16:21:53 +02:00
7df2717727 Add ED_paint.h, split out ED_sculpt.h
also rename some functions to match our convention
2014-06-23 22:00:44 +10:00
414c70435d T39690: Modifications to Blender's 'temp dir' system.
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never
automatically cleaned up, and can end being quite big when used by Blender, especially when we have
to store per-process data (using getpid() in file names).

To address this, this patch:
* Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path),
  the other is a mkdtemp-generated sub-dir, specific to each Blender instance.
* Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always
  reuse the same filename (quit.blend...) or generate small file (crash reports...).
* Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option).
* Erases temp sub-dir on quit or crash.

To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows.

Note that, as in current code, the 'recover render result' hack-feature that was possible
with SaveBuffer option is still removed. A real renderresult cache feature will be added
soon, though.

Reviewers: campbellbarton, brecht, sergey

Reviewed By: campbellbarton, sergey

CC: sergey

Differential Revision: https://developer.blender.org/D531
2014-06-23 13:42:54 +02:00
9b987103f6 Use specified exception mask for buildinfo
This way we only catch exceptions which we're intended to
and if something bad happens (like missing import due to
refactor or so) we'll see them instantly.
2014-06-23 15:46:41 +06:00
3bd965bc03 Fix T40764: Keyframed Render Layers Don't Work as Intended 2014-06-23 14:33:58 +06:00
8cea610e74 Fix compiler error in Cycles Beckmann sampling precomputation: strict
compiler flags don't allow implicit double -> float casting.

Code was added in rB8fbd71e.
2014-06-23 09:47:52 +02:00
95d6c01478 Fix T40756 Select Linked by Particle System matches ignores selected
psys.

This is inconsistent with other comparable cases like materials, where
the active slot is used to define matching objects.
2014-06-23 08:22:42 +02:00
77f357728f D605: Fixes for proper handling of wchar_t paths in MinGW.
* Fixed different not-in-sync #ifdef blocks for struct stat variants under Windows.

Comments have been left to indicate the portions of BLI_fileops.h and
BLI_fileops_types.h that need to stay in sync.

* Added BLI_wstat() to de-duplicate #ifdef blocks for stat() variants on Windows.

* Fix for opendir() and associate functions in MinGW not working properly with
non-ASCII, MBCS-compatible paths.

MinGW (FREE_WINDOWS) has opendir() and _wopendir(), and only the
latter accepts a path name of wchar_t type. Rather than messing up with
extra #ifdef's here and there, Blender's own implementations of opendir()
and related functions are used to properly support paths with non-ASCII,
MBCS-compatible characters.

Tested with MSVC 2013 Express, MinGW32 (gcc 4.6.2) and MinGW-w64 (gcc 4.7.1).


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

Reviewed By: campbellbarton
2014-06-23 10:07:06 +09:00
489937e1e7 GTest now works without buildinfo 2014-06-23 01:16:49 +10:00
95da8ba64b add brush icons from paint branch to make diff more manageable for arcanist 2014-06-22 17:48:08 +03:00
3a75381505 Apply fix for T40745 to extrude_face_region too 2014-06-23 00:12:06 +10:00
3e2d8d2233 Spelling 2014-06-22 23:55:00 +10:00
728041019e Editmesh: extruding end-point verts now maintains edge-direction
Resolves T40745, where faces from extruded edges had flipped normals.
2014-06-22 18:41:07 +10:00
7bc2f54867 Code cleanup: style 2014-06-22 15:02:27 +10:00
2762432052 Code cleanup: de-duplicate widget_num_tria, widget_scroll_circle 2014-06-22 15:01:54 +10:00
f69d5cc4b8 Remove unused function 2014-06-22 13:05:48 +10:00
9a7bfca448 WM: set circle select minimum radius to 1 2014-06-22 13:03:20 +10:00
8fbd71e5f2 Cycles: improved Beckmann sampling using precomputed data
It turns out that the new Beckmann sampling function doesn't work well with
Quasi Monte Carlo sampling, mainly near normal incidence where it can be worse
than the previous sampler. In the new sampler the random number pattern gets
split in two, warped and overlapped, which hurts the stratification, see the
visualization in the differential revision.

Now we use a precomputed table, which is much better behaved. GGX does not seem
to benefit from using a precomputed table.

Disadvantage is that this table adds 1MB of memory usage and 0.03s startup time
to every render (on my quad core CPU).

Differential Revision: https://developer.blender.org/D614
2014-06-21 22:31:44 +02:00
88d8358f91 Fix T40703: cycles viewport smoke not updating when changing frame. 2014-06-21 22:21:04 +02:00
177e1ec9b2 Fix T40714: cycles not loading CMYK jpeg files correctly. 2014-06-21 22:21:03 +02:00
66421f2119 Fix cycles "Is Singular Ray" being on for Camera rays, now is off.
This appears to be a wrong interpretation of the OSL docs, and it's more
convenient to have it off.
2014-06-21 22:21:03 +02:00
8461acd54c Fix T40567 Crash when returing to object mode from dyntopo.
Returning to object mode reactivates any generative modifiers
and this can lead to a polycount explosion.

For now just improve the warning when entering dyntopo with generative
modifiers. I would like to add the ability spawn options to apply or
remove the modifiers too, however separate undo stack system comes back
with a vengeance here, since it won't allow restoring the application/
also may invalidate all sculpt undo in the undo stack prior to the
application (needs investigation).
2014-06-21 21:20:13 +03:00
caf609cda3 Fix T40727: Renaming nodes did not correctly fix animation paths. 2014-06-21 06:49:12 +02:00
9b83ceb6f2 Fix scons building in case git is not available.
Not so nice to use try/except here, but simplest solution to avoid failing in case
git commands fail for some reason...
2014-06-20 18:13:20 +02:00
01d802976f BLI_md5: add a utility function to 'translate' raw 16bytes digest into a nice 32chars hexadecimal string.
That kind of stuff belongs to BLI, not specialized code like thumbs.c
2014-06-20 16:18:26 +02:00
fb7c71383b Code cleanup: BLI_md5.c was... not nice. 2014-06-20 16:06:12 +02:00
8937feadae GLSL tweaks for viewport render draw
- Was missing pixel scale
- Dither is now supported on GPU
2014-06-20 18:11:10 +06:00
ca0c0e7549 Implement resolution divider in the Blender Internal
Currently resolution divider is not exposed to the
interface yet, and i'm not even sure it needs to be
exposed because it's somewhat weird configuration.
Need to check how often artists are changing start
resolution in Cycles.

Pretty much straightforward implementation with the
only weak part: render result is getting re-allocated
and upscaled when current resolution is finished.
Not sure how to make it faster actually. Maybe it's
just a matter of making upscale fast enough.

Needed to fix some possible memory leak happening
in Freestyle when canceling rendering on a special
stage -- it was missing temp bmain free,

Reviewers: campbellbarton, dingto

CC: sebastian_k, fsiddi, venomgfx

Differential Revision: https://developer.blender.org/D609
2014-06-20 17:32:45 +06:00
98af262260 Replace hard-coded version for release log url 2014-06-20 20:49:50 +10:00
155a6106d0 Update Readme and Release Log link for 2.71.
This should be backported.
2014-06-20 12:31:34 +02:00
d1b45f7f7c Fix release notes link in splash.
Auto-generate this link from Blender version, as done for e.g.py API link.

This commit should be backported to 2.71 branch.
2014-06-20 10:21:39 +02:00
a5a869c579 Fix 2 GLSL errors, with Cycles Hair BSDF. 2014-06-20 09:36:25 +02:00
8660a0cab3 UI: auto-open other menus by hovering over, once a menu is already open
D590 by Matthew Reid
2014-06-20 17:34:21 +10:00
ead83a48f1 Fix T40692, Checker Texture derivation on very large scales (1k).
It might still have a derivation on larger scales (10k or more), but we need some offset to avoid precision issues on unit coordinates.
2014-06-20 09:03:22 +02:00
84e8cabac6 Fix T40697: Skinned meshes with shapekeys crashing in the BGE 2014-06-19 18:20:56 -07:00
8eb5aa1c35 Fix recursive menus respawning on selection
Fix here is a bit hacky, we do not draw the menu and we simply await for
key release to stop the handler, or else the pie menu gets respawned
immediately.
2014-06-20 04:11:43 +03:00
3a7899c5eb Allow recursive menus in pies.
By returning the handler function to the general menu recursive section.
we can handle any menus that exist in the pie pieces. For now the
drag/release style pies do not work very well with this (menu is
respawned as soon as we select something in the child menu) but I hope
this can be improved further.
2014-06-20 03:58:57 +03:00
d43ba1b33c Cycles: Make Volume Bounces default to 0. This is quiet a bit faster, and produces less noise. 2014-06-19 19:05:06 +02:00
f763b3ba36 RNA: Expose hook centre
D529 by Gottfried Hofmann
2014-06-20 02:34:26 +10:00
2dce13d213 Python: Remove deprecated uses of os.popen
T40415 by Lawrence D'Oliveiro
2014-06-20 02:00:46 +10:00
eaac6cbcd9 Add a bmesh_core_test, a start at testing bmesh functionality.
Needed to make the blender link libraries a global property
now that tests are parallel to source directory.
Current sort order for blender link libraries doesn't work
for tests that start with few defined symbols. Doubling the
lib list works, but a TODO to find a better way (probably
using CMake's own mechanism for tracking dependencies).
2014-06-19 11:53:55 -04:00
179e7eaf39 Bugfix for Elastic and Back easing types
** TO BE PORTED BACK TO 2.71 **

As pointed out by Thomas Beck (plasmasolutions), the current behaviour and/or
default values for their parameters didn't quite make sense:

1) Back Easing - The old default value of 0.0 results in some overshoot being applied,
while trying to tweak it up or down resulted in some odd jumps and discontinities.

I've ended up removing some code here which forcibly using a "back" value of 1.7
when users wanted 0.0 instead. There doesn't seem to be any good reason for this.
To ensure that there is still an effect initially, keyframes now get created
with back set to 1.7


2) Elastic Easing - The old default settings of <amplitude = 0, period = 0> resulted
in a curve without any elastic bounce, which wasn't very useful for motion graphics.

Now, default values of amplitude = 0.8 and period = 4.1 get set. These were hand picked
by Thomas to work well when the duration of the motion is 10 frames long (i.e. the
typical length of such effects when doing motion graphics).
2014-06-20 01:34:35 +12:00
f161695150 Style cleanups here 2014-06-20 01:34:34 +12:00
eb6e05b2ce PoseLib: New pose library actions now have their "id root" setting initialised properly 2014-06-20 01:34:33 +12:00
74f2e7fbc7 View3D: Handle un-weighed vertex color properly
D608 by Gaia Clary
2014-06-19 22:34:52 +10:00
7ecc3f4734 Add brief license headers to tests
These are effectively public-domain, but use apache2.0 to avoid adding new licenses
2014-06-19 18:48:41 +10:00
ce4256ce5e Code cleanup: replace odd pointer casting with structs 2014-06-19 18:38:37 +10:00
cabeb39005 Code cleanup: remove unused callback for depth drawing 2014-06-19 17:36:01 +10:00
374527ab03 Code cleanup: de-duplicate calls wmOrtho, wmFrustum 2014-06-19 17:36:00 +10:00
3db4d70b1f Code cleanup: use const passing rects 2014-06-19 17:36:00 +10:00
6601136aaa Enable texture preview even when Cycles is active 2014-06-19 13:11:58 +06:00
a6e58cd761 Use Blender codestyle, not Google's one! 2014-06-19 12:47:56 +06:00
16d64a99b4 Add unit tests for aligned alloc
This was really handy on initial work of aligned alloc
and would be handy as well when we'll need to support
arbitrary alignment on Apple platforms.
2014-06-19 12:45:00 +06:00
89ee6e0808 Cycles: attempt to solve compilation error on 32bit OSX 2014-06-19 12:24:08 +06:00
24723131ef Correct for recent commit to refactor popups 2014-06-19 15:40:46 +10:00
804f58c0de Curve: zero memory on access rather then calloc
also remove redundant check
2014-06-19 15:30:08 +10:00
70b8a8daf8 Freestyle: removed WOEdge::getVec3r() which in effect was a duplicate of WOEdge::GetVec(). 2014-06-19 14:19:09 +09:00
22a961317a Fix T40546: Duplicate spline breaks shape keys 2014-06-19 13:53:43 +10:00
Dalai Felinto
b49e6d04cc Bake-API: small cleanup to prevent unfreed memory when there are baking errors
Fix to be included in 2.71
2014-06-18 19:46:37 -03:00
Dalai Felinto
9cf66d9248 Bake-API: fix for non-NORMAL maps baking black when using cage
Reported by Andy Davies (metalliandy) outside the tracker
Fix to include in 2.71
2014-06-18 19:32:14 -03:00
Dalai Felinto
a3cf97e2aa Fix T4068787 Cycles Bake Selected To Active From Non-Mesh Object Fails With Error
Users can now bake from Mesh, Font, Curve, Surface and Metaballs.
Fix to include in 2.71
2014-06-18 19:20:46 -03:00
Dalai Felinto
1ef5669ad7 Fixup for fd0b7428 Bake-API: allow custom UV to be baked 2014-06-18 18:58:36 -03:00
68a8f0073f Complete last commit.
Sorry, forgot to check other uses of BKE_nurb_makeCurve, NURBS surfaces were affected as well.
2014-06-18 23:53:11 +02:00
4bf8b04025 Fix T40694: Curve path messed up.
Error in rB4b4bb410e04e, BKE_nurb_makeCurve() requires its coord_array to be zero'ed,
hence we need calloc here.
2014-06-18 23:47:40 +02:00
79634b4688 Fix T40637, jittering can cause the mesh to disappear.
Do not do a step when there is no collision of the brush with the mesh.
2014-06-18 21:41:30 +03:00
4baa2fdcfe Correction to GTest commit (WITH_GTEST=OFF works now) 2014-06-19 04:35:15 +10:00
5138485d43 missed removing this in recent popup refactor 2014-06-19 04:24:15 +10:00
bf58bd10bb Correct error in last commit 2014-06-19 04:17:38 +10:00
bab75f8bf6 Editmesh: add ability to show weights on wire T39054, D585 2014-06-19 04:10:07 +10:00
ef5d6edb4a Fix blenderplayer compile... 2014-06-18 19:56:56 +02:00
34b8d22275 Fix T40585, group textures cannot be selected for painting.
Issue here is that if there's a texture in the tree, chances are it has
already been set as active texture so groups are never traversed.

Now changed logic so that if a group node is active, its own active
texture takes priority over the parent group active texture.
2014-06-18 20:40:50 +03:00
72b607ab74 Some WITH_TESTS weer not renamed to WITH_GTEST 2014-06-18 22:28:27 +06:00
306cbb82ec GTest unit testing framework
Currently covers only small set of functionality.
2014-06-19 02:09:16 +10:00
47ec0394ca Fix T40679.
Cleanest way here is not do bounding box collision for editmeshes at
all. Decision is taken because:

* Usually we want to do the snapping to the edited mesh anyway (when we
don't the mesh is skipped completely, so we don't need to worry for
extra checks)

* Bounding box is calculated from derived mesh. This means that for
subsurfed meshes for instance, the bounding box may be significantly
smaller than the size of the edit mesh.
2014-06-18 18:40:11 +03:00
d9de1b367e Revert "Fix flickering when transform snapping in edit mode and cursor is"
Looks like the cleanest way to handle this is to no do bounding box collision
for edit mode at all. But this is easy to enforce

This reverts commit 7b5fe4f316.

Conflicts:
	source/blender/editors/transform/transform_snap.c
2014-06-18 18:20:55 +03:00
0eb060c7b4 Move tests into tests/ top-level dir 2014-06-18 22:03:46 +10:00
7259ac821e Code cleanup: use bool instead of int 2014-06-18 16:05:42 +06:00
87930eb7c2 Hopefully fix compilation with old MSVC2008/WIN32... 2014-06-18 10:32:25 +02:00
bb9719b7ab Code cleanup: replace direct operator calls with ED_object_toggle_modes 2014-06-18 16:29:03 +10:00
24c7adde0f Code cleanup: de-duplicate flag check in ED_object_toggle_modes 2014-06-18 16:23:50 +10:00
52a71c9db3 Transform: PET quick checks to speedup wire-only edge case 2014-06-18 16:09:58 +10:00
3c63eee7b4 Code cleanup: replace 0 with OB_MODE_OBJECT 2014-06-18 16:01:51 +10:00
b16bf6c3d4 Resolve memory leask with reports on initialization 2014-06-18 15:49:40 +10:00
24090ead01 Quiet warning 2014-06-18 15:48:22 +10:00
2ccbdec6e5 Transform: PET only treat faces as connected diagonally across quads
Was an intentional change, but worse for concave ngons, resolves T40675
2014-06-18 15:20:55 +10:00
f0a3ea54f8 Fix for weak floating-point number comparison.
Was causing assertion failures in MinGW-w64.
2014-06-18 14:18:41 +09:00
a82d3f85c6 Correct casts for IS_EQ and other macro tweaks
- ensure GET_INT_FROM_POINTER us only used to get values
- rename STACK_POP_ELSE -> STACK_POP_DEFAULT
2014-06-18 14:02:41 +10:00
3a101d8c92 Fix memory leaks in subsurf 2014-06-18 12:07:51 +10:00
528673436b Disable cubins for OSX buildbot
This is a temporary solution in order to get at least
rest of the blender begin up-to-date on the buildbot.

To be able to compile cubins again we need to switch
OSX builder machine to OSX 10.8 and CUDA toolkit 6,
which might take some time, unfortunately.
2014-06-18 02:31:36 +06:00
Dalai Felinto
fd0b74280e Bake-API: allow custom UV to be baked
Note: the custom UV option is only available when calling the operator
via a script. It's currently not exposed in the UI since it's intended
to be used by scripters

To test it:
bpy.ops.object.bake(type='UV', use_clear=True, uv_layer='MyNewUV')

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D546
2014-06-17 12:16:43 -03:00
fa257adf96 Fix some loss of precision in BKE's unit code.
When converting text to value, units' "value" had only 6 digits of precision,
leading to annoying loss of precision esp. when mixing big and small units
(like e.g. miles and inches).
2014-06-17 16:06:12 +02:00
94b574ee02 Add a first basic set of tests for the new bpy.utils.units module/API
Only contains 'LENGTH' type tests currently.
2014-06-17 16:04:48 +02:00
f94b87bbb8 New python API for units handling.
Exposes all supported unit systems & types, and to_value()/to_string() functions.

Reviewed and enhanced by CampbellBarton, many thanks!

Differential Revision: https://developer.blender.org/D416
2014-06-17 16:03:40 +02:00
ab5f4c4dfa BLI: Add two helpers to search a given string in an array of strings. 2014-06-17 15:58:07 +02:00
8f30414c29 Fix T40620: BGE Python - Ray sensor has wrong axis constants 2014-06-17 22:13:44 +10:00
a21caf32cc Fix for bad NULL check 2014-06-17 22:04:40 +10:00
10af70cef8 Support for building without Python 2014-06-17 22:00:13 +10:00
c40cc0bf6d Remove redundant check 2014-06-17 22:00:13 +10:00
10c74ec034 Fix T40638: Crash in Particle System, Connect Hair 2014-06-17 14:58:50 +06:00
fdc57e4e29 Correct argument name 2014-06-17 17:33:57 +10:00
985892c38c Cycles: only use -fno-rtti with OSL (conflicts with -fsanitize=vptr) 2014-06-17 16:00:16 +10:00
f1fb5dad95 Correct menu name 2014-06-17 15:28:32 +10:00
2886f75f46 Fix T40639: operators ignore win.cursor_warp() 2014-06-17 14:11:15 +10:00
cb2aca5833 Add icons for a few items in the menus.
Change edit mode selection to pie menu
2014-06-17 02:58:53 +03:00
6fbd801713 Add view and shade pie menus. 2014-06-17 02:26:53 +03:00
8c16f4c7d0 BGE: New Property sensor evaluation types
This patch adds "Less Than" and "Greater Than" evaluation types to the property sensor.
The Wiki Docs modifications http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Sensors/Property
Also, I have attached a screenshot and a blend to check.

Reviewers: dfelinto, moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D476
2014-06-16 14:56:36 -07:00
3144ae2c34 Cycles: Slight modification to the previous commit
This way util_simd.cpp would not require modifications
if/when SSE2 is suddenly supported on 32bit platforms.

This also allowed to unleash some issues with util_simd.h
related on the fact that there size_t and int are actually
the same types.
2014-06-17 01:00:43 +06:00
2f527a88b6 Cycles: Fix compilation error on 32bit platforms 2014-06-17 00:23:00 +06:00
f9b7617104 Fix T40646: Knife project fails with clipping 2014-06-17 04:07:03 +10:00
e848cb9e48 Fix for knife when in ortho camera view 2014-06-17 04:07:03 +10:00
b56151ff13 Cycles: Fix compilation error on platforms without SSE2 2014-06-16 23:35:44 +06:00
f2a0062042 Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) 2014-06-17 02:47:57 +10:00
a6e290166b Quiet warning 2014-06-17 02:08:10 +10:00
37fce22201 Bugfix: Units for time translate transforms (action/nla editors) was messed up
When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.
2014-06-16 21:46:03 +12:00
8e722b0232 Feature Request T40643: Animation channels can be renamed by double-clicking on them too 2014-06-16 21:46:02 +12:00
38d6841687 Need to consider blender-v* a release branch, not just blender-
This is because of blender-tiles branch we've got..
2014-06-16 15:16:18 +06:00
0125ae1eb2 Forgot this in previous commit 2014-06-16 15:13:01 +06:00
be553273b8 Make blender-* branches not being displayed on the splash 2014-06-16 14:58:56 +06:00
ecfc2db6e2 I'd tend to declare dead code is forbidden
All this code blocks commented out with UNUSED comment are
really useless.
2014-06-16 14:08:22 +06:00
6d4f06299f Fix T40606: Blender 2.71RC1 for Windows uses too old blender.mo file in Japanese
Update submodules to v2.71-rc1, it got lost on re-tag leading to wrong addons
and translations used in RC1.
2014-06-16 14:04:49 +06:00
db750b9843 Add missing dependency to CMake's msgfmt
This could have lead to situation when CMake wouldn't re-generate
.mo file from changed .po file.
2014-06-16 14:04:46 +06:00
c95d093e81 Code cleanup: move editfont drawing into its own function. 2014-06-16 17:23:44 +10:00
3f444d9984 Object Drawing: minor refactor, don't check glsl in wire-mode
also don't call glBlendFunc for hidden objects.
2014-06-16 17:23:44 +10:00
5ca44ff952 Fix T40648: Bevel Tool - Amount value slider maximum does not adapt to Amount Type settings automaticly. 2014-06-16 09:03:54 +02:00
31e15b56a4 Fix T40617: Ortho view selects objects behind camera 2014-06-16 16:55:57 +10:00
f325ddb0d7 Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595) 2014-06-16 15:29:25 +10:00
8365cebe32 Freestyle: Python API docstring updates. 2014-06-16 10:12:52 +09:00
840891e22a D545: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.
This revision extends the Freestyle Python API to make for style module writing
easier.

- freestyle.types.Stroke: A proper support for reversed() is implemented.  It
works the same with other Python sequence objects (returns an iterator starting
from the end).  This is in effect equivalent to Stroke.stroke_vertices_end().

- freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed
method are added.  The first two methods return a new StrokeVertexIterator
object that has been incremented and decremented, respectively. The reversed
method returns a new StrokeVertexIterator object that will traverse stroke
vertices in the opposite direction.

- freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke
object to create an Interface0DIterator that traverses stroke vertices.  This is
in effect equivalent to Stroke.vertices_begin().  The new API makes stroke
shaders involving function calls much simpler as illustrated below:

  # in the old API
  it = stroke.stroke_vertices_begin()
  for vert in it:
      result = somefunc(Interface0DIterator(it))

  # in the new API
  it = Interface0DIterator(stroke)
  for vert in it:
      result = somefunc(it)


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

Reviewers: kjym3
2014-06-16 10:12:51 +09:00
989bdf6748 Rename layout.pie to menu_pie 2014-06-15 16:59:36 +10:00
0c7fd1622a Minor changes and sync with master (reduce diff noise) 2014-06-15 16:53:41 +10:00
20a570f6b7 Rename WM_HANDLER_ACCEPT_DBLPRESS -> WM_HANDLER_ACCEPT_DBL_CLICK
also some minor changes for ui_centered_pie_bounds_block
2014-06-15 16:53:22 +10:00
b94eaf041f Minor changes to WM_OT_context_operator_pie_enum
- dont eval("bpy.ops. ... ")
- split the operator name and property into 2 properties.
2014-06-15 16:22:12 +10:00
a3128b0c95 Code Cleanup: style 2014-06-15 15:51:11 +10:00
74432c94f3 Merge branch 'master' into pie-menus
Conflicts:
	source/blender/editors/interface/interface.c
2014-06-15 15:37:40 +10:00
ea3bca75d9 Curve: remove unused displist members 2014-06-15 14:56:59 +10:00
4b4bb410e0 Curve: replace calloc with malloc for values immediately written into 2014-06-15 14:36:33 +10:00
57372f4ef8 Curve: use zero length array for BevList for less confusing syntax 2014-06-15 14:23:23 +10:00
716430ab64 Code cleanup: comments 2014-06-15 12:15:53 +10:00
fff18e049a Text Editor: dropping id's now paste in Python data path (like pyconsole) 2014-06-15 12:15:53 +10:00
6443bfdeb1 * Fix OpenCL after uchar4 commit. 2014-06-15 01:09:59 +02:00
b5213b2dea Fix T40007 Bevel tool resets after getting to 1.
If the side of a beveled edge hit another vertex, the offset
amount reset to zero. This was the result of commit rB1582dd5e4d7c
which clamped the amount to zero to avoid creating spikes with
obtuse angles. Now we clamp the amount to the closest end of
the edge to where the amount wants to be.
Also fixes the first part of T40365.
2014-06-14 17:47:44 -04:00
fa17e3b14c UI: refactor text cache to use zero length arrays
also correct some bad casts
2014-06-15 04:32:41 +10:00
9c1728457b BLI_gsqueue: refactor to use zero length array 2014-06-15 04:32:37 +10:00
d6287b213b BLI_gsqueue: use size_t for elem_size (was casting all over) 2014-06-15 03:49:25 +10:00
ea2043eb3a UI: Add support for popups to refresh their layput (D578)
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
2014-06-15 01:42:31 +10:00
5713d80804 Fix for last commit, forgot changes in Cycles itself. 2014-06-14 16:14:54 +02:00
871a8eb6b2 Fix T40609: Wrong WS between word and '?' (no space in english typography in those cases). 2014-06-14 15:59:12 +02:00
6603a2be9d Cycles: Don't show "Sharp" distribution in the Anisotropic node. 2014-06-14 15:45:13 +02:00
a2936d1ffe Expose Weigth tools for edit mode
Most weight tools also work in edit mode.
This change exposes all applicable tools
within a separate weight tool panel
in the tools tab of the tool shelf

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D592
2014-06-14 15:18:46 +02:00
b12151eceb Cycles: glossy and anisotropic BSDF changes
* Anisotropic BSDF now supports GGX and Beckmann distributions, Ward has been
  removed because other distributions are superior.
* GGX is now the default distribution for all glossy and anisotropic nodes,
  since it looks good, has low noise and is fast to evaluate.
* Ashikhmin-Shirley is now available in the Glossy BSDF.
2014-06-14 13:49:57 +02:00
ceb68e809e Cycles: internal code support for anisotropic Beckmann and GGX reflection
Based on:

Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs
E. Heitz, Research Report 2014
2014-06-14 13:49:57 +02:00
Karsten Schwenk
8ce1090d4e Cycles: Ashikhmin-Shirley anisotropic BSDF
* Ashikhmin-Shirley anisotropic BSDF was added as closure
* Anisotropic BSDF node now has two distributions

Reviewers: brecht, dingto

Differential Revision: https://developer.blender.org/D549
2014-06-14 13:49:57 +02:00
f5cb0cf1a5 Cycles: improved importance sampling for Beckmann and GGX glossy
Samples render slower than before, but hopefully this is made up for with
reduced noise in most cases. The main slowdown comes from samples that would
previously be wasted and turn out black, which are now continued.

GGX sampling is about the same speed as before, while for Beckmann it is slower
still. Perhaps optimizations are still possible there, but didn't find anything
easy.

Code from this paper, which comes with sample code:

Importance Sampling Microfacet-Based BSDFs using the Distribution of Visible Normals.
E. Heitz and E. d'Eon, EGSR 2014

Differential Revision: https://developer.blender.org/D572
2014-06-14 13:49:56 +02:00
5fa68133c9 Cycles: volume sampling method can now be set per material/world.
This gives you "Multiple Importance", "Distance" and "Equiangular" choices.

What multiple importance sampling does is make things more robust to certain
types of noise at the cost of a bit more noise in cases where the individual
strategies are always better.

So if you've got a pretty dense volume that's lit from far away then distance
sampling is usually more efficient. If you've got a light inside or near the
volume then equiangular sampling is better. If you have a combination of both,
then the multiple importance sampling will be better.
2014-06-14 13:49:56 +02:00
a29807cd63 Cycles: volume light sampling
* Volume multiple importace sampling support to combine equiangular and distance
  sampling, for both homogeneous and heterogeneous volumes.

* Branched path "Sample All Direct Lights" and "Sample All Indirect Lights" now
  apply to volumes as well as surfaces.

Implementation note:

For simplicity this is all done with decoupled ray marching, the only case we do
not use decoupled is for distance only sampling with one light sample. The
homogeneous case should still compile on the GPU because it only requires fixed
size storage, but the heterogeneous case will be trickier to get working.
2014-06-14 13:49:56 +02:00
d644753319 Cycles code refactor: move some surface and volume path code to separate files. 2014-06-14 13:49:56 +02:00
51a1d6481b Cycles code refactor: deduplicate and symmetrize some path tracing code. 2014-06-14 13:49:56 +02:00
5ab565283d Cycles code refactor: minor changes to light emission code. 2014-06-14 13:49:55 +02:00
781de742eb Fix T40610. This is a critical bug caused by own bugfix that does not
allow editing any object type without bounding boxes.

This should be included in the final release!
2014-06-14 14:30:22 +03:00
9073a81bce Fix compilation in cycles 2014-06-14 13:54:38 +03:00
0c1b4c35cd Code cleanup: Avoid duplicate functions for vector combination/separation in SVM.
Differential Revision: https://developer.blender.org/D597
2014-06-14 12:29:15 +02:00
8ccf9993cf BLI_dynstr: use function attributes and move comments into C file 2014-06-14 18:40:48 +10:00
ee87c161db UI: use BLI_strdup to store the original string. 2014-06-14 18:32:18 +10:00
23d7fa11c9 Skin Modifier: use BLI_bitmap to tag edges 2014-06-14 18:24:41 +10:00
34ae5bd378 UI: uiContextActivePropertyHandle wasn't passing the event to the uiBlockHandleFunc 2014-06-14 18:14:53 +10:00
8d96ea8322 BLI_rand: add BLI_rng_get_float_unit_v2 2014-06-14 18:12:19 +10:00
b54793ef02 Editmesh: remove redundant normal calculation call for subdivide 2014-06-14 17:55:07 +10:00
577e4f8d9e UI: remove OpenGL calls from ED_region_init, now handled elsewhere 2014-06-14 17:40:33 +10:00
8cd9d784c7 Replace sqrt with hypot for wipe-effect & transform code 2014-06-14 17:34:52 +10:00
94d4b31323 Math Lib: mat3_to_eulo2 & mat3_to_eul2 mixed float/double differently
replace sqrt with hypotf to avoid precision loss instead
2014-06-14 17:10:46 +10:00
019a8bc23b Quiet warning in Cycles 2014-06-14 17:00:15 +10:00
29e8c46e30 Rename 'Extend Vertex' to be clear it operates on many vertices 2014-06-14 16:27:46 +10:00
788f4858d7 Comment unused macro 2014-06-14 16:27:13 +10:00
746f0ad257 Polyfill2d: use kd-tree
Simple search for intersections became slow for larger concave ngons (100+)
Tested to work with ngons up to 75k sides, performance is approx ~6x faster then scanfill.

This is a 2D version of BLI_kdtree with modifications:
- nodes can be removed
- an index -> node map is stored (especially for tessellation)
2014-06-14 08:27:19 +10:00
19b1da2b7b Polyfill2d: avoid calculating polygon winding (its known in all cases) 2014-06-14 08:21:52 +10:00
7529e36f49 Polyfill2d: Switch directions on concave triangles
Better topology and minor speedup
2014-06-14 08:21:51 +10:00
f0f45eea2e Polyfill2d: replace array with linklist, faster resizing
approx 4.0x speedup
2014-06-14 08:21:51 +10:00
0ce3a755f8 Cycles: Add support for uchar4 attributes.
* Added support for uchar4 attributes to Cycles' attribute system.
* This is used for Vertex Colors now, which saves some memory (4 unsigned characters, instead of 4 floats).
* GPU Texture Limit on sm_20 and sm_21 decreased from 95 to 94, because we need a new texture for the uchar4 attributes. This is no problem for sm_30 or newer.

Part of my GSoC 2014.
2014-06-13 23:40:54 +02:00
7e20583688 Attempt to fix sign conversion error happening on buildbot 2014-06-14 03:35:22 +06:00
6cd5954246 Implement GLSL code for XYZ nodes. 2014-06-13 23:23:55 +02:00
2c105dd17d Follow up for previous commit: need to tweak args for scons as well 2014-06-14 03:10:30 +06:00
1d982eada1 OSX: update codesigning rules to 2.71 2014-06-13 23:08:49 +02:00
b48d0a6254 Cycles: Fix compilation error of AVX2 kernel with GCC/Clang 2014-06-14 03:02:57 +06:00
be182d9704 Code cleanup. 2014-06-13 22:26:20 +02:00
866c7fb6e6 Cycles: Add an AVX2 CPU kernel.
This kernel is compiled with AVX2, FMA3, and BMI compiler flags. At the moment only Intel Haswell benefits from this, but future AMD CPUs will have these instructions as well.

Makes rendering on Haswell CPUs a few percent faster, only benchmarked with clang on OS X though.

Part of my GSoC 2014.
2014-06-13 22:26:20 +02:00
Dalai Felinto
b4aa51f8d7 CMake fixup for bd43ac04 as indicated by Campbell Barton 2014-06-13 17:24:19 -03:00
3de3987ea1 Cycles: Add dedicated nodes to split/combine vectors.
This was already possible via the RGB nodes, but that seems weird.
2014-06-13 21:59:14 +02:00
49df707496 Cycles: Calculate face normal on the fly.
Instead of pre-calculation and storage, we now calculate the face normal during render.
This gives a small slowdown (~1%) but decreases memory usage, which is especially important for GPUs,
where you have limited VRAM.

Part of my GSoC 2014.
2014-06-13 21:59:13 +02:00
cd5e1ff74e Cycles Refactor: Add SSE Utility code from Embree for cleaner SSE code.
This makes the code a bit easier to understand, and might come in handy
if we want to reuse more Embree code.

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

Code by Brecht, with fixes by Lockal, Sergey and myself.
2014-06-13 21:59:12 +02:00
d0573ce905 Attempt to fix guardedalloc on OSX 2014-06-14 01:52:35 +06:00
Dalai Felinto
2b7ff6de06 Bake-API: increase cage extrusion/ray distance limit
Fix to include in 2.71 (asked via BlenderArtist)
2014-06-13 15:55:05 -03:00
ecb7905127 Resolve MSVC error 2014-06-14 04:46:37 +10:00
a87fb34eda Use advantage of SSE2 instructions in gaussian blur node
This gives around 30% of speedup for gaussian blur node.

Pretty much straightforward implementation inside the node
itself, but needed to implement some additional things:

- Aligned malloc. It's needed to load data onto SSE registers
  faster. based on the aligned_malloc() from Libmv with
  some additional trickery going on to support arbitrary
  alignment (this magic is needed because of MemHead).

  In the practice only 16bit alignment is supported because
  of the lack of aligned malloc with arbitrary alignment
  for OSX. Not a bit deal for now because we need 16 bytes
  alignment at this moment only. Could be tweaked further
  later.

- Memory buffers in compositor are now aligned to 16 bytes.
  Should be harmless for non-SSE cases too. just mentioning.

Reviewers: campbellbarton, lukastoenne, jbakker

Reviewed By: campbellbarton

CC: lockal

Differential Revision: https://developer.blender.org/D564
2014-06-14 00:38:07 +06:00
Dalai Felinto
b0708dd718 Bake-API: handle objects with no faces (fix T40601)
Also it has a better error handling for the BVHTree creation
Fix for 2.71
2014-06-13 14:37:59 -03:00
8957609f35 Sequencer: add support for grease pencil rendering in previews 2014-06-14 03:25:07 +10:00
f37c971878 Code cleanup: use ED_gpencil_ prefix for grease pencil 2014-06-14 02:54:17 +10:00
b96172cb05 UI: Add back ability to select a custom interface font 2014-06-14 02:32:38 +10:00
5861e528d6 New Editmesh Tool: Extend Vertex, (Alt+D) D512
Helps to easily add details to existing edges.

Similar to the rip tool it depends on cursor location to choose the edge to extend along.
2014-06-14 01:43:25 +10:00
cb7915fc60 Automatically generate blender.1 man page during build process
Patch T40418 by Lawrence D'Oliveiro
2014-06-14 01:19:58 +10:00
2ca497d84d Revert part of rB477f35 (error resolving conflict) 2014-06-14 01:06:49 +10:00
6c0926e802 Code cleanup: use const for mouse location arg 2014-06-14 00:47:12 +10:00
bf462149a6 BLI_bitmap: rename macros
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
2014-06-14 00:47:12 +10:00
a427fa5261 BLI_bitmap: typecheck maco 2014-06-14 00:47:12 +10:00
341fd67fbf Add string escaping support for BLI_str_quoted_substrN 2014-06-14 00:47:12 +10:00
9db947df41 Editmesh: Replace SmallHash with GSet for MESH_OT_loop_to_region
There no reason to assume hash will be small in this case
2014-06-14 00:47:12 +10:00
365ff66987 GSet, GHash: Add BLI_gset_add, since its common to add members to a set
also rename BLI_edgeset_reinsert -> BLI_edgeset_add, in this case its the same.
2014-06-14 00:47:12 +10:00
8bd4b7361b BLF: use NONNULL & WARN_UNUSED_RESULT attrs & remove unneeded NULL check 2014-06-14 00:47:11 +10:00
0e085c637e BLI_kdtree: use UNLIKELY 2014-06-14 00:47:11 +10:00
f663c4f857 Code cleanup: UI, unnecessary float/int conversion 2014-06-14 00:47:11 +10:00
f3e4f42665 Code cleanup: remove hack for older GCC (4.2x and newer work without) 2014-06-14 00:47:11 +10:00
1962e21703 Code cleanup: remove redundant arg from ARRAY_LAST_ITEM 2014-06-14 00:47:11 +10:00
c3c04fe582 Code cleanup: remove redundant NULL check 2014-06-14 00:47:11 +10:00
477f35559c Code cleanup: reorder BKE_scene_use_new_shading_nodes checks last 2014-06-14 00:47:11 +10:00
b72eca435e Code cleanup: remove NULL check 2014-06-14 00:47:11 +10:00
a85b85101b Code cleanup: replace interp_v2_v2v2 with mid_v2_v2v2 2014-06-14 00:47:11 +10:00
953559a794 Code cleanup: avoid call to BLI_countlist 2014-06-14 00:47:10 +10:00
e3b47c1e03 Code cleanup: BLI_strdupn -> BLI_strdup 2014-06-14 00:47:10 +10:00
6a75ecda9b Code cleanup: spelling 2014-06-14 00:47:10 +10:00
baa0f0ee1a Cycles: Support builtin images for OSL shading backend
This means packed images and movies are now supported when using OSL
backend for material shading.

Uses special file name to distinguish whether image is builtin or not.
This part might become a bit smarted or optimized a bit, but it's good
enough with this implementation already.
2014-06-13 20:42:28 +06:00
f95817c805 Minor modifications to 2.71 splash (bigger ref text, was unreadable in lowres version). 2014-06-13 16:33:20 +02:00
2e56182311 Detect version suffix based on release cycle and version char
Should make it less error-prone for release tagging/ahoy.
2014-06-13 20:19:02 +06:00
d85c2306b4 Start of the 2.72 release cycles, BCon1.
Reminder for developers: Please document new features immediately after commit in the WIP release logs. No commit without docs. :)
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72
2014-06-13 16:14:15 +02:00
169c95b8cc Splash screen update for 2.71
Artwork: Event Horizon by pieriko
2014-06-13 04:39:43 +10:00
7aea3acc03 Splash: enable rc label 2014-06-13 04:39:10 +10:00
a8532fb3dd Fix T40596: Node link menus flipped & events inverted 2014-06-13 04:05:40 +10:00
9ef7486a38 We're entering 2.71rc state now
Meaning we do subversion bump and hopefully only splash
screen separates us from the final release. Unless some
bad regression is being discovered..
2014-06-12 22:32:18 +06:00
9f0466fb6b Quiet double promotion warning & ws edit 2014-06-13 02:22:40 +10:00
ce460c6179 Fix crash running in background mode 2014-06-13 01:05:56 +10:00
8c2b5ffb11 Fix Bevel bug T39746, small scale gives flat profile.
With very small meshes or very small bevel amounts, the bevel
profile would be flat even if a round one was requested.
Problem was that the code was checking the length of a cross
product for closeness to zero to test coplanarity. Needed
to normalize things before making that test to account for scale.
2014-06-12 10:22:10 -04:00
9d0cf523b5 UI: correct __contains__ use, no need for substring check 2014-06-12 22:08:51 +10:00
3f2b02398c Fix T40559: Maya keymap node selection bug 2014-06-12 14:33:28 +06:00
20550d6f7f Fix T40582: issues with apply scale when having multires and scene simplify
Reshape and applying scale matrix on multires needs to create DM with simplify
setting disabled. Added a special flag to modifier apply for this now.
2014-06-12 13:49:46 +06:00
Dalai Felinto
aed67dc8a4 Bake-API: Set Custom Cage to be Cage Object
Suggestion by Andy Davies (metalliandy) to conform with industry standard (custom cage is something else apparently)

Note: this is the last bake related commit I plan for 2.71/rc (unless
everyone agrees that we could squeeze in D546 - custom UVs, which would
be really nice to add for 2.71 scripters)

Note 2: I'll update the wiki docs shortly
2014-06-11 22:49:30 -03:00
990eb2d737 blenderplayer stuff 2014-06-12 02:28:48 +03:00
7b5fe4f316 Fix flickering when transform snapping in edit mode and cursor is
slightly outside the mesh.

Reported by Thomas Beck on irc. Issue here is that the mesh bounding box
changes as we are transforming the vertices. Solution is to collide
against the initial bounding box. Unfortunately the snapping functions
are made in a way that a lot of code needed to be tweaked here, but the
change should be straightforward and harmless (famous last words, I
know).

Ideally we might want to even increase the size of the bounding box a
little (as seen in screen space) to allow snapping even in cases where,
cursor is slightly outside the bounding box, but since this is not so
straightforward to do for all cases, at least for me, leaving this as
a TODO.
2014-06-12 01:43:38 +03:00
fb6cb25c1c Fix T40561: cycles refraction node with sharp distribution gives black. 2014-06-11 19:55:16 +02:00
882e6de2fa Threshold value for pie menus.
Require at least a small (adjustable in user preferences) distance from
the center of the menu before a selection can be made. Default is 5
pixels.
2014-06-11 19:52:14 +03:00
25175306e3 Fixes
* pie menus with 3 items were not aligned correctly
* clipping translation can be done if one dimension of screen is large
enough.
2014-06-11 19:00:48 +03:00
6d1f76d21b Pie Menu fixes - features
* Allow setting arbitrary layouts in radial regions.  This can be
used to make nice arrangements of subareas in the pie menu. Only buttons
directly in a pie layout will use pie menu style collision detection,
any buttons in nested layouts will use regular collision detection.
Appended a test menu in Q key, sculpt mode.

* Allow aligning of buttons now to permit any aligned nested layouts to
properly align their buttons

* Operator enums will now spawn to a pie menu if the layout is a root
layout of radial type.
2014-06-11 17:31:33 +03:00
e53c00a2db Add patchset to recent Carve changes
In the future i'd rather have this reported to an
upstream instead of adding local changes. It's really
easy to override this changes if patchset is not added
and this is to be fixed in upstream. Also the function
was never used so it was rather totally harmless warning
for us.
2014-06-11 13:13:36 +06:00
bd43ac04a5 CMake: quite warnings with 3.0 (without breaking < 3.0 CMakes) 2014-06-11 03:00:57 -03:00
Dalai Felinto
a8a536d23d Bake-API: new approach for cage
There is a new option to select whether you want to use cage or not.
When not using cage the results will be more similar with Blender
Internal, where the inwards rays (trying to hit the highpoly objects)
don't always come from smooth normals. So if the active object has sharp
edges and an EdgeSplit modifier you get bad corners.

This is useful, however, to bake to planes without the need of adding
extra loops around the edges.

When cage is "on" the user can decide on setting a cage extrusion or to
pick a Custom Cage object. The cage extrusion option works in a
duplicated copy of the active object with EdgeSplit modifiers removed to
inforce smooth normals. The custom cage option takes an object with the
same number of faces as the active object (and the same face ordering).

The custom cage now controls the direction and the origin of the
rays casted to the highpoly objects. The direction is a ray from the
point in the cage mesh to the equivalent point to the base mesh. That
means the face normals are entirely ignored when using a cage object.

For developers:
When using an object cage the ray is calculated from the cage mesh to
the base mesh. It uses the barycentric coordinate from the base mesh UV,
so we expect both meshes to have the same primitive ids (which won't be
the case if the cage gets edited in a destructive way).

That fixes T40023 (giving the expected result when 'use_cage' is false).

Thanks for Andy Davies (metalliandy) for the consulting with normal
baking workflow and extensive testing. His 'stress-test' file will be
added later to our svn tests folder. (The file itself is not public yet
since he still has to add testing notes to it).

Many thanks for the reviewers.

More on cages:
http://wiki.polycount.com/NormalMap/#Working_with_Cages

Reviewers: campbellbarton, sergey

CC: adriano, metalliandy, brecht, malkavian

Differential Revision: https://developer.blender.org/D547
2014-06-11 02:39:35 -03:00
Dalai Felinto
a08275c86a Revert "CMake: quiet warnings with 3.0"
This reverts commit da7bdf1b47.

This broke compilation in OSX and some Linux boxes.
Error:  Policy "CMP0043" is not known to this version of CMake

Shall we leave those for after RC (or even 2.71) is out? ;)
2014-06-11 02:39:16 -03:00
6a18b0f6bf Regression Bugfix T40332: Bad driver behaviour on small distances.
!!! ANIMATORS/RIGGERS PLEASE TEST !!!

I've reduced the size of the threshold for the keyframe lookup here. This threshold
determines the minimum time in frames between keyframes (i.e. "how close" to each
other they can get). Making this too small causes problems like T39207, but it seems
that the threshold we've been using makes it impossible to get accurate behaviour on
driver curves with keyframes, when the driver target only moves 2cm (i.e. 0.02 BU).

So far, all of the test cases from T39207 seem to work fine, as well as Caminandes 2
files, and Kenny the Caterpillar. The Kiribati rigs/shots (thanks jpbouza for helping
to check on these!) also seem to be fine.
2014-06-11 15:49:12 +12:00
da7bdf1b47 CMake: quiet warnigns with 3.0 2014-06-11 13:46:19 +10:00
Dalai Felinto
ddf5ef0401 correction from last commit 2014-06-10 21:36:48 -03:00
Dalai Felinto
8a90edca86 Bake-API: removal of unecessary UV tests, as suggested by Campbell Barton 2014-06-10 20:51:34 -03:00
a6a38de4d6 Fix a warning in carve by initializing var 2014-06-10 20:15:50 +02:00
c5b7841b78 Themify pie menu colors. 2014-06-10 19:02:17 +03:00
84767a29f1 Fix Bevel multisegment profile bugs T39184, T37502 and last part of T40365.
When doing a 'weld' type join where there are two non-beveled edges
in the same plane one beveled one but not the other, then there
should be a curved profile; bug was creating a straight one.
2014-06-10 11:21:52 -04:00
00c7e2a2aa Fix missing notifier when inserting keyframe
Reported by Sebastian Koenig in IRC
2014-06-10 21:15:35 +06:00
a209b323dc Merge branch 'master' into pie-menus 2014-06-10 17:31:12 +03:00
05fa464a25 Fix T40551: Boolean Modifier distorts UVs
Mapping to original face was never working 100% reliably actually,
now use more robust method for this.
2014-06-10 19:27:09 +06:00
3286c8f8fb Curve: skip curves when matching bevel-fac (like 2.70) 2014-06-10 22:33:24 +10:00
74e32efbc8 Fix wrong memory write in partial render update with Save Buffers enabled
No idea why this issue hasn't been spotted before. Took several hours to
figure out where exactly wrong memory access happens..

P.S. I really want to switch ImBuf->rect from int* to unsigned char*...
2014-06-10 17:10:37 +06:00
e8c63caf77 Fix T40498 invalid textures flickering.
Issue here is most likely sampler uniforms and textures not being
updated properly when zero binding is created. Solution for now is to
allow zero binding but when this happens use sexy pink invalid texture
instead :p.
2014-06-10 01:43:54 +03:00
131d388d81 Usual UI message handling... 2014-06-09 21:52:10 +02:00
75381aea50 Fix for slowdown converting mesh to curve with large polygons
Walk the linked list rather then doing index lookups.
2014-06-10 01:18:05 +10:00
f1f33ba7be Fix T40549: box selection starting point in the file requester.
We need to 'reset' mouse coordinates to the one it was when the gesture handling started,
else org coords are where the tweak event is created, which gives a noticeable gap
(several pixels) and unwanted behavior like the one retported about file box selection.
2014-06-09 15:31:27 +02:00
0ae8ce3ab1 Fix T40057: invisible hair particles slowing down mesh edits
Skip doing particle update in object_handle_update if object is in
edit mode.

Object will be re-evaluated on exit from edit mode anyway, so it's
_expected_ to be a safe change.
2014-06-09 17:33:39 +06:00
4bd2609cd0 Quiet assert in debug mode, deleting mask/gpencil keys 2014-06-09 21:06:44 +10:00
5b367c9aaf Fix T40534: Multi-button editing, hard to distinguish sliders 2014-06-09 21:06:44 +10:00
615f4dc92f Fix T40547: Can't read single channel EXRs
The root of the issue goes to the fact that we only can
read RGB EXR files, but they could be YCbCr or just Luma.
Added support for this two cases.

Note: internally EXR would still be 3 channels, so no
big memory save would happen here, at least yet.
2014-06-09 16:43:08 +06:00
30c42d7353 Fix cycles CUDA error when trying to use >= 100 image textures. 2014-06-09 12:40:13 +02:00
30e7bdfe10 Revert "Fix T40382: 2D stabilization uses disabled markers"
It's not that trivial to support disapearing tracks in the sequence,
and since we're having ongoing 2D stabilization rework patch wouldn't
want to start doing rather bigger changes here now.

Let's just stick to legacy behavior for this release.

This reverts commits 91429d0, 543ce85
2014-06-09 14:11:48 +06:00
0b5cd4b809 Fix T40529: Euler Rotation F-Curve Handlers wrong behaviour on moving keyframes 2014-06-09 13:43:56 +06:00
04c2e5d593 Fix T40543: Duplicators draw with 'Render Only' 2014-06-09 15:55:18 +10:00
c04c6a3b83 Fix T40538: Multi-button canceling edit-text could leave edited value 2014-06-09 15:35:34 +10:00
b707b07c5b Fix mempool bottleneck alloc & freeing a single item
Would continuously reinitialize the first chunk of the mempool,
now check for at least 2 blocks.
2014-06-08 23:09:30 +10:00
c6ea6e368b BMesh: avoid recursion for BM_mesh_edgenet, runs out stack memory on large nets 2014-06-08 22:20:03 +10:00
f8f25c38d3 Fix T40510, revert openmp thread count to how it was in
2.70 for non Apple systems.

Also refactored the code that restores the previous openmp thread count.
The logic here was weird, mostly due to all the commit madness with
Apple openmp support. The restored thread count though should not depend
on the on/off state of threaded sculpting (since it has to do with
systems other than sculpting only). For OSX threads are restored to the
system thread count but Jens should recheck here.
2014-06-08 01:39:02 +03:00
918f6a49a7 Replace open() with BLI_open 2014-06-07 11:30:08 +10:00
ee812ce880 OSX: Ideasman does not like using utsname, so i use the always satisfactorily working sysctl method now for runtime OS detection 2014-06-06 22:06:26 +02:00
8392e83e13 Fix T40514: Cycles world MIS segfault 2014-06-07 00:08:40 +10:00
d53ed58c57 BMesh: avoid OpenMP use for low poly meshes (counting selection)
also use schedule(static) for simple for loops.
2014-06-06 23:54:15 +10:00
e4e58d4612 Fix T40370: cycles CUDA baking timeout with high number of AA samples.
Now baking does one AA sample at a time, just like final render. There is
also some code for shader antialiasing that solves T40369 but it is disabled
for now because there may be unpredictable side effects.
2014-06-06 15:39:04 +02:00
553264ff8e Fix T40520: Properties panel in properties region in 3D view does not go away.
Ignore '_RNA_UI' IDP...
2014-06-06 14:50:55 +02:00
a98c27f64e Fix T38668: When using Maya Input style, there is no way to snap Knife tool to midpoints 2014-06-06 18:49:41 +06:00
089608c25a Fix T40519: Keyed parameter are not redrawed
The issue has been introduced in 1fabfc9 by changing
notifiers being sent.
2014-06-06 18:18:05 +06:00
607cd0e8bc Fix T40522: Viewport layer name is not redrawed.
Yet another missing redraw flag catching (only affecting Cycles, in this case).
2014-06-06 14:14:56 +02:00
7f5d9a1f74 Fix compilation error after recent changes
fmc->script is a text datablock, for which we need to
access to it's IT property.
2014-06-06 16:07:58 +06:00
07fa016d97 Fix T40282: Renaming node sockets in Cycles nodes causes crash.
Cycles expects to find all node sockets with their correct names, but
this can be changed via the API (see bug report discussion).

Solution for now is to let cycles accept this case gracefully instead
of crashing. The shader will simply use the internal default values for
inputs and any connections will be ignored.

Would be nice to report the error somewhere, but cycles doesn't have a
proper logging system for this purpose yet.
2014-06-06 09:28:26 +02:00
96f81242bd Fix for missing visits of ID's within SceneRenderLayer in BKE_library_foreach_ID_link().
Just noticed them while working on the previous commit (rB00f722042c07).
2014-06-06 12:51:14 +09:00
00f722042c Fix for missing visits of Freestyle-related ID data blocks in BKE_library_foreach_ID_link(). 2014-06-06 12:48:53 +09:00
81afc12442 Code cleanup: remove redundant void*->int->bool cast on NULL pointer 2014-06-06 11:45:51 +10:00
0b0bac846c Fix T40508: Calculating normals crashes 2014-06-06 11:27:09 +10:00
269b14f184 Freestyle: Fix for viewport render not updating with changes of Freestyle settings. 2014-06-06 09:58:43 +09:00
70e98a21e0 Freestyle: Fix for operator error messages with no active line set and associated line style.
This commit amends a de-duplication of error messages in the commit rB6067fa682b0c.
2014-06-06 09:58:42 +09:00
9ad2623d0d Corrections to user preference descriptions and UI style. 2014-06-06 03:38:48 +03:00
4349505c6e Pie Menu goodies
* Support custom pie menu radius
* Recenter timeout: This feature makes it so whenever user activates the
pie menu at the edge of the current screen, the code still uses the
initial mouse position to calculate the drag direction for a certain
timeout.

The recenter and drag timeout feature were directly infuenced by the pie
menu add-on by Dan Eicher, Sean Olson and Patrick Moore. Thanks a lot!
2014-06-06 03:07:49 +03:00
02808f2774 UI: higher precision for IK poll angle 2014-06-06 09:51:08 +10:00
8d838f02e2 Pie Menu goodies:
* Add right click cancel to pie menus.
* Add drag style timeout. If the button used to spawn the menu is
released before the time out then leftclick will be used to confirm the
menu.
2014-06-06 02:17:07 +03:00
ae4ed68dfe Code cleanup: style 2014-06-06 07:54:05 +10:00
814df8ca34 Pie menus have their own handler function now.
This is necessary because pie menus behave quite differently than
regular menus. This will allow us to tweak the behaviour accordingly
without too many spaghetti nightmares
2014-06-06 00:53:40 +03:00
98bf3959b4 OSX: replace deprecated (10.8 ) Gestalt function with utsname, no functional change 2014-06-05 22:14:25 +02:00
bd5aa57c35 Refactor: Isolate pie menu data in own struct. 2014-06-05 21:32:26 +03:00
208d21d63f Merge branch 'master' into pie-menus
Conflicts:
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_event_system.c
2014-06-05 19:59:07 +03:00
865dfa8a7e Fix T40228: cycles CUDA multi GPU + world MIS giving error. 2014-06-05 18:10:32 +02:00
2305e3289b Fix T40429: cycles CUDA + use persistent images problem. 2014-06-05 18:10:32 +02:00
6b256a7cd8 Fix subpixel precision in transform node
The node was using sampler from the callee node and passed
it to the input nodes. Since the fact that compositor output
node uses NEAREST interpolation (why it uses nearest is the
whole separate story) it's not possible to have subpixel
precision in such cases:

  <image> -> <translate> -> <output>

For now solving by hard-coding translate node to use BILINEAR
interpolation. It can't become worse in this node anyway and
the sampling pipeline is to be re-visited from scratch.
2014-06-05 22:05:05 +06:00
91429d09a3 Tweak to previous commit 2014-06-05 19:37:12 +06:00
543ce859f3 Fix T40382: 2D stabilization uses disabled markers
This lead to unpredictable results in some cases.
2014-06-05 19:36:20 +06:00
8355955058 Avoid openmp sections in BM_mesh_elem_index_ensure 2014-06-05 18:50:10 +10:00
6f47d054ff Code cleanup: mixup hflag/htype 2014-06-05 18:37:53 +10:00
ee5f43247b Fix T40436: No preview in Brush with Cycles
More like a feature request, but after i've implemented preview for
icons it was rather simple to support nodes previews.
2014-06-05 13:15:42 +06:00
650f1d0a6f Blender Internal: Fix for lamp option "Specular" not working when "Only Shadow" is enabled.
This is followup to rB8008d9bdfd57. Blender Render and GLSL preview
now produce the same results.
2014-06-05 16:08:15 +09:00
5474dfe701 Correct hard-coded height for UV-Vertex buttons 2014-06-05 16:03:33 +10:00
4ac5d3245d Freestyle: Fix for Interface0DIterator.object docstring with additional notes. 2014-06-05 14:07:08 +09:00
a1f8cb6dbb Fix T40423: UV Editing 'Draw Other Objects' fails with Cycles 2014-06-05 13:58:31 +10:00
de280ffa32 Freestyle: Fix for a wrong formula used for RGB to grayscale conversion.
This bug fix is likely to affect the visual results of existing Freestyle setups using the
Material color/alpha/thickness modifiers with the 'material_attribute' parameter set to
either 'Diffuse' (default) or 'Specular', and also the Ramp option enabled in the case
of the Material color modifier.
2014-06-05 12:56:49 +09:00
df94a773b6 BMesh: avoid using OpenMP when nothing to do
Gave slowdown drawing on high poly meshes
2014-06-05 08:13:55 +10:00
dc2daf7a67 Fix T40482: Cycles matlib file crashes
it's possible that runtime optimizer would call get_attribute
with NULL renderstate. As per documentation, it's valid to
return false in that cases and in worst case we'll just miss
some possible optimization.

Supporting such cases would require some bigger changes to
Cycles since attributes are only set to up for the kernel
after shader compilation.

Thanks Brecht for review!
2014-06-05 02:33:21 +06:00
9b3efa912a Fix T40478: wrong cycles fresnel with GLSL materials in the viewport. 2014-06-04 19:42:47 +02:00
ec97cb87f6 Fix issues when ungrouping meta changes the final sequencer render
Seems to be caused by the way how the most bottom strip in the stack
used to apply effect. Just rendering strip in this cases will not give
proper results.

Made it so effect is applying between empty imbuf and actual strip.
Seems to work by tests, but more intense testing is required.
2014-06-04 22:27:10 +06:00
bc4043e797 Fix T40456: cycles bug with branched path + sss + no sample all direct lights. 2014-06-04 17:57:19 +02:00
fc1c7635e8 Optimize editmode drawing edgees
Was interpolating and setting the color twice per edge.
Now only set the color when needed (can be once per draw),
~2x speedup for edge drawing.
2014-06-04 20:44:26 +10:00
86f42ee331 OSX 10.10: fix for Blender crashing on fsmenu due icloud in the favorite list but pointer is NULL when not activated
This does not break other OSX versions, just add a check for pathString
2014-06-04 10:54:32 +02:00
812515b623 Freestyle: Fix for a potential infinite loop in stroke resampling by vertex count.
Changes were made in Stroke::Resample(int) in C++ to prevent a potential infinite loop
caused by an inconsistency between Stroke::_Length and the stroke length computed
based on stroke vertices.  Such a stroke length inconsistency is usually caused by missing
calls of Stroke::UpdateLength() (i.e., API implementation bugs), but also may occur due
to scripting errors in user-defined style modules.  This commit is meant to help script
writters to identify the latter error cases.  Now Stroke.resample(int) may raise a runtime
error to signal an error condition.
2014-06-04 15:03:42 +09:00
5ee55caba5 Fix for dupli's ignoring color in set-scenes
also skip setting wire color drawing depth
2014-06-04 14:24:05 +10:00
b3e9a71a3d Fix T40489: Curve drawing skipped loose-wire when mixed with solid faces 2014-06-04 08:39:49 +10:00
15c2ed08a6 Keep pie menus inside the screen area that spawned them.
More cleanup. *

* The reason there's so much cleanup is that the initial code was just
copied over from the popup menus. As I am getting more familiar with the
code I can see which parts are unnecessary or should be copied to new
functions etc.
2014-06-03 23:21:52 +03:00
69667a7e1f Solve pie menu selection not refreshing properly sometimes.
Reason here is that double press events could get chewed on handler
level. The issue Added an extra flag to hanldlers so that we can choose
to handle if we want.

Also cleanup debug messages
2014-06-03 19:27:15 +03:00
c918f24edb Tweaks to bevel and crease transform
They were using INPUT_SPRING in a way which didn't allow
it to easily redo the operator because INPUT_SPRING internally
is stored as a ration between old value and new one and crease
and bevel were converting this to value delta.

Now made it special input type INPUT_SPRING_DELTA which is
storing delta of the spring, meaning now values in the redo
panel kind of makes sense -- they mean how much to add/remove
to the crease/bevel weight.

Expect to be no functional changes from interactive transform
POV, just a bit more convenient to use redo panel.
2014-06-03 22:05:33 +06:00
1709562a04 Some cleanup, refresh pie direction and drawing on the same events that
fired the pie menu, also some debug prints. Note, this is not ideal,
normally we want to just ignore those events, will look into that later.
2014-06-03 17:05:46 +03:00
f46b384fc5 Change to key modifier should trigger re-evaluation of drag-and-drop
This change is part of a fix for T40435, but will postpone for now.

Original patch by Sergey Sharybin
2014-06-03 23:00:39 +10:00
b460674d64 Code cleanup: replace macro with function to reduce binary size 2014-06-03 19:25:07 +10:00
Dalai Felinto
6f1a64830a Bake-API small cleanup 2014-06-03 02:14:28 -03:00
Dalai Felinto
5f3c8cf72d Fix T40476 - Baking multiple selected objects in Cycles final result
depends on last selected object

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D577
2014-06-03 02:14:12 -03:00
Dalai Felinto
b7eff584b0 Bake-API prevent baking for engines that dont support the baking API
In the future we can fallback to the Blender Internal baking.

Review/Suggestions by Campbell Barton
2014-06-03 02:10:47 -03:00
e740afe1e6 View3d Toolbar: project-paint tools were in options, move into own panel 2014-06-03 12:23:37 +10:00
6c9dd174a8 Fix T39053: Replace mesh actuator does not replace material (only mesh)
The replace mesh actuator was reconverting the mesh data which causes
conflicts with the LoD code. Instead, we just look for an already
converted mesh, which should already be in the scene.
2014-06-02 18:52:13 -07:00
2645660bed Correct last commit: workaround for BGE 2014-06-03 11:32:45 +10:00
bf640a6a7f Code cleanup: use typedefs for ui handler functions 2014-06-03 09:30:08 +10:00
8df7e10f30 minor refactoring and all pie operators return finished. 2014-06-03 00:40:36 +03:00
c6f727c667 Set the area rectangle to the whole screen area that spawned the pie
menu.

This means menus are now clipped correctly and their events are handled
in the whole area too, not only inside the bounding box of the buttons.
2014-06-02 23:57:59 +03:00
9016d6d7a0 Fix T40448: Blurring bug in the compositor
This commit pretty much reverts all the changes related on tile-ability
of the fast gaussian blur. It's not tilable by definition and would almost
always give you seams on the tile boundaries.

Atmind already met the issue and tried to solve it by increasing some
magic constant, which is pretty much likely simply made it so compositor
switched to full-frame calculation in that particular .blend file.

Fast gaussian is really not a production thing and need to be avoided.
We're to improve speed of normal gaussian blur instead.
2014-06-02 18:37:18 +06:00
fd781c1095 Disable key-modifier detection when activating windows
Causes issues on X11 for some users
2014-06-02 22:33:42 +10:00
c590b2a4b3 OSX: Set Blender.app and Blenderplayer.app creation and modification date to compiletime, else we would always have the time from checkout here 2014-06-02 14:20:07 +02:00
Matteo F. Vescovi
4b2c826178 Fix compilation on unofficial 64bit archs 2014-06-02 16:27:09 +06:00
Matteo F. Vescovi
9b23d9acec Fix compilation error non non-linux architectures 2014-06-02 16:26:38 +06:00
3e6c734eaa Fix T40457: Subsurf modifier with Freestyle edges
You can't use ORIG index as an index to copy CD from source DM.
2014-06-02 14:24:25 +06:00
ba8c2be739 Improve behavior of Setup Tracking Scene when default nodes exists in the tree 2014-06-02 13:12:01 +06:00
6dec250ec6 Fix possible issues when blender is compiled without Cycles 2014-06-02 12:55:05 +06:00
559e3db792 Keep active layer when setting up tracking scene
When you hit "setup tracking scene" in MCE, the active layer usually switches
to the layer where the ground has been created, thus he shadow layer.

New objects are created or appended on that layer which means they will be
default be rendered as shadows only. This behaviour requires muscle memory
and is confusing for new users. This patch is changing the behaviour in a
way that the active layer is remembered from before setting up the scene.

Patch by gottfried, thanks!

Reviewers: sebastian_k, sergey

Differential Revision: https://developer.blender.org/D574
2014-06-02 12:51:13 +06:00
7378aac2cb Freestyle: Minor fixes.
- Fixed a typo in docstring.
- Replaced int with boolean constants.
- Updated lists of base classes for used-defined unary 0D/1D functions.
2014-06-02 15:31:31 +09:00
d4c078b887 Fix T40342 smooth shading flag in dyntopo does not work under MSVC.
Classic case of integer flag AND-ing result passed to boolean and
failing.
2014-06-01 20:44:12 +03:00
27630f41a7 Fix T40459: Gauss table can be NULL when ending the blur node operation,
which must not be passed to MEM_freeN.
2014-06-01 16:35:26 +02:00
7674ebf340 Fix T40447: Creating Rigid Bodies is rejected for meshes without polys.
This check prevents using empty (no faces) meshes as rigid bodies.
While the idea makes sense, it also prevents using modifier-constructed
meshes, where faces are added only by the modifiers.

Further the check is very easy to circumvent, by removing faces after
making the rigid body, or by assigning a different mesh datablock
afterward.

Suggested by Fabian Emmes (@der_fab).
2014-06-01 15:58:24 +02:00
682b949d0f Sync changes with buildbot server 2014-06-01 18:31:48 +06:00
edfd989e86 Fix T40315: Boolean modifier with Freestyle edges.
The helper function `make_freestyle_edge_mark_hash()` was referring to the
original mesh to determine Freestyle edge marks for individual derived mesh edges.
This is no longer necessary now that derived meshes deliver CD_FREESTYLE_EDGE
and CD_FREESTYLE_FACE layers of their own.  The reference of the original mesh
was also inappropriate since the edges coming from one of the operands of a boolean
modifier don't have proper CD_ORIGINDEX values but ORIGINDEX_NONE's.

Many thanks to Sergey Sharybin for patch contributions and discussions.
2014-06-01 16:24:18 +09:00
c641baa047 Fix a typo in a comment. 2014-06-01 16:24:17 +09:00
abec198665 Code cleanup, unused variables and comments. 2014-06-01 07:13:52 +02:00
14be4b506a Cycles: Small optimization for scenes without Transparent Shaders, helps a few percent.
Differential Revision: https://developer.blender.org/D570
2014-06-01 07:11:43 +02:00
09b0eadadd Add debug define for timing polyfill 2014-05-31 21:37:51 +10:00
aec8f4f777 Fix uninitialized var in recent change to cursor drawing 2014-05-31 17:30:04 +10:00
c68295f7d3 Fix incorrect flag checks for project-paint face winding 2014-05-31 17:29:02 +10:00
eb57f65a32 Fix EdgeSlide behavior with boundry edges
- would flip in opposite directions sometimes on the same loop
- some vertices would get directions from adjacent vertices
2014-05-31 15:41:20 +10:00
bc032b9880 Cancel the pie menu when releasing without a valid item selected. 2014-05-31 01:34:53 +03:00
cfb0ae2a17 For ease of testing, move object mode switch pie to be active across all
modes. Also modify custom python example pie and put it to Q key, sculpt mode.
2014-05-31 01:19:37 +03:00
929033a13b * Slight change on widget_box
* Pie menu operators return 'finished' to avoid evoking other operators
(maybe should be added to regular popup menus too?)
2014-05-31 00:51:41 +03:00
1f7a59ce7b UI changes:
* Central widget does not depend on width of menu text.
* Menu name hovers above the central widget.
2014-05-31 00:43:13 +03:00
8947cfe30c Add generic python operator that spawns a pie menu for a specific
operator enum.
2014-05-31 00:36:43 +03:00
d504b325fb Fix T37618 Bevel mismatched offsets and bad profile plane.
Used a different technique to resolve "impossible" offset cases
that makes more consistency. Also changed the plane in which
the profile lies for the case with only one beveled edge and
more than 3 other edges.
2014-05-30 16:07:45 -04:00
6b538f4271 Fix T40445: Disabled modifiers prevent cage edit mode.
No valid reason to make non-mapping modifiers break edit cage,
when they are disabled in 3DView/edit mode!
2014-05-30 20:22:23 +02:00
e767a7bd44 Slightly offset the angles of diagonal pie menu items. Gives a more even
result. There may be a more accurate formula here but that works well
enough for now.
2014-05-30 20:07:04 +03:00
d13a194bb7 Press and release style interaction for pie menus
works by sending enter press and enter release events. May be somewhat
hacky but it should work.

+ minor cleanup.
2014-05-30 19:47:08 +03:00
95dca123d2 Merge branch 'master' into pie-menus 2014-05-30 16:17:02 +03:00
2c69f1e574 Cleanup: Remove unused total power Emission code in Cycles, that was never exposed in the UI.
Differential Revision: https://developer.blender.org/D562
2014-05-30 14:32:59 +02:00
a26e41c0b9 Fix T40438: Name of texture is not synchronize 2014-05-30 16:26:29 +06:00
8008d9bdfd Fix T40078: GLSL Lamp with OnlyShadow makes weird colors in object.
To prevent only shadow lamps from producing negative colors, shr->diff
and shr->spec should've been clamped to positive values after lamp loop.
2014-05-30 17:11:41 +09:00
Dalai Felinto
50a7843ab1 Bake-API: replacing some MEM_callocN by MEM_mallocN
As suggested and reviewed by Campbell Barton. This is the most trivial of the cases. I will look if I can do it elsewhere in the bake code
2014-05-29 23:18:21 -03:00
Dalai Felinto
2a9efa4e51 Bake-API: Support for batch baking
When "Selected to Active" is not on, we bake all the selected objects.
This is the same behaviour we have for Blender Internal.

Dev note: I moved most of the validation tests to outside the bake()
routine so the function can be called in loop.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D560
2014-05-29 22:56:57 -03:00
d914d101ec UI: fix for drawing textselect outside of button
also draw cursor even when there is a selection.
2014-05-30 10:21:45 +10:00
54e054cce4 Followup to rB1973b17fce65, partially bring back GLSL lamp's previous behavior.
Using layer visibility in active render layer makes more accurate
preview but can cause problems in some cases:

https://developer.blender.org/rB1973b17fce65a4dfececb45b19abec37898c1ab5#comment-1

GLSL lamps now ignore layer visibility if lock_camera_and_layers is
OFF or game engine is running. The material lamp group still works
unconditionally though.
2014-05-30 08:22:44 +09:00
53424ec0ff Fix T40422: EdgeSlide works incorrectly with boundry edges 2014-05-30 01:53:47 +10:00
Dalai Felinto
2057a3a2fc Proper fix T40156 Cycles Baking and applyRotation issues
This should be the final fix for the applyrotation issue. It baffles me
that the fix involves discarding the scale transformations for the
normals but it works so I'm happy with it.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D554
2014-05-29 12:20:55 -03:00
b2cad79500 Math lib: add negate_m3, negate_m4 2014-05-30 00:26:32 +10:00
0780f5915b Fix T39804: cycles smoke domain visible in rendering.
Transparent objects could become subtly visible by the different sampling
patterns for pixels covered and not covered by the object. It still converged
to the right solution but that can take a while. Now we try to use the same
sampling pattern here.
2014-05-29 14:51:02 +02:00
9e61dcc6b8 Fix T40408: world MIS + equiangular sampling giving unnecessary noise.
It's actually not possible to do equiangular sampling for distant lights, now
it reverts to distance sampling in this case.
2014-05-29 14:50:47 +02:00
9c9fc626b7 Comments: Note direction in doxy args 2014-05-29 22:05:07 +10:00
6bde9a52f9 Fix T39174 Bevel didn't maintain edge attributes.
When rebuilding the polygons that touch bevel-involved vertices,
need to copy the edge attributes from corresponding original edges.
Special treatment of corner segments, to maintain continuity of
smooth and seam attributes.
Another fix: if have four meeting edges, two opposite ones beveled
and the other two not, propgate the non-beveled-edges attributes
across the line that joins them (perpendicular to the bevel).
2014-05-29 07:32:16 -04:00
6c721a86ff Cleanup: Use doxy for more structured comments 2014-05-29 21:17:48 +10:00
d7708817d6 Sequencer: use escaping for sequence names 2014-05-29 20:39:51 +10:00
73452ae588 BLI_dynstr: add assert to check curlen is correct 2014-05-29 20:39:51 +10:00
4f83d3ec76 Fix OpenCL compilation error in Cycles, when building without hair support. 2014-05-29 12:38:03 +02:00
3e0d5898e5 Fix T39686: nused omp firstprivate variable sphdata in particles 2014-05-29 15:20:19 +06:00
75135cfa9b OSX: fix T40413, automatic threads for compile throw wrong output 2014-05-29 11:15:32 +02:00
34ca8fe82a Fix T40414: Multiple input nodes in a group not working.
A node group can have multiple input nodes. In the compositor that means
each of the input sockets has to be connected to the linked outputs,
which is represented by a single link on the outside of the group.
2014-05-29 10:00:21 +02:00
47bf77951a Fix T40411: UI incorrectly permits changing materal_slots on linked obdata 2014-05-29 16:21:15 +10:00
a366acbe61 UI: make it clear edge functions handle multiple loops/rings 2014-05-29 15:28:58 +10:00
Dalai Felinto
3a3edc6c2d Revert "fix T40375 Glossy shader bakes different than render"
This reverts commit 12abe94de8.

After a long discussion in the bug tracker we decided baking should use
the faces normals for glossy (and combined). This is what Blender
Internal is doing, and one of the more predictable way of yielding
predictable results.

That also means the result will not match the render perfectly, but this
is preferrable over the alternatives at hand.

Conflicts:
	intern/cycles/kernel/kernel_bake.h
2014-05-29 01:19:12 -03:00
96f303392b Fix T40381 and revert previous commit.
Looks like the normal update flag is used internally in the modifier
itself. So as a workaround just pass normal update to the nodes when
flood filling
2014-05-29 05:22:44 +03:00
ac0b69233c Related to T40381,
Cleanup the normal flag or else the smooth tool will work on more and
more nodes as we sculpt.
2014-05-29 05:04:39 +03:00
a6bd6a8366 Add notifiers and reuse update calls for flood fill operators 2014-05-29 04:48:06 +03:00
11a156255d Fix T40412: Moving mask layers does not invalidate mask drawing in the movie clip editor
Issue was caused by a missing WM_event_add_notifier(..) in the mask_layer_move_exec() function...
2014-05-28 20:00:41 +02:00
973f95fa9d Fix T40157: Loading movies larger than 4GB in size fails
Issue was caused by _wstat returning EOVERFLOW error because
of file size didn't fit into stat structure which was using
long datatype.

The idea of this patch is to use _wstat64 and _stat64 structure
which is capable storing 64bit file sizes.

Made it a typedef for stat structure used by BLI_stat function
in order to make code easier to follow and avoid ifdefs all
over the place.

Additionally solved issue with BLI_exists which was wrongly
returning False in cases destination file is larger then 4GB.
2014-05-28 23:21:39 +06:00
74cc3974fe Fix T40405: Blender crashes on FBX export instantly.
Better fix than rBbef5cb3aa2e5a: consider edges between faces with opposed normals as sharp.

In fact, previous code was broken more deeply in this case (inconsistent normals across
a 'smooth fan') - some loop normals would even never be computed!

Fixing this is possible (even wrote it, actually), but this adds more complexity
to a piece of code that is already awfully complicated, *and* normals in that kind
of smooth fan do not make much sense anyway. So simpler and nicer results with
assuming sharp edges between such 'opposed' faces!

Note that there is some face (loop) ordering black magic at work here, added more comments
to try to explain how and why all this works.

As a bonus, we do not need to check for already computed loop normals anymore, since we
know each 'smooth fan' will be walked once, and only once.
2014-05-28 18:55:46 +02:00
9913da2b7f Found another bmesh func that invalidates loop indices... 2014-05-28 18:55:45 +02:00
4d1ec4d9c7 Fix T40386: cycles anisotropic BSDF difference between SVM and OSL. 2014-05-28 16:41:48 +02:00
7c8be33d14 Fix T40338: Vertex transform origin ignores Normalize option in graph editor
Simply apply unit scale on curve transdata and un-apply on flush.

Needs some more intense testing tho.
2014-05-28 19:45:06 +06:00
dcf2a071a0 Fix mask transform when display aspect is not 1:1
Requires some more intense testing.
2014-05-28 18:45:05 +06:00
bef5cb3aa2 Fix T40405: Blender crashes on FBX export instantly.
This crash can only happen in case faces in same 'smooth fan' have reversed normals.
To support this, we have to always keep a way to get real values in loop_to_poly,
even when loop itself is tagged as done, it might be needed in computation of one of
its neighbor's split normal later.
2014-05-28 13:54:29 +02:00
67f5af0531 Add asserts to BKE_mesh_normals_loop_split 2014-05-28 20:50:05 +10:00
9dbd577184 Fix T40272: Error setting option flags2 to value fastpskip 2014-05-28 16:11:59 +06:00
22cdfd6cac Style cleanup 2014-05-28 15:56:54 +06:00
6bb459f6d7 Fix T40403: Particles disappear after rendering
Read the comment in ensure_curve_cache, it tells it all.
2014-05-28 15:28:52 +06:00
5a7b049a94 Fix T40383: Keying node doesn't work
We should actually re-consider whether zero-sized kernels are allowed
for edge detection.
2014-05-28 14:29:24 +06:00
94b2852947 Fix T40399, OpenCL compile error. 2014-05-28 09:36:15 +02:00
4b15a54ede Fix T40388: 2.70a - Blender Render - Texture Stack - persistent checkbox state.
Reset 'use_texture' flag of a material tex slot when creating/assigning
a texture to an empty slot.
2014-05-28 08:19:41 +02:00
a6005319a7 FCurve: Setting extrapolation needs to recalc handles 2014-05-28 12:30:33 +10:00
7317b4fcf1 Fix 40343: Using replace mesh (e.g., LODs) on a skinned mesh crashes.
Need to use parent->AddRef() in a few places.
2014-05-27 17:05:35 -07:00
04623e8b1f BGE: Accidentally committed some debug code in 8dafbe. 2014-05-27 14:32:32 -07:00
3b3908020e BGE cleanup: Removing some potential memory leaks from KX_NavMeshObject when it fails to build a navmesh. 2014-05-27 14:19:45 -07:00
8dafbed4b5 BGE cleanup: Remove unused KX_TrackToActuator::m_tracktime member. 2014-05-27 14:12:53 -07:00
5c5ca1355f Fix T40362: Projected texture from spotlight doesn't scale with spotsize when changed in-game via Python
GPULamp::winmat needs to be updated after the spot size has changed.
2014-05-27 13:50:19 -07:00
1c5ffdd55e Fix T40387, image api save and pack did not fire notifiers. 2014-05-27 23:01:09 +03:00
f469185f25 Fix T40344: Levels of Detail not smooth with Armature Modifier
Due to skinning changes for multi-threaded animations, the LOD check was
being done after skinning. Now the LOD check is run before animations.
This means the culling information is a frame old, but this should be
fine.
2014-05-27 12:52:56 -07:00
faf41c6c20 fix blenderplayer compilation 2014-05-27 17:53:30 +03:00
Dalai Felinto
517094a697 Cycles: new camera_direction_from_point
Reviewers: brecht

Differential Revision: https://developer.blender.org/D556
2014-05-27 11:09:36 -03:00
Dalai Felinto
12abe94de8 fix T40375 Glossy shader bakes different than render
Comments from Brecht Van Lommel:
"""
Currently the viewing direction for each pixel is set to the normal, so
at every pixel glossy is evaluated as if you're looking straight at it.
Blender Internal works the same.
"""

This patch makes baking glossy as viewed from the camera.

Reviewers: brecht

CC: zanqdo

Differential Revision: https://developer.blender.org/D555
2014-05-27 10:43:26 -03:00
55e4454db8 Cycles CUDA: use fewer registers for sm_50 cards for better performance. 2014-05-27 15:11:32 +02:00
69c7522b24 Fix T40379: world MIS causing too much CUDA memory usage.
The kernel for baking the world texture was the same as the one used for
baking. Now that's separate which allows the kernel to reserve much less
memory.
2014-05-27 15:11:32 +02:00
bc9e66f083 Revert fix for T38594, caused T40186 (just accept limitation for now) 2014-05-27 21:29:52 +10:00
4893780d9f PIL_time is no longer used in BLI_random.
The last remnant of using the system time for random seed was removed
in rBafb4b65, now seeds are always explicit for BLI_random.
2014-05-27 08:29:55 +02:00
13b81c84a0 Fix T40373: Adding movie creates overlapping audio strips 2014-05-27 15:35:17 +10:00
c6a34e047c Correct ortho_v2_v2 arg size 2014-05-27 14:42:22 +10:00
06a05e4dae BSD's was using too many build threads for convenience makefile
D431 from Aaron Peterson
2014-05-27 09:47:11 +10:00
bbd0f6d37f Nice little widget indicator influenced from pie menu add-on 2014-05-27 00:31:04 +03:00
1f4337b770 Pies:
* More display code
* Add collision detection in one more place, now object mode pie
collision works correctly.
* Changed object mode pie shortcut to TAB
2014-05-27 00:03:41 +03:00
Dalai Felinto
0efc0d5200 fix T40322: Glitch in baking a mixed SSS shader 2014-05-26 16:55:40 -03:00
3a41797df4 Usual UI messages tweaks. 2014-05-26 20:12:03 +02:00
49e4866312 Refresh the pie area always on mousemove 2014-05-26 20:30:58 +03:00
e13bc48780 Angle range based collision detection on pie menu radial items. Also
some code to draw a central widget as well.
2014-05-26 19:53:02 +03:00
b33d83bf51 Attempted fix for T40363: CUDA 30% slowdown in testbuilds compared to 2.70.
CMake had this --fast-math flag but scons not, makes a big difference on some
files. Slightly slower rendering might still happen though, but it should not
be this much.
2014-05-26 16:52:28 +02:00
033b4ffddd Fix for curve map-taper being greyed out incorrectly 2014-05-27 00:01:23 +10:00
91a91b9362 Fix T40223: Errors in bevel_factor_mapping_start/end
Initial patch by Lukas Treyer with own fixes added
2014-05-27 00:00:44 +10:00
5680172a3a Fix for out of bounds read calculating spline mapping 2014-05-26 23:53:10 +10:00
159bf9d19c Curve Mapping: disable for cyclic curves (it doesn't make much sense and is buggy) 2014-05-26 23:53:05 +10:00
e9e1357fb9 Fix for out of bounds reads with curve bevel mapping 2014-05-26 23:31:52 +10:00
48b053bd44 Fix T40345: cycles volume render + AO pass not working correct. 2014-05-26 13:51:11 +02:00
0075efc4d2 Fix T40306: cycles baking not distributing work among CPU cores well. 2014-05-26 13:51:11 +02:00
3b4f792ce1 Fix T40315: Boolean modifier with Freestyle edges 2014-05-26 16:45:43 +06:00
3131b5d9dd Fix T40354: Camera Tracks in the Dope Sheet can't be deselected 2014-05-26 16:36:20 +06:00
1539785963 Fix T40359: Scene / Color Management: White Point Mapping Has Limit 2014-05-26 16:28:07 +06:00
4c38e826dc Fix for a missing code update in my commit rB08528f577dcb. 2014-05-26 16:49:00 +09:00
34862b5b57 Workaround T40317: Ghost/Win32 keys sticking for new windows
Ghost win32 ignores key-up events for newly activated windows.
for now just disable code for win32 to initialize modifiers for new windows.
2014-05-26 16:37:21 +10:00
fce731a175 Fix for thinning strokes at intersections between visible and background hidden lines.
This commit is intended to fully fix the problem described in
https://developer.blender.org/T36425#19 (see also the previous commit rB08528f577dcb).

Addition of a small offset (to avoid singularity in stroke rendering due to overlapping vertices)
was not performed for all overlapping vertices.

Removed the StrokeCleaner and related helper functions which were added as a
temporary workaround in rB2a5b6d9c8f16.
2014-05-26 10:54:25 +09:00
6b7bee6cd7 Fix for BLI_delete failing on files containing quotes 2014-05-26 10:23:05 +10:00
a1d286a699 Fix curve switch direction ignoring active vertex 2014-05-26 09:37:04 +10:00
d84af360ca EditCurve: Replace -1 with CU_ACT_NONE define 2014-05-26 09:37:04 +10:00
eaf815f14a Fix for curve having invalid active vertex after setting type
also allow passing NULL vertex to BKE_curve_nurb_vert_active_set
2014-05-26 09:35:32 +10:00
c3b6b8d86a Detect intersection of buttons with big segment from center of pie menu.
This already starts feeling like a pie menu. A better model for
intersection might be to store a direction for the pie menu widgets and
check if cursor is within the designated angle.

Also python menus don't work too well yet.
2014-05-26 01:32:33 +03:00
a1fbb85c76 Do not align pie menu item text on the left. Also some minor cleanup 2014-05-26 00:08:05 +03:00
f268dfe88e Merge branch 'master' into pie-menus 2014-05-25 19:47:01 +03:00
f574b1ca3c Fix Sequencer OpenGL render ignoring preview channel 2014-05-25 23:52:10 +10:00
08528f577d Freestyle: Partial fix for thinning strokes due to flipping stroke directions at TVertices.
A description of the problem is found in https://developer.blender.org/T36425#19 .

The cause of the issue was identified as roudning errors in Operators::createStroke() due
to insufficient numerical precision.  Precision promotion from float to double was done in
the return values of getPoint3D/2D methods in Interface0D and its subclasses in C++
(data members stored in the 0D classes have already been in double precision).
2014-05-25 19:47:49 +09:00
aef443ab2d Fix T40438: Pressing G key to move the camera quits Blender. 2014-05-25 11:06:32 +02:00
Dalai Felinto
b3f9117523 Revert "Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader"
This reverts commit 81b129d3b8.

This is not the correct fix yet. More details in T40322
2014-05-24 14:22:55 -03:00
c75261c8cb Fix T40331: Incorrect display of path of editted data. 2014-05-24 16:02:44 +02:00
9907538239 msvc 2008 platofrm suffix changed to be -vc9 2014-05-24 11:20:18 +02:00
7fb33e5c43 Cleanup: Comments and unused variables. 2014-05-24 07:28:33 +02:00
f5055d8688 Some operation allowed to set invalid active scene render layer
Forbid this now and do tricks in the versioning code to repair
corrupted files.

Thanks to Pablo, Caminandes and Koro for discovering this bug!
2014-05-23 18:30:36 +02:00
5811076d0d Fix crash rendering linked scenes in compo
Simply linking scene (lib.blend) without compo into another one (compo.blend),
using it in a compositor and rendering it would crash.
2014-05-23 17:42:15 +02:00
f8ce417eba Fix T40320: wrong render layer visibility with cycles deformation motion blur. 2014-05-23 16:11:59 +02:00
4c9587d754 Optimization of keying clip operations
Gives around 20%-30% speedup by doing early exit from
kernel traversal cycle.
2014-05-23 16:02:45 +02:00
56b7d55833 Report to the console when custom ocio config is used 2014-05-23 13:48:35 +02:00
d3a94941ef Fix T40325: Part II
Use same cursors for GRIP buttons as for window resize e.g.
2014-05-23 13:06:36 +02:00
a59262e325 Spelling fix 2014-05-23 13:04:15 +02:00
4e13616b04 Checker Deselect: keep active item selected by default 2014-05-23 20:50:27 +10:00
bec8cee7cf Fix T40324: Checker deselect fails for edge-rings 2014-05-23 20:50:27 +10:00
fad267bf57 BMesh Walker: add face-shell walker 2014-05-23 20:50:27 +10:00
7e78322eef BMesh Walker: rename BMW_SHELL -> BMW_VERT_SHELL 2014-05-23 20:50:27 +10:00
d82cd4d5ef BMesh Walker: typecheck args for walker->begin() 2014-05-23 20:50:27 +10:00
90449f9950 Another fix for T40230/T40290: Object tags were not properly initialized
before entering the recursion check.

Now use group tags instead of object tags, which could be a little more
efficient and was used before this patch too.
2014-05-23 09:28:46 +02:00
01f5845778 Fix T40325: UILists do not save their height anymore 2014-05-23 08:55:31 +02:00
561be3ac53 Bake API: compare with NULL rather then casting to bool 2014-05-23 14:54:12 +10:00
0ade57f8c0 Transfer shape keys wasn't checking for mesh types 2014-05-23 11:41:13 +10:00
Dalai Felinto
2ffe037420 Bake-API: shows the baked image in the biggest SpaceImage around (just like Blender Internal)
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D544
2014-05-22 22:39:51 -03:00
cab9bd2bf9 Cleanup 2014-05-23 10:42:24 +10:00
Dalai Felinto
7f089afc8b Bake-API: relaxing in the check for scale uniformity
It still warns the user that there may be an error, but the baking goes
on. Also using the new is_uniform_scaled_m4() instead of float comparison.

Reported and fix suggested by Campbell Barton as a concern over 2bfc3deb
2014-05-22 21:35:58 -03:00
Dalai Felinto
dd96205d0a fix T40323 Segfault on baking after rendering
The remaining functions in blender_python.cpp changed from using the
MACRO to use python_thread_state_save/python_thread_state_restore

Since this bug only happens when 'Persistent Images' is on it was
introduced in some of the early merges with master and I never caught
it.

Thanks Daniel Salazar for helping with the bug hunting.
2014-05-22 20:18:48 -03:00
Dalai Felinto
81b129d3b8 Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader
If we are using a mix node we still need to evaluate the BSDF lighting
even if scattering is successful.

Note: this was working for branched path (probably an oversight when
branched path support was introduced for baking, a good oversight though
;)
2014-05-22 19:46:22 -03:00
Dalai Felinto
d7e4a79388 Cycles-Bake: fix T40270 Combined Type fails to bake Emission node
Main code and review by Brecht Van Lommel

Differential Revision: https://developer.blender.org/D543
2014-05-22 19:05:23 -03:00
Dalai Felinto
2bfc3debd9 Bake-API: throws error if highpoly object(s) doesn't have uniform scale (fix T40156)
The real fix would be to support non-uniform scaled highpoly objects.
For more information see 8d29739
2014-05-22 15:05:02 -03:00
Dalai Felinto
a8a5d68bb5 Bake-API: throws error if there is no UV 2014-05-22 15:05:01 -03:00
12e47d0536 Blender Internal: Fix texture influence panel not showing Displace/Warp sliders for volume materials. 2014-05-23 01:49:58 +09:00
97d047a3e9 Fix T40307: Crash with freestyle and particle hair.
The scene file provided by the problem report has many degenerate faces coming from
a particle system.  These zero-area faces were not expected in the ray-casting line visibility
algorithms of Freestyle.  Now degenerate faces are properly excluded from the imported
mesh data and not fed to the line visibility algorithms.
2014-05-22 23:18:47 +09:00
7a86765095 Fix T40290: False (or malfunctioning) dependency-cycle warning when adding dupligroup objects to another group.
The new recursion check for groups duplicating themselves has to un-set the LIB_DOIT flag after each object, otherwise it will prevent duplicating a (non-recursive) group multiple times.
2014-05-22 15:46:35 +02:00
c56bbccb0d Fix T39901: Crashes if the resolution % is changed while rendering an animation
Copy render percentage. dimensions and border settings and use them for all the
frames in the animation render.
2014-05-22 14:39:31 +02:00
7ab602b730 Correction to previous commit, sorry about that. :/ 2014-05-22 14:03:32 +02:00
1dd977272b PackedFiles: add (readonly for now) access to packed raw data (most useful for exporters). 2014-05-22 13:57:35 +02:00
Nathan Letwory
cd14dcbe91 Don't write all uv textures, but only active uv layer.
Fix T39922
2014-05-22 12:34:47 +03:00
29dc8259a8 Mistake naming in recent commit 2014-05-22 17:40:35 +10:00
c6de033bf1 Fix T38493: ray_cast causes runtime error with no faces 2014-05-22 17:11:44 +10:00
1cf5e95f3d Freestyle: added missing forward declarations of referenced struct's. 2014-05-22 16:03:36 +09:00
77153b3032 Freestyle: Fix for versioning code not working properly with new texture options.
To get the versioning code properly work, the condition should have been:

  DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "MTex", "*mtex[18]")

The present commit uses another new structure member instead, to avoid referring
to the magic number 18 in the last string literal.
2014-05-22 16:03:35 +09:00
d27d982657 Fix T40215: Boolean looses bevel width 2014-05-22 16:43:38 +10:00
07ffd9c790 Fix T40309: Select inner region 'bigger' failed with equal regions 2014-05-22 14:58:34 +10:00
6ce67a8eab For increased type safety, ANIM_animdata_filter() now specifies the enums its arguments can use
Hopefully this should help prevent bugs lik T40304 from occurring again.
2014-05-22 15:46:51 +12:00
5f70f8b2b4 Code cleanup - Reshuffling some defines 2014-05-22 15:45:27 +12:00
6f99699d7d Previous commit uncovered another bug - Ungrouped FCurves couldn't be rearranged still
This was because to the filtering code, those FCurves still weren't in any
groups, and so couldn't be visible (since a temporary group is created to
house them). As a result, the visible-channels list would be empty, causing
all hidden FCurves to be treated as hidden.
2014-05-22 15:37:32 +12:00
9e76f13e6b Fix T40304: Rearranging NLA Tracks (and actually, all animation channels) didn't work anymore
These were broken by 1f3655d224, since
an argument of the wrong type was getting passed to ANIM_animdata_filter(),
resulting in no channels ever being picked up for the "visible channels" list.
2014-05-22 15:25:54 +12:00
5bb615c41e Bugfix T40292: Trying to rename shapekey datablocks from AnimEditors renamed object instead 2014-05-22 14:10:39 +12:00
049b6cfa6d Fix for image garbage collection failing to run for render-only views
Check for freeing old images was running per-object, move this to viewport drawing.
2014-05-22 11:58:07 +10:00
90db85a263 Fix T40283: Matcaps disables GLSL shadows 2014-05-22 11:28:03 +10:00
a217db0d63 Fix T40297: Crash while ripping an edge when autosmooth is activated.
Turned out there was still quite a few cases were indices were set dirty,
but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP,
but a few others as well). So probably this crash was not the only one
hidden here.

Hopefully all possible cases were catched this time!
2014-05-21 22:37:50 +02:00
Dalai Felinto
8d297394ba Bake API: partial fix T40156 (applyRotation issues)
This fixes most of the cases, the only situation not addressed is when
the highpoly object(s) has non-uniform scale.

mul_transposed_mat3_m4_v3() should take care of non-uniform scales so
I'm a bit confused on why it doesn't work. The lowpoly object can have
any transformation, the only issue is if the highpoly object has
non-uniform scale.

Test file of the remaining issue:
https://developer.blender.org/file/info/PHID-FILE-tpw2xgddyzxtpg3e7xzs/

Reference reading:
http://www.unknownroad.com/rtfm/graphics/rt_normals.html
2014-05-21 15:10:57 -03:00
79fe023ec6 Fix T40299, Crash on rendering due to dependency cycles and NULL pointer when using particle duplis. 2014-05-21 19:07:53 +02:00
d88e9fb338 Minor cleanup of previous commit. 2014-05-21 18:52:50 +02:00
b963434f49 Fix T40222 texture painting on mirrored meshes does not apply pixel
bleeding at the symmetry edges.

We need an extra way to detect if faces overlap here. An easy way is to
detect the winding of the faces in UV space. If the winding differs, the
faces will naturally overlap. I have tried a few approaches here such as
choosing an offset point from the middle of the edge for intersection in
both faces of the edge in uv space, but winding is the safest way and
should work with very small faces/dense meshes too.
2014-05-21 18:35:27 +02:00
e07034f8e1 Freestyle: code cleanup: removed old commented lines of code in SilhouetteGeomEngine. 2014-05-22 00:46:25 +09:00
56b67cb2b4 Freestyle: code cleanup - removed very old commented lines of code. 2014-05-22 00:46:25 +09:00
0516071a86 Fix for a regression in rBe84732858590. 2014-05-22 00:46:24 +09:00
13c92a77d3 Freestyle: Fix for Z normalization in SilhouetteGeomEngine.
The Z component of the projected point in the 2D image space has already been normalized
in GeomUtils::fromWorldToImage().
2014-05-22 00:46:23 +09:00
01ac74e4ad Freestyle: Added utility function SilhouetteGeomEngine::CameraToImage().
TODO: Fix for Z normalization in SilhouetteGeomEngine methods.
2014-05-22 00:46:22 +09:00
c829c71c57 use C style string formatting 2014-05-22 01:12:40 +10:00
27cebb2651 Fix T39711: cycles particle motion blur affected by viewport draw method. 2014-05-21 15:51:37 +02:00
ebbeb082d1 Fix T40271: recalculation of the bone roll does not work correctly.
Check that up_axis is not aligned with bone was wrong in at least two aspects
(not working against negative alignement case, and since ages it seems,
using Z axis when bones are along Y axis...).

Also optimized a bit here, better to have a normalized version of vec_roll_to_mat3(),
since it needs normalized vector anyway, and we have to normalize it for the tests
before calling it anyway (so now, we only do that twice in Transform code, instead
of three times).

And we can perform aling test *before* calling vec_roll_to_mat3!
2014-05-21 15:22:31 +02:00
d203edfc93 Fix T40291: Crash when adding # driver to some fields 2014-05-21 16:33:48 +10:00
238a6149af Fix T40289: Cycles leaking memory
error in recent commit
2014-05-21 16:00:20 +10:00
b1350cf392 Fix for uninitialized memory use in Cycles 2014-05-21 15:40:52 +10:00
628353835c Fix T40267: Addon's bug tracker urls not respected 2014-05-21 12:18:25 +10:00
0865b4f48e BGE LibNew: Only warn about meshes with users in debug builds.
This information only really seems to be for helping developers track
down bugs, and isn't really something the user needs. So, lets not spam
their console.
2014-05-20 15:04:25 -07:00
38fcc3e14b Fix T40280: sequencer sound strips with an end at a negative time kept playing
The bug was caused by using negative numbers as the end for playing forever (or until the end of the sound is reached) in the library. This was used with speaker objects which have an end of FLT_MAX now instead and the negative number interpretation was removed. I hope this doesn't break anything else.
2014-05-20 23:01:56 +02:00
3bba558944 Fix T40269: Transform Constraint Doesn't Obey World/World Setting (Inherits from Parent instead!)
Revert small part of own rB8714ae09f894, which changed scale setting from absolute to relative
(was good in absolute, but bad because it breaks existing rigs).
2014-05-20 15:21:33 +02:00
c28f2ed489 Fix T40224: Crash moving objects to another layer
Incorrect nonnull attribute was optimizing out NULL check.
2014-05-20 21:41:57 +10:00
9296f0c2fe This reverts commit c998d6d4b5. 2014-05-20 21:35:34 +10:00
c998d6d4b5 Fix T40224: Crash moving objects to another layer
passing NULL to BLI_sprintfN crashed in some cases.
2014-05-20 21:01:02 +10:00
358664a28a Use int for i in hair smoothing function, we check against negative
values below
2014-05-20 10:49:29 +03:00
2191590711 Polyfill: simply re-ordering checks gives ~%15 speedup 2014-05-20 17:21:57 +10:00
e2a9923a6b Fix T40271: Missing redraw for bone editing bone roll
We should have a new notifier for this
2014-05-20 16:20:14 +10:00
f6e774552c Freestyle: Fix for returned references to auto variables. 2014-05-20 15:12:13 +09:00
6c136a69b0 Freestyle: Fix for GetOccludeeF1D returning a one-element list containing None when it is supposed to return an empty list. 2014-05-20 15:12:12 +09:00
cb023ce0fd Fix T34255: Modifier keys ignored when activating windows 2014-05-20 14:21:13 +10:00
3abb2e0a3d BGE cleanup: Removing the unused KX_Scene::UpdateMeshTransformations() function. 2014-05-19 21:14:18 -07:00
71c11dbb02 Fix T40252: Knife snapping ignores axis-constraint 2014-05-20 13:53:52 +10:00
ba1acec6bc bgl API docs: link to OpenGL 2.0 reference
D538 by codemanx
2014-05-20 09:49:30 +10:00
295bc1249a Fix part of T35600: Outliner did not update when renaming armature bone names. 2014-05-19 22:37:35 +02:00
0d9e6a736a Fix T40262: cycles GPU bake crash due to kernels not loaded, randomly due to thread timing. 2014-05-19 19:33:09 +02:00
e97a186ffe Fix cycles standalone compile error of shading system enum change. 2014-05-19 19:33:09 +02:00
3b53fffb77 Cycles: revert async CUDA changes, these are giving too much trouble still.
Fixes T40027. This means we get more CPU usage again when using multiple CUDA,
but the impact on performance is too big a problem with the current code.
2014-05-19 19:33:09 +02:00
85398dea50 make MSVC plaformsuffix check much stricter. For some reason MSVC_VERSION is set 2014-05-19 19:21:25 +02:00
4fc0992f11 Fix T40240: Bug with render region with maya short cut 2014-05-19 16:47:27 +02:00
Sebastian Ramacher
76f7a5bd6b Fix compilation error on kFreeBSD 2014-05-19 16:35:24 +02:00
85975be58e Show warning when hiding a proxy bone
It can't be undoe with Ctrl-Z, but Alt-H works just fine.
So instead of breaking someone's workflow let's just add
an info about how to bring bones back.
2014-05-19 16:26:34 +02:00
6271c72caf Fix T39764: cycles not rendering EXR image textures with 5 channels (RGBA + Z). 2014-05-19 16:25:17 +02:00
d9dd29054f Style cleanup 2014-05-20 00:11:16 +10:00
db2d900f74 Fix T40135: cycles baking did not support branched path settings yet. 2014-05-19 15:14:43 +02:00
6252f75025 Code refactor: move branched path AO and SSS code into functions. 2014-05-19 15:07:40 +02:00
c91d4ccbeb Code refactor: rename kernel_displace.h to kernel_bake.h. 2014-05-19 15:07:32 +02:00
c6d9b11b70 Fix T40195: cycles smoke + persistent images animation render not working correct. 2014-05-19 14:45:52 +02:00
f44e743c72 Fix T40194: cycles deformation motion blur not working with curves + shape keys. 2014-05-19 14:25:08 +02:00
5f05ebc2d9 Fix T40242: 3D view background images incorrectly shown during viewport render.
Now they are shown when they are also visible in other draw modes.
2014-05-19 14:25:08 +02:00
Nathan Letwory
0f4018a8e5 Remove two unnecessary includes. 2014-05-19 14:46:58 +03:00
Nathan Letwory
0684ac9301 Move ShadingSystem enum to shader.h
Add SHADINGSYSTEM_ to enum member names, so it is clear where they
are from.

Revert BVHType enum changes, as there's no need for code dedup here.
2014-05-19 14:46:58 +03:00
Nathan Letwory
9a7c4ead3f Move BVHType and shadingsystem enums to top-level of Cycles namespace.
Easier access of BVHType and deduplication for ShadingSystem.

Reviewers: dingto, brecht

Differential Revision: https://developer.blender.org/D534
2014-05-19 14:46:57 +03:00
74f77a2956 This reverts commit d1526da787.
If tweaking is done by accident, user better increase threshold in preferences.
2014-05-19 21:34:57 +10:00
3a3b990b2d Workaround T40241: Vertex snapping snaps to wrong place 2014-05-19 19:25:59 +10:00
f8278e5479 Correct ARRAY_SIZE macro and make doxy comments consistent 2014-05-19 18:00:20 +10:00
875aff2a9a Fix T39897: shape keys created while the Relative checkbox is unchecked start out with frame=0
So! First, frame for absolute shape keys: never allow a new key to have the same pos as an
existing one (this does not make sense). This way, the two workflows are possible (create
all keys and then animate ctime, or animate ctime and then create keys where you need them).

Also, fixed UIList for shapekeys, the "absolute" test was wrong, and better to show frame
value, even though not editable, than nothing in case of absolute keys.

And finally, add getter to RNA 'frame' readonly value, so that we output real frame values,
and not dummy internal ones (which are /100) in our API.
2014-05-18 22:05:21 +02:00
d1dde3c981 Fix T40251: Rename of Shape key is not redrawed in Dopesheep. 2014-05-18 20:30:48 +02:00
193e77cc67 Fix T40201: Keyframe edits fail to update the viewport 2014-05-19 00:24:45 +10:00
e8630bdccf Comment unused BLI_rebase_path 2014-05-19 00:00:59 +10:00
2a49bf35f0 Add ARRAY_SIZE macro to check fixed size arrays 2014-05-18 23:51:59 +10:00
07e8096c63 Promote MSVC 2013 to be the official platform (without a numbered suffix) for scons 2014-05-18 15:36:46 +02:00
a089a86edd Fix BLI_cleanup_path: '.' at the start of a path
On windows "." was replaced with the root directory.
On other systems any path starting with a '.' would be replaced with "/"

This was added for the file selector only,
so better handle this in the file selector (though it looks not to be needed).
2014-05-18 19:03:15 +10:00
9127b8f2a3 Fix T40246: Speaker Object is missing from Tabs > 'Create' tab in the Toolbar. 2014-05-18 09:55:47 +02:00
48a735d824 Update netbeans projectfile generator to v8 2014-05-18 15:55:00 +10:00
003387fab5 Fix T40230: Recursion check when adding objects to groups is incorrect.
rB568f0c7 added a recursion check that is supposed to prevent cyclic
cases where a group includes itself via dupli instancing.

The check function was descending into all groups nested inside the
target group - which works for single level recursion like in the test
case, but does not handle generic recursion. Basically it asked:
"is object X in the group already or in any instanced dupligroup?"

The new check instead asks:
"is group G dupli'd by X or any instanced subgroup thereof?"
which is what we really need to know.
2014-05-17 18:28:30 +02:00
2bbb442fc9 Fix T40236: Undo not pushed in old-school node curve tool button functions. 2014-05-17 16:48:06 +02:00
8cd88e3bd0 Fix T39757: missing cuda libary on linx, now also try to find libcuda.so.1.
I'm not sure this should be needed, but some particular systems don't have
libcuda.so so we do this now.
2014-05-17 15:31:47 +02:00
be03b735c5 Fix T39757: missing cuda libary on linx, now also try to find libcuda.so.1.
I'm not sure this should be needed, but some particular systems don't have
libcuda.so so we do this now.
2014-05-17 15:16:07 +02:00
ef2ba65b32 Text 3D: remove hardcoded keymaps from menu 2014-05-17 20:01:10 +10:00
7a085b4c85 Revised the debug code added in the commit rB4958aff780a3 according to the raised concern. 2014-05-17 17:40:04 +09:00
575d3dd5ba Fix T40231: Crash with matcaps 2014-05-17 14:48:10 +10:00
5ed449dabb Fix mistake in recent patch 2014-05-17 14:36:05 +10:00
92a380d0b2 Minor changes for standalone mathutils 2014-05-17 12:06:29 +10:00
4958aff780 Freestyle: Added a piece of debug code for checking the consistency of face normals.
The code was found helpful while addressing T39669 and might help solving similar
issues related to face normals in the future.
2014-05-17 10:36:39 +09:00
f8554ed61a Fix T39669: Freestyle: Curve with extrude>0 causes warnings in console.
The reported Freestyle warnings were due to wrong normals of filled faces at both ends
of a 2D extruded curve. The problem is detailed in the comment #19 of T39669.

The cause of the bug was an inconsistency in the use of vertex indices between
BKE_mesh_nurbs_displist_to_mdata() and init_render_curve() in the case of
DispList::type equal to DL_INDEX3.

This commit also fixes a related bug that the normals of filled faces were not inverted
when a scale of the curve object is set to a negative value (e.g., the Z scale was -1).

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D532
2014-05-17 08:51:00 +09:00
2e20c16897 Fix T38895: Unstable behavior using VehicleWrapper after Bullet 2.82 update
The Bullet 2.82 update uses a different method for ray casting that
seems incompatible with our older files. So, for now we just force the
vehicle physics to use the older ray casting method.
2014-05-16 10:44:01 -07:00
1923a8f23a Fix T40223: Setting bevel_factor_mapping_start/end crashes
Patch from Lukas Treyer
2014-05-17 01:01:43 +10:00
04665e2006 Fix T40226: Keep collapse-menu when splitting areas 2014-05-17 00:29:27 +10:00
758bdcd6c2 Fix Bevel bugs T39726 and T39108, bevels with wire edges.
This updates the fix in rB27db75363, which had to be undone
because it broke other bevels.
It also fixes cases where edges went away went doing vertex
bevel on vertices with some wire edges.
2014-05-16 10:28:15 -04:00
3e38be0000 Fix T40202: File selector operators not reported in info view 2014-05-16 21:25:48 +10:00
03526232d9 Add assert to check for buffer overrun 2014-05-16 18:10:26 +10:00
980c1a98e9 Freestyle: Fix for texture spacing reset to a non-default value on load of old .blend files.
Problem report by Light BWK through personal communications. Thanks!
2014-05-16 11:12:12 +09:00
be980b9f7d 3D Text: Change textbox placement to ignore font scale
Logic here was very stupid, texboxes would have their initial
locations scaled by font size but not their width/height.

Now its possible to change font size while keeping the textbox layout.

Other fixes

- tab character didn't work properly with textboxes.
- memory leak when VFontData was missing.
2014-05-16 10:32:29 +10:00
57e1ec2308 Fix part of T39708, don't overupdate particles when changine active
particle texture slot
2014-05-16 01:23:25 +03:00
8b0729a731 3D Text: replace multiple float arrays with struct (much easier to understand) 2014-05-16 07:54:54 +10:00
183b417cce BGE Physics: Better follow the old (pre-cleanup) logic for determining bounds types.
This prevents older files from breaking.
2014-05-15 13:28:56 -07:00
48fcadc88d Fix T40214: Wrong size calculation on new curve objects
Do not take into account grid size in objectdata creation itself, this is handled on a higher level.
2014-05-15 22:09:41 +02:00
7773f8f504 Use warning instead of info for previous commit 2014-05-15 23:06:29 +03:00
56aa4eadcc Fix T39684, warn when entering sculpt mode with an object with non- 2014-05-15 22:49:47 +03:00
caed2394e2 Fix cycles bug with new transparent shadow code, giving too much volume shadow. 2014-05-15 21:31:58 +02:00
5a4f20d517 Fix rare crash introduced by recent own commit 2014-05-15 22:01:45 +03:00
9bbe42a4d8 Mask vertex colors used to be totally ignored 2014-05-15 18:34:55 +02:00
295c37caa4 Fix T39763: Blender renders disabled Render Layers using Blender Internal
For now only disables scene render if all the layers are disabled, but scene
will still be rendered if it's used in compo, has enabled layers which are
not used by compo.

Current pipeline doesn't allow to handle such cases nicely, so leaving it
for later.
2014-05-15 18:21:02 +02:00
ad87d47fdb Fix T39978: Sculpting shapekeys - Using Smooth tool, turns shapekey into Basis.
Smooth brush requires deformed coordinates array to present.
2014-05-15 17:45:35 +02:00
3889483b1f Fix T40053: Cloth simulation, rest shape key does not function
It was a regression since 5d49eff. Not really sure about proper solution
here, so used a bit workaround-ish way for now.

Hopefully new cloth will be landed after this GSoC anyway.
2014-05-15 14:20:22 +02:00
4725941f23 Fix for cursor location with xoffset & flush alignment 2014-05-15 21:59:16 +10:00
aafe6322fe Remove redundant NULL check 2014-05-15 20:13:43 +10:00
42eb36ecf6 Fix 3D font selection and material lagging behind with vertical cursor motion 2014-05-15 19:06:25 +10:00
c742a4b62b Code cleanup: remove '\r' check for 3d text, its removed on load even on windows 2014-05-15 18:06:27 +10:00
e5b8d84613 Fix T40204: x-offset textbox failed with center/justify/flush 2014-05-15 17:43:27 +10:00
ac9eaf9c91 Fix for right aligned text ignoring xoffset 2014-05-15 17:09:46 +10:00
b252915b68 CMake/SCons: finish removing MSVC2012 references 2014-05-15 16:16:25 +10:00
c7ab68f1c4 Fixes for font underline
- underline faces had flipped winding by default.
- BKE_vfont_to_curve_ex disallowed 0 underline height (annoying when sliding value)
- disallow negative underline height since it flips underline direction (just change position + height)
2014-05-15 16:04:08 +10:00
2eeab8f191 Windows: Remove support for MSVC 2012 (VC11).
The officially supported compiled is now MSVC 2013, and MSVC 2008 will be faded out slowly over the coming weeks.
2014-05-15 07:50:02 +02:00
7c51638292 Fix T40180: Space between letters adds space after last letter 2014-05-15 15:43:59 +10:00
c62cb4416d Disable auto-perspective by default, see T40153 2014-05-15 14:25:04 +10:00
9892f038ef Fix T40154: UI Multi-drag sets value beyond max 2014-05-15 13:22:13 +10:00
ff2ec05662 Fix T40199: bge.logic.LibFree() could cause crashes by leaving dangling pointers in the rasterizer. 2014-05-14 19:11:08 -07:00
064ef3f00f Fix T40182: Crash when using KX_GameObject.rayCast/rayCastTo().
Missed another parent->release().
2014-05-14 13:35:35 -07:00
6b2689c3f2 Fix T40191: Misleading TypeError message when registering CollectionProperty wtihout kwarg "type".
Turned up to be a cleanup of doc in that whole module...
2014-05-14 17:50:32 +02:00
2ac9e8587b Dirty fix for memory corruption in the rigid body API.
Problem happens when removing a rigid body reference in a constraint,
and then jumping to the start frame right away. This will cause a full
rebuild of the rigid body world. However, the btRigidBodys are removed
before the constraints, and this leaves dangling pointers in the
btTypedConstraints, which causes corruption when deleting those
constraints later.

Fix for now is to explicitly delete constraints in advance when
rebuilding, while they still have valid btRigidBody pointers.

Ultimately the whole memory management and ownership of Bullet data
needs redesign. This is already happening in the particles_refactor
branch and could be ported to master separately:
https://developer.blender.org/diffusion/B/browse/particles_refactor/source/blender/blenkernel/intern/rigidbody.c
2014-05-14 11:51:24 +02:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
d8c39b8789 FCurve: move add modifiers logic from menu into dynamic enum 2014-05-14 14:41:43 +10:00
5473c5fcc3 FCurve: use submenus rather then popups from menus 2014-05-14 14:01:36 +10:00
3c3fa29f23 Fix FCurve mirror ignoring aligned/free handles 2014-05-14 13:53:47 +10:00
254c724aa1 FCurve: stop generic rna update from changing curve handle type 2014-05-14 13:31:34 +10:00
a756499c62 Fix for FCurve keyframe editing left handle from button failing if not selected 2014-05-14 13:27:27 +10:00
dc03a5ebe3 FCurve: handle calculation was measuring new handle lengths and not using for new ratio 2014-05-14 13:10:45 +10:00
53efee6754 Fix T40187: Can't set single keyframe handle as Vector
ANIM_editkeyframes_refresh was testing handle selection as if those handles were transformed.

This is already handled by areas which need it,
so simply replace testhandles_fcurve -> calchandles_fcurve.

This was causing other bugs such as inserting a keyframe changing handles of unrelated fcurves.
2014-05-14 11:59:51 +10:00
30361a7341 Fix for curve widget hue gradient drawing incorrectly when zooming 2014-05-14 09:34:47 +10:00
23b682d594 Fix T40172: LibFree() crashes with shared materials (e.g., from multiple LibNew() calls) 2014-05-13 15:52:07 -07:00
1d1560eec4 BGE: Fixing some NavMesh memory leaks. 2014-05-13 15:52:07 -07:00
ea6620cb82 Fix T37796, Mesh lost after exiting sculpt mode and undoing.
Issue here is that upon entering sculpt mode, the mesh (and the object
mode) is stored in global undo. Now made the code similar to edit mode,
but since we don't really have any operator to push, this is just
ignored for now.

I have tried just disabling the sculpt toggle operator undo flag but
this didn't work due to the nature recursive of the operator calls
2014-05-14 01:10:57 +03:00
5cc1e03540 Code cleanup: indentation 2014-05-14 06:37:56 +10:00
33df6aa12e Fix T39196, Dynamic Topology Undo Applied to Wrong Mesh
Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This entry can belong to
another object though.
This is easy to fix by enforcing name matching (this was borrowed by
edit mode but can definitely be improved) between current object name
and undo node name and deleting older entries.

However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements may now have had their ids (which would still be valid at the
time) cleaned up. This can result in crashing if we attempt to resculpt
on the mesh. To fix this I have disabled releasing the deleted entries.

This entanglement between bm_log and undo is quite volatile but I hope
the system works better now.

Also minor cleanup, fix unneeded check warning
2014-05-13 22:05:23 +03:00
9531091eb8 Fix compilation error with debug SCons
For some reason SCons defines _DEBUG, not DEBUG as mathutils was
expecting it to be.

Made it so mathutils checks for NDEBUG which mimics BLI_assert
define.
2014-05-13 19:52:50 +02:00
b9967bfb3f Fix T40151: Problem in normal with subdivision surface + Boolean modifier
Own regression since e08db08. CustomData_copy_data() would fail in cases
when mvert/medge/mloop/mpoly arrays were lazy allocated since that change.

Now made it so this layers are copying from own copy of the arrays.

Not sure if this still misses some CD to be copied, from quick glance
seems no, but some further testing wouldn't hurt at all.
2014-05-13 19:45:08 +02:00
c60d5c6895 style cleanup, keep preprocessor identation 2014-05-13 20:11:27 +03:00
ba350d3020 Add alloca include in compiler compatibility. Helps with MinGW32
compilation.
2014-05-13 18:41:53 +03:00
4875a665cc Fix T40176: Curve Functions broken in several addons
Regression since 94e5e2f.

Handbook example about what happens when you use copy-paste
and don't test code after you did a cleanup.
2014-05-13 16:39:51 +02:00
9ae9c268ca Folowup for old fix for material animation
Need to update node trees, so cycles materials are also updating
when tweaking settings from dopesheet/graph editor.
2014-05-13 16:15:19 +02:00
eed0c4d062 Fix T40158: Playback with 100% proxies is very slow
Context was creating with the wrong resolution.
2014-05-13 16:15:19 +02:00
2149886033 More UI messages fixes and tweaks. 2014-05-13 15:07:24 +02:00
b12bf2216f Correct last commit, check not to split along edges already used 2014-05-13 18:41:04 +10:00
dd8a9eee3b Fix T40162: Vert connect creates extra face cutting across concave NGon.
We need to support cutting degenerate ngons, see: T39418
This commit disallows cuts across faces where the same vertices can create better cuts on different faces.
2014-05-13 17:56:26 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10:00
19b82be61e Freestyle: Added .new() and .remove() to the collection type of Python style modules. 2014-05-13 16:18:32 +09:00
c08f025fe1 Freestyle: Fix for own mistakes in defining RNA aliases. 2014-05-13 16:18:31 +09:00
c0d96e1d1e Freestyle: minor UI text fix. 2014-05-13 16:18:31 +09:00
db338a6585 Freestyle: naming fixes.
FreestyleSettings and FreestyleModuleSettings are now defined as RNA aliases of
FreestyleConfig and FreestyleModuleConfig, respectively.
2014-05-13 16:18:30 +09:00
2c72bb1c19 Freestyle: code clean-up. 2014-05-13 16:18:29 +09:00
a31962287a Freestyle: Added .new() and .remove() methods to collection types of line style modifiers. 2014-05-13 16:18:28 +09:00
3583366266 Show the "Maximum Draw Type" for empties and cameras in case they work
as duplicators.

This property was always hidden in the UI for empties and cameras. It
doesn't make sense for the objects themselves (they are wires-only), but
also gets inherited by duplis. Now show it greyed out if not used, but
make it available for duplicators.
2014-05-13 08:55:36 +02:00
bdf477d19a BMesh: add check to BM_vert_pair_share_face to allow adjacent loops
Add BM_vert_pair_share_face_by_angle to avoid selecting concave splits.
2014-05-13 16:49:57 +10:00
2055e968df Fix T38379: Mesh vertices only update when in cone of last created spotlight
The shadow render passes could set a mesh's modified status to false
even if they were not rendered. This means their display lists do not
get updated. For now, just skip setting all buckets' modified to false
during shadow render passes.
2014-05-12 23:13:27 -07:00
43f3e79cee Fix T40111: replaceMesh() crashes BGE when used on a parented object
The replace mesh code was still calling release() on the parent object when it
no longer needed to (due to earlier commits).
2014-05-12 22:53:31 -07:00
aebcb3bab9 Tweak for node socket swapping: don't un-hide sockets automatically.
This was suggested by @zanqdo on IRC. Hiding sockets is a user choice
(not to be confused with "unavailable" disabled sockets). Hidden sockets
suddenly popping up when linking is confusing and intransparent, better
just ignore them for the swapping.
2014-05-13 07:41:48 +02:00
f14df29777 BMesh: make BM_face_calc_normal_subset apart of the bmesh api
also make face normal calculation functions return normal length
2014-05-13 14:58:05 +10:00
51fa66bc64 Freestyle: Fix for comments in line with the previous commit. 2014-05-13 09:16:28 +09:00
ae00a2b3fd Freestyle: Removed redundant flipping of UV coordinates.
Patch contribution by Paolo Acampora.  Thank you!
2014-05-13 09:16:28 +09:00
1c2e6de969 Usual typo and style fixes in UI messages... 2014-05-12 23:08:31 +02:00
355709432e Fix T40115: Smoke simulator memory leak with high poly mesh emitter.
Own error, all kudos go to scorpion81 (Martin Felke) for the nvestigation & patch!
2014-05-12 21:30:27 +02:00
1b1b71f697 Fix T40149: cycles motion blur render problem with multiple render layers. 2014-05-12 18:37:49 +02:00
39dd7ec5b4 Pie menus beta code.
What is included here:

* Some initial code that lays out and displays items of a pie menu
 in a circular manner around the mouse. Collision detection is
 still not as expected for a pie menu.

* Code to spawn a pie menu for enums and operator enums (a bogus pie
menu for object mode is included, not yet set to any specific key).
For testing, the sculpt mode stroke mode enum is bound as a pie menu
to A key.

* Support to spawn pie menus from python.

Design could change radically, but best have the code here where all can
checkout and see the state of the code.
2014-04-22 14:24:28 +03:00
1572 changed files with 88966 additions and 24112 deletions

10
.gitignore vendored
View File

@@ -11,6 +11,10 @@ __pycache__/
*.swo
*#
# conflicts
*.orig
*.rej
# QtCreator
CMakeLists.txt.user
@@ -26,3 +30,9 @@ Desktop.ini
# local patches
/*.patch
/*.diff
# in-source doc-gen
/doc/doxygen/html/
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/

View File

@@ -47,6 +47,11 @@ endif()
cmake_minimum_required(VERSION 2.8)
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.0))
# keep until CMake-3.0 is min requirement
cmake_policy(SET CMP0043 OLD)
endif()
if(NOT EXECUTABLE_OUTPUT_PATH)
set(FIRST_RUN "TRUE")
endif()
@@ -104,6 +109,7 @@ enable_testing()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE)
set(TESTS_OUTPUT_DIR ${EXECUTABLE_OUTPUT_PATH}/tests CACHE INTERNAL "" FORCE)
#-----------------------------------------------------------------------------
# Set default config options
@@ -130,6 +136,11 @@ if(APPLE)
endif()
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
# add_library OBJECT arg unsupported
set(WITH_BUILDINFO OFF)
endif()
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" ON)
@@ -251,11 +262,13 @@ if(UNIX AND NOT APPLE)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
set(PYTHON_NUMPY_PATH "" CACHE PATH "Python to python site-packages or dist-packages containing 'numpy' module")
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
mark_as_advanced(PYTHON_NUMPY_PATH)
if(UNIX AND NOT APPLE)
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
set(PYTHON_REQUESTS_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'requests' module")
mark_as_advanced(PYTHON_REQUESTS_PATH)
endif()
# Cycles
@@ -270,7 +283,11 @@ unset(PLATFORM_DEFAULT)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
option(LLVM_STATIC "Link with LLVM static libraries" ON)
if(APPLE)
option(LLVM_STATIC "Link with LLVM static libraries" ON) # we prefer static llvm build on Apple, dyn build possible though
else()
option(LLVM_STATIC "Link with LLVM static libraries" OFF)
endif()
mark_as_advanced(LLVM_STATIC)
# disable for now, but plan to support on all platforms eventually
@@ -295,6 +312,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
mark_as_advanced(WITH_GCC_MUDFLAP)
endif()
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
if(APPLE)
cmake_minimum_required(VERSION 2.8.8)
cmake_policy(VERSION 2.8.8)
@@ -306,7 +326,9 @@ if(APPLE)
endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
if(${MAC_SYS} MATCHES 13)
if(${MAC_SYS} MATCHES 14)
set(OSX_SYSTEM 10.10)
elseif(${MAC_SYS} MATCHES 13)
set(OSX_SYSTEM 10.9)
elseif(${MAC_SYS} MATCHES 12)
set(OSX_SYSTEM 10.8)
@@ -877,18 +899,18 @@ if(UNIX AND NOT APPLE)
endif()
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread")
list(APPEND PLATFORM_LINKLIBS -lutil -lc -lm -lpthread)
if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
find_package(X11 REQUIRED)
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_X11_LIB}")
list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
if(WITH_X11_XINPUT)
if(X11_Xinput_LIB)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
else()
set(WITH_X11_XINPUT OFF)
endif()
@@ -896,10 +918,10 @@ if(UNIX AND NOT APPLE)
if(WITH_X11_XF86VMODE)
# XXX, why dont cmake make this available?
FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xxf86vmode_LIB)
if(X11_Xxf86vmode_LIB)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xxf86vmode_LIB}")
list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
else()
set(WITH_X11_XF86VMODE OFF)
endif()
@@ -915,6 +937,9 @@ if(UNIX AND NOT APPLE)
endif()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -pthread")
if(CMAKE_DL_LIBS)
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
endif()
# lfs on glibc, all compilers should use
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
@@ -958,12 +983,12 @@ elseif(WIN32)
if(MSVC)
set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
# needed for some MSVC installations
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
# MSVC11 SDL is not hard linked to dxguid.lib
if(MSVC11 AND WITH_SDL)
set(PLATFORM_LINKLIBS ${PLATFORM_LINKLIBS} dxguid)
endif()
list(APPEND PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE
@@ -985,6 +1010,8 @@ elseif(WIN32)
endif()
endif()
add_definitions(-DOIIO_STATIC_BUILD)
set(CMAKE_CXX_FLAGS "/nologo /J /Gd /EHsc /MP" CACHE STRING "MSVC MT C++ flags " FORCE)
set(CMAKE_C_FLAGS "/nologo /J /Gd /MP" CACHE STRING "MSVC MT C++ flags " FORCE)
@@ -1039,7 +1066,7 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
endif()
set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
if(NOT DEFINED LIBDIR)
# Setup 64bit and 64bit windows systems
@@ -1053,9 +1080,6 @@ elseif(WIN32)
if(MSVC12)
message(STATUS "Visual C++ 2013 detected.")
set(LIBDIR ${LIBDIR_BASE}_vc12)
elseif(MSVC11)
message(STATUS "Visual C++ 2012 detected.")
set(LIBDIR ${LIBDIR_BASE}_vc11)
else()
set(LIBDIR ${LIBDIR_BASE})
endif()
@@ -1076,7 +1100,7 @@ elseif(WIN32)
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
set(ZLIB_LIBRARY ${LIBDIR}/zlib/lib/libz_st.lib)
set(ZLIB_DIR ${LIBDIR}/zlib)
find_package(zlib) # we want to find before finding things that depend on it like png
#find_package(zlib) # we want to find before finding things that depend on it like png
find_package(png)
@@ -1085,11 +1109,11 @@ elseif(WIN32)
message(WARNING "Using HARDCODED libpng locations")
set(PNG_LIBRARIES libpng)
set(PNG "${LIBDIR}/png")
set(PNG_INCLUDE_DIR "${PNG}/include")
set(PNG_INCLUDE_DIRS "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
endif()
if(MSVC90)
if(MSVC)
set(JPEG_NAMES ${JPEG_NAMES} libjpeg)
endif()
find_package(jpeg REQUIRED)
@@ -1133,8 +1157,12 @@ elseif(WIN32)
${OPENCOLLADA}/lib/opencollada/xml.lib
${OPENCOLLADA}/lib/opencollada/buffer.lib
${OPENCOLLADA}/lib/opencollada/ftoa.lib
${OPENCOLLADA}/lib/opencollada/UTF.lib
)
if(NOT WITH_LLVM)
list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
endif()
set(PCRE_LIBRARIES
${OPENCOLLADA}/lib/opencollada/pcre.lib
)
@@ -1148,14 +1176,8 @@ elseif(WIN32)
find_package(FFMPEG)
if(NOT FFMPEG_FOUND)
message(WARNING "Using HARDCODED ffmpeg locations")
# MSVC11 FFMPEG libs are newer
if(MSVC11)
set(FFMPEG_LIBRARY_VERSION 54)
set(FFMPEG_LIBRARY_VERSION_AVU 52)
else()
set(FFMPEG_LIBRARY_VERSION 55)
set(FFMPEG_LIBRARY_VERSION_AVU 52)
endif()
set(FFMPEG_LIBRARY_VERSION 55)
set(FFMPEG_LIBRARY_VERSION_AVU 52)
set(FFMPEG_LIBRARIES
${LIBDIR}/ffmpeg/lib/avcodec-${FFMPEG_LIBRARY_VERSION}.lib
${LIBDIR}/ffmpeg/lib/avformat-${FFMPEG_LIBRARY_VERSION}.lib
@@ -1227,6 +1249,9 @@ elseif(WIN32)
if(WITH_INTERNATIONAL)
list(APPEND boost_extra_libs locale)
endif(WITH_INTERNATIONAL)
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
set(Boost_USE_MULTITHREADED ON) # suffix -mt
set(Boost_USE_STATIC_LIBS ON) # suffix -s
find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
IF(NOT Boost_FOUND)
message(WARNING "USING HARDCODED boost locations")
@@ -1236,10 +1261,6 @@ elseif(WIN32)
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_POSTFIX "vc120-mt-s-1_55.lib")
set(BOOST_DEBUG_POSTFIX "vc120-mt-sgd-1_55.lib")
elseif(MSVC11)
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_POSTFIX "vc110-mt-s-1_53.lib")
set(BOOST_DEBUG_POSTFIX "vc110-mt-sgd-1_53.lib")
else()
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_POSTFIX "vc90-mt-s-1_49.lib")
@@ -1274,7 +1295,9 @@ elseif(WIN32)
find_package(OpenImageIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES optimized OpenImageIO debug OpenImageIO_d)
set(OIIO_OPTIMIZED optimized OpenImageIO optimized OpenImageIO_Util)
set(OIIO_DEBUG debug OpenImageIO_d debug OpenImageIO_Util_d)
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
endif()
@@ -1351,12 +1374,12 @@ elseif(WIN32)
endif()
endif()
set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi)
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
if(WITH_MINGW64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
list(APPEND PLATFORM_LINKLIBS -lpthread)
add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
endif()
@@ -1366,7 +1389,7 @@ elseif(WIN32)
add_definitions(-DFREE_WINDOWS)
set(PNG "${LIBDIR}/png")
set(PNG_INCLUDE_DIR "${PNG}/include")
set(PNG_INCLUDE_DIRS "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
if(WITH_MINGW64)
@@ -1531,7 +1554,7 @@ elseif(WIN32)
LLVMX86Utils LLVMipa
LLVMipo LLVMCore)
# imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -limagehlp")
list(APPEND PLATFORM_LINKLIBS -limagehlp)
endif()
if(WITH_OPENCOLORIO)
@@ -1558,7 +1581,7 @@ elseif(WIN32)
set(OPENAL ${LIBDIR}/openal)
set(OPENALDIR ${LIBDIR}/openal)
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
if(MSVC11 OR MSVC12)
if(MSVC12)
set(OPENAL_LIBRARY openal32)
else()
set(OPENAL_LIBRARY wrap_oal)
@@ -1714,9 +1737,9 @@ elseif(APPLE)
)
mark_as_advanced(SYSTEMSTUBS_LIBRARY)
if(SYSTEMSTUBS_LIBRARY)
set(PLATFORM_LINKLIBS stdc++ SystemStubs)
list(APPEND PLATFORM_LINKLIBS stdc++ SystemStubs)
else()
set(PLATFORM_LINKLIBS stdc++)
list(APPEND PLATFORM_LINKLIBS stdc++)
endif()
set(PLATFORM_CFLAGS "-pipe -funsigned-char")
@@ -1767,7 +1790,11 @@ elseif(APPLE)
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa")
set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lxml2 -lbuffer -lftoa")
# Use UTF functions from collada if LLVM is not enabled
if(NOT WITH_LLVM)
set(OPENCOLLADA_LIBRARIES "${OPENCOLLADA_LIBRARIES} -lUTF")
endif()
# pcre is bundled with openCollada
#set(PCRE ${LIBDIR}/pcre)
#set(PCRE_LIBPATH ${PCRE}/lib)
@@ -1786,7 +1813,7 @@ elseif(APPLE)
endif()
set(PNG "${LIBDIR}/png")
set(PNG_INCLUDE_DIR "${PNG}/include")
set(PNG_INCLUDE_DIRS "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib)
set(JPEG "${LIBDIR}/jpeg")
@@ -1840,7 +1867,7 @@ elseif(APPLE)
if(WITH_LLVM)
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_VERSION "3.1" CACHE STRING "Version of LLVM to use")
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
if(EXISTS "${LLVM_DIRECTORY}/bin/llvm-config")
set(LLVM_CONFIG "${LLVM_DIRECTORY}/bin/llvm-config")
else()
@@ -1868,6 +1895,8 @@ elseif(APPLE)
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
else()
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
endif()
else()
message(FATAL_ERROR "LLVM not found.")
@@ -1892,16 +1921,24 @@ elseif(APPLE)
endif()
endif()
if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
include_directories(${LIBDIR}/openmp/include)
LINK_DIRECTORIES(${LIBDIR}/openmp/lib)
execute_process(COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES} ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/bin/libiomp5.dylib) # for intermediate binaries, lib id is @loader_path
else()
set(OpenMP_C_FLAGS "" CACHE STRING "C compiler flags for OpenMP parallization" FORCE) # unset
set(OpenMP_CXX_FLAGS "" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE) # unset
if(WITH_OPENMP)
execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE COMPILER_VENDOR)
string(SUBSTRING "${COMPILER_VENDOR}" 0 5 VENDOR_NAME) # truncate output
if(${VENDOR_NAME} MATCHES "Apple") # Apple does not support OpenMP reliable with gcc and not with clang
set(WITH_OPENMP OFF)
else() # vanilla gcc or clang_omp support OpenMP
message(STATUS "Using special OpenMP enabled compiler !") # letting find_package(OpenMP) module work for gcc
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-omp in darwin libs
set(OPENMP_FOUND ON)
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler flags for OpenMP parallization" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++ compiler flags for OpenMP parallization" FORCE)
include_directories(${LIBDIR}/openmp/include)
link_directories(${LIBDIR}/openmp/lib)
# This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
# They are linked also to omp lib, so we need it in builddir for runtime exexcution, TODO: remove all unneeded dependencies from these
execute_process(COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES} ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/bin/libiomp5.dylib) # for intermediate binaries, lib id @loader_path
endif()
endif()
endif()
set(EXETYPE MACOSX_BUNDLE)
@@ -1924,6 +1961,8 @@ elseif(APPLE)
# Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
endif()
# Get rid of eventually clashes, we export some symbols explicite as local
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map")
endif()
#-----------------------------------------------------------------------------
@@ -2032,10 +2071,6 @@ if(WITH_OPENMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
endif()
else()
set(WITH_OPENMP OFF)
endif()
@@ -2056,10 +2091,7 @@ if(WITH_SYSTEM_GLEW)
message(FATAL_ERROR "GLEW is required to build blender, install it or disable WITH_SYSTEM_GLEW")
endif()
mark_as_advanced(
GLEW_LIBRARY
GLEW_INCLUDE_PATH
)
set(GLEW_INCLUDE_PATH "${GLEW_INCLUDE_DIRS}")
else()
# set(GLEW_LIBRARY "") # unused
set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include")
@@ -2160,6 +2192,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if(APPLE AND WITH_OPENMP) # we need the Intel omp lib linked here to not fail all tests due presence of -fopenmp !
set(CMAKE_REQUIRED_FLAGS "-L${LIBDIR}/openmp/lib -liomp5") # these are only used for the checks
endif()
# strange, clang complains these are not supported, but then yses them.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
@@ -2233,62 +2269,13 @@ if(WITH_PYTHON)
if(WIN32)
# pass, we have this in an archive to extract
elseif(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
# set but invalid
# -- disabled until we make numpy bundled with blender - campbell
if((NOT ${PYTHON_NUMPY_PATH} STREQUAL "") AND (NOT ${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
# if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
# message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
# "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
# set(WITH_PYTHON_INSTALL_NUMPY OFF)
# endif()
# not set, so initialize
else()
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
# re-cache
unset(PYTHON_NUMPY_PATH CACHE)
find_path(PYTHON_NUMPY_PATH
NAMES
numpy
HINTS
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
PATH_SUFFIXES
site-packages
dist-packages
NO_DEFAULT_PATH
)
if(NOT EXISTS "${PYTHON_NUMPY_PATH}")
message(WARNING "'numpy' path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/numpy', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/numpy', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/numpy', "
"WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_NUMPY OFF)
else()
message(STATUS "numpy found at '${PYTHON_NUMPY_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
find_python_package(numpy)
endif()
if(WIN32 OR APPLE)
# pass, we have this in lib/python/site-packages
elseif(WITH_PYTHON_INSTALL_REQUESTS)
if(NOT EXISTS ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/requests)
# gets annoying otherwise...
if(FIRST_RUN)
message(WARNING "'requests' path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/requests'\n"
"WITH_PYTHON_INSTALL_REQUESTS option will be ignored when installing python")
endif()
set(WITH_PYTHON_INSTALL_REQUESTS OFF)
endif()
find_python_package(requests)
endif()
endif()
@@ -2340,10 +2327,17 @@ endif()
#-----------------------------------------------------------------------------
# Libraries
if(WITH_GTESTS)
include(GTestTesting)
endif()
if(WITH_BLENDER OR WITH_PLAYER)
add_subdirectory(source)
add_subdirectory(intern)
add_subdirectory(extern)
# source after intern and extern to gather all
# internal and external library information first, for test linking
add_subdirectory(source)
elseif(WITH_CYCLES_STANDALONE)
add_subdirectory(intern/cycles)
if(NOT WITH_SYSTEM_GLEW)
@@ -2364,6 +2358,12 @@ if(WITH_PLAYER)
add_subdirectory(source/blenderplayer)
endif()
#-----------------------------------------------------------------------------
# Testing
add_subdirectory(tests)
#-----------------------------------------------------------------------------
# CPack for generating packages
include(build_files/cmake/packaging.cmake)

View File

@@ -77,13 +77,13 @@ ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
@@ -223,7 +223,7 @@ test:
# run pep8 check check on scripts we distribute.
test_pep8:
python3 source/tests/pep8.py > test_pep8.log 2>&1
python3 tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
@@ -233,30 +233,46 @@ test_cmake:
# run deprecation tests, see if we have anything to remove.
test_deprecated:
python3 source/tests/check_deprecated.py
python3 tests/check_deprecated.py
test_style_c:
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/source/blender" "$(BLENDER_DIR)/source/creator" --no-length-check
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc:
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/source/blender" "$(BLENDER_DIR)/source/creator" --no-length-check > \
test_style.tasks
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl:
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders" "$(BLENDER_DIR)/release/scripts/templates_osl"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc:
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders" "$(BLENDER_DIR)/release/scripts/templates_osl" > \
test_style.tasks
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
@@ -281,7 +297,7 @@ check_cppcheck:
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
check_clang_array:
@@ -306,22 +322,39 @@ check_smatch:
check_spelling_py:
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/release/scripts"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/release/scripts"
check_spelling_c:
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/source"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc:
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/source" > \
"$(BLENDER_DIR)/check_spelling_c.tasks"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl:
cd "$(BUILD_DIR)" ; PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders"
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions:
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python "$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
# -----------------------------------------------------------------------------
# Utilities

View File

@@ -40,11 +40,13 @@ import string
import shutil
import re
# store path to tools
# store path to tools and modules
toolpath=os.path.join(".", "build_files", "scons", "tools")
modulespath=os.path.join(".", "build_files", "scons", "Modules")
# needed for importing tools
# needed for importing tools and modules
sys.path.append(toolpath)
sys.path.append(modulespath)
import Blender
import btools
@@ -68,7 +70,7 @@ quickdebug = None
##### BEGIN SETUP #####
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern']
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern', 'system']
B.binarykind = ['blender' , 'blenderplayer']
##################################
@@ -123,7 +125,7 @@ else:
B.quickie=[]
toolset = B.arguments.get('BF_TOOLSET', None)
vcver = B.arguments.get('MSVS_VERSION', '9.0')
vcver = B.arguments.get('MSVS_VERSION', '12.0')
if toolset:
print "Using " + toolset
@@ -270,6 +272,7 @@ if 'cudakernels' in B.targets:
env['WITH_BF_CYCLES'] = True
env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
env['WITH_BF_PYTHON'] = False
env['WITH_BF_LIBMV'] = False
# Configure paths for automated configuration test programs
env['CONFIGUREDIR'] = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "sconf_temp")))
@@ -285,8 +288,7 @@ if env['OURPLATFORM']=='darwin':
import subprocess
command = ["%s"%env['CC'], "--version"]
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=False)
line = process.communicate()[0]
line = btools.get_command_output(command)
ver = re.search(r'[0-9]+(\.[0-9]+[svn]+)+', line) or re.search(r'[0-9]+(\.[0-9]+)+', line) # read the "based on LLVM x.xsvn" version here, not the Apple version
if ver:
env['CCVERSION'] = ver.group(0).strip('svn')
@@ -321,7 +323,10 @@ if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
if env['MACOSX_SDK'] == '': # no set sdk, choosing best one found
if 'OS X 10.9' in MACOSX_SDK_CHECK:
if 'OS X 10.10' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.10.sdk'
elif 'OS X 10.9' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.9.sdk'
elif 'OS X 10.8' in MACOSX_SDK_CHECK:
@@ -436,6 +441,10 @@ if env['OURPLATFORM']=='darwin':
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
if env['WITH_BF_LLVM'] == 0:
# Due duplicated generic UTF functions, we pull them either from LLVMSupport or COLLADA
env.Append(BF_OPENCOLLADA_LIB=' UTF')
# Trying to get rid of eventually clashes, we export some symbols explicite as local
env.Append(LINKFLAGS=['-Xlinker','-unexported_symbols_list','-Xlinker','./source/creator/osx_locals.map'])
@@ -505,8 +514,6 @@ else:
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CPPFLAGS'].append('-DWITH_AVI')
env['CPPFLAGS'].append('-DWITH_OPENNL')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
env['CPPFLAGS'].append('-D_ALLOW_KEYWORD_MACROS')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
@@ -596,6 +603,7 @@ if not os.path.isdir ( B.root_build_dir):
# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
# os.makedirs ( B.doc_build_dir )
###################################
# Ensure all data files are valid #
###################################
@@ -729,6 +737,8 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/brushicons/soften.png")
data_to_c_simple("release/datafiles/brushicons/subtract.png")
data_to_c_simple("release/datafiles/brushicons/texdraw.png")
data_to_c_simple("release/datafiles/brushicons/texfill.png")
data_to_c_simple("release/datafiles/brushicons/texmask.png")
data_to_c_simple("release/datafiles/brushicons/thumb.png")
data_to_c_simple("release/datafiles/brushicons/twist.png")
data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
@@ -777,6 +787,20 @@ B.init_lib_dict()
##### END SETUP ##########
if B.targets != ['cudakernels']:
# Put all auto configuration run-time tests here
from FindSharedPtr import FindSharedPtr
from FindUnorderedMap import FindUnorderedMap
conf = Configure(env)
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
FindSharedPtr(conf)
FindUnorderedMap(conf)
env = conf.Finish()
# End of auto configuration
Export('env')
VariantDir(B.root_build_dir+'/source', 'source', duplicate=0)
@@ -791,7 +815,7 @@ SConscript(B.root_build_dir+'/extern/SConscript')
# libraries to give as objects to linking phase
mainlist = []
for tp in B.possible_types:
if (not tp == 'player') and (not tp == 'player2'):
if (not tp == 'player') and (not tp == 'player2') and (not tp == 'system'):
mainlist += B.create_blender_liblist(env, tp)
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
@@ -802,8 +826,23 @@ creob = B.creator(env)
thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
for x in B.create_blender_liblist(env, 'system'):
thesyslibs.append(os.path.basename(x))
thelibincs.append(os.path.dirname(x))
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
blender_progname = "blender"
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
blender_progname = "blender-app"
lenv = env.Clone()
lenv.Append(LINKFLAGS = env['PLATFORM_LINKFLAGS'])
targetpath = B.root_build_dir + '/blender'
launcher_obj = [env.Object(B.root_build_dir + 'source/creator/creator/creator_launch_win', ['#source/creator/creator_launch_win.c'])]
env.BlenderProg(B.root_build_dir, 'blender', [launcher_obj] + B.resources, [], [], 'blender')
env.BlenderProg(B.root_build_dir, blender_progname, creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
playerlist += B.create_blender_liblist(env, 'player2')
@@ -853,6 +892,9 @@ if env['OURPLATFORM']!='darwin':
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
scriptinstall.append(env.InstallAs(env['BF_INSTALLDIR'] + '/blender-app.exe.manifest',
'source/icons/blender.exe.manifest'))
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
@@ -1080,10 +1122,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically already to SDL on win64
else:
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
@@ -1100,10 +1139,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
pass
else:
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')

View File

@@ -28,7 +28,7 @@ getopt \
--long source:,install:,tmp:,threads:,help,no-sudo,with-all,with-opencollada,ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,\
force-all,force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-opencollada,\
force-ffmpeg,skip-python,skip-numpy,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,\
skip-opencollada,required-numpy,libyaml-cpp-ver: \
skip-opencollada,required-numpy: \
-- "$@" \
)
@@ -143,7 +143,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
(i.e. if there is no available and satisfactory package)!
* If the “force-rebuilt” library is a dependency of others, it will force the rebuild
of those libraries too (e.g. --force-boost will also rebuild oiio and osl...).
* Do not forget --with-osl if you built it and still want it!
--skip-python
Unconditionally skip Python installation/building.
@@ -177,11 +176,7 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--required-numpy
Use this in case your distro features a valid python package, but no matching Numpy one.
It will force compilation of both python and numpy
--libyaml-cpp-ver=<ver>
Ubuntu hack: you may have to force installation of a non-defaut version of libyaml-cpp
(e.g. ocio in trusty uses 0.3, while default version is 0.5... *sigh*)\""
It will force compilation of both python and numpy\""
##### Main Vars #####
@@ -203,12 +198,10 @@ BOOST_VERSION_MIN="1.49"
BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
OCIO_VERSION="1.0.7"
OCIO_VERSION="1.0.9"
OCIO_VERSION_MIN="1.0"
OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
LIBYAML_CPP_VER_DEFINED=false
LIBYAML_CPP_VER="0.0"
OPENEXR_VERSION="2.1.0"
OPENEXR_VERSION_MIN="2.0.1"
@@ -217,19 +210,19 @@ OPENEXR_FORCE_REBUILD=false
OPENEXR_SKIP=false
_with_built_openexr=false
OIIO_VERSION="1.4.0"
OIIO_VERSION="1.4.11"
OIIO_VERSION_MIN="1.4.0"
OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
LLVM_VERSION="3.3"
LLVM_VERSION_MIN="3.3"
LLVM_VERSION="3.4"
LLVM_VERSION_MIN="3.4"
LLVM_VERSION_FOUND=""
LLVM_FORCE_REBUILD=false
LLVM_SKIP=false
# OSL needs to be compiled for now!
OSL_VERSION="1.4.0"
OSL_VERSION="1.5.0"
OSL_VERSION_MIN=$OSL_VERSION
OSL_FORCE_REBUILD=false
OSL_SKIP=false
@@ -239,8 +232,8 @@ OPENCOLLADA_VERSION="1.3"
OPENCOLLADA_FORCE_REBUILD=false
OPENCOLLADA_SKIP=false
FFMPEG_VERSION="2.1.4"
FFMPEG_VERSION_MIN="0.7.6"
FFMPEG_VERSION="2.1.5"
FFMPEG_VERSION_MIN="2.1.5"
FFMPEG_FORCE_REBUILD=false
FFMPEG_SKIP=false
_ffmpeg_list_sep=";"
@@ -454,9 +447,6 @@ while true; do
--required-numpy)
NUMPY_REQUIRED=true; shift; continue
;;
--libyaml-cpp-ver)
LIBYAML_CPP_VER_DEFINED=true; LIBYAML_CPP_VER="$2"; shift; shift; continue
;;
--)
# no more arguments to parse
break
@@ -478,35 +468,57 @@ fi
# This has to be done here, because user might force some versions...
PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz"
NUMPY_SOURCE="http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz"
PYTHON_SOURCE=( "http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" )
NUMPY_SOURCE=( "http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download"
BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" )
OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION"
#OPENEXR_SOURCE="http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz"
OPENEXR_SOURCE="https://github.com/mont29/openexr.git"
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" )
#OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
OPENEXR_SOURCE=( "https://github.com/mont29/openexr.git" )
OPENEXR_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
ILMBASE_SOURCE="http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz"
ILMBASE_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz" )
#OIIO_SOURCE="https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz"
OIIO_SOURCE="https://github.com/mont29/oiio.git"
OIIO_REPO_UID="99113d12619c90cf44721195a759674ea61f02b1"
#OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio.git" )
OIIO_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
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"
#OSL_SOURCE="https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz"
#OSL_SOURCE="https://github.com/mont29/OpenShadingLanguage.git"
OSL_SOURCE="https://github.com/imageworks/OpenShadingLanguage.git"
OSL_REPO_UID="4abd672ed3979e5e965323201a5ba5ab802a76a9"
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage.git" )
OSL_SOURCE=( "https://github.com/mont29/OpenShadingLanguage.git" )
OSL_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
OPENCOLLADA_SOURCE="https://github.com/KhronosGroup/OpenCOLLADA.git"
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
OPENCOLLADA_REPO_UID="18da7f4109a8eafaa290a33f5550501cc4c8bae8"
FFMPEG_SOURCE="http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2"
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
##### Generic Helpers #####
# Check return code of wget for success...
download() {
declare -a sources=("${!1}")
sources_count=${#sources[@]}
error=1
for (( i=0; $i < $sources_count; i++ ))
do
wget -c ${sources[$i]} -O $2
if [ $? -eq 0 ]; then
error=0
break
fi
done
if [ $error -eq 1 ]; then
ERROR "wget could not find $1, or could not write it to $2, exiting"
exit 1
fi
}
# Return 0 if $1 = $2 (i.e. 1.01.0 = 1.1, but 1.1.1 != 1.1), else 1.
# $1 and $2 should be version numbers made of numbers only.
version_eq() {
@@ -684,7 +696,7 @@ compile_Python() {
if [ ! -d $_src ]; then
mkdir -p $SRC
wget -c $PYTHON_SOURCE -O $_src.tgz
download PYTHON_SOURCE[@] $_src.tgz
INFO "Unpacking Python-$PYTHON_VERSION"
tar -C $SRC -xf $_src.tgz
@@ -749,7 +761,7 @@ compile_Numpy() {
if [ ! -d $_src ]; then
mkdir -p $SRC
wget -c $NUMPY_SOURCE -O $_src.tar.gz
download NUMPY_SOURCE[@] $_src.tar.gz
INFO "Unpacking Numpy-$NUMPY_VERSION"
tar -C $SRC -xf $_src.tar.gz
@@ -815,7 +827,7 @@ compile_Boost() {
if [ ! -d $_src ]; then
INFO "Downloading Boost-$BOOST_VERSION"
mkdir -p $SRC
wget -c $BOOST_SOURCE -O $_src.tar.bz2
download BOOST_SOURCE[@] $_src.tar.bz2
tar -C $SRC --transform "s,(.*/?)boost_1_[^/]+(.*),\1boost-$BOOST_VERSION\2,x" -xf $_src.tar.bz2
fi
@@ -879,7 +891,7 @@ compile_OCIO() {
if [ ! -d $_src ]; then
INFO "Downloading OpenColorIO-$OCIO_VERSION"
mkdir -p $SRC
wget -c $OCIO_SOURCE -O $_src.tar.gz
download OCIO_SOURCE[@] $_src.tar.gz
INFO "Unpacking OpenColorIO-$OCIO_VERSION"
tar -C $SRC --transform "s,(.*/?)imageworks-OpenColorIO[^/]*(.*),\1OpenColorIO-$OCIO_VERSION\2,x" \
@@ -953,12 +965,11 @@ clean_ILMBASE() {
compile_ILMBASE() {
# To be changed each time we make edits that would modify the compiled result!
ilmbase_magic=8
ilmbase_magic=9
_init_ilmbase
# Clean install if needed!
magic_compile_check ilmbase-$ILMBASE_VERSION $ilmbase_magic
if [ $? -eq 1 -o $OPENEXR_FORCE_REBUILD == true ]; then
clean_ILMBASE
rm -rf $_openexr_inst
@@ -975,7 +986,7 @@ compile_ILMBASE() {
if [ ! -d $_src ]; then
INFO "Downloading ILMBase-$ILMBASE_VERSION"
mkdir -p $SRC
wget -c $ILMBASE_SOURCE -O $_src.tar.gz
download ILMBASE_SOURCE[@] $_src.tar.gz
INFO "Unpacking ILMBase-$ILMBASE_VERSION"
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" \
@@ -1040,7 +1051,7 @@ clean_OPENEXR() {
compile_OPENEXR() {
# To be changed each time we make edits that would modify the compiled result!
openexr_magic=12
openexr_magic=13
# Clean install if needed!
magic_compile_check openexr-$OPENEXR_VERSION $openexr_magic
@@ -1067,13 +1078,13 @@ compile_OPENEXR() {
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
mkdir -p $SRC
# wget -c $OPENEXR_SOURCE -O $_src.tar.gz
# download OPENEXR_SOURCE[@] $_src.tar.gz
# INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
# tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" \
# -xf $_src.tar.gz
git clone $OPENEXR_SOURCE $_src
git clone ${OPENEXR_SOURCE[0]} $_src
fi
@@ -1169,13 +1180,13 @@ compile_OIIO() {
if [ ! -d $_src ]; then
mkdir -p $SRC
# wget -c $OIIO_SOURCE -O "$_src.tar.gz"
#download OIIO_SOURCE[@] "$_src.tar.gz"
#
#INFO "Unpacking OpenImageIO-$OIIO_VERSION"
#tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
#-xf $_src.tar.gz
# INFO "Unpacking OpenImageIO-$OIIO_VERSION"
# tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
# -xf $_src.tar.gz
git clone $OIIO_SOURCE $_src
git clone ${OIIO_SOURCE[0]} $_src
fi
@@ -1292,15 +1303,16 @@ compile_LLVM() {
if [ ! -d $_src -o true ]; then
mkdir -p $SRC
wget -c $LLVM_SOURCE -O "$_src.tar.gz"
wget -c $LLVM_CLANG_SOURCE -O "$_src_clang.tar.gz"
download LLVM_SOURCE[@] "$_src.tar.gz"
download LLVM_CLANG_SOURCE[@] "$_src_clang.tar.gz"
INFO "Unpacking LLVM-$LLVM_VERSION"
tar -C $SRC --transform "s,([^/]*/?)llvm-[^/]*(.*),\1LLVM-$LLVM_VERSION\2,x" \
-xf $_src.tar.gz
INFO "Unpacking CLANG-$LLVM_VERSION to $_src/tools/clang"
# Stupid clang guys renamed 'clang' to 'cfe' for now handle both cases... :(
tar -C $_src/tools \
--transform "s,([^/]*/?)clang-[^/]*(.*),\1clang\2,x" \
--transform "s,([^/]*/?)(clang|cfe)-[^/]*(.*),\1clang\3,x" \
-xf $_src_clang.tar.gz
cd $_src
@@ -1400,13 +1412,13 @@ compile_OSL() {
if [ ! -d $_src ]; then
mkdir -p $SRC
# wget -c $OSL_SOURCE -O "$_src.tar.gz"
#download OSL_SOURCE[@] "$_src.tar.gz"
# INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
# tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
# -xf $_src.tar.gz
#INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
#tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
#-xf $_src.tar.gz
git clone $OSL_SOURCE $_src
git clone ${OSL_SOURCE[0]} $_src
fi
@@ -1437,6 +1449,7 @@ compile_OSL() {
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
if [ $_with_built_openexr == true ]; then
INFO "ILMBASE_HOME=$INST/openexr"
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
fi
@@ -1591,7 +1604,7 @@ compile_FFmpeg() {
if [ ! -d $_src ]; then
INFO "Downloading ffmpeg-$FFMPEG_VERSION"
mkdir -p $SRC
wget -c $FFMPEG_SOURCE -O "$_src.tar.bz2"
download FFMPEG_SOURCE[@] "$_src.tar.bz2"
INFO "Unpacking ffmpeg-$FFMPEG_VERSION"
tar -C $SRC -xf $_src.tar.bz2
@@ -1728,11 +1741,6 @@ install_DEB() {
PRINT ""
INFO "Installing dependencies for DEB-based distribution"
PRINT ""
WARNING "Beware of recent Ubuntu/Debian!!!"
PRINT "Ubuntu 14.4 and Debian Jessie come with a default libyaml-cpp in 0.5 version, while their ocio package still"
PRINT "uses the 0.3 version. You have to use '--libyaml-cpp-ver=0.3' option (else Blender will builds with 0.5,"
PRINT "and break when using packaged ocio)..."
PRINT ""
PRINT "`eval _echo "$COMMON_INFO"`"
PRINT ""
@@ -1969,13 +1977,14 @@ install_DEB() {
if $OCIO_SKIP; then
WARNING "Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_DEB libopencolorio-dev
clean_OCIO
else
# XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)!
#check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN
#if [ $? -eq 0 ]; then
#install_packages_DEB libopencolorio-dev
#clean_OCIO
#else
compile_OCIO
fi
#fi
fi
PRINT ""
@@ -2403,13 +2412,14 @@ install_RPM() {
if $OCIO_SKIP; then
WARNING "Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_RPM OpenColorIO-devel
clean_OCIO
else
# XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)!
#check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN
#if [ $? -eq 0 ]; then
#install_packages_RPM OpenColorIO-devel
#clean_OCIO
#else
compile_OCIO
fi
#fi
fi
PRINT ""
@@ -2712,14 +2722,15 @@ install_ARCH() {
if $OCIO_SKIP; then
WARNING "Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then
install_packages_ARCH opencolorio yaml-cpp tinyxml
clean_OCIO
else
# XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)!
#check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN
#if [ $? -eq 0 ]; then
#install_packages_ARCH opencolorio yaml-cpp tinyxml
#clean_OCIO
#else
install_packages_ARCH yaml-cpp tinyxml
compile_OCIO
fi
#fi
fi
PRINT ""

View File

@@ -22,7 +22,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
@@ -134,8 +134,8 @@ BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.1'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'

View File

@@ -22,7 +22,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
@@ -134,8 +134,8 @@ BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.1'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'

View File

@@ -3,3 +3,6 @@ MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !

View File

@@ -3,6 +3,52 @@
# <pep8 compliant>
"""
Stock Twisted directory lister doesn't provide any information about last file
modification time, we hack the class a bit in order to have such functionaliity
:)
"""
from buildbot.status.web.base import DirectoryLister
def get_files_and_directories(self, directory):
from twisted.web.static import (getTypeAndEncoding,
formatFileSize)
import urllib
import cgi
import time
import os
files = []
dirs = []
for path in directory:
url = urllib.quote(path, "/")
escapedPath = cgi.escape(path)
lastmodified = time.ctime(os.path.getmtime(
os.path.join(self.path, path)))
if os.path.isdir(os.path.join(self.path, path)):
url = url + '/'
dirs.append({'text': escapedPath + "/", 'href': url,
'size': '', 'type': '[Directory]',
'encoding': '',
'lastmodified': lastmodified})
else:
mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
self.contentEncodings,
self.defaultType)
try:
size = os.stat(os.path.join(self.path, path)).st_size
except OSError:
continue
files.append({
'text': escapedPath, "href": url,
'type': '[%s]' % mimetype,
'encoding': (encoding and '[%s]' % encoding or ''),
'size': formatFileSize(size),
'lastmodified': lastmodified})
return dirs, files
DirectoryLister._getFilesAndDirectories = get_files_and_directories
# Dictionary that the buildmaster pays attention to.
c = BuildmasterConfig = {}
@@ -32,51 +78,83 @@ c['change_source'] = GitPoller(
'git://git.blender.org/blender.git',
pollinterval=1200)
# CODEBASES
#
# Allow to controll separately things like branches for each repo and submodules.
all_repositories = {
r'git://git.blender.org/blender.git': 'blender',
r'git://git.blender.org/blender-translations.git': 'blender-translations',
r'git://git.blender.org/blender-addons.git': 'blender-addons',
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
r'git://git.blender.org/scons.git': 'scons',
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
}
def codebaseGenerator(chdict):
return all_repositories[chdict['repository']]
c['codebaseGenerator'] = codebaseGenerator
# SCHEDULERS
#
# Decide how to react to incoming changes.
# from buildbot.scheduler import Scheduler
from buildbot.schedulers import timed
from buildbot.schedulers import timed, forcesched
c['schedulers'] = []
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
codebases=[forcesched.CodebaseParameter(
codebase="blender",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=["master", "testbuild"], default="master"),
# Do not hide revision, can be handy!
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
project=forcesched.FixedParameter(name="project", default="", hide=True)),
# For now, hide other codebases.
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
forcesched.CodebaseParameter(hide=True, codebase="scons"),
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
properties=[]))
def schedule_build(name, hour, minute=0):
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
codebases={
"blender": {"repository": ""},
"blender-translations": {"repository": ""},
"blender-addons": {"repository": ""},
"blender-addons-contrib": {"repository": ""},
"scons": {"repository": ""},
"lib svn": {"repository": ""}},
branch=None,
builderNames=[name],
hour=hour,
minute=minute))
"""
schedule_cycle = 4
for i in range(0, schedule_cycle):
names = []
for j in range(0, len(buildernames)):
if j % schedule_cycle == i:
names += [buildernames[j]]
print(names)
c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
builderNames=names,
hour=3+i,
minute=0))
"""
# BUILDERS
#
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them. Note that any particular build will
# only take place on one slave.
# The 'builders' list defines the Builders, which tell Buildbot how to
# perform a build: what steps, and which slaves can execute them.
# Note that any particular build will only take place on one slave.
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Interpolate
from buildbot.steps.source import SVN
from buildbot.steps.source import Git
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test
from buildbot.steps.transfer import FileUpload
# from buildbot.steps.transfer import FileDownload
from buildbot.steps.master import MasterShellCommand
from buildbot.config import BuilderConfig
@@ -86,7 +164,8 @@ c['builders'] = []
buildernames = []
def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute=0):
def add_builder(c, name, libdir, factory, branch='',
rsync=False, hour=3, minute=0):
slavenames = []
for slave in master_private.slaves:
@@ -95,31 +174,69 @@ def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute
if len(slavenames) > 0:
f = factory(name, libdir, branch, rsync)
c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
c['builders'].append(BuilderConfig(name=name,
slavenames=slavenames,
factory=f,
category='blender'))
buildernames.append(name)
schedule_build(name, hour, minute)
schedule_force_build(name)
# common steps
def git_submodule_step(submodule):
return Git(name=submodule+'.git', repourl='git://git.blender.org/' + submodule + '.git', mode='update', workdir=submodule + '.git')
return Git(name=submodule + '.git',
repourl='git://git.blender.org/' + submodule + '.git',
mode='update',
codebase=submodule,
workdir=submodule + '.git')
def git_step(branch=''):
if branch:
return Git(name='blender.git', repourl='git://git.blender.org/blender.git', mode='update', branch=branch, workdir='blender.git', submodules=True)
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
branch=branch,
codebase='blender',
workdir='blender.git',
submodules=True)
else:
return Git(name='blender.git', repourl='git://git.blender.org/blender.git', mode='update', workdir='blender.git', submodules=True)
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
codebase='blender',
workdir='blender.git',
submodules=True)
def git_submodules_update():
command = ['git', 'submodule', 'foreach', '--recursive', 'git', 'pull', 'origin', 'master']
return ShellCommand(name='Submodules Update', command=command, description='updating', descriptionDone='up to date', workdir='blender.git')
command = ['git', 'submodule', 'foreach', '--recursive',
'git', 'pull', 'origin', 'master']
return ShellCommand(name='Submodules Update',
command=command,
description='updating',
descriptionDone='up to date',
workdir='blender.git')
def lib_svn_step(dir):
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
return SVN(name='lib svn',
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
codebase='lib svn',
mode='update',
defaultBranch='trunk',
workdir='lib/' + dir)
def rsync_step(id, branch, rsync_script):
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
return ShellCommand(name='rsync',
command=['python', rsync_script, id, branch],
description='uploading',
descriptionDone='uploaded',
workdir='install')
# generic builder
@@ -136,21 +253,38 @@ def generic_builder(id, libdir='', branch='', rsync=False):
if libdir != '':
f.addStep(lib_svn_step(libdir))
for submodule in ('blender-translations', 'blender-addons', 'blender-addons-contrib', 'scons'):
for submodule in ('blender-translations',
'blender-addons',
'blender-addons-contrib',
'scons'):
f.addStep(git_submodule_step(submodule))
f.addStep(git_step(branch))
f.addStep(git_submodules_update())
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
f.addStep(Test(command=['python', test_script, id]))
f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
f.addStep(ShellCommand(name='package',
command=['python', pack_script, id, branch or Interpolate('%(src:blender:branch)s')],
description='packaging',
descriptionDone='packaged'))
if rsync:
f.addStep(rsync_step(id, branch, rsync_script))
elif id.find('cmake') != -1:
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=150 * 1024 * 1024))
else:
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=150 * 1024 * 1024,
workdir='install'))
f.addStep(MasterShellCommand(name='unpack',
command=['python', unpack_script, filename],
description='unpacking',
descriptionDone='unpacked'))
return f
# builders
@@ -161,8 +295,10 @@ add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
add_builder(c, 'win32_scons', 'windows', generic_builder, hour=1)
add_builder(c, 'win64_scons', 'win64', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2012', 'windows_vc11', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2012', 'win64_vc11', generic_builder, hour=2)
#add_builder(c, 'win32_scons_vc2012', 'windows_vc11', generic_builder, hour=1)
#add_builder(c, 'win64_scons_vc2012', 'win64_vc11', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
@@ -193,15 +329,16 @@ authz_cfg = authz.Authz(
# change any of these to True to enable; see the manual for more
# options
gracefulShutdown=False,
forceBuild='auth', # use this to test your slave once it is set up
forceBuild=True, # use this to test your slave once it is set up
forceAllBuilds=False,
pingBuilder=False,
stopBuild='auth',
stopBuild=True,
stopAllBuilds=False,
cancelPendingBuild='auth',
cancelPendingBuild=True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
#c['status'].append(html.WebStatus(http_port=8010))
# PROJECT IDENTITY

View File

@@ -144,8 +144,6 @@ else:
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2012'):
scons_options.append('MSVS_VERSION=11.0')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
@@ -166,8 +164,6 @@ else:
os.makedirs(install_dir)
if builder.endswith('vc2013'):
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
elif builder.endswith('vc2012'):
dlls = ('msvcp110.dll', 'msvcr110.dll', 'vcomp110.dll')
else:
dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest')
if builder.find('win64') == -1:

View File

@@ -33,10 +33,8 @@ if len(sys.argv) < 2:
sys.exit(1)
builder = sys.argv[1]
branch = ''
if len(sys.argv) >= 3:
branch = sys.argv[2]
# Never write branch if it is master.
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
# scons does own packaging
if builder.find('scons') != -1:
@@ -99,8 +97,6 @@ if builder.find('scons') != -1:
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2012'):
scons_options.append('MSVS_VERSION=11.0')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')

View File

@@ -1,59 +1,77 @@
# - Find GLEW library
# Find the native Glew includes and library
# This module defines
# GLEW_INCLUDE_DIRS, where to find glew.h, Set when
# GLEW_INCLUDE_DIR is found.
# GLEW_ROOT_DIR, The base directory to search for Glew.
# This can also be an environment variable.
# GLEW_FOUND, If false, do not try to use Glew.
#
# Try to find GLEW library and include path.
# Once done this will define
# also defined,
# GLEW_LIBRARY, where to find the Glew library.
# GLEW_MX_LIBRARY, where to find the GlewMX library.
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
IF (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
$ENV{PROGRAMFILES}/GLEW/include
${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
DOC "The directory where GL/glew.h resides")
IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew64 glew64s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library (64-bit)"
)
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library"
)
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
ELSE (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES GLEW glew
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The GLEW library")
ENDIF (WIN32)
# If GLEW_ROOT_DIR was defined in the environment, use it.
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
ENDIF()
IF (GLEW_INCLUDE_PATH)
SET(GLEW_FOUND TRUE)
ELSE (GLEW_INCLUDE_PATH)
SET(GLEW_FOUND FALSE)
ENDIF (GLEW_INCLUDE_PATH)
SET(_glew_SEARCH_DIRS
${GLEW_ROOT_DIR}
/usr/local
)
MARK_AS_ADVANCED( GLEW_FOUND )
FIND_PATH(GLEW_INCLUDE_DIR
NAMES
GL/glew.h
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(GLEW_LIBRARY
NAMES
GLEW
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
FIND_LIBRARY(GLEW_MX_LIBRARY
NAMES
GLEWmx
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
GLEW_LIBRARY GLEW_INCLUDE_DIR)
IF(GLEW_FOUND)
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
ENDIF(GLEW_FOUND)
MARK_AS_ADVANCED(
GLEW_INCLUDE_DIR
GLEW_LIBRARY
GLEW_MX_LIBRARY
)

View File

@@ -34,6 +34,9 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
ENDIF()
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
SET(_openexr_libs_ver_init "2.0")
SET(_openexr_FIND_COMPONENTS
Half
Iex
@@ -82,12 +85,9 @@ IF(OPENEXR_INCLUDE_DIR)
IF(OPENEXR_BUILD_SPECIFICATION)
MESSAGE(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
STRING(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
SET("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
"\\1" _openexr_libs_ver_init ${OPENEXR_BUILD_SPECIFICATION})
ELSE()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
MESSAGE(WARNING "Could not determine ILMBase library version, assuming 2.0.")
SET("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_openexr_libs_ver_init}.")
ENDIF()
UNSET(_openexr_CONFIG CACHE)
@@ -95,6 +95,9 @@ IF(OPENEXR_INCLUDE_DIR)
ENDIF()
ENDIF()
SET("OPENEXR_VERSION" ${_openexr_libs_ver_init} CACHE STRING "Version of OpenEXR lib")
UNSET(_openexr_libs_ver_init)
STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
SET(_openexr_LIBRARIES)

View File

@@ -71,7 +71,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
SET(_python_ABI_FLAGS
"m;mu;u; " # release
"md;mud;ud;d" # debug
"dm;dmu;du;d" # debug
)
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})

View File

@@ -0,0 +1,47 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#
# Inspired on the Testing.cmake from Libmv
#
#=============================================================================
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY INCLUDE_DIRECTORIES)
set(TEST_INC
${_current_include_directories}
${CMAKE_SOURCE_DIR}/tests/gtests
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
${CMAKE_SOURCE_DIR}/extern/gtest/include
)
unset(_current_include_directories)
add_executable(${NAME}_test ${SRC})
target_link_libraries(${NAME}_test
${EXTRA_LIBS}
bf_testing_main
bf_intern_guardedalloc
extern_gtest
extern_glog)
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
endif()
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
endmacro()

View File

@@ -2,12 +2,12 @@
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
# Extract working copy information for SOURCE_DIR into MY_XXX variables
# with a default in case anything fails, for examble when using git-svn
# with a default in case anything fails, for example when using git-svn
set(MY_WC_HASH "unknown")
set(MY_WC_BRANCH "unknown")
set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a SVN working copy and then look up the revision
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
# The FindGit.cmake module is part of the standard distribution
include(FindGit)
@@ -85,6 +85,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_below_check)
endif()
@@ -106,7 +110,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local odifications
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
@@ -123,7 +127,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
# but BUILD_DATE and BUILD_TIME are plataform dependant
# but BUILD_DATE and BUILD_TIME are platform dependent
if(UNIX)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -133,7 +137,7 @@ if(WIN32)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# Write a file with the SVNVERSION define
# Write a file with the BUILD_HASH define
file(WRITE buildinfo.h.txt
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"

View File

@@ -2,6 +2,7 @@ import os
IGNORE = (
"/test/",
"/tests/gtests/",
"/BSP_GhostTest/",
"/release/",
"/xembed/",

View File

@@ -24,7 +24,7 @@
"""
Example linux usage
python3 ~/blenderSVN/blender/build_files/cmake/cmake_netbeans_project.py ~/blenderSVN/cmake
python3 ~/blender-git/blender/build_files/cmake/cmake_netbeans_project.py ~/blender-git/cmake
Windows not supported so far
"""
@@ -67,7 +67,7 @@ def create_nb_project_main():
if 0:
PROJECT_NAME = "Blender"
else:
# be tricky, get the project name from SVN if we can!
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get()
# --------------- NB spesific
@@ -105,8 +105,8 @@ def create_nb_project_main():
f.write(' <data xmlns="http://www.netbeans.org/ns/make-project/1">\n')
f.write(' <name>%s</name>\n' % PROJECT_NAME)
f.write(' <c-extensions>c,m</c-extensions>\n')
f.write(' <cpp-extensions>cpp,mm</cpp-extensions>\n')
f.write(' <header-extensions>h,hpp,inl</header-extensions>\n')
f.write(' <cpp-extensions>cpp,cxx,cc,mm</cpp-extensions>\n')
f.write(' <header-extensions>h,hxx,hh,hpp,inl</header-extensions>\n')
f.write(' <sourceEncoding>UTF-8</sourceEncoding>\n')
f.write(' <make-dep-projects/>\n')
f.write(' <sourceRootList>\n')
@@ -118,6 +118,9 @@ def create_nb_project_main():
f.write(' <type>0</type>\n')
f.write(' </confElem>\n')
f.write(' </confList>\n')
f.write(' <formatting>\n')
f.write(' <project-formatting-style>false</project-formatting-style>\n')
f.write(' </formatting>\n')
f.write(' </data>\n')
f.write(' </configuration>\n')
f.write('</project>\n')
@@ -125,9 +128,9 @@ def create_nb_project_main():
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<configurationDescriptor version="79">\n')
f.write('<configurationDescriptor version="94">\n')
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
f.write(' <df name="blender" root="%s">\n' % SOURCE_DIR) # base_root_rel
f.write(' <df name="0" root="%s">\n' % SOURCE_DIR) # base_root_rel
# write files!
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
@@ -145,7 +148,7 @@ def create_nb_project_main():
for key, item in dirs:
f.write('%s <df name="%s">\n' % (ident, key))
write_df(item, ident + " ")
write_df(item, ident + " ")
f.write('%s </df>\n' % ident)
for key in files:
@@ -178,9 +181,10 @@ def create_nb_project_main():
f.write(' <conf name="Default" type="0">\n')
f.write(' <toolsSet>\n')
f.write(' <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>\n')
f.write(' <compilerSet>default</compilerSet>\n')
f.write(' </toolsSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' <makefileType>\n')
f.write(' <makeTool>\n')
@@ -217,7 +221,7 @@ def create_nb_project_main():
f.write(' <item path="%s"\n' % path)
f.write(' ex="false"\n')
f.write(' tool="1"\n')
f.write(' flavor="0">\n')
f.write(' flavor2="0">\n')
f.write(' </item>\n')
f.write(' <runprofile version="9">\n')

View File

@@ -27,7 +27,7 @@ Example Win32 usage:
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
example linux usage
python .~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
python .~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
"""
from project_info import (SIMPLE_PROJECTFILE,
@@ -133,7 +133,7 @@ def create_qtc_project_python():
if 0:
PROJECT_NAME = "Blender_Python"
else:
# be tricky, get the project name from SVN if we can!
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get() + "_Python"
FILE_NAME = PROJECT_NAME.lower()

View File

@@ -411,6 +411,249 @@ macro(setup_liblinks
endif()
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
target_link_libraries(${target} "extern_clew")
target_link_libraries(${target} "extern_cuew")
endif()
endmacro()
macro(SETUP_BLENDER_SORTED_LIBS)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
list(APPEND BLENDER_LINK_LIBS
bf_windowmanager
bf_render
)
if(WITH_MOD_FLUID)
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
endif()
if(WITH_CYCLES)
list(APPEND BLENDER_LINK_LIBS
cycles_render
cycles_bvh
cycles_device
cycles_kernel
cycles_util
cycles_subd)
if(WITH_CYCLES_OSL)
list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
endif()
endif()
# Sort libraries
set(BLENDER_SORTED_LIBS
bf_windowmanager
bf_editor_space_api
bf_editor_space_action
bf_editor_space_buttons
bf_editor_space_console
bf_editor_space_file
bf_editor_space_graph
bf_editor_space_image
bf_editor_space_info
bf_editor_space_logic
bf_editor_space_nla
bf_editor_space_node
bf_editor_space_outliner
bf_editor_space_script
bf_editor_space_sequencer
bf_editor_space_text
bf_editor_space_time
bf_editor_space_userpref
bf_editor_space_view3d
bf_editor_space_clip
bf_editor_transform
bf_editor_util
bf_editor_uvedit
bf_editor_curve
bf_editor_gpencil
bf_editor_interface
bf_editor_mesh
bf_editor_metaball
bf_editor_object
bf_editor_armature
bf_editor_physics
bf_editor_render
bf_editor_screen
bf_editor_sculpt_paint
bf_editor_sound
bf_editor_animation
bf_editor_datafiles
bf_editor_mask
bf_editor_io
bf_render
bf_python
bf_python_ext
bf_python_mathutils
bf_python_bmesh
bf_freestyle
bf_ikplugin
bf_modifiers
bf_bmesh
bf_blenkernel
bf_nodes
bf_rna
bf_gpu
bf_blenloader
bf_imbuf
bf_blenlib
bf_intern_ghost
bf_intern_string
bf_avi
bf_imbuf_cineon
bf_imbuf_openexr
bf_imbuf_openimageio
bf_imbuf_dds
bf_collada
bf_intern_elbeem
bf_intern_memutil
bf_intern_guardedalloc
bf_intern_ctr
bf_intern_utfconv
ge_blen_routines
ge_converter
ge_phys_dummy
ge_phys_bullet
bf_intern_smoke
extern_minilzo
extern_lzma
extern_colamd
ge_logic_ketsji
extern_recastnavigation
ge_logic
ge_rasterizer
ge_oglrasterizer
ge_logic_expressions
ge_scenegraph
ge_logic_network
ge_logic_ngnetwork
ge_logic_loopbacknetwork
bf_intern_moto
extern_openjpeg
extern_redcode
ge_videotex
bf_dna
bf_blenfont
bf_intern_audaspace
bf_intern_mikktspace
bf_intern_dualcon
bf_intern_cycles
cycles_render
cycles_bvh
cycles_device
cycles_kernel
cycles_util
cycles_subd
bf_intern_raskter
bf_intern_opencolorio
extern_rangetree
extern_wcwidth
extern_libmv
extern_glog
)
if(WITH_COMPOSITOR)
# added for opencl compositor
list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl")
endif()
if(WITH_LIBMV)
list(APPEND BLENDER_SORTED_LIBS extern_ceres)
endif()
if(WITH_MOD_CLOTH_ELTOPO)
list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
endif()
if(NOT WITH_SYSTEM_GLEW)
list(APPEND BLENDER_SORTED_LIBS extern_glew)
endif()
if(WITH_BINRELOC)
list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
endif()
if(WITH_CXX_GUARDEDALLOC)
list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
endif()
if(WITH_IK_SOLVER)
list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
endif()
if(WITH_IK_ITASC)
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
endif()
if(WITH_CODEC_QUICKTIME)
list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
endif()
if(WITH_INPUT_NDOF)
list(APPEND BLENDER_SORTED_LIBS bf_intern_ghostndof3dconnexion)
endif()
if(WITH_MOD_BOOLEAN)
list(APPEND BLENDER_SORTED_LIBS extern_carve)
endif()
if(WITH_GHOST_XDND)
list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
endif()
if(WITH_CYCLES_OSL)
list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
endif()
if(WITH_INTERNATIONAL)
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
endif()
if(WITH_OPENNL)
list_insert_after(BLENDER_SORTED_LIBS "bf_render" "bf_intern_opennl")
endif()
if(WITH_BULLET)
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
endif()
if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
endif()
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
set(REMLIB ${SORTLIB})
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
if(${SEARCHLIB} STREQUAL ${SORTLIB})
set(REMLIB "")
endif()
endforeach()
if(REMLIB)
# message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
list(APPEND REM_MSG ${REMLIB})
list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
endif()
endforeach()
if(REM_MSG)
list(SORT REM_MSG)
message(STATUS "Blender Skipping: (${REM_MSG})")
endif()
unset(SEARCHLIB)
unset(SORTLIB)
unset(REMLIB)
unset(REM_MSG)
# for top-level tests
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
endmacro()
macro(TEST_SSE_SUPPORT
@@ -554,6 +797,78 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
endif()
endmacro()
macro(TEST_SHARED_PTR_SUPPORT)
# This check are coming from Ceres library.
#
# Find shared pointer header and namespace.
#
# This module defines the following variables:
#
# SHARED_PTR_FOUND: TRUE if shared_ptr found.
# SHARED_PTR_TR1_MEMORY_HEADER: True if <tr1/memory> header is to be used
# for the shared_ptr object, otherwise use <memory>.
# SHARED_PTR_TR1_NAMESPACE: TRUE if shared_ptr is defined in std::tr1 namespace,
# otherwise it's assumed to be defined in std namespace.
include(CheckIncludeFileCXX)
set(SHARED_PTR_FOUND FALSE)
CHECK_INCLUDE_FILE_CXX(memory HAVE_STD_MEMORY_HEADER)
if(HAVE_STD_MEMORY_HEADER)
# Finding the memory header doesn't mean that shared_ptr is in std
# namespace.
#
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
# order to support this, we do an extra check to see which namespace
# should be used.
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <memory>
int main() {
std::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_STD_NAMESPACE)
if(HAVE_SHARED_PTR_IN_STD_NAMESPACE)
message("-- Found shared_ptr in std namespace using <memory> header.")
set(SHARED_PTR_FOUND TRUE)
else()
CHECK_CXX_SOURCE_COMPILES("#include <memory>
int main() {
std::tr1::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
message("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)
endif()
endif()
endif()
if(NOT SHARED_PTR_FOUND)
# Further, gcc defines shared_ptr in std::tr1 namespace and
# <tr1/memory> is to be included for this. And what makes things
# even more tricky is that gcc does have <memory> header, so
# all the checks above wouldn't find shared_ptr.
CHECK_INCLUDE_FILE_CXX("tr1/memory" HAVE_TR1_MEMORY_HEADER)
if(HAVE_TR1_MEMORY_HEADER)
CHECK_CXX_SOURCE_COMPILES("#include <tr1/memory>
int main() {
std::tr1::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
message("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
set(SHARED_PTR_TR1_MEMORY_HEADER TRUE)
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)
endif()
endif()
endif()
endmacro()
# when we have warnings as errors applied globally this
# needs to be removed for some external libs which we dont maintain.
@@ -1006,7 +1321,7 @@ macro(msgfmt_simple
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
DEPENDS msgfmt)
DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
@@ -1015,3 +1330,54 @@ macro(msgfmt_simple
unset(_file_to)
unset(_file_to_path)
endmacro()
macro(find_python_package
package)
string(TOUPPER ${package} _upper_package)
# set but invalid
if((NOT ${PYTHON_${_upper_package}_PATH} STREQUAL "") AND
(NOT ${PYTHON_${_upper_package}_PATH} MATCHES NOTFOUND))
# if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
# message(WARNING "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in '${PYTHON_${_upper_package}_PATH}' "
# "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
# set(WITH_PYTHON_INSTALL${_upper_package} OFF)
# endif()
# not set, so initialize
else()
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
# re-cache
unset(PYTHON_${_upper_package}_PATH CACHE)
find_path(PYTHON_${_upper_package}_PATH
NAMES
${package}
HINTS
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
PATH_SUFFIXES
site-packages
dist-packages
NO_DEFAULT_PATH
)
if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}")
message(WARNING "'${package}' path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
"WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_${_upper_package} OFF)
else()
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
unset(_upper_package)
endmacro()

View File

@@ -0,0 +1,42 @@
def FindSharedPtr(conf):
"""
Detect shared_ptr availability
"""
found = False
namespace = None
header = None
if conf.CheckCXXHeader("memory"):
# Finding the memory header doesn't mean that shared_ptr is in std
# namespace.
#
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
# order to support this, we do an extra check to see which namespace
# should be used.
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std namespace using <memory> header.")
namespace = 'std'
header = 'memory'
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
namespace = 'std::tr1'
header = 'memory'
if not namespace and conf.CheckCXXHeader("tr1/memory"):
# Further, gcc defines shared_ptr in std::tr1 namespace and
# <tr1/memory> is to be included for this. And what makes things
# even more tricky is that gcc does have <memory> header, so
# all the checks above wouldn't find shared_ptr.
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
namespace = 'std::tr1'
header = 'tr1/memory'
if not namespace:
print("-- Unable to find shared_ptrred_map>.")
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
conf.env['SHARED_PTR_NAMESPACE'] = namespace
conf.env['SHARED_PTR_HEADER'] = header

View File

@@ -1,10 +1,11 @@
def test_unordered_map(conf):
def FindUnorderedMap(conf):
"""
Detect unordered_map availability
Returns (True/False, namespace, include prefix)
"""
namespace = None
header = None
if conf.CheckCXXHeader("unordered_map"):
# Even so we've found unordered_map header file it doesn't
# mean unordered_map and unordered_set will be declared in
@@ -17,16 +18,21 @@ def test_unordered_map(conf):
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std namespace.")
return True, 'std', ''
namespace = 'std'
header = 'unordered_map'
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std::tr1 namespace.")
return True, 'std::tr1', ''
namespace = 'std::tr1'
header = 'unordered_map'
else:
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
return False, '', ''
elif conf.CheckCXXHeader("tr1/unordered_map"):
print("-- Found unordered_map/set in std::tr1 namespace.")
return True, 'std::tr1', 'tr1/'
namespace = 'std::tr1'
header = 'tr1/unordered_map'
else:
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
return False, '', ''
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
conf.env['UNORDERED_MAP_HEADER'] = header

View File

@@ -88,6 +88,12 @@ BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
@@ -148,7 +154,7 @@ BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa'
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
BF_PCRE = LIBDIR + '/opencollada'
BF_PCRE_LIB = 'pcre'
@@ -175,7 +181,7 @@ WITH_BF_LLVM = True
BF_LLVM = LIBDIR + '/llvm'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
WITH_BF_OIIO = True

View File

@@ -1,4 +1,4 @@
from Modules.FindPython import FindPython
from FindPython import FindPython
py = FindPython()

View File

@@ -6,9 +6,6 @@ CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/windows_vc12'
elif "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/windows_vc11'
elif "15.00." in CL_STDERR:
VC_VERSION = '9.0'
LCGDIR = '#../lib/windows'
@@ -23,12 +20,8 @@ WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
if VC_VERSION == '11.0':
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
else:
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.4'
@@ -38,15 +31,12 @@ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = False
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
if VC_VERSION == '11.0':
BF_OPENAL_LIB = 'OpenAL32'
else:
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_ICONV = True
@@ -70,10 +60,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
if VC_VERSION == '11.0':
BF_SDL_LIB = 'SDL.lib dxguid.lib'
else:
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
@@ -167,7 +154,7 @@ BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
@@ -212,9 +199,6 @@ BF_BOOST_INC = '${BF_BOOST}/include'
if VC_VERSION == '12.0':
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
elif VC_VERSION == '11.0':
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
else:
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
BF_BOOST_LIB_INTERNATIONAL = 'libboost_locale-vc90-mt-s-1_49'
@@ -223,12 +207,7 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
# Workaround for ptxas.exe crash on VS2012 and cuda 5.5
if VC_VERSION == '11.0':
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30']
else:
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
@@ -252,6 +231,9 @@ CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
if VC_VERSION == '12.0':
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
@@ -276,11 +258,9 @@ BF_BSC=False
if VC_VERSION == '12.0':
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win32-vc12'
BF_INSTALLDIR='..\\install\\win32-vc12'
elif VC_VERSION == '11.0':
BF_BUILDDIR = '..\\build\\win32-vc11'
BF_INSTALLDIR='..\\install\\win32-vc11'
else:
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'
else:
BF_BUILDDIR = '..\\build\\win32-vc9'
BF_INSTALLDIR='..\\install\\win32-vc9'
BF_OPENCOLLADA_LIB = BF_OPENCOLLADA_LIB + ' UTF'

View File

@@ -6,9 +6,6 @@ CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/win64_vc12'
elif "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/win64_vc11'
elif "15.00." in CL_STDERR:
VC_VERSION = '9.0'
LCGDIR = '#../lib/win64'
@@ -23,12 +20,8 @@ WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
if VC_VERSION == '11.0':
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
else:
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
@@ -39,15 +32,12 @@ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = False
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
if VC_VERSION == '11.0':
BF_OPENAL_LIB = 'OpenAL32'
else:
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_SNDFILE = True
@@ -65,10 +55,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
if VC_VERSION == '11.0':
BF_SDL_LIB = 'SDL.lib dxguid.lib'
else:
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_JACK = False
@@ -170,7 +157,7 @@ BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
@@ -199,7 +186,7 @@ WITH_BF_OIIO = True
BF_OIIO = '${LIBDIR}/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
WITH_BF_STATICOIIO = True
WITH_BF_OCIO = True
@@ -215,9 +202,6 @@ BF_BOOST_INC = '${BF_BOOST}/include'
if VC_VERSION == '12.0':
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
elif VC_VERSION == '11.0':
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
else:
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49'
@@ -252,6 +236,7 @@ CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4
# We want to support Vista level ABI for x64
if VC_VERSION == '12.0':
CCFLAGS.append('/D_WIN32_WINNT=0x600')
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
@@ -272,11 +257,8 @@ LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32',
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
if VC_VERSION == '12.0':
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win64-vc12'
BF_INSTALLDIR='..\\install\\win64-vc12'
elif VC_VERSION == '11.0':
BF_BUILDDIR = '..\\build\\win64-vc11'
BF_INSTALLDIR='..\\install\\win64-vc11'
else:
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'
else:
BF_BUILDDIR = '..\\build\\win64-vc9'
BF_INSTALLDIR='..\\install\\win64-vc9'

89
build_files/scons/tools/Blender.py Normal file → Executable file
View File

@@ -406,57 +406,64 @@ def buildinfo(lenv, build_type):
"""
Generate a buildinfo object
"""
import subprocess
build_date = time.strftime ("%Y-%m-%d")
build_time = time.strftime ("%H:%M:%S")
if os.path.isdir(os.path.abspath('.git')):
build_commit_timestamp = os.popen('git log -1 --format=%ct').read().strip()
try:
build_commit_timestamp = btools.get_command_output(args=['git', 'log', '-1', '--format=%ct']).strip()
except OSError:
build_commit_timestamp = None
if not build_commit_timestamp:
# Git command not found
build_hash = 'unknown'
build_commit_timestamp = '0'
build_branch = 'unknown'
else:
import subprocess
no_upstream = False
process = subprocess.Popen(['git', 'rev-parse', '--short', '@{u}'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
build_hash, stderr = process.communicate()
build_hash = build_hash.strip()
build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
try :
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
except subprocess.CalledProcessError:
# assume branch has no upstream configured
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
no_upstream = True
build_branch = btools.get_command_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
if build_branch == 'HEAD':
master_check = os.popen('git branch --list master --contains ' + build_hash).read().strip()
master_check = btools.get_command_output(['git', 'branch', '--list', 'master', '--contains', build_hash]).strip()
if master_check == 'master':
build_branch = 'master'
else:
head_hash = os.popen('git rev-parse HEAD').read().strip()
tag_hashes = os.popen('git show-ref --tags -d').read()
head_hash = btools.get_command_output(['git', 'rev-parse', 'HEAD']).strip()
tag_hashes = btools.get_command_output(['git', 'show-ref', '--tags', '-d'])
if tag_hashes.find(head_hash) != -1:
build_branch = 'master'
if build_hash == '':
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
no_upstream = True
else:
older_commits = os.popen('git log --oneline HEAD..@{u}').read().strip()
if not no_upstream:
older_commits = btools.get_command_output(['git', 'log', '--oneline', 'HEAD..@{u}']).strip()
if older_commits:
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
# ## Check for local modifications
has_local_changes = False
# Update GIT index before getting dirty files
os.system('git update-index -q --refresh')
changed_files = os.popen('git diff-index --name-only HEAD --').read().strip()
changed_files = btools.get_command_output(['git', 'diff-index', '--name-only', 'HEAD', '--']).strip()
if changed_files:
has_local_changes = True
elif no_upstream == False:
unpushed_log = os.popen('git log --oneline @{u}..').read().strip()
unpushed_log = btools.get_command_output(['git', 'log', '--oneline', '@{u}..']).strip()
has_local_changes = unpushed_log != ''
if build_branch.startswith('blender-v'):
build_branch = 'master'
if has_local_changes:
build_branch += ' (modified)'
else:
@@ -695,37 +702,37 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
commands.getoutput(cmd)
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
# blenderplayer doesn't need all the files
if binary == 'blender':
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
mo_dir = os.path.join(builddir[:-4], "locale")
for f in os.listdir(mo_dir):
cmd = 'ditto %s/%s %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
cmd = 'ditto %s/%s %s/%s.app/Contents/Resources/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
commands.getoutput(cmd)
cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/MacOS/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/Resources/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
commands.getoutput(cmd)
if env['WITH_BF_OCIO']:
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/Resources/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
if VERSION_RELEASE_CYCLE == "release":
cmd = 'rm -rf %s/%s.app/Contents/MacOS/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
cmd = 'rm -rf %s/%s.app/Contents/Resources/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
commands.getoutput(cmd)
if env['WITH_BF_CYCLES']:
croot = '%s/intern/cycles' % (bldroot)
cinstalldir = '%s/%s.app/Contents/MacOS/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
cinstalldir = '%s/%s.app/Contents/Resources/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
cmd = 'mkdir %s' % (cinstalldir)
commands.getoutput(cmd)
@@ -753,11 +760,11 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
if env['WITH_OSX_STATICPYTHON']:
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/python/'%(installdir,binary, VERSION)
commands.getoutput(cmd)
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/Resources/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/MacOS/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/Resources/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
@@ -768,32 +775,34 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
cmd = 'SetFile -d "%s)" -m "%s)" %s/%s.app'%(time.strftime("%m/%d/%Y %H:%M"),time.strftime("%m/%d/%Y %H:%M"),installdir,binary) # give the bundles actual creation/modification date
commands.getoutput(cmd)
if env['WITH_BF_OPENMP']:
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
print "Bundling libgcc and libgomp"
instname = env['BF_CXX']
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
commands.getoutput(cmd)
cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
print "Bundling libiomp5"
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
cmd = 'install_name_tool -id @loader_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
cmd = 'install_name_tool -id @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
commands.getoutput(cmd)
cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems

View File

@@ -14,6 +14,21 @@ import sys
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
def get_command_output(*popenargs, **kwargs):
if hasattr(subprocess, "check_output"):
return subprocess.check_output(*popenargs, **kwargs)
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd)
return output
def get_version():
import re
@@ -56,7 +71,14 @@ def get_version():
raise Exception("%s: missing version string" % fname)
def get_hash():
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
try:
build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
except OSError:
build_hash = None
print("WARNING: could not use git to retrieve current Blender repository hash...")
except subprocess.CalledProcessError as e:
build_hash = None
print("WARNING: git errored while retrieving current Blender repository hash (%d)..." % e.returncode)
if build_hash == '' or build_hash == None:
build_hash = 'UNKNOWN'
@@ -664,6 +686,9 @@ def buildslave(target=None, source=None, env=None):
else:
platform = env['OURPLATFORM'].split('-')[0]
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '9.0':
platform = platform + '-vc9'
if platform == 'linux':
import platform
@@ -680,10 +705,6 @@ def buildslave(target=None, source=None, env=None):
if platform == 'darwin':
platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE']
if env['MSVC_VERSION'] == '11.0':
platform = env['OURPLATFORM'] + '11'
if env['MSVC_VERSION'] == '12.0':
platform = env['OURPLATFORM'] + '12'
branch = env['BUILDBOT_BRANCH']

View File

@@ -1,457 +0,0 @@
.TH "BLENDER" "1" "March 6, 2014" "Blender Blender 2\&.70"
.SH NAME
blender \- a 3D modelling and rendering package
.SH SYNOPSIS
.B blender [args ...] [file] [args ...]
.br
.SH DESCRIPTION
.PP
.B blender
is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
http://www.blender.org
.SH OPTIONS
Blender 2.66
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
.TP
.B \-b or \-\-background <file>
.br
Load <file> in background (often used for UI\-less rendering)
.br
.TP
.B \-a or \-\-render\-anim
.br
Render frames from start to end (inclusive)
.br
.TP
.B \-S or \-\-scene <name>
.br
Set the active scene <name> for rendering
.br
.TP
.B \-f or \-\-render\-frame <frame>
.br
Render frame <frame> and save it.
.br
+<frame> start frame relative, \-<frame> end frame relative.
.br
.TP
.B \-s or \-\-frame\-start <frame>
.br
Set start to frame <frame> (use before the \-a argument)
.br
.TP
.B \-e or \-\-frame\-end <frame>
.br
Set end to frame <frame> (use before the \-a argument)
.br
.TP
.B \-j or \-\-frame\-jump <frames>
.br
Set number of frames to step forward after each rendered frame
.br
.TP
.B \-o or \-\-render\-output <path>
.br
Set the render path and file name.
.br
Use // at the start of the path to
.br
render relative to the blend file.
.br
The # characters are replaced by the frame number, and used to define zero padding.
.br
ani_##_test.png becomes ani_01_test.png
.br
test\-######.png becomes test\-000001.png
.br
When the filename does not contain #, The suffix #### is added to the filename
.br
The frame number will be added at the end of the filename.
.br
eg: blender \-b foobar.blend \-o //render_ \-F PNG \-x 1 \-a
.br
//render_ becomes //render_####, writing frames as //render_0001.png//
.br
.TP
.B \-E or \-\-engine <engine>
.br
Specify the render engine
.br
use \-E help to list available engines
.br
.IP
.SS "Format Options:"
.TP
.B \-F or \-\-render\-format <format>
.br
Set the render format, Valid options are...
.br
TGA IRIS JPEG MOVIE IRIZ RAWTGA
.br
AVIRAW AVIJPEG PNG BMP FRAMESERVER
.br
(formats that can be compiled into blender, not available on all systems)
.br
HDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS
.br
.TP
.B \-x or \-\-use\-extension <bool>
.br
Set option to add the file extension to the end of the file
.br
.TP
.B \-t or \-\-threads <threads>
.br
Use amount of <threads> for rendering in background
.br
[1\-64], 0 for systems processor count.
.br
.IP
.SS "Animation Playback Options:"
.TP
.B \-a <options> <file(s)>
.br
Playback <file(s)>, only operates this way when not running in background.
.br
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.br
\-m Read from disk (Don't buffer)
.br
\-f <fps> <fps\-base> Specify FPS to start with
.br
\-j <frame> Set frame step to <frame>
.br
\-s <frame> Play from <frame>
.br
\-e <frame> Play until <frame>
.br
.IP
.SS "Window Options:"
.TP
.B \-w or \-\-window\-border
.br
Force opening with borders (default)
.br
.TP
.B \-W or \-\-window\-borderless
.br
Force opening without borders
.br
.TP
.B \-p or \-\-window\-geometry <sx> <sy> <w> <h>
.br
Open with lower left corner at <sx>, <sy> and width and height as <w>, <h>
.br
.TP
.B \-con or \-\-start\-console
.br
Start with the console window open (ignored if \-b is set)
.br
.IP
.SS "Game Engine Specific Options:"
.TP
.B \-g Game Engine specific options
.br
\-g fixedtime Run on 50 hertz without dropping frames
.br
\-g vertexarrays Use Vertex Arrays for rendering (usually faster)
.br
\-g nomipmap No Texture Mipmapping
.br
\-g linearmipmap Linear Texture Mipmapping instead of Nearest (default)
.br
.IP
.SS "Misc Options:"
.TP
.B \-d or \-\-debug
.br
Turn debugging on
.br
.IP
* Prints every operator call and their arguments
.br
* Disables mouse grab (to interact with a debugger in some cases)
.br
* Keeps python sys.stdin rather than setting it to None
.br
.TP
.B \-\-debug\-fpe
.br
Enable floating point exceptions
.br
.TP
.B \-\-disable\-crash\-handler
.br
Disable the crash handler
.br
.IP
.TP
.B \-\-factory\-startup
.br
Skip reading the "startup.blend" in the users home directory
.br
.IP
.TP
.B \-\-env\-system\-datafiles
.br
Set the BLENDER_SYSTEM_DATAFILES environment variable
.br
.TP
.B \-\-env\-system\-scripts
.br
Set the BLENDER_SYSTEM_SCRIPTS environment variable
.br
.TP
.B \-\-env\-system\-python
.br
Set the BLENDER_SYSTEM_PYTHON environment variable
.br
.IP
.TP
.B \-nojoystick
.br
Disable joystick support
.br
.TP
.B \-noglsl
.br
Disable GLSL shading
.br
.TP
.B \-noaudio
.br
Force sound system to None
.br
.TP
.B \-setaudio
.br
Force sound system to a specific device
.br
NULL SDL OPENAL JACK
.br
.IP
.TP
.B \-h or \-\-help
.br
Print this help text and exit
.br
.IP
.TP
.B \-y or \-\-enable\-autoexec
.br
Enable automatic python script execution, (default)
.br
.TP
.B \-Y or \-\-disable\-autoexec
.br
Disable automatic python script execution (pydrivers & startup scripts)
.br
.IP
.TP
.B \-P or \-\-python <filename>
.br
Run the given Python script file
.br
.TP
.B \-\-python\-text <name>
.br
Run the given Python script text block
.br
.TP
.B \-\-python\-console
.br
Run blender with an interactive console
.br
.TP
.B \-\-addons
.br
Comma separated list of addons (no spaces)
.br
.TP
.B \-v or \-\-version
.br
Print Blender version and exit
.br
.TP
.B \-\-
.br
Ends option processing, following arguments passed unchanged. Access via python's sys.argv
.br
.SS "Other Options:"
.TP
.B /?
.br
Print this help text and exit (windows only)
.br
.TP
.B \-\-debug\-python
.br
Enable debug messages for python
.br
.TP
.B \-\-debug\-events
.br
Enable debug messages for the event system
.br
.TP
.B \-\-debug\-handlers
.br
Enable debug messages for event handling
.br
.TP
.B \-\-debug\-wm
.br
Enable debug messages for the window manager
.br
.TP
.B \-\-debug\-all
.br
Enable all debug messages (excludes libmv)
.br
.TP
.B \-\-debug\-value <value>
.br
Set debug value of <value> on startup
.br
.IP
.TP
.B \-\-debug\-jobs
.br
Enable time profiling for background jobs.
.br
.TP
.B \-\-verbose <verbose>
.br
Set logging verbosity level.
.br
.TP
.B \-R
.br
Register .blend extension, then exit (Windows only)
.br
.TP
.B \-r
.br
Silently register .blend extension, then exit (Windows only)
.br
.TP
.B \-\-no\-native\-pixels
.br
Do not use native pixel size, for high resolution displays (MacBook 'Retina')
.br
.SS "Argument Parsing:"
arguments must be separated by white space. eg
"blender \-ba test.blend"
...will ignore the 'a'
"blender \-b test.blend \-f8"
...will ignore 8 because there is no space between the \-f and the frame value
.br
.SS "Argument Order:"
Arguments are executed in the order they are given. eg
"blender \-\-background test.blend \-\-render\-frame 1 \-\-render\-output /tmp"
...will not render to /tmp because '\-\-render\-frame 1' renders before the output path is set
"blender \-\-background \-\-render\-output /tmp test.blend \-\-render\-frame 1"
...will not render to /tmp because loading the blend file overwrites the render output that was set
"blender \-\-background test.blend \-\-render\-output /tmp \-\-render\-frame 1" works as expected.
.br
.br
.SH "ENVIRONMENT VARIABLES"
\fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
\fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
\fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
\fIDirectory\fR for user data files (icons, translations, ..).
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
.br
.br
.br
.SH SEE ALSO
.B yafaray(1)
.br
.SH AUTHORS
This manpage was written for a Debian GNU/Linux system by Daniel Mester
<mester@uni-bremen.de> and updated by Cyril Brulebois
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.

41
doc/manpage/blender.1.py Normal file → Executable file
View File

@@ -18,10 +18,19 @@
#
# ##### END GPL LICENSE BLOCK #####
'''
This script generates the blender.1 man page, embedding the help text
from the Blender executable itself. Invoke it as follows:
blender.1.py <path-to-blender> <output-filename>
where <path-to-blender> is the path to the Blender executable,
and <output-filename> is where to write the generated man page.
'''
# <pep8 compliant>
import subprocess
import os
import sys
import time
@@ -33,26 +42,23 @@ def man_format(data):
data = data.replace("\t", " ")
return data
# allow passing blender as argument
if sys.argv[-1].endswith(os.sep + "blender"):
blender_bin = sys.argv[-1]
else:
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
if len(sys.argv) != 3:
import getopt
raise getopt.GetoptError("Usage: %s <path-to-blender> <output-filename>" % sys.argv[0])
blender_bin = sys.argv[1]
outfilename = sys.argv[2]
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8")
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8").strip()
blender_version = blender_version.split("Build")[0]
blender_help = subprocess.check_output(cmd).decode(encoding="utf-8")
blender_version = subprocess.check_output([blender_bin, "--version"]).decode(encoding="utf-8").strip()
blender_version = blender_version.split("build")[0].rstrip()
blender_version = blender_version.partition(" ")[2] # remove 'Blender' prefix.
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
filepath = os.path.splitext(__file__)[0]
file = open(filepath, "w")
fw = file.write
outfile = open(outfilename, "w")
fw = outfile.write
fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.replace(".", "\\&.")))
@@ -128,4 +134,5 @@ This manpage was written for a Debian GNU/Linux system by Daniel Mester
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
''')
print("written:", filepath)
outfile.close()
print("written:", outfilename)

View File

@@ -5,7 +5,7 @@ import math
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')
# rotate the euler
eul.rotate_axis(math.radians(10.0), 'Z')
eul.rotate_axis('Z', math.radians(10.0))
# you can access its components by attribute or index
print("Euler X", eul.x)

View File

@@ -28,6 +28,7 @@ Physics Constraints (bge.constraints)
- :class:`ANGULAR_CONSTRAINT`
- :class:`CONETWIST_CONSTRAINT`
- :class:`VEHICLE_CONSTRAINT`
- :class:`GENERIC_6DOF_CONSTRAINT`
:type constrainttype: int
@@ -49,7 +50,7 @@ Physics Constraints (bge.constraints)
:arg axisZ: Z axis
:type axisZ: float
:arg flag: .. to do
:arg flag: 128 to disable collision between linked bodies
:type flag: int
.. attribute:: error
@@ -368,3 +369,10 @@ Physics Constraints (bge.constraints)
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: GENERIC_6DOF_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do

View File

@@ -72,6 +72,7 @@ See the actuator's reference for available methods
* :class:`~bge.types.KX_CameraActuator`
* :class:`~bge.types.KX_ConstraintActuator`
* :class:`~bge.types.KX_GameActuator`
* :class:`~bge.types.KX_MouseActuator`
* :class:`~bge.types.KX_NetworkMessageActuator`
* :class:`~bge.types.KX_ObjectActuator`
* :class:`~bge.types.KX_ParentActuator`
@@ -507,6 +508,18 @@ Property Sensor
:value: 5
.. data:: KX_PROPSENSOR_LESSTHAN
Activate when the property is less than the sensor value
:value: 6
.. data:: KX_PROPSENSOR_GREATERTHAN
Activate when the property is greater than the sensor value
:value: 7
------------
Radar Sensor
------------
@@ -752,6 +765,16 @@ See :class:`bge.types.KX_GameActuator`
.. data:: KX_GAME_SAVECFG
.. data:: KX_GAME_LOADCFG
.. _mouse-actuator:
---------------
Mouse Actuator
---------------
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_X
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_Y
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_Z
---------------
Parent Actuator
---------------
@@ -845,6 +868,23 @@ See :class:`bge.types.KX_SteeringActuator.behavior`
:value: 3
.. _logic-trackto-actuator:
-----------------
TrackTo Actuator
-----------------
See :class:`bge.types.KX_TrackToActuator`
.. data:: KX_TRACK_UPAXIS_POS_X
.. data:: KX_TRACK_UPAXIS_POS_Y
.. data:: KX_TRACK_UPAXIS_POS_Z
.. data:: KX_TRACK_TRAXIS_POS_X
.. data:: KX_TRACK_TRAXIS_POS_Y
.. data:: KX_TRACK_TRAXIS_POS_Z
.. data:: KX_TRACK_TRAXIS_NEG_X
.. data:: KX_TRACK_TRAXIS_NEG_Y
.. data:: KX_TRACK_TRAXIS_NEG_Z
=======
Various

View File

@@ -301,6 +301,34 @@ Functions
Disable the motion blur effect.
.. function:: showFramerate(enable)
Show or hide the framerate.
:type enable: boolean
.. function:: showProfile(enable)
Show or hide the profile.
:type enable: boolean
.. function:: showProperties(enable)
Show or hide the debug properties.
:type enable: boolean
.. function:: autoDebugList(enable)
Enable or disable auto adding debug properties to the debug list.
:type enable: boolean
.. function:: clearDebugList()
Clears the debug property list.
.. function:: setVsync(value)
Set the vsync value

View File

@@ -11,8 +11,131 @@ base class --- :class:`PyObjectPlus`
.. method:: getConstraintId(val)
Returns the contraint's ID
Returns the contraint ID
:return: the constraint's ID
:return: the constraint ID
:rtype: integer
.. method:: setParam(axis, value0, value1)
Set the contraint limits
:arg axis:
:type axis: integer
.. note::
For each axis:
* Lowerlimit == Upperlimit -> axis is locked
* Lowerlimit > Upperlimit -> axis is free
* Lowerlimit < Upperlimit -> axis it limited in that range
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
axis = 3 is a constraint limit, with low/high limit value
* 3: X axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_CONE_TWIST_CONSTRAINT = 3:
axis = 3..5 are constraint limits, high limit values
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_GENERIC_6DOF_CONSTRAINT = 12:
axis = 0..2 are constraint limits, with low/high limit value
* 0: X axis position
* 1: Y axis position
* 2: Z axis position
axis = 3..5 are relative constraint (Euler) angles in radians
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
axis = 6..8 are translational motors, with value0=target velocity, value1 = max motor force
* 6: X axis position
* 7: Y axis position
* 8: Z axis position
axis = 9..11 are rotational motors, with value0=target velocity, value1 = max motor force
* 9: X axis angle
* 10: Y axis angle
* 11: Z axis angle
:arg value0 (speed): Set the linear velocity of the axis
:type value0: float Range: -10,000.00 to 10,000.00
:arg value1 (force): Set the maximum force limit of the axis
:type value1: float Range: -10,000.00 to 10,000.00
axis = 12..14 are for linear springs on each of the position of freedom
* 12: X axis position
* 13: Y axis position
* 14: Z axis position
axis = 15..17 are for angular springs on each of the angle of freedom in radians
* 15: X axis angle
* 16: Y axis angle
* 17: Z axis angle
:arg value0 (stiffness): Set the stiffness of the spring
:type value0: float
:arg value1 (damping): Tendency of the spring to return to it's original position
:type value1: float
1.0 = springs back to original position (no damping)
0.0 = don't springs back
.. method:: getParam(axis)
Get the contraint position or euler angle of a generic 6DOF constraint
:arg axis:
:type axis: integer
axis = 0..2 are linear constraint values
* 0: X axis position
* 1: Y axis position
* 2: Z axis position
:return: position
:rtype: float
axis = 3..5 are relative constraint (Euler) angles in radians
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:return: angle
:rtype: float
.. attribute:: constraint_id
Returns the contraint ID (read only)
:type: integer
.. attribute:: constraint_type
Returns the contraint type (read only)
:type: integer
* 1 = POINTTOPOINT_CONSTRAINT
* 2 = LINEHINGE_CONSTRAINT
* 3 = ANGULAR_CONSTRAINT (aka LINEHINGE_CONSTRAINT)
* 4 = CONETWIST_CONSTRAINT
* 11 = VEHICLE_CONSTRAINT
* 12 = GENERIC_6DOF_CONSTRAINT

View File

@@ -363,6 +363,18 @@ base class --- :class:`SCA_IObject`
:type: float
.. attribute:: debug
If true, the object's debug properties will be displayed on screen.
:type: boolean
.. attribute:: debugRecursive
If true, the object's and children's debug properties will be displayed on screen.
:type: boolean
.. method:: endObject()
Delete this object, can be used in place of the EndObject Actuator.
@@ -551,7 +563,7 @@ base class --- :class:`SCA_IObject`
This is not implimented at the moment.
.. method:: applyImpulse(point, impulse)
.. method:: applyImpulse(point, impulse, local=False)
Applies an impulse to the game object.
@@ -559,8 +571,14 @@ base class --- :class:`SCA_IObject`
If point != position, applyImpulse will also change the object's angular momentum.
Otherwise, only linear momentum will change.
:arg point: the point to apply the impulse to (in world coordinates)
:type point: the point to apply the impulse to (in world coordinates)
:arg point: the point to apply the impulse to (in world or local coordinates)
:type point: point [ix, iy, iz] the point to apply the impulse to (in world or local coordinates)
:arg impulse: impulse vector.
:type impulse: 3D Vector
:arg local:
* False: you get the "global" impulse ie: relative to world coordinates with world orientation.
* True: you get the "local" impulse ie: relative to local coordinates with object orientation.
:type local: boolean
.. method:: suspendDynamics()
@@ -851,3 +869,11 @@ base class --- :class:`SCA_IObject`
:return: Whether or not the action is playing
:rtype: boolean
.. method:: addDebugProperty (name, debug = True)
Adds a single debug property to the debug list.
:arg name: name of the property that added to the debug list.
:type name: string
:arg debug: the debug state.
:type debug: boolean

View File

@@ -0,0 +1,103 @@
KX_MouseActuator(SCA_IActuator)
====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_MouseActuator(SCA_IActuator)
The mouse actuator gives control over the visibility of the mouse cursor and rotates the parent object according to mouse movement.
.. method:: reset()
Undoes the rotation caused by the mouse actuator.
.. attribute:: visible
The visibility of the mouse cursor.
:type: boolean
.. attribute:: use_axis_x
Mouse movement along the x axis effects object rotation.
:type: boolean
.. attribute:: use_axis_y
Mouse movement along the y axis effects object rotation.
:type: boolean
.. attribute:: threshold
Amount of movement from the mouse required before rotation is triggered.
:type: list (vector of 2 floats)
The values in the list should be between 0.0 and 0.5.
.. attribute:: reset_x
Mouse is locked to the center of the screen on the x axis.
:type: boolean
.. attribute:: reset_y
Mouse is locked to the center of the screen on the y axis.
:type: boolean
.. attribute:: object_axis
The object's 3D axis to rotate with the mouse movement. ([x, y])
:type: list (vector of 2 integers from 0 to 2)
* KX_ACT_MOUSE_OBJECT_AXIS_X
* KX_ACT_MOUSE_OBJECT_AXIS_Y
* KX_ACT_MOUSE_OBJECT_AXIS_Z
.. attribute:: local_x
Rotation caused by mouse movement along the x axis is local.
:type: boolean
.. attribute:: local_y
Rotation caused by mouse movement along the y axis is local.
:type: boolean
.. attribute:: sensitivity
The amount of rotation caused by mouse movement along the x and y axis.
:type: list (vector of 2 floats)
Negative values invert the rotation.
.. attribute:: limit_x
The minimum and maximum angle of rotation caused by mouse movement along the x axis in degrees.
limit_x[0] is minimum, limit_x[1] is maximum.
:type: list (vector of 2 floats)
.. attribute:: limit_y
The minimum and maximum angle of rotation caused by mouse movement along the y axis in degrees.
limit_y[0] is minimum, limit_y[1] is maximum.
:type: list (vector of 2 floats)
.. attribute:: angle
The current rotational offset caused by the mouse actuator in degrees.
:type: list (vector of 2 floats)

View File

@@ -64,3 +64,20 @@ base class --- :class:`SCA_MouseSensor`
:type: boolean
.. attribute:: useXRay
If enabled it allows the sensor to see through game objects that don't have the selected property or material.
:type: boolean
.. attribute:: propName
The property or material the sensor is looking for.
:type: string
.. attribute:: useMaterial
Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property.
:type: boolean

View File

@@ -37,3 +37,25 @@ base class --- :class:`SCA_IActuator`
:type: boolean
.. attribute:: upAxis
The axis that points upward.
:type: integer from 0 to 2
* KX_TRACK_UPAXIS_POS_X
* KX_TRACK_UPAXIS_POS_Y
* KX_TRACK_UPAXIS_POS_Z
.. attribute:: trackAxis
The axis that points to the target object.
:type: integer from 0 to 5
* KX_TRACK_TRAXIS_POS_X
* KX_TRACK_TRAXIS_POS_Y
* KX_TRACK_TRAXIS_POS_Z
* KX_TRACK_TRAXIS_NEG_X
* KX_TRACK_TRAXIS_NEG_Y
* KX_TRACK_TRAXIS_NEG_Z

File diff suppressed because it is too large Load Diff

View File

@@ -408,17 +408,19 @@ These returns the absolute path which can be used with native python modules.
Unicode Problems
================
Python supports many different encodings so there is nothing stopping you from writing a script in latin1 or iso-8859-15.
Python supports many different encodings so there is nothing stopping you from
writing a script in ``latin1`` or ``iso-8859-15``.
See `pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_
However this complicates things for the python api because blend files themselves don't have an encoding.
However this complicates matters for Blender's Python API because ``.blend`` files don't have an explicit encoding.
To simplify the problem for python integration and script authors we have decided all strings in blend files **must** be UTF-8 or ASCII compatible.
To avoid the problem for Python integration and script authors we have decided all strings in blend files
**must** be ``UTF-8``, ``ASCII`` compatible.
This means assigning strings with different encodings to an object names for instance will raise an error.
Paths are an exception to this rule since we cannot ignore the existane of non-utf-8 paths on peoples filesystems.
Paths are an exception to this rule since we cannot ignore the existence of non ``UTF-8`` paths on users file-system.
This means seemingly harmless expressions can raise errors, eg.

View File

@@ -70,6 +70,11 @@ if(WITH_LZMA)
add_subdirectory(lzma)
endif()
if(WITH_CYCLES OR WITH_COMPOSITOR)
add_subdirectory(clew)
add_subdirectory(cuew)
endif()
if(WITH_MOD_BOOLEAN)
add_subdirectory(carve)
endif()
@@ -79,3 +84,7 @@ if(WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()
endif()
if(WITH_GTESTS)
add_subdirectory(gtest)
endif()

4
extern/SConscript vendored
View File

@@ -20,6 +20,10 @@ if env['WITH_BF_ELTOPO']:
if env['WITH_BF_BULLET']:
SConscript(['bullet2/src/SConscript'])
if env['WITH_BF_COMPOSITOR'] or env['WITH_BF_CYCLES']:
SConscript (['clew/SConscript'])
SConscript (['cuew/SConscript'])
if env['WITH_BF_OPENJPEG'] and env['BF_OPENJPEG_LIB'] == '':
SConscript(['libopenjpeg/SConscript'])

View File

@@ -32,6 +32,7 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "BulletCollision/Gimpact/btTriangleShapeEx.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h"
@@ -341,12 +342,12 @@ void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation)
double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3])
{
btVector3 vp(p1[0], p1[1], p1[2]);
btTriangleShape trishapeA(vp,
btTriangleShapeEx trishapeA(vp,
btVector3(p2[0], p2[1], p2[2]),
btVector3(p3[0], p3[1], p3[2]));
trishapeA.setMargin(0.000001f);
btVector3 vq(q1[0], q1[1], q1[2]);
btTriangleShape trishapeB(vq,
btTriangleShapeEx trishapeB(vq,
btVector3(q2[0], q2[1], q2[2]),
btVector3(q3[0], q3[1], q3[2]));
trishapeB.setMargin(0.000001f);

674
extern/carve/LICENSE.GPL3 vendored Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -48,8 +48,8 @@ typedef struct CarveMeshDescr {
// N-th element of the vector indicates index of an original mesh loop.
std::unordered_map<std::pair<int, int>, int> orig_loop_index_map;
// N-th element of the vector indicates index of an original mesh poly.
std::vector<int> orig_poly_index_map;
// Mapping from carve face to an original face index in DM.
std::unordered_map<const MeshSet<3>::face_t *, int> orig_poly_index_map;
// The folloving mapping is only filled in for output mesh.
@@ -150,7 +150,7 @@ inline int indexOf(const T *element, const std::vector<T> &vector_from)
void initOrigIndexMeshFaceMapping(CarveMeshDescr *mesh,
int which_mesh,
std::unordered_map<std::pair<int, int>, int> &orig_loop_index_map,
const std::vector<int> &orig_poly_index_map,
std::unordered_map<const MeshSet<3>::face_t*, int> &orig_poly_index_map,
OrigVertMapping *orig_vert_mapping,
OrigFaceEdgeMapping *orig_face_edge_mapping,
FaceEdgeTriangulatedFlag *face_edge_triangulated_flag,
@@ -177,7 +177,7 @@ void initOrigIndexMeshFaceMapping(CarveMeshDescr *mesh,
const MeshSet<3>::face_t *face = *face_iter;
// Mapping from carve face back to original poly index.
int orig_poly_index = orig_poly_index_map[i];
int orig_poly_index = orig_poly_index_map[face];
orig_face_attr->setAttribute(face, std::make_pair(which_mesh, orig_poly_index));
for (MeshSet<3>::face_t::const_edge_iter_t edge_iter = face->begin();
@@ -566,14 +566,14 @@ CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
// Import verices from external mesh to Carve.
int num_verts = mesh_importer->getNumVerts(import_data);
std::vector<carve::geom3d::Vector> vertices;
vertices.reserve(num_verts);
std::vector<MeshSet<3>::vertex_t> vertex_storage;
vertex_storage.reserve(num_verts);
for (int i = 0; i < num_verts; i++) {
float position[3];
mesh_importer->getVertCoord(import_data, i, position);
vertices.push_back(carve::geom::VECTOR(position[0],
position[1],
position[2]));
vertex_storage.push_back(carve::geom::VECTOR(position[0],
position[1],
position[2]));
}
// Import polys from external mesh to Carve.
@@ -581,14 +581,13 @@ CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
int *verts_of_poly_dynamic = NULL;
int verts_of_poly_dynamic_size = 0;
int num_loops = mesh_importer->getNumLoops(import_data);
int num_polys = mesh_importer->getNumPolys(import_data);
int loop_index = 0;
int num_tessellated_polys = 0;
std::vector<int> face_indices;
face_indices.reserve(num_loops);
mesh_descr->orig_poly_index_map.reserve(num_polys);
TrianglesStorage triangles_storage;
std::vector<MeshSet<3>::face_t *> faces;
std::vector<MeshSet<3>::vertex_t *> face_vertices;
faces.reserve(num_polys);
for (int i = 0; i < num_polys; i++) {
int verts_per_poly =
mesh_importer->getNumPolyVerts(import_data, i);
@@ -611,32 +610,39 @@ CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
mesh_importer->getPolyVerts(import_data, i, verts_of_poly);
carve::math::Matrix3 axis_matrix;
if (!carve_checkPolyPlanarAndGetNormal(vertices,
if (!carve_checkPolyPlanarAndGetNormal(vertex_storage,
verts_per_poly,
verts_of_poly,
&axis_matrix)) {
face_indices.clear();
int num_triangles = carve_triangulatePoly(import_data,
mesh_importer,
vertices,
vertex_storage,
verts_per_poly,
verts_of_poly,
axis_matrix,
&face_indices,
&triangles_storage);
for (int j = 0; j < num_triangles; ++j) {
mesh_descr->orig_poly_index_map.push_back(i);
MeshSet<3>::face_t *face = new MeshSet<3>::face_t(
&vertex_storage[face_indices[j * 3]],
&vertex_storage[face_indices[j * 3 + 1]],
&vertex_storage[face_indices[j * 3 + 2]]);
mesh_descr->orig_poly_index_map[face] = i;
faces.push_back(face);
}
num_tessellated_polys += num_triangles;
}
else {
face_indices.push_back(verts_per_poly);
face_vertices.clear();
face_vertices.reserve(verts_per_poly);
for (int j = 0; j < verts_per_poly; ++j) {
face_indices.push_back(verts_of_poly[j]);
face_vertices.push_back(&vertex_storage[verts_of_poly[j]]);
}
mesh_descr->orig_poly_index_map.push_back(i);
num_tessellated_polys++;
MeshSet<3>::face_t *face =
new MeshSet<3>::face_t(face_vertices.begin(),
face_vertices.end());
mesh_descr->orig_poly_index_map[face] = i;
faces.push_back(face);
}
for (int j = 0; j < verts_per_poly; ++j) {
@@ -650,9 +656,9 @@ CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
delete [] verts_of_poly_dynamic;
}
mesh_descr->poly = new MeshSet<3> (vertices,
num_tessellated_polys,
face_indices);
std::vector<MeshSet<3>::mesh_t *> meshes;
MeshSet<3>::mesh_t::create(faces.begin(), faces.end(), meshes, carve::mesh::MeshOptions());
mesh_descr->poly = new MeshSet<3> (vertex_storage, meshes);
return mesh_descr;

View File

@@ -54,13 +54,13 @@ typedef int (*CarveImporter_GetNumPolys) (struct ImportMeshData *import_data);
// Get 3D coordinate of vertex with given index.
typedef void (*CarveImporter_GetVertCoord) (struct ImportMeshData *import_data, int vert_index, float coord[3]);
// Get index of vertices which are adjucent to edge specified by it's index.
// Get index of vertices which are adjacent to edge specified by its index.
typedef void (*CarveImporter_GetEdgeVerts) (struct ImportMeshData *import_data, int edge_index, int *v1, int *v2);
// Get number of adjucent vertices to the poly specified by it's index.
// Get number of adjacent vertices to the poly specified by its index.
typedef int (*CarveImporter_GetPolyNumVerts) (struct ImportMeshData *import_data, int poly_index);
// Get list of adjucent vertices to the poly specified by it's index.
// Get list of adjacent vertices to the poly specified by its index.
typedef void (*CarveImporter_GetPolyVerts) (struct ImportMeshData *import_data, int poly_index, int *verts);
// Triangulate 2D polygon.
@@ -89,24 +89,24 @@ struct ExportMeshData;
// Initialize arrays for geometry.
typedef void (*CarveExporter_InitGeomArrays) (struct ExportMeshData *export_data,
int num_verts, int num_edges,
int num_polys, int num_loops);
int num_loops, int num_polys);
// Set coordinate of vertex with given index.
typedef void (*CarveExporter_SetVert) (struct ExportMeshData *export_data,
int vert_index, float coord[3],
int which_orig_mesh, int orig_edge_index);
int which_orig_mesh, int orig_vert_index);
// Set vertices which are adjucent to the edge specified by it's index.
// Set vertices which are adjacent to the edge specified by its index.
typedef void (*CarveExporter_SetEdge) (struct ExportMeshData *export_data,
int edge_index, int v1, int v2,
int which_orig_mesh, int orig_edge_index);
// Set adjucent loops to the poly specified by it's index.
// Set adjacent loops to the poly specified by its index.
typedef void (*CarveExporter_SetPoly) (struct ExportMeshData *export_data,
int poly_index, int start_loop, int num_loops,
int which_orig_mesh, int orig_poly_index);
// Set list vertex and edge which are adjucent to loop with given index.
// Set list vertex and edge which are adjacent to loop with given index.
typedef void (*CarveExporter_SetLoop) (struct ExportMeshData *export_data,
int loop_index, int vertex, int edge,
int which_orig_mesh, int orig_loop_index);

View File

@@ -498,7 +498,7 @@ static inline void add_newell_cross_v3_v3v3(const Vector &v_prev,
}
// Axis matrix is being set for non-flat ngons only.
bool carve_checkPolyPlanarAndGetNormal(const std::vector<Vector> &vertices,
bool carve_checkPolyPlanarAndGetNormal(const std::vector<MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
Matrix3 *axis_matrix_r)
@@ -510,10 +510,10 @@ bool carve_checkPolyPlanarAndGetNormal(const std::vector<Vector> &vertices,
else if (verts_per_poly == 4) {
// Presumably faster than using generig n-gon check for quads.
const Vector &v1 = vertices[verts_of_poly[0]],
&v2 = vertices[verts_of_poly[1]],
&v3 = vertices[verts_of_poly[2]],
&v4 = vertices[verts_of_poly[3]];
const Vector &v1 = vertex_storage[verts_of_poly[0]].v,
&v2 = vertex_storage[verts_of_poly[1]].v,
&v3 = vertex_storage[verts_of_poly[2]].v,
&v4 = vertex_storage[verts_of_poly[3]].v;
Vector vec1, vec2, vec3, cross;
@@ -532,14 +532,14 @@ bool carve_checkPolyPlanarAndGetNormal(const std::vector<Vector> &vertices,
return fabs(production) < magnitude;
}
else {
const Vector *vert_prev = &vertices[verts_of_poly[verts_per_poly - 1]];
const Vector *vert_curr = &vertices[verts_of_poly[0]];
const Vector *vert_prev = &vertex_storage[verts_of_poly[verts_per_poly - 1]].v;
const Vector *vert_curr = &vertex_storage[verts_of_poly[0]].v;
Vector normal = carve::geom::VECTOR(0.0, 0.0, 0.0);
for (int i = 0; i < verts_per_poly; i++) {
add_newell_cross_v3_v3v3(*vert_prev, *vert_curr, &normal);
vert_prev = vert_curr;
vert_curr = &vertices[verts_of_poly[(i + 1) % verts_per_poly]];
vert_curr = &vertex_storage[verts_of_poly[(i + 1) % verts_per_poly]].v;
}
if (normal.length2() < FLT_EPSILON) {
@@ -552,11 +552,11 @@ bool carve_checkPolyPlanarAndGetNormal(const std::vector<Vector> &vertices,
normal.normalize();
axis_dominant_v3_to_m3__bli(axis_matrix_r, normal);
Vector first_projected = *axis_matrix_r * vertices[verts_of_poly[0]];
Vector first_projected = *axis_matrix_r * vertex_storage[verts_of_poly[0]].v;
double min_z = first_projected[2], max_z = first_projected[2];
for (int i = 1; i < verts_per_poly; i++) {
const Vector &vertex = vertices[verts_of_poly[i]];
const Vector &vertex = vertex_storage[verts_of_poly[i]].v;
Vector projected = *axis_matrix_r * vertex;
if (projected[2] < min_z) {
min_z = projected[2];
@@ -579,7 +579,7 @@ bool carve_checkPolyPlanarAndGetNormal(const std::vector<Vector> &vertices,
namespace {
int triangulateNGon_carveTriangulator(const std::vector<Vector> &vertices,
int triangulateNGon_carveTriangulator(const std::vector<MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
const Matrix3 &axis_matrix,
@@ -590,7 +590,7 @@ int triangulateNGon_carveTriangulator(const std::vector<Vector> &vertices,
std::vector<carve::geom::vector<2> > poly_2d;
poly_2d.reserve(verts_per_poly);
for (int i = 0; i < verts_per_poly; ++i) {
projected = axis_matrix * vertices[verts_of_poly[i]];
projected = axis_matrix * vertex_storage[verts_of_poly[i]].v;
poly_2d.push_back(carve::geom::VECTOR(projected[0], projected[1]));
}
@@ -602,7 +602,7 @@ int triangulateNGon_carveTriangulator(const std::vector<Vector> &vertices,
int triangulateNGon_importerTriangulator(struct ImportMeshData *import_data,
CarveMeshImporter *mesh_importer,
const std::vector<Vector> &vertices,
const std::vector<MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
const Matrix3 &axis_matrix,
@@ -615,7 +615,7 @@ int triangulateNGon_importerTriangulator(struct ImportMeshData *import_data,
Vector2D *poly_2d = new Vector2D[verts_per_poly];
Vector projected;
for (int i = 0; i < verts_per_poly; ++i) {
projected = axis_matrix * vertices[verts_of_poly[i]];
projected = axis_matrix * vertex_storage[verts_of_poly[i]].v;
poly_2d[i][0] = projected[0];
poly_2d[i][1] = projected[1];
}
@@ -663,7 +663,6 @@ bool pushTriangle(int v1, int v2, int v3,
assert(triangle.b < triangle.c);
if (triangles_storage->find(triangle) == triangles_storage->end()) {
face_indices->push_back(3);
face_indices->push_back(v1);
face_indices->push_back(v2);
face_indices->push_back(v3);
@@ -680,7 +679,7 @@ bool pushTriangle(int v1, int v2, int v3,
int carve_triangulatePoly(struct ImportMeshData *import_data,
CarveMeshImporter *mesh_importer,
const std::vector<Vector> &vertices,
const std::vector<MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
const Matrix3 &axis_matrix,
@@ -725,14 +724,14 @@ int carve_triangulatePoly(struct ImportMeshData *import_data,
if (mesh_importer->triangulate2DPoly) {
triangulateNGon_importerTriangulator(import_data,
mesh_importer,
vertices,
vertex_storage,
verts_per_poly,
verts_of_poly,
axis_matrix,
&triangles);
}
else {
triangulateNGon_carveTriangulator(vertices,
triangulateNGon_carveTriangulator(vertex_storage,
verts_per_poly,
verts_of_poly,
axis_matrix,

View File

@@ -74,14 +74,14 @@ bool carve_unionIntersections(carve::csg::CSG *csg,
carve::mesh::MeshSet<3> **left_r,
carve::mesh::MeshSet<3> **right_r);
bool carve_checkPolyPlanarAndGetNormal(const std::vector<carve::geom3d::Vector> &vertices,
bool carve_checkPolyPlanarAndGetNormal(const std::vector<carve::mesh::MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
carve::math::Matrix3 *axis_matrix_r);
int carve_triangulatePoly(struct ImportMeshData *import_data,
CarveMeshImporter *mesh_importer,
const std::vector<carve::geom3d::Vector> &vertices,
const std::vector<carve::mesh::MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,
const int *verts_of_poly,
const carve::math::Matrix3 &axis_matrix,

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,14 +1,14 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
@@ -1439,7 +1439,7 @@ namespace carve {
size_t removeLowVolumeManifolds(meshset_t *meshset, double min_abs_volume) {
size_t n_removed;
size_t n_removed = 0;
for (size_t i = 0; i < meshset->meshes.size(); ++i) {
if (fabs(meshset->meshes[i]->volume()) < min_abs_volume) {
delete meshset->meshes[i];

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

View File

@@ -1,13 +1,13 @@
// Begin License:
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
// Copyright (C) 2006-2014 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in the file LICENSE.GPL2 included in the packaging of
// this file.
// This file may be used under the terms of either the GNU General
// Public License version 2 or 3 (at your option) as published by the
// Free Software Foundation and appearing in the files LICENSE.GPL2
// and LICENSE.GPL3 included in the packaging of this file.
//
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR

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