Compare commits

...

1928 Commits

Author SHA1 Message Date
Severin
1254e98a48 Merge branch 'master' into ime 2014-12-04 20:48:11 +01:00
Severin
151f2467a4 IME: Add Missing #ifdef WITH_INPUT_IMEs 2014-12-04 20:32:10 +01:00
Severin
6919ea1726 IME: Fix Crash on Escape Cancel 2014-12-04 20:12:49 +01:00
Severin
b64b18f8ac IME: Refactor Underline Drawing Code
* ED_text_draw_underline is now UI_text_draw_underline and is used for all
IDE appearances
* usual minor cleanup
2014-12-04 19:12:05 +01:00
226eb53bc7 Fix T41883 proxy sizes not correct.
Really bad issue which meant code could fetch an image buffer from the
stored cache and modify it. Generally sequence image buffers could come
from the cache and should not be modified directly. Easily solved by
scaling a copy of the original.
2014-12-04 16:37:56 +01:00
c57d9c05d6 Gray out keyframe selection option when modal solver is used 2014-12-04 20:09:51 +05:00
8600dc6365 Fix T42800: Blender suddenly closes after pressing solve camera motion
Couple of issues:

- Fist/last frame calculation was wrong

- Keyframe selection might silently fail leading to unpredictable math
  errors all over the place. Now if keyframe selection fails solver wouldn't
  run.
2014-12-04 20:02:05 +05:00
2f637004d5 Buildbot: Enable sm_52 for OSX
This actually enables it in the darwin scons config, that's how it always
used to be configured there.
2014-12-04 19:30:35 +05:00
4fe2b45d3d Cycles: Fix compilation error after recent logging changes
Forbid OSL from polluting current conext with obscure stuff from
windows.h, it's not useful and unhealthy anyway.

Maybe we sohuld also forbid using abbreviated Glog constants as
well tho.
2014-12-04 16:59:31 +05:00
12e9ccb256 Cleanup and fix for uninitialized output buffer of the sunbeams node.
Buffers should actually be cleared before running operations on them,
but this doesn't work for some reason.

Note also that the sunbeams node can show some creases and hard aliasing
when the source point is close to a bright area with strong gradient.
To fix this a better filtering algorithm, dithering or ray sampling
would need to be implemented. In the meantime simply blurring the
sunbeams result a bit should help (or simply avoid putting the source on
a bright spot).
2014-12-04 12:46:45 +01:00
cf15147053 Cleanup: minor int->bool cleanup. 2014-12-04 11:18:27 +01:00
2420a3c189 Fix T42797: -Werror=sign-conversion Triggered in blf_glyph.c
Very minor, but since it was reported...
2014-12-04 10:23:21 +01:00
3c1d286ca5 Fix building on OSX when OMP is enabled.
Reported by sebastian_k over IRC, thanks!
2014-12-04 09:55:17 +01:00
Dalai Felinto
409043c69d GPU: code cleanup, no fundamental changes 2014-12-03 17:56:20 -02:00
a6bb564c99 Another crappy mistake in VBO code. 2014-12-03 20:20:04 +01:00
4afd5db47e Only annoy coders with warnings, not users. 2014-12-03 19:49:48 +01:00
87471874a9 Fix really crappy bug after vertex array refactor commit, it used vertex
arrays offset when VBOs were active and could cause a crash in driver.

Thanks to Dalai again for finding this out.
2014-12-03 19:22:56 +01:00
0762451e86 Cycles: Synchronize SCons with CMake in regard of logging 2014-12-03 23:04:57 +05:00
9ae458362a Cycles: Enable logging by default
Default configuration already includes libmv and glog, so all
the dependencies are met. And logging is nice to have anyway.

This wouldn't give any slowdown, because all the logging is
silenced unless '--debug-cycles', plus no logging is done
from the speed critical code.
2014-12-03 22:46:56 +05:00
627f27502f Cycles: Support logging when building with SCons
Basically, title says ti all, the option is called WITH_BF_CYCLES_LOGGING
2014-12-03 22:46:56 +05:00
f96fd4430a Fix typos. 2014-12-04 02:38:20 +09:00
76bfce231a Make sure materials are updated before passing to renderer in game
engine - report by Dalai on irc.
2014-12-03 18:12:31 +01:00
58005e135b Cycles: Remove workaround in ShaderClosure
Since the aligned allocation of shader closures in OSL memory pool
this workaround is no longer needed.

Also put a comment which describes the desired layout of the structure
so array of shader closures is all nicely aligned.
2014-12-03 20:50:25 +05:00
4cb0e25678 Cycles: Use 16 bytes aligned closures in OSL
This solves bugs like T42210 which are caused by compiler being
smart and using some SSE instructions to operate with closure
classes, which was failing because those classes are not allocated
by the regular allocator but allocated in memory pool in OSL.

With newer versions of OSL it is now possible to force closure
classes being aligned to a given boundary and this commit uses
this new functionality.

Unfortunately, it means we're no longer compatible with older
versions of OSL, only latest git version from upstream and our
branch at github are supported:

  https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes

For OSX and Windows it's not an issue because libraries are
already updated there, Linux users would need to run install_deps
script.
2014-12-03 20:34:03 +05:00
894dbda575 Fix potential bug (though rather unlikely) - MAX_ID_NAME is 66 now! 2014-12-03 10:42:15 +01:00
47ebf96de4 BGE: Fix Rigid body constraint deletion
Fix for T41294.
Rigid body constraints are not deleted, if the corresponding game objects are deleted.

Reviewers: moguri

Differential Revision: https://developer.blender.org/D701
2014-12-02 19:26:06 -08:00
5996ad2fd4 Fixes for T41168
after the completion of the action in "Flipper", layer is removed and the actuator mistakenly receive zero when trying to get the current frame

Patch Author: avrprj

Reviewers: moguri

Projects: #game_logic

Differential Revision: https://developer.blender.org/D906
2014-12-02 19:12:03 -08:00
af92f3d325 Tex Paint: hide selected face-mask edges
Internal selected edges were distracting when painting images.

Also remove unused flag.
2014-12-02 17:59:03 +01:00
e1f5e19eee Freestyle: Avoid quietly ignoring errors in parameter_editor.lineset_pre callbacks. 2014-12-02 23:08:22 +09:00
9345d2d723 Fix T42767: Subsurfacing union boolean with same-named UVs crashes Blender
Was own mistake in handling custom data layers in boolean modifier.

Campbell, do you mind double-checking if it's all correct?
2014-12-02 17:50:34 +05:00
e3a6f1c152 Cycles: Remove workaround for missing sm_52 kernel, now we require it for Maxwell cards. 2014-12-02 13:45:39 +01:00
4649f17c38 Cycles: Enable native sm_52 kernel for Windows. 2014-12-02 13:41:43 +01:00
b5399deac3 Enable sm52 for linux buildbot
Status of other builders:
- Windows are not known for me, would ask Martijn to look into
- OSX buildbot still needs a CUDA toolkit update
2014-12-02 17:30:59 +05:00
c751055513 Cycles: Tweak to the include paths after recent atomics change
Who could knew that include directories are not inherited in scons..
2014-12-02 16:53:22 +05:00
18d08ede22 Fixes for atomic operations when building with MSVC 2014-12-02 16:38:09 +05:00
4e60462881 Followup to previous linked list commit
Windows doesn't have __func__ and utildefines was never included.
2014-12-02 16:09:12 +05:00
ed935ae5ad Cycles: Use lock in the memory statistics
CPU rendering is allowed to allocate memory from multiple threads,
which means statistics need to be avare of this.
2014-12-02 15:50:46 +05:00
e177c51430 Use atomic operations in task pool
This ensures proper values of currently running tasks in the pool
(previously difference between mutex locks when acquiring new job
and releasing it might in theory give wrong values).
2014-12-02 15:23:58 +05:00
a42638d265 No need to free GPU images from BKE_image_free_buffers when in background mode
OpenGL in background mode is not used, so we can skip mutex lock and filling in
the list which later is never used.

This gives unmeasurable speedup by skipping mutex lock, plus solves memory leak
in the background mode.
2014-12-02 14:54:00 +05:00
a5cd6a029f Cleanup: style & de-duplicate 2014-12-02 10:30:29 +01:00
f86fd544c1 Use more unique allocation strings for new links in the list 2014-12-02 14:27:18 +05:00
7de1efd274 Fix: Grease Pencil strokes rendered with blotched colours/alpha in OpenGL Playblasts
Thanks to an anonymous tip (or shall we say, a tip from "Anonymous" - thank you
whoever you are :) it is now possible to render out Grease Pencil shots from
the viewport with correct colours again! This has been broken for a few releases
now, so it's great that this works again now, completing the last part of the
pipeline again.
2014-12-02 19:13:45 +13:00
367204a063 Lasso Select for GPencil Strokes 2014-12-02 13:52:48 +13:00
Severin
36fc98cb0b IME: Various fixes + usual cleanup 2014-12-02 01:24:16 +01:00
8b6759a4a9 GPencil Drawing: Enable polygon smoothing
This helps to reduce jaggies from thin lines, while also resulting in nicer
lines elsewhere.

I'm not sure if it's just me, but it seems to render slightly differently to
before for 3d strokes too (i.e. they seem a bit softer). Hopefully the
difference isn't big enough to affect/degrade the art style of any projects.
2014-12-02 12:51:55 +13:00
0efa41e996 Fix rare crash dragging number-buttons
Could happen dragging shape-keys UIList & the lower slider at once.
2014-12-01 23:39:06 +01:00
44df4242fa UI messages: Minor typo fix. 2014-12-01 22:25:54 +01:00
e35b4bac0a Collada Importer: Separated finding bone chains and fixing leaf bone orientations into 2 functions and added a separated import option 2014-12-01 20:31:59 +01:00
670f5deda6 Fix for potential bug in paint brush RNA updates, was casting to wrong
DNA type.

The update function is for the Paint struct, containing a Brush pointer
property, not Brush itself. Probably went fine so far because was only
used for a notifier pointer, but still ...
2014-12-01 19:54:19 +01:00
ee010650f6 Python: add 'render_write' callback
This is useful for addons which intend to write data next to the rendered image/movie,
but not for preview renders.
2014-12-01 18:47:39 +01:00
Severin
36652982dd Merge branch 'master' into ime 2014-12-01 17:35:11 +01:00
Severin
a54d863a93 IME: Fix IME not ending composition after region change
+ adding some asserts
2014-12-01 17:20:13 +01:00
20a1778148 Cleanup: more int->bool. 2014-12-01 17:11:55 +01:00
9c782c17ba Cleanup: hopefully last int->bool one in this area! 2014-12-01 17:11:55 +01:00
f2c3b5a384 CMake: Warning re: editing windows/py extraction 2014-12-01 16:25:20 +01:00
4ee53074aa Dim down default (no) material for cycles so it matches default material
in blender internal
2014-12-01 16:21:02 +01:00
72f75927f5 Fix T42588: Absolute paths not cleaned on win32
Making paths absolute would leave in "\..\" part on windows.
2014-12-01 16:01:08 +01:00
7d88f0ce4d CMake: fix for msvc (take2) 2014-12-01 15:36:35 +01:00
Severin
cce89d04ee Merge branch 'master' into ime 2014-12-01 15:25:05 +01:00
Severin
d399927749 IME: Deduplicate wmImeData + minor cleanup
* deduplicate use of wmImeData
* add missing "ifdef WITH_INPUT_IME"s
* usual minor cleanup
2014-12-01 15:12:24 +01:00
3bd46904be Cleanup: warnings 2014-12-01 14:54:13 +01:00
22ecceec4a CMake: fix for MSVC, installing Python 2014-12-01 14:54:13 +01:00
4ad0d33d69 UI: auto-run error could push buttons off the visible header 2014-12-01 14:54:13 +01:00
e7de96f5eb Fix: Strokes in image editor can finally be drawn using "fancy" 2D stroke tesslation
Inspired by the previous commit, I've finally found a way to fix a long standing
limitation/bug which meant that Grease Pencil strokes in the Image Editor could
not be drawn using the fancy stroke tesselation code, and were instead done using
the plain old OpenGL strokes instead.
2014-12-02 01:19:49 +13:00
dfc56f1776 Fix: Volumetric strokes now draw correctly in the Image Editor
This needed a correction factor (currently hardcoded to be 1 / 1000)
as it seems that the image editor uses 1 unit as its MAXIMUM dimension
whereas everything else uses 1 unit = 1 pixel.
2014-12-02 01:19:48 +13:00
965a49a3e6 Fix: Forgot to set fill colour when drawing 2D filled strokes 2014-12-02 01:19:48 +13:00
11ad517536 Fix: Changing Grease Pencil datablocks updates the view 2014-12-02 01:19:46 +13:00
8d42c2f3ea Improved Collada Armature Import
Collada does not support Bone length. It has only Joints.
This patch tries to improve the necessary "guesswork" for
importing Rigs.

Differential Revision: https://developer.blender.org/D920
2014-12-01 12:08:26 +01:00
e240bd3932 Re-enabling keymappings for straight line and poly drawing
These are no longer blocked by the pie hotkeys, so they shouldn't be a problem
2014-12-01 12:37:20 +13:00
2334e5ecd4 Bugfix T42763: In GPencil Edit Strokes: Proportional edit mode hidden when there is no active object in scene 2014-12-01 12:36:05 +13:00
Alexandr Kuznetsov
dc199369d1 Fix T42426. Add support for UK "`" key.
Because key == OEM_8, there no clear conversion for different keyboard layouts.
Also, we must map key to GhostKey for shortcuts.
2014-11-30 14:44:53 -05:00
Severin
80496abbf4 Minor cleanup
Adressing some of the inline comments from @sergey and @campbellbarton
2014-11-30 20:06:29 +01:00
Alexandr Kuznetsov
29c2b70a2c Fixed T35128. Progress bar sync on Windows.
Apply for all windows instead of active, otherwise progress doesn't update.
2014-11-30 13:33:51 -05:00
b7d053beaa Cleanup: warnings & space 2014-11-30 19:28:59 +01:00
fd4cd626be More fixes related to D&D:
* Same issue as T42760 was also reproducible in some cases in 3DView.
* You got an error message about missing RNA prop in some drop-called operators.
* You could not drop a movie file in nodes, (some cases of) 3DView, nor ImageEditor.
2014-11-30 17:21:39 +01:00
503dbb65c0 Fix T42760: Drag-to-add feature fails in a case.
We have to unset 'name' when we set 'filepath', and vice-versa.
2014-11-30 17:21:39 +01:00
Severin
b2a5b96ff4 Merge branch 'master' into ime 2014-11-30 16:28:02 +01:00
b12dbdd93b Minor tweaks to quick palettes to avoid conflicts
For now, let's move the GPencil pies to avoid conflicts with dyntopo and other things
* DQ = Main pie (previously Ctrl-D; DD was too unpredictable)
* DW = Settings pie
2014-12-01 02:49:36 +13:00
f0278387e8 Typo fix for comment 2014-12-01 02:49:35 +13:00
9ddc4b1fba Cleanup: tag unused args as such. 2014-11-30 14:39:11 +01:00
5f4c99e66f Fix for wrong RNA type causing asserts to fail in debug mode 2014-12-01 02:28:41 +13:00
75aaa476cb Removing last vestigial remains of old C-based UI for Grease Pencil
I'd kept the code around in the codebase until after the merge back to master
to avoid having too many conflicts if things changed there (or in case we
needed to roll back). Now, it's safe to jettison this!
2014-12-01 02:24:55 +13:00
14b951747f Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.

The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
   - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
     to enter "Stroke Edit Mode". In this mode, many common editing tools will
     operate on Grease Pencil stroke points instead.
   - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
     Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
   - Proportional Editing works when using the transform tools

2) Grease Pencil stroke settings can now be animated
   NOTE: Currently drivers don't work, but if time allows, this may still be
         added before the release.

3) Strokes can be drawn with "filled" interiors, using a separate set of
   colour/opacity settings to the ones used for the lines themselves.

   This makes use of OpenGL filled polys, which has the limitation of only
   being able to fill convex shapes. Some artifacts may be visible on concave
   shapes (e.g. pacman's mouth will be overdrawn)

4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
   has been added which draws strokes as a series of screen-aligned discs.

   While this was originally a partial experimental technique at getting better
   quality 3D lines, the effects possible using this technique were interesting
   enough to warrant making this a dedicated feature. Best results when partial
   opacity and large stroke widths are used.

5) Improved Onion Skinning Support
   - Different colours can be selected for the before/after ghosts. To do so,
     enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
     the colours accordingly.
   - Different numbers of ghosts can be shown before/after the current frame

6) Grease Pencil datablocks are now attached to the scene by default instead of
   the active object.
   - For a long time, the object-attachment has proved to be quite problematic
     for users to keep track of. Now that this is done at scene level, it is
     easier for most users to use.
   - An exception for old files (and for any addons which may benefit from object
     attachment instead), is that if the active object has a Grease Pencil datablock,
     that will be used instead.
   - It is not currently possible to choose object-attachment from the UI, but
     it is simple to do this from the console instead, by doing:
     context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]

7) Various UI Cleanups
   - The layers UI has been cleaned up to use a list instead of the nested-panels
     design. Apart from saving space, this is also much nicer to look at now.

   - The UI code is now all defined in Python. To support this, it has been necessary
     to add some new context properties to make it easier to access these settings.
     e.g. "gpencil_data" for the datablock
          "active_gpencil_layer" and "active_gpencil_frame" for active data,
          "editable_gpencil_strokes" for the strokes that can be edited

   - The "stroke placement/alignment" settings (previously "Drawing Settings" at the
     bottom of the Grease Pencil panel in the Properties Region) is now located in
     the toolbar. These were more toolsettings than properties for how GPencil got drawn.

   - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
     suggestion for an earlier discussion on developer.blender.org

   - By default, the painting operator will wait for a mouse button to be pressed
     before it starts creating the stroke. This is to make it easier to include
     this operator in various toolbars/menus/etc.   To get it immediately starting
     (as when you hold down DKEy to draw), set "wait_for_input" to False.

   - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor

   - Toolbar panels have been added to all the other editors which support these.

8) Pie menus for quick-access to tools
   A set of experimental pie menus has been included for quick access to many
   tools and settings. It is not necessary to use these to get things done,
   but they have been designed to help make certain common tasks easier.

   - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
              spatially stable manner.
   - D Q    = "Quick Settings" pie. This allows quick access to the active
              layer's settings. Notably, colours, thickness, and turning
              onion skinning on/off.
2014-12-01 01:52:06 +13:00
46c80d5d11 Correct includes for win32 2014-11-29 19:12:33 +01:00
1cb59394ae Cleanup: use const, avoid float -> double in matrix invert 2014-11-29 17:49:38 +01:00
46d2b6cd0b Followup for the previous commit
Don't have collada here, so need to use buildbot to test,,
2014-11-29 17:52:02 +05:00
0c60129331 Attempt to fix collada compilation after recent cleanup
This one call really smart script to check unused headers, huh? ;)
2014-11-29 17:47:08 +05:00
2491dc702b Compile Fix: BKE_mesh.h is needed for the BKE_MESH_OMP_LIMIT define 2014-11-29 12:17:24 +13:00
0154096fd5 Cleanup: unused headers 2014-11-28 23:12:12 +01:00
915235c87a Cleanup: unused headers 2014-11-28 22:16:14 +01:00
bcbbc66795 Cleanup: unused headers 2014-11-28 15:52:30 +01:00
9afc5b09fd Delete GPU buffers if preference changes. 2014-11-28 15:15:19 +01:00
2b7e1c6011 Cleanup GPU: get rid of some extremely legacy draw code.
Basically this commit gets rid of most of the derived mesh immediate mode
drawing (cases such as subsurf excluded). Even when VBO is turned off
in user preferences, we still use vertex arrays, which are very similar to
VBOs but memory is client side. Vertex arrays are OpenGL 1.1 so compatibility
is not an issue here.

Reviewers: campbellbarton, sergey, jwilkins

Differential Revision: https://developer.blender.org/D919
2014-11-28 14:38:18 +01:00
c9675b460e Material not set in edit derived meshes after last material modification
commits.
2014-11-28 14:29:56 +01:00
c979f2656d Fix for previous commit (forgot to update rev UID, sorry). 2014-11-28 13:00:00 +01:00
143bac3350 Install_deps: switch to OSL 1.5.11 (ammended with blender-fixes). 2014-11-28 12:44:40 +01:00
f386f574b1 Cycles: Only report exporting curves if there are particle systems on the object 2014-11-28 16:16:50 +05:00
af18fb8036 Cycles: Code cleanup, remove dead code 2014-11-28 15:51:09 +05:00
5561a0bbef Fix graph editor rename button resetting focus when escaping from it.
This is a copy of what the outliner does and seems to work.
2014-11-28 11:41:52 +01:00
2240c260c1 Cleanup: duplicate headers 2014-11-27 23:24:47 +01:00
6a45b2a232 Partial Fix T42652: Transform falloff for mesh islands
This doesn't currently do anything clever when a single vertex is shared by multiple islands
(uses closest only).
2014-11-27 21:40:01 +01:00
f4f5f3b209 Addition/correction to previous commit:
subsurf needs the same modifications in its derived mesh function or
materials don't get updated at all anymore.
2014-11-27 20:12:46 +01:00
2e8ba179f7 Fix T42653, solidify modifier not displaying correctly under edit mode.
Basically, our drawing code assumed we always use the edit mesh
materials, which can be different from the derived mesh
materials in modifiers doing overrides. We usually we want to use the
derived mesh when it is available instead.

There are two fixes here for both solid and textured mode. Unfortunately
the fixes do not help to make the display code less labyrinthian but I
expect this "should work" (tm and famous last words)

Solid mode fix is 95% from Bastien, thanks!
2014-11-27 19:19:55 +01:00
3d3f82a8df Transform: fix for fcurve transform crash
counting handles was out of sync, now use exact same logic.
2014-11-27 19:10:30 +01:00
ef8b0043f5 Transform: correct flag -> bool 2014-11-27 18:53:36 +01:00
eb62d47ff4 Fix own commit: broke add background image 2014-11-27 11:15:43 +01:00
e7cb4d2a0d API Docs: remove hardcoded self from shellscript 2014-11-26 20:24:04 +01:00
Dalai Felinto
cdcef1d993 Fix for walk navigation not working with stereo camera (multiview)
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D917
2014-11-26 16:55:17 -02:00
8152a6c66c Do not use mipmapping on envmaps, can cause discontinuities on
environmental mapping when crossing the seam boundary.

Also output our favourite magenda on missing texture.
2014-11-26 19:19:25 +01:00
d21e254907 Fix GLSL drawing of math absolute node.
Patch by Romanov Alexander of blen4web team!

Differential: D842

Thanks for the patch!
2014-11-26 15:46:18 +01:00
77785ce708 cmake/windows Change python installation so it does not trigger on simple rebuilds 2014-11-26 15:30:13 +01:00
3fea13ed6c Freestyle: Fix for view map caching not flashed properly in view port rendering. 2014-11-26 23:26:20 +09:00
8fa55d95e4 World background working on cycle nodes.
This is added in the spirit of the general cycles GLSL system
which is pretty much WIP still.

This will only work on cycles at the moment but generating for blender
internal is possible too of course though it will be done in a separate
commit.

This hasn't been tested with all and every node in cycles, but
environment and regular textures with texture coordinates work.

There is some difference between the way cycles treats some coordinates,
which is in world space and the way GLSL treats them, which is in view
space.
We might want to explore and improve this further in the future.

...also </drumroll>
2014-11-26 15:07:26 +01:00
8bc84e10f5 CMake: correct own error using undefined var 2014-11-26 13:26:26 +01:00
e9645806f5 Fix T42420: Touchpad zoom and scroll gester using touchpad stopped working
Seems to be an own mistake on using Windows API.
2014-11-26 16:46:01 +05:00
98d4831969 cleanup: style & tips 2014-11-26 10:44:06 +01:00
Severin
4fc691f619 Merge branch 'master' into ime 2014-11-26 00:47:09 +01:00
Severin
316bae9fe8 General Review Changes
Main changes:
* avoid using MEM_mallocN on every redraw
* continue implementation of WITH_INPUT_IME CMake flag
* whitespace and code style cleanups
2014-11-26 00:34:24 +01:00
f1ea1da5e5 BLI_bitmap: add allocation from a MemArena. 2014-11-25 21:09:13 +01:00
3b9517946a Minor UI message fix. 2014-11-25 20:42:39 +01:00
3f92bc76fd Make sure world redraws correctly when we tweak the world properties 2014-11-25 19:30:57 +01:00
9f64a86436 Fix framebuffer completeness being broken after last framebuffer cleanup
commits.

Basically, we don't set a draw buffer until draw time comes. Also add
explicit validation function to validate after all textures have been
attached (could be done automatically at bind time too probably, but
left out for now)
2014-11-25 16:16:50 +01:00
435eaa79b2 Draw world background in offscreen OpenGL renders when. Use forced
rendering in that case, not user preference also set alpha to 1.0
(transparent drawing just clears to zero)
2014-11-24 23:04:02 +01:00
d7a32383c0 Audaspace: File handle management for audio sequencing
Fixes the problem that for big sequences too many file handles were open at the same time.

Changes the playback handles that the audio sequencing code manages to be closed and reopened when needed. The metric used is the current playback position in relation to the strip. If the strip is more than 10 seconds (configurable) away from the playback cursor, the handle is released and reopened when needed.

See D915.
2014-11-25 10:48:23 +13:00
e3b68dbaf8 Freestyle: Py-Hooks for custom pre/post-processing line style
Patch D839, needed for SVG-render to be made into an addon.
2014-11-24 22:46:44 +01:00
Severin
3e5962656a Merge remote-tracking branch 'origin/master' into ime
Conflicts:
	source/blender/editors/space_node/node_add.c
	source/blender/editors/space_text/text_draw.c
	source/blender/editors/space_view3d/view3d_edit.c
2014-11-24 22:22:48 +01:00
c35f563bb7 Separate sequence extension drawing routine so it can be reused (as part
of an option or for tools)
2014-11-24 21:11:31 +01:00
b00a943fe8 UI: avoid property lookup for uiItemMenuEnumR 2014-11-24 21:05:47 +01:00
649a2bcc3d Politically correct terrible consequencer changes
This patch includes the work done in the terrible consequencer branch
that hasn't been merged to master minus a few controversial and WIP
stuff, like strip parenting, new sequence data structs and cuddly
widgets.

What is included:

* Strip extensions only when slipping. It can very easily be made an
option but with a few strips with overlapping durations it makes view
too crowded and difficult to make out.
* Threaded waveform loading + code that restores waveforms on undo (not
used though, since sound_load recreates everything. There's a patch for
review D876)
* Toggle to enable backdrop in the strip sequence editor
* Toggle to easily turn on/off waveform display
* Snapping during transform on sequence boundaries. Snapping to start or
end of selection depends on position of mouse when invoking the operator
* Snapping of timeline indicator in sequencer to strip boundaries. To
use just press and hold ctrl while dragging.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D904
2014-11-24 18:23:44 +01:00
Severin
aa0b268acb Fix T42710: Use string length for ID user buttons 2014-11-24 17:24:07 +01:00
9311a5be04 Cycles: Speedup BVH build for certain compilers
The issue was noticed with gcc-4.7 (used by the release build environment)
which didn't generate optimal enough code for BVH references swap. Seems it
looked up for the assign operator for each of the reference structure members
even though nothing special was required for assignment.

Forcing compiler to use simple memory copy gives speedup of like 2-3 times.

The issue doesn't happen with OSX's clang and new gcc-4.9, but since we're
gonna to stick to gcc-4.7 for official releases for quite some time still it's
nice to have performance issues resolved for all the compilers.

Didn't put the code into #ifdef so if in the future some issues appears with
alignment or assignment which need to happen as an operator we notice this
earlier.
2014-11-24 18:50:46 +05:00
c1149198b5 Cycles: Log time spent on the BVH build 2014-11-24 18:50:46 +05:00
0085c3c5e5 Typo fix (not related to previous drumroll) 2014-11-24 14:48:20 +01:00
fae3850293 Allow explicit control over world background.
Previosuly, world was shown on the background if "Render Only" was used.
Now user should be able to set it independently. This is a prelude to
(drumroll)...
2014-11-24 14:29:09 +01:00
08fd38cf52 BLI_utildefines: add UNUSED_VARS() macro 2014-11-24 12:03:25 +01:00
ed350d9a52 Fix button to add simple UVs not getting removed after pressing it once. 2014-11-24 10:42:23 +01:00
7b0d6a1e6c SCons: correct include for win, also minor cleanup 2014-11-24 09:56:24 +01:00
73633388ff SCons: correct includes after recent refactor 2014-11-24 00:47:32 +01:00
Severin
1087b9236f Merge branch master into input_method_editor 2014-11-24 00:41:32 +01:00
Severin
a677da8638 Finish support for CMake flag WITH_INPUT_IME
Note: implementation not finished, needs a bit cleanup
2014-11-24 00:41:32 +01:00
Severin
b5cf3cd415 Cleanup: Moar whitespace cleanup, plus remove missed printf
Hope that was the last cleanup commit for now :/
2014-11-24 00:41:31 +01:00
Severin
f65879fd51 Add missing files 2014-11-24 00:41:31 +01:00
Severin
ff27b12904 Cleanup: Whitespace, Comments, etc.
It may be a bit early to do such cleanups, there are more important things
to do first, but those things are extremely time consuming and I wanted to
get rid of them first ;)
2014-11-24 00:41:30 +01:00
Severin
30654e186f set up ime branch 2014-11-24 00:41:30 +01:00
Severin
60a035c52a set up ime branch 2014-11-24 00:41:29 +01:00
fde03ec578 Minor edits to T42649 fix
- only modify paths for newly loaded images
- don't attempt to read from library paths
2014-11-24 00:34:00 +01:00
0f159b7306 Fix BLI_Bitmap - was not usable in BKE area (strict compile flags). 2014-11-24 00:34:00 +01:00
98beae0c11 Fix freestyle compile.
Do not know why this shows up now, probably a recent tweak in BLI_utildefines.h or so...
2014-11-24 00:33:59 +01:00
julianeisel
b68166355a Fix T42649: Use Relative Paths for Node Editor & 3D View Images
Images are now added with relative paths to the Node Editor and the 3D View.
2014-11-24 00:33:59 +01:00
2bf7215130 Refactor: BLI_path_util (part 2)
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-24 00:33:58 +01:00
14502a3557 Refactor: BLI_path_util (split out app directory access)
This module is intended for path manipulation functions
but had utility functions added to access various directories.
2014-11-24 00:33:58 +01:00
e0283f8b6c Cleanup: warnings 2014-11-24 00:33:57 +01:00
fffc35c34a Cycles UI: Several fixes for recent additions...
* Alpha Property was removed (Fix T42690)
* Some tweaks to make the panel look better again.
* Use abreviated form "Multiple Importance" everywhere, for consistency.
2014-11-24 00:33:56 +01:00
8299602f1f Math Lib: add constant: M_SQRT1_3 1/sqrt(3) 2014-11-24 00:33:56 +01:00
3d6b912293 Fix T42688: python crash: bpy.context.scene.update().
`ED_render_scene_update()` should ensure it does have some WM to work on...
2014-11-24 00:33:55 +01:00
4a55637a0d Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes" 2014-11-24 00:33:54 +01:00
4135458c3d Fix for previous commit
gpencil_data_duplicate() was being used for gp drawing undo buffers, where using an
exact copy is exactly what we want/need. Instead, the code here now has an additional
arg for determining whether a direct copy is warranted or not.
2014-11-24 00:33:54 +01:00
c3eab0e2f4 Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Grease Pencil data (bGPdata) is now a datablock, so it isn't safe to use
MEM_dupallocN() for copying new instances of these anymore.
2014-11-24 00:33:53 +01:00
9901eed588 Fix leftover f postfix from C code. 2014-11-24 00:33:53 +01:00
48b3a09c41 Text Editor: incorrect clipping at bottom
Patch T42637 by @donfabio
2014-11-24 00:33:52 +01:00
ea671a6e87 fix T42676 replaced windows specific include by BLI_utildefines.h 2014-11-24 00:30:39 +01:00
a36778ab8e BMesh: check for loop side-of-loop & side-of-edge 2014-11-24 00:30:38 +01:00
b4337e870e Cleanup: typo 2014-11-24 00:30:37 +01:00
ed01da08fd Cycles: support for specular color in solid shading mode, available in
the material panel.

Patch by Phillipp Oeser (D62) with some minor modifications, thanks!
2014-11-24 00:30:37 +01:00
e2855b81a4 Bugfix T42048: Keyframes missing when animating particle system blend texture parameters
Textures attached to particle systems are now get their animation data listed
under the particle systems they are attached to now. This is the most convenient
and direct way that these can get included
2014-11-24 00:30:36 +01:00
6650436d4a CMake: disable OSL if its not found 2014-11-24 00:30:36 +01:00
e2e69f6011 Bugfix T41527: Animations of world texture properties invisible in anim editors
Was caused by a typo - "items" was used in place of "tmp_items", causing animation
in the texture to get ignored if nothing else was present
2014-11-24 00:30:35 +01:00
6147ad3596 Bugfix T42648: Invert Selection operator is not working for animation channels
The wrong selection mode was being used/passed to operators.
2014-11-24 00:30:35 +01:00
b0ea6aecb3 Fix T42421: HDR reader could easily read past buffer (truncated HDR files e.g.) and segfault.
Now readers get an 'mem_eof' guard pointer, and they abort in case they try to go past it.
2014-11-24 00:30:34 +01:00
a7536dfac5 Task scheduler: Add an option to limit number of threads per pool
This way we can have scheduler capable of scheduling tasks on all the CPUs
but in the same time we can limit tasks like baking (in the future) to use
no more than given number of threads.
2014-11-24 00:30:34 +01:00
d472651713 Compsitor: White space cleanup 2014-11-24 00:30:33 +01:00
808c6e383b Cleanup: ints/shorts -> bool. 2014-11-24 00:30:33 +01:00
70dee80a8b Fix T42622, environment texture GLSL result different from rendering.
Also included mirror ball shader, which was missing.
2014-11-24 00:30:32 +01:00
77447f0401 Fix T42639, editcurve flags not getting restored on undo.
Error here could be reproduced by tweaking curve properties such as
2d-3d or fill type and undoing.
2014-11-24 00:30:32 +01:00
157e6ef22d Fix T42662 hide unselected does not reveal selected.
Not sure if this is a bugfix exactly but should help the gooseberry team
with their workflow.
2014-11-24 00:30:31 +01:00
78b91eb23f Fix T42660 snapping not working nicely on graph editor.
Basically, get the grid increments and reuse them when snapping. System
is slightly crappy here, we should calculate those factors only once,
but leaving as todo for later.
2014-11-24 00:30:31 +01:00
c6b2422db0 Fix color tweaking in vertex painting not getting an undo push (would
cause color reset between strokes)
2014-11-24 00:30:30 +01:00
d6931a6ce6 Fix T42647, vertex and weight painting mode do not display solid shaded
when VBOs is off.
2014-11-24 00:30:29 +01:00
d5e0613d6e SCons: Proper solution for local symbols map
Configuration used to override the link flags, it better restore them
once the configuration is done.
2014-11-24 00:30:29 +01:00
6a6336ce77 Fix T42638: Roll angle inconsistent flip in edit mode.
Basically, `angle_compat_rad()` was completely broken -
example of result it could produce:

| new angle | compat angle |    result
| -0.000000 |   3.141593   | -> 3.141593

... Where 0.0 (or 2 * PI) would be expected!
2014-11-24 00:30:28 +01:00
e0b960a77e Cycles: Remove dynamic library helper files
They were only needed for CUDA wrangler. Since we've switched to CUEW
this utility functions are no longer needed.
2014-11-24 00:30:28 +01:00
7bd15aa347 Cycles: Fix typo on graphiz graph dumper 2014-11-24 00:30:27 +01:00
bbe68ddf7e Bugfix T42661: shortcut "." and "," for changing pivot center don't work on Graph Editor 2014-11-24 00:30:27 +01:00
339147666a SCons: Remove duplicate PLATFORM_LINKFLAGS from makesdna and makesrna
Hopefully it'll fix "anonymous version tag cannot be combined with other version"
compilation error.
2014-11-24 00:30:26 +01:00
716642379f mathutils.kdtree: fix docstrings 2014-11-24 00:30:26 +01:00
b6192bfa3b Cleanup: Remove SD_BSDF_GLOSSY flag, unused. 2014-11-24 00:30:25 +01:00
15a212ee06 Cleanup: #define -> enums. 2014-11-24 00:30:25 +01:00
d813f70382 Switch to SDL2 on OSX 2014-11-24 00:30:24 +01:00
3e5de9dc3f Fix: Shift-H now works in main graph editor area too
In the process, I've removed the old operator (ANIM_OT_channels_visibility_set)
and folded that option in with the hide operator, to make this consistent
with how this is done in the 3D view and other parts of Blender.
2014-11-24 00:30:23 +01:00
656b868db9 Tweaks to hide/reveal hotkeys for Graph Editor
Now the hotkeys here work in line with what's done for other parts of Blender
* H = Hide selected
* Shift-H = Hide unselected  (i.e. old VKEY behaviour)
* Alt-H = Reveal all
2014-11-24 00:30:23 +01:00
aee3d19082 Cleanup: name hide/reveal, like rest of operators 2014-11-24 00:30:22 +01:00
56d4aed17d Graph Editor: H/Shift-H now hide and unhide selected curves (Gooseberry Request)
Revised the tools for managing which FCurves are visible in the Graph Editor
curves area. Now, there are the following tools in place:
* V (channels region only) = Hide all curves except those in selected channels  [OLD]

* H       = Hide all selected curves  [NEW]
* Shift-H = Show all previously hidden curves [NEW]

I've removed the old operator to toggle visibility status of selected curves,
as it doesn't seem that useful anymore.
2014-11-24 00:30:22 +01:00
c6acfdf2a0 Refactor: Move part of vgroup handling code from ED_mesh/object_vgroup.c to BKE_object_deform.
Along with some minor cleanup and simplifications.

Reviewers: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D903
2014-11-24 00:30:21 +01:00
92f13f7287 Fix T42618: Lock to view + autokey bug
in fact support for this combination wasn't added at all.
2014-11-24 00:27:50 +01:00
929dbc6644 Cleanup: de-duplicate image drag & drop logic
also don't make library paths relative on image load.
2014-11-23 22:48:48 +01:00
888ab78edf Minor edits to T42649 fix
- only modify paths for newly loaded images
- don't attempt to read from library paths
2014-11-23 22:05:24 +01:00
48a720055f Fix BLI_Bitmap - was not usable in BKE area (strict compile flags). 2014-11-23 20:51:08 +01:00
216989686b Fix freestyle compile.
Do not know why this shows up now, probably a recent tweak in BLI_utildefines.h or so...
2014-11-23 20:49:34 +01:00
julianeisel
c05785ec93 Fix T42649: Use Relative Paths for Node Editor & 3D View Images
Images are now added with relative paths to the Node Editor and the 3D View.
2014-11-23 19:38:27 +01:00
43fa4baa6c Refactor: BLI_path_util (part 2)
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-23 18:55:52 +01:00
6308c16675 Refactor: BLI_path_util (split out app directory access)
This module is intended for path manipulation functions
but had utility functions added to access various directories.
2014-11-23 18:42:18 +01:00
57c9d69e6b Cleanup: warnings 2014-11-23 15:13:58 +01:00
b9d9df9810 Cycles UI: Several fixes for recent additions...
* Alpha Property was removed (Fix T42690)
* Some tweaks to make the panel look better again.
* Use abreviated form "Multiple Importance" everywhere, for consistency.
2014-11-22 20:21:18 +01:00
25c5542fe7 Math Lib: add constant: M_SQRT1_3 1/sqrt(3) 2014-11-22 18:21:52 +01:00
789eaa0f5b Fix T42688: python crash: bpy.context.scene.update().
`ED_render_scene_update()` should ensure it does have some WM to work on...
2014-11-22 14:39:53 +01:00
f425de9341 Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes" 2014-11-22 18:05:47 +13:00
731f3476b7 Fix for previous commit
gpencil_data_duplicate() was being used for gp drawing undo buffers, where using an
exact copy is exactly what we want/need. Instead, the code here now has an additional
arg for determining whether a direct copy is warranted or not.
2014-11-22 18:05:46 +13:00
8319a91ad4 Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe way
Grease Pencil data (bGPdata) is now a datablock, so it isn't safe to use
MEM_dupallocN() for copying new instances of these anymore.
2014-11-22 18:05:45 +13:00
82aa32c3a9 Fix leftover f postfix from C code. 2014-11-21 21:40:23 +01:00
176705c480 Text Editor: incorrect clipping at bottom
Patch T42637 by @donfabio
2014-11-21 21:22:31 +01:00
31093f896f fix T42676 replaced windows specific include by BLI_utildefines.h 2014-11-21 16:01:18 +01:00
591eb27efa BMesh: check for loop side-of-loop & side-of-edge 2014-11-21 14:16:35 +01:00
46e2d5ee41 Cleanup: typo 2014-11-21 14:16:35 +01:00
9124ecb16b Cycles: support for specular color in solid shading mode, available in
the material panel.

Patch by Phillipp Oeser (D62) with some minor modifications, thanks!
2014-11-21 14:07:38 +01:00
419c2723d3 Bugfix T42048: Keyframes missing when animating particle system blend texture parameters
Textures attached to particle systems are now get their animation data listed
under the particle systems they are attached to now. This is the most convenient
and direct way that these can get included
2014-11-22 01:30:17 +13:00
62e9435dbc CMake: disable OSL if its not found 2014-11-21 13:07:59 +01:00
e6e78a143e Bugfix T41527: Animations of world texture properties invisible in anim editors
Was caused by a typo - "items" was used in place of "tmp_items", causing animation
in the texture to get ignored if nothing else was present
2014-11-22 00:55:57 +13:00
2288d738bf Bugfix T42648: Invert Selection operator is not working for animation channels
The wrong selection mode was being used/passed to operators.
2014-11-22 00:44:48 +13:00
cc0623ff6c Fix T42421: HDR reader could easily read past buffer (truncated HDR files e.g.) and segfault.
Now readers get an 'mem_eof' guard pointer, and they abort in case they try to go past it.
2014-11-21 12:28:11 +01:00
7b0c529fe2 Task scheduler: Add an option to limit number of threads per pool
This way we can have scheduler capable of scheduling tasks on all the CPUs
but in the same time we can limit tasks like baking (in the future) to use
no more than given number of threads.
2014-11-21 11:31:30 +01:00
a5f674de30 Compsitor: White space cleanup 2014-11-20 21:05:27 +01:00
f8dcd717ce Cleanup: ints/shorts -> bool. 2014-11-20 20:23:13 +01:00
102d3ad595 Fix T42622, environment texture GLSL result different from rendering.
Also included mirror ball shader, which was missing.
2014-11-20 19:43:32 +01:00
6f7b4a3a3e Fix T42639, editcurve flags not getting restored on undo.
Error here could be reproduced by tweaking curve properties such as
2d-3d or fill type and undoing.
2014-11-20 19:09:50 +01:00
0facc48308 Fix T42662 hide unselected does not reveal selected.
Not sure if this is a bugfix exactly but should help the gooseberry team
with their workflow.
2014-11-20 18:11:12 +01:00
4bf40bb646 Fix T42660 snapping not working nicely on graph editor.
Basically, get the grid increments and reuse them when snapping. System
is slightly crappy here, we should calculate those factors only once,
but leaving as todo for later.
2014-11-20 17:44:47 +01:00
2f43befed9 Fix color tweaking in vertex painting not getting an undo push (would
cause color reset between strokes)
2014-11-20 15:43:41 +01:00
4878444ce7 Fix T42647, vertex and weight painting mode do not display solid shaded
when VBOs is off.
2014-11-20 15:27:54 +01:00
e05be6bdbd SCons: Proper solution for local symbols map
Configuration used to override the link flags, it better restore them
once the configuration is done.
2014-11-20 15:27:10 +01:00
391096252b Fix T42638: Roll angle inconsistent flip in edit mode.
Basically, `angle_compat_rad()` was completely broken -
example of result it could produce:

| new angle | compat angle |    result
| -0.000000 |   3.141593   | -> 3.141593

... Where 0.0 (or 2 * PI) would be expected!
2014-11-20 15:02:48 +01:00
d4315398fc Cycles: Remove dynamic library helper files
They were only needed for CUDA wrangler. Since we've switched to CUEW
this utility functions are no longer needed.
2014-11-20 18:56:20 +05:00
d6579fe7f3 Cycles: Fix typo on graphiz graph dumper 2014-11-20 18:56:20 +05:00
50c667372e Bugfix T42661: shortcut "." and "," for changing pivot center don't work on Graph Editor 2014-11-21 01:43:56 +13:00
5d85949b2d SCons: Remove duplicate PLATFORM_LINKFLAGS from makesdna and makesrna
Hopefully it'll fix "anonymous version tag cannot be combined with other version"
compilation error.
2014-11-20 15:30:19 +05:00
8b2fbd6bbf mathutils.kdtree: fix docstrings 2014-11-20 11:03:38 +01:00
0756fe2684 Cleanup: Remove SD_BSDF_GLOSSY flag, unused. 2014-11-20 07:53:22 +01:00
0cb1c2cdee Cleanup: #define -> enums. 2014-11-19 20:49:18 +01:00
82d2718c8f Switch to SDL2 on OSX 2014-11-19 19:41:41 +01:00
cd54f07a3c Fix: Shift-H now works in main graph editor area too
In the process, I've removed the old operator (ANIM_OT_channels_visibility_set)
and folded that option in with the hide operator, to make this consistent
with how this is done in the 3D view and other parts of Blender.
2014-11-20 03:07:09 +13:00
793ed3fa74 Tweaks to hide/reveal hotkeys for Graph Editor
Now the hotkeys here work in line with what's done for other parts of Blender
* H = Hide selected
* Shift-H = Hide unselected  (i.e. old VKEY behaviour)
* Alt-H = Reveal all
2014-11-20 02:46:45 +13:00
2ad61438d8 Cleanup: name hide/reveal, like rest of operators 2014-11-19 14:35:00 +01:00
fbd4dfb2c6 Graph Editor: H/Shift-H now hide and unhide selected curves (Gooseberry Request)
Revised the tools for managing which FCurves are visible in the Graph Editor
curves area. Now, there are the following tools in place:
* V (channels region only) = Hide all curves except those in selected channels  [OLD]

* H       = Hide all selected curves  [NEW]
* Shift-H = Show all previously hidden curves [NEW]

I've removed the old operator to toggle visibility status of selected curves,
as it doesn't seem that useful anymore.
2014-11-20 02:24:42 +13:00
19cc516f51 Refactor: Move part of vgroup handling code from ED_mesh/object_vgroup.c to BKE_object_deform.
Along with some minor cleanup and simplifications.

Reviewers: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D903
2014-11-18 23:52:29 +01:00
Severin
baccf32076 Merge branch 'master' of git.blender.org:blender into input_method_editor 2014-11-18 23:12:09 +01:00
d06b1a5d8b Cycles: Missed some changes in the previous hair motion blur fix
So now cases when object has both hair motion blur and deformation motion blur
vector pass is all correct.

We could get rid of the flag in the future, still need to look deeper into all
the areas trying to find a more clear solution.
2014-11-19 02:42:22 +05:00
Severin
e42f974ae6 Finish support for CMake flag WITH_INPUT_IME
Note: implementation not finished, needs a bit cleanup
2014-11-18 20:05:05 +01:00
2b2ac5d3cc Fix context texture buttons in cycles not getting their context right -
reported by gooseberry team.
2014-11-18 17:45:34 +01:00
ffbb950da9 Fix player compile ( take into account to textcompile with player always aka default on in cmake too) 2014-11-18 16:45:52 +01:00
2218135f67 Fix T41969: Enviropment map crash
The issue was caused by the threading conflict between main thread which
might free environment map and render thread which might be using that
environment map.

Solved by stopping preview jobs when changing environment map.

Sure there are still ways to run into threading conflict, but would rather
solve this things case-by-case.
2014-11-18 16:05:47 +01:00
Severin
122ad8ac6d Cleanup: Moar whitespace cleanup, plus remove missed printf
Hope that was the last cleanup commit for now :/
2014-11-18 15:57:03 +01:00
54c6a9fd49 Make it possible to use preview/viewport render job kill without context 2014-11-18 15:51:31 +01:00
8e16c5294b Fix T42585: Mask motion blur is wrong when parented to plane track
it wasn't wrong, it wasn't implemented.
2014-11-18 15:29:32 +01:00
729dc98be1 Fix T42475: Vector motion blur on hair
Issue was caused by mismatch in pre/post transform matrix spaces for mesh and
curve vectors. This happened because of current way how static transform apply
works: it only stores post/pre in the world space if there's triangle motion
exists. This lead to situation when there's no triangle motion happening but
was hair motion happening.

After long time of trying to solve it in a nice way, ended up solving it in
a bit slow way -- pre/post transform is still storing in the same spaces as
they used to be stored and just convert hair pre/post position to a world
space in the kernel.

This is because currently it's not so clear how to deal with cases when curve
and mesh motion needs different space of pre/post transform (which happens in
cases when only one of the motions exists).

Would think of some magic, and meanwhile artists could be happy with proper
render results.
2014-11-18 15:05:15 +01:00
c07241dd18 Cycles: Add logging to blender curve segment exporting 2014-11-18 15:05:15 +01:00
2f6e9cb4fd Fix for console & info clipping text too early
D845 from @donfabio
2014-11-18 13:43:09 +01:00
a2d95b2f5a Fix for previous check 2014-11-18 12:45:33 +01:00
a08ac5513f Fix for previous commit 2014-11-18 12:44:56 +01:00
3ae0126f86 GPUFramebuffer API cleanup:
* read buffers are set at texture binding time
* change naming when setting a texture as framebuffer
* add function to set slot of framebuffer as current target instead of
texture.
* Binding a buffer reuses the dimensions of the texture at bind time
(can use viewport to set to arbitrary range later)
* Removed offscreen buffer width/height, use the generated texture
dimensions instead. Those were supposed to be checked to see if
generated texture had the requested size but were never actually changed
to the texture dimensions (and it's redundant to store twice).
2014-11-18 12:37:55 +01:00
0f947f2cc5 GPU framebuffer/texture API: Warn when binding a texture that is also
attached to a framebuffer or vice versa.

might be more correct to just handle the case and unbind here.
2014-11-18 12:15:16 +01:00
998a867ba3 GPU framebuffer API:
Allow binding a texture to a different texture attachment than the
first.

Also fix a number error in seperable gaussian blur shader.
2014-11-18 11:56:37 +01:00
70a4bcd7f5 Buildbot: Switch to dynamic loaded SDL-2.0 2014-11-18 15:54:11 +05:00
0d58608b44 CMake: update pacman spec 2014-11-18 11:52:05 +01:00
3563276d70 Revert "OSX/cpack: add a dummy bg and ds_store for dmg"
This reverts commit 5f7b273236.

Binary files for release should be added to svn lib from now on.
2014-11-18 11:40:16 +01:00
7d2590bbfa Fix T42608: Mesh deform modifier for curve fails in render
The issue was caused by render engine duplicating the curve object because
it then converts the object to mesh. The mesh deform duplication code didn't
duplicate binded data, so after duplication modifier is no longer applyable.

So now copyData of mesh deform would copy data needed for binding. This solves
reported render bug and also solves possible frustration when duplicating an
object with mesh deform in the viewport with Shift-D.

Checked other modifiers and laplacian deform already was copying binded data.
Didn't see other modifiers which might also need to copy extra data.
2014-11-18 11:31:58 +01:00
5efd2b7f36 correct another problem with BLI_assert
need to use extern C for C++
2014-11-18 10:56:31 +01:00
4dae5a7c3a correct uninitialized var use 2014-11-18 10:56:17 +01:00
5f7b273236 OSX/cpack: add a dummy bg and ds_store for dmg 2014-11-18 10:31:22 +01:00
b72eab5d6b Error in last commit (broke release build) 2014-11-18 10:24:24 +01:00
Severin
f086c5a1ea CMake: add WITH_INPUT_IME option + various fixes/cleanup
*note:* implementation of WITH_INPUT_IME is only halfway finished, you'll
get build errors if you disable it
2014-11-18 01:44:12 +01:00
94f0d18470 BLI_assert: print a backtrace with the error
Add BLI_system_backtrace()
2014-11-18 00:20:56 +01:00
Severin
c4b7440bc0 Cleanup: Whitespace before comments
Missed that in rB23c7716bbbdef99
2014-11-18 00:02:47 +01:00
Severin
7d281401fd Add missing files 2014-11-17 23:57:27 +01:00
Severin
23c7716bbb Cleanup: Whitespace, Comments, etc.
It may be a bit early to do such cleanups, there are more important things
to do first, but those things are extremely time consuming and I wanted to
get rid of them first ;)
2014-11-17 23:28:59 +01:00
1e5d508567 Cleanup: Shapekey: get rid of ED_vgroup_object_is_edit_mode()
It was doing exactly the same thing as `BKE_object_is_in_editmode_vgroup()`, tsst...
2014-11-17 20:33:25 +01:00
7019c2bb7f Alternate fix for T42619: NULL check in caller
Rather avoid paranoid style, (wm == NULL) is an exceptional case.
2014-11-17 20:09:06 +01:00
0b6631414b CMake: update lite config 2014-11-17 19:40:48 +01:00
Severin
98f0333110 Cleanup: Use *win instead of *window (moar consistent) 2014-11-17 18:30:01 +01:00
Severin
7907014ed7 set up ime branch 2014-11-17 18:18:11 +01:00
5674ac9b7e Cleanup identation and fix a bad alignment issue in last commit 2014-11-17 16:12:16 +01:00
julianeisel
28d9641a3d Fix T42619: python crash: bpy.context.screen.is_animation_playing 2014-11-17 16:07:28 +01:00
e103c9773f Numerical input for changing brush size, strenght or angle.
Patch by Martin Vykoukal, thanks!

This patch adds ability to change brush parameters with keyboard, which
is missing functionality from 2.4x.
Original report: T28811

Reviewers: psy-fi

Differential Revision: https://developer.blender.org/D837
2014-11-17 16:02:44 +01:00
c721ef5fd6 Slight improvements to vgroup tooltips 2014-11-17 07:58:22 -06:00
2dc5365d0d Simplify function to get view vector in world space 2014-11-17 14:38:31 +01:00
80d1d624d3 Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.

We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D878
2014-11-17 17:43:18 +05:00
90bf426554 cmake/buildbot: make sure we build the full blender and cycles cuda binaries 2014-11-17 13:37:34 +01:00
694d74bc6d Fix for last commit, accidentaly removed transparent shadows property. 2014-11-17 11:31:59 +01:00
e82e67584d ShapeKey: Cleanup of BKE_keyblock_convert/update code.
Mainly:
    * Use 'for' loops instead of 'while' ones (saves many lines and regroup most loop handling on one line).
    * Use float[3] pointers where possible.
2014-11-17 11:19:54 +01:00
dab0bd9de6 Fix T35170: Undoing edit op on a basis shapekey could generate extra offset on its 'children'.
Based on investigation by sergey (Sergey Sharybin) and revzin (Grigory Revzin).
Based on patch D460 by revzin (Grigory Revzin).

Differential Revision: https://developer.blender.org/D460
2014-11-17 11:19:54 +01:00
b7f5ab0cd3 ShapeKeys: Add BKE_keyblock_is_basis to check whether a given keyblock is used a basis by others.
Also fix stupid debug-only error in previous commit.
2014-11-17 11:19:54 +01:00
d526ef607d Cleanup: rename BKE_key_convert/update to BKE_keyblock_convert/update.
We are handling a keyblock here, not a whole key(set). Names are alreay a bit confusing,
let's be consistent at least.
2014-11-17 11:19:54 +01:00
a52fbfa828 ShapeKey: Refactor a bit BKE_key_convert_from_...
Thing is, those functions always reallocate the whole keyblock's data mem,
while in some cases we already have right amount of elements, so we can just
copy over. Further more, `BKE_key_convert_from_offset`, despite its name,
was not making any check nor allocation on keyblock's data elements!

So split 'copy' operation itself in `BKE_key_update_from_...`,
where no mem checks/operations are performed (only an assert).

Only useful in sculpt mode currently, but will be used by fix for T35170 too.
2014-11-17 11:19:54 +01:00
b505ecaa4e OSX/cmake: set actual compilation date to macosx bundles, fix player bundle with lbiomp5 ( do we really need this in player? ) 2014-11-16 20:47:57 +01:00
90f3102f9c Cycles Standalone: Updates for Volume sampling. 2014-11-16 20:18:14 +01:00
bfdb9f9e0f Cycles: Remove Integrator volume sampling flag, that was moved to Shader. 2014-11-16 19:50:14 +01:00
a15d584a4f UI: fix for recent menu flipping commit 2014-11-16 17:42:16 +01:00
ed52706d35 Just 2 comments cleaned 2014-11-16 17:12:49 +01:00
fa821a969e OSX/buildsystems: unify openmp handling by changing iomp5 id to @loader_path/../Resources/lib/libiomp5.dylib
This makes install_name_tool usage obsolete here and also assures cmake builds can be codesigned.
IMPORTANT: update lib (darwin-9.x.universal/openmp)
2014-11-16 17:03:44 +01:00
97e2d62c79 Fix T42581: Add 'icon_value' feature to UI Py/RNA's operator button and items of enums.
Rather straightforward, allows for 'DATA' icons (like mat or tex 'previews')
to be used as icon for operator button or items of an enum.

Patch by Simon Lušenc, with minor cleanup by self.
2014-11-16 15:55:55 +01:00
902ba7b25c Cleanup: use SUBD_CORNER_* prefix for Subdiv flags 2014-11-16 15:46:30 +01:00
6dcf8ba189 Knife: fix recent drag option /w loop close
It would miss adding an edge when closing the loop.
2014-11-16 14:57:28 +01:00
832a97f002 Macros: ELEM() can now take 2 args
Handy when used indirectly.
2014-11-16 14:29:17 +01:00
c31f74de6b Cleanup: use BLI_listbase_count_ex to avoid redundant looping 2014-11-16 14:23:37 +01:00
0e60accf2a BLI_listbase: Add BLI_listbase_count_ex (sets a limit)
This can be used to avoid redundant looping when we only want to know if a list is smaller then some size.

also remove paranoid NULL check in list counting.
2014-11-16 14:06:03 +01:00
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
080c1d4567 Error in last commit 2014-11-16 13:28:12 +01:00
f283f57432 CMake: cleanup, namespace & unused vars
also add macro 'print_all_vars()', if(0)'d - debugging only.
2014-11-16 13:04:10 +01:00
497a26665c Knife: double clicking now closes the loop 2014-11-16 12:59:47 +01:00
f0a2e714b3 Fix T40372: Slow Graph Editor drawing
For FCurves where all the keyframes use the "simple" interpolation types
(i.e. Constant, Linear, and Bezier), we now use the old FCurve drawing
code that was used prior to the Easing Equations changes. This should
be generally faster in general.
2014-11-16 23:32:56 +13:00
63ec900af9 [T40792] Optimisations for FCurve Drawing - Lower sampling precision when "High Quality" drawing disabled
When the "High Quality Line Drawing" option (View menu) is disabled,
the sampling rate (i.e. the size of timesteps to use when sampling
the FCurve for drawing it in most cases now) is set to be quite low
(i.e. at 0.1 frame increments). This amounts to at most 10 sub-steps.

In one test file (with a wide window), this had the effect of improving
the performance by over 3x. It's still not as good as a sampling-free
approach, but for this functionality is still needed for FModifiers,
so it's better that we can optimise this.
2014-11-16 23:32:55 +13:00
38f2f4c564 [T40372] FCurve Eval/Drawing Optimisation: Skip Bezier handle eval when all handles are flat
Small optimisation (which shouldn't have much of an effect) where we skip
complex handle calculations if all the handles/verts for a Bezier curve
segment are all flat.

Patch by Campbell (T40372 -> F91346)
2014-11-16 23:32:54 +13:00
a39100cf1d Code cleanup - Typos and separating out assignment from for-loop header 2014-11-16 23:32:54 +13:00
fbfdbaf2eb Own cleanup, sorry for the noise :/ 2014-11-16 11:16:56 +01:00
f36785c26c Cleanup: Replace WM_operator_name_call by WM_operator_name_call_ptr where possible.
This avoids one lookup in optypes list...
2014-11-16 11:11:05 +01:00
10813996e8 Fix T42613: Sculpt dyntopo's 'Set Detail Size' (Shift-D) was only always affecting relative size. 2014-11-16 11:11:05 +01:00
e5ad6348b9 Add PROP_PERCENTAGE to subtypes handled by WM_OT_radial_control operator. 2014-11-16 11:11:05 +01:00
5148a4d7b5 Uninitialised var warning 2014-11-16 20:24:58 +13:00
2625dc5348 Bugfix T41525: Button keyframe indicators don't work correctly when editing NLA Strips
When the active action is a NLA strip, the keyframe indicator colors for buttons
and the 3D view indicator (i.e. the current frame indicator changes color) didn't
work correctly. This was because they were still checking for keyframes in
"global" time space, whereas they needed to be applying NLA corrections to
"look inside" the remapped action.
2014-11-16 20:24:38 +13:00
65d771dcaf Bugfix T42253: End frame for armature ghosting "in range" is not displayed 2014-11-16 18:12:35 +13:00
c6ab67bffc Fix T42611: Knife fails from an edge to a vertex 2014-11-15 22:17:37 +01:00
f7371dca82 Code cleanup: Spelling 2014-11-16 02:11:41 +05:00
32c9146a09 Cleanup (mostly 0/1 -> false/true). 2014-11-15 21:30:05 +01:00
a28c763b44 Cmake windows. Make sure we install blender player.
Add blenderplayer component so you can speicfy to install this in the
installer
2014-11-15 20:52:10 +01:00
bfa75dc990 Knife: freehand drawing while LMB held 2014-11-15 20:50:15 +01:00
d3b0a4a525 Fix broken auto-leyframing for 'Vector' button. 2014-11-15 18:19:23 +01:00
141064d7ae Fix T42567: Color Wheel Buttons do not autokey correctly.
In fact, any button controlling a whole array of values were broken
because they always only keyed the index of the single fcurve returned
by `ui_but_get_fcurve()`, now pass button's rna_index value instead.
2014-11-15 18:07:43 +01:00
eb515f4dc8 CMake: cleanup, use find_package for pthreads 2014-11-15 16:46:30 +01:00
c1e48c0ff0 UI: cleanup next/prev order in menu code
Recent flag re-order broke it since bits overlap, but logic here was far too complicated & fragile,
Checked the type of each button when testing which direction to handle events as well as block direction.

Now store the block-flipped state as a flag.
2014-11-15 14:40:10 +01:00
694f15dee3 Cleanup: remove unused redraw flag 2014-11-15 14:40:10 +01:00
3da0ee287c cmake / windows cleanup 2014-11-15 14:36:25 +01:00
9ce9725211 Cmake windows, removing more redundant things 2014-11-15 12:42:21 +01:00
237bd11bc5 Cmake windows/msvc minor cleanup 2014-11-15 12:12:19 +01:00
61e1e9adb8 Cycles: Revert changes to inline flags enabled for release only
It appears it's not really needed for convenient debugging when
using proper flags passed to the compiler. Basically, it is -g3
and set breakpoint to a function as if it's not in the namespace.

Not as if a code was any wrong, just it's possible to have more
clear solution for the issue i've tried to solve in the past.
2014-11-15 04:50:34 +05:00
fa6c45b092 Cycles: Fix compilation error with enabled looging but disabled libmv 2014-11-15 04:01:31 +05:00
64ac46126b Add Make Edge/Face to mesh Edit Mode toolbar.
The Mesh Tools have quite few crucial tools that're missing from the toolbar. This is the main one.

The tools that're here should also be reorganized a bit to introduce actual orgnization, as it's quite sporadic at the moment. Will do that later.
2014-11-14 15:48:18 -06:00
5bcda29658 Replace tooltips of copy vgroups to ... operators.
Those ops actually replace vgroups in destination, tooltips were really misleading.

Issue raised by zanqdo (Daniel Salazar), thanks.
2014-11-14 19:52:34 +01:00
04c3f6e53e View3d: border would jitter on panning 2014-11-14 17:58:53 +01:00
89d20990e5 Sequencer: handles drew outside of small strips 2014-11-14 16:52:08 +01:00
6e17fb8fe3 Fix T42593: Rigify crash when I press "Generate" - corrupted IDGroup's listbase of children
Nothing related to rigify actually, recent hack in py handling of IDProp (rB3346ab03)
was breaking integrity of IDGroup's listbase of children IDProps...

Took me hours to nail this down, should have bisected for once. :/
2014-11-14 16:42:49 +01:00
5a893d09d2 Add missing notifiers for slip operator 2014-11-14 15:05:07 +01:00
22754cf687 skip scene_armature_depsgraph_workaround when theres no armatures 2014-11-14 14:55:45 +01:00
8d5d6de761 Reuse local view for UVs for previous commit, thanks to Campbell for the
suggestion.

Also minor compile fix after viewport patch
2014-11-14 14:06:39 +01:00
bed0995976 Depsgraph: Workaround for missing pose update when changing visible layers
That's like really a bummer, because currently animation data for armatures
might want to use pose, and pose might be missing on the object.
This happens when changing visible layers, which leads to situations when
pose is missing or marked for recalc, animation will change it and then
object update will restore the pose.

This could be solved by the new dependency graph, but for until then we'll
do an extra pass on the objects to ensure it's all fine.

It's done in the scene_update_for_newframe() to solve possible issues with
the render engines as well.

This finally solves issues we had with Caminandes team, where Koro would be
at the scene origin instead of being properly posed.
2014-11-14 14:05:31 +01:00
fcadf47a91 Fix T42561 (semi feature request/comeback) UVs in image editor can get
too crowded.

UVs in the same layer can be used for many images. It used to be
possible to filter UV faces based on the image, but this is impossible
now due to the way the system works, so I added an option to allow
filtering UVs based on active material index.

Rationale on using option and not being smart here (options are bad tm)
is that for some workflows, such as preserving image space by using the
same image for many materials, people might want to turn this off.
2014-11-14 13:50:21 +01:00
08974c22e4 Fix X11/GLX failing with multi-sample
Caused by D643, in fact we need to get the visualInfo before creating the window.
2014-11-14 13:43:22 +01:00
2c3a503731 UI: Rename Addons -> Add-ons
D812 by @thefallenweeble

internally variable names & paths remain the same, this is for labels & tips only.
2014-11-14 12:19:14 +01:00
f9adf3616c Fix vertex colors being displayed wrong in GLSL in edit mode. Looks like
swapping the colors is no longer needed.
2014-11-14 12:15:36 +01:00
4b7fc26bae Don't assign wrong datalayers to gpuattribs in edit mode.
layer index was being obtained for loop data types but we referenced
Tessface data types

NULLing those out since only the data offsets are used in edit mode and
address sanitizer complains about freed memory access.

Also minor comment in texpainting
2014-11-14 12:08:57 +01:00
60ffc08547 Cleanup: use BLI_hash_ prefix for md5 api 2014-11-14 11:53:27 +01:00
14795baf21 Cleanup: headers 2014-11-14 11:49:45 +01:00
64c0c13e6e Add Murmur2A hashing feature to BLI
Murmur2a is a very fast hashing function generation int32 hashes.
It also features a very good distribution of generated hashes.

However, it is not endianness-agnostic, meaning it will usually generate
different hashes for a same key on big- and little-endian architectures.
Consequently, **it shall not be used to generate persistent hashes**
(never store them in .blend file e.g.).

This implementation supports incremental hashing, and is a direct
adaptation of reference implementation (in c++):
https://smhasher.googlecode.com/svn-history/r130/trunk/MurmurHash2.cpp

That cpp code was also used to generate reference values in gtests file.

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D892
2014-11-14 11:00:26 +01:00
c8a9764987 Cmake add installation of redistributables for msvc 2013 2014-11-14 10:49:01 +01:00
d35d9e6452 update dna exporter for API changes
also print html name.
2014-11-14 00:55:40 +01:00
4e4ef13734 CMake: add 'full' to 'make help' 2014-11-14 00:19:53 +01:00
bf63e348a2 CMake: disable some build option defaults T42569
This commit disables some lesser used dependencies
for Linux/Unix systems by default.

Run: `make full` to enabled options used in release build.
2014-11-14 00:10:24 +01:00
3967d1caba CMake: remove deprecated mudflap option 2014-11-13 19:43:15 +01:00
4b106ac1c9 Add 'help_features' make target (prints WITH_*** options) 2014-11-13 19:41:33 +01:00
b1ca5b30cf CMake: add 'make full' target 2014-11-13 19:41:33 +01:00
78e0791a54 Fix T42590 baking bakes to duplicated objects too.
Only allow non instanced renderobjects to be baked.
2014-11-13 18:54:32 +01:00
15a7a5a08c CMake buildbot change upload should work now
CPack generating NSIS and WiX installers should also work
2014-11-13 17:09:47 +01:00
1ddfe6676d BMesh: shrink/fatten faces-normals in face mode
nice for solid-modeling, gives better results for partial selections.
2014-11-13 16:41:56 +01:00
96ca64629d Windows (MSVC2013) move to SDL2 2014-11-13 16:23:27 +01:00
dc519f3eb7 Fix T42571,T42572 snapping ignores linked objects
Make sure to use edit object if objects share the same data.
2014-11-13 15:41:57 +01:00
9ebe44bc9c Cleanup: cmake 2014-11-13 15:30:32 +01:00
284726baec Fix T42587 rotation curves not setting jump to cursor position
correctly.
2014-11-13 15:03:59 +01:00
f82f1513e0 Booleans: Boost is no longer a dependency for Carve
SCons is currently broken on my laptop, so can't test if it works for sure,
so please do tests of that.
2014-11-13 18:26:21 +05:00
4d35ecc3bb Only do the portable fix on linux - thanks to Martijn Berger for
noticing!
2014-11-13 14:10:37 +01:00
1eecb1feaf CMake: manpage creation is now optional 2014-11-13 14:07:34 +01:00
c9f87df47f Correctly support non-portable case 2014-11-13 13:52:20 +01:00
72aa0ebe6a Fix cmake install of blenderplayer for linux. 2014-11-13 13:37:27 +01:00
4b742caddc Fix T42538 Brush cleanup:
Some brushes really do the same thing and we have agreed not to offer
extra presets for one brush type. Removed those brushes from default
.blend. They are Polish (Flatten Contrast does the same), Brush (Does
the same as draw) and Draw from texpaint (where texdraw/draw does the
same)
2014-11-13 11:35:33 +01:00
2e2c24bec1 Cycles: Update some comments in volume code. 2014-11-13 11:30:18 +01:00
577327635c GHOST/X11: correct USE_X11_ERROR_HANDLERS define 2014-11-13 10:58:01 +01:00
cbf76d165f Fix missing UV field in Wave modifier. 2014-11-13 08:56:39 +01:00
4828c6a1ce cmake: fix generation / install on OS X,
N.B. needs cmake cache rebuild
2014-11-12 20:54:48 +01:00
395ee33c8a Cycles: Prevent NaN and inf in area lamp sampling caused by precision issues
This doesn't have noticeable affect on the render times, but avoids possible
numerical issues.
2014-11-12 21:23:33 +05:00
Martijn Berger
f46e77fd56 cmake buildbot. Create the zip archive with the name as expected 2014-11-12 15:23:24 +01:00
7553a8c195 Fix bad 'COLOR' replacement in recent UI refactor. 2014-11-12 12:40:53 +01:00
8f8b9b58f6 Fix T41066: MSVC + AVX2 kernel causes artifacts in hair render.
The issue lies in the FMA functions, so disable them on Windows for now.
2014-11-12 11:51:49 +01:00
5cba64e30c Cleanup, please follow existing style when adding new flags. ;) 2014-11-12 09:43:23 +01:00
727e9dd1bb Cleanup, typo fixes. 2014-11-12 09:14:07 +01:00
c932edb578 Fix: T42553 Linux cmake install now also without absolute path's
OS X cmake probably needs more checking.
2014-11-11 21:44:26 +01:00
Dalai Felinto
8c227adb8c Fix T41783: Cycles baking ignores displacement
Create unique flag for output shaders with displacement data and use it
to calculate transformed normal. Implementation suggested by Brecht Van
Lommel.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D890
2014-11-11 18:21:56 -02:00
2beb940365 Fix T42009: Cyclic set-scenes with linked libs
Check linked libs on file load, Thanks to Sergey for the initial patch.
2014-11-11 19:39:20 +01:00
893aac18c6 Cleanup: remove inline list-count 2014-11-11 19:32:46 +01:00
4a37269d0a UI: Cleanup, replace enum with function 2014-11-11 19:02:18 +01:00
9cc51d8ea2 UI: cleanup odd string-width check 2014-11-11 18:40:08 +01:00
2ad2236078 UI: Cleanup (line length) 2014-11-11 18:26:16 +01:00
6621c02026 UI: order & comment eButType 2014-11-11 18:26:16 +01:00
4eeeae0eda UI: remove unused emboss-table define 2014-11-11 18:26:16 +01:00
52d571e189 Avoid calling powf with integer exponent in more places
Move powX functions from particle code into math library and use them.
2014-11-11 18:16:20 +01:00
490b73ff22 cloth: Avoid calling powf with integer exponent
This is pretty slow and even shows up in profiling.
2014-11-11 18:08:15 +01:00
9c15439c5c cloth: Fix overallocation for collisions
This was introduced when eltopo was added, but not reverted when it was
removed.
2014-11-11 18:05:00 +01:00
e43c5fa005 cmake. refactor installing python things to not have absolute path's
buildbot. add rudementatry cpack based packing for cmake path
2014-11-11 15:48:22 +01:00
f25f1a6688 buildbot: fix: cmake generator is kind of sensitive 2014-11-11 15:48:21 +01:00
Dalai Felinto
63d0197f9b Fix T41873: Different 'seed' values do not yield different noise patterns when using cycles texture bake
As per instructions by Brecht Van Lommel.
2014-11-11 10:53:01 -02:00
32a4403617 Add msbuild for windows cmake buildbots 2014-11-11 11:22:49 +01:00
b49df09d89 Fix T42557: Crash on delete or separate vertices with subsurf modifier + vertex parenting
Only fixes the crash actually, real issue is, vparent does not handle deletion of vertices
at all currently... We'd need either some kind of static uuid for vertices, or some
mapping helpers used each time we remove or reorder verts... ugh.

Org patch by Severin (Julian Eisel).
2014-11-11 09:45:27 +01:00
5c6e333780 UI Refactor T41640
Make the UI API more consistent and reduce confusion with some naming.

mainly:
- API function calls
- enum values

some internal static functions have been left for now
2014-11-10 23:06:54 +01:00
2b107beffd Fix T39144: text-select scrolling too fast
Use a timer to get predictable speed.
2014-11-10 20:59:59 +01:00
julianeisel
bd401d9517 Fix T42498: Disable Renaming for Read-Only Files in File Browser 2014-11-10 20:32:17 +01:00
99ded01b64 Sequencer: undefine SEQ_BEGIN/SEQ_END (see comment) 2014-11-10 19:39:59 +01:00
61f86a7bee Sphinx doc script: server path has changed 2014-11-10 19:28:22 +01:00
julianeisel
4eb628e204 Fix T42499: Make sure directories are not interpreted as libraries 2014-11-10 18:51:56 +01:00
157067acbd Cycles: Speedup for homogenous volumes in decoupled volume sampling
The idea is to avoid memory allocation when only one segment step is to be allocated.
This gives some speedup which is difficult to measure on this trashcan from hell, but
it's about from 7% to 10% in the extreme case with single volume filling the whole of
the viewport. This seems to depends on the phase of the bug-o-meter in the studio.

On the linux boxes it's not that spectacular speedup, it's about 2% on my laptop and
about 3% on the studio desktop. This is likely because of the awesomeness of jemalloc.
2014-11-10 18:47:28 +01:00
3ead24d235 Fix T4256: Connect tool hangs 2014-11-10 18:38:46 +01:00
3346ab0348 Fix/workaround T37073: Crash updating custom props visible in the UI 2014-11-10 17:10:58 +01:00
c8ef04e726 Fix T42199: PET displays when transforming around centers
Old code only worked for faces.
2014-11-10 14:37:53 +01:00
da31052b45 Fix T42221: 'Shadow Width' influences tooltip size
Positioning of popups was using shadow width for placement,
could give some quite odd results.
2014-11-10 13:58:03 +01:00
a4dbb3bb88 Correct last commit 2014-11-10 13:48:27 +01:00
225e3460d0 Fix: Shapekey Basis not updated on editmode exit 2014-11-10 13:32:39 +01:00
723f1e950b Fix T42486: Array modifier cap-end crash
Thanks to @PatB for the fix.
2014-11-10 09:55:25 +01:00
6c5e2ac7e6 Cleanup: remove unused UI_SHIFT_FLIPPED (2.4x toolbox) 2014-11-09 17:17:46 +01:00
Dontsov Valentin
8c712eaa29 GLSL: specular transparency support for Blender internal materials
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D781
2014-11-09 15:35:08 +01:00
aac2db33df Fix T42540: save_pre and save_post handlers not called when saving startup.blend. 2014-11-09 15:11:40 +01:00
a1c1ec86d9 Fix T42548: crash showing subsurf modifier UI on hidden object. 2014-11-09 14:55:10 +01:00
8f8e1dd8f7 Code cleanup: Remove unused functions from implicit.c
Most of the unused functions were removed. Some of them were if-defed
because they are referenced from the code which was already if-defed.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D868
2014-11-09 16:47:44 +05:00
Martijn Berger
5cce2e1cfe Cmake cleanup
Move compiler warnings for msvc to common compilerwarnings.
2014-11-08 21:17:43 +01:00
67766f7715 Put latest buildbot config files to git 2014-11-09 00:11:50 +05:00
75f518ccb9 Cycles: Remove dead branch for Distant lamps, ls->t is always FLT_MAX here. 2014-11-08 16:47:56 +01:00
83dee4a3b1 Readme for Blender 2.73. 2014-11-08 16:47:05 +01:00
7b873b0662 Add safe_normalize to cycles, avoid checking length first
This won't give any big speedup,
just avoids redundant sqrtf and may be useful in future.

Differential Revision: https://developer.blender.org/D880
2014-11-08 13:37:42 +01:00
112032f2ff Cleanup: cycles whitespace 2014-11-08 13:37:42 +01:00
8f8321bfdb cmake buildfiles Cleanup / Refactor, no functional changes.
Move away from using hardcoded ${target} when calling install() in cmake
2014-11-08 11:32:32 +01:00
5604a3d31d Fix T42531: Setting 'Undo' steps to '1' causes weirdness.
Do not allow '1' value here, it's useless.

Thanks to Campbell for suggested solution here!
2014-11-07 10:31:15 +01:00
a8b9402c8f Cycles: Tweak to the expf() speed workaround
Add compile-time check for particular glibc version which fixed the issue.
This makes it so own-compiled blender is the fastest in the world, and the
only issue remains what should we do for release builds.

After some discussion with Campbell we decided to keep it as is for now
because slowdown is not that much noticeable. We'll disable this workaround
for release builds when all the majority of the distros will switch to the
new version of glibc.
2014-11-07 13:35:45 +05:00
548b8f51c9 Fix assert failure in GPU codegen
Even though GLSL allows to have polymorphic functions our codegen
is not aware of this at all.

Let's rename the functions for now, but in the future would be handy
to make codegen aware of the polymorphic functions.
2014-11-07 13:17:26 +05:00
0627bc22f5 Fix T42208 color pickers are coupled.
Decouple color picker hsv data from the whole block. Basically, each
color picker now takes care of creating its own color picker role. For
this bug report it can be seen that probably HSV is not the best space
for gamma/lift/gain workflow because it is bounded at 1.0 but this is a
separate issue.
2014-11-06 20:19:21 +01:00
4542504162 better fix for fix T42525 (tm)
Looks like material node trees are stored directly in the material. The
reason I thought this was fixed was because my test file didn't connect
the lamp data node in the rest of the tree.

Thanks to Campbell for catching this :)
2014-11-06 18:07:18 +01:00
julianeisel
a91888206f Fix T42497: Enlarge rename text field in File Browser
To ensure there's space for more than a few characters in the rename text fields of the File Browser, we now use a width relative to the column width (for all display modes).

Includes some edits from @campbellbarton - thanks for this!
2014-11-06 17:45:32 +01:00
0c28aaae7e Fix T42525 crash when deleting lamp attached to Lamp Data material node
in material shading mode.
2014-11-06 16:38:44 +01:00
a081a4817c Editmesh: select more/less can now step over adjacent faces
This keeps a square shaped selection when using grid topology.
2014-11-06 15:35:46 +01:00
d1eb762b57 Fix T42492, Shading error with fresnel weight node.
Orthographic case needs different handling.
2014-11-06 15:03:34 +01:00
5e01e71b59 Revert "Metastrips: disallow making a metastrip with only one strip present."
This reverts commit a1578f08dc.

Looks like some workflows benefit from being able to do this
2014-11-06 14:06:24 +01:00
70f74daa5a Slight corrections to the string formatting of autosave, thanks to
Campbell for the help!
2014-11-06 13:08:43 +01:00
ba872f022c Gooseberry request, append the file name to autosaves as well as the pid 2014-11-06 12:42:47 +01:00
7d4c89e6da Correct recent refactor (use generic callback) 2014-11-06 11:47:08 +01:00
fb820c0638 Cycles: Add "Max Bounce" control for lamps
With this setting, we can limit the influence of a lamp to a certain amount of bounces.
0 = Only direct light contribution
1 = 1 light bounce
...

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

You can find an example render in the release logs: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles
2014-11-05 22:49:09 +01:00
53297e62eb Fixed warning about redefining the __SSE__ macro in VS2013 2014-11-05 21:55:17 +05:00
3361be9b6b Fix T42255: "Copy Constraints" operator has to tag the affected object
and pose for depsgraph.

Otherwise the update order can be incorrect until the next sort is
executed.
2014-11-05 14:53:17 +01:00
67ec0ef277 Editmesh: report a warning when fill fails
also prevent assert with zero normal
2014-11-05 14:21:18 +01:00
2f87db681a Debug: print output on --debug-fpe
in practice often we want to breakpoint here (instead of flooding output)
but its confusing the option does nothing in release builds.

Devs can comment out locally.
2014-11-05 13:30:24 +01:00
3f68a0aea5 Simplify node frame detach operators, based on T34670 by @julien.
* The `NODE_OT_parent_clear` operator has been removed. This was a very
simplistic operator that detached every selected node, which is not very
useful in case of hierarchical frames. The `NODE_OT_detach` operator
only detaches the top parent nodes in the selection, keeping the
hierarchy of selected nodes intact.

* The `ALT+P` shortcut has been reassigned to the `NODE_OT_detach`
operator which replaces the previous `NODE_OT_clear` mapping with
similar behavior (also gives a menu entry shortcut now).

* Shortcuts for `NODE_OT_detach_translate_attach` have been removed, due
to crowded and messy keymap and unintuitive shortcut `ALT+F`. This macro
operator is still registered, in case hardcore users want to make their
own keymaps, but not mapped by default. Node keymaps may need some
redesign in the future for these things.
2014-11-05 11:44:53 +01:00
035026f48a Code cleanup: Replace magic number with verbose name for math node operations
Should be no functional changes, just much less cryptic code.
2014-11-05 11:36:50 +01:00
1073c6ae8e Cycles: Don't check shader for volume when checking if camera is inside volume
Intersection code already ignores objects without volume closure so checking it
afterwards is not needed.
2014-11-04 19:57:15 +01:00
4a9b912b96 Fix T42411: Camera inside volume + particle dupli (object/group) doesn't work
The issue was caused by missing current object instance initialization after
object was ignored for instance push.
2014-11-04 19:55:05 +01:00
6566013c91 BMesh dissolve: enable use_verts for edge dissolve (by default) 2014-11-04 17:06:59 +01:00
04c0a46570 Fix T42408: FSAA affects Cycles Image Compositing
Use FSAA settings only if current render engine is BI or GE/

That's for until we'll support FSAA in Cycles or other render engines.
2014-11-04 20:41:12 +05:00
4a0ff5cb2d Fix T42289: 'Make single user' not registered in history 2014-11-04 18:53:00 +05:00
a59fab461c Fix-for-fix ik-spline clamp existing files too 2014-11-04 14:09:38 +01:00
176f0102ea Fix T42445: Clamp flag has no effect on result value in Math and MixRGB shader nodes (Blender Render)
Quite striaghtforward implementation, with the only weird thing that for some reason
my video driver wasn't happy with calling the function "clamp" giving some weirdo
shader compilation error messages.

Called the GPU function clamp_val which can handle float and vec3.
2014-11-04 16:55:40 +05:00
988b3d7188 Add utility macros to clamp all elements of 2,3,4 component vectors 2014-11-04 16:31:42 +05:00
1179ce6f11 Code cleanup: Replace magic constants with defines
From quich search didn't see where the flags are used apart from
RNA currently, but i might have missed something.
2014-11-04 16:28:16 +05:00
ffbd9448c8 Cycles: Remove compatibility code for OSL-1.4
That code was mainly needed for the transition period, now we've
got all platforms updated to new OSL.

Plus there are some crucial fixes baking in the current upstream
sources which we'll need to have for the next Blender release.
2014-11-04 16:19:45 +05:00
d5f978b3cc Cycles: Be ready for new OIIO and OSL libraries
Even tho it's not 100% clear when we'll switch to OSL-1.6 we'd better
start preparing earlier for this, so we don't spend time on this later.

Plus this code helps troubleshooting some OSL issues, which requires
testing with latest versions of OSL.
2014-11-04 16:19:45 +05:00
d5974eb026 Cleanup for previous own commit (sorry...) 2014-11-04 10:31:59 +01:00
3ce594226e Add missing CustomData_duplicate_referenced_layer_n and deduplicate code.
CustomData_duplicate_referenced_layer_n not used in master currently, but need it
in mesh tranfer branch.
2014-11-04 10:06:08 +01:00
cb5ec7f743 Fix use-after free (own error) 2014-11-04 09:48:41 +01:00
40f32f406b CMake: Attempted to copy manual for py-module 2014-11-04 09:37:01 +01:00
5e0e175422 Cleanup: spelling (D831) 2014-11-03 23:28:16 +01:00
db5493ec7a Fix T42233: Python property ignores 'PROPORTIONAL' 2014-11-03 20:59:14 +01:00
e43b74d87a Optimization of parallel range
It now supports different scheduling schemas: dynamic and static.
Static one is the default and it splits work into equal number of
range iterations.

Dynamic one allocates chunks of 32 iterations which then being
dynamically send to a thread which is currently idling.

This gives slightly better performance. Still some tricks are
possible to have. For example we can use some smarter static scheduling
when one thread might steal tasks from another threads when it runs
out of work to be done.

Also removed unneeded spin lock in the mesh deform evaluation,
on the first glance it seemed to be a reduction involved here but
int fact threads are just adding value to the original vertex
coordinates. No write access to the same element of  vertexCos
happens from separate threads.
2014-11-03 22:44:29 +05:00
4b3f1b7540 Cleanup: remove rarely used IDProp iterator 2014-11-03 17:06:14 +01:00
f7e220edbd Cleanup: defines -> enums, bitshifts for bitflags definitions. 2014-11-03 16:48:06 +01:00
355b70c360 Fix indetation in last commit 2014-11-03 15:06:46 +01:00
9e4229e0ad OSX/fsmenu: fix compiling on older gcc reported by Mike S 2014-11-03 15:05:48 +01:00
8b5d86dfba Compilation error fix for buildbot
Ghost depends on glew-mx, so glew-mx should be passed to linker after the ghost.

We're also using spaces for indentation in python, including scons rules.
2014-11-03 15:24:53 +05:00
d57ce42dfa BMesh: arg reorder 2014-11-03 08:30:54 +01:00
c14d34322b Fix typo breaking compilation with SSE2.
Spotted by sybrenstuvel (Sybren Stüvel), thanks!
2014-11-02 23:01:09 +01:00
b7174c9320 Fix connect-vertices failing for concave ngons
Also add:
- generic callback for bmesh elements.
- ability to pass an existing array to a bmesh operator.
2014-11-02 00:09:14 +01:00
e8b8ee7d28 OpenGL: double width lines is no-longer apple-only 2014-11-01 23:32:02 +01:00
5b93c6e6f3 Fix for 3D Ruler crash maximizing view 2014-11-01 23:32:02 +01:00
d658ea1b20 Cleanup: style 2014-11-01 23:32:02 +01:00
31a83ee9f1 Cleanup: mostly use bools for booleans. 2014-11-01 22:25:57 +01:00
9b8be0bc0c Cleanup/fix from latest coverity report.
Mostly harmless things, though the 'multires' error was a real bug.
2014-11-01 16:36:11 +01:00
cbf2fab9ea Cycles: Remove redundant alloc/free
Seems like a copy paste error.
2014-11-01 15:23:14 +01:00
aa91a36864 Libmv: Code cleanup, avoid C11 feature with structure re-definition 2014-11-01 03:18:40 +05:00
bf13f1a263 Cycles: Code cleanup, proper class vs. struct declaration 2014-11-01 03:09:46 +05:00
26e440838f Libmv: Code cleanup, mixed class/struct in declaration/definition 2014-11-01 02:57:05 +05:00
29c71b2c09 Cleanup: Remove unused light function. 2014-10-31 22:54:05 +01:00
23b7f351aa Optimize vertex parent for edit mode without modifiers
No need to run lookup on the origindex in this case at all.
2014-10-31 20:15:32 +01:00
c7222a234d Optimize vertex parent in cases there are only deform and SS modifiers
In cases when the subsurf modifier is the last in the stack and there
are only deformation modifiers before it we can skip doing full orig
vertex lookup.

This is rather common situation here in animatic.
2014-10-31 20:06:19 +01:00
3248be1fbf SCons: Expose missing command line arguments controlling GLEW 2014-10-31 22:51:59 +05:00
95687f9751 Fix T42349: Windows Render command line Cycles Crash
The issue was caused by GLEW MX enabled in SCons by default so
basically previous commit already fixed the crash. But we need
to be safe here.

For now the fix is simple and not that clean, just check if
there's an OpenGL context available and if not we don't do any
GLSL magic.

This is to be cleaned up after some discussion with the viewport
project guys.
2014-10-31 22:51:49 +05:00
778afc8082 Disable GLEW_MX in scons
This was already disabled in CMake and we need to keep build systems
in 100% synchronized state.

P.S. Would it be a real fix to drop SCons?
2014-10-31 22:51:44 +05:00
1070680a4b Followup to rB154af70f2b5b7b: always 'pack in' ongoing versionning code when bumping version. 2014-10-31 18:26:58 +01:00
a8ea35da05 Themes auto-update from py script. 2014-10-31 18:16:28 +01:00
72454fafb0 Fix T42454: Themes: Some colors were missed somehow in an update two years ago.
Had to fix it by hand (restting them to default values), theme maintainers,
please check your theme from time to time and track such ugly 'pitch black' fields.

And we devs should run theme update script much more often too - will do in next commit!
2014-10-31 18:16:28 +01:00
julianeisel
154af70f2b Fix T42432: Correct BLENDER_SUBVERSION
Bump up BLENDER_SUBVERSION to 2 to allow saving of widget emboss.
2014-10-31 17:54:18 +01:00
d4fde32b12 Cleanup: naming 2014-10-31 16:30:39 +01:00
23e14259d2 Code cleanup: synchronize const qualifiers between declaration and definition 2014-10-31 16:17:02 +01:00
2204687cbb Code cleanup: Remove unused variable 2014-10-31 16:13:13 +01:00
5d502264da Compositor: Don't let HSV correction to output negative colors 2014-10-31 14:58:00 +01:00
f9688d88ff Fix T42391: HSV correction shader node gives negative values
This mainly happens when over-saturating already saturated color.
After some discussion with Campbell and loads of tests we decided
to clamp the result RGB color. As an alternative we might want to
clamp corrected HSV values instead, but that would lead to some
larger changes in the render results.

TODO: The same is to be done for compositor nodes.
2014-10-31 14:58:00 +01:00
a6a3989617 Texture Paint Add Simple UVs:
Add simple uvs now does a cube unwrap and pack operation. Result is not
optimal by far but it should not result in crashes and it will be quite
usable for simple cases.
2014-10-31 14:37:55 +01:00
46c11c7b7d Fix T42277: Apply track's mask on displaying preview not working 2014-10-31 12:59:55 +01:00
7bb910cd4e Fix T42344: EWA filter produces blured results
Derivatives variable names are swapped in the old EWA filter code,
need to adjust for that.

TODO: Make naming fore clear in there.
2014-10-31 12:35:20 +01:00
fcc2ca0089 Fix T42401: Gaussian blur node is visibly squared-off at larger sizes
The root of the issue comes to the way how we sample the gaussian filter in
RE_filter_value(). We need to scale x to -3*sigma..3*sigma segment in order
to get the whole bell.

The old code tried to do it, but failed dramatically, plus it used some weird
gaussian sampling formula. Replaced it with much more clear one, which gives
proper blur now.

There's no visible different in AA sampling in BI render tho.

Other filters like Mitchell still tends to give wrong square shaped blurs,
but they're much more difficult to resolve because they're just wrong in
the code -- for some reason smaller kernel size means more blur. Let's solve
this later.
2014-10-31 12:19:12 +01:00
b154aa8c06 Fix T42447: Shrinkwrap constraint: mismatch in handling sclaing in projection case.
Constraint space conversion ignores object scale, which is OK in most cases. But here,
we are converting a normal from world to local space, and when later converting it
into target space to actually do the BVH raycast, we use TransformSpace which
does applies objects' scaling to normals, as expected.

Best solution here is to also take object's scale into account when converting
from local to world space.
2014-10-31 11:12:16 +01:00
5e6d878318 Revert "Scons/funstuff: notify when the binaries are compiled"
This reverts commit cdf5370159.

Please always keep build-systems simple, boring & functional,
anyone who liked notification popups can write a simple build script.
2014-10-31 10:41:12 +01:00
Dalai Felinto
625843d84d View3d - walk: expose gravity toggle to keymap 2014-10-30 22:16:43 -02:00
be7b943cd2 Cleanup: use function to calc shell thickness 2014-10-30 22:31:03 +01:00
e414853e18 Remove leftover error prints. 2014-10-30 21:48:44 +01:00
37807d93bd Fix T42431 lagging on texture painting.
Issue here is that seam outset was being calculated wrong and as a
result we filled too many unneeded pixels. Code can be improved here by
clamping perhaps but left it as is for now. Thanks to Campbell for the
help resolving this!
2014-10-30 21:47:40 +01:00
f312f890f1 Libmv: Support disabled color channels in tracking settings
This was never ported to a new tracking pipeline and now it's done using
FrameAccessor::Transform routines. Quite striaghtforward, but i've changed
order of grayscale conversion in blender side with call of transform callback.

This way it's much easier to perform rescaling in libmv side.
2014-10-30 23:29:53 +05:00
606329d0f8 Libmv: Replace region tracker with autotracker in Blender
The title actually tells it all, this commit switches Blender to use the new
autotrack API from Libmv.

From the user point of view it means that prediction model is now used when
tracking which gives really nice results.

All the other changes are not really visible for users, those are just frame
accessors, caches and so for the new API.
2014-10-30 23:12:19 +05:00
7013d55580 Libmv: Add autotrack API to the C-API
Pretty much straightforward changes, nothing to be mentioned specially.
2014-10-30 23:07:46 +05:00
b15a056230 Libmv: Initial commit of unfinished AutoTrack API
This starts the creating the new AutoTrack API. The new API will
make it possible for libmv to do full autotracking, including
predictive tracking and also support multiple motion models (3D
planes etc).

The first goal (not in this patch) is to convert Blender to use
the new API without adding any new functionality.

This API currently contanins:

- Frame accessor to access frames which are stored in Blender side.
- New Tracks implementation
- New Reconstruction implementation

Currently this API only tested on doing the same frame-to-frame
tracking as the old API allowed to do. But it also supports now
predictive tracking which is based on the Kalman filter.
2014-10-30 23:03:34 +05:00
47faf618a6 Fix project-file generators (didn't close files) 2014-10-30 18:26:54 +01:00
a634bcbdb4 Add a few more warnings so coders hopefully will take note that event
codes get stored in keymaps and should not be changed
2014-10-30 16:17:31 +01:00
af9da0be43 Complementary fix for rB8054372: Follow the common naming scheme by
using negate_mat3_m4 instead of negate_m4.

This avoids changing the behavior and only flips the 3x3 part of the
matrix.
2014-10-30 15:31:18 +01:00
f07cd77b48 Fix issue in fullscreen patch.
Don't change old event codes! Keymap diffing depends on those being the
same across versions to work.
2014-10-30 15:26:31 +01:00
be63ba315f Math Lib: pseudoinverse_m4_m4 changed input matrix 2014-10-30 14:49:57 +01:00
d8094b62e2 Transform: snapping: normal-align: Cleanup!
Use BLI's `rotation_between_vecs_to_mat3` helper instead of own custom code,
both simplifies the code and fixes wrong handling when snapped normal was exactly
opposed to org one (i.e. 180° rot case).
2014-10-30 12:56:43 +01:00
c2dc51d827 Math Lib: add transpose_m3_m3, m3_m4, m4_m4 2014-10-30 12:15:14 +01:00
4ff8744669 Cycles / CUDA: Better fix for missing sm_52 kernel, in case user compiles himself. 2014-10-30 11:42:59 +01:00
d5ed153760 Cycles / OSL: Support microfacet() closure color function from OSL 1.5
This is basically just a wrapper class, which maps the generic call from the OSL spec to our closures.

Example usage:

shader microfacet_osl(
    color Color = color(0.8),
    int Distribution = 0,
    normal Normal = N,
    vector Tangent = normalize(dPdu),
    float RoughnessU = 0.0,
    float RoughnessV = 0.0,
    float IOR = 1.4,
    int Refract = 0,
    output closure color BSDF = 0)
{
    if (Distribution == 0)
        BSDF = Color * microfacet("ggx", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
    else
        BSDF = Color * microfacet("beckmann", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
}
2014-10-30 11:33:27 +01:00
0414ed1c48 Fix for mat3_to_rot_size modifying input matrix 2014-10-30 10:37:55 +01:00
8054372d22 Fix negate_m3 (taking 4x4 matrix)
Cycles bake used incorrectly.
2014-10-30 10:29:37 +01:00
Martijn Berger
4b33667b93 Deduplicate some code by using a function pointer to the real kernel
This has no performance impact what so ever and is already used in the adaptive sampling patch
2014-10-30 10:23:44 +01:00
88cc1a786b Fix T42444: Neg scale rotated object flips 2x axis
This is a very old bug and a few attempts have been made to fix it before,
Old code was checking worldspace axis flipping, instead of axis flipping WRT the axis-alignment of the object.
2014-10-30 10:18:22 +01:00
3ea11c1ac8 Fix T42441: Smoke doesn't render in 3DView if domain object's maximum draw type is set to "wire"
Added an exception in convertblender.c's is_object_hidden(), so that an object with active
smoke modifier is never considered hidden.
2014-10-30 09:34:17 +01:00
julianeisel
beaed66f29 UI: Fix tooltip text color not resetting correctly
The "Reset to Default Theme" operator didn't reset the tooltip text color correctly.
2014-10-30 01:50:48 +01:00
2f26683cdd UI: let multi-num-drag change different ID values
Handy for property-chart addon.
2014-10-29 23:15:42 +01:00
5802d4531d Fix T42395: Stored "render data" in particles mismatches the particle
amount and crashes after Cycles render.

This is a hack to fix this, but at this point the system is hopelessly
broken anyway and no good fix other than total rewriting is possible.
2014-10-29 18:48:44 +01:00
26b5fb8f58 Correct stub 2014-10-29 17:27:32 +01:00
f7dedbc3ce Fix T42294: Bullet rigidbody point cache reading was using uninitialized
key values for velocity.
2014-10-29 15:01:19 +01:00
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
5c633d3ba0 Fix for Ctrl+Del/Backspace not setting text dirty 2014-10-29 13:52:06 +01:00
279cfdeef5 Fix T42394: Copy Rigid Body Tools would not work as expected if dest ob had no rigidbody yet.
Adding new object to RigidBodyWorld obgroup is not a good way to do that, since it only
takes effect (create rigid_body for new objects) when you change current frame.

Better to use rigidbody.object_add() operator here!
2014-10-29 13:11:10 +01:00
a6c2d02366 Fix T42389: Removed outdated comment from custom_nodes.py example script.
There was some confusion about the bl_icon attribute being optional. In
fact the functionality for hiding a tree type in the editor header is
now controlled by writing a poll function for the tree type instead,
which is more flexible and clean.

http://www.blender.org/documentation/blender_python_api_2_71_6/bpy.types.NodeTree.html#bpy.types.NodeTree.poll
2014-10-29 13:05:21 +01:00
6a4a911fc3 Cycles: Optimize math node without links to a single value node
Pretty straightforward implementation. Just needed to move some functions
around to make them available at shader compile time.
2014-10-29 16:31:13 +05:00
db4d7004d8 Cycles: Add a soft min/max UI value for volume step size, usually a range from 0.01 to 1.0 is fine. 2014-10-29 12:16:38 +01:00
d73e3f71d4 Revert "Fix T42222"
This reverts commit 507712db3f.

Error was quite an old compiler, which had further warnings/errors.

Old compilers can just have this defined in BLI_math
2014-10-29 11:11:51 +01:00
6d1c0260bb Cleanup: Style fixes for closures, mainly bitflags and conditions. 2014-10-29 09:56:21 +01:00
13ca9873c9 Cleanup: Remove unused function in Translucent BSDF. 2014-10-29 09:42:19 +01:00
485293647f Player: fix conflicting type introduced in 2f0bdcb306 2014-10-28 21:39:54 +01:00
8dbce41706 OSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold 2014-10-28 20:44:05 +01:00
0151af5054 Markers: optimize drawing
- avoid 2x glScalef per marker
- skip markers outside the view
- merge drawing into a single loop
2014-10-28 20:04:46 +01:00
8ba33a69c8 Cleanup: rename draw_markers_time -> ED_markers_draw 2014-10-28 19:03:13 +01:00
36da579d12 Markers: show the area that handles marker events 2014-10-28 18:51:28 +01:00
b2b1d8e290 Cleanup: remove redundant 'object' parent class 2014-10-28 18:42:06 +01:00
2c35bcb356 Cleanup: use SELECT flag 2014-10-28 18:39:43 +01:00
2f0bdcb306 Fix T41041: 'Delete keyframe' removes markers too
Operators that trigger UI events (but nothing else)
were using 'CANCELLED' making it impossible to tell if an invoke
function failed, or opened a menu.
2014-10-28 17:51:43 +01:00
ba76f0c6a2 Lattice: add-object radius should never scale data
own error, lattice assumes rest state is unscaled data,
scaling needs to be done in object mode.
2014-10-28 15:55:35 +01:00
ee4fb23361 WM: clear operator memory on file load
Was causing problems when opening scenes with different scale set.
2014-10-28 15:47:51 +01:00
cb7afe5e41 WM: unneeded alloc the operator-type iterator 2014-10-28 15:41:05 +01:00
bfa24aa945 Keymap: PKey only runs BGE when engine is set 2014-10-28 13:34:11 +01:00
25b7455eea Cleanup: de-duplicate engine-id's 2014-10-28 12:49:04 +01:00
cefe137e91 Remove redundant BLI_exists call 2014-10-28 11:33:05 +01:00
785b90d7ef BMesh Py API: Fast index lookups for vert/edge/faces
This changes the Py API to use array lookup table.
Previously this could be very slow since it would loop over all elements.

Now the python script is responsible for creating the internal lookup table (as with C code).

This will break some scripts.
2014-10-28 10:03:54 +01:00
6c2ce7a382 Add Theme Option for UI Emboss
This adds a theme option for the embossing of UI widgets. By doing this users have much greater flexibility for creating nice themes. Previously many themes (particularly dark ones) looked quite bad due to the very obvious emboss. This made simpler, flat-style themes very challenging.

Closes T42228

Reviewed by @campbellbarton
2014-10-27 18:14:00 +01:00
9a98fad2e0 Fix assert's, remove uiEndBlock calls 2014-10-27 15:40:04 +01:00
9c9b145dab Fix T42393 crash in texture paint sampling in image mode when mesh did
not have a material
2014-10-27 10:42:59 +01:00
e5c13aebea Fix T42372: demo addon in doc was not handling keymaps correctly during (un)registration.
First, you should unregister in reverse order you registered your operators, keymaps, etc.
Second, when registering keymaps you have to check keyconfigs are actually available (they are not in background mode).
2014-10-26 10:01:03 +01:00
c8d10d115c OSX/CLEW: silence hundreds of warnings: 'weak_import' attribute only applies to variables and functions 2014-10-24 14:25:02 +02:00
cdf5370159 Scons/funstuff: notify when the binaries are compiled 2014-10-23 19:19:02 +02:00
179ad7dcba Terminology Trim -> Slip tool. It's how it's mostly called in other
software.
2014-10-23 16:48:46 +02:00
f651a470bf Fix T42367: Spline-ik offset evaluating curve 2014-10-23 16:33:28 +02:00
557d4370d9 Spline IK: use malloc, arrays are filled instantly 2014-10-23 16:33:25 +02:00
a3e3ac03ff Fix T42351: Freestyle will not render edges selected by Edge Type: Material Boundary, if the materials are different, but look identical. 2014-10-23 22:01:45 +09:00
f0d475d3de OSX/GHOST: more little cleanups 2014-10-23 14:40:56 +02:00
abf7bd8d98 OSX/GHOST: some cleanups 2014-10-23 14:34:56 +02:00
b6dc15278c OSX: move notification into its own function 2014-10-23 14:20:16 +02:00
dbea73a30f Fix T42354 modal transform map not cycling through local/global
orientation properly

Patch by Phillip Oeser, thanks!
2014-10-23 14:16:36 +02:00
3b7794dab7 Fix T42330 game engine does not allow texture slots generation. 2014-10-23 13:39:45 +02:00
eaaeae4699 Cleanup: spelling 2014-10-23 10:38:38 +02:00
88fe896243 Checked each of my (jwilkins) XXX notes.
The ones in extern/glew-es have been changed to NOTE instead of XXX

GHOST_ContextEGL.cpp: It really does seem that it is not possible to query the swap interval using EGL

GHOST_WidnowCocoa.h: The comment referring to Carbon is clearly out of date, so I removed it.

math_geom.c: The node about not using tmax again is correct, but the code is kept for a future maintainer who will need to know how to compute it if they modify that code.

paint_image_proj.c (2698): The question about integer truncation does not appear to have been resolved.  It still seems to be an incorrectly implementation of rounding (I'd suggest using the round function instead of this hack).
2014-10-22 20:03:25 -05:00
db8e6311f8 Fix T42352.
Add Recalcuate Normals to the Faces menu, next to other shading options.

Differential revision: https://developer.blender.org/D841
Signed-off-by: Thomas Dinges
2014-10-22 23:27:34 +02:00
2e0426bbb1 Usual UI messages fixes. 2014-10-22 22:26:45 +02:00
459c5d2045 OSX: as we cannot be sure to have ARC, better release allocated notification 2014-10-22 20:17:04 +02:00
dfc0afb5b8 OSX/GHOST: use notifications to inform user about a progress reached 100%
The occurance can be controlled in NotificationCenter, todo: move to own function ?
2014-10-22 19:59:16 +02:00
553ec988e7 Revert "Cycles: Implement Mitchell-Netravali pixel filter"
As it appears we can't really use mitchell filter together with the
current filter importance sampling,

This reverts commit 7429113143.
2014-10-22 22:55:09 +06:00
7429113143 Cycles: Implement Mitchell-Netravali pixel filter
It's the same filter which is used by default by Blender Internal renderer
and it gives crispier edges than gaussian filter.

Default filter for Cycles is unchanged because it's unclear if new filter
gives more noise or not. After some further real production tests we can
consider making Mitchell filter default for Cycles as well.
2014-10-22 18:11:40 +02:00
e2c04a8bf0 Cycles: Code cleanup -- use bitshifts instead of hardcoded constants
This way it's easier to extend bitfields and see when we start running
out of free bits.

Plus added brief description of what SD_VOLUME_CUBIC flag means.
2014-10-22 20:51:40 +06:00
1be189f000 Cycles: Get rid of hardcoded enum values in the code
Still need to keep enum definition in sync with the python code,
but the code itself is a bit more clear to understand now.
2014-10-22 16:17:03 +02:00
d2d1b19170 Cycles: Expose volume voxel data interpolation to the interface
It is per-material setting which could be found under the Volume settings
in the material and world context buttons.

There could still be some code-wise improvements, like using variable-size
macro for interp3d instead of having interp3d_ex to which you can pass the
interpolation method.
2014-10-22 19:53:06 +06:00
c24698a37e Cycles: Implement tricubic b-spline interpolation for CPU texture_image
This is the first step towards supporting cubic interpolation for voxel
data (such as smoke and fire). It is not epxosed to the interface at all
yet, this is to be done soon after this change.
2014-10-22 19:41:58 +06:00
ba7e504448 Meshdeform: Use SSE intrinsics in meshdeform_dynamic_bind()
Quite straightforward change, don't think some extra explanation is needed.

This gives about 15% speedup of the modifier evaluation on my laptop.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D836
2014-10-22 12:21:11 +02:00
dfc4de036e Meshdeform modifier: Use threaded evaluation
This commit switches meshdeform modifier to use threads to evaluate
the vertices positions using the central task scheduler.

SO now we've got an utility function to help splitting the for loop
into tasks using BLI_task module which is pretty straightforward to
use: it gets range (which is an integer lower and higher bounds) and
the function and userdata to be invoked for each of the iterations.

The only weak point for now is the passing the data to the callback,
this isn't so trivial to improve in pure C.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D838
2014-10-22 12:20:41 +02:00
74f40a5217 OSX: fix T42325 by not letting .vob handled by qt, avoids a doublefree 2014-10-22 12:00:07 +02:00
86dbc9dd9a Cleanup: avoid loop-in-loop when mirror isn't used
Also name 'children' is normally used for a list
2014-10-22 11:54:27 +02:00
769c0bee9f Fix T42334: x-mirror fails in armature with a partially mirrored chain.
When resetting edit bones on cancel, they also have to reset connected
parent and child bone tips and heads respectively, since these can be
modified during the transform.
2014-10-22 11:11:52 +02:00
33f388d7bf Cleanup: style 2014-10-21 20:14:26 +02:00
c8a62319cf Linux/scons: fix compile, BF_BOOST_LIB_STATIC string was miising a space 2014-10-21 18:47:52 +02:00
21836250c0 Fix T42260: By repeatedly joining meshes, you could end up with thousands of UVLayers
This is only an indirect fix, in fact: this commit adds a public API to check
the maximum number of a given layer type (`CustomData_layertype_layers_max()`),
and uses it to forbid too much layer creation in `CustomData_merge()`.

This only affects UVs/VCol data though, but merge behavior in itself is not a bug
actually, how user managed to get thousands of different UV layer names remain
rather mysterious...
2014-10-21 17:06:42 +02:00
b770964558 Fix T42278: Grease Pencil in Movie Clip Editor can not be erased in Track > Cursor mode
Eraser was not aware of possible transform matrix for the strokes.
2014-10-21 16:10:26 +02:00
9ce8dfaf6a Fix T42324: Curve deform modifier from mesh edge doesnt work properly
Curve parent requires valid path to exist for curve. If the path is disabled in
the curve settings, displist evaluation will check the dependency graph whether
the path is needed for parenting.

The issue was that changing relations in the scene chagned need of the curve path
but nothing tagged the curve to update it's path.

For now use direct call of DAG_id_tag_update from set_parent(). In the bright
future we might detect such a need in flush automatically in the depsgraph.
2014-10-21 19:16:29 +06:00
64dc1fd408 Simplify GLSL in bump mapping, use gl_NormalMatrix where appropriate.
tangents are directions and should be transformed like directions.
2014-10-21 15:00:29 +02:00
bae0f904ee Fix T42257: Curve vertex parent not working with animation
Vertex parent was using original non-modified nurbs list, simply because
it didn't have something else to operate with.

Now we've got deformed by pre-tessellation modifiers nurbs in the curve
cache which might be used y the vertex parent.
2014-10-21 14:44:08 +02:00
5e2f3c0102 Fix T42178: Cycles Film Exposure not triggering Viewport update 2014-10-21 14:08:28 +02:00
282315d991 ListBase: use BLI_listbase_ for new api calls 2014-10-21 14:06:16 +02:00
b80345db0b Fix tgz script, addons_contrib was in release 2014-10-21 13:58:13 +02:00
00ff9da2ee ShapeKeys: rework 'move skey' code, and add options to move to first/last position.
Main moving logic is moved to new `BKE_keyblock_move()`, which makes it available from anywhere.
In addition, move code was reworked so that it only loops once on whole keyblocks list,
and it accepts arbitrary org and dest indices, not only neighbor ones.

Partly based on work by revzin (Grigory Revzin) in his soc-2014-shapekey GSoC branch, thanks!
2014-10-21 12:07:24 +02:00
be4b2e42c6 BLI_listbase: add BLI_swaplinks which swaps given links' positions in given list.
Can be much simpler and quicker than using remlink/insert functions.
2014-10-21 12:07:24 +02:00
62ceada48f UI Icons: add 'triangle-bar' left/right/up/down icons. 2014-10-21 12:07:23 +02:00
40938c3b4b Fix sequencer clipboard with meta's containing ID references 2014-10-21 11:36:11 +02:00
2e7d72202f Fix sequencer duplicate with only handle selected 2014-10-21 11:13:32 +02:00
80b44133fc Fix T42326 trim operator not cancelled by the escape key. 2014-10-21 11:03:59 +02:00
560dd932c2 Don't change global compiler flags when FFmpeg is enabled
It should no be longer needed. If it causes the issues please let me know
to find a more cleaner solution.
2014-10-21 03:22:05 +06:00
abb266973d Fix T42311, too many paint slots added.
Don't allow the add paint slot operator to redo. Also guard better against
excessive slot addition
2014-10-20 20:14:44 +02:00
50cb62a3a0 Trim tool:
Effects strips in metastrips could be erratic.
2014-10-20 18:51:46 +02:00
3ef4b3e35c Better fix for previous trim fix. 2014-10-20 18:29:33 +02:00
6bd53bb707 Fix T42313: Ruler always measures 0.0
Passing 'ar' to snapObjectsRayEx would apply a ray-offset.
2014-10-20 17:42:49 +02:00
5362995fde Fix trim tools metastrip borders not getting updated correctly. 2014-10-20 17:37:13 +02:00
f95241eb3e Merge trim tool from terrible_consequencer
The trim tool (T key) allows users to change the position of the
contents of a strip without moving the strip itself.
2014-10-20 15:40:18 +02:00
5223214199 Optimization for mesh deform: use BLI_INLINE specifiers
This helps compiler to do detect stuff which might be inlined,
gives around 30% speedup on my laptop with test files from ZanQdo.
2014-10-20 17:04:46 +06:00
d968a1ebb0 Fix T42189
Own mistake - not copying enough data.
2014-10-20 12:35:49 +02:00
3138d39047 Fix T42264: Negative scale & clipped-select fails
Thanks to mont29 for finding the cause.
2014-10-20 11:17:36 +02:00
04178d7fe4 Fix T42304: blender 2.72a 3D view object selected color wrong in 2.4x theme.
I would not have endured such a critical and monstruous bug one more femtosecond!

And even worse - active color was awfully wrong too! Shocking!
2014-10-19 20:55:38 +02:00
308c4fc234 Fix T42303 Icons lost after loading window
The issue here is that if no matching winid is found, we destroy all
windows and their context with them. This will also delete the OpenGL
textures associated with the initial context, thus we lose the icons.
This patch makes sure a window is always kept for later so the initial
context does not get lost.

Thanks to Campbell and Ton for the discussion on the issue.
2014-10-19 20:50:57 +02:00
984836781e Fix typo in calculateCenterMedian that could give computed median point wrong values.
From soc-2014-shapekey branch, with minor edits by mont29 (Bastien Montagne).
2014-10-19 20:15:03 +02:00
4dd5b635e8 Revert "Freestyle: Built-in SVG exporter."
This reverts commit 61a330baca.

This completes reverting D785

This feature is to be reworked into an addon.
2014-10-19 19:10:32 +02:00
4c86271bd9 Revert "Fix for rB61a330baca0f: Changed SVG file encoding from UTF-16 to UTF-8."
This reverts commit 490f2aeb82.
2014-10-19 19:09:58 +02:00
2103cf9355 Revert "Freestyle: rename module to export_svg"
This reverts commit db249b787f.
2014-10-19 19:09:49 +02:00
b495395ee5 Revert "Freestyle: add GPL headers"
This reverts commit 3cbb066b83.
2014-10-19 19:09:41 +02:00
a9fdb70162 Revert "Cleanup: pep8"
This reverts commit 06cdc35a68.
2014-10-19 19:09:33 +02:00
0f1c959b05 Revert "Cleanup: unused import"
This reverts commit fc7752b53c.
2014-10-19 19:09:26 +02:00
dd2525c362 Revert "Freestyle: lazy load 'export_svg'"
This reverts commit c35a649a0a.
2014-10-19 19:09:18 +02:00
923423e4cd Reports: include parent library in readfile report
Helps troubleshooting indirect links.
2014-10-19 12:49:01 +02:00
c35a649a0a Freestyle: lazy load 'export_svg'
Loading XML module, registering etree namespaces... etc
on startup for everyone on chance someone may want to export
an SVG from Freestyle is unacceptable.

This shouldn't have got through the review.

also disable loading when built without freestyle.
2014-10-18 17:49:06 +02:00
fc7752b53c Cleanup: unused import 2014-10-18 17:32:05 +02:00
06cdc35a68 Cleanup: pep8 2014-10-18 17:30:46 +02:00
3cbb066b83 Freestyle: add GPL headers 2014-10-18 17:28:24 +02:00
db249b787f Freestyle: rename module to export_svg
Convention for existing export modules
2014-10-18 17:25:55 +02:00
490f2aeb82 Fix for rB61a330baca0f: Changed SVG file encoding from UTF-16 to UTF-8. 2014-10-18 23:42:16 +09:00
3a961d66ef Fix T42281, crash in subsurf with texture painting. 2014-10-18 13:18:04 +02:00
61a330baca Freestyle: Built-in SVG exporter.
Features:
* Both still image and animation rendering, as well as polygon
  fills are supported.
* The exporter creates a new SVG layer for every Freestyle line
  set. The different layers are correctly sorted.
* SVG paths use data from line styles, so the base color of a
  line style becomes the color of paths, idem for dashes and
  stroke thickness.
* Strokes can be split at invisible parts.  This functionality is
  useful when exporting for instance dashed lines or line styles
  with a Blue Print shader
* The exporter can be used not only in the Parameter Editor mode,
  but also from within style modules written for the Python
  Scripting mode.

Acknowledgements:
The author would like to thank Francesco Fantoni and Jarno
Leppänen for their [[ https://github.com/hvfrancesco/freestylesvg | Freestyle SVG exporter ]].

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

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-10-18 18:35:29 +09:00
4b42c4bce4 OSX/PLAYER/cmake: fix player install python bundling, overlloked player has its own PLAYER_TARGETDIR_VER 2014-10-17 22:16:59 +02:00
d74e3c44cc Fix for align bone to cursor (missing normalize) 2014-10-17 22:11:41 +02:00
09351c68e1 Cleanup, since we don't put Cycles compat into regular bl_ui files. ;) 2014-10-17 21:07:21 +02:00
Dalai Felinto
7fb68cf83f Fix python module (bpy) compilation - broken since 8d084e8c
(reported on bf-python mailing-list and in my github (!), let's hope in
the future we get more reports in developer.blender.org instead ;))
2014-10-17 12:00:54 -03:00
ded2d8a777 Fix for pose bones not restoring selection index properly 2014-10-17 16:48:42 +02:00
04fab84fd1 More fixes:
* Fill brush did not do proper srgb conversion for byte images (reported
by Sebastian Koenig, thanks!)
* Color sampling for palettes did not refresh the toolbar.
2014-10-17 14:25:50 +02:00
33bff4caef Fix issue reported by Sebastian Koenig on irc, Clone brush would paint
trash with float images.

Issue is uninitialized alpha in the clone brush + a clamping issue for
float images. There's still some 'swimming' and brightness issue here
but I have to do work for the weekly, will investigate further later.
2014-10-17 14:11:13 +02:00
c246499283 Fix typo 2014-10-17 12:37:50 +02:00
80a3f4fecf Cycles: Fix for possibly uninitialized variable
That's rather harmless in the master, just could cause some issues with the patches.
2014-10-17 10:57:19 +02:00
49d49d2c84 Small fix for own commit, added new theme color defines but forgot to
actually use them, thanks to Kevin Dietrich for noticing.
2014-10-17 10:20:10 +02:00
13e9c44ce5 UI: disable area emboss when it's maximized 2014-10-17 00:12:31 +02:00
887da1345c Sequencer: jump now takes end-points into account
Useful because it's effectively the start-point for any strip which is obscured.
2014-10-16 23:59:59 +02:00
b0ef008741 Different fix for T42262, we don't put Cycles compat into regular bl_ui files. 2014-10-16 23:27:38 +02:00
25d6479ffb Correct recent commit 2014-10-16 23:22:48 +02:00
c6c7b9e0f7 Cleanup: use SQUARED macro 2014-10-16 23:22:48 +02:00
b28aa182f3 Fix T42262: Ocean texture options cannot be edited while in Cycles 2014-10-16 23:02:23 +02:00
8f1e015d75 Revert "Minor typo".
This was supposed to be an experimental commit, shouldn't be in master at all, sorry for that

This reverts commit 0750e4c4c7.
2014-10-16 20:33:19 +02:00
ebad51fd0b Fix bad typo in undo code that invalidated all image caches on undo. 2014-10-16 20:07:44 +02:00
0750e4c4c7 Minor typo 2014-10-16 19:08:56 +02:00
d30abdf3ec Fix T42258: Drivers: dimensions.x is always invalid, but dimensions[0] works
'PROP_XYZ_LENGTH' subtype was missing from list of valid '.x/y/z/w' ones.
2014-10-16 16:30:52 +02:00
61d1477415 Fix T42256: Translation operator moves Child-Of constrained objects in wrong space when only using parent's rotation and parent is rotated.
Just do not use crazyspace correction with childof constraints in this case.

Note this is only a very partial fix (partial use of parent loc on some axes
is still broken in transform), a real fix would probably require a full rewrite
of constraints handling in transform code (a mere static correction matrix
just cannot work in all possible cases, we'd need a full dynamic correction system here).
Anyway, transform code as a whole is horrible. :/
2014-10-16 15:48:52 +02:00
bc411ec06e Cycles: Implement an area preserving parameterization sampling for area lamps
Replace old code for area lamps which was more like incorrect with more correct
one using the following paper as a reference:

  Carlos Urena et al.
  An Area-Preserving Parametrization for Spherical Rectangles.
  https://www.solidangle.com/research/egsr2013_spherical_rectangle.pdf

Implementation is straight from the paper, currently the rectangle constants are
calculated for each of the samples. Ideally we need to pre-calculate them.

Some comparison images are available there

  http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D823
2014-10-16 14:40:29 +02:00
507712db3f Fix T42222
Avoid using roundf function, since it's oly defined in C99
2014-10-16 12:04:41 +02:00
59b4ea5c69 Sequencer: draw metastrip range while editing 2014-10-16 12:02:12 +02:00
22eb748162 Sequencer: maintain start/end when exiting a meta
Old behavior of shuffling the meta made it hard to use metas
in a complex edit since you couldn't be sure if exiting a meta would move it in the stack.
2014-10-16 12:02:12 +02:00
6a8d0fd8de Fix T42247 rolling did not support the rotation value in the user
preferences.

After discussion with Campbell left the explicit angle property in for
use with NDOF devices.
2014-10-16 11:34:32 +02:00
acd7f50308 Fix T42160: CUDA error: ILLEGAL_ADDRESS in cuCtxSynchronize()
This is so-called GPU limitation boundary hit, told compiler to NOT include
volume bound function, otherwise some real weird things used to happen.

We actually might want to do the same for CPU, inlining everything is not
the way to get fastest code.
2014-10-15 16:25:04 +02:00
591dc63eb1 SCons: Fix compilation error with booleans disabled 2014-10-15 18:51:22 +06:00
63dc2e9b74 Futher tweaks to WITH_CPU_SSE option
Explicitly disable SSE kernels in Cycles when this option is used.
2014-10-15 18:45:09 +06:00
b6f0ad5d97 Disable color editing for bone group color sets unless custom colors is
selected.

The bone group colors are not actually used _unless_ when the set is
"custom colors". But they were still editable, which is very confusing.
2014-10-15 13:54:21 +02:00
2db117aa6c Buildbot: Correct folder for experimetnal builds 2014-10-15 16:16:56 +06:00
84eeff0348 Buildbot: Fix for branch detection from the file name 2014-10-15 16:07:19 +06:00
de54b031c6 Buildbot: Rename testbuild branch to experimental-build and put the builds to dedicated folder 2014-10-15 15:41:23 +06:00
5a6f9fd84d Fix T42239, missing redraw notifier when switching collision shapes. 2014-10-15 11:40:57 +02:00
6d3757a3ce Better fix for T42139
Noise function's significant bits are up to 31st bit. This should now
give the same visual result as before, minus the stripes.

Issue pointed out by Anthony Edlin, thanks!
2014-10-15 11:04:53 +02:00
4b8430ae8a CMake: Add a flag to explicitly disable SSE/SSE2 intrinsics
The flag is called WITH_CPU_SSE, it is ON by default so no one should
be affected by the change really.

This should hopefully fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763755
2014-10-15 14:53:12 +06:00
d79f679896 Fix T42237: Added a soft limit to 3D view grid scale; a value of 0.0
can otherwise give 0.0 object scale.
2014-10-15 10:16:11 +02:00
858e7b2f84 Correct last commit 2014-10-15 10:10:05 +02:00
f364ab5a0f Cleanup: unused var 2014-10-15 09:24:50 +02:00
2d50e5feaa Fix T42226: Glibc <= 2.8 fails to build 2014-10-15 09:23:43 +02:00
ab3290048c Refactor 'apply' part of Editmode View3d Transform panel code.
This was way too verbose, heavily factorized the code.

Also made sure only changed data are applied (was not always the case,
especially for curves and lattices), and that we always use raw value
when only one element is affected (was only that way for coordinates).

Note I checked performances, they seem to be roughly the same as previously.
2014-10-15 08:57:12 +02:00
c576c77514 Cleanup: Editmode 3DView Transform panel code: do not check for hidden BMesh verts/edges.
Afaik, a hidden BMesh element should never be selected. And this check was done in an
awfully inconsistent way! If it should really be needed, should be added back as a macro
used everywhere!
2014-10-15 08:57:12 +02:00
2ef68c2a32 Cleanup: Edit mode 3DView Transform panel code.
Mostly reorganizing mesh data handling to be always in the same order, this piece of code
is rather verbose, let's try to keep it organised a bit.

Also some visual UI tweaking.
2014-10-15 08:57:12 +02:00
7e64a020ed Add Vertex bevel weight to Editmode UI.
This panel UI code needs more love, cleanup etc. in next commits.
2014-10-15 08:57:12 +02:00
8d1d16bf0d Bevel modifier: Add weight support for vertices bevelling.
Nothing to say here, really, just a couple of lines to add to get it working...
2014-10-15 08:57:11 +02:00
Dalai Felinto
d0320947d3 Fix for No Sudo option in install_deps.sh (typo in docs) 2014-10-14 21:16:58 -03:00
f87d38b5f5 Bugfix T42225: Python - GreasePencil.active incorrectly accepts GreasePencil type instead of GPencilLayer 2014-10-15 12:56:29 +13:00
Dalai Felinto
2f49be5b20 Fix for Editor Fullscreen on Sequencer
The sequencer 'display' area is a region on its own, so we can't hide
the preview regions. The only problem is that the <-> resize icon shows
in the main region, so you only see it over the tracks region in the
sequencer, I'm not addressing this though.
2014-10-14 18:31:06 -03:00
Dalai Felinto
7c25f16f1a Fullscreen Editor (new fullscreen mode for clean UI)
Organize Maximize/Fullscreen mess and add a new fullscreen mode with no UI

* Maximize Editor: (old Ctrl+Up)
* Full Screen Window: (old Alt + F11)
* Full Screen Editor: new operator (Alt + F10)
* Change Show/Hide Header: (Alt + F9)

When the mode is on moving the mouse near the top right corner of the
editor shows an icon to go back to the normal editor mode.

This was originally intended for the multiview branch, but this
functionality also benefits non-stereo workflows, thus it can be
reviewed and committed independently.

Development notes:
* This includes cleanups in the code to sanitize the naming of
  fullscreen/maximize across the window/editor code.

* Originally the idea was to make the window fullscreen as well, but
  this idea was dropped.

* You can see the clicking area when debug is 1

* Technically the user can be left with an unfaded icon in the corner
  (specially when using a tablet). If we think this is too bad we can
  increase the action zone to be the whole screen, or something similar.

Reviewers: campbellbarton [1], ton [2], fsiddi [2]

[1] actual code review
[2] design review

Differential Revision: https://developer.blender.org/D678
2014-10-14 15:11:41 -03:00
e556670b36 Cycles: Do cuda pointer arithmetic in integers, don't use pointer arithmetic
This should hopefully fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765187
2014-10-14 17:54:41 +02:00
5918fcb5e7 Cleanup: ws 2014-10-14 17:49:37 +02:00
11e7679d1c OSX/GHOST: replace spaces with tabs in sesponese to rB424c050a6fc1
New IDE did not take over my former setting for preferring tabs
2014-10-14 17:27:36 +02:00
c86c9297dc Fix inconsistent types in guardealloc
This basically fixes mix of size_t and uintptr_t usages which might be different size.
2014-10-14 16:11:20 +02:00
b171fd7483 Code cleanup: int/float and float/double conversions 2014-10-14 15:36:21 +02:00
2d6458c64c Fix T42064: Directional blur uses wrong sampler
Now use linear one, nearest is far too doggy.
2014-10-14 15:35:41 +02:00
383bd34111 Fix T42021: OSL doesn't work when there are non-ascii chars in the path
Quite annoying, the same thing we do from the blender side, But as a positive
side we can get rid of some utf8/utf16 conversions.

Hopefully it all work fine now, at leats works on mu russki windoze laptop.
2014-10-14 14:56:21 +02:00
e0cacb808c OSX: refinement for last fullscreen condition commit 2014-10-14 13:17:14 +02:00
424c050a6f OSX: only use lionstylefullscreen when seperate spaces are used, todo: use respondsToSelector to simplify the whole detection 2014-10-14 12:48:16 +02:00
f23cf22125 Pie menus:
* Only use last key for pies if it hasn't been released already
* Confirm threshold is now measured as distance after regular threshold.
zero disables.
* Only display the confirm threshold if there's a valid direction (mouse
is after threshold).
* Calculate confirm threshold taking recentering into account
2014-10-14 12:08:44 +02:00
20c233f3af Yet another tweak to stretch volume variation.
Make sure the 1.0 value is not affected by smoothing, and min/max limits
never go above or below 1.0 respectively. This was a request by
animators since not modifying the mesh in its rest pose is regarded as
crucial.
2014-10-14 11:51:36 +02:00
3620e3e331 Fix for previous commit which changed submodules
Never ever stash submodules for commit, it also real helps checking the
commits before you do push.
2014-10-14 11:14:59 +02:00
0297763afa Tweak for smoothing limits in stretch-constraint volume preservation.
Uses a arctan instead of sine function now, which has the advantage of
not overestimating the bulging.
2014-10-14 11:03:13 +02:00
c08e7e1dc0 Fix T42209: Changing Node Editor header color also changes wire color
The nodes wire was using 'TH_HEADER' flag to get its color and thus would be in sync with the header. Now make it so it uses its 'own' flag (actually 'TH_SYNTAX_R', the only TH_SYNTAX_* which wasn't yet used by the nodes).
Also expose the setting to the user so it can be themified.

This fixes T42209

Reviewers: lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T42209

Differential Revision: https://developer.blender.org/D827
2014-10-14 10:17:06 +02:00
cd2295f93e BLI_bitmap: add a macro to set/clear the whole bitmap at once. 2014-10-14 09:40:35 +02:00
79aa9feee8 Update submodules to point to 2.72 tag 2014-10-14 09:05:48 +02:00
4d4da31ee5 in GHOST_ContextWGL.cpp, in functions that use goto, converted declarations to C89 style to prevent jumping over constructors 2014-10-13 19:20:01 -05:00
d665095e0d Filter out pie spawn button events.
The reason being, with the current system of quick selection, it's
possible to spawn an operator after confirmation, especially for cases
with modifier buttons.
2014-10-13 20:09:37 +02:00
f9cbb908a3 Integrated limits for volume preservation in stretch-to constraints.
Currently the volume variation feature in stretch constraints is
unlimited. This has to be compensated by riggers by adding scale limit
constraints, but these are unaware of the stretch orientation and can
lead to flipping. Also the stretch calculation itself is not working
properly and can lead to collapsing volume.

The patch fixes this with several modifications:
- Interpret the volume variation factor as exponent, which works better
  with large values for artistic purposes.
- Add integrated limits to the volume "bulge" factor, so secondary
  constraints for compensation become unnecessary
- Add a smoothness factor to make limits less visible.

Eventually a generic volume preservation constraint would be nicer,
because multiple constraints currently implement volume variation of
their own. This feature could actually work very nicely independent from
other constraint features.

Differential Revision: https://developer.blender.org/D826
2014-10-13 19:58:53 +02:00
af346f9918 Some corrections to the pie spawning code to account for nested pies. 2014-10-13 19:55:19 +02:00
02175027f2 Fix T42206: RenderLayers popup crashed when clicked while rendering 2014-10-13 18:15:55 +02:00
f4a260fb3c Fix T42198: Linked lines only work with linked objects.
The reported issue was caused by a backward incompatibility due to careless
code changes made when per-material Freestyle line colors were introduced
in rB7915d7277ac8c605f016f30f943080556244fb59.  In 2.71 line style
Material color/alpha/thickness modifiers was retrieving alpha transparency
from Material.alpha, whereas in 2.72 Material.line_color[3] was referenced.

The present fix reverts the aforementioned code changes.

This issue is a regression from 2.71, so the fix is appropriate for inclusion in
the 2.72a release.
2014-10-14 01:14:33 +09:00
bdc41ca756 Code cleanup: Move output arguments to the end of the list 2014-10-13 18:06:18 +02:00
bcee57e74e Roto: Improve spline sliding vs. curvature detection
If the mouse is closer to the spline than to it's center do a
spline curvature correction operator instead.
2014-10-13 17:59:03 +02:00
99a386da9e Code cleanup: Prevent possible int->float conversion 2014-10-13 17:52:14 +02:00
fa021e3a44 Code cleanup: Use new SQUARE() macro to get squared distance threshold 2014-10-13 17:48:10 +02:00
cf38b933f3 Fix T42005: Reset py-handlers could crash
Wasn't acquiring the GIL.
2014-10-13 17:45:40 +02:00
e72d8b4711 Mesh Inset: select internal faces by default 2014-10-13 17:02:21 +02:00
8e1ae537dd Fix T42205: MovieClip ignores grid color 2014-10-13 16:27:01 +02:00
9231150577 Cleanup: redundant cast 2014-10-13 15:51:31 +02:00
4f90c880a9 Error in last commit 2014-10-13 15:41:19 +02:00
a4258d40a1 BLI_utildefines: add SQUARE macro
also minor cleanup
2014-10-13 15:36:13 +02:00
cc03689962 Fix embarrassing typo... 2014-10-13 15:26:00 +02:00
9fcc1a32df Pie menus: Confirm threshold
This commit adds a confirm threshold property to pie menus.

Basically, this will confirm the pie menu automatically when
the distance from the center of the pie exceeds that threshold without
a need to release the pie button.

The confirm threshold will only work if it is larger than the pie
threshold.

The confirmation actually occur when the mouse stops moving, to
allow multiple pie menus to be better linked together, (see below)

This functionality also facilitates the ability for chained pie menus by
dragging. Basically, a pie menu item can be a call_menu_pie operator and
the new pie menu will still use the original pie menu release event for
confirmation. This should allow for quick, gesture based navigation in
pie menu hierarchies (going back in the hierarchy is still not supported
though)

There will be a demonstration pie in the official add-on soon
2014-10-13 14:35:41 +02:00
116439ed91 Mesh calc smooth group: several fixes.
* Consider non-manifold edges as sharp, as in split normals handling.
* Consider edges from sharp polys as sharp!!!
* Fix returned number of groups (was off-by-one for non-bitflags grouping, could also
  be wrong in case of id overflow).

Note about using sharp polys too to define groups: Only current use of this function
(Obj exporter) does not need that, because it does its own check for sharp faces.
However, we might reuse that func in other places in future (e.g. in custom split
normals area), so better to get a consistent behavior!
2014-10-13 14:03:39 +02:00
4eadc3801a Minor typo fix, reported by Sebastian Koenig on irc. Thanks! 2014-10-13 12:28:10 +02:00
858bf1adea Cycles: Add CUDA support for sm_32 (Tegra K1, Jetson TK1).
Fix T42174.
2014-10-12 18:17:00 +02:00
9d078f2916 Bugfix: "Hide" button in modifiers panel did only hide smoke domain, not the smoke.
Reported by nudelZ
2014-10-12 16:36:35 +02:00
744aaa955f Cleanup: Typo fix for Blackbody variable, had different naming in the comments and also in OSL. 2014-10-12 14:18:30 +02:00
ee5936cf6b Minor alignment for triangles on number slider widget 2014-10-12 01:01:59 +02:00
545308fd10 Sculpt: update dystopia debug verify 2014-10-11 17:57:46 +02:00
04814476c0 Fix another crash with Navigation mesh.
Navigation mesh object need to access the current scene at
creation time. This can be at scene start or when an object
is instantiated from an inactive layer. The method of getting
the scene differs in these cases. This fix handles both.
2014-10-11 12:17:31 +02:00
0a738280e1 Cleanup 2014-10-11 11:44:28 +02:00
abd38c00f1 Cycles: set hit values in-order 2014-10-11 11:17:08 +02:00
815919b1fb fixed printf format warning that occurred with 64-bit targets 2014-10-10 23:21:44 -05:00
dd897de061 check for missing Windows error code headers (was missing from Mingw64) 2014-10-10 23:21:44 -05:00
f7957e2f7e Cleanup: tabs in empty lines. 2014-10-10 18:45:11 +02:00
32bc1eb677 Cleanup (no functional changes):
* int -> bool where possible
* Use const where possible
* Get rid of magic numbers
* Add/tweak a few UI tips
* A few other misc changes.
2014-10-10 18:45:11 +02:00
b100bdca25 Fix T41950: Parent-Child Menu behaves weird
Issue was, parenting with operator, then unparenting would keep the inverse parent matrix.
So if you then parented again through the mere Object field of Object buttons, you'd still
use previous inver parent matrix, giving some weird behavior from user PoV.

This commit simply makes sure inverse parent matrix is always reset to indentity when clearing
parents.
2014-10-10 18:45:11 +02:00
504370cafb Code cleanup: Fix silly duplication of typecheck and swap macro 2014-10-10 21:13:19 +06:00
65e1600cf3 Change interaction of pie menus slightly.
In drag style pie menus clicking is ignored now. This is done because
if we want to ensure that pie menus will not respawn, we had to not
destroy and keep the pie menu invisble while the button is pressed.

This opened a can of worms where pie items that would spawn popups could
steal the focus from the invisible pies and then the former pies would
be stuck in an invisible state, stealing all input unless user did a
right click to cancel the pie.

Invisible state is still kept for cancelling and strictly for that only.

This still allows nested layouts but only in click style, while hold
style is used for faster interaction. As a plus, it should also be
possible to tweak slider properties now, though menu will close after
that.
2014-10-10 17:02:47 +02:00
067f70cff7 Code cleanup: tabs vs. spaces (tm) commit 2014-10-10 20:17:56 +06:00
0f1c3958da Fix typo breaking compilation with rather strict flags (does not like implicit double to float conversion). 2014-10-10 15:11:23 +02:00
91d2485c52 Fix T42163: Outliner: recursive visibility toggle: autokeyframe only works for ancestor, not children
Ancestor's autokeyframing is handled through UI/buttons code, but children completely
skipped this, so we have to do it explicitely here...
2014-10-10 15:09:03 +02:00
5711025765 Cycles: Use a bit better approach for erfinv()
Also reduce number of branching and multiplications a bit by inlining the branches.

This gives an unmeasurable speedup, which is in case of BMW is about 2% here.
2014-10-10 13:40:09 +02:00
fd6537a53a OSX: as an prerequisite to make Dalai's upcoming "area_fullsceen" work,
make sure the window states are correct in the lion_fs animation phase.
This also assures the CTX_wm_window(C) is okay.
2014-10-10 12:58:52 +02:00
e640b4fb72 Sculpt: remove offset args from internal funcs
Detect this from the element type, also typecheck lookup functions
2014-10-10 12:38:04 +02:00
4f8b513c1a Fix T42168 mask texture UI missing. Own sillyness after last data fix
commit.

If we include the data cleanup commit to an alpha version for 2.72a this
should be included as well
2014-10-10 12:33:02 +02:00
585d2f31a9 Fix T32209 quitting not saving latest data if you are in edit or sculpt mode on
quit.blend.

This will use a slower file write if an object is in edit or sculpt
mode.

Autosaving will explicitly not be supported to keep it fast.
Added a tooltip warning.
2014-10-10 12:04:44 +02:00
c2d6de8e20 Freestyle: Fix for memory leaks in StrokeVertexIterator.
The issues identified here are regression from 2.71, so the present code
revision is appropriate for backporting if 2.72a is planned.
2014-10-10 18:57:36 +09:00
5fdbb793ff Freestyle: Fix for StrokeVertexIterator.__next__() ignoring the first and only element.
A StrokeVertexIterator ignores the first element when it is the only element.
Such an iterator can be created by the .incremented() method from an iterator
over two stroke vertices.

This problem is a regression from 2.71.  The present fix is appropriate to backport
if Blender 2.72a is planned.

Problem report by Kazuhiro Murakawa through personal communications, thanks!
2014-10-10 18:57:35 +09:00
642c8243e7 BLI_buffer: empty macro 2014-10-10 10:10:13 +02:00
c6d8ac9fe2 Tracking: Use task scheduler instead of thread pool for proxy build 2014-10-10 04:30:42 +06:00
a00b6d1271 Cleanup: (float)floor -> floorf 2014-10-10 00:24:34 +02:00
0f6afddb04 Tracking: Switch prefetch to use generic task scheduler
Not as if it gives any huge benefit to end artists, but it's kinda silly
to have like 3 different task/thread scheduling systems. The new one is
what's recommended for use now i'd say.

On the other hand it has unmeasurable memory save benefit :)
2014-10-10 02:56:56 +06:00
30dab51c29 Cleanup: use bool and const args 2014-10-09 22:44:03 +02:00
ad4980ce5e Code cleanup: Mostly whitespace 2014-10-10 02:17:46 +06:00
aaf772b724 Current tile highlight should use render data from the engine
Otherwise tweaking resolution/border would affect the way tiles are highlighted.
2014-10-10 02:11:36 +06:00
539a61bce2 Code cleanup: Use generic isnan() function instead of own ifdef 2014-10-10 02:04:36 +06:00
f2280661cb Enable atomic peak memory detection
This gives more precise information about memory usage which might be real handy
when doing memory optimization.

It works good here for as long as i can tell but if for some reason you'll be
experiencing some weird slowdown please let me know.
2014-10-10 01:55:57 +06:00
0609aee4db Fix T41639, hierarchical pie menu - popup interaction is buggy.
Basically, this commit changes pie menu click interaction so that
confirmation is done on left click release instead of press. This allows
dragging on the pie menu to select different items, but most
importantly, there should be no left over click events passed on to
subsequent menus/pies. This means that pie menus should now be able to
spawn popups safely. Also, left clicking to spawn a second pie menu now
sets that menu to click style by default allowing for better interaction
between hierarhies of pie menus.
2014-10-09 18:38:10 +02:00
9f18e4f0eb Cleanup: tabs
Set your editor to tabs for all C/C++!
2014-10-09 17:12:50 +02:00
2025730715 Sculpt: use bitmap for mask bool array 2014-10-09 17:12:50 +02:00
5f6e47e767 Minor cleanup.
* Use pie direction, not draw type for pie item collision
* Strict function definitions.
* Initialize random array with system time
2014-10-09 17:12:32 +02:00
928be3013a Classic blenderplayer fix + small optimization 2014-10-09 16:05:00 +02:00
016e75ad64 Fix T42139, vertical noise stripe patterns in noise texture.
Two fixes here (only the second one is strictly needed to fix the issue,
but both make the system better).

First is introduction of a random generator array for use with threaded
systems where each thread needs to access its own number generator.
The random texture now uses this so it should not be influenced by other
random generator reseedings of the main random generator like it did
before.

Second, I reshuffled the texture code to resample the upper bits of the
random number first. According to Numerical Recipes, this is where the
most variance can be found, so by sampling those we avoid correlation
issues. Also, multiplying here is not ideal because if a pair of bits
are zero, then the whole result will also be zero.

Overall this is much more random (tm) than before, however result will
also be brighter, since we now have less black spots. Tweaking the
brightness/contrast should somewhat fix that, generally having the same
result as before is not possible anyway if we are to really fix this.

Also, seems like exposing procedural depth might be nice here since it
influences the precision of the texture lookup.
2014-10-09 15:48:52 +02:00
127b92de83 InstallDeps: Fix wrong OPENCOLLADA settings in final messages in some cases.
Reported by Jefferson Rausseo through mail, thanks.
2014-10-09 13:32:20 +02:00
45ce901079 Cycles: Remove redundant float4->float3 conversion
Not as if it gives noticeable changes render-time, but it's just weird to
convert float4 to float 3 to just access individual x/y/z components.

Plus some compilers might be more stupid than GCC and don't optimize this
out well.
2014-10-09 11:48:47 +02:00
c1004b1b77 Libmv: Update Ceres to latest upstream
just to be sure we're dealing with the latest git version when troubleshooting
one annoying OSX issue..
2014-10-09 11:30:59 +02:00
375d2dc855 Implement custom names for render slots
Basically the title tells it all, quite straightforward implementation.

The only thing is the image.render_slot which used to represent the active
render slot index is now moved to image.render_slots.active_index.

Reviewers: venomgfx, campbellbarton

Differential Revision: https://developer.blender.org/D821
2014-10-09 11:17:31 +02:00
fe9394741b Freestyle: silence a GCC warning (-Wunused-function). 2014-10-09 01:31:08 +09:00
14df7de916 D801: Freestyle: remove old and unused stroke shaders
This patch removes several stroke shaders written in C++ that are unused
and don't serve a real purpose any more.  The removed shaders are:

  - BPy_ColorVariationPatternShader
  - BPy_StrokeTextureShader
  - BPy_TextureAssignerShader
  - BPy_ThicknessVariationPatternShader
  - BPy_fstreamShader
  - BPy_streamShader

and a few more that weren't even exposed to the Python API.

Some minor edits were made by the reviewer.

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

Reviewed by: kjym3
2014-10-09 01:31:07 +09:00
9c97624fc9 Select Random in Particle Edit Mode, by jezv
Added the select random functionality in particle edit mode for hairs or control points.

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Subscribers: campbellbarton, kevindietrich, jezv

Projects: #quick_hacks, #bf_blender, #physics

Maniphest Tasks: T37873

Differential Revision: https://developer.blender.org/D809
2014-10-08 18:10:27 +02:00
0ba84b7124 Operator to define render border from rendered image editor
This way it is possible to define render border directly from the image editor,
which is useful for at least three things:

- If viewport is really optimized out (simplified etc) then it might be hard to
  guess which exact area you're mainly interested now.

- No need to switch to the viewport to do render border tweaks, could be useful
  when doing compositing.

- If one need to look at particular pixel(s) which is real handy for debugging
  render engines (both Cycles and BI).

Reviewers: campbellbarton, venomgfx

Reviewed By: venomgfx

Differential Revision: https://developer.blender.org/D820
2014-10-08 18:02:49 +02:00
a62b806d70 Fix T42145: EditMesh Bevel tools had no clamping option.
Missing feature already present in Bevel modifier, useful and rather simple to add.
2014-10-08 16:42:41 +02:00
67943af47a glutil: use ints for drawing functions
shorts would wrap sometimes & many inputs were ints already.
2014-10-08 14:01:51 +02:00
5c829d2c4e OSX: fsmenu cleanup 2014-10-08 12:48:46 +02:00
e1ef451996 Fix OpenGL error on cycles rendered viewport.
We queried the wrong value when looking for the bound 2D texture. This
is not totally robust because currently bound texture may not be a 2D
one, but this should work for now.
2014-10-08 12:19:06 +02:00
7a76b1a003 Fix T41661: Added to main repo graph, science_lab and softimage themes. 2014-10-08 12:03:38 +02:00
efee3be1d3 Cycles: enable double promotion warning /w gcc 2014-10-08 10:58:40 +02:00
a550d913bc Fix Python ray-cast failing to check hit direction 2014-10-08 09:47:41 +02:00
47b8bf591c Fix more issues after recent context commit 2014-10-08 04:15:51 +06:00
be3a6d78e8 Cycles: reduce float/double conversions 2014-10-08 00:13:26 +02:00
e2522b4a29 Cycles: correct math wrappers
include the parens around value before cast,
in some cases was causing double/float promotion by only casting the left value.
2014-10-08 00:13:26 +02:00
9245e1aeb8 Fix compilation error after recent commit 2014-10-08 04:11:23 +06:00
05e26297bf OSX: adapt fs_menue to modern entries handling 2014-10-07 23:45:09 +02:00
e36cc29a69 Fix T42137: Keymap editing is broken
Own mistake in previous fix here, was too greedy in finding an existing kmi of UserPref add diff kmi, we only want
to ignore exact same kmi's here.
2014-10-07 23:39:56 +02:00
8f1cdc1949 Fix bplayer linking after recent addition of glew_mx. 2014-10-07 23:28:28 +02:00
32b5fb351a We need libglewmx too, now. 2014-10-07 23:14:43 +02:00
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
a8705e99ee Sculpt: minor speedup for dyntopo
Add retake to range-tree to avoid double lookup.
2014-10-07 21:02:08 +02:00
37474e50ce Cleanup: use bool 2014-10-07 20:40:11 +02:00
22e9f4f838 Sculpt: dyntopo, avoid redundant gset remove calls 2014-10-07 20:26:17 +02:00
d5e300e14d Paint: add debug print to time strokes 2014-10-07 20:20:19 +02:00
26083d5de5 Partial fix of T42052: Clip editor does not support Continue zoom style 2014-10-07 17:24:48 +02:00
1519b6a23e Icons: were relicensed to GPL2+ metadata was CC-NC 2014-10-07 16:59:27 +02:00
0259864c15 Call python3 explicitly from tgz util 2014-10-07 16:49:22 +02:00
409b3c9c9c Fix T42106: Box image mapping shows black triangles if they point to a corner and blend is 0
After discussion with cambo here we decided it's better to choose arbitrary side of the box
(in this case it's X-axis) and use image from it. That's better than doing a blackness.

P.S. This is literally a corner case anyway.
2014-10-07 15:48:39 +02:00
1a7b7bb74e Allow render engine to declare whether it's capable of the texture rendering or not
If render engine has bl_use_texture_preview set to truth blender wouldn't fallback to
the blender internal rendering for previews.
2014-10-07 14:22:37 +02:00
2d83108f93 Cleanup: redundant casts 2014-10-07 14:20:33 +02:00
7880f75e87 Cleanup: use bool 2014-10-07 14:04:39 +02:00
025955e549 Fix T41957: Shadow color texture mapping was using wrong factor 2014-10-07 12:30:54 +02:00
d7a1b09f85 Cleanup to previous commit, we can reuse set_rgb instead of new function 2014-10-07 11:12:00 +02:00
14c57b6c78 Fix T42074, textured lamps influncing other layers
The solution is to do the multiplication with the energy in the shader
after texture application.

We might be able to avoid setting dyncol completely, but this needs
better investigation. Some shader paths also look a bit redundant.

Also, texture mapping is not supported very well for light lamps, might
also need investigation.
2014-10-07 11:06:53 +02:00
5e809c45ed Fix T4199: Knife holes in concave ngons failed
BM_face_point_inside_test assumed the face center was inside the face.
2014-10-07 10:09:19 +02:00
4c60aae66c Cleanup: warnings 2014-10-06 23:19:07 +02:00
cc02f929f9 Cleanup: style 2014-10-06 23:19:07 +02:00
15d2ab6812 RNA: id enum was incomplete 2014-10-06 23:19:07 +02:00
0d8a007c69 Fix T42088: Creating new keybinds can cause duplicates when saving key config profile
When patching a keymap with a 'UserPref' diff one, do not add keymap items from diff
if they already exists in patched keymap.
2014-10-06 22:08:37 +02:00
b4860de6f1 One more bplayer infamous stub fix! 2014-10-06 20:28:21 +02:00
c03951da14 Texture painting:
Do not generate materials/images/UVs if they are missing.

Now we spawn a panel ("Missing Data") with operators to generate the missing data and
pop a warning if user tries to paint without them.

The reason we have reverted this is that it is too easy to end up with more textures
than we wanted. It was impossible to enter texture paint without having textures added,
and code makes too many assumptions about what user may want.

Discussed during Sunday's meeting.

This might be a candidate for 2.72a but I'm not sure how other artists will take this
(and how refined and crash-free it is), better make a few iterations first.

And for interested parties...test please, don't wait until after a release to poke with such issues.

Also, add slot operator now adds a new unconnected image node in cycles. Only
used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because
it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
2014-10-06 20:10:12 +02:00
1f4915e290 Cleanup: avoid alloc for each knife-project vector 2014-10-06 18:23:44 +02:00
4a763e1c68 Compositor; Explicitly specify inline function 2014-10-06 22:15:35 +06:00
29bb5f9a69 Fix Cycles crashing with previous own commit.
Behavior with NULL context was wrong.
2014-10-06 18:00:56 +02:00
8cb1b35bee Fix T40350: Some texture prop did not have visual feedback they were driven.
This is only a (hacky) partial fix, actually, since `RNA_property_animated()` will still
not work in those cases... Better that than nothing, though.

Thanks to Campbell for review.
2014-10-06 17:08:24 +02:00
0e7d4a828a Fix T4201: AVI Broken when width not multiple of 4 2014-10-06 16:41:15 +02:00
c0e3540898 Fix in-between mouse events getting assign to keys 2014-10-06 16:41:15 +02:00
247b869967 Compositor: implement OpenCL backend for gaussian blur
Pretty much straightforward change which gives around 30%
speedup on my laptop and around 2x speedup on desktop in
the BI (which uses gts580). Tested with huge blurs (like
10% of blur) which was rather common during Caminandes.

For now OpenCL is only limited for blur size more than
100 pixels.

This is a bit experimental still, feedback is welcome.

Reviewers: jbakker, lukastoenne

Subscribers: ton

Differential Revision: https://developer.blender.org/D576
2014-10-06 16:21:37 +02:00
a9521c428e Correction for wrong ifdef in creator 2014-10-06 14:54:58 +02:00
81c4c29504 Fix T42075: DnD Material not updating render view 2014-10-06 14:08:47 +02:00
471a011122 Cleanup: remove old preview code 2014-10-06 14:08:41 +02:00
939fa6759c Cycles: Fix for camera-in-volume detection
Ray actually should have infinite length, so we can detect camera in a volume
which is bigger that the far clipping of the camera.

This might also give some speedup (wouldn't expect much tho) because we don't
need to re-calculate ray direction and length after every bounce now.
2014-10-06 12:36:46 +02:00
233de800e2 Cycles: Optimize of volume stack update when sampling SSS
basically we skip all non-volume objects now in the volume stack function.
Depending on the show it might give some percent of speedup.

Most of the speedup would be gained in the scenes when having SSS object
intersecting the volume and taking a reasonable amount of frame space.
2014-10-06 12:36:46 +02:00
b36eb51d37 Cycles: Fix for viewport rendering with debug enabled 2014-10-06 12:36:46 +02:00
cd6129d1ff Cycles: Workaround dead-slow expf() on 64bit linux
Single precision exponent on 64bit linux tends to be order of magnitude slower
than double precision version even with single<->double precision conversion.

Some feedback in the mailing lists also suggests that logf() is also slow, but
this i didn't confirm here in the studio yet.

Depending on the shader setup it gives ~3% with the secret agent shot and up to
around 15% with the bmw scene here.
2014-10-06 12:36:46 +02:00
1f1dcdfd76 Cycles: Move system headers include to the top of the files
This is a good practice to do anyway, plus it'll help with the upcoming change.
2014-10-06 12:36:46 +02:00
b15d9ecb6d Cleanup: remove paranoid NULL checks 2014-10-06 12:23:47 +02:00
9cfcddc8f4 Dyntopo: minor speedup collapsing edges 2014-10-06 12:16:06 +02:00
9e53a97ddf Fix T42093: segfault when trying to free unallocated depths zbuffer (border-zoom in 3DView).
Thanks to jensverwiebe (jens verwiebe) for investigations too!
2014-10-06 10:30:23 +02:00
77af624524 Quiet warning on 32bit system 2014-10-06 09:51:51 +02:00
1dd428ff6d Fix T41983: Array Modifier "Merge" bug?
We messed up previous fix, in 'simplified' translated merge case... :(
2014-10-05 23:10:44 +02:00
6feac1e940 Cycles: Center Tile order had a slight offset to the left.
Signed-off-by: Thomas Dinges
2014-10-05 18:35:49 +02:00
a1b27d6424 Fix T42081, OpenCL supports float3 since the 1.1 specification, not sure why we needed this. 2014-10-05 18:10:42 +02:00
d3a7f3fa29 Cycles: Forgot to set WITH_CYCLES_DEBUG for OSL kernel 2014-10-05 17:43:54 +02:00
e4b910a0aa Cycles: __KERNEL_DEBUG__ wasn't set for compile-time kernels 2014-10-05 21:42:53 +06:00
bce5b6b241 Fix tgz script (included all files in submodules) 2014-10-05 17:18:20 +02:00
7fff7beac1 Cleanup: sculpt float -> bool 2014-10-05 17:17:19 +02:00
9241f12e10 OSX/Ghost: little code cleanup 2014-10-05 12:45:14 +02:00
68f2066602 Cycles: Make OpenCL folks happy to use __KERNEL_DEBUG__
Quite straightforward change, the only annoying thing is that we can't use
indentation for include directive just because of the way headers inlineing
works for OpenCL.

Might do smarter job in path_source_replace_includes() but don't want to
spend time on this yet.
2014-10-05 16:00:23 +06:00
0106b94f9d Cycles: Fix for debug kernel not working with CUDA 2014-10-05 15:31:48 +06:00
15af15eb56 BLI_buffer: simplify buffer resize 2014-10-05 10:33:02 +02:00
a613290775 Cycles / CUDA: Workaround to make sm_52 (Maxwell) cards work.
* sm_52 can run a sm_50 kernel, so tell runtime detection to use that until we build a dedicated sm_52 kernel.
2014-10-05 04:13:40 +02:00
dde740bcd7 Cycles / CUDA: Change inline rules for BVH intersection functions.
* On sm_30 and above there is no change (was not inlined already before), this just fixes a speed regression from yesterday. 6359c36ba4
* On sm_2x (tested with sm_21), I get a nice 8% speedup in the bmw scene with this. As a bonus, cubin compilation time and memory usage is significantly reduced. Regular cubin size went from 2.5MB to 2.0MB, Experimental one from 3.8MB to 2.5MB.
2014-10-05 03:53:51 +02:00
24ddfe0c63 Previous scons fix is just wrong, there is a reason why lines were tried to be indented 2014-10-04 16:31:47 +02:00
15969e8a30 Cycles: Fix wrong ifdef check around shadows record all 2014-10-04 16:21:05 +02:00
4189a686b5 Fix bad RNA enum from the previous commit 2014-10-04 20:20:33 +06:00
1a410fd798 Another scons fix, wrong indentation. 2014-10-04 16:07:39 +02:00
ada2a3a0fc Typo fix for new WITH_BF_CYCLES_DEBUG option. 2014-10-04 16:01:09 +02:00
4f9ee695ef Fix off by one error drawing passepartout 2014-10-04 15:41:28 +02:00
27d660ad20 Cycles: Add support for debug passes
Currently only summed number of traversal steps and intersections used by the
camera ray intersection pass is implemented, but in the future we will support
more debug passes which would help checking what things makes the scene slow.
Example of such extra passes could be number of bounces, time spent on the
shader tree evaluation and so.

Implementation from the Cycles side is pretty much straightforward, could only
mention here that it's a build-time option disabled by default.

From the blender side it's implemented as a PASS_DEBUG with several subtypes
possible. This way we don't need to create an extra DNA pass type for each of
the debug passes, saving us a bits.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D813
2014-10-04 19:00:26 +06:00
8ac3c3d3ee Fix T42065: Shading issue using Array modifier
Gah... Dirty normal flag should be set on *real* final dm, after merge is done. :/
2014-10-04 12:54:00 +02:00
60bdb7da48 "Delete texture paint slot" told the user that it would add a texture paint slot. 2014-10-04 12:22:40 +02:00
9d8c1658a1 OSX: simplyfy last commit for fs_menu system_bookmarks 2014-10-04 10:48:07 +02:00
6359c36ba4 Cycles: Remove a workaround for Titan GPUs, not needed anymore with the latest CUDA compiler. 2014-10-04 01:29:08 +02:00
a9ae14c480 OSX: Change the FS_CATEGORY_SYSTEM_BOOKMARKS aka "Favorites", so that the orderwise in sync with finder 2014-10-03 21:01:59 +02:00
cdbac018a2 Cycles, some tweaks to scene_intersect_shadow_all()
* Function returns a bool, not an uint.
* Remove GPU ifdefs, this is CPU only due to malloc / qsort.
2014-10-03 20:41:38 +02:00
821e2ae37a Fix for tgz script (whitespace broke it) 2014-10-03 19:41:46 +02:00
f0b601ccf3 Install_deps.sh: missing --skip-openexr in arg parser's parameters.
Reported through mail by Jefferson Rausseo, thanks!
2014-10-03 18:34:09 +02:00
02ffed4052 Cleanup: Remove some unused / unreferenced functions for perdiodic perlin noise. 2014-10-03 18:00:45 +02:00
3aa65574f5 Cycles / OSL: Make the signed/unsigned Perlin parameter more self explaining. 2014-10-03 17:51:21 +02:00
dc1ca0c94f Cycles: Fix OpenCL compile after new Volume BVH introduction and add some comments. 2014-10-03 17:23:45 +02:00
5e10392e9f Cycles: Missing volume traversal header in cmake for GPU compilation. 2014-10-03 17:11:00 +02:00
4b2fadeaba Cycles: Remove Westin closure.
Was hooked up last year for testing purposes, as we already had some code for it, but the closure itself is not really good nor really useful, so let's remove it.
2014-10-03 16:03:49 +02:00
8f36d260d3 2.73 Release Cycle: Alpha. 2014-10-03 15:43:30 +02:00
02f58ac623 Cleanup: Spelling. 2014-10-03 15:28:52 +02:00
4c43fcf791 Fix T41983: Array regression with center-verts
Array with rotation and a central pivot would fail.

Thanks to Bastien Montagne for the initial fix.
2014-10-03 14:36:34 +02:00
bc0411f687 Fix for 2-sided faces in array modifier 2014-10-03 14:36:34 +02:00
1e4d99368b Cycles: Use more accurate implementation of erf() and erfinv()
This functions are  orders of magnitude more accurate than the old ones,
and they're around the same complexity to compute.
2014-10-03 18:28:44 +06:00
72f557d34e Sculpting:
Grab and Snake hook brushes now support strength. To keep compatibility
with older brushes, this commit also sets strength to 1.0 for those
brushes.
2014-10-03 13:14:10 +02:00
0fa7e4c853 Cycles: Decouple object flags update to a separate update step
This way there's much less cross-references between objects and meshes
device update functions.

The only thing remained s the object bounds calculation which is needed
by bvh update. This could also be decoupled, but it's not that crucial
yet because its's how it used to be for ages now.
2014-10-03 12:13:41 +02:00
9ce645e7d9 Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Thanks Campbell for the headup!
2014-10-03 12:12:10 +02:00
d4758badf6 Fix T42054: Problem when using Cast modifier with Wireframe modifier.
Wireframe modifier needs valid normals, let's ensure that!
2014-10-03 11:58:29 +02:00
502f6d538d Fix T41920: Changing Use Alpha settings doesn't refresh viewport properly 2014-10-03 11:27:05 +02:00
a654512356 Cycles: Implement preliminary test for volume stack update from SSS
This adds an AABB collision check for objects with volumes and if there's a
collision detected then the object will have SD_OBJECT_INTERSECTS_VOLUME flag.

This solves a speed regression introduced by the fix for T39823 by skipping
volume stack update in cases no volumes intersects the current SSS object.
2014-10-03 10:52:04 +02:00
b86f199a98 Cycles: Fix for non-initialized variable 2014-10-03 10:44:24 +02:00
527d049c5c Cycles: Make camera-in-volume an official feature
This means it's no longer needed to enable experimental feature set in order to
have proper camera in volume support. And this also means if there's something
wrong going on, or if there's speed regression for cases when camera is obviously
not in the volume -- this issues are to be reported and handled in the regular
matter.

Happy blending!
2014-10-03 12:55:31 +06:00
7dabfb2048 Cycles: Speedup of kernel side camera-in-volume detection
The idea is to only count intersections with objects which has volumetric shader
and ignore all other objects.

This is probably as fast as we can go without involving some forth level magic.
2014-10-03 12:55:31 +06:00
50af4d208d Cleanup: spelling, ws 2014-10-03 08:21:14 +02:00
230c272fe3 Comments: note on bmesh_region_match
also correct buffer type
2014-10-03 08:21:14 +02:00
a1d80b9c56 Update link to the Support an Animation Movie link
This is to be in the final release.
2014-10-02 20:47:24 +02:00
faa10d1ced Cycles: optimization of panoramic camera in volume
Now we do much better preliminary check for panoramic camera is inside the
volume object boundings.

Also we're now cacheing the has_volume in the mesh, which makes it unneeded
iterations for each object's shaders.

Should be no functional changes, just faster sync and panoramic-in-volume
rendering.
2014-10-02 20:45:30 +02:00
e64ecaea4a Code cleanup:
calc_manipulator_stats is only used in manipulator (and soon will only
use the context for such queries)
2014-10-02 20:18:57 +02:00
591caab731 Fix for wrong bit mask magic happening in gpu_update_lamps_shadows() 2014-10-02 18:19:54 +02:00
480d9eab73 Fix black matcap when using particle system
Using matcap with a displist is not really good thing to try
and it's actually a regression since we've enabled matcaps
for all objects instead of just an active one.
2014-10-02 18:17:33 +02:00
bcab08c50a Libmv: Fix wrong variable use in scons 2014-10-02 17:12:49 +02:00
6a8ff9ee4b Fix error in last commit 2014-10-02 17:10:24 +02:00
7901faf335 Fix T42049: Crash exiting /w GL1.1 2014-10-02 16:24:14 +02:00
96c2d67797 Fix T42030: Grabbing the whole mask interfere with grabbing individual curve
This fix is for the final 2.72 release.
2014-10-02 19:28:07 +06:00
e99919f713 Freestyle: For until c++11 is accepted only static members could b initialized in-lined 2014-10-02 19:24:16 +06:00
617131410c Fix T42008: Dragging and packing issue about new blank image
The issue was caused by the fact that we never used to store the
generated image color in DNA, so image reload will loose this
information.

Now we store the color in DNA, making ti so re-loading the image
will preserve it's generated color.

It is now also possible to change generated image color using the
color swatch in image properties after the image was created.
2014-10-02 19:06:35 +06:00
9ac0b4ff05 Fix T42033 UVs shown while rendering in texture paint mode.
This should be included in final release build.
2014-10-02 14:35:08 +02:00
a2aa3eb2e5 Fix for regression on bevel material: need do_version support for earlier files. 2014-10-02 07:50:23 -04:00
69356b0b9b Fix freestyle/bplayer build (usual stub stuff). 2014-10-02 12:47:05 +02:00
1b0214cb88 Freestyle: Fix for a compiler failure in makesrna. 2014-10-02 17:52:18 +09:00
c47682d6ab Freestyle: Fix for destructive view map modifications during chaining operations.
The view map is mostly treated as a read-only data structure by line stylization
operations (i.e., selection, chaining, splitting, sorting and stroke creation).  The
only exception is the chaining operation in some cases where insertion of extra
FEdge objects is necessary to ensure the continuity of underlying FEdges from
which a chain is constructed.

The present revision addresses the removal of extra FEdges so to keep the view
map clean and suitable for reuse in subsequent render frames.
2014-10-02 17:52:16 +09:00
c946a450ed Freestyle: Finer memory statistics with CXX_GUARDEDALLOC. 2014-10-02 17:52:14 +09:00
dd9c53b312 Freestyle: View map caching.
New render layer option named "View map cache" is added to reuse a
previously computed view map for subsequent rendering.  The cache is
automatically updated when the mesh geometry of the input 3D scene has
been changed.

This functionality offers a major performance boost for Freestyle
animation rendering when camera-space mesh geometry is static, as well
as for repeated still renders with updates of line stylization options.

Although the "View map cache" toggle is a render layer option, the cache
memory is shared by all render layers and scenes.  This means that if
Freestyle is used for two or more render layers (possibly in different
scenes through the compositor), then the cached view map for one render
layer is replaced by a new view map for another render layer and hence
no performance gain is expected.
2014-10-02 17:52:13 +09:00
6bde5381bb Cleanup: indentation 2014-10-02 10:33:15 +02:00
3dada2f8cf Compositor: Reduce number of int<->float conversions in keying screen operation 2014-10-02 13:39:59 +06:00
957b945a18 Compositor: Simplify logic in keying blur operation 2014-10-02 13:39:50 +06:00
db62a80869 Libmv: Remove old workaround for 10.5 hash tables
We on'don't really support 10.5 anymore for my knowledge and in any case
the defined symbol was never checked in the sources, so this workaround
was basically doing nothing for quite some time now.
2014-10-02 13:01:34 +06:00
178f8400ee Libmv: Add an option to disable schur specializations build-time
This way folks with few ram or those who wants to hack into Ceres
code might compile Blender much faster.
2014-10-02 13:01:34 +06:00
5ab4c6b7aa Libmv: Silence some warnings about C11 usage
This makes headers a bit less clean (with the anonymous structs
mainly and headers inclusion from another header.

Makes compilation with clang a bit less noisy.
2014-10-02 13:01:34 +06:00
2040666fd1 fix T42046 Improved the option label for clarity 2014-10-02 08:55:13 +02:00
805bb22f46 Code cleanup, use bit shifting for lamp flags. 2014-10-01 19:16:19 +02:00
497d06d64d Fix T41971: BMesh mapping slot arg error 2014-10-01 22:36:09 +10:00
5f948fb77f Anim Playback: Optionally draw flipped
useful to view animations from different POV.
FKey: X, Shift+FKey: Y
2014-10-01 22:01:01 +10:00
b8f6941776 Cleanup: de-duplicate playanim matrix 2014-10-01 22:01:00 +10:00
1a72c83355 Fix Smoke UI property: Low resolution values are needed for pyroclastic smoke effects.
Example values for such an effects are resolution = 10 and high resolution = 5.

Patch by nudelZ
2014-10-01 13:32:52 +02:00
fb7f06288d Smooth vertex: User request: tweak hard min/max smoothness.
Keep soft min/max to usual values, but allow artists to play with strange values
if they really want it.
2014-10-01 10:46:50 +02:00
2cb134be2b Freestyle: New line style options for sorting and chain selection.
The following two sort keys are added for sorting chains.

* Projected X - Sort by the projected X value in the image coordinate system.
* Projected Y - Sort by the projected Y value in the image coordinate system.

A new line style option for the selection of first N chains is also added.

Moreover, the chain sorting and chain selection operations are now executed
in this order instead of the reverse order used previously.  The UI has also
changed accordingly.  This functional change is backward compatible and
won't result in visual differences.
2014-10-01 16:01:40 +09:00
55aa42ad6f Freestyle: Fix for a typo in the definition of NotBP1D.
This is a safe fix for a regression from 2.71, so should be back ported to 2.72.
2014-10-01 16:01:38 +09:00
832f54a1aa Cycles: Filter Shader and Output nodes to their respective object/world node tree.
Some nodes only work in certain node trees, so don't show them in the Add Node menu when this is the case.
This can probably be expanded to Input Nodes too, but need to double check some cases here still.
2014-10-01 07:23:16 +02:00
c68c32a409 Fix for duplicate member in UserDef from own commit (merge mistake). 2014-09-30 18:37:42 +02:00
6fa46ad315 Support for "virtual pixelsize" on 4k screens.
On 4k devices the default pixel size leads to tiny OpenGL drawing
that is hardly usable without doubling the DPI. The retina system
on OSX aims to alleviate this problem by introducing a general 2x
pixel size.

No equivalent feature exists on other platforms so far. However,
to emulate the effect this patch introduces a "virtual" pixel size
factor for OpenGL drawing.

Note that the user currently has to enable this manually by selecting
the "Virtual Pixel Mode" in the user preferences (defaults to native).
All windows of a Blender instance share the same virtual pixel size as well.
It may be possible to handle this on a per-window basis and automate
the selection somewhat (if enabled by the user), so working with
multiple screens becomes more convenient, but technical limitations
make this a bit difficult (on X11 with nvidia drivers the actual screen size
is not reported correctly).

Reviewers: ton, campbellbarton

Differential Revision: https://developer.blender.org/D669
2014-09-30 18:29:32 +02:00
c7684b456a Fix T42026: Unit scale affects camera focal length.
Not a regression, yet maybe simple/safe enough for 2.72?
2014-09-30 15:07:44 +02:00
aaa2f7f3ec Fix compilation on GCC (good old mixed declaration and code). 2014-09-30 14:22:20 +02:00
202831fc4f Style cleanup 2014-09-30 17:28:29 +06:00
c0276251d2 fix T42022 Attempt to export empty set of objects resulted in an exception 2014-09-30 13:22:55 +02:00
4268f1c8f2 Fix T42018: Crash when displaying beveled poly-curves with spline bevfac mapping
This fix is for 2.72.
2014-09-30 15:58:19 +06:00
5ecbd5c871 Use native float math functions for MSVC12
`double` surrogates are slow (e.g. pow is 2x slower than powf), and MSVC12
supports fp-math functions from C99.
2014-09-30 13:39:03 +04:00
ff53b046f2 Libmv: update ceres to latest upstream version
This brings faster BlockRandomAccessSparseMatrix::SymmetricRightMultiply.
2014-09-30 14:50:05 +06:00
570313d519 Blend modes: fix array length being too short
Reviewers: psy-fi

Differential Revision: https://developer.blender.org/D799
2014-09-30 10:48:57 +02:00
56a5f17846 Libmv: Enable explicit Schur complement matrix by default
Gives up to 2x speed up of camera solving process in average scene.
In the really huge one it might be slower, but that we need to investigate.
2014-09-30 00:43:04 +06:00
b16e924251 Libmv: Update Ceres to the latest upstream version
Mainly to let ITERATIVE_SCHUR use an explicit Schur Complement matrix.
2014-09-30 00:39:45 +06:00
40fb21aafe Fix BI viewport render crash happening with zero render border area
This is better to be backported to the 2.72.
2014-09-29 22:33:37 +06:00
927099ceb8 Cleanup: style 2014-09-30 02:04:34 +10:00
ec8fb6dbef Update for release themes.
This is to be backported to 2.72.
2014-09-29 16:04:43 +02:00
4a26d70e1e Fix T41988: Shadow pass inaccurate calculation 2014-09-29 18:28:24 +06:00
2842b0e9c9 Revert previous commit (sorry about that), and use standard func to get active layer
in this case too.

Thanks to Campbell for the head up.
2014-09-29 14:25:50 +02:00
b4efe25119 Fix T41905: Linked objects/groups assigned to 'wrong' active layers when called from 3DView
Typo using v3d->layact instead of v3d->lay when linking and v3d is available in context.

This can be backported to 2.72.
2014-09-29 14:00:49 +02:00
52330e5349 Fix T41993: Constant jittered bug
Rotated coordinate of the ray start was used when calculating
the ray direction, ending up with wrong direction.
2014-09-29 17:41:07 +06:00
a0b7d24a6f Fix T41977: 'Shading' panel of Render buttons not updating Rendered 3DView.
Reuse `rna_Scene_glsl_update` here too.
2014-09-29 12:49:51 +02:00
160236acaf Fix crashing regression in Armature EditBone Select shortest path/Select Linked actions.
Dummy typo in some recent refactor I guess.

This is to be backported to 2.72 for sure!
2014-09-29 12:13:11 +02:00
9a19fd5811 Fix T41955: lamp error: double update for all lamps
This is actually also safe for 2.72 :)
2014-09-29 15:05:02 +06:00
ab8e709d67 Fix for wrong color space when image loader set both rect and rect_float
Quite safe for 2.72.
2014-09-29 14:34:37 +06:00
516dbaeb73 Fix for a build error with VS 2013. 2014-09-29 14:53:28 +09:00
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
5b027bd6dd Cleanup: remove smooth_ from 'smooth_factor'
redundant, just call factor as smooth modifier does.
2014-09-29 15:48:51 +10:00
0334be9f7f Don't error of sign-conversion for < gcc v4.8
Behavior is different and hard to keep building on older versions.
2014-09-29 11:01:33 +10:00
101a1dddae Fix T41995: Box selection - Edit mode - Header not updated. 2014-09-28 23:47:05 +02:00
da78dd78be Fix T25582: Add a 'smooth factor' to smooth_vertex BMesh op.
Based on code by wahooney (Keith Boshoff), patch itself was merely rewritten due to BMesh changes...
2014-09-28 20:00:54 +02:00
653b67055b Fix T41984: Can't use Render Image as Background Image.
Changes were actually pretty simple to make it work - set 'scene' member of image user,
and handle lock when acquiring/releasing ibuf...
2014-09-28 18:29:10 +02:00
2b69665c14 Transform: Provide descriptive error messages when wrong transform modes are used in DopeSheet 2014-09-29 04:23:44 +13:00
c63afbbe6f Typo and spelling fixes 2014-09-29 04:23:43 +13:00
bf8cd9011d Fix T41978: Shadow was not excluded from combined path unless shadow pass was rendered too.
Pretty straightforward, issue probably goes back to (pre)history!
2014-09-28 16:08:33 +02:00
221ef3c29f Install_deps: Fix stupid mistake in BUILD_NOTE.txt generation since last commit.
Reported by Thomas (DingTo) over IRC, thanks.
2014-09-28 15:47:03 +02:00
503484c978 GTest: polyfill2d
Collection of test cases from libGDX and our own tracker

Tests:

- combine triangle area matches polygon area.
- tris have same winding.
- tris don't have duplicates.
- correct number of internal & boundary edges.
- degenerate polys still give topologically correct output.

also checks all possible start-vert offsets, forwards and backwards.

optional OBJ output, for debugging.
2014-09-28 21:43:15 +10:00
fa1e6c5442 Fix T41986: polyfill fails with axis aligned verts 2014-09-28 21:11:16 +10:00
c729ce7e05 BMesh: remove point-in-face test for bisect
instead track inside/outside state while stepping over intersections.
2014-09-28 19:19:58 +10:00
07d161bb38 Comments: update for changed args 2014-09-28 19:19:58 +10:00
2cca83caf1 Fix T41981: Crash by Copy mask splines without splines 2014-09-28 14:37:33 +06:00
d41f99ac57 Cycles: Correct object flags bitfield, was missing negative scale there
It's quite a few of circumstances to be met to hit the case when render
wouldn't be correct.

Better to be ported to the final release.
2014-09-28 14:13:36 +06:00
839e24c0c3 Correct recent error in BLI_array_append_ret 2014-09-28 17:29:48 +10:00
4a92620d3e Comments: clarify math lib 2014-09-28 15:08:55 +10:00
7803cb09f3 BMesh: replace BLI_array_grow_one -> BLI_array_append_ret 2014-09-28 15:08:55 +10:00
0cf8ee1c03 BMesh: use stack for subdiv face data (no realloc) 2014-09-28 15:08:54 +10:00
5f267ab9f3 BLI_array: add BLI_array_append_ret
returns the newly appended item.
also make make it so reserve doesn't have to grow then shrink the array size.
2014-09-28 15:08:54 +10:00
a4c3b92294 BLI_Stack add BLI_stack_peek, BLI_stack_discard
also remove own incorrect assert
2014-09-28 15:08:54 +10:00
99ef213dcb Freestyle: minor docstring revision of Operators.reset(). 2014-09-28 11:17:32 +09:00
c900cd3bd8 Freestyle: Expose the Operators.reset() function to Python.
The Operators.reset function is exposed to the Freestyle Python API, which makes
it possible to combine multiple style modules into one file.

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

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-09-28 11:17:31 +09:00
21825c4359 Cycles: Avoid temp variable in camera-in-volume check
Was a left-over from some experiments, no need it with the current
implementation, and likely wouldn't need in the future.
2014-09-28 02:35:37 +06:00
53b05e4f06 Cycles: Cleanup of the SSS volume stack update code
Was a leftover after the changed scene_intersect() which used to
be ifdefed depending on the __HAIR__ in the original patch.
2014-09-28 02:19:17 +06:00
e1afaa02bf Fix T41974: blender ships vulnerable minilzo version
Update lzo library due to security issue

Update lzo to latest version. This fixes a security issue (reported in T41974)

This also fixes some (false-positive) valgrind warnings.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D803
2014-09-28 01:35:12 +06:00
8e4fdba19c Cleanup: typo 2014-09-27 20:32:12 +10:00
e237424046 Tracking: Make sure INC_SYS is always fine 2014-09-27 15:41:46 +06:00
5488630047 Add Face Region to 'Select-Similar' menu 2014-09-27 18:31:50 +10:00
95be98dd43 Comments: clarify BMLoop 2014-09-27 16:31:40 +10:00
84dfec76eb Tracking: Cleanup of the bundler script 2014-09-27 00:50:41 +06:00
640af5c274 Fix View3d background image display aspect 2014-09-27 01:32:25 +10:00
88d8cb73af Cleanup 2014-09-27 00:57:54 +10:00
e6edc1b09d Fix ocmpilation error with strict flags after the recent commit 2014-09-26 20:17:21 +06:00
2f4e70702c BMesh: select similar regions
Select operator that takes multiple selected face regions and
selects any number of matching regions (when they have distinguishing features to isolate them).

UI access next.
2014-09-26 23:06:20 +10:00
a5159b5fba Fix T41956, Soften brush does not work
Disallow blur radius zero (versioning error).

Also fix gaussian distibution for blurring

This is to be included in the final release.
2014-09-26 14:22:52 +02:00
8f6a993769 Fix T41962: Command-line without specified filename doesn't renders
Issue was caused by the launcher not dealing with slashes in the way
windows expects them to be handled -- last slash of the path considered
an escape character for the following qoute.

This is definitely to be ported to the 2.72 release.
2014-09-26 15:09:44 +06:00
d653500152 Tracking: Some minor improvements to copy-paste
- Deselect all existing tracks when pasteing, makes it
  easier to tweak stuff after the paste.

- Make first of the pasted tracks active.
2014-09-26 14:49:06 +06:00
5533257c4d Tracking: Add shortcuts for the copy-paste as well 2014-09-26 14:45:34 +06:00
6dab4ce598 Fix for missing shortcuts for mask copy/paste
It's a safe fix and would be real cool to have in final release,
it makes roto even easier than mentioned in the previous commit.
2014-09-26 14:40:27 +06:00
dcc281b74a Fix T41961: Crash by Copy n Paste splines to new mask without layer
It makes much more sense to ensure layer before pasteing, makes roto
as easy as it has never been before!
2014-09-26 14:37:30 +06:00
58a9569628 SCons: Don't compile libmv stub when libmv is actually enabled
Really weird linux and windows didn't have duplicated symbols error.
2014-09-26 14:28:04 +06:00
4832538ad0 Cycles: Keep STACK_MAX_HITS private in kernel_shadow
This way adding record_all for other things becomes easier and doesn't
lead to naming conflicts.
2014-09-26 14:23:48 +06:00
2854b93202 Fix for missing initialization of Freestyle RenderData parameters for new scenes. 2014-09-26 12:05:18 +09:00
fe42ceb281 Cleanup: unused 2014-09-26 10:34:20 +10:00
ff4a867dc0 Code style. 2014-09-26 02:04:40 +02:00
a3bb1dca25 Fix the skin modifier crashing when building without Bullet. 2014-09-26 00:04:10 +02:00
0b12e61040 OpenNL: modify SuperLU to use doubles rather than floats, for better precision.
This helps to improve the accuracy of UV unwrapping and laplacian deform for
high poly meshes, which could get warped quite badly. It's not much slower,
doubles are pretty fast on modern CPUs, but it does double memory usage. This
seems acceptable as otherwise high poly meshes would not work correctly anyway.

Fixes T39004.
2014-09-26 00:04:10 +02:00
87c27ef92f Fix use of uninitialized variable in mesh_get_mapped_verts_coords.
It did not cause an actual bug, this code path is never executed at the moment.
2014-09-26 00:03:57 +02:00
32f83a298c Fix build errors in atomic ops and warning in aligned malloc on OS X. 2014-09-25 23:59:38 +02:00
af069cd013 OpenGL fix: GL_COLOR_ARRAY is client state 2014-09-25 23:12:02 +02:00
2307bd7174 Cycles: Keep ccl_always_inline always inlining the stuff
It works around strange shading bug when building with MSVC.
If such weirdeness continues, we perhaps would need to use
proper inline flags all the time.

Anyway, lets see how things will behave now.
2014-09-26 02:03:49 +06:00
0929821590 Cycles: Accidentally inverted the logic of NDEBUG macro 2014-09-26 01:34:43 +06:00
4735fdc280 Cycles: Better feedback about experimental features being used
Instead of having a label which basically duplicated the information
about experimental feature set being used (which had a bug because
it claimed experimental GPU kernel is used even if compute device is
CPU btw) now we've got an enum item icon.

So once you switched to experimental feature set you'll see an
exclamation mark icon in the enum, so you know something might be
unstable or slow.
2014-09-26 01:02:28 +06:00
faf4f29cc0 Guardedalloc: Implement atomic peak memory update
Updating maximum requires a bit of a cycle which usually does 1 iteration only,
sometimes needs a bit more but seems there's no speed regressions.

For now the code is commented out. This way it's easier for others to verify
there's no speed regressions.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D626
2014-09-26 00:40:53 +06:00
37f3843ab0 Atomics: Add CAS (compare-and-swap) functions 2014-09-26 00:33:04 +06:00
b90d849171 Cycles: Fix for the MSVC which doesn't have default osteram constructor 2014-09-26 00:27:04 +06:00
38a54f4e01 Cycles: Make CUDA backend aware of sm_52 (Maxwell).
In order to compile the new kernel you need to specify sm_52 in SCons / CMake, and use CUDA Toolkit 6.5.19, from here: https://developer.nvidia.com/cuda-downloads-geforce-gtx9xx

Note: sm_52 is not enabled per default yet, so it won't be bundled with the Buildbot builds. That will be addressed later.
2014-09-25 20:07:50 +02:00
fe731686fb Cycles: Add support for cameras inside volume
Basically the title says it all, volume stack initialization now is aware that
camera might be inside of the volume. This gives quite noticeable render time
regressions in cases camera is in the volume (didn't measure them yet) because
this requires quite a few of ray-casting per camera ray in order to check which
objects we're inside. Not quite sure if this might be optimized.

But the good thing is that we can do quite a good job on detecting whether
camera is outside of any of the volumes and in this case there should be no
time penalty at all (apart from some extra checks during the sync state).

For now we're only doing rather simple AABB checks between the viewplane and
volume objects. This could give some false-positives, but this should be good
starting point.

Need to mention panoramic cameras here, for them it's only check for whether
there are volumes in the scene, which would lead to speed regressions even if
the camera is outside of the volumes. Would need to figure out proper check
for such cameras.

There are still quite a few of TODOs in the code, but the patch is good enough
to start playing around with it checking whether there are some obvious mistakes
somewhere.

Currently the feature is only available in the Experimental feature sey, need
to solve some of the TODOs and look into making things faster before considering
the feature is ready for the official feature set. This would still likely
happen in current release cycle.

Reviewers: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D794
2014-09-25 23:28:01 +06:00
ccc5983e2b Fix T39823: SSS scatter doesn't update volume stack, causing shading artifacts
Basically the title says it all, we need to update volume stack when doing ray
scatter for SSS. This leads to speed regressions in cases scene does have both
volume and SSS (performance in case there's no SSS or no volume should be the
same).

We might try optimizing kernel_path_subsurface_update_volume_stack() a bit by
either recording all intersections or using some more appropriate visibility
flags.

Reviewers: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D795
2014-09-25 23:17:45 +06:00
98153778b5 Expose show brush property for UV sculpting. 2014-09-25 15:38:32 +02:00
a2386b3e20 Fix previous commit rB34abb614f1344a6, which broke addons translations.
Ghash comp callbacks must return false in case a & b are equal!

Also slightly cleaned up gash code using those comp func,
since those return booleans now, let's compare tham against booleans!
2014-09-25 14:33:19 +02:00
d165b1b266 Cycles: Add method to dump current shader graph to the graphiz file
This is rather useful to see how good optimization went and so.

Currently uses quite simple notation: shader nodes are nodes on the
graph, connects between graph nodes are named by the sockets names,
so i.e. connection between BSDF and Mix would be named bsdf:closure1.

Could be improved in the feature to draw fancier graph, but it's good
enough already.

Use in the following way:
- To create graphix file call graph->dump_graph("graph.dot")
- To visualize the grapf call: dot -Tpng graph.dot -o graph.png
2014-09-25 17:08:32 +06:00
b3d414cc21 Cycles: Don't inline functions for debug CPU kernel
Nobody will use debug mode for benchmarks anyway and this way it's much easier
to set breakpoints on inlined functions to catch all their usages.
2014-09-25 17:08:32 +06:00
13d8671a1a Cycles: Add support of Glog logging
This commit makes it possible to use Glog library for the debug logging.
For now only possible when using CMake and in order to use the logging
the WITH_CYCLES_LOGGING configuration variable is to be enabled.

When this option is not enabled or when using Scons there's no difference
in Cycles behavior at all, when using logging and no output to the console
impact is gonna to be minimal.

This is done in order to make it possible to have debug logging persistent
in code (without need to add it when troubleshooting some bug and removing
it afterwards).

For now actual logging is not placed yet, only all the functions needed for
the logging are written and so.
2014-09-25 17:08:32 +06:00
058e3f087e Tracking: Decouple C-API module into more granular files
This way maintaining the C-API is a bit less tedious job
and makes code cleaner to follow.

Should be no functional changes.
2014-09-25 17:04:56 +06:00
34abb614f1 Fix ghash comparator used by translation
It now need to return bool whether element matched or not.
2014-09-25 17:04:56 +06:00
69e41d473c Quick Smoke: Only generate Fire/Smoke Nodes when actually used, this is a bit faster for the renderer. 2014-09-25 12:44:39 +02:00
42abfe4853 Update Ceres to latest upstream version
As usual brings fixes and speed improvements.
2014-09-25 13:04:17 +06:00
181e7f98b2 Tracking: Enable Schur specializations
This would give some performance boost when solving huge scenes,
amount of boost depends on particular scene.

For now enable all of the specializations, in the future we might
add some local patches and restrict only unneeded ones.
2014-09-25 13:04:16 +06:00
51d99ebf01 BMesh: type-check iterator data argument 2014-09-25 14:14:52 +10:00
a318f8ee9e Type checking macro: CHECK_TYPE_ANY
Compile time check a var against a multiple types.
2014-09-25 14:13:36 +10:00
21462410ee Move typecheck macros into own header 2014-09-25 13:07:17 +10:00
6f2f80887b GHash: use bool for comparison (simplify compare) 2014-09-25 06:16:37 +10:00
faaf0c719f OSX: ensure windows are restored at their saved position,
meaning here we need to take docksize into account
2014-09-24 20:55:48 +02:00
e18a74849c Fix T41933: Node Editor: Crash occurs with Select by Suffix
Wrong usage of `BLI_str_partition_ex_utf8`...

This is to be backported to 2.72 branch.
2014-09-24 20:26:21 +02:00
f1976cbde7 Fix T41939: Dupliface: Inherit scale doesn't update viewport render.
Render needs un object update it seems...
2014-09-24 19:48:16 +02:00
fc3753b8f6 gooseberry request:
Attempt to select closest bones when possible.

Occlusion query selection does't support this well because we can't
really derive depth information from occlusion tests. May be possible to
improve this somewhat in the future.
2014-09-24 18:22:02 +02:00
345b16601c Fix T41885, muting broken for Blender Internal nodes in rendering.
Nodes don't have muting callbacks any more, so now have to check the
flag to prevent overwriting values on the stack that they share with
inputs.
2014-09-24 14:29:07 +02:00
Martijn Berger
25ec0d97f9 make "tri_shader" an int instead of a float
tri_shader does no longer need to a float.

Reviewers: dingto, sergey

Reviewed By: dingto, sergey

Subscribers: dingto

Projects: #cycles

Differential Revision: https://developer.blender.org/D789
2014-09-24 13:34:28 +02:00
cbffc7499e Cycles: Shader Graph Optimization for Mix RGB nodes.
Basically the same as AC2c58e96685e8, but for Mix RGB Shaders, in case we use the Mix type. This way the node can be used as texture switch for example, setting the Factor to 0.0 or 1.0, without wasting extra memory / render time.
2014-09-24 12:52:36 +02:00
6dae643450 Correct for change in recent commit 2014-09-24 20:46:27 +10:00
de6a69fc79 Fix T41936: lender 2.72 Crashes on play on *Ubuntu 14.04
This commit is necessary to update to openal-soft 1.60.0 which
solves weird bug happening on ubuntu.

This is to be landed to the release branch.
2014-09-24 16:34:12 +06:00
1b5ec32ed9 Cleanup: Avoid some defines for scene_intersect(), related to Min Width. 2014-09-24 11:32:29 +02:00
d0bd474375 Custom Data API: redundant pointer-to-pointer arg 2014-09-24 18:50:29 +10:00
ff0b24c4e2 BMesh: slight speedup loop-of-verts iterator 2014-09-24 18:45:23 +10:00
3c0605c0ef BMesh: generic callbacks for mempool iterator 2014-09-24 14:55:30 +10:00
059e0dafb4 Cleanup: const correctness for BLI_sortlist 2014-09-24 14:55:02 +10:00
31833d2dc8 Cleanup: use const for read-only arrays 2014-09-24 14:55:02 +10:00
3a40aed3d5 Cleanup: use float versions of functions when in/output are floats 2014-09-24 14:55:02 +10:00
e7f495d8a0 Cleanup: bool 2014-09-24 14:55:01 +10:00
0297f1fdd5 Cleanup: de-duplicate text select logic 2014-09-24 14:55:01 +10:00
023ac217dd Cleanup: set var static 2014-09-24 14:55:01 +10:00
d87add8ebb Sphinx doc script, update for change in rsync 2014-09-24 12:51:22 +10:00
eb464eed57 Fix game engine not supporting material view.
Force textured view in that case. Also correct a few uses of the GLSL
flag in the viewport. Should only be relevant for textured viewport.
2014-09-23 20:40:27 +02:00
2e7c8f730c Update submodules to point to rc1 hash 2014-09-23 23:15:39 +06:00
362b0239fe Fix typo in previous commit
Buttons are too much close to each other on the keyboards!
2014-09-23 23:09:44 +06:00
3906782406 Fix possible buffer overflow in selection code. We want to copy the
number of selected data since the offset, not the offset!
2014-09-23 19:05:41 +02:00
e422e56db0 Move versioning code under the subversion check 2014-09-23 22:56:37 +06:00
c779f26a74 2.72 Splash
Image by Mike Pan, from the "Default Cubism" series.
http://blog.mikepan.com/tagged/DefaultCubism (includes blendfile)
2014-09-24 02:18:19 +10:00
7ae60703a2 Version Bump: Entering 2.72 rc state 2014-09-24 02:18:15 +10:00
55a44e4f30 Fix crash in text editor (wrap + syntax-highlight) 2014-09-24 01:12:55 +10:00
8ddc3d148e Cleanup: simplify check to draw syntax 2014-09-24 01:12:55 +10:00
82c90a44c2 Fix T41921: MapUV node alpha setting broken.
The UV values includes the image width/height now. To restore the
previous method as close as possible (even though it is not documented
anywhere how this is supposed to work), we have to ignore this scaling.
2014-09-23 16:59:12 +02:00
ed4075cb34 Fix T41259: Objects parented to non-armature objects cannot play shape actions in the BGE 2014-09-23 07:52:44 -07:00
d342f46682 D713: correct error /w braces (freestyle)
Differential revision: https://developer.blender.org/D713

Author: campbellbarton (Campbell Barton)
2014-09-23 22:35:15 +09:00
14ee107b1f Fix T41918, Missing operator in Node Editor Menus.
This operator was renamed in rB52d7c357781237ad6f128a6b6d550b34627c2a96
but the menu entry was not renamed.
2014-09-23 14:06:03 +02:00
2ed1b67835 Fix T41912, OpenCL compile error when building without __SVM__
Thanks to Vitaliy Filippov for the patch.
2014-09-23 12:54:16 +02:00
bdd515fee2 Macro VA_NARGS, increase max to 64 2014-09-23 20:29:18 +10:00
d871575be7 Cleanup: use struct names in ID comments 2014-09-23 20:29:18 +10:00
dbb9eba0fb Fixed border extension for the sunbeams node.
This ensures that the beams color does not darken along borders,
by using the last valid color of the ray as the border color (extending
colors in the direction of the source point).
2014-09-23 11:42:11 +02:00
d7ddb941a0 Projective painting:
* Make clone UI a bit more descriptive
* Don't set images to image editors that have a pinned image.
2014-09-22 11:01:50 +02:00
9b28ab26b4 Freestyle: disallow with fields (was crashing) 2014-09-22 18:04:16 +10:00
ef0883bc2b Fix for Freestyle crash in bordered animation rendering 2014-09-22 17:52:22 +10:00
f6db580041 Fix T41891: Alt+S can't save image
win32 BLI_path_abs expanded empty strings into "C:\\",
which made BLI_exists succeed (quite confusing).

Now match behavior on *nix.
2014-09-22 14:46:03 +10:00
c9a7789bcf Corrent recent commit: off by one error 2014-09-22 13:23:42 +10:00
d79e11fcc8 Fix image.save() - incorrect relative lib path 2014-09-22 12:38:40 +10:00
1004a7db97 Correct MAX_LIBARRAY define, assert when its wrong 2014-09-22 12:04:14 +10:00
61baf6e813 Fix T41902: Flipped persp/ortho region_2d_to_vector_3d
- Ortho result from view3d_utils.region_2d_to_vector_3d was flipped.
- Persp result wasn't normalized.
- operator_modal_view3d_raycast.py failed for ortho views.

Thanks to Philipp Oeser for the initial fix.
2014-09-22 11:11:45 +10:00
217095f622 Fix T41754, sunbeams node should return the unmodified source value at
the source pixel.
2014-09-21 18:12:15 +02:00
1ce09ff411 Tracking: Fix ground plane normal facing downwards 2014-09-21 15:55:46 +06:00
398ca952ab Fix T41890: Regression in new array modifier code, vnors were no more offset-corrected.
This is not needed when we tag normals as dirty, but in simple cases, if offset has some
rotation (or non-uniform scaling) component, vertex normals has to be corrected.
2014-09-21 10:12:26 +02:00
b96a3607dd Py Template: Set the active object in batch export
Some exporters (mdd for example), only use the active object
2014-09-21 13:20:46 +10:00
a0b3604337 Last minute artist feedback tweak: Fill tool should not use masking
apart from stencil(texture) and face masks.
2014-09-21 01:37:40 +02:00
1294fc7d93 Another minor correction, use "Mask" instead of "Stencil" so users can
correlate the panel to the mask tool.
2014-09-21 01:00:38 +02:00
3d93eb47f3 Minor polishing, add UV layer selection in image projection painting
mode.
2014-09-21 00:29:50 +02:00
6e56db8ce2 Paint system
* Add unified color settings to brush menus.
* Add notifier on fill tool from drag and drop to refresh icons
2014-09-20 23:47:10 +02:00
31da72545e Cycles: Backward compatibility code for the Clamp splitting in 2.70.
If an older file (< 270) had clamp enabled, with e.g. a value of 2.0, Direct and Indirect clamp are now automatically set to 2.0 as well.
2014-09-19 22:25:36 +02:00
0542442310 Cycles: Add a UI warning, in case the experimental GPU kernel is used.
The experimental kernel is slower and can cause issues on some cards still, so better communicate it well.
2014-09-19 22:25:35 +02:00
680d0db83c Fix T41875: Update issue in Timeline space
This space did not refresh on NC_OBJECT, ND_BONE_SELECT notifier...
2014-09-19 22:11:16 +02:00
23e2c97f63 Fix T35993, issue with viewport when using instances.
Not really sure what the issue here was initially (might have been a
driver problem) but looks like the issue is solved if we skip generating
a display list for clipped objects; Driver does not like a generated
list that is not drawn.

Now we try to clip the object always, not only when using display lists.
This means that display lists will only get generated if object is
actually visible.
Also used glPush/glPop for instance matrices since glLoad can cause
recalculation of inverses in the driver.
2014-09-19 18:04:12 +02:00
f2c8209756 Fix T40751 preview image not generated after baking.
A DAG_id_tag_update here is enough to fix the problem.
2014-09-19 15:36:49 +02:00
d76d3144b4 Install_deps: add an '--info' path option to store BUILD_NOTES.txt...
Still defaults to current dir!
2014-09-19 15:14:30 +02:00
07bb3641f5 OSX: make some more symbols global only, this may prevent clashes on older systems and is good for loading times anyway. 2014-09-19 15:00:15 +02:00
d804a5eaf4 Fix T41865: Fluid bake not possible in windows using a python script from the command line
Stupid missing variables initialization.
2014-09-19 17:34:50 +06:00
75b61f5346 Cycles: Remove unused Mix Shaders from the ShaderGraph, instead of only relinking.
Differential revision: https://developer.blender.org/D796
2014-09-19 13:21:25 +02:00
40a1c7b9c7 Cleanup: Indentation and Whitespace. 2014-09-19 12:57:09 +02:00
Nathan Letwory
d04e488273 Add texture coordinate export. 2014-09-19 10:44:42 +03:00
1c8d9cc4a9 Freestyle: Fix for irrelevant docstring showing up in Python API docs. 2014-09-19 14:11:32 +09:00
64ade99ecc Freestyle: Python API documentation updates.
Fixed dead references of API identifiers (e.g., freestyle.types.Interface0D)
due to relocations of the identifiers into submodules.  Also made various minor
revisions of mark-ups and typos.
2014-09-19 13:41:47 +09:00
98a78963be Fix crashes with timers.
Incorrectly accessing the menu pointer, set it to NULL before doing the
tests.

We don't restore the menu pointer because it is invalid by the time the operator ends.
2014-09-18 16:02:40 +02:00
070ce416b9 One last tweak to palette deletion code. It would correct active color
only when deleting the last color.
2014-09-18 13:03:02 +02:00
90c1afb020 Fix T41708, active palette indicator not refreshing when clicking
Issue, after a lot of blood sweat and tears, was found in
ui_but_update_from_old_block, where we restore a button to its old
values when possible. The problem here is that a1 and a2 are not really
meant to store temporary variables, because they tend to get overriden
and palette selection is one of those temporary states.

Instead, we now store the position of each button in the palette in a2
and pointer to the palette in the customdata pointer of each button and
use that to test if it's active. The positions won't change when
clicking so we are guaranteed that the old button won't override the new
one with garbage.

It's still hacky but it is better than testing button types when copying
old values.
2014-09-18 12:51:54 +02:00
44121442e9 Palette active color:
Use indicator color derived from color luminance for better contrast.
2014-09-18 12:20:34 +02:00
b247e19ff1 Palettes
* Remove some duplication in deletion code
* Fix crash when restoring file from last saved state.
2014-09-18 12:07:17 +02:00
e6271d2367 Palettes:
Avoid having an invalid active index if user deletes a color.

Also attempt to set active color on clicking (Not working yet but fix
coming soon)
2014-09-18 11:16:31 +02:00
90f75b8ce0 Cleanup: use static sets where possible 2014-09-18 17:45:31 +10:00
cf0ce0afc7 Fix for a run-time error in sphinx_doc_gen.py on Windows. 2014-09-18 15:48:17 +09:00
f87ca5f1c3 Fix for missing Freestyle sections in the Blender Python API documentation.
Freestyle sections of the API docs were empty due to Freestyle module reorganization
in commit rB6498b96ce7081db039354228213d72e8c70bd3aa.

Module __all__ property was added to submodules so as to properly exclude irrelevant
documentation elements such as mathutils.Vector.
2014-09-18 15:48:15 +09:00
3c28eecb6e Fix T41862: Autosmooth & multi-material glitch 2014-09-18 14:55:33 +10:00
87208fa699 Fix for edge-order flipping on subdividing wire
Extruding a subdivided edge would create flipped faces.
2014-09-18 13:39:10 +10:00
7e0a3baedc Fix T41861: Loopcut wire incorrect mode-switch
also didn't preview or select correctly.
2014-09-18 13:24:48 +10:00
8c3daab298 Cleanup: style, spelling 2014-09-18 09:37:49 +10:00
62893dc398 OSX/cmake: OSX 10.10 must be used with cmake 3.0.0 minimum, older thinks 10.6 is higher than 10.10 :) 2014-09-17 20:42:21 +02:00
59a38ccc42 Fix T41761, muting not working with texture nodes
This was disabled to fix T41349, however seems that if we don't pass
delegates for muted nodes everything work fine.
2014-09-17 19:05:35 +02:00
96ac3c2f7d Text Editor: reload missed adding new-line
Logic for load/reload was duplicated, Fix T28087 missed reload.

De-duplicate, also replace stat -> BLI_stat
2014-09-17 19:32:52 +10:00
0e0e528ea4 Cleanup: pep8 2014-09-17 18:36:17 +10:00
f0f398dcf3 Fix T41851: Useless ID selector UI element for sequencer's Sound strips
Currently, this pointer prop is not editable, and making it so does not seem
to be trivial (sound strip seems to use the filepath path, not the soundID pointer?),
so just hide the matching UI item.
2014-09-16 19:15:11 +02:00
c793042577 Fix T41840: bpy.context.object.collision.thickness_inner has no effect on cloth.
Only change the tip to stress that, in fact, cloth sim does not use inner thickness at all,
only outer one, through the Collision modifier, afaik.
2014-09-16 16:50:28 +02:00
e6828a71d7 Fix T41850: Knife fails with mesh behind view
Was using first vertex for depth (which could be anywhere),
now use the view-pivot.

was also copying uninitialized vector into knife_find_closest_* return values (confused debugging).
2014-09-17 00:34:48 +10:00
ba314683fb Fix T41849: Knife fails with small lens
knife cursor depth could be projected behind the view with a wide angle lens.
2014-09-17 00:34:48 +10:00
aba5fc29d5 Math Lib: use higher precision for vector printing
Only use for debugging, where precision is often important.
2014-09-17 00:33:38 +10:00
a41a38d11c Fix part of T41739: Solid 3DView not updating when enabling/disabling nodal material.
There are other similar update issues with mat nodes and solid 3DView, but need agreement
on proposed patch from other devs in this area first!
2014-09-16 16:19:23 +02:00
045b26dbf5 Fix T41843: World preview not updating when changing world.
NC_SCENE | ND_WORLD was not handled by buttons space...
2014-09-16 14:28:44 +02:00
1e948b251d Fix T41818: Missing refresh on Undo for nodes (mask example)
Added a special notifier now NC_WM|ND_UNDO in order to deal with such cases
and now compositor/image will refresh when undo happens.

There are much more ways to fail compo to update the resul, like undoing
while it's not visible and so, but as mont29 said -- let's at least fix
obvious crap in the workflow.
2014-09-16 14:44:47 +06:00
c9f0c20e48 Cycle: Add a bit of explanation why we're using such a dirty hack 2014-09-16 12:46:31 +06:00
3ac640b19e Fix T41842: Knife edge-snap, incorrect offset 2014-09-16 15:43:57 +10:00
775a54485b Math Lib: add mul_v3_project_m4_v3 2014-09-16 15:41:17 +10:00
8b87b2473a Fix last commit, making archive from source dir 2014-09-16 13:27:05 +10:00
106ea0b20b Cleanup: sync map_to_sphere, UNLIKELY xy zero case 2014-09-16 12:41:16 +10:00
13c5b0d546 Utility script to create release archive
- only include files known to git.
- includes all submodules.
- version extracted from BKE_blender.h for naming.
- MD5 checksum generated.
- 'make tbz' convenience target.

Script by Dan McGrath with own minor edits.
2014-09-16 11:44:00 +10:00
0c3ff81e79 Cycles: tentative fix get rid of os-specific issue in struct ShaderClosure ( aligment issues due order ) 2014-09-15 21:20:24 +02:00
03ce9882af Fix T41839, OpenCL error.
Also some style fixes, we don't do the "put as much as possible in 1 line" contest.
2014-09-15 14:22:39 +02:00
e5adeed40b Makefile: add 'update' convenience target 2014-09-15 14:11:14 +10:00
73c647622a Fix Cycles Standalone compile. 2014-09-14 17:40:34 +02:00
ece902ed9b Correct invalid sizeof in memset use 2014-09-14 18:50:59 +10:00
58305c9403 Sculpt: check mask is present before reading 2014-09-14 17:46:48 +10:00
a319469260 Correct last commit 2014-09-14 17:42:33 +10:00
432d274990 Cleanup & typo in assignment 2014-09-14 17:27:31 +10:00
1c9b80320f typo correction in the python API 2014-09-13 23:43:28 +02:00
fdb12ff564 Fix T41811: unreachable code in wm_keymap.c
There was also an issue with passing sl->spacetype here, for some reason...
2014-09-13 15:49:53 +02:00
e5b2e9cdd3 Fix T41800: Freestyle + Cycles panoramic camera not compatible, renders are incorrect. 2014-09-13 11:40:08 +09:00
bd671f1005 Fix scons leaving partially generated files when aborting 2014-09-12 22:56:37 +06:00
d939341b65 OSX: Fix cmake3 usage 2014-09-12 14:42:25 +02:00
26e476b7e1 Fix T41788: bmesh.utils.loop_separate, face_vert_separate() always return None 2014-09-12 10:16:50 +10:00
194f7f0ae8 Cleanup & remove redundant check 2014-09-12 09:53:31 +10:00
482354fd6a Fix T41780
Expose sliders for alpha over/under/overdrop
Now it's apparent that the effects work as explained in the manual.
2014-09-11 20:44:08 +02:00
72d6f254a9 Fix related to T41780, sequencer weirdness with alpha under effect
Fix alpha under equation according to porter-duff and user docs that
state that effect should invert he order of channels and reduce to alpha
over when factor is 1.0.

BTW, we don't really expose any factor here...lost feature from 2.49?
2014-09-11 20:16:12 +02:00
d919218482 Tracking: Fix wrong behavior of refining with previous frame matching 2014-09-11 20:43:41 +06:00
e38152bae4 Tweaks to setup trackign scene in order to fix usability issues
Patch by Sebastian Koenig
2014-09-11 20:00:24 +06:00
b762cc28ea Workaround for strict flags and release build compilation
@campbellbarton, it's really helpful to have strict flags enabled
for release builds as well -- especially when you're working in areas
which are heavily using least squares solvers.

For now made it so blender compiles, but it could be better solution here.
2014-09-11 19:33:37 +06:00
ed6942f9ad Fix wrong area of interest for movie undistortion 2014-09-11 19:33:01 +06:00
4bbe0c8cde Fix T41785: The combination of movie-distortion and lens-distortion leads to artifacts 2014-09-11 19:07:20 +06:00
89b62804dc Followup for last commit, we can break the loop, once we have a match. 2014-09-11 15:02:19 +02:00
61e58c378a Fix T41784, Re-enabling transparent shadows in Cycles doesn't work correctly 2014-09-11 14:51:48 +02:00
149ca1320b Fix non-deterministic editmesh normal orientations
- selecting a boundary edge would randomly point in/outside the face (now point away).
- selecting 3 verts would use the first selected edge as the tangent (now use longest).
- selecting 1 vert betweem edges, uses the edges to define the tangent.
2014-09-11 18:31:02 +10:00
507af00855 Freestyle: Fix for missing quality control on line rendering in Cycles.
Freestyle was using the default Cycles rendering settings (e.g., the number
of samples) and users could not change them.  Now all render parameters
(except for film_transparent) are inherited for Freestyle stroke rendering.

Problem report by Danny Grimm on Facebook, thanks!
2014-09-11 13:41:14 +09:00
7aedfd654b Fix T41778: Crash on animate boids xith a goal
No need to copy/restore entire object struct (just to read location)
2014-09-11 12:49:46 +10:00
bae66459df Fix crash in BLI_kdtree_range_search
Called memcpy with a NULL pointer,
causing the following NULL check to get optimized away.
2014-09-11 12:47:52 +10:00
229c2c14f7 Fix crash in project-from view without a brush or active object 2014-09-10 23:12:11 +10:00
7d9760d962 Text3d: assert for <0 len text
also add operator to test blacklist
2014-09-10 23:12:11 +10:00
3ad9027648 Text3D: fixes to selection
- clamp selection on entering editmode (Python may have changed).
- BKE_vfont_select_get no longer succeeds with an empty selection
  this caused many operators to go ahead and operate on zero size array.
2014-09-10 23:00:24 +10:00
64e955f522 Fix crash in active_paint_texture_index callback 2014-09-10 23:00:24 +10:00
20d6b792a4 Fix T41767: Memory free problem when console area copy fail.
Nice little memleak!

Patch by reporter (randon (Dun Liang)) with minor own cleanup, thanks!
2014-09-10 13:14:29 +02:00
965205d0e2 Fix two bugs with searchbox UI items.
First one, reported by Sergey, was searchbox not closing when validating it (enter or LMB click)
without any active item (we need to enable escapecancel here, to close menu too).

Second one was SEARCH_MENU_UNLINK variant not unlinking at validation when no active item.

Thanks a bunch to Campbell for help here!
2014-09-10 12:53:22 +02:00
1811ffff5d Fix T41112: Rotate manipulator (Trackball) + release confirm not working?
Usual same issue (unset property != set property to default value).

Review and minor edits by mont29 (Bastien Montagne).
2014-09-10 12:06:22 +02:00
9871788a15 UI: Disable operator search menu setting an unset state key key-input 2014-09-10 19:22:29 +10:00
6480fdcae4 Cancel edge-rip macro if no changes are made. 2014-09-10 16:20:08 +10:00
652eaf7723 Fix for mesh-inset modifying hidden faces 2014-09-10 16:02:24 +10:00
384220eeab Partial fix T41749
2d & 3d cached text now draws pixel aligned now.
2014-09-10 15:01:39 +10:00
ad0790f14e Partial fix for T41749
Tool-tips and header-text used a different pixel alignment from the rest of the UI.
This causes blurry text with multi-sample with NVidia.

Other text still needs the issue resolved (View3d info for eg)
2014-09-10 13:38:09 +10:00
1b94b3d49c WM: Add utility wmOrtho2_*** funcs
Currently there are inconsistencies with pixel alignment.
but this commit has no functional changes.

- wmOrtho2_region_ui for UI/Text.
- wmOrtho2_region_pixelspace for 2D drawing.
- wmOrtho2_pixelspace - when the region isn't used.
2014-09-10 13:37:53 +10:00
5202fca6d5 Fix for rna2xml
- follow references to Bone, Sequence, Node (non ID types) by name only.
  was causing infinite recursion.
- add support to skip individual class properties.

This can now write an entire blend-file.
2014-09-10 11:11:15 +10:00
95db507eff Curve: Remove assert in BKE_curve_bevelList_make
Failed on any cyclic poly line.
2014-09-10 10:48:01 +10:00
17f120e76c Usual UI messages fixes... 2014-09-09 19:55:11 +02:00
3ac70665b0 Fix crash reading ParticleEdit.is_editable 2014-09-09 22:07:55 +10:00
4dd74706ab Add flag for bmesh docs 2014-09-09 22:07:31 +10:00
1abcbe775b Fix T41445: Inset creates separated UV's 2014-09-09 18:54:50 +10:00
03c889683a Cleanup: const correctness, no change to generated code. 2014-09-09 17:17:57 +10:00
e18906bda2 remove invalid comments 2014-09-09 12:21:28 +10:00
3c00efcf69 Warn when --engine arg isn't found 2014-09-09 01:44:41 +10:00
ae99764385 CMake: Add missing WITH_OPENIMAGEIO define 2014-09-09 01:44:41 +10:00
8837bb297b Fix crash happening with external engines and dependent objects in an invisible layers 2014-09-08 20:36:40 +06:00
b1490e39dd Fix T41744: Hidden keymap properties uneditable
For UI & operator toolbar this makes sense,
but for keymaps - hidden props can make an important difference.
2014-09-08 21:25:03 +10:00
876ccc8373 Fix T41573: Compositing reroute converts floats to red color
At compo level, only skip data type conversion if both ends of a link do not require it.

Thanks to Lukas for advices and review.
2014-09-08 12:28:51 +02:00
9c19ad1f79 Fix T41703: Blender crashes trying to load character file.
Core of the issue is that pointcache handling in depsgraph were (re-) tagging
for update some objects on hidden layers, when all their dependencies remained
untag.

Since we do not want to update objects on hidden layers, take this data into account
when flushing pointcache.

Investigations and org patch by self, reviews, advices and final patch by sergey, many thanks! :)
2014-09-08 11:49:55 +02:00
feba2d3edf Attempt to fix compilation error on ubuntu linux 2014-09-08 14:29:34 +06:00
5850ee0a6a Fix T41746: WPaint: gradient+mirror fails 2014-09-08 18:03:44 +10:00
4e732b9860 Fix building as Python module (manpage-generation) 2014-09-08 11:22:40 +10:00
da3be518b6 Comment out SVM fresnel_conductor() function for now, still unused. 2014-09-07 21:13:00 +02:00
aa8d25bf09 Cycles / OSL: Add a conductive fresnel shader template.
This adds a fresnel conductive OSL preset to the Text Editor. Based on a patch by Lukas Stockner.
Differential revision: https://developer.blender.org/D145

See the differential for details.
2014-09-07 18:28:59 +02:00
2633d0fac5 Several tweaks for Quick Smoke:
* Improved Cycles fire, patch by Gottfried Hofmann. Differential revision: https://developer.blender.org/D777

* Added Smoke + Fire type to the operator too.

* Cleanup.
2014-09-07 17:01:24 +02:00
792de1c25b Update readme for Blender 2.72. 2014-09-07 16:38:10 +02:00
3fec3f0bce Fix T41737 using append from menu will result in error message
message in terminal was: RNA_boolean_get: WM_OT_append.relative_path not found.
Added check for existence of the relative path property which was removed from append
since it is not needed and used.
2014-09-07 16:05:44 +02:00
7b12c569d4 Some updates for Quick Smoke / Cycles.
* Add Density multiplier.
* Use Smoke color attribute.

Patch by Gottfried Hofmann, with some small tweaks by myself.
Differential revision: https://developer.blender.org/D776
2014-09-07 15:26:24 +02:00
28cce475f2 Fix for line style shader nodes also shown in the Add menu of other shader types.
Problem report by Nahuel Belich through Facebook, thanks!
2014-09-07 22:16:24 +09:00
65da19b0cd Fix T41740: Different behaviour of custom hotkey
Quick fix, this is actually a demonstration of why we should use modal keymaps!
We can give any event to *start* the op, but then hard-code how to *end* it... tsk.
2014-09-07 14:45:05 +02:00
9460fe3fa0 Fix T41419: Quick Smoke doesn´t work with Cycles
Now the Quick Smoke operator creates a basic node setup for smoke and fire. This could be made more fancy still, but that's for later. :)
2014-09-07 05:15:41 +02:00
2e560ebb95 No need for try/except in D766 2014-09-07 12:05:44 +10:00
50d6067f4e Cycles: Several fixes for Presets.
* Fix caustic properties, was not updated.
* Remove wrong items, leftovers from panel splitting.
* Add missing items. Even if the bundled presets do not set those, a user expects that all properties inside the panel are taken into account, when adding a new preset.
2014-09-07 04:03:23 +02:00
1ff83d8a37 Cycles: Fix Caustic tooltips.
Now that the option has been reversed, the tooltips should be changed too.
Thanks to David Black, for bringing this up!
2014-09-07 01:36:00 +02:00
3a47c1a9d3 Fix T40507: Blender Internal Render's Gather don't use node's emit color.
Node was simply ignored by occ shading (noted as TODO), though it's a mere matter
of a very few lines of code, nowadays... Just copied from similar task in bake code.
2014-09-06 22:50:31 +02:00
e44c49d89d Py Mathutils: add invert_safe() and inverted_safe() to Matrix.
Those two mimic our BLI invert_m4_m4_safe - they add a small offset to diagonal values,
in case org matrix is degenerated, and if still non-invertible, return identity matrix.

Org patch by me, final enhanced version by ideasman42, many thanks!
2014-09-06 14:58:38 +02:00
f670a8aeaa Fix T41709: Bump not rendered correctly behind transparency using Branched Path Tracing 2014-09-06 18:16:38 +06:00
1b319669d0 Cycles: Workaround cuda 6.5 compiler bug with sm_50 2014-09-06 15:10:17 +06:00
1083da4bde Fix T41730: Knife Cut fails on concave faces 2014-09-06 18:39:59 +10:00
f7945c659b Knife: remove redundant allocations 2014-09-06 18:39:59 +10:00
769ba42899 Cycles: Fix for the BSDF evaluation init 2014-09-06 14:30:58 +06:00
671f75a12a Math Lib: Add copy_m2_m2, unit_m2, zero_m2 2014-09-06 11:29:27 +10:00
7971e441c1 Knife: no need to find the face-loops
Just check if verts are used in the face.
2014-09-06 11:28:06 +10:00
8243c55f14 Cycles: Split caustics option, to allow separate control for Reflection and Refraction caustics.
This way artists can only disable/enable refraction or reflection caustics.
See Cycles logs for an example: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Cycles

Differential revision: https://developer.blender.org/D766
2014-09-05 20:39:35 +02:00
cdd1d5a93c Cycles: Initial support for volume ray visibility.
This adds a new "Volume Scatter" option to the "Ray Visibility" panels and can be used to e.g. exclude lamps from having an influence on the volume. See release logs for an example: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Cycles

Differential revision: https://developer.blender.org/D771
2014-09-05 16:17:39 +02:00
d5fa1f8a52 Cleanup:
Move projection paint data ensure function to projective texture
painting. Also, cleanup draw data when generating a new image for
painting in image paint mode.
2014-09-05 15:48:45 +02:00
91006d5a7a Fix T41723, different tints in texture painting.
Blend brush color with texture before converting to srgb
2014-09-05 15:48:45 +02:00
5a8644bd97 Fix T41721: Muting render layer input nodes has no effect 2014-09-05 16:02:20 +06:00
4776d80aaa Disable msvc runtime fma3 use in an attempt to fix msvc 2013 + windows 7 issues.
MS report:
https://connect.microsoft.com/VisualStudio/feedback/details/811093
2014-09-05 11:09:54 +02:00
220fcd43a9 Fix uninitialized variable use 2014-09-05 11:00:52 +10:00
a7f87cfc0d Cleanup: de-duplicate link/append props 2014-09-05 10:16:11 +10:00
b2de885b4e Fix broken maya/max keyconfigs (again) after link/append separation. 2014-09-04 20:32:58 +02:00
1871c08160 Fix T41716, crash with image mode when painting without materials.
* As always, make sure all slots of the object have a material
2014-09-04 20:23:03 +02:00
84a7a578e2 Fix T41715 fill tools not respecting alpha lock 2014-09-04 20:04:16 +02:00
61914883ff Separate operators for Link and Append.
Since the choice to link or append has been removed in the file browser operator panel,
there was no way to tell whether as a user you were linking or appending.
To fix this the proposed patch separates the operators.

Reviewers: campbellbarton, carter2422, venomgfx

Subscribers: fsiddi

Maniphest Tasks: T41593

Differential Revision: https://developer.blender.org/D770
2014-09-04 19:35:18 +02:00
94b29cd8b4 Fix T41714: Maya and 3DS keymaps throw error when.
Change in SEQUENCER_OT_select's left_right parameter...
2014-09-04 19:17:57 +02:00
1fb50c5ca7 Attempt to solve T41708,
Refresh always when clicking on a palette color (state here may be same
as state of button, not causing a refresh as it should)
2014-09-04 17:21:01 +02:00
a1578f08dc Metastrips: disallow making a metastrip with only one strip present. 2014-09-04 16:59:30 +02:00
9c95fd0a98 Fix T41713: Lattice - Influence vertexgroup in curve modifier gets ignored
This was never implemented, actually... Was also the occasion to rework a bit
`curve_deform_verts()`, code there was sometimes needlessly complicated and slowish
(like getting weight from dm vertex per vertex, instead of whole array at once...).
2014-09-04 16:43:52 +02:00
3af9015139 Fix related to previous commit: do not store panels (state, position, etc.) in default startup.
In this case, we want to use defaults as defined by UI code (among other, from order of registering),
there is no point in storing those data in factory startup.
2014-09-04 15:06:24 +02:00
bf54ed0c7c Fix T41704: 2.71.6 no longer reading user ui panel arrangement from earlier saved blend files.
This reverts rB52c06440d8e51c8661a679bcb33742666ce8dbf9 and rBe40d8258bb46926a1aecf51236822532397993f3
(tabname is old 2.4x tabed panels system, *not* new 2.7x tool tabs!).

Also disabled (#idef'ed) everything regarding tabname/tabed panels for now, we may even remove it completely,
would make things clearer imho.

Note files saved with 2.71.6 up till now would have two versions of some panels in store (with two different
values for their tabname), can give some order oddities in those cases, which have to be fixed by hand...
2014-09-04 15:06:24 +02:00
15d39eaac1 Write Compressed blend files directly
Writing compressed files would write the uncompressed blend, then re-compress on-disk.

Use a wrapper for open/write/close commands
2014-09-04 21:54:24 +10:00
fbed2047c8 Fix wrong track of the memory when doing device vector resize before freeing it
This is rather legit case which happens i.e. when having persistent images enabled
and session is updating the lookup tables.

Now device_memory keeps track of amount of memory being allocated on the device,
which makes freeing using the proper allocated size, not the CPU side buffer
size.
2014-09-04 17:25:12 +06:00
5e3b63a22b Fix T41463: Mirror Modifier breaks Automatic-Weights in weight-paint mode
The problem was it used copied verts on the opposite side.
2014-09-04 17:53:10 +10:00
94f35ecf1b Fix setting Curve-handle type moving the wrong one
Issue noted in T35952, now if you convert a free handle to an aligned handle,
it will move the selected handle.
2014-09-04 16:14:02 +10:00
bbf2db82a2 Fix View3D 'Auto Keying' alignment (when dpi!=72) 2014-09-04 15:56:40 +10:00
4987eb4dc9 Fix T35952: Switching a single handle to free would lock the others alignment 2014-09-04 15:43:21 +10:00
ca8d026fef Fix T40595: File broken after "make local->all" 2014-09-04 14:14:42 +10:00
c6b96c241b Vert-rip left an invalid selection with (>1 verts)
Now report the error and fail early.
2014-09-04 12:15:52 +10:00
c670ceb562 Cleanup: Code deduplication for similar passes. 2014-09-04 01:00:40 +02:00
f7062ff3ed Fix T41693: Volumes get brightened with extra volume samples on GPU + BPT 2014-09-03 21:28:43 +06:00
c5a2c08dd9 Code cleanup, defined shared stroke properties to one central function. 2014-09-03 14:09:05 +02:00
728687c571 Texture painting:
Free draw objects instead of tagging object update and doing
recalculation of derived meshes. The reason is that if user deletes all
slots and tries to paint, the system will invalidate the cached in
projection painting derivedmesh. This will promptly crash. Invalidating
the draw objects only is also much cheaper.
2014-09-03 12:14:09 +02:00
16dc208ef6 Expose "select all strips to left/right" in the select menu.
Shortcut is ctrl click but might not be discoverable, as we found out
the hard way on gooseberry.
2014-09-03 11:18:44 +02:00
c1ae899463 Fix T41691: Blender-internal crash (counting edges) 2014-09-03 17:33:37 +10:00
f71da49bb8 Fix T41695: No label in UV/Image editor waveform mode
That's indeed rather creepy to show only icon for the enum where
all the elements have the same exact icon.
2014-09-03 12:44:34 +06:00
8bda880b57 Skip distortion of the grease pencil associated with the track 2014-09-03 12:40:47 +06:00
802ac0cb8f Fix FileSelector dividers disappearing
Was clamped to short
2014-09-03 16:18:31 +10:00
5d31f5792e Fix FileSelector drawing missing some files 2014-09-03 16:04:12 +10:00
bae31de4a4 Fix set black/white points didn't operate in the linear space 2014-09-03 11:49:29 +06:00
00acf4b816 Cleanup: Use function call and delete obsolete comment. 2014-09-02 23:26:49 +02:00
1448082ba3 Add missing update tag to material when adding texture slots. 2014-09-02 18:57:10 +02:00
5f76dea30d Fix erase alpha not having any output on viewport after last commit. 2014-09-02 16:48:43 +02:00
3733eb6340 Fix T41682.
Bring back shading in texture painting.

This works now but it uses 3 texture units instead of two. Most GPUs of
DirectX 8 (OpenGL 1.4 should cover that) functionality even should have
those, but some old GPUs might not work with that. In any case, I hope
we will be moving to OpenGL 2.1 requirement soon anyway where 4-8
texture units are usually the norm.
2014-09-02 15:57:38 +02:00
f6b4b12961 Better fix for T41464: Material Boundary bug in Freestyle.
The problem addressed here is that there was no mean to check if an iterator
points the last of the elements being iterated over.  Such checking is necessary
to reliably dereference the iterator (i.e., calling the operator*() method of the
underlying C++ iterator object).

Now Interface0DIterator and StrokeVertexIterator have an .at_last property
to check if an iterator points the last element.  Using this new API feature,
the present commit partly reverts the previous commit rBeb8964fb7f19 to
better address T41464.

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

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-09-02 21:24:41 +09:00
0c1ff4b75b Hacky fixes can apply to more then one compiler.
TODO: really get rid of any and all bare #include <windows.h> in
the codebase in favour of central BLI_winstuff.h.
2014-09-02 13:42:00 +02:00
a1c628e503 Fixes localview and view-local layers
- Drawing grease pencil fail without scene-lock.
- Converting to curve failed without scene-lock.
- Outliner drag into viewport failed with local-view.
2014-09-02 21:20:31 +10:00
daa17ef402 Hacky fix for cleanup rBc23733d290c095ab77310b55c75293465891d5b8 2014-09-02 12:22:55 +02:00
d4fe34b1c0 A bit of a code cleanup in GLSL shader 2014-09-02 15:58:38 +06:00
ac1ddb6e64 Support window coordinates in cycles nodes. 2014-09-02 11:49:14 +02:00
bf0f3a04cc Fix second part of T41068 -- reflection mapping was wrong
Few things:
- reflect() takes arguments in this order: N, I, it was swapped
  in the previous code for some reason.

- Normal and view vectors are to be normalized. For the view
  vector we're now using shade_view() in order to deal with the
  ortho camera. However, Cycles does not support ortho camera
  for reflection, but this is easy to do in a separate commit.

- Reflection vector is to be in the world space. Kudos to
  Antony Riakiotakis for figuring this out!
2014-09-02 15:41:50 +06:00
8230ea4858 Fix editmesh-connect with adjacent vert selection
The result of running connect wasn't deterministic when adjacent vertices selected.
2014-09-02 16:38:31 +10:00
6b3ec0c515 Fix editmesh-connect with hidden geometry
- ignore hidden faces & verts
- when cutting a pair, select edges co-linear to the cut.

Also support creating a buffer from hidden elem's even if BMO_FLAG_RESPECT_HIDE is enabled.
(if the hflag used includes BM_ELEM_HIDDEN).
2014-09-02 14:35:56 +10:00
39c7ccca1e BMesh: report errors for invalid operator use
- invalid htype's into a slot
- duplicate htype's args to BMO_op_vinitf
2014-09-02 13:57:39 +10:00
4f7caabe9d Fix T41665, stroke jittering used when setting the clone cursor 2014-09-01 21:11:48 +02:00
1979ae3a42 Events: Fix ISKEYBOARD macro seeing INPUTCHANGE, WINDEACTIVATE and TIMER events
as keyboard ones!!!

Note: better solution would be to move those 'internal' events to the 0x5xxx area,
but need to talk with the team to be sure this won't break something first.
2014-09-01 17:18:30 +02:00
c23733d290 Cleanup: Event defines -> enums.
Also made all event type values as hexadecimal (mixing decimal, hexa and char values
is a nice way to make mistakes)!
2014-09-01 17:08:33 +02:00
575cbf0172 Fix opencollada not compiling after recent changes. 2014-09-01 14:33:05 +02:00
43303625af Expose preview setting operators on menus for sequencer and timeline
(could not find them anywhere before)
2014-09-01 14:22:42 +02:00
6212b7302c Cycles: Rebuild BVH from scratch if loading cache failed
Before this Cycles used to try using the cache even so it knew for the
fact that reading it from the disk failed. This change doesn't make it
more stable if someone will try to trick Cycles and give malformed data
but it solves general cases when Blender crashed during the cache write
and will preserve rendering from crashing when trying to use that partial
cache.
2014-09-01 18:05:10 +06:00
e8f3fa99de Support more object types scene-scale (on creation)
- lamp
- camera
- font
- empty & effector

Also fix inconsistency with apply transform
(modified shape-keys for meshes but not curve/lattice)
2014-09-01 21:01:11 +10:00
d91916725d Fix T41620
Issue here is that indices of edges will be incorrect when index of
vertices forming the edge is 3-0 or 2-0.

There are still issues here at uv edges where seam polygons intersect
each other but to solve that we need a better pass that detects uv edges
and pushes polygons along the "normal" of the edge instead of scaling
the polygon itself.
2014-09-01 12:35:10 +02:00
35bc266de7 Cleanup: Silence compiler warning. 2014-09-01 02:49:28 +02:00
ab6f4491ea T41650
Typo in material localization code.
2014-08-31 16:49:26 +02:00
87c76ddaff Fix T41657: Text Editor highlight bug when a very long line scrolls
Based on patch by randon (Dun Liang), but no need to recompute lengths here, we already have the info.
2014-08-31 16:09:28 +02:00
Dalai Felinto
0b4da966f9 Bake-API: more MEM_callocN replacements by MEM_mallocN
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D561
2014-08-31 14:44:42 +02:00
1f19a093aa Cycles: Always assign the proper value for volume bounces.
I don't see a reason not to do this, and this also fixes update problems when 3D View rendering is running (no volume shader), and then a volume shader gets added.
2014-08-31 14:00:51 +02:00
cebf728250 Add sqlite3 dll's on windows.
Fix T41144
2014-08-31 09:08:07 +02:00
Dalai Felinto
885f862ce8 Fix preview icons update script to work in OSX 2014-08-31 01:17:45 +02:00
094433faa9 Fix crash part of T41561: custom properties don't see in drivers windiw
Do not try to access ID_OB data from an ID_MA one (or anything else)!
2014-08-30 22:02:05 +02:00
204e1e0a18 Fix Cycles Integrator presets, not taking Volume bounces into account. 2014-08-30 16:48:44 +02:00
16791fbecf Fix T41642: Zoom View hotkey: Zoom Position Y doesn't working
Hide zoom settings that have no use in UI/shortcuts definitions.
2014-08-30 16:38:41 +02:00
ec76d47a48 Use UI_BUT_ prefix as other flags do 2014-08-30 17:11:07 +10:00
526ae635d1 Fix T41629: Won't open blend files with non-Latin charasters in the name 2014-08-29 23:06:11 +06:00
cba2e0afa7 Fix T41630: Edge Split Modifier don't work anymore when a Array Modifier is after the Edge Split Modifier added.
Dirty normals flag has to be passed to new dm...
2014-08-29 18:07:54 +02:00
bfd466f34c Fix wrong result with sharpen brush on float images in projective
painting.
2014-08-29 17:18:06 +02:00
78b79a91f2 Fix T41596 GLSL error on ATIs after clipping workaround commit.
This was a little difficult to track down, basically it was a missing
escape sequence that only manifested itself when GPU did not support
bicubic filtering.

Extra:

* Fix memory leaks when an error occurs in shader compilation
* Display full shader when a compilation error occurs. Makes it easier
to diagnose if problem is caused by a syntax or compatibility error.
2014-08-29 16:23:50 +02:00
c1ec73f522 Fix T41631: Connect acts on unrelated vert 2014-08-30 00:13:56 +10:00
cb7d430c19 Fix for blender.exe -r being registering blender-app.exe 2014-08-29 17:36:59 +06:00
d438208474 Cycles: Fix triangle ribbons hair in viewport and ortho camera
There were several issues involved into triangle ribbons hair:

- Even for the viewport rendering the blender scene camera was
  used for orientation. This made hair triangles oriented to
  the scene camera, not to the viewport camera.

- Triangle orientation was actually supposing the camera is
  perspective. Triangles weren't oriented properly for the
  orthographic camera resulting in different hair width across
  it's length.

This issues are solved now, but there are some related TODOs:

- Rotating viewport doesn't re-orient the triangles, so after
  viewport navigation hair might not look correct. However,
  with this fix toggling viewport render (to force hair sync)
  makes viewport render correct.

  This isn't so much trivial fix, would require making BVH
  aware of the dynamic triangle orientation, so they get
  properly oriented without full hair re-sync.

- Panorama camera behavior didn't change but looks like it
  should, however not really sure atm what's the right thing
  to do here.
2014-08-29 16:44:16 +06:00
1d9e69f146 Fix T41617: Color ramp crashes user preferences
Color ramps with no handles caused issues.
2014-08-29 16:56:19 +10:00
55cacb2e63 Add callback for starting a render-job
We had complete/cancel, but no matching init for rendering,
render_pre/post callbacks aren't always usable.
2014-08-29 16:17:31 +10:00
167182613d Remove redundant casts 2014-08-29 16:16:28 +10:00
8a215669e8 Cleanup 2014-08-29 15:35:19 +10:00
1dddad93c4 Fix Text editor home/end keys when theres a selection 2014-08-29 14:53:12 +10:00
f823ea1ac4 Solve another case of invalid indices. 2014-08-28 23:26:52 +02:00
d1c9101642 Fix some crash cases after last commit 2014-08-28 23:16:07 +02:00
b583894592 Fix another part of the issue T41604
Missed that part of the report somehow, thought it's all about world..
2014-08-29 02:53:25 +06:00
cf3ce7322a Texture painting:
Include explicit control for texturing:

This commit introduces a painting mode option, available in
the slots panel. The default value "Material"  will create slots from the
blender material, same as just merged from the paint branch.

The new option "Image", will use an explicit image field that artists can use
to select the image to paint on. This will should allow painting regardless
of the renderer used or for use in modifiers.
2014-08-28 20:41:05 +02:00
512b738352 Texture paint system:
* Add ability to choose blend type and enable/disable toggle for each
slot for blender internal.
2014-08-28 15:50:42 +02:00
2b15c012c2 Followup for the previous commit: apparently for CMake py files are hardcoded 2014-08-28 19:49:20 +06:00
21a7433faa Fix T41473: Cycles volume rendering is too dark
The issue was caused by the changed defaults from the Cycles side.
Because of those properties being saved as an IDProp and not being
saved to the file, every change to the defaults would ruin someone's
day updating the values.

Added a bpy.app.handler.version_update which is run after the regular
do_versions() are done and could be sued by the scripts to apply
versioning code on their settings.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D761
2014-08-28 18:59:24 +06:00
e39a4961b5 Fix T41602: Camera draw size ignores scene scale 2014-08-28 20:27:52 +10:00
85945a8b86 Add debug information for maximum opengl limits in system info
generation.
2014-08-28 12:19:59 +02:00
Dalai Felinto
079689107a Bake-API: silencing warnings (and fixing a potential memory-access crash) 2014-08-28 12:14:24 +02:00
3a200d66ae Fix T41604: Double updates of world and material texture settings
The issue was caused by the world localization setting the ID_WORLD
type update tag. Now using a function which doesn't pollute the library
and which doesn't set update flags.
2014-08-28 15:45:05 +06:00
d84c15696b Fix T41601: Correlated multi-jitter with high samples "hangs"
Issue was caused by the precision issues which made sdivm by 1 under
it's actual value. We can try to do some eps magic, but from the tests
on laptop and desktop doing integer division is not slower than using
floats here.
2014-08-28 15:15:59 +06:00
6891f1c9e0 Fix T41266: Copy and paste operation on f-curves do not respect keyframe tangent handles...
Added an extra option to `insert_bezt_fcurve()`, to allow full override of existing
keyframes when pasting (in this case, we do not want to inherit handles from existing
curve!).
2014-08-27 21:36:39 +02:00
63b981bf9b Changing render engine now refreshes the texture paint display better.
Also avoid looping over all objects for texture paint checks when a
material changes, only check active object.
2014-08-27 19:15:41 +02:00
Dalai Felinto
ef2a38a966 Bake-API: fix potential error for non square images
Not reported, I wonder why, this should be easy to reproduce. I guess
people really like their textures square ;)
2014-08-27 18:57:11 +02:00
be585a2594 More fixes for renderer material detection 2014-08-27 18:52:17 +02:00
a77b46fbe6 Do not add add/remove textures in texpaint if renderer is not blender
internal.
2014-08-27 18:16:50 +02:00
fa6080bf33 Support better precision mode for angle properties in radial operator
(holding down shift key) by using the new dial functionality.
2014-08-27 17:47:37 +02:00
8c14651292 Refactor sculpt rotate tool to use new dial mechanism. 2014-08-27 17:30:01 +02:00
7d5c16c085 Add a reusable dial mechanism to get rotations around a center and an
initial position. The system supports arbitrarily big angles.
2014-08-27 17:29:15 +02:00
70a49423d9 Do not add new images if material uses nodes, even for blender internal 2014-08-27 16:09:52 +02:00
17ab65d1bb Fix windows buildbot rebuilding cubins on both compile and pack 2014-08-27 20:08:50 +06:00
57ccd29cae Only calculate texture paint slots from mtex if renderer is blender
internal.

This should eliminate some confusion when people use external render
engines.
2014-08-27 15:52:24 +02:00
4e3f76e06b Fix T41406:
Disallow kernels bigger than 2x2 for blur/sharpen in projective painting
due to performance considerations.
2014-08-27 15:07:57 +02:00
fe7de92c47 Revert "Fix part of T41406"
This reverts commit 7c7cb01aa5.

The smoothing weights will cause shifting in the image if not calculated
as they were in the branch. Solution for better performance will be to force-clip
kernel to a square of size two for projective painting.
2014-08-27 14:44:36 +02:00
2a15ecdb5d Do not allow empty material slots in texture painting.
Any mfaces using those materials will cause a crash.
2014-08-27 13:54:02 +02:00
4f4997cb03 Disable clipping on ATI cards not supporting the clipping workaround to
avoid software fallback.
2014-08-27 11:23:28 +02:00
3f2cf6da6f Cleanup: remove _DEBUG define usage 2014-08-27 18:59:32 +10:00
Dalai Felinto
146ed67d55 Cycles Aperture Ratio - option to produce anamorphic bokeh
Thanks for Aldo Zang for the help with the fix for the panorama/fisheye
depth of field calculation and the overall math.

Reviewed By: sergey, dingto

Subscribers: juicyfruit, gregzaal, #cycles, dingto, matray

Differential Revision: https://developer.blender.org/D753
2014-08-27 10:51:50 +02:00
9b9ddb4669 Make SCons's DEBUG/_DEBUG consistent with CMake
Also move this to a generic place in SConstruct instead of having this
defines in 6 different configurations.

Should not be functional changes, but please verify all the platforms.
2014-08-27 14:49:47 +06:00
e40d8258bb Tabname should be fixed here as well. 2014-08-27 10:36:04 +02:00
52c06440d8 Fix for uiPanelFindByType comparing wrong member 2014-08-27 12:05:46 +10:00
24ea3ab1a9 Cleanup: intrin.h is already included via util_optimization.h. 2014-08-27 03:22:36 +02:00
c0d9ef65e9 UI: Warn when using fallback category
Scripts should be updated.
2014-08-27 10:55:15 +10:00
e71f2fc3ba Cleanup 2014-08-27 09:52:24 +10:00
e827d904ae Move include outside of the CCL namespace 2014-08-27 00:11:06 +06:00
db844959d1 Add operator that deletes a texture paint layer for blender internal. 2014-08-26 19:00:25 +02:00
fb3f32760d Cycles: Add an experimental CUDA kernel.
Now we build 2 .cubins per architecture (e.g. kernel_sm_21.cubin, kernel_experimental_sm_21.cubin).
The experimental kernel can be used by switching to the Experimental Feature Set: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Experimental_Features

This enables Subsurface Scattering and Correlated Multi Jitter Sampling on GPU, while keeping the stability and performance of the regular kernel.

Differential Revision: https://developer.blender.org/D762
Patch by Sergey and myself.

Developer / Builder Note:
CUDA Toolkit 6.5 is highly recommended for this, also note that building the experimental kernel requires a lot of system memory (~7-8GB).
2014-08-26 17:02:26 +02:00
f6e049cd5a Sculpt mode: fix 'stroke method' of Brush menu. 2014-08-26 16:45:40 +02:00
f34685d8a1 Fix T39020: Undo/Redo/History buttons missing in "Edit mode"
Remotely based on patch by kevindietrich (Kévin Dietrich), but using
a single generic panel here, as suggested by UI team.

Note we add this panel in all modes (only one tweak in scuplt mode,
where there is no history menu generated it seems, unlike other
'paint-like' modes), we can decide to move it into its own tab later.

Differential Revision: https://developer.blender.org/D733
2014-08-26 16:45:40 +02:00
f4eaff82b2 Fix for broken hair sim in old files.
Files older than rB37e1285 have broken hair sim due to the (hacky)
velocity "damping" factor, which is not initialized to 1.
2014-08-26 15:57:25 +02:00
1d3d68b408 Update to 'Back to Black' theme. 2014-08-26 15:01:30 +02:00
3d6ed42c3b Fix T38999: Tool tabs and Old Addons living in perfect harmony.
Just have a default 'Misc' category (harmless for panels in non-cat context).
In case we would still want a panel to show in all tabs (rather unlikely),
just explicitely give an empty string to its bl_category property.

Note I choose 'Misc' because it's much shorter than 'Uncategorized' (space
is an issue here), it's a one-liner to change it anyway if UI Mafia does not like it!
2014-08-26 14:49:55 +02:00
8f15be2fee Fix T37534 remaining issue: auto-enable bevel weight view
whenever enter edge bevel weight editing.

This is what happens when one makes an edge sharp, for instance.
The edge bevel weight display is not on by default for performance
reasons, but seems reasonable to enable it when user indicates
interest by editing bevel weight values.
2014-08-26 07:39:39 -04:00
b198500c02 Move bUnit_getScaleUnit -> BKE_scene_unit_scale
unit.c intentionally doesn't include DNA or BKE headers (except its own)
2014-08-26 20:53:41 +10:00
3dd5adeed1 Move conditional out of loop since checked condition won't change 2014-08-26 12:38:20 +02:00
0e3fa0b761 Fix T41590: When scene scale is not 1.0, and units are "None," Blender assumes translations are in meters.
Turned out there were several issues in handling of scale parameter by numinput.
Fixed that by factorizing more some code in common with 'usual' numbuttons eval code
(new `bUnit_getScaleUnit()` helper will return valid scaled value, depending on
given system and type).

Now, numinput behaves as expected - using default unit amended by scale in case no unit is given
(i.e. entering '20' with a scale of 0.01 will give you 20cm, and '20cm' as well!).
2014-08-26 12:31:08 +02:00
600248783b Fix T41355: Make-local looses linked modifiers texture 2014-08-26 19:16:15 +10:00
44fc0ddee9 Cycles: Use compiler intrinsics for clz/ctz in CMJ code for MSVC 2014-08-26 14:22:08 +06:00
47ad1a9720 Comments 2014-08-26 15:21:12 +10:00
a71a947c6a Fix T41568: Dissolve & Tear Boundary Keeps Verts 2014-08-26 13:35:43 +10:00
74f1a3f42f Fix T41574: Curve edit-handles draws in shadow
Also avoid redundant theme-color lookups
2014-08-26 12:30:30 +10:00
6cc38ec7f6 Rename drawnurb -> draw_editnurb
Since its only used for editmode drawing.
2014-08-26 12:18:17 +10:00
e2c412f8cc Cycles: Make Correlated Multi Jitter a regular feature.
It can be helpful in some cases and it works properly, so no need to hide it behind the experimental flag anymore. It's only enabled for the CPU though.
2014-08-26 03:45:50 +02:00
0a48cf08da Correct docstrings 2014-08-26 10:57:21 +10:00
679046743f Fix T41584: bpy.utils.time_from_frame out by a day
Fix from retroj
2014-08-26 09:18:54 +10:00
d822624adc Fix T41580: Cast modifier - Edit Cache problems.
Modifiers should never ever modify data from target objects!!! With multithreaded
evaluation, this is a nice bug factory!
2014-08-25 20:58:36 +02:00
66b84ad159 Followup to previous commit: fix same wrong numinput handling in other modal ops.
Also stumbled uppon 'move marker' code, was needing a bunch of fixes, cleanup and simplification,
and added a candy feature - now you will enter numinput values in seconds when editor is
in 'time' mode, instead of frames!
2014-08-25 20:26:45 +02:00
b638696ca6 Fix T41534: Bevel practically unusable interactively if set to percent amount type.
Turned out to be a clean/fix up of modal bevel tool, percentage mode handling was broken,
numinput handling was broken, etc.

Also added a way to switch between bevel types (modes) with M key, and tweaked a bit
numinput code to return early in case of 'char' event with ctrl modifier.
2014-08-25 20:26:29 +02:00
33a54422b1 Simplified Collada error message for unknown references. 2014-08-25 19:25:24 +02:00
0fc240dadb Fix T41513 Avoid adding NULL values into object lists when lamp- and controller-instances could not be created. 2014-08-25 19:04:44 +02:00
8d0b3e9902 Cycles: Enable Volumetric Rendering on GPU.
Limitations:
* Smoke/Fire rendering is *not* supported on GPU yet, that is also documented here: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume
* Decoupled Ray Marching is also not supported yet, so no Equi-Angular and MIS sampling yet.

Note for Builders and Developers:
* Make sure to use the CUDA Toolkit 6.5 from now on. 6.0 might still work, but can cause slower renders.
2014-08-25 17:23:06 +02:00
3ba28a2609 Python API: support thick wrapped int arrays
add bpy.data.version, needed for Python versioning code.
2014-08-25 23:57:03 +10:00
5c1e958d90 Fix T41524: Won't open blend file with "space" symbol in the name 2014-08-25 18:50:46 +06:00
b7c13da8cc Move theme updates for new handles colors & co into last versioned block.
Also, tweaked versionning for lnors color - we can add immediately versionning code,
using future next subversion, even without actually switching to this subversion now.

Avoids 'empty' versionning blocks floating around, and often forgotten when actually
raising version numbers!
2014-08-25 12:54:35 +02:00
ba35761d33 SplitNormals UI tweaks: add own color for normals drawing, and own 'face corner' icon. 2014-08-25 12:54:35 +02:00
2a44844870 Fix T41532: Some files bounce back and forth between 'packing BVH nodes' and 'Copying Transforms to Device'
This was originally caused by a6ae12a where i didn't foresee unclear distinguishing
between empty and non-synced meshes will give issues for the viewport. They're the
same for final rendering, but for viewport we need to be accurate here.
2014-08-25 14:05:00 +06:00
ca1bca442a Fix T40993: Store selection history for extrude 2014-08-25 16:57:38 +10:00
470e694652 BMesh: New operator flag not to clear history 2014-08-25 16:42:27 +10:00
93d40aef05 Fix Color DnD setting alpha to an undefined value 2014-08-25 14:34:42 +10:00
bf5361591d Fix View3D glitch zooming
Fast cursor movement could clamp the distance incorrectly.
2014-08-25 14:20:40 +10:00
1377847e7b View3D: Add ED_view3d_dist_range_get
remove hard coded limits
2014-08-25 14:20:40 +10:00
42404255e9 Freestyle: Fix for missing and unnecessary property update notifications. 2014-08-25 12:05:18 +09:00
1987548a33 BLI_kdopbvh: ifdef unused 'skip' member
Saves memory and speeds up balance
2014-08-25 11:28:50 +10:00
07c96cc102 Fix nice trash read in new texture slot operator. 2014-08-25 00:34:24 +02:00
20700ca43e Based on user input that we never listen to:
* Move "save all edited" operator to layer tab
* Duplicate operator in image menu in image editor.
2014-08-25 00:15:43 +02:00
ae31b25fb5 Cycles: Fix wrong Volume Scattering in Branched Path integrator, when building without Decoupled Ray Marching.
The wrong throughput was used here.
2014-08-24 23:08:07 +02:00
a25484eefa Cleanup: Remove unused variable in kernel_path_volume_bounce(). 2014-08-24 23:06:30 +02:00
031620aba2 Cycles: Avoid redundant call to volume_stack_is_heterogeneous() for Distance Sampling. 2014-08-24 16:15:57 +02:00
c89287e057 Cycles: Avoid call to volume_stack_sampling_method() on GPU, Decoupled is required for Equi-Angular/MIS. 2014-08-24 15:58:41 +02:00
8ed818e0a1 Cycles: Remove Volume Nodes GPU warning and gray out Sampling Method button when using GPU. 2014-08-24 14:54:48 +02:00
7a026971dc Fix T41548: Menu pulldown button behaves incorrectly on click if menu shadow width is set to 0 in theme prefs.
This is more like a workaround actually, we use a fixed 'margin' for height in case of search menus,
instead of using shadow width (which gave the bug with low values, and insane margins with big ones).

Note root of the issue is that if 'top' margin is too small, the first entry of the search menu
gets activated before the 'opening' click is released. This means that button will get the
KM_RELEASE event, and immediately quit (see interface_handlers.c:7945, ui_handle_menu_button()).
2014-08-24 10:22:03 +02:00
9541f75200 Fix T41550: Python: frame_set skips frame -1; frame_set(n) sets to frame n-1 for (only) negative number n, and sets to frame n for non-negative number n.
This appeared in rBrB94cb20ff4e78b, purposedly it seems, but without even
a single line of comment to explain why this was needed. For now, remove it.
2014-08-24 08:57:01 +02:00
38cd35c2ad ColorRamp: remove linear/srgb conversions
Turns out these aren't needed
2014-08-24 12:56:34 +10:00
a4c5570aba gameengine: fix T41272 - KX_Light.color returns wrong values 2014-08-23 20:24:19 +02:00
e390e9e571 Fix T41538: Sun Beam Node has artifact at its radius.
The sunbeams node was clamping the range of influence to start at 1
pixel distance from the source. This was a poor fix for artifacts caused
by an off set in buffer coordinates. Since the u coordinate starts at
ceil(umax) the v coordinate also has to use ceil. This also fixes some
discontinuities that became visible when the source point is close to
a sharp line in the input image.
2014-08-23 16:17:35 +02:00
151800662f Smallhash: BLI_smallhash_calc_quality
Also add inline hashing function to measure different methods.
2014-08-23 21:18:11 +10:00
fb49c5aa56 BGE: fix crash and return boolean on scene.replace()
Scene replacement with invalid scene name was crashing blender,
now it's a no-op.
KS_Scene.replace() to return a boolean to indicate if the scene
is valid and is scheduled for replacement. This allows more
robust game management.
2014-08-23 12:31:32 +02:00
a0600debda Fix T41541: Cuda renders objects in black with MIS enabled in world setting
Issue introduced in 8d3cc431d7, parameter mismatch.
2014-08-22 20:10:01 +02:00
4ff4bfcb9c Cycles: DPX is saved in the sRGB space and need to be converted to linear
This at least applies to DPX saved from within blender, which is 1st prio
to support working reliably.
2014-08-22 23:53:29 +06:00
4ba0f44151 Fix missing tag for detecting changes with bpy.data.node_groups[...].is_updated. 2014-08-22 17:12:35 +02:00
7c052a8877 Cycles: Fix wrong image update tagging, float vs. byte images 2014-08-22 17:36:00 +06:00
08c1408f82 Fix T41068: 3D viewport shading - Material or Window vs. Rendered
Checked with Brecht, Cycles indeed expects generated to be in 0..1 space
instead of -1..1 as it is in BI.
2014-08-22 16:14:08 +06:00
28a08e7ae6 Cleanup: BMesh arg name 2014-08-22 16:16:19 +10:00
8bb318bf90 Fix T41528: Error message on trying to import COLLADA triangle strips is wrong
Thanks to Maarten Gribnau for the patch.
2014-08-22 02:46:29 +02:00
9f029d3f90 ColorRamp: Use linear V for HSV/HSL blending
This matches RGB blending black/white for eg.
2014-08-22 10:12:56 +10:00
847654ba52 ColorRamp: HSV CW/CCW were flipped 2014-08-22 10:12:56 +10:00
603348c56e Cycles: Drop support for CUDA 5.0 Toolkit, only 6.0 and 6.5 (recommended) are supported now. 2014-08-21 23:35:20 +02:00
2e5e1e2028 Fix T41267: Wrong light distribution with when having objects with motion blur 2014-08-21 17:57:02 +06:00
7ef925752c Tests: remove support.run_unittest 2014-08-21 19:56:21 +10:00
569eafc745 Fix incorrect 2d stabilization for masks
Reported by Sebastian Koenig in IRC>
2014-08-21 15:03:44 +06:00
e44cd30abb Fix T41507: Empty prevents image deletion
Also allow assigning `Object.data = None` from Python
2014-08-21 17:05:47 +10:00
afa6d4e21f Fix T41523: Mesh triangle fill creates flipped faces
Calculate projection normal using edge-pairs
2014-08-21 15:07:07 +10:00
1706182be4 Fix for BMesh fill using arbitrary face-flipping
Use winding of existing boundary edges.

Filling Suzzane's eyes gave different face winding.
2014-08-21 13:08:13 +10:00
eaf7d6b7c0 BMesh: fill - replace SmallHash with GHash 2014-08-21 13:08:13 +10:00
dece09d827 BMesh: add assert for correct args to creation functions 2014-08-21 13:08:13 +10:00
90e1746d89 BMesh: correct flag use
Allowed fill to make duplicate faces
2014-08-21 13:08:13 +10:00
d42c085516 Fix T41517: BMesh intersect crash 2014-08-21 09:23:07 +10:00
d93c07d987 Cleanup 2014-08-21 09:23:07 +10:00
ccf7b391cd Further cleanup for defines:
* Merge Texture defines
* Remove Normal Map define.
2014-08-20 23:27:59 +02:00
161815576f Cleanup: Remove __ANISOTROPIC__ define.
That was only needed in the beginning, when we did not had support for tangents. It's time to clean some of the defines up, it's getting a bit too much.
2014-08-20 23:23:14 +02:00
187d77612b Code refactor: Split __VOLUME__ defines in Cycles.
* __VOLUME__ is basic volume support with Emission and Absorption.
* __VOLUME_SCATTER__ enables volume Scattering support.
* __VOLUME_DECOUPLED__ enables Decoupled Ray Marching.
2014-08-20 23:15:30 +02:00
075f6eff74 Cycles: Further tweak for Decoupled Ray Marching
Avoid some if checks when probalistic_scatter is false.

Differential Revision: https://developer.blender.org/D743
2014-08-20 22:59:08 +02:00
c3e59379c0 UI message fix (yeah, I know... :/ ). 2014-08-20 21:52:00 +02:00
49b894bcc1 Cleanup: some const and bool cleanup. 2014-08-20 20:41:30 +02:00
968389d7b6 Restore red name for disabled modifiers.
Don't know when this was lost, 2.70a already did not have it... :/
2014-08-20 20:25:58 +02:00
7a36251bc9 Fix T41497: Colour Ramp UI Bug. 2014-08-20 14:46:38 +02:00
e56cc87a4d Tweaks to the 3ds and maya keymaps
- Get rid of the obsolete operator
- Use select_or_deselect_all in 3ds keymap, which performs better
  than separate deselect all and select binded to the select mouse.

  This was already done for maya, and seems was accidentally reverted
  by 5a91db3d.
2014-08-20 17:33:51 +06:00
3a1a1f83cf Fix for recent solidify rim-only patch 2014-08-20 20:33:25 +10:00
27e7760913 BKE_units: Some cleanup (mostly bools instead of ints). 2014-08-20 12:31:15 +02:00
8535b9bd15 Fix T38722: Adding units in Imperial setting results in inconsistent values
Now always check for a default unit, and evaluate the whole expression in this "unit space".
Not an ideal solution, but should handle most cases nicely
(we can't address all possible corner cases anyway).

Note default unit is searched in current string first (bigger unit of current system wins),
then in previous string.

Note this also replaces ',' by '+' in default separation between units,
helps solving issues with parenthesis (e.g. (1'1")*2.5 would fail in existing code)!
This would break if someone uses py ops with lower precedence than '+' (like bitwise
operations, and comparison), but these are not expected usecase here anyway.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D340
2014-08-20 12:12:03 +02:00
21da42bd7a Viewport resolution divider works fine for halos now 2014-08-20 15:30:31 +06:00
f11057f54a Fix T41499: Can't use Deselect/Select All tool while in Texture Paint mode 2014-08-20 14:01:19 +06:00
dcf9bc82d8 Adding presets for Blackmagic Pocket Cinema Camera and Blackmagic Production Camera 4K 2014-08-20 00:55:57 -06:00
d2cc65cd1c Fix for missing updates of build scripts in the commit rB05cb63ecf750. 2014-08-20 13:35:45 +09:00
ed08597442 Correct mistake in recently added intersect tool
Sorting verts along an edge wasn't working reliably.
2014-08-20 12:44:11 +10:00
7bca8be24d BMesh: improve docs for BM_edge_split 2014-08-20 12:44:11 +10:00
eb8964fb7f Fix T41464: Material Boundary bug in Freestyle.
The reported issue was caused by an old bug combined with another bug
introduced by recent Freestyle Python API updates.

The old bug was that a mutable reference to CurvePoint was treated as if
it were immutable.  Iteration over CurvePoint objects is implemented by
the C++ CurvePointIterator class, whose dereference method
CurvePointIterator::operator*() returns a reference to a mutable data
member (probably originally intended for better performance).  Hence the
returned reference may vary upon iteration over different CurvePoints.
This implementation detail was overlooked and the returned reference was
treated as immutable (which is the case in fact for other Interface0D
subclasses except for CurvePoint).  This bug was surprisingly old as it
existed before the beginning of Freestyle integration into Blender.

The other bug was in the MaterialBoundaryUP0D predicate class that was
not properly handling the end of iteration.  It is noted that when the
iter() and next() built-in functions are applied to Interface0DIterator,
it is no longer possible to reliably check the end of iteration by the
.is_end property of the iterator.  Namely, the .is_end property works as
expected only when iteration is carried out in combination with the
conventional .increment() and .decrement() methods of the iterator.  For
this reason the commit rBb408d8af31c9 was partly reverted to recover the
previous definition of MaterialBoundaryUP0D.
2014-08-20 10:37:41 +09:00
4b4ae8374f Cleanup: style 2014-08-20 08:47:32 +10:00
f5538fe2a6 Replace strstr with STRPREFIX
No need to search the whole string.
2014-08-20 08:38:40 +10:00
09fc5d6a37 Roto: Add spline dragging zone in it's center
This dragging zone is visualized as the circle (the same as object origin)
in the spline bounding box center and dragging that circle drags the whole
spline.

Pretty much basic functionality, but quite useful in practice.

Requested by our roto team (Sebastian and Sean :) in IRC.
2014-08-19 21:29:45 +06:00
7bc87a372e Fix T40962: Ashikhmen Shirley shader fireflies 2014-08-19 20:58:58 +06:00
2184ac8c9d Fix T41457: Viewport resolution divider does freestyle for every resolution
Now freestyle would be rendered for the final resolution only, making it so
viewport navigation is really interactive.
2014-08-19 19:39:13 +06:00
1a20074acb Fix T41485: No priority: typo in "effectors effect themselves"
Who said 'commit count'? I only see 'bug fixing' here...
2014-08-19 15:09:34 +02:00
28c6982b37 Fix T41477: Some UI op buttons have no more option to edit shortcuts.
`WM_keymap_guess_opname()` was missing a bunch of op 'types'/familly. Now all are there,
either trying to find a matching keymap, or explicitely listed in a comment as skipped for now.

Note matching might not be perfect in all case, but we can easily tweak that later if needed.
2014-08-19 14:50:59 +02:00
3196a230a6 Mask slide can be cancelled with RMB now 2014-08-19 17:23:18 +06:00
5e6b79c1f5 Fix crash in BKE_mesh_validate_arrays 2014-08-19 21:11:57 +10:00
Dalai Felinto
8d3cc431d7 Fix T41471 Cycles Bake: Setting small tile size results in wrong bake with stripes rather than the expected noise pattern
This problem was introduced in 983cbafd18
Basically the issue is that we were not getting a unique index in the
baking routine for the RNG (random number generator).

Reviewers: sergey

Differential Revision: https://developer.blender.org/D749
2014-08-19 11:40:33 +02:00
37da1dadb6 Fix mesh validate skipping first vertex 2014-08-19 18:49:54 +10:00
95ae98caea Fix T41479: BLI_bvhtree_find_nearest inaccurate
Gives noticeably better results for shrink-wrap (even in simple cases)
2014-08-19 17:58:07 +10:00
1dbadf16a8 Fix for BKE_deform_flip_side_name getting fooled by extra separator characters
D740 by ldo with own edits
2014-08-19 16:18:07 +10:00
ea07d93f77 Fix for fix (don't guess enum's sign) 2014-08-19 07:08:15 +10:00
b07ea2fc15 Fix T41456: soft light texture blend mode zero effect
Soft light and Linear light blend modes weren't implemented in glsl

Reviewers: psy-fi

Maniphest Tasks: T41456

Differential Revision: https://developer.blender.org/D744
2014-08-18 19:14:51 +02:00
e1eb2e99f7 Correction to previous curve bevlist commit 2014-08-18 21:16:21 +06:00
adb08def61 Fix T39630: Mouse Wheel doesn't detect Multi Window Focus 2014-08-18 20:50:57 +06:00
eb10cda135 Fix T40653: Modified keymap: MMB not behaving like RMB?
Modal frame_change was not terminating on mmb release event...
2014-08-18 16:37:01 +02:00
2a514f8e29 Fix building on some compilers (clang on OSX).
Reported and patch by jensverwiebe (jens verwiebe).
2014-08-18 15:39:40 +02:00
afa3469288 De-duplicate EWA filter code between renderer and compositor
The title says it all, move the EWA filter to BLI (currently it's
math_interp.c) and use the function from both BI renderer and the
compositor.

This makes more central place of the algorithm, allowing to have
fixes and optimizaitons synchronized across the two usages.

This also fixes T41440: Displacement in compositing creates holes

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T41440

Differential Revision: https://developer.blender.org/D748
2014-08-18 19:38:15 +06:00
354b17d2f3 Fix T41137: Old render result from viewport render in camera view does not go away when middle clicking 2014-08-18 19:33:06 +06:00
d24d2f23e4 Install_deps: Better handling of 'check installed' in Debian, and fix jack2d check.
Patch D742, by oweissbarth (Oliver Weissbarth), thanks!
2014-08-18 15:07:52 +02:00
a6ae12aa62 Fix T41474: Second renderlayer doesnt render if first one has 'Use Surfaces' disabled 2014-08-18 18:59:44 +06:00
de12cd706f Fix T41426: floating menus - scroll issues.
Do not reset active but if cursor is not over it when getting mousewheel events.
2014-08-18 14:13:55 +02:00
71ce415f4a Fix T41462: "Reload from trusted" button not prompting for confirmation.
Made 'revert_mainfile' op also handle the 'use scripts' option, and use it
for this feature (since it has a nice simple invoke confirmation popup).
2014-08-18 14:13:55 +02:00
dc05d817eb Correction to the mipmaps generation
Seem we've always were wrong with multiplying alpha by 255,
other channels seems to be multiplied by 256 with the shift
operations.
2014-08-18 18:03:56 +06:00
6c7467e0da Fix T41085: Blender crashes when using "spline" or "segments" for bevel curve factor.
Root of the issue goes to the fact that bevel list calculation might drop some points
if they're at the same position. This made spline length calculation goes wrong.

Now the length of the bevel segments is stored in the bevel list, so values are
always reliable.

Initial patch by Lukas Treyer with some tweaks from me.
2014-08-18 17:38:20 +06:00
05cb63ecf7 Fix for line style shader/texture types showing up in the node editor when Freestyle is disabled at compile time.
Problem report by Thomas Dinges on IRC, thanks!
2014-08-18 16:57:17 +09:00
8986883de1 Fix T41314: OpenGL error when using Cycles engine 2014-08-18 13:55:22 +06:00
b9ebf44139 BMesh: intersect tool
Modeling tool to cut intersections into geometry (like boolean, without calculating inside/outside).
Faces are split along intersections, leaving new edges selected.

Access from Face menu.
2014-08-18 17:09:30 +10:00
4795b61c1b Cleanup: assert / warn 2014-08-18 16:05:06 +10:00
baea85b449 BMesh: add BM_vert_splice_check_double
checks if splicing verts creates duplicate edges
2014-08-18 15:59:14 +10:00
e85bcfab04 Fix T41467: Modifier view buttons changing positions.
Commits early in this year (to save some space) broke this. Hopefully this time
it works in all cases - lastCageIndex is no more influenced by realtime/edit active states.
Also, inactivate buttons instead of hiding them, can be useful to set those data
even though it does not have any immediate effect.

Took the opportunity to switch cage buttons to RNA, btw.
2014-08-17 09:50:45 +02:00
ed26d9dd90 BLI_array: utility function for searching an array 2014-08-17 16:02:20 +10:00
1dd17bed4a Knife tool: simplify hit-depth calculation 2014-08-17 12:50:48 +10:00
bba80ed7af Cleanup 2014-08-17 12:18:40 +10:00
f789d0b606 Math Lib: replace epsilon with check against zero
line-tri intersection depended on scale, The check made small triangles & lines fail.
So just check for divide by zero as ray-cast currently does.
2014-08-17 08:42:08 +10:00
fe2b461398 Fix poll func of CYCLES_OT_use_shading_nodes.
Operators' poll func might be called from anywhere in Blender, so they should
not make any assumption about available context. material, lamp and world
are specific to context from Properties space...
2014-08-16 22:42:02 +02:00
1ad9987af1 Fix filenames in splashscreen.
For some reason, labels of buttons in popups/menus were clipped left.

Removed that function (was the only place were it was used), clipping text
by its left is really bad for its understanding!

Instead, extended clip_middle code so that it optionnally preserves a right piece of
the given string (like the shortcut part of a menu label). Think that's what makes
more sense here (note that most menus adapt themselves to their longest item,
we do not have much fixed-width ones, anyway).

Also tweaked a bit clip_middle logic, so that left part always have at least ten chars
(in addition to already existing 'min width' checks).
2014-08-16 22:36:23 +02:00
c47a01da11 Math Lib: add isect_line_line_epsilon_v3 2014-08-16 15:13:11 +10:00
88ee650263 Comments 2014-08-16 10:51:07 +10:00
bb39925ec5 Fix T41454: Command "Dirty Vertex Colors" prompts Python error. 2014-08-15 19:51:14 +02:00
513b8ddf06 Fix T41421
Don't store selection properties, if those are set in the keymap we can
end uo locking one state forever.
2014-08-15 17:32:05 +02:00
9a29b0f155 Fix compilation on linux (implicit conversion from double/float to size_t treated as error here). 2014-08-15 15:44:50 +02:00
968e1b3b10 Fix T41427: Region overlap moves into wrong window.
There was some fuzzyness in `region_overlap_fix()`, using an 'other side' region
as ref to move current one in case their rect would intersect...

New code is a bit more complex, but should handle nicely all situations, mostly
ensuring we only translate an overlap if we find a previous one **on the same side**,
and ensuring we also never have intersecting overlapping regions from different sides
(since this does not work nice at all).
2014-08-15 15:40:53 +02:00
b6df448176 Cleanup 2014-08-15 19:59:31 +10:00
01c5a65f7b Fix uninitialized imagepaint values on new scene, report by kopias on
irc
2014-08-15 11:45:15 +02:00
27b4a1f7dd Correction to last commit, rna naming 2014-08-15 19:35:14 +10:00
Dalai Felinto
983cbafd18 Final Fix T41222 Blender gives weird ouput when baking (4096*4096) resolution on GPU
It now uses the tile size to split the job. For CPU this may add
overhead, but for GPU this is highly needed.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-15 11:27:42 +02:00
Dalai Felinto
2c5b6859d9 Revert "Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU"
This reverts commit a48b372b04.

Leaving only the part that fix device_multi.cpp
2014-08-15 11:27:42 +02:00
3296d98ec1 Solidify Modifier "Rim Only" Option
D737 by scorpion81 with own edits
2014-08-15 19:17:05 +10:00
b22831e5ce Modifiers: consider all constructive modifiers as 'preview' ones as well.
Indeed, constructive modifiers are highly likely to modify CDLayers like vgroups or vcols!

See vertexgroup2.blend file ({F93770}) in T40523, especially obvious with subsurf modifier.
2014-08-15 10:10:57 +02:00
ddb843a1ac Fix T41443: Separate bug with Curves & Hooks
This solves the crash, but indices might be wrong after the separation.

There are loads of other ways to confuse hook indices in both meshes and
curves, for now considering this a TODO.
2014-08-15 12:50:21 +06:00
2b796ed03d ColorRamp HSV, HSL Blend Modes
D297 by charlie with own edits
2014-08-15 15:31:13 +10:00
36cbdb860a Cleanup: comment & var name 2014-08-15 14:22:34 +10:00
dae74d26fa Fix T41435: Info-text lags changing space-types 2014-08-15 08:43:00 +10:00
26ec8a7fb7 UI: avoid spacetype and butspacetype mismatch 2014-08-15 08:39:47 +10:00
5bdea81319 Cycles: Don't check closure flag in kernel_volume_decoupled_scatter(), we check this before the function already. 2014-08-14 21:25:52 +02:00
da1801969b Fix 'quick smoke' not rendering anything (texture coordinates was left unset)
Not quite sure why default did not work here, might need further investigation.
2014-08-14 21:21:29 +02:00
32a5313b41 Cycles: Optimize Equi-Angular sampling using binary range search.
Patch by Lukas Tönne and myself.
2014-08-14 20:21:36 +02:00
5af00a3d12 Cycles: Optimization for Heterogeneous Volume Shadows.
* Don't compute expf() for every step, instead sum the intermediate values and calculate it every N (8 for now) steps. This helps a few percent (~5% on a cube with wave texture) in my tests here.
2014-08-14 20:09:25 +02:00
8ff3cf3e56 Cleanup: typos and extra brackets. 2014-08-14 16:31:53 +02:00
77b01f7393 Switch sampler icon to the right, it's easier for artists to access. 2014-08-14 16:27:19 +02:00
5a74fe63d0 Cycles: Avoid intermediate function when we sample all lamps. 2014-08-14 16:09:40 +02:00
6e5d188d17 Cycles: Avoid segment NULL check, we access it before this function already. 2014-08-14 15:52:19 +02:00
b42b0554ea Pie menus:
If user drags away from initial position, menu changes to drag style and
returning to that position won't remake the menu click-style. Allows to
use the threshold indicator to cancel the pie.
2014-08-14 14:17:39 +02:00
8e30db0f67 Aaaarh! aaargh! 2014-08-14 14:06:48 +02:00
2e386d3350 Last fix wasn't complete, sorry for that.. 2014-08-14 14:04:29 +02:00
9bf603a307 Deactivate last active button for pie menu popups. 2014-08-14 13:18:07 +02:00
a2dfeeaec0 Fix crash on texture painting after new scene is added, reported by
kopias on irc, thanks.
2014-08-14 13:06:40 +02:00
da60d0889d OSX/SCONS/buildbot: last commit made BF_COLLADA_LIB tweak obsolete 2014-08-14 12:19:15 +02:00
664f8e9048 OSX/Scons: make sure BF_OSL implies BF_LLVM 2014-08-14 12:16:11 +02:00
f7dcec1f69 Fix part of T41297.
Add precision mode to radial operator by keeping the shift key pressed.
Precision mode works by checking difference between absolute window
coordinates and the point where shift was pressed and adding those to
the distance between that point and the radial center. This allows
bigger negative/positive range than using a strict radial scheme.
2014-08-14 11:40:10 +02:00
9bbd355813 Attempt to fix 32bit OSX buildbot, need to link against UTF Collada lib 2014-08-14 15:38:45 +06:00
6f6347e437 Revert modal operation of cursor. This change was far less innocent than
was first thought and could mess up tweaking events for the left mouse.
2014-08-14 10:45:00 +02:00
630f343b30 UI: Don't print user passwords in info-space 2014-08-14 16:18:26 +10:00
b70acd30c3 Correct own regression in password button editing
Fix T41416: by iri Hnidek
2014-08-14 16:12:24 +10:00
c256072e91 Cycles: Correction to previous commit -- forgot to take instancing into account 2014-08-14 11:48:50 +06:00
9142c062e0 Remove MSVC2008 workaround 2014-08-14 14:18:37 +10:00
5df2a98984 Fix T41425: UI wobbles using scrollbar 2014-08-14 13:44:04 +10:00
55d3277d0c BMesh: use a smaller dist3 threshold
Matches array modifier remove-doubles
2014-08-14 12:49:02 +10:00
15df4ddf7b Hack for edge-slide macro was lost in header cleanup
add back include for USE_LOOPSLIDE_HACK
2014-08-14 12:04:42 +10:00
7728ffa16c Fix T41431: Min/Max custom property range mismatch 2014-08-14 11:29:22 +10:00
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
28054d8e38 remove MAXFLOAT define 2014-08-14 10:36:07 +10:00
14d9e46977 UI: edits to pie-menu-enum
- avoid eval
- report if operator is missing
2014-08-14 07:40:19 +10:00
e05567ef3e Fix out of bounds read when recalculating mipmaps, error reported by
address sanitizer.

This was strangely only triggered when float buffers were used.
2014-08-13 19:07:45 +02:00
be755f3873 Fix T41408: Render layer pass bug, second attempt
Missed some passes in the previous commit. Now seems all the passes
are covered, at least with my understanding of the things.

There're some weird things going around with the refraction pass,
but that is caused by some other issue in the code. Would rather
call it a TODO for now.
2014-08-13 22:45:21 +06:00
fc2b6a2b9d OSX: fix paranthesis in last commit 2014-08-13 15:32:35 +02:00
3bbba7d2b1 OSX: add a fix for lion_fs loosing handles after calling fs from key shortcut, also reenabled lion_fs for OSX >= 10.9 again 2014-08-13 15:27:41 +02:00
eca7c96a28 Maybe slightly controversial pie commit:
Make pie menu item placement touch the radius from the internal side of
the buttons rather than placing on the center on the cirtcle. This
allows us to get rid of the separate visual angle property, also allows
for tighter placement of pies with a smaller radius without easily
overlapping.

Also pie menu title now always appears above the threshold indicator.
2014-08-13 15:11:19 +02:00
b30ac75f8c Add custom property to previous commit, name "Context" of that property
was misleading.
2014-08-13 14:22:35 +02:00
12154d791e Correct missing new line in the debug print 2014-08-13 18:08:58 +06:00
48b39898bf Align pie menu title on center. 2014-08-13 14:08:26 +02:00
95da9347b5 Bring back python operator for pies on a certain operator property. 2014-08-13 14:04:49 +02:00
Dalai Felinto
5b1f78e2d9 Image Editor: only do alpha test if output file requires alpha
(internal change, nothing should change to the user)
2014-08-13 13:11:10 +02:00
bfaf4f2d0d Fix T41219: Cycles backface detection doesn't work properly
Root of the issue goes back to the on-fly normals commit and the
latest fix for it wasn't actually correct. I've mixed two fixes
in there.

So the idea here goes back to storing negative scaled object flag
and flip runtime-calculated normal if this flag is set, which is
pretty much the same as the original fix for the issue from me.

The issue with motion blur wasn't caused by the rumtime normals
patch and it had issues before, because it already did runtime
normals calculation. Now made it so motion triangles takes the
negative scale flag into account.

This actually makes code more clean imo and avoids rather confusing
flipping code in mesh.cpp.
2014-08-13 16:35:54 +06:00
8d801c3afd Correct menu items active behavior applying to dialogs 2014-08-13 18:21:23 +10:00
2eebe611e4 Fix T40717: Screen does not update while scrolling or zooming with touchpad on a laptop
This is rather workaround solution for now, which seems to
work and it's not that huge to maintain (one liner apart from
the comment).

Idea is to make sure PeekMessage peeks the message when window
proc receives WM_MOUSEWHEEL (some touchpad drivers seems to
swallow the messages making it so PeekMessage doesn't get
anything).
2014-08-13 13:49:30 +06:00
a7875c7c05 Fix linking error on VC 2013: Update lib names for openexr 2014-08-13 09:14:05 +02:00
818a036c1a Fix T39387: Knife makes duplicate verts with subsurf 2014-08-13 15:06:38 +10:00
ff42afb6c5 Math Lib: rename barycentric_transform -> transform_point_by_tri_v3
also add transform_point_by_seg_v3
2014-08-13 14:55:45 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
3e90d7971a Knife tool: avoid copying vectors 2014-08-13 13:56:53 +10:00
7c9b8aa6cc Fix possible uninitialized var use 2014-08-13 10:38:08 +10:00
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
315c55916b RNA: use static declarations 2014-08-13 08:37:41 +10:00
dea01a0928 Compare squared distances for tracking selection 2014-08-13 08:27:50 +10:00
d17643ce1e Knife tool: cleanup threshold use, avoid sqrt 2014-08-13 08:08:18 +10:00
1510d0d441 Fix T41164: Knife creates duplicate verts 2014-08-13 08:03:31 +10:00
b8a23ccac1 Auto-update of themes (missing properties in XML files). 2014-08-12 22:48:04 +02:00
e5fd5599bc Fix T40566: Light instances disappears in rendered viewport (Blender Internal)
This is just another issue caused by convertblender overwriting the object
matrix at the time of creating render object. What's even worse here is that
original matrix is not stored for the lamps, only lamp_matrix*view_matrix is
stored.

For sure we can combine lar->co and lar->mat back to mat4, multiply by the
inverse view matrix and get object matrix, but this is not suitable for the
viewport render because every viewport rotation will accumulate the error.

For now let's store worldspace lamp matrix in the LampRen structure and use
it when rotating the scene.
2014-08-13 01:48:15 +06:00
e9ef7a8358 Fix T41060: Wrong texture 'Object' mapping in 3DView Rendered mode with Blender Internal 2014-08-13 00:32:29 +06:00
4bd252d8c3 Fix T41415: Lasso keymap not working in UV editor.
Extend option was not implemented for UV lasso select...
2014-08-12 20:12:42 +02:00
7c7cb01aa5 Fix part of T41406
Attempt to make soften brush faster by allowing non-symmetric kernels.
Projective painting supports those naturally but for 2D painting there's
a small hack to avoid shifting of the texture. Not totally correct but
it works for now.
2014-08-12 19:45:57 +02:00
561f375109 Fix T41409: Copy Custom Property function does nothing with pose bones.
Copying custom IDprops actually never worked, afaik, since previous code was copying 'from'
prop onto itself, in this case!
2014-08-12 17:32:59 +02:00
efc3ef2d3b Change previous commit that uses transparency by default.
Sampling still samples the texture color in transparent areas. This is
not so bad but users may get confused when clicking on a white spot and
picking black instead of the mesh color.

Krita also has this uncertainty when picking in transparent areas but we
do not interpolate with an explicit "transparent" looking texture during
viewport drawing (maybe we should), so it's not so apparent what happens
here.
2014-08-12 16:17:21 +02:00
f4dc4bb774 Cleanup. 2014-08-12 16:03:49 +02:00
ca5c02fc93 Fix T41411: Undo crashing with background images set.
Since 3DViews use IDs like images or clips, we can't skip anymore `lib_link_screen()`
when reading from mem for undo/redo stuff. Else, freeing (unused) screen in `BKE_read_file_from_memfile()`
will lead to using data already freed (since pointers have not been updated when reading that undo step).
2014-08-12 16:03:49 +02:00
0bcc8d5cd3 Support table erasor in projective painting as well. 2014-08-12 14:20:06 +02:00
ba345bcbb6 Fix T41414, T41386.
There were a few issues to fix here:

* We did not really unpremultiply float image dabs prior to sending them
to the GPU. That made float and byte image result different in texture
painting and undoing could change the result.
* To make textures nicely composited over the mesh, I used decal mode in
OpenGL texture environment for the texture unit. This uses the texture's
alpha channel with a nice over operator.
* Texture creation used to override the alpha setting due to the display
restrictions. Not so anymore, people can now create transparent byte
images.

Also, made alpha zero default for new textures now, since it has such a
nice effect here.
2014-08-12 13:49:45 +02:00
794277f8b6 Stupid MSVC replaces tabs to spaces spontaneously :S 2014-08-12 16:51:37 +06:00
0fc4289c39 Console detection now works reliably when starting blender-app directly 2014-08-12 16:48:46 +06:00
1743c81ce1 Fix T41349: Muting texture nodes can cause crashes.
Problem is that setup of stack indices which refer to the same stack
entry can lead to cyclic TexDelegate node pointers, causing an infinite
loop.

Fixing this would take too much time and require recoding large parts of
the texnodes system, which is earmarked for scrapping anyway ... So for
now just disabled muting in texnodes to avoid crashes.
2014-08-12 12:44:47 +02:00
2b1bacddec Scons / Buildbot: Remove code for Visual Studio 2008.
Probably the vc2013 builder can become a more generic name now, but I will double check this with Martijn.
2014-08-12 12:32:39 +02:00
e048a3c28f Cleanup: Remove Visual Studio 2012 code from builder. 2014-08-12 12:16:22 +02:00
6e8e94d806 Fix undo in texture painting not refreshing float images in viewport if
16 bit float textures was off
2014-08-12 12:03:27 +02:00
d425cb06f6 Fix T41408: Diffuse and specular passes were incorrect with combined/color passes disabled 2014-08-12 13:45:55 +06:00
eadfddd02a Cleanup: magic numbers 2014-08-12 15:58:53 +10:00
ab06ec7a24 Rewritten Array Modifier D443
Patch by PatB with own edits

- replace BMesh with CDDM functions.
- faster remove-vertex merging.
- extend CDDM_merge_verts to be more flexible.
2014-08-12 13:52:17 +10:00
06020eb02e Cleanup: unused var 2014-08-12 13:33:39 +10:00
6be4b39526 GHash: add flag get/set for gset 2014-08-12 13:29:40 +10:00
b65a022892 Freestyle: Removed the stored bContext from the Controller class.
The stored context object was used for creation of shade nodes.  A closer look at the
node system showed that the context is not actually used when shader nodes are
added to a shader node tree.  Relying on this fact, now a NULL pointer is passed to
nodeAddStaticNode() instead of the stored bContext pointer.
2014-08-12 10:10:55 +09:00
b941ab972d Added support for Feestyle edge/face marks in the 3D view window in Cycles. 2014-08-12 10:10:54 +09:00
4bb81f625e Fix for wrong idname of the "Create Freestyle Stroke Material" operator. 2014-08-12 10:10:53 +09:00
71b85a8390 Freestyle: code cleanup.
Marked a function argument with UNUSED() and removed an unused local variable.

Patch provided by Sergey Sharybin.
2014-08-12 10:10:52 +09:00
75e03e93be Freestyle: removed dead code in BlenderStrokeRenderer. 2014-08-12 10:10:51 +09:00
dd13952080 Freestyle: Fix for git merge glitches.
Also made minor code cleanup.
2014-08-12 10:10:50 +09:00
b606520791 Freestyle: Removed debugging code (use G.main instead of Freestyle-local struct Main). 2014-08-12 10:10:49 +09:00
f7d3f2b228 Fix for vertex colors not working properly.
Looks like the issue was caused by a UV map name starting with a lower case
letter (e.g., "color").  Capitalizing the name fixed the problem.  Also adjusted
the creation of custom data layers to optimize things a bit.
2014-08-12 10:10:48 +09:00
829e25c922 Fix for wrong link in the line style shader nodes due to a typo. 2014-08-12 10:10:47 +09:00
7dd605e361 Fix for SCENE_OT_freestyle_stroke_material_create not respecting "use_nodes" line style prop. 2014-08-12 10:10:46 +09:00
7852fc8bcd Freestyle: Proper support for alpha transparency in line style shader nodes for Cycles. 2014-08-12 10:10:45 +09:00
2843aa1501 Freestyle: Fix for error handling in SCENE_OT_freestyle_stroke_material_create. 2014-08-12 10:10:44 +09:00
cc33d73185 Freestyle: Fix for an increasing reference count of images in copied Image Texture shader nodes. 2014-08-12 10:10:43 +09:00
45af769020 Freestyle: Properly reconnect links from a UV Along Stroke node to a UV Map node. 2014-08-12 10:10:42 +09:00
e457dfec32 Freestyle: Updated BKE_linestyle_default_shader() to include the UV Along Stroke shader node. 2014-08-12 10:10:41 +09:00
52d357a0b5 Freestyle: Added new UV Along Stroke shader node. 2014-08-12 10:10:40 +09:00
6a5b8e91b1 Freestyle: removed unnecessary call of node_type_storage() in the definition of the Output Line Style node. 2014-08-12 10:10:39 +09:00
6f60ca3cd4 Freestyle: Caching of auto-generated materials from line style shader nodes. 2014-08-12 10:10:38 +09:00
7b1234be1c Removed/disabled debugging code. 2014-08-12 10:10:37 +09:00
34c133a488 Freestyle: an improved workflow of line style shading nodes.
Removed the previous changes for passing a line style through the Controller, and
revised the BlenderTextureShader to assign the shader node tree of a line style
(if specified) to strokes.  This way the assignment of shading nodes can be done
through both the Freestyle GUI and Python scripting.
2014-08-12 10:10:36 +09:00
c38e80d632 WIP commit just for a record of a working snapshot of code revisions for node-based textured strokes. 2014-08-12 10:10:35 +09:00
a2a2d4679a Made temporary changes to use G.main rather than Freestyle-local Main for debugging. 2014-08-12 10:10:34 +09:00
622ef089f9 Freestyle: Fix for a crash during access to Scene properties from within Python. 2014-08-12 10:10:33 +09:00
4fc2b8dcc6 Added BKE_linestyle_use_textures() to check if stroke textures are enabled. 2014-08-12 10:10:32 +09:00
1ddb8e238e Freestyle: Keep a reference of the line style in Stroke rather than in StrokeRep. 2014-08-12 10:10:31 +09:00
7f3488f992 Freestyle: show "use_nodes" option in the UI when Cycles is enabled.
The "use_textures" option is intended for the BI and does not make sense in Cycles.
2014-08-12 10:10:30 +09:00
83360eccae Fix for renamed API functions in rB415af0b. 2014-08-12 10:10:29 +09:00
701f0356df Freestyle: Removed a debug print in BlenderStrokeRenderer::GetStrokeShader(). 2014-08-12 10:10:28 +09:00
722951eceb Freestyle: Added "blend_type" and "use_clamp" options to the Output Line Style shader node. 2014-08-12 10:10:27 +09:00
833353b25e Freestyle: Fix for a crash in BKE_linestyle_default_shader() due to a typo. 2014-08-12 10:10:26 +09:00
7e9ac19b2c Freestyle: Fix for stroke_shader node default values copied from the Output Line Style node. 2014-08-12 10:10:24 +09:00
1b65faf90b Freestyle: Changed the default Color value of the Output Line Style node. 2014-08-12 10:10:23 +09:00
cb75f79b8a Freestyle: Add BKE_linestyle_default_shader() for creating the default line style shader node tree.
Changes to ED_node_shader_default() were reverted since the code there was actually
not suitable for setting up the default line style node tree properly.
2014-08-12 10:10:22 +09:00
4e11fcead0 Follow-up to rB647969f9b617: Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene(). 2014-08-12 10:10:21 +09:00
fc85446c50 Freestyle: Added preliminary support for textured strokes in Cycles.
Now the shader node tree of a line style ID datablock is used to define textures
as well as their mapping and influence.

TODO: Textures alpha channel mapping and influence.
TODO: Blend mode in the Output Line Style shader node.
2014-08-12 10:10:20 +09:00
4677684cfd Changed ntreeCopyTree_ex() to accept a pointer to struct Main. 2014-08-12 10:10:19 +09:00
d8f60d01e9 Fix for a wrong ID datablock referenced due to a typo in BKE_copy_linestyle(). 2014-08-12 10:10:18 +09:00
846ec6e00c Added new Output Line Style shader node for defining a node-based line material. 2014-08-12 10:10:17 +09:00
60cdf97c3d Minor fix for texture category name. 2014-08-12 10:10:16 +09:00
91c31efe01 Enabled USE_CYCLES_FOR_STROKE_RENDERING compile-time flag by default. 2014-08-12 10:10:15 +09:00
87f75299e1 Implemented a basic framework for node-based shaders.
Shader nodes will be used to define materials for stroke rendering, so as to
allow users to interactively configure textures.
2014-08-12 10:10:14 +09:00
d956a074e3 Freestyle: Show the Freestyle Line panel of the Material properties context also in Cycles 2014-08-12 10:10:13 +09:00
1e513658de Always use the Blender Internal renderer for stroke rendering. 2014-08-12 10:10:12 +09:00
d459d102b5 Added new operator "Create Freestyle Stroke Material" for testing. 2014-08-12 10:10:11 +09:00
1741df1e36 Removed debug prints. 2014-08-12 10:10:11 +09:00
ea1f54d8f3 Fix for hard-coded #include file paths. 2014-08-12 10:10:10 +09:00
db6d2a6fe1 Fix for nested Cycles sessions. 2014-08-12 10:10:09 +09:00
b272b729ce Removed ad-hoc use of R_PERSISTENT_DATA for Freestyle/Cycles. 2014-08-12 10:10:08 +09:00
4a39df5bc3 Added debug prints. 2014-08-12 10:10:07 +09:00
f75d87bd76 Initial implementation of Cycles materials for Freestyle stroke rendering. 2014-08-12 10:10:06 +09:00
f70e1ad2fb Proof-of-concept implementation of Freestyle support for Cycles. 2014-08-12 10:10:05 +09:00
d124bd1cd4 Spelling 2014-08-12 10:31:07 +10:00
afe8a4040f Fix uninitialized memory use 2014-08-12 08:21:02 +10:00
0219cf468e Fix marker selection margin ignoring DPI 2014-08-12 05:45:59 +10:00
bd623d9da3 Fix T41403: Grid Particles only partially generated.
Getting dominant axis (biggest dimension of bbox) was wrong, now using BLI code for that.
2014-08-11 20:23:39 +02:00
8bed4e6040 Fix T41362: CPU and GPU rendering gives different results
We can't really make CPU and GPU results look the same in all possible
circumstances, but here we can make them look close enough to each other
by making it so sobol pattern for bounce number is the smae for both
CPU and GPU.

This makes CPU and GPU render results look the same with low number of
samples, high number of samples was never an issue.
2014-08-11 22:29:27 +06:00
3e41c8ad6f Fix compilation error with debug scons
The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.

Used more reliable NDEBUG definition for IDP_spit.
2014-08-11 20:58:42 +06:00
0fe70b5e28 Fix T41360: Crash on Boolean Modifier
The issue was caused by the wrong attributes maps in certain
circumstances after union intersections.

Namely issue might have happen when more than one iteration of
union was happening and it was caused by the fact that new faces
might be allocated on the same address as freed face from the
old mesh.

Didn't find a nicer fix for this apart from correcting the whole
attributes map after each union step.

We could try removing attributes for the meshes which are getting
deleted, but in asymptotic it's gonna to give exactly the same
complexity as the current approach.
2014-08-11 20:55:52 +06:00
ce960028a4 Fix for previous commit - after talk with physics guys (Genscher, Miikah), better
to keep soft UI limits as is, and only raise hard ones.
2014-08-11 15:43:24 +02:00
3225762049 Fix T40047: Smoke: Maximum value for initial velocity.
Based on D644, by robschia (Roberto Schiavone).
2014-08-11 15:23:36 +02:00
c4814c8764 Fix T40203: Fluid simulation needs more memory than displayed.
Nothing like a fix, actually, this is an issue in elbeem afaik.
For now, just warn user that complex obstacles may breack things.
2014-08-11 15:02:57 +02:00
1ca8684911 Fix T40744: MIP Map is generating strange noise in texture, Blender Internal 2014-08-11 17:37:56 +06:00
e438c450b4 Manifest used to be installed on non-windows platforms 2014-08-11 17:26:20 +06:00
f8a39dad63 Minor cleanup 2014-08-11 11:55:16 +02:00
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
5d1d23d5bd Fix T41395: Set Object As Camera - Monkey Render bug? 2014-08-11 14:12:09 +06:00
d4599ff001 Fix T40766: Startup fails with UnicodeDecodeError on Windows 2014-08-11 17:53:42 +10:00
1528e5c20a Run unittest.main() directly 2014-08-11 15:23:00 +10:00
eedc3834fe Comments 2014-08-11 13:36:35 +10:00
e233be5157 View3D: rotate around selection - uses boundbox center 2014-08-11 13:34:28 +10:00
44aa221600 Utility functions for getting boundbox size/scale 2014-08-11 13:25:25 +10:00
5ad353b6c2 Fix T41379: Drag n Drop .txt files text editor fails
by kevindietrich
2014-08-11 10:20:01 +10:00
8e86c41c55 Fix T41385
Pretty old bug, reset flag to not use color transform by default.
2014-08-10 20:28:53 +02:00
29e15926b1 Fix for rB3cd2c6145ae1.
ID using EffectorWeight is not always a scene...
2014-08-10 18:21:57 +02:00
93ed779950 Minor tweak to own previous shapekey_move commit. 2014-08-10 17:30:07 +02:00
3cd2c6145a Fix T41295: Rigid bodyfield weights not working.??
Looks like `rna_EffectorWeight_update()` was not really working, now uses same kind of code
as `rna_Physics_update()` from rna_scene.c.
2014-08-10 15:39:30 +02:00
7284e6aedd Fix T41381: Moving shapes keys up/down, after last, they don't go to first (as Vertex Group).
Was more a feature request actually, but anyway...

Note this is a bit more complex than it's vgroups counterpart, since we have to handle
relations between keys (relative keys, and position for absolute ones).
2014-08-10 11:40:35 +02:00
8aa203abc1 BGE: fix a bug causing frequent crash on scene restart with navmesh. 2014-08-10 00:40:15 +02:00
3a53ed8d1b Remove an assert in Bullet for the Character physics.
This assert happens all the time for character physics in debug mode.
In release mode, the assert is skipped but the code is still incorrect
although it does not cause any crash strangely.
2014-08-10 00:39:22 +02:00
64c7b2a122 UI: show ttips even if disabled, when holding alt key.
Patch by @sambler (Shane Ambler), with minor edits by myself (see also D727, T24055).
Reviewed feature-side by @carter2422 (Jonathan Williamson).
2014-08-09 22:04:55 +02:00
71323f0425 Intensity and color are now adjusted upon import to get correct values 2014-08-09 20:50:35 +02:00
afce1057fd BGE: Fix bug with Steering Actuator Python API.
It was not possible to set the navmesh attribute from Python due to a double bug.
2014-08-09 17:19:13 +02:00
de04c921b0 Fix to get iTaSC working again in the BGE 2014-08-09 15:46:26 +02:00
c020bd2e73 Cycles OpenCL error to string removed in favour of the same function in clew. 2014-08-09 14:27:40 +02:00
ee8dafe462 Fix crash on edit mode with multi-align project 2014-08-08 19:35:09 +02:00
31d2ac14ae Switch linux buildbot to custom built python2.7
New scons discontinued support of python2.6, so we needed
to build just another python in the release and buildbot
environment.

Hope latest scons upgrade a least bring new msvs support
and not only lead to just-another-frustration.

There might be some more upcoming commits, because you
never can be sure there's no typos in the buidbot script
for until you actually fire the builder up.
2014-08-08 13:41:28 +06:00
9fb157df50 BGE: move macro body into a function to reduce code-size 2014-08-08 14:46:11 +10:00
d2c350b0a4 Quiet reorder warning 2014-08-08 14:45:38 +10:00
37c56e10cd Revert "ignore conflict files"
This reverts commit 7d20ad6a1b.

turns out this hides conflicts which we may want to see
2014-08-08 06:00:49 +10:00
7d20ad6a1b ignore conflict files 2014-08-08 05:47:15 +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
26dc8b7c18 T41354, cursor never gets reactivated in uv sculpting. 2014-08-07 16:14:33 +02: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
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
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
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
7b83e3d6d7 CMake: tweak so 2.8.7 and older still work (disable WITH_BUILDINFO) 2014-08-02 03:08:29 +10: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
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
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
5e3af04b08 Fix build player... 2014-07-31 17:34:13 +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
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
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
b4bda0390d user lower threshold for Harris feature detector 2014-07-30 22:27:41 +06: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
70d69aa2ae Code cleanup, make pie-menus code be closer to master 2014-07-30 15:51:12 +02:00
3a58c4679a Fix addon crash when trying listdir a directory we have no permission to. 2014-07-30 15:35:19 +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
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
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
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
e0fd1bf432 Fix T41227: Do not select unselectable items when unhiding them! 2014-07-29 12:58:12 +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
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
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
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
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
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
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
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
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
157fc43369 Implement option to parent object to undistorted position of 2D track 2014-07-24 21:01:19 +06: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
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
2126 changed files with 174548 additions and 46582 deletions

6
.gitignore vendored
View File

@@ -26,3 +26,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/

File diff suppressed because it is too large Load Diff

View File

@@ -52,6 +52,10 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_debug
BUILD_TYPE:=Debug
endif
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_full
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
endif
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
@@ -129,6 +133,7 @@ all:
@echo
debug: all
full: all
lite: all
cycles: all
headless: all
@@ -147,6 +152,7 @@ help:
@echo ""
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
@echo " * debug - build a debug binary"
@echo " * full - enable all supported dependencies & options"
@echo " * lite - disable non essential features for a smaller binary and faster build"
@echo " * headless - build without an interface (renderfarm or server automation)"
@echo " * cycles - build Cycles standalone only, without Blender"
@@ -192,7 +198,8 @@ help:
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files."
@echo " * tbz - create a compressed svn export 'blender_archive.tar.bz2'"
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@@ -200,6 +207,9 @@ help:
@echo " * doc_dna - generate blender file format reference"
@echo " * doc_man - generate manpage"
@echo ""
@echo "Information"
@echo " * help - this help message"
@echo " * help_features - show a list of optional features when building"
# -----------------------------------------------------------------------------
# Packages
@@ -237,26 +247,42 @@ test_deprecated:
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 +307,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,37 +332,58 @@ 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
#
tbz:
svn export . blender_archive
tar cjf blender_archive.tar.bz2 blender_archive/
rm -rf blender_archive/
@echo "blender_archive.tar.bz2 written"
tgz:
./build_files/utils/build_tgz.sh
icons:
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update:
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule foreach git pull --rebase origin master
# -----------------------------------------------------------------------------
# Documentation
@@ -359,6 +406,16 @@ doc_dna:
doc_man:
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
help_features:
@python3 -c \
"import re; \
print('\n'.join([ \
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
if not l.lstrip().startswith('#') \
for w in (re.sub(\
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
if w.startswith('WITH_')]))" | uniq
clean:
$(MAKE) -C "$(BUILD_DIR)" clean

View File

@@ -70,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']
##################################
@@ -125,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
@@ -210,9 +210,16 @@ if sys.platform=='win32':
if B.bitness==64:
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
if env['BF_DEBUG']:
env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
else:
env.Append(CPPDEFINES=['NDEBUG'])
if not env['BF_FANCY']:
B.bc.disable()
if env['WITH_BF_SDL_DYNLOAD']:
env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
# remove install dir so old and new files are not mixed.
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
@@ -323,7 +330,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:
@@ -412,6 +422,9 @@ if env['OURPLATFORM']=='darwin':
env.Append(LINKFLAGS=['-F/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','Jackmp'])
print B.bc.OKGREEN + "Using Jack"
if env['WITH_BF_SDL']:
env.Append(LINKFLAGS=['-lazy_framework','ForceFeedback'])
if env['WITH_BF_QUICKTIME'] == 1:
env['PLATFORM_LINKFLAGS'] = env['PLATFORM_LINKFLAGS']+['-framework','QTKit']
@@ -430,6 +443,7 @@ if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
if env['WITH_BF_CYCLES_OSL'] == 1:
env['WITH_BF_LLVM'] = 1
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
@@ -437,6 +451,12 @@ if env['OURPLATFORM']=='darwin':
else:
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'])
else:
env['WITH_BF_LLVM'] = 0
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'])
@@ -511,6 +531,49 @@ env['CPPFLAGS'].append('-DWITH_OPENNL')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
# OpenGL
if env['WITH_BF_GL_PROFILE_COMPAT']:
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_COMPAT')
if env['WITH_BF_GL_PROFILE_CORE']:
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_CORE')
if env['WITH_BF_GL_PROFILE_ES20']:
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_ES20')
if env['WITH_BF_GL_EGL']:
env['BF_GL_DEFINITIONS'].append('WITH_EGL')
# GLEW
if env['WITH_BF_GLEW_MX']:
env['BF_GL_DEFINITIONS'].append('WITH_GLEW_MX')
if env['WITH_BF_GLEW_ES']:
env['BF_GLEW_INC'] = '#extern/glew-es/include'
env['BF_GL_DEFINITIONS'] += ['GLEW_STATIC', 'WITH_GLEW_ES']
if not env['WITH_BF_GL_PROFILE_ES20']:
# No ES functions are needed
env['BF_GL_DEFINITIONS'].append('GLEW_NO_ES')
elif not (env['WITH_BF_GL_PROFILE_CORE'] or env['WITH_BF_GL_PROFILE_COMPAT']):
# ES is enabled, but the other functions are all disabled
env['BF_GL_DEFINITIONS'].append('GLEW_ES_ONLY')
if env['WITH_BF_GL_PROFILE_ES20']:
if env['WITH_BF_GL_EGL']:
env['BF_GL_DEFINITIONS'].append('GLEW_USE_LIB_ES20')
if env['WITH_BF_GL_EGL']:
env['BF_GL_DEFINITIONS'].append('GLEW_INC_EGL')
else:
env['BF_GLEW_INC'] = '#extern/glew/include'
env['BF_GL_DEFINITIONS'].append('GLEW_STATIC')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
B.root_build_dir = env['BF_BUILDDIR']
B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
@@ -612,31 +675,36 @@ def data_to_c(FILE_FROM, FILE_TO, VAR_NAME):
FILE_FROM = FILE_FROM.replace("/", "\\")
FILE_TO = FILE_TO.replace("/", "\\")
# first check if we need to bother.
if os.path.exists(FILE_TO):
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
return
try:
# first check if we need to bother.
if os.path.exists(FILE_TO):
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
return
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
fpin = open(FILE_FROM, "rb")
fpin.seek(0, os.SEEK_END)
size = fpin.tell()
fpin.seek(0)
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
fpin = open(FILE_FROM, "rb")
fpin.seek(0, os.SEEK_END)
size = fpin.tell()
fpin.seek(0)
fpout = open(FILE_TO, "w")
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
fpout.write("char %s[] = {\n" % VAR_NAME)
fpout = open(FILE_TO, "w")
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
fpout.write("char %s[] = {\n" % VAR_NAME)
while size > 0:
size -= 1
if size % 32 == 31:
fpout.write("\n")
while size > 0:
size -= 1
if size % 32 == 31:
fpout.write("\n")
fpout.write("%3d," % ord(fpin.read(1)))
fpout.write("\n 0};\n\n")
fpout.write("%3d," % ord(fpin.read(1)))
fpout.write("\n 0};\n\n")
fpin.close()
fpout.close()
fpin.close()
fpout.close()
except KeyboardInterrupt:
if os.path.exists(FILE_TO):
os.remove(FILE_TO)
raise KeyboardInterrupt
def data_to_c_simple(FILE_FROM):
filename_only = os.path.basename(FILE_FROM)
@@ -661,7 +729,12 @@ def data_to_c_simple_icon(PATH_FROM):
FILE_TO_PNG = os.path.join(env['DATA_SOURCES'], filename_only + ".png")
FILE_TO = FILE_TO_PNG + ".c"
argv = [PATH_FROM, FILE_TO_PNG]
datatoc_icon.main_ex(argv)
try:
datatoc_icon.main_ex(argv)
except KeyboardInterrupt:
if os.path.exists(FILE_TO_PNG):
os.remove(FILE_TO_PNG)
raise KeyboardInterrupt
# then the png to a c file
data_to_c_simple(FILE_TO_PNG)
@@ -684,6 +757,7 @@ if B.targets != ['cudakernels']:
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex_world.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
@@ -730,6 +804,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")
@@ -785,9 +861,11 @@ if B.targets != ['cudakernels']:
from FindUnorderedMap import FindUnorderedMap
conf = Configure(env)
old_linkflags = conf.env['LINKFLAGS']
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
FindSharedPtr(conf)
FindUnorderedMap(conf)
conf.env['LINKFLAGS'] = old_linkflags
env = conf.Finish()
# End of auto configuration
@@ -806,7 +884,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':
@@ -818,7 +896,17 @@ thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
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, ['bf_utfconv'] + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, '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')
@@ -868,6 +956,10 @@ if env['OURPLATFORM']!='darwin':
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
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']
@@ -953,8 +1045,9 @@ if env['OURPLATFORM']!='darwin':
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
cubininstall.append(env.Install(dir=dir,source=cubin_file))
for suffix in ('', '_experimental'):
cubin_file = os.path.join(kernel_build_dir, "kernel%s_%s.cubin" % (suffix, arch))
cubininstall.append(env.Install(dir=dir,source=cubin_file))
# osl shaders
if env['WITH_BF_CYCLES_OSL']:
@@ -1095,16 +1188,15 @@ 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}/SDL2.dll')
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3_d.dll')
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3.dll')
if env['WITH_BF_ICONV']:
if env['OURPLATFORM'] == 'win64-vc':

View File

@@ -25,10 +25,12 @@
ARGS=$( \
getopt \
-o s:i:t:h \
--long source:,install:,tmp:,threads:,help,no-sudo,with-all,with-opencollada,ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,\
--long source:,install:,tmp:,info:,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: \
force-ffmpeg,\
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,skip-opencollada,\
required-numpy: \
-- "$@" \
)
@@ -38,6 +40,7 @@ SRC="$HOME/src/blender-deps"
INST="/opt/lib"
TMP="/tmp"
CWD=$PWD
INFO_PATH=$CWD
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
@@ -74,10 +77,13 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
--tmp=<path>
Use a specific temp path (defaults to '\$TMP').
--info=<path>
Use a specific info path (to store BUILD_NOTES.txt, defaults to '\$INFO_PATH').
-t n, --threads=n
Use a specific number of threads when building the libraries (auto-detected as '\$THREADS').
--no_sudo
--no-sudo
Disable use of sudo (this script won't be able to do much though, will just print needed packages...).
--with-all
@@ -176,11 +182,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 #####
@@ -202,12 +204,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"
@@ -216,19 +216,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
@@ -238,8 +238,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=";"
@@ -326,6 +326,9 @@ while true; do
--tmp)
TMP="$2"; shift; shift; continue
;;
--info)
INFO_PATH="$2"; shift; shift; continue
;;
-t|--threads)
THREADS="$2"; shift; shift; continue
;;
@@ -453,9 +456,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
@@ -471,11 +471,12 @@ while true; do
esac
done
if $WITH_ALL; then
if [ $WITH_ALL == true -a $OPENCOLLADA_SKIP == false ]; then
WITH_OPENCOLLADA=true
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" )
@@ -483,21 +484,26 @@ _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" )
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" )
#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.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" "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_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage.git" )
OSL_REPO_UID="4abd672ed3979e5e965323201a5ba5ab802a76a9"
#OSL_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#OSL_REPO_BRANCH="master"
OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
OSL_REPO_UID="22ee5ea298fd215430dfbd160b5aefd507f06db0"
OSL_REPO_BRANCH="blender-fixes"
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
OPENCOLLADA_REPO_UID="18da7f4109a8eafaa290a33f5550501cc4c8bae8"
@@ -973,12 +979,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
@@ -1060,7 +1065,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
@@ -1189,11 +1194,11 @@ compile_OIIO() {
if [ ! -d $_src ]; then
mkdir -p $SRC
# 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
#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
git clone ${OIIO_SOURCE[0]} $_src
@@ -1404,12 +1409,13 @@ clean_OSL() {
compile_OSL() {
# To be changed each time we make edits that would modify the compiled result!
osl_magic=15
osl_magic=16
_init_osl
# Clean install if needed!
magic_compile_check osl-$OSL_VERSION $osl_magic
if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
clean_OSL
fi
@@ -1421,11 +1427,11 @@ compile_OSL() {
if [ ! -d $_src ]; then
mkdir -p $SRC
# download OSL_SOURCE[@] "$_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[0]} $_src
@@ -1433,10 +1439,10 @@ compile_OSL() {
cd $_src
git remote set-url origin $OSL_SOURCE
git remote set-url origin ${OSL_SOURCE[0]}
# XXX For now, always update from latest repo...
git pull -X theirs origin master
git pull --no-edit -X theirs origin $OSL_GIT_BRANCH
# Stick to same rev as windows' libs...
git checkout $OSL_REPO_UID
@@ -1458,6 +1464,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
@@ -1702,7 +1709,7 @@ check_package_DEB() {
}
check_package_installed_DEB() {
r=`dpkg -s $1 | grep -c '$1'`
r=`dpkg-query -W -f='${Status}' $1 | grep -c "install ok"`
if [ $r -ge 1 ]; then
return 0
@@ -1749,11 +1756,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 ""
@@ -1799,7 +1801,7 @@ install_DEB() {
_packages="gawk cmake cmake-curses-gui scons build-essential libjpeg-dev libpng-dev \
libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev \
libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev"
OPENJPEG_USE=true
@@ -1867,7 +1869,7 @@ install_DEB() {
# Only install jack if jack2 is not already installed!
JACK="libjack-dev"
JACK2="libjack-jackd2-dev"
check_package_installed_DEB JACK2
check_package_installed_DEB $JACK2
if [ $? -eq 0 ]; then
_packages="$_packages $JACK2"
else
@@ -1990,13 +1992,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 ""
@@ -2424,13 +2427,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 ""
@@ -2733,14 +2737,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 ""
@@ -3108,9 +3113,9 @@ else
exit 1
fi
print_info | tee BUILD_NOTES.txt
print_info | tee $INFO_PATH/BUILD_NOTES.txt
PRINT ""
PRINT "This information has been written to BUILD_NOTES.txt"
PRINT "This information has been written to $INFO_PATH/BUILD_NOTES.txt"
PRINT ""
# Switch back to user language.

View File

@@ -2,4 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
BF_NUMJOBS = 1
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', 'sm_52']

View File

@@ -2,4 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
BF_NUMJOBS = 1
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', 'sm_52']

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'
@@ -49,7 +49,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
@@ -79,6 +79,8 @@ WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
@@ -134,8 +136,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'
@@ -49,7 +49,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
@@ -79,6 +79,8 @@ WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = True
WITH_BF_OPENMP = True
@@ -134,8 +136,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,5 @@ 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

@@ -34,7 +34,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
@@ -64,6 +64,8 @@ WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True

View File

@@ -34,7 +34,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = True
BF_OPENAL = '/opt/lib/openal'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
WITH_BF_GETTEXT_STATIC = True
@@ -64,6 +64,8 @@ WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True

View File

@@ -3,6 +3,57 @@
# <pep8 compliant>
# List of the branches being built automatically overnight
NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
# List of the branches available for force build
FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
"""
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 +83,87 @@ 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_build(name, hour, minute=0):
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
hour=hour,
minute=minute))
codebases=[forcesched.CodebaseParameter(
codebase="blender",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=FORCE_SCHEDULE_BRANCHES, 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=[]))
"""
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]]
def schedule_build(name, hour, minute=0):
for current_branch in NIGHT_SCHEDULE_BRANCHES:
scheduler_name = "nightly " + name
if current_branch:
scheduler_name += ' ' + current_branch
c['schedulers'].append(timed.Nightly(name=scheduler_name,
codebases={
"blender": {"repository": ""},
"blender-translations": {"repository": "", "branch": "master"},
"blender-addons": {"repository": "", "branch": "master"},
"blender-addons-contrib": {"repository": "", "branch": "master"},
"scons": {"repository": "", "branch": "master"},
"lib svn": {"repository": "", "branch": "master"}},
branch=current_branch,
builderNames=[name],
hour=hour,
minute=minute))
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 +173,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 +183,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 +262,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=150 * 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=150 * 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
@@ -159,12 +302,10 @@ add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder,
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
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_vc2013', 'windows_vc12', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
#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)
@@ -195,15 +336,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

@@ -30,12 +30,12 @@ import zipfile
# extension stripping
def strip_extension(filename):
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
filename_noext, ext = os.path.splitext(filename)
if ext in extensions:
return strip_extension(filename_noext) # may have .tar.bz2
else:
return filename
for ext in extensions:
if filename.endswith(ext):
filename = filename[:-len(ext)]
return filename
# extract platform from package name
def get_platform(filename):
@@ -48,12 +48,11 @@ def get_platform(filename):
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
'win', 'linux', 'source',
'solaris',
'mingw')
'irix', 'solaris', 'mingw')
platform_tokens = []
found = False
for token in tokens:
for i, token in enumerate(tokens):
if not found:
for platform in platforms:
if platform in token.lower():
@@ -65,20 +64,19 @@ def get_platform(filename):
return '-'.join(platform_tokens)
def get_branch(filename):
tokens = filename.split("-")
branch = ""
for token in tokens:
if token == "blender":
return branch
if branch == "":
branch = token
else:
branch = branch + "-" + token
if token == "blender":
return branch
return ""
# get filename
@@ -112,11 +110,16 @@ branch = get_branch(packagename)
if platform == '':
sys.stderr.write('Failed to detect platform ' +
'from package: %r\n' % packagename)
'from package: %r\n' % packagename)
sys.exit(1)
# extract
directory = 'public_html/download'
if not branch or branch == 'master':
directory = 'public_html/download'
elif branch == 'experimental-build':
directory = 'public_html/download/experimental'
else:
directory = 'public_html/download'
try:
zf = z.open(package)
@@ -126,8 +129,6 @@ try:
zf.close()
z.close()
os.remove(filename)
except Exception, ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)

View File

@@ -33,7 +33,7 @@ builder = sys.argv[1]
# we run from build/ directory
blender_dir = '../blender.git'
if builder.find('cmake') != -1:
if 'cmake' in builder:
# cmake
# set build options
@@ -46,16 +46,30 @@ if builder.find('cmake') != -1:
elif builder.endswith('mac_ppc_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
if 'win64' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013 Win64"'])
elif 'win32' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013"'])
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
# configure and make
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
if retcode != 0:
sys.exit(retcode)
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
if 'win' in builder:
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
else:
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
sys.exit(retcode)
else:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
# scons
os.chdir(blender_dir)
scons_cmd = ['python', 'scons/scons.py']
scons_cmd = [python_bin, 'scons/scons.py']
scons_options = ['BF_FANCY=False']
# We're using the same rules as release builder, so tweak
@@ -148,7 +162,7 @@ else:
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
scons_options.append('BF_NUMJOBS=1')
elif builder.find('mac') != -1:
@@ -164,8 +178,6 @@ else:
os.makedirs(install_dir)
if builder.endswith('vc2013'):
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
else:
dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest')
if builder.find('win64') == -1:
dlls_path = '..\\..\\..\\redist\\x86'
else:
@@ -173,6 +185,6 @@ else:
for dll in dlls:
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)

View File

@@ -33,13 +33,15 @@ 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:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
os.chdir('../blender.git')
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
@@ -82,7 +84,7 @@ if builder.find('scons') != -1:
os.system('cp %s %s' % (software_gl, install_dir))
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', 'python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
@@ -111,8 +113,30 @@ if builder.find('scons') != -1:
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
#cmake
if 'win' in builder:
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
for f in files:
os.remove(f)
retcode = subprocess.call(['cpack', '-G','ZIP'])
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
os.rename(result_file, "{}.zip".format(builder))
# create zip file
try:
upload_zip = "buildbot_upload.zip"
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write("{}.zip".format(builder))
z.close()
sys.exit(retcode)
except Exception, ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)
# clean release directory if it already exists
release_dir = 'release'

View File

@@ -1,59 +1,79 @@
# - 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
)
UNSET(_glew_SEARCH_DIRS)

View File

@@ -140,3 +140,8 @@ IF(OPENCOLLADA_FOUND)
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
ENDIF(OPENCOLLADA_FOUND)
UNSET(COMPONENT)
UNSET(UPPERCOMPONENT)
UNSET(_opencollada_LIBRARIES)
UNSET(_opencollada_INCLUDES)

View File

@@ -63,11 +63,12 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
PATH_SUFFIXES
lib64 lib
)
if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
endif()
ENDIF()
ENDFOREACH()
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -82,5 +83,13 @@ ENDIF(OPENCOLORIO_FOUND)
MARK_AS_ADVANCED(
OPENCOLORIO_INCLUDE_DIR
OPENCOLORIO_LIBRARY
OPENCOLORIO_OPENCOLORIO_LIBRARY
OPENCOLORIO_TINYXML_LIBRARY
OPENCOLORIO_YAML-CPP_LIBRARY
)
UNSET(COMPONENT)
UNSET(UPPERCOMPONENT)
UNSET(_opencolorio_FIND_COMPONENTS)
UNSET(_opencolorio_LIBRARIES)
UNSET(_opencolorio_SEARCH_DIRS)

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)
@@ -134,3 +137,9 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
ENDFOREACH()
UNSET(COMPONENT)
UNSET(UPPERCOMPONENT)
UNSET(_openexr_FIND_COMPONENTS)
UNSET(_openexr_LIBRARIES)
UNSET(_openexr_SEARCH_DIRS)

View File

@@ -0,0 +1,77 @@
# - Try to find OpenGLES
# Once done this will define
#
# OPENGLES_FOUND - system has OpenGLES and EGL
# OPENGL_EGL_FOUND - system has EGL
# OPENGLES_INCLUDE_DIR - the GLES include directory
# OPENGLES_LIBRARY - the GLES library
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
# OPENGLES_EGL_LIBRARY - the EGL library
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
# OPENGLES_INCLUDES - all includes needed for OpenGLES
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
ENDIF()
SET(_opengles_SEARCH_DIRS
${OPENGLES_ROOT_DIR}
/usr/local
)
FIND_PATH(OPENGLES_INCLUDE_DIR
NAMES
GLES2/gl2.h
HINTS
${_opengles_SEARCH_DIRS}
)
FIND_LIBRARY(OPENGLES_LIBRARY
NAMES
GLESv2
PATHS
${_opengles_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
NAMES
EGL/egl.h
HINTS
${_opengles_SEARCH_DIRS}
)
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
NAMES
EGL
HINTS
${_opengles_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
SET(OPENGL_EGL_FOUND "YES")
ELSE()
SET(OPENGL_EGL_FOUND "NO")
ENDIF()
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
${OPENGLES_EGL_LIBRARY})
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
SET(OPENGLES_FOUND "YES")
ELSE()
SET(OPENGLES_FOUND "NO")
ENDIF()
MARK_AS_ADVANCED(
OPENGLES_EGL_INCLUDE_DIR
OPENGLES_EGL_LIBRARY
OPENGLES_INCLUDE_DIR
)
UNSET(_opengles_SEARCH_DIRS)

View File

@@ -69,3 +69,5 @@ MARK_AS_ADVANCED(
OPENIMAGEIO_INCLUDE_DIR
OPENIMAGEIO_LIBRARY
)
UNSET(_openimageio_SEARCH_DIRS)

View File

@@ -69,3 +69,5 @@ MARK_AS_ADVANCED(
OPENJPEG_INCLUDE_DIR
OPENJPEG_LIBRARY
)
UNSET(_openjpeg_SEARCH_DIRS)

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)
@@ -110,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
@@ -127,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)
@@ -137,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"
@@ -146,6 +146,14 @@ file(WRITE buildinfo.h.txt
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
)
# cleanup
unset(MY_WC_HASH)
unset(MY_WC_COMMIT_TIMESTAMP)
unset(MY_WC_BRANCH)
unset(BUILD_DATE)
unset(BUILD_TIME)
# Copy the file to the final header only if the version changes
# and avoid needless rebuilds
# TODO: verify this comment is true, as BUILD_TIME probably changes

View File

@@ -174,7 +174,7 @@ def cmake_get_src(f):
elif is_c(new_file):
sources_c.append(new_file)
global_refs.setdefault(new_file, []).append((f, i))
elif l in ("PARENT_SCOPE", ):
elif l in {"PARENT_SCOPE", }:
# cmake var, ignore
pass
elif new_file.endswith(".list"):
@@ -201,7 +201,7 @@ def cmake_get_src(f):
# replace_line(f, i - 1, new_path_rel)
else:
raise Exception("non existant include %s:%d -> %s" % (f, i, new_file))
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
# print(new_file)

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
@@ -125,6 +125,8 @@ def create_nb_project_main():
f.write(' </configuration>\n')
f.write('</project>\n')
f.close()
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
@@ -243,6 +245,8 @@ def create_nb_project_main():
f.write('</configurationDescriptor>\n')
f.close()
def main():
create_nb_project_main()

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,
@@ -63,21 +63,21 @@ def create_qtc_project_main():
if SIMPLE_PROJECTFILE:
# --- qtcreator specific, simple format
PROJECT_NAME = "Blender"
f = open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w') as f:
f.write("\n".join(files_rel))
f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w')
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
with open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') as f:
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
if not os.path.exists(qtc_cfg):
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")
else:
includes, defines = cmake_advanced_info()
@@ -96,29 +96,30 @@ def create_qtc_project_main():
PROJECT_NAME = project_name_get()
FILE_NAME = PROJECT_NAME.lower()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8')
f.write("\n".join(sorted(includes)))
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8') as f:
f.write("\n".join(sorted(includes)))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
if os.path.exists(qtc_custom_cfg):
fc = open(qtc_custom_cfg, 'r')
f.write(fc.read())
fc.close()
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
if os.path.exists(qtc_custom_cfg):
with open(qtc_custom_cfg, 'r') as fc:
f.write(fc.read())
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
print("Blender project file written to: %r" % qtc_prj)
# --- end
@@ -133,21 +134,21 @@ 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()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
if not os.path.exists(qtc_cfg):
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")
print("Python project file written to: %r" % qtc_prj)

View File

@@ -0,0 +1,62 @@
# turn everything OFF except for python which defaults to ON
# and is needed for the UI
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
#
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
if(UNIX AND NOT APPLE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
endif()
if(APPLE)
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
endif()

View File

@@ -44,6 +44,7 @@ set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)

View File

@@ -221,7 +221,7 @@ macro(SETUP_LIBDIRS)
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
link_directories(${PYTHON_LIBPATH})
endif()
if(WITH_SDL)
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
link_directories(${SDL_LIBPATH})
endif()
if(WITH_CODEC_FFMPEG)
@@ -284,8 +284,7 @@ macro(setup_liblinks
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
target_link_libraries(${target}
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${BLENDER_GL_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY})
@@ -305,7 +304,7 @@ macro(setup_liblinks
endif()
if(WITH_SYSTEM_GLEW)
target_link_libraries(${target} ${GLEW_LIBRARY})
target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
target_link_libraries(${target} ${BULLET_LIBRARIES})
@@ -322,7 +321,7 @@ macro(setup_liblinks
if(WITH_CODEC_SNDFILE)
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
endif()
if(WITH_SDL)
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
target_link_libraries(${target} ${SDL_LIBRARY})
endif()
if(WITH_CODEC_QUICKTIME)
@@ -359,9 +358,12 @@ macro(setup_liblinks
endif()
if(WITH_CODEC_FFMPEG)
# Strange!, without this ffmpeg gives linking errors (on linux)
# even though its linked above
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
# Strange! Without this ffmpeg gives linking errors (on linux),
# even though it's linked above.
# XXX: Does FFMPEG depend on GLU?
if(WITH_GLU)
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
endif()
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
endif()
@@ -411,6 +413,12 @@ 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)
@@ -493,6 +501,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
bf_bmesh
bf_blenkernel
bf_nodes
bf_rna
bf_gpu
bf_blenloader
bf_imbuf
@@ -532,7 +541,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
extern_openjpeg
extern_redcode
ge_videotex
bf_rna
bf_dna
bf_blenfont
bf_intern_audaspace
@@ -551,6 +559,9 @@ macro(SETUP_BLENDER_SORTED_LIBS)
extern_wcwidth
extern_libmv
extern_glog
extern_sdlew
bf_intern_glew_mx
)
if(WITH_COMPOSITOR)
@@ -568,7 +579,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
endif()
if(NOT WITH_SYSTEM_GLEW)
list(APPEND BLENDER_SORTED_LIBS extern_glew)
list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BINRELOC)
@@ -712,6 +723,8 @@ macro(TEST_SSE_SUPPORT
endmacro()
macro(TEST_STDBOOL_SUPPORT)
include(CheckCSourceRuns)
# This program will compile correctly if and only if
# this C compiler supports C99 stdbool.
check_c_source_runs("
@@ -986,7 +999,7 @@ macro(ADD_CHECK_CXX_COMPILER_FLAG
endif()
endmacro()
macro(get_blender_version)
function(get_blender_version)
# So cmake depends on BKE_blender.h, beware of inf-loops!
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
@@ -1021,31 +1034,24 @@ macro(get_blender_version)
math(EXPR BLENDER_VERSION_MAJOR "${_out_version} / 100")
math(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100")
set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}" PARENT_SCOPE)
set(BLENDER_SUBVERSION ${_out_subversion})
set(BLENDER_VERSION_CHAR ${_out_version_char})
set(BLENDER_VERSION_CYCLE ${_out_version_cycle})
set(BLENDER_SUBVERSION ${_out_subversion} PARENT_SCOPE)
set(BLENDER_VERSION_CHAR ${_out_version_char} PARENT_SCOPE)
set(BLENDER_VERSION_CYCLE ${_out_version_cycle} PARENT_SCOPE)
# for packaging, alpha to numbers
string(COMPARE EQUAL "${BLENDER_VERSION_CHAR}" "" _out_version_char_empty)
if(${_out_version_char_empty})
set(BLENDER_VERSION_CHAR_INDEX "0")
set(BLENDER_VERSION_CHAR_INDEX "0" PARENT_SCOPE)
else()
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z)
list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index)
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1")
unset(_char_ls)
unset(_out_version_char_index)
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1" PARENT_SCOPE)
endif()
unset(_out_subversion)
unset(_out_version_char)
unset(_out_version_char_empty)
unset(_out_version_cycle)
# message(STATUS "Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}")
endmacro()
endfunction()
# hacks to override initial project settings
@@ -1142,6 +1148,7 @@ macro(delayed_install
endif()
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
endforeach()
unset(f)
endmacro()
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
@@ -1161,6 +1168,7 @@ function(delayed_do_install
list(GET destinations ${i} d)
install(FILES ${f} DESTINATION ${targetdir}/${d})
endforeach()
unset(f)
endif()
endfunction()
@@ -1324,3 +1332,65 @@ 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()
# like Python's 'print(dir())'
macro(print_all_vars)
get_cmake_property(_vars VARIABLES)
foreach(_var ${_vars})
message("${_var}=${${_var}}")
endforeach()
unset(_vars)
unset(_var)
endmacro()

View File

@@ -2,7 +2,6 @@ set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/rende
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
set(PROJECT_CONTACT "foundation@blender.org")
set(PROJECT_VENDOR "Blender Foundation")
set(ORG_WEBSITE "www.blender.org")
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
@@ -32,6 +31,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
endif()
endif()
set(BUILD_REV ${MY_WC_HASH})
unset(MY_WC_HASH)
# Force Package Name
@@ -41,7 +41,7 @@ set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# RPM packages
include(build_files/cmake/RpmBuild.cmake)
if(RPMBUILD_FOUND AND NOT WIN32)
if(RPMBUILD_FOUND)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
set(CPACK_SET_DESTDIR "true")
@@ -61,7 +61,25 @@ if(APPLE)
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
endif()
set(CPACK_PACKAGE_EXECUTABLES "blender")
if(WIN32)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
#force lzma instead of deflate
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
endif()
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
include(CPack)
# Target for build_archive.py script, to automatically pass along
@@ -76,6 +94,8 @@ macro(add_package_archive packagename extension)
OUTPUT ${package_output}
COMMAND ${build_archive} ${packagename} ${extension} bin release
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
unset(build_archive)
unset(package_output)
endmacro()
if(APPLE)

View File

@@ -17,7 +17,7 @@ else
blender_version_full=${blender_version}
fi
blender_ver_string=$blender_version+svn$blender_version_full
blender_ver_string=$blender_version+git$blender_version_full
pkgname=blender-snapshot
pkgver=$blender_ver_string
@@ -27,8 +27,8 @@ arch=('i686' 'x86_64')
url="www.blender.org"
license=('GPL')
groups=()
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
makedepends=('cmake' 'svn')
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.4' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
makedepends=('cmake' 'git')
optdepends=()
provides=()
conflicts=('blender')
@@ -36,7 +36,7 @@ replaces=('blender')
backup=()
options=()
install=blender.install
# use current svn to make the package.
# use current git to make the package.
# source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
# md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
source=()
@@ -51,11 +51,7 @@ build() {
-DCMAKE_BUILD_TYPE:STRING=Release \
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
-DWITH_PYTHON_INSTALL:BOOL=OFF \
-DWITH_OPENCOLLADA:BOOL=OFF \
-DPYTHON_VERSION:STRING=3.2 \
-DPYTHON_LIBPATH:STRING=/usr/lib \
-DPYTHON_LIBRARY:STRING=python3.2mu \
-DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu
-DWITH_OPENCOLLADA:BOOL=OFF
make $MAKEFLAGS
}

View File

@@ -68,7 +68,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored i
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_OPENEXR = True
@@ -154,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'
@@ -181,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
@@ -205,7 +205,7 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
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', 'sm_52']
#Freestyle
WITH_BF_FREESTYLE = True
@@ -237,7 +237,7 @@ LLIBS = ['stdc++']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
CC_WARN = ['-Wall']
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
@@ -253,7 +253,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS = ['-g']
#############################################################################
################### Output directories ##################

View File

@@ -197,7 +197,7 @@ BF_BOOST = '/usr'
BF_BOOST_INC = '${BF_BOOST}/include'
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a' + \
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
'${BF_BOOST_LIBPATH}/libboost_thread.a'
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
@@ -241,7 +241,7 @@ if WITH_BF_FFMPEG:
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
CC_WARN = ['-Wall']
@@ -254,7 +254,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR = '../build/linux'
BF_INSTALLDIR='../install/linux'
@@ -262,6 +262,6 @@ BF_INSTALLDIR='../install/linux'
#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']
#Fix for LLVM conflict with Mesa llvmpipe
if WITH_BF_LLVM:
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']

View File

@@ -190,13 +190,13 @@ CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-limm32']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
@@ -205,7 +205,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']

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 "15.00." in CL_STDERR:
VC_VERSION = '9.0'
LCGDIR = '#../lib/windows'
else:
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
@@ -60,7 +57,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
@@ -72,10 +69,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
if VC_VERSION == '12.0':
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
else:
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -154,7 +148,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
@@ -196,18 +190,14 @@ WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
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'
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'
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'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
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', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
@@ -231,18 +221,21 @@ 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']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'imm32']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
@@ -253,10 +246,6 @@ PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/IN
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-vc'
BF_INSTALLDIR='..\\install\\win32-vc'
else:
BF_BUILDDIR = '..\\build\\win32-vc9'
BF_INSTALLDIR='..\\install\\win32-vc9'
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'

View File

@@ -184,13 +184,13 @@ CXXFLAGS = [ '-fpermissive' ]
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-limm32']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
@@ -199,7 +199,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']

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 "15.00." in CL_STDERR:
VC_VERSION = '9.0'
LCGDIR = '#../lib/win64'
else:
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
@@ -55,7 +52,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_JACK = False
@@ -69,10 +66,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
if VC_VERSION == '12.0':
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
else:
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -157,7 +151,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
@@ -186,7 +180,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
@@ -199,18 +193,14 @@ WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
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'
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'
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'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
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', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
@@ -236,6 +226,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']
@@ -245,19 +236,16 @@ BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'imm32']
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-vc'
BF_INSTALLDIR='..\\install\\win64-vc'
else:
BF_BUILDDIR = '..\\build\\win64-vc9'
BF_INSTALLDIR='..\\install\\win64-vc9'
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'

View File

@@ -143,7 +143,7 @@ def setup_staticlibs(lenv):
libincs += Split(lenv['BF_FREETYPE_LIBPATH'])
if lenv['WITH_BF_PYTHON']:
libincs += Split(lenv['BF_PYTHON_LIBPATH'])
if lenv['WITH_BF_SDL']:
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
libincs += Split(lenv['BF_SDL_LIBPATH'])
if lenv['WITH_BF_JACK'] and not lenv['WITH_BF_JACK_DYNLOAD']:
libincs += Split(lenv['BF_JACK_LIBPATH'])
@@ -248,6 +248,11 @@ def setup_staticlibs(lenv):
libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"]
libincs.append('/usr/lib')
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
# Here we only store library path, actual library name will be added in setup_syslibs()
for syslib in create_blender_liblist(lenv, 'system'):
libincs.append(os.path.dirname(syslib))
return statlibs, libincs
def setup_syslibs(lenv):
@@ -298,7 +303,7 @@ def setup_syslibs(lenv):
if lenv['WITH_BF_ELTOPO']:
syslibs += Split(lenv['BF_LAPACK_LIB'])
'''
if lenv['WITH_BF_SDL']:
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
syslibs += Split(lenv['BF_SDL_LIB'])
if not lenv['WITH_BF_STATICOPENGL']:
syslibs += Split(lenv['BF_OPENGL_LIB'])
@@ -339,6 +344,10 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_STATICPNG']:
syslibs += Split(lenv['BF_PNG_LIB'])
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
for syslib in create_blender_liblist(lenv, 'system'):
syslibs.append(os.path.basename(syslib))
syslibs += lenv['LLIBS']
return syslibs
@@ -372,12 +381,19 @@ def creator(env):
defs.append('WITH_BINRELOC')
if env['WITH_BF_SDL']:
if env['WITH_BF_SDL_DYNLOAD']:
defs.append('WITH_SDL_DYNLOAD')
incs.append('#/extern/sdlew/include')
defs.append('WITH_SDL')
if env['WITH_BF_LIBMV']:
incs.append('#/extern/libmv')
defs.append('WITH_LIBMV')
if env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_LOGGING']:
incs.append('#/intern/cycles/blender')
defs.append('WITH_CYCLES_LOGGING')
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
@@ -702,37 +718,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)
@@ -760,11 +776,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)
@@ -781,28 +797,24 @@ def AppIt(target=None, source=None, env=None):
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
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
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 = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems

View File

@@ -108,7 +108,7 @@ def validate_arguments(args, bc):
opts_list = [
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
@@ -136,6 +136,9 @@ def validate_arguments(args, bc):
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
'WITH_BF_EGL', 'WITH_BF_GLEW_ES', 'BF_GLEW_INC', 'WITH_BF_GL_PROFILE_CORE', 'WITH_BF_GL_PROFILE_COMPAT', 'WITH_BF_GL_PROFILE_ES20',
'WITH_BF_GLEW_MX', 'WITH_BF_GL_EGL', 'WITH_BF_GL_ANGLE',
'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
'WITH_BF_STATICOPENCOLLADA', 'BF_OPENCOLLADA_LIB_STATIC',
'WITH_BF_PLAYER',
@@ -176,7 +179,7 @@ def validate_arguments(args, bc):
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
'WITH_BF_LIBMV',
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS'
]
@@ -185,6 +188,7 @@ def validate_arguments(args, bc):
opts_list_split = [
'BF_PYTHON_LINKFLAGS',
'BF_OPENGL_LINKFLAGS',
'BF_GL_DEFINITIONS',
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
'BGE_CXXFLAGS',
@@ -192,7 +196,8 @@ def validate_arguments(args, bc):
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
'C_WARN', 'CC_WARN', 'CXX_WARN',
'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET'
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING'
]
@@ -295,6 +300,7 @@ def read_opts(env, cfg, args):
('BF_SDL_INC', 'SDL include path', ''),
('BF_SDL_LIB', 'SDL library', ''),
('BF_SDL_LIBPATH', 'SDL library path', ''),
(BoolVariable('WITH_BF_SDL_DYNLOAD', 'Enable runtime dynamic SDL libraries loading (works only on Linux)', False)),
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
('BF_JACK', 'jack base path', ''),
@@ -461,6 +467,18 @@ def read_opts(env, cfg, args):
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
(BoolVariable('WITH_BF_GLEW_MX', '', False)),
(BoolVariable('WITH_BF_GLEW_ES', '', False)),
(BoolVariable('WITH_BF_GL_EGL', '', False)),
(BoolVariable('WITH_BF_GL_PROFILE_COMPAT', '', True)),
(BoolVariable('WITH_BF_GL_PROFILE_CORE', '', False)),
(BoolVariable('WITH_BF_GL_PROFILE_ES20', '', False)),
(BoolVariable('WITH_BF_GL_ANGLE', '', False)),
('BF_GL_DEFINITIONS', '', []),
('BF_GLEW_INC', '', ''),
) # end of opts.AddVariables()
localopts.AddVariables(
(BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', False)),
(BoolVariable('WITH_BF_STATICOPENCOLLADA', 'Staticly link to OpenCollada', False)),
('BF_COLLADA', 'COLLADA base path', ''),
@@ -556,6 +574,7 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
(BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
(BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
(BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
) # end of opts.AddOptions()
@@ -585,6 +604,8 @@ def read_opts(env, cfg, args):
('BF_CYCLES_CUDA_NVCC', 'CUDA nvcc compiler path', ''),
('BF_CYCLES_CUDA_ENV', 'preset environement nvcc will execute in', ''),
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
(BoolVariable('WITH_BF_CYCLES_DEBUG', 'Build Cycles engine with extra debugging capabilities', False)),
(BoolVariable('WITH_BF_CYCLES_LOGGING', 'Build Cycles engine with logging support', True)),
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
(BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
@@ -686,9 +707,6 @@ 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

63
build_files/utils/build_tgz.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/sh
# This script can run from any location,
# output is created in the $CWD
BASE_DIR="$PWD"
blender_srcdir=$(dirname -- $0)/../..
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
if [ "$blender_version_cycle" = "release" ] ; then
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
else
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
SUBMODULE_EXCLUDE="^$" # dummy regex
fi
MANIFEST="blender-$VERSION-manifest.txt"
TARBALL="blender-$VERSION.tar.gz"
cd "$blender_srcdir"
# not so nice, but works
FILTER_FILES_PY="import os, sys; [print(l[:-1]) for l in sys.stdin.readlines() if os.path.isfile(l[:-1])]"
# Build master list
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
# Enumerate submodules
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
cd "$BASE_DIR"
cd "$blender_srcdir/$lcv"
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
cd "$BASE_DIR"
done
echo "OK"
# Create the tarball
cd "$blender_srcdir"
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
echo "OK"
# Create checksum file
cd "$BASE_DIR"
echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
md5sum "$TARBALL" > "$TARBALL.md5sum"
echo "OK"
# Cleanup
echo -n "Cleaning up ..."
rm "$BASE_DIR/$MANIFEST"
echo "OK"
echo "Done!"

View File

@@ -112,7 +112,7 @@ class DNACatalogHTML:
# ${version} and ${revision}
if bpy:
version = '.'.join(map(str, bpy.app.version))
revision = bpy.app.build_revision[:-1]
revision = bpy.app.build_hash
else:
version = str(header.Version)
revision = 'Unknown'
@@ -404,7 +404,7 @@ def main():
# Files
if '--dna-versioned' in sys.argv:
blender_version = '_'.join(map(str, bpy.app.version))
filename = 'dna-{0}-{1}_endian-{2}-r{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_revision[2:-1])
filename = 'dna-{0}-{1}_endian-{2}-{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_hash)
else:
filename = 'dna'
dir = os.path.dirname(__file__)
@@ -451,7 +451,7 @@ def main():
os.remove(Path_Blend)
# export dna to xhtml
log.info("6: export sdna to xhtml file")
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
handleHTML = open(Path_HTML, "w")
catalog.WriteToHTML(handleHTML)
handleHTML.close()

View File

@@ -31,7 +31,6 @@ and <output-filename> is where to write the generated man page.
# <pep8 compliant>
import subprocess
import os
import sys
import time

View File

@@ -75,7 +75,7 @@ print(scene.test_float)
scene.test_array = (True, False)
print([x for x in scene.test_array])
#scene.test_date = "blah" # this would fail, property is read-only
# scene.test_date = "blah" # this would fail, property is read-only
print(scene.test_date)
scene.test_enum = 'BLUE'

View File

@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
self.execute(context)
elif event.type == 'LEFTMOUSE': # Confirm
return {'FINISHED'}
elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
context.object.location.x = self.init_loc_x
return {'CANCELLED'}

View File

@@ -8,4 +8,3 @@ collection.foreach_get(attr, some_seq)
# Python equivalent
for i in range(len(seq)):
some_seq[i] = getattr(collection[i], attr)

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

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

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

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

@@ -152,6 +152,8 @@ base class --- :class:`PyObjectPlus`
:arg scene: The name of the scene to replace this scene with.
:type scene: string
:return: True if the scene exists and was scheduled for addition, False otherwise.
:rtype: boolean
.. method:: suspend()

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

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

@@ -49,7 +49,7 @@ A quick list of helpful things to know before starting:
* Blender uses Python 3.x; some 3rd party extensions are not available yet.
* The interactive console is great for testing one-liners, It also has autocompleation so you can inspect the api quickly.
* The interactive console is great for testing one-liners, It also has autocompletion so you can inspect the api quickly.
* Button tool tips show Python attributes and operator names.
@@ -247,7 +247,8 @@ Examples:
Operator Poll()
^^^^^^^^^^^^^^^
Many operators have a "poll" function which may check that the mouse is a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc). When an operator's poll function fails within python, an exception is raised.
Many operators have a "poll" function which may check that the mouse is in a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc).
When an operator's poll function fails within python, an exception is raised.
For example, calling bpy.ops.view3d.render_border() from the console raises the following error:

View File

@@ -563,20 +563,26 @@ Bringing it all together
# handle the keymap
wm = bpy.context.window_manager
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
kmi.properties.total = 4
addon_keymaps.append((km, kmi))
# Note that in background mode (no GUI available), keyconfigs are not available either, so we have to check this
# to avoid nasty errors in background case.
kc = wm.keyconfigs.addon
if kc:
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
kmi.properties.total = 4
addon_keymaps.append((km, kmi))
def unregister():
bpy.utils.unregister_class(ObjectCursorArray)
bpy.types.VIEW3D_MT_object.remove(menu_func)
# Note: when unregistering, it's usually good practice to do it in reverse order you registered.
# Can avoid strange issues like keymap still referring to operators already unregistered...
# handle the keymap
for km, kmi in addon_keymaps:
km.keymap_items.remove(kmi)
addon_keymaps.clear()
bpy.utils.unregister_class(ObjectCursorArray)
bpy.types.VIEW3D_MT_object.remove(menu_func)
if __name__ == "__main__":
register()

View File

@@ -145,6 +145,7 @@ def main():
"BMO_OPTYPE_FLAG_NORMALS_CALC",
"BMO_OPTYPE_FLAG_UNTAN_MULTIRES",
"BMO_OPTYPE_FLAG_SELECT_FLUSH",
"BMO_OPTYPE_FLAG_SELECT_VALIDATE",
"BMO_OPTYPE_FLAG_NOP",
)
vars_dict = {}

View File

@@ -1,22 +1,22 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton, Luca Bonavita
#
# #**** END GPL LICENSE BLOCK #****
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
@@ -274,6 +274,12 @@ else:
"mathutils.kdtree",
"mathutils.noise",
"freestyle",
"freestyle.chainingiterators",
"freestyle.functions",
"freestyle.predicates",
"freestyle.shaders",
"freestyle.types",
"freestyle.utils",
]
# ------
@@ -316,7 +322,13 @@ try:
__import__("freestyle")
except ImportError:
BPY_LOGGER.debug("Warning: Built without 'freestyle' module, docs incomplete...")
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle"]
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle",
"freestyle.chainingiterators",
"freestyle.functions",
"freestyle.predicates",
"freestyle.shaders",
"freestyle.types",
"freestyle.utils"]
# examples
EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples"))
@@ -683,7 +695,7 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
fw(ident + ".. data:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) in (MethodDescriptorType, ClassMethodDescriptorType):
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
write_indented_lines(ident, fw, doc, False)
fw("\n")
else:
@@ -877,7 +889,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
for attribute, value, value_type in module_dir_value_type:
if value_type == types.FunctionType:
pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False)
elif value_type in (types.BuiltinMethodType, types.BuiltinFunctionType): # both the same at the moment but to be future proof
elif value_type in {types.BuiltinMethodType, types.BuiltinFunctionType}: # both the same at the moment but to be future proof
# note: can't get args from these, so dump the string as is
# this means any module used like this must have fully formatted docstrings.
py_c_func2sphinx("", fw, module_name, None, attribute, value, is_class=False)
@@ -1780,8 +1792,14 @@ def write_rst_importable_modules(basepath):
"mathutils.geometry" : "Geometry Utilities",
"mathutils.kdtree" : "KDTree Utilities",
"mathutils.noise" : "Noise Utilities",
"freestyle" : "Freestyle Data Types & Operators",
}
"freestyle" : "Freestyle Module",
"freestyle.types" : "Freestyle Types",
"freestyle.predicates" : "Freestyle Predicates",
"freestyle.functions" : "Freestyle Functions",
"freestyle.chainingiterators" : "Freestyle Chaining Iterators",
"freestyle.shaders" : "Freestyle Shaders",
"freestyle.utils" : "Freestyle Utilities",
}
for mod_name, mod_descr in importable_modules.items():
if mod_name not in EXCLUDE_MODULES:
module = __import__(mod_name,
@@ -1852,8 +1870,8 @@ def rna2sphinx(basepath):
# context
if "bpy.context" not in EXCLUDE_MODULES:
# one of a kind, context doc (uses ctypes to extract info!)
# doesn't work on mac
if PLATFORM != "darwin":
# doesn't work on mac and windows
if PLATFORM not in {"darwin", "windows"}:
pycontext2sphinx(basepath)
# internal modules

View File

@@ -3,6 +3,10 @@
# bash doc/python_api/sphinx_doc_gen.sh
# ssh upload means you need an account on the server
if [ "$1" == "" ] ; then
echo "Expected a single argument for the username on blender.org, aborting"
exit 1
fi
# ----------------------------------------------------------------------------
# Upload vars
@@ -16,9 +20,9 @@ DO_OUT_PDF=false
BLENDER="./blender.bin"
SSH_USER="ideasman42"
SSH_USER=$1
SSH_HOST=$SSH_USER"@blender.org"
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
SSH_UPLOAD="/data/www/vhosts/www.blender.org/api" # blender_python_api_VERSION, added after
# ----------------------------------------------------------------------------
# Blender Version & Info
@@ -26,11 +30,11 @@ SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api
# 'Blender 2.53 (sub 1) Build' --> '2_53_1' as a shell script.
# "_".join(str(v) for v in bpy.app.version)
# custom blender vars
blender_srcdir=$(dirname $0)/../../
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_version_char=$(grep BLENDER_VERSION_CHAR $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_srcdir=$(dirname -- $0)/../..
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
if [ "$blender_version_cycle" = "release" ] ; then
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
@@ -100,7 +104,7 @@ if $DO_UPLOAD ; then
cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
ssh $SSH_USER@blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
rsync --progress -ave "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
## symlink the dir to a static URL
#ssh $SSH_USER@blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
@@ -115,11 +119,11 @@ if $DO_UPLOAD ; then
if $DO_OUT_PDF ; then
# rename so local PDF has matching name.
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
rsync --progress -ave "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
fi
if $DO_OUT_HTML_ZIP ; then
rsync --progress -avze "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
rsync --progress -ave "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
fi
fi

View File

@@ -1,22 +1,22 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# #**** END GPL LICENSE BLOCK #****
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>

21
extern/CMakeLists.txt vendored
View File

@@ -47,7 +47,11 @@ if(WITH_BINRELOC)
endif()
if(NOT WITH_SYSTEM_GLEW)
add_subdirectory(glew)
if(WITH_GLEW_ES)
add_subdirectory(glew-es)
else()
add_subdirectory(glew)
endif()
endif()
if(WITH_GAMEENGINE)
@@ -70,16 +74,23 @@ 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()
if(WITH_GHOST_XDND)
if(UNIX AND NOT APPLE)
add_subdirectory(xdnd)
endif()
if(WITH_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()
if(WITH_GTESTS)
add_subdirectory(gtest)
endif()
if(WITH_SDL AND WITH_SDL_DYNLOAD)
add_subdirectory(sdlew)
endif()

13
extern/SConscript vendored
View File

@@ -2,7 +2,11 @@
Import('env')
SConscript(['glew/SConscript'])
if env['WITH_BF_GLEW_ES']:
SConscript(['glew-es/SConscript'])
else:
SConscript(['glew/SConscript'])
SConscript(['colamd/SConscript'])
SConscript(['rangetree/SConscript'])
SConscript(['wcwidth/SConscript'])
@@ -20,6 +24,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'])
@@ -42,3 +50,6 @@ if env['WITH_GHOST_XDND']:
# FreeBSD doesn't seems to support XDND protocol
if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'aix4', 'aix5'):
SConscript(['xdnd/SConscript'])
if env['WITH_BF_SDL'] and env['WITH_BF_SDL_DYNLOAD']:
SConscript(['sdlew/SConscript'])

View File

@@ -29,10 +29,13 @@ subject to the following restrictions:
static btVector3
getNormalizedVector(const btVector3& v)
{
btVector3 n = v.normalized();
if (n.length() < SIMD_EPSILON) {
n.setValue(0, 0, 0);
}
btScalar l = v.length();
btVector3 n = v;
if (l < SIMD_EPSILON) {
n.setValue(0,0,0);
} else {
n /= l;
}
return n;
}

View File

@@ -161,6 +161,7 @@ if(WITH_BOOST)
add_definitions(
-DCARVE_SYSTEM_BOOST
-DHAVE_BOOST_LIBRARY
)
list(APPEND INC_SYS

View File

@@ -19,6 +19,7 @@ if env['WITH_BF_BOOST']:
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
defs.append('CARVE_SYSTEM_BOOST')
defs.append('HAVE_BOOST_LIBRARY')
incs.append(env['BF_BOOST_INC'])
env.BlenderLib ('extern_carve', Split(sources), incs, defs, libtype=['extern'], priority=[40] )

View File

@@ -31,6 +31,8 @@ headers=`find ./lib -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t
includes=`find ./include -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/' | sort -d`
cp patches/files/config.h include/carve/config.h
mkdir -p include/carve/random
cp patches/files/random.h include/carve/random/random.h
cat > CMakeLists.txt << EOF
# ***** BEGIN GPL LICENSE BLOCK *****
@@ -91,6 +93,7 @@ if(WITH_BOOST)
add_definitions(
-DCARVE_SYSTEM_BOOST
-DHAVE_BOOST_LIBRARY
)
list(APPEND INC_SYS
@@ -123,6 +126,7 @@ if env['WITH_BF_BOOST']:
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
defs.append('CARVE_SYSTEM_BOOST')
defs.append('HAVE_BOOST_LIBRARY')
incs.append(env['BF_BOOST_INC'])
env.BlenderLib ('extern_carve', Split(sources), incs, defs, libtype=['extern'], priority=[40] )

View File

@@ -555,6 +555,19 @@ void cleanupFaceEdgeAttrs(const MeshSet<3> *left,
interpolator->swapAttributes(&new_interpolator);
}
void cleanupFaceEdgeAttrsCallback(const MeshSet<3> *left,
const MeshSet<3> *right,
void *descr_v)
{
CarveMeshDescr *descr = (CarveMeshDescr *) descr_v;
cleanupFaceEdgeAttrs(left,
right,
&descr->face_edge_triangulated_flag);
cleanupFaceEdgeAttrs(left,
right,
&descr->orig_face_edge_mapping);
}
} // namespace
CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
@@ -737,14 +750,9 @@ bool carve_performBooleanOperation(CarveMeshDescr *left_mesh,
// intersecting that meshes tessellation of operation result can't be
// done properly. The only way to make such situations working is to
// union intersecting meshes of the same operand.
if (carve_unionIntersections(&csg, &left, &right)) {
cleanupFaceEdgeAttrs(left,
right,
&output_descr->face_edge_triangulated_flag);
cleanupFaceEdgeAttrs(left,
right,
&output_descr->orig_face_edge_mapping);
}
carve_unionIntersections(&csg, &left, &right,
cleanupFaceEdgeAttrsCallback,
(void *) output_descr);
left_mesh->poly = left;
right_mesh->poly = right;

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

@@ -365,7 +365,10 @@ MeshSet<3> *getIntersectedOperand(std::vector<MeshSet<3>::mesh_t*> *meshes,
MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
MeshSet<3> *poly,
const MeshSet<3>::aabb_t &otherAABB)
const MeshSet<3> *other_poly,
const MeshSet<3>::aabb_t &otherAABB,
UnionIntersectionsCallback callback,
void *user_data)
{
if (poly->meshes.size() <= 1) {
return poly;
@@ -409,6 +412,7 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
carve::csg::CSG::UNION,
NULL, carve::csg::CSG::CLASSIFY_EDGE);
callback(result, other_poly, user_data);
delete left;
delete right;
@@ -420,6 +424,8 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, right->meshes);
callback(result, other_poly, user_data);
delete left;
delete right;
@@ -455,37 +461,36 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
// TODO(sergey): This function is to be totally re-implemented to make it
// more clear what's going on and hopefully optimize it as well.
bool carve_unionIntersections(carve::csg::CSG *csg,
void carve_unionIntersections(carve::csg::CSG *csg,
MeshSet<3> **left_r,
MeshSet<3> **right_r)
MeshSet<3> **right_r,
UnionIntersectionsCallback callback,
void *user_data)
{
MeshSet<3> *left = *left_r, *right = *right_r;
bool changed = false;
if (left->meshes.size() == 1 && right->meshes.size() == 0) {
return false;
return;
}
MeshSet<3>::aabb_t leftAABB = left->getAABB();
MeshSet<3>::aabb_t rightAABB = right->getAABB();;
left = unionIntersectingMeshes(csg, left, rightAABB);
right = unionIntersectingMeshes(csg, right, leftAABB);
left = unionIntersectingMeshes(csg, left, right, rightAABB,
callback, user_data);
right = unionIntersectingMeshes(csg, right, left, leftAABB,
callback, user_data);
if (left != *left_r) {
changed = true;
delete *left_r;
}
if (right != *right_r) {
changed = true;
delete *right_r;
}
*left_r = left;
*right_r = right;
return changed;
}
static inline void add_newell_cross_v3_v3v3(const Vector &v_prev,

View File

@@ -70,9 +70,15 @@ void carve_getRescaleMinMax(const carve::mesh::MeshSet<3> *left,
carve::geom3d::Vector *min,
carve::geom3d::Vector *max);
bool carve_unionIntersections(carve::csg::CSG *csg,
typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
const carve::mesh::MeshSet<3> *right,
void *userdata);
void carve_unionIntersections(carve::csg::CSG *csg,
carve::mesh::MeshSet<3> **left_r,
carve::mesh::MeshSet<3> **right_r);
carve::mesh::MeshSet<3> **right_r,
UnionIntersectionsCallback callback,
void *user_data);
bool carve_checkPolyPlanarAndGetNormal(const std::vector<carve::mesh::MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,

View File

@@ -0,0 +1,61 @@
#include <cassert>
#include <cmath>
#include <vector>
namespace boost {
#if __cplusplus > 199711L
# include <random>
typedef std::mt19937 mt19937;
#else
# include <stdlib.h>
struct mt19937 {
int operator()() {
return rand();
}
int max() {
return RAND_MAX;
}
};
#endif
template<typename T>
struct uniform_on_sphere {
typedef std::vector<T> result_type;
uniform_on_sphere(int dimension) {
assert(dimension == 3);
}
std::vector<T>
operator()(float u1, float u2) {
T z = 1.0 - 2.0*u1;
T r = std::sqrt(std::max(0.0, 1.0 - z*z));
T phi = 2.0*M_PI*u2;
T x = r*std::cos(phi);
T y = r*std::sin(phi);
std::vector<T> result;
result.push_back(x);
result.push_back(y);
result.push_back(z);
return result;
}
};
template<typename RNG, typename DISTR>
struct variate_generator {
variate_generator(RNG rng, DISTR distr)
: rng_(rng), distr_(distr) {}
typename DISTR::result_type
operator()() {
float rng_max_inv = 1.0 / rng_.max();
return distr_(rng_() * rng_max_inv, rng_() * rng_max_inv);
}
RNG rng_;
DISTR distr_;
};
}

View File

@@ -36,7 +36,11 @@
#include <carve/mesh.hpp>
#include BOOST_INCLUDE(random.hpp)
#ifdef HAVE_BOOST_LIBRARY
# include BOOST_INCLUDE(random.hpp)
#else
# include <carve/random/random.h>
#endif
namespace {
bool emb_test(carve::poly::Polyhedron *poly,

61
extern/carve/patches/files/random.h vendored Normal file
View File

@@ -0,0 +1,61 @@
#include <cassert>
#include <cmath>
#include <vector>
namespace boost {
#if __cplusplus > 199711L
# include <random>
typedef std::mt19937 mt19937;
#else
# include <stdlib.h>
struct mt19937 {
int operator()() {
return rand();
}
int max() {
return RAND_MAX;
}
};
#endif
template<typename T>
struct uniform_on_sphere {
typedef std::vector<T> result_type;
uniform_on_sphere(int dimension) {
assert(dimension == 3);
}
std::vector<T>
operator()(float u1, float u2) {
T z = 1.0 - 2.0*u1;
T r = std::sqrt(std::max(0.0, 1.0 - z*z));
T phi = 2.0*M_PI*u2;
T x = r*std::cos(phi);
T y = r*std::sin(phi);
std::vector<T> result;
result.push_back(x);
result.push_back(y);
result.push_back(z);
return result;
}
};
template<typename RNG, typename DISTR>
struct variate_generator {
variate_generator(RNG rng, DISTR distr)
: rng_(rng), distr_(distr) {}
typename DISTR::result_type
operator()() {
float rng_max_inv = 1.0 / rng_.max();
return distr_(rng_() * rng_max_inv, rng_() * rng_max_inv);
}
RNG rng_;
DISTR distr_;
};
}

16
extern/carve/patches/random.patch vendored Normal file
View File

@@ -0,0 +1,16 @@
diff -r 9a85d733a43d lib/polyhedron.cpp
--- a/lib/polyhedron.cpp Tue Jun 24 11:15:23 2014 +1000
+++ b/lib/polyhedron.cpp Thu Nov 13 17:36:06 2014 +0500
@@ -36,7 +36,11 @@
#include <carve/mesh.hpp>
-#include BOOST_INCLUDE(random.hpp)
+#ifdef HAVE_BOOST_LIBRARY
+# include BOOST_INCLUDE(random.hpp)
+#else
+# include <carve/random/random.h>
+#endif
namespace {
bool emb_test(carve::poly::Polyhedron *poly,

View File

@@ -11,3 +11,4 @@ mesh_simplify_uninitialized_var.patch
memory_leak_fix.patch
msvc_fix.patch
face_hole_merge_workaround.patch
random.patch

42
extern/clew/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,42 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Jacques Beaurain.
#
# ***** END GPL LICENSE BLOCK *****
set(INC
.
include
)
set(INC_SYS
)
set(SRC
include/clew.h
src/clew.c
)
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
blender_add_lib(extern_clew "${SRC}" "${INC}" "${INC_SYS}")

35
extern/clew/SConscript vendored Normal file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env python
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Nathan Letwory.
#
# ***** END GPL LICENSE BLOCK *****
Import ('env')
sources = env.Glob('src/clew.c')
incs = 'include'
defs = ['CL_USE_DEPRECATED_OPENCL_1_1_APIS']
env.BlenderLib ('extern_clew', sources, Split(incs), defines=defs, libtype=['system'], priority = [999])

2768
extern/clew/include/clew.h vendored Normal file

File diff suppressed because it is too large Load Diff

382
extern/clew/src/clew.c vendored Normal file
View File

@@ -0,0 +1,382 @@
//////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009 Organic Vectory B.V.
// Written by George van Venrooij
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file license.txt)
//////////////////////////////////////////////////////////////////////////
#include "clew.h"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <windows.h>
typedef HMODULE CLEW_DYNLIB_HANDLE;
#define CLEW_DYNLIB_OPEN LoadLibrary
#define CLEW_DYNLIB_CLOSE FreeLibrary
#define CLEW_DYNLIB_IMPORT GetProcAddress
#else
#include <dlfcn.h>
typedef void* CLEW_DYNLIB_HANDLE;
#define CLEW_DYNLIB_OPEN(path) dlopen(path, RTLD_NOW | RTLD_GLOBAL)
#define CLEW_DYNLIB_CLOSE dlclose
#define CLEW_DYNLIB_IMPORT dlsym
#endif
#include <stdlib.h>
//! \brief module handle
static CLEW_DYNLIB_HANDLE module = NULL;
// Variables holding function entry points
PFNCLGETPLATFORMIDS __clewGetPlatformIDs = NULL;
PFNCLGETPLATFORMINFO __clewGetPlatformInfo = NULL;
PFNCLGETDEVICEIDS __clewGetDeviceIDs = NULL;
PFNCLGETDEVICEINFO __clewGetDeviceInfo = NULL;
PFNCLCREATESUBDEVICES __clewCreateSubDevices = NULL;
PFNCLRETAINDEVICE __clewRetainDevice = NULL;
PFNCLRELEASEDEVICE __clewReleaseDevice = NULL;
PFNCLCREATECONTEXT __clewCreateContext = NULL;
PFNCLCREATECONTEXTFROMTYPE __clewCreateContextFromType = NULL;
PFNCLRETAINCONTEXT __clewRetainContext = NULL;
PFNCLRELEASECONTEXT __clewReleaseContext = NULL;
PFNCLGETCONTEXTINFO __clewGetContextInfo = NULL;
PFNCLCREATECOMMANDQUEUE __clewCreateCommandQueue = NULL;
PFNCLRETAINCOMMANDQUEUE __clewRetainCommandQueue = NULL;
PFNCLRELEASECOMMANDQUEUE __clewReleaseCommandQueue = NULL;
PFNCLGETCOMMANDQUEUEINFO __clewGetCommandQueueInfo = NULL;
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
PFNCLSETCOMMANDQUEUEPROPERTY __clewSetCommandQueueProperty = NULL;
#endif
PFNCLCREATEBUFFER __clewCreateBuffer = NULL;
PFNCLCREATESUBBUFFER __clewCreateSubBuffer = NULL;
PFNCLCREATEIMAGE __clewCreateImage = NULL;
PFNCLRETAINMEMOBJECT __clewRetainMemObject = NULL;
PFNCLRELEASEMEMOBJECT __clewReleaseMemObject = NULL;
PFNCLGETSUPPORTEDIMAGEFORMATS __clewGetSupportedImageFormats = NULL;
PFNCLGETMEMOBJECTINFO __clewGetMemObjectInfo = NULL;
PFNCLGETIMAGEINFO __clewGetImageInfo = NULL;
PFNCLSETMEMOBJECTDESTRUCTORCALLBACK __clewSetMemObjectDestructorCallback = NULL;
PFNCLCREATESAMPLER __clewCreateSampler = NULL;
PFNCLRETAINSAMPLER __clewRetainSampler = NULL;
PFNCLRELEASESAMPLER __clewReleaseSampler = NULL;
PFNCLGETSAMPLERINFO __clewGetSamplerInfo = NULL;
PFNCLCREATEPROGRAMWITHSOURCE __clewCreateProgramWithSource = NULL;
PFNCLCREATEPROGRAMWITHBINARY __clewCreateProgramWithBinary = NULL;
PFNCLCREATEPROGRAMWITHBUILTINKERNELS __clewCreateProgramWithBuiltInKernels = NULL;
PFNCLRETAINPROGRAM __clewRetainProgram = NULL;
PFNCLRELEASEPROGRAM __clewReleaseProgram = NULL;
PFNCLBUILDPROGRAM __clewBuildProgram = NULL;
PFNCLGETPROGRAMINFO __clewGetProgramInfo = NULL;
PFNCLGETPROGRAMBUILDINFO __clewGetProgramBuildInfo = NULL;
PFNCLCREATEKERNEL __clewCreateKernel = NULL;
PFNCLCREATEKERNELSINPROGRAM __clewCreateKernelsInProgram = NULL;
PFNCLRETAINKERNEL __clewRetainKernel = NULL;
PFNCLRELEASEKERNEL __clewReleaseKernel = NULL;
PFNCLSETKERNELARG __clewSetKernelArg = NULL;
PFNCLGETKERNELINFO __clewGetKernelInfo = NULL;
PFNCLGETKERNELWORKGROUPINFO __clewGetKernelWorkGroupInfo = NULL;
PFNCLWAITFOREVENTS __clewWaitForEvents = NULL;
PFNCLGETEVENTINFO __clewGetEventInfo = NULL;
PFNCLCREATEUSEREVENT __clewCreateUserEvent = NULL;
PFNCLRETAINEVENT __clewRetainEvent = NULL;
PFNCLRELEASEEVENT __clewReleaseEvent = NULL;
PFNCLSETUSEREVENTSTATUS __clewSetUserEventStatus = NULL;
PFNCLSETEVENTCALLBACK __clewSetEventCallback = NULL;
PFNCLGETEVENTPROFILINGINFO __clewGetEventProfilingInfo = NULL;
PFNCLFLUSH __clewFlush = NULL;
PFNCLFINISH __clewFinish = NULL;
PFNCLENQUEUEREADBUFFER __clewEnqueueReadBuffer = NULL;
PFNCLENQUEUEREADBUFFERRECT __clewEnqueueReadBufferRect = NULL;
PFNCLENQUEUEWRITEBUFFER __clewEnqueueWriteBuffer = NULL;
PFNCLENQUEUEWRITEBUFFERRECT __clewEnqueueWriteBufferRect = NULL;
PFNCLENQUEUECOPYBUFFER __clewEnqueueCopyBuffer = NULL;
PFNCLENQUEUEREADIMAGE __clewEnqueueReadImage = NULL;
PFNCLENQUEUEWRITEIMAGE __clewEnqueueWriteImage = NULL;
PFNCLENQUEUECOPYIMAGE __clewEnqueueCopyImage = NULL;
PFNCLENQUEUECOPYBUFFERRECT __clewEnqueueCopyBufferRect = NULL;
PFNCLENQUEUECOPYIMAGETOBUFFER __clewEnqueueCopyImageToBuffer = NULL;
PFNCLENQUEUECOPYBUFFERTOIMAGE __clewEnqueueCopyBufferToImage = NULL;
PFNCLENQUEUEMAPBUFFER __clewEnqueueMapBuffer = NULL;
PFNCLENQUEUEMAPIMAGE __clewEnqueueMapImage = NULL;
PFNCLENQUEUEUNMAPMEMOBJECT __clewEnqueueUnmapMemObject = NULL;
PFNCLENQUEUENDRANGEKERNEL __clewEnqueueNDRangeKernel = NULL;
PFNCLENQUEUETASK __clewEnqueueTask = NULL;
PFNCLENQUEUENATIVEKERNEL __clewEnqueueNativeKernel = NULL;
PFNCLGETEXTENSIONFUNCTIONADDRESSFORPLATFORM __clewGetExtensionFunctionAddressForPlatform = NULL;
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
PFNCLCREATEIMAGE2D __clewCreateImage2D = NULL;
PFNCLCREATEIMAGE3D __clewCreateImage3D = NULL;
PFNCLENQUEUEMARKER __clewEnqueueMarker = NULL;
PFNCLENQUEUEWAITFOREVENTS __clewEnqueueWaitForEvents = NULL;
PFNCLENQUEUEBARRIER __clewEnqueueBarrier = NULL;
PFNCLUNLOADCOMPILER __clewUnloadCompiler = NULL;
PFNCLGETEXTENSIONFUNCTIONADDRESS __clewGetExtensionFunctionAddress = NULL;
#endif
/* cl_gl */
PFNCLCREATEFROMGLBUFFER __clewCreateFromGLBuffer = NULL;
PFNCLCREATEFROMGLTEXTURE __clewCreateFromGLTexture = NULL;
PFNCLCREATEFROMGLRENDERBUFFER __clewCreateFromGLRenderbuffer = NULL;
PFNCLGETGLOBJECTINFO __clewGetGLObjectInfo = NULL;
PFNCLGETGLTEXTUREINFO __clewGetGLTextureInfo = NULL;
PFNCLENQUEUEACQUIREGLOBJECTS __clewEnqueueAcquireGLObjects = NULL;
PFNCLENQUEUERELEASEGLOBJECTS __clewEnqueueReleaseGLObjects = NULL;
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
PFNCLCREATEFROMGLTEXTURE2D __clewCreateFromGLTexture2D = NULL;
PFNCLCREATEFROMGLTEXTURE3D __clewCreateFromGLTexture3D = NULL;
#endif
PFNCLGETGLCONTEXTINFOKHR __clewGetGLContextInfoKHR = NULL;
static void clewExit(void)
{
if (module != NULL)
{
// Ignore errors
CLEW_DYNLIB_CLOSE(module);
module = NULL;
}
}
int clewInit()
{
#ifdef _WIN32
const char *path = "OpenCL.dll";
#elif defined(__APPLE__)
const char *path = "/Library/Frameworks/OpenCL.framework/OpenCL";
#else
const char *path = "libOpenCL.so";
#endif
int error = 0;
// Check if already initialized
if (module != NULL)
{
return CLEW_SUCCESS;
}
// Load library
module = CLEW_DYNLIB_OPEN(path);
// Check for errors
if (module == NULL)
{
return CLEW_ERROR_OPEN_FAILED;
}
// Set unloading
error = atexit(clewExit);
if (error)
{
// Failure queuing atexit, shutdown with error
CLEW_DYNLIB_CLOSE(module);
module = NULL;
return CLEW_ERROR_ATEXIT_FAILED;
}
// Determine function entry-points
__clewGetPlatformIDs = (PFNCLGETPLATFORMIDS )CLEW_DYNLIB_IMPORT(module, "clGetPlatformIDs");
__clewGetPlatformInfo = (PFNCLGETPLATFORMINFO )CLEW_DYNLIB_IMPORT(module, "clGetPlatformInfo");
__clewGetDeviceIDs = (PFNCLGETDEVICEIDS )CLEW_DYNLIB_IMPORT(module, "clGetDeviceIDs");
__clewGetDeviceInfo = (PFNCLGETDEVICEINFO )CLEW_DYNLIB_IMPORT(module, "clGetDeviceInfo");
__clewCreateSubDevices = (PFNCLCREATESUBDEVICES )CLEW_DYNLIB_IMPORT(module, "clCreateSubDevices");
__clewRetainDevice = (PFNCLRETAINDEVICE )CLEW_DYNLIB_IMPORT(module, "clRetainDevice");
__clewReleaseDevice = (PFNCLRELEASEDEVICE )CLEW_DYNLIB_IMPORT(module, "clReleaseDevice");
__clewCreateContext = (PFNCLCREATECONTEXT )CLEW_DYNLIB_IMPORT(module, "clCreateContext");
__clewCreateContextFromType = (PFNCLCREATECONTEXTFROMTYPE )CLEW_DYNLIB_IMPORT(module, "clCreateContextFromType");
__clewRetainContext = (PFNCLRETAINCONTEXT )CLEW_DYNLIB_IMPORT(module, "clRetainContext");
__clewReleaseContext = (PFNCLRELEASECONTEXT )CLEW_DYNLIB_IMPORT(module, "clReleaseContext");
__clewGetContextInfo = (PFNCLGETCONTEXTINFO )CLEW_DYNLIB_IMPORT(module, "clGetContextInfo");
__clewCreateCommandQueue = (PFNCLCREATECOMMANDQUEUE )CLEW_DYNLIB_IMPORT(module, "clCreateCommandQueue");
__clewRetainCommandQueue = (PFNCLRETAINCOMMANDQUEUE )CLEW_DYNLIB_IMPORT(module, "clRetainCommandQueue");
__clewReleaseCommandQueue = (PFNCLRELEASECOMMANDQUEUE )CLEW_DYNLIB_IMPORT(module, "clReleaseCommandQueue");
__clewGetCommandQueueInfo = (PFNCLGETCOMMANDQUEUEINFO )CLEW_DYNLIB_IMPORT(module, "clGetCommandQueueInfo");
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
__clewSetCommandQueueProperty = (PFNCLSETCOMMANDQUEUEPROPERTY )CLEW_DYNLIB_IMPORT(module, "clSetCommandQueueProperty");
#endif
__clewCreateBuffer = (PFNCLCREATEBUFFER )CLEW_DYNLIB_IMPORT(module, "clCreateBuffer");
__clewCreateSubBuffer = (PFNCLCREATESUBBUFFER )CLEW_DYNLIB_IMPORT(module, "clCreateBuffer");
__clewCreateImage = (PFNCLCREATEIMAGE )CLEW_DYNLIB_IMPORT(module, "clCreateImage");
__clewRetainMemObject = (PFNCLRETAINMEMOBJECT )CLEW_DYNLIB_IMPORT(module, "clRetainMemObject");
__clewReleaseMemObject = (PFNCLRELEASEMEMOBJECT )CLEW_DYNLIB_IMPORT(module, "clReleaseMemObject");
__clewGetSupportedImageFormats = (PFNCLGETSUPPORTEDIMAGEFORMATS )CLEW_DYNLIB_IMPORT(module, "clGetSupportedImageFormats");
__clewGetMemObjectInfo = (PFNCLGETMEMOBJECTINFO )CLEW_DYNLIB_IMPORT(module, "clGetMemObjectInfo");
__clewGetImageInfo = (PFNCLGETIMAGEINFO )CLEW_DYNLIB_IMPORT(module, "clGetImageInfo");
__clewSetMemObjectDestructorCallback = (PFNCLSETMEMOBJECTDESTRUCTORCALLBACK)CLEW_DYNLIB_IMPORT(module, "clSetMemObjectDestructorCallback");
__clewCreateSampler = (PFNCLCREATESAMPLER )CLEW_DYNLIB_IMPORT(module, "clCreateSampler");
__clewRetainSampler = (PFNCLRETAINSAMPLER )CLEW_DYNLIB_IMPORT(module, "clRetainSampler");
__clewReleaseSampler = (PFNCLRELEASESAMPLER )CLEW_DYNLIB_IMPORT(module, "clReleaseSampler");
__clewGetSamplerInfo = (PFNCLGETSAMPLERINFO )CLEW_DYNLIB_IMPORT(module, "clGetSamplerInfo");
__clewCreateProgramWithSource = (PFNCLCREATEPROGRAMWITHSOURCE )CLEW_DYNLIB_IMPORT(module, "clCreateProgramWithSource");
__clewCreateProgramWithBinary = (PFNCLCREATEPROGRAMWITHBINARY )CLEW_DYNLIB_IMPORT(module, "clCreateProgramWithBinary");
__clewCreateProgramWithBuiltInKernels =(PFNCLCREATEPROGRAMWITHBUILTINKERNELS)CLEW_DYNLIB_IMPORT(module, "clCreateProgramWithBuiltInKernels");
__clewRetainProgram = (PFNCLRETAINPROGRAM )CLEW_DYNLIB_IMPORT(module, "clRetainProgram");
__clewReleaseProgram = (PFNCLRELEASEPROGRAM )CLEW_DYNLIB_IMPORT(module, "clReleaseProgram");
__clewBuildProgram = (PFNCLBUILDPROGRAM )CLEW_DYNLIB_IMPORT(module, "clBuildProgram");
__clewGetProgramInfo = (PFNCLGETPROGRAMINFO )CLEW_DYNLIB_IMPORT(module, "clGetProgramInfo");
__clewGetProgramBuildInfo = (PFNCLGETPROGRAMBUILDINFO )CLEW_DYNLIB_IMPORT(module, "clGetProgramBuildInfo");
__clewCreateKernel = (PFNCLCREATEKERNEL )CLEW_DYNLIB_IMPORT(module, "clCreateKernel");
__clewCreateKernelsInProgram = (PFNCLCREATEKERNELSINPROGRAM )CLEW_DYNLIB_IMPORT(module, "clCreateKernelsInProgram");
__clewRetainKernel = (PFNCLRETAINKERNEL )CLEW_DYNLIB_IMPORT(module, "clRetainKernel");
__clewReleaseKernel = (PFNCLRELEASEKERNEL )CLEW_DYNLIB_IMPORT(module, "clReleaseKernel");
__clewSetKernelArg = (PFNCLSETKERNELARG )CLEW_DYNLIB_IMPORT(module, "clSetKernelArg");
__clewGetKernelInfo = (PFNCLGETKERNELINFO )CLEW_DYNLIB_IMPORT(module, "clGetKernelInfo");
__clewGetKernelWorkGroupInfo = (PFNCLGETKERNELWORKGROUPINFO )CLEW_DYNLIB_IMPORT(module, "clGetKernelWorkGroupInfo");
__clewWaitForEvents = (PFNCLWAITFOREVENTS )CLEW_DYNLIB_IMPORT(module, "clWaitForEvents");
__clewGetEventInfo = (PFNCLGETEVENTINFO )CLEW_DYNLIB_IMPORT(module, "clGetEventInfo");
__clewCreateUserEvent = (PFNCLCREATEUSEREVENT )CLEW_DYNLIB_IMPORT(module, "clCreateUserEvent");
__clewRetainEvent = (PFNCLRETAINEVENT )CLEW_DYNLIB_IMPORT(module, "clRetainEvent");
__clewReleaseEvent = (PFNCLRELEASEEVENT )CLEW_DYNLIB_IMPORT(module, "clReleaseEvent");
__clewSetUserEventStatus = (PFNCLSETUSEREVENTSTATUS )CLEW_DYNLIB_IMPORT(module, "clSetUserEventStatus");
__clewSetEventCallback = (PFNCLSETEVENTCALLBACK )CLEW_DYNLIB_IMPORT(module, "clSetEventCallback");
__clewGetEventProfilingInfo = (PFNCLGETEVENTPROFILINGINFO )CLEW_DYNLIB_IMPORT(module, "clGetEventProfilingInfo");
__clewFlush = (PFNCLFLUSH )CLEW_DYNLIB_IMPORT(module, "clFlush");
__clewFinish = (PFNCLFINISH )CLEW_DYNLIB_IMPORT(module, "clFinish");
__clewEnqueueReadBuffer = (PFNCLENQUEUEREADBUFFER )CLEW_DYNLIB_IMPORT(module, "clEnqueueReadBuffer");
__clewEnqueueReadBufferRect = (PFNCLENQUEUEREADBUFFERRECT )CLEW_DYNLIB_IMPORT(module, "clEnqueueReadBufferRect");
__clewEnqueueWriteBuffer = (PFNCLENQUEUEWRITEBUFFER )CLEW_DYNLIB_IMPORT(module, "clEnqueueWriteBuffer");
__clewEnqueueWriteBufferRect = (PFNCLENQUEUEWRITEBUFFERRECT )CLEW_DYNLIB_IMPORT(module, "clEnqueueWriteBufferRect");
__clewEnqueueCopyBuffer = (PFNCLENQUEUECOPYBUFFER )CLEW_DYNLIB_IMPORT(module, "clEnqueueCopyBuffer");
__clewEnqueueCopyBufferRect = (PFNCLENQUEUECOPYBUFFERRECT )CLEW_DYNLIB_IMPORT(module, "clEnqueueCopyBufferRect");
__clewEnqueueReadImage = (PFNCLENQUEUEREADIMAGE )CLEW_DYNLIB_IMPORT(module, "clEnqueueReadImage");
__clewEnqueueWriteImage = (PFNCLENQUEUEWRITEIMAGE )CLEW_DYNLIB_IMPORT(module, "clEnqueueWriteImage");
__clewEnqueueCopyImage = (PFNCLENQUEUECOPYIMAGE )CLEW_DYNLIB_IMPORT(module, "clEnqueueCopyImage");
__clewEnqueueCopyImageToBuffer = (PFNCLENQUEUECOPYIMAGETOBUFFER )CLEW_DYNLIB_IMPORT(module, "clEnqueueCopyImageToBuffer");
__clewEnqueueCopyBufferToImage = (PFNCLENQUEUECOPYBUFFERTOIMAGE )CLEW_DYNLIB_IMPORT(module, "clEnqueueCopyBufferToImage");
__clewEnqueueMapBuffer = (PFNCLENQUEUEMAPBUFFER )CLEW_DYNLIB_IMPORT(module, "clEnqueueMapBuffer");
__clewEnqueueMapImage = (PFNCLENQUEUEMAPIMAGE )CLEW_DYNLIB_IMPORT(module, "clEnqueueMapImage");
__clewEnqueueUnmapMemObject = (PFNCLENQUEUEUNMAPMEMOBJECT )CLEW_DYNLIB_IMPORT(module, "clEnqueueUnmapMemObject");
__clewEnqueueNDRangeKernel = (PFNCLENQUEUENDRANGEKERNEL )CLEW_DYNLIB_IMPORT(module, "clEnqueueNDRangeKernel");
__clewEnqueueTask = (PFNCLENQUEUETASK )CLEW_DYNLIB_IMPORT(module, "clEnqueueTask");
__clewEnqueueNativeKernel = (PFNCLENQUEUENATIVEKERNEL )CLEW_DYNLIB_IMPORT(module, "clEnqueueNativeKernel");
__clewGetExtensionFunctionAddressForPlatform = (PFNCLGETEXTENSIONFUNCTIONADDRESSFORPLATFORM)CLEW_DYNLIB_IMPORT(module, "clGetExtensionFunctionAddressForPlatform");
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
__clewCreateImage2D = (PFNCLCREATEIMAGE2D )CLEW_DYNLIB_IMPORT(module, "clCreateImage2D");
__clewCreateImage3D = (PFNCLCREATEIMAGE3D )CLEW_DYNLIB_IMPORT(module, "clCreateImage3D");
__clewEnqueueMarker = (PFNCLENQUEUEMARKER )CLEW_DYNLIB_IMPORT(module, "clEnqueueMarker");
__clewEnqueueWaitForEvents = (PFNCLENQUEUEWAITFOREVENTS )CLEW_DYNLIB_IMPORT(module, "clEnqueueWaitForEvents");
__clewEnqueueBarrier = (PFNCLENQUEUEBARRIER )CLEW_DYNLIB_IMPORT(module, "clEnqueueBarrier");
__clewUnloadCompiler = (PFNCLUNLOADCOMPILER )CLEW_DYNLIB_IMPORT(module, "clUnloadCompiler");
__clewGetExtensionFunctionAddress = (PFNCLGETEXTENSIONFUNCTIONADDRESS )CLEW_DYNLIB_IMPORT(module, "clGetExtensionFunctionAddress");
#endif
/* cl_gl */
__clewCreateFromGLBuffer = (PFNCLCREATEFROMGLBUFFER )CLEW_DYNLIB_IMPORT(module, "clCreateFromGLBuffer");
__clewCreateFromGLTexture = (PFNCLCREATEFROMGLTEXTURE )CLEW_DYNLIB_IMPORT(module, "clCreateFromGLTexture");
__clewCreateFromGLRenderbuffer = (PFNCLCREATEFROMGLRENDERBUFFER )CLEW_DYNLIB_IMPORT(module, "clCreateFromGLRenderbuffer");
__clewGetGLObjectInfo = (PFNCLGETGLOBJECTINFO )CLEW_DYNLIB_IMPORT(module, "clGetGLObjectInfo");
__clewGetGLTextureInfo = (PFNCLGETGLTEXTUREINFO )CLEW_DYNLIB_IMPORT(module, "clGetGLTextureInfo");
__clewEnqueueAcquireGLObjects = (PFNCLENQUEUEACQUIREGLOBJECTS )CLEW_DYNLIB_IMPORT(module, "clEnqueueAcquireGLObjects");
__clewEnqueueReleaseGLObjects = (PFNCLENQUEUERELEASEGLOBJECTS )CLEW_DYNLIB_IMPORT(module, "clEnqueueReleaseGLObjects");
#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
__clewCreateFromGLTexture2D = (PFNCLCREATEFROMGLTEXTURE2D )CLEW_DYNLIB_IMPORT(module, "clCreateFromGLTexture2D");
__clewCreateFromGLTexture3D = (PFNCLCREATEFROMGLTEXTURE3D )CLEW_DYNLIB_IMPORT(module, "clCreateFromGLTexture3D");
#endif
__clewGetGLContextInfoKHR = (PFNCLGETGLCONTEXTINFOKHR )CLEW_DYNLIB_IMPORT(module, "clGetGLContextInfoKHR");
if(__clewGetPlatformIDs == NULL) return 0;
if(__clewGetPlatformInfo == NULL) return 0;
if(__clewGetDeviceIDs == NULL) return 0;
if(__clewGetDeviceInfo == NULL) return 0;
return CLEW_SUCCESS;
}
const char* clewErrorString(cl_int error)
{
static const char* strings[] =
{
// Error Codes
"CL_SUCCESS" // 0
, "CL_DEVICE_NOT_FOUND" // -1
, "CL_DEVICE_NOT_AVAILABLE" // -2
, "CL_COMPILER_NOT_AVAILABLE" // -3
, "CL_MEM_OBJECT_ALLOCATION_FAILURE" // -4
, "CL_OUT_OF_RESOURCES" // -5
, "CL_OUT_OF_HOST_MEMORY" // -6
, "CL_PROFILING_INFO_NOT_AVAILABLE" // -7
, "CL_MEM_COPY_OVERLAP" // -8
, "CL_IMAGE_FORMAT_MISMATCH" // -9
, "CL_IMAGE_FORMAT_NOT_SUPPORTED" // -10
, "CL_BUILD_PROGRAM_FAILURE" // -11
, "CL_MAP_FAILURE" // -12
, "CL_MISALIGNED_SUB_BUFFER_OFFSET" // -13
, "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"// -14
, "CL_COMPILE_PROGRAM_FAILURE" // -15
, "CL_LINKER_NOT_AVAILABLE" // -16
, "CL_LINK_PROGRAM_FAILURE" // -17
, "CL_DEVICE_PARTITION_FAILED" // -18
, "CL_KERNEL_ARG_INFO_NOT_AVAILABLE" // -19
, "" // -20
, "" // -21
, "" // -22
, "" // -23
, "" // -24
, "" // -25
, "" // -26
, "" // -27
, "" // -28
, "" // -29
, "CL_INVALID_VALUE" // -30
, "CL_INVALID_DEVICE_TYPE" // -31
, "CL_INVALID_PLATFORM" // -32
, "CL_INVALID_DEVICE" // -33
, "CL_INVALID_CONTEXT" // -34
, "CL_INVALID_QUEUE_PROPERTIES" // -35
, "CL_INVALID_COMMAND_QUEUE" // -36
, "CL_INVALID_HOST_PTR" // -37
, "CL_INVALID_MEM_OBJECT" // -38
, "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR" // -39
, "CL_INVALID_IMAGE_SIZE" // -40
, "CL_INVALID_SAMPLER" // -41
, "CL_INVALID_BINARY" // -42
, "CL_INVALID_BUILD_OPTIONS" // -43
, "CL_INVALID_PROGRAM" // -44
, "CL_INVALID_PROGRAM_EXECUTABLE" // -45
, "CL_INVALID_KERNEL_NAME" // -46
, "CL_INVALID_KERNEL_DEFINITION" // -47
, "CL_INVALID_KERNEL" // -48
, "CL_INVALID_ARG_INDEX" // -49
, "CL_INVALID_ARG_VALUE" // -50
, "CL_INVALID_ARG_SIZE" // -51
, "CL_INVALID_KERNEL_ARGS" // -52
, "CL_INVALID_WORK_DIMENSION" // -53
, "CL_INVALID_WORK_GROUP_SIZE" // -54
, "CL_INVALID_WORK_ITEM_SIZE" // -55
, "CL_INVALID_GLOBAL_OFFSET" // -56
, "CL_INVALID_EVENT_WAIT_LIST" // -57
, "CL_INVALID_EVENT" // -58
, "CL_INVALID_OPERATION" // -59
, "CL_INVALID_GL_OBJECT" // -60
, "CL_INVALID_BUFFER_SIZE" // -61
, "CL_INVALID_MIP_LEVEL" // -62
, "CL_INVALID_GLOBAL_WORK_SIZE" // -63
, "CL_INVALID_PROPERTY" // -64
, "CL_INVALID_IMAGE_DESCRIPTOR" // -65
, "CL_INVALID_COMPILER_OPTIONS" // -66
, "CL_INVALID_LINKER_OPTIONS" // -67
, "CL_INVALID_DEVICE_PARTITION_COUNT" // -68
};
return strings[-error];
}

View File

@@ -25,6 +25,7 @@
set(INC
.
include
)
set(INC_SYS
@@ -32,11 +33,8 @@ set(INC_SYS
)
set(SRC
OCL_opencl.h
intern/clew.h
intern/clew.c
intern/OCL_opencl.c
include/cuew.h
src/cuew.c
)
blender_add_lib(bf_intern_opencl "${SRC}" "${INC}" "${INC_SYS}")
blender_add_lib(extern_cuew "${SRC}" "${INC}" "${INC_SYS}")

174
extern/cuew/LICENSE vendored Normal file
View File

@@ -0,0 +1,174 @@
Modified Apache 2.0 License
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor
and its affiliates, except as required to comply with Section 4(c) of
the License and to reproduce the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

12
extern/cuew/README vendored Normal file
View File

@@ -0,0 +1,12 @@
The CUDA Extension Wrangler Library (CUEW) is a cross-platform open-source
C/C++ extension loading library. CUEW provides efficient run-time mechanisms
for determining which CUDA functions and extensions extensions are supported
on the target platform.
CUDA core and extension functionality is exposed in a single header file.
GUEW has been tested on a variety of operating systems, including Windows,
Linux, Mac OS X.
LICENSE
CUEW library is released under the Apache 2.0 license.

View File

@@ -27,8 +27,9 @@
Import ('env')
sources = env.Glob('intern/*.c')
sources = env.Glob('src/cuew.c')
incs = '.'
incs = 'include'
defs = []
env.BlenderLib ( 'bf_intern_opencl', sources, Split(incs), libtype=['core','player'], priority = [192,192] )
env.BlenderLib ('extern_cuew', sources, Split(incs), defines=defs, libtype=['system'], priority = [0])

35
extern/cuew/auto/cuda_errors.py vendored Normal file
View File

@@ -0,0 +1,35 @@
CUDA_ERRORS={
'CUDA_SUCCESS': "No errors",
'CUDA_ERROR_INVALID_VALUE': "Invalid value",
'CUDA_ERROR_OUT_OF_MEMORY': "Out of memory",
'CUDA_ERROR_NOT_INITIALIZED': "Driver not initialized",
'CUDA_ERROR_DEINITIALIZED': "Driver deinitialized",
'CUDA_ERROR_NO_DEVICE': "No CUDA-capable device available",
'CUDA_ERROR_INVALID_DEVICE': "Invalid device",
'CUDA_ERROR_INVALID_IMAGE': "Invalid kernel image",
'CUDA_ERROR_INVALID_CONTEXT': "Invalid context",
'CUDA_ERROR_CONTEXT_ALREADY_CURRENT': "Context already current",
'CUDA_ERROR_MAP_FAILED': "Map failed",
'CUDA_ERROR_UNMAP_FAILED': "Unmap failed",
'CUDA_ERROR_ARRAY_IS_MAPPED': "Array is mapped",
'CUDA_ERROR_ALREADY_MAPPED': "Already mapped",
'CUDA_ERROR_NO_BINARY_FOR_GPU': "No binary for GPU",
'CUDA_ERROR_ALREADY_ACQUIRED': "Already acquired",
'CUDA_ERROR_NOT_MAPPED': "Not mapped",
'CUDA_ERROR_NOT_MAPPED_AS_ARRAY': "Mapped resource not available for access as an array",
'CUDA_ERROR_NOT_MAPPED_AS_POINTER': "Mapped resource not available for access as a pointer",
'CUDA_ERROR_ECC_UNCORRECTABLE': "Uncorrectable ECC error detected",
'CUDA_ERROR_UNSUPPORTED_LIMIT': "CUlimit not supported by device",
'CUDA_ERROR_INVALID_SOURCE': "Invalid source",
'CUDA_ERROR_FILE_NOT_FOUND': "File not found",
'CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND': "Link to a shared object failed to resolve",
'CUDA_ERROR_SHARED_OBJECT_INIT_FAILED': "Shared object initialization failed",
'CUDA_ERROR_INVALID_HANDLE': "Invalid handle",
'CUDA_ERROR_NOT_FOUND': "Not found",
'CUDA_ERROR_NOT_READY': "CUDA not ready",
'CUDA_ERROR_LAUNCH_FAILED': "Launch failed",
'CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES': "Launch exceeded resources",
'CUDA_ERROR_LAUNCH_TIMEOUT': "Launch exceeded timeout",
'CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING': "Launch with incompatible texturing",
'CUDA_ERROR_UNKNOWN': "Unknown error",
}

125
extern/cuew/auto/cuda_extra.py vendored Normal file
View File

@@ -0,0 +1,125 @@
extra_code = """
static void path_join(const char *path1,
const char *path2,
int maxlen,
char *result) {
#if defined(WIN32) || defined(_WIN32)
const char separator = '\\\\';
#else
const char separator = '/';
#endif
int n = snprintf(result, maxlen, "%s%c%s", path1, separator, path2);
if (n != -1 && n < maxlen) {
result[n] = '\\0';
}
else {
result[maxlen - 1] = '\\0';
}
}
static int path_exists(const char *path) {
struct stat st;
if (stat(path, &st)) {
return 0;
}
return 1;
}
const char *cuewCompilerPath(void) {
#ifdef _WIN32
const char *defaultpaths[] = {"C:/CUDA/bin", NULL};
const char *executable = "nvcc.exe";
#else
const char *defaultpaths[] = {
"/Developer/NVIDIA/CUDA-5.0/bin",
"/usr/local/cuda-5.0/bin",
"/usr/local/cuda/bin",
"/Developer/NVIDIA/CUDA-6.0/bin",
"/usr/local/cuda-6.0/bin",
"/Developer/NVIDIA/CUDA-5.5/bin",
"/usr/local/cuda-5.5/bin",
NULL};
const char *executable = "nvcc";
#endif
int i;
const char *binpath = getenv("CUDA_BIN_PATH");
static char nvcc[65536];
if (binpath) {
path_join(binpath, executable, sizeof(nvcc), nvcc);
if (path_exists(nvcc))
return nvcc;
}
for (i = 0; defaultpaths[i]; ++i) {
path_join(defaultpaths[i], executable, sizeof(nvcc), nvcc);
if (path_exists(nvcc))
return nvcc;
}
#ifndef _WIN32
{
FILE *handle = popen("which nvcc", "r");
if (handle) {
char buffer[4096] = {0};
int len = fread(buffer, 1, sizeof(buffer) - 1, handle);
buffer[len] = '\\0';
pclose(handle);
if (buffer[0])
return "nvcc";
}
}
#endif
return NULL;
}
int cuewCompilerVersion(void) {
const char *path = cuewCompilerPath();
const char *marker = "Cuda compilation tools, release ";
FILE *pipe;
int major, minor;
char *versionstr;
char buf[128];
char output[65536] = "\\0";
char command[65536] = "\\0";
if (path == NULL)
return 0;
/* get --version output */
strncpy(command, path, sizeof(command));
strncat(command, " --version", sizeof(command) - strlen(path));
pipe = popen(command, "r");
if (!pipe) {
fprintf(stderr, "CUDA: failed to run compiler to retrieve version");
return 0;
}
while (!feof(pipe)) {
if (fgets(buf, sizeof(buf), pipe) != NULL) {
strncat(output, buf, sizeof(output) - strlen(output));
}
}
pclose(pipe);
/* parse version number */
versionstr = strstr(output, marker);
if (versionstr == NULL) {
fprintf(stderr, "CUDA: failed to find version number in:\\n\\n%s\\n", output);
return 0;
}
versionstr += strlen(marker);
if (sscanf(versionstr, "%d.%d", &major, &minor) < 2) {
fprintf(stderr, "CUDA: failed to parse version number from:\\n\\n%s\\n", output);
return 0;
}
return 10 * major + minor;
}
"""

591
extern/cuew/auto/cuew_gen.py vendored Normal file
View File

@@ -0,0 +1,591 @@
#!/usr/bin/env python3
#
# Copyright 2014 Blender Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
# This script generates either header or implementation file from
# a CUDA header files.
#
# Usage: cuew hdr|impl [/path/to/cuda/includes]
# - hdr means header file will be generated and printed to stdout.
# - impl means implementation file will be generated and printed to stdout.
# - /path/to/cuda/includes is a path to a folder with cuda.h and cudaGL.h
# for which wrangler will be generated.
import os
import sys
from cuda_errors import CUDA_ERRORS
from pycparser import c_parser, c_ast, parse_file
from subprocess import Popen, PIPE
INCLUDE_DIR = "/usr/include"
LIB = "CUEW"
REAL_LIB = "CUDA"
VERSION_MAJOR = "1"
VERSION_MINOR = "2"
COPYRIGHT = """/*
* Copyright 2011-2014 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/"""
FILES = ["cuda.h", "cudaGL.h"]
TYPEDEFS = []
FUNC_TYPEDEFS = []
SYMBOLS = []
DEFINES = []
DEFINES_V2 = []
ERRORS = []
class FuncDefVisitor(c_ast.NodeVisitor):
indent = 0
prev_complex = False
dummy_typedefs = ['size_t', 'CUdeviceptr']
def _get_quals_string(self, node):
if node.quals:
return ' '.join(node.quals) + ' '
return ''
def _get_ident_type(self, node):
if isinstance(node, c_ast.PtrDecl):
return self._get_ident_type(node.type.type) + '*'
if isinstance(node, c_ast.ArrayDecl):
return self._get_ident_type(node.type)
elif isinstance(node, c_ast.Struct):
if node.name:
return 'struct ' + node.name
else:
self.indent += 1
struct = self._stringify_struct(node)
self.indent -= 1
return "struct {\n" + \
struct + (" " * self.indent) + "}"
elif isinstance(node, c_ast.Union):
self.indent += 1
union = self._stringify_struct(node)
self.indent -= 1
return "union {\n" + union + (" " * self.indent) + "}"
elif isinstance(node, c_ast.Enum):
return 'enum ' + node.name
elif isinstance(node, c_ast.TypeDecl):
return self._get_ident_type(node.type)
else:
return node.names[0]
def _stringify_param(self, param):
param_type = param.type
result = self._get_quals_string(param)
result += self._get_ident_type(param_type)
if param.name:
result += ' ' + param.name
if isinstance(param_type, c_ast.ArrayDecl):
# TODO(sergey): Workaround to deal with the
# preprocessed file where array size got
# substituded.
dim = param_type.dim.value
if param.name == "reserved" and dim == "64":
dim = "CU_IPC_HANDLE_SIZE"
result += '[' + dim + ']'
return result
def _stringify_params(self, params):
result = []
for param in params:
result.append(self._stringify_param(param))
return ', '.join(result)
def _stringify_struct(self, node):
result = ""
children = node.children()
for child in children:
member = self._stringify_param(child[1])
result += (" " * self.indent) + member + ";\n"
return result
def _stringify_enum(self, node):
result = ""
children = node.children()
for child in children:
if isinstance(child[1], c_ast.EnumeratorList):
enumerators = child[1].enumerators
for enumerator in enumerators:
result += (" " * self.indent) + enumerator.name
if enumerator.value:
result += " = " + enumerator.value.value
result += ",\n"
if enumerator.name.startswith("CUDA_ERROR_"):
ERRORS.append(enumerator.name)
return result
def visit_Decl(self, node):
if node.type.__class__.__name__ == 'FuncDecl':
if isinstance(node.type, c_ast.FuncDecl):
func_decl = node.type
func_decl_type = func_decl.type
typedef = 'typedef '
symbol_name = None
if isinstance(func_decl_type, c_ast.TypeDecl):
symbol_name = func_decl_type.declname
typedef += self._get_quals_string(func_decl_type)
typedef += self._get_ident_type(func_decl_type.type)
typedef += ' CUDAAPI'
typedef += ' t' + symbol_name
elif isinstance(func_decl_type, c_ast.PtrDecl):
ptr_type = func_decl_type.type
symbol_name = ptr_type.declname
typedef += self._get_quals_string(ptr_type)
typedef += self._get_ident_type(func_decl_type)
typedef += ' CUDAAPI'
typedef += ' t' + symbol_name
typedef += '(' + \
self._stringify_params(func_decl.args.params) + \
');'
SYMBOLS.append(symbol_name)
FUNC_TYPEDEFS.append(typedef)
def visit_Typedef(self, node):
if node.name in self.dummy_typedefs:
return
complex = False
type = self._get_ident_type(node.type)
quals = self._get_quals_string(node)
if isinstance(node.type.type, c_ast.Struct):
self.indent += 1
struct = self._stringify_struct(node.type.type)
self.indent -= 1
typedef = quals + type + " {\n" + struct + "} " + node.name
complex = True
elif isinstance(node.type.type, c_ast.Enum):
self.indent += 1
enum = self._stringify_enum(node.type.type)
self.indent -= 1
typedef = quals + type + " {\n" + enum + "} " + node.name
complex = True
else:
typedef = quals + type + " " + node.name
if complex or self.prev_complex:
typedef = "\ntypedef " + typedef + ";"
else:
typedef = "typedef " + typedef + ";"
TYPEDEFS.append(typedef)
self.prev_complex = complex
def get_latest_cpp():
path_prefix = "/usr/bin"
for cpp_version in ["9", "8", "7", "6", "5", "4"]:
test_cpp = os.path.join(path_prefix, "cpp-4." + cpp_version)
if os.path.exists(test_cpp):
return test_cpp
return None
def preprocess_file(filename, cpp_path):
args = [cpp_path, "-I./"]
if filename.endswith("GL.h"):
args.append("-DCUDAAPI= ")
args.append(filename)
try:
pipe = Popen(args,
stdout=PIPE,
universal_newlines=True)
text = pipe.communicate()[0]
except OSError as e:
raise RuntimeError("Unable to invoke 'cpp'. " +
'Make sure its path was passed correctly\n' +
('Original error: %s' % e))
return text
def parse_files():
parser = c_parser.CParser()
cpp_path = get_latest_cpp()
for filename in FILES:
filepath = os.path.join(INCLUDE_DIR, filename)
dummy_typedefs = {}
text = preprocess_file(filepath, cpp_path)
if filepath.endswith("GL.h"):
dummy_typedefs = {
"CUresult": "int",
"CUgraphicsResource": "void *",
"CUdevice": "void *",
"CUcontext": "void *",
"CUdeviceptr": "void *",
"CUstream": "void *"
}
text = "typedef int GLint;\n" + text
text = "typedef unsigned int GLuint;\n" + text
text = "typedef unsigned int GLenum;\n" + text
text = "typedef long size_t;\n" + text
for typedef in sorted(dummy_typedefs):
text = "typedef " + dummy_typedefs[typedef] + " " + \
typedef + ";\n" + text
ast = parser.parse(text, filepath)
with open(filepath) as f:
lines = f.readlines()
for line in lines:
if line.startswith("#define"):
line = line[8:-1]
token = line.split()
if token[0] not in ("__cuda_cuda_h__",
"CUDA_CB",
"CUDAAPI"):
DEFINES.append(token)
for line in lines:
# TODO(sergey): Use better matching rule for _v2 symbols.
if line[0].isspace() and line.lstrip().startswith("#define"):
line = line[12:-1]
token = line.split()
if len(token) == 2 and token[1].endswith("_v2"):
DEFINES_V2.append(token)
v = FuncDefVisitor()
for typedef in dummy_typedefs:
v.dummy_typedefs.append(typedef)
v.visit(ast)
FUNC_TYPEDEFS.append('')
SYMBOLS.append('')
def print_copyright():
print(COPYRIGHT)
print("")
def open_header_guard():
print("#ifndef __%s_H__" % (LIB))
print("#define __%s_H__" % (LIB))
print("")
print("#ifdef __cplusplus")
print("extern \"C\" {")
print("#endif")
print("")
def close_header_guard():
print("")
print("#ifdef __cplusplus")
print("}")
print("#endif")
print("")
print("#endif /* __%s_H__ */" % (LIB))
def print_header():
print_copyright()
open_header_guard()
# Fot size_t.
print("#include <stdlib.h>")
print("")
print("/* Defines. */")
print("#define %s_VERSION_MAJOR %s" % (LIB, VERSION_MAJOR))
print("#define %s_VERSION_MINOR %s" % (LIB, VERSION_MINOR))
print("")
for define in DEFINES:
print('#define %s' % (' '.join(define)))
print("")
print("""/* Functions which changed 3.1 -> 3.2 for 64 bit stuff,
* the cuda library has both the old ones for compatibility and new
* ones with _v2 postfix,
*/""")
for define in DEFINES_V2:
print('#define %s' % (' '.join(define)))
print("")
print("/* Types. */")
# We handle this specially because of the file is
# getting preprocessed.
print("""#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
typedef unsigned long long CUdeviceptr;
#else
typedef unsigned int CUdeviceptr;
#endif
""")
for typedef in TYPEDEFS:
print('%s' % (typedef))
# TDO(sergey): This is only specific to CUDA wrapper.
print("""
#ifdef _WIN32
# define CUDAAPI __stdcall
# define CUDA_CB __stdcall
#else
# define CUDAAPI
# define CUDA_CB
#endif
""")
print("/* Function types. */")
for func_typedef in FUNC_TYPEDEFS:
print('%s' % (func_typedef))
print("")
print("/* Function declarations. */")
for symbol in SYMBOLS:
if symbol:
print('extern t%s *%s;' % (symbol, symbol))
else:
print("")
print("")
print("enum {")
print(" CUEW_SUCCESS = 0,")
print(" CUEW_ERROR_OPEN_FAILED = -1,")
print(" CUEW_ERROR_ATEXIT_FAILED = -2,")
print("};")
print("")
print("int %sInit(void);" % (LIB.lower()))
# TODO(sergey): Get rid of hardcoded CUresult.
print("const char *%sErrorString(CUresult result);" % (LIB.lower()))
print("const char *cuewCompilerPath(void);")
print("int cuewCompilerVersion(void);")
close_header_guard()
def print_dl_wrapper():
print("""#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
# include <windows.h>
/* Utility macros. */
typedef HMODULE DynamicLibrary;
# define dynamic_library_open(path) LoadLibrary(path)
# define dynamic_library_close(lib) FreeLibrary(lib)
# define dynamic_library_find(lib, symbol) GetProcAddress(lib, symbol)
#else
# include <dlfcn.h>
typedef void* DynamicLibrary;
# define dynamic_library_open(path) dlopen(path, RTLD_NOW)
# define dynamic_library_close(lib) dlclose(lib)
# define dynamic_library_find(lib, symbol) dlsym(lib, symbol)
#endif
""")
def print_dl_helper_macro():
print("""#define %s_LIBRARY_FIND_CHECKED(name) \\
name = (t##name *)dynamic_library_find(lib, #name); \\
assert(name);
#define %s_LIBRARY_FIND(name) \\
name = (t##name *)dynamic_library_find(lib, #name);
static DynamicLibrary lib;""" % (REAL_LIB, REAL_LIB))
print("")
def print_dl_close():
print("""static void %sExit(void) {
if(lib != NULL) {
/* Ignore errors. */
dynamic_library_close(lib);
lib = NULL;
}
}""" % (LIB.lower()))
print("")
def print_lib_path():
# TODO(sergey): get rid of hardcoded libraries.
print("""#ifdef _WIN32
/* Expected in c:/windows/system or similar, no path needed. */
const char *path = "nvcuda.dll";
#elif defined(__APPLE__)
/* Default installation path. */
const char *path = "/usr/local/cuda/lib/libcuda.dylib";
#else
const char *path = "libcuda.so";
#endif""")
def print_init_guard():
print(""" static int initialized = 0;
static int result = 0;
int error, driver_version;
if (initialized) {
return result;
}
initialized = 1;
error = atexit(cuewExit);
if (error) {
result = CUEW_ERROR_ATEXIT_FAILED;
return result;
}
/* Load library. */
lib = dynamic_library_open(path);
if (lib == NULL) {
result = CUEW_ERROR_OPEN_FAILED;
return result;
}""")
print("")
def print_driver_version_guard():
# TODO(sergey): Currently it's hardcoded for CUDA only.
print(""" /* Detect driver version. */
driver_version = 1000;
%s_LIBRARY_FIND_CHECKED(cuDriverGetVersion);
if (cuDriverGetVersion) {
cuDriverGetVersion(&driver_version);
}
/* We require version 4.0. */
if (driver_version < 4000) {
result = CUEW_ERROR_OPEN_FAILED;
return result;
}""" % (REAL_LIB))
def print_dl_init():
print("int %sInit(void) {" % (LIB.lower()))
print(" /* Library paths. */")
print_lib_path()
print_init_guard()
print_driver_version_guard()
print(" /* Fetch all function pointers. */")
for symbol in SYMBOLS:
if symbol:
print(" %s_LIBRARY_FIND(%s);" % (REAL_LIB, symbol))
else:
print("")
print("")
print(" result = CUEW_SUCCESS;")
print(" return result;")
print("}")
def print_implementation():
print_copyright()
# TODO(sergey): Get rid of hardcoded header.
print("""#ifdef _MSC_VER
# define snprintf _snprintf
# define popen _popen
# define pclose _pclose
# define _CRT_SECURE_NO_WARNINGS
#endif
""")
print("#include <cuew.h>")
print("#include <assert.h>")
print("#include <stdio.h>")
print("#include <string.h>")
print("#include <sys/stat.h>")
print("")
print_dl_wrapper()
print_dl_helper_macro()
print("/* Function definitions. */")
for symbol in SYMBOLS:
if symbol:
print('t%s *%s;' % (symbol, symbol))
else:
print("")
print("")
print_dl_close()
print("/* Implementation function. */")
print_dl_init()
print("")
# TODO(sergey): Get rid of hardcoded CUresult.
print("const char *%sErrorString(CUresult result) {" % (LIB.lower()))
print(" switch(result) {")
print(" case CUDA_SUCCESS: return \"No errors\";")
for error in ERRORS:
if error in CUDA_ERRORS:
str = CUDA_ERRORS[error]
else:
str = error[11:]
print(" case %s: return \"%s\";" % (error, str))
print(" default: return \"Unknown CUDA error value\";")
print(" }")
print("}")
from cuda_extra import extra_code
print(extra_code)
if __name__ == "__main__":
if len(sys.argv) != 2 and len(sys.argv) != 3:
print("Usage: %s hdr|impl [/path/to/cuda/toolkit/include]" %
(sys.argv[0]))
exit(1)
if len(sys.argv) == 3:
INCLUDE_DIR = sys.argv[2]
parse_files()
if sys.argv[1] == "hdr":
print_header()
elif sys.argv[1] == "impl":
print_implementation()
else:
print("Unknown command %s" % (sys.argv[1]))
exit(1)

10
extern/cuew/auto/cuew_gen.sh vendored Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
# This script invokes cuew_gen.py and updates the
# header and source files in the repository.
SCRIPT=`realpath -s $0`
DIR=`dirname $SCRIPT`
python ${DIR}/cuew_gen.py hdr $@ > $DIR/../include/cuew.h
python ${DIR}/cuew_gen.py impl $@ > $DIR/../src/cuew.c

3
extern/cuew/auto/stdlib.h vendored Normal file
View File

@@ -0,0 +1,3 @@
/* This file is needed to workaround issue with parsing system headers. */
typedef long size_t;

1138
extern/cuew/include/cuew.h vendored Normal file

File diff suppressed because it is too large Load Diff

710
extern/cuew/src/cuew.c vendored Normal file
View File

@@ -0,0 +1,710 @@
/*
* Copyright 2011-2014 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
#ifdef _MSC_VER
# define snprintf _snprintf
# define popen _popen
# define pclose _pclose
# define _CRT_SECURE_NO_WARNINGS
#endif
#include <cuew.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
# include <windows.h>
/* Utility macros. */
typedef HMODULE DynamicLibrary;
# define dynamic_library_open(path) LoadLibrary(path)
# define dynamic_library_close(lib) FreeLibrary(lib)
# define dynamic_library_find(lib, symbol) GetProcAddress(lib, symbol)
#else
# include <dlfcn.h>
typedef void* DynamicLibrary;
# define dynamic_library_open(path) dlopen(path, RTLD_NOW)
# define dynamic_library_close(lib) dlclose(lib)
# define dynamic_library_find(lib, symbol) dlsym(lib, symbol)
#endif
#define CUDA_LIBRARY_FIND_CHECKED(name) \
name = (t##name *)dynamic_library_find(lib, #name); \
assert(name);
#define CUDA_LIBRARY_FIND(name) \
name = (t##name *)dynamic_library_find(lib, #name);
static DynamicLibrary lib;
/* Function definitions. */
tcuGetErrorString *cuGetErrorString;
tcuGetErrorName *cuGetErrorName;
tcuInit *cuInit;
tcuDriverGetVersion *cuDriverGetVersion;
tcuDeviceGet *cuDeviceGet;
tcuDeviceGetCount *cuDeviceGetCount;
tcuDeviceGetName *cuDeviceGetName;
tcuDeviceTotalMem_v2 *cuDeviceTotalMem_v2;
tcuDeviceGetAttribute *cuDeviceGetAttribute;
tcuDeviceGetProperties *cuDeviceGetProperties;
tcuDeviceComputeCapability *cuDeviceComputeCapability;
tcuCtxCreate_v2 *cuCtxCreate_v2;
tcuCtxDestroy_v2 *cuCtxDestroy_v2;
tcuCtxPushCurrent_v2 *cuCtxPushCurrent_v2;
tcuCtxPopCurrent_v2 *cuCtxPopCurrent_v2;
tcuCtxSetCurrent *cuCtxSetCurrent;
tcuCtxGetCurrent *cuCtxGetCurrent;
tcuCtxGetDevice *cuCtxGetDevice;
tcuCtxSynchronize *cuCtxSynchronize;
tcuCtxSetLimit *cuCtxSetLimit;
tcuCtxGetLimit *cuCtxGetLimit;
tcuCtxGetCacheConfig *cuCtxGetCacheConfig;
tcuCtxSetCacheConfig *cuCtxSetCacheConfig;
tcuCtxGetSharedMemConfig *cuCtxGetSharedMemConfig;
tcuCtxSetSharedMemConfig *cuCtxSetSharedMemConfig;
tcuCtxGetApiVersion *cuCtxGetApiVersion;
tcuCtxGetStreamPriorityRange *cuCtxGetStreamPriorityRange;
tcuCtxAttach *cuCtxAttach;
tcuCtxDetach *cuCtxDetach;
tcuModuleLoad *cuModuleLoad;
tcuModuleLoadData *cuModuleLoadData;
tcuModuleLoadDataEx *cuModuleLoadDataEx;
tcuModuleLoadFatBinary *cuModuleLoadFatBinary;
tcuModuleUnload *cuModuleUnload;
tcuModuleGetFunction *cuModuleGetFunction;
tcuModuleGetGlobal_v2 *cuModuleGetGlobal_v2;
tcuModuleGetTexRef *cuModuleGetTexRef;
tcuModuleGetSurfRef *cuModuleGetSurfRef;
tcuLinkCreate *cuLinkCreate;
tcuLinkAddData *cuLinkAddData;
tcuLinkAddFile *cuLinkAddFile;
tcuLinkComplete *cuLinkComplete;
tcuLinkDestroy *cuLinkDestroy;
tcuMemGetInfo_v2 *cuMemGetInfo_v2;
tcuMemAlloc_v2 *cuMemAlloc_v2;
tcuMemAllocPitch_v2 *cuMemAllocPitch_v2;
tcuMemFree_v2 *cuMemFree_v2;
tcuMemGetAddressRange_v2 *cuMemGetAddressRange_v2;
tcuMemAllocHost_v2 *cuMemAllocHost_v2;
tcuMemFreeHost *cuMemFreeHost;
tcuMemHostAlloc *cuMemHostAlloc;
tcuMemHostGetDevicePointer_v2 *cuMemHostGetDevicePointer_v2;
tcuMemHostGetFlags *cuMemHostGetFlags;
tcuMemAllocManaged *cuMemAllocManaged;
tcuDeviceGetByPCIBusId *cuDeviceGetByPCIBusId;
tcuDeviceGetPCIBusId *cuDeviceGetPCIBusId;
tcuIpcGetEventHandle *cuIpcGetEventHandle;
tcuIpcOpenEventHandle *cuIpcOpenEventHandle;
tcuIpcGetMemHandle *cuIpcGetMemHandle;
tcuIpcOpenMemHandle *cuIpcOpenMemHandle;
tcuIpcCloseMemHandle *cuIpcCloseMemHandle;
tcuMemHostRegister *cuMemHostRegister;
tcuMemHostUnregister *cuMemHostUnregister;
tcuMemcpy *cuMemcpy;
tcuMemcpyPeer *cuMemcpyPeer;
tcuMemcpyHtoD_v2 *cuMemcpyHtoD_v2;
tcuMemcpyDtoH_v2 *cuMemcpyDtoH_v2;
tcuMemcpyDtoD_v2 *cuMemcpyDtoD_v2;
tcuMemcpyDtoA_v2 *cuMemcpyDtoA_v2;
tcuMemcpyAtoD_v2 *cuMemcpyAtoD_v2;
tcuMemcpyHtoA_v2 *cuMemcpyHtoA_v2;
tcuMemcpyAtoH_v2 *cuMemcpyAtoH_v2;
tcuMemcpyAtoA_v2 *cuMemcpyAtoA_v2;
tcuMemcpy2D_v2 *cuMemcpy2D_v2;
tcuMemcpy2DUnaligned_v2 *cuMemcpy2DUnaligned_v2;
tcuMemcpy3D_v2 *cuMemcpy3D_v2;
tcuMemcpy3DPeer *cuMemcpy3DPeer;
tcuMemcpyAsync *cuMemcpyAsync;
tcuMemcpyPeerAsync *cuMemcpyPeerAsync;
tcuMemcpyHtoDAsync_v2 *cuMemcpyHtoDAsync_v2;
tcuMemcpyDtoHAsync_v2 *cuMemcpyDtoHAsync_v2;
tcuMemcpyDtoDAsync_v2 *cuMemcpyDtoDAsync_v2;
tcuMemcpyHtoAAsync_v2 *cuMemcpyHtoAAsync_v2;
tcuMemcpyAtoHAsync_v2 *cuMemcpyAtoHAsync_v2;
tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync_v2;
tcuMemcpy3DAsync_v2 *cuMemcpy3DAsync_v2;
tcuMemcpy3DPeerAsync *cuMemcpy3DPeerAsync;
tcuMemsetD8_v2 *cuMemsetD8_v2;
tcuMemsetD16_v2 *cuMemsetD16_v2;
tcuMemsetD32_v2 *cuMemsetD32_v2;
tcuMemsetD2D8_v2 *cuMemsetD2D8_v2;
tcuMemsetD2D16_v2 *cuMemsetD2D16_v2;
tcuMemsetD2D32_v2 *cuMemsetD2D32_v2;
tcuMemsetD8Async *cuMemsetD8Async;
tcuMemsetD16Async *cuMemsetD16Async;
tcuMemsetD32Async *cuMemsetD32Async;
tcuMemsetD2D8Async *cuMemsetD2D8Async;
tcuMemsetD2D16Async *cuMemsetD2D16Async;
tcuMemsetD2D32Async *cuMemsetD2D32Async;
tcuArrayCreate_v2 *cuArrayCreate_v2;
tcuArrayGetDescriptor_v2 *cuArrayGetDescriptor_v2;
tcuArrayDestroy *cuArrayDestroy;
tcuArray3DCreate_v2 *cuArray3DCreate_v2;
tcuArray3DGetDescriptor_v2 *cuArray3DGetDescriptor_v2;
tcuMipmappedArrayCreate *cuMipmappedArrayCreate;
tcuMipmappedArrayGetLevel *cuMipmappedArrayGetLevel;
tcuMipmappedArrayDestroy *cuMipmappedArrayDestroy;
tcuPointerGetAttribute *cuPointerGetAttribute;
tcuPointerSetAttribute *cuPointerSetAttribute;
tcuStreamCreate *cuStreamCreate;
tcuStreamCreateWithPriority *cuStreamCreateWithPriority;
tcuStreamGetPriority *cuStreamGetPriority;
tcuStreamGetFlags *cuStreamGetFlags;
tcuStreamWaitEvent *cuStreamWaitEvent;
tcuStreamAddCallback *cuStreamAddCallback;
tcuStreamAttachMemAsync *cuStreamAttachMemAsync;
tcuStreamQuery *cuStreamQuery;
tcuStreamSynchronize *cuStreamSynchronize;
tcuStreamDestroy_v2 *cuStreamDestroy_v2;
tcuEventCreate *cuEventCreate;
tcuEventRecord *cuEventRecord;
tcuEventQuery *cuEventQuery;
tcuEventSynchronize *cuEventSynchronize;
tcuEventDestroy_v2 *cuEventDestroy_v2;
tcuEventElapsedTime *cuEventElapsedTime;
tcuFuncGetAttribute *cuFuncGetAttribute;
tcuFuncSetCacheConfig *cuFuncSetCacheConfig;
tcuFuncSetSharedMemConfig *cuFuncSetSharedMemConfig;
tcuLaunchKernel *cuLaunchKernel;
tcuFuncSetBlockShape *cuFuncSetBlockShape;
tcuFuncSetSharedSize *cuFuncSetSharedSize;
tcuParamSetSize *cuParamSetSize;
tcuParamSeti *cuParamSeti;
tcuParamSetf *cuParamSetf;
tcuParamSetv *cuParamSetv;
tcuLaunch *cuLaunch;
tcuLaunchGrid *cuLaunchGrid;
tcuLaunchGridAsync *cuLaunchGridAsync;
tcuParamSetTexRef *cuParamSetTexRef;
tcuTexRefSetArray *cuTexRefSetArray;
tcuTexRefSetMipmappedArray *cuTexRefSetMipmappedArray;
tcuTexRefSetAddress_v2 *cuTexRefSetAddress_v2;
tcuTexRefSetAddress2D_v3 *cuTexRefSetAddress2D_v3;
tcuTexRefSetFormat *cuTexRefSetFormat;
tcuTexRefSetAddressMode *cuTexRefSetAddressMode;
tcuTexRefSetFilterMode *cuTexRefSetFilterMode;
tcuTexRefSetMipmapFilterMode *cuTexRefSetMipmapFilterMode;
tcuTexRefSetMipmapLevelBias *cuTexRefSetMipmapLevelBias;
tcuTexRefSetMipmapLevelClamp *cuTexRefSetMipmapLevelClamp;
tcuTexRefSetMaxAnisotropy *cuTexRefSetMaxAnisotropy;
tcuTexRefSetFlags *cuTexRefSetFlags;
tcuTexRefGetAddress_v2 *cuTexRefGetAddress_v2;
tcuTexRefGetArray *cuTexRefGetArray;
tcuTexRefGetMipmappedArray *cuTexRefGetMipmappedArray;
tcuTexRefGetAddressMode *cuTexRefGetAddressMode;
tcuTexRefGetFilterMode *cuTexRefGetFilterMode;
tcuTexRefGetFormat *cuTexRefGetFormat;
tcuTexRefGetMipmapFilterMode *cuTexRefGetMipmapFilterMode;
tcuTexRefGetMipmapLevelBias *cuTexRefGetMipmapLevelBias;
tcuTexRefGetMipmapLevelClamp *cuTexRefGetMipmapLevelClamp;
tcuTexRefGetMaxAnisotropy *cuTexRefGetMaxAnisotropy;
tcuTexRefGetFlags *cuTexRefGetFlags;
tcuTexRefCreate *cuTexRefCreate;
tcuTexRefDestroy *cuTexRefDestroy;
tcuSurfRefSetArray *cuSurfRefSetArray;
tcuSurfRefGetArray *cuSurfRefGetArray;
tcuTexObjectCreate *cuTexObjectCreate;
tcuTexObjectDestroy *cuTexObjectDestroy;
tcuTexObjectGetResourceDesc *cuTexObjectGetResourceDesc;
tcuTexObjectGetTextureDesc *cuTexObjectGetTextureDesc;
tcuTexObjectGetResourceViewDesc *cuTexObjectGetResourceViewDesc;
tcuSurfObjectCreate *cuSurfObjectCreate;
tcuSurfObjectDestroy *cuSurfObjectDestroy;
tcuSurfObjectGetResourceDesc *cuSurfObjectGetResourceDesc;
tcuDeviceCanAccessPeer *cuDeviceCanAccessPeer;
tcuCtxEnablePeerAccess *cuCtxEnablePeerAccess;
tcuCtxDisablePeerAccess *cuCtxDisablePeerAccess;
tcuGraphicsUnregisterResource *cuGraphicsUnregisterResource;
tcuGraphicsSubResourceGetMappedArray *cuGraphicsSubResourceGetMappedArray;
tcuGraphicsResourceGetMappedMipmappedArray *cuGraphicsResourceGetMappedMipmappedArray;
tcuGraphicsResourceGetMappedPointer_v2 *cuGraphicsResourceGetMappedPointer_v2;
tcuGraphicsResourceSetMapFlags *cuGraphicsResourceSetMapFlags;
tcuGraphicsMapResources *cuGraphicsMapResources;
tcuGraphicsUnmapResources *cuGraphicsUnmapResources;
tcuGetExportTable *cuGetExportTable;
tcuGraphicsGLRegisterBuffer *cuGraphicsGLRegisterBuffer;
tcuGraphicsGLRegisterImage *cuGraphicsGLRegisterImage;
tcuGLGetDevices *cuGLGetDevices;
tcuGLCtxCreate_v2 *cuGLCtxCreate_v2;
tcuGLInit *cuGLInit;
tcuGLRegisterBufferObject *cuGLRegisterBufferObject;
tcuGLMapBufferObject_v2 *cuGLMapBufferObject_v2;
tcuGLUnmapBufferObject *cuGLUnmapBufferObject;
tcuGLUnregisterBufferObject *cuGLUnregisterBufferObject;
tcuGLSetBufferObjectMapFlags *cuGLSetBufferObjectMapFlags;
tcuGLMapBufferObjectAsync_v2 *cuGLMapBufferObjectAsync_v2;
tcuGLUnmapBufferObjectAsync *cuGLUnmapBufferObjectAsync;
static void cuewExit(void) {
if(lib != NULL) {
/* Ignore errors. */
dynamic_library_close(lib);
lib = NULL;
}
}
/* Implementation function. */
int cuewInit(void) {
/* Library paths. */
#ifdef _WIN32
/* Expected in c:/windows/system or similar, no path needed. */
const char *path = "nvcuda.dll";
#elif defined(__APPLE__)
/* Default installation path. */
const char *path = "/usr/local/cuda/lib/libcuda.dylib";
#else
const char *path = "libcuda.so";
#endif
static int initialized = 0;
static int result = 0;
int error, driver_version;
if (initialized) {
return result;
}
initialized = 1;
error = atexit(cuewExit);
if (error) {
result = CUEW_ERROR_ATEXIT_FAILED;
return result;
}
/* Load library. */
lib = dynamic_library_open(path);
if (lib == NULL) {
result = CUEW_ERROR_OPEN_FAILED;
return result;
}
/* Detect driver version. */
driver_version = 1000;
CUDA_LIBRARY_FIND_CHECKED(cuDriverGetVersion);
if (cuDriverGetVersion) {
cuDriverGetVersion(&driver_version);
}
/* We require version 4.0. */
if (driver_version < 4000) {
result = CUEW_ERROR_OPEN_FAILED;
return result;
}
/* Fetch all function pointers. */
CUDA_LIBRARY_FIND(cuGetErrorString);
CUDA_LIBRARY_FIND(cuGetErrorName);
CUDA_LIBRARY_FIND(cuInit);
CUDA_LIBRARY_FIND(cuDriverGetVersion);
CUDA_LIBRARY_FIND(cuDeviceGet);
CUDA_LIBRARY_FIND(cuDeviceGetCount);
CUDA_LIBRARY_FIND(cuDeviceGetName);
CUDA_LIBRARY_FIND(cuDeviceTotalMem_v2);
CUDA_LIBRARY_FIND(cuDeviceGetAttribute);
CUDA_LIBRARY_FIND(cuDeviceGetProperties);
CUDA_LIBRARY_FIND(cuDeviceComputeCapability);
CUDA_LIBRARY_FIND(cuCtxCreate_v2);
CUDA_LIBRARY_FIND(cuCtxDestroy_v2);
CUDA_LIBRARY_FIND(cuCtxPushCurrent_v2);
CUDA_LIBRARY_FIND(cuCtxPopCurrent_v2);
CUDA_LIBRARY_FIND(cuCtxSetCurrent);
CUDA_LIBRARY_FIND(cuCtxGetCurrent);
CUDA_LIBRARY_FIND(cuCtxGetDevice);
CUDA_LIBRARY_FIND(cuCtxSynchronize);
CUDA_LIBRARY_FIND(cuCtxSetLimit);
CUDA_LIBRARY_FIND(cuCtxGetLimit);
CUDA_LIBRARY_FIND(cuCtxGetCacheConfig);
CUDA_LIBRARY_FIND(cuCtxSetCacheConfig);
CUDA_LIBRARY_FIND(cuCtxGetSharedMemConfig);
CUDA_LIBRARY_FIND(cuCtxSetSharedMemConfig);
CUDA_LIBRARY_FIND(cuCtxGetApiVersion);
CUDA_LIBRARY_FIND(cuCtxGetStreamPriorityRange);
CUDA_LIBRARY_FIND(cuCtxAttach);
CUDA_LIBRARY_FIND(cuCtxDetach);
CUDA_LIBRARY_FIND(cuModuleLoad);
CUDA_LIBRARY_FIND(cuModuleLoadData);
CUDA_LIBRARY_FIND(cuModuleLoadDataEx);
CUDA_LIBRARY_FIND(cuModuleLoadFatBinary);
CUDA_LIBRARY_FIND(cuModuleUnload);
CUDA_LIBRARY_FIND(cuModuleGetFunction);
CUDA_LIBRARY_FIND(cuModuleGetGlobal_v2);
CUDA_LIBRARY_FIND(cuModuleGetTexRef);
CUDA_LIBRARY_FIND(cuModuleGetSurfRef);
CUDA_LIBRARY_FIND(cuLinkCreate);
CUDA_LIBRARY_FIND(cuLinkAddData);
CUDA_LIBRARY_FIND(cuLinkAddFile);
CUDA_LIBRARY_FIND(cuLinkComplete);
CUDA_LIBRARY_FIND(cuLinkDestroy);
CUDA_LIBRARY_FIND(cuMemGetInfo_v2);
CUDA_LIBRARY_FIND(cuMemAlloc_v2);
CUDA_LIBRARY_FIND(cuMemAllocPitch_v2);
CUDA_LIBRARY_FIND(cuMemFree_v2);
CUDA_LIBRARY_FIND(cuMemGetAddressRange_v2);
CUDA_LIBRARY_FIND(cuMemAllocHost_v2);
CUDA_LIBRARY_FIND(cuMemFreeHost);
CUDA_LIBRARY_FIND(cuMemHostAlloc);
CUDA_LIBRARY_FIND(cuMemHostGetDevicePointer_v2);
CUDA_LIBRARY_FIND(cuMemHostGetFlags);
CUDA_LIBRARY_FIND(cuMemAllocManaged);
CUDA_LIBRARY_FIND(cuDeviceGetByPCIBusId);
CUDA_LIBRARY_FIND(cuDeviceGetPCIBusId);
CUDA_LIBRARY_FIND(cuIpcGetEventHandle);
CUDA_LIBRARY_FIND(cuIpcOpenEventHandle);
CUDA_LIBRARY_FIND(cuIpcGetMemHandle);
CUDA_LIBRARY_FIND(cuIpcOpenMemHandle);
CUDA_LIBRARY_FIND(cuIpcCloseMemHandle);
CUDA_LIBRARY_FIND(cuMemHostRegister);
CUDA_LIBRARY_FIND(cuMemHostUnregister);
CUDA_LIBRARY_FIND(cuMemcpy);
CUDA_LIBRARY_FIND(cuMemcpyPeer);
CUDA_LIBRARY_FIND(cuMemcpyHtoD_v2);
CUDA_LIBRARY_FIND(cuMemcpyDtoH_v2);
CUDA_LIBRARY_FIND(cuMemcpyDtoD_v2);
CUDA_LIBRARY_FIND(cuMemcpyDtoA_v2);
CUDA_LIBRARY_FIND(cuMemcpyAtoD_v2);
CUDA_LIBRARY_FIND(cuMemcpyHtoA_v2);
CUDA_LIBRARY_FIND(cuMemcpyAtoH_v2);
CUDA_LIBRARY_FIND(cuMemcpyAtoA_v2);
CUDA_LIBRARY_FIND(cuMemcpy2D_v2);
CUDA_LIBRARY_FIND(cuMemcpy2DUnaligned_v2);
CUDA_LIBRARY_FIND(cuMemcpy3D_v2);
CUDA_LIBRARY_FIND(cuMemcpy3DPeer);
CUDA_LIBRARY_FIND(cuMemcpyAsync);
CUDA_LIBRARY_FIND(cuMemcpyPeerAsync);
CUDA_LIBRARY_FIND(cuMemcpyHtoDAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpyDtoHAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpyDtoDAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpyHtoAAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpyAtoHAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpy2DAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpy3DAsync_v2);
CUDA_LIBRARY_FIND(cuMemcpy3DPeerAsync);
CUDA_LIBRARY_FIND(cuMemsetD8_v2);
CUDA_LIBRARY_FIND(cuMemsetD16_v2);
CUDA_LIBRARY_FIND(cuMemsetD32_v2);
CUDA_LIBRARY_FIND(cuMemsetD2D8_v2);
CUDA_LIBRARY_FIND(cuMemsetD2D16_v2);
CUDA_LIBRARY_FIND(cuMemsetD2D32_v2);
CUDA_LIBRARY_FIND(cuMemsetD8Async);
CUDA_LIBRARY_FIND(cuMemsetD16Async);
CUDA_LIBRARY_FIND(cuMemsetD32Async);
CUDA_LIBRARY_FIND(cuMemsetD2D8Async);
CUDA_LIBRARY_FIND(cuMemsetD2D16Async);
CUDA_LIBRARY_FIND(cuMemsetD2D32Async);
CUDA_LIBRARY_FIND(cuArrayCreate_v2);
CUDA_LIBRARY_FIND(cuArrayGetDescriptor_v2);
CUDA_LIBRARY_FIND(cuArrayDestroy);
CUDA_LIBRARY_FIND(cuArray3DCreate_v2);
CUDA_LIBRARY_FIND(cuArray3DGetDescriptor_v2);
CUDA_LIBRARY_FIND(cuMipmappedArrayCreate);
CUDA_LIBRARY_FIND(cuMipmappedArrayGetLevel);
CUDA_LIBRARY_FIND(cuMipmappedArrayDestroy);
CUDA_LIBRARY_FIND(cuPointerGetAttribute);
CUDA_LIBRARY_FIND(cuPointerSetAttribute);
CUDA_LIBRARY_FIND(cuStreamCreate);
CUDA_LIBRARY_FIND(cuStreamCreateWithPriority);
CUDA_LIBRARY_FIND(cuStreamGetPriority);
CUDA_LIBRARY_FIND(cuStreamGetFlags);
CUDA_LIBRARY_FIND(cuStreamWaitEvent);
CUDA_LIBRARY_FIND(cuStreamAddCallback);
CUDA_LIBRARY_FIND(cuStreamAttachMemAsync);
CUDA_LIBRARY_FIND(cuStreamQuery);
CUDA_LIBRARY_FIND(cuStreamSynchronize);
CUDA_LIBRARY_FIND(cuStreamDestroy_v2);
CUDA_LIBRARY_FIND(cuEventCreate);
CUDA_LIBRARY_FIND(cuEventRecord);
CUDA_LIBRARY_FIND(cuEventQuery);
CUDA_LIBRARY_FIND(cuEventSynchronize);
CUDA_LIBRARY_FIND(cuEventDestroy_v2);
CUDA_LIBRARY_FIND(cuEventElapsedTime);
CUDA_LIBRARY_FIND(cuFuncGetAttribute);
CUDA_LIBRARY_FIND(cuFuncSetCacheConfig);
CUDA_LIBRARY_FIND(cuFuncSetSharedMemConfig);
CUDA_LIBRARY_FIND(cuLaunchKernel);
CUDA_LIBRARY_FIND(cuFuncSetBlockShape);
CUDA_LIBRARY_FIND(cuFuncSetSharedSize);
CUDA_LIBRARY_FIND(cuParamSetSize);
CUDA_LIBRARY_FIND(cuParamSeti);
CUDA_LIBRARY_FIND(cuParamSetf);
CUDA_LIBRARY_FIND(cuParamSetv);
CUDA_LIBRARY_FIND(cuLaunch);
CUDA_LIBRARY_FIND(cuLaunchGrid);
CUDA_LIBRARY_FIND(cuLaunchGridAsync);
CUDA_LIBRARY_FIND(cuParamSetTexRef);
CUDA_LIBRARY_FIND(cuTexRefSetArray);
CUDA_LIBRARY_FIND(cuTexRefSetMipmappedArray);
CUDA_LIBRARY_FIND(cuTexRefSetAddress_v2);
CUDA_LIBRARY_FIND(cuTexRefSetAddress2D_v3);
CUDA_LIBRARY_FIND(cuTexRefSetFormat);
CUDA_LIBRARY_FIND(cuTexRefSetAddressMode);
CUDA_LIBRARY_FIND(cuTexRefSetFilterMode);
CUDA_LIBRARY_FIND(cuTexRefSetMipmapFilterMode);
CUDA_LIBRARY_FIND(cuTexRefSetMipmapLevelBias);
CUDA_LIBRARY_FIND(cuTexRefSetMipmapLevelClamp);
CUDA_LIBRARY_FIND(cuTexRefSetMaxAnisotropy);
CUDA_LIBRARY_FIND(cuTexRefSetFlags);
CUDA_LIBRARY_FIND(cuTexRefGetAddress_v2);
CUDA_LIBRARY_FIND(cuTexRefGetArray);
CUDA_LIBRARY_FIND(cuTexRefGetMipmappedArray);
CUDA_LIBRARY_FIND(cuTexRefGetAddressMode);
CUDA_LIBRARY_FIND(cuTexRefGetFilterMode);
CUDA_LIBRARY_FIND(cuTexRefGetFormat);
CUDA_LIBRARY_FIND(cuTexRefGetMipmapFilterMode);
CUDA_LIBRARY_FIND(cuTexRefGetMipmapLevelBias);
CUDA_LIBRARY_FIND(cuTexRefGetMipmapLevelClamp);
CUDA_LIBRARY_FIND(cuTexRefGetMaxAnisotropy);
CUDA_LIBRARY_FIND(cuTexRefGetFlags);
CUDA_LIBRARY_FIND(cuTexRefCreate);
CUDA_LIBRARY_FIND(cuTexRefDestroy);
CUDA_LIBRARY_FIND(cuSurfRefSetArray);
CUDA_LIBRARY_FIND(cuSurfRefGetArray);
CUDA_LIBRARY_FIND(cuTexObjectCreate);
CUDA_LIBRARY_FIND(cuTexObjectDestroy);
CUDA_LIBRARY_FIND(cuTexObjectGetResourceDesc);
CUDA_LIBRARY_FIND(cuTexObjectGetTextureDesc);
CUDA_LIBRARY_FIND(cuTexObjectGetResourceViewDesc);
CUDA_LIBRARY_FIND(cuSurfObjectCreate);
CUDA_LIBRARY_FIND(cuSurfObjectDestroy);
CUDA_LIBRARY_FIND(cuSurfObjectGetResourceDesc);
CUDA_LIBRARY_FIND(cuDeviceCanAccessPeer);
CUDA_LIBRARY_FIND(cuCtxEnablePeerAccess);
CUDA_LIBRARY_FIND(cuCtxDisablePeerAccess);
CUDA_LIBRARY_FIND(cuGraphicsUnregisterResource);
CUDA_LIBRARY_FIND(cuGraphicsSubResourceGetMappedArray);
CUDA_LIBRARY_FIND(cuGraphicsResourceGetMappedMipmappedArray);
CUDA_LIBRARY_FIND(cuGraphicsResourceGetMappedPointer_v2);
CUDA_LIBRARY_FIND(cuGraphicsResourceSetMapFlags);
CUDA_LIBRARY_FIND(cuGraphicsMapResources);
CUDA_LIBRARY_FIND(cuGraphicsUnmapResources);
CUDA_LIBRARY_FIND(cuGetExportTable);
CUDA_LIBRARY_FIND(cuGraphicsGLRegisterBuffer);
CUDA_LIBRARY_FIND(cuGraphicsGLRegisterImage);
CUDA_LIBRARY_FIND(cuGLGetDevices);
CUDA_LIBRARY_FIND(cuGLCtxCreate_v2);
CUDA_LIBRARY_FIND(cuGLInit);
CUDA_LIBRARY_FIND(cuGLRegisterBufferObject);
CUDA_LIBRARY_FIND(cuGLMapBufferObject_v2);
CUDA_LIBRARY_FIND(cuGLUnmapBufferObject);
CUDA_LIBRARY_FIND(cuGLUnregisterBufferObject);
CUDA_LIBRARY_FIND(cuGLSetBufferObjectMapFlags);
CUDA_LIBRARY_FIND(cuGLMapBufferObjectAsync_v2);
CUDA_LIBRARY_FIND(cuGLUnmapBufferObjectAsync);
result = CUEW_SUCCESS;
return result;
}
const char *cuewErrorString(CUresult result) {
switch(result) {
case CUDA_SUCCESS: return "No errors";
case CUDA_ERROR_INVALID_VALUE: return "Invalid value";
case CUDA_ERROR_OUT_OF_MEMORY: return "Out of memory";
case CUDA_ERROR_NOT_INITIALIZED: return "Driver not initialized";
case CUDA_ERROR_DEINITIALIZED: return "Driver deinitialized";
case CUDA_ERROR_PROFILER_DISABLED: return "PROFILER_DISABLED";
case CUDA_ERROR_PROFILER_NOT_INITIALIZED: return "PROFILER_NOT_INITIALIZED";
case CUDA_ERROR_PROFILER_ALREADY_STARTED: return "PROFILER_ALREADY_STARTED";
case CUDA_ERROR_PROFILER_ALREADY_STOPPED: return "PROFILER_ALREADY_STOPPED";
case CUDA_ERROR_NO_DEVICE: return "No CUDA-capable device available";
case CUDA_ERROR_INVALID_DEVICE: return "Invalid device";
case CUDA_ERROR_INVALID_IMAGE: return "Invalid kernel image";
case CUDA_ERROR_INVALID_CONTEXT: return "Invalid context";
case CUDA_ERROR_CONTEXT_ALREADY_CURRENT: return "Context already current";
case CUDA_ERROR_MAP_FAILED: return "Map failed";
case CUDA_ERROR_UNMAP_FAILED: return "Unmap failed";
case CUDA_ERROR_ARRAY_IS_MAPPED: return "Array is mapped";
case CUDA_ERROR_ALREADY_MAPPED: return "Already mapped";
case CUDA_ERROR_NO_BINARY_FOR_GPU: return "No binary for GPU";
case CUDA_ERROR_ALREADY_ACQUIRED: return "Already acquired";
case CUDA_ERROR_NOT_MAPPED: return "Not mapped";
case CUDA_ERROR_NOT_MAPPED_AS_ARRAY: return "Mapped resource not available for access as an array";
case CUDA_ERROR_NOT_MAPPED_AS_POINTER: return "Mapped resource not available for access as a pointer";
case CUDA_ERROR_ECC_UNCORRECTABLE: return "Uncorrectable ECC error detected";
case CUDA_ERROR_UNSUPPORTED_LIMIT: return "CUlimit not supported by device";
case CUDA_ERROR_CONTEXT_ALREADY_IN_USE: return "CONTEXT_ALREADY_IN_USE";
case CUDA_ERROR_PEER_ACCESS_UNSUPPORTED: return "PEER_ACCESS_UNSUPPORTED";
case CUDA_ERROR_INVALID_PTX: return "INVALID_PTX";
case CUDA_ERROR_INVALID_SOURCE: return "Invalid source";
case CUDA_ERROR_FILE_NOT_FOUND: return "File not found";
case CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND: return "Link to a shared object failed to resolve";
case CUDA_ERROR_SHARED_OBJECT_INIT_FAILED: return "Shared object initialization failed";
case CUDA_ERROR_OPERATING_SYSTEM: return "OPERATING_SYSTEM";
case CUDA_ERROR_INVALID_HANDLE: return "Invalid handle";
case CUDA_ERROR_NOT_FOUND: return "Not found";
case CUDA_ERROR_NOT_READY: return "CUDA not ready";
case CUDA_ERROR_ILLEGAL_ADDRESS: return "ILLEGAL_ADDRESS";
case CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: return "Launch exceeded resources";
case CUDA_ERROR_LAUNCH_TIMEOUT: return "Launch exceeded timeout";
case CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING: return "Launch with incompatible texturing";
case CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED: return "PEER_ACCESS_ALREADY_ENABLED";
case CUDA_ERROR_PEER_ACCESS_NOT_ENABLED: return "PEER_ACCESS_NOT_ENABLED";
case CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE: return "PRIMARY_CONTEXT_ACTIVE";
case CUDA_ERROR_CONTEXT_IS_DESTROYED: return "CONTEXT_IS_DESTROYED";
case CUDA_ERROR_ASSERT: return "ASSERT";
case CUDA_ERROR_TOO_MANY_PEERS: return "TOO_MANY_PEERS";
case CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED: return "HOST_MEMORY_ALREADY_REGISTERED";
case CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED: return "HOST_MEMORY_NOT_REGISTERED";
case CUDA_ERROR_HARDWARE_STACK_ERROR: return "HARDWARE_STACK_ERROR";
case CUDA_ERROR_ILLEGAL_INSTRUCTION: return "ILLEGAL_INSTRUCTION";
case CUDA_ERROR_MISALIGNED_ADDRESS: return "MISALIGNED_ADDRESS";
case CUDA_ERROR_INVALID_ADDRESS_SPACE: return "INVALID_ADDRESS_SPACE";
case CUDA_ERROR_INVALID_PC: return "INVALID_PC";
case CUDA_ERROR_LAUNCH_FAILED: return "Launch failed";
case CUDA_ERROR_NOT_PERMITTED: return "NOT_PERMITTED";
case CUDA_ERROR_NOT_SUPPORTED: return "NOT_SUPPORTED";
case CUDA_ERROR_UNKNOWN: return "Unknown error";
default: return "Unknown CUDA error value";
}
}
static void path_join(const char *path1,
const char *path2,
int maxlen,
char *result) {
#if defined(WIN32) || defined(_WIN32)
const char separator = '\\';
#else
const char separator = '/';
#endif
int n = snprintf(result, maxlen, "%s%c%s", path1, separator, path2);
if (n != -1 && n < maxlen) {
result[n] = '\0';
}
else {
result[maxlen - 1] = '\0';
}
}
static int path_exists(const char *path) {
struct stat st;
if (stat(path, &st)) {
return 0;
}
return 1;
}
const char *cuewCompilerPath(void) {
#ifdef _WIN32
const char *defaultpaths[] = {"C:/CUDA/bin", NULL};
const char *executable = "nvcc.exe";
#else
const char *defaultpaths[] = {
"/Developer/NVIDIA/CUDA-5.0/bin",
"/usr/local/cuda-5.0/bin",
"/usr/local/cuda/bin",
"/Developer/NVIDIA/CUDA-6.0/bin",
"/usr/local/cuda-6.0/bin",
"/Developer/NVIDIA/CUDA-5.5/bin",
"/usr/local/cuda-5.5/bin",
NULL};
const char *executable = "nvcc";
#endif
int i;
const char *binpath = getenv("CUDA_BIN_PATH");
static char nvcc[65536];
if (binpath) {
path_join(binpath, executable, sizeof(nvcc), nvcc);
if (path_exists(nvcc))
return nvcc;
}
for (i = 0; defaultpaths[i]; ++i) {
path_join(defaultpaths[i], executable, sizeof(nvcc), nvcc);
if (path_exists(nvcc))
return nvcc;
}
#ifndef _WIN32
{
FILE *handle = popen("which nvcc", "r");
if (handle) {
char buffer[4096] = {0};
int len = fread(buffer, 1, sizeof(buffer) - 1, handle);
buffer[len] = '\0';
pclose(handle);
if (buffer[0])
return "nvcc";
}
}
#endif
return NULL;
}
int cuewCompilerVersion(void) {
const char *path = cuewCompilerPath();
const char *marker = "Cuda compilation tools, release ";
FILE *pipe;
int major, minor;
char *versionstr;
char buf[128];
char output[65536] = "\0";
char command[65536] = "\0";
if (path == NULL)
return 0;
/* get --version output */
strncpy(command, path, sizeof(command));
strncat(command, " --version", sizeof(command) - strlen(path));
pipe = popen(command, "r");
if (!pipe) {
fprintf(stderr, "CUDA: failed to run compiler to retrieve version");
return 0;
}
while (!feof(pipe)) {
if (fgets(buf, sizeof(buf), pipe) != NULL) {
strncat(output, buf, sizeof(output) - strlen(output) - 1 );
}
}
pclose(pipe);
/* parse version number */
versionstr = strstr(output, marker);
if (versionstr == NULL) {
fprintf(stderr, "CUDA: failed to find version number in:\n\n%s\n", output);
return 0;
}
versionstr += strlen(marker);
if (sscanf(versionstr, "%d.%d", &major, &minor) < 2) {
fprintf(stderr, "CUDA: failed to parse version number from:\n\n%s\n", output);
return 0;
}
return 10 * major + minor;
}

57
extern/glew-es/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,57 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2013, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Jason Wilkins
#
# ***** END GPL LICENSE BLOCK *****
set(INC
include
)
set(INC_SYS
)
if(UNIX)
list(APPEND INC_SYS
${X11_X11_INCLUDE_PATH}
)
endif()
set(SRC
src/glew.c
include/GL/eglew.h
include/GL/glesew.h
include/GL/glew.h
include/GL/glxew.h
include/GL/wglew.h
)
add_definitions(${GL_DEFINITIONS})
if(WITH_GLEW_MX)
add_definitions(-DGLEW_MX)
endif()
blender_add_lib(extern_glew_es "${SRC}" "${INC}" "${INC_SYS}")

14
extern/glew-es/SConscript vendored Normal file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/python
import sys
import os
Import('env')
sources = ['src/glew.c']
defs = env['BF_GL_DEFINITIONS']
if env['WITH_BF_GLEW_MX']:
defs += ['GLEW_MX']
incs = ['include']
env.BlenderLib ( 'extern_glew_es', sources, incs, defs, libtype=['extern','player'], priority=[50,230] )

1470
extern/glew-es/include/GL/eglew.h vendored Normal file

File diff suppressed because it is too large Load Diff

4318
extern/glew-es/include/GL/glesew.h vendored Normal file

File diff suppressed because it is too large Load Diff

20525
extern/glew-es/include/GL/glew.h vendored Normal file

File diff suppressed because it is too large Load Diff

1649
extern/glew-es/include/GL/glxew.h vendored Normal file

File diff suppressed because it is too large Load Diff

1424
extern/glew-es/include/GL/wglew.h vendored Normal file

File diff suppressed because it is too large Load Diff

22401
extern/glew-es/src/glew.c vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,10 @@ set(SRC
include/GL/wglew.h
)
add_definitions(-DGLEW_STATIC)
add_definitions(${GL_DEFINITIONS})
if(WITH_GLEW_MX)
add_definitions(-DGLEW_MX)
endif()
blender_add_lib(extern_glew "${SRC}" "${INC}" "${INC_SYS}")

View File

@@ -6,7 +6,10 @@ Import('env')
sources = ['src/glew.c']
defs = 'GLEW_STATIC'
incs = 'include'
defs = env['BF_GL_DEFINITIONS']
if env['WITH_BF_GLEW_MX']:
defs += ['GLEW_MX']
env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230])
incs = ['include']
env.BlenderLib ( 'extern_glew', sources, incs, defs, libtype=['extern','player'], priority=[50,230] )

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