Compare commits

...

1035 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
1571 changed files with 137457 additions and 30604 deletions

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"
@@ -201,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
@@ -397,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

@@ -218,6 +218,8 @@ else:
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
@@ -420,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']
@@ -526,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')
@@ -709,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")
@@ -812,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
@@ -1137,7 +1188,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
dllsources.append('${BF_SDL_LIBPATH}/SDL2.dll')
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:

View File

@@ -29,7 +29,7 @@ getopt \
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,\
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,skip-opencollada,\
required-numpy: \
-- "$@" \
)
@@ -40,7 +40,7 @@ SRC="$HOME/src/blender-deps"
INST="/opt/lib"
TMP="/tmp"
CWD=$PWD
INFO_PATH = CWD
INFO_PATH=$CWD
# Do not install some optional, potentially conflicting libs by default...
WITH_ALL=false
@@ -83,7 +83,7 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
-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
@@ -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" )
@@ -497,8 +498,12 @@ LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage.git" )
OSL_SOURCE=( "https://github.com/mont29/OpenShadingLanguage.git" )
OSL_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
#OSL_SOURCE=( "https://github.com/mont29/OpenShadingLanguage.git" )
#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"
@@ -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
@@ -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
@@ -1795,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

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

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

View File

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

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,12 @@
# <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
@@ -11,7 +17,6 @@ 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)
@@ -113,7 +118,7 @@ def schedule_force_build(name):
codebases=[forcesched.CodebaseParameter(
codebase="blender",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=["master", "testbuild"], default="master"),
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)),
@@ -127,18 +132,22 @@ def schedule_force_build(name):
def schedule_build(name, hour, minute=0):
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
codebases={
"blender": {"repository": ""},
"blender-translations": {"repository": ""},
"blender-addons": {"repository": ""},
"blender-addons-contrib": {"repository": ""},
"scons": {"repository": ""},
"lib svn": {"repository": ""}},
branch=None,
builderNames=[name],
hour=hour,
minute=minute))
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))
# BUILDERS
@@ -295,6 +304,8 @@ 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_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)

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,11 +46,21 @@ 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'

View File

@@ -115,6 +115,28 @@ if builder.find('scons') != -1:
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

@@ -75,3 +75,5 @@ MARK_AS_ADVANCED(
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

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

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

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

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

@@ -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
@@ -137,17 +138,17 @@ def create_qtc_project_python():
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()
@@ -557,6 +559,9 @@ macro(SETUP_BLENDER_SORTED_LIBS)
extern_wcwidth
extern_libmv
extern_glog
extern_sdlew
bf_intern_glew_mx
)
if(WITH_COMPOSITOR)
@@ -574,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)
@@ -718,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("
@@ -992,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)
@@ -1027,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
@@ -1148,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
@@ -1167,6 +1168,7 @@ function(delayed_do_install
list(GET destinations ${i} d)
install(FILES ${f} DESTINATION ${targetdir}/${d})
endforeach()
unset(f)
endif()
endfunction()
@@ -1381,3 +1383,14 @@ macro(find_python_package
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
@@ -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

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

@@ -196,7 +196,7 @@ C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-pro
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']

View File

@@ -57,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'
@@ -197,7 +197,7 @@ 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
@@ -235,7 +235,7 @@ 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']

View File

@@ -190,7 +190,7 @@ C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-pro
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']

View File

@@ -52,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
@@ -200,7 +200,7 @@ 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
@@ -242,7 +242,7 @@ 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']

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'])
@@ -303,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'])
@@ -381,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')
@@ -809,10 +816,6 @@ def AppIt(target=None, source=None, env=None):
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
cmd = 'install_name_tool -id @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
commands.getoutput(cmd)
cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.

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)),

View File

@@ -13,8 +13,10 @@ blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender
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"
@@ -22,15 +24,18 @@ 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 > $BASE_DIR/$MANIFEST
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
# Enumerate submodules
for lcv in $(git submodule | cut -f2 -d" "); do
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
cd "$BASE_DIR"
cd "$blender_srcdir/$lcv"
git ls-files | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
cd "$BASE_DIR"
done
echo "OK"

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

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

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

16
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)
@@ -79,12 +83,14 @@ 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()

9
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'])
@@ -46,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

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

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

View File

@@ -350,7 +350,7 @@ typedef unsigned int cl_GLenum;
#ifdef _MSC_VER
#if defined(_M_IX86)
#if _M_IX86_FP >= 0
#if _M_IX86_FP >= 0 && !defined(__SSE__)
#define __SSE__
#endif
#if _M_IX86_FP >= 1
@@ -1815,6 +1815,11 @@ typedef struct _cl_buffer_region {
/* Function signature typedef's */
#ifdef __APPLE__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wignored-attributes"
#endif
/* Platform API */
typedef CL_API_ENTRY cl_int (CL_API_CALL *
PFNCLGETPLATFORMIDS)(cl_uint /* num_entries */,
@@ -2476,6 +2481,10 @@ PFNCLCREATEFROMGLTEXTURE3D)(cl_context /* context */,
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
#endif
#ifdef __APPLE__
# pragma GCC diagnostic pop // ignored "-Wignored-attributes"
#endif
/* cl_khr_gl_sharing extension */
#define cl_khr_gl_sharing 1

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] )

File diff suppressed because it is too large Load Diff

View File

@@ -362,6 +362,26 @@ extern void ( * glXGetProcAddress (const GLubyte *procName)) (void);
#define GLX_GPU_NUM_RB_AMD 0x21A7
#define GLX_GPU_NUM_SPI_AMD 0x21A8
typedef void ( * PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC) (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC) (unsigned int id, GLXContext share_list);
typedef GLXContext ( * PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (unsigned int id, GLXContext share_context, const int* attribList);
typedef Bool ( * PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC) (GLXContext ctx);
typedef unsigned int ( * PFNGLXGETCONTEXTGPUIDAMDPROC) (GLXContext ctx);
typedef GLXContext ( * PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
typedef unsigned int ( * PFNGLXGETGPUIDSAMDPROC) (unsigned int maxCount, unsigned int* ids);
typedef int ( * PFNGLXGETGPUINFOAMDPROC) (unsigned int id, int property, GLenum dataType, unsigned int size, void* data);
typedef Bool ( * PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (GLXContext ctx);
#define glXBlitContextFramebufferAMD GLXEW_GET_FUN(__glewXBlitContextFramebufferAMD)
#define glXCreateAssociatedContextAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAMD)
#define glXCreateAssociatedContextAttribsAMD GLXEW_GET_FUN(__glewXCreateAssociatedContextAttribsAMD)
#define glXDeleteAssociatedContextAMD GLXEW_GET_FUN(__glewXDeleteAssociatedContextAMD)
#define glXGetContextGPUIDAMD GLXEW_GET_FUN(__glewXGetContextGPUIDAMD)
#define glXGetCurrentAssociatedContextAMD GLXEW_GET_FUN(__glewXGetCurrentAssociatedContextAMD)
#define glXGetGPUIDsAMD GLXEW_GET_FUN(__glewXGetGPUIDsAMD)
#define glXGetGPUInfoAMD GLXEW_GET_FUN(__glewXGetGPUInfoAMD)
#define glXMakeAssociatedContextCurrentAMD GLXEW_GET_FUN(__glewXMakeAssociatedContextCurrentAMD)
#define GLXEW_AMD_gpu_association GLXEW_GET_VAR(__GLXEW_AMD_gpu_association)
#endif /* GLX_AMD_gpu_association */
@@ -458,6 +478,28 @@ extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void);
#endif /* GLX_ARB_multisample */
/* ---------------- GLX_ARB_robustness_application_isolation --------------- */
#ifndef GLX_ARB_robustness_application_isolation
#define GLX_ARB_robustness_application_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_application_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_application_isolation)
#endif /* GLX_ARB_robustness_application_isolation */
/* ---------------- GLX_ARB_robustness_share_group_isolation --------------- */
#ifndef GLX_ARB_robustness_share_group_isolation
#define GLX_ARB_robustness_share_group_isolation 1
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define GLXEW_ARB_robustness_share_group_isolation GLXEW_GET_VAR(__GLXEW_ARB_robustness_share_group_isolation)
#endif /* GLX_ARB_robustness_share_group_isolation */
/* ---------------------- GLX_ARB_vertex_buffer_object --------------------- */
#ifndef GLX_ARB_vertex_buffer_object
@@ -533,6 +575,17 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_ATI_render_texture */
/* --------------------------- GLX_EXT_buffer_age -------------------------- */
#ifndef GLX_EXT_buffer_age
#define GLX_EXT_buffer_age 1
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
#define GLXEW_EXT_buffer_age GLXEW_GET_VAR(__GLXEW_EXT_buffer_age)
#endif /* GLX_EXT_buffer_age */
/* ------------------- GLX_EXT_create_context_es2_profile ------------------ */
#ifndef GLX_EXT_create_context_es2_profile
@@ -544,6 +597,17 @@ typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, i
#endif /* GLX_EXT_create_context_es2_profile */
/* ------------------- GLX_EXT_create_context_es_profile ------------------- */
#ifndef GLX_EXT_create_context_es_profile
#define GLX_EXT_create_context_es_profile 1
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define GLXEW_EXT_create_context_es_profile GLXEW_GET_VAR(__GLXEW_EXT_create_context_es_profile)
#endif /* GLX_EXT_create_context_es_profile */
/* --------------------- GLX_EXT_fbconfig_packed_float --------------------- */
#ifndef GLX_EXT_fbconfig_packed_float
@@ -617,6 +681,17 @@ typedef void ( * PFNGLXSWAPINTERVALEXTPROC) (Display* dpy, GLXDrawable drawable,
#endif /* GLX_EXT_swap_control */
/* ----------------------- GLX_EXT_swap_control_tear ----------------------- */
#ifndef GLX_EXT_swap_control_tear
#define GLX_EXT_swap_control_tear 1
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#define GLXEW_EXT_swap_control_tear GLXEW_GET_VAR(__GLXEW_EXT_swap_control_tear)
#endif /* GLX_EXT_swap_control_tear */
/* ---------------------- GLX_EXT_texture_from_pixmap ---------------------- */
#ifndef GLX_EXT_texture_from_pixmap
@@ -1003,16 +1078,6 @@ typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, i
#ifndef GLX_SGIS_color_range
#define GLX_SGIS_color_range 1
#define GLX_MIN_RED_SGIS 0
#define GLX_MAX_GREEN_SGIS 0
#define GLX_MIN_BLUE_SGIS 0
#define GLX_MAX_ALPHA_SGIS 0
#define GLX_MIN_GREEN_SGIS 0
#define GLX_MIN_ALPHA_SGIS 0
#define GLX_MAX_RED_SGIS 0
#define GLX_EXTENDED_RANGE_SGIS 0
#define GLX_MAX_BLUE_SGIS 0
#define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range)
#endif /* GLX_SGIS_color_range */
@@ -1349,207 +1414,224 @@ typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window,
/* ------------------------------------------------------------------------- */
#ifdef GLEW_MX
#define GLXEW_EXPORT
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT
#else
#define GLXEW_EXPORT extern
#define GLXEW_FUN_EXPORT GLEW_FUN_EXPORT
#define GLXEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */
extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
GLXEW_FUN_EXPORT PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay;
extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
extern PFNGLXSELECTEVENTPROC __glewXSelectEvent;
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig;
GLXEW_FUN_EXPORT PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext;
GLXEW_FUN_EXPORT PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer;
GLXEW_FUN_EXPORT PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap;
GLXEW_FUN_EXPORT PFNGLXCREATEWINDOWPROC __glewXCreateWindow;
GLXEW_FUN_EXPORT PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer;
GLXEW_FUN_EXPORT PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap;
GLXEW_FUN_EXPORT PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow;
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig;
GLXEW_FUN_EXPORT PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent;
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTPROC __glewXQueryContext;
GLXEW_FUN_EXPORT PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTPROC __glewXSelectEvent;
extern PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
GLXEW_FUN_EXPORT PFNGLXBLITCONTEXTFRAMEBUFFERAMDPROC __glewXBlitContextFramebufferAMD;
GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTAMDPROC __glewXCreateAssociatedContextAMD;
GLXEW_FUN_EXPORT PFNGLXCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __glewXCreateAssociatedContextAttribsAMD;
GLXEW_FUN_EXPORT PFNGLXDELETEASSOCIATEDCONTEXTAMDPROC __glewXDeleteAssociatedContextAMD;
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTGPUIDAMDPROC __glewXGetContextGPUIDAMD;
GLXEW_FUN_EXPORT PFNGLXGETCURRENTASSOCIATEDCONTEXTAMDPROC __glewXGetCurrentAssociatedContextAMD;
GLXEW_FUN_EXPORT PFNGLXGETGPUIDSAMDPROC __glewXGetGPUIDsAMD;
GLXEW_FUN_EXPORT PFNGLXGETGPUINFOAMDPROC __glewXGetGPUInfoAMD;
GLXEW_FUN_EXPORT PFNGLXMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __glewXMakeAssociatedContextCurrentAMD;
extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTATTRIBSARBPROC __glewXCreateContextAttribsARB;
extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI;
GLXEW_FUN_EXPORT PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI;
extern PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
GLXEW_FUN_EXPORT PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT;
GLXEW_FUN_EXPORT PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT;
GLXEW_FUN_EXPORT PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT;
GLXEW_FUN_EXPORT PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT;
extern PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
extern PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALEXTPROC __glewXSwapIntervalEXT;
extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
GLXEW_FUN_EXPORT PFNGLXBINDTEXIMAGEEXTPROC __glewXBindTexImageEXT;
GLXEW_FUN_EXPORT PFNGLXRELEASETEXIMAGEEXTPROC __glewXReleaseTexImageEXT;
extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
GLXEW_FUN_EXPORT PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA;
extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
GLXEW_FUN_EXPORT PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA;
extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
GLXEW_FUN_EXPORT PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
extern PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
GLXEW_FUN_EXPORT PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
GLXEW_FUN_EXPORT PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
extern PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
GLXEW_FUN_EXPORT PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
extern PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
extern PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
extern PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
extern PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
extern PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
GLXEW_FUN_EXPORT PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEODEVICESNVPROC __glewXEnumerateVideoDevicesNV;
extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERNVPROC __glewXBindSwapBarrierNV;
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPNVPROC __glewXJoinSwapGroupNV;
GLXEW_FUN_EXPORT PFNGLXQUERYFRAMECOUNTNVPROC __glewXQueryFrameCountNV;
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPGROUPSNVPROC __glewXQueryMaxSwapGroupsNV;
GLXEW_FUN_EXPORT PFNGLXQUERYSWAPGROUPNVPROC __glewXQuerySwapGroupNV;
GLXEW_FUN_EXPORT PFNGLXRESETFRAMECOUNTNVPROC __glewXResetFrameCountNV;
extern PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
extern PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
extern PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
extern PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
extern PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
GLXEW_FUN_EXPORT PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV;
GLXEW_FUN_EXPORT PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV;
extern PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
extern PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
extern PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
extern PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
extern PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
extern PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOCAPTUREDEVICENVPROC __glewXBindVideoCaptureDeviceNV;
GLXEW_FUN_EXPORT PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC __glewXEnumerateVideoCaptureDevicesNV;
GLXEW_FUN_EXPORT PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC __glewXLockVideoCaptureDeviceNV;
GLXEW_FUN_EXPORT PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC __glewXQueryVideoCaptureDeviceNV;
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC __glewXReleaseVideoCaptureDeviceNV;
extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
GLXEW_FUN_EXPORT PFNGLXBINDVIDEOIMAGENVPROC __glewXBindVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXGETVIDEODEVICENVPROC __glewXGetVideoDeviceNV;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOINFONVPROC __glewXGetVideoInfoNV;
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEODEVICENVPROC __glewXReleaseVideoDeviceNV;
GLXEW_FUN_EXPORT PFNGLXRELEASEVIDEOIMAGENVPROC __glewXReleaseVideoImageNV;
GLXEW_FUN_EXPORT PFNGLXSENDPBUFFERTOVIDEONVPROC __glewXSendPbufferToVideoNV;
extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML;
GLXEW_FUN_EXPORT PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML;
GLXEW_FUN_EXPORT PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML;
GLXEW_FUN_EXPORT PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML;
extern PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
extern PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
extern PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
extern PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
extern PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
extern PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
extern PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
GLXEW_FUN_EXPORT PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX;
GLXEW_FUN_EXPORT PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX;
extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
GLXEW_FUN_EXPORT PFNGLXBINDHYPERPIPESGIXPROC __glewXBindHyperpipeSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC __glewXDestroyHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXHYPERPIPEATTRIBSGIXPROC __glewXHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXHYPERPIPECONFIGSGIXPROC __glewXHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC __glewXQueryHyperpipeAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC __glewXQueryHyperpipeBestAttribSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPECONFIGSGIXPROC __glewXQueryHyperpipeConfigSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYHYPERPIPENETWORKSGIXPROC __glewXQueryHyperpipeNetworkSGIX;
extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
GLXEW_FUN_EXPORT PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX;
GLXEW_FUN_EXPORT PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX;
extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
GLXEW_FUN_EXPORT PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX;
extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX;
extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
GLXEW_FUN_EXPORT PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX;
GLXEW_FUN_EXPORT PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX;
GLXEW_FUN_EXPORT PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX;
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
GLXEW_FUN_EXPORT PFNGLXCUSHIONSGIPROC __glewXCushionSGI;
extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
GLXEW_FUN_EXPORT PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI;
GLXEW_FUN_EXPORT PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI;
extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI;
extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI;
GLXEW_FUN_EXPORT PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI;
extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN;
GLXEW_FUN_EXPORT PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN;
GLXEW_FUN_EXPORT PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN;
#if defined(GLEW_MX)
struct GLXEWContextStruct
{
#endif /* GLEW_MX */
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_EXPORT GLboolean __GLXEW_NV_video_output;
GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_3;
GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_4;
GLXEW_VAR_EXPORT GLboolean __GLXEW_3DFX_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_AMD_gpu_association;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_profile;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_create_context_robustness;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_fbconfig_float;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_framebuffer_sRGB;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_get_proc_address;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_application_isolation;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_robustness_share_group_isolation;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ARB_vertex_buffer_object;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_pixel_format_float;
GLXEW_VAR_EXPORT GLboolean __GLXEW_ATI_render_texture;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_buffer_age;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es2_profile;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_create_context_es_profile;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_fbconfig_packed_float;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_framebuffer_sRGB;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_import_context;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_scene_marker;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_swap_control_tear;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_texture_from_pixmap;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_info;
GLXEW_VAR_EXPORT GLboolean __GLXEW_EXT_visual_rating;
GLXEW_VAR_EXPORT GLboolean __GLXEW_INTEL_swap_event;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_agp_offset;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
GLXEW_VAR_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_present_video;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_output;
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_pbuffer;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_barrier;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_swap_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_video_resize;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_visual_select_group;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_cushion;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_make_current_read;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_swap_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGI_video_sync;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_get_transparent_index;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX
}; /* GLXEWContextStruct */
@@ -1560,8 +1642,8 @@ GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize;
#ifdef GLEW_MX
typedef struct GLXEWContextStruct GLXEWContext;
extern GLenum glxewContextInit (GLXEWContext* ctx);
extern GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* name);
GLEWAPI GLenum GLEWAPIENTRY glxewContextInit (GLXEWContext *ctx);
GLEWAPI GLboolean GLEWAPIENTRY glxewContextIsSupported (const GLXEWContext *ctx, const char *name);
#define glxewInit() glxewContextInit(glxewGetContext())
#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x)
@@ -1574,11 +1656,11 @@ extern GLboolean glxewContextIsSupported (const GLXEWContext* ctx, const char* n
#define GLXEW_GET_VAR(x) (*(const GLboolean*)&x)
#define GLXEW_GET_FUN(x) x
extern GLboolean glxewIsSupported (const char* name);
GLEWAPI GLboolean GLEWAPIENTRY glxewIsSupported (const char *name);
#endif /* GLEW_MX */
extern GLboolean glxewGetExtension (const char* name);
GLEWAPI GLboolean GLEWAPIENTRY glxewGetExtension (const char *name);
#ifdef __cplusplus
}

View File

@@ -446,6 +446,28 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_ARB_render_texture */
/* ---------------- WGL_ARB_robustness_application_isolation --------------- */
#ifndef WGL_ARB_robustness_application_isolation
#define WGL_ARB_robustness_application_isolation 1
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define WGLEW_ARB_robustness_application_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_application_isolation)
#endif /* WGL_ARB_robustness_application_isolation */
/* ---------------- WGL_ARB_robustness_share_group_isolation --------------- */
#ifndef WGL_ARB_robustness_share_group_isolation
#define WGL_ARB_robustness_share_group_isolation 1
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
#define WGLEW_ARB_robustness_share_group_isolation WGLEW_GET_VAR(__WGLEW_ARB_robustness_share_group_isolation)
#endif /* WGL_ARB_robustness_share_group_isolation */
/* ----------------------- WGL_ATI_pixel_format_float ---------------------- */
#ifndef WGL_ATI_pixel_format_float
@@ -481,6 +503,17 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con
#endif /* WGL_EXT_create_context_es2_profile */
/* ------------------- WGL_EXT_create_context_es_profile ------------------- */
#ifndef WGL_EXT_create_context_es_profile
#define WGL_EXT_create_context_es_profile 1
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
#define WGLEW_EXT_create_context_es_profile WGLEW_GET_VAR(__WGLEW_EXT_create_context_es_profile)
#endif /* WGL_EXT_create_context_es_profile */
/* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float
@@ -686,6 +719,15 @@ typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#endif /* WGL_EXT_swap_control */
/* ----------------------- WGL_EXT_swap_control_tear ----------------------- */
#ifndef WGL_EXT_swap_control_tear
#define WGL_EXT_swap_control_tear 1
#define WGLEW_EXT_swap_control_tear WGLEW_GET_VAR(__WGLEW_EXT_swap_control_tear)
#endif /* WGL_EXT_swap_control_tear */
/* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control
@@ -864,6 +906,15 @@ typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE h
#endif /* WGL_NV_DX_interop */
/* --------------------------- WGL_NV_DX_interop2 -------------------------- */
#ifndef WGL_NV_DX_interop2
#define WGL_NV_DX_interop2 1
#define WGLEW_NV_DX_interop2 WGLEW_GET_VAR(__WGLEW_NV_DX_interop2)
#endif /* WGL_NV_DX_interop2 */
/* --------------------------- WGL_NV_copy_image --------------------------- */
#ifndef WGL_NV_copy_image
@@ -1120,9 +1171,11 @@ typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT6
/* ------------------------------------------------------------------------- */
#ifdef GLEW_MX
#define WGLEW_EXPORT
#define WGLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT
#else
#define WGLEW_EXPORT GLEWAPI
#define WGLEW_FUN_EXPORT GLEW_FUN_EXPORT
#define WGLEW_VAR_EXPORT GLEW_VAR_EXPORT
#endif /* GLEW_MX */
#ifdef GLEW_MX
@@ -1130,200 +1183,205 @@ struct WGLEWContextStruct
{
#endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_FUN_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_FUN_EXPORT PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC __wglewBlitContextFramebufferAMD;
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC __wglewCreateAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC __wglewCreateAssociatedContextAttribsAMD;
WGLEW_FUN_EXPORT PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC __wglewDeleteAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETCONTEXTGPUIDAMDPROC __wglewGetContextGPUIDAMD;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC __wglewGetCurrentAssociatedContextAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUIDSAMDPROC __wglewGetGPUIDsAMD;
WGLEW_FUN_EXPORT PFNWGLGETGPUINFOAMDPROC __wglewGetGPUInfoAMD;
WGLEW_FUN_EXPORT PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC __wglewMakeAssociatedContextCurrentAMD;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_FUN_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_FUN_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_FUN_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_FUN_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_FUN_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_FUN_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_FUN_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_FUN_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_FUN_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_FUN_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_FUN_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_FUN_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_FUN_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_FUN_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_FUN_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_FUN_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_FUN_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_FUN_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_FUN_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_FUN_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_FUN_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_FUN_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_FUN_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_FUN_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_FUN_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_FUN_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_FUN_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_FUN_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_FUN_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_FUN_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_FUN_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXCLOSEDEVICENVPROC __wglewDXCloseDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXLOCKOBJECTSNVPROC __wglewDXLockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXOBJECTACCESSNVPROC __wglewDXObjectAccessNV;
WGLEW_FUN_EXPORT PFNWGLDXOPENDEVICENVPROC __wglewDXOpenDeviceNV;
WGLEW_FUN_EXPORT PFNWGLDXREGISTEROBJECTNVPROC __wglewDXRegisterObjectNV;
WGLEW_FUN_EXPORT PFNWGLDXSETRESOURCESHAREHANDLENVPROC __wglewDXSetResourceShareHandleNV;
WGLEW_FUN_EXPORT PFNWGLDXUNLOCKOBJECTSNVPROC __wglewDXUnlockObjectsNV;
WGLEW_FUN_EXPORT PFNWGLDXUNREGISTEROBJECTNVPROC __wglewDXUnregisterObjectNV;
WGLEW_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_FUN_EXPORT PFNWGLCOPYIMAGESUBDATANVPROC __wglewCopyImageSubDataNV;
WGLEW_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_FUN_EXPORT PFNWGLCREATEAFFINITYDCNVPROC __wglewCreateAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLDELETEDCNVPROC __wglewDeleteDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUDEVICESNVPROC __wglewEnumGpuDevicesNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSFROMAFFINITYDCNVPROC __wglewEnumGpusFromAffinityDCNV;
WGLEW_FUN_EXPORT PFNWGLENUMGPUSNVPROC __wglewEnumGpusNV;
WGLEW_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_FUN_EXPORT PFNWGLBINDVIDEODEVICENVPROC __wglewBindVideoDeviceNV;
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEODEVICESNVPROC __wglewEnumerateVideoDevicesNV;
WGLEW_FUN_EXPORT PFNWGLQUERYCURRENTCONTEXTNVPROC __wglewQueryCurrentContextNV;
WGLEW_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_FUN_EXPORT PFNWGLBINDSWAPBARRIERNVPROC __wglewBindSwapBarrierNV;
WGLEW_FUN_EXPORT PFNWGLJOINSWAPGROUPNVPROC __wglewJoinSwapGroupNV;
WGLEW_FUN_EXPORT PFNWGLQUERYFRAMECOUNTNVPROC __wglewQueryFrameCountNV;
WGLEW_FUN_EXPORT PFNWGLQUERYMAXSWAPGROUPSNVPROC __wglewQueryMaxSwapGroupsNV;
WGLEW_FUN_EXPORT PFNWGLQUERYSWAPGROUPNVPROC __wglewQuerySwapGroupNV;
WGLEW_FUN_EXPORT PFNWGLRESETFRAMECOUNTNVPROC __wglewResetFrameCountNV;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_FUN_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_FUN_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOCAPTUREDEVICENVPROC __wglewBindVideoCaptureDeviceNV;
WGLEW_FUN_EXPORT PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC __wglewEnumerateVideoCaptureDevicesNV;
WGLEW_FUN_EXPORT PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC __wglewLockVideoCaptureDeviceNV;
WGLEW_FUN_EXPORT PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC __wglewQueryVideoCaptureDeviceNV;
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC __wglewReleaseVideoCaptureDeviceNV;
WGLEW_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_FUN_EXPORT PFNWGLBINDVIDEOIMAGENVPROC __wglewBindVideoImageNV;
WGLEW_FUN_EXPORT PFNWGLGETVIDEODEVICENVPROC __wglewGetVideoDeviceNV;
WGLEW_FUN_EXPORT PFNWGLGETVIDEOINFONVPROC __wglewGetVideoInfoNV;
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEODEVICENVPROC __wglewReleaseVideoDeviceNV;
WGLEW_FUN_EXPORT PFNWGLRELEASEVIDEOIMAGENVPROC __wglewReleaseVideoImageNV;
WGLEW_FUN_EXPORT PFNWGLSENDPBUFFERTOVIDEONVPROC __wglewSendPbufferToVideoNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
WGLEW_FUN_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_FUN_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_FUN_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_FUN_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_FUN_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_FUN_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_AMD_gpu_association;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_create_context_robustness;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_application_isolation;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ARB_robustness_share_group_isolation;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es2_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_create_context_es_profile;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_framebuffer_sRGB;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_pixel_format_packed_float;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_EXT_swap_control_tear;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_VAR_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_DX_interop2;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_copy_image;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_gpu_affinity;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_multisample_coverage;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_present_video;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_swap_group;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_capture;
WGLEW_VAR_EXPORT GLboolean __WGLEW_NV_video_output;
WGLEW_VAR_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX
}; /* WGLEWContextStruct */
@@ -1334,8 +1392,8 @@ WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
GLEWAPI GLboolean wglewContextIsSupported (const WGLEWContext* ctx, const char* name);
GLEWAPI GLenum GLEWAPIENTRY wglewContextInit (WGLEWContext *ctx);
GLEWAPI GLboolean GLEWAPIENTRY wglewContextIsSupported (const WGLEWContext *ctx, const char *name);
#define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
@@ -1348,11 +1406,11 @@ GLEWAPI GLboolean wglewContextIsSupported (const WGLEWContext* ctx, const char*
#define WGLEW_GET_VAR(x) (*(const GLboolean*)&x)
#define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name);
GLEWAPI GLboolean GLEWAPIENTRY wglewIsSupported (const char *name);
#endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name);
GLEWAPI GLboolean GLEWAPIENTRY wglewGetExtension (const char *name);
#ifdef __cplusplus
}

2312
extern/glew/src/glew.c vendored

File diff suppressed because it is too large Load Diff

View File

@@ -35,12 +35,10 @@ set(INC_SYS
set(SRC
libmv-capi.h
libmv-capi_intern.h
)
if(WITH_LIBMV)
add_definitions(
-DWITH_LIBMV
-DWITH_LIBMV_GUARDED_ALLOC
-DGOOGLE_GLOG_DLL_DECL=
-DLIBMV_NO_FAST_DETECTOR=
@@ -66,15 +64,27 @@ if(WITH_LIBMV)
../../intern/guardedalloc
)
set(INC_SYS
list(APPEND INC_SYS
../Eigen3
${PNG_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)
list(APPEND SRC
libmv-capi.cc
libmv-util.cc
intern/autotrack.cc
intern/camera_intrinsics.cc
intern/detector.cc
intern/frame_accessor.cc
intern/homography.cc
intern/image.cc
intern/logging.cc
intern/reconstruction.cc
intern/track_region.cc
intern/tracks.cc
intern/tracksN.cc
libmv/autotrack/autotrack.cc
libmv/autotrack/predict_tracks.cc
libmv/autotrack/tracks.cc
libmv/base/aligned_malloc.cc
libmv/image/array_nd.cc
libmv/image/convolve.cc
@@ -109,7 +119,28 @@ if(WITH_LIBMV)
libmv/tracking/track_region.cc
libmv/tracking/trklt_region_tracker.cc
libmv-util.h
intern/autotrack.h
intern/camera_intrinsics.h
intern/detector.h
intern/frame_accessor.h
intern/homography.h
intern/image.h
intern/logging.h
intern/reconstruction.h
intern/track_region.h
intern/tracks.h
intern/tracksN.h
libmv/autotrack/autotrack.h
libmv/autotrack/callbacks.h
libmv/autotrack/frame_accessor.h
libmv/autotrack/marker.h
libmv/autotrack/model.h
libmv/autotrack/predict_tracks.h
libmv/autotrack/quad.h
libmv/autotrack/reconstruction.h
libmv/autotrack/region.h
libmv/autotrack/tracks.h
libmv/base/aligned_malloc.h
libmv/base/id_generator.h
libmv/base/scoped_ptr.h
@@ -159,6 +190,7 @@ if(WITH_LIBMV)
libmv/simple_pipeline/tracks.h
libmv/tracking/brute_region_tracker.h
libmv/tracking/hybrid_region_tracker.h
libmv/tracking/kalman_filter.h
libmv/tracking/klt_region_tracker.h
libmv/tracking/pyramid_region_tracker.h
libmv/tracking/region_tracker.h
@@ -185,6 +217,8 @@ if(WITH_LIBMV)
if(WITH_GTESTS)
blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "")
BLENDER_SRC_GTEST("libmv_predict_tracks" "./libmv/autotrack/predict_tracks_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
BLENDER_SRC_GTEST("libmv_tracks" "./libmv/autotrack/tracks_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
BLENDER_SRC_GTEST("libmv_scoped_ptr" "./libmv/base/scoped_ptr_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
BLENDER_SRC_GTEST("libmv_vector" "./libmv/base/vector_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
BLENDER_SRC_GTEST("libmv_array_nd" "./libmv/image/array_nd_test.cc" "libmv_test_dataset;extern_libmv;extern_ceres")
@@ -217,7 +251,7 @@ if(WITH_LIBMV)
endif()
else()
list(APPEND SRC
libmv-capi_stub.cc
intern/stub.cc
)
endif()
@@ -228,7 +262,7 @@ if(WITH_LIBMV)
endif()
# make GLog a separate target, so it can be used for gtest as well.
if(WITH_LIBMV OR WITH_GTESTS)
if(WITH_LIBMV OR WITH_GTESTS OR WITH_CYCLES_LOGGING)
# We compile GLog together with GFlag so we don't worry about
# adding extra lib to linker.
set(GLOG_SRC

701
extern/libmv/ChangeLog vendored
View File

@@ -1,3 +1,365 @@
commit d976e034cdf74b34860e0632d7b29713f47c5756
Author: Keir Mierle <mierle@gmail.com>
Date: Sat Aug 23 00:38:01 2014 -0700
Minor keyframe selection cleanups
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D757
commit bc99ca55dadfca89fde0f93764397c2fe028943d
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Sat Aug 23 01:55:32 2014 +0600
implement backward prediction
The title actually says it all, just extend current implementation
of PredictMarkerPosition() to cases when tracking happens in the reverse
order (from the end frame to start).
it's still doesn't solve all the ambiguity happening in the function
in cases when one tracks the feature and then re-tracks it in order
to refine the sliding. This is considered a separate TODO for now and
will likely be solved by passing tracking direction to the prediction
function.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D663
commit 5b87682d98df65ade02638bc6482d824cf0dd0b3
Author: Keir Mierle <mierle@gmail.com>
Date: Thu Aug 21 22:45:22 2014 -0700
Make libmv compile on Ubuntu 14.04
Reviewers: fsiddi
Reviewed By: fsiddi
Subscribers: sergey
Differential Revision: https://developer.blender.org/D755
commit 0a81db623c458e0384b4f7060d1bcff8993fb469
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Jul 23 00:42:00 2014 +0600
Fix wrong residual blocks counter
This happened in cases when having zero-weighted tracks
and could lead to some assert failures on marking parameter
block constant.
commit 2824dbac54cacf74828678be7a5c9fd960ce83e2
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Fri Jul 18 12:52:03 2014 +0600
Fix search area sliding issue
The only way to do this is to store search region in floats
and round when we need to sample it. Otherwise you'll always
have sliding effect caused by rounding the issues, especially
when doing incremental offset (thing which happens in the
prediction code).
Pretty much straightforward change apart from stuff to be kept
in mind: offset calculation int should happen relative to the
rounded search region. This is because tracker works in the space
of the search window image which get's rounded on the frame access,
This makes API a bit creepy because frame accessor uses the same
Region struct as the search window in Marker and ideally we would
need to have either IntRegion or Region<int> in order to make
Libmv fully track on what's getting rounded and when.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D616
commit 04862c479332308be47a0f27361402444ace8880
Author: Keir Mierle <mierle@gmail.com>
Date: Fri May 9 23:00:03 2014 +0200
Start the automatic 2D tracking code
This starts the 2D automatic tracking code. It is totally unfinished.
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D523
commit be679f67d807a2139c1f7d7e2ca45141940b30d5
Author: Keir Mierle <mierle@gmail.com>
Date: Fri May 9 14:36:04 2014 +0200
Also shift the search window
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D520
commit 66b8f5eef2633ebcde32a388fc14c60171011821
Author: Keir Mierle <mierle@gmail.com>
Date: Fri May 9 13:06:28 2014 +0200
Change the search region to absolute frame coordinates
Smarter Eigen usage
Better error logging
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D519
commit a08193319ae409fad8f08887eae1f79f02e91eaa
Author: Keir Mierle <mierle@gmail.com>
Date: Fri May 9 12:02:47 2014 +0200
First cut at predictive tracing
This adds a Kalman filter-based approach to predict where a marker
will go in the next frame to track. Hopefully this will make the
tracker work faster by avoiding lengthy searches. This code
compiles, but is otherwise untested, and likely does not work.
Fix else branch
Add some tests
Update patch coordinates as well (and test)
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D518
commit 607ffb2f62b56e34a841abbb952d83e19cd1e23c
Author: Keir Mierle <mierle@gmail.com>
Date: Thu May 8 16:05:28 2014 +0200
Add constructor to AutoTrack
commit c39e20a0c27da3733804c3848454b5d4c4f0e66b
Author: Keir Mierle <mierle@gmail.com>
Date: Thu May 8 16:04:20 2014 +0200
Fix GetMarker compilation issue
commit 8dd93e431b6e44439c803bfd26ec2669b656177e
Author: Keir Mierle <mierle@gmail.com>
Date: Thu May 8 15:50:26 2014 +0200
Expose GetMarker() in AutoTrack
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D516
commit 4405dff60ea08d454b64da1a7c0595d9328cf8a3
Author: Keir Mierle <mierle@gmail.com>
Date: Thu May 8 15:38:14 2014 +0200
Add public SetMarkers to AutoTrack
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D515
commit c90837f6db276a3b1f610eaad509155f6a43b24f
Author: Keir Mierle <mierle@gmail.com>
Date: Thu May 8 15:17:48 2014 +0200
Make autotrack skeleton compile
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D514
commit be01baa2e82e36f63e548f073157e68d2ff870c0
Author: Keir Mierle <mierle@gmail.com>
Date: Wed May 7 18:48:55 2014 +0200
Add preliminary TrackMarkerToFrame in autotrack
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D509
commit 0cab028d591b3d08672ca86eb6c6e4ac1aacf1d0
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed May 7 17:59:11 2014 +0200
Remove assert from ArrayND Resize
That assert broke initialization of arrays which doesn't
own the data since constructor uses Resize to set shape
and strides.
Strides are still to be fixed, but that's for later.
commit 64f9c118029a9351e9023e96527c120e1d724d5b
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed May 7 17:42:21 2014 +0200
Fix ArrayND freeing the data it doesn't own
Can't really guarantee it works fully correct now,
but at least this check is needed anyway and compilation
works just fine.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D508
commit 0618f1c8e88dfc738cdde55784da80b889905e7c
Author: Keir Mierle <mierle@gmail.com>
Date: Wed May 7 12:03:32 2014 +0200
Minor changes
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D505
commit 5c34335e1bb90c4ed701ee830c718ed4e20dbffa
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed May 7 11:12:23 2014 +0200
Fix compilation error in frame accessor
- int64 is not a standard type, we've got int64_t defined in
std int. We also have an msvc port of this header, so should
not be an issue.
- Fixed inconsistency in usage of CacheKey and Key, used Key.
- Some functions weren't marked as virtual.
Additional change: added self to authors.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D504
commit 06bc207614e262cd688e2c3ed820ade7c77bdb66
Author: Keir Mierle <mierle@gmail.com>
Date: Tue May 6 22:30:59 2014 +0200
Start new Tracks implementation
This adds the new Tracks implementation, as well as a
trivial test to show it compiles.
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D502
commit 25ce061e6da69881460ba7718bb0d660a2380a02
Author: Keir Mierle <mierle@gmail.com>
Date: Tue May 6 19:10:51 2014 +0200
Add Reconstruction class for new API
This starts the new Reconstruction class (with support for e.g. planes). This
also starts the new namespace "mv" which will eventually have all the symbols
we wish to export.
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D501
commit 0a6af3e29016048978aea607673340500e050339
Author: Keir Mierle <mierle@gmail.com>
Date: Tue May 6 17:52:53 2014 +0200
Add a new Tracks implementation
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D500
commit 887b68d29c2b198f4939f9ab5153881aa2c1806e
Author: Keir Mierle <mierle@gmail.com>
Date: Tue May 6 17:01:39 2014 +0200
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.
Note: This does not add any of the API to the build system!
It likely does not compile.
Reviewers: sergey
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D499
commit 08cc227d431d257d27f300fbb8e6991e663302da
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue May 6 13:09:22 2014 +0200
Fix homography test failure
It was caused by assuming that reconstructed homography matrix
should look exactly the same as the matrix used to generate a
test case.
It's not actually valid assumption because different-looking
matrices could correspond to the same exact transform.
In this change we make it so actual "re-projected" vectors
are being checked, not the values in matrix. This makes it
more predictable verification.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D488
commit 0b7d83dc9627447dc7df64d7e3a468aefe9ddc13
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Apr 23 19:14:55 2014 +0600
@@ -338,342 +700,3 @@ Date: Thu Feb 13 23:55:03 2014 +0600
Actually we're to switch to external Ceres rather than
bundled one, would make life much easier actually.
commit b1381540305d69c702eb2f051bd543fb5c1c3e2c
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Feb 6 18:01:58 2014 +0600
Made FAST detector optional
This way it's possible to bundle Libmv sources subset
to applications which doesn't need FAST detector.
Mainly this is done for Blender integration.
commit da4607f010bca0b3532cd4444afbb10bc774fc32
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Jan 28 18:32:39 2014 +0600
Implemented scoped_array and use it in detector
scoped_array is pretty much the same as scoped_ptr
with the only difference that it'll free memory using
delete[] operator.
It also gives some additional API functions to access
array elements.
Currently it only used to manage images denoted as byte
arrays in detector.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D266
commit cd7eb3eff2e69ce5e08570ead83ae6d35ee48857
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Jan 28 17:23:47 2014 +0600
Improvements to weighted tracks behavior
First thing changed by this commit is making it so
Euclidean intersection takes track weight into account
when solving minimization problem. This behaves the
same exact way as it is for BA step.
Second thing is related on how average reprojection error
is being calculated. It didn't take track weight into
account which could confuse users. Now average reprojection
error will give the same result as intersection/BA uses
during minimization which gives much more predictable
behavior.
Reviewers: keir
Reviewed By: keir
CC: sebastian_k
Differential Revision: https://developer.blender.org/D265
commit 6559b36dc14369175bfa0830323146acd3426483
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Jan 28 16:39:14 2014 +0600
Fixes for keyframe selection
Using tracks with constant zero weight used to crash
keyframe selection since it was trying to use missing
parameter blocks for Jacobian evaluation,
Also fixed possible issues with wrong camera block being
marked as variable. This could technically happen when
having zero weighted tracks. Made it so all camera blocks
are marked as variable for now.
commit 557d531b061aa69d114e89cbb325c5175389afec
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Jan 28 16:10:33 2014 +0600
Style cleanup: wrong indentation of wrapped line
commit ca15262cf07a873268173965ee1fb84f9729b744
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Jan 28 15:21:36 2014 +0600
Rework detector API and implement Harris detector
Switch the detector API to a single function which accepts
a float image and detector options. This makes usage of
feature detection more unified across different algorithms.
Options structure is pretty much straightforward and contains
detector to be used and all the detector-specific settings.
Also implemented Harris feature detection algorithm which
is not as fast as FAST one but is expected to detect more
robust feature points.
Reviewers: keir
Reviewed By: keir
Differential Revision: https://developer.blender.org/D258
commit 6458915f64fceba108c5279b7320ca8c76e8a742
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Fri Jan 24 19:14:18 2014 +0600
Add arcanist configuration file
commit 0a69fadadc5aacbd339f839ac5bd12c3571278b1
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Jan 9 15:50:11 2014 +0600
Fix compilation error on NetBSD
- NetBSD doesn't provide sincos(3) in libm, so don't try to use it
- Use posix_memalign on NetBSD
Original patch is by Jeorg Sonnenberger to Blender patch tracker, thanks!
commit b0df3e291e6c85f791658be04334efafc41989f5
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Jan 2 15:12:18 2014 +0600
Fix build configuration warnings
Those warnings were mainly caused by installation
configuration of Ceres. Made some tweaks to make
CMake happy for now.
But for sure bigger cleanup here is needed.
commit b68de6acd20f3ffab92e0cd450198a700cd109ab
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Thu Jan 2 15:04:05 2014 +0600
Code and style cleanup
Mainly fixed some style warnings reported by cpplint.
Also changed how camera (un)distortion happens internally
by replacing number of channels as a template argument
with number as channels passing as function argument.
Makes code easier to follow by eliminating loads checks
how much channels are used and which argument to pass to
the template.
commit b9e467e7c077b58199c4110f6967b7c18d1e7bf7
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 20:34:39 2013 +0600
Update Ceres to the latest upstream
This brings up much easier termination type usage,
which for us means we might use:
ceres::Summary::IsSolutionUsable()
instead of doing manual funky enum values check.
commit 3aeb2367e50b52ca2b9d59d4f0f0b4bbfd6a05e8
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 20:43:24 2013 +0600
Update gtest to latest version 1.7.0
Also reshuffled CMakeLists in order to avoid
conflicts happening between gflags bundled to
Ceres and third_party.
commit 30aaa9cd0b4a4eb0948a17824e7e7622d8ebcb41
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 20:10:06 2013 +0600
Changes for VC2013
Solves compilation error when using msvc2013
Original patch is by Alexandr Kuznetsov to blender.git
commit b204c0d25065a2b149de256929ff37d8f00f45bb
Author: Keir Mierle <mierle@gmail.com>
Date: Tue Dec 31 20:05:58 2013 +0600
Eagerly attempt to refine a track before doing a brute search
Before the refinement phase of tracking, a brute force SAD search
is run across the search area. This works well but is slow;
especially if the guess for the track's location is accurate.
This patch runs a refinement phase before running a brute force
search, hoping that the guessed position (in x2, y2) is close to
the best answer. If it is, then no brute search is done. If it is
not, then a normal brute force search followed by refinement is
done.
In some cases this may produce worse tracks than before; the
regressions will need investigation. The predictive motion model
(to be implemented) will reduce the probability of that happening.
commit 5361513f0328ff94b53125d29129561bb03132e8
Author: Keir Mierle <mierle@gmail.com>
Date: Tue Dec 31 20:04:46 2013 +0600
Fix bug where libmv tracking incorrectly succeeds on failure
Before this patch, if Ceres returned USER_SUCCESS indicating that
Ceres was only changing the tracked quad slightly between
iterations (indicating convergence), no final correlation check
was done. This leads to incorrectly returning that the tracking
was successful, when it actually failed.
commit ba9e63eed09e33a48bbcb081058f45ac16f8738e
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 20:00:46 2013 +0600
Implementation of weighted tracks
Added a weight field to Track structure which means
how much affect this track will have on the final
reconstruction.
Currently it affects on BA step only which in most
cases will work just fine. However, it worth looking
into weight support for intersection/resection.
commit 4600df8b685ca8c4daa22d6c3b0125fd42c3bc67
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 19:30:14 2013 +0600
Code cleanup: move function prototype to header file
commit 0ce5b6efde774b3f042acf9e42c95674548f1c01
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 19:26:48 2013 +0600
Get rid of Allow Fallback option for euclidean resection
It was rather confusing from the user usage point of view
and didn't get so much improvement after new bundle adjuster
was added.
In the future we might want to switch resection to PPnP algorithm,
which could also might be a nice alternative to fallback option.
commit 5d063426f4809000c27f38ed798e4224bbd09a6d
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 19:24:05 2013 +0600
Use explicit declaration of int types sign
Mainly needs to make blender happy with this custom
header which used to run into conflict with other int
types headers.
Wouldn't harm being more explicit here anyway.
commit c5be59dee94f94de369006c544080282cfb245cc
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Tue Dec 31 14:50:00 2013 +0600
Implement refinement of estimated homography/fundamental matrices
It was only possible to perform algebraic estimation, which didn't
give so much accurate results.
Implemented a way to perform algebraic estimation followed with
refinement step using Ceres minimizer.
The code was actually mostly already there since keyframe selection
patch. Made such estimation a generic function in multiview/ and
hanged API for estimation in order to pass all additional options via
an options structure (the same way as it's done fr Ceres).
Most of the options are straight-forward to understand,but some
deserves more description here:
* expected_average_symmetric_distance is used as an early output check
and as soon as average symmetric error goes below this threshold
refining finishes.
This distance is measured in the same units as input points are.
It is arguable whether we need callback for this or not, but seems
Ceres doesn't have some kind of absolute threshold for function value
and function_tolerance behaves different from logic behind expected
symmetric error.
* There' an option to normalize correspondences before estimating the
homography in order to increase estimation stability. See
R. Hartley and A. Zisserman. Multiple View Geometry in Computer
Vision. Cambridge University Press, second edition, 2003.
https://www.cs.ubc.ca/grads/resources/thesis/May09/Dubrofsky_Elan.pdf
commit 1cdad972c4a9005e78891524cbd6d65600ca7e99
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Sep 25 16:12:29 2013 +0600
Code cleanup: Minor function capitalization fix
Original patch by Joseph Mansfield to the Blender repository.
commit 434316d084e8a41fd452f03610d7244d664948dc
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Sep 25 16:07:43 2013 +0600
Code cleanup: spelling correction
Original patch by Joseph Mansfield to the Blender repository.
commit 5cfe8465ac70407c0959c53bcd5206657a1322a2
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Sep 25 16:02:48 2013 +0600
Fix for uninitialized covariance matrix
Lead to unpredictable tracking termination criteria.
commit fd86b77d413489649a989f075b061714ed9a72fc
Author: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Wed Sep 25 16:01:19 2013 +0600
Add Procrustes PNP ("PPnP") resection algorithm to libmv
This adds a new Euclidean resection method, used to create the
initial reconstruction in the motion tracker, to libmv. The method
is based on the Procrustes PNP algorithm (aka "PPnP"). Currently
the algorithm is not connected with the motion tracker, but it
will be eventually since it supports initialization.
Having an initial guess when doing resection is important for
ambiguous cases where potentially the user could offer extra
guidance to the solver, in the form of "this point is in front of
that point".
Original patch by Keir Mierle made to Blender repository.

View File

@@ -6,7 +6,6 @@
import sys
import os
from FindSharedPtr import FindSharedPtr
Import('env')
@@ -24,11 +23,12 @@ if env['WITH_BF_LIBMV']:
defs.append('CERES_TR1_SHARED_PTR')
defs.append('GOOGLE_GLOG_DLL_DECL=')
defs.append('WITH_LIBMV')
defs.append('WITH_LIBMV_GUARDED_ALLOC')
defs.append('LIBMV_NO_FAST_DETECTOR')
src = env.Glob('*.cc')
src = env.Glob('intern/*.cc')
src.remove('intern' + os.sep + 'stub.cc')
src += env.Glob('libmv/autotrack/*.cc')
src += env.Glob('libmv/base/*.cc')
src += env.Glob('libmv/image/*.cc')
src += env.Glob('libmv/multiview/*.cc')
@@ -46,17 +46,24 @@ if env['WITH_BF_LIBMV']:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
incs += ' ./third_party/msinttypes'
src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlog_is_on.cc']
src += ['./third_party/glog/src/windows/port.cc']
else:
src += env.Glob("third_party/glog/src/*.cc")
incs += ' ./third_party/glog/src'
else:
src = env.Glob("libmv-capi_stub.cc")
src = env.Glob("intern/stub.cc")
src = [src for src in src if src.find('_test.cc') == -1]
env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137] )
env.BlenderLib(libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137])
if env['WITH_BF_LIBMV'] or (env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_LOGGING']):
glog_src = []
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
glog_src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlog_is_on.cc']
glog_src += ['./third_party/glog/src/windows/port.cc']
else:
glog_src += env.Glob("third_party/glog/src/*.cc")
env.BlenderLib(libname = 'extern_glog', sources=glog_src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137])
if env['WITH_BF_LIBMV']:
SConscript(['third_party/SConscript'])

View File

@@ -7,7 +7,7 @@ else
exit 1
fi
BRANCH="devel"
BRANCH="master"
repo="git://git.blender.org/libmv.git"
tmp=`mktemp -d`
@@ -128,12 +128,10 @@ set(INC_SYS
set(SRC
libmv-capi.h
libmv-capi_intern.h
)
if(WITH_LIBMV)
add_definitions(
-DWITH_LIBMV
-DWITH_LIBMV_GUARDED_ALLOC
-DGOOGLE_GLOG_DLL_DECL=
-DLIBMV_NO_FAST_DETECTOR=
@@ -159,18 +157,38 @@ if(WITH_LIBMV)
../../intern/guardedalloc
)
set(INC_SYS
list(APPEND INC_SYS
../Eigen3
\${PNG_INCLUDE_DIR}
\${PNG_INCLUDE_DIRS}
\${ZLIB_INCLUDE_DIRS}
)
list(APPEND SRC
libmv-capi.cc
libmv-util.cc
intern/autotrack.cc
intern/camera_intrinsics.cc
intern/detector.cc
intern/frame_accessor.cc
intern/homography.cc
intern/image.cc
intern/logging.cc
intern/reconstruction.cc
intern/track_region.cc
intern/tracks.cc
intern/tracksN.cc
${sources}
${third_sources}
libmv-util.h
intern/autotrack.h
intern/camera_intrinsics.h
intern/detector.h
intern/frame_accessor.h
intern/homography.h
intern/image.h
intern/logging.h
intern/reconstruction.h
intern/track_region.h
intern/tracks.h
intern/tracksN.h
${headers}
${third_headers}
@@ -195,7 +213,7 @@ ${tests}
endif()
else()
list(APPEND SRC
libmv-capi_stub.cc
intern/stub.cc
)
endif()
@@ -206,7 +224,7 @@ if(WITH_LIBMV)
endif()
# make GLog a separate target, so it can be used for gtest as well.
if(WITH_LIBMV OR WITH_GTESTS)
if(WITH_LIBMV OR WITH_GTESTS OR WITH_CYCLES_LOGGING)
# We compile GLog together with GFlag so we don't worry about
# adding extra lib to linker.
set(GLOG_SRC
@@ -287,11 +305,11 @@ if env['WITH_BF_LIBMV']:
defs.append('CERES_TR1_SHARED_PTR')
defs.append('GOOGLE_GLOG_DLL_DECL=')
defs.append('WITH_LIBMV')
defs.append('WITH_LIBMV_GUARDED_ALLOC')
defs.append('LIBMV_NO_FAST_DETECTOR')
src = env.Glob('*.cc')
src = env.Glob('intern/*.cc')
src.remove('intern' + os.sep + 'stub.cc')
$src
incs += ' ../Eigen3 third_party/gflags third_party/glog/src third_party/ceres/include third_party/ceres/config ../../intern/guardedalloc'
@@ -303,17 +321,24 @@ $src
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
incs += ' ./third_party/msinttypes'
${win_src}
src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlog_is_on.cc']
src += ['./third_party/glog/src/windows/port.cc']
else:
src += env.Glob("third_party/glog/src/*.cc")
incs += ' ./third_party/glog/src'
else:
src = env.Glob("libmv-capi_stub.cc")
src = env.Glob("intern/stub.cc")
src = [src for src in src if src.find('_test.cc') == -1]
env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137] )
env.BlenderLib(libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137])
if env['WITH_BF_LIBMV'] or (env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_LOGGING']):
glog_src = []
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
glog_src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlog_is_on.cc']
glog_src += ['./third_party/glog/src/windows/port.cc']
else:
glog_src += env.Glob("third_party/glog/src/*.cc")
env.BlenderLib(libname = 'extern_glog', sources=glog_src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137])
if env['WITH_BF_LIBMV']:
SConscript(['third_party/SConscript'])

View File

@@ -1,3 +1,18 @@
libmv/autotrack/autotrack.cc
libmv/autotrack/autotrack.h
libmv/autotrack/callbacks.h
libmv/autotrack/frame_accessor.h
libmv/autotrack/marker.h
libmv/autotrack/model.h
libmv/autotrack/predict_tracks.cc
libmv/autotrack/predict_tracks.h
libmv/autotrack/predict_tracks_test.cc
libmv/autotrack/quad.h
libmv/autotrack/reconstruction.h
libmv/autotrack/region.h
libmv/autotrack/tracks.cc
libmv/autotrack/tracks.h
libmv/autotrack/tracks_test.cc
libmv/base/aligned_malloc.cc
libmv/base/aligned_malloc.h
libmv/base/id_generator.h
@@ -104,6 +119,7 @@ libmv/tracking/brute_region_tracker.h
libmv/tracking/brute_region_tracker_test.cc
libmv/tracking/hybrid_region_tracker.cc
libmv/tracking/hybrid_region_tracker.h
libmv/tracking/kalman_filter.h
libmv/tracking/klt_region_tracker.cc
libmv/tracking/klt_region_tracker.h
libmv/tracking/klt_region_tracker_test.cc

99
extern/libmv/intern/autotrack.cc vendored Normal file
View File

@@ -0,0 +1,99 @@
/*
* ***** 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) 2014 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/autotrack.h"
#include "intern/tracksN.h"
#include "intern/utildefines.h"
#include "libmv/autotrack/autotrack.h"
using mv::AutoTrack;
using mv::FrameAccessor;
using mv::Marker;
using libmv::TrackRegionOptions;
using libmv::TrackRegionResult;
libmv_AutoTrack* libmv_autoTrackNew(libmv_FrameAccessor *frame_accessor) {
return (libmv_AutoTrack*) LIBMV_OBJECT_NEW(AutoTrack,
(FrameAccessor*) frame_accessor);
}
void libmv_autoTrackDestroy(libmv_AutoTrack* libmv_autotrack) {
LIBMV_OBJECT_DELETE(libmv_autotrack, AutoTrack);
}
void libmv_autoTrackSetOptions(libmv_AutoTrack* libmv_autotrack,
const libmv_AutoTrackOptions* options) {
AutoTrack *autotrack = ((AutoTrack*) libmv_autotrack);
libmv_configureTrackRegionOptions(options->track_region,
&autotrack->options.track_region);
autotrack->options.search_region.min(0) = options->search_region.min[0];
autotrack->options.search_region.min(1) = options->search_region.min[1];
autotrack->options.search_region.max(0) = options->search_region.max[0];
autotrack->options.search_region.max(1) = options->search_region.max[1];
}
int libmv_autoTrackMarker(libmv_AutoTrack* libmv_autotrack,
const libmv_TrackRegionOptions* libmv_options,
libmv_Marker *libmv_tracked_marker,
libmv_TrackRegionResult* libmv_result) {
Marker tracked_marker;
TrackRegionOptions options;
TrackRegionResult result;
libmv_apiMarkerToMarker(*libmv_tracked_marker, &tracked_marker);
libmv_configureTrackRegionOptions(*libmv_options,
&options);
(((AutoTrack*) libmv_autotrack)->TrackMarker(&tracked_marker,
&result,
&options));
libmv_markerToApiMarker(tracked_marker, libmv_tracked_marker);
libmv_regionTrackergetResult(result, libmv_result);
return result.is_usable();
}
void libmv_autoTrackAddMarker(libmv_AutoTrack* libmv_autotrack,
const libmv_Marker* libmv_marker) {
Marker marker;
libmv_apiMarkerToMarker(*libmv_marker, &marker);
((AutoTrack*) libmv_autotrack)->AddMarker(marker);
}
int libmv_autoTrackGetMarker(libmv_AutoTrack* libmv_autotrack,
int clip,
int frame,
int track,
libmv_Marker *libmv_marker) {
Marker marker;
int ok = ((AutoTrack*) libmv_autotrack)->GetMarker(clip,
frame,
track,
&marker);
if (ok) {
libmv_markerToApiMarker(marker, libmv_marker);
}
return ok;
}

71
extern/libmv/intern/autotrack.h vendored Normal file
View File

@@ -0,0 +1,71 @@
/*
* ***** 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) 2014 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_AUTOTRACK_H_
#define LIBMV_C_API_AUTOTRACK_H_
#include "intern/frame_accessor.h"
#include "intern/tracksN.h"
#include "intern/track_region.h"
#include "intern/region.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_AutoTrack libmv_AutoTrack;
typedef struct libmv_AutoTrackOptions {
libmv_TrackRegionOptions track_region;
libmv_Region search_region;
} libmv_AutoTrackOptions;
libmv_AutoTrack* libmv_autoTrackNew(libmv_FrameAccessor *frame_accessor);
void libmv_autoTrackDestroy(libmv_AutoTrack* libmv_autotrack);
void libmv_autoTrackSetOptions(libmv_AutoTrack* libmv_autotrack,
const libmv_AutoTrackOptions* options);
int libmv_autoTrackMarker(libmv_AutoTrack* libmv_autotrack,
const libmv_TrackRegionOptions* libmv_options,
libmv_Marker *libmv_tracker_marker,
libmv_TrackRegionResult* libmv_result);
void libmv_autoTrackAddMarker(libmv_AutoTrack* libmv_autotrack,
const libmv_Marker* libmv_marker);
int libmv_autoTrackGetMarker(libmv_AutoTrack* libmv_autotrack,
int clip,
int frame,
int track,
libmv_Marker *libmv_marker);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_TRACKS_H_

355
extern/libmv/intern/camera_intrinsics.cc vendored Normal file
View File

@@ -0,0 +1,355 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/camera_intrinsics.h"
#include "intern/utildefines.h"
#include "libmv/simple_pipeline/camera_intrinsics.h"
using libmv::CameraIntrinsics;
using libmv::DivisionCameraIntrinsics;
using libmv::PolynomialCameraIntrinsics;
libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options) {
CameraIntrinsics *camera_intrinsics =
libmv_cameraIntrinsicsCreateFromOptions(libmv_camera_intrinsics_options);
return (libmv_CameraIntrinsics *) camera_intrinsics;
}
libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(
const libmv_CameraIntrinsics* libmv_intrinsics) {
const CameraIntrinsics *orig_intrinsics =
(const CameraIntrinsics *) libmv_intrinsics;
CameraIntrinsics *new_intrinsics = NULL;
switch (orig_intrinsics->GetDistortionModelType()) {
case libmv::DISTORTION_MODEL_POLYNOMIAL:
{
const PolynomialCameraIntrinsics *polynomial_intrinsics =
static_cast<const PolynomialCameraIntrinsics*>(orig_intrinsics);
new_intrinsics = LIBMV_OBJECT_NEW(PolynomialCameraIntrinsics,
*polynomial_intrinsics);
break;
}
case libmv::DISTORTION_MODEL_DIVISION:
{
const DivisionCameraIntrinsics *division_intrinsics =
static_cast<const DivisionCameraIntrinsics*>(orig_intrinsics);
new_intrinsics = LIBMV_OBJECT_NEW(DivisionCameraIntrinsics,
*division_intrinsics);
break;
}
default:
assert(!"Unknown distortion model");
}
return (libmv_CameraIntrinsics *) new_intrinsics;
}
void libmv_cameraIntrinsicsDestroy(libmv_CameraIntrinsics* libmv_intrinsics) {
LIBMV_OBJECT_DELETE(libmv_intrinsics, CameraIntrinsics);
}
void libmv_cameraIntrinsicsUpdate(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
libmv_CameraIntrinsics* libmv_intrinsics) {
CameraIntrinsics *camera_intrinsics = (CameraIntrinsics *) libmv_intrinsics;
double focal_length = libmv_camera_intrinsics_options->focal_length;
double principal_x = libmv_camera_intrinsics_options->principal_point_x;
double principal_y = libmv_camera_intrinsics_options->principal_point_y;
int image_width = libmv_camera_intrinsics_options->image_width;
int image_height = libmv_camera_intrinsics_options->image_height;
/* Try avoid unnecessary updates, so pre-computed distortion grids
* are not freed.
*/
if (camera_intrinsics->focal_length() != focal_length) {
camera_intrinsics->SetFocalLength(focal_length, focal_length);
}
if (camera_intrinsics->principal_point_x() != principal_x ||
camera_intrinsics->principal_point_y() != principal_y) {
camera_intrinsics->SetPrincipalPoint(principal_x, principal_y);
}
if (camera_intrinsics->image_width() != image_width ||
camera_intrinsics->image_height() != image_height) {
camera_intrinsics->SetImageSize(image_width, image_height);
}
switch (libmv_camera_intrinsics_options->distortion_model) {
case LIBMV_DISTORTION_MODEL_POLYNOMIAL:
{
assert(camera_intrinsics->GetDistortionModelType() ==
libmv::DISTORTION_MODEL_POLYNOMIAL);
PolynomialCameraIntrinsics *polynomial_intrinsics =
(PolynomialCameraIntrinsics *) camera_intrinsics;
double k1 = libmv_camera_intrinsics_options->polynomial_k1;
double k2 = libmv_camera_intrinsics_options->polynomial_k2;
double k3 = libmv_camera_intrinsics_options->polynomial_k3;
if (polynomial_intrinsics->k1() != k1 ||
polynomial_intrinsics->k2() != k2 ||
polynomial_intrinsics->k3() != k3) {
polynomial_intrinsics->SetRadialDistortion(k1, k2, k3);
}
break;
}
case LIBMV_DISTORTION_MODEL_DIVISION:
{
assert(camera_intrinsics->GetDistortionModelType() ==
libmv::DISTORTION_MODEL_DIVISION);
DivisionCameraIntrinsics *division_intrinsics =
(DivisionCameraIntrinsics *) camera_intrinsics;
double k1 = libmv_camera_intrinsics_options->division_k1;
double k2 = libmv_camera_intrinsics_options->division_k2;
if (division_intrinsics->k1() != k1 ||
division_intrinsics->k2() != k2) {
division_intrinsics->SetDistortion(k1, k2);
}
break;
}
default:
assert(!"Unknown distortion model");
}
}
void libmv_cameraIntrinsicsSetThreads(libmv_CameraIntrinsics* libmv_intrinsics,
int threads) {
CameraIntrinsics *camera_intrinsics = (CameraIntrinsics *) libmv_intrinsics;
camera_intrinsics->SetThreads(threads);
}
void libmv_cameraIntrinsicsExtractOptions(
const libmv_CameraIntrinsics* libmv_intrinsics,
libmv_CameraIntrinsicsOptions* camera_intrinsics_options) {
const CameraIntrinsics *camera_intrinsics =
(const CameraIntrinsics *) libmv_intrinsics;
// Fill in options which are common for all distortion models.
camera_intrinsics_options->focal_length = camera_intrinsics->focal_length();
camera_intrinsics_options->principal_point_x =
camera_intrinsics->principal_point_x();
camera_intrinsics_options->principal_point_y =
camera_intrinsics->principal_point_y();
camera_intrinsics_options->image_width = camera_intrinsics->image_width();
camera_intrinsics_options->image_height = camera_intrinsics->image_height();
switch (camera_intrinsics->GetDistortionModelType()) {
case libmv::DISTORTION_MODEL_POLYNOMIAL:
{
const PolynomialCameraIntrinsics *polynomial_intrinsics =
static_cast<const PolynomialCameraIntrinsics *>(camera_intrinsics);
camera_intrinsics_options->distortion_model =
LIBMV_DISTORTION_MODEL_POLYNOMIAL;
camera_intrinsics_options->polynomial_k1 = polynomial_intrinsics->k1();
camera_intrinsics_options->polynomial_k2 = polynomial_intrinsics->k2();
camera_intrinsics_options->polynomial_k3 = polynomial_intrinsics->k3();
camera_intrinsics_options->polynomial_p1 = polynomial_intrinsics->p1();
camera_intrinsics_options->polynomial_p1 = polynomial_intrinsics->p2();
break;
}
case libmv::DISTORTION_MODEL_DIVISION:
{
const DivisionCameraIntrinsics *division_intrinsics =
static_cast<const DivisionCameraIntrinsics *>(camera_intrinsics);
camera_intrinsics_options->distortion_model =
LIBMV_DISTORTION_MODEL_DIVISION;
camera_intrinsics_options->division_k1 = division_intrinsics->k1();
camera_intrinsics_options->division_k2 = division_intrinsics->k2();
break;
}
default:
assert(!"Uknown distortion model");
}
}
void libmv_cameraIntrinsicsUndistortByte(
const libmv_CameraIntrinsics* libmv_intrinsics,
const unsigned char *source_image,
int width,
int height,
float overscan,
int channels,
unsigned char* destination_image) {
CameraIntrinsics *camera_intrinsics = (CameraIntrinsics *) libmv_intrinsics;
camera_intrinsics->UndistortBuffer(source_image,
width, height,
overscan,
channels,
destination_image);
}
void libmv_cameraIntrinsicsUndistortFloat(
const libmv_CameraIntrinsics* libmv_intrinsics,
const float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image) {
CameraIntrinsics *intrinsics = (CameraIntrinsics *) libmv_intrinsics;
intrinsics->UndistortBuffer(source_image,
width, height,
overscan,
channels,
destination_image);
}
void libmv_cameraIntrinsicsDistortByte(
const struct libmv_CameraIntrinsics* libmv_intrinsics,
const unsigned char *source_image,
int width,
int height,
float overscan,
int channels,
unsigned char *destination_image) {
CameraIntrinsics *intrinsics = (CameraIntrinsics *) libmv_intrinsics;
intrinsics->DistortBuffer(source_image,
width, height,
overscan,
channels,
destination_image);
}
void libmv_cameraIntrinsicsDistortFloat(
const libmv_CameraIntrinsics* libmv_intrinsics,
float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image) {
CameraIntrinsics *intrinsics = (CameraIntrinsics *) libmv_intrinsics;
intrinsics->DistortBuffer(source_image,
width, height,
overscan,
channels,
destination_image);
}
void libmv_cameraIntrinsicsApply(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1) {
/* Do a lens distortion if focal length is non-zero only. */
if (libmv_camera_intrinsics_options->focal_length) {
CameraIntrinsics* camera_intrinsics =
libmv_cameraIntrinsicsCreateFromOptions(libmv_camera_intrinsics_options);
camera_intrinsics->ApplyIntrinsics(x, y, x1, y1);
LIBMV_OBJECT_DELETE(camera_intrinsics, CameraIntrinsics);
}
}
void libmv_cameraIntrinsicsInvert(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1) {
/* Do a lens un-distortion if focal length is non-zero only/ */
if (libmv_camera_intrinsics_options->focal_length) {
CameraIntrinsics *camera_intrinsics =
libmv_cameraIntrinsicsCreateFromOptions(libmv_camera_intrinsics_options);
camera_intrinsics->InvertIntrinsics(x, y, x1, y1);
LIBMV_OBJECT_DELETE(camera_intrinsics, CameraIntrinsics);
}
}
static void libmv_cameraIntrinsicsFillFromOptions(
const libmv_CameraIntrinsicsOptions* camera_intrinsics_options,
CameraIntrinsics* camera_intrinsics) {
camera_intrinsics->SetFocalLength(camera_intrinsics_options->focal_length,
camera_intrinsics_options->focal_length);
camera_intrinsics->SetPrincipalPoint(
camera_intrinsics_options->principal_point_x,
camera_intrinsics_options->principal_point_y);
camera_intrinsics->SetImageSize(camera_intrinsics_options->image_width,
camera_intrinsics_options->image_height);
switch (camera_intrinsics_options->distortion_model) {
case LIBMV_DISTORTION_MODEL_POLYNOMIAL:
{
PolynomialCameraIntrinsics *polynomial_intrinsics =
static_cast<PolynomialCameraIntrinsics*>(camera_intrinsics);
polynomial_intrinsics->SetRadialDistortion(
camera_intrinsics_options->polynomial_k1,
camera_intrinsics_options->polynomial_k2,
camera_intrinsics_options->polynomial_k3);
break;
}
case LIBMV_DISTORTION_MODEL_DIVISION:
{
DivisionCameraIntrinsics *division_intrinsics =
static_cast<DivisionCameraIntrinsics*>(camera_intrinsics);
division_intrinsics->SetDistortion(
camera_intrinsics_options->division_k1,
camera_intrinsics_options->division_k2);
break;
}
default:
assert(!"Unknown distortion model");
}
}
CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
const libmv_CameraIntrinsicsOptions* camera_intrinsics_options) {
CameraIntrinsics *camera_intrinsics = NULL;
switch (camera_intrinsics_options->distortion_model) {
case LIBMV_DISTORTION_MODEL_POLYNOMIAL:
camera_intrinsics = LIBMV_OBJECT_NEW(PolynomialCameraIntrinsics);
break;
case LIBMV_DISTORTION_MODEL_DIVISION:
camera_intrinsics = LIBMV_OBJECT_NEW(DivisionCameraIntrinsics);
break;
default:
assert(!"Unknown distortion model");
}
libmv_cameraIntrinsicsFillFromOptions(camera_intrinsics_options,
camera_intrinsics);
return camera_intrinsics;
}

138
extern/libmv/intern/camera_intrinsics.h vendored Normal file
View File

@@ -0,0 +1,138 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_CAMERA_INTRINSICS_H_
#define LIBMV_C_API_CAMERA_INTRINSICS_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_CameraIntrinsics libmv_CameraIntrinsics;
enum {
LIBMV_DISTORTION_MODEL_POLYNOMIAL = 0,
LIBMV_DISTORTION_MODEL_DIVISION = 1,
};
typedef struct libmv_CameraIntrinsicsOptions {
// Common settings of all distortion models.
int distortion_model;
int image_width, image_height;
double focal_length;
double principal_point_x, principal_point_y;
// Radial distortion model.
double polynomial_k1, polynomial_k2, polynomial_k3;
double polynomial_p1, polynomial_p2;
// Division distortion model.
double division_k1, division_k2;
} libmv_CameraIntrinsicsOptions;
libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options);
libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(
const libmv_CameraIntrinsics* libmv_intrinsics);
void libmv_cameraIntrinsicsDestroy(libmv_CameraIntrinsics* libmv_intrinsics);
void libmv_cameraIntrinsicsUpdate(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
libmv_CameraIntrinsics* libmv_intrinsics);
void libmv_cameraIntrinsicsSetThreads(libmv_CameraIntrinsics* libmv_intrinsics,
int threads);
void libmv_cameraIntrinsicsExtractOptions(
const libmv_CameraIntrinsics* libmv_intrinsics,
libmv_CameraIntrinsicsOptions* camera_intrinsics_options);
void libmv_cameraIntrinsicsUndistortByte(
const libmv_CameraIntrinsics* libmv_intrinsics,
const unsigned char *source_image,
int width,
int height,
float overscan,
int channels,
unsigned char* destination_image);
void libmv_cameraIntrinsicsUndistortFloat(
const libmv_CameraIntrinsics* libmv_intrinsics,
const float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image);
void libmv_cameraIntrinsicsDistortByte(
const struct libmv_CameraIntrinsics* libmv_intrinsics,
const unsigned char *source_image,
int width,
int height,
float overscan,
int channels,
unsigned char *destination_image);
void libmv_cameraIntrinsicsDistortFloat(
const libmv_CameraIntrinsics* libmv_intrinsics,
float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image);
void libmv_cameraIntrinsicsApply(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1);
void libmv_cameraIntrinsicsInvert(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
namespace libmv {
class CameraIntrinsics;
}
libmv::CameraIntrinsics* libmv_cameraIntrinsicsCreateFromOptions(
const libmv_CameraIntrinsicsOptions* camera_intrinsics_options);
#endif
#endif // LIBMV_C_API_CAMERA_INTRINSICS_H_

148
extern/libmv/intern/detector.cc vendored Normal file
View File

@@ -0,0 +1,148 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/detector.h"
#include "intern/image.h"
#include "intern/utildefines.h"
#include "libmv/simple_pipeline/detect.h"
using libmv::Detect;
using libmv::DetectOptions;
using libmv::Feature;
using libmv::FloatImage;
struct libmv_Features {
int count;
Feature* features;
};
namespace {
libmv_Features *libmv_featuresFromVector(
const libmv::vector<Feature>& features) {
libmv_Features* libmv_features = LIBMV_STRUCT_NEW(libmv_Features, 1);
int count = features.size();
if (count) {
libmv_features->features = LIBMV_STRUCT_NEW(Feature, count);
for (int i = 0; i < count; i++) {
libmv_features->features[i] = features.at(i);
}
} else {
libmv_features->features = NULL;
}
libmv_features->count = count;
return libmv_features;
}
void libmv_convertDetectorOptions(libmv_DetectOptions *options,
DetectOptions *detector_options) {
switch (options->detector) {
#define LIBMV_CONVERT(the_detector) \
case LIBMV_DETECTOR_ ## the_detector: \
detector_options->type = DetectOptions::the_detector; \
break;
LIBMV_CONVERT(FAST)
LIBMV_CONVERT(MORAVEC)
LIBMV_CONVERT(HARRIS)
#undef LIBMV_CONVERT
}
detector_options->margin = options->margin;
detector_options->min_distance = options->min_distance;
detector_options->fast_min_trackness = options->fast_min_trackness;
detector_options->moravec_max_count = options->moravec_max_count;
detector_options->moravec_pattern = options->moravec_pattern;
detector_options->harris_threshold = options->harris_threshold;
}
} // namespace
libmv_Features *libmv_detectFeaturesByte(const unsigned char* image_buffer,
int width,
int height,
int channels,
libmv_DetectOptions* options) {
// Prepare the image.
FloatImage image;
libmv_byteBufferToFloatImage(image_buffer, width, height, channels, &image);
// Configure detector.
DetectOptions detector_options;
libmv_convertDetectorOptions(options, &detector_options);
// Run the detector.
libmv::vector<Feature> detected_features;
Detect(image, detector_options, &detected_features);
// Convert result to C-API.
libmv_Features* result = libmv_featuresFromVector(detected_features);
return result;
}
libmv_Features* libmv_detectFeaturesFloat(const float* image_buffer,
int width,
int height,
int channels,
libmv_DetectOptions* options) {
// Prepare the image.
FloatImage image;
libmv_floatBufferToFloatImage(image_buffer, width, height, channels, &image);
// Configure detector.
DetectOptions detector_options;
libmv_convertDetectorOptions(options, &detector_options);
// Run the detector.
libmv::vector<Feature> detected_features;
Detect(image, detector_options, &detected_features);
// Convert result to C-API.
libmv_Features* result = libmv_featuresFromVector(detected_features);
return result;
}
void libmv_featuresDestroy(libmv_Features* libmv_features) {
if (libmv_features->features) {
LIBMV_STRUCT_DELETE(libmv_features->features);
}
LIBMV_STRUCT_DELETE(libmv_features);
}
int libmv_countFeatures(const libmv_Features* libmv_features) {
return libmv_features->count;
}
void libmv_getFeature(const libmv_Features* libmv_features,
int number,
double* x,
double* y,
double* score,
double* size) {
Feature &feature = libmv_features->features[number];
*x = feature.x;
*y = feature.y;
*score = feature.score;
*size = feature.size;
}

77
extern/libmv/intern/detector.h vendored Normal file
View File

@@ -0,0 +1,77 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_DETECTOR_H_
#define LIBMV_C_API_DETECTOR_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_Features libmv_Features;
enum {
LIBMV_DETECTOR_FAST,
LIBMV_DETECTOR_MORAVEC,
LIBMV_DETECTOR_HARRIS,
};
typedef struct libmv_DetectOptions {
int detector;
int margin;
int min_distance;
int fast_min_trackness;
int moravec_max_count;
unsigned char *moravec_pattern;
double harris_threshold;
} libmv_DetectOptions;
libmv_Features* libmv_detectFeaturesByte(const unsigned char* image_buffer,
int width,
int height,
int channels,
libmv_DetectOptions* options);
libmv_Features* libmv_detectFeaturesFloat(const float* image_buffer,
int width,
int height,
int channels,
libmv_DetectOptions* options);
void libmv_featuresDestroy(libmv_Features* libmv_features);
int libmv_countFeatures(const libmv_Features* libmv_features);
void libmv_getFeature(const libmv_Features* libmv_features,
int number,
double* x,
double* y,
double* score,
double* size);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_DETECTOR_H_

164
extern/libmv/intern/frame_accessor.cc vendored Normal file
View File

@@ -0,0 +1,164 @@
/*
* ***** 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) 2014 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/frame_accessor.h"
#include "intern/image.h"
#include "intern/utildefines.h"
#include "libmv/autotrack/frame_accessor.h"
#include "libmv/autotrack/region.h"
#include "libmv/image/image.h"
namespace {
using libmv::FloatImage;
using mv::FrameAccessor;
using mv::Region;
struct LibmvFrameAccessor : public FrameAccessor {
LibmvFrameAccessor(libmv_FrameAccessorUserData* user_data,
libmv_GetImageCallback get_image_callback,
libmv_ReleaseImageCallback release_image_callback)
: user_data_(user_data),
get_image_callback_(get_image_callback),
release_image_callback_(release_image_callback) { }
libmv_InputMode get_libmv_input_mode(InputMode input_mode) {
switch (input_mode) {
#define CHECK_INPUT_MODE(mode) \
case mode: \
return LIBMV_IMAGE_MODE_ ## mode;
CHECK_INPUT_MODE(MONO)
CHECK_INPUT_MODE(RGBA)
#undef CHECK_INPUT_MODE
}
assert(!"unknown input mode passed from Libmv.");
// TODO(sergey): Proper error handling here in the future.
return LIBMV_IMAGE_MODE_MONO;
}
void get_libmv_region(const Region& region,
libmv_Region* libmv_region) {
libmv_region->min[0] = region.min(0);
libmv_region->min[1] = region.min(1);
libmv_region->max[0] = region.max(0);
libmv_region->max[1] = region.max(1);
}
Key GetImage(int clip,
int frame,
InputMode input_mode,
int downscale,
const Region* region,
const Transform* transform,
FloatImage* destination) {
float *float_buffer;
int width, height, channels;
libmv_Region libmv_region;
if (region) {
get_libmv_region(*region, &libmv_region);
}
Key cache_key = get_image_callback_(user_data_,
clip,
frame,
get_libmv_input_mode(input_mode),
downscale,
region != NULL ? &libmv_region : NULL,
(libmv_FrameTransform*) transform,
&float_buffer,
&width,
&height,
&channels);
// TODO(sergey): Dumb code for until we can set data directly.
FloatImage temp_image(float_buffer,
height,
width,
channels);
destination->CopyFrom(temp_image);
return cache_key;
}
void ReleaseImage(Key cache_key) {
release_image_callback_(cache_key);
}
bool GetClipDimensions(int clip, int *width, int *height) {
return false;
}
int NumClips() {
return 1;
}
int NumFrames(int clip) {
return 0;
}
libmv_FrameAccessorUserData* user_data_;
libmv_GetImageCallback get_image_callback_;
libmv_ReleaseImageCallback release_image_callback_;
};
} // namespace
libmv_FrameAccessor* libmv_FrameAccessorNew(
libmv_FrameAccessorUserData* user_data,
libmv_GetImageCallback get_image_callback,
libmv_ReleaseImageCallback release_image_callback) {
return (libmv_FrameAccessor*) LIBMV_OBJECT_NEW(LibmvFrameAccessor,
user_data,
get_image_callback,
release_image_callback);
}
void libmv_FrameAccessorDestroy(libmv_FrameAccessor* frame_accessor) {
LIBMV_OBJECT_DELETE(frame_accessor, LibmvFrameAccessor);
}
int64_t libmv_frameAccessorgetTransformKey(const libmv_FrameTransform *transform) {
return ((FrameAccessor::Transform*) transform)->key();
}
void libmv_frameAccessorgetTransformRun(const libmv_FrameTransform *transform,
const libmv_FloatImage *input_image,
libmv_FloatImage *output_image) {
const FloatImage input(input_image->buffer,
input_image->height,
input_image->width,
input_image->channels);
FloatImage output;
((FrameAccessor::Transform*) transform)->run(input,
&output);
int num_pixels = output.Width() *output.Height() * output.Depth();
output_image->buffer = new float[num_pixels];
memcpy(output_image->buffer, output.Data(), num_pixels * sizeof(float));
output_image->width = output.Width();
output_image->height = output.Height();
output_image->channels = output.Depth();
}

79
extern/libmv/intern/frame_accessor.h vendored Normal file
View File

@@ -0,0 +1,79 @@
/*
* ***** 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) 2014 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_FRAME_ACCESSOR_H_
#define LIBMV_C_API_FRAME_ACCESSOR_H_
#include <stdint.h>
#include "intern/image.h"
#include "intern/region.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_FrameAccessor libmv_FrameAccessor;
typedef struct libmv_FrameTransform libmv_FrameTransform;
typedef struct libmv_FrameAccessorUserData libmv_FrameAccessorUserData;
typedef void *libmv_CacheKey;
typedef enum {
LIBMV_IMAGE_MODE_MONO,
LIBMV_IMAGE_MODE_RGBA,
} libmv_InputMode;
typedef libmv_CacheKey (*libmv_GetImageCallback) (
libmv_FrameAccessorUserData* user_data,
int clip,
int frame,
libmv_InputMode input_mode,
int downscale,
const libmv_Region* region,
const libmv_FrameTransform* transform,
float** destination,
int* width,
int* height,
int* channels);
typedef void (*libmv_ReleaseImageCallback) (libmv_CacheKey cache_key);
libmv_FrameAccessor* libmv_FrameAccessorNew(
libmv_FrameAccessorUserData* user_data,
libmv_GetImageCallback get_image_callback,
libmv_ReleaseImageCallback release_image_callback);
void libmv_FrameAccessorDestroy(libmv_FrameAccessor* frame_accessor);
int64_t libmv_frameAccessorgetTransformKey(const libmv_FrameTransform *transform);
void libmv_frameAccessorgetTransformRun(const libmv_FrameTransform *transform,
const libmv_FloatImage *input_image,
libmv_FloatImage *output_image);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_FRAME_ACCESSOR_H_

59
extern/libmv/intern/homography.cc vendored Normal file
View File

@@ -0,0 +1,59 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/homography.h"
#include "intern/utildefines.h"
#include "libmv/logging/logging.h"
#include "libmv/multiview/homography.h"
void libmv_homography2DFromCorrespondencesEuc(/* const */ double (*x1)[2],
/* const */ double (*x2)[2],
int num_points,
double H[3][3]) {
libmv::Mat x1_mat, x2_mat;
libmv::Mat3 H_mat;
x1_mat.resize(2, num_points);
x2_mat.resize(2, num_points);
for (int i = 0; i < num_points; i++) {
x1_mat.col(i) = libmv::Vec2(x1[i][0], x1[i][1]);
x2_mat.col(i) = libmv::Vec2(x2[i][0], x2[i][1]);
}
LG << "x1: " << x1_mat;
LG << "x2: " << x2_mat;
libmv::EstimateHomographyOptions options;
libmv::EstimateHomography2DFromCorrespondences(x1_mat,
x2_mat,
options,
&H_mat);
LG << "H: " << H_mat;
memcpy(H, H_mat.data(), 9 * sizeof(double));
}

43
extern/libmv/intern/homography.h vendored Normal file
View File

@@ -0,0 +1,43 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_HOMOGRAPHY_H_
#define LIBMV_C_API_HOMOGRAPHY_H_
#ifdef __cplusplus
extern "C" {
#endif
void libmv_homography2DFromCorrespondencesEuc(/* const */ double (*x1)[2],
/* const */ double (*x2)[2],
int num_points,
double H[3][3]);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_HOMOGRAPHY_H_

272
extern/libmv/intern/image.cc vendored Normal file
View File

@@ -0,0 +1,272 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/image.h"
#include "intern/utildefines.h"
#include "libmv/tracking/track_region.h"
#include <cassert>
#include <png.h>
using libmv::FloatImage;
using libmv::SamplePlanarPatch;
void libmv_floatImageDestroy(libmv_FloatImage *image) {
delete [] image->buffer;
}
/* Image <-> buffers conversion */
void libmv_byteBufferToFloatImage(const unsigned char* buffer,
int width,
int height,
int channels,
FloatImage* image) {
image->Resize(height, width, channels);
for (int y = 0, a = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
for (int k = 0; k < channels; k++) {
(*image)(y, x, k) = (float)buffer[a++] / 255.0f;
}
}
}
}
void libmv_floatBufferToFloatImage(const float* buffer,
int width,
int height,
int channels,
FloatImage* image) {
image->Resize(height, width, channels);
for (int y = 0, a = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
for (int k = 0; k < channels; k++) {
(*image)(y, x, k) = buffer[a++];
}
}
}
}
void libmv_floatImageToFloatBuffer(const FloatImage &image,
float* buffer) {
for (int y = 0, a = 0; y < image.Height(); y++) {
for (int x = 0; x < image.Width(); x++) {
for (int k = 0; k < image.Depth(); k++) {
buffer[a++] = image(y, x, k);
}
}
}
}
void libmv_floatImageToByteBuffer(const libmv::FloatImage &image,
unsigned char* buffer) {
for (int y = 0, a= 0; y < image.Height(); y++) {
for (int x = 0; x < image.Width(); x++) {
for (int k = 0; k < image.Depth(); k++) {
buffer[a++] = image(y, x, k) * 255.0f;
}
}
}
}
static bool savePNGImage(png_bytep* row_pointers,
int width,
int height,
int depth,
int color_type,
const char* file_name) {
png_infop info_ptr;
png_structp png_ptr;
FILE *fp = fopen(file_name, "wb");
if (fp == NULL) {
return false;
}
/* Initialize stuff */
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
info_ptr = png_create_info_struct(png_ptr);
if (setjmp(png_jmpbuf(png_ptr))) {
fclose(fp);
return false;
}
png_init_io(png_ptr, fp);
/* Write PNG header. */
if (setjmp(png_jmpbuf(png_ptr))) {
fclose(fp);
return false;
}
png_set_IHDR(png_ptr,
info_ptr,
width,
height,
depth,
color_type,
PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE,
PNG_FILTER_TYPE_BASE);
png_write_info(png_ptr, info_ptr);
/* Write bytes/ */
if (setjmp(png_jmpbuf(png_ptr))) {
fclose(fp);
return false;
}
png_write_image(png_ptr, row_pointers);
/* End write/ */
if (setjmp(png_jmpbuf(png_ptr))) {
fclose(fp);
return false;
}
png_write_end(png_ptr, NULL);
fclose(fp);
return true;
}
bool libmv_saveImage(const FloatImage& image,
const char* prefix,
int x0,
int y0) {
int x, y;
png_bytep *row_pointers;
assert(image.Depth() == 1);
row_pointers = new png_bytep[image.Height()];
for (y = 0; y < image.Height(); y++) {
row_pointers[y] = new png_byte[4 * image.Width()];
for (x = 0; x < image.Width(); x++) {
if (x0 == x && image.Height() - y0 - 1 == y) {
row_pointers[y][x * 4 + 0] = 255;
row_pointers[y][x * 4 + 1] = 0;
row_pointers[y][x * 4 + 2] = 0;
row_pointers[y][x * 4 + 3] = 255;
} else {
float pixel = image(image.Height() - y - 1, x, 0);
row_pointers[y][x * 4 + 0] = pixel * 255;
row_pointers[y][x * 4 + 1] = pixel * 255;
row_pointers[y][x * 4 + 2] = pixel * 255;
row_pointers[y][x * 4 + 3] = 255;
}
}
}
static int image_counter = 0;
char file_name[128];
snprintf(file_name, sizeof(file_name),
"%s_%02d.png",
prefix, ++image_counter);
bool result = savePNGImage(row_pointers,
image.Width(),
image.Height(),
8,
PNG_COLOR_TYPE_RGBA,
file_name);
for (y = 0; y < image.Height(); y++) {
delete [] row_pointers[y];
}
delete [] row_pointers;
return result;
}
void libmv_samplePlanarPatchFloat(const float* image,
int width,
int height,
int channels,
const double* xs,
const double* ys,
int num_samples_x,
int num_samples_y,
const float* mask,
float* patch,
double* warped_position_x,
double* warped_position_y) {
FloatImage libmv_image, libmv_patch, libmv_mask;
FloatImage *libmv_mask_for_sample = NULL;
libmv_floatBufferToFloatImage(image, width, height, channels, &libmv_image);
if (mask) {
libmv_floatBufferToFloatImage(mask, width, height, 1, &libmv_mask);
libmv_mask_for_sample = &libmv_mask;
}
SamplePlanarPatch(libmv_image,
xs, ys,
num_samples_x, num_samples_y,
libmv_mask_for_sample,
&libmv_patch,
warped_position_x,
warped_position_y);
libmv_floatImageToFloatBuffer(libmv_patch, patch);
}
void libmv_samplePlanarPatchByte(const unsigned char* image,
int width,
int height,
int channels,
const double* xs,
const double* ys,
int num_samples_x,
int num_samples_y,
const float* mask,
unsigned char* patch,
double* warped_position_x,
double* warped_position_y) {
libmv::FloatImage libmv_image, libmv_patch, libmv_mask;
libmv::FloatImage *libmv_mask_for_sample = NULL;
libmv_byteBufferToFloatImage(image, width, height, channels, &libmv_image);
if (mask) {
libmv_floatBufferToFloatImage(mask, width, height, 1, &libmv_mask);
libmv_mask_for_sample = &libmv_mask;
}
libmv::SamplePlanarPatch(libmv_image,
xs, ys,
num_samples_x, num_samples_y,
libmv_mask_for_sample,
&libmv_patch,
warped_position_x,
warped_position_y);
libmv_floatImageToByteBuffer(libmv_patch, patch);
}

99
extern/libmv/intern/image.h vendored Normal file
View File

@@ -0,0 +1,99 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_IMAGE_H_
#define LIBMV_IMAGE_H_
#ifdef __cplusplus
# include "libmv/image/image.h"
void libmv_byteBufferToFloatImage(const unsigned char* buffer,
int width,
int height,
int channels,
libmv::FloatImage* image);
void libmv_floatBufferToFloatImage(const float* buffer,
int width,
int height,
int channels,
libmv::FloatImage* image);
void libmv_floatImageToFloatBuffer(const libmv::FloatImage& image,
float *buffer);
void libmv_floatImageToByteBuffer(const libmv::FloatImage& image,
unsigned char* buffer);
bool libmv_saveImage(const libmv::FloatImage& image,
const char* prefix,
int x0,
int y0);
#endif // __cplusplus
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_FloatImage {
float *buffer;
int width;
int height;
int channels;
} libmv_FloatImage;
void libmv_floatImageDestroy(libmv_FloatImage *image);
void libmv_samplePlanarPatchFloat(const float* image,
int width,
int height,
int channels,
const double* xs,
const double* ys,
int num_samples_x,
int num_samples_y,
const float* mask,
float* patch,
double* warped_position_x,
double* warped_position_y);
void libmv_samplePlanarPatchByte(const unsigned char* image,
int width,
int height,
int channels,
const double* xs,
const double* ys,
int num_samples_x,
int num_samples_y,
const float* mask,
unsigned char* patch,
double* warped_position_x,
double* warped_position_y);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_IMAGE_H_

55
extern/libmv/intern/logging.cc vendored Normal file
View File

@@ -0,0 +1,55 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/logging.h"
#include "intern/utildefines.h"
#include "libmv/logging/logging.h"
void libmv_initLogging(const char* argv0) {
// Make it so FATAL messages are always print into console.
char severity_fatal[32];
snprintf(severity_fatal, sizeof(severity_fatal), "%d",
google::GLOG_FATAL);
google::InitGoogleLogging(argv0);
google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "0");
google::SetCommandLineOption("stderrthreshold", severity_fatal);
google::SetCommandLineOption("minloglevel", severity_fatal);
}
void libmv_startDebugLogging(void) {
google::SetCommandLineOption("logtostderr", "1");
google::SetCommandLineOption("v", "2");
google::SetCommandLineOption("stderrthreshold", "1");
google::SetCommandLineOption("minloglevel", "0");
}
void libmv_setLoggingVerbosity(int verbosity) {
char val[10];
snprintf(val, sizeof(val), "%d", verbosity);
google::SetCommandLineOption("v", val);
}

View File

@@ -15,39 +15,33 @@
* 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h
* \ingroup freestyle
*/
#ifndef __FREESTYLE_PYTHON_STROKETEXTURESHADER_H__
#define __FREESTYLE_PYTHON_STROKETEXTURESHADER_H__
#include "../BPy_StrokeShader.h"
#ifndef LIBMV_C_API_LOGGING_H_
#define LIBMV_C_API_LOGGING_H_
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
// Initialize GLog logging.
void libmv_initLogging(const char* argv0);
extern PyTypeObject StrokeTextureShader_Type;
// Switch Glog to debug logging level.
void libmv_startDebugLogging(void);
#define BPy_StrokeTextureShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&StrokeTextureShader_Type))
/*---------------------------Python BPy_StrokeTextureShader structure definition----------*/
typedef struct {
BPy_StrokeShader py_ss;
} BPy_StrokeTextureShader;
///////////////////////////////////////////////////////////////////////////////////////////
// Set GLog logging verbosity level.
void libmv_setLoggingVerbosity(int verbosity);
#ifdef __cplusplus
}
#endif
#endif /* __FREESTYLE_PYTHON_STROKETEXTURESHADER_H__ */
#endif // LIBMV_C_API_LOGGING_H_

542
extern/libmv/intern/reconstruction.cc vendored Normal file
View File

@@ -0,0 +1,542 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/reconstruction.h"
#include "intern/camera_intrinsics.h"
#include "intern/tracks.h"
#include "intern/utildefines.h"
#include "libmv/logging/logging.h"
#include "libmv/simple_pipeline/bundle.h"
#include "libmv/simple_pipeline/keyframe_selection.h"
#include "libmv/simple_pipeline/initialize_reconstruction.h"
#include "libmv/simple_pipeline/modal_solver.h"
#include "libmv/simple_pipeline/pipeline.h"
#include "libmv/simple_pipeline/reconstruction_scale.h"
#include "libmv/simple_pipeline/tracks.h"
using libmv::CameraIntrinsics;
using libmv::EuclideanCamera;
using libmv::EuclideanPoint;
using libmv::EuclideanReconstruction;
using libmv::EuclideanScaleToUnity;
using libmv::Marker;
using libmv::ProgressUpdateCallback;
using libmv::PolynomialCameraIntrinsics;
using libmv::Tracks;
using libmv::EuclideanBundle;
using libmv::EuclideanCompleteReconstruction;
using libmv::EuclideanReconstructTwoFrames;
using libmv::EuclideanReprojectionError;
struct libmv_Reconstruction {
EuclideanReconstruction reconstruction;
/* Used for per-track average error calculation after reconstruction */
Tracks tracks;
CameraIntrinsics *intrinsics;
double error;
bool is_valid;
};
namespace {
class ReconstructUpdateCallback : public ProgressUpdateCallback {
public:
ReconstructUpdateCallback(
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata) {
progress_update_callback_ = progress_update_callback;
callback_customdata_ = callback_customdata;
}
void invoke(double progress, const char* message) {
if (progress_update_callback_) {
progress_update_callback_(callback_customdata_, progress, message);
}
}
protected:
reconstruct_progress_update_cb progress_update_callback_;
void* callback_customdata_;
};
void libmv_solveRefineIntrinsics(
const Tracks &tracks,
const int refine_intrinsics,
const int bundle_constraints,
reconstruct_progress_update_cb progress_update_callback,
void* callback_customdata,
EuclideanReconstruction* reconstruction,
CameraIntrinsics* intrinsics) {
/* only a few combinations are supported but trust the caller/ */
int bundle_intrinsics = 0;
if (refine_intrinsics & LIBMV_REFINE_FOCAL_LENGTH) {
bundle_intrinsics |= libmv::BUNDLE_FOCAL_LENGTH;
}
if (refine_intrinsics & LIBMV_REFINE_PRINCIPAL_POINT) {
bundle_intrinsics |= libmv::BUNDLE_PRINCIPAL_POINT;
}
if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K1) {
bundle_intrinsics |= libmv::BUNDLE_RADIAL_K1;
}
if (refine_intrinsics & LIBMV_REFINE_RADIAL_DISTORTION_K2) {
bundle_intrinsics |= libmv::BUNDLE_RADIAL_K2;
}
progress_update_callback(callback_customdata, 1.0, "Refining solution");
EuclideanBundleCommonIntrinsics(tracks,
bundle_intrinsics,
bundle_constraints,
reconstruction,
intrinsics);
}
void finishReconstruction(
const Tracks &tracks,
const CameraIntrinsics &camera_intrinsics,
libmv_Reconstruction *libmv_reconstruction,
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata) {
EuclideanReconstruction &reconstruction =
libmv_reconstruction->reconstruction;
/* Reprojection error calculation. */
progress_update_callback(callback_customdata, 1.0, "Finishing solution");
libmv_reconstruction->tracks = tracks;
libmv_reconstruction->error = EuclideanReprojectionError(tracks,
reconstruction,
camera_intrinsics);
}
bool selectTwoKeyframesBasedOnGRICAndVariance(
Tracks& tracks,
Tracks& normalized_tracks,
CameraIntrinsics& camera_intrinsics,
int& keyframe1,
int& keyframe2) {
libmv::vector<int> keyframes;
/* Get list of all keyframe candidates first. */
SelectKeyframesBasedOnGRICAndVariance(normalized_tracks,
camera_intrinsics,
keyframes);
if (keyframes.size() < 2) {
LG << "Not enough keyframes detected by GRIC";
return false;
} else if (keyframes.size() == 2) {
keyframe1 = keyframes[0];
keyframe2 = keyframes[1];
return true;
}
/* Now choose two keyframes with minimal reprojection error after initial
* reconstruction choose keyframes with the least reprojection error after
* solving from two candidate keyframes.
*
* In fact, currently libmv returns single pair only, so this code will
* not actually run. But in the future this could change, so let's stay
* prepared.
*/
int previous_keyframe = keyframes[0];
double best_error = std::numeric_limits<double>::max();
for (int i = 1; i < keyframes.size(); i++) {
EuclideanReconstruction reconstruction;
int current_keyframe = keyframes[i];
libmv::vector<Marker> keyframe_markers =
normalized_tracks.MarkersForTracksInBothImages(previous_keyframe,
current_keyframe);
Tracks keyframe_tracks(keyframe_markers);
/* get a solution from two keyframes only */
EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction);
EuclideanBundle(keyframe_tracks, &reconstruction);
EuclideanCompleteReconstruction(keyframe_tracks,
&reconstruction,
NULL);
double current_error = EuclideanReprojectionError(tracks,
reconstruction,
camera_intrinsics);
LG << "Error between " << previous_keyframe
<< " and " << current_keyframe
<< ": " << current_error;
if (current_error < best_error) {
best_error = current_error;
keyframe1 = previous_keyframe;
keyframe2 = current_keyframe;
}
previous_keyframe = current_keyframe;
}
return true;
}
Marker libmv_projectMarker(const EuclideanPoint& point,
const EuclideanCamera& camera,
const CameraIntrinsics& intrinsics) {
libmv::Vec3 projected = camera.R * point.X + camera.t;
projected /= projected(2);
libmv::Marker reprojected_marker;
intrinsics.ApplyIntrinsics(projected(0), projected(1),
&reprojected_marker.x,
&reprojected_marker.y);
reprojected_marker.image = camera.image;
reprojected_marker.track = point.track;
return reprojected_marker;
}
void libmv_getNormalizedTracks(const Tracks &tracks,
const CameraIntrinsics &camera_intrinsics,
Tracks *normalized_tracks) {
libmv::vector<Marker> markers = tracks.AllMarkers();
for (int i = 0; i < markers.size(); ++i) {
Marker &marker = markers[i];
camera_intrinsics.InvertIntrinsics(marker.x, marker.y,
&marker.x, &marker.y);
normalized_tracks->Insert(marker.image,
marker.track,
marker.x, marker.y,
marker.weight);
}
}
} // namespace
libmv_Reconstruction *libmv_solveReconstruction(
const libmv_Tracks* libmv_tracks,
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
libmv_ReconstructionOptions* libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void* callback_customdata) {
libmv_Reconstruction *libmv_reconstruction =
LIBMV_OBJECT_NEW(libmv_Reconstruction);
Tracks &tracks = *((Tracks *) libmv_tracks);
EuclideanReconstruction &reconstruction =
libmv_reconstruction->reconstruction;
ReconstructUpdateCallback update_callback =
ReconstructUpdateCallback(progress_update_callback,
callback_customdata);
/* Retrieve reconstruction options from C-API to libmv API. */
CameraIntrinsics *camera_intrinsics;
camera_intrinsics = libmv_reconstruction->intrinsics =
libmv_cameraIntrinsicsCreateFromOptions(libmv_camera_intrinsics_options);
/* Invert the camera intrinsics/ */
Tracks normalized_tracks;
libmv_getNormalizedTracks(tracks, *camera_intrinsics, &normalized_tracks);
/* keyframe selection. */
int keyframe1 = libmv_reconstruction_options->keyframe1,
keyframe2 = libmv_reconstruction_options->keyframe2;
if (libmv_reconstruction_options->select_keyframes) {
LG << "Using automatic keyframe selection";
update_callback.invoke(0, "Selecting keyframes");
selectTwoKeyframesBasedOnGRICAndVariance(tracks,
normalized_tracks,
*camera_intrinsics,
keyframe1,
keyframe2);
/* so keyframes in the interface would be updated */
libmv_reconstruction_options->keyframe1 = keyframe1;
libmv_reconstruction_options->keyframe2 = keyframe2;
}
/* Actual reconstruction. */
LG << "frames to init from: " << keyframe1 << " " << keyframe2;
libmv::vector<Marker> keyframe_markers =
normalized_tracks.MarkersForTracksInBothImages(keyframe1, keyframe2);
LG << "number of markers for init: " << keyframe_markers.size();
if (keyframe_markers.size() < 8) {
LG << "No enough markers to initialize from";
libmv_reconstruction->is_valid = false;
return libmv_reconstruction;
}
update_callback.invoke(0, "Initial reconstruction");
EuclideanReconstructTwoFrames(keyframe_markers, &reconstruction);
EuclideanBundle(normalized_tracks, &reconstruction);
EuclideanCompleteReconstruction(normalized_tracks,
&reconstruction,
&update_callback);
/* Refinement/ */
if (libmv_reconstruction_options->refine_intrinsics) {
libmv_solveRefineIntrinsics(
tracks,
libmv_reconstruction_options->refine_intrinsics,
libmv::BUNDLE_NO_CONSTRAINTS,
progress_update_callback,
callback_customdata,
&reconstruction,
camera_intrinsics);
}
/* Set reconstruction scale to unity. */
EuclideanScaleToUnity(&reconstruction);
/* Finish reconstruction. */
finishReconstruction(tracks,
*camera_intrinsics,
libmv_reconstruction,
progress_update_callback,
callback_customdata);
libmv_reconstruction->is_valid = true;
return (libmv_Reconstruction *) libmv_reconstruction;
}
libmv_Reconstruction *libmv_solveModal(
const libmv_Tracks *libmv_tracks,
const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
const libmv_ReconstructionOptions *libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata) {
libmv_Reconstruction *libmv_reconstruction =
LIBMV_OBJECT_NEW(libmv_Reconstruction);
Tracks &tracks = *((Tracks *) libmv_tracks);
EuclideanReconstruction &reconstruction =
libmv_reconstruction->reconstruction;
ReconstructUpdateCallback update_callback =
ReconstructUpdateCallback(progress_update_callback,
callback_customdata);
/* Retrieve reconstruction options from C-API to libmv API. */
CameraIntrinsics *camera_intrinsics;
camera_intrinsics = libmv_reconstruction->intrinsics =
libmv_cameraIntrinsicsCreateFromOptions(
libmv_camera_intrinsics_options);
/* Invert the camera intrinsics. */
Tracks normalized_tracks;
libmv_getNormalizedTracks(tracks, *camera_intrinsics, &normalized_tracks);
/* Actual reconstruction. */
ModalSolver(normalized_tracks, &reconstruction, &update_callback);
PolynomialCameraIntrinsics empty_intrinsics;
EuclideanBundleCommonIntrinsics(normalized_tracks,
libmv::BUNDLE_NO_INTRINSICS,
libmv::BUNDLE_NO_TRANSLATION,
&reconstruction,
&empty_intrinsics);
/* Refinement. */
if (libmv_reconstruction_options->refine_intrinsics) {
libmv_solveRefineIntrinsics(
tracks,
libmv_reconstruction_options->refine_intrinsics,
libmv::BUNDLE_NO_TRANSLATION,
progress_update_callback, callback_customdata,
&reconstruction,
camera_intrinsics);
}
/* Finish reconstruction. */
finishReconstruction(tracks,
*camera_intrinsics,
libmv_reconstruction,
progress_update_callback,
callback_customdata);
libmv_reconstruction->is_valid = true;
return (libmv_Reconstruction *) libmv_reconstruction;
}
int libmv_reconstructionIsValid(libmv_Reconstruction *libmv_reconstruction) {
return libmv_reconstruction->is_valid;
}
void libmv_reconstructionDestroy(libmv_Reconstruction *libmv_reconstruction) {
LIBMV_OBJECT_DELETE(libmv_reconstruction->intrinsics, CameraIntrinsics);
LIBMV_OBJECT_DELETE(libmv_reconstruction, libmv_Reconstruction);
}
int libmv_reprojectionPointForTrack(
const libmv_Reconstruction *libmv_reconstruction,
int track,
double pos[3]) {
const EuclideanReconstruction *reconstruction =
&libmv_reconstruction->reconstruction;
const EuclideanPoint *point =
reconstruction->PointForTrack(track);
if (point) {
pos[0] = point->X[0];
pos[1] = point->X[2];
pos[2] = point->X[1];
return 1;
}
return 0;
}
double libmv_reprojectionErrorForTrack(
const libmv_Reconstruction *libmv_reconstruction,
int track) {
const EuclideanReconstruction *reconstruction =
&libmv_reconstruction->reconstruction;
const CameraIntrinsics *intrinsics = libmv_reconstruction->intrinsics;
libmv::vector<Marker> markers =
libmv_reconstruction->tracks.MarkersForTrack(track);
int num_reprojected = 0;
double total_error = 0.0;
for (int i = 0; i < markers.size(); ++i) {
double weight = markers[i].weight;
const EuclideanCamera *camera =
reconstruction->CameraForImage(markers[i].image);
const EuclideanPoint *point =
reconstruction->PointForTrack(markers[i].track);
if (!camera || !point || weight == 0.0) {
continue;
}
num_reprojected++;
Marker reprojected_marker =
libmv_projectMarker(*point, *camera, *intrinsics);
double ex = (reprojected_marker.x - markers[i].x) * weight;
double ey = (reprojected_marker.y - markers[i].y) * weight;
total_error += sqrt(ex * ex + ey * ey);
}
return total_error / num_reprojected;
}
double libmv_reprojectionErrorForImage(
const libmv_Reconstruction *libmv_reconstruction,
int image) {
const EuclideanReconstruction *reconstruction =
&libmv_reconstruction->reconstruction;
const CameraIntrinsics *intrinsics = libmv_reconstruction->intrinsics;
libmv::vector<Marker> markers =
libmv_reconstruction->tracks.MarkersInImage(image);
const EuclideanCamera *camera = reconstruction->CameraForImage(image);
int num_reprojected = 0;
double total_error = 0.0;
if (!camera) {
return 0.0;
}
for (int i = 0; i < markers.size(); ++i) {
const EuclideanPoint *point =
reconstruction->PointForTrack(markers[i].track);
if (!point) {
continue;
}
num_reprojected++;
Marker reprojected_marker =
libmv_projectMarker(*point, *camera, *intrinsics);
double ex = (reprojected_marker.x - markers[i].x) * markers[i].weight;
double ey = (reprojected_marker.y - markers[i].y) * markers[i].weight;
total_error += sqrt(ex * ex + ey * ey);
}
return total_error / num_reprojected;
}
int libmv_reprojectionCameraForImage(
const libmv_Reconstruction *libmv_reconstruction,
int image,
double mat[4][4]) {
const EuclideanReconstruction *reconstruction =
&libmv_reconstruction->reconstruction;
const EuclideanCamera *camera =
reconstruction->CameraForImage(image);
if (camera) {
for (int j = 0; j < 3; ++j) {
for (int k = 0; k < 3; ++k) {
int l = k;
if (k == 1) {
l = 2;
} else if (k == 2) {
l = 1;
}
if (j == 2) {
mat[j][l] = -camera->R(j, k);
} else {
mat[j][l] = camera->R(j, k);
}
}
mat[j][3] = 0.0;
}
libmv::Vec3 optical_center = -camera->R.transpose() * camera->t;
mat[3][0] = optical_center(0);
mat[3][1] = optical_center(2);
mat[3][2] = optical_center(1);
mat[3][3] = 1.0;
return 1;
}
return 0;
}
double libmv_reprojectionError(
const libmv_Reconstruction *libmv_reconstruction) {
return libmv_reconstruction->error;
}
libmv_CameraIntrinsics *libmv_reconstructionExtractIntrinsics(
libmv_Reconstruction *libmv_reconstruction) {
return (libmv_CameraIntrinsics *) libmv_reconstruction->intrinsics;
}

102
extern/libmv/intern/reconstruction.h vendored Normal file
View File

@@ -0,0 +1,102 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_RECONSTRUCTION_H_
#define LIBMV_C_API_RECONSTRUCTION_H_
#ifdef __cplusplus
extern "C" {
#endif
struct libmv_Tracks;
struct libmv_CameraIntrinsics;
struct libmv_CameraIntrinsicsOptions;
typedef struct libmv_Reconstruction libmv_Reconstruction;
enum {
LIBMV_REFINE_FOCAL_LENGTH = (1 << 0),
LIBMV_REFINE_PRINCIPAL_POINT = (1 << 1),
LIBMV_REFINE_RADIAL_DISTORTION_K1 = (1 << 2),
LIBMV_REFINE_RADIAL_DISTORTION_K2 = (1 << 4),
};
typedef struct libmv_ReconstructionOptions {
int select_keyframes;
int keyframe1, keyframe2;
int refine_intrinsics;
} libmv_ReconstructionOptions;
typedef void (*reconstruct_progress_update_cb) (void* customdata,
double progress,
const char* message);
libmv_Reconstruction* libmv_solveReconstruction(
const struct libmv_Tracks* libmv_tracks,
const struct libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
libmv_ReconstructionOptions* libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void* callback_customdata);
libmv_Reconstruction* libmv_solveModal(
const struct libmv_Tracks* libmv_tracks,
const struct libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
const libmv_ReconstructionOptions* libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void* callback_customdata);
int libmv_reconstructionIsValid(libmv_Reconstruction *libmv_reconstruction);
void libmv_reconstructionDestroy(libmv_Reconstruction* libmv_reconstruction);
int libmv_reprojectionPointForTrack(
const libmv_Reconstruction* libmv_reconstruction,
int track,
double pos[3]);
double libmv_reprojectionErrorForTrack(
const libmv_Reconstruction* libmv_reconstruction,
int track);
double libmv_reprojectionErrorForImage(
const libmv_Reconstruction* libmv_reconstruction,
int image);
int libmv_reprojectionCameraForImage(
const libmv_Reconstruction* libmv_reconstruction,
int image,
double mat[4][4]);
double libmv_reprojectionError(const libmv_Reconstruction* libmv_reconstruction);
struct libmv_CameraIntrinsics* libmv_reconstructionExtractIntrinsics(
libmv_Reconstruction *libmv_Reconstruction);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_RECONSTRUCTION_H_

43
extern/libmv/intern/region.h vendored Normal file
View File

@@ -0,0 +1,43 @@
/*
* ***** 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) 2014 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_REGION_H_
#define LIBMV_C_API_REGION_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_Region {
float min[2];
float max[2];
} libmv_Region;
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_REGION_H_

403
extern/libmv/intern/stub.cc vendored Normal file
View File

@@ -0,0 +1,403 @@
/*
* ***** 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.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "libmv-capi.h"
#include <cstdlib>
#include <cstring>
/* ************ Logging ************ */
void libmv_initLogging(const char * /*argv0*/) {
}
void libmv_startDebugLogging(void) {
}
void libmv_setLoggingVerbosity(int /*verbosity*/) {
}
/* ************ Planar tracker ************ */
/* TrackRegion (new planar tracker) */
int libmv_trackRegion(const libmv_TrackRegionOptions * /*options*/,
const float * /*image1*/,
int /*image1_width*/,
int /*image1_height*/,
const float * /*image2*/,
int /*image2_width*/,
int /*image2_height*/,
const double *x1,
const double *y1,
libmv_TrackRegionResult *result,
double *x2,
double *y2) {
/* Convert to doubles for the libmv api. The four corners and the center. */
for (int i = 0; i < 5; ++i) {
x2[i] = x1[i];
y2[i] = y1[i];
}
result->termination = -1;
result->termination_reason = "Built without libmv support";
result->correlation = 0.0;
return false;
}
void libmv_samplePlanarPatchFloat(const float * /*image*/,
int /*width*/,
int /*height*/,
int /*channels*/,
const double * /*xs*/,
const double * /*ys*/,
int /*num_samples_x*/,
int /*num_samples_y*/,
const float * /*mask*/,
float * /*patch*/,
double * /*warped_position_x*/,
double * /*warped_position_y*/) {
/* TODO(sergey): implement */
}
void libmv_samplePlanarPatchByte(const unsigned char * /*image*/,
int /*width*/,
int /*height*/,
int /*channels*/,
const double * /*xs*/,
const double * /*ys*/,
int /*num_samples_x*/, int /*num_samples_y*/,
const float * /*mask*/,
unsigned char * /*patch*/,
double * /*warped_position_x*/,
double * /*warped_position_y*/) {
/* TODO(sergey): implement */
}
void libmv_floatImageDestroy(libmv_FloatImage* /*image*/)
{
}
/* ************ Tracks ************ */
libmv_Tracks *libmv_tracksNew(void) {
return NULL;
}
void libmv_tracksInsert(libmv_Tracks * /*libmv_tracks*/,
int /*image*/,
int /*track*/,
double /*x*/,
double /*y*/,
double /*weight*/) {
}
void libmv_tracksDestroy(libmv_Tracks * /*libmv_tracks*/) {
}
/* ************ Reconstruction solver ************ */
libmv_Reconstruction *libmv_solveReconstruction(
const libmv_Tracks * /*libmv_tracks*/,
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
libmv_ReconstructionOptions * /*libmv_reconstruction_options*/,
reconstruct_progress_update_cb /*progress_update_callback*/,
void * /*callback_customdata*/) {
return NULL;
}
libmv_Reconstruction *libmv_solveModal(
const libmv_Tracks * /*libmv_tracks*/,
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
const libmv_ReconstructionOptions * /*libmv_reconstruction_options*/,
reconstruct_progress_update_cb /*progress_update_callback*/,
void * /*callback_customdata*/) {
return NULL;
}
int libmv_reconstructionIsValid(libmv_Reconstruction * /*libmv_reconstruction*/) {
return 0;
}
int libmv_reprojectionPointForTrack(
const libmv_Reconstruction * /*libmv_reconstruction*/,
int /*track*/,
double /*pos*/[3]) {
return 0;
}
double libmv_reprojectionErrorForTrack(
const libmv_Reconstruction * /*libmv_reconstruction*/,
int /*track*/) {
return 0.0;
}
double libmv_reprojectionErrorForImage(
const libmv_Reconstruction * /*libmv_reconstruction*/,
int /*image*/) {
return 0.0;
}
int libmv_reprojectionCameraForImage(
const libmv_Reconstruction * /*libmv_reconstruction*/,
int /*image*/,
double /*mat*/[4][4]) {
return 0;
}
double libmv_reprojectionError(
const libmv_Reconstruction * /*libmv_reconstruction*/) {
return 0.0;
}
void libmv_reconstructionDestroy(
struct libmv_Reconstruction * /*libmv_reconstruction*/) {
}
/* ************ Feature detector ************ */
libmv_Features *libmv_detectFeaturesByte(const unsigned char */*image_buffer*/,
int /*width*/,
int /*height*/,
int /*channels*/,
libmv_DetectOptions */*options*/) {
return NULL;
}
struct libmv_Features *libmv_detectFeaturesFloat(
const float */*image_buffer*/,
int /*width*/,
int /*height*/,
int /*channels*/,
libmv_DetectOptions */*options*/) {
return NULL;
}
int libmv_countFeatures(const libmv_Features * /*libmv_features*/) {
return 0;
}
void libmv_getFeature(const libmv_Features * /*libmv_features*/,
int /*number*/,
double *x,
double *y,
double *score,
double *size) {
*x = 0.0;
*y = 0.0;
*score = 0.0;
*size = 0.0;
}
void libmv_featuresDestroy(struct libmv_Features * /*libmv_features*/) {
}
/* ************ Camera intrinsics ************ */
libmv_CameraIntrinsics *libmv_reconstructionExtractIntrinsics(
libmv_Reconstruction * /*libmv_reconstruction*/) {
return NULL;
}
libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/) {
return NULL;
}
libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(
const libmv_CameraIntrinsics * /*libmvIntrinsics*/) {
return NULL;
}
void libmv_cameraIntrinsicsDestroy(
libmv_CameraIntrinsics * /*libmvIntrinsics*/) {
}
void libmv_cameraIntrinsicsUpdate(
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
libmv_CameraIntrinsics * /*libmv_intrinsics*/) {
}
void libmv_cameraIntrinsicsSetThreads(
libmv_CameraIntrinsics * /*libmv_intrinsics*/,
int /*threads*/) {
}
void libmv_cameraIntrinsicsExtractOptions(
const libmv_CameraIntrinsics */*libmv_intrinsics*/,
libmv_CameraIntrinsicsOptions *camera_intrinsics_options) {
memset(camera_intrinsics_options, 0, sizeof(libmv_CameraIntrinsicsOptions));
camera_intrinsics_options->focal_length = 1.0;
}
void libmv_cameraIntrinsicsUndistortByte(
const libmv_CameraIntrinsics * /*libmv_intrinsics*/,
const unsigned char *source_image,
int width, int height,
float overscan, int channels,
unsigned char *destination_image) {
memcpy(destination_image, source_image,
channels * width * height * sizeof(unsigned char));
}
void libmv_cameraIntrinsicsUndistortFloat(
const libmv_CameraIntrinsics* /*libmv_intrinsics*/,
const float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image) {
memcpy(destination_image, source_image,
channels * width * height * sizeof(float));
}
void libmv_cameraIntrinsicsDistortByte(
const struct libmv_CameraIntrinsics* /*libmv_intrinsics*/,
const unsigned char *source_image,
int width,
int height,
float overscan,
int channels,
unsigned char *destination_image) {
memcpy(destination_image, source_image,
channels * width * height * sizeof(unsigned char));
}
void libmv_cameraIntrinsicsDistortFloat(
const libmv_CameraIntrinsics* /*libmv_intrinsics*/,
float* source_image,
int width,
int height,
float overscan,
int channels,
float* destination_image) {
memcpy(destination_image, source_image,
channels * width * height * sizeof(float));
}
/* ************ utils ************ */
void libmv_cameraIntrinsicsApply(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1) {
double focal_length = libmv_camera_intrinsics_options->focal_length;
double principal_x = libmv_camera_intrinsics_options->principal_point_x;
double principal_y = libmv_camera_intrinsics_options->principal_point_y;
*x1 = x * focal_length + principal_x;
*y1 = y * focal_length + principal_y;
}
void libmv_cameraIntrinsicsInvert(
const libmv_CameraIntrinsicsOptions* libmv_camera_intrinsics_options,
double x,
double y,
double* x1,
double* y1) {
double focal_length = libmv_camera_intrinsics_options->focal_length;
double principal_x = libmv_camera_intrinsics_options->principal_point_x;
double principal_y = libmv_camera_intrinsics_options->principal_point_y;
*x1 = (x - principal_x) / focal_length;
*y1 = (y - principal_y) / focal_length;
}
void libmv_homography2DFromCorrespondencesEuc(/* const */ double (*x1)[2],
/* const */ double (*x2)[2],
int num_points,
double H[3][3]) {
memset(H, 0, sizeof(double[3][3]));
H[0][0] = 1.0f;
H[1][1] = 1.0f;
H[2][2] = 1.0f;
}
/* ************ autotrack ************ */
libmv_AutoTrack* libmv_autoTrackNew(libmv_FrameAccessor* /*frame_accessor*/)
{
return NULL;
}
void libmv_autoTrackDestroy(libmv_AutoTrack* /*libmv_autotrack*/)
{
}
void libmv_autoTrackSetOptions(libmv_AutoTrack* /*libmv_autotrack*/,
const libmv_AutoTrackOptions* /*options*/)
{
}
int libmv_autoTrackMarker(libmv_AutoTrack* /*libmv_autotrack*/,
const libmv_TrackRegionOptions* /*libmv_options*/,
libmv_Marker */*libmv_tracker_marker*/,
libmv_TrackRegionResult* /*libmv_result*/)
{
return 0;
}
void libmv_autoTrackAddMarker(libmv_AutoTrack* /*libmv_autotrack*/,
const libmv_Marker* /*libmv_marker*/)
{
}
int libmv_autoTrackGetMarker(libmv_AutoTrack* /*libmv_autotrack*/,
int /*clip*/,
int /*frame*/,
int /*track*/,
libmv_Marker* /*libmv_marker*/)
{
return 0;
}
/* ************ frame accessor ************ */
libmv_FrameAccessor* libmv_FrameAccessorNew(
libmv_FrameAccessorUserData* /*user_data**/,
libmv_GetImageCallback /*get_image_callback*/,
libmv_ReleaseImageCallback /*release_image_callback*/)
{
return NULL;
}
void libmv_FrameAccessorDestroy(libmv_FrameAccessor* /*frame_accessor*/)
{
}
int64_t libmv_frameAccessorgetTransformKey(
const libmv_FrameTransform */*transform*/)
{
return 0;
}
void libmv_frameAccessorgetTransformRun(const libmv_FrameTransform* /*transform*/,
const libmv_FloatImage* /*input_image*/,
libmv_FloatImage* /*output_image*/)
{
}

177
extern/libmv/intern/track_region.cc vendored Normal file
View File

@@ -0,0 +1,177 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/track_region.h"
#include "intern/image.h"
#include "intern/utildefines.h"
#include "libmv/image/image.h"
#include "libmv/tracking/track_region.h"
/* define this to generate PNG images with content of search areas
tracking between which failed */
#undef DUMP_FAILURE
/* define this to generate PNG images with content of search areas
on every itteration of tracking */
#undef DUMP_ALWAYS
using libmv::FloatImage;
using libmv::TrackRegionOptions;
using libmv::TrackRegionResult;
using libmv::TrackRegion;
void libmv_configureTrackRegionOptions(
const libmv_TrackRegionOptions& options,
TrackRegionOptions* track_region_options) {
switch (options.motion_model) {
#define LIBMV_CONVERT(the_model) \
case TrackRegionOptions::the_model: \
track_region_options->mode = TrackRegionOptions::the_model; \
break;
LIBMV_CONVERT(TRANSLATION)
LIBMV_CONVERT(TRANSLATION_ROTATION)
LIBMV_CONVERT(TRANSLATION_SCALE)
LIBMV_CONVERT(TRANSLATION_ROTATION_SCALE)
LIBMV_CONVERT(AFFINE)
LIBMV_CONVERT(HOMOGRAPHY)
#undef LIBMV_CONVERT
}
track_region_options->minimum_correlation = options.minimum_correlation;
track_region_options->max_iterations = options.num_iterations;
track_region_options->sigma = options.sigma;
track_region_options->num_extra_points = 1;
track_region_options->image1_mask = NULL;
track_region_options->use_brute_initialization = options.use_brute;
/* TODO(keir): This will make some cases better, but may be a regression until
* the motion model is in. Since this is on trunk, enable it for now.
*
* TODO(sergey): This gives much worse results on mango footage (see 04_2e)
* so disabling for now for until proper prediction model is landed.
*
* The thing is, currently blender sends input coordinates as the guess to
* region tracker and in case of fast motion such an early out ruins the track.
*/
track_region_options->attempt_refine_before_brute = false;
track_region_options->use_normalized_intensities = options.use_normalization;
}
void libmv_regionTrackergetResult(const TrackRegionResult& track_region_result,
libmv_TrackRegionResult* result) {
result->termination = (int) track_region_result.termination;
result->termination_reason = "";
result->correlation = track_region_result.correlation;
}
int libmv_trackRegion(const libmv_TrackRegionOptions* options,
const float* image1,
int image1_width,
int image1_height,
const float* image2,
int image2_width,
int image2_height,
const double* x1,
const double* y1,
libmv_TrackRegionResult* result,
double* x2,
double* y2) {
double xx1[5], yy1[5];
double xx2[5], yy2[5];
bool tracking_result = false;
// Convert to doubles for the libmv api. The four corners and the center.
for (int i = 0; i < 5; ++i) {
xx1[i] = x1[i];
yy1[i] = y1[i];
xx2[i] = x2[i];
yy2[i] = y2[i];
}
TrackRegionOptions track_region_options;
FloatImage image1_mask;
libmv_configureTrackRegionOptions(*options, &track_region_options);
if (options->image1_mask) {
libmv_floatBufferToFloatImage(options->image1_mask,
image1_width,
image1_height,
1,
&image1_mask);
track_region_options.image1_mask = &image1_mask;
}
// Convert from raw float buffers to libmv's FloatImage.
FloatImage old_patch, new_patch;
libmv_floatBufferToFloatImage(image1,
image1_width,
image1_height,
1,
&old_patch);
libmv_floatBufferToFloatImage(image2,
image2_width,
image2_height,
1,
&new_patch);
TrackRegionResult track_region_result;
TrackRegion(old_patch, new_patch,
xx1, yy1,
track_region_options,
xx2, yy2,
&track_region_result);
// Convert to floats for the blender api.
for (int i = 0; i < 5; ++i) {
x2[i] = xx2[i];
y2[i] = yy2[i];
}
// TODO(keir): Update the termination string with failure details.
if (track_region_result.termination == TrackRegionResult::CONVERGENCE ||
track_region_result.termination == TrackRegionResult::NO_CONVERGENCE) {
tracking_result = true;
}
// Debug dump of patches.
#if defined(DUMP_FAILURE) || defined(DUMP_ALWAYS)
bool need_dump = !tracking_result;
# ifdef DUMP_ALWAYS
need_dump = true;
# endif
if (need_dump) {
libmv_saveImage(old_patch, "old_patch", x1[4], y1[4]);
libmv_saveImage(new_patch, "new_patch", x2[4], y2[4]);
if (options->image1_mask) {
libmv_saveImage(image1_mask, "mask", x2[4], y2[4]);
}
}
#endif
return tracking_result;
}

81
extern/libmv/intern/track_region.h vendored Normal file
View File

@@ -0,0 +1,81 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_TRACK_REGION_H_
#define LIBMV_C_API_TRACK_REGION_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_TrackRegionOptions {
int motion_model;
int num_iterations;
int use_brute;
int use_normalization;
double minimum_correlation;
double sigma;
float *image1_mask;
} libmv_TrackRegionOptions;
typedef struct libmv_TrackRegionResult {
int termination;
const char* termination_reason;
double correlation;
} libmv_TrackRegionResult;
#ifdef __cplusplus
namespace libmv {
struct TrackRegionOptions;
struct TrackRegionResult;
}
void libmv_configureTrackRegionOptions(
const libmv_TrackRegionOptions& options,
libmv::TrackRegionOptions* track_region_options);
void libmv_regionTrackergetResult(
const libmv::TrackRegionResult& track_region_result,
libmv_TrackRegionResult* result);
#endif
int libmv_trackRegion(const libmv_TrackRegionOptions* options,
const float* image1,
int image1_width,
int image1_height,
const float* image2,
int image2_width,
int image2_height,
const double* x1,
const double* y1,
libmv_TrackRegionResult* result,
double* x2,
double* y2);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_PLANAR_TRACKER_H_

52
extern/libmv/intern/tracks.cc vendored Normal file
View File

@@ -0,0 +1,52 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/tracks.h"
#include "intern/utildefines.h"
#include "libmv/simple_pipeline/tracks.h"
using libmv::Marker;
using libmv::Tracks;
libmv_Tracks* libmv_tracksNew(void) {
Tracks* tracks = LIBMV_OBJECT_NEW(Tracks);
return (libmv_Tracks*) tracks;
}
void libmv_tracksDestroy(libmv_Tracks* libmv_tracks) {
LIBMV_OBJECT_DELETE(libmv_tracks, Tracks);
}
void libmv_tracksInsert(libmv_Tracks *libmv_tracks,
int image,
int track,
double x,
double y,
double weight) {
((Tracks *) libmv_tracks)->Insert(image, track, x, y, weight);
}

View File

@@ -15,39 +15,37 @@
* 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h
* \ingroup freestyle
*/
#ifndef __FREESTYLE_PYTHON_FSTREAMSHADER_H__
#define __FREESTYLE_PYTHON_FSTREAMSHADER_H__
#include "../BPy_StrokeShader.h"
#ifndef LIBMV_C_API_TRACKS_H_
#define LIBMV_C_API_TRACKS_H_
#ifdef __cplusplus
extern "C" {
#endif
///////////////////////////////////////////////////////////////////////////////////////////
typedef struct libmv_Tracks libmv_Tracks;
extern PyTypeObject fstreamShader_Type;
libmv_Tracks* libmv_tracksNew(void);
#define BPy_fstreamShader_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&fstreamShader_Type))
void libmv_tracksDestroy(libmv_Tracks* libmv_tracks);
/*---------------------------Python BPy_fstreamShader structure definition----------*/
typedef struct {
BPy_StrokeShader py_ss;
} BPy_fstreamShader;
///////////////////////////////////////////////////////////////////////////////////////////
void libmv_tracksInsert(libmv_Tracks* libmv_tracks,
int image,
int track,
double x,
double y,
double weight);
#ifdef __cplusplus
}
#endif
#endif /* __FREESTYLE_PYTHON_FSTREAMSHADER_H__ */
#endif // LIBMV_C_API_TRACKS_H_

138
extern/libmv/intern/tracksN.cc vendored Normal file
View File

@@ -0,0 +1,138 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#include "intern/tracksN.h"
#include "intern/utildefines.h"
#include "libmv/autotrack/marker.h"
#include "libmv/autotrack/tracks.h"
using mv::Marker;
using mv::Tracks;
void libmv_apiMarkerToMarker(const libmv_Marker& libmv_marker,
Marker *marker) {
marker->clip = libmv_marker.clip;
marker->frame = libmv_marker.frame;
marker->track = libmv_marker.track;
marker->center(0) = libmv_marker.center[0];
marker->center(1) = libmv_marker.center[1];
for (int i = 0; i < 4; i++) {
marker->patch.coordinates(i, 0) = libmv_marker.patch[i][0];
marker->patch.coordinates(i, 1) = libmv_marker.patch[i][1];
}
marker->search_region.min(0) = libmv_marker.search_region_min[0];
marker->search_region.min(1) = libmv_marker.search_region_min[1];
marker->search_region.max(0) = libmv_marker.search_region_max[0];
marker->search_region.max(1) = libmv_marker.search_region_max[1];
marker->weight = libmv_marker.weight;
marker->source = (Marker::Source) libmv_marker.source;
marker->status = (Marker::Status) libmv_marker.status;
marker->reference_clip = libmv_marker.reference_clip;
marker->reference_frame = libmv_marker.reference_frame;
marker->model_type = (Marker::ModelType) libmv_marker.model_type;
marker->model_id = libmv_marker.model_id;
marker->disabled_channels = libmv_marker.disabled_channels;
}
void libmv_markerToApiMarker(const Marker& marker,
libmv_Marker *libmv_marker) {
libmv_marker->clip = marker.clip;
libmv_marker->frame = marker.frame;
libmv_marker->track = marker.track;
libmv_marker->center[0] = marker.center(0);
libmv_marker->center[1] = marker.center(1);
for (int i = 0; i < 4; i++) {
libmv_marker->patch[i][0] = marker.patch.coordinates(i, 0);
libmv_marker->patch[i][1] = marker.patch.coordinates(i, 1);
}
libmv_marker->search_region_min[0] = marker.search_region.min(0);
libmv_marker->search_region_min[1] = marker.search_region.min(1);
libmv_marker->search_region_max[0] = marker.search_region.max(0);
libmv_marker->search_region_max[1] = marker.search_region.max(1);
libmv_marker->weight = marker.weight;
libmv_marker->source = (libmv_MarkerSource) marker.source;
libmv_marker->status = (libmv_MarkerStatus) marker.status;
libmv_marker->reference_clip = marker.reference_clip;
libmv_marker->reference_frame = marker.reference_frame;
libmv_marker->model_type = (libmv_MarkerModelType) marker.model_type;
libmv_marker->model_id = marker.model_id;
libmv_marker->disabled_channels = marker.disabled_channels;
}
libmv_TracksN* libmv_tracksNewN(void) {
Tracks* tracks = LIBMV_OBJECT_NEW(Tracks);
return (libmv_TracksN*) tracks;
}
void libmv_tracksDestroyN(libmv_TracksN* libmv_tracks) {
LIBMV_OBJECT_DELETE(libmv_tracks, Tracks);
}
void libmv_tracksAddMarkerN(libmv_TracksN* libmv_tracks,
const libmv_Marker* libmv_marker) {
Marker marker;
libmv_apiMarkerToMarker(*libmv_marker, &marker);
((Tracks*) libmv_tracks)->AddMarker(marker);
}
void libmv_tracksGetMarkerN(libmv_TracksN* libmv_tracks,
int clip,
int frame,
int track,
libmv_Marker* libmv_marker) {
Marker marker;
((Tracks*) libmv_tracks)->GetMarker(clip, frame, track, &marker);
libmv_markerToApiMarker(marker, libmv_marker);
}
void libmv_tracksRemoveMarkerN(libmv_TracksN* libmv_tracks,
int clip,
int frame,
int track) {
((Tracks *) libmv_tracks)->RemoveMarker(clip, frame, track);
}
void libmv_tracksRemoveMarkersForTrack(libmv_TracksN* libmv_tracks,
int track) {
((Tracks *) libmv_tracks)->RemoveMarkersForTrack(track);
}
int libmv_tracksMaxClipN(libmv_TracksN* libmv_tracks) {
return ((Tracks*) libmv_tracks)->MaxClip();
}
int libmv_tracksMaxFrameN(libmv_TracksN* libmv_tracks, int clip) {
return ((Tracks*) libmv_tracks)->MaxFrame(clip);
}
int libmv_tracksMaxTrackN(libmv_TracksN* libmv_tracks) {
return ((Tracks*) libmv_tracks)->MaxTrack();
}
int libmv_tracksNumMarkersN(libmv_TracksN* libmv_tracks) {
return ((Tracks*) libmv_tracks)->NumMarkers();
}

129
extern/libmv/intern/tracksN.h vendored Normal file
View File

@@ -0,0 +1,129 @@
/*
* ***** 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) 2011 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
// TODO(serrgey): For the time being we're converting simple pipeline
// to an autotrack pipeline we call it tracks.
// Once we've done with porting we remove N.
#ifndef LIBMV_C_API_TRACKSN_H_
#define LIBMV_C_API_TRACKSN_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libmv_TracksN libmv_TracksN;
// Keep order in this enums exactly the same as in mv::Marker.
// Otherwise API wouldn't convert the values properly.
typedef enum libmv_MarkerSource {
LIBMV_MARKER_SOURCE_MANUAL,
LIBMV_MARKER_SOURCE_DETECTED,
LIBMV_MARKER_SOURCE_TRACKED,
LIBMV_MARKER_SOURCE_MATCHED,
LIBMV_MARKER_SOURCE_PREDICTED,
} libmv_MarkerSource;
typedef enum libmv_MarkerStatus {
LIBMV_MARKER_STATUS_UNKNOWN,
LIBMV_MARKER_STATUS_INLIER,
LIBMV_MARKER_STATUS_OUTLIER,
} libmv_MarkerStatus;
typedef enum libmv_MarkerModelType {
LIBMV_MARKER_MODEL_TYPE_POINT,
LIBMV_MARKER_MODEL_TYPE_PLANE,
LIBMV_MARKER_MODEL_TYPE_LINE,
LIBMV_MARKER_MODEL_TYPE_CUBE,
} libmv_MarkerModelType;
enum libmv_MarkerChannel {
LIBMV_MARKER_CHANNEL_R = (1 << 0),
LIBMV_MARKER_CHANNEL_G = (1 << 1),
LIBMV_MARKER_CHANNEL_B = (1 << 2),
};
typedef struct libmv_Marker {
int clip;
int frame;
int track;
float center[2];
float patch[4][2];
float search_region_min[2];
float search_region_max[2];
float weight;
libmv_MarkerSource source;
libmv_MarkerStatus status;
int reference_clip;
int reference_frame;
libmv_MarkerModelType model_type;
int model_id;
int disabled_channels;
} libmv_Marker;
#ifdef __cplusplus
namespace mv {
struct Marker;
}
void libmv_apiMarkerToMarker(const libmv_Marker& libmv_marker,
mv::Marker *marker);
void libmv_markerToApiMarker(const mv::Marker& marker,
libmv_Marker *libmv_marker);
#endif
libmv_TracksN* libmv_tracksNewN(void);
void libmv_tracksDestroyN(libmv_TracksN* libmv_tracks);
void libmv_tracksAddMarkerN(libmv_TracksN* libmv_tracks,
const libmv_Marker* libmv_marker);
void libmv_tracksGetMarkerN(libmv_TracksN* libmv_tracks,
int clip,
int frame,
int track,
libmv_Marker* libmv_marker);
void libmv_tracksRemoveMarkerN(libmv_TracksN* libmv_tracks,
int clip,
int frame,
int track);
void libmv_tracksRemoveMarkersForTrack(libmv_TracksN* libmv_tracks,
int track);
int libmv_tracksMaxClipN(libmv_TracksN* libmv_tracks);
int libmv_tracksMaxFrameN(libmv_TracksN* libmv_tracks, int clip);
int libmv_tracksMaxTrackN(libmv_TracksN* libmv_tracks);
int libmv_tracksNumMarkersN(libmv_TracksN* libmv_tracks);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_TRACKS_H_

View File

@@ -23,8 +23,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef LIBMV_C_API_INTERN_H
#define LIBMV_C_API_INTERN_H
#ifndef LIBMV_C_API_UTILDEFINES_H_
#define LIBMV_C_API_UTILDEFINES_H_
#if defined(_MSC_VER)
# define __func__ __FUNCTION__
@@ -36,24 +36,27 @@
# define LIBMV_OBJECT_NEW OBJECT_GUARDED_NEW
# define LIBMV_OBJECT_DELETE OBJECT_GUARDED_DELETE
# define LIBMV_OBJECT_DELETE OBJECT_GUARDED_DELETE
# define LIBMV_STRUCT_NEW(type, count) (type*)MEM_mallocN(sizeof(type) * count, __func__)
# define LIBMV_STRUCT_NEW(type, count) \
(type*)MEM_mallocN(sizeof(type) * count, __func__)
# define LIBMV_STRUCT_DELETE(what) MEM_freeN(what)
#else
// Need this to keep libmv-capi potentially standalone.
# if defined __GNUC__ || defined __sun
# define LIBMV_OBJECT_NEW(type, args ...) \
new(malloc(sizeof(type))) type(args)
new(malloc(sizeof(type))) type(args)
# else
# define LIBMV_OBJECT_NEW(type, ...) \
new(malloc(sizeof(type))) type(__VA_ARGS__)
new(malloc(sizeof(type))) type(__VA_ARGS__)
#endif
# define LIBMV_OBJECT_DELETE(what, type) \
{ if(what) { \
((type*)(what))->~type(); \
free(what); \
} } (void)0
{ \
if (what) { \
((type*)(what))->~type(); \
free(what); \
} \
} (void)0
# define LIBMV_STRUCT_NEW(type, count) (type*)malloc(sizeof(type) * count)
# define LIBMV_STRUCT_DELETE(what) { if (what) free(what); } (void)0
#endif
#endif // LIBMV_C_API_INTERN_H
#endif // LIBMV_C_API_UTILDEFINES_H_

File diff suppressed because it is too large Load Diff

View File

@@ -27,180 +27,16 @@
#ifndef LIBMV_C_API_H
#define LIBMV_C_API_H
#ifdef __cplusplus
extern "C" {
#endif
#include "intern/autotrack.h"
#include "intern/camera_intrinsics.h"
#include "intern/detector.h"
#include "intern/frame_accessor.h"
#include "intern/homography.h"
#include "intern/image.h"
#include "intern/logging.h"
#include "intern/reconstruction.h"
#include "intern/track_region.h"
#include "intern/tracks.h"
#include "intern/tracksN.h"
struct libmv_Tracks;
struct libmv_Reconstruction;
struct libmv_Features;
struct libmv_CameraIntrinsics;
/* Logging */
void libmv_initLogging(const char *argv0);
void libmv_startDebugLogging(void);
void libmv_setLoggingVerbosity(int verbosity);
/* Planar tracker */
typedef struct libmv_TrackRegionOptions {
int motion_model;
int num_iterations;
int use_brute;
int use_normalization;
double minimum_correlation;
double sigma;
float *image1_mask;
} libmv_TrackRegionOptions;
typedef struct libmv_TrackRegionResult {
int termination;
const char *termination_reason;
double correlation;
} libmv_TrackRegionResult;
int libmv_trackRegion(const libmv_TrackRegionOptions *options,
const float *image1, int image1_width, int image1_height,
const float *image2, int image2_width, int image2_height,
const double *x1, const double *y1,
libmv_TrackRegionResult *result,
double *x2, double *y2);
void libmv_samplePlanarPatch(const float *image,
int width, int height,
int channels,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
const float *mask,
float *patch,
double *warped_position_x, double *warped_position_y);
void libmv_samplePlanarPatchByte(const unsigned char *image,
int width, int height,
int channels,
const double *xs, const double *ys,
int num_samples_x, int num_samples_y,
const float *mask,
unsigned char *patch,
double *warped_position_x, double *warped_position_y);
/* Tracks */
struct libmv_Tracks *libmv_tracksNew(void);
void libmv_tracksDestroy(struct libmv_Tracks *libmv_tracks);
void libmv_tracksInsert(struct libmv_Tracks *libmv_tracks, int image, int track, double x, double y, double weight);
/* Reconstruction */
#define LIBMV_REFINE_FOCAL_LENGTH (1 << 0)
#define LIBMV_REFINE_PRINCIPAL_POINT (1 << 1)
#define LIBMV_REFINE_RADIAL_DISTORTION_K1 (1 << 2)
#define LIBMV_REFINE_RADIAL_DISTORTION_K2 (1 << 4)
enum {
LIBMV_DISTORTION_MODEL_POLYNOMIAL = 0,
LIBMV_DISTORTION_MODEL_DIVISION = 1,
};
typedef struct libmv_CameraIntrinsicsOptions {
/* Common settings of all distortion models. */
int distortion_model;
int image_width, image_height;
double focal_length;
double principal_point_x, principal_point_y;
/* Radial distortion model. */
double polynomial_k1, polynomial_k2, polynomial_k3;
double polynomial_p1, polynomial_p2;
/* Division distortion model. */
double division_k1, division_k2;
} libmv_CameraIntrinsicsOptions;
typedef struct libmv_ReconstructionOptions {
int select_keyframes;
int keyframe1, keyframe2;
int refine_intrinsics;
} libmv_ReconstructionOptions;
typedef void (*reconstruct_progress_update_cb) (void *customdata, double progress, const char *message);
struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks *libmv_tracks,
const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
libmv_ReconstructionOptions *libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata);
struct libmv_Reconstruction *libmv_solveModal(const struct libmv_Tracks *libmv_tracks,
const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
const libmv_ReconstructionOptions *libmv_reconstruction_options,
reconstruct_progress_update_cb progress_update_callback,
void *callback_customdata);
void libmv_reconstructionDestroy(struct libmv_Reconstruction *libmv_reconstruction);
int libmv_reprojectionPointForTrack(const struct libmv_Reconstruction *libmv_reconstruction, int track, double pos[3]);
double libmv_reprojectionErrorForTrack(const struct libmv_Reconstruction *libmv_reconstruction, int track);
double libmv_reprojectionErrorForImage(const struct libmv_Reconstruction *libmv_reconstruction, int image);
int libmv_reprojectionCameraForImage(const struct libmv_Reconstruction *libmv_reconstruction,
int image, double mat[4][4]);
double libmv_reprojectionError(const struct libmv_Reconstruction *libmv_reconstruction);
struct libmv_CameraIntrinsics *libmv_reconstructionExtractIntrinsics(struct libmv_Reconstruction *libmv_Reconstruction);
/* Feature detector */
enum {
LIBMV_DETECTOR_FAST,
LIBMV_DETECTOR_MORAVEC,
LIBMV_DETECTOR_HARRIS,
};
typedef struct libmv_DetectOptions {
int detector;
int margin;
int min_distance;
int fast_min_trackness;
int moravec_max_count;
unsigned char *moravec_pattern;
double harris_threshold;
} libmv_DetectOptions;
struct libmv_Features *libmv_detectFeaturesByte(const unsigned char *image_buffer,
int width, int height, int channels,
libmv_DetectOptions *options);
struct libmv_Features *libmv_detectFeaturesFloat(const float *image_buffer,
int width, int height, int channels,
libmv_DetectOptions *options);
void libmv_featuresDestroy(struct libmv_Features *libmv_features);
int libmv_countFeatures(const struct libmv_Features *libmv_features);
void libmv_getFeature(const struct libmv_Features *libmv_features, int number, double *x, double *y, double *score,
double *size);
/* Camera intrinsics */
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options);
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(const struct libmv_CameraIntrinsics *libmv_intrinsics);
void libmv_cameraIntrinsicsDestroy(struct libmv_CameraIntrinsics *libmv_intrinsics);
void libmv_cameraIntrinsicsUpdate(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
struct libmv_CameraIntrinsics *libmv_intrinsics);
void libmv_cameraIntrinsicsSetThreads(struct libmv_CameraIntrinsics *libmv_intrinsics, int threads);
void libmv_cameraIntrinsicsExtractOptions(
const struct libmv_CameraIntrinsics *libmv_intrinsics,
struct libmv_CameraIntrinsicsOptions *camera_intrinsics_options);
void libmv_cameraIntrinsicsUndistortByte(const struct libmv_CameraIntrinsics *libmv_intrinsics,
unsigned char *src, unsigned char *dst, int width, int height,
float overscan, int channels);
void libmv_cameraIntrinsicsUndistortFloat(const struct libmv_CameraIntrinsics *libmv_intrinsics,
float *src, float *dst, int width, int height,
float overscan, int channels);
void libmv_cameraIntrinsicsDistortByte(const struct libmv_CameraIntrinsics *libmv_intrinsics,
unsigned char *src, unsigned char *dst, int width, int height,
float overscan, int channels);
void libmv_cameraIntrinsicsDistortFloat(const struct libmv_CameraIntrinsics *libmv_intrinsics,
float *src, float *dst, int width, int height,
float overscan, int channels);
void libmv_cameraIntrinsicsApply(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
double x, double y, double *x1, double *y1);
void libmv_cameraIntrinsicsInvert(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
double x, double y, double *x1, double *y1);
void libmv_homography2DFromCorrespondencesEuc(double (*x1)[2], double (*x2)[2], int num_points, double H[3][3]);
#ifdef __cplusplus
}
#endif
#endif // LIBMV_C_API_H
#endif // LIBMV_C_API_H

View File

@@ -1,293 +0,0 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2013 Blender Foundation.
* All rights reserved.
*
* Contributor(s): Blender Foundation,
* Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef WITH_LIBMV
#include "libmv-capi.h"
#include <cstdlib>
#include <cstring>
/* ************ Logging ************ */
void libmv_initLogging(const char * /*argv0*/)
{
}
void libmv_startDebugLogging(void)
{
}
void libmv_setLoggingVerbosity(int /*verbosity*/)
{
}
/* ************ Planar tracker ************ */
/* TrackRegion (new planar tracker) */
int libmv_trackRegion(const libmv_TrackRegionOptions * /*options*/,
const float * /*image1*/, int /*image1_width*/, int /*image1_height*/,
const float * /*image2*/, int /*image2_width*/, int /*image2_height*/,
const double *x1, const double *y1,
libmv_TrackRegionResult *result,
double *x2, double *y2)
{
/* Convert to doubles for the libmv api. The four corners and the center. */
for (int i = 0; i < 5; ++i) {
x2[i] = x1[i];
y2[i] = y1[i];
}
result->termination = -1;
result->termination_reason = "Built without libmv support";
result->correlation = 0.0;
return false;
}
void libmv_samplePlanarPatch(const float * /*image*/,
int /*width*/, int /*height*/, int /*channels*/,
const double * /*xs*/, const double * /*ys*/,
int /*num_samples_x*/, int /*num_samples_y*/,
const float * /*mask*/,
float * /*patch*/,
double * /*warped_position_x*/, double * /*warped_position_y*/)
{
/* TODO(sergey): implement */
}
void libmv_samplePlanarPatchByte(const unsigned char * /*image*/,
int /*width*/, int /*height*/, int /*channels*/,
const double * /*xs*/, const double * /*ys*/,
int /*num_samples_x*/, int /*num_samples_y*/,
const float * /*mask*/,
unsigned char * /*patch*/,
double * /*warped_position_x*/, double * /*warped_position_y*/)
{
/* TODO(sergey): implement */
}
/* ************ Tracks ************ */
struct libmv_Tracks *libmv_tracksNew(void)
{
return NULL;
}
void libmv_tracksInsert(struct libmv_Tracks * /*libmv_tracks*/, int /*image*/,
int /*track*/, double /*x*/, double /*y*/, double /*weight*/)
{
}
void libmv_tracksDestroy(struct libmv_Tracks * /*libmv_tracks*/)
{
}
/* ************ Reconstruction solver ************ */
struct libmv_Reconstruction *libmv_solveReconstruction(const struct libmv_Tracks * /*libmv_tracks*/,
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
libmv_ReconstructionOptions * /*libmv_reconstruction_options*/,
reconstruct_progress_update_cb /*progress_update_callback*/,
void * /*callback_customdata*/)
{
return NULL;
}
struct libmv_Reconstruction *libmv_solveModal(const struct libmv_Tracks * /*libmv_tracks*/,
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
const libmv_ReconstructionOptions * /*libmv_reconstruction_options*/,
reconstruct_progress_update_cb /*progress_update_callback*/,
void * /*callback_customdata*/)
{
return NULL;
}
int libmv_reprojectionPointForTrack(const struct libmv_Reconstruction * /*libmv_reconstruction*/,
int /*track*/, double /*pos*/[3])
{
return 0;
}
double libmv_reprojectionErrorForTrack(const struct libmv_Reconstruction * /*libmv_reconstruction*/, int /*track*/)
{
return 0.0;
}
double libmv_reprojectionErrorForImage(const struct libmv_Reconstruction * /*libmv_reconstruction*/, int /*image*/)
{
return 0.0;
}
int libmv_reprojectionCameraForImage(const struct libmv_Reconstruction * /*libmv_reconstruction*/, int /*image*/,
double /*mat*/[4][4])
{
return 0;
}
double libmv_reprojectionError(const struct libmv_Reconstruction * /*libmv_reconstruction*/)
{
return 0.0;
}
void libmv_reconstructionDestroy(struct libmv_Reconstruction * /*libmv_reconstruction*/)
{
}
/* ************ feature detector ************ */
struct libmv_Features *libmv_detectFeaturesByte(const unsigned char */*image_buffer*/,
int /*width*/, int /*height*/, int /*channels*/,
libmv_DetectOptions */*options*/)
{
return NULL;
}
struct libmv_Features *libmv_detectFeaturesFloat(const float */*image_buffer*/,
int /*width*/, int /*height*/, int /*channels*/,
libmv_DetectOptions */*options*/)
{
return NULL;
}
int libmv_countFeatures(const struct libmv_Features * /*libmv_features*/)
{
return 0;
}
void libmv_getFeature(const struct libmv_Features * /*libmv_features*/, int /*number*/,
double *x, double *y, double *score, double *size)
{
*x = 0.0;
*y = 0.0;
*score = 0.0;
*size = 0.0;
}
void libmv_featuresDestroy(struct libmv_Features * /*libmv_features*/)
{
}
/* ************ camera intrinsics ************ */
struct libmv_CameraIntrinsics *libmv_reconstructionExtractIntrinsics(
struct libmv_Reconstruction * /*libmv_reconstruction*/)
{
return NULL;
}
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsNew(
const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/)
{
return NULL;
}
struct libmv_CameraIntrinsics *libmv_cameraIntrinsicsCopy(const libmv_CameraIntrinsics * /*libmvIntrinsics*/)
{
return NULL;
}
void libmv_cameraIntrinsicsDestroy(struct libmv_CameraIntrinsics * /*libmvIntrinsics*/)
{
}
void libmv_cameraIntrinsicsUpdate(const libmv_CameraIntrinsicsOptions * /*libmv_camera_intrinsics_options*/,
struct libmv_CameraIntrinsics * /*libmv_intrinsics*/)
{
}
void libmv_cameraIntrinsicsSetThreads(struct libmv_CameraIntrinsics * /*libmv_intrinsics*/, int /*threads*/)
{
}
void libmv_cameraIntrinsicsExtractOptions(
const libmv_CameraIntrinsics */*libmv_intrinsics*/,
libmv_CameraIntrinsicsOptions *camera_intrinsics_options)
{
memset(camera_intrinsics_options, 0, sizeof(libmv_CameraIntrinsicsOptions));
camera_intrinsics_options->focal_length = 1.0;
}
void libmv_cameraIntrinsicsUndistortByte(const struct libmv_CameraIntrinsics * /*libmv_intrinsics*/,
unsigned char *src, unsigned char *dst, int width, int height,
float overscan, int channels)
{
memcpy(dst, src, channels * width * height * sizeof(unsigned char));
}
void libmv_cameraIntrinsicsUndistortFloat(const struct libmv_CameraIntrinsics * /*libmvIntrinsics*/,
float *src, float *dst, int width, int height, float overscan, int channels)
{
memcpy(dst, src, channels * width * height * sizeof(float));
}
void libmv_cameraIntrinsicsDistortByte(const struct libmv_CameraIntrinsics *libmvIntrinsics,
unsigned char *src, unsigned char *dst, int width, int height,
float overscan, int channels)
{
memcpy(dst, src, channels * width * height * sizeof(unsigned char));
}
void libmv_cameraIntrinsicsDistortFloat(const struct libmv_CameraIntrinsics *libmvIntrinsics,
float *src, float *dst, int width, int height, float overscan, int channels)
{
memcpy(dst, src, channels * width * height * sizeof(float));
}
/* ************ utils ************ */
void libmv_cameraIntrinsicsApply(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
double x, double y, double *x1, double *y1)
{
double focal_length = libmv_camera_intrinsics_options->focal_length;
double principal_x = libmv_camera_intrinsics_options->principal_point_x;
double principal_y = libmv_camera_intrinsics_options->principal_point_y;
*x1 = x * focal_length + principal_x;
*y1 = y * focal_length + principal_y;
}
void libmv_cameraIntrinsicsInvert(const libmv_CameraIntrinsicsOptions *libmv_camera_intrinsics_options,
double x, double y, double *x1, double *y1)
{
double focal_length = libmv_camera_intrinsics_options->focal_length;
double principal_x = libmv_camera_intrinsics_options->principal_point_x;
double principal_y = libmv_camera_intrinsics_options->principal_point_y;
*x1 = (x - principal_x) / focal_length;
*y1 = (y - principal_y) / focal_length;
}
void libmv_homography2DFromCorrespondencesEuc(double (* /* x1 */)[2], double (* /* x2 */)[2], int /* num_points */,
double H[3][3])
{
memset(H, 0, sizeof(double[3][3]));
H[0][0] = 1.0f;
H[1][1] = 1.0f;
H[2][2] = 1.0f;
}
#endif // ifndef WITH_LIBMV

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