Compare commits

...

5406 Commits

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

- Fist/last frame calculation was wrong

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

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

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

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

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

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

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

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

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

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

Reviewers: moguri

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

Patch Author: avrprj

Reviewers: moguri

Projects: #game_logic

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton, sergey, jwilkins

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

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

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

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

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

Differential: D842

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

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

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

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

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

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

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

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

What is included:

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

Reviewers: campbellbarton

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

Subscribers: sergey

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

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

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

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

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

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

Reviewers: campbellbarton

Subscribers: sergey

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

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

Solved by stopping preview jobs when changing environment map.

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

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

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

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

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

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

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

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

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

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

Reviewers: psy-fi

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Projects: #bf_blender

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

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

Reviewers: brecht

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

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

mainly:
- API function calls
- enum values

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

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

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

Reviewers: lukastoenne, campbellbarton

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This API currently contanins:

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

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

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

Example usage:

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

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

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

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

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

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

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

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

Closes T42228

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

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

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

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

Reviewers: campbellbarton

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

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

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

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

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

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

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

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

This completes reverting D785

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

This shouldn't have got through the review.

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

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

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

Author: flokkievids (Folkert de Vries)

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

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

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

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

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

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

Some comparison images are available there

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

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* You can see the clicking area when debug is 1

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

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

[1] actual code review
[2] design review

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

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

This fixes T42209

Reviewers: lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T42209

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

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

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

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

The present fix reverts the aforementioned code changes.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: venomgfx, campbellbarton

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

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

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

Some minor edits were made by the reviewer.

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

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

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Subscribers: campbellbarton, kevindietrich, jezv

Projects: #quick_hacks, #bf_blender, #physics

Maniphest Tasks: T37873

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

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

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

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

Reviewers: campbellbarton, venomgfx

Reviewed By: venomgfx

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

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

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

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

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

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

Discussed during Sunday's meeting.

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

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

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

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

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

This is a bit experimental still, feedback is welcome.

Reviewers: jbakker, lukastoenne

Subscribers: ton

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: ton, campbellbarton

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

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

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

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

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

Tests:

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

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

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

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

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

Author: flokkievids (Folkert de Vries)

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

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

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

Reviewers: sergey

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

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

Also fix gaussian distibution for blurring

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

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

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

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

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

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

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

Reviewers: campbellbarton

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

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

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

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

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

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

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

Reviewers: brecht, juicyfruit, dingto

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

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

Reviewers: brecht, juicyfruit, dingto

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: dingto, sergey

Reviewed By: dingto, sergey

Subscribers: dingto

Projects: #cycles

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Added Smoke + Fire type to the operator too.

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

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

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

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

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

Reviewers: campbellbarton, carter2422, venomgfx

Subscribers: fsiddi

Maniphest Tasks: T41593

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

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

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

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

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

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

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

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

Author: flokkievids (Folkert de Vries)

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

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

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

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

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

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

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

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

Extra:

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

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

Reviewed By: sergey, dingto

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

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

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

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

Pretty much basic functionality, but quite useful in practice.

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

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

Reviewers: sergey

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

Reviewers: psy-fi

Maniphest Tasks: T41456

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

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

This also fixes T41440: Displacement in compositing creates holes

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T41440

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

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

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

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

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

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

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

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

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

Reviewers: sergey

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

turns out this hides conflicts which we may want to see
2014-08-08 06:00:49 +10:00
7d20ad6a1b ignore conflict files 2014-08-08 05:47:15 +10:00
9a8e889dfc Fix T41173: CM view selection is difficult with multiple views
Use drop-down menu instead of expanded enum for the view select.
There are usually more views than displays and using drop-down
for display device and expanded enum for view is kindof strange.
2014-08-08 01:30:22 +06:00
e1819cc918 Fix T40948: Fill holes fails in certain case 2014-08-08 04:30:24 +10:00
57c4871146 Tweaks to the recent wrapper on windows
- Forgot to handle command line arguments

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

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

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

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

Reviewers: campbellbarton, juicyfruit

Reviewed By: juicyfruit

Differential Revision: https://developer.blender.org/D717
2014-08-07 21:45:24 +06:00
26dc8b7c18 T41354, cursor never gets reactivated in uv sculpting. 2014-08-07 16:14:33 +02:00
05935b54fa Fix crash on dyntopo when show diffuse option + collapse is used
Some nodes could end up without any faces and in that case getting a
face material would fail.
2014-08-07 14:58:15 +02:00
ab8bcd4038 Fix T41333: Selected mask points don't stand out visually.
Looks like mask points coloring was recently changed, and IMAGE space colors were left uninitialized...
Factorized a bit the code about vertex_handle & co too, was quite duplicated.
2014-08-07 14:37:40 +02:00
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
f82dda557c Experimental gooseberry request:
Expose radial control properties. That way, the operator can be tweaked
in the input preferences to tweak other properties as well.
2014-08-07 12:29:50 +02:00
Martijn Berger
d1217cc4b2 change scons default to be visual studio 2013 2014-08-07 10:06:13 +02:00
0b6412607f Comments 2014-08-07 14:42:47 +10:00
e13d6e2768 BMesh: use existing lookup tables when remapping 2014-08-07 11:50:53 +10:00
1b6864752f GHash/EdgeHash: avoid NULL check on iterator init 2014-08-07 11:19:55 +10:00
ea30641d90 Fix T41047: Text objects flipping 2014-08-07 09:14:54 +10:00
1923a5c134 UI: move button to set dupli-offset into group menu 2014-08-07 04:45:37 +10:00
f37c3dd6a6 Fix T41323: Sequencer: video window taking all the place when switching to split view.
Issue is that, when we switch from full preview view to combined view, preview area has
its `sizey` set to use all available height, which leaves nothing for poor main area.

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

* Remove group from all objects
* Select objects in group

More could be added possibly in the future.

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

Reviewed By: campbellbarton

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

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

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

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

Reviewers: sergey

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

Reviewers: sergey

Reviewed By: sergey

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

Reviewed By: campbellbarton

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

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

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

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

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

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

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

Reviewers: juicyfruit, dingto, campbellbarton

Reviewed By: juicyfruit, dingto, campbellbarton

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

Changes needed to support this are:

- menu item is activated on popup menus
  (to avoid relying on mouse-over)
- moving mouse away from menu items only de-activates when over a new menu-item.
- Mouse clicks are ignored if they are not directly over the menu item.
2014-08-03 20:35:28 +10:00
e7b396c954 fix check for not llvm 2014-08-02 15:30:28 +02:00
249fbbf764 Collada and llvm both use the same functions and they clash.
Since we have older llvm for msvc2008 and new one for msvc2013 we need to work around it.
2014-08-02 15:20:03 +02:00
d5b471eec1 CMake: add header 2014-08-02 19:16:00 +10:00
88a0d5ebe8 Make CHECK_TYPE_NONCONST macro portable
also replace __typeof -> typeof
2014-08-02 18:08:44 +10:00
d98b6a289c BMesh: typecheck iterator 2014-08-02 18:05:13 +10:00
bc9bbca41b Move to OIIO 1.4 also for windows x86 2014-08-02 09:59:09 +02:00
9c3025cd26 Spelling 2014-08-02 16:53:52 +10:00
7b83e3d6d7 CMake: tweak so 2.8.7 and older still work (disable WITH_BUILDINFO) 2014-08-02 03:08:29 +10:00
3c9e11df37 Cleanup: Move SpaceTransform helpers from BKE_shrinkwrap to BLI_math_matrix. 2014-08-01 16:31:06 +02:00
c11777b211 Cleanup: Move object_get_derived_final from BKE_shrinkwrap to BKE_DerivedMesh
Note this func needs some love, but this will be for later (should never have been in shrinkwrap code!).
2014-08-01 16:31:06 +02:00
59f4ba854b Cycles: Update stdosl.h for OSL 1.5. 2014-08-01 15:23:58 +02:00
f51282fc57 Cmake prefers NOT to ! 2014-08-01 15:18:34 +02:00
0d1484e4ad Make function definition consistent with function declaration (as discussed with campbell) 2014-08-01 14:32:04 +02:00
6d7333a2f5 Fix msvc 2013 / win64 to use new OIIO and llvm and resulting linking
requirements
2014-08-01 14:28:00 +02:00
7f32cf4605 Prevent macros hiding casts from const pointers 2014-08-01 22:03:03 +10:00
c9366a2969 Make build work with llvm3.4 and oiio 1.4 2014-08-01 13:43:12 +02:00
42aef164f4 Fix T41197: Blender freezes to infinite loop when switching to PAUSED Cycles rendered viewport 2014-08-01 16:57:43 +06:00
2f2bf513e9 Revert "Fix T41226: Wrong Undo on curves and hooks"
This reverts commit e042c8428f.

Proper fix will come later, or be declared a TODO.
2014-08-01 12:30:41 +06:00
3e607f61b5 OSX/cmake: adapt bundle structure according scons 2014-08-01 01:23:31 +02:00
Dalai Felinto
7f9a4c0c42 Bake-API: cleanup - missing (size_t) promotion 2014-07-31 20:09:07 -03:00
23190c3c73 OSX: updated codesigning README and removed not longer valid rule plists 2014-08-01 01:01:12 +02:00
a4c287ed7d OSX/scons: Change Blender bundle datastructures + referennces to match the upcoming codesigning needs
- i used deprecated rules up to now which will break in OSX > 10.9.5 and 10.10 > dp4
- todo: adapt cmake due it will break with this commit
2014-08-01 00:57:17 +02:00
54472df750 Fix T41236: Rendered viewport doesn't update with material actions
The issue was caused by NLA evaluation without actions not setting
id's flag as updated (as that's happening when action writes data
to the ID datablock).

Added the same flag set for the NLA evaluation as what's happening
for actions.
2014-07-31 22:06:05 +06:00
da638d49e3 Style cleanup 2014-08-01 02:03:09 +10:00
5e3af04b08 Fix build player... 2014-07-31 17:34:13 +02:00
4f18ab1b20 Fix T40958 align rotation + project individual elements not working
This is another example of transform code crappiness. Projection
snapping for objects is handled separately than regular snapping.
Luckilly for us, we have the normal ready from the raycast result and a
copy of code from ElementRotation function can do the necessary
rotations for us.

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

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

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

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

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

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

Thanks Campbell for the review!

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

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

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

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

Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D688
2014-07-31 00:35:16 -03:00
5e4a97d109 Default LLVM_STATIC to OFF (it's kinda broken currently, gives various linking issues). 2014-07-30 20:31:13 +02:00
b4bda0390d user lower threshold for Harris feature detector 2014-07-30 22:27:41 +06:00
099038a6f9 BLI_path_utils: rename BLI_clean -> BLI_path_native_slash 2014-07-31 01:40:47 +10:00
fa8d38da74 Fix T41241: VSE: cropping strips puts a transparent line through the image. 2014-07-30 17:29:06 +02:00
70d69aa2ae Code cleanup, make pie-menus code be closer to master 2014-07-30 15:51:12 +02:00
3a58c4679a Fix addon crash when trying listdir a directory we have no permission to. 2014-07-30 15:35:19 +02:00
74758576fc Cleanup: general cleanup in BLI_math code (mostly, use 'const' where possible, true/false for booleans, format for float litterals). 2014-07-30 12:19:41 +02:00
eea7521e21 leanup: style, use 'const' where possible, and simplified blend funcs.
Much better to use small loops when doing complex operations over color elements
(any serious compiler will flatten them anyway), avoids (some!) stupid mistakes when
editing their code.

Also, use min/max funcs instead of lengthier 'if (foo < 0) foo = 0'.
2014-07-30 12:19:41 +02:00
14297dd2fd Automatic commit by arc 2014-07-30 12:02:33 +02:00
4849583e24 BMesh: callback for bmbvh so caller can choose faces 2014-07-30 16:50:28 +10:00
3a4e8f8184 Bugfix T41240: Home key doesn't show everything on F-Curves
Own copy and paste typo in 73d157e meant that this was not in some cases,
the bounds calculated may be incorrect.
2014-07-30 18:16:09 +12:00
f06be2b4f4 missed last commit 2014-07-30 15:02:42 +10:00
b64e36d26d BLI_listbase: consistent name prefix 2014-07-30 15:01:16 +10:00
ce0ff266e9 GHash: generic comparison for int[4] 2014-07-30 07:30:18 +10:00
c4dd294f40 OSX/buildbot: after recent scons fix, UTF lib linkage is handled dependent on config, so remove now obsolete lines 2014-07-29 20:08:41 +02:00
f557b477ad OSX/cmake: fix linking utf-functions if llvm is disabled 2014-07-29 19:46:15 +02:00
42ba931fed Fix T41223: F-Curve sliders won't update values during playback when mouse cursor is outside the left panel. 2014-07-29 15:31:53 +02:00
976526559d Fix T41228: Selection of bones bug.
Turns out to be mostly some cleanup in Pose select code, got rid of magic numbers
(now understand usual SEL_xxx enums) in ED_pose_deselectall(), which was renamed
to ED_pose_de_selectall, and have a new bool parameter to ignore visibility status
in its process (was the root of the reported issue).

Also factorized slightly "(de)select all" code. Yet this area could use much more
cleanup probably...
2014-07-29 15:02:28 +02:00
e0fd1bf432 Fix T41227: Do not select unselectable items when unhiding them! 2014-07-29 12:58:12 +02:00
946f291c46 Fix T41174: Tangent space required UV map in Cycles
Now Cycles behaves in the same way as BI in terms of using
sphere projection of orco coordinates if there's no UV map
when calculating tangent space.
2014-07-29 16:08:47 +06:00
a9c8a117a2 OSX/scons: Fix linking if llvm is not used ( new osl/llvm/oiio related ) 2014-07-29 10:59:57 +02:00
564c48a068 Cycles: Make Glass Shader Color default to 1.0.
This came up a few times already, most of the time you want a clear white glass, and not a greyish like one. :)
2014-07-29 10:11:30 +02:00
65bf694331 Implement get_split_task_count to make device_network compile again. 2014-07-29 07:40:04 +02:00
8f947ff34a BGE: Constraint wrapper fix.
1. This patch fix the KX_ConstraintWrapper documentation (radian instead of degrees).
2. It also adds the missing GENERIC_6DOF_CONSTRAINT constant.

Reviewers: dfelinto

Reviewed By: dfelinto

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

Subscribers: thatonejonguy

Projects: #game_engine

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

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

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

I know it's all rather annoying, but no that much
choise is in here..
2014-07-28 23:16:39 +06:00
2c51978d2b Switch buildbot to new llvm/oiio/osl 2014-07-28 23:00:21 +06:00
c85265b455 Make requests python package to be detected in the same way as numpy
This solves missing requests package reported on the systems where it's
located in dist-packages rather than in site-packages.

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D686
2014-07-28 20:53:02 +06:00
c4b47b89f7 Fix T41191: Face snapping doesn't work properly.
Issue was caused by rB47ec0394ca3d, which disabled BBox check in editmode - but bbox check was also
setting `len_diff`, which is mandatory when doing ray_start_local correction for ortho view...

Now, in this case, we do a quick rough compute of len_diff from vertices coordinates (accuracy is not
needed here, we just have to be sure corrected `ray_start_local` remains 'before' (outside) of the
geometry).
2014-07-28 15:21:42 +02:00
1a9252d97e Fix T41206: Render Border - Operator Panel - Only Camera - Broken?
This is rather internal use only, no need to expose this option to
the redo panel.
2014-07-28 17:18:08 +06:00
d49b86d0f9 Fix T41201: Blender Crashes when UV Editing
Disable adding snapping point outside of 3D space for now,
visualization of the points is not implemented outside of
this space and silently adding them wouldn't really be a
good idea.
2014-07-28 17:11:41 +06:00
93d0a2c224 Warnings 2014-07-28 20:45:36 +10:00
baa58c7db4 Reduce OM limit for sculpting after discussion with Antony
That's rather tricky to think of a good threshold here, and
maybe we'd better use something based on the number of faces
instead.

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

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

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

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

Reviewers: sergey

Differential Revision: https://developer.blender.org/D656
2014-07-25 11:42:53 -03:00
2e50b4dc51 Minor changes:
* Changing UV map updates the UV editor.
* UV Layer -> UV Map
2014-07-25 15:27:17 +02:00
Martijn Berger
bae2b3a688 Switch to Cuda 4.0 style api for kernel invocation. This is a small clean-up that has no functional changes but makes code a bit more readable.
Differential revision: https://developer.blender.org/D659

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

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

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

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

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

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

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

Author: flokkievids (Folkert de Vries)

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

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

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

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

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

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

Reviewers: lukastoenne, campbellbarton

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

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

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

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

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

patch by me with edits and review by Campbell.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

For full list of features see:

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

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

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

Reviewers: psy-fi, sergey

Subscribers: campbellbarton

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: moguri

Reviewed By: moguri

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

Reviewers: moguri

Reviewed By: moguri

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

Reviewers: moguri

Reviewed By: moguri

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

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

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

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

Reviewers: mont29

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

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

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

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

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

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

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

Test file is here: {F97623}

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

{F91992} {F91990}

Reviewers: moguri, dfelinto

Reviewed By: moguri

CC: Genome36

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

This patch is a updated version of T33701.

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

Reviewers: moguri

Reviewed By: moguri

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: #python, pkrime, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D522
2014-07-09 10:28:40 +02:00
02eb03f868 Freestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator. 2014-07-09 14:52:08 +09:00
9c48ea3979 Math Lib: add function to get signed angle about an axis 2014-07-09 11:15:08 +10:00
f4484daed3 Correct IS_EMPTY macro
also prevent reading from BM_ELEM_API_FLAG_ get/setters
2014-07-09 07:53:43 +10:00
a83c6293f4 OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
2014-07-08 23:35:04 +02:00
9605e0bfb6 OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated
2014-07-08 17:03:44 +02:00
330633f063 Fix T40785: "Select Grouped" Pass Index mode is redundant.
Revert "Object Select Similar tool now has a Pass Index option."

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

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

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

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

Now, we have the following function:

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

Reviewers: moguri, dfelinto, brita_

Reviewed By: moguri

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Based on patch D288 by Cruentus_Nex (Steve).

Reviewed by Campbell Barton, thanks!

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

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

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

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

Differential revision: https://developer.blender.org/D594
Reviewed by: campbellbarton
2014-07-01 15:01:35 +09:00
9f05588b68 Python: remove redundant casts 2014-07-01 14:10:59 +10:00
c92c3ef611 Fix T40761: Bone constraints broken in the BGE
Extra bonus: calculating bone constraints now happens parallel!
2014-06-30 21:00:46 -07:00
2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
17f6d8337d Usual UI messages fixes. 2014-06-30 20:48:02 +02:00
00e98bf3ec Correct use-after-free in recent commit 2014-07-01 04:11:05 +10:00
ed871df836 Fix odd situation where you could assign a background image without increasing its usercount.
Probably a leftover from old code, I don't think this invoke usage of VIEW3D_OT_background_image_add
was actually reachable anywhere from the UI, but managed to get it working from py, without increasing
user count...
2014-06-30 19:37:36 +02:00
320b7a59c3 Fix image user count not being decreased when deleting a 3DView background image.
Patch by julien (Julien DUROURE) as T40568 (with own minor style edits), many thanks!
2014-06-30 19:37:36 +02:00
a51aeedade Experiment with the compositor border in editor
Preserve buffer form previous runs so it's possible to make
a compo of full frame, then draw a border and start tweaking
nodes and see updates in that border.

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

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

Reviewers: lukastoenne, jbakker

CC: venomgfx, sebastian_k

Differential Revision: https://developer.blender.org/D582
2014-06-30 23:01:20 +06:00
e919a37e97 Fix T40818: libpng warning: iCCP: known incorrect sRGB profile
Suppress warning for now, it's harmless and only happens
with new libpng.

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

TODO: CPU code seems to have different branching in conditions
which made me thinking it does different things with volume
attenuation, but from the render results it seems the same
exact things are happening there. Worth looking into making
simplifying code a bit here to improve readability.
2014-06-30 16:24:43 +06:00
cadf77d5ef Fix T40862: numinput transform did not take into account scale_length. 2014-06-30 10:57:39 +02:00
61e1ea382b Use text cursor for py-console 2014-06-30 18:12:29 +10:00
730a1556a6 Fix T40867: Autokeyframe in camera view 2014-06-30 13:37:37 +10:00
5588e45f01 BLI_stack, use memory chunks rather then realloc when resizing 2014-06-30 11:55:01 +10:00
228361973d Add BLI_stack test 2014-06-30 11:55:01 +10:00
ea3c2eb15d Attempt to fix T40833: Crash when rendering with freestyle.
Constant crashes under Linux seem due to an uninitialized variable.
2014-06-30 09:42:37 +09:00
f3f991c80f Install_deps: fix for clang url issue.
Newest clang would use 'cfe-' prefix instead of 'clang-' one - don’t ask me why...
Had to make a wrapper around wget, that:
* Accepts an array of URLs as first parameter;
* Errors and exits when wget fails for some reason (was silent before).

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

Path to save cached render results is an UserPreferences setting.

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

Reviewers: campbellbarton, sergey

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

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

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

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

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

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D581
2014-06-27 14:08:27 +06:00
0a0e4e0e69 Fix for DeviceScene::attributes_uchar4 not released properly
Reviewed by: dingto
Differential Revision: https://developer.blender.org/D620
2014-06-27 08:56:57 +02:00
bd777ffd3b Follow up to previous commit, do not calculate normal now with front
facing.
2014-06-27 01:55:30 +03:00
dbc04c594b Fix T40758 Front facing not consistent in sculpt mode.
Some tools used view vector while others used the area normal.

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

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

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

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

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

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

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

{F94520}

{F91859}

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

Reviewers: moguri

Reviewed By: moguri

CC: gomer, lordodin

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

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

This is to be included to the final release.
2014-06-25 15:38:40 +06:00
0529766f32 Use api function for flipping button list & rename to BLI_listbase_reverse 2014-06-25 19:33:35 +10:00
833c03791f Use fill function for setting origindex 2014-06-25 19:29:06 +10:00
92733179ae Speedup for skin modifier, avoid calculating normals many times 2014-06-25 19:02:49 +10:00
72f77dd69a Fix T40786: Crash setting negative sound offset 2014-06-25 16:45:03 +10:00
d411e1548c Correction to last commit 2014-06-25 04:22:14 +10:00
df1c400420 Use gnu-libc arg order for BLI_sort_r
When building on gnu-libc don't use our own implementation.
2014-06-25 04:04:52 +10:00
04648767fa Make main library safe(er) for the threaded usage
Added a lock to the Main which is getting acquired and released
when modifying it's lists.

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

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

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

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


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

Author: flokkievids (Folkert de Vries)

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

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

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

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

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

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

Reviewers: campbellbarton, brecht, sergey

Reviewed By: campbellbarton, sergey

CC: sergey

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

Reviewers: campbellbarton, dingto

CC: sebastian_k, fsiddi, venomgfx

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

This commit should be backported to 2.71 branch.
2014-06-20 10:21:39 +02:00
a5a869c579 Fix 2 GLSL errors, with Cycles Hair BSDF. 2014-06-20 09:36:25 +02:00
8660a0cab3 UI: auto-open other menus by hovering over, once a menu is already open
D590 by Matthew Reid
2014-06-20 17:34:21 +10:00
ead83a48f1 Fix T40692, Checker Texture derivation on very large scales (1k).
It might still have a derivation on larger scales (10k or more), but we need some offset to avoid precision issues on unit coordinates.
2014-06-20 09:03:22 +02:00
84e8cabac6 Fix T40697: Skinned meshes with shapekeys crashing in the BGE 2014-06-19 18:20:56 -07:00
d43ba1b33c Cycles: Make Volume Bounces default to 0. This is quiet a bit faster, and produces less noise. 2014-06-19 19:05:06 +02:00
f763b3ba36 RNA: Expose hook centre
D529 by Gottfried Hofmann
2014-06-20 02:34:26 +10:00
2dce13d213 Python: Remove deprecated uses of os.popen
T40415 by Lawrence D'Oliveiro
2014-06-20 02:00:46 +10:00
eaac6cbcd9 Add a bmesh_core_test, a start at testing bmesh functionality.
Needed to make the blender link libraries a global property
now that tests are parallel to source directory.
Current sort order for blender link libraries doesn't work
for tests that start with few defined symbols. Doubling the
lib list works, but a TODO to find a better way (probably
using CMake's own mechanism for tracking dependencies).
2014-06-19 11:53:55 -04:00
179e7eaf39 Bugfix for Elastic and Back easing types
** TO BE PORTED BACK TO 2.71 **

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

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

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


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

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

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

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

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

This reverts commit 7b5fe4f316.

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

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

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

Reviewers: campbellbarton

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

Reviewed and enhanced by CampbellBarton, many thanks!

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

Reviewers: dfelinto, moguri

Reviewed By: moguri

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

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

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

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

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

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

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


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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

Reviewers: brecht, dingto

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

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

Code from this paper, which comes with sample code:

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

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

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

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

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

Implementation note:

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: campbellbarton, lukastoenne, jbakker

Reviewed By: campbellbarton

CC: lockal

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

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

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

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

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

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

Ideally we might want to even increase the size of the bounding box a
little (as seen in screen space) to allow snapping even in cases where,
cursor is slightly outside the bounding box, but since this is not so
straightforward to do for all cases, at least for me, leaving this as
a TODO.
2014-06-12 01:43:38 +03:00
fb6cb25c1c Fix T40561: cycles refraction node with sharp distribution gives black. 2014-06-11 19:55:16 +02:00
e53c00a2db Add patchset to recent Carve changes
In the future i'd rather have this reported to an
upstream instead of adding local changes. It's really
easy to override this changes if patchset is not added
and this is to be fixed in upstream. Also the function
was never used so it was rather totally harmless warning
for us.
2014-06-11 13:13:36 +06:00
bd43ac04a5 CMake: quite warnings with 3.0 (without breaking < 3.0 CMakes) 2014-06-11 03:00:57 -03:00
Dalai Felinto
a8a536d23d Bake-API: new approach for cage
There is a new option to select whether you want to use cage or not.
When not using cage the results will be more similar with Blender
Internal, where the inwards rays (trying to hit the highpoly objects)
don't always come from smooth normals. So if the active object has sharp
edges and an EdgeSplit modifier you get bad corners.

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

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

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

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

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

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

Many thanks for the reviewers.

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

Reviewers: campbellbarton, sergey

CC: adriano, metalliandy, brecht, malkavian

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

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

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

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

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

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

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

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

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

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

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

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

Would be nice to report the error somewhere, but cycles doesn't have a
proper logging system for this purpose yet.
2014-06-06 09:28:26 +02:00
96f81242bd Fix for missing visits of ID's within SceneRenderLayer in BKE_library_foreach_ID_link().
Just noticed them while working on the previous commit (rB00f722042c07).
2014-06-06 12:51:14 +09:00
00f722042c Fix for missing visits of Freestyle-related ID data blocks in BKE_library_foreach_ID_link(). 2014-06-06 12:48:53 +09:00
81afc12442 Code cleanup: remove redundant void*->int->bool cast on NULL pointer 2014-06-06 11:45:51 +10:00
0b0bac846c Fix T40508: Calculating normals crashes 2014-06-06 11:27:09 +10:00
269b14f184 Freestyle: Fix for viewport render not updating with changes of Freestyle settings. 2014-06-06 09:58:43 +09:00
70e98a21e0 Freestyle: Fix for operator error messages with no active line set and associated line style.
This commit amends a de-duplication of error messages in the commit rB6067fa682b0c.
2014-06-06 09:58:42 +09:00
02808f2774 UI: higher precision for IK poll angle 2014-06-06 09:51:08 +10:00
ae4ed68dfe Code cleanup: style 2014-06-06 07:54:05 +10:00
98bf3959b4 OSX: replace deprecated (10.8 ) Gestalt function with utsname, no functional change 2014-06-05 22:14:25 +02:00
865dfa8a7e Fix T40228: cycles CUDA multi GPU + world MIS giving error. 2014-06-05 18:10:32 +02:00
2305e3289b Fix T40429: cycles CUDA + use persistent images problem. 2014-06-05 18:10:32 +02:00
6b256a7cd8 Fix subpixel precision in transform node
The node was using sampler from the callee node and passed
it to the input nodes. Since the fact that compositor output
node uses NEAREST interpolation (why it uses nearest is the
whole separate story) it's not possible to have subpixel
precision in such cases:

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

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

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

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

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

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

Expect to be no functional changes from interactive transform
POV, just a bit more convenient to use redo panel.
2014-06-03 22:05:33 +06:00
f46b384fc5 Change to key modifier should trigger re-evaluation of drag-and-drop
This change is part of a fix for T40435, but will postpone for now.

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

Reviewers: campbellbarton

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

Review/Suggestions by Campbell Barton
2014-06-03 02:10:47 -03:00
e740afe1e6 View3d Toolbar: project-paint tools were in options, move into own panel 2014-06-03 12:23:37 +10:00
6c9dd174a8 Fix T39053: Replace mesh actuator does not replace material (only mesh)
The replace mesh actuator was reconverting the mesh data which causes
conflicts with the LoD code. Instead, we just look for an already
converted mesh, which should already be in the scene.
2014-06-02 18:52:13 -07:00
2645660bed Correct last commit: workaround for BGE 2014-06-03 11:32:45 +10:00
bf640a6a7f Code cleanup: use typedefs for ui handler functions 2014-06-03 09:30:08 +10:00
9016d6d7a0 Fix T40448: Blurring bug in the compositor
This commit pretty much reverts all the changes related on tile-ability
of the fast gaussian blur. It's not tilable by definition and would almost
always give you seams on the tile boundaries.

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

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

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

Patch by gottfried, thanks!

Reviewers: sebastian_k, sergey

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

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

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

Many thanks to Sergey Sharybin for patch contributions and discussions.
2014-06-01 16:24:18 +09:00
c641baa047 Fix a typo in a comment. 2014-06-01 16:24:17 +09:00
abec198665 Code cleanup, unused variables and comments. 2014-06-01 07:13:52 +02:00
14be4b506a Cycles: Small optimization for scenes without Transparent Shaders, helps a few percent.
Differential Revision: https://developer.blender.org/D570
2014-06-01 07:11:43 +02:00
09b0eadadd Add debug define for timing polyfill 2014-05-31 21:37:51 +10:00
aec8f4f777 Fix uninitialized var in recent change to cursor drawing 2014-05-31 17:30:04 +10:00
c68295f7d3 Fix incorrect flag checks for project-paint face winding 2014-05-31 17:29:02 +10:00
eb57f65a32 Fix EdgeSlide behavior with boundry edges
- would flip in opposite directions sometimes on the same loop
- some vertices would get directions from adjacent vertices
2014-05-31 15:41:20 +10:00
d504b325fb Fix T37618 Bevel mismatched offsets and bad profile plane.
Used a different technique to resolve "impossible" offset cases
that makes more consistency. Also changed the plane in which
the profile lies for the case with only one beveled edge and
more than 3 other edges.
2014-05-30 16:07:45 -04:00
6b538f4271 Fix T40445: Disabled modifiers prevent cage edit mode.
No valid reason to make non-mapping modifiers break edit cage,
when they are disabled in 3DView/edit mode!
2014-05-30 20:22:23 +02:00
2c69f1e574 Cleanup: Remove unused total power Emission code in Cycles, that was never exposed in the UI.
Differential Revision: https://developer.blender.org/D562
2014-05-30 14:32:59 +02:00
a26e41c0b9 Fix T40438: Name of texture is not synchronize 2014-05-30 16:26:29 +06:00
8008d9bdfd Fix T40078: GLSL Lamp with OnlyShadow makes weird colors in object.
To prevent only shadow lamps from producing negative colors, shr->diff
and shr->spec should've been clamped to positive values after lamp loop.
2014-05-30 17:11:41 +09:00
Dalai Felinto
50a7843ab1 Bake-API: replacing some MEM_callocN by MEM_mallocN
As suggested and reviewed by Campbell Barton. This is the most trivial of the cases. I will look if I can do it elsewhere in the bake code
2014-05-29 23:18:21 -03:00
Dalai Felinto
2a9efa4e51 Bake-API: Support for batch baking
When "Selected to Active" is not on, we bake all the selected objects.
This is the same behaviour we have for Blender Internal.

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

Reviewers: campbellbarton

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

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

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

Reviewers: campbellbarton

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

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

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

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

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

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

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

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

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

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

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

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

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

This patch makes baking glossy as viewed from the camera.

Reviewers: brecht

CC: zanqdo

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

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

Removed the StrokeCleaner and related helper functions which were added as a
temporary workaround in rB2a5b6d9c8f16.
2014-05-26 10:54:25 +09:00
6b7bee6cd7 Fix for BLI_delete failing on files containing quotes 2014-05-26 10:23:05 +10:00
a1d286a699 Fix curve switch direction ignoring active vertex 2014-05-26 09:37:04 +10:00
d84af360ca EditCurve: Replace -1 with CU_ACT_NONE define 2014-05-26 09:37:04 +10:00
eaf815f14a Fix for curve having invalid active vertex after setting type
also allow passing NULL vertex to BKE_curve_nurb_vert_active_set
2014-05-26 09:35:32 +10:00
f574b1ca3c Fix Sequencer OpenGL render ignoring preview channel 2014-05-25 23:52:10 +10:00
08528f577d Freestyle: Partial fix for thinning strokes due to flipping stroke directions at TVertices.
A description of the problem is found in https://developer.blender.org/T36425#19 .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewers: dingto, brecht

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

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

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

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

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

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

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

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

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

Other fixes

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

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

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

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

Ultimately the whole memory management and ownership of Bullet data
needs redesign. This is already happening in the particles_refactor
branch and could be ported to master separately:
https://developer.blender.org/diffusion/B/browse/particles_refactor/source/blender/blenkernel/intern/rigidbody.c
2014-05-14 11:51:24 +02:00
48881ad1e0 Code cleanup: doxy comments 2014-05-14 15:00:47 +10:00
d8c39b8789 FCurve: move add modifiers logic from menu into dynamic enum 2014-05-14 14:41:43 +10:00
5473c5fcc3 FCurve: use submenus rather then popups from menus 2014-05-14 14:01:36 +10:00
3c3fa29f23 Fix FCurve mirror ignoring aligned/free handles 2014-05-14 13:53:47 +10:00
254c724aa1 FCurve: stop generic rna update from changing curve handle type 2014-05-14 13:31:34 +10:00
a756499c62 Fix for FCurve keyframe editing left handle from button failing if not selected 2014-05-14 13:27:27 +10:00
dc03a5ebe3 FCurve: handle calculation was measuring new handle lengths and not using for new ratio 2014-05-14 13:10:45 +10:00
53efee6754 Fix T40187: Can't set single keyframe handle as Vector
ANIM_editkeyframes_refresh was testing handle selection as if those handles were transformed.

This is already handled by areas which need it,
so simply replace testhandles_fcurve -> calchandles_fcurve.

This was causing other bugs such as inserting a keyframe changing handles of unrelated fcurves.
2014-05-14 11:59:51 +10:00
30361a7341 Fix for curve widget hue gradient drawing incorrectly when zooming 2014-05-14 09:34:47 +10:00
23b682d594 Fix T40172: LibFree() crashes with shared materials (e.g., from multiple LibNew() calls) 2014-05-13 15:52:07 -07:00
1d1560eec4 BGE: Fixing some NavMesh memory leaks. 2014-05-13 15:52:07 -07:00
ea6620cb82 Fix T37796, Mesh lost after exiting sculpt mode and undoing.
Issue here is that upon entering sculpt mode, the mesh (and the object
mode) is stored in global undo. Now made the code similar to edit mode,
but since we don't really have any operator to push, this is just
ignored for now.

I have tried just disabling the sculpt toggle operator undo flag but
this didn't work due to the nature recursive of the operator calls
2014-05-14 01:10:57 +03:00
5cc1e03540 Code cleanup: indentation 2014-05-14 06:37:56 +10:00
33df6aa12e Fix T39196, Dynamic Topology Undo Applied to Wrong Mesh
Undoing nodes that do not belong to the current object will cause the
saved bmesh log entry to be reverted instead. This entry can belong to
another object though.
This is easy to fix by enforcing name matching (this was borrowed by
edit mode but can definitely be improved) between current object name
and undo node name and deleting older entries.

However there are complications. Deleting dyntopo entries in this way
can leave a brush stroke as first dyntopo log entry. This can present
issues if we attempt to delete that entry since it's deleted mesh
elements may now have had their ids (which would still be valid at the
time) cleaned up. This can result in crashing if we attempt to resculpt
on the mesh. To fix this I have disabled releasing the deleted entries.

This entanglement between bm_log and undo is quite volatile but I hope
the system works better now.

Also minor cleanup, fix unneeded check warning
2014-05-13 22:05:23 +03:00
9531091eb8 Fix compilation error with debug SCons
For some reason SCons defines _DEBUG, not DEBUG as mathutils was
expecting it to be.

Made it so mathutils checks for NDEBUG which mimics BLI_assert
define.
2014-05-13 19:52:50 +02:00
b9967bfb3f Fix T40151: Problem in normal with subdivision surface + Boolean modifier
Own regression since e08db08. CustomData_copy_data() would fail in cases
when mvert/medge/mloop/mpoly arrays were lazy allocated since that change.

Now made it so this layers are copying from own copy of the arrays.

Not sure if this still misses some CD to be copied, from quick glance
seems no, but some further testing wouldn't hurt at all.
2014-05-13 19:45:08 +02:00
c60d5c6895 style cleanup, keep preprocessor identation 2014-05-13 20:11:27 +03:00
ba350d3020 Add alloca include in compiler compatibility. Helps with MinGW32
compilation.
2014-05-13 18:41:53 +03:00
4875a665cc Fix T40176: Curve Functions broken in several addons
Regression since 94e5e2f.

Handbook example about what happens when you use copy-paste
and don't test code after you did a cleanup.
2014-05-13 16:39:51 +02:00
9ae9c268ca Folowup for old fix for material animation
Need to update node trees, so cycles materials are also updating
when tweaking settings from dopesheet/graph editor.
2014-05-13 16:15:19 +02:00
eed0c4d062 Fix T40158: Playback with 100% proxies is very slow
Context was creating with the wrong resolution.
2014-05-13 16:15:19 +02:00
2149886033 More UI messages fixes and tweaks. 2014-05-13 15:07:24 +02:00
b12bf2216f Correct last commit, check not to split along edges already used 2014-05-13 18:41:04 +10:00
dd8a9eee3b Fix T40162: Vert connect creates extra face cutting across concave NGon.
We need to support cutting degenerate ngons, see: T39418
This commit disallows cuts across faces where the same vertices can create better cuts on different faces.
2014-05-13 17:56:26 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10:00
19b82be61e Freestyle: Added .new() and .remove() to the collection type of Python style modules. 2014-05-13 16:18:32 +09:00
c08f025fe1 Freestyle: Fix for own mistakes in defining RNA aliases. 2014-05-13 16:18:31 +09:00
c0d96e1d1e Freestyle: minor UI text fix. 2014-05-13 16:18:31 +09:00
db338a6585 Freestyle: naming fixes.
FreestyleSettings and FreestyleModuleSettings are now defined as RNA aliases of
FreestyleConfig and FreestyleModuleConfig, respectively.
2014-05-13 16:18:30 +09:00
2c72bb1c19 Freestyle: code clean-up. 2014-05-13 16:18:29 +09:00
a31962287a Freestyle: Added .new() and .remove() methods to collection types of line style modifiers. 2014-05-13 16:18:28 +09:00
3583366266 Show the "Maximum Draw Type" for empties and cameras in case they work
as duplicators.

This property was always hidden in the UI for empties and cameras. It
doesn't make sense for the objects themselves (they are wires-only), but
also gets inherited by duplis. Now show it greyed out if not used, but
make it available for duplicators.
2014-05-13 08:55:36 +02:00
bdf477d19a BMesh: add check to BM_vert_pair_share_face to allow adjacent loops
Add BM_vert_pair_share_face_by_angle to avoid selecting concave splits.
2014-05-13 16:49:57 +10:00
2055e968df Fix T38379: Mesh vertices only update when in cone of last created spotlight
The shadow render passes could set a mesh's modified status to false
even if they were not rendered. This means their display lists do not
get updated. For now, just skip setting all buckets' modified to false
during shadow render passes.
2014-05-12 23:13:27 -07:00
43f3e79cee Fix T40111: replaceMesh() crashes BGE when used on a parented object
The replace mesh code was still calling release() on the parent object when it
no longer needed to (due to earlier commits).
2014-05-12 22:53:31 -07:00
aebcb3bab9 Tweak for node socket swapping: don't un-hide sockets automatically.
This was suggested by @zanqdo on IRC. Hiding sockets is a user choice
(not to be confused with "unavailable" disabled sockets). Hidden sockets
suddenly popping up when linking is confusing and intransparent, better
just ignore them for the swapping.
2014-05-13 07:41:48 +02:00
f14df29777 BMesh: make BM_face_calc_normal_subset apart of the bmesh api
also make face normal calculation functions return normal length
2014-05-13 14:58:05 +10:00
51fa66bc64 Freestyle: Fix for comments in line with the previous commit. 2014-05-13 09:16:28 +09:00
ae00a2b3fd Freestyle: Removed redundant flipping of UV coordinates.
Patch contribution by Paolo Acampora.  Thank you!
2014-05-13 09:16:28 +09:00
1c2e6de969 Usual typo and style fixes in UI messages... 2014-05-12 23:08:31 +02:00
355709432e Fix T40115: Smoke simulator memory leak with high poly mesh emitter.
Own error, all kudos go to scorpion81 (Martin Felke) for the nvestigation & patch!
2014-05-12 21:30:27 +02:00
1b1b71f697 Fix T40149: cycles motion blur render problem with multiple render layers. 2014-05-12 18:37:49 +02:00
70303dfefe Fix T40014: Broken shading with mirror modifier and auto smooth normals while hiding verts.
Stupid mistake that showed only when there was some hidden faces
(lnors should always be increased... even when the face is not drawned!).
2014-05-12 15:52:19 +02:00
a7918ea40e Fix for typeinfo NULL pointer crash when initializing unknown node types.
Noticed by @bdancer on IRC. Happens e.g. when loading a file with
pynodes which haven't been registered yet.
2014-05-12 15:35:49 +02:00
146a1c77ea Cleanup: Remove unused hardcoded variables in the integrator.
Differential Revision: https://developer.blender.org/D525
2014-05-12 10:45:11 +02:00
f3dd6b8df2 Cleanup: Some else if for attribute code. 2014-05-12 10:21:13 +02:00
7fb96ff00d Fix T40142: Objects restricted in render/view don't produce duplis in
with correct transform for Blender Internal.

According to previous code the obmat must be modified even if the
duplicated object itself is filtered later. TBH i have no idea how/why
this works, but nobody else does either ... All obmats are restored
after BI messes with them during render, so should be fine ...
2014-05-12 08:55:47 +02:00
204ba76ee0 A bit more helpful doc strings on the curve render resolution properties. 2014-05-12 08:07:33 +02:00
3d7d930e31 Fix for crash when doing "make local object+data" on an empty.
This commit added object data loop, without checking ob->data for NULL:
rB6e5e3b73f37f952420d87a3d8acd07a7f68dd5a3
2014-05-12 07:49:31 +02:00
e2672a433b Fix crash removing objects rigid body constraints 2014-05-12 14:55:54 +10:00
d1526da787 Fix/Workaround T40102: RMB on vertex & GKey, acts as double-G 2014-05-12 12:58:26 +10:00
47e905725e Fix for numpad orbit ignoring auto-perspective 2014-05-12 11:27:59 +10:00
3210dfe769 Fix for rotate-around-selection in text-edit mode
This wasn't supported and would print an error message.
2014-05-12 11:19:55 +10:00
5db81a0695 Fix T40144: Font rendering problems 2014-05-12 09:08:02 +10:00
b78bb98cc9 VFont: de-duplicate checks for next/prev handles 2014-05-12 09:02:14 +10:00
4dcdb4b15e VFont: avoid allocating an array for storing total contours. 2014-05-12 08:47:49 +10:00
df74230c5e Fix cycles baking code build errors with OpenCL on some platforms. 2014-05-11 16:36:51 +02:00
0d5ecc5c33 Fix T40117: cycles sobol RNG issue when disabling __CAMERA_MOTION__.
This doesn't affect any actual release code since camera motion blur is enabled.
2014-05-11 16:36:51 +02:00
c721f9a9f4 Remove unneeded comment. 2014-05-11 22:26:20 +09:00
f3ae9ce48a Quiet warnings 2014-05-11 20:21:00 +10:00
3844e30e45 Freestyle: Added handling of a user-specified name for creating a new line set. 2014-05-11 17:57:43 +09:00
d930c63f03 Freestyle: Fix for the active line set index possibly invalidated after deleting a line set. 2014-05-11 17:57:41 +09:00
bbd611362c Freestyle: Added .new() and .remove() methods to the Linesets collection type. 2014-05-11 17:57:40 +09:00
39c078202d Added BKE_freestyle_lineset_delete() by generalizing FRS_delete_active_lineset(). 2014-05-11 17:57:40 +09:00
c88e65da61 Code cleanup: comment typos 2014-05-11 16:22:05 +10:00
ccbac7862f CMake: use project name when generating project files 2014-05-11 16:21:38 +10:00
da644a9b58 Quiet warnings with __CUDA_ARCH__ use 2014-05-11 16:17:02 +10:00
c08c931fb6 Cycles / CUDA: Increase maximum image textures on GPU.
Instead of 95, we can use 145 images now. This only affects Kepler and above (sm30, sm_35 and sm_50).

This can be increased further if needed, but let's first test if this does not come with a performance impact.

Originally developed during my GSoC 2013.
2014-05-11 03:38:39 +02:00
Dalai Felinto
8904eaf504 Fix T40107: painting on a psd image crashes blender + style cleanup in file
The issue was that we can't assume we support the colorspace from the file. The reported file had an invalid colorspace in fact, which was leading to the segfault in Blender.

Thanks for Sergey Sharybin for the help here.
2014-05-10 10:58:48 -03:00
Dalai Felinto
8943dc60ec Bake API: selected to active needs differentials or it renders black when bump/displacement (fix T40101) 2014-05-10 10:06:53 -03:00
78918995a4 Replace inefficient use of strstr with STRPREFIX macro 2014-05-10 09:29:35 +10:00
c3a3664e8c Utility macros for linklist stack & asserts for bmesh 2014-05-10 09:29:34 +10:00
fd26a32aa5 Fix T40119, CUDA Toolkit version mismatch 2014-05-10 01:26:04 +02:00
d5588fd658 Fix T40113: Skinned meshes with non-animated shape keys crashes the BGE. 2014-05-09 16:05:23 -07:00
087bbe624f BGE: Fixing shape key animations on meshes with no armature.
Their transverts were not being updated after code changes for
multi-threaded skinning.
2014-05-09 16:03:54 -07:00
ff08acc556 BGE VideoTexture: Fix for loading PNG (and possibly other) files. 2014-05-09 13:53:42 -07:00
f622691691 Fix access violation when painting with tiled textured brushes +
airbrush + small brush size.

Fast textured strokes meant that sometimes the update width (calculated
from stroke distance) would be greater than the new ibuf width. This
meant out of bounds access for the new ibuf.

It's totally strange that I couldn't reproduce this issue on older
versions since the logic here has not really changed much between
versions.
2014-05-09 23:30:19 +03:00
Dalai Felinto
c80e9866c8 Revert "Fix wrong job type used in cycles bake operator, could cause crashes."
This reverts commit 97823f6047.

I was to push a fix based on Brecht's solution (this commit) when he did
the same.

This fix is correct, but it misses replacing WM_JOB_TYPE_OBJECT_BAKE
with WM_JOB_OBJECT_BAKE_TEXTURE in the rest of the file, which may lead
to problems when calling the operator in a quickly sucession -
WM_jobs_test also tests for the same type of JOB.

I created WM_JOB_TYPE_OBJECT_BAKE elsewhere, may as well use it. Unless we revert 20c90ea and f194da3.

I'm fine with either way, just trying to get master to work again ;)
2014-05-09 12:32:26 -03:00
Dalai Felinto
f194da3455 Bake API: reports were used after being freed leading to random crashes (fix T40077) 2014-05-09 12:30:32 -03:00
97823f6047 Fix wrong job type used in cycles bake operator, could cause crashes.
Ref T40077.
2014-05-09 17:14:13 +02:00
5f01b3d96e Fix T39585: cycles motion vector pass problem with curves. 2014-05-09 17:14:13 +02:00
fe00dbcc23 Fix cycles motion pass for hair curves showing a bit of motion when there isn't any. 2014-05-09 17:14:13 +02:00
6f71491d61 Fix T40108: Copying materials leaves a shared Action datablock in nested
bNodeTree blocks.

This was broken by rB6e99fb0 (own commit). I expected the `do_action`
argument to be of no importance in this case due to node trees using
material animation, but this is not the case.

Anyway, this patch adds back a do_action to the BKE_libblock_copy_nolib
function as well to restore the previous behavior.
2014-05-09 15:02:21 +02:00
31849cafc2 Fix for random crashes when grabbing (rmb-drag) NLA strips
Although these crashes were quite sporadic, they seemed to happen most when
rmb-dragging strips randomly in quick succession. The most likely cause seems
to be a null check I accidentally took out during one of my commits yesterday.
2014-05-10 00:19:07 +12:00
3a0be8a0d6 Freestyle: Fix for dashed lines when applied to invisible stroke segments.
Dashed lines were resetting stroke segment visibility by mistake (making invisible segments
visible, for example when applied to the results of square blueprint geometry modifier).
2014-05-09 20:48:15 +09:00
c4e277d53b Freestyle: Fix for a wrong interpolation of stroke segment visibility. 2014-05-09 20:48:15 +09:00
d2ed5563d7 Metaball transform, support active-only option 2014-05-09 20:23:04 +10:00
164841e30e Code cleanup: style 2014-05-09 18:29:42 +10:00
663c800ef3 Fix T36973: Active snapping fails for edges/faces
also add snap-active support for armatures, pose & metas
2014-05-09 18:29:02 +10:00
d61f8a5a22 Fix T40094 Faulty resizing behavior of frame node.
Frame nodes still have the "hidden" flag like all other nodes, but this
has to be ignored during resizing. width/height range for the frame
nodes must be unlimited for this to work correctly.
2014-05-09 08:53:48 +02:00
c5a946b2b8 Tweaking tooltip for NLA tweakmode enter to be a bit more descriptive 2014-05-09 16:18:28 +12:00
b2b7b3f796 NLA Editor Bugfix: Select NLA tracks too when selecting strips 2014-05-09 16:17:04 +12:00
ddc52b49ec NLA Editor: View selected also recenters the view now (as in the DopeSheet Editor) 2014-05-09 16:05:34 +12:00
b3cd9d289a Code cleanup: Define a dedicated "channel_role" field for animchannel types
This makes it easier for finding the active or first selected channel
(where actual data channels need to be favoured over expanders - which come
first), as previously, long switch statements were needed everytime.
2014-05-09 15:49:36 +12:00
89abdb606d DopeSheet: View Selected recenters the view vertically to display the active channel 2014-05-09 15:49:35 +12:00
40520d549d Freestyle: Stroke rendering optimization.
Previously mesh objects were created for individual visible stroke segments (recalling that
a stroke may consist of alternate visible and invisible segments).  This could result in an
excessive memory consumption in stroke rendering when strokes are composed of many
short visible segments (for instance by means of dashed lines and/or blueprint geometry
modifiers).

Now mesh objects represent individual strokes instead of stroke segments, which tends to
reduce the number of generated mesh objects by an order of magnitude.
2014-05-09 12:19:29 +09:00
b24708775f De-duplicated #includes. 2014-05-09 12:19:28 +09:00
11d98718bc Indentation fix. 2014-05-09 12:19:27 +09:00
1064b74196 Fix for an occasional crash in Freestyle stroke rendering.
Materials were freed before releasing meshes that may have references to the materials.
2014-05-09 12:19:25 +09:00
Dalai Felinto
14643167a6 Bake API: small change, forcing Render to not have reports
Again, no functional change, just trying to narrow down the possible
reasons for the random crashes in OSX.
2014-05-08 22:56:50 -03:00
Dalai Felinto
20c90eae14 Bake API: renaming WM_JOB_RENDER_BAKE to WM_JOB_OBJECT_BAKE and use it consistently
Note: that doesnt change much. It definitively doesnt change the random crash OSX is experiencing sometimes.
2014-05-08 22:56:50 -03:00
d1cf35069d Fix double promotion to scene linear in 2s painting. 2014-05-09 00:12:18 +03:00
Dalai Felinto
4c5fe540bf ammend to [31cb7e39] Bake API: calculating differentials 2014-05-08 15:05:12 -03:00
Dalai Felinto
672cebf19a Cycles-Bake: displacement support (fix T40068)
Code with contribution from Brecht Van Lommel.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D510
2014-05-08 14:38:43 -03:00
Dalai Felinto
31cb7e395e Bake API: calculating differentials
Code with contribution from Brecht Van Lommel (he wrote the
bake_differentials actually ;)

Reviewers: brecht

Differential Revision: https://developer.blender.org/D510
2014-05-08 14:38:30 -03:00
732bc8fcae Clarification of UI messages:
Show that modifier may not be supported in dyntopo rather than sculpt
mode in general. This is useful information since users may confuse the
two. Multires for instance is surely supported in sculpt mode, but not
in dyntopo.
2014-05-08 19:25:46 +03:00
0d85be5950 Fix T39950, part 2.
Warn when a modifier does not support optimal drawing and mask/hidden
parts display.

User report was that hidden parts became visible after adding a new
modifier subdivision. Subdivision was added with the Ctrl+number keys.
First part of the fix was to make sure we add a multires instead of the
subsurf modifier in sculpt mode with the PageUp/Down Ctrl+number keys.

We can't really stop users from having added a subsurf modifier already.
We could be "smart" and convert subsurf to mulrires upon entering sculpt
mode maybe but that can easily backfire - or users may actually want
that. For now, just warn that the modifier won't support Hiding/Masking
and optimal drawing.
2014-05-08 19:15:46 +03:00
5a8d7af642 Fix T40074: Autosmooth option causes assert failure when selected.
No need to call `dm_ensure_display_normals()` when using loop normals,
poly/vert ones have already been computed!
2014-05-08 17:48:00 +02:00
bbf6db0c0c Fix regression from 2.70:
Multires did not support hiding in zero level. It's a case of PBVH not
being used in drawing due to code reporting active modifiers being used.

However multires level zero can be treated as effectively no modifier
and we can use mesh PBVH.
2014-05-08 17:58:55 +03:00
19bddbfc54 Fix T40079: cycles crash with objects that have hair motion blur, but no triangle motion. 2014-05-08 15:27:49 +02:00
105aa67cda Fix typo 2014-05-08 19:54:04 +10:00
6434154014 Workaround T40046: Undo/redo crashes properties editor
Clear the path for now on undo
2014-05-08 19:46:04 +10:00
75d49b7f55 Removed a Freestyle hack for DAG updates introduced in commit rBae58968e0a61.
Now that Freestyle employs a separate Main, this workaround is no longer necessary.

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D513
2014-05-08 18:42:47 +09:00
56df85b227 Bugfix T40082: NLA Meta strips were no longer evaluating correctly
It seems that since the changes to how new NLA strips are handled, accumulating
these in a temporary buffer and then trying to combine the results didn't
work that great anymore.
2014-05-08 21:01:32 +12:00
e21d410804 Remove 'Autosmooth' settings from Item 3DView panel.
Not that happy with this, but this Item panel is a bit stupid, and we could add more
useful settings as well. So better get a design decision first, here.
2014-05-08 09:18:19 +02:00
cd60c18be1 Fix T40080: forcefield_toggle_exec() doesn't always enable force field.
Kudos to Brent Baccala for investigating and suggesting a fix.
2014-05-08 08:13:55 +02:00
49cde5d8c1 Drivers: When editing expressions from UI buttons, "invalid" flags now get cleared from the drivers
With this change, there should hopefully be less need to hit "Update Dependencies"
on drivers so often.
2014-05-08 17:57:11 +12:00
d20c9e491c Bugfix: "Lock time to frame range" didn't work in the Graph Editor
This uses a different operator than the other time editors (as it needs to support
the setting of the value-cursor too), so the changes here didn't get propagated through.
2014-05-08 17:43:11 +12:00
88e5705a3f Code Cleanup: remove unused m_contactProcessingThreshold 2014-05-08 14:22:47 +10:00
ba88824f32 Remove unused scons config files 2014-05-08 14:16:26 +10:00
8841ed84c9 Add missing context member for doc gen 2014-05-08 13:55:05 +10:00
ee5284faf6 BGE: Dynamically-allocated action layers
This patch removes the limitations on the number of action layers in the BGE.

BL_ActionManager currently uses a fixed array to keep track of the action layers. This patch replaces the fixed array with a map which allows for dynamic allocation of action layers. Layers (map items) are automatically removed on BL_ActionManager's update function. The maximum number of layers is roughly the value of a short. Backwards functionality is maintained and there are no changes to the Python API.

Task Discussion:
https://developer.blender.org/T39572

Author: Kevin Ednalino

Reviewers: moguri

Differential Revision: https://developer.blender.org/D491
2014-05-07 20:32:50 -07:00
34bc1e528e Freestyle: hide the Line Style tab from the Texture properties context when WITH_FREESTYLE build flag is off. 2014-05-08 10:02:51 +09:00
bebcd4d5c5 Freestyle: hide line styles from a scene in the Outliner when WITH_FREESTYLE build flag is off.
The Datablocks display mode still shows line style ID datablocks to keep track of line styles
hidden from user interactions in the Properties window.
2014-05-08 10:02:50 +09:00
d964bad67b Fix for crash when userprefs fails to read. 2014-05-08 06:36:43 +10:00
65d54f34b1 Code cleanup: spelling/indentation 2014-05-08 04:53:05 +10:00
3a8f1d5d8b Fix some nodes showing up as undefined after the fix in 79c345acc2.
A bunch of nodes had invalid storage definitions that don't refer to an actual
DNA struct. Ref T40033.
2014-05-07 20:28:46 +02:00
edd78fb308 Fix cycles crash after recent use alpha commit. 2014-05-07 19:00:56 +02:00
Dalai Felinto
83cdd5887f Cycles-Bake: Subsurface Scattering support (fix T40060)
This fixes the SSS Direct/Indirect passes as well as the Combined pass.
Patch reviewed and with fixes and contributions from Brecht van Lommel.

Note: displacement/bump map (related to the report) will be handled separately

Reviewers: brecht

Differential Revision: https://developer.blender.org/D503
2014-05-07 11:59:25 -03:00
3fbc984b06 Nodes: add absolute value operation to all math nodes
Reviewed By: dingto, brecht

Differential Revision: https://developer.blender.org/D507
2014-05-07 16:43:59 +02:00
8b8d5a441f Cycles: add support for "Use Alpha" option on image datablocks.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D486
2014-05-07 16:43:50 +02:00
1d03a8b309 Freestyle: minor code clean-up. 2014-05-07 23:16:24 +09:00
fe0236be78 Freestyle: time/space optimization in stroke rendering without textures.
When strokes do not have textures assigned, UV coordinates are not computed now.
This will save a bit of time and space in stroke rendering.
2014-05-07 23:16:23 +09:00
dfe800b4a8 Freestyle: debug statistics on stroke rendering. 2014-05-07 23:16:22 +09:00
Dalai Felinto
08bf531956 Cycles-Bake: Ambient Occlusion needs to be computed for COMBINED
Now the COMBINED pass includes the Ambient Occlusion.

This was not reported anywhere, but while working in the Subsurface Scattering I realize we needed this fix for combined.
2014-05-07 10:18:00 -03:00
79c345acc2 Fix T40033: Jumping between versions can lead to loss of node storage
data.

Saving a file with a new blender node that uses bNode->storage data and
then loading that in an older version will make the node undefined, but
still retain the original type identifier (in case it is defined later).

If the file is then saved over and loaded again in the newer version,
where the node type is defined, it won't have a valid storage struct.
To handle such cases gracefully, check if storage data is expected but
doesn't exist when initializing node types. User then at least get a
chance of fixing the problem manually.

Suggested fix by @brecht.
2014-05-07 11:46:30 +02:00
a8dddca0fe playanim: check for escape key while loading images
(todo from 2.4x)
2014-05-07 18:18:21 +10:00
5e55fc21b7 Fix T40051: Inconsistent dupli vert/face handling of group member types 2014-05-07 17:11:33 +10:00
dcabd3f81f Fix for dropping images into the 3D View
- wasn't allocing image-user.
- wasn't managing user counts.
2014-05-07 16:53:58 +10:00
77d11a52b3 Fix T40052, Grid Particles Crash due to invalid empty mesh verts access
for bbox calculation.
2014-05-07 07:58:35 +02:00
0710d9dfd1 Fix crash binding mdef with no faces 2014-05-07 14:14:27 +10:00
5e3509e2d2 Remove redundant NULL check 2014-05-07 14:14:27 +10:00
2679eaa712 Bugfix: Bend modifier's angle property has crazy limits
As reported by ZanQdo on IRC, the bend modifier's "angle" property had a range
of +/- 572.95 degrees (equivalent to 10 radians). From the looks of things, this
was simply something overlooked when doing degrees to radians conversions. Now
it has a range of +/- 180 degrees.
2014-05-07 14:20:03 +12:00
aad0907644 Get rid of custom tooltip for pushdown button 2014-05-07 14:20:02 +12:00
a351ff7264 Freestyle: removed the dummy implementation of a texture manager.
Legacy texture shaders from the original stand-alone Freestyle program are also
declared as deprecated, in favor of Blender's new line style textures.

Patch contribution by Paolo Acampora.  Thanks!
2014-05-07 10:57:32 +09:00
2e07109feb Code cleanup: naming.
Prepend BKE_ to the functions moved in blenkernel for recent bug fix.
2014-05-07 02:59:23 +03:00
02b1dbef8c Fix T39653 crash on drawing modified UVs
Just a case of uninitialized material array.
Make sure object materials are initialized properly when drawing UVs.

This might look strange since we do not really need materials here.
However, the same GPU object may be used in a 3D viewport and if we try
to avoid initializing the materials somehow this will break.

Also, this breaks on full screen UV editor as is apparent from this
report.
2014-05-07 02:52:31 +03:00
Dalai Felinto
d653c70ee6 Bake API: force opengl reload and mipmap recalc (fix T40055) 2014-05-06 19:30:54 -03:00
Dalai Felinto
2c4ea2a11e Bake API: fix T40054 - baked image update on uv/imag editor for linear/float/noncolor, ...
All image colorspaces should be displaying correctly in the UV/Image Editor.

Viewport may still present an issue, but it was reported separately
anyways (T40055)

Patch reviewed (and corrected) by Sergey Sharybin
2014-05-06 18:25:41 -03:00
20f7aaf6be Fix issue discovered while investigating T39950:
Sculpt mode drawing fails after deleting a subsurf modifier
in sculpt mode and undoing.

This was quite difficult to spot. Main cause was that mesh data was not
synchronized properly between undo and sculpt code because we generated
a pbvh on derivedmesh invalidation without really refreshing the rest of
the data. This could result in undo and drawing operating on different
data.

To solve this and avoid bad level calls I had to move quite some code
around. Crazyspace is now moved to blenkernel, as did some sculpt calls
that make sure sculpt data are properly refreshed.
2014-05-06 23:44:06 +03:00
af704c6d88 Style cleanup 2014-05-07 06:11:28 +10:00
182179a44b Cleanup: redundant NULL checks 2014-05-07 04:35:55 +10:00
f300c158b9 Fix possible NULL pointer dereference in Cycles 2014-05-07 04:19:53 +10:00
6dbe732a2f Fix T40049: cycles baking glossy shader looks faceted.
Use smooth normal instead of flat normal as view direction.
2014-05-06 18:17:54 +02:00
5cee409d42 Followup fix to T39966.
The previous fix was not quite correct:
* It would use the same wireframe/bbox check in viewport- and regular render
* The duplicator loop in Blender Internal is more permissive now to avoid disabling wireframe duplicators, but this means we need to check is_object_hidden right before making render objects to ensure this still works.
2014-05-06 17:47:48 +02:00
Dalai Felinto
9fe618e309 Fix T40048: Cycles bake crashes Blender [when there is no image]
The struct with the images was not NULL initialized.
2014-05-06 11:59:51 -03:00
63a66478f5 Over-optimized stuff in the previous commit, sorry. 2014-05-06 16:56:24 +02:00
80e137e826 Fix T39946: OSL + tangent space normal maps not working in Cycles. 2014-05-06 16:39:50 +02:00
09f5dff244 Fixes to previous sculpting tweaks
undo didn't work, layer and smooth crashed..
2014-05-06 16:27:45 +02:00
d9a72be86e Minor tweak to previous commit:
Do not subdivide if user has pressed page down
2014-05-06 17:14:28 +03:00
8d1246328d Related to T39950.
When in sculpt mode add a multires, not subsurf modifier. Also allow
subdivision of multires when user explicitly requests a certain non-
2014-05-06 16:54:22 +03:00
e393dde435 Modifier UI: More space for Displace modifier texture ID.
Was really cluttered sometimes: http://www.pasteall.org/pic/70876
Reshuffled layout a bit to avoid this now.
2014-05-06 15:02:46 +02:00
45b4506c0d Cleanup a bit of the locked shape keys painting
It's still gives some slowdown when painting a locked
key in the solid view, but since shape key is now longer
being re-used by DM.

but this change should still give some degree of speedup
propagating delta onto the keyblock if i remember the
code correct.
2014-05-06 14:49:50 +02:00
35380cdcad Fix for uninitialized unit_use_radians variable with inset and bevel 2014-05-06 19:20:03 +10:00
7fddd7f013 Fix for own recent change to menu shortcut behavior
Missed setting the flag for operator-menus.
Now call `ui_but_add_shortcut` to match the rest of the api.
2014-05-06 18:14:00 +10:00
38b512576f Freestyle: minor code clean-up. 2014-05-06 16:58:58 +09:00
a6f92cd29a Freestyle: added more conditions to be able to switch to the line style texture properties context. 2014-05-06 16:58:57 +09:00
fd7f5c4230 Cycles: revert part of the optimization from ff34c2d
This was faster for my AMD system but slower for Intel.

However with gcc4.9,-O3 I was able to get roughly the same speed before/after.

Revert since this isnt giving such clear benefits on most systems.
2014-05-06 14:07:04 +10:00
7660218202 Correct fix for knife interior use, distance needed to be in object-space 2014-05-06 09:32:06 +10:00
d2920e9876 Knife too: was using a ray-cast direction scaled down by the knife epsilon 2014-05-06 09:02:16 +10:00
cd9aed7059 Fix T38623: Knife tool completely failing on interior geometry 2014-05-06 08:35:43 +10:00
678b3cbb4f Proper fix for CMake files
next time you're deprecating some platform, compiler, feature just either
mail in the ML telling about this or if you're not that lazy poke developers
online whether then can spot issues quick.

Or be ready to pick up stuff being done by the developers your change gives
headache to.
2014-05-06 04:03:45 +06:00
4c47a71e55 CMake: Edit recent commit, allow 64bit msvc2008 2014-05-06 06:13:07 +10:00
60c5887fe8 CMake: mark vars as advanced 2014-05-06 06:04:29 +10:00
4638ca0ebe Fix T39956.
Even locked shape keys need to be flushed if user is in textured or
wireframe mode.
2014-05-05 22:39:55 +03:00
312d3edee5 Hidden PBVH nodes:
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
2014-05-05 22:24:13 +03:00
9088604811 Drop support for MSVC versions older then 2013 with CMake
We get too many complaints about breakage and we intend to drop older versions soon anyway.
2014-05-06 05:04:25 +10:00
036de9bfa5 Make bpy.types.EditBone.matrix writeable.
Makes importing armatures from matrices (FBX...) *much* easier.
2014-05-05 20:57:52 +02:00
f5687323a3 Install_deps: explicitely disable OSL/LLVM seems needed... 2014-05-05 20:57:52 +02:00
9a1c47de44 Attempt to solve T39950,
Avoid filling up buffers when total buffer triangles are zero.

Better still would be to tag a node as hidden when doing recreation of
the PBVH tree by checking for any visible elements. Original bug report
probably has to do with OpenGL doing something funky but hidden nodes
should be tagged as hidden to completely avoid iterating for painting.
This is to be done in a later commit.

Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to
GPU_build_mesh_pbvh_buffers.
2014-05-05 21:13:27 +03:00
fbfaa4770d Fix T39322, hair not rendered in rendered mode viewport after returning
from particle edit mode.

Check for object particle edit mode, not psys->edit. This won't get
freed on exit (which might be worth considering doing, maybe?)
2014-05-05 19:51:58 +03:00
8641e30787 Fix T40032: hair BSDF not working correct after primitive type code refactoring. 2014-05-05 17:15:48 +02:00
7a2ece3c19 Fix T40031: cycles deformation motion blur wrong render on last frame of animation. 2014-05-05 17:15:48 +02:00
ef1e511bb6 Another attempt to fully fix T40020: Freestyle: dashed lines crashes blender.
Problem report by flokkievids through rB047c3aa728a4bb944616a084805988714b796d52#1.
Thanks!
2014-05-05 22:30:00 +09:00
f5d9f45a6f Freestyle: Revised a UI text for better understandability in the Outliner. 2014-05-05 19:54:55 +09:00
38a430c027 Fix T40029: Apply transform to empties reset their location
also add check for negative scale
2014-05-05 15:47:25 +10:00
b82d639f3d Stop all dynamic enums using translations (from blend file data) 2014-05-05 15:23:35 +10:00
cf069afdfd Fix: T40016 ID Names translated in menus 2014-05-05 15:09:29 +10:00
047c3aa728 Fix T40020: Freestyle: dashed lines crashes blender.
The crash was due to an out-of-range vertex index reference that occured while
computing texture coordinates of strokes with tips.
2014-05-05 11:33:53 +09:00
620901426c Code cleanup 2014-05-05 12:29:28 +10:00
6d2c23bf70 NLA Pushdown Operator: Active animdata option + More error handling
* If channel_index = -1, the pushdown operator will try to use the active AnimData
  block. To see which one this will be, check the properties (NKEY) region in NLA Editor.
* Added more detailed error handling for the various cases where things are not
  in a valid state for pushing down an action. This is notably to stop scripters
  from putting the NLA into an inconsistent state.
2014-05-05 14:16:41 +12:00
4e0aa0e7f2 NLA Editor: Added dedicated operator for the pushdown operation 2014-05-05 14:16:41 +12:00
e5c306b101 Code Cleanup: Remove old deprecated NLA channel drawing code 2014-05-05 14:16:40 +12:00
1e577739e7 NLA Editor: Polishing a few rough edges with the cleanup 2014-05-05 14:16:39 +12:00
da6b1ca27d NLA Editor: Second part of porting NLA Action channel to standard drawing system
This now works (barring one or two minor glitches and the operator on the pushdown
button being a bit of a hack). The old drawing code is still in place though, and
will be kept around for a little while yet while the last kinks are ironed out.
2014-05-05 14:16:38 +12:00
b2784d33ce NLA Editor Drawing: Set up AnimChannelType callbacks for drawing NLA Editor
This commit lays some of the groundwork needed to port the last of the NLA Editor
channel types that's still defined using custom code. By moving this code over
to the newer standardised framework, this will enable widgets to have tooltips
to make it easier for users to find out what various buttons do.

Currently this isn't hooked up to anything though.
2014-05-05 14:16:38 +12:00
362b25b382 Fix T39928: Blender crash/freeze when game engine is started with animation played directly on camera object with parents.
Updating object IPOs is not currently thread-safe since it also updates
children. This leads to problems when parents and children are both
animated. For now, updating object IPOs is done in its own loop to avoid
threading issues.
2014-05-04 15:39:15 -07:00
d27eea6dc6 Add check for LIKELY/UNLIKELY is CPU only 2014-05-05 07:26:49 +10:00
ff34c2de64 Cycles: avoid int->float conversions for pixel lookups
Gives ~3% speedup for image.blend test, and 6% for image heavy file.

Overall speedup in real-world use is likely much less.
2014-05-05 06:58:39 +10:00
f7aac45488 Fix T40025: install_deps.sh generating wrong make flag for OSL
Most cases should be handled OK now (not all though, would make script way too much tricky -
bash is a hell of a messy language :/).
2014-05-04 21:34:19 +02:00
d828d44d7a Cycles: use LIKELY/UNLIKELY macros
Gives overall ~3% speedup in own tests for BMW scene.
2014-05-05 03:49:22 +10:00
dc13969e48 Style cleanup: indentation, braces 2014-05-05 02:19:08 +10:00
e86dbf6877 Code cleanup: avoid int/uint mixup in cycles 2014-05-05 01:30:02 +10:00
2a3cdeadf1 Fixes for errors uncovered after previous commit 2014-05-04 23:28:27 +12:00
c561e0d929 Code cleanup: Use enum instead of int in function signatures for bAnimChannelType settings callbacks 2014-05-04 23:19:40 +12:00
be7b09ef85 NLA Editor: Display "tweaking action" status indicator icon in place of action-type icon
Instead of displaying the "tweaking action" status indicator icon on the right hand
side jammed against the mapping/no-mapping toggle (pin), this is now displayed as in
place of the action icon used on the left (as the type indicator). This is less messy
than the previous situation, which was needed partly due to the abuse of an unsuited
icon.
2014-05-04 19:28:14 +12:00
2812e6a069 NLA Editor: Added dedicated icons for "pushdown" operator and for indicating the "tweaking" state
1) The "pushdown" operation is the actual name for the functionality
   previously represented by the snowflake. That is, pushing the active
   action onto the NLA stack as a new strip.

   The icon that is introduced here is the icon I originally wanted to
   use here for this purpose (but couldn't at the time the NLA was coded
   as we didn't have the master SVG available yet). I'm making this change
   now to hopefully make the "animation-layers" intentions behind the NLA
   design a lot clearer than they have been so far.

2) Also added a dedicated icon for representing that the active action
   is in the "tweaking" state (i.e. we're editing a particular strip's
   action). Previously we were abusing an icon designed for an entirely
   different purpose, mainly since its identifier looked like it would work.
2014-05-04 19:19:39 +12:00
91f90f61d3 NLA Eval Bugfix: Influence settings on active action didn't work
* The automatically calculated influence was overriding the value we were passing
  into the dummy strip, making this seem like it doesn't work

* Made some tweaks to prevent some potential memory-related bugs
   - nlastrips_ctime_get_strip() actually saves off references to the list of strips
     it gets, so declaring dummy_strip in an inner scope like this could potentially
     be quite dangerous
   - Prevented a potential memory leak for the early abort when there are no strips
     for whatever reason (it shouldn't occur though)
2014-05-04 16:35:12 +12:00
fd80ac4c3e Fix typo (uninitialized var) 2014-05-04 12:37:02 +10:00
a1ba57a008 Fix T40010: Single user looses parent relationship (temporarily) 2014-05-04 08:36:15 +10:00
ea6671a630 Fix for aligned handles in masking and curve objects
The issue has been introduced in 0985bb4, made it so curves and masks
stick to old behavior.

FCurves are still flaky, namely, grabbing both handles selected would
change the length of one of the handles which is not nice imo.
2014-05-03 21:58:02 +02:00
1618329b00 Code cleanup: style, require ; for cuda_assert, opencl_assert 2014-05-04 03:57:50 +10:00
95d885b3f4 Quiet float conversion warnings when building cycles standalone 2014-05-04 03:15:20 +10:00
08d899d1e7 Code cleanup: style 2014-05-04 00:41:45 +10:00
e08db08a84 Fix T39997: Multiple boolean modifiers sharing the same right operand crashes
The issue was caused by the temporary CD layers being allocated for subsurf
meshes, same as we've got back in 881fb43.

In the long run this temporary storage is to be re-considered, but it'll also
imply re-considering of the Derivedmesh interaction as well. For now let's
use a simpler solution which is forbidding modifiers to call getArray for other
objects' derivedMeshes but use an API calls which would allocate local copy of
the data preventing race condition of shared data in DM.
2014-05-03 16:13:01 +02:00
48c1a7f8a4 Doxy cleanup: formatting 2014-05-03 23:45:17 +10:00
38b9979919 Minor code style fix. 2014-05-03 20:38:45 +09:00
5347c7b9db Added support for the Make Local command in the Outliner on textures in line styles. 2014-05-03 20:38:44 +09:00
78fb7249c6 Added changes to unlink textures from line styles in the Outliner. 2014-05-03 20:38:43 +09:00
634da4598e Added changes to show textures as part of line styles in the Outliner. 2014-05-03 20:38:43 +09:00
3c3759ac9e Added notifier of updates in Freestyle texture slots. 2014-05-03 20:38:42 +09:00
308ec601b2 Fix for missing initialization and copying of FreestyleLineStyle::pr_texture value. 2014-05-03 20:38:41 +09:00
0cd49fde56 Make blenderplayer compilable again after recent commit b7f085d9c1 by Tamito.
Inserted a stub in stub.c and added the struct keyword to make gcc happy
2014-05-03 12:51:51 +02:00
a4408f405d install_deps: always specify openexr/ilmbase versions to OIIO and OSL cmake, might help in some cases... 2014-05-03 12:46:12 +02:00
b7f085d9c1 Patch D246: Texture Marks for freestyle strokes, written and contributed by Paolo Acampora.
Reviewers: brecht, kjym3, #freestyle

Reviewed By: brecht, kjym3

Differential Revision: https://developer.blender.org/D246
2014-05-03 18:54:59 +09:00
6ec2d72eca Alternative fix for T39941, this also fixes odd behavior of rendered preview.
The rendered preview didn't show active layer or wasn't updated if the
layer was disabled. Now the viewport always shows an active layer regardless
of whether it's enabled or disabled.
2014-05-03 18:29:58 +09:00
c7612d68b2 Comment out scons '-Werror=float-conversion' for Cycles for now.
This option is only available in gcc >= 4.9, and we do not have a fancy helper in scons
to check availability of a flag...
2014-05-03 11:08:27 +02:00
392d5de0aa Fix '-Werror=float-conversion' error with gcc < 4.9, for CMake
Scons is still TODO.
2014-05-03 10:54:02 +02:00
39dc3bce30 Fix T40001: Opening a 2.66 blend file in 2.7, a bone appear "rolled but not rolled".
Looks like some sign was lost in that complex matrix algebra (always be wary of squared values!).
2014-05-03 08:52:22 +02:00
35a9a7d396 NLA Editor: Show correct tooltip for "NLA Mute" on datablock expanders 2014-05-03 16:50:40 +12:00
3faa48cb07 Spelling fix 2014-05-03 16:50:39 +12:00
198f5e506a Cycles: CUDA changes for kernel evaluation cancel 2014-05-02 21:19:10 -03:00
Dalai Felinto
eec3eaba08 Cycles Bake
Expand Cycles to use the new baking API in Blender.

It works on the selected object, and the panel can be accessed in the Render panel (similar to where it is for the Blender Internal).

It bakes for the active texture of each material of the object. The active texture is currently defined as the active Image Texture node present in the material nodetree. If you don't want the baking to override an existent material, make sure the active Image Texture node is not connected to the nodetree. The active texture is also the texture shown in the viewport in the rendered mode.

Remember to save your images after the baking is complete.

Note: Bake currently only works in the CPU
Note: This is not supported by Cycles standalone because a lot of the work is done in Blender as part of the operator only, not the engine (Cycles).

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Bake

Supported Passes:
-----------------
Data Passes
 * Normal
 * UV
 * Diffuse/Glossy/Transmission/Subsurface/Emit Color

Light Passes
 * AO
 * Combined
 * Shadow
 * Diffuse/Glossy/Transmission/Subsurface/Emit Direct/Indirect
 * Environment

Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge

Original design by Brecht van Lommel.

The entire commit history can be found on the branch: bake-cycles
2014-05-02 21:19:09 -03:00
Dalai Felinto
97641a0ec9 Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.

The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.

The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit

Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake

bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.

Supported Features:
------------------
 * Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.

 * Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.

 * Cage Extrusion - distance to use for the inward ray cast when using selected to active

 * Custom Cage - object to use as cage (instead of the lowpoly object).

 * Normal swizzle - change the axis that gets mapped to RGB

 * Normal space - save as tangent or object normal spaces

Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"

Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)

* For a complete implementation example look at the Cycles Bake commit (next).

Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge

Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.

The entire commit history can be found on the branch: bake-cycles
2014-05-02 21:19:08 -03:00
Dalai Felinto
3312b20ac8 IMB buffer functions to take a mask as input
The mask make sure the conversion only happens in a few areas of the
buffer.

New Functions:
* IMB_buffer_byte_from_float_mask
* IMB_buffer_float_from_float_mask

The functions are an adaptation of their maskless counterparts without accepting different profiles for the input and output buffers.

Review: Sergey Sharybin
2014-05-02 20:56:16 -03:00
Dalai Felinto
56d8affe42 BLI_path_suffix() - new path util functon to add a suffix to a filepath (before the extension)
Revision: D465
Reviewd by Campbell Barton
2014-05-02 20:56:16 -03:00
0111f3505f UI: more changes for large textfields
- no longer set 'but->drawstr' when editing buttons.
- clip text and set cursor based on the 'editstr'.
2014-05-03 09:18:00 +10:00
8d16869d83 Code cleanup: Add -Werror=float-conversion to Cycles 2014-05-03 07:31:46 +10:00
43d5e54a79 Fix for paste clamping the string length to UI_MAX_DRAW_STR 2014-05-03 06:06:19 +10:00
fc591473b2 Fix T39924: 400 character limit in text fields 2014-05-03 05:03:55 +10:00
0bb20259db Fix incorrect sizes used copying panel idname, tabname. 2014-05-03 04:17:55 +10:00
b62c2a913b Fix T39985: crash while rendering a scene with compositing nodes using another scene
The issue was caused by the wrong scene used to acquire render result for.

Now made it so render pipeline reports currently rendering scene to the job
via special callback.

This also solves missing tile highlight issue when rendering multiple scenes
in the compositor.
2014-05-02 14:54:13 +02:00
1552b56d9c Fix for missing render layer display buffer allocation 2014-05-02 14:54:12 +02:00
b2c2edf6ae Fix T39966: Whole Group option of dupligroup visualization of particles
does not work as expected for Viewport and Blender Internal.

As @sergey noticed, this was caused by rBfbf8595, which disabled
rendering for wireframe objects in the viewport. However, the same
function `is_object_hidden` is also used for skipping dupli objects then
which may themselves be renderable.

Now use two variants:
* is_object_restricted is the previous test for general viewport/render visibility (lets wireframe duplicators pass)
* is_object_hidden includes the wireframe check for actual render instances
2014-05-02 13:08:15 +02:00
f65dcfc6d9 Fix T39989: Dupli group's objects in Particles are not displayed properly in 3D View
It was broken in 7544961 and the proper way is to make sure proper obmat is being
copied to object before the draw.

Doing obmat copy in advance doesn't really work because object might appear multiple
times in the duplilist.
2014-05-02 11:26:59 +02:00
6416979b45 Fix T39984: Interpolation errors in particle emitter animation.
Reverse child->parent order of particle emitter animation eval causes
artifacts when more than one parent level is used.
2014-05-02 09:56:51 +02:00
1a8b17661f Fix T35552: LibLoading objects with Collision sensors gives an error
The collision sensors were not being properly unregistered from the
physics system before they were merged into the current scene.
2014-05-02 00:08:00 -07:00
27cbb28659 BGE cleanup: Removing the unused SCA_EventManager::Replace_PhysicsScene(). 2014-05-01 19:43:07 -07:00
685316b406 BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment() 2014-05-01 18:34:25 -07:00
867efab404 Correct own stupid mistake dragging popups (x/y swap) 2014-05-02 10:09:26 +10:00
c12af4beb9 Code cleanup: UI use ui_block_to_window_rctf where possible 2014-05-02 09:33:29 +10:00
9270aa9278 Cleanup: Remove unused variables. 2014-05-02 01:27:10 +02:00
f61e885706 UIL: Dragging popups wasn't updating safe-areas 2014-05-02 09:25:04 +10:00
9f16428cb5 BGE cleanup: Moving the PHY_* includes in BL_BlenderDataConversion.cpp
These includes are now with the rest of the includes instead of in the
middle of the file. This should also help building on OS X.
2014-05-01 15:26:05 -07:00
4e7780a34a Cycles UI:
Show the Ray Visibility panel for objects with dupli_group on, no reason to hide it.
2014-05-01 19:14:10 -03:00
5f80a7ffe2 Fix T39932: LibNew can't find LibLoaded meshes.
LibNew now searchs dynamic (i.e., LibLoaded)  mains instead of just the current main.
2014-05-01 14:49:42 -07:00
b75b0a11e0 Update parse_syntax_error() to Python 3.4x version 2014-05-02 06:24:29 +10:00
45163387d2 Fix T39988: Selected object count invalid after exiting local-view 2014-05-02 05:56:57 +10:00
d303556afb Code cleanup: remove file handling headers where they arent needed 2014-05-02 05:37:11 +10:00
3db5430b92 Code cleanup: replace long long with int64_t & doxy formatting. 2014-05-02 05:37:11 +10:00
e2288255fb Fix T39987: The new "redirect to bone constraints" button at the object constaints tab is wrong in bone edit mode
In edit mode, do as with usual objects - show object constraints!
2014-05-01 21:24:30 +02:00
c806a8ce96 Cycles: MIS for lamps now loops over all lamps instead of picking one.
Probably will not be noticed in most scenes. This helps reduce noise when you
have multiple lamps with MIS enabled, at the cost of some performance, but from
testing some scenes this seems better.
2014-05-01 19:25:13 +02:00
95b93b5d46 Add BLI_compiler_compat.h to help with portability 2014-05-02 01:14:15 +10:00
35ca209152 Code cleanup: remove unused kludge for Py/Win encoding 2014-05-02 00:56:24 +10:00
fa25d7cf7b Code cleanup: remove defines no longer needed on windows 2014-05-02 00:55:54 +10:00
ea6fba2926 Cleanup: Remove unused variables. 2014-05-01 16:32:25 +02:00
195df5a034 Fix some dummy formating issue (breacks i18n message processing). 2014-05-01 16:30:40 +02:00
bb5b608deb Fix T31555: Username with special chars in Windows 7
At last! Could not check seriously on windows (though it was done during py patch
process).
2014-05-01 16:25:39 +02:00
1e9c4639c2 Install_deps.sh: do not use terminfo in our own llvm build.
llvm-config does not report it as link arg as it should
(see http://stackoverflow.com/questions/21477407/llvm-3-5-fails-to-link).
2014-05-01 16:25:39 +02:00
57405578f9 Fix for a typo in comment. 2014-05-01 23:04:37 +09:00
8bdac4d0bc fix T39967: Added support for Import/export of vertex color layers 2014-05-01 14:52:36 +02:00
091f13a618 Fix blenderplayer build. 2014-05-01 09:35:32 +02:00
9fb4c487ed Fix T39938: install_deps.sh fails when compiling OSL
Should always use a fixed rev in git repos!

Also done some other cleanup/fixes.
2014-05-01 09:30:11 +02:00
b245d3577a View2d: bring back 2.4x option to lock time for 2d views 2014-05-01 14:49:47 +10:00
4849ca8a56 Fix T39884: Displaying filenames with '|' failing in menus 2014-05-01 12:40:49 +10:00
7b0bce1946 Code cleanup: remove redundant filename copy & simplify splash 2014-05-01 11:59:25 +10:00
60c8c130fe BGE cleanup: KX_GameObject::GetParent() no longer increases the object's refcount.
I'm not sure why this function ever increased the object's refcount. Any
place in the code that calls KX_GameObject::GetParent() has to turn
around and call parent->Release(). Forgetting to call Release() was a
common cause of memory leaks (in fact, KX_SteeringActuator was probably
leaking). If the refcount needs to be increased, the calling code can
handle calling AddRef().
2014-04-30 18:53:32 -07:00
8d42e7b20d Cleanup / Cycles: Adjust comment for faster testing in the future.
Unfortunately the function call is still a bit slower, even with CUDA 6.0. :/
2014-05-01 01:21:21 +02:00
73ad0dfbae Fix first part of T39956
show diffuse option not correctly calculated on opening a file.

Make sure we call pbvh_show_diffuse_color_set after building the pbvh so
vertex data are available to it.
2014-05-01 02:12:02 +03:00
55b2a5aa45 More fixes, msvc 2008 needs math includes for "isnan".. 2014-05-01 00:36:15 +02:00
1fcce18dbf Another issue with includes
OSX needs userdef for pixelsize, adjusted header to avoid this happening again.
2014-05-01 07:38:14 +10:00
af86b008b2 Include removal gave problems with windows, ifdef some back in for windows only 2014-05-01 07:21:08 +10:00
cb48c0ceea Revert "Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc7a."
This reverts commit a47a4ef82f.
2014-05-01 07:20:46 +10:00
a47a4ef82f Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc. 2014-04-30 23:16:12 +02:00
2ce3e4639a Fix for making single user objects setting FROMGROUP flag incorrectly 2014-05-01 06:52:10 +10:00
d2a3260763 Add PBVH debug display, where we can see the PBVH node bounding boxes.
To enable enter debug value 14.
Leaf nodes are green while container nodes are red.
2014-04-30 23:43:19 +03:00
d50f8832e3 Fix T39969: Make single user object looses custom-tx-bone 2014-05-01 06:07:21 +10:00
3d5ab5a496 Warning cleanup: signed/unsigned compare
also remove redundant loop in BKE_pose_copy_data
2014-05-01 05:57:01 +10:00
762a988130 Fix for copy_object_pose incrementing custom user twice 2014-05-01 05:54:57 +10:00
4b75956330 Fix T39974: Popups lead to crash if 'UNDO' isn't set
This isn't supported, raise an error instead
2014-05-01 05:28:52 +10:00
0309a7b9a9 Code cleanup: remove unused header 2014-05-01 05:07:48 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
19cd6922a5 Fix T39965: Sequencer do not sync cycles strips
The was actually caused by the way how Cycles uses objects
layers. It's not possible to rely on the fact that layers
are flushed from Base to Object. It's only valid when rendering
active scene.

Now made it so layers are used from the base.
2014-04-30 21:08:07 +06:00
d1009bdad5 Windows: Disable Numpy for now, we miss the libs for Python 3.4.
Also make the flag WITH_BF_PYTHON_INSTALL_NUMPY flag actually work on Windows.
2014-04-30 16:49:49 +02:00
741f17f05b Cycles CUDA: make CUDA toolkit 6.0 the official supported version.
This also updates the configurations to build kernels for compute capability
5.0 cards, when using and older CUDA toolkit version this will be skipped.

Also includes tweaks to improve performance with this version:
* Increase max registers on sm_30, sm_35 and sm_50
* No longer use texture storage on sm_30
2014-04-30 16:07:27 +02:00
4d1a109dde Fix T35176: Python fails with blend files from non-ASCII paths
Thanks to Tamito for updating the patch to support Freestyle!
2014-04-30 23:43:01 +10:00
b96d531bc9 Python: move to version 3.4x on all platforms 2014-04-30 23:19:16 +10:00
417efb0e8b Remove hard coded Python version for scons
note: this isn't best way of extracting version without '.'
2014-04-30 22:29:28 +10:00
db32e6c4f7 Fix T39795: Crash when duplicate f-curve keyframe, individual origins
Seems to be just missing case for center point initialization in td.

Thanks Campbell for review!
2014-04-30 18:20:39 +06:00
1b9feb04ab Fix T38245: Render slot buffer gets deleted in compositor when input is an image
This was more like a TODO than a bug, but wasn't difficult to support.

Need to backup image slots before doing re-compo in nodes editor.

If something breaks, lease poke me!
2014-04-30 18:13:49 +06:00
6ab3a2f8a4 Change naming slightly, it conflicts with DrawText function define on
windows on MinGW
2014-04-30 11:57:12 +03:00
7829ef0051 Report when saving images and text
also fix bug where text saving would strip last newline
2014-04-30 21:43:11 +10:00
3803c646d8 Changes to cache line display in image editor
Only show it when having active mask or when current image
is a sequence or movie.
2014-04-30 17:40:02 +06:00
1760763bec Frame cursor color was missing for the image editor 2014-04-30 17:40:02 +06:00
d2032d0dfe Fix T39931: Crash generating thumbnails (error in escaping) 2014-04-30 20:44:52 +10:00
fe29f92030 Fix T39953: Float data images display trash in image editor
Was a failure of optimization trick.
2014-04-30 16:26:20 +06:00
cdc5d6537f BGE: Fixing a memory leak from the recent physics changes. 2014-04-29 23:53:19 -07:00
3150925ae8 Partially revert ef3eb7adc6
The .exe extension *is* needed on Windows for makesrna, contray to the
patch author's protestations otherwise. Omitting it breaks compilation
on mingw at least (i.e. "rename()" fails). Thanks to "PerfectionCat"
for narrowing down this bug.

makesdna on the other hand still seems to work ok from a quick test I did.
Unless more issues crop up, just reverting this part of the patch should
be ok, though IMO these changes were unnecessary in the first place.
2014-04-30 14:58:06 +12:00
31a7be8ed7 Spelling fixes 2014-04-30 14:30:22 +12:00
863352dfdc Correct issue with IMB_ispic returning bool 2014-04-30 10:43:46 +10:00
32e02302a7 Fix T39933: Link/Append Scenes misses VSE mask, clips 2014-04-30 09:46:26 +10:00
1f4cfb3974 Fix T39952: Printing tiles gives negative numbers 2014-04-30 09:34:37 +10:00
313d62df70 Get the edit-object when keying and checking editmode 2014-04-30 08:28:09 +10:00
48446870a8 Code cleanup: remove redundant CTX calls 2014-04-30 08:11:47 +10:00
cdaff06026 Fix T38905: view3d.object_as_camera didn't store the last-view 2014-04-30 07:34:33 +10:00
7e9a873a44 View3D: disable entering camera when enabling quad-view
This is annoying/distracting especially if your view is just where you want it,
also entering camera view is easy if you need.
2014-04-30 06:23:49 +10:00
23b4e246e3 Remove link from Link/Append UI, since we have 2 menu items 2014-04-30 05:09:22 +10:00
27591458aa Correct own regression drawing lamp outline 2014-04-30 04:52:31 +10:00
d71db08f6d Fix 39065: Leaving QuadView lost view settings
Now the 'User' view is used when exiting quadview.
2014-04-30 03:55:37 +10:00
4be837f192 Code cleanup: remove unused grease pencil pointer 2014-04-30 03:31:36 +10:00
1ef06abc5e Fix T39947: Aligned handle behaviour problem in graph editor
Error in recent change to handle behavior
2014-04-30 02:43:55 +10:00
8db84225bd Fix T31605: rotate around selection ignores numpad 2014-04-30 02:16:01 +10:00
d30988bbf1 Code cleanup: avoid sin/cos calls when drawing sun lamp 2014-04-30 02:12:11 +10:00
fc59160074 3D Text: edit menu was hidden 2014-04-30 00:53:07 +10:00
2322f37678 reduced minimum value for NDOF sensitivity to better fit the space navigator 2014-04-29 16:30:38 +02:00
6edcff4fd2 Fix for nurbs surface merge didn't update key index 2014-04-29 19:56:15 +06:00
d36795a11e Fix issue discovered in soc-paint-2013 branch.
Weights do not need perspective correction since they are calculated on
flat triangle coordinates. Only pixel coordinates, reprojected from the
weights need this.

This was already fixed for clone brushes but in
soc-2013-paint where we have stencil preview, it is apparent that the
stencil suffered from the perspective distortion issue too.
2014-04-29 16:52:32 +03:00
c034a252bb Code cleanup: quiet warnings 2014-04-29 22:37:44 +10:00
1dcf956849 Fix for wrong behavior of 'darken' blend mode with factor.
The formula was not consistent across Blender and behaved strangely, now it is
a simple linear blend between color1 and min(color1, color2).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D489
2014-04-29 14:03:09 +02:00
4ff3ebf45c Fix T39940: animation of render layer on/off toggle not working during render. 2014-04-29 14:03:09 +02:00
ef3eb7adc6 Code cleanup: don't use unnecessary .exe extension in scons, simplify code.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D236
2014-04-29 14:03:08 +02:00
7544961ea5 Fix T39942: Displacement of group instance objects when switching to textured viewport shading
Usual dupli object issue, sometimes it's needed that all the object in
dupli group have modified obmat.

Made it an utility function now, which is used by convertblender and
dupli draw code now.
2014-04-29 17:52:04 +06:00
182e97a2cd Fix T39941: Freestyle: Rendered preview crashes when non-primary render layer is selected and disabled.
Freestyle relies on render layer name (RenderLayer::name) to find the render layer that
corresponds to a scene render layer being rendered.

When the active render layer is disabled during preview rendering, the function
render_result_new() populates the list of render layers (RenderResult::layers) with an
unnamed render layer while setting the active scene render layer index to zero.

This commit fixes the missing initialization of the render layer name by referring to that of
the first in the list of scene render layers.
2014-04-29 20:41:48 +09:00
437bb528bd Accidentally left compositor debug option enabled, sorry.
(We should replace that with a proper build option really)
2014-04-29 12:50:19 +02:00
94bf67b78e Error in last commit 2014-04-29 20:41:28 +10:00
232f19f0c2 PyAPI: Matrix.invert(ed): accept an optional fallback argument
This avoids try/except when its possible the matrix has no inverse.
2014-04-29 20:12:07 +10:00
4d8c49bfd0 Reimplemented the earlier feature of swapping existing links to
neighboring sockets when connecting to an occupied input.

This now works based on socket names rather than types, which helps to
avoid unwanted connections to arbitrary sockets. Sockets are considered
swappable when their names match, based on an alphabetic prefix followed
by non-alphabetic suffix.

For example:
Image - Image : matches
Color1 - Color2 : matches (used e.g. in cycles mix nodes)
Roughness - Rotation : does not match (suffix is still alphabetic)
2014-04-29 11:28:16 +02:00
55c720f06e Fix T39936: Plane Track operation would not initialize resolutions for
upstream nodes.
2014-04-29 10:38:50 +02:00
409fb4da0c Code cleanup: remove redundant matrix initialization 2014-04-29 18:13:20 +10:00
d8282da545 Correction to last commit 2014-04-28 16:33:26 -07:00
3448822b2f Fix T39614: Ping Pong Action doesn't work correctly 2014-04-28 16:24:40 -07:00
a197d02b03 Fix T39939: Undo change of rB27db75363e67, which broke bevel.
The test for wire edges when reattaching was wrong, because
some newly made edges are wire at the point of the test.
This made some duplicate edges.
Need to track the original wire edges a different way.
2014-04-28 18:41:33 -04:00
94e5e2f5d8 Code cleanup: simplify reallocs using MEM_recalloc 2014-04-29 07:50:25 +10:00
a91c4ac99f Ignore user-preferences when inserting keys from Python 2014-04-29 07:35:04 +10:00
5d51de3bea Fix T39539
Initialization of not initialized memory when accessing the renderlayer
directly
2014-04-28 22:06:53 +02:00
7712d86512 Error in last commit, need to take duration into account 2014-04-29 06:05:54 +10:00
6600fe0de5 Correction to last commit 2014-04-29 05:48:25 +10:00
89b3dcaf82 f-curve easing: Adjustments to Robert Penner elastic easing
Compensate for the clamped amplitude by blending the elastic effect.

Allows for a subtle elastic effect which wasn't possible before.
2014-04-29 05:40:46 +10:00
e158fbf934 f-curve easing: make ease in/out expressions consistent 2014-04-29 03:21:32 +10:00
b5feb1940d f-curve easing: make ease-out symmetrical to ease-in 2014-04-29 03:20:11 +10:00
3d9b4159a4 PyC_RunQuicky: Print filename when its missing 2014-04-29 02:55:59 +10:00
1b63a5d815 Fix for f-curve elastic ease in/out discontinuity 2014-04-29 02:55:59 +10:00
49a5c57957 Fix T39934: Duplicate node shown in outliner's datablock display
Not good to have two different things named the same way! :P
2014-04-28 16:39:16 +02:00
28322c1496 Convex Hull 2D: avoid calling qsort twice 2014-04-29 00:35:32 +10:00
fdcb9fcb7e Bevel: Avoid sqrt comparing lengths 2014-04-29 00:35:32 +10:00
6feec25bdd "Auto" option for Keyframe.easing
This option (alongside the Ease In/Out/InOut options already available) aims to make it
easier to get an initial curve that looks closer to the one you were expecting, by
automatically picking whether Ease In or Ease Out should be used based on the type of
interpolation being used for the curve segment in question.

Notes:
* The types chosen may need some adjustments (e.g. using ease in-out instead of just ease in)
* This does break compatability with files saved in previous dev builds, but only
  if you were using Bounce/Elastic/Back with "Ease In"
2014-04-29 02:23:53 +12:00
a3a3141f53 NLA Editor: Make Single User for NLA Strips
This operator is used to make sure that if/when you have multiple strips
using the same action, if you select these and run this operator, each
strip will be given its own copy of the action. This is useful if you
decide later that you want to start using an existing action as a base.

NOTE: This does not recursively go inside meta's, so care is still advised
in that case.
2014-04-29 01:59:42 +12:00
68c3b6350a NLA Editor: Duplicate/Duplicate Linked
This commit changes the default strip duplication behaviour (Shift-D) so that it will
create a copy of whatever action it uses. Previously, it was very hard, if not impossible
in some cases to create a new copy of an action to start working on in the NLA.

If you want the old behaviour, you'll need to use ALt-D (Linked Duplicates).

(Note: Although the new Shift-D may not be so optimal in all cases, I've decided to go
with this version since it aligns better with the way this works for objects. Doing the
opposite for NLA would just have added to the confusion)
2014-04-29 01:59:41 +12:00
27db75363e Fix T39726: wire edges cause bevel artifacts.
Now code explicity excludes wire edges from beveling
and reattaches the wire edges to one of the newly
created vertices after beveling.
Also fixes a bug where vertex-beveling a wire-edge-only
vertex would not reattach the wire edges.
2014-04-28 09:07:47 -04:00
6dec2b1a2b Cycles CUDA: add support for sm_50 cards in kernel.cu, for testing. 2014-04-28 14:46:53 +02:00
58e465c077 Raise min blend version to 2.70.5.
So that users opening a .blend saved in 2.70.5 and above in an older version
get warning the file might not be 100% compatible (should have been done
already for 2.70, actually).
2014-04-28 14:17:09 +02:00
c089150426 Fix T39806: Koro rig (Caminandes) wrong in master, worked in 270(a).
Edit existing animsys_refactor module to make able to execute more complex conversions
('to' can now be a callback, instead of a simple prop name), and add a new
Update Animated Transform Constraints operator that uses it to handle complex
conversion for this constraint (drived or animated properties).

Note this operator has to be called manually (from 'space' menu), will make this clear
in release notes.

Also, similar changes made in 2.70 are *not* addressed by this script (would rather wrote
new operators as/if need arise, but Transform constraint looks much more sensible that the others).

This op should not remain in more than two or three releases anyway, imho.
2014-04-28 13:26:01 +02:00
912151763d Followup to rB8714ae09f894: better not have several RNA properties affect a single DNA one. 2014-04-28 13:25:14 +02:00
2aa9d33404 Fix T39902: Keyframe insertion by a Keying Set fails in the edit mode when keyframing object data properties.
Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D484
2014-04-28 16:46:06 +09:00
e44018220a Oops! Typo in previous commit 2014-04-28 19:37:29 +12:00
b40b6bd48d NLA Editor: Added an operator to set preview range based on the extents of selected strips
This brings it more in line with the other anim editors, and makes like a little
bit easier for animators working on games or looping anims.
2014-04-28 19:34:02 +12:00
1cd4a88423 Code cleanup: short -> bool 2014-04-28 19:34:01 +12:00
39d2cccd65 Fix for strict compiler flags after recent const array changes 2014-04-28 13:25:27 +06:00
da25ae183a Remove unused argument from sculpt_omp_start() 2014-04-28 13:07:21 +06:00
c504b8b237 Fix T39911: Unpredictable behaviour when editing y-coordinate of right handle via Active Key panel (for aligned handles)
Editing the y-coordinate of the right handle of a keyframe via the Active Keyframe
panel in the Graph Editor, while both handles are selected and are both of type "aligned"
resulted in weird behaviours such as the x-coordinate of the right handle changing
(and rapidly starting to overshoot) but nothing else. However, this problem
doesn't occur when only a single handle is selected.

It turns out that the "order of computation" logic in calchandleNurb_intern() gets
confused in the case of both handles being selected, and results in a sub-optimal
handling of the right handle being the one that's been changed. We hack around this
here by temporarily making it so that just the right handle is selected when doing
the updates here.
2014-04-28 17:16:19 +12:00
4de62241e4 Fix for typo in comment 2014-04-28 17:16:09 +12:00
0985bb483d Fix T38594: Incorrect behaviour when editing aligned handles in curve editor
With the right handle selected, the movement of the left handle appears constrained
to the frame it is currently on, leading to unpredictable and wild overshoots of the
bezier curve. There appears to be little benefit in doing so.

The effect of this patch is that makes it so that instead of trying (initially) to
maintain the same distance between the two handles and then overshooting randomly
later, the handles now try to keep the same distance from each other (i.e. similar
doing a rotation around the keyframe) at all times. While this means that it isn't
possible to set up assymetric handles (i.e. where ease in to the key is less than the
ease out for example) using aligned handles (it's still possible using free; it's just
a lot more work to keep them aligned), the benefits of removing of the random blips and jumps
when things jump outweight the losses.


Patch by Brecht
2014-04-28 17:15:23 +12:00
4a1b87790d Patch T39855: Icons for Interpolation Types (and Robert Penner easing)
This patch adds icons for each of the keyframe interpolation types (including
the easing equations), as well as icons for the easing type options.


Icons made by: Paulo José Oliveira Amaro (pauloup)
Reviewed by: Joshua Leung, Thomas Beck
2014-04-28 13:49:00 +12:00
b33953593b Graph Editor: Added buttons for editing handle types on the active keyframe (from NKEY region) 2014-04-28 12:47:22 +12:00
a8eb95c4e9 Fix T39597: Missing entries in VSE Preview menu
This adds some view ratios in the video sequencer menu, based (copied) on the UV/Image Editor. It also fixes the inverted ratio issue reported in the same task.

Reviewers: #video_sequencer, #user_interface, schlaile

Reviewed By: schlaile

CC: jta, dingto, sergey, schlaile

Differential Revision: https://developer.blender.org/D447
2014-04-27 22:59:30 +02:00
7971ffdf5e New icons for texture painting by Pawel Lyczkowski.
Task: https://developer.blender.org/T37960

Thanks a lot :)

Those only cover the current set of brushes, soc-paint brushes will be
commited on that branch
2014-04-27 23:59:14 +03:00
a2df2a637e Two changes:
* Buffer icons are usually in straight space (since we load from pngs)
so use src_alpha in OpenGL for blending.

* Allow blending for preview icons. This will be useful for the next
commit...
2014-04-27 23:38:39 +03:00
f328f45e22 Fix T39692: Text fields in datablocks editor are broken
Make RNAPointer props un-editable here, we simply cannot handle this.

Also correct previous commit, asking for autonaming for all items was a bit extreme,
this is only needed for enums!
2014-04-27 22:33:05 +02:00
8dcb1e9f70 Fix another part of T39692 Text fields in datablocks editor are broken.
Broken enums widgets was a sequel of rBe5e0888a8f02 (when we want auto-naming,
we have to pass NULL, not and empty string!).

Now remains the RNApointers issue...
2014-04-27 21:58:56 +02:00
6ac300ae72 Fix part of T39692: Text fields in datablocks editor are broken
Text field part. Issue with enums dropdowns remains a mystery currently.

As for pointer fields, afaict they have never worked here, though it should
not crash.

UI_EMBOSS are values, not bitflags (own fault, most likely)...

Note we should probably get rid of UI_EMBOSST, it is used nowhere in UI code (set
in one place only, used nowhere).
2014-04-27 21:42:50 +02:00
c84095fe7f Editmesh: Update tooltips for vert/edge/face buttons 2014-04-28 03:52:42 +10:00
9d88fb1dff RNA: Use unsigned ints when bit-shifting 2014-04-28 03:42:13 +10:00
c3d3ae3ee7 Code cleanup: avoid warning about bit-shift outside int range 2014-04-28 03:05:37 +10:00
f0ec202099 Fix T39921: Collada export creates invalid XML when using Track To constraint
Constraints are no ID...
2014-04-27 18:44:26 +02:00
835765926f Final overlooked cleanup for last commit 2014-04-27 18:44:23 +02:00
f3798fa45e Revert the testing sculpt openmp thread control and limit for OSX to physical threads as in 2.70a tag 2014-04-27 18:39:03 +02:00
4aea8f1085 Fix T39919: Collada export crashes blender when using a "Copy Location" constraint 2014-04-27 18:27:53 +02:00
1973b17fce View3D: Tweak GLSL preview, use only lamps enabled in active render layer and material light group.
This change makes lighting in GLSL preview more accurate, though it still
doesn't support material's "Exclusive" option.

Technical note: Changes in view3d_draw.c are not essential, these avoid
preparing unused shadow buffers.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D457
2014-04-28 01:20:36 +09:00
a2489e29f6 Code cleanup: style, unused import 2014-04-28 00:19:15 +10:00
d7d2e71a03 Correct some errors in auto-cleanup 2014-04-27 22:02:59 +10:00
c26105278f Fix T34993: "Jump to Next Keyframe" shortcut not related to the timeline viewable keyframes
Made the timeline option to only show keyframes from selected channels/data be a
per-scene setting instead of the per-timeline option it was previously. This makes
it easier for animators working on rigs with multiple bones (especially during the
polishing phase), since now the timeline and jump to keyframe operators use the same
setting to decide which subset of keyframes they need to consider.

By default, this option is enabled by default.

TODO: Extend this to the keyframe status shading on the active object name in the 3D view?
2014-04-27 21:59:17 +12:00
b6e967be63 Code cleanup: const args and arrays 2014-04-27 08:56:54 +10:00
7ca74fc1c0 Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes) 2014-04-27 00:25:16 +10:00
88a0fe5f1b Code cleanup: use 'const' for arrays (bmesh) 2014-04-27 00:25:16 +10:00
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
f2d25975b5 Code cleanup: use 'const' for arrays (render) 2014-04-27 00:25:15 +10:00
15d77d201d Code cleanup: use 'const' for arrays (windowmanager) 2014-04-27 00:25:15 +10:00
e73d0f57a3 Code cleanup: use 'const' for arrays (python) 2014-04-27 00:25:15 +10:00
483d8da9bc Code cleanup: use 'const' for arrays (blenlib) 2014-04-27 00:25:15 +10:00
a2c107aef1 Code cleanup: use 'const' for arrays (blenkernel) 2014-04-27 00:25:15 +10:00
11310b554a Cycles: avoid some CUDA performance on scenes without deformation motion blur. 2014-04-26 14:29:52 +02:00
1e3904677c Avoid integer overflow in build_implicit_tree_helper 2014-04-26 06:55:36 +10:00
d0533b6c07 Fix T39896: lock view rotation, behavior not consistent 2014-04-26 03:18:18 +10:00
a66ae2b4ae Outliner: avoid using bitshift when hashing (which could use negative numbers) 2014-04-26 03:06:36 +10:00
a34a65314c Fix for transform local-axis calculation with zero length normals 2014-04-26 02:06:57 +10:00
a3b0ba2871 Always init pointcache frame step to 1.
Note it was already the case for many simulations (cloth, rigidbody, etc.), just doing this
systematically in BKE_ptcache_add() now, will avoid us some recurring bug reports.
Advanced users will know when they can/have to raise this parameter!
2014-04-25 17:55:37 +02:00
18060d8632 Fix T39895: Displaying the armature layers popup in edit mode always fails.
In fact, armature layers operators (set layers, and show all) were kind of messy and broken
in Edit mode (Select layers had two different operators for Pose and Edit modes, both
using the same funcs that could only work in Pose mode, Show All was supposed to be
used in both modes but again, its exec code could only work in Pose one).

Fixed that by:
* Using only one op for each task, for both modes (with adapted poll func).
* Replacing 'object from context' access by an helper that returns the right Armature
object in both Edit and Pose modes.
2014-04-25 17:22:49 +02:00
dd86773969 BoxPack: replace macros with functions
also correct error merging vertices
2014-04-26 00:25:49 +10:00
61eba8fd06 Fix T39843: cycles memory leak rendering with high transparent depth. 2014-04-25 15:30:12 +02:00
bef1edb322 Add message for constraint poll
Was confusing for Python devs when these fail silently
2014-04-25 22:05:18 +10:00
fe52e64f6b Revert previous change after discussion with Campbell
Let's just be really verbose and it some compiler gives
issues tell him NOT to do this.

We shouldn't really workaround compiles' idiocy..
2014-04-25 17:16:06 +06:00
9d335dffa4 Fix strict flags compilation error in box pack
No need to check q >= 0 in quad_flag() since q is
an unsigned int argument.
2014-04-25 17:02:18 +06:00
005dabbd9a Fix T39799: Backdrop (compositor) ignores alpha.
This issue is because of a somewhat "special" behavior in old code, which got lost during rB09874df:

There was a variant of the `relinkConnections` function which would leave the socket completely unconnected. This is not a valid state really (given that each unconnected input must otherwise connected to a constant `Set` type node), but was used as a way to distinguish connected alpha/depth sockets in composite and viewer output nodes.
https://developer.blender.org/diffusion/B/browse/master/source/blender/compositor/intern/COM_InputSocket.cpp;28a829893c702918afc5ac1945a06eaefa611594$69

After the large cleanup patch ({D309}) every socket is now automatically connected to a constant, such that `getInputSocketReader` will never return a NULL pointer. This breaks the previous test method, which needs to be replaced by more explicit flags. Luckily this was done only for very few output nodes (Composite, Viewer, Output-File). These now use the regular SetValueOperation default in case "use alpha" is disabled, but set this to an explicit 1.0 value instead of mapping to the node socket.
2014-04-25 12:05:23 +02:00
1eb1351976 Fix T38924: wm.link_append() could fail to append
When the library path was changed by BLI_cleanup_path
appending would fail.
2014-04-25 18:43:53 +10:00
258e30f2c7 Fix T39886: Transformed parents of Rigid Bodies cause problems with Bake To Keyframes
Need to convert transforms to parent space for objects with parents.
2014-04-25 08:08:57 +02:00
3b75d6c4f9 Fix T39880: Cancelling transforms in Graph Editor does not restore F-Curves to original state
Since autosnap was being applied during the flushing step for various practical reasons,
it wasn't possible to restore keyframes and handles to their original values, as these
would always get overwritten before getting a chance to be written back to the keyframes.
2014-04-25 13:32:27 +12:00
b1932477a7 Spelling error fixes 2014-04-25 13:19:21 +12:00
9863e71692 Freestyle: Fix typos in a tool tip. 2014-04-25 09:22:24 +09:00
a15be34389 Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
2014-04-25 05:36:16 +10:00
16443b1ae0 Fix T39874: Bone roll resets if bones are moved in edit mode
Own stupid typo in rBee387c6addb2, sigh...
2014-04-24 21:25:28 +02:00
030ae5cadf Quiet warnings 2014-04-25 03:21:13 +10:00
ae71729c8b BoxPack: add bias, fixes erratic placement with identical boxes 2014-04-25 03:20:51 +10:00
69de54f99a BoxPack: remove unusable vertices while packing
avoids having to check placing boxes there.
2014-04-25 03:13:35 +10:00
e6c1a23341 BoxPack: add support for merging verts as they are packed in
Reduces the number of vertices to pack boxes into.
2014-04-25 03:13:35 +10:00
d5647a37b4 BoxPack: flag verts used in packed boxes 2014-04-25 03:13:35 +10:00
72e9052713 BoxPack: remove quad_flags array, replace with inline bit-shift 2014-04-25 03:13:35 +10:00
6c57ee53bf Box Pack: Improve when packing boxes of the same size 2014-04-25 03:13:35 +10:00
b8ea2e73d2 Smart UV Project: don't rotate islands which are almost square 2014-04-25 03:13:35 +10:00
d12ceec401 Fix T39861: UI destroys float precision.
Note this is only a workaround in fact, adding some precision in radians case.
Validating the field will still generate a precision loss (doing otherwise is
doable-ish, but likely to backfire and/or add too much complexity in an already
complex area).
2014-04-24 17:31:14 +02:00
adf1834ede AutoSnap Bugfixes: NLA Frame/Second Step didn't work
Since the NLA was also using the standard transform mode by default, this meant that
no frame/second step-snapping was happening here (i.e. like for the Graph Editor).
The actual differences between doing true stepping vs nearest here are quite small
(and don't really make much sense with NLA Strips), so for now, it should be fine that
these are the same.
2014-04-25 03:14:04 +12:00
9f4ad8014c AutoSnap Bugfixes: NLA Editor - Nearest Second behaviour tweak
The previous behaviour for nearest second meant that transforming the strips often
caused their lengths to change (sometimes drastically), since strip lengths aren't
always uniformly x-seconds long. Now, it only snaps the start frame value, and adjusts
the end of the strip to follow.

This works well for most cases, apart from negatively scaling the strip, where it will
get "stuck" as a 0.001 frame long strip (and the viewport drawing will be a bit weird
during this time). Nevertheless, negative scaling of strips isn't something that's exactly
recommended.
2014-04-25 03:14:03 +12:00
8b24d0a2e9 AutoSnap Bugfixes: NLA Editor - Nearest Frame/Second
Split off handling for nearest second from nearest frame
2014-04-25 03:14:02 +12:00
e80fbf8674 More AutoSnap Bugfixes: Time Stepping in Graph Editor
* Frame Step now works correctly and as expected
* Second Step kindof works, but the handles are not well behaved.
2014-04-25 03:14:02 +12:00
9c28a24153 Fix T39819: Decouple autosnap behaviour from time display
This commit cleans up and fixes some problems related to how the auto-snapping
behaviour in the animation editors works, resolving the issues mentioned in T39819.

1) "Nearest Frame" no longer snaps to the nearest second when time is displayed in seconds.
    Instead, there is now also a "Nearest Second" option, so that either can be used
    as needed instead of only when a certain time display is used.
2) A similar change has been made for "Time Step" - This is now "Frame Step" and "Second Step"
    respectively.

Notes:
* Removed the unneeded getAnimEdit_DrawTime()
* Time Step/Frame Step don't work for Graph Editor yet (and seem to not have worked at all)
* NLA Editor also seems to be showing some weirdness now. Will be checked on.
* Cancelling nearest-second snapping doesn't work nicely, due to another bug with GraphEdit transforms.
2014-04-25 03:14:01 +12:00
1ae3a3fc16 Code Cleanup: short -> bool 2014-04-25 03:14:00 +12:00
258a9b5fc1 Fix T39867: Hotkey is not displayed in the node editor's menu.
Making both keymap and menu values the same, and adding a (debug only) check in
IDP_EqualsProperties_ex() warning when comparing two floats with nearly the same value.
2014-04-24 16:48:43 +02:00
f6da871d9d Follow-up to the previous fix for T37452: More descriptive tooltips for freestyles settings
Made additional tool tips revisions suggested by a comment to T37452.
2014-04-24 23:45:29 +09:00
ece64c7ffd Freestyle: minor UI improvements.
* The button icon for jumping to the Render Layers tab of the Properties context is
now RENDERLAYERS.  Previous icon BUTS was too general.

* Thickness position options are grayed out if not applicable.  These options are applied
only when plain chaining is used with the Same Object option enabled.
2014-04-24 23:45:28 +09:00
95eb5fb727 Fix T37452: More descriptive tooltips for freestyles settings.
Tool tips of some Freestyle parameters were revised so that parameter descriptions
are easier to understand for artists.
2014-04-24 23:45:27 +09:00
920602f3cf Quiet warning 2014-04-24 20:20:26 +10:00
488581bfc6 Fix T39830: Viewer node update error in the compositor when using the seperate/combine YCbCr nodes
Mode of the YCC<->RGB was never set..
2014-04-24 15:17:14 +06:00
e7c5931990 Fix T39785: Video Sequencer, Aspect Ratio issue
Sequencer preview was rendering all scenes with the context
resolution, which doesn't give proper result. Now made it so
sequencer scene preview uses scene's resolution.
2014-04-24 14:30:22 +06:00
f5a716b5e0 Fix T39786: Transform node gives bad result.
Error caused by rB09874df1.
2014-04-24 09:32:55 +02:00
5bcc9ee4fe COmpilation error fix after recent cleanup in BGE 2014-04-24 13:03:41 +06:00
59b94f2193 Freestyle: quiet BMESH validator warnings of zero normals. 2014-04-24 13:57:10 +09:00
f5c3c624f8 BGE Cleanup: Moving reinstancing physics shapes from KX_ConvertPhysicsObject to PHY_IPhysicsController
This was the last item in KX_ConvertPhysicsObject. Therefore,
KX_ConvertPhysicsObject.h and KX_ConvertPhysicsObjects.cpp have been
removed.
2014-04-23 19:39:57 -07:00
4e5e3a978e Fix the classification + ordering of a few of the easing types
After recently reading through Robert Penner's original descriptions of these
easing equations for some other work I've been doing, I realised that the
ordering I introduced earlier was slightly off (with regards to sine and circular
types). This commit recitifies these issues.
2014-04-24 14:29:11 +12:00
1fabfc9ea2 Fix T39851: F-curve noise modifier on a bone: change selection when modifying value
When the dopesheet was open, "keyframe edited" events from the graph editor
(i.e. fired whenever any properties on keyframes or FModifiers are changed)
would trigger the dopesheet to synchronise selection states of anim channels
and ensure that FCurve autocolours are initialised correctly.

This however was undesired when editing properties in the graph editor. Now,
made it so that keyframe adding/removing operators use different notifier flags
to specify that the channels might have changed + need colour syncing, and
adjusted the dopesheet updating logic to fit
2014-04-24 14:29:10 +12:00
8cee587bcb BGE Cleanup: Physics conversion is now handled by PHY_IPhysicsEnvironment
The current physics conversion code was moved from
KX_ConvertPhysicsObjects to CcdPhysicsEnvironment.
2014-04-23 18:39:33 -07:00
89c61b20f0 BGE Cleanup: Reducing KX_BlenderSceneConverter's dependence on Bullet.
* Moving the BlenderDebugDraw (derived from btIDebugDraw) from
    KX_BlenderSceneConverter to CcdPhysicsEnvironment
  * Moving CcdPhysicsEnvironment initialization to CcdPhysicsEnvironment
    (this could probably be cleaned up some more with some sort of
    factory, or at least moving code to CcdPhysicsEnvironment's
    constructor)
  * Simplifying physics environment initialization (went from two
    switches to one)
2014-04-23 17:53:25 -07:00
3442a658fc BGE Cleanup: Reducing KX_Scene's dependence on Bullet.
Instead, it now relies more on our physics abstractions (e.g.,
PHY_IPhysicsEnvironment).
2014-04-23 14:08:49 -07:00
81e28b8802 BGE Cleanup: Removing the empty KX_ClearBulletSharedShapes() function 2014-04-23 13:59:04 -07:00
3182c54da6 Fix T39839: Applying the subsurf modifier deletes the freestyle edge marks 2014-04-24 05:20:45 +10:00
bba974241b Subsurf: minor optimization setting edge origindex 2014-04-24 05:14:35 +10:00
1e6fa59e4f Fix T39852: Crash (Blender internal) large objects
Add check when bounds reached inf
2014-04-24 03:07:45 +10:00
d4261d02bd Quiet warnings 2014-04-24 02:34:34 +10:00
7cdf5992dd Add asserts to raytrace get/set_cut functions 2014-04-24 02:30:39 +10:00
210dc12b53 Fix T39847: Followup to rB6babb4d12b8b.
As suggested by Campbell, bump subversion and reset all ui_previews data (so that any file that could
have been corrupted in past two weeks because of this bug is fixed and valid again).
2014-04-23 18:02:48 +02:00
ad6d897d98 Fix T39848: Reroute nodes were not handled properly after compositor
cleanup patch.

These simply need a proxy node, which will be replaced by direct
operation links afterward.
2014-04-23 17:01:38 +02:00
14ab812da5 Fix T39828: Incorrect render layer visibility display for animated render layers.
More like a workaround, current depsgraph does not really allow for animated layers,
esp. when we alwys expect at least one to be enabled (same issue as with basic Scene layers).
2014-04-23 15:58:46 +02:00
70fdcebb93 Fix T39781: Autosmooth feature: erroneously showing hidden vertices' normals too when in "vertex per face" display
So, turned out after all we need a foreachmapped helper for loops as well... :/

CDDM and EBDM were reasonably simple, but I fought hours with CCGDM (subsurf) to find only a
bad working solution (see D478). So I fallback to a code similar to CDDM one.
Probably not nice for performances, but loops and subsurf are not matching well...

Reviewers: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D478
2014-04-23 15:25:12 +02:00
8bf7172384 Fix compilation on OSX after previous commit
EXPECT_EQ wasn't defined in the scope.
2014-04-23 19:19:38 +06:00
60b015d1fc Update ffmpeg in install_deps.sh to 2.1.4. 2014-04-23 14:17:39 +02:00
dda5678669 Cleanup in modifier stack evaluation: deduplicate final tessellation handling code between
editmode and objectmode functions. No behavioral change expected!
2014-04-23 14:17:39 +02:00
513066e8ad Fix T39849: Adding links directly between node group input/output
extension sockets would create additional extension sockets instead of
simply ignoring them.
2014-04-23 12:01:33 +02:00
c605711c6b Libmv cleanup: move aligned malloc implementation into own file
It was rather stupid having it in brute region tracker,
now it is in own file in base library.
2014-04-23 16:03:44 +06:00
ad5497b6df Code cleanup: style and use switch () for (un)pack 2014-04-23 19:22:03 +10:00
6babb4d12b Fix T39847: uiPreview not being copied with areas 2014-04-23 17:13:28 +10:00
e0920364ce Quiet warning 2014-04-23 17:01:56 +10:00
fc28732ba6 Blender Internal: Add material property "Cast" which can disable both ray and buffer shadows.
Also refactor:
- Material property UI related to shadows
- Preparation of OR-ed mode flags (ma->mode_l) of render materials

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D313
2014-04-23 15:03:34 +09:00
0e6b28e04b Added missing bpy.data.linestyles.is_updated property.
Reference: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI
2014-04-23 14:55:33 +09:00
e6dcb0d9c3 Whitespace 2014-04-23 16:49:21 +12:00
1c6f8192e2 Applying same fix for snapping keyframes in Graph Editor 2014-04-23 16:49:21 +12:00
3f0227eb85 Fix T39850: Graph Editor - 'Mirror Over First Selected Marker' mirrors over frame 0 instead
Problem was introduced back in 2.70 during Project Pampa when the FCurve Normalisation
feature was introduced. The cause was that the normalised cursor value was always getting
passed to the KeyframeEditData context, even when it wasn't needed.
2014-04-23 16:49:20 +12:00
4609593a17 BGE Cleanup: Removing all of the my_* functions in KX_ConvertPhysicsObjects.cpp that were used to get bounds information
Now we just use BKE_object_boundbox_get().
2014-04-22 20:36:36 -07:00
df1a199787 BGE Cleanup: Removing KX_ObjectProperties, KX_BoundBoxClass, KX_BoxBounds, and KX_CBounds
These were used in BL_CreatePhysicsObjectNew() in the converter. However, all
of the data put into KX_ObjectProperties was then copied again in
KX_ConvertBulletObject(). So, instead KX_ConvertBulletObject() now gathers the
information it needs itself, which avoid this odd double conversion step for
physics.

As a side-effect, the old code would result in static non-mesh objects with no bounds
set to still have triangle mesh bounds. This would result in no bounds for these objects.
If a bounds was set that required a mesh, non-mesh objects would become sphere bounds.
This is now true regardless of whether user bounds were set. In other words, static
non-mesh objects now use sphere bounds by default instead of mesh bounds. This might
slightly alter some games, but these objects should generally be set to No Collision
anyways.
2014-04-22 20:12:22 -07:00
0f91d2cec9 Fix T39458: Switching physics type from Character to Dynamic enables ghost flag silently
Enabling ghost for Sensors and Characters is now done in conversion
rather than when setting the RNA.
2014-04-22 16:42:03 -07:00
6b9ca06088 Cycles: some tiny hair intersection optimizations that help maybe 2%. 2014-04-23 01:35:28 +02:00
0f85174d50 Fix occasional wrong normal for curves with minimum width.
This caused a couple of fireflies in koro_final.blend. The wrong normal would
cause the shading point to be set as backfacing, which triggered another bug
with hair BSDFs on the backface of hair curves. That one is not fixed yet but
there's a comment in the code about it now.
2014-04-23 01:35:27 +02:00
f2c483d108 Fix T39429: Project paint error with UV bleed 2014-04-23 04:33:07 +10:00
a892cf683b Apparently msvc doesn't have #warning
It's unclear how to deal with symlinks on windows as well..
2014-04-23 00:26:14 +06:00
421c42bc16 Math Lib: move barycentric_weights_v2_persp to into math_geom 2014-04-23 02:10:40 +10:00
6974b69c61 Cycles: optimization for hair BVH build, allow max 2 hair curves per leaf.
This gives me 14% reduction in render time for koro_final.blend.
2014-04-22 17:15:41 +02:00
2108a61691 BMesh: minor optimizations for shapekey lookups on conversion 2014-04-23 00:49:28 +10:00
af84bf2d29 Add type checks for Python context overrides
it was too easy to use invalid types which would crash or fail silently.
2014-04-22 23:05:58 +10:00
bca7d15ce0 Code cleanup: use const for rna 2014-04-22 22:55:10 +10:00
4e3c9b01a0 View3d: api naming, for setting the view matrix. 2014-04-22 22:01:52 +10:00
058bc50799 OSX: tentative fix for D472, ditto creates dirs when needed automatically, also thin out lib. Todo: rather not build the intermediate bins with openmp dependency anyway 2014-04-22 12:27:45 +02:00
916a216f44 Correction to O_NOFOLLOW commit to make it more portable 2014-04-22 14:28:36 +06:00
db8e7d7a88 install_deps: update to py3.4 and numpy1.8. 2014-04-22 10:08:39 +02:00
367722470a Don't follow symlinks when writing autosave or quit.blend
D253 from Lawrence D'Oliveiro
2014-04-22 17:21:00 +10:00
41b37c007c Corrected the comment 2014-04-22 13:02:39 +06:00
830a8847bd Switch buildbot to Python-3.4.0 2014-04-22 13:00:35 +06:00
551096d6fd BLI_open: check returned value for -1 instead of < 0 2014-04-22 16:40:17 +10:00
1b523b54e6 Code cleanup: replace int with boolean. 2014-04-22 09:39:53 +09:00
0e2f6c7fc4 Fix T39833: Nurbs Crash
Converting empty object to mesh can generate a 'Null' BL:Mesh, we have to check against it.
2014-04-21 23:41:39 +02:00
9b0ab89067 Follow up to previous commit: tweak RE_RAYTRACE_EPSILON (correction value used
when checking neighbor faces against shadowing).
2014-04-21 20:27:19 +02:00
3de8f255d7 Fix T39735: New auto smooth creates artifacts with flat shaded faces(BI)
This actually had nothing specific to new split normals, it was an internal limitation
of BI raytracer, which would check against neighbor face shadowing only when they shared
a common vertex, now it also performs checks when both faces have a vertex with a common
"ancestor" (org index).

Note this allows to also fix same issue when using SplitEdges modifier (and potentially
others?), but only when AutoSmooth is enabled (due to some compute/mem overhead, we
do not want to enable this code systematically).

Thanks to Brecht for advices and review!
2014-04-21 20:27:19 +02:00
88a22632a3 OSX: always create a window in normal state, not fullscreen or iconized … 2014-04-21 19:43:10 +02:00
9ab259f55b Cycles: shadow function optimization for transparent shadows (CPU only).
Old algorithm:

Raytrace from one transparent surface to the next step by step. To minimize
overhead in cases where we don't need transparent shadows, we first trace a
regular shadow ray. We check if the hit primitive was potentially transparent,
and only in that case start marching. this gives extra ray cast for the cases
were we do want transparency.

New algorithm:

We trace a single ray. If it hits any opaque surface, or more than a given
number of transparent surfaces is hit, then we consider the geometry to be
entirely blocked. If not, all transparent surfaces will be recorded and we
will shade them one by one to determine how much light is blocked. This all
happens in one scene intersection function.

Recording all hits works well in some cases but may be slower in others. If
we have many semi-transparent hairs, one intersection may be faster because
you'd be reinteresecting the same hairs a lot with each step otherwise. If
however there is mostly binary transparency then we may be recording many
unnecessary intersections when one of the first surfaces blocks all light.

We found that this helps quite nicely in some scenes, on koro.blend this can
give a 50% reduction in render time, on the pabellon barcelona scene and a
forest scene with transparent leaves it was 30%. Some other files rendered
maybe 1% or 2% slower, but this seems a reasonable tradeoff.

Differential Revision: https://developer.blender.org/D473
2014-04-21 19:34:25 +02:00
f6abc96b6b Cleanup: Remove OpenCL __MULTI_CLOSURE__ sanity check, not needed anymore after 04a10907dc. 2014-04-21 18:08:01 +02:00
ea753710bf Fix another shading issue with new split normals (deform modifier after a subsurf one).
Just always tag tessellated CDlayers as dirty when we recompute split normals!

Also simplified a bit end of mesh_calc_modifiers.
2014-04-21 17:58:05 +02:00
5ce2edfc6f Cleanup: Pass PathState as a whole, instead of individual members.
Differential Revision: https://developer.blender.org/D477
2014-04-21 17:52:19 +02:00
9d5ed605fe BMesh Inset: remove hack to store coords in normals 2014-04-22 01:36:59 +10:00
9bff19fbfd GHash, Edgehash: add lookup_default() funcs.
Returns a fallback argument when the key isn't found.
2014-04-22 01:36:59 +10:00
64b6ea032d PBVH: replace ghash with gset for storing unique faces 2014-04-22 01:36:59 +10:00
785f20f8c3 Fix T39793: cycles SVM shading bug with tangled up nodes after recent optimization. 2014-04-21 17:17:52 +02:00
5afb0abfbd Basic support for UNC paths on Windows
Differential Revision: https://developer.blender.org/D298

Allows users on Windows to enter UNC paths in the filebrowser and to link to .blend files on a UNC path. Functionality is limited still, we can't browse the network yet and have no support to check user rights so far.

What works:
- enter an UNC path in the file browser manually or via copy/paste
- navigation within the UNC share subfolders
- link to a file on a UNC share

What does not (yet) work:
- browse the network for computers and shares
- browse to a folder that requires entering user credentials

Contributors:
Rob McKay - original patch
Campbell Barton - style fixes

Reviewers:
Campbell Barton, Brecht van Lommel
2014-04-21 17:06:09 +02:00
87628cc5fb Fix GLSL after 7765b73f6d (Transparent Depth). 2014-04-21 16:32:08 +02:00
04a10907dc Code cleanup: remove old closure sampling code Cycles.
This was the original code to get things working on old GPUs, but now it is no
longer in use and various features in fact depend on this to work correctly to
the point that enabling this code is too buggy to be useful.
2014-04-21 16:14:37 +02:00
7765b73f6d Cycles: add Transparent Depth output to Light Path node.
This can for example be useful if you want to manually terminate the path at
some point and use a color other than black.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D454
2014-04-21 14:44:36 +02:00
John Pavel
f8cd3d974d Code cleanup: add some asserts and fix a typo in BVH build.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D467
2014-04-21 14:44:36 +02:00
83988b6cdd Fix new Cycles UV Map node not working correct for bump mapping.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D475
2014-04-21 14:44:36 +02:00
f55ca54be1 Object drawing: test the flag, without comparing the value 2014-04-21 19:29:48 +10:00
11cddaa5d9 Split Normals: more fix for EditMode shading and modifiers (subsurf special case, this time).
CCGDM did not generate a valid tessellated loop normals CD layer...
2014-04-21 10:47:57 +02:00
43d695e82e Code cleanup: view2d api naming 2014-04-21 18:47:17 +10:00
0ff06a9ba5 Libmv: optimization of PearsonProductMomentCorrelation
Pass the arrays by reference rather than by value,
should give some percent of speedup.

Also don't pass the dimensions to the function but
get them from the images themselves.

Hopefully this will give some %% of tracker speedup.
2014-04-21 14:26:37 +06:00
a5e30fc79c Fix player build. 2014-04-21 10:19:13 +02:00
e4a2df9fec View2d: check UI_view2d_view_to_region_clip succeeds before using the result 2014-04-21 18:11:47 +10:00
9ae0e585b0 View2d: API Cleanup for view<->region conversion
View2D had some inconsistencies making it error prone in some cases.

- Inconstant checking for NULL x/y args.
  Disallow NULL args for x/y destination pointers, instead add:
  - UI_view2d_region_to_view_x/y
  - UI_view2d_view_to_region_x/y

- '_no_clip' suffix wasn't always used for non-clipping conversion,
  switch it around and use a '_clip' suffix for all funcs that clip.

- UI_view2d_text_cache_add now clips before adding cache.

- '_clip' funcs return a bool to quickly check if its in the view.

- add conversion for rectangles, since this is a common task:
  - UI_view2d_view_to_region_rcti
  - UI_view2d_region_to_view_rctf
2014-04-21 16:59:40 +10:00
6ee8670fca Fix T39818: Strips from file with long filename broke auto-naming - animation can't be apply on it. 2014-04-21 08:30:20 +02:00
b1e1f86eb7 Fix for UI_view2d_to_region_float (was ignoring x,y args)
use this for grease pencil stroke conversion to avoid float->int->float conversion.
2014-04-21 14:30:13 +10:00
3a950dc643 Skin mark/clear: replace GHash with GSet 2014-04-21 13:13:15 +10:00
dcd2a8fcc4 Fix stupid typo that broke split normal shading in edit mode, when there was some deform modifiers. 2014-04-20 23:12:18 +02:00
b264f613df Fix incorrect ghash free 2014-04-21 04:00:35 +10:00
25c9ea8cb3 GHash, EdgeHash: hint on unlikely branch
also avoid searching buckets for empty hashes
2014-04-21 02:50:07 +10:00
3ba7a75a6c Correct cast from recent bool changes 2014-04-21 02:48:39 +10:00
55d75f5020 Code cleanup: correct abs use
also minor cleanup to rotation code
2014-04-21 02:02:21 +10:00
1a1bc281e6 Code cleanup: style 2014-04-21 01:01:33 +10:00
1e3f8b517b Nodes: make default group nodes slighly wider, to match other node width defaults. 2014-04-20 14:47:46 +02:00
97409c93fa Fix error making datablock with fake user local, the user count would be wrong afterwards. 2014-04-20 14:47:46 +02:00
f77207b1c3 Math Lib: faster version of rotation_between_vecs_to_mat3
Use axis/angle calculation but avoid calls to sin/cos
2014-04-20 20:56:40 +10:00
b4cb467359 BGE: Fixing memory leaks when deactivating Sensors, Controllers, or actuators.
Found by Coverity and confirmed with Valgrind.
2014-04-19 14:51:29 -07:00
a51a0ca772 Math Lib: add shell_v3v3_normalized_to_dist and v2 version
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-19 22:17:10 +10:00
9c93c0bf08 Bullet: making bullet friction workaround more furureproof by using the __apple_build_version__ macro, TODO: check if problem persists with newer clang 2014-04-19 14:10:49 +02:00
d6a53bb38f Minor change to recent commit (avoid transpose) 2014-04-19 19:48:07 +10:00
0ed6725aae Math Lib: minor optimization to barycentric_transform
replace rotation_between_vecs_to_quat with axis_dominant_v3_to_m3.
2014-04-19 15:52:01 +10:00
fabc46b41f Math Lib: add rotation_between_vecs_to_mat3
- behaves like rotation_between_vecs_to_quat
- avoids calling sin,cos calls (approx 1.6x faster).
2014-04-19 15:36:47 +10:00
fc9c790563 Math Lib: minor optimization for axis_angle_normalized_to_mat3 2014-04-19 14:10:22 +10:00
36defb7e66 Disable quicktime when in cmake's lite configuration 2014-04-18 23:22:09 +10:00
2a9ef256b1 Cycles: SVM optimization for mix shaders, to skip more code when the mix weight
for one of the input shaders is zero.

This gives about 5% speedup for koro_final.blend. In general this is important
so you can design shaders that run faster for shadows, diffuse bounces, etc, for
example by skipping procedural textures or even using a single fixed color.
2014-04-18 14:40:19 +02:00
2d7b53331c Fix cycles using acosf in panorama render when it should use safe_acosf. 2014-04-18 13:51:29 +02:00
dc847607b6 Change Vector.slerp to accept nonunit vectors 2014-04-18 20:49:39 +10:00
e5f4f4d484 CMake was missing header 2014-04-18 20:46:14 +10:00
5a3fbc8af7 Freestyle: minor changes to the UI layout of line style options.
Toggle buttons are now placed to the left of those labels separating sets of line style
options, so as to save some space (in line with the new UI elements added in the
commit f60a66f417).
2014-04-18 15:11:20 +09:00
4a837141c3 Code cleanup: de-duplicated includes. 2014-04-18 15:02:46 +09:00
f60a66f417 Freestyle: New options for sorting to arrange the stacking order of lines.
Line styles now have a set of new options for rearranging the stacking order of lines.
This gives artists more control to determine which lines should be drawn on top of others.
Two available sort keys are the distance from camera and curvilinear 2D length.
Since the distance of a line from camera may vary over vertices, another option called
integration type is used to compute the sort key for a line from the values computed at
individual vertices.  Available integration types are MEAN, MIN, MAX, FIRST and LAST
(see the tool tips for more detail).
2014-04-18 15:02:45 +09:00
6a94e73a85 Freestyle: Added logical operators for binary predicates for 1D elements.
The implemented operators are:
freestyle.predicates.AndBP1D
freestyle.predicates.NotBP1D
freestyle.predicates.OrBP1D
2014-04-18 15:02:44 +09:00
6161e4420e Quite compiler warnings. 2014-04-18 15:02:43 +09:00
4ed16bc3e6 Freestyle: Fix ImportError in anisotropic_diffusion.py 2014-04-18 08:48:03 +09:00
d46e1b54f4 Cycles Standalone: Use progressive refine in background mode too.
This is only a workaround, with tiled rendering the image output has a wrong aspect ratio. (squashed image)
2014-04-17 23:17:04 +02:00
ad8a35a659 Dyntopo: Solve issue with test file by Jens.
Seems like custom data indices can be mangled when many layers are
present in the mesh, so use more strict calculation of offset (copied
over from BM_CD_LAYER_ID).

I was under the impression that all custom data would be deleted on
entering dyntopo, it seems this is not the case though.
2014-04-18 00:11:05 +03:00
169f831394 Make sure we invalidate the node ID layer each time the PBVH is reset.
It makes code more tidy (avoids having to call invalidation on a myriad
places). Also makes sure other invalidation cases (some mesh change,
e.g.) work as expected.
2014-04-17 20:53:40 +03:00
fe3eb82520 Re-bundle Libmv to be sure it's all fine 2014-04-17 23:31:57 +06:00
5bf7d988ac Fix for 771a9dd: libmv build files are automatically generated
This means if one makes change to either SConscript or CMakeLists.txt
there he MUST update bundle.sh.

Also made it so *.cc files from intern/libmv are matching which would
make it easier to add more .cc files there if needed.

And one more thing is removing 'simple_pipeline/distortion_models.cc'
which doesn't match any of the files.
2014-04-17 22:38:31 +06:00
a86d8bceb5 Revised freestyle.predicates.pyZBP1D so that the constructor accepts an integration type. 2014-04-18 01:32:29 +09:00
f7de9efb74 BI: cleanup in autosmooth area. 2014-04-17 18:23:14 +02:00
dc40a97fc1 Optimize and symmetrize operators missed reset of node layer. 2014-04-17 19:13:58 +03:00
38eef8deee Refactor to Dyntopo node customdata commit.
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)

Tip by Campbell, thanks!
2014-04-17 19:03:08 +03:00
0ba3f76470 Recreating a bmesh log did not account for modified faces.
It shouldn't create issues in practice because modified face ids should
have been reclaimed from an added face on a previous entry, but add for
completeness.
2014-04-17 19:03:07 +03:00
771a9dd335 Lbmv: fix scons compile after ed2ddc9 2014-04-17 17:00:29 +02:00
bb507e4941 View3D: use smoothview for localview switching 2014-04-18 00:27:16 +10:00
69d127cade Code cleanup: use const for array args 2014-04-18 00:27:16 +10:00
300f4482e8 View3D: no need to mask mask out localview for each object 2014-04-18 00:27:15 +10:00
e0e05ae85e Add missing node update in dyntopo flood fill. 2014-04-17 16:03:14 +03:00
ddc88ea419 Fix T39765 crash on text with generative modifiers. 2014-04-17 15:58:40 +03:00
87b86eee62 Fix compilation issue. 2014-04-17 15:53:34 +03:00
419f7750db Fix T39771: Armature Tools and Options Panel appears in other TABs. 2014-04-17 14:51:39 +02:00
d0e80b50e9 Fix another Freestyle building glitch. 2014-04-17 14:51:38 +02:00
d02522b7be Attempt to fix one more issue with Freestyle compilation 2014-04-17 18:46:19 +06:00
c4a9ec88c8 Fix crash when enabling undistorted display in MCE 2014-04-17 18:01:45 +06:00
ed2ddc9f70 Support multiple distortion models, including a new division model
This commit makes it so CameraIntrinsics is no longer hardcoded
to use the traditional polynomial radial distortion model. Currently
the distortion code has generic logic which is shared between
different distortion models, but had no other models until now.

This moves everything specific to the polynomial radial distortion
to a subclass PolynomialDistortionCameraIntrinsics(), and adds a
new division distortion model suitable for cameras such as the
GoPro which have much stronger distortion due to their fisheye lens.

This also cleans up the internal API of CameraIntrinsics to make
it easier to understand and reduces old C-style code.

New distortion model is available in the Lens panel of MCE.

- Polynomial is the old well-known model
- Division is the new one which s intended to deal better with huge
  distortion.

Coefficients of this model works independent from each other
and for division model one probably want to have positive values
to have a barrel distortion.
2014-04-17 17:28:41 +06:00
39bfde674c Cycles CUDA: don't use cuLaunchGridAsync at all for display devices.
As suggested by Martijn, this is slower than cuLaunchGrid.
2014-04-17 12:18:49 +02:00
18da79f471 Cycles CUDA: only do async execution for GPUs not used for display.
Otherwise devices used for display will lock up the UI too much. This means
you might still get 100% CPU for the display device, but for others CPU usage
should be low still.

The check to see if a device is used for display may not be entirely reliable,
it checks if there is a watchdog timeout on the device, but I'm not entirely
sure that always exists for display devices or is disabled for non-display
devices, though some tools like cuda-gdb seem to make the same assumption.

Ref T39559
2014-04-17 12:08:18 +02:00
ad2064ae88 Fix compilation error of Freestyle
Seems to be some sort of namespace conflict or so which is
solved by reshuffling the includes a bit.
2014-04-17 16:04:47 +06:00
a1cab0d38d Style cleanup 2014-04-17 20:03:39 +10:00
1c0b6c4f30 Code cleanup: use bools for DM 2014-04-17 20:03:39 +10:00
ef365aaa37 Fix error in last commit 2014-04-17 20:02:56 +10:00
88ae0be1c4 Fix T39758: Blender Crash when removing pinned Scene. 2014-04-17 10:48:32 +02:00
bd3231c760 Fix T39766: bone calculation from edit mode goes wrong
Own logic error in previous commit...
2014-04-17 10:20:19 +02:00
55c9b352c2 Fix mistake in recent DM material changes 2014-04-17 18:05:57 +10:00
3e3efae7e9 Viewport Text Drawing: replace single allocs with a memarena
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.

own tests give approx 22% overall speedup.
2014-04-17 16:04:28 +10:00
1b9db9911d Code cleanup: use bools
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-17 16:04:28 +10:00
4219e44f1d Freestyle: removed unnecessary #include "FreestyleConfig.h". 2014-04-17 14:37:14 +09:00
1674a04488 Freestyle: removed unused *_EXPORT qualifiers for building Windows DLLs.
These qualifiers were leftovers of the stand alone Freestyle program and not used
(set to an empty string) in Blender for years.
2014-04-17 14:37:13 +09:00
62258d9f30 Fix for missing changes in commit 6b0b6f876a4d68acd5c9252270a5135d0308d782. 2014-04-17 14:37:12 +09:00
68aea619f5 Replaced assert() with BLI_assert(). 2014-04-17 14:37:11 +09:00
3458bad12d Freestyle: removed unnecessary #include files and made minor code cleanup. 2014-04-17 14:37:10 +09:00
01a4a09f29 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 4).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Fix for a C++ scope issue caused by 'using namespace Freestyle' that was assumed
even within the Freestyle namespace definition.
2014-04-17 14:37:09 +09:00
77b37fa461 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 3).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Made changes to intern/view_map/Interface0D.h and intern/python/Director.h to
avoid #include <Python.h> and keep non-Python header files independent of it.
2014-04-17 14:37:08 +09:00
5d4a6a94ef Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 2).
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Fixed for #include <Python.h> not properly put in the extern "C" { ... } construct.

Also removed redundant inclusion of the header file in the Freestyle Python API code.
2014-04-17 14:37:07 +09:00
5db8da8105 Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 1).
The issue was caused by including both Python.h and BLI_math.h.  Since the macro
definition in Python.h was unconditional, it was necessary to include it first and then
BLI_math.h.

Addressing the issue turned out to affect many Freestyle source files.  There were several
other coding flaws that complicated the situation:

1. intern/system/FreestyleConfig.h was abused just to include BLI_math.h which was in
fact unnecessary in FreestyleConfig.h.  While addressing this, inclusion of both math.h
and BLI_math.h had to be duly dealt with to avoid a compiler error about round().

2. #include <Python.h> was not properly put in the extern "C" { ... } construct.

3. intern/view_map/Interface0D.h and intern/python/Director.h, both of which included
Python.h, were included from within Freestyle header files that were almost or completely
independent of Python.  These non-Python header files were used everywhere in the
Freestyle code base, causing many cases of the reported macro redefinitions.

4. The Director.h file was also declaring 'using namespace Freestyle', which was causing
another scope issue in several Freestyle header files.

This commit is intended to address the first problem above.  Subsequent commits will deal
with the other three.
2014-04-17 14:37:05 +09:00
ba61992cc3 Fix T39767: Parent in Mask mode crashes 2014-04-17 13:23:53 +10:00
64f3774d62 Fix T39768: GLOBAL_X/Y/Z don't exist for bpy.ops.armature.calculate_roll type enum 2014-04-17 15:02:23 +12:00
a5b9f22454 BGE - button for deactivate sensors, controllers and actuators
This change introduces a new checkbox to deactivate the sensors, controllers and/or actuators. It is useful during the development phase to avoid delete sensors, controllers or actuators if you want to test something new.

NOC: The wiki page is being updated (the images mostly), but the feature is already in the 2.71 release log.

{F61628}

Reviewers: moguri, dfelinto, campbellbarton, dingto, #user_interface, billrey

Reviewed By: moguri

CC: billrey

Differential Revision: https://developer.blender.org/D16
2014-04-16 22:40:07 -03:00
8a4210074c Bullet: better workaround for failing friction with clang 3.4, remove the obsolete compileflag magic 2014-04-17 00:25:25 +02:00
415e10a0ef Fix another compile error with recent commit on visual studio. 2014-04-16 21:36:19 +02:00
fd99b8d4cf Fix for scons/CUDA build after recent commit. 2014-04-16 21:23:37 +02:00
6f1afdbbfc Cycles CUDA: enabled branched path kernel again, with more registers. 2014-04-16 21:05:04 +02:00
2851ed4a55 Cycles code refactor: use __launch_bounds__ instead of -maxrregcount for CUDA.
This makes it easier to have per kernel number of registers. Also, all the
tunable parameters for this are now in kernel.cu, rather than spread over cmake,
scons and device_cuda.cpp.
2014-04-16 21:05:04 +02:00
f2f3ef8692 Fix Knife bug T39617: midpoint snap should affect intermediate points.
This reverts to the 2.69 behavior, where the snap-to-midpoint option
affected the intermediate crossed edges as well as the endpoints.
2014-04-16 14:19:36 -04:00
53fd22acb4 Fix T39756: Extrude, immediate scale
While not exactly a bug, switching to scale isnt generally useful to keep normal constraint.
2014-04-17 04:02:42 +10:00
e6cdce725c Code cleanup: use bools & const args 2014-04-17 02:53:34 +10:00
ee387c6add Fix T39750: Bones disappearing with strange transforms.
Fixed this issue and another similar one, and some minor optimizations.
2014-04-16 18:20:27 +02:00
a7120b9730 Fix related to new split normals draw code.
Tessellated split normals CDlayer had no swap func, hence ugly little test_index_face()
could not rotate its values correctly when rotating tessellated faces...

Extra-reported in T39735.
2014-04-16 16:54:23 +02:00
eecc426d86 Fix cycles standalone file saving not taking number of samples into account properly. 2014-04-16 15:28:24 +02:00
7d45ddae33 Add Edge sharp/smooth to 3DView shading panel, as well as new Vert sharp/smooth. 2014-04-16 15:26:48 +02:00
d1b1d194dc Fix for half pixel offset rasterizing masks 2014-04-16 23:25:10 +10:00
b3972aeea0 Math Lib: optimize axis_dominant_v3_to_m3, approx 6x speedup
build the matrix directly rather then calculating with axis/angle

also remove unused function calc_poly_plane
2014-04-16 21:07:28 +10:00
233dac1494 Math Lib: increase epsilon for ortho_basis_v3v3_v3
passing in a unit length vector wouldn't always compute unit length vectors because the epsilon tested was too small.
2014-04-16 21:07:28 +10:00
d050577176 Fix T39445: Async LibLoad Crash
There was some deadlock due to trying manage Python's GIL. Instead of
continuing to fight with it, anything needing to call into Python while
conversion during lib loading is just delayed until it can be done in
the main thread.
2014-04-16 01:15:40 -07:00
4769b44bdd Fix T39745: "Origin to geometry" not working with Text objects. (regression) 2014-04-16 13:19:31 +10:00
70f089b6f5 Fix T39509: Crash when assign an empty as a LoD
Missing check when looking for appropriate LoD
2014-04-15 20:06:56 +00:00
556590fa3a Dyntopo:
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
2014-04-16 05:31:02 +03:00
b179647d52 Dyntopo: slightly change node invalidation, only vertices can change BB
recalculation, only faces can change normal invalidation.
2014-04-16 02:10:24 +03:00
9351e872f5 Fix T39607: Audio not in synch when the blend file loads.
The problem here was that animation buffers got initialized with zeros in the beginning for unknown parts. Now it gets initialized with the first known value.
The bug's result was that the animation of the pitch started with 0 on first playback and thus any seeking while the pitch is zero resulted in seeking to the beginning.
2014-04-15 19:19:56 +02:00
5d189069a4 Fix regression, sculpting on mesh with matcaps (without multires/ 2014-04-15 20:12:51 +03:00
cf01f2c760 Building with C++ guarded alloc works again 2014-04-16 02:24:21 +10:00
5c4bb81e49 Fix T39685: triangulation modifier creates zero-area faces 2014-04-16 02:24:21 +10:00
43b7dac427 Use binary search threshold when deciding whether to create ActKeyColumns too... 2014-04-16 03:23:53 +12:00
d2a5ddb4ec Optimisations for building "Long Keyframes"
For a long time, one of the bottlenecks when drawing summary channels in the dopesheet
(especially with many objects) was how the long keyframes feature (i.e showing holds
between keyframes) got built. Specifically, it was the step where we check on the previous
keyframe to see whether there's a hold between those two.

The old code performed some elaborate checks, which made sense back when we used to handle
certain summary channels (e.g. object-action/ipo, and groups IIRC) differently. However,
nowadays, everything just does it by going over the FCurves one by one, so the offending
code wasn't really providing much benefit. Unless I've forgotten some other reason why
that old method is necessary, this commit should provide a decent speedup here, making
things somewhat interactive now (if still a bit jerky).

Other Tweaks:
1) Introduced float-precision threshold when checking to see whether an existing long
   keyframe could be reused. This should hopefully reduce the number of fp-jitter issues
   when creating summaries for many channels, reducing the number of duplicates created.
2) Precompute colours used for shading the long keyframes, instead of recomputing for
   each block.
2014-04-16 03:23:52 +12:00
76dd3db304 Move binary-search threshold used for FCurves to BKE_fcurve.h header
Since this is now pretty much the de-facto "minimum distance between keyframes",
we might as well expose this in this header so that other places which need similar
thresholds can perform similar checks (needed for my next commit)
2014-04-16 03:23:51 +12:00
09e5aa5156 Fix T39234: popup menus behave poorly when they have not enough width for all their columns.
Issue fixed by:
* Not having constant width for all columns, but adapt each to its content's width;
* Adapting undo's menu height to undo list length (so that we never have more than three columns).

It is still possible to get issues in extreme cases (small screen, high DPI size,
long op names everywhere...), but this should now be rare corner cases.

Also fixes a minor glitch with undo menu (first column had one item less than the others...).
2014-04-15 16:49:49 +02:00
09874df135 Structural cleanup and improvements for the compositor.
Many parts of the compositor are unnecessarily complicated. This patch
aims at reducing the complexity of writing nodes and making the code
more transparent.

== Separating Nodes and Operations ==

Currently these are both mixed in the same graph, even though they have
very different purposes and are used at distinct stages in the
compositing process. The patch introduces dedicated graph classes for
nodes and for operations.

This removes the need for a lot of special case checks (isOperation etc.)
and explicit type casts. It simplifies the code since it becomes clear
at every stage what type of node we are dealing with. The compiler can
use static typing to avoid common bugs from mixing up these types and
fewer runtime sanity checks are needed.

== Simplified Node Conversion ==

Converting nodes to operations was previously based on "relinking", i.e.
nodes would start with by mirroring links in the Blender DNA node trees,
then add operations and redirect these links to them. This was very hard
to follow in many cases and required a lot of attention to avoid invalid
states.

Now there is a helper class called the NodeConverter, which is passed to
nodes and implements a much simpler API for this process. Nodes can add
operations and explicit connections as before, but defining "external"
links to the inputs/outputs of the original node now uses mapping
instead of directly modifying link data. Input data (node graph) and
result (operations graph) are cleanly separated.

== Removed Redundant Data Structures ==

A few redundant data structures have been removed, notably the
SocketConnection. These are only needed temporarily during graph
construction. For executing the compositor operations it is perfectly
sufficient to store only the direct input link pointers. A common
pointer indirection is avoided this way (which might also give a little
performance improvement).

== Avoid virtual recursive functions ==

Recursive virtual functions are evil. They are very hard to follow
during debugging. At least in the parts this patch is concerned with
these functions have been replaced by a non-virtual recursive core
function (which might then call virtual non-recursive functions if
needed). See for example NodeOperationBuilder::group_operations.
2014-04-15 16:28:10 +02:00
28a829893c Math Lib: avoid having to pass a pre-calculated normal tot area_poly_v3
add normal_poly_v3
2014-04-16 00:29:57 +10:00
e4c2a3c31c Various fixes/improvements regarding BMesh's elem_index_dirty and BM_LOOP handling.
Most notably, BM_LOOP and BM_FACE index recompute should now be fully decoupled.
2014-04-15 16:20:07 +02:00
a15ae56421 Fix T39743: Crash when deleting faces in with new autosmooth.
Odd I did not catch this one... :/
2014-04-15 16:20:07 +02:00
f270b34e99 Fix T37675: blender internal viewport render wrong for volumes after rotation.
We really should not have Object.imat_ren, that's the wrong place to put render
data. But just update it now on rotation rather than doing a bigger refactor to
remove it.
2014-04-15 15:56:56 +02:00
976f59ab8c Fix cycles standalone not writing images in background mode properly. 2014-04-15 15:19:23 +02:00
72308669ce Fix T39284: clamp cycles volume density to be >= 0, to avoid accidental strange shading. 2014-04-15 15:19:23 +02:00
97881d06b2 Fix T39610: Shared mesh used for Mesh Deform causes crash
For now disable using linked edit mesh in the meshdeform modifier.

This is because editbmesh_get_derived_cage_and_final() might easily
conflict with the thread which evaluates object which is in the edit
mode for this mesh.

We'll support this case once granular dependency graph is landed.
2014-04-15 18:37:41 +06:00
9f17300d37 Fix T39607: Audio not in synch when the blend file loads.
Root of issue is probably in AUDASPACE itself (or even in OpenAL?).
Issue not present with SDL backend, only OpenAL afaik.

For now, workaround in Blender is to call seek twice when starting play
(not needed when resuming from pause).
2014-04-15 14:25:33 +02:00
08de05f3db Some style cleanup in sound area. 2014-04-15 14:25:33 +02:00
cddbe87ae5 OSX/python: update to py 3.4 2014-04-15 14:12:22 +02:00
ea99efeb2c Code cleanup: indentation 2014-04-15 19:44:13 +10:00
d9211b1e7b Fix compilation (size_t not defined) by including stddef.h in BLI_sys_types.h 2014-04-15 09:11:45 +02:00
4f1a5192c2 Fix T39742: Crash with Cycles + new autosmooth crash
Nice little mistake, since the invalid mem access only happened once (the first time),
was close to valid mem, and was only used to read, it would not crash often...
2014-04-15 08:31:48 +02:00
e1e519bfc0 Fix my last commit cad4bfe: Added 'use_' prefix to Freestyle edge/face mark properties. 2014-04-15 14:44:08 +09:00
955634e17c Revert part of last commit,
RNA is low level data access, setting mesh values shouldn't change draw options.

Also its redundant to name attrs Face.freestyle_face_mark,
removed edge/face from attr names
2014-04-15 14:46:53 +10:00
aa10cf7f5c GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once 2014-04-15 14:40:33 +10:00
cad4bfe653 Freestyle: Added missing mesh property definitions for Freestyle Edge/Face marks.
This revision also addresses the issue of these properties not shown in the Outliner
in the Datablocks display mode.  Now Freestyle edge/face marks can be keyframed
through the Outliner.
2014-04-15 13:30:01 +09:00
a7241d09cd GHash: add typed hash functions (were all (void *))
- BLI_ghashutil_strhash_n takes string length, to avoid terminating the string before hashing.
- BLI_ghashutil_inthash/uinthash take ints, to avoid casting to (void *)

This also showed up incorrect use of inthash, which was using a pointer.
2014-04-15 14:22:36 +10:00
ea610e655c Style cleanup: C & pep8 2014-04-15 13:11:48 +10:00
3cf39fc72a Fix T39740: New Autosmooth instant crash entering Edit Mode
One should always be wary of last minute changes, especially in comples code area... :/
2014-04-14 23:42:38 +02:00
0c51010c67 Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings 2014-04-15 00:15:09 +06:00
8fd6879b88 Fix T39700: Plane deform still works forever
Clamped the EWA sampling region to buffer size now. Solves the issue,
but needs more tests to be sure weights are correct.
2014-04-14 23:59:08 +06:00
4f00737f4b Fix T39736: Ctrl+V reports "Objects Pasted" regardless if it worked or not. 2014-04-14 19:49:18 +02:00
2ab9a0ff09 Fix cycles standalone not saving renders in background mode. 2014-04-14 14:11:07 +02:00
dcec99734b Fix for the eyedropper fixes from today
Missing color copy, noticed by @campbellbarton, thanks!
2014-04-14 17:56:04 +06:00
4863253c2f Fix T39702: VSE channel preview: strips used as effect operands no more visible 2014-04-14 17:50:47 +06:00
d0c1b44deb CMake: enable OpenMP for all platforms by default
This is done in SCons and the only reason to disable OpenMP on
Windows was to deal with the express version of compilers.

Now when we are about to switch to msvc2013 by default we can
safely enable OpenMP there since even express version of this
beast supports OpenMP.
2014-04-14 15:38:34 +06:00
e6ff0ec73d Fix T39704: Texture painting fails with different float image working space
This was rather a TODO item related on supporting the proper painting color
space, but added a small tweaks which will make things working for now in
most of the situation (assuming the default view of display is ivnertible,
as it is to be expected to be anyway).

Shouldn't give much overhead since the conversion processors are cached in
the color management code.

And for the note: no, projection painting does not requite such a tweak
because viewport works in sRGB space anyway.
2014-04-14 14:10:00 +06:00
0d38f21cbc Fix the eyedropper not working properly with different scene linear spaces
Either was some residue from the past or somebody didn't implement this in
the right way.

Also fixed memory leak in ED_space_clip_color_sample() caused by missing
image buffer release.
2014-04-14 13:48:20 +06:00
f24bfcffef Cycles: Show Auto Smooth and Angle in the UI, after Split Normals are in. 2014-04-14 09:05:19 +02:00
7c78bcef6c Fix for crash un-indenting in the text editor 2014-04-14 13:28:09 +10:00
6e9c2d0c55 OSX/cmake: fix a recently reported dependency issue 2014-04-13 18:04:56 +02:00
6f153046e0 Reduce overhead when sampling texture images for brushes. The tests can
be cached and reused.
2014-04-13 19:03:14 +03:00
5d79c2662e Cleanup:
Naming:

Change pressure to size_pressure, it notes correctly that this value is
updated and expected to be used for size updating only.
Change name of cursor function and since it is used for uv sculpting
only now move to the relevant file. Also cleanup unneeded functionality
from function.

Stroke:

Separate updating of stroke variables to invariants (updated when
stroke->init = false) and variants.
2014-04-13 18:14:45 +03:00
301d7d2f63 Fix T39430, incorrect color management in paint cursor when using
texture nodes.

Adopt a similar system to texture sampling for painting.
2014-04-13 17:20:23 +03:00
06cd550528 Compile fix for Windows. 2014-04-13 16:09:02 +02:00
e29698d3cd Split Normals I (5/5): Add support of split normals to Cycles.
Idea and code by Brecht, many thanks!

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D369
2014-04-13 12:51:13 +02:00
776f8d5a6f Split Normals I (4/5): Add support of split normals to BI renderer.
Note that this commit completely replaces old behavior of the auto_smooth feature in BI.

Also note that split normals are only handled when no "advanced geometry post-processing" is used
(something like Displace will obviously break it, since it has to re-compute normals after displacement...).

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton

Differential Revision: https://developer.blender.org/D368
2014-04-13 12:37:47 +02:00
41b8f88732 Split Normals I (3/5): Add 3Dview shading support of split normals.
Mostly monkey coding in gpu ("modern" VBO drawing) and DM variants ("legacy" drawing) code...

Reviewers: brecht

Reviewed By: brecht

CC: campbellbarton

Differential Revision: https://developer.blender.org/D367
2014-04-13 12:34:45 +02:00
0b7f581397 Split Normals I (2/5): Add basic BMesh support of split normals.
* Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available.
* This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D366
2014-04-13 12:25:54 +02:00
18e4224142 Split Normals I (1/5): basis for split normals (nearly nothing user-visible here):
* Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf).
  EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit.
* Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it
  (tessellation, rna access, etc.).
* Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable
  split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding
  this option is now incoherent, will be addressed in a separate commit.

Reviewers: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D365
2014-04-13 12:19:00 +02:00
a872d0b414 Revert "Fix T39484: Time line: highlighted area for frame range one frame too short."
This reverts own commit e9d733a8bd.

Turns out there is no consensus here, better to open a design task. :/
2014-04-13 12:15:20 +02:00
ad9af56a6e LinkList stack macros to swap and pop into a separate stack. 2014-04-13 20:12:07 +10:00
2025e4cbb9 Code cleanup: quiet warnings & style 2014-04-13 11:26:31 +10:00
a2b3c93852 Slight modification to previous color wheel tweak.
Do not use compat version, we do not have a valid previous value really
to use here.
2014-04-12 19:33:28 +03:00
f7d06cdb6b Code cleanup: RAS_ILightObject is class, not a struct.
Patch by John Pavel.
Differential Revision: https://developer.blender.org/D459
2014-04-12 20:12:07 +02:00
3cbd9ebcf2 Fix for sculpt mode last-stroke applying obmat twice 2014-04-12 16:35:11 +10:00
fb095afe4d View3D: refactor ED_view3d_draw_offscreen and view3d_main_area_draw_objects
de-duplicate object drawing code between offscreen buffer and regular view3d.

Also skip drawing grease pencil and setting pixelspace when drawing from lamps.
2014-04-12 15:38:25 +10:00
668250deb8 BMesh: minor change to looping 2014-04-12 13:06:08 +10:00
Dalai Felinto
e2cbfb7ad7 Walk Navigation: no one should fall through the floor ever again (fix #T39561)
This could go in 2.70a
2014-04-11 18:55:08 -03:00
fb7df275b8 Fix for color pickers:
HSL/HSV value would still get converted from linear values.
2014-04-11 23:45:59 +03:00
64e7065c93 Fix part T39643: Compositor renders blank Render Layer from other Scenes
Fixed the part with missing tiles highlight and render info when rendering
different scene via the render layers node.

Displaying of the rendered result for a different scene after the render
is finished is still not "fixed". That's an intended behavior actually
to display render result for an active scene.
2014-04-11 19:17:22 +06:00
2d655d370d Fix T39627
HSL sliders jumping. The issue here is that we store HSV in display
space.
To correctly account for that, made sure HSV/HSL is now using the
displayed
color to compute the values in the sliders. RGB values still show
the property values (linear for linear, gamma corrected for gamma
corrected)

We could change the way we store HSV uniformly (ie in all the code), but
we would need to add many more conversions in the picker code to account
for storing it that way. Also it doesn't make sense: Color pickers
should help with -visible- color selection. It may
be worth changing the RGB sliders as well.
My fix takes into account the way HSV is stored in HSVCube as well in
the code.
2014-04-11 15:13:11 +03:00
0b50ea5a88 Fix redraw and undo issues with hidden parts in dyntopo after recent
changes.
2014-04-11 15:02:31 +03:00
a3f5e6c76f Fix T39266: Weird Skin modifier shutdown
Fix wrong quat being calculated for curve's path.
Also avoid some divisions by zero.

Happened in cases when all the curve points have the same coord.
2014-04-11 17:56:08 +06:00
15169c71a6 Blender Internal: remove BLI BVH for raytracing.
It has no benefits over other BVH types, as far as I know it was only added
because it was possible. This also fixes T39344.
2014-04-11 13:20:41 +02:00
4f6c218f19 Fix T39584: Effects strips render black
It's possible that effetc strip would be placed to the same
'machine' as it's inputs. We don't want to clear such strips
from the stack.
2014-04-11 16:26:57 +06:00
6300d22dab Fix T39640: Crash on maximizing/minimizing UV/Image Editor
Added a NULL-pointer check for now, actual issue might be
burried somewhere else (aka maybe traversal of the WM is
not actually correct here?)
2014-04-11 16:17:59 +06:00
5a29b55c07 Fix T39206: Plane deform works incredibly slow
The issue was caused by the readEWA spending loads of time trying
to sample regions outside of the buffer.Solved by adding an early
exit check.

We could also clamp the sampling region to the rect, but it's
not so much clear whether weight will be correct in such case
so left it for the future.
2014-04-11 14:51:21 +06:00
c04e73f386 Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT
was causing issues with pointcache
2014-04-11 18:20:30 +10:00
93ea10d8fb Fix for rigidbody treating the quat as a v3 with pointcache 2014-04-11 18:20:30 +10:00
8f2a7cde6d Fix compilation error after recent BLF change
FT headers seems to be inconsistent here, FT_KERNING_UNFITTED
is defined as an enum element, but FT_Get_Kerning expects UInt.

Just case for now.
2014-04-11 13:56:26 +06:00
b7b4f94e78 Fix for Freestyle Python API modules not found in the Python Console.
Addition of the path to the Freestyle Python API modules to 'sys.path' was delayed until
the first Freestyle rendering, so that any import attempt of the modules in the Python
Console always failed.  Now the update of 'sys.path' is done at Blender start-up.
This allows the Freestyle-specific modules to be imported without running Freestyle,
facilitating quick interactive testing in the Console.
2014-04-11 16:36:49 +09:00
52a5d58045 UI: split area_copy_data into ED_area_data_copy, ED_area_data_swap
Was confusing to have swap/copy in the one function.
2014-04-11 17:18:19 +10:00
716803c0a0 Fix for Sinus Displacement and 2D Offset stroke geometry modifiers.
These modifiers were not working properly when they were applied to strokes
whose backbone was already modified by other geometry shaders.  This problem
was due to the use of Normal2DF0D that compute 2D vertex normals based on
the underlying FEdges up on which initial stroke geometry is defined.  Now vertex
normals are computed on the basis of modified stroke vertices.

A helper function 'stroke_normal' for computing normals of stroke vertices was
added to the 'freestyle.utils' API module.
2014-04-11 15:16:46 +09:00
88298f1c40 Drawing: use const for wire color 2014-04-11 15:41:20 +10:00
3216e4b202 API Cleanup: Use BKE_constraint prefix for constraint api 2014-04-11 11:47:07 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
52af5fa31f Change GPU deletion at GPU buffer update time. This should be detected
and done at PBVH update time, since it is possible to have no triangles
to display in a buffer if node is hidden.
2014-04-11 03:16:16 +03:00
69d2af7643 Support logging of modified faces in dyntopo.
This is meant to support undo when hiding parts of the mesh.
Also avoid rebuilding the PBVH in that case as well (no nodes split)
2014-04-11 02:29:59 +03:00
45f336c3a1 UI: correct own bad use of bool and document area_copy_data args 2014-04-11 09:17:43 +10:00
6238fb4c43 UI: de-duplicate UI_OT_copy_to_selected_button poll/exec 2014-04-11 08:33:54 +10:00
7cdaf56b30 Dyntopo: use hidden face flags in more places 2014-04-11 07:51:14 +10:00
6292b60a3f Dyntopo: Minor display optimization.
While hiding, flush the hidden flags to the faces. This avoids iterating
through all the loops while updating the GPU buffers.
2014-04-10 22:31:39 +03:00
7bf62f0c60 ...and linking, sorry for that! 2014-04-10 22:00:54 +03:00
c0a9397a06 Fix compilation 2014-04-10 21:59:03 +03:00
df63e8fd93 Speedup track preview widget for byte images
This gives a huge speedup gain for cases when you've got
rather huge markers on a byte images.

Done by skipping IMB_float_from_rect()/IMB_rect_from_float()
for such cases. We can sample the buffers without color space
conversion.
2014-04-10 21:14:36 +06:00
5d63f162d5 Fix numpad emulation in non-US keyboards
Patch D455 from Benoît Legat with own minor edits.
2014-04-10 20:31:00 +10:00
9b60174e75 BMesh: DM_to_bmesh_ex, no need to calloc 2014-04-10 11:35:17 +10:00
f700a13eb5 Revert "Mempool: simplify memory chunk list building"
This reverts commit c82371fc06.

Caused regression in iterator
2014-04-10 11:35:17 +10:00
e6ca6956d3 Remove extra glEnd() call. 2014-04-10 01:26:23 +03:00
1ce726adb9 BGE: Allow skinned meshes with modifiers to do skinning updates in parallel. 2014-04-09 17:04:17 -07:00
19413644da BGE: Fixing a crash when animating objects with modifiers and armatures.
Our deformer system really needs some work. First, there was a crash
with shape keys because BL_ModifierDeformer derives from
BL_ShapeDeformer, which means we try to execute shape keys even if we do
not have them. Also, for some reason BL_ModifierDeformer::Update() does
not work if called from the threaded loop, so it is skipped for now. In
other words, skinned updates on meshes with modifiers are currently not
run in parallel.
2014-04-09 16:22:55 -07:00
c3fefebe47 More instances of needed material initialization. 2014-04-10 01:16:40 +03:00
82628a6b0e Code cleanup: use struct type for mempool & style edits 2014-04-10 06:49:25 +10:00
c777f691ad Fix T39663: Blender crashes when trying to triangulate uv unwrapped mesh.
A dummy arg inversion! This is to be included in 2.70a!
2014-04-09 22:16:10 +02:00
c782505775 Back buffer selection needs updates to materials. 2014-04-09 19:51:29 +03:00
1c811d96b2 Make material array account for mesh/object storage of materials 2014-04-09 18:37:54 +03:00
a6fb6706a8 Revert "FCurve Transform: scaling no longer changes hansle types"
This reverts commit 6cc5bdc99e.

Revent this for 2.70a, it changes behavior too much without allowing
keyframe handles to be scaled some alternative way.
2014-04-09 20:25:55 +10:00
ccf9afddba Fix T39608: Blender 2.70 crashes when performing union
This was a nasty bug which was caused by specific of how face-edge
attributes are stored in Carve.

Face pointer is used in the map key which works just fine in all
cases except for the cases when some face is getting freed after
it was stored in the map.

This might give real issues when new face is allocating because
it's possible new face would have the same address as the freed
one.

Such cases used to happen when union of separate manifolds is
needed for the operands AND jemalloc is enabled.

Solved by dropping attributes for the freed faces from the map.
Maybe not the fastest ever approach, but not sure how to make
it faster actually. Should work just fine. It only happens for
complex setups with intersecting manifolds in the operands.
2014-04-09 14:27:34 +06:00
dfbd994aaf Freestyle: fix for typos in Python API docstrings. 2014-04-09 16:30:44 +09:00
a068dda5f3 Code cleanup: ifdef unused linklist for GPU drawobject's 2014-04-09 15:42:18 +10:00
9de24c82ba View3D: disable LOD when game engine is disabled or ifdef'd 2014-04-09 11:52:34 +10:00
b1f97a0cdb Code cleanup: remove Object.bbsize, sizefac and pad 2014-04-09 11:52:33 +10:00
d8c4763fb0 More stack cleanup on GPU_buffers 2014-04-09 04:42:26 +03:00
b5d3f183b0 Add material storage to derivedmesh.
The variables are considered invalid unless DM_update_materials is
called prior to use. Only use case currently is
mesh drawing. This helps with excessive allocation on the stack during
GPUObject creation, but may help elsewhere in the future as well.
2014-04-09 04:03:44 +03:00
6ffabfae85 Fix T39646: Rigid Body Constraints non functional on release builds
-ffast-math is evil, not sure why it was enabled...
I seems to work better on OSX but it's still not a good idea.

The SConscript for bullet is a mess, I don't understand why
we use different flags for different platforms in the first place.
Seems to be a historical artifact but I don't know enough about scons
to try and clean it up.
2014-04-09 01:48:44 +02:00
2496636a65 GPU: replace callocs with malloc since reallocs aren't cleared 2014-04-09 09:31:20 +10:00
297a2223b5 Cycles / CUDA: Increase sm_2x registers to 40.
This fixes the ptaxs "ACCESS_VIOLATION" error and should allow our Linux and Windows build bots to compile again.
Unfortunately this comes with a performance penalty on sm_2x cards, so this is only a workaround for now. Branched Path is still globally disabled on GPU.
2014-04-08 23:25:54 +02:00
5580afb5df GHash/Edgehash: make simple iterator checking functions inline.
also remove NULL check, only a few areas made use of this.
2014-04-08 15:50:38 +10:00
ebaf3781fa Dyntopo: replace GHash with GSet, saves some memory 2014-04-08 14:45:48 +10:00
593b698b44 DerivedMesh: replace edgehash with edgeset 2014-04-08 14:45:04 +10:00
c82371fc06 Mempool: simplify memory chunk list building 2014-04-08 13:41:57 +10:00
4614c63d5d BMesh: bmesh_sfme now initializes the copy 2014-04-08 12:58:57 +10:00
7867f32fce BMesh: minor speedup, avoid calloc+assign, assign all members instead 2014-04-08 12:58:57 +10:00
412826a504 Mempool: delay allocating an initial chunk, its not always used 2014-04-08 12:58:56 +10:00
cced07661a Matcaps.
Instead of setting color every time, just set it on material enable.
Handles all cases of surfaces. Thanks to Campbell for pointing out!
2014-04-08 01:25:49 +03:00
1e6d2b1dbf Code cleanup: remove paranoid NULL check 2014-04-08 07:46:28 +10:00
c61eb64f06 Fix T39635: Crash convening curve to mesh 2014-04-08 07:41:38 +10:00
3ab0a4da73 Enable openmp in MinGW-w64 2014-04-07 19:01:19 +03:00
574b0e2c30 Fix T39626 Matcaps not working in edit mode.
Set a while color before the draw call. This will be ineffective in GLSL
but will affect matcaps.
2014-04-07 21:49:02 +03:00
1645f4fef0 Weekly UI messages fixes... 2014-04-07 20:31:15 +02:00
833029ba02 Fix own rB8714ae09f894: Forgot to handle bone constraints in versionning code! 2014-04-07 19:44:27 +02:00
708b8d8716 Color pickers:
* Code Cleanup
* Fix some more color correction cases that were left unattended. (NDOF,
resetting the operation in circle pickers)
2014-04-07 19:35:29 +03:00
6eb20ca048 Fix own broken rB95b25e7333c4 (crash on any undo op :/).
Issue here was that buttons_texture_context_compute() was getting scene from (button-customized) context,
before the button paths (and hence, context) had been updated. So after an undo, it was getting an invalid
(freed by undo) scene pointer.

Now update BCONTEXT_SCENE path before calling buttons_texture_context_compute().
2014-04-07 17:17:40 +02:00
163a3212b4 OpenCL Change opencl_assert to be more like cuda assert where possible.
added some extra warnings and feedback if things go wrong
2014-04-07 16:17:20 +02:00
b224fbf2e7 OpenCL + AMD adapt kernel to newer driver 2014-04-07 14:01:31 +02:00
5dc23e6df8 Code cleanup: make the source G rated again. 2014-04-07 20:44:26 +10:00
1279c39609 Code cleanup: use parens around multi-line defines. 2014-04-07 20:38:16 +10:00
ea01b24bba Fix T39623: deleting an object crashes 2014-04-07 20:25:52 +10:00
95b25e7333 Fix T39562: Properties panel Pinning is broken
'scene' was simply not handled in button context.
2014-04-07 12:23:24 +02:00
8714ae09f8 Fix T39563: Tiny unit-display problem in constraint panels.
There is no good solution here, since RNA props can only have one type/unit.
Tried to find the less worse one - have different RNA props for same DNA value
(a bit like the angle/length for camera lens).

Also fixed two other issues with Transform conctraint:
* Angle were still in degrees (yes, another backward-compatibility breacking).
* Scale was absolute, unlike loc/rot.

Also cleaned up a bit the code, replaced some magic numbers by proper enums, ...
2014-04-07 12:17:01 +02:00
f3db0389c0 Correct assert for RNA IDProps 2014-04-07 19:51:43 +10:00
b95e826841 Code cleanup: remove unused functions and convert int -> bool 2014-04-07 17:00:08 +10:00
e51841cbca Code cleanup: project gpencil in float coords & delete outdated comments 2014-04-07 15:21:01 +10:00
2527d0ce8f Dyntopo: minor speedups with bmesh use. 2014-04-07 13:48:36 +10:00
212717416b Dyntopo: avoid mask layer lookups while adding/removing verts 2014-04-07 13:05:39 +10:00
5c5d643938 Mempool: use define for used freeword and correct define 2014-04-07 12:52:23 +10:00
13d90ab8f7 Mempool: minor optimization to building free pointer list 2014-04-07 12:38:32 +10:00
aee82b4b2c Mempool: fix own error in recent commit
chunks must be added in order for iteration.
2014-04-07 12:38:32 +10:00
aabf4154e5 Fix building for Windows. 2014-04-07 04:18:03 +03:00
fe05f97841 BGE: Multi-threading animation updates and skinning.
This required BL_ArmatureObject to have tighter control over armatures and poses.
Also, (Blender) armature objects are now copied instead of shared between
BL_ArmatureObjects to avoid race conditions. Also, due to the armature copy,
shape key drivers need a bit of extra fiddling to get the correct armature copy.

Initially OpenMP was used for threading, but then BLI_task was used due to being
less compiler dependent.

This commit also places time spent on skinning updates in the Animation
profiler category (was previously under the Rasterizer category).
2014-04-06 16:30:59 -07:00
be8b4b8b0c Todo T36849: support XDG thumbnail management standard 2014-04-07 08:43:46 +10:00
1194037327 blenderplayer - Reviewed some command line options and the respective help
Doubts: are written as comments in the code
Current Problems:
 - stereo modes sometimes have different names and are ordered differently everywhere (blender properties panel names and tooltips, blenderplayer cmndline)
 - dome mode as several options, but can only take one at a time, like -D mode bla -D tilt X -D ...
 - gameoptions are also given one at a time, like above, but with an assignment -g option = X  . This is inconsistent.
 - gameoptions need to be reviewed and docummented
 - parent to window (-i) is useful for what? (there is no wiki on this either)
 - there is no support for verbose options like --help (blender itself supports it)

Reviewers: dfelinto, moguri

CC:

Differential Revision: https://developer.blender.org/D312
2014-04-06 14:38:15 -07:00
07f8c5c3b6 Better code for (bone axis + roll) to mat
See T39470 and D436. Code by @tippisum, with some minor edits by @mont29.

Tested with various rigs, including Rigify, CGcookie flex rig, and gooseberry/pataz caterpillar.

Riggers, please test it, no change expected in behaviour.

Reviewers: aligorith

CC: tippisum

Differential Revision: https://developer.blender.org/D436
2014-04-06 19:15:50 +02:00
959ec27ac9 Install_deps.sh: tweaks to support new LLVM-3.4.
Issue is, looks like Debian testing's graphic backend now uses LLVM-3.4,
which conflicts with 3.3 in Blender and makes it crash.

So add support to handle 3.4, by both allowing to force a specific version for some libs,
and switching back to head of official repo for OSL.
2014-04-06 17:50:50 +02:00
ae792e930c Fix T39479: Transform mouse constraint fails in some situations.
Some more float precision issue...
2014-04-06 11:11:56 +02:00
43fb105ff1 Move LIKELY/UNLIKELY into header 2014-04-06 17:25:50 +10:00
43a201662a Guarded Alloc: use UNLIKELY for debug memset 2014-04-06 12:58:10 +10:00
1bd3922b3a Fix error when enabling Mist pass but there was no world. Can't find mist settings, so check for World first. 2014-04-05 17:52:06 -03:00
49d1c8d8c6 Fix issue for OPENCL problem on Macosx 10.9.2 2014-04-05 21:33:44 +02:00
f6d5212c3a Fix sculpt brushes stuck to drag dot or anchored mode
Was own mistake after RNA enu refactoring.
2014-04-05 20:30:47 +03:00
4550731963 RNA: optimization to avoid malloc for iterators.
This mostly helps making Cycles scene synchronization a bit faster.
2014-04-05 14:50:17 +02:00
cb0520f79a Fix for auto detect homogeneous volume with OSL, forgot to include this file in last commit. 2014-04-05 14:49:50 +02:00
2a82b8ade5 Math Lib: add power of 2 min/max for unsigned ints 2014-04-05 21:54:20 +11:00
95ac6bc9e5 Fix T39606, SSS and Volume nodes were showing warning, even if CPU was used. 2014-04-05 12:49:30 +02:00
53f6057aed Cycles UI: Refactor cpu checks into a use_cpu() function. 2014-04-05 12:49:29 +02:00
1e504bc123 Dyntopo: minor optimizations for edge queue 2014-04-05 16:30:55 +11:00
61c73b49d3 Remove redundant call to CustomData_get_offset 2014-04-05 12:32:25 +11:00
19b7bb5975 Optimize mempool: round chunk size to powers of 2, account for slop-space
This helps to reduce memory fragmentation.
2014-04-05 12:14:05 +11:00
af59ee340f Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient now 2014-04-05 12:14:05 +11:00
321c35ec6c Solve issue with dyntopo collapse.
It was possible to delete a masked vertex during collapsing. Looks like
this is one of the causes for hangs during masked flood filling.
2014-04-05 02:31:36 +03:00
70353f833a Optimize mempool: replace double linked list with single for memory chunks 2014-04-05 09:49:13 +11:00
cfbfb5e626 Great, now Debian Jessie as well can cause libyaml-cpp version mismatch... Update warning message! 2014-04-04 22:45:23 +02:00
6ff0fcdae7 Some stupid systems give limited powers to sudo... So add a --no-sudo option disabling usage of sudo!
Note in this case, script becomes more or less useless, just spit out names of packages to install...

Requested by Dalai Felinto over IRC.
2014-04-04 22:38:49 +02:00
2dedf2a4e6 Missing file in commit 12302011d6207a60b24d0cae71a88df0384bc5da. 2014-04-04 23:47:31 +09:00
62bf22e27b Freestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/setter methods..
These data elements are undocumented and of little use.  For now they are commented out
in the implementation in favor of less memory consumption, and a very limited support for
these data components in the Python API was just removed (should be easy to recover).
2014-04-04 23:47:31 +09:00
685d785c98 Freestyle: Fix for class definitions of 0D/1D functions (functors).
Symbol 'real' is an alias of double and is subject to future change, while the interface of
0D/1D functions is part of the stable Freestyle Python API.  So all occurrences of this type
in the class definitions were replaced with double.
2014-04-04 23:47:30 +09:00
392065ed40 Fix for typos in array size 2014-04-04 18:03:17 +06:00
41e2dc7746 Fix for mask slide operators didn't work with LMB selection 2014-04-04 17:23:45 +06:00
1aa753ce88 Mask spline slide didn't respect auto-key 2014-04-04 17:19:36 +06:00
2a62a06e86 Mask spline slide: holding Ctrl will make handles free 2014-04-04 17:08:35 +06:00
8ff74bed9b Scons/cycles: fix header distribution for geom 2014-04-04 13:07:32 +02:00
0579a6e209 Followup to the previous commit: forgot to tweak handle type 2014-04-04 16:49:50 +06:00
68bc675af4 Mask spline segment slide improvement
This implements weighted slide of second handle, just the
same exact way as it works in Gimp.
2014-04-04 16:44:09 +06:00
7cb90a611f Optimization for mempool initial chunk allocation
Almost all pools allocated 2 chunks on initialization,
every element needed to be added to the free-list which
would never be used for small pools.

Now allocate only one, gives minor speedup for some bmesh operations.
2014-04-04 21:25:08 +11:00
896725e0bb Mask point slide: clean-up of SlidePointData structure 2014-04-04 15:11:39 +06:00
31c73586d6 Maks point slide: get rid of jump when you press shift 2014-04-04 15:03:14 +06:00
6cf86f2725 Mask point slide: remove commented out code
The code wasn't needed for quite a while already, so
let's get rid of it.
2014-04-04 14:36:41 +06:00
884b9e27f6 Mask curvature slide: reduce jumps on slide
Also correct wrong logic around tweaking handles type.
2014-04-04 14:34:11 +06:00
71a2ff12a8 Fix crash happening in DAG_pose_sort() due to threading issues
This function used ugly hack with static variable which was
preventing some type checks in DAG nodes. Using this variable
form multiple threads is not considered safe, apparently.

Solved by moving this variable inside the DAGForest structure.
so it's global for the graph now, but different graphs does not
run into conflicts.

This required passing the forest to some functions, which doesn't
look so much nice, but don't want to spend time on making this
code look beautiful because it is really to be replaced by the
new dependency graph.

This is really bad bug actually which is must go to 'a'.
2014-04-04 12:46:08 +06:00
45b02cee47 Code cleanup: no need to use calloc when memory is initialized after
also replace AT with __func__ since AT expands the full pathname
2014-04-04 14:26:01 +11:00
2bba04f1b0 Cloth: replace EdgeHash with EdgeSet 2014-04-04 14:15:57 +11:00
602629502c Clicking outside menus wasn't closing when opened from non menu popups 2014-04-04 07:33:42 +11:00
d923720312 Cycles: Disable Branched Path on all GPUs for now, until we separate the cubins.
SM_20 fails now as well, reported by Zanqdo in IRC.
2014-04-03 22:18:40 +02:00
bd03e4cfe8 Cycles volume: detect homogeneous volume automatically in common cases.
In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.
2014-04-03 22:13:05 +02:00
ab32a1807d Cycles: SSE optimization for Voronoi cells texture
Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
2014-04-03 23:35:10 +04:00
c019ae5ea3 I18N: add missing lines
Reviewed By: mont29

Differential Revision: https://developer.blender.org/D328
2014-04-03 22:49:27 +04:00
e7c2578576 Cycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.
This makes bmw scene in msvc 12 builds 6% faster.
It also gives a minor speedup for SSE hair in all compilers.
2014-04-03 22:08:53 +04:00
5e5ec4c138 Fix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer. 2014-04-03 15:59:39 +02:00
0102d57c1d Slide mask spline segment to define it's curvature
This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline
curvature.

Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,

Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!
2014-04-03 18:20:17 +06:00
0ebade55fc Fix T37509: regression in smart-uv island orientation 2014-04-03 22:03:53 +11:00
5770d691bb Optimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos
add utility functions for using a 2d unit vector as a rotation matrix
mul_v2_v2_cw & mul_v2_v2_ccw
2014-04-03 21:47:03 +11:00
51abc2becd Fix for T39537 wasn't complete, buttons in popups remained unset. 2014-04-03 20:49:40 +11:00
d5ce2b5466 Fix T39567: simple deform modifier error 2014-04-03 18:57:37 +11:00
0e3e4c90b1 Fix build for BSD (broken by own 35747ee3d5).
Reported by Shane Ambler, thanks!
2014-04-03 09:21:05 +02:00
9bbb30bf03 Fix T39245: Crash when dynamic topology is enabled
Redundant decrement was crashing for systems which didnt optimize it out.
2014-04-03 17:13:31 +11:00
5873160242 Code cleanup: strict flags for bmesh_log 2014-04-03 17:13:31 +11:00
75c0ced840 Freestyle: Fix for debug information about sweep line intersection detection.
Vertices of two edges were swapped by mistake.  Also fixed indentation and added
a couple of debug prints to make it easier to visualize the lines using Matlab.
2014-04-03 14:59:19 +09:00
c6d85407d4 Forgotten to add this on last commit. This would cause dyntopo to always
refresh all its nodes if show diffuse was on.
2014-04-03 04:03:46 +03:00
dd54b721c6 Add load_ui to WM_OT_read_homefile
Useful for implementing templates.

Patch D423 by Gaia Clary
2014-04-03 11:29:45 +11:00
726628518d WM: expose file loading operator property init functions 2014-04-03 11:04:02 +11:00
b2b4f2c033 Code cleanup: use BKE_BIT_TEST_SET to set flags 2014-04-03 10:45:08 +11:00
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
03bd418d16 Fix T39517,
Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.

There are a couple of caveats here:

Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.

Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs
off.

Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.

Also make zero mask color duller again after artist feedback.
2014-04-03 00:39:42 +03:00
a58814acf5 Fix T39525: cycles volume render difference between branched/non-branched path. 2014-04-02 20:51:29 +02:00
7ed9d1b402 Fix T39523: cycles cache BVH not working correct with deformation motion blur. 2014-04-02 20:51:29 +02:00
8c730b1059 Fix T39520, show diffuse not working in dyntopo.
Was marked as a todo in the code.

This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.

Note: This does not yet address T39517
2014-04-02 18:56:19 +03:00
6785e45951 Undoing masks in dyntopo leaked memory 2014-04-02 18:25:03 +03:00
965e5039f5 Refactor to recent matcap built-ins to not use the built in system.
Those variables would get declared on fragment shader level and since we
use reserved opengl variables, some compilers would throw an error
(NVIDIA allows, some ATI compilers may break). Instead, use a separate
opengl built-in category especially for them. This works on NVIDIA, and
will wait for tests of this commit from ATI users.
2014-04-02 15:08:04 +03:00
26b2645d62 Implement fame sliding from IE's cache line 2014-04-02 17:59:10 +06:00
9caf702941 UI: Tweak last commit for UIList and image scopes' grip size.
Sorry, forgot the --hold arg to last arc land, wanted to check this before pushing... :/
2014-04-02 13:22:12 +02:00
9b3bd5582b Replace resize code of image scopes by use of new GRIP button.
This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!

Use new GRIP button for uiList grab-resize.

This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!

Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D343
2014-04-02 13:09:43 +02:00
4faef1e10c Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).
This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D342
2014-04-02 13:03:11 +02:00
11ee2d8b97 implement cache line for image editor
It works exactly the same as a cache line in movie clip editor.
2014-04-02 16:54:30 +06:00
6cd717e0a3 Fix T39521: Render with two Blender processes on same computer: compression issues?
We need to salt temp exr filenames with pid, else several instances of Blender rendering
the same scene on same machine and using "Save Buffers" option would use the same files!
2014-04-02 11:59:43 +02:00
35747ee3d5 Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D439
2014-04-02 11:59:43 +02:00
cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
288147334c Fix T39547: Toggling render passes on active scene does not update
render layer nodes in a pinned tree from different scene.

The way these updates work is a nasty legacy hack:
https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/composite/node_composite_tree.c$277

This function is called //very frequently// by the get_from_context
method. However, this does not get called for pinned node trees, so
when showing a different scene's compositing nodes in the editor they
may not get updated correctly.

Now moved this update call out of get_from_context so it happens in any
case. Will be called no more frequently than before (on every redraw).
Eventually the depsgraph should handle this more precisely, it's just a
simple ID dependency anyway ...
2014-04-02 11:04:09 +02:00
eed3974d11 Fix T39545: "Track selected markers", does not stop at end of video
Issue was cauzed by some weird clamping of current frame. Not sure
why it was here at the first point -- it's from the day0 of movie
clip datablock.
2014-04-02 14:11:35 +06:00
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
1d9e0c373d Fix for BLI_rng_shuffle_array noted by mont29 2014-04-02 10:09:48 +11:00
da4b90a331 Code cleanup: use uint64_t for BLI_rand 2014-04-02 09:58:27 +11:00
e60b18d51d Dyntopo: Delete OpenGL buffers of nodes that do not have any more
triangles.

It is possible to end up with such nodes using brushes in aggressive
collapse mode. Those nodes should normally be cleaned up, since they can
never be actually reused (adding more geometry to a node requires the
node having some geometry to begin with) but until we support dynamic
nodes, better delete those to avoid binding graphics driver resources.

If such zero elements buffers were used, GL error out of memory would be
reported.
2014-04-02 01:41:14 +03:00
0a112efcf7 Fix for building with MSVC2008 2014-04-02 09:16:47 +11:00
dc5fe5d25f Fix bpy.so linking on Mac OS X
D345 from Aleksandr Derbenev
2014-04-02 09:03:01 +11:00
7c513f5913 Fix some redrawing and possibly other issues in dyntopo:
When node face gets deleted, added or exchanged, the nodes should update
their draw buffers, normals and bounding boxes. This was not being done
before so there were graphical glitches apparent, especially in collapse
mode.
2014-04-02 00:57:33 +03:00
16537a8f89 Sculpt: the thread controls where unintentianlly greyed out along with capabilities.has_gravity condition 2014-04-01 22:52:10 +02:00
747ba571a1 Fix T39550: polygons.active has bad default 2014-04-02 06:40:39 +11:00
bfe29e0ef7 Revert 7955cb78d it causes GPU_pbvh_buffers_diffuse_changed to always
return false, causing update of all pbvh nodes all the time.
2014-04-01 20:17:23 +03:00
3ed49a810d Make matcaps suck less
This commit does various changes for matcaps:

One is taking advantage of drawing with pbvh (which would only happen
with dyntopo previously) and drawing with partial redraw during
sculpting.

The second one is support for masks. To make this work in the special
case of multires, which uses flat shading, I use the only available flat
shaded builtins in OpenGL 2.0 which are color and secondary color.

Abusing colors in that way is also essential for flat shading to work if
we are to use pbvh draw in multires, since it is the color that is being
interpolated flatly, not the normal (which can only interpolated
smoothly). The pbvh drawing code for multires used last triangle
element's normal to compute the shading which would only produce smooth
results. This could change if we did the shading in the vertex shader
for flat shaded primitives, but this is more complex and makes it harder
to have one shader to rule the mole.

Also increased the brightness of the default diffuse color for
sculpting. This should be useful since artists like to tweak the
lighting settings and it will give them the full dynamic range of the
lights, but also it helps with correct brightness of sculpted matcaps.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D435
2014-04-01 19:27:13 +03:00
ad7980a51a Image and clip editor: change zoom step to end up at powers of two.
When you press zoom 3 times you will now get 2:1, 4:1, 8:1, etc. Fixes T36916.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D409
2014-04-01 18:00:14 +02:00
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
e21a7b32f9 Fix T39546: blender crash on open recent file, when tracking is still in progress 2014-04-01 18:43:49 +06:00
fb25a86f43 Fix T39537: Multi button editing is unreliable 2014-04-01 22:10:41 +11:00
77f815f67a RNA: clamp colors min to 0.0
any colors which need to be negative can explicitly pass in a range.
2014-04-01 21:50:09 +11:00
467596dd36 Fix T38860: Video preview in VSE shows a distorted and jagged appearance at scale 1:1
Issue was cauzed by the set zoom ratio optator which didn't really set pixel zoom to 1:1.
2014-04-01 16:41:48 +06:00
62dc18c717 Fix an unused function warning without openmp present, some typos 2014-04-01 11:23:28 +02:00
7955cb78d6 Fix for "Show Diffuse Color" was having affect on mesh without mask
Only happened with VBOs enabled.
2014-04-01 14:00:15 +06:00
9904127e33 Code cleanup: use bool instead of int 2014-04-01 13:55:25 +06:00
ee72cba008 Fix T39446: Blender Crashes when Camera Tracking
Issue is likely caused by thread-unsafe nature of IMB_freeImBuf
which might lead to race condition in some circumstances.

Now made it thread-safe and from Sebastian's tests seems crash is
gone now, so hopefully the root of the issue is finally nailed down.
2014-04-01 13:14:37 +06:00
e95fd79258 Correction for error in own recent commit (makesrna c++ api, un-init var) 2014-04-01 16:53:15 +11:00
11299f5ff4 BGE doc cleanup: Some small cleanups in the BGE docs:
* Fixing trailing whitespace in some files
  * Fixing some indentation
  * SCA_PythonController.owner is now documented
  * SCA_PythonKeyboard members now use the member directive instead of function
2014-03-31 22:22:04 -07:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
2c00ecc738 Code cleanup: use macro to find vertex in face 2014-04-01 10:08:54 +11:00
3deaf7dfca Fix for leak in freestyle transformVertices 2014-04-01 09:45:09 +11:00
2c0e32f4e4 Fix for leak in freestyle FitCurve 2014-04-01 09:14:59 +11:00
90b94fdce5 Fix for leak in BKE_sequence_sound_init 2014-04-01 08:44:00 +11:00
d25ba1eccd Changes to openmp threads commit (UI and RNA)
- use same names as render threads
- remove OpenMP from UI
- remove details from tips
2014-04-01 08:30:24 +11:00
42fca2f145 Usual UI messages fixes... 2014-03-31 21:15:56 +02:00
f1186cb113 Fix T39524: Backface culling is always on in Textured view in BI.
Special case I did not think about in own previous culling fix (rB0f95149a7849).
2014-03-31 20:05:09 +02:00
c682fe49f4 Cycles: fix 3-5% performance regression in msvc builds caused by a typo in stackchecking flags. 2014-03-31 21:44:02 +04:00
6815a22110 Sculpt/dytopo: remove debug prints and add explanations 2014-03-31 19:11:52 +02:00
262fd0865a Revert using slider for detail size on previous commit, makes changing
detail slightly harder.
2014-03-31 20:01:28 +03:00
fa3d9f4fbd Make dyntopo detail size maximum smaller (more than 40 pixels should not
be needed according to mapping in code) and change the property to
float.
2014-03-31 19:30:51 +03:00
a5be03b270 Fix deffects reported by CoverityScan (nothing dramatic, but at least one was a (minor) bug). 2014-03-31 16:42:15 +02:00
2020a15153 Fix playercompile after boolifications 2014-03-31 14:58:22 +02:00
b37dc6a8bd Fix T39291: "Stepped" F-curve modifier does not work as expected when stacked after other modifiers
Evaluation of time-warping modifiers ("Stepped" is one of them) didn't actually
end up distorting the time to look up what values other modifiers in the stack
generate. This meant that when a "stepped" fmodifier was on top of a "generator",
the stepped fmodifier looked like it didn't have any effect.

(This fix requires a bit of testing still, so should be left for 2.71)
2014-04-01 01:54:40 +13:00
49ca3fdf16 Fix compile due forgot remove BKE_scene_omp_threads_update from patch 2014-03-31 14:53:30 +02:00
097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00
847b7bcbea Code cleanup: pack BezTriple a little (though size remains same) 2014-03-31 23:38:49 +11:00
c58f000e57 Vector handles were hidden but were allowed to slide apparently 2014-03-31 18:33:09 +06:00
dc9f4f53c0 Didn't meant to commit debug-only-code in the previous commit! 2014-03-31 18:02:46 +06:00
a64bcc1037 Code cleanup: use bool/true/false in movieclip.c 2014-03-31 18:01:35 +06:00
c8862806ba Fix T39525: branched path + no lights + disabled use all lights option crash. 2014-03-31 13:54:15 +02:00
277fb1a31f Sculpt/dyntopo: Make the omp threads configurable to overcome performance issues
- autodetect optimal default, which typically avoids HT threads
- can store setting in .blend per scene
- this does not touch general omp max threads, due i found other areas where the calculations are fitting for huge corecount
- Intel notes, some of the older generation processors with HyperThreading would not provide significant performance boost for FPU intensive applications. On those systems you might want to set OMP_NUM_THREADS = total number of cores (not total number of hardware theads).
2014-03-31 13:51:49 +02:00
e05d35bfaf Fix T39510, Fix T39523: camera motion blur not working correct after recent changes. 2014-03-31 13:43:19 +02:00
a9b82244de Code cleanup: fixes for function prototypes 2014-03-31 17:35:56 +06:00
ed775edeeb Fix T39405: Make "amplitude" for elastic easing more intuitive to use
Previously, amplitude was more of an "absolute" value in the sense that whatever value
you set it to became a sort of "maximum bounce" height. However, it turns out that this
approach isn't so nice when dealing with large gaps between the values of two keyframes,
as the elastic easing equations expect that "amplitude > |change|" (where change is the
difference in values from key1 to key2).

Now, the "amplitude" value we pass to the easing functions are "|change| + amplitude".
This is easier to control, as now, as soon as you start changing that value, there are
immediately visible effects.
2014-04-01 00:24:58 +13:00
93aa9b3755 Code cleanup: use bool insted of int/short in MCE 2014-03-31 15:31:28 +06:00
8dc300ecba Code cleanup: use bool instead of short in motrack 2014-03-31 15:24:23 +06:00
5e4f789173 Code cleanup: use false/true/bool for masking 2014-03-31 15:23:27 +06:00
851805d84e Masking: fix for initialdeather point not being offset to the mouse position 2014-03-31 15:00:40 +06:00
f06a1b77e2 Maksing: fix issue when it's not possible to drag right handle of aligned handles 2014-03-31 15:00:40 +06:00
6316306cc0 Fix bug in image texture UI: "Use Alpha" checkbox doesn't appear if file format is BMP. 2014-03-31 17:37:55 +09:00
2fc7d04804 Add Simple randomize vertex tool
D432 from Walid Shouman with normal & uniform options added.
2014-03-31 14:56:43 +11:00
4e7872ce46 Add normal option to ED_transverts 2014-03-31 14:55:55 +11:00
0055162b75 Tweak slerp assert to be less picky 2014-03-31 14:55:12 +11:00
55f83e36cc Py API: Vector.slerp(). also added interp_v3_v3v3_slerp(_safe) functions 2014-03-31 13:28:37 +11:00
6aa75d3b2c Fix for error in normalize_vn_vn(), add len_squared_vn 2014-03-31 11:19:32 +11:00
e001b5b33e Cycles: Deformation Motionblur works on GPU, so remove the checks in the UI. 2014-03-31 02:18:49 +02:00
c24c34324c Code cleanup: remove unused members of TransVert 2014-03-31 09:58:17 +11:00
f1962f187f Refactor: Add generic poll ED_transverts_poll 2014-03-31 09:58:17 +11:00
f5b79dff41 Fix T39490: BGE: Text to Mesh, then MouseOver does not work
Non-mesh objects default to no collisions. lordloki provided a
patch that sets the collision properties for a mesh converted from
a curve/meta/surf/text to the default collision properties for
a mesh.
2014-03-30 13:55:10 -07:00
482201d1a0 Style cleanup 2014-03-31 05:46:19 +11:00
0b8774fc42 Fix for missing break statements 2014-03-31 05:46:19 +11:00
d84bd56ec5 OSX: Remove the apple/omp workaround for now, to better judge compiler differences 2014-03-30 17:38:52 +02:00
b99977ac60 And another compile fix for M_PI and msvc2008... 2014-03-30 15:36:09 +02:00
0319db1063 Correct own recent changes broke release builds 2014-03-30 20:35:59 +11:00
905c816834 Doxy comment for main() 2014-03-30 20:14:57 +11:00
8d1b289b78 Code cleanup: warnings (clang) 2014-03-30 19:37:43 +11:00
90d4bb1403 Fix for uninitialized var use 2014-03-30 19:36:51 +11:00
c16bd951cd Enable GCC pedantic warnings with strict flags,
also modify MIN/MAX macros to prevent shadowing.
2014-03-30 15:04:20 +11:00
0782187979 Code cleanup: BKE_nurbList_handles_set used some strange logic 2014-03-30 15:04:20 +11:00
5819421e1b correct recent commit 2014-03-30 15:04:20 +11:00
bbfeb120fc Code cleanup: use strict flags for BLI_rand 2014-03-30 15:04:20 +11:00
faf529d036 BLI_rand: Add BLI_rng_get_float_unit_v3, was static rayshade func 2014-03-30 15:04:20 +11:00
a6e8137983 Convenience macro for print_ funcs, saves passing id each time 2014-03-30 15:04:20 +11:00
cc439f683b fix scons ffmpeg libraries for mingw32 2014-03-30 01:35:39 +02:00
480c5019bb Code cleanup: reflect_v3_v3v3 made redundant copies 2014-03-30 12:28:09 +11:00
3bd15fcf15 Correction for poly_to_tri_count (used over-complicated method) 2014-03-30 12:05:42 +11:00
2702170717 Fix mingw32 compilation 2014-03-30 00:51:30 +02:00
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
23ef10c705 Code cleanup: kdopbvh, move minmax init into function 2014-03-30 10:33:01 +11:00
1963e03bd7 Support #ifndef WITH_SMOKE again 2014-03-30 09:32:57 +11:00
7571f2707a Fix MinGW64 compilation until we update the libraries. 2014-03-29 22:12:52 +02:00
a17c38f8e4 Cycles UI: Do not grey out Object Motion Blur buttons, when we use CPU fallback (User Preferences set to None). 2014-03-29 21:58:58 +01:00
e659cfdaf7 Change dyntopo detail size calculation slightly so the result is close
to the radius of the widget when setting the detail.
2014-03-29 18:16:36 +02:00
73299516fa Fix scons CUDA build and compile error with more strict compilers. 2014-03-29 15:57:27 +01:00
f449542d6a Cycles volume: change heterogeneous volume sampling in branched path first hit.
This now uses decoupled ray marching, and removes the probalistic scattering.
What this means is that each AA sample will be slower but contain less noise,
hopefully giving less render time to reach the same noise levels.

For those following along, there's still a bunch of volume sampling improvements
to do: all-light sampling, multiple importance sampling, transmittance threshold,
better indirect light handling, multiple scatter approximation.
2014-03-29 13:03:50 +01:00
3847d0c0df Cycles code internals: add initial implementation of decoupled ray marching.
This basically records all volumes steps, which can then later be used multiple
time to take scattering samples, without having to step through the volume
again. From the paper:

"Importance Sampling Techniques for Path Tracing in Participating Media"

This works only on the CPU, due to usage of malloc/free.
2014-03-29 13:03:50 +01:00
47e7acf231 Cycles code refactor: minor refactoring and comments for volume code. 2014-03-29 13:03:49 +01:00
7cb28f41f9 Cycles volume: change homogeneous volume sampling in branched path first hit.
Similar to surfaces, this will now always scatter rather than probabilistically
scattering or not depending on the transmittance.

This also makes calculation of branched path throughput non-probalistic, which
makes thing slower too. That's to be solved by decoupled ray marching later.
2014-03-29 13:03:49 +01:00
9a77872b2b Cycles code refactor: shuffle homogeneous volume code to factor out hit/miss decision.
This removes a few optimizations to avoid exp() calls and division, they will be
added back later, at the moment it's more important to make the code easier to
understand and refactor.
2014-03-29 13:03:49 +01:00
676e1cbe40 Cycles code refactor: move some more volume code into separate functions. 2014-03-29 13:03:49 +01:00
b1615f0e0e Cycles volumes: don't average coefficients over volume step.
Rather use random point in each step instead of giving the steps random sizes.
Gives a bit more accurate results with large step sizes, but also convenient
convention for later changes.
2014-03-29 13:03:49 +01:00
f5ab699fe8 Fix cycles error for heterogenous volumes, causing double step size to be used.
This gives longer render times due to smaller step size, double it to get
something more like the previous behavior.
2014-03-29 13:03:49 +01:00
28954ce9c4 Cycles code refactor: move some volume code to separate functions. 2014-03-29 13:03:48 +01:00
691c4c17ad Cycles: add "density", "flame" and "color" attributes for smoke domains.
These can currently be accessed by adding an Attribute node and specifying one
of those three names. A Smoke/Fire node should be added at some point to make
this more convenient.

These values might change still before the release, in particular for flame the
meaning seems unclear, it's just values in the 0..1 range. This is useful for
color ramps, but it might be good if this was also available as temperature in
kelvin so it can be plugged into the blackbody node. But I couldn't figure out
from the smoke code if or how this corresponds to a physical unit.

Here's a (quite poor) example file for a fire + smoke setup:
http://www.pasteall.org/blend/27990
2014-03-29 13:03:48 +01:00
27043b8e40 Cycles code internals: add support for mesh voxel grid attributes.
These are internally stored as a 3D image textures, but accessible like e.g.
UV coordinates though the attribute node and getattribute().

This is convenient for rendering e.g. smoke objects where data like density is
really a property of the mesh, and it avoids having to specify the smoke object
in a texture node, instead the material will work with any smoke domain.
2014-03-29 13:03:48 +01:00
393216a6df Cycles code refactor: move more code to geom folder, add some comments. 2014-03-29 13:03:48 +01:00
663a750c7f Fix: cycles volume emission incorrectly enabling surface importance sampling. 2014-03-29 13:03:48 +01:00
a2e4ebd36a Cycles code internals: add CPU kernel support for 3D image textures. 2014-03-29 13:03:48 +01:00
07d1fba367 RNA/Smoke: add access to high resolution density grid, and flame and color grids. 2014-03-29 13:03:47 +01:00
e8b1cfed0a Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
6997908afc Cycles: add per object options to disable motion blur and set deformation motion steps.
Notes:

* The motion steps only affect deformation motion blur.
* The actual number of steps is 2^(steps - 1). This avoids having to sample at
  many different times for object with more/fewer steps, now the times overlap.
* Deformation motion blur is enabled by default in existing files that have
  motion blur enabled. If the object is not deforming, this will be detected at
  export time, so raytracing performance will not be affected.

Part of the code is from the summer of code project by Gavin Howard.
2014-03-29 13:03:47 +01:00
e2184c653e Cycles: add support for curve deformation motion blur. 2014-03-29 13:03:47 +01:00
6020d00990 Cycles: add support for mesh deformation motion blur. 2014-03-29 13:03:47 +01:00
8f33538fab Cycles code refactor: add motion sampled normals attribute. 2014-03-29 13:03:46 +01:00
99f5993088 Cycles code refactor: improve vertex motion attribute storage and export.
This now supports multiple steps and subframe sampling of motion.

There is one difference for object and camera transform motion blur. It still
only supports two steps there, but the transforms are now sampled at subframe
times instead of the previous and next frame and then interpolated/extrapolated.
This will give different render results in some cases but it's more accurate.

Part of the code is from the summer of code project by Gavin Howard, but it has
been significantly rewritten and extended.
2014-03-29 13:03:46 +01:00
934767cf7f Cycles code refactor: change curve key to float4 for easier storage as attribute. 2014-03-29 13:03:46 +01:00
0509553b5e Cycles code refactor: changes to make adding new primitive types easier. 2014-03-29 13:03:46 +01:00
24ad7e0bea Cycles code refactor: add support for motion vertex attributes. 2014-03-29 13:03:46 +01:00
41d1675053 Cycles code refactor: move more geometry code into per primitive files. 2014-03-29 13:03:45 +01:00
84470a1190 Cycles code refactor: move geometry related kernel files into own directory. 2014-03-29 13:03:45 +01:00
2100fb4094 Code cleanup: avoid setting du/dv twice with ray intersection 2014-03-29 22:38:01 +11:00
fb0959f88d Code cleanup: replace dot with len_squared and is_zero checks 2014-03-29 22:24:12 +11:00
6bba006bf2 Cleanup: Minor spelling fixes: 2014-03-29 11:56:32 +02:00
6a1b7facf9 GPU_pbvh_buffers: Use triangles to render multires.
A question here might be: why?

The answer is that GPUs will convert this to triangles so we are wasting
memory during conversion of the element buffer to a triangle buffer
anyway.

The second reason is that some modern GPUs are slower rendering GL_QUADS

The third reason is that due to element caching, this should not in
theory be slower (cached elements do not get recalculated on the GPU).
2014-03-29 11:40:53 +02:00
eaaacfc7b8 UI: Color-Ramp handles
- display handles with solid color.
- active handle is highlighted.
- 1/4 of the colorband draws solid.
- use old-style handles when zoomed out.

D289 by Charlie Jolly with own modifications.
2014-03-29 15:36:50 +11:00
b64bdb2c1b Checker percentage calc was wrong, also cleanup 2014-03-29 11:25:44 +11:00
3eb2724c14 Update clang array checker for new clang py api 2014-03-29 11:08:24 +11:00
aec4367226 Fix building without openmp continued 2014-03-29 00:11:35 +02:00
d3309ac5c9 Code cleanup: correct arg size 2014-03-29 08:42:59 +11:00
025421950b Forgot to clean a line in last commit 2014-03-28 22:42:21 +01:00
00a9e77259 Fix compiling sculpt without OpenMP available 2014-03-28 22:37:05 +01:00
6d973b87a6 Fix T39468
Issue is that sampling functions did not pass a thread index to the
texture sampler so all threads were contesting for the same pool.

Paint cursors and sculpting that used openmp for threading suffered from
this. Now use omp_get_thread_num to pass the thread number.
2014-03-28 22:02:26 +02:00
8b43b9f255 Fix for mask vert add-slide dragging flipped direction 2014-03-29 06:44:40 +11:00
e9d733a8bd Fix T39484: Time line: highlighted area for frame range one frame too short.
Just using same principle as the one already used for the 'cache bar': add -0.5/+0.5 offsets to start/end (also edited 'view all' op to match this).
2014-03-28 15:15:30 +01:00
1af69b6df3 Implement asymmetric and free handles type for masks
Summary:
The title actually says it all, it's just possible to
have independent free handles for mask splines. Also
it's now possible to have aligned handles displayed
as independent handles.

Required changes in quite a few places, but they're
rather straightforward.

From user perspective there's one really visible change
which is removed Handle Type menu from the panel. With
asymmetric handles it's not clear which handle type to
display there. So now the only way to change handle type
is via V-key menu.

Rewrote normal evaluation function to make it deal
with new type of handles we support. Now it works in
the following way:

- Offset the original spline by maximal weight
- Calculate vector between corresponding U positions
  on offset and original spline
- Normalize this vector.

Seems to be giving more adequate results and doesn't
tend to self-intersect as much as old behavior used to,

There're still some changes which needed to be done, but
which are planned for further patch:

- Support colors and handle size via themes.
- Make handles color-coded, just the same as done for
  regular bezier splines in 3D viewport.

Additional changes to make roto workflow even better:
- Use circles to draw handles
- Support AA for handles
- Change click-create-drag to change curvature of the
  spline instead of adjusting point position.

Reviewers: campbellbarton

CC: sebastian_k, hype, cronk

Differential Revision: http://developer.blender.org/D121
2014-03-28 17:54:38 +06:00
6e5e3b73f3 Fix T37599: Crash making linked objects local and undo
Root of the issues comes to the fact that it's possible to produce
a situation when library object data uses local object. This is
actually forbidden and not supported by .blend IO.

Made it so Make Local wouldn't produce such an unsupported states.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D372
2014-03-28 17:14:11 +06:00
Lukas Treyer
97cb76a45d Bevel Factor Mapping
Bevel Factor Mapping allows to control the relation between bevel factors
(number between 0 and 1) and the rendered start and end point of a beveled
spline.

There are three options: "Resolution", "Segments", "Spline". "Resolution"
option maps bevel factors as it was done < 2.71, "Spline" and "Segments"
are new.

* "Resolution“: Map the bevel factor to the number of subdivisions of a
  spline (U resolution).
* "Segments“: Map the bevel factor to the length of a segment and to the
  number of subdivisions of a segment.
* "Spline": Map the bevel factor to the length of a spline.

Reviewers: yakca, sergey, campbellbarton

CC: sanne

Differential Revision: https://developer.blender.org/D294
2014-03-28 16:44:33 +06:00
3977b7612f Fix T39288: Inset regression with extreme offset 2014-03-28 21:38:12 +11:00
2a25676168 Fix for inset bug (edge rail had feedback loop with direction)
also disable edge-rail by default.
2014-03-28 21:38:12 +11:00
f88776bb5c Fix T39410: Crashes when Saving HiRes .tif 2014-03-28 15:22:10 +06:00
29888dcea0 Fix T39455: Nodes scaled wrong when some in a frame, some not.
Transform operators for nodes were not taking parent nodes (frames) into
account. Now use the nodeToView/nodeFromView functions to apply
transforms in local node space.
2014-03-28 10:07:11 +01:00
f0106d2985 Unbreak carve build for clang
Based on D420
2014-03-28 14:41:04 +06:00
6babbf59bc Fix T39472: Changing Sequencer color space repeatedly changes movie strip's display gamma
Issue was caused by the old color space settings being lurking around
seq->anim after the changes in color space settings.
2014-03-28 13:58:39 +06:00
93c896d53b BGE code cleanup: Removing an unused include in KX_Light.cpp 2014-03-27 22:44:30 -07:00
df9d6737b9 BGE code cleanup: Removing OpenGL and bf_gpu code from KX_LightObject
The ultimate goal is to only allow the rasterizer to handle OpenGL and bf_gpu
calls. This commit creates a RAS_ILightObject interface and a RAS_OpenGLLight
implementation.
2014-03-27 22:32:06 -07:00
3ec0c73211 View3D: replace RV3D_VIEW_PERSPORTHO with RV3D_VIEW_USER
This is hardly used, and may be removed later (looks like quad view used by accident).

It could cause the 2d grid to draw with the view at an angle.
2014-03-28 15:57:33 +11:00
ac07046e55 BMesh: optimize quad_coord, avoid duplicate sqrt calls 2014-03-28 15:25:02 +11:00
5981567ec6 Code cleanup: use len_v2v2_int for view zoom-scale 2014-03-28 15:02:57 +11:00
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
e6e7438181 RNA API: rename Sequence.elements.push() -> append()
also for SpaceNodeEditorPath
2014-03-28 12:11:52 +11:00
f4a990bfcd Fix for curve smooth ignoring cyclic 2014-03-28 09:26:45 +11:00
7ff123ce5c Fix T39452: Meshes without materials causes a memory leak in the game engine
These types of meshes do not use material caching, and thus only the first created
material would be saved, but subsequent ones were not. Those subsequent materials
were then not being freed. Now we make sure to track all of the materials.

Note: Meshes that cannot make use of material caching (no materials or using face textures)
can still use up a large amount of RAM since a material is created per face.
2014-03-27 13:51:07 -07:00
84823220b8 Attempt to fix compilation error on release windows
MSVC was yelling on me because of unused variable.
2014-03-27 19:14:20 +06:00
bcf6eedc48 Make blender compilable with FFmpeg-0.8.1
Needed for some own tests.
2014-03-27 19:12:21 +06:00
d3a73d0845 Windows: Upgrade FFmpeg from 0.10 to 2.1.4
Fixes T39423: Blender crashes on iv41 encoded videos in thumbnail display mode

Libraries are still being committed to the svn, so compilation might be broken
for a while. Sorry for this, but can't really be avoided.

Also, some typos in scons are possible.
2014-03-27 16:52:59 +06:00
688257d1a2 Fix T39435 paint overlay not always getting correctly refreshed.
Initialize the nodetree first, like paint stroke does.
2014-03-27 12:09:50 +02:00
eca6264ab0 Fix T38928 Particle add brush would generate trash on meshes with use_modifier_stack enabled
Issue here is complex (Of course, this is particles!)

First issue is that use_modifier_stack will use the num parameter of the
particles instead of num_dmcache, something the brush code did not
account for at all. Now correctly set DMCACHE_ISCHILD in that case.

Second issue is that make_derived_deform will return a mesh with less
indices than the particle system derived mesh. This would mean that
subsequent sampling of the particle derived mesh to initialize the
particles woould also produce garbage. This was being done for
optimization but in that case it broke the system.

Reviewers: lukastoenne

Differential Revision: https://developer.blender.org/D429
2014-03-27 11:44:23 +02:00
859039f732 Cycles: Raise a proper error message when using Branched Path on sm_30, this is currently still disabled. 2014-03-27 10:29:22 +01:00
7397ef8666 UI: Fix more double ":" in UI labels 2014-03-27 07:15:08 +04:00
5256a5d66c BMesh: let vert-connect make degenerate faces when only 2 verts selected 2014-03-27 12:52:34 +11:00
bec7c8c7aa BMesh: optimize BM_face_legal_splits for concave faces 2014-03-27 11:48:18 +11:00
66671f1aae Cycles: fix for building with cmake when gcc refuses sse args 2014-03-27 10:40:14 +11:00
7b644952c1 UI: Dynamic paint labels had a double ":" at the end of some strings like "Vertex Group::" 2014-03-26 23:27:51 +01:00
0adc1ba209 Attempt to fix T39412
do not use different stroke property names for different paint systems.
This was done due to different stroke sets being supported for each
system, but this lead to trouble if we changed the names (due to
different stroke sets being supported) and users created custom keymaps
with the old property name saved.

The first part of this fix addresses master. A similar commit will be
done to soc-2013-paint.
2014-03-27 00:04:59 +02:00
10e7544586 CMake: disable SSE flags if gcc/clang don't support 2014-03-27 08:33:33 +11:00
20a4e33837 Code cleanup: use consistent arg order for math api poly funcs 2014-03-27 08:30:14 +11:00
f26492d3e8 CTest: disable bl_run_operators.py, fun for finding crashes, takes a long time 2014-03-27 08:30:14 +11:00
d9557d01bd T39307: The fast gaussian blur is not an accurate formula. When deciding
which tiles are selected for input there was always a constant for correcting
the accuracy.

It seems that the constant was not enough and has been adjusted. (2 => 3).
2014-03-26 21:11:54 +01:00
fd3de8b042 Fix T39424: VSE: Bake Sound to Curve CRASHES Blender
BKE_sequencer_offset_animdata() was simply assuming bezt member of fcurve was always valid, while it might be NULL (e.g. when fcurve is using FPoints instead, like when generated from sound file).
2014-03-26 20:01:09 +01:00
cc6b106d34 Fix T39432: yet another particle bug caused by inconsistent num_dmcache
mystery.
2014-03-26 18:34:07 +01:00
8da4936590 Fix for build error in Cycles standalone caused by new DeviceDrawParams
added in rB74518b28267e9b18199212fbaa3c689fa018d20c.

No special bind/unbind needed for standalone viewer, so can just use a
static stub in the display callback.
2014-03-26 18:11:16 +01:00
af16d462e3 Fix T39419: Crash when solving camera motion
Stupid vector initialization error.

Should be in 'a'.
2014-03-26 17:47:13 +06:00
74518b2826 Fix T39420: Cycles viewport/preview flickers, when moving mouse across editors
Issue was caused by the wrong usage of OCIO GLSL binding API. To make it
work properly on pre-GLSL-1.3 drivers shader is to be enabled after the
texture is binded to the opengl context. Otherwise it wouldn't know the
proper texture size.

This is actually a regression in 2.70 and to be ported to 'a'.
2014-03-26 15:58:53 +06:00
3b0832dd86 Fix T39279: Vertex paint fails with mirror modifier 2014-03-26 13:57:27 +11:00
Dalai Felinto
b4d259f044 New resolve_tri_uv_v3 util function
Compute barycentric coordinates (u, v) for a point with respect to a
triangle.

This is needed for Cycles baking but we decided to push this
independently of the upcoming main baking changes.

Code adapted from Christer Ericson's Real-Time Collision Detection.

Cleanup, refactoring and review from Campbell Barton.
2014-03-25 21:58:52 -03:00
a7242c3162 Code cleanup: add _v2 suffix to resolve_tri/quad functions 2014-03-26 11:15:21 +11:00
bd65fc176d revert 0da3e97, fix for T39279
Following problems:
- painting onto a cube asserts immediately (vpaint/wpaint)
- crashes with valgrind (bad memory use)
- the original intended behavior of vertex projection paint no longer works as I intended.
  (its constantly refreshing geometry even when no modifiers are applied).

Best get code review for these kinds of changes.
2014-03-26 09:34:01 +11:00
8703e2fe7e Code cleanup: remove unused flags 2014-03-26 07:58:14 +11:00
a99a8a6070 Code cleanup: style and warnings 2014-03-26 07:53:56 +11:00
9d45431a35 Follow Blender slangs! ;) 2014-03-25 21:17:04 +01:00
2044201a9b CMake: only nag about requests py module once 2014-03-26 07:02:42 +11:00
765d077a1a Zoom to mouse position didn't work in MCE when locked to a selection 2014-03-25 21:58:45 +06:00
a7ed1db51f Fix T39319: Particle System Bug on Cycles Render.
Crashes due to bad dm face calculation in particle RNA/cycles hair.
This stuff is a total mess, but this kind of check is used in other
places and prevents crashing at least.
2014-03-25 12:34:30 +01:00
b7dbb2f48e Correction to the previous commit 2014-03-25 16:22:47 +06:00
d4cc81d552 Fix T38870: Freezes when jumping in front of a keyframe.
Issue was caused by inverting a degenerate matrix when
evaluating drivers.

Solved by using tweaked inverse code (same as used in Cycles).

Should have no affect on cases when matrix is not degenerate.
2014-03-25 16:07:13 +06:00
62a0350957 Editmode drawing: avoid glBegin/End for every tri (emDM_drawMappedFacesMat,GLSL) 2014-03-25 20:36:11 +11:00
436d6ec2e9 Code cleanup: editmode opengl drawing 2014-03-25 20:36:11 +11:00
cf148edb26 Followup to Ceres changes -- need to update bundling script 2014-03-25 15:08:22 +06:00
ddc959691a Fix for own commit: mixed up ceres build defines when replacing cmake
check with a generalized macro.

rBbbfcb0b1e44636b73b8c46f1cb800fa53dda5277
2014-03-25 09:49:39 +01:00
bbfcb0b1e4 Build file macro for testing unordered_map C++ container support.
Using unordered_map and unordered_set C++ container types currently
requires careful testing or usage of boost, due to the various confusing
C++ version differences in include paths and namespaces.

Libmv defines tests for these cases in cmake and scons, such that ceres
can use any available implementation, or fall back too std::map/std::set
if none can be found.

This patch generalizes this buildfile code by providing a Blender macro.
* cmake: defines both the variables used by libmv at them moment as well
as 2 variables UNORDERED_MAP_INCLUDE_PREFIX and UNORDERED_MAP_NAMESPACE,
which can later be used in other C++ parts for convenience.
* scons: adds a tool script returning the include prefix and namespace.
Libmv checks these to define the appropriate definitions for ceres.

Differential Revision: https://developer.blender.org/D425
2014-03-25 09:25:00 +01:00
6452d9f02f Fix T39395: Switching to "Textured solid" and "GLSL" view will cause the FPS drop to 0
Issue was caused by the cache limitor which was removing 4k textures from the
memory when accessing other images.

This is pretty much awful situation and solved by making it so only image sequences
and movies ace cache-guarded.

Could be optimized further so images used by viewport are not being freed, but
that's much more tricky to do..

This is a nice candidature for 'a'.
2014-03-25 12:30:41 +06:00
bd57ec686c Fix T39397: Leaving leaving camera from quadview set ortho 2014-03-25 15:14:34 +11:00
9d244e0ad7 Code cleanup: Removing KX_KetsjiEngine::m_drawingmode
The rasterizer is already handling this, and there is
no need to duplicate the data.
2014-03-24 20:11:11 -07:00
b66a9543bb Fix T38929: BGE: Strange behaving from addObject after trying to add an nonexisting overlay scene
If bge.logic.addScene() could not find the scene to add it would add the
first scene again, which is just silly. Now, if no scene is found, a warning
is printed and nothing is added.
2014-03-24 17:57:02 -07:00
a2c002acb9 Add a slight shadow to the radial operator text. It helps when brush
color is close to the cursor color.
2014-03-25 01:25:01 +02:00
f0ca40f9c1 Code cleanup: function calls 2014-03-25 10:10:00 +11:00
05deec3204 Code cleanup: rename easing functions with BLI_easing_ prefix 2014-03-25 09:59:10 +11:00
673b665471 Code cleanup: rename BLI_math_easing to BLI_easing
Many hard coded values and really specific to time & keyframes.
2014-03-25 09:59:10 +11:00
b701c92588 Code cleanup:
* Separate some common code for sculpt raycasting
* Cleanup to radial operator commit
2014-03-24 23:46:30 +02:00
1c22ba1e0e UI naming:
Change topology panel labels to "dyntopo"
2014-03-24 23:17:29 +02:00
7bb84912ef Code cleanup: ifdef debug only checks and simplify manifold test 2014-03-25 07:54:41 +11:00
b0a8e4ced1 Fix T39262: Regression in 2.70, wire-frame editmode tool replaced all 2014-03-25 07:53:09 +11:00
25835ec977 Fix possible use of invalid face index with wireframe tool 2014-03-25 07:53:09 +11:00
76d32a3f16 Improvements to radial control operator:
* Factor values get a minimum circle too, which denotes the maximum
value. This makes it easy to set the maximum value while previously
maximum was at center, much more difficult to set exactly.

* Added text indication of value at center of the widget.
2014-03-24 22:50:59 +02:00
ff21f6aeef Fix for own mistake in rB83f2012300acadafd359307e7a00bd71e67e3fd7: used
bool instead of int.

Thanks to Campbell Barton for noticing.
2014-03-24 20:54:50 +01:00
e9a64e2770 Fix T39392: Python bindings for geometry.box_pack_2d() return invalid total height 2014-03-24 17:39:54 +01:00
3b68c6304d OSX/sculpt/omp: missing initialisation of size_t pcount_len, oddly worked fine without on OSX 10.9, fixes < 10.9 2014-03-24 13:33:26 +01:00
83f2012300 Fix T39341: Cycles Rendered view laggy while using particles.
There are a couple of bugs that come together here:
* Particle hacks: extra modifier stack evaluation just for particles in
rna_Object_create_duplilist. This is where the primary issue stems from,
the "for_render" setting replaced the G.is_rendering flag in threaded
depsgraph. This causes particles to recalculate the entire modifier
stack with _render_ settings instead of viewport settings now. Fixed by
taking the 'preview' parameter in Cycles into account.
* Buggy skin modifier: The skin modifier generates a different amount of
vertices and faces **on every execution**. This must be looked at
separately, but it could be another reason why cycles constantly
restarted the sync process.
* Particles get re-distributed randomly every time (changing seed). This
could be caused just by the broken skin modifier, but might still be an
issue when simply rendering with cycles, since the psys will be
evaluated for render settings, if just temporarily.
2014-03-24 13:10:58 +01:00
07578bed4d Fix T39383: Blender crash when renaming bone in outliner (weight paint mode).
Outliner rename callback is supposed to activate affected element before actually renaming,
but for bones this was not working because the function used to activate the object explicitely
ignored ID_OB case! Added a bool flag to allow handing this case without (possibly) breaking
the other usecases.
2014-03-24 13:08:29 +01:00
f8c247f21b Remove the code which checked whether early object update skip didn't fail
Was a safety check which never triggered, so likely could be removed now.
2014-03-24 15:15:43 +06:00
f48828b64e Fix T39318: Blender 2.70 crash when I link an asset
Issue is a regression since threaded objetc update and caused
by the fact that some objects might share the same proxy object.

It's all fine but object_handle_update() will call update for
a proxy object which screws up threaded update.

The thing is, proxy object is marked as depending on a scene
object and such a call makes it so the children objetc is
being updated.

This is really bad and depsgraph is to take all responsibility
on updating the proxy objects.

So for now used a simple solution (which is safe to backport
to 'a') which is skipping proxy update if the scene update is
threaded and based on the DAG traversal.

There are some still areas which calls object update directly
and for that cases proxy object is still being updated from
object_handle_update().
2014-03-24 15:10:16 +06:00
b69809c820 Fix T39331: Dissolve vertex crash 2014-03-24 16:37:10 +11:00
32d5d072a0 Code cleanup: float/double promotion 2014-03-24 13:31:14 +11:00
3214d4fd5a Code Cleanup: PBVH, avoid sqrt and use bool for raycast functions 2014-03-24 13:21:58 +11:00
551d1a1ed5 Code cleanup: style 2014-03-24 13:14:19 +11:00
25b4b5fb9f Fix for invalid abs() use (from daccaa7) 2014-03-24 12:57:18 +11:00
7d64054798 Change to sampling: Take biggest triangle side as detail size on
intersection, since detail determines the maximum allowed triangle edge
size
2014-03-23 21:49:01 +02:00
7a21330421 Fix T39356: unsatisfied with uv pin unpin button, small bug 2014-03-23 14:30:10 +01:00
d18e4cf6ee Fix typo in API documentation. 2014-03-23 12:31:08 +01:00
8e0ee51b85 Cycles Standalone: XML Updates for Branched Path Multi Light. 2014-03-23 12:29:30 +01:00
31cc49b5df Code cleanup: Move AA Samples variable, this is not exclusive to Branched Path. 2014-03-23 12:15:33 +01:00
58c22d8fe8 Fix T39351: Blender crashes when enabling Mesh Analysis.
This code was using a //const// char array for fallback colors and then
writing to it (hidden to the compiler by explicit casting). Bad!
2014-03-23 11:37:04 +01:00
4c73001093 Fix T39353: Make Single User menu entries do not work correctly. 2014-03-23 11:33:40 +01:00
fcaa018249 Fix T39347: Pressing backspace during empty number input for translation results in 0.5828 increments
Interesting one, took me hours to understand the issue - a stupid typo checking the wrong value against the wrong flag (present since 2008!).
2014-03-23 10:59:52 +01:00
3bad243cb8 Further tweaking to numinput - enhance 'Reset' behavior.
Ways how it was resetting its values (backspace) was far from satisfaying. Now, e.g. when scaling, it will reset at 1 (or whatever mouse-value it was before entering numinput), instead of some ugly 0.0 value.

Implementation details:
* Values passed to applyNumInput() are stored as default ones (val_org), if it is not EDITED.
* applyNumInput() returns a boolean saying whether it actually set values or not.
* When backspace hits its ultimate step (where it clears all EDITED flags and reset all default values),
  it sets a temp FAKE_EDITED flag that will be used to apply one last time values of numinput
  (so that default values actually get applied!).

There are important things to note here for code using numinput:
* Values passed to applyNumInput() should be valid and are stored as default ones (val_org), if it is not EDITED.
* bool returned by applyNumInput should be used to decide whether to apply numinput-specific post-process to data.
* *Once applyNumInput has been called*, hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not.

Those two steps have to be separated (so do not use a common call to hasNumInput() to do both in the same time!).
2014-03-23 09:29:04 +01:00
c359de2c3a Use eyeliner cursor for sampling. Thanks to Thomas Beck for the
suggestion :)
2014-03-23 00:33:55 +02:00
97e26494ee Slight cosmetic improvement on UI. Add eyedropper icon to detail sample
operator and move it next to the detail slider
2014-03-23 00:01:46 +02:00
e732c5809c Detail sampling operator
Located on topology panel.

To use just click on button and click on mesh.
Operator will just use the dimensions of the triangles below to set the
constant detail setting.

Also changed pair of scale/detail size with nice separate float
percentage value.
2014-03-22 23:35:41 +02:00
c45c472e1b Cycles: SSE optimization for line segments/ribbons hair
Gives ~11% speedup for hair.blend, ~10% for koro_final.blend

Also extract few common subexpressions in hair calculation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D318
2014-03-23 00:45:59 +04:00
0ef416722e Flood fill for dyntopo constant detail mode.
Nothing spectacular here, fill tools are easy. Just take the dyntopo
code and repeat until nothing more to do.

The tool can be located in the dyntopo panel when the dyntopo constant
detail is on.

Also added scale factor for constant detail. This may change when detail
sampling gets in, I am not very happy with having two numbers here,
still it will give some more control for now.
2014-03-22 17:47:18 +02:00
1206faeb99 Warning cleanup:
* Comparison in utf detection code always failed
* Cast to integer to silence grumpy 64bit gcc
2014-03-22 14:41:38 +02:00
877706b8eb Cleanup: Restrict the debug -gline-tables-only to cxx_debug in cycles and spelling 2014-03-22 11:33:32 +01:00
85e0f69040 A few spelling fixes 2014-03-22 16:57:57 +13:00
f25c7a3f04 More driver linting messages - procedural animation and no-variables for average,etc.
Inspired by T39315, this commit adds a few more driver "linting" messages used for
providing users with tips on how to use drivers better. This time, we specifically
address 2 cases:

1) Drivers being abused for procedural animation, due to the misconception that
   procedurally generating F-Curves using F-Modifiers means that drivers are needed
   to wire such procedural motion-sources to properties.
2) Setting up Average/Sum/Min/Max driver types without any input variables - you can't
   expect anything to happen (unless of course, your intention was to lock the property
   to 0.0)
2014-03-22 16:56:17 +13:00
4acb57a7a7 Possible fix for T39330 period key is ignored in transform operations
Not 100% certain if this fixes, I will ask the user to verify through
buildbot.
2014-03-21 21:06:49 +02:00
0da3e97433 Fix T39279 Vertex paint modes do not work well with mirror modifier
Issue here is that coordinates used for projection would not fit the
closest candidate. So it was possible to paint against the mirrored part
of the mesh, which would get clipped on reprojection.

Fix avoids reprojection by storing squared distance, and screen space
coordinates, which we will need again later anyway. Also we now always
paint against the closest vertex always. This is ensured because squared
distances for uninitialized vertices will be MAXFLOAT, thus failing the
strength test.
2014-03-21 20:37:21 +02:00
44dc72334d Compile fix for Windows, M_PI was undefined. 2014-03-21 17:46:18 +01:00
ce5395868f Cycles Standalone: Support for relative paths and string OSL parameters.
Patch by John Haddon.
Differential Revision: https://developer.blender.org/D418
2014-03-21 17:22:41 +01:00
12ce5ae5be Forgot to remove test printf 2014-03-21 15:32:07 +01:00
081b0b6599 Sculpt: Fix non openMP threads not set correct and use optimal omp threadcount for OSX
- i empirically found that using HT just gives overhead, even possibly slowing things down
- i propose other OS test this too again
- switching threaded on/off did not restored single threaded case ( credits to Sergey )
2014-03-21 15:27:00 +01:00
54a8753df3 Fix T39323: Animation playback is not synchronized when Screen Layout changes.
Own regression in rBd2a5ea04ed84.

This commit should be included if we do a 2.70 'a' release.
2014-03-21 15:17:50 +01:00
daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
6e99fb04b6 Use the new BKE_libblock_copy_nolib function for bNodeTree datablocks
as well.

These were already doing the same thing, just not as nice. Only
difference is the do_action argument (false for BKE_libblock_copy_nolib)
but this is of no consequence because the function is only called for
trees nested inside material, scene, etc., which never have own actions.
2014-03-21 14:07:49 +01:00
c626462c0f Fix T39209: Localizing materials could cause heisenbug with concurrent
depsgraph updates.

Material datablocks were localized by first making a regular datablock
copy, which always gets inserted into the bmain list, and then removing
it again from bmain.

Problem is that this localization happens in preview threads, which can
run while the depsgraph is also updating GPU materials. In case the
copying of materials takes any amount of time, this can cause the
depsgraph call to material_changed to use an invalid, localized material
and access invalid GPUMaterial lists which have already been freed for
the actual material.

Solution is to not add localized datablocks to the bmain lists in the
first place. bmain should be totally immutable during preview or render
threads.
2014-03-21 13:50:20 +01:00
7148c97796 Fix T39312 Multipling two values in the Transform Tools Number Input not possible.
There was actually a few bugs in new event handling of numinput :/

In case of 2.70 'a' release, this commit should be considered imho.
2014-03-21 12:30:55 +01:00
356ec42bda Attempt to fix compilation error with msvc2013 2014-03-21 16:06:30 +06:00
3411146984 Update Eigen to version 3.2.1
Main purpose of this is to have SparseLU solver which
we can use now as a replacement to opennl library.
2014-03-21 16:04:53 +06:00
1781928f9d Fix T39305: Matcap Crash when using Material Nodes in Blender Internal
This is a regression in d34d745, texture painting didn't set is_paint
if draw type < DT_SOLID which is weird.
2014-03-21 15:17:43 +06:00
0f95149a78 Fix T39306: Backface culling in Multitexture always uses mat game settings
Trying to use mat game settings in 3DView makes sense - but only when we are using "Game Engine" as 'renderer'!

Note GLSL code completely ignores mat game settings currently, could be added too...
2014-03-21 10:11:54 +01:00
92a539ec92 Fix T38051: Even if Color Management is disabled, it is still applied to the background 2014-03-21 14:06:44 +06:00
77c1d17940 Fix T39186: Matroska audio support (mka, mkv without video stream)
.mka files were considered image files when adding to sequencer
using drag-n-drop.
2014-03-21 13:52:37 +06:00
3406ef8e03 Fix T39207: FCurve evaluation regressions following 2aff243 (again)
Yet another attempt at fixing the problems here. This time, I've added a new
function/version of the binary search utility so that we can pass in custom
thresholds (Note: This ability is only used for evaluation currently, with
everything else using a wrapper which still uses the old default threshold),
making it ok to start trusting the "exact" parameter.
2014-03-21 14:53:17 +13:00
3267454250 Debug prints weren't getting triggered, since they no longer use the old flag 2014-03-21 14:53:17 +13:00
dfa5ced30e Follow up to the previous commit
Just update to the changelog
2014-03-20 23:45:29 +06:00
6ba5c0c268 Update Libmv to latest upstream
This is mainly a maintaince commit which syncs changes
between Blender and Libmv upstream also bringing new
GLog version.

This GLog version is presumably have better support of
MinGW from "the box".

This commit is also aimed to make further 3d part libs
update easier.
2014-03-20 23:26:25 +06:00
2ea78fb28f Fix for clang build warnings: ATTR_WARN_UNUSED_RESULT is used after
the inline definitions are included, which gives lots of warnings
"attribute declaration must precede definition".

See also rB83617429cf28f2a19e991a0f71d892fc159a4419
2014-03-20 13:16:59 +01:00
27e86ed832 Code cleanup: use bools 2014-03-20 22:56:28 +11:00
03d053da4c Extend workaround to all OS :avoid link failure with clang 3.4 debug 2014-03-20 12:38:58 +01:00
29f359c975 Fix T39270: Since as the Move Clip Editor have only two modes, menu on tab is needless 2014-03-20 16:08:42 +06:00
16ea400b29 Code cleanup: use bool/true/false in clip editor 2014-03-20 15:52:00 +06:00
9767ff8916 Code cleanup: use true/false in sequencer functions 2014-03-20 15:46:38 +06:00
3fc293cd57 Fix T39141: Video Sequencer Proxies don't take into account Strip Input Offset (or strip modifiers)
Basically issue was caused by the fact that strip for proxy has been
post-processed but proxy files were considered pre-processed. This lead
to situation of postprocessing being applied twice.
2014-03-20 15:09:45 +06:00
30fdfc37dd Fix for crash generating docs (enums with only callbacks) 2014-03-20 19:17:47 +11:00
efb48fcbbb Fix for crash happening on blender exit after the bake
The issue is caused by 1a79abdad, and annoyingly it's a regression
since 2.69, so if we do 'a', this commit should be ported there.
2014-03-20 13:16:33 +06:00
e02b9c8a45 BGE: Adding support for the Cast Only material option.
Note: This does not add support for the option in the viewport.
2014-03-19 23:57:49 -07:00
9d4b54b44f Fix T39271: Crash in MCE with "p" shortcut without clip
Weird nobody noticed this before, issue exists in 2.69 as well..
2014-03-20 12:39:02 +06:00
eedde311bb Fix T36566: 2D filters broken in the Blenderplayer when using side by side stereo
GPC_Canvas::GetWindowArea() and KX_BlenderCanvas::GetWindowArea() are tracking two
different things. The 2d filter system doesn't actually need the window area and
can get by just using the viewport dimensions, which it now does. The GetWindowArea()
mess should probably be cleaned up.
2014-03-19 23:02:11 -07:00
e5f1c0bd63 View3D: remove orbit snapping LUT, allow to snap axis but not roll 2014-03-20 15:19:02 +11:00
c6252d6e60 Math Lib: add angle_qt functions 2014-03-20 15:15:29 +11:00
aee30184f3 View3D: avoid matrix multiply using ED_view3d_boundbox_clip 2014-03-20 12:20:15 +11:00
d4b8f6798d Code cleanup: comment unused OpenGL util functions 2014-03-20 11:54:32 +11:00
7a3ec0d9c7 Error in last commit 2014-03-20 11:49:01 +11:00
50309fcbe8 Vertex Paint: inverted line drawing, white lines were often hard to see 2014-03-20 11:44:48 +11:00
284a352120 Vertex Paint: use solid shading, shadeless in wire (like wpaint) 2014-03-20 11:35:31 +11:00
19fcb4de44 Fix kdopbvh incorrect checks for failed allocs
also assert for invalid args
2014-03-20 10:49:30 +11:00
cc2cdfb08a Code cleanup: de-triplicate add menu/toolbars, also style edits 2014-03-20 01:34:24 +11:00
44d6c686fa Fix for Layout.operator_enum ignoring alignment 2014-03-20 01:34:24 +11:00
7698322846 Usual UI messages fixes... 2014-03-19 15:25:32 +01:00
7997e38917 Fix T39233: Face assigned textures bake too bright
Shade input wasn't initialized properly for texture baking.
2014-03-19 20:22:28 +06:00
22ab652bb0 A simpler fix for the "clive" part of T39207 without the precision granularity risks 2014-03-20 02:23:04 +13:00
f0ac7294fa Fix T39207: FCurve evaluation regressions following 2aff243
This commit attempts to fix some of the FCurve evaluation regressions arising from
an earlier commit to speed up the process using binary search. Further tweaks may still
be needed though to get this to an acceptable level of reliability (namely, tuning the
threshold defining which keyframes get considered "close together"). Since we're still
in an early stage of the 2.71 dev cycle, for now it's still worth trying to get this
working instead of simply reverting this (which can still be done later if it proves too
problematic).

Specific fixes:
* The previous code was somewhat dangerous in that it allowed out-of-bounds accessing
  of memory when a == 0. It turns out this was more common than originally anticipated
  (as the assert I added here ended up failing in the "action_bug.blend" file in the report)
* Tweaked the code used to test for closely-spaced points so that the "Clive.blend" example
  for driver curves won't fail. The approach used here has the downside though that
  since "exact" uses a might coarser threshold for equality, there may be some precision
  loss issues causing backwards compat issues (namely with closely spaced keyframes, or
  for certain NLA strips).

For now, I've left in some debug prints that can be enabled by running Blender in debug
mode (i.e. "blender -d"), which can provide some useful tuning info should we need to
look more into our approach here.
2014-03-20 02:23:03 +13:00
d2660a079c Fix T39260: "Redo Last" operator popup shows macro operator labels twice.
The popup was showing an explicit uiItemL as well as using the
UI_LAYOUT_OP_SHOW_TITLE flag. Both do the exact same thing.
2014-03-19 13:20:44 +01:00
1f63b0807b Fix bpy.types.Operator.bl_rna.foobar not working since rBfe094eaf20.
When path to resolve "finishes" on a collection prop, do not erase the returned prop!

This caused py's path_resolve to return same PointerRNA as the one passed as parameter, leading to
inifinte recursion in Operator's accessor func (__getattribute__)...
2014-03-19 12:50:17 +01:00
3f89b92823 Ups, forgot to remove something i just placed temporary … 2014-03-19 11:26:41 +01:00
67f0290382 OSX/bullet/scons: a better workaround for clang 3.4 issues with actual bullet, according cmake ( less speed penalty ) 2014-03-19 11:21:36 +01:00
28c1a860e2 Fix T39247
Changes to interpolation break texture allocation on sm35 and greater.
2014-03-19 07:37:18 +01:00
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
f127f49b4d UI: Add splash link to gooseberry (remove user community link) 2014-03-19 07:19:43 +11:00
ca6d76a915 Code cleanup: double/float 2014-03-19 07:19:43 +11:00
df25dbf917 Fix T39252: Regression: Auto perspective fails when switching from {front, side, top} to camera view, and then to user persp.
When leaving cam view, if autopersp is ON, and previous view was an axis one, we have to force new view in perspective mode - else, we reuse previous stored mode (persp or ortho).
2014-03-18 19:50:20 +01:00
74d98115ca Cleanup: factorize RNA accessor code of modifiers (saves over 160 lines of dummy code!)
Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D364
2014-03-18 19:23:12 +01:00
ed26edb532 Fix T38566: "Separate images" in VSE is not working any longer 2014-03-18 22:45:33 +06:00
60cab47735 Correction to particle system commit: wrong struct name was used 2014-03-18 22:25:29 +06:00
c450ea2ab0 Fix T39203: Boid particle naming UI semi-freeze
uiList was not handling correctly UI_BUT_DISABLED TEX name buttons!
2014-03-18 15:24:34 +01:00
5febb09639 Fix T39180: Particle with fluid physics unstable.
Fluid sims have a very nasty feature for interaction, in which a psys
can directly update the bvhtree for //another object's psys//. This
breaks with threaded depsgraph evaluation and is generally a no-go.

To avoid crashes for now, use a global mutex to avoid concurrent writes
to an object psys' bvhtree.
2014-03-18 13:39:13 +01:00
a6e347177b Fix T39136: DupliFaces: Inconsistent handling of group member types
The issue was caused by assumption object matricies can be modified
by DupliObject->obmat outside of the duplilist iteration cycle.

This isn't really true. The thing is, old code used to modify object
matrix based on the duplicated matrix to make it so modifier evaluation
kind of works (it'll use proper matrix in most cases, but think there
might be some cases when this assumption also breaks).

Even when matrix is copied from dupliobject to object in advance
(to mimic old behavior or dupli system) you're still to use matrix
from dupliobject inside a cycle body. This is because the same object
might be modified multiple times by different dupliobject. For example,
in case of duplifaces loads of faces will modify object's matrix and
before this change matrix from the last face would have been used.

The fix is simple one-liner which makes it so render instance will
use proper matrix from dupliobject.

All the rest bits here (pre-loading matrices and restoring them in
the reverse order) totally matches old behavior of duplilist.

This is a regression and to be ported to 2.70 tag!
2014-03-18 18:15:02 +06:00
5ff0500593 OSX/cmake/bullet: fix ambigoius compiler ID and make deoptimize fix a bit stricter to reduce speed penalty 2014-03-18 12:18:03 +01:00
eaf387b8df UI: bypass text clipping on buttons with no text 2014-03-18 11:07:10 +11:00
ec55074f89 Code cleanup: jitter, use 2d float array 2014-03-18 10:52:38 +11:00
4d44f70d5f Follow up to previous commit:
Make HSL wheel useful in compositing.

In HSL, 0.5 lightness corresponds to most vibrant colors so make that
default for locked wheels (previous value of 1.0 just made it white).
Also, unlock the wheel for both very bright and very dark colors.
2014-03-18 01:33:28 +02:00
06de5be90e Fix T39228 Gamma/lift/gain are burned out in the circular color pickers
and value/lightness slider stops midway.

Issue here is manyfold:

Color wheel does not support properties with different soft min/max
values than 1.0 (which after experimenting a little I left as is), and
also color management is completely destroying the mapping between the
value slider and the RNA property value range. To solve this I have
disabled color management by setting the property to gamma corrected
(only in RNA, Sequence editor coders please check!), otherwise it will
just become a big mess of tracking where color comes from and what kind
of color transforms it needs in different color pickers (if property has
non normalized range etc). HSL is not really meant to represent colors
outside a normalized space so I have disabled setting lightness above
1.0 in this model.

This will work, however it is hacking a color picker to do something
other than what it is supposed to do: pick a color from the screen
accurately. Which means normalized values always. The non normalized
colors picked for lift/gain/gamma through the pickers do not correspond
to any accurate colors; they are rather a user friendly way to 'sort of'
choose a color and a gamma with an indication of maximum value.

I think that lift/gamma/gain nodes need a dedicated widget for this
(besides it is quite clear that some options are written for that use
case) -or- a separate gamma multiplier for the picked color (which
should itself be in a normalized space)
2014-03-18 01:08:36 +02:00
7da2175271 KDTree: deprecate 'normal' argument
Normals for each kdtree node were allocated but never used,
and search args only use in particles/boids code.
2014-03-18 09:14:47 +11:00
a861e5572a UI: Add theme color for viewport overlay
Was using wire or black in many places, this color is used for cursor,
camera guides, transform helper lines. So its possible to have a dark
background with light overlay color.

Patch D331 by Brita, with some edits.
2014-03-18 05:40:18 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
7227117bed Fix own bug reported on irc by Venomgfx, missing value slider in color
pickers.
2014-03-17 20:01:33 +02:00
22873eaeba Fix T31598: smart UV failed for small faces
previous fixes only tweaked epsilon, but logic for skipping zero area
boxes was still wrong.
2014-03-18 01:34:14 +11:00
a47137a2db Python API: add Vector.orthogonal() method 2014-03-18 00:39:46 +11:00
8480bb64ec Code cleanup: style 2014-03-17 21:48:13 +11:00
930765faa8 Fix T39208: Adding scene to another scene's VSE causes audio and video to be unsynchronized
Audio of 'linked' scene has to be offset by the startframe of that scene, else it behaves as if 'linked' scene always started at frame 1...
2014-03-16 20:22:13 +01:00
d08e6ab279 Fix T39215: Shortest path error 2014-03-17 03:42:03 +11:00
0e9084d5ec Fix T39210: Grid Fill is generating mesh that's inconsistent with selected edge loops
Issue was in BLI's rotation_between_vecs_to_quat(), which did not handled correctly cases where both vectors are colinear.

Patch by Campbell Barton and me.

Issue originaly tracked down by Yan Shi, many thanks!
2014-03-16 16:31:19 +01:00
caf8684b50 EditMesh: Support contracting the selection as well as extending
This allows for holding ctrl while switching from face->edge modes to
select an edge-ring.
2014-03-17 00:25:34 +11:00
37dd7360d6 Code cleanup: naming conventions 2014-03-16 22:11:14 +11:00
7b7196e3ad Code cleanup: modifier_skin_customdata_ensure was a bad level call 2014-03-16 21:55:30 +11:00
211f08d89b Cycles: Direct multi light sampling in the Branched Path Integrator is optional now.
Disabling this can improve performance, when we need a lot of AA Samples anyway, to clear up the render.

Simple example .blend: http://www.pasteall.org/blend/27582

Differential Revision: https://developer.blender.org/D392
2014-03-15 17:37:43 +01:00
cb4c49ad97 UI: Improved layout for Cycles Volume Sampling panel. 2014-03-15 17:37:42 +01:00
13ae541be4 UI: Move OpenGL Settings (AA and Alpha) into the Info Editor render menu. 2014-03-15 17:37:42 +01:00
2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
38244166b0 Code cleanup: Don't assign time 2x, we only need it for Object Motion here. 2014-03-15 14:23:10 +01:00
433d55e9b4 Code cleanup: spelling & style 2014-03-15 23:46:02 +11:00
caf5d90fb0 Fix T39189: Node editor Map Uv requires an scale node to work.
This is a regression caused by rB67134a7bf689279785e2e40b29cd24243813998b
The UV coordinates read from the UV input must be scaled by the Image
input size instead of the UV input size.

Also now this node uses the UV input resolution instead of the Image
resolution, since this is what determines the available resolution. The
image is EWA-sampled anyway, it's resolution does not have a direct
impact.
2014-03-15 10:28:11 +01:00
2aff2435f0 Patch T36209: Use binary search function for evaluating F-Curves
This provides a speedup to evaluating long F-Curves in fcurve_eval_keyframes()
by using the pre-existing binarysearch_bezt_index() function (used for keyframe
insertion) to find the relevant BezTriple on the FCurve at the current evaltime.
The current code loops over all BezTriples (sometimes not even breaking from the
loop after cvalue has been evaluated).

Reviewer Notes:
- Unlike in the original patch, we use the old/existing logic instead of
  checking that (exact == true). See comments in code and also on the tracker
  entry for this patch for more details.

Patch By: Josh Wedlake
2014-03-15 11:47:46 +13:00
0dd52d1b26 UI Tweak: Add a convenience button for switching to Bone Constraints Tab
To reduce user confusion, we were already presenting users with an error message
when they tried to edit constraints for bones from the Object Constraints tab.
This commit just makes things more convenient by adding a button which takes
users to the right tab when clicked.
2014-03-15 11:45:53 +13:00
e81d98aff7 Spelling fix 2014-03-15 11:45:52 +13:00
d908c90d6d Fix T39166: Disappearing text objects
This is a failure of viewport direct displist creation
caused by existing curve_cache pointer which empty content.

Made it so if the curve isn't evaluated it's curve_cache is NULL.

This is just-another-regression to be ported to the release.
2014-03-14 17:51:58 +06:00
1f3655d224 Fix T38897: Problems moving animation channels up and down in dope sheet/action editor.
Basic idea is to check whether an element is visible or not, and ignore those that are hidden, during move up/down.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D376
2014-03-14 12:48:15 +01:00
ade6646755 Fix T39180: Particle with fluid physics unstable.
Fluid particles use the particle system's bvhtree structure, which is a
runtime BVH tree. This was not reset properly on copying objects/psys,
which lead to concurrent access in threaded depsgraph updates and memory
corruption.
2014-03-14 11:03:04 +01:00
a2057005f2 Fix T39164: Mask tansform doesn't respect parent for center
A regressions since 2.69, eeeh.
2014-03-14 12:58:36 +06:00
19ae921495 CMake: fix for standalone player and remove recast modifier reference 2014-03-14 17:05:58 +11:00
8f1a6e26b6 Fix Circle picker not liking linear color properties much. Again, visual
result for picked color was different from what was displayed on color
wheel under the cursor.
2014-03-14 02:30:27 +02:00
f19899b474 Disable color picker template cubic parameter by default.
This is mostly useful for precision in lift/gamma/gain nodes. Display of
those values is done with linear interpolation while saturation is
interpolated cubically. This will lead to color inconsistency between
selected and displayed color on color pickers for instance, which should
be avoided on those use cases.
2014-03-14 02:11:34 +02:00
33f51abe4e Better fix for T37545.
This was supposed to fix inaccuracies between S-H wheel but it makes the
colors selected through the SV-H color cube wrong (see http://
%28SV-H%29-Inaccurate). Instead of deactivating color management for SV
and H widgets just reenable correction for the Hue wheel. This is wrong
because HSV always refers to display space and we -have- to account for
that when using linear color RNA properties.
2014-03-14 01:42:50 +02:00
8c72669062 Some corrections to previous commit. Undo stack could return 0 or return
global undo even if not set in preferences.
2014-03-13 23:54:18 +02:00
93684d5b5e Fix T39156 part 2: Add support for image paint operations in undo
history operator (Ctrl + Alt + Z).

This will only show paint operations now while in an image paint mode.
The caveat is that user can delete previous paint operations too (even
on images not on the canvas currently) so it needs some care. This is
consistent with regular undo behaviour though.

Sculpting also suffers from lack of Undo history support, this will be
added in a separate commit.
2014-03-13 22:36:16 +02:00
a8039d99f8 Fix cycles texture interpolation mode closest constant offset on some devices 2014-03-13 20:08:33 +01:00
4080673ea7 Fix bug 1 of T39156: Deadlock while undoing paint operations on image
sequences.

This commit should be included in 2.70 release
2014-03-13 19:56:16 +02:00
82333049b9 Typos in last commit, sorry 2014-03-13 18:04:58 +01:00
36006220c3 GHOST: cover now both win and osx case for T39153 2014-03-13 18:03:04 +01:00
5e56f45a66 Fix own bug after HSL picker commit. HSV Cube based pickers missed HSV
buttons.
2014-03-13 18:43:21 +02:00
0c6e74436f Fix T39158: Help > Operator Cheat Sheet causes a python recursive loop.
Core issue exists since ages - the thing you get from bpy.types.YOUR_OT_operator is fuzzy, and may change,
due to the fact that both Operator and OperatorProperties share the same name...
Would be cool to get rid of this issue one day, but for now it's safer to use rna acessor...

This commit is to be backported to 2.70.
2014-03-13 17:37:19 +01:00
b7712a761a OSX/GHOST: fix T39153, pls check on win minimized window load 2014-03-13 17:08:28 +01:00
a349a3a94e UI: Show edge draw options for duplis, it applied to their instances 2014-03-14 02:15:18 +11:00
f959e3d4ba Fix T39146: recent cycles CUDA regression in fix for T39114.
This commit is to be backported to the 2.70 release.
2014-03-13 14:18:34 +01:00
23fd670c39 Code cleanup: cmake 2014-03-13 23:31:06 +11:00
899caeae49 Freestyle: Fix for a potential implementation error in the Python wrapper of the Nature class. 2014-03-13 21:00:59 +09:00
0141265073 Fix T39152: Blender crash when duplicate mesh with hooks and laplacian deform.
We can't simply dupalloc cache_system (LaplacianSystem), it has quite a few allocated data we'd need to dupalloc as well,
not to mention (nl) context... Much safer to just set it to NULL in new copy imho!

This commit is to be backported to 2.70 release!
2014-03-13 12:54:07 +01:00
67fc520ab8 Cmake: fix compile problem after own commit 2014-03-13 11:06:57 +01:00
94379277dd Fix T39151: Boolean modifier freeze
This re-applied patch from 25cbd13 which was lost at some point
since missing patchset in series.

This revision is to be back-ported to the final release.
2014-03-13 15:40:55 +06:00
217dbfeba5 Fix for compilation error since previous fix for XCode 2014-03-13 15:28:45 +06:00
3d031d1f3a BMesh: minor changes for BM_face_split use 2014-03-13 18:41:45 +11:00
702f374972 Fix for possible (unlikely) uninitialized var use in BM_face_split 2014-03-13 18:41:44 +11:00
e6a359a0a9 Fix T39148: Image does not show while rendering
Own regression since partial buffer update refactor,
display buffer for exr tiles should happen in image
update callback.

This revision is to be merged to the final release.
2014-03-13 13:28:57 +06:00
c17acf1d6e Code cleanup: quiet warning, 'else' would always crash (& never occurred)
also quiet waning clamping
2014-03-13 12:03:18 +11:00
37cf28b341 Freestyle: avoid checking PyErr_Occurred and quiet warning 2014-03-13 11:54:59 +11:00
2d0997766d OSX/cmake: set DEBUG_INFORMATION_LEVEL to "line-tables-only" for cycles, clang 3.4 (xcode 5.1) would not link with RNA in debug else 2014-03-12 22:41:35 +01:00
032b42d48d Code cleanup: de-duplicate switch statement, style edits 2014-03-13 06:31:06 +11:00
deef641878 Anticipate future color picker types and don't crash (uiBut could be
NULL in some cases)
2014-03-12 21:06:57 +02:00
fbf859518a Followup for fix T38318: Add back previous fix and fix a glitch.
The previous fix 162d6c73e3 has been cancelled because it caused a
problem that mesh deform cages and so on mess up the preview. To avoid
the problem, viewport doesn't show mesh object if its draw type is
bounding box or wireframe.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D375
2014-03-13 03:46:44 +09:00
d7cff8f74c Fix T39114: cycles lamp ray visibility not working.
Thanks to Thomas for finding the cause.
2014-03-12 18:21:23 +01:00
d7824e435f Fix possible (unlikely) use of uninitialized pointer in RNA resolving 2014-03-13 04:18:50 +11:00
4fa93b1ea4 Code cleanup (tm): Some code deduplication for HSL 2014-03-12 19:12:58 +02:00
2e128baefd Fix T39111: Boolean assert failure on widows
In fact we had this change a while ago, not sue what happened.
2014-03-12 23:12:34 +06:00
bce924b43c HSL color wheel implementation.
This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.

The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.

Beware, Old files opened with this preference saved will crash!

Reviewers: sergey, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D385
2014-03-12 18:58:50 +02:00
35ed7486c7 Mesh API: rename 'octree' to 'spatial' since internally its using kdtree 2014-03-13 01:49:47 +11:00
5bceb00a61 Mesh API: replace octree mirror with kdtree 2014-03-13 01:49:47 +11:00
d0ad48fdc9 OSX/bullet: i have to use -O0 again, else weird bullet behaviour comes back.
I overlooked in cmake my fix same time changed the optimization level to 0,
so not use optimization is the real fix ( postponed for after 2.70 ).
I appears we should investigate scons anyway: compileflags does not apply to c and c++ same time as expected.
2014-03-12 13:04:31 +01:00
e5e0888a8f UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).

Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
2014-03-12 22:56:10 +11:00
a7faad9aa1 Code cleanup: UI - de-duplicate menu/row/listrow enum logic 2014-03-12 22:54:26 +11:00
2cbbaea44e Fix for particle edit mode using wrong pixel distances.
rB57dba739176153e052d77611ff0e554f05984686 unified pixel distance values
but omitted a factor 100 for particle edit.
2014-03-12 11:54:49 +01:00
7b03eb56bd Fix T39109: Vertices affected by Hook Modifiers change after "switch Direction" on Curves
Remapping hooks and vertex parent wasn't implemented for curves.
2014-03-12 15:46:24 +06:00
de86b7097f Fix T39104: 2 clothes on a collision object cause crash
This was caused by static variables used in plNearestPoints().

For now solved by making the solvers allocated in the stack,
seems no noticeable affect on the simulation speed so far.
2014-03-12 14:48:47 +06:00
0a3850fde4 Fix T39123: Border select without "extend" does nor clear selection of bezier nodes in 3D view
This is a regression introduced in fbc7ab30f and caused by the wrong object
being passed to the function.

Not sure passing editnurb as an argument is a good thing to do..
2014-03-12 14:07:26 +06:00
b23a4395c7 Fix T39126: Convert To: Mesh from Curve/Meta/Surface does not respect "Keep Original"
Own regression, didn't consider operator redo would leave scene in a non-evaluated state.
2014-03-12 13:59:45 +06:00
4ae6c5cd77 BMesh: minor optimization, step over own loop in BM_face_exists 2014-03-12 18:30:38 +11:00
5db086b7ce Transform: minor optimization, use BLI_bitmap for island tagging 2014-03-12 18:30:38 +11:00
eaea050920 Transform: internal change, simplify view angle checks 2014-03-12 18:30:38 +11:00
921c829bcf Code cleanup: redundant normalize in bmbvh ray cast 2014-03-12 18:30:37 +11:00
2d4de2742c Cycles: Disable Branched Path on sm_30 for now, recent Indirect Multi Light addition makes nvcc fail. 2014-03-11 23:04:55 +01:00
a82d899c13 fix compile error on MinGW32 2014-03-11 21:46:12 +02:00
330272be9a Fix T39060: "Choose by numbers" do not work with Enum-menus, but work with operators-menus
The "layer" exception in handling numbers for menus was a bit too much greedy, eating numbers for all RNA props instead of just for layers ones...
2014-03-11 21:07:57 +01:00
c2045ef794 Fix T39033: Regression, duplicating proxy loses proxy
fix for bug making duplicates real effected copying scenes and linked duplis.
2014-03-12 05:56:15 +11:00
09b2531bb3 OSX/bullet: add -O2 to bt_cxx_flags, in cmake thats default, in scons CXXFLAGS start empty also in “Release” 2014-03-11 18:32:22 +01:00
6e9ee13de0 CMake: add fastmath for gcc release flags (OSX had already) 2014-03-12 03:39:12 +11:00
ba81fb70b2 NDOF: enable orbit sensitivity menuitem outside 3d view
The color picker uses.
2014-03-12 03:38:07 +11:00
4e3f27032e OSX/bullet: do a last fix for scons. Now in both buildsystems the used flags are in sync for OSX 2014-03-11 17:34:31 +01:00
997b49a5f3 Fix for own rB6919ffbf4b2f (we only consider unit scale when we do use a unit system!).
Noted by Campbell, thanks!
2014-03-11 16:58:09 +01:00
6919ffbf4b Fix T39112: increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)
In case of "floor" grid (i.e. perspective views), unit_scale correction was not applied...
2014-03-11 16:38:08 +01:00
a7ab389d54 Fix for missing 'field-of-view angle' property for a panoramic camera. 2014-03-12 00:08:28 +09:00
ce37400c0b OSX/cmake: tentative fix for T38746, conflictting flags somewhere 2014-03-11 15:56:50 +01:00
a2ffd8e423 Fix T39028: Quadview views inaccessible with python except bottom right view.
Expose all four quadviews in a collection in RNA API.

Note the region returned by old region_quadview property is now region_quadviews[2].
2014-03-11 15:22:09 +01:00
a6bdad699c Fix T39080: copy-to-selected operator fails for pointer properties.
The copy-to-selected operator for RNA buttons uses paths for copying
object pointer properties. Copying other ID data blocks is deliberately
disabled:
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_ops.c$274

However, the RNA_path_resolve_full function is not properly working for
retrieving pointer properties: it always will dereference pointer
properties in anticipation of further path elements.

In fact the return value of RNA_path_resolve_full has a conflicting
double meaning. It returns `false` when
* the RNA path is invalid
* any of the pointer properties is NULL

This means that it is not capable of returning pointer properties at all.
To make this possible, there is now an internal function for path
parsing, which returns false //only// if the the path is invalid.
On top of this there are 4 wrapper functions for retrieving either
actual property values (RNA_path_resolve, RNA_path_resolve_full) and for
retrieving pointer+property pairs (RNA_path_resolve_property,
RNA_path_resolve_property_full). The latter 2 variants will **not**
dereference pointer properties at the end of the path, so callers can
actually get the property itself. The `***_full` variants include an
array index return value.

Differential Revision: https://developer.blender.org/D396
2014-03-11 14:58:53 +01:00
89c793f70f Fix T39029: Blender Internal: Render tiles do not appear until render is finished if Save Buffers enabled 2014-03-11 19:56:03 +06:00
658b4c0d56 New Corner Pin node: uses explicit corner values for a plane warp transformation.
This was suggested by Christopher Barrett (terrachild). Corner pin is a common feature in compositing.

The corners for the plane warping can be defined by using vector node inputs to allow using perspective plane transformations without having to go via the MovieClip editor tracking data.
Uses the same math as the PlaneTrack node, but without the link to MovieClip and Object.

{F78199}

The code for PlaneTrack operations has been restructured a bit to share it with the CornerPin node.

* PlaneDistortCommonOperation.h/.cpp: Shared generic code for warping images based on 4 plane corners and a perspective matrix generated from these. Contains operation base classes for both the WarpImage and Mask operations.

* PlaneTrackOperation.h/.cpp: Current plane track node operations, based on the common code above. These add pointers to MovieClip and Object which define the track data from wich to read the corners.

* PlaneCornerPinOperation.h/.cpp: New corner pin variant, using explicit input sockets for the plane corners.

One downside of the current compositor design is that there is no concept of invariables (constants) that don't vary over the image space. This has already been an issue for Blur nodes (size input is usually constant except when "variable size" is enabled) and a few others. For the corner pin node it is necessary that the corner input sockets are also invariant. They have to be evaluated for each tile now, otherwise the data is not available. This in turn makes it necessary to make the operation "complex" and request full input buffers, which adds unnecessary overhead.
2014-03-11 14:12:08 +01:00
558fa43ffd OSX/bullet: Truely fix T38746 now, compile flags where not propagated right,
also remove gcc 4.6 workaround, i don’t think its needed any longer.
!!! pls check if this would be right thing todo for othere OS too !!!
2014-03-11 13:27:06 +01:00
500088d9e3 Fix T39078: crash increasing hair emission number 2014-03-11 23:04:59 +11:00
ced595a37d Fix T39087: Weight Paint, custom color ranges don't update in viewport 2014-03-11 21:19:59 +11:00
df5cbfb625 Fix T39070: Custom bone shapes appear only one sided
The idea is simple -- only enable culling for bones if they're not using
custom shape or if culling is enabled in shading panel.
2014-03-11 13:14:29 +06:00
12c56d8c1f Fix T39101: Can not select object on backface by clicking when Matcap is on 2014-03-11 12:56:08 +06:00
41dde55325 Fix T39081: Crash duplicating objects 2014-03-11 17:46:11 +11:00
4cfd14644b 3D Text: textbox selection while in editmode
D395 from Henrik Aarnio with some improvements.
2014-03-11 17:16:08 +11:00
57dba73917 View3d: take pixelsize into account for selection distance 2014-03-11 15:34:19 +11:00
23fbc9f22f Fix T39083: speakers were evaluated multiple times when used in sets
also skip checking all objects for speakers when no speakers are in the
blend file.
2014-03-11 14:46:55 +11:00
8d09ec63b7 OSX: fix another kCGLRendererAppleSWID 2014-03-10 22:29:08 +01:00
e913eab386 OSX: change a longterm deprecated kcgl constant, could lead to crashes else 2014-03-10 22:27:29 +01:00
ac0cdec90f OSX/clang3.4: tentative fix for T38746, strange bullet behaviour 2014-03-10 18:09:53 +01:00
2de9da6ee9 Fix T39034 brush always shown even after deactivating the show cursor
option after reentering a paint mode.

Solution by Bastien with modifications, thanks!
Show Brush flag need not be reenabled always, but make sure it is at
least enabled once on paint initialization.
2014-03-10 18:42:35 +02:00
658f37acd7 Minor cleanup: use rna_ prefix for path_resolve_* functions for
consistency.
2014-03-10 12:46:01 +01:00
b977cfd28b Fix T37293: trying to fix scrubbing not stopping playback 2014-03-10 12:34:08 +01:00
fe094eaf20 Cleanup for RNA_path_resolve_full.
* Moved collection key parsing and array index parsing into their own
functions, to make the main path loop easier to follow.
* Unified boolean return values.
2014-03-10 12:26:50 +01:00
4d47e75223 Fix for proxy colorspace and prefetching 2014-03-10 16:46:05 +06:00
48e99c0820 Revert changes to submodules
NEVER use `git commit .` or stage submodules. Leave it to platform maintainers!

See [1] where you'll find few hooks which would help you preventing
accidental commit of submodules.

[1] http://wiki.blender.org/index.php/User:Nazg-gul/DevTools#Git_hooks
2014-03-10 15:17:22 +06:00
19935f0fc3 Fix for potential bug in copy-to-selected ui button operator: Return
value was mixing operator result with an int/boolean.
2014-03-10 09:51:59 +01:00
99e20d7b89 Cycles: Option to Sample all Lights in the Branched Path integrator for indirect samples
This adds a new option "Sample All Lights" to the Sampling panel in Cycles (Branched Path). When enabled, Cycles will sample all the lights in the scene for the indirect samples, instead of randomly picking one. This is already happening for direct samples, now you can optionally enable it for indirect.

Example file and renders:
Blend file: http://www.pasteall.org/blend/27411
Random: http://www.pasteall.org/pic/show.php?id=68033
All: http://www.pasteall.org/pic/show.php?id=68034

Sampling all lights is a bit slower, but there is less variance, so it should help in situations with many lights.

Patch by myself with some tweaks by Brecht.
Differential Revision: https://developer.blender.org/D391
2014-03-09 22:20:01 +01:00
6fdbab4366 Minor code cleanup. 2014-03-09 22:25:37 +09:00
a96eb73a12 Code Cleanup for __HAIR__ defines. 2014-03-09 12:48:58 +01:00
40d4fb9fce Fix compile error using MSVC2008 + cmake 2014-03-09 09:55:49 +01:00
d219312d44 Fix T39018: Duplicate entries for material/shader in AnimEditors
In many BI shader setups, the material which owns the nodetree is often itself
included as a node in that nodetree (i.e. to provide the base colour for that
mesh). This would often result in the material (and its subtree) getting included
in the dopesheet results twice.
2014-03-09 19:23:32 +13:00
fa24ad1fd5 Graph Editor: add lasso select for fcurves 2014-03-09 16:20:04 +11:00
6a4567b9ab BLI Rect: utility function to transform a point using 2 rect's 2014-03-09 15:48:09 +11:00
bcb99b794d Text Editor: Remove key binding for text/object conversion
This can freeze Blender if you accidentally press ctrl+m on a large
script, conversion from text to 3d objects is fairly special case,
restricting access to the menu only.
2014-03-09 14:12:56 +11:00
25ad7b44a0 Fix for prevoius commit: accidentally changed a ifndef to ifdef. 2014-03-09 00:30:50 +01:00
5559302369 Cleanup some useless/unneeded #ifdefs for MSVC2013. 2014-03-09 00:25:08 +01:00
645aa96795 Make CMake use Jack debug libraries when compiling a debug build 2014-03-08 18:47:02 +01:00
8df2d1c6b6 Minor changes to CMakeLists.txt to enable debug builds on VS2013.
Fix for finding LLVM and OSL debug libs.
2014-03-08 18:47:00 +01:00
7461fead50 Fix T39035: Cycles F-Modifier truncates end/beginning frame values for repetition
When the keyframes at either end of the source curve don't lie on exact frame boundaries,
this casued problems with the Cycles F-Modifier, as part of the cycle would get chopped
off.

This was caused by float -> integer truncation that was occurring, since one variable
was of the wrong type. The problem here wasn't discovered until now (thanks to gcc's
invalid-type warnings on printf's) as in standard usage, we can safely assume that all
keyframes are strictly on frame boundaries.
2014-03-08 17:57:31 +13:00
9e881d0d5b Drivers UI: Add explicit warnings about use of bpy.data and bpy.context in expressions
In order to combat the problem of users frequently trying to use inlined
bpy.data/bpy.context paths for data access in their driver expressions
and then finding/complaining that these don't update correctly, the UI
now flags these as the error conditions that they are (with suggestions
on how to fix this).

Also tweaked the "Add Variable" button to have more descriptive text about
what exactly variables are and why to use these, along with some other
visual tweaks (icons!).
2014-03-08 12:32:56 +13:00
36279afbd3 Cycles: Compile fix and some cleanup for the Image interpolation commit. 2014-03-08 00:23:45 +01:00
dd2dca2f7e Add support for multiple interpolation modes on cycles image textures
All textures are sampled bi-linear currently with the exception of OSL there texture sampling is fixed and set to smart bi-cubic.

This patch adds user control to this setting.

Added:
- bits to DNA / RNA in the form of an enum for supporting multiple interpolations types
- changes to the image texture node drawing code ( add enum)
- to ImageManager (this needs to know to allocate second texture when interpolation type is different)
- to node compiler (pass on interpolation type)
- to device tex_alloc this also needs to get the concept of multiple interpolation types
- implementation for doing non interpolated lookup for cuda and cpu
- implementation where we pass this along to osl ( this makes OSL also do linear untill I add smartcubic to the interface / DNA/ RNA)

Reviewers: brecht, dingto

Reviewed By: brecht

CC: dingto, venomgfx

Differential Revision: https://developer.blender.org/D317
2014-03-07 23:16:33 +01:00
ef51b69009 Fix for displace node regression (reported on IRC by Sebastian Koenig):
Was adding a (0.5, 0.5) offset, even for zero displacement.
2014-03-07 18:32:20 +01:00
f03df4f024 Fix crash when changing and using between layer and other brushes in
dyntopo

Layer brush would not invalidate the layer_disp arrays in dyntopo mode,
checking only for the existence of the array. This means that if a tool
resized the node due to topology changes, the layer brush code could
index (and write!) out of bounds in the array. Solution is to invalidate
the layer data prior to each stroke in dyntopo.
2014-03-07 16:58:56 +02:00
20f7a34abe Fix hard crash when using persistent base on layer brush on multires and
dyntopo.
2014-03-07 15:58:20 +02:00
84bed52ac3 Some initial tooltips for FModifiers
These are quite rough and could use some more attention to read better
2014-03-08 02:16:03 +13:00
bea5ad517c Added tooltips for various F-Curve RNA defines 2014-03-08 02:16:02 +13:00
3e26a7a594 Fix T38774: Changing extrapolation type via RNA doesn't update FCurve
- Added update callback to perform on-update validation when changing the
  extrapolation mode on F-Curves
- There was a patch in the tracker for adding an "update()" method to F-Curves
  which does a similar thing when manually called by scripts. Since we've added
  a function for this in RNA anyways, we might as well add this too while we're
  at it. (NOTE: upon closer inspection, the original patch by Tom Edwards had a
  number of issues, so I ended up reimplementing here)
2014-03-08 02:16:01 +13:00
6e7ce9770f Fix T38774: Added missing notifier flags for updating F-Curve after changing extrapolation from RNA 2014-03-08 02:16:00 +13:00
5e18eea02c Code cleanup - Extra comments + Reshuffling a few methods 2014-03-08 02:16:00 +13:00
f16a6e3016 Comment fixes 2014-03-08 02:15:59 +13:00
e097c987a8 Maintenance: Start of 2.71 release cycle, BCon1, Alpha. 2014-03-07 13:43:59 +01:00
43b5f0af2d tweaks to buildinfo
We wouldn't really have release branches, building will happen
from annotated tags.

Made it so building tag revision equals to a master branch.
2014-03-07 18:27:16 +06:00
c05896eb35 Fix for own commit: particle rng arrays should be declared extern in the
header.
2014-03-07 13:18:15 +01:00
08444518e6 Removing ParticleSystem->frand arrays to avoid memory corruption issues
in threaded depgraph updates and effector list construction.

Gathering effectors during depgraph updates will call the
psys_check_enabled function. This in turn contained a DNA alloc call
for the psys->frand RNG arrays, which is really bad because data must be
immutable during these effector constructions.

To avoid such allocs the frand array is now global for all particle
systems. To avoid correlation of pseudo-random numbers the psys->seed
value is complemented with random offset and multiplier for the actual
float array. This is not ideal, but work sufficiently well (given that
random numbers were already really limited and show repetition quite
easily for particle counts > PSYS_FRAND_COUNT).
2014-03-07 11:20:45 +01:00
98abc80dcf Correction to previous commit 2014-03-07 21:17:26 +11:00
7a9838b5d3 Fix action-editor crash transforming gpencil and masks
There were 3 bugs with both data types
- using freed memory while sorting.
- sorting failed in some situations.
- scaling allowed multiple items to be on the same frame.

Replace this with a simple sort + de-duplicate, taking selection into account.
2014-03-07 21:09:51 +11:00
b839fb9bb7 Fix T38985: Setting endpoint_u property while creating spline in Python gives strange behavior 2014-03-07 14:05:38 +06:00
c31c8fa14e Fix T39015: NLA Clip Auto Blend In/Out Check Box Not Working
Fix for regression accidentally introduced in 5f18d863a9 (affecting current 2.70 rc-1)
which means that this setting wasn't working anymore at all.
2014-03-07 19:11:53 +13:00
6ddd54f5a5 Fix T38990: Crash in mask shape re-key 2014-03-07 14:37:14 +11:00
03af4cbf91 Code cleanup: style 2014-03-07 13:28:39 +11:00
276ef3b3b5 Editmesh: Toggle between all edge-loop boundaries when selecting
Now Alt+RMB,RMB will select all connected boundaries.

There are times when you just want to select an entire boundary loop
ignoring face topology, previously there was no way to do this.
2014-03-07 10:39:31 +11:00
a7a7a032a6 Mesh: loopselect return cancelled when no selection made
also un-indent main function body.
2014-03-07 10:39:30 +11:00
6aff80a9d1 BMesh: simple edge boundary walker 2014-03-07 10:39:30 +11:00
571f184d35 Fix T39000: Align Objects Axis button is not redraw.
We have to apply button *before* checking others in the ROW, else changes are not propagated to them yet.
2014-03-06 22:03:11 +01:00
8a38d840e9 Cycles: Use Displacement type in OSL ShadingSystem.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D386
2014-03-06 21:03:22 +01:00
1d01675833 Cuda use streams and async to avoid busywaiting
This switches api usage for cuda towards using more of the Async calls.

Updating only once every second is sufficiently cheap that I don't think it is worth doing it less often.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D262
2014-03-06 20:51:46 +01:00
03afa6f9e7 Experimental dyntopo feature:
Dyntopo detail in object space. This allows to set the detail in
percentage of blender units and sculpt in this detail constantly,
regardless of the distance to the mesh.

This commit just enables the functionality, which is really trivial.
There will be some more commits like detail flood fill and
detail sampling in the future.
2014-03-06 20:15:44 +02:00
2a167dafc2 Forgo one rect union function, partial rect is inferred from nodes that
are tagged for update anyway. The important part of the fix was updating
the previous rectangle in the draw function.
2014-03-06 19:54:44 +02:00
43486bbdb9 Final fix (I hope!) for partial redraw.
The problem here is that the redraw rectangle can be calculated many
times before actual redraw (for instance due to repetitive calls to the
paint step function for space strokes). Those redraw rectangles need to
be accumulated and finally flushed when the draw call is done.

Also, it is this accumulated rectangle that must account for the
previously drawn rectangle to avoid artifacts due to drawing.

Now all looks like it works correctly :)
2014-03-06 19:27:05 +02:00
19e74f1d4f Fix T37867: scroll bar in text editor shows the wrong mouse cursor.
Patch by chipgw.
2014-03-06 18:23:21 +01:00
f04fd50073 Fix X11 mouse cursor flickering briefly to the standard cursor when changing it.
Not very visible now but it matters for the next commit.
2014-03-06 18:23:21 +01:00
d916cedb4f Better handling for previous fix: Make sure previous redraw rect stays
after the stroke so that it can be unioned with current rect correctly
during the draw update. For some reason dyntopo clipping misbehaved
before that.
2014-03-06 18:19:02 +02:00
c1be7e12ee Fix T37510 Knife missed cuts on small faces.
For very thin faces, knife sometimes missed cutting a few.
Problem was that a test for edges being totally inside a face
was being applied in inappropriate circumstances. An assumed
invariant about the knife hit structure is not true when
actually in the middle of making cuts.
Also make a 'big epsilon' a little smaller, though don't think
that was the problem in this bug.
2014-03-06 10:55:12 -05:00
d4ad050632 Fix error in previous commit. Included dubious fix for smooth brush by mistake 2014-03-06 16:39:30 +02:00
175a6b2fce Solve partial redraw issues in sculpting.
* Do union with previous partial redraw before overwriting with self and
store unmodified new rect to avoid rect getting bigger.
* Make rect one pixel wider instead of smaller so edges do not get left
outside. Overall this looks quite better.
2014-03-06 16:32:02 +02:00
3d2b530315 Hiding plane tracks was never implemented 2014-03-06 20:07:40 +06:00
a28dce6cc8 Fix T38955: Misleading tooltip for Clean Tool in Weight Tools Toolshelf. 2014-03-06 14:30:44 +01:00
cfefc5d0d4 Fix T38987 Dope sheet is inoperable with "view slected" when nothing is selected.
Code was unconditionnaly setting view's xmin and xmax, even when it was aborting afterward.
2014-03-06 14:17:26 +01:00
4ce7d5cb79 Fixes for proxies color space
Basically proxy colorspace didn't work well enough.

It is still a bit weird and mainly:

- Proxies for image sequences are built in the image color space.

- Proxies for movies are built in the movie color space.

This could be unified but would need some work in proxy build
to make it not just pipe frames from one FFmpeg context to
another but also apply OCIO on it.
2014-03-06 17:32:45 +06:00
68ef6797b2 OSX: adapt codesigning_rules_<binary>r.plist’s to 2.70 2014-03-06 10:16:13 +01:00
9630fa7c7e Fix T38973: GLSL error, when using Cycles Light Path node. 2014-03-06 09:06:20 +01:00
19f7f9afab Update submdules hashes
- Addons and locales now points to v2.70-rc tag
- Also updated hashes for addons_contrib and scons
  to make them up-to-date while i'm on updating this
  hashes.
2014-03-06 00:37:30 +06:00
f56a74566a Bump version to Blender2.70rc and new splash
Splash concept art & paint-over: David Revoy. 3D artwork by Mathieu Auvray.
2014-03-06 04:40:49 +11:00
deb6f733a6 Move do-versions functions for 2.70 2014-03-06 04:40:49 +11:00
d5aa12742c Don't show branch name on the splash if it's a release branch 2014-03-05 23:11:06 +06:00
8e7ec3652e Fix T38969: RenderResult in RenderPart can be NULL if multithreaded
renders are cancelled early.
2014-03-05 17:44:25 +01:00
a8dc5b274b Alternative fix for T38753, use existing __file__ in namespace 2014-03-06 03:31:00 +11:00
4f1a6eb96f Fix T38970: Invert weights remove weights option not working
Patch D382 from Henrik Aarnio
2014-03-06 03:07:31 +11:00
dd13bbca15 Previous linestyle icon was old patch, commit right one this time 2014-03-06 02:40:23 +11:00
3aedb3aed7 Fix for invalid custom data checks in armature and lattice functions.
Testing for custom data availability with getVertData and index 0 fails
on assert for empty meshes (the index must be in valid range). Better
use getVertDataArray which has no requirement for specific index.
2014-03-05 15:13:50 +01:00
df3116b326 Fix for un-subdivide creating duplicate faces 2014-03-06 01:00:18 +11:00
26b1406f6e Freestyle: Fix for incorrect comparisons of Nature values with integer and boolean values.
The problem is that comparisons involving the constants Nature.POINT (for vertices) and
Nature.NO_FEATURE (for edges) were evaluated in a wrong way.  It is recalled that the
Nature class is a subclass of Python's built-in int type, and that these two constants are zero
when evaluated as numbers.  The issue was caused by the implementation of the constants
in an incompatible way for comparison with Python int (and boolean) values.  Specifically,
the zero of Python int is represented by an empty array of digits, whereas the zero-valued
Nature constants were represented by an array of size 1.  Python int comparison operators
first check the lengths of the arrays of two operands, and then start comparing the digits
only when the array length is the same.  For this reason, the two Nature constants were
not properly compared with int values (and thus with boolean values).  It is noted that the
zero-valued Nature constants may result from bitwise operations on other Nature constants
(e.g., Nature.SILHOUETTE & Nature.BORDER), so this issue must have affected many
existing style modules.

The problem was reported by Folkert de Vries (flokkievids) through personal communications.
Thanks a lot!
2014-03-05 21:56:38 +09:00
f5d2b46b37 Code cleanup: remove long unused gamma correction tables 2014-03-05 22:41:44 +11:00
e49e78e414 Fix for negative gamma correction rounding to int 2014-03-05 22:41:44 +11:00
c169413a0f Fix for potential memory leak in Bullet API: freeing dynamic arrays
should use the delete[] operator instead of the plain pointer delete.
2014-03-05 10:01:46 +01:00
a659d73b1d Added back code which was commented out for debug reasons
Also added a patchset for Carve's memory leak fix.
2014-03-05 14:52:00 +06:00
6ddb1faca9 Fix T38962: Boolean modifier crashes when only right operand has UV layer 2014-03-05 14:29:02 +06:00
905dda8527 Enable requests for buildbot and release builder 2014-03-05 14:00:58 +06:00
4acff9d6f1 OSX/scons: according to last commit, , use the version variable 2014-03-04 21:08:49 +01:00
40a276368d Edit to last commit, use the version veriable 2014-03-05 06:45:29 +11:00
5d74cac463 Build system: option to copy 'requests' from scons. 2014-03-05 06:43:47 +11:00
ac7fba322d OSX/cmake: copy release/site-packages for OSX ( static py for now ) 2014-03-04 20:31:20 +01:00
7cb8b6f538 Build system: add cmake option to install requests 2014-03-05 05:40:47 +11:00
9ecf73f703 Follow up to the offset scale fix for texture painting: texture mask had
the same issue.
2014-03-04 20:36:03 +02:00
976fd68082 OSX/scons: copy release/site-packages for OSX ( static py for now ) 2014-03-04 18:41:19 +01:00
add6384213 Build system: use lstrip with scons 2014-03-05 04:19:55 +11:00
2c4c4a56b8 Build system copy release/site-packages for windows 2014-03-05 04:13:35 +11:00
f53014d642 Fix simplify brush not supporting autosmooth. There is no reason why
this should be so and it's useful to quickly decimate and smooth at the
same time.
2014-03-04 18:57:45 +02:00
e0857ad152 Fix volume scatter render issue introduced by recent bugfix. 2014-03-04 17:19:58 +01:00
1754c0de33 Fix T38945, empty "System Bookmarks" and "Recent" panel were drawn in the File Browser, although these were disabled in User Preferences. 2014-03-04 16:47:07 +01:00
ef40e889ca Fix compilation error windows 2014-03-04 20:37:19 +06:00
37ef7f3537 Fix T38936 Bevel strange flickering on big meshes.
Last change to bevel had a check for what was supposed
to be an "on edge" new vertex being off the edge.
The test tolerance was too small. This fixes that.
2014-03-04 09:31:20 -05:00
34c7fd1a11 Fix T38918: Boolean modifier crashes when using specific topology
There were loads of issues in the code still which are mow likely fixed:

- Hole resolver hook had memory leak -- it didn't free face with holes
  when triangulating it.

- Original edge mapping didn't work correct. old code related on the fact
  that loop order is not changing when constructing the MeshSet class, but
  in fact it does change.

  Currently used edge map for this because it was easiest way to do it now,
  but after the release we're to change it. Main reason is that face mapping
  is not correct as well (and it was never correct actually). So we'll need
  to construct Mesh structures by our own to be sure we're using correct
  original index mapping.

- Carve might produce faces with ears, which is forbidden in Blender.
  it wasn't an issue in old integration because triangulation will remove
  the ears. So for now simply added ears removing back as a hook.

  But actual reason of the ears is to be investigated really.

  This hook will only work for NGons, quads are assumed not be able to
  have ears. So this additional hook shouldn't slow down things much.

- Carve's hole resolver produces duplicated faces in some cases. Still not
  sure what is the reason of this. Code here is not so much straightforward,
  this is to be investigated later.

  For now solved the issue as own hole resolver which checks for duplicated
  faces after the hole resolving.

  The additional checks here will only run if the mesh actually have hole
  and wouldn't introduce slowdown for faces which doesn't have holes.

- Made it so if edge user triangulation gets a split (for example, in cases
  when this edge intersects with the second operand) it wouldn't be dissolved.

  This prevents cases of crappy topology after dissolving in several cases.

- Edge dissolver didn't check for whether edge is a non-manifold. We couldn't
  really dissolve open manifold edges.

  The bad thing about this is that mesh triangulation might produce non-manifold
  edges and they wouldn't be dissolved. Not worst case in the world, but would
  be nice to have it solved somehow.

- Exporting mesh form Carve to Blender might have produced duplicated edges
  in cases when several non-manifold faces shared the edge. This is also fixed
  now.

- Mesh triangulation might have produced duplicated faces, which is really bad.
  Fixed by keeping a track on which faces we've created and skipping adding new
  triangle if we already have one.

This all might introduce some slowdown, but we're too close to the release now,
so would rather have it slower but robust. After the release we might look into
ways to speed things up.
2014-03-04 20:18:16 +06:00
58bd0e53f1 Fix T38944, Fonts too small in Movie Clip Editor on Retina display.
Thanks to Sergey for suggesting this fix.
2014-03-04 14:27:56 +01:00
c436c78de1 Build system support for numpy on ms-windows 2014-03-05 00:22:51 +11:00
6ebbcbd5df Fix F62828. UV stitch code did not handle non manifold edges very well.
This made loops in linked lists of uvedges from duplicate members
causing a hang. Now check all previous links before adding a new one. It
is not much slower in practice because non-manifolds are not that
frequent.
2014-03-04 14:37:06 +02:00
a31571481b Fix for regression noted in T38942: Blender Internal rendering can lead
to wrong obmats of nested dupli objects.

Restoring obmats after BI nested dupli object rendering has to happen
in reverse order, so higher level omats are applied last.
2014-03-04 11:22:56 +01:00
dad9600004 Fix T38941: Laplacian Deform crashes on OSX
When vgroup was invalid somehow (e.g. empty, as in this case) and bind could not happen, code was dereferencing a NULL pointer...
2014-03-04 09:09:38 +01:00
13290d5a16 Scons: remove lcms reference 2014-03-04 12:42:17 +11:00
46682d8812 Icon for LineStyle
patch T37008 from Michael P.
2014-03-04 04:22:32 +11:00
53b03eff96 Fix T36496: unwanted behavior with NLA strip blend mode Replace.
If you have two overlapping NLA strips it automatically blends between them.
However it was also blending between the first strip and the rest pose
(e.g. 0,0,0 for locations and 1,1,1 for scale).

This is ok if the blend mode is Add or Multiply since then you are adding onto
the rest pose, but for Replace you want to be able to mix between two poses
and not take the rest pose into account at all.

What this does is that to not do any blending for the first strip if it has
blend mode Replace. If someone wants the old behavior (from bugfix commit
27d792fa9c) they can still make an action with the rest pose and use that
as the first strip.
2014-03-03 16:34:10 +01:00
1ae3108984 Fix for bmesh triangulate creating duplicate edges 2014-03-04 02:07:23 +11:00
6f80980847 Debug function to check valid bmesh now detects duplicate edges 2014-03-04 01:53:19 +11:00
ef2815eb5a UI: "Option" panel in 'Particle Edit' mode was appearing in Tools and GP tab, now only show in Tools.
Patch by Kévin Dietrich.

Reviewed by: dingto
Differential Revision: https://developer.blender.org/D378
2014-03-03 10:37:27 +01:00
0e47e29823 UI: Splash text for 'a' releases and the upcoming 'Release Candidate'
This avoids re-uploading splashes for minor version changes.

Enabling now so any glitches can be found before we do the real rc.
2014-03-03 17:29:03 +11:00
11112a8953 Fixes for view3d rotate axis snapping
- turntable would lockup when snapping, not allowing further rotation.
- userpref rotate-about-selection was ignored (causing strange panning)
2014-03-03 15:08:28 +11:00
3c3c2cd53c Fix issue with texture painting: Tex slot scale was being applied twice. 2014-03-02 19:40:39 +02:00
a89ef76136 Fix for own mistake: arc diff swallowed a commit somehow, breaking
compilation.
2014-03-02 17:04:24 +01:00
503a9733d1 Switch Dyntopo enable back to Ctrl-D.
Grease pencil straight line can still be enabled by first pressing D
then Ctrl and looks like there is no final consensus on key shortcut.
Better leave this as before and solve after release.
2014-03-02 17:22:14 +02:00
fd553c5b7b Fix T37334: Better "internal links" function for muting and node disconnect.
Implements a more flexible internal connect function for standard nodes
(compositor, shader, texture). Allow feasible datatype connections by
priority.

The priorities for common datatypes in compositor, shader and texture
nodes are encoded in a simple function. Certain impossible connections
(e.g. color -> cycles shader) are excluded by giving them -1 priority.

Priority overrides link status: If a higher priority input can be found,
this will be used regardless of link status. Link status only comes into
play for inputs with same priority.

Reviewers: brecht

CC: sebastian_k

Differential Revision: https://developer.blender.org/D356
2014-03-02 16:04:25 +01:00
6137ae29c1 Fix for problem with fly speed, caused by other speed tweaks. 2014-03-03 01:09:40 +11:00
49e21f6978 Found another place where nproc can be used
/proc/cpuinfo is a Linux-specific thing. Using GNU [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | nproc ]] should be more portable.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D377
2014-03-02 10:29:40 +01:00
6045de2bf5 Cycles: remove ccl_align macro for GPU as unused and unsupported in OpenCL 2014-03-02 12:44:52 +04:00
e60fb0fd29 Fix for collapse ignoring pinned panels 2014-03-02 12:49:30 +11:00
f01d19431d Fix T38873: Crashing on undo of ocean modifier.
Issue of this bug is that most part of fftw is not thread safe, only compute-intensive fftw_execute & co are.

Since smoke was affected by this issue as well, a global fftw mutex was added to BLI_threads.
Audaspace also uses fftw in one of its readers (AUD_BandPassReader.cpp),
but this is not an issue currently since this code is disabled in CMake/scons files.

There was another threading issue with smoke, we need to copy dm used by emit_from_derivedmesh(),
as it is modified by this func.

Reviewers: sergey, brecht

Reviewed By: brecht

CC: brecht

Differential Revision: https://developer.blender.org/D374
2014-03-01 21:05:50 +01:00
3eabe064ab Fix T38900: cycles OSL crash running getmessage("trace", "geom:name", name) 2014-03-01 14:58:05 +01:00
6b693ab7bf NDOF: add navigation modes to user preferences
also comment debug prints for raytracing
2014-03-01 21:47:46 +11:00
176f1aad3d Fix for using non camera objects as a camera having zero area view-frame 2014-03-01 21:41:07 +11:00
9737717234 Fix for some unlikely memory leaks, remove redundant checks 2014-03-01 20:14:20 +11:00
9742a6f6cb Resolve T38899: changes to Ctrl+Selectmouse conflict with LMB select 2014-03-01 19:26:55 +11:00
519ee151a3 Fix for memory leak in particle brush 2014-03-01 16:25:37 +11:00
d3ec3fd968 Fix Snap to Symmetry failing to select the vertex from the right side 2014-03-01 15:40:20 +11:00
3b5ea6b972 Fix for own error with updating view2d for NDOF 2014-03-01 15:28:51 +11:00
13ea967cce Code cleanup: correct abs use and quiet warnings 2014-03-01 14:26:18 +11:00
315d85faa1 Fix for baked FCurve subframe interpolation (bad abs use) 2014-03-01 14:12:56 +11:00
ca4dde48f3 Fix for sequencer invalid rounding, double wipe at 0 angle 2014-03-01 13:39:36 +11:00
6cc5bdc99e FCurve Transform: scaling no longer changes hansle types
This matches 3d view and means you can change the amplitude of a curve
while keeping auto-clamped handles.
2014-03-01 13:06:07 +11:00
f29dadc5ea Code cleanup: comment unused code in calchandleNurb_intern
Also remove outdated comments.
2014-03-01 12:58:52 +11:00
830bf19045 Readme: Small adjustment for IRC link. 2014-03-01 01:25:46 +01:00
76a7c2173b Cleanup: Fix some typos in the code. 2014-03-01 01:21:46 +01:00
1582dd5e4d Partial fix for T38871, Bevel could create a far-out spike.
There needed to be a check that when a newly created point is
supposed to be on an edge, that it stays within the bounds
of either end of the edge.
This fixes the hole-in-cube example in the bug, but not
the boolean modifier one, which still needs more work.
2014-02-28 13:56:17 -05:00
da5e6b98c9 Fix T38887: error in (still unused) freestyle math function implementation. 2014-02-28 18:15:24 +01:00
7f24b34dcc Fix T38885: missing image editor paint brush updates after recent UI changes. 2014-02-28 18:12:05 +01:00
32c18276ef Fix T38881: cloth preset rubber not working with "translated data names" i18n option
Actually, was broken for any custom modifier name, since it was explicitly using 'Cloth' one. Changed to mimic other cloth pressets (wonder why this one was different!).
2014-02-28 17:30:30 +01:00
a32588b174 Fix for transform setting T_CAMERA
This was only set when the camera was active, however non active cameras
can be transformed too.
2014-03-01 01:28:15 +11:00
6e970e1a33 Update patch for mesh_simplifier 2014-02-28 19:09:22 +06:00
e4996b49f5 Proper solution for crash of GP when marker is not exist on current frame 2014-02-28 19:05:38 +06:00
45fc0514fb Fix for crash copying from non RNA color buttons 2014-02-28 23:45:31 +11:00
a04c132a7e NDOF: minor tweaks based on feedback.
- invert Y axis when swap YZ is enabled.
- allow rotating when not in ortho mode.
2014-02-28 22:07:53 +11:00
f4bf97729a Crazyspace: calculate normal around a (0,0,0)
instead of creating a new triangle in the models space and using that.
2014-02-28 21:26:19 +11:00
771b0e354c Fix Crazyspace with proportional editing 2014-02-28 21:26:19 +11:00
433b20b7ea PyAPI: correct warning with dynamic enums 2014-02-28 21:26:19 +11:00
f23f07ced0 Fix T38407: Bone roll calculation flips local axes at wrong rotation angle
Just remove that rotation special case for now, at least fixes the glitch along Z axis when rotating around Y axis in report.

Anyway, there is no reason for such special handling, we do not have real rotation in editbone...
2014-02-28 10:47:28 +01:00
2e0a33745d Revert editbone roll correction changes.
This reverts commit f72acc38d 65c5be967 eff6b385e 3fe487217
2014-02-28 10:35:11 +01:00
5ac1b38b4b Support planar sample formats in audio mixdown
Now libav-10 should work for output of ac3 container.
2014-02-28 15:16:30 +06:00
1e05956a0b Fix T38872: Crazyspace could use stale derivedMesh data. 2014-02-28 20:12:45 +11:00
ea269c21ea Code cleanup: move edit-derivedmesh free to BKE_editmesh_free_derivedmesh 2014-02-28 20:12:45 +11:00
d2a5ea04ed Fix T38467: Animation playback is not synchronized when Screen Layout changes
When both old and new screens share the same scene, "transfer" playback to new screen, else stop playback.
2014-02-28 10:04:57 +01:00
96a51e99fb Fix T38877: F-Curve modal input is incorrect when set to Imperial units.
Using length units outside of 3dview does not make sense...
2014-02-28 09:52:21 +01:00
e82b5f61fe Attempt to fix mixdown when building without sndfile
This case was handled specially in writeffmpeg.c and seems it makes
audio export happy in all cases now.

TODO: libav-10 doesn't work with AC3 codec yet because this bloody
library ONLY supports FLTP format and FFmpeg ONLY supports FLT.

This is not fun guy, it really isn't! Where's your conscience??

CC: nexyon
2014-02-28 14:51:03 +06:00
8fa15d1050 Correction to previous commit: it was unable to change format for some containers 2014-02-28 14:08:10 +06:00
0bfd75aa14 Fix T38883: Toolbar origin buttons missing for armature
Also allow mirror for any object type
2014-02-28 17:39:40 +11:00
32d5cc247f Fix T38768: New "audio" button in 2.70 release does not 'mixdown' audio
Issue was caused by the way how audio output works from audaspace.
Now made it much closer to what's happening in ffmpeg.c and writeffmpeg.c.

Also fixed issues with incompatible combinations of codecs and formats
in mixdown settings.
2014-02-28 12:26:16 +06:00
ba08031783 Fix T38817: FCurve autoclamp error
Animating large values with auto handles didn't work well,
(large variations on the Y axis would shrink handles).
2014-02-28 12:11:09 +11:00
3a99fa5d7f Revert own changes to CLAMP and CLAMPIS, caused T38875 2014-02-28 11:47:02 +11:00
d3b9457991 Code cleanup: style/warnings 2014-02-28 11:04:15 +11:00
11f3fc0efd Keymap: update 3dsmax 2014-02-28 10:39:54 +11:00
d7a2d2b693 Fix T38876: hide area split widget in lower left of widget on OS X.
This is already used by the operating system for window resizing, you must use
the widget in the top right of the area to split.
2014-02-27 23:41:01 +01:00
de6b64bca6 Fix use of uninitialized variable in some cases with scatter + emission volume. 2014-02-27 23:41:00 +01:00
d81f492d08 Blender Internal: Bring back previous behavior that rendered viewport uses render visibility rather than viewport visibility.
Commit 162d6c73e3 changed the behavior of rendered viewport to use
viewport visibility, but that can cause some problems. For example,
mesh deform cage is drawn as a solid/textured mesh (not a wireframe
mesh) and its unnecessary surfaces and shadows mess up the preview.
2014-02-28 05:47:55 +09:00
18fde352bf Fix compile error when compiling without python. 2014-02-27 21:16:01 +01:00
4d1159627c Fix cycles wrong volume scatter value in light path node.
Thanks to Thomas for spotting this.

Differential Revision: https://developer.blender.org/D370
2014-02-27 21:15:23 +01:00
74ae900c67 Cycles: Fix mistake in PathRayFlag, one value was used twice. 2014-02-27 20:41:36 +01:00
44d79c5ff8 patch cmake_linux_install.sh to do multithreaded build
The script ##cmake_linux_install.sh## is currently invoking ##make## in single-threaded mode; this patch changes it to take advantage of all available CPU threads.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D358
2014-02-27 16:00:26 +01:00
3111f08ad9 Fix T38847: Reject reuse of child bones as root bones. That doesn't make sense anyways. 2014-02-27 15:23:32 +01:00
5031ca05aa Cycles: compile fix after rB7808360c5f (own mistake) 2014-02-27 17:29:35 +04:00
7808360c5f Cycles: fix crash in SSE hair and half-floats on x86+vc2008
MSVC 2008 ignores alignement attribute when assigning from unaligned
float4 vector, returned from other function. Now Cycles uses unaligned
loads instead of casts for win32 in x86 mode.
2014-02-27 15:01:20 +04:00
8badec14f9 Implement separate BA step for tracks which have constant zero weight
This is needed to minimize their reprojection error over the footage.
Without this extra step positions of such tracks were calculated by
algebraic intersection code only, which doesn't give best precision.
2014-02-27 16:14:35 +06:00
d971c5785e Fix root of the issue of bad_cast bug in localization
No need to call l10n stuff when it's disabled in the preferences.

Reviewed by @mont29, thanks!
2014-02-27 15:07:25 +06:00
317f29d753 Resubmission: Avoid UUOC in install_deps.sh
This is a resubmission of the original patch from D255. Sorry, I didn’t understand that subsequent patches added to a diff are considered to //override// previous ones, rather than add to them.

Basically the comment for commit rB554eca1c288e has been applied to the wrong patch.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D359
2014-02-27 10:02:13 +01:00
17d2e6422c Hopefully definitively fix the "enter the advanced numinput mode" issue.
Hack around event code and check against ascii code, this way keyboards with "complex" access to '=' and '*' are still able to toggle numinput modes.
2014-02-27 09:49:09 +01:00
d09f2ed322 Fix T38864: Crash with curves and follow path 2014-02-27 19:33:23 +11:00
00acb98436 Fix T38844: Crash if weight track = 0
Avoid zero-sized problem when doing euclidean intersection

Zero-sized problem might occur when intersecting track with
constant zero weight. For such tracks we'll just use result
of algebraic intersection.

TODO: We probably need to have a separate BA step to adjust
positions of tracks with constant zero weight.
2014-02-27 14:31:09 +06:00
64eea27533 Fix T38602: Aligned layout breaks if panel too wide 2014-02-27 19:01:14 +11:00
b9f14ea56b Fix T36654.
There is a key conflict between grease pencil shortcuts and sculpt
shortcuts (D and ctrl D were taken by draw brush and dyntopo toggle,
respectively). Based on feedback, change dyntopo toggle to ctrl-T and
draw brush to X.

Also add missing property update for dyntopo detail size.
2014-02-27 09:39:39 +02:00
118d86aa73 UI: avoid for divide by zero for icon buttons (no need to clip text) 2014-02-27 18:30:06 +11:00
4622fc418e Fix T38863: FCurve auto-clamp allows handle to move past X bounds
F-Curves with large Y axis had strange behavior where the handles could
stretch out on the X axis rather then clamping as they do at smaller sizes.
2014-02-27 17:15:49 +11:00
55fe91abf3 Code cleanup: curves calculation was using offsets confusingly
also avoid calculating handle length when align isn't used.
2014-02-27 17:03:35 +11:00
5e7f995b08 Fix: 'F-Curve Editor' popup text was truncated. 2014-02-27 16:18:42 +11:00
6f6be7c936 Fix T38859: Laplacian Deform Crash 2014-02-27 15:03:03 +11:00
be8f628b89 Fix T38851: Apply Transform doesn't work when called from search popup 2014-02-27 13:39:35 +11:00
a815e04f72 Fix T38834: Knife constraint is offset after moving the view 2014-02-27 13:28:25 +11:00
b5d6f14290 Fix T38858: Crazy spaces was unpredictable with co-linear edges 2014-02-27 12:28:40 +11:00
26133a96ae Fix for VIEW3D_OT_camera_to_view with quadview, disable in camera view 2014-02-27 11:33:27 +11:00
bb1164a798 Fix for view3d name getting concatenated 2014-02-27 11:31:23 +11:00
f72acc38dd Transform: remove recently added ival2, use editbones temp data 2014-02-27 09:47:37 +11:00
8af2ed80a4 RNA: rename matrix_for_frame -> matrix_from_frame 2014-02-27 08:39:25 +11:00
c35ac8f7ac Fix T38678: Long strings on Search widget not getting shortened/no tooltip.
Note this commit only makes search menus wider and adds shortening to their strings.
Adding tooltips here is not trivial, would need much bigger changes...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D341
2014-02-26 21:53:56 +01:00
65c5be9676 Fix T38843: Bone parallel to world z axis flicking when scale in edit mode.
This commit hopefully fixes all glitches we had when bone was Z-aligned. Note that when you init a transform
with a Z-aligned bone and change it to be non-Z-aligned, you will still get some brutal roll change,
there is not much things we can do here afaik...
2014-02-26 21:36:24 +01:00
59a0828ac1 Fix T38856: mark seam in search menu clearing the seam in some cases.
It should not remember the operator property for the next time here.
2014-02-26 20:56:36 +01:00
0e492ac482 Fix T36652: .blend file with minimized window not loading correctly on Windows. 2014-02-26 20:50:55 +01:00
0de1df49e1 Fix T37756: file > open with file selector already open not restoring screen correctly. 2014-02-26 19:50:12 +01:00
c4eab10e5c Fix T38853: right click menu add driver should not be possible to redo.
This was already disabled for the keyframing operators, needs to be done for
drivers as well as this doesn't work.
2014-02-26 18:56:00 +01:00
0fa832bed2 Fix T38855: DIRECTORY_PATH vs. DIR_PATH inconsistency in python API docs. 2014-02-26 18:56:00 +01:00
ffa94cb713 Fix for bug reported by Pablo Vasquez (venomgfx) on IRC: Single layer
renders were broken.

This was caused by rB1a79abdad2443ff9f12e7efd95ee78a264a9d60a which
makes a copy of the render layer list for thread safety. The single
layer passed to this function is still in the original list though, so
to get the correct index it has to be looked up there. Otherwise no
active index is set and all layers are rendered every time.
2014-02-26 18:47:25 +01:00
e1e247a99b Fix T38710: volume render issue with transparent surfaces. 2014-02-26 18:47:50 +01:00
49e8cfd809 Further work to fix T38726: signal viewport to update when adding/removing render layers.
Reviewers: brecht

Differential Revision: https://developer.blender.org/D346
2014-02-26 18:41:06 +01:00
3ca606ffc3 Locale_wrapper: make the bad_cast catch more clear and fix the std::exception message 2014-02-26 17:33:44 +01:00
a856b123ff Fix T38726: missing rendered viewport update when removing render layer. 2014-02-26 17:29:50 +01:00
1dbd3ae629 Fix T38831: blender internal enabling shadow pass changes material node diffuse.
It would include/exclude shadow depending on the pass being disabled/enabled,
but that should have no influence on the combined render result. Now it always
includes shadow.
2014-02-26 16:55:50 +01:00
4cfca0adfe Nicer solution to T38846: Split off the render layer forcing from the
validity check for render operator.

This way scene DNA can stay read-only there, cleaner and we don't have
to pass an awkward bool pointer around.
2014-02-26 14:56:27 +01:00
ecbae4ab46 Fix T38846: Render layer checkbox is not refreshed.
The render operator invoke checks render layers, which can force the
render layer to be activated. This requires a notifier, which has to be
done in the operator itself (can't do this inside pipeline code).
2014-02-26 14:39:14 +01:00
ef2c05c77e Fix crash happening when drawing GP for a track which doesn't have visible marker 2014-02-26 19:42:59 +06:00
3b44ca08a9 Fix 3D tracks to mesh not aligning mesh properly
Also fixed wrong frame number used for reconstructed object
visualization in 3D viewport.
2014-02-26 19:40:04 +06:00
cf0120b189 Fix for own regression: remove doubles deselected faces 2014-02-26 23:42:47 +11:00
b5b1ce9d21 BMesh: add overwrite option to BM_mesh_elem_hflag_enable/disable_test 2014-02-26 23:42:47 +11:00
8a5221750e Ignore zero weighted markers in keyframe selection
It doesn't make sense to use zero-weighted tracks as a correspondences
in keyframe selection.

Such tracks are not guaranteed to be tracked accurately because their
purpose is to add reference points in 3D space without affecting the
solution.
2014-02-26 17:56:10 +06:00
4a61df9c95 Fix T38837: Ctrl+RMB can't select posemode
This used to work (unintentionally), now check for paint-select
modes as well as editmode for ctrl+rmb to force object selection.
2014-02-26 16:05:29 +11:00
081a3412a9 Paint API: add BKE_paint_select_elem_test: to check on paint selection 2014-02-26 16:00:54 +11:00
1dd7e759a0 Sculpt: allow to select objects when in sculpt mode
This was disabled with circle select (which makes sense), but all other
paint modes allow this and sculpt isnt using select mouse.
2014-02-26 15:41:42 +11:00
d2548f561c WM: hide screen management and ndof operators from seach popup 2014-02-26 13:48:41 +11:00
ece755ffe6 Fix for sequencer add operators showing up in spacebar search. 2014-02-26 13:30:25 +11:00
497e1de25b Fix for constraint poll function succeeding when no constraint exists 2014-02-26 13:30:25 +11:00
70924a7b2e Fix T38548: Edit externally always uses first frame only 2014-02-26 10:58:14 +11:00
593d856217 Fix T38836: change screencast timer limits so you can record with higher FPS.
Note that the screencast implementation is quite poor and that you may not even
get the requested FPS, the timing system here is not reliable.
2014-02-25 21:49:38 +01:00
8cfb5e91ea Further work for fix T38804: unnecessary empty space in the modifier UI. 2014-02-25 21:49:38 +01:00
eb4f2b4897 Fix missing brackets in cpuid bitfield check.
concern raised by lukas_t (rBef73d547cc7c663ad180721094c81b3c81482ac3)
2014-02-25 19:52:38 +01:00
0bef196894 Fix T38811: Cycles particle ids are inconsistent when using multiple particle systems.
Problem is that the particle systems in the cycles database are not
stored in a well-defined order. This means the particle_id for dupli
objects can not simply be assigned using a global running index during
sync.

Now the particle index is assigned locally for each particle system.
When transferring particle data to the device as a single texture, the
particle indices are offset based on the final order of particle systems
in the database.

Reviewers: brecht

Reviewed By: brecht

CC: Andreas80

Differential Revision: https://developer.blender.org/D352
2014-02-25 18:29:11 +01:00
ef73d547cc Fix T38815
For AVX support we need to check both OS support and CPU support.
2014-02-25 17:57:05 +01:00
03018353f6 Fix T38827: Input preferences can not find Left Mouse or Left Arrow 2014-02-26 00:39:20 +11:00
92653fe944 Keymap search: check 'key_modifier' as well as 'type' 2014-02-26 00:13:20 +11:00
21cb628399 Assert for invalid customdata allocs 2014-02-25 23:13:17 +11:00
ca2b4323a8 Fix T38003: Skin modifier crash with long edges 2014-02-25 23:03:26 +11:00
dbf653acb7 Disable eager-refinement step of region tracking
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.
2014-02-25 16:55:24 +06:00
9c755ef652 UI / 3D View: Fix Rigid Body panel, being closed per default. 2014-02-25 10:59:20 +01:00
f2309ba579 Fix T38824: curve which is constrained on a hidden layer causes cycles crash
Issue was caused by cycles setting scene frame which will update scene for
all the layers (not just visible ones) which confuses depsgraph making
objects which are needed as dependency are not really evaluated.

Made it so setting frame via scene.frame_set() which check whether update
need to be flushed to an invisible objects and do this if so.

Not ideal solution but seems to be safest at this point.
2014-02-25 15:52:56 +06:00
3ae641eb02 Fix T38773: Inconsistent conversion of colors and float values in
Blender Internal shader nodes.

All nodes now use the `nodestack_get_vec` function to convert whatever
input values are connected to the desired type, instead of using the
stack values directly regardless of what they contain.

Note that this might break old node setups that have been adapted to the
faulty behavior, but as discussed in the bug report the 2.70 version is
the right time to fix this.
2014-02-25 10:15:28 +01:00
bf547a1983 Fix T38806: Proxy file changes don't update until Blender's restart 2014-02-25 13:50:01 +06:00
44e53c82d2 Object disable negative object dimensions
these would become positive on update
2014-02-25 18:35:55 +11:00
d9637fb3be Fix T38745: Curve parent crash when rendering animation
Issue was caused by curve orco calculation for rendering being freed
curve path and not calculating it back.

This left depsgraph in a state that it believed all the object data
is up to date but in fact some parts of data was freed by convert
blender.

Now made it so path is not being freed by render thread. This is
rather a workaround actually because ideally render thread need
to use copy-on-write here or at least use local cache here. But
current logic should be closer to what was happening in previous
release.
2014-02-25 13:27:46 +06:00
bb62f9a582 Fix T38778: Properties from bpy.props could be edited as custom props 2014-02-25 17:01:46 +11:00
24e1ce25d1 Use string escaping when renaming custom properties 2014-02-25 16:49:14 +11:00
18f6bb04fa Fix for custom property editor when property id's contained quotes
Adds bpy.utils.escape_identifier()
2014-02-25 16:19:57 +11:00
6a43c2ac1a Fix text select offset /w zoomed UI & popups (colorpicker) 2014-02-25 14:18:04 +11:00
073a1f8f7c Revert "Fix T38819: Mark Seam misbehaves when accessed through spacebar search"
This reverts commit d47d030275.

This isn't a bug.
2014-02-25 14:06:37 +11:00
Dalai Felinto
d47d030275 Fix T38819: Mark Seam misbehaves when accessed through spacebar search 2014-02-24 22:48:46 -03:00
b6c439d0c4 UI: remove number specific button offset when selecting text 2014-02-25 12:42:17 +11:00
Dalai Felinto
b6bb6d1b2c Fix T38808: image opened with 'relative path', gets absolute path 2014-02-25 11:09:08 +11:00
d0ec83c1a2 Fix T38809: regression, text cursor offset in number buttons
Use the same offset for all edit-buttons now.
2014-02-25 10:31:04 +11:00
e643d2c211 Cycles Standalone: Tweak for d59f53f7b7, use "closure color" as type name, to 100% match the OSL data type. 2014-02-25 00:01:19 +01:00
247702986a CMake: add _WIN32_WINNT MSVC define to match scons 2014-02-25 09:56:55 +11:00
4903544cad On MSVC 2013 64 bit set the default to build a vista API targetted binary. 2014-02-24 23:14:12 +01:00
2d26d1dbbd Cycles: Make CUDA aware of COMPUTE_50 (sm_50, Maxwell).
If you have a Maxwell GPU and want to test, you have to use the CUDA Toolkit 6.0(RC) and enable sm_50 in scons/cmake.
2014-02-24 21:47:45 +01:00
b5c50c02fa Paint UI: Don't hide the custom icon path, just grey out.
This is what we do with boolean and sub-settings. We usually hide it when the options depend on a menu-enum.
2014-02-24 21:13:30 +01:00
97e9bb9488 Fix T38804: unnecessary empty space in the modifier UI. 2014-02-24 21:03:19 +01:00
a3202e434a Code cleanup: Re-use Grease Pencil panel for 3D view as well. 2014-02-24 20:53:37 +01:00
39cad75dcb Fix T38813: missing color management in texture nodes preview. 2014-02-24 20:18:51 +01:00
0f96d0552d Fix T38810: ctrl + click panel collapse not taking tabs into account. 2014-02-24 19:53:15 +01:00
97c66c9bf1 Fix T38812: color picker incorrectly cancelling operation when clicking next to it. 2014-02-24 19:53:15 +01:00
88f1c283a7 Tweak to T38766 fix: cycles now support setting viewport alpha for a material. 2014-02-24 19:53:14 +01:00
e2734eb1dd Fix misaligned alpha slider label in color picker. 2014-02-24 19:53:14 +01:00
188f8d0935 Fix T38801: Dupli objects with modifiers exhibit bad transform artifacts
in Blender Internal renderer.

The BI renderer applies modifiers //after// changing the obmat of the
respective object (for the first instance it encounters). Before
rB6940bf0 the original obmat (omat) was stored inside dupli object data,
which was removed in favor of local omat variables due to hackishness
and redundancy. Problem with BI is that all the obmats have to be
overridden in relation to each other to produce the correct modifier
results (here: offset object for the array modifier).

The patch restores the old (messy) behavior for BI by first overriding
**all** the obmats at once from duplis, then creating render instances,
then cleaning up.

A better solution would be to avoid these modifier hacks in BI
altogether and properly evaluate them in the original object space, but
that requires far greater changes to the old code base, and is out of
scope for bugfixing.
2014-02-24 19:00:44 +01:00
036d35dd24 Fix for MSVC 2008 compiler errors. 2014-02-25 01:16:52 +09:00
7ef1ed15f1 Fix T38766: blender material transparency setting not taken into account for viewport. 2014-02-24 15:44:22 +01:00
a3f4736a4d Fix T38766: cycles viewport incorrectly taking blender internal alpha into account. 2014-02-24 15:35:26 +01:00
b826032200 Fix T38779: cycles SSS and object scale render issue. 2014-02-24 15:26:38 +01:00
cefa733803 Followup for 90a86fe: libmv/ceres cmake/scons files are automatically generated
So don't forget to update generator scripts as well.
2014-02-24 20:13:33 +06:00
dde6642dde Fix T38784: smoothview using perspective transition with ortho camera 2014-02-25 01:04:18 +11:00
1130c53cdb Fix T38755: Crash when having cyclic dependency and curve deform
Issue was caused by undefined object update order and in some
cases NULL pointer will be de-referenced.

Added on-demand curve path calculation, just the same creepy call
of BKE_displist_make_curveTypes(). This violates DAG and might
end up in a difficult to troubleshoot race condition if there'll
be some issues with how dependencies are calculated in DAG, but
this is the easiest and safest way to solve the bug at this stage,
2014-02-24 19:15:52 +06:00
b5aef37c27 Fix T38798: Can get stuck in world nodes when switching from Cycles to
BI.

The shaderfrom setting in the node editor only makes sense for "new"
shading nodes (cycles), otherwise it should be ignored and default to
SNODE_SHADER_OBJECT.
2014-02-24 13:21:43 +01:00
8d023c1ad0 Fix T38794: ScaleFixedSizeOperation was not taking offset into account
when calculating depending-area-of-interest.
2014-02-24 13:09:01 +01:00
9643b2e5b5 Preserve non-flat faces in boolean modifier
This commit implements dissolving of edges which were used
to triangulate non-flat faces. This slows things down a bit
(around 5% on heave mesh with all faces triangulated).

We could improve speed of dissolve a bit here (so not a bell
to add an option for triangulation yet).

Also fixed wrong edge origindex mapping.
2014-02-24 18:10:33 +06:00
59472df8d6 Image: color grid - correct abs() use with ints 2014-02-24 22:26:47 +11:00
9e924c8ffe OSX/scons: cp needs the targetdir to be created ( ditto does it itself ),
changing the order of commands let us use cp again
2014-02-24 12:09:55 +01:00
d59f53f7b7 Support for generic OSL shader parameters in the Cycles standalone XML
reader.

To make a generic OSL shader connectable to other nodes, the parameters
must be declared via "input" and "output" child elements:

  <osl_shader name="tex" src="./osl/stripes.osl">
    <input name="Stripes" type="int" />
    <output name="ColorOut" type="color" />
  </osl_shader>

`name` must be the same as the OSL shader parameter name.
`type` must be one of float, int, color, vector, point, normal, closure,
       string (matching cycles socket types)

Beyond this the OSL script nodes then work just like all other nodes.

OSL parameter sockets can be connected to other cycles nodes:

  <connect from="checker color" to="tex Stripes" />
  <connect from="tex ColorOut" to="floor_closure color" />

They can set default values for the input sockets by attributes of the
main node element:

  <osl_shader name="tex" src="./osl/stripes.osl" Stripes="3" >
    <input name="Stripes" type="int" />
    <output name="ColorOut" type="color" />
  </osl_shader>

This system of specifying custom attributes should probably be changed,
since it can easily create name conflicts and arbitrarily long elements.
But that is a different issue to be solved for all nodes in general.
2014-02-24 11:35:32 +01:00
7078fb936a Fix T38800: Setting UV projector caused zero user objects
Don't change user count when setting modifier objects
2014-02-24 21:36:16 +11:00
04ecf4d0db OSX: add debug mesg to bl_locale_pgettext for later indeep investigation 2014-02-24 11:18:17 +01:00
e72775e34a Fix T38795: Mesh Analysis overhang faces show gray 2014-02-24 19:55:04 +11:00
e82d648760 Fix T38756: Regression with vertex slide responding to mouse events 2014-02-24 19:34:36 +11:00
103583c89b Fix T38786: Curve unable to make segment 2014-02-24 19:24:52 +11:00
5e11f7f610 Fix for recent changes with NDOF 2014-02-24 17:21:25 +11:00
021b07e87c NDOF: various fixes for view3d
- allow zooming when in ortho+user mode
- fix for using VIEW3D_OT_ndof_orbit_zoom when the camera is locked.
- fix for locked camera changing the dist value when used with ndof.
- de-duplicate ndof_pan_zoom and ndof_all operators
2014-02-24 15:17:47 +11:00
01645ccdc6 NDOF: Auto-Depth preference was used while orbiting 2014-02-24 12:56:37 +11:00
cb3909f721 NDOF: fix for use with locked offset
- when locked to cursor or object. fallback to orbit and allow zoom.
- correct speed calculation in perspective mode.
2014-02-24 12:56:17 +11:00
056d86ec83 OSX/scons: Fix language menu not showing up in prefs:
The languages file was not installed to locale due it has
no extension, using ditto now
2014-02-23 23:17:30 +01:00
411650f2fa Partial fix for T3817: BGE crashing when using LibNew.
The BGE needs to use BKE_main_new() isntead of calloc for
allocating a Main struct since the threaded depsgraph changes.
2014-02-23 12:44:33 -08:00
8be628cf7f Fix an uncaught exception on OSX, perhaps general with popups 2014-02-23 20:38:29 +01:00
d92f6b9903 T38763 Fix: avoid NPE When no custom properties are defined 2014-02-23 15:33:10 +01:00
cb1b6b549e Fix T38769: Python missing access to text materials 2014-02-23 18:38:08 +11:00
002b2c1541 MSVC: resolve utf8 encoding issue with some codepages 2014-02-23 14:38:27 +11:00
eff6b385e4 Code cleanup: use lowercase names for vars 2014-02-23 14:38:26 +11:00
9753641c5d Fix T38645 - Mouse reversed in standalone player with kde
Reviewers: moguri

Differential Revision: https://developer.blender.org/D344
2014-02-22 17:23:18 -08:00
f469cbea9d Followup for numinput: activate numinput when hitting pad* or =, this is the expected behavior from users! 2014-02-22 15:02:49 +01:00
554eca1c28 Avoid UUOC in install_deps.sh
The file ##build_files/build_environment/install_deps.sh## contains the following line:

  THREADS=`cat /proc/cpuinfo | grep processor | wc -l`

The command within the backticks is a [[ http://catb.org/jargon/html/U/UUOC.html | Useless Use Of Cat ]].

A more compact way of writing the same thing (saving two subprocesses) is

  THREADS=`grep -c processor /proc/cpuinfo`

or (using POSIX-preferred command-substitution parentheses instead of backticks)

  THREADS=$(grep -c processor /proc/cpuinfo)

But the most compact, and least Linux-specific, way is to use the ##nproc##(1) command from the [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | GNU coreutils package ]]:

  THREADS=$(nproc)

Reviewers: sergey, mont29

Reviewed by: mont29

Differential Revision: https://developer.blender.org/D255
2014-02-22 14:31:43 +01:00
ea5090f8c0 Minor UI messages fixes. 2014-02-22 13:49:40 +01:00
c1cdce364b Fix T38743: Modal input feature appears to be missing from 2.70 test builds
Add 'pad *' in addition to '=' to toggle basic/advanced numinput modes.
2014-02-22 12:08:39 +01:00
3fe487217d Fix T38407: Bone roll calculation flips local axes at wrong rotation angle.
Basic idea is now to have the transformes bones keep "facing" the armature's Z axis, see comments in code for details.

That might not be ideal, but at least we now have humanly predictable and consistent results.
2014-02-22 11:12:44 +01:00
907be3632c Replace the int argument for user count mode when restoring pointers on
undo with a nicer enum.

This is more transparent about what happens with the user count.
Also added comments to make certain the meaning of these values is
easily understandable.
2014-02-22 10:41:30 +01:00
6b2d1d1493 Docs: doxygen sections for bmesh walkers 2014-02-22 18:52:14 +11:00
99edd29835 Fix T38753: Python script paths weren't escaped (Win only) 2014-02-22 17:54:50 +11:00
739ae1d809 NDOF: fix for view3d ignoring lens values when panning
image, mce, view2d and view3d now have matching pan speed.
2014-02-22 16:30:48 +11:00
3a44e975a9 Fix T38539: Can't set near sensor distance above 100 via python 2014-02-22 13:57:12 +11:00
543b57fbeb Fix T38348: Panel remains scrolled when switching tabs 2014-02-22 13:07:02 +11:00
b7fa08f88a Code cleanup: style 2014-02-22 11:14:15 +11:00
1a79abdad2 Fix more of T38726: there still was a crash when deleting render layers. 2014-02-21 16:38:19 +01:00
c0e0b61222 Fix cycles standalone crash on Mac OS X. 2014-02-21 15:39:46 +01:00
277126881d Fix T38726: blender internal viewport render crash when deleting render layer. 2014-02-21 15:10:47 +01:00
415adf7263 Fix T38740: multi-user metaballs not rendering in Cycles. 2014-02-21 15:03:24 +01:00
5f18d863a9 Bugfix: Toggling "auto-blends" option on NLA Strips doesn't update them immediately 2014-02-22 00:53:04 +13:00
4ff3ec835e Fix T38737: Box select channels in dope sheet doesn't select corresponding bones in rig 2014-02-22 00:53:03 +13:00
3436c41dee Fix T38739: Simulations, unsupported in the Game Engine, could not be removed from the UI.
Also shorten info messages a bit.
2014-02-21 12:46:17 +01:00
f1a0278e90 Fix T37719: NodeTrees lose users on undo.
The node editor needs to "ensure real user" (id_us_ensure_real) on all
the node trees. This was done correctly for all open groups, but missing
for the base node tree. Function is a bit hidden behind anonymous
arguments in readfile.c ...
2014-02-21 10:08:49 +01:00
b3bc9e4f77 Fix T38598: RGBA images don't blend well in VSE with Cross Effect Strip
The issue was caused by the fact that sequencer used to cross-over effect
result with strips used for this effect, which is really stupid.

Now made it so strips which are used for effect inputs are not in the
render stack to be sure they would only be used by effect itself and
wouldn't be blended in any other way.
2014-02-21 14:03:33 +06:00
6c32192850 Reduce crease & bevel weight precision to hide float/ubyte rounding 2014-02-21 18:27:28 +11:00
e87c462890 Fix T38736: ShrinkWrap modifier doesn't work after Subsurf 2014-02-21 18:10:44 +11:00
21565484f7 NDOF: Fit key working for logic, clip and sequencer
Patch D334 from Inês Almeida
2014-02-21 16:59:01 +11:00
c50b23fa67 Fix own error - tab scrolling mixed up region/window coords 2014-02-21 16:12:53 +11:00
a00ebaecce UI: Increase cursor distance to leave keyboard navigation
This mitigates T38505, where moving the mouse while using the wheel/keys
can exit the submenu.
So at least smaller unintentional movements won't be misinterpreted.
2014-02-21 15:57:09 +11:00
08f5e3897c Modifier: rename triangulate scanfill to ear-clip 2014-02-21 15:03:34 +11:00
77290fccd5 Fix random select in edge/face mode
patch D336 from Henrik Aarnio
2014-02-21 08:51:30 +11:00
8565b2042e Fix for BM_mesh_deselect_flush(), allowed faces with deselected edges 2014-02-21 08:16:49 +11:00
4056db22cd Motion tracking panel compactification in 3D viewport properties
Patch by Sebastian Koenig, thanks!
2014-02-20 22:01:53 +06:00
28f3cc3eb7 Fixes for buildinfo hash/branch detection
Branch name and hash didn't work properly when having disconnected
HEAD or when having current HEAD below upstream.
2014-02-20 21:43:30 +06:00
4789793f09 Fix for bad imbuf creation by compositor viewers if resolution is (0,0).
This can happen if no image buffers are used to define a sensible
resolution. Then the viewer will stiff create a float buffer in the
output imbuf, which defies the usual ibuf->rect_float check and leads
to invalid memory access. Float buffer should not be created in this
case.
2014-02-20 12:09:47 +01:00
47c55c5d43 Fix for reading past allocated bounds when calculating paths 2014-02-20 20:28:30 +11:00
572a199a24 Fix for off-by-one error switching nurbs direction 2014-02-20 20:11:03 +11:00
767ac65e75 Docs: update man page script based on D251 2014-02-20 20:11:03 +11:00
4823bd1454 Fix crash when deleting strip used as mask in another strip modifier 2014-02-20 13:52:49 +06:00
361fc09792 Allow using strips from the top of the stack as modifier arguments
Poll function tried to be smart and disallow having dependency cycles,
but it didn't work properly. Further, it still possible to re-shuffle
strips stack in the way which introduces dependency cycles.

So disabled this smartness in the poll function for now.
2014-02-20 13:36:07 +06:00
10f4c62783 Editmesh: add convex hull to vertex menu 2014-02-20 16:32:23 +11:00
32d6f853f3 Transform: revert to 2.69 numeric input behavior by default
This allows to get the same "quickies" as in previous (2.69) code, (XYZ, -/, etc.), yet keeping nice non-conflicting new stuff like cursor navigation or copy/paste.

You can switch to full mode hitting '=', and back to simple mode hitting 'ctrl ='.
2014-02-20 16:11:36 +11:00
9a5b61cf58 Transform: skip setting colors when picking with the manipulator 2014-02-20 14:34:50 +11:00
338f40cce3 NDOF: yaw/pitch were swapped and add timeline fit. 2014-02-20 13:31:47 +11:00
1df068c39a UI: Fix for rna-enum submenus not showing a right arrow 2014-02-20 13:30:52 +11:00
e7f3424dca Fix T38723: Crash on loading with NULL sequence stripdata 2014-02-20 12:40:28 +11:00
ea58918171 NDOF: define 2 default navigation modes: free & orbit
After some discussion it seems both are valid defaults but useful for
very different purposes.

- 'free' lets you explore the scene with full 6dof (like fly mode)
- 'orbit' is closer to typical mouse view orbit, constraining to orbiting about a central location.

This doesn't effect orbit/pan which are available with modifier keys.
2014-02-20 12:02:59 +11:00
5fb72b7ee5 OSX/Cmake: tentative handling for clang-omp,
set flags hardcoded when used
2014-02-19 21:44:53 +01:00
5f8b30bf83 Image Editor: Fix View menu, after Scopes rename. 2014-02-19 21:02:51 +01:00
eb7485389b Use tabs for image editor.
For initial discussion see T38371

This commit organized panels for image editor to new tab categories dependent
on the image editor mode:

View Mode:
Tools - contains UV tools (currently only transform and UV Sculpting)
Scopes - contains scopes
Grease Pencil - contains Grease Pencil operators

Paint Mode:
Tools - contains brush options
Scopes - as above
Grease Pencil - as above

Mask Mode
Mask - contains mask tools
Scopes - as above
Grease Pencil - as above

Grease Pencil panel/tab now includes operators, not view options which have been
moved to the UI region on the right.
To make this work better, image editor toolbar now is of type TOOLS instead
of PREVIEW as was the case previously. A nice version patch makes sure all
works predictably, but opening newer files with older blender executables
could backfire.

This commit does not address which UV Tools will be included in the
Tools tab for the view mode, but does include some basic tools (transform)
and provides a class to inherit from to avoid conflicts with UV Sculpting.

Reviewers: brecht, dingto, sergey

Differential Revision: https://developer.blender.org/D315
2014-02-19 17:22:01 +02:00
6b1a4fc66e Cycle CUDA: revert the f1aeb2ccf4 and 84f958754 busywait fixes for now.
It's unclear what kind of impact they have on performance at the moment, so I
rather play it safe and postpone this for 2.71.

Ref T38679, Ref T38712
2014-02-19 16:08:08 +01:00
Dalai Felinto
d85d117b32 fix T38721 Vertex Group pop menu (CTRL+G) Set Active Group not updating Vertex Groups Panel
I set ND_VERTEX_GROUP to update the buttons.
Reviewed by: Lukas Toenne
2014-02-19 11:31:36 -03:00
a938640036 Fix T38717: Copy Vertex Group To Selected fails when all Vertex Groups
are empty.

This is now considered a no-op and counts as a successful copy (since
nothing would have changed anyway).
2014-02-19 14:19:32 +01:00
521b3a5dac Fix for Copy Settings From Active Track
it didn't copy weight from active track.
2014-02-19 18:59:04 +06:00
fe5e1dd272 added support for double,float and int property values for maya restpose matrix properties 2014-02-19 13:57:52 +01:00
a0c1f009bf Added Maya restpose_matrix support via custom properties to Collada exporter 2014-02-19 13:57:51 +01:00
f6a7e5ece1 Change default track to 15px pattern and 71px search
After recent seed improvements it makes tracking more robust
without speed loss.
2014-02-19 18:50:24 +06:00
57b62881f4 Added track weight to presets
Useful for cases when you need to create bunch of witness tracks.
2014-02-19 18:43:36 +06:00
bff99b10a3 Fix T38720: Clear preview range operator missing notifier to redraw
timeline.
2014-02-19 13:34:50 +01:00
5d20db1d87 Added an option to camera preset to include/exclude focal length from the preset
Useful for cameras which have fixed focal length.
2014-02-19 18:18:02 +06:00
df34df50f7 Camera presets changes
- Fixed typo in Canon C300 camera name
- Added preset for Nexus5
2014-02-19 18:10:51 +06:00
32ba1ce1c1 Fix T38603: Output File node sockets were drawing the regular socket
label in addition to the actual specialized socket ui.
2014-02-19 11:55:44 +01:00
892be8edf7 NDOF: fix helicopter fly option, revert default to trackball.
Rationale for using trackball is that it allows roll which you expect
with an ndof device.
2014-02-19 21:30:57 +11:00
d56ed8dcd9 Code cleanup: de-duplicate ndof controls for walk/fly mode 2014-02-19 21:19:42 +11:00
7929970bf9 BSP was still hanging around in CMake 2014-02-19 16:07:49 +06:00
0673f86334 Update the camera presets in various ways:
* Switch to using Canon sensor type instead of camera models.
There are a ton of camera models that reuse the same sensor
so it's just confusing and forever incomplete to try and cover
all models.

* Delete all redundant Canon camera models..

* Leave only the Canon camera models that are special, that is
have non regular sensor sizes.

* Fix a few errors in some Canon models.

* Capitalize a few unrelated sensor presets for consistency.

* Added presets for GoPro and iPhone.
Their distortion models and shutter isn't really supported ATM
but tracker is robust enough to give reasonable tracking and
solving results.

Presets are from Daniel Salazar and Sebastian Koenig, thanks!

Differential Revision: https://developer.blender.org/D264
2014-02-19 16:07:12 +06:00
a64b612ae2 Totally remove BSP from SConscript 2014-02-19 15:46:44 +06:00
a6b87853cb MSVC: add more warnings to match OSX/Linux 2014-02-19 18:05:37 +11:00
d76bcf98a3 MSVC: improve warnings for scons and cmake
Some int/float conversion warnings were disabled by buildsystems but
re-enabled by BLI_winstuff.h, the warnigns relate to conversions not
considered issues on other systems so better just quiet them.
2014-02-19 17:37:02 +11:00
c625658a92 Fix T38567: Branch smoothing on skin modifier broken
own regression when changing delete commands
2014-02-19 16:43:13 +11:00
bf2f6d6161 blender-thumbnailer.py: Fix GVFS support not working with Python 3
also update doc string.
2014-02-19 15:32:54 +11:00
e3f4037075 Fix T38715: Setting object mode fails from command line
also run load pre/post callbacks
2014-02-19 14:04:35 +11:00
dea4bcdf67 PyAPI: bpy.ops was showing 'module' in autocomplete output 2014-02-19 13:41:41 +11:00
8f5775810b Fix T38714: MeshPolygon.center not a Vector type 2014-02-19 13:21:25 +11:00
64664541b6 Fix T38706: dropdown labels in popups not updating
Caused by own recent changes to menu handling
2014-02-19 11:35:45 +11:00
2a9e33fba5 Keymap: load/save improvements
- avoid passing redundant operator name to keymap property set function.
- avoid double attr lookups when setting each property.
- handle exceptions on value type mismatch.
- avoid resource warning on failed load.
2014-02-19 10:32:23 +11:00
7afbdbf812 Update keymaps for changes to NDOF 2014-02-19 10:32:22 +11:00
ad4c12fe01 OSX/CMAKE: make linking and bundling of clang omp lib work,
Cmake will still not find -fopenmp working, so the user must set
WITH_OPENMP and flags manually
2014-02-18 23:38:56 +01:00
ace071f99e prepare 32bit build msvc2013 scons/buildbot 2014-02-18 23:15:40 +01:00
16987f1c39 UI: increase contrast active/inactive (see: T38490) 2014-02-19 08:13:28 +11:00
c9233bfd82 Code cleanup: style 2014-02-19 08:02:59 +11:00
acecae86dc Fix windows build error in splash screen commit. 2014-02-18 20:34:55 +01:00
a66236c8f9 Fix T38661: make number button increment/decrement areas smaller.
Previously 1/3 of the button was used to decrement, 1/3 to edit and 1/3 to
increment. However with the number text now right aligned this meant that
the increment area would overlap the number text, which is confusing. So it
was made to smaller to only cover the arrows.

It's not as easy to click but I don't know of a better solution with right
aligned number text.
2014-02-18 19:54:42 +01:00
3f769776fe Splash screen: use a retina resolution image for Mac OS X. 2014-02-18 19:38:44 +01:00
90a86fecee Fix T38684: cmake OS X build problem when changing deployment target.
Don't cache these variables as they are not cleared on such changes.
2014-02-18 19:38:43 +01:00
44fe9fe17b Multisample: disable this by default again, it is causing a serious performance regression.
Fixes T38665
2014-02-18 19:38:43 +01:00
d516fedba3 Fix T38488: Single pixel line artifact with Rotate and Wrapped Translate
nodes.

The Rotate node was calculating the center with a 1 pixel offset, which
effectively shifts the image by 1 pixel on one or both axis for
right-angle (90 degree) rotations.

Note that the wrapping feature for translate nodes can still produce
undesirable results for non-quadratic images. This is because of how
the resolution calculation works atm: the Rotate node will keep the
resolution of the input image, even if the resulting image is then
cropped or leaves empty margins. There is no easy way to fix that
without redesign.
2014-02-18 19:01:04 +01:00
f5ae5698d0 Fix T38691: Curve object bevel not working in group instance
It is possible that objects from dupli-groups depends on objects which are
not in the dupli-group. We do need this objects to be evaluated as well on
visible changes, so all dependencies for objects from the dupli-group are
met. Unfortunately, we don't have parent relations on this state, so we're
to use DFS over the whole DAG to gather such dependencies.

This is probably not so bad since visible update is called really rarely.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D326
2014-02-18 23:12:16 +06:00
c987bcc416 OSX: more futurework for clang-openmp:
- moved assumed location of omp lib to blender libs
- prepared libiomp5 to link out of the box with cmake
- changed according in scons
- introduced a local var C_VENDOR, cause Apple clang 3.4 may not include omp support yet
- added a linklibs for msgfmt ( may not be needed for other than OSX )
2014-02-18 17:18:35 +01:00
7aa86ec243 Fix T38700: Plane track can't be adjust when select mouse is set to left 2014-02-18 19:09:11 +06:00
Dalai Felinto
cbbc67a0b5 fix - T38561: Fly mode vs. Walk Mode Navigation Keyboard Controls
* QE as up/down to Fly Navigator
* Alt as slow modifier to Fly Navigator
* Update on Walk header info

Note: I left the original RF/Ctrl shortcuts working for fly navigator
but they are no longer visible in the header info. So old users will
still be using what they were used to, while new ones get used to what
walk navigation is using.
2014-02-18 10:08:45 -03:00
e965afcdcc Python: remove redundant len() use 2014-02-19 00:05:31 +11:00
d035e5ac9d Fix T38698: In the Mask tab the Insert Key and Clear Key button labels are switched 2014-02-18 18:57:09 +06:00
dcdb4eaf9c NDOF: Fix for fly/walk mode ignoring axis invert options 2014-02-18 23:55:58 +11:00
13553876ba Fix T38506: Bokeh blur node - size bugs with OpenCL.
The underlying cause for these issues is the insufficient sampling of
the bokeh image. For smaller blur radius there will be very few samples
taken, and with 1-pixel radius it boils down to just 4 samples:
2 on the left border (black), 1 in the center (black) and 1 at the top
border (blue) ...

For now have added the workarounds implemented in the CPU version of
that node, which hide these artifacts. Ultimately would be better to
have mipmap levels for the bokeh image input instead.
2014-02-18 13:18:53 +01:00
69fb332709 Fix regression that Blender crashes on startup if UI translation is enabled, it was mistake in rB50b2c78ad8b6. 2014-02-18 19:09:44 +09:00
db172c1a98 Fix T38672: Can't select strips inside a Meta on the Mask Modifier 2014-02-18 16:01:16 +06:00
688d0984eb Fix T38667: When using "Maya" Input Interface, pressing "E" does not initiate rotation in the UV/Image Editor
Was a shortcut conflict with unwrap. Use 'U' for unwrap now, so no conflict is here.

Preset still doesn't work tho, Cambo need to solve missing operators used here since
NDOF changes.
2014-02-18 15:08:08 +06:00
2175302d3b Possible fix for T38644: H.264 with PNG RGBA encoding crashes 2014-02-18 12:37:21 +06:00
97b90d89f4 Fix T38637: Boolean produces faces with holes which isn't supported by BMesh
Simple fix -- use CarveHoleResolver hook for CSG which will split faces
containing holes.
2014-02-18 11:53:04 +06:00
6dafb89436 Fix FCurve reading freed themes, assert to prevent further misuse 2014-02-18 12:33:19 +11:00
410613ec09 NDOF: add keymapping for the 'fit' button for other 2d views 2014-02-18 11:57:49 +11:00
5fb2d21390 NDOF: support pan/zoom for view2d (nodes, graph editor, sequencer... etc) 2014-02-18 11:57:49 +11:00
2b0aa105f7 NDOF: show invert pan & zoom in the menu outside the 3d view 2014-02-18 11:57:49 +11:00
c4bebc0632 NDOF: fix for broken zoom invert for image and clip editor
also match zoom speed with 3d view
2014-02-18 11:57:48 +11:00
c67b9f4c37 NDOF: image and clip views ignored axis invert preferences
also X/Y invert was swapped for 3d view.
2014-02-18 11:57:48 +11:00
f468904e9b NDOF: use like a joystick for cube picker (as with circle picker) 2014-02-18 11:57:48 +11:00
16c75cf594 Fix T38654: Using a non-camera object for the SetCamera Scene Actuator causes a segfault.
Non-camera objects are not supported as cameras, and trying to use them
just causes memory errors (some bad typecasts are involved). When converting
a Scene Actuator, only use the object as a camera if it is actually a camera.
Also, the logic brick UI now filters for camera objects, which should help
avoid confusion.
2014-02-17 14:38:08 -08:00
Dalai Felinto
3d7e0aae52 bpy.ops.object.add_named() doesnt provide error when failed (related to T38689) 2014-02-17 19:22:50 -03:00
787623e4a3 View3d: remove DEBUG_NDOF_MOTION, replaced by --debug-events option
also set rv3d->rot_angle = 0 on all ndof view3d operators
2014-02-18 08:31:08 +11:00
13870d5177 Fix T38655: Face path select fails with edge/vert select enabled too 2014-02-18 08:31:08 +11:00
1a4b718582 Fix crash on file load with linked groups and curve bevel.
This isn't a proper fix, curve_cache should not be NULL, but it makes it
possible to open the file at least.
2014-02-17 22:02:44 +01:00
f1aeb2ccf4 this is an attempted Fix: T38679
Cycles GPU Performance Regression

From my testing this (what i should have done in the first place) reduces the regression a lot.
Lets hope it is enough or we have to go back to busy waiting.
2014-02-17 20:11:45 +01:00
7cc954d7a7 Make it so missing curve cache doesn't crash in sequencer preview 2014-02-18 00:11:27 +06:00
e7ce4f22fb Fix T38647: "Make Duplicates Real" crashes in Solid mode
This operator created new object and didn't tag them for update,
which made it so their data isn't ready at the time of drawing.
2014-02-17 23:45:29 +06:00
8a32f2c6d6 Remove left-over form debug time 2014-02-17 23:38:12 +06:00
641d653a37 Fix T38685: missing auto refresh button text on image nodes. 2014-02-17 17:52:09 +01:00
6de3a8a4fe Bevel fix for T38675, bad bevel on slanted L.
The test for a reflex angle used the vertex normal,
which was not a good test for a saddle point vertex.
Switched to using the face normal, if available, for that test.
Also added test for this in svn bevel_regression.blend.
2014-02-17 11:43:31 -05:00
266e1b3b4f Fix T38680: File output subpath file-select operator uses absolute path.
This is because the sub-paths of the individual sockets are defined as
FILEPATH properties, which automatically adds the standard fileselect
operator button in the uiLists. However, that operator returns full
paths only, with no direct way to make them relative to the base path.

So for now i've turned the subpath properties into regular strings,
which removes these operator buttons but should at least avoid the
confusion.

Eventually new operators could be defined for this, which use the file-
select operator and then make the path relative.
2014-02-17 17:17:10 +01:00
fc9215129e Adapt KDL for compile with clang 3.4, which is stricter with friend classes,
fixes ‘friend declaration specifying a default argument must be a definition’,
based on information from here:
http://www.orocos.org/forum/rtt/rtt-dev/bug-1053-new-compile-error-clang-34-patch-attached
2014-02-17 16:39:03 +01:00
209a68af39 Fix T38658: H.264 with "Lossless Output" enabled gives lossy output
Issue was caused by the change in FFmpeg options: some of them were
renamed, some moved to another class.

Made some tweaks to how options are passed to the FFmpeg which now
seems to be the same as ffmpeg.c.
2014-02-17 20:53:15 +06:00
ecd0565f28 Fix T38651: Compositor Normal Node Sphere unchangable when Reset All To
Default Values is used on it.

The default for the socket value was always 0. Now the default value for
node socket default_value properties is chosen based on the socket
subtype to give some more sensible values.

NOTE: this may still be different from the values specified in the
socket templates! It is not possible to directly use these template
values, because all sockets share the same RNA types. At least it should
work reasonably well in the majority of cases now.
2014-02-17 15:44:21 +01:00
a5cfd3f518 Fix T38635: key configuration search not working well when typing 'slash'. 2014-02-17 15:03:24 +01:00
4c512fb642 Compile Attrs: add ATTR_RETURNS_NONNULL 2014-02-17 23:32:00 +11:00
50b2c78ad8 RNA: assert on NULL return values from itemf callbacks 2014-02-17 23:31:59 +11:00
d607a70795 Make sure RenderLayer/Image nodes always return a valid enum items list. 2014-02-17 13:11:49 +01:00
a61e3b9a9e Fix T38422: Error writing AAC frame when using FFmpeg compiled with vo_aacenc
Issue was caused by missing GLOBALHEADER flag set for audio stream.

Also made it so frame is getting filled with default, that's what
happening in ffmpeg.c.
2014-02-17 18:10:38 +06:00
280f9d3b39 Fix T38650: Crash from enum item functions returning NULL instead of a
single terminator item.

Ideally no enum item function should return NULL, but since this is very
common and an intuitive mistake, better handle that case gracefully in
the RNA access function.
2014-02-17 12:19:39 +01:00
d39ffd7217 NDOF: remove bias for translation
Was noticeable (and annoying) that different axis had different speed,
if we want to have axis bias better do as a user preference.
2014-02-17 22:17:31 +11:00
d8d7d8e1e3 NDOF: allow panning in view3d.ndof_orbit_zoom, but forward is still zoom
This makes it so NDOF without any modifiers pressed can pan and orbit
which means you have full 6dof, however if you only want to orbit+zoom
that works as before.

also change logic so rotation is disabled for axis views (orbit operator
will exit axis views still, as with mouse orbit)
2014-02-17 22:05:10 +11:00
aa0aa73703 NDOF: default to turntable (blenders default too) 2014-02-17 22:04:26 +11:00
1af726a82e Mask: fix for intel openmp which doesn't support casts in for loops 2014-02-17 21:37:56 +11:00
7ee9de29a6 Fix T38487: Wrapped translate node in combination with other buffered
nodes (Blur) causes crash due to chained read/write buffer operations.

The way read/write buffer operations are created for both the wrapped
translate node and then the "complex" blur node creates a chain of
buffers in the same ExecutionGroup. This leaves the later write buffer
operations without a proper "executor" group and fails on assert.

Solution for now is to check for existing output buffer operations like
it already happens for inputs. This is extremely ugly code, but should
become a lot more transparent after compositor cleanup ({D309}).
2014-02-17 10:53:52 +01:00
dbd37b21bd Suppress assert in debug mode. 2014-02-17 20:16:07 +11:00
fcaf144a2a Mask: enable overlap detection by default, more compact buttons 2014-02-17 20:00:11 +11:00
80f3956972 Fix T38643: Frame labels are invisible with default theme.
The color for frame labels was a mix of the text color (black by
default) and the node theme color with a factor of 0.8, which
coincidentally is the same as the node body color.

Changed it to 0.4, which is the same as the regular node labels use.
2014-02-17 09:28:13 +01:00
14b9c79483 Fix for another deadlock with py-drivers: BlendData.scene.remove() 2014-02-17 19:30:31 +11:00
8afd646b18 Blender Internal: Revert a part of rB162d6c73e3d0, that broke rendered preview and often causes crash when using material light group. 2014-02-17 16:57:11 +09:00
05235d86ef Fix for issue in mask overlap with no splines in the mask. 2014-02-17 18:55:03 +11:00
f9b51f0635 Clear +x flag from source file 2014-02-17 13:18:22 +06:00
ddf7d485a8 Bring back mask copy/paste operator to the menu
They got lost in clip interface tab-ilization.
2014-02-17 13:09:21 +06:00
1776cb9244 Fix T38670: Mask transform without a movieclip crashes
Disable transform and mask display when there's no active clip.

It's not a matter of returning fallback dimensions if there's no
slip, it's also matter of making it so stabilization and distortion
routines are aware of clip == NULL which is really crappy.

Also almost all the operators are disabled in clip editor without
active clip already anyway.

Also tweaked header UI a bit to not display mask stuff when there's
no active clip,
2014-02-17 12:58:50 +06:00
9c79fd1193 Fix T38669: Mask duplicate fails with multiple layers
Allow duplicating splines from inactive layers. This way it's
more useful IMO than restricting duplication to an active layer.

TODO: What should be a behavior for clipboard (currently it copies
splines from an active layer only)?
2014-02-17 12:39:15 +06:00
1562fd99f1 Fix T38664: Blender hang when change scene from script
Deadlock between python script evaluation thread and
drivers evaluation caused by scene update invoked from
ED_screen_set_scene().

Pretty much the same as setting scene current frame
with the same solution BPy_{BEGIN,END}_ALLOW_THREADS.
2014-02-17 12:34:27 +06:00
4134bdc75c Fix for rare crash in recent mask option to check overlaps 2014-02-17 15:15:49 +11:00
da8c6360b1 Revert 7142b97085 (transform toggle node hiding)
D187 was committed without review and later rejected by Brecht and myself.
2014-02-17 14:46:16 +11:00
2ce91b6b4a Sequencer: increase soft limits for translate 2014-02-17 14:27:22 +11:00
c971aac3b1 UI: wheel switches tabs over the tab area, or ctrl+wheel anywhere 2014-02-17 13:46:07 +11:00
cc7cfd6617 Mesh Tool: removes degenerate edges, faces and face ears. 2014-02-17 11:41:19 +11:00
20da9353b8 Code cleanup: unused/warnings 2014-02-17 11:34:12 +11:00
6c7f9f67fd Fix: compile error due to non-matching type and strict flags for MSVC9
This fixes a small compile error where MSVC9 complains about conversion from int to unsigned char.
2014-02-16 15:47:08 +01:00
191183b304 Fix for bmesh with openmp 2014-02-16 22:40:09 +11:00
78bd029bbe MSVC: add errors for BLI_strict_flags.h 2014-02-16 14:50:15 +11:00
7c69215933 CMake: disable international if the locale path is empty
This would happen when the submodules weren't initialized
but fail on `make install` with a not very helpful message.
2014-02-16 07:55:28 +11:00
aa517ab3a4 Compile fix for 004decc1d940... 2014-02-15 14:38:49 +01:00
1c866c377a Fix/Workaround for NDOF/X11 bug with unreliable GHOST_kFinished events. 2014-02-15 18:40:33 +11:00
6e54c87769 Code cleanup: use const short for ndof axis args 2014-02-15 18:35:48 +11:00
004decc1d9 Code cleanup: warnings 2014-02-15 18:21:07 +11:00
56f6bc06d3 Fix T38638: modifiers on curves kept warnings 2014-02-15 17:25:56 +11:00
96d5e05e48 Mesh Inset: following existing edges is now optional 2014-02-15 13:51:54 +11:00
8572ae89cd UI: fix for glitch where active button became inactive on undo 2014-02-15 13:28:26 +11:00
77a15aba38 IDProp API: change IDP_NewString so sizeof() can be passed in. 2014-02-15 12:31:58 +11:00
15969fba1f Fix reading one byte past the buffer when writing string properties 2014-02-15 12:27:23 +11:00
2413b444d0 Fix T38640: password values showed in tooltips
also disable copying password text.
2014-02-15 12:06:46 +11:00
01d9bbaa5e Code cleanup: remove more string encoded menu functions 2014-02-15 11:37:33 +11:00
67ba7e50d4 Interface: Remove one more name field, this time from the armature tab - pose library panel. It's not needed anymore (dbl click on the item itself will rename it) 2014-02-14 23:59:06 +01:00
eedba54aae NDOF: rename 'zoom updown' to 'pan xy swap axis'
This swapped translation for all ndof events.
2014-02-15 09:54:11 +11:00
30e89552e2 Cycles Standalone: XML wrapping of Lights and some more volume settings. 2014-02-14 23:22:29 +01:00
f3c7cb02b2 Fix T37964: KX_GameObject missing NULL checks for m_physicsController.
KX_GameObject::PySuspendDynamics() and KX_GameObjectPyRestoreDynamics()
now make sure GetPhysicsController() is non NULL before attempting
to use it.
2014-02-14 13:17:51 -08:00
8a1f3238be Cycles Standalone: Add more controls and options
* P key, pauses the render
* W/A/S/D for camera movement
2014-02-14 21:40:51 +01:00
8cc925a216 Cycles Standalone: The camera now gets properly updated, when changing window size or using --width --height overwrites. 2014-02-14 18:40:31 +01:00
2bf591762a Cycles: equi-angular sampling for homogeneous volumes
This adds an option in the Volume Sampling panel, which helps rendering lamps
inside or near volumes with less noise. It can also increase noise though and
needs improvements to support MIS and heterogeneous volumes, but since it's
useful in some cases already (especially world volumes) it's there now.

Based on the code in the old branch by Stuart, with modifications by Thomas
and Brecht.

Differential Revision: https://developer.blender.org/D291
2014-02-14 17:37:34 +01:00
42946c37c7 Fix T38606: C curve in the curve mapping compositing node not extrapolating correct.
The "premultiply" optimization here did not take the extrapolation into account.
2014-02-14 16:03:45 +01:00
e1d9308616 Fix T38629: broken links to OpenGL docs from python API docs. 2014-02-14 15:17:36 +01:00
a252e27fec Fix T38633: glsl not working well with mixed cycles/blender material nodes. 2014-02-14 15:11:58 +01:00
8439a165ff Fix T38504: cycles missing object in viewport with shape keys and shared mesh. 2014-02-14 14:54:00 +01:00
76dd68351c Cycles Standalone: Up/Down movement was inverted. 2014-02-14 13:56:23 +01:00
34d1746331 Cycles Standalone: Add interactive mode (I-key), to avoid accidental changes/movement.
Also some code and whitespace cleanup.
2014-02-14 13:41:02 +01:00
30c9fe19a3 Fix for crash caused by effectors doing precalculation //during// DAG
updates.

This file crashes on loading with NULL pointer access to curve_cache:
{F77132}

The pdInitEffectors function was amalgamating the simple
collection of effector objects with an automatic precalculation for
curve guides and the like. This precalculation requires object data
that may not be available until the DAG has finished.

Since for DAG dependencies only the list of effectors is required,
added an argument to disable precalculation when collecting effectors.
2014-02-14 12:58:43 +01:00
32b45cb4a7 Fix for "Show Overlay" for masks always grayed out 2014-02-14 17:09:21 +06:00
80e21f6fc5 Code clearnup: warnings 2014-02-14 22:03:09 +11:00
43c478a36a Py API: refactor py text compiling into its own function 2014-02-14 22:03:09 +11:00
54dd355cc8 Fix T38562: Wrong curve tilt after Switch Direction 2014-02-14 14:58:52 +06:00
7fb7ce789f Fix T38631: Blender crashes when selection faces after new boolean modifier
Own mistake in edges carve->blender export, didn't count them correct.
2014-02-14 14:26:26 +06:00
cc1be3f80a NDOF: view3d improve dolly/zoom behavior
when in ortho mode, zoom would dolly rather then zooming which
doesn't make much sense, now check ortho and zoom in that case
(nice behavior for locked quad view).
2014-02-14 18:38:23 +11:00
7e7e01b7a3 NDOF: fix orbit-all remaining on a view axis
also use auto-perspective behavior with ndof.
2014-02-14 17:42:21 +11:00
a8a3e1738b NDOF: add roll to keymap 2014-02-14 16:27:37 +11:00
c221717f70 NDOF/X11: incorrect dynamic_cast 2014-02-14 16:12:41 +11:00
dd1e02432e workaround for building with mingw32 2014-02-14 15:15:20 +11:00
b09684567e Cycles Standalone: The camera can now be moved and rotated with LMB/RMB mouse key.
ToDo: Add controls for forward/backward movement.
2014-02-14 01:17:01 +01:00
5621e63d36 Code cleanup: duplicate headers 2014-02-14 10:55:38 +11:00
d95b378c4d Blender Internal: Fix regression that sometimes shadows are not rendered, caused by rBec4ed2e3df507245aceb7341b4fdf2f5ed935067.
Easy mistake in code cleanup. :)
2014-02-14 08:02:16 +09:00
9185ab5d9c Fix scons compiling after carve changes 2014-02-13 23:21:13 +01:00
3f1a5902b9 fix scons / cmake desynchronization issue with including carve headers 2014-02-13 20:40:38 +01:00
0da1321985 Cycles Standalone: More updates for the Node XML API.
Should be almost complete now, apart from Ramp Nodes (Color Ramp, RGB Curves...).
2014-02-13 20:37:41 +01:00
727ef0dfde win32 MSVC 2013 add scons support 2014-02-13 19:15:43 +01:00
6a65161966 fixed an for loop variable type and delete operator in cave-utils.cc
Patch by wutzi (Benedikt Bergenthal), thanks!

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D314
2014-02-13 20:09:51 +06:00
910f4df45d Fix race condition between tracking thread and tracks map sync
This might have been a reason of bug T38281.
2014-02-13 18:31:02 +06:00
83617d24d5 Rework carve integration into boolean modifier
Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Perhaps memory usage and CPU usage are the same after all the
features are implemented but we've got support now:

- ORIGINDEX for all the geometry
- Interpolation of edge custom data (seams, crease)
- NGons support

Triangulation rule is changed now as well, so now non-flat
polygons are not being merged back after Carve work. This is
so because it's not so trivial to support for NGons and
having different behavior for quads and NGons is even more
creepy.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D274
2014-02-13 17:16:53 +06:00
51efa8a1f5 Fix T38529, Blur node size 0 doesn't work.
The blur operations were clamping the filter size to 1, which prevents
no-op blur nodes. Further any value < 1 would also be ignored and in
many combinations the filter scale setting ("Size") would only work in
integer steps.

Now most blur settings will work with smooth Size value scaling as well,
meaning you can choose a reasonably large filter size (e.g. 10) and then
use the Size factor to scale the actual blur radius smoothly.

Note that non-integer filter sizes also depend on the filter type
selected in the Blur node, e.g. "Flat" filtering will still ignore
smooth filter sizes. Gaussian filters work best for this purpose.
2014-02-13 11:52:22 +01:00
5fdf6169a3 Fix incorrect text for curve Shrink/Fatten, patch from SebastianK 2014-02-13 19:21:35 +11:00
ae8327dbf3 Mask: add option to detect self intersections 2014-02-13 19:12:28 +11:00
c85e66e7fe Scanfill: add user-flags for edges and verts, useful elsewhere. 2014-02-13 16:46:51 +11:00
fcb06097a5 Scanfill: name flags better and comment unused SF_EDGE_BOUNDARY flag. 2014-02-13 14:13:42 +11:00
3fe036ad5f ListBase: add attributes to api functions 2014-02-13 13:21:16 +11:00
f27acb5b56 ListBase: add BLI_sortlist_r api function, remove check for NULL callback 2014-02-13 13:21:16 +11:00
fdcdd5e52e Freestyle: Follow-up fix for the chaining operation bug in the previous commit.
Many thanks to flokkievids for identifying the inconsistency.
2014-02-13 09:56:56 +09:00
108ad34429 Mask: option not to treat overlapping curves as holes 2014-02-13 11:48:46 +11:00
6ee9d1b69d error in recent commit 2014-02-13 10:13:33 +11:00
5e255f6b8f correct error in recent menu update for render slots, missing callback 2014-02-13 10:00:52 +11:00
b61c6e0f4f UI: remove unused freestr 2014-02-13 09:49:00 +11:00
4c21e2b382 UI: split ui_popup_menu_memory into get/set functions and store as uint 2014-02-13 09:37:28 +11:00
d4c87f2f79 Code cleanup: remove unused button aspect 2014-02-13 09:37:27 +11:00
e43c3ad88a Fix issue in recent bugfix, did not work with multiple sessions (preview render). 2014-02-12 23:14:57 +01:00
9cc380e026 Fix own error in recent commit with red-alert flag becoming stale 2014-02-13 09:12:47 +11:00
aea00c7a81 Code cleanup: style 2014-02-13 08:52:12 +11:00
8547d17739 Fix T38615: cycles rendering beckmann/GGX refraction wrong with IOR equal to 1. 2014-02-12 22:50:31 +01:00
f462e8a9c8 Fix T38332, Fix T38607: cycles render crash with motion blur.
It wasn't working together well with the python thread state changes after the
depsgraph multithreading.
2014-02-12 21:55:19 +01:00
6ad9941c74 Add the date to the CPack rpm package version
Updating rpms built from 'make package' has issues using the git hash since it isn't in a set order like svn commits, this lets it use the date to determine if the rpm is newer than the installed version.

Also updates the license text.
2014-02-12 13:45:36 -07:00
a397009181 Fix T38541: sys.exit fails when blender is built as a py-module 2014-02-13 06:58:06 +11:00
70905a6e02 Fix Editderivedmeshes vertices normals computation.
Those derived meshes (used in Edit mode) were using simple sum of neighbor poly normals to get vertex normals,
while everywhere else in Blender we use weighted sum of such poly normals.

Patch: D311

Reviewed and enhanced by Campbell, thanks!
2014-02-12 20:48:09 +01:00
f9a60ecacd defaults: disable twoside for startup.blend 2014-02-13 04:53:26 +11:00
13875564a9 Grr, another UI messages fix, forgot this one! 2014-02-12 17:55:47 +01:00
Dalai Felinto
9388061738 Add header info for the Fly Navigation operator 2014-02-12 14:07:43 -02:00
f49e89fa37 Fix T38525: missing update when running bpy.ops.transform.* from the console. 2014-02-12 17:01:53 +01:00
09e5373c06 Paint: Descrollification commit for brush texture angle property.
Original patch by Sebastian Koenig with edits.
2014-02-12 18:00:54 +02:00
2be654b2ff Usual UI messages fixes... 2014-02-12 16:23:19 +01:00
1c862f33a0 Sculpting: Move lock options in symmetry panel.
Lock is an often used option according to artist feedback, so better
have it on the same tab as brush tools.
2014-02-12 17:04:57 +02:00
Dalai Felinto
786ff5e9c4 Add header info for the Walk Navigation operator 2014-02-12 12:49:32 -02:00
78e137efda Motion Tracking: Grammar fixes. 2014-02-12 15:32:26 +01:00
412e06a2fa UI / 3D View Tool Shelf: Avoid redundant "Grease Pencil" label, now that GP has its own tab. 2014-02-12 15:32:25 +01:00
efc6735a8b Fix T38610: lattice U/V/W should not be animatable, is not supported. 2014-02-12 14:50:48 +01:00
f674e93375 Code cleanup: ndof view3d operators use of ViewOpsData 2014-02-12 21:05:25 +11:00
dff15175a9 View3d: fix for ndof with quadview+box, missing sync.
also de-duplicate 3x pan-functions.
2014-02-12 21:05:25 +11:00
be3a029d4c NDOF: print events when debugging is enabled 2014-02-12 21:05:25 +11:00
f2af54afd0 NDOF/X11: skip getting the time when no ndof events are processed 2014-02-12 21:05:24 +11:00
b9bf935cc3 NDOF/X11: fix for glitch using ndof outside the view and entering again 2014-02-12 21:05:24 +11:00
bc41d255cb NDOF: minor color picker improvements
- swap Z/Y axis so Z changes hue and X/Y change location.
  this way you can use ndof like a joystick and Z rotation like a dial
  for the hue.

- change sensitivity when shift is held to be 1/5th
2014-02-12 21:05:24 +11:00
e2089e1406 NDOF: fix for negative colors and flickering hue when picking with HSVCUBE 2014-02-12 21:05:24 +11:00
7bc577e9f7 View3d Walk: enable rotation for ndof by default 2014-02-12 21:05:24 +11:00
bd89528a5e Code cleanup: replace WM_OT_ndof_sensitivity_change -> WM_OT_context_scale_float
also increase maximum sensitivity
2014-02-12 21:05:24 +11:00
054094f582 Freestyle: Fix for chaining operators not concatenating edges with Freestyle edge marks and at material boundaries.
Problem report by Postoman on the BlenderArtists.org Freestyle thread, thanks a lot!
2014-02-12 18:17:21 +09:00
2dd2bcf2de Fix/workarond for scenes rendered for sequencer preview
This is really a workaround which brings back direct display
list creation from drawing code. This is rather nasty to do
but proper solution would require some major sequencer redesign.
2014-02-12 14:06:13 +06:00
5b0f03323b View3d: enabling quadview box would copy view offset, sync to avoid jump 2014-02-12 14:16:03 +11:00
38ead88dee View3d: fix for quadview box only syncing some view axis 2014-02-12 14:16:03 +11:00
7731a940d1 View3d: add utility function to get the quat from a view axis 2014-02-12 14:16:02 +11:00
9c8bf7302d Cycles: Avoid unnecessary dot products in Mesh/Hair export code. 2014-02-12 03:27:41 +01:00
5c8d5c70cf View3d: ensure locked views are on an axis - behavior wasn't well defined. 2014-02-12 11:26:02 +11:00
bfd0b582ca fix/workaround for v3d object mode selector flipping direction
Allow menu functions to define their own direction, this way
menu_item_enum_opname_menu can keep menu flipping from 2.69.
2014-02-12 10:29:15 +11:00
18a8d88923 Transform: better logic to calculate manipulator normal orientation.
Use Z axis for the edge direction for edges and vertex pairs.

Issue raised in T38592, now edge select and vert-pairs share logic
for calculating orientation and the active vertex determines direction.
2014-02-12 08:48:33 +11:00
38e58612ef Revert own previous commit rBe2f9afbaabbd.
The "Cast Shadows" worked as expected, but it can cause problem in some cases.
For example, when using strand render, we need disabling only buffer shadows,
but the previous changes made that impossible. "Cast Shadows" should be added
as a newly created option.
2014-02-12 05:46:26 +09:00
78f23ce9fc Cycles: mix hair minimum width code with SSE intersection code
Gives 6.5% speedup for hair.blend from testsuite.

This commit was previously reverted, but should work ok now. Patch by Sv. Lockal.
2014-02-11 18:49:38 +01:00
afadaaf8e0 Code cleanup: fix a few visual studio compiler warnings. 2014-02-11 18:49:32 +01:00
842a66b07c Cycles: Code refactor for Clamping/Inf Rejection, combined into 1 function. Also avoid some conditionals.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D310
2014-02-11 17:44:41 +01:00
0e97550fb3 Mesh Data: disable two-sided for new meshes (see: T37518) 2014-02-12 02:46:43 +11:00
7e300ed3a1 UI: change to give sliders more text space, messes with alignment 2014-02-12 02:46:43 +11:00
f90a913695 Fix for fix with render layer menu 2014-02-12 02:46:42 +11:00
c287624f50 Fix T38597: cycles status bar missing some updates. 2014-02-11 16:26:08 +01:00
e91ddf02a8 Fix T38547: crash in skeleton sketching. 2014-02-11 16:14:20 +01:00
5af3b02f72 Fix T38578: blender internal texture nodes + volume render error. 2014-02-11 16:10:29 +01:00
d2b15b0a8c Fix T38590: some material operators incorrectly appeared in the spacebar search menu. 2014-02-11 15:21:17 +01:00
bd44dcb632 Better fix for T38501: blender crashes right after adding image texture to
material in cycles

Buggy MSVC 2008 in 32-bit mode ignores stack align attribute for float3.
Now it uses reference to __m128, which is always aligned.
2014-02-11 17:48:23 +04:00
0a50757a59 Fix null-pointer dereference in previous sequencer commit 2014-02-11 19:29:17 +06:00
5a35034fb3 Fix Cycles Light Passes being always enabled, own regression in Clamp commit yesterday.
KernelIntegrator just doesn't have valid data at this point, so we need to go one level deeper.
2014-02-11 14:14:43 +01:00
4bf4c4111e Own recent removal of string encoded menus missed render layers/passes 2014-02-12 00:08:54 +11:00
c0a13322cd Fix T38553: Crash load new level; array modifier using curve length
Since threaded object update we've disabled in-place
curve evaluation (in cases when applying curve modifier
with target curve non-evaluated yet).

This requires game engine to take care of DAG and object
evaluation (currently it's designed to export only objects
it able to render).

This workaround will make sure that curve_cache for curves
is up-to-date.
2014-02-11 18:25:53 +06:00
0203c5f2a2 Cycles: Clamp Direct now affects the Background too.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D306
2014-02-11 12:18:47 +01:00
1dfd82d2bc Fix T38574 uv sculpting cursor could be visible during render preview in
image editor.
2014-02-11 12:40:50 +02:00
10a0b1b8c3 Bring back stabilization and GP panels to MCE 2014-02-11 16:16:11 +06:00
23fe23f951 Fix T38557: VSE clips with Alpha Over against a transparent background fail to reflect opacity changes 2014-02-11 16:03:56 +06:00
e2f9afbaab Blender Internal: Modify material property "Cast Buffer Shadows" to affect ray shadows also, and rename it to "Cast Shadows".
This allows us to make materials that don't cast ray shadows.
Turning off this property can reduce the rendering time slightly.

Note: RNA path is changed to "use_cast_shadows" as well. The older
path "use_cast_buffer_shadows" still can be used as its alias, but
it will be removed after updating some addons.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D272
2014-02-11 17:06:21 +09:00
2038eb10d0 Fix T38537: issue with OS X full screen startup.blend after recent changes.
Also fixed the redrawing while entering and exiting fullscreen, it would show
a distracting white window contents during the animation.
2014-02-10 23:09:23 +01:00
e29a45b396 Cycles: Separation of Indirect and Direct clamping.
Indirect and Direct samples can now be clamped individually. This way we can clamp the indirect samples (fireflies), while keeping the direct highlights.
Example render: http://www.pasteall.org/pic/show.php?id=66586

WARNING: This breaks backwards compatibility. If you had Clamping enabled in an old file, you must re-enable either Direct/Indirect clamping or both again.

Reviewed by: brecht
Differential Revision: https://developer.blender.org/D303
2014-02-10 21:46:02 +01:00
e920206a90 Add Tabs to Paint Modes
This adds tabs for Tools, Options, and Grease Pencil to Sculpt, Texture Paint, Vertex Paint, and Weight Paint. These tabs and their panel allocations were discussed in T38346.

Close T38346
2014-02-10 11:48:24 -06:00
a0c54d71d8 Fix part of T38304: cycles render problem with zero length curve segments.
Now these are removed from the curve.
2014-02-10 18:33:27 +01:00
c046cb80ed UI: allow clicking to close menus and popups (but not submenus). 2014-02-11 04:23:44 +11:00
d2b5f0f6c2 UI: fix own error, dont add slider pad when neither sides align 2014-02-11 03:38:48 +11:00
c9f7ebce80 OSX/scons: adapt forgotten CCVERSION conditional, sorry 2014-02-10 15:56:37 +01:00
151d93d2bf OSX/scons; Adapt ftemplate-depth=1024 condition to new compiler versioning 2014-02-10 15:05:19 +01:00
6b7f03678e OSX/scons: fix breakage after clang-openmp commit:
use the svn clang version instead of Apple compiler naming,
this also makes Brecht’s cycles sse/avx conditionals behave right
2014-02-10 14:55:44 +01:00
644ca76356 Fix T38576: cycles hair not rendering in edit/paint modes. 2014-02-10 14:29:21 +01:00
7096529704 Fix T38501: blender crashes right after adding image texture to material
in cycles

Also fix very similar problem in half-float SSE conversion.
2014-02-10 17:19:26 +04:00
2f01be2b2f UI: panel tabs, use simple color interpolation that ignores alpha 2014-02-10 17:06:56 +11:00
311883fc3b UI: First pass at creating some tooltip descriptions for the various editor types
While some of these are rather rough and crude, they should be sufficient to provide
some helpful hints to (new) users when mousing over the editor type selectors
(i.e. now we can see the names of the editors; without the descriptions, the enum
item names wouldn't get shown) and also when browsing the list.

This is useful now that we have the ability to display tooltips in menus, thanks
to Campbell's earlier commit (35f62bd)
2014-02-10 16:24:04 +13:00
5cf987cff8 Patch T38282/D295: Add a time offset to the FCurve Noise Modifier
FCurve Noise Modifer now has an extra float property which offsets the noise in time.
This is useful for creating follow through in procedurally animated noise.

For example, if you've used a noise modifier on a parent bone to add additional movement,
a quick and easy way to add overlapping motion is to create copies of that modifier on
its children, and then offset the time those curves play at. See this in action at:
http://youtu.be/Ph6fk_z_k3k

Reviewed By: Joshua Leung
2014-02-10 16:21:12 +13:00
3432f34d05 UI: report if WM_OT_call_menu uses an unknown menu 2014-02-10 14:17:33 +11:00
05dfd852ec UI: fix for issue in last commit, popups show above the buttons again 2014-02-10 13:44:59 +11:00
35f62bdced UI: refactor menus to remove menus encoded in strings
On every redraw a single unopened dropdown boxe would translate
and convert every EnumPropertyItem into a string,
then decode every item, and search those items to find the name of the button to draw.

Replace this with a custom menu callback for RNA enums,
tooltips for enums now show too.
2014-02-10 13:04:43 +11:00
21b60ea7e1 UI: use RNA for colorband interpolation menu 2014-02-10 13:04:43 +11:00
a84bcea070 OSX/scons: allow for compiling with clang-openmp-3.4
See: http://clang-omp.github.io
+ fix a longstanding bad include in darwin-config
2014-02-09 18:03:13 +01:00
685c7a2272 Code cleanup: Remove Debug closure declaration. 2014-02-09 14:41:45 +01:00
04db32b698 Code cleanup: fix compiler warning with clang. 2014-02-09 13:56:49 +01:00
c6d1eaa3b2 Cycles: use COMPAT_ENGINES mechanism for UI panels.
This way addons like network renderers can more easily reuse them.

Reviewed By: brecht
2014-02-09 13:55:54 +01:00
6bad063298 RNA: add RNA_enum_from_identifier, RNA_enum_from_value search functions
also fix leak in RNA_enum_is_equal
2014-02-09 17:31:02 +11:00
b105d2ac7f UI: replace uiPupMenuOkee & uiPupMenuSaveOver with WM_operator_confirm 2014-02-09 12:32:20 +11:00
873f901e5a UI: improve reports popup
- use labels rather then menu items (items selected but did nothing)
- each report gets its own icon (icons besides first were ignored)
- use uiPupMenu rather then string based menu.
2014-02-09 12:00:03 +11:00
52f080604b Code cleanup: remove unused menu functions 2014-02-09 11:25:32 +11:00
385c892418 UI: use proportional option while dragging buttons 2014-02-09 08:42:45 +11:00
a8a567d28e RNA: add flag to be used for changing numbers proportionally 2014-02-09 06:30:48 +11:00
06e0e3fb8a Py Docs: move bpy.props options and subtype flags into generic defines
added some missing flags into docs too.
2014-02-09 06:26:55 +11:00
cb685c46bc RNA API: remove unused PROP_NEVER_CLAMP flag 2014-02-09 05:53:18 +11:00
da33a557bc Fixes to make script_load_keymap test pass.
Removed Armature Sketch keymap, as the entries that were there
appear to have been moved to the Armature keymap.
Removed the Script keymap. The Script space is deprecated
and I could find no way that the keymap could be activated.
2014-02-08 10:52:56 -05:00
3276b83fda UI: support for alpha tab background 2014-02-09 01:39:09 +11:00
6952bf2728 T38482: Fixed the Crashing. If the same UV Layer is referenced multiple times, then the last imported data set for this UV Layer wins. 2014-02-08 13:14:58 +01:00
43933989a9 Fix collada compile ( kudos ti ideasman ) 2014-02-08 00:24:49 +01:00
127330d6ca UI: multi-drag number button editing
clicking and dragging down edits multiple number buttons at once. (patch D270)
2014-02-08 09:42:26 +11:00
ff0ceb9926 UI: split ui_button_execute_do into begin/end 2014-02-08 09:42:26 +11:00
2dafd1bfb8 UI: butstore API to generalize button storage for modal handlers 2014-02-08 09:42:26 +11:00
b0c314af9f Cycles Standalone: Expose Shader settings in the xml api. 2014-02-07 23:23:37 +01:00
9025101122 Cycles Standalone: Exit when no xml file can be found. 2014-02-07 22:31:38 +01:00
f54e3589a4 some systems didnt define NULL 2014-02-08 08:09:49 +11:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
1c24d954f4 Texture Nodes: "At" distortion node was missing from the add menu. 2014-02-07 20:12:42 +01:00
d2699f233a Fix T38538: repeat history menu show operators that can't be repeated. 2014-02-07 17:11:09 +01:00
b4fb1e6d9f Bevel Modifier: fix bug T37916, bad result after mirror modifier.
Bevel needs the vertex normals to be correct and they are not
normally recalculated after a previous modifier, like mirror.
Adding 'dependsOnNormals' -> returns true to modifier info
for Bevel fixes the problem.
2014-02-07 10:46:22 -05:00
83f66a0cd5 UI: avoid O(n2) for old button lookups since both lists are almost always aligned 2014-02-08 02:27:05 +11:00
86df4baef8 Code cleanup: move old->new button search into ui_but_find_old 2014-02-08 01:49:24 +11:00
6135797ec8 Fix for button comparisons ignoring rna-index 2014-02-08 01:34:22 +11:00
8614ed64ed Add Tabs for Movie Clip Editor
Based on the patch from Sebastian Koenig, discussed with Jonathan Williamson

  https://developer.blender.org/T38172

Also removed redundant modes from clip editor.

Reviewers: brecht, carter2422

Reviewed By: carter2422

CC: sebastian_k, carter2422

Differential Revision: https://developer.blender.org/D293
2014-02-07 20:27:59 +06:00
e2e9c51900 Fix T38370: Ubuntu 14.04 opencolorio segfaults blender on parsing colormanagement/config.ocio
Ubuntu hack: add a --libyaml-cpp-ver parameter, to try to force installing a given version of this lib...
(only for DEB-like distro, I dare hope Trusty (!) is the only affected distro.
Not happy at all to have such things here, this is actually an Ubuntu bug, but will have to live with it I guess.
2014-02-07 15:24:17 +01:00
9c83ed774b Fix T36979: wrong render of textured mesh lights with multiple importance sampling. 2014-02-07 15:09:34 +01:00
52bae9691b Fix T38521: skin modifier crash with zero radius vertices. 2014-02-07 13:41:42 +01:00
1f5029b184 Fix T38503: crash in non-threadsafe VBO free code during render. 2014-02-07 13:33:15 +01:00
b53f310be8 Quiet warning 2014-02-07 09:39:22 +11:00
cfa49976c4 * Typo fix. 2014-02-06 21:53:58 +01:00
7692bf02e0 UI: Fix Cloth panel after 28936a4150, was too large and looked bad.
* Move Sewing Springs to a dedicated panel, the "Cloth" panel is too crowded already, and the sewing springs feature is nicely isolated.
2014-02-06 21:45:59 +01:00
0f8ad228c3 Fix T38526: crash using blackbody node on background with multiple importance sampling. 2014-02-06 21:10:22 +01:00
135e4e69a1 Fix T38524: Cycles not rendering sky texture correct when the direction vector is not normalized. 2014-02-06 21:10:22 +01:00
28936a4150 Patch T31269: Add sewing seams to cloth simulation
Description:
--------------------------
Use loose edges marked as seams as sewing springs.

Usage:
-------------------------
All this patch does is set the rest length to 0 and the stiffness to 1 for springs for loose edges marked as seams so that during the cloth simulation they will be brought together.

Example Video:
-------------------------
http://www.youtube.com/watch?v=-Y_bC0gjoM0

Original Patch by thesleepless (+ git patch by codemanx)

Thank you!
2014-02-06 18:55:08 +01:00
e2541f87bc Fix T38516: crash when using color picker from redo panel. 2014-02-06 18:02:31 +01:00
10b82471f4 Fix T38515: python menu tooltip description affecting unrelated menus. 2014-02-06 16:14:58 +01:00
e8e32db3be Fix compile error in last commit, forgot to include this change. 2014-02-06 16:10:17 +01:00
a41648c1dc Cycles: add pass alpha threshold value to render layers.
Z, Index, normal, UV and vector passes are only affected by surfaces with alpha
transparency equal to or higher than this threshold. With value 0.0 the first
surface hit will always write to these passes, regardless of transparency. With
higher values surfaces that are mostly transparent can be skipped until an opaque
surface is encountered.
2014-02-06 15:24:15 +01:00
5cbddd4ca4 Bye-bye FAST!
FAST detector has been replaced with fancier Harris,
so no need to keep FAST library in the sources now.
2014-02-06 18:13:12 +06:00
9c587ae8a0 Fix wrong animation duration when using older Libav 2014-02-06 15:57:32 +06:00
4f40f8780d Remove unnecessary debug print 2014-02-06 15:31:54 +06:00
11112d4d22 Fix T38498: properly unlink scene pointers from SpaceNode.
This fixes the first case mentioned in the report. Has to do some ugly
DNA access to SpaceNode, unless we'd allow a bad level call there to do
it in ED_node ...

The second case has been fixed by @sergey in D274:
https://developer.blender.org/D274?vs=838&id=879#toc

So actually asan just did its job here, good to know!
2014-02-06 10:14:29 +01:00
2b9702f4bf Fix T38500: Audio of a scene strip can't be muted
Exposed Audio Volume of a scene to properties of a scene strip.
2014-02-06 13:50:42 +06:00
39ad2cd8f8 Fix lamps drawing only partially in OpenGL render.
It should draw lamps entirely, this happened due to hack to hide object centers.
2014-02-05 22:14:25 +01:00
0f91f56ce3 Cycles Network rendering, remove some exception throwing, replace with saner error handling
This patch adds a network_error() function more alike how other devices handle error's

- it adds a check for errors on load_kernels to make sure we do not crash if rendering without a server.
- it uses the non throwing variation of boost::asio::read.

Reviewers: brecht

Reviewed By: brecht

CC: brecht

Differential Revision: https://developer.blender.org/D86
2014-02-05 21:55:51 +01:00
aa3d88d34d Fix T35328: Disk caches of multiple particle systems on a single object overwrite each other
It was intended to work actually using particle cache's stack index
but this index might have been calculated incorrect in special case:

* With default cube scene, add particle system to the cube
* Add disk cache to the particle system
* Save file and reload it
* Add another particle system and enable disk cache

This would lead to two point caches with the same stack index of zero.
This happened because point cache indices list wasn't stored in the
.blend file so once you've reload your file blender doesn't know anything
about number or point caches used.

And what was even more confusing is that point cache indices list was
trying to be load from the file, but this failed because it wasn't in the
file.

This commit solves the root of the issue which is ability of producing
.blend file with two point caches using the same disk cache. This is
done by making it sure that point cache indices list is stored in the
.blend file. And also made it so disabling disk cache will tag it to
recalculate stack index.

Old broken files wouldn't magically start working, but fixing them is
rather simple manually by toggling Disk Cache option.

Reviewers: lukastoenne, brecht

CC: sergof

Differential Revision: https://developer.blender.org/D286
2014-02-05 23:46:10 +06:00
6a4f2fd552 Fix T35810: Texture faces display white in 3D view, when used as a Particle Object
This in fact seems some kind of video driver limitation, because it worked fine
on windows but failed on linux here. The guess is that textures doesn't always
work on display lists, or we simply do have some wrong OGL context somewhere.

This is a workaround for until bigger viewport draw refactor is done (as Brecht
mentioned display lists are deprecated in new OGL anyway).
2014-02-05 23:46:01 +06:00
78c491e62a Fix T35247: Particle texture behaves incorrectly after changing the number of particles
Root of the issue goes to the order of particle initialization which does
texture evaluation (which does depend on particle coordinate) and particle
birth coordinate calculation. So basically what happened is:

* Changing number of particles re-allocated all the particles,
  which sets their coordinate to (0,0,0)
* Texture evaluation used this non-initialized coordinate
* Coordinates were calculated for particles

Reshuffled code a bit so now texture evaluation happens after particles.
coordinate calculation. Basically moved texture evaluation to particle
reset function. Reset happens after initialization anyway and it does
know particle coordinates. Also, if reset is being called without init
then it's also kind of logical to re-evaluate texture because particle
coordinates might change.
2014-02-05 23:46:01 +06:00
9800ed5f6d Code cleanup: replace magic constants with more verbose bitnames 2014-02-05 23:46:01 +06:00
290e1fc528 Add debug print to ID update tagging 2014-02-05 23:46:01 +06:00
0b63704c30 Fix player stubs after change in compositor 2014-02-05 18:44:48 +01:00
6bb090f4bb Building elbeem without openmp failed 2014-02-06 02:26:48 +11:00
4b3865be4e Fix compilation 2014-02-05 16:22:39 +01:00
6110a5bdef Scanfill: use poly_nr as an index rather then index + 1 2014-02-06 02:12:46 +11:00
af180ccf8a Quiet warning 2014-02-06 02:12:46 +11:00
1ab86e3f1f Fix T36769: fluid sim modifier can crash blender
Crash only happened when the number of openmp threads were greater than the resolution.
2014-02-05 15:37:38 +01:00
6213d88c85 Scanfill: avoid converting int<>intptr_t for displist indices 2014-02-06 01:07:18 +11:00
41d23116aa Scanfill: malloc arrays and zero init members 2014-02-06 01:03:02 +11:00
1687023776 Fix T38340 and T38473: fixed Scene pointers in Composite and Defocus nodes don't get updated based on context.
As discussed in T38340 the solution is to use the current scene from
context whenever feasible.

Composite does not use node->id at all now, the scene which owns the
compositing node tree is retrieved from context instead.

Defocus node->id is made editable by the user. By default it is not set,
which also will make it use the contextual scene and camera info.
The node->id pointer in Defocus is **not** cleared in older blend files.
This is done for backward compatibility: the node will then behave as
before in untouched scenes.

File Output nodes also don't store scene in node->id. This is only needed
when creating a new node for initializing the file format.

Reviewers: brecht, jbakker, mdewanchand

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D290
2014-02-05 13:51:51 +01:00
e9fda259da Fix T38476: incorrect hair draw type after editing particle system in edit mode. 2014-02-05 13:53:34 +01:00
13780799ea Fix T38478: pin panel, then ctrl+click to collapse others incorrectly unpinned panels. 2014-02-05 13:40:53 +01:00
06b6cd8345 PyAPI: mathutils.Vector.cross now works for 2d vectors (returns a float)
also fixed crash when running on large vectors (raises exception now)
2014-02-05 23:36:30 +11:00
7d4c04597e Fix T38466: F12 / ctrl F12 shortcuts not showing in Render menu.
This is tricking the keymap system a bit to make it match, this use_viewport
option has no effect when invoked from the info space.
2014-02-05 13:34:24 +01:00
8acf717b6d Fix T38471: parenting in the outliner was possible with library linked objects. 2014-02-05 13:16:46 +01:00
27d482425d Fix for RNA stringifying enum-flags freeing wrong pointer. 2014-02-05 23:08:34 +11:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
36fc4e15f6 Fix for vpaint_stroke_test_start returning operator flags, not bool
also use bools for paint callbacks
2014-02-05 22:18:33 +11:00
fc9626b1df Change confusing check discovered while working on HCL color wheel:
COLOR widgets never get created with UI_GRAD_V_ALT values. This is
intended for HSVCUBE color sliders only so reverting this to old value
before it was substituted with a define, which was -1.

There's one case where COLOR buttons get defined with a1 value different
than -1 which is in ui_def_but_rna. There the step value of the RNA
property is used. However, that meant that if step equaled to 9, which
is UI_GRAD_V_ALT value (unlikely) or if UI_GRAD_V_ALT was changed to 10
in future, or we added check for e.g. UI_GRAD_L_ALT which is 10 in HCL
branch, color widget would not get a color selection menu spawned.
2014-02-05 10:45:14 +02:00
88843caaa3 BGE: Fixing memory corruption/double free when duplicating (e.g., addObject) LibLoaded lights. 2014-02-04 14:48:22 -08:00
502f9312d8 Attempt to fix OSL build error on Linux with latest OSL master. 2014-02-04 22:50:11 +01:00
bd438de8c6 Cycles: bvh_cardinal_curve_intersect intro SSE optimization
Gives 5% speedup for koro_final.blend, 10-15% for hair.blend

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D225
2014-02-04 23:39:02 +04:00
d598dcd461 Code cleanup: remove scdata from ScanFillContext 2014-02-05 05:39:28 +11:00
6c17d2141b Scanfill: optimize filling curves, text, masks - skip calculating holes
Support for tagging polygon numbers when adding scanfill data,
saves having to calculate connectivity afterwards (which can take approx half overall scanfill time for complex curves).
2014-02-05 05:27:01 +11:00
db74968402 Scanfill: minor optimization, comment unused code, avoid vert loop 2014-02-05 05:27:01 +11:00
f18d8a5a66 Correct 3d text editing update logic
- editmode operations were converting text->nurbs twice.
- cursor and selection operations were re-tessellating text every time.
2014-02-05 05:27:01 +11:00
df944eb041 SCons: code cleanup, shorter way to determine makesrna output directory.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D237
2014-02-04 19:09:41 +01:00
cb0a5adc56 SCons: cleaner determination of 32-bit/64-bit builds
Try not to be x86-centric, remove unneeded blenderdeps variable.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D240
2014-02-04 19:01:10 +01:00
959da7477d Fix missing $BLENDER_USER_DATAFILES in command line help text.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D249
2014-02-04 18:51:05 +01:00
17b6143244 Correct help: -b/--background does not take a file argument
The documentation for the -b/--background option incorrectly states that it
takes a <file>, however it can run also without a file with e.g. a script.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D250
2014-02-04 18:51:05 +01:00
142228433a Cleanup: remove completely all-static option, just too complex to support in modern linuxes! 2014-02-04 16:52:33 +01:00
2ebffd01da Deb-like distro may use either jack or jack2, add support for this. 2014-02-04 16:52:33 +01:00
28e6d05e09 Fix cycles crash with float image textures on CPU without AVX support.
The AVX kernel functions for reading image textures could be get used from non-AVX
kernels. These are C++ class methods and need to be marked for inlining, all other
functions are static so they don't leak into other kernels.
2014-02-04 16:07:50 +01:00
30b5aef678 Fix T38427: Sculpt mode dimension changes don't Undo 2014-02-04 19:47:17 +06:00
1d260d84ad Fix T38411: Free keyframe handles do not snap to frames when duplicating 2014-02-04 19:12:19 +06:00
5f99f8bee7 Node UI: Improved layout for the Shader Mapping node, to match UI guidelines better (top -> bottom layout).
Patch by Sebastian König. Thanks!
2014-02-04 13:21:30 +01:00
605910f060 Fix T37577: Joining two objects with different UVs destroys UVs of one object in some specific, reproducable, cases
MLOOPUV CDlayers had "UV Coord" default name, instead of "UVMap", when it is mandatory matching MTEXPOLY and MLOOPUV to have the same name!
2014-02-04 12:10:59 +01:00
7a2d0f23fb View3d: fix for roll operating on locked views, now apply to user view 2014-02-04 21:45:13 +11:00
0b5d0f9818 View3d: move lock check for orbit into a function and use for dolly too 2014-02-04 21:45:13 +11:00
a82700b961 Fix for view lock checks with ndof ops, was incorrectly comparing flags 2014-02-04 21:45:13 +11:00
5589016e24 Fix T38440: Segmentation fault in Movie Clip Editor
Issue was caused by NULL-pointer de-reference when post-processing
the frame without putting the frame to movie cache.

Differential Revision: https://developer.blender.org/D276
2014-02-04 15:26:57 +06:00
b29bfd5daa Fix T38469: Strip delimiter handlers don't move strip correctly with keyboard input
Issue was in fact in strip update code when transforming, in case we move both left and right
handles the strip is handled twice in the loop, but it was always updated at the end of the
first loop only...
2014-02-04 09:55:09 +01:00
bb36037c15 Fix T38472: allow orbiting locked view when they are already 'user'. 2014-02-04 19:45:22 +11:00
6a2c467443 Blenderplayer: Fixing a memory leak.
IMB_moviecache_destruct() was not being called.
2014-02-03 14:25:59 -08:00
eaafa58c2b Code cleanup: removed unnecessary #defines causing re-definition warnings
Fixing warnings in own recent commit
2014-02-03 21:27:11 +01:00
76543574bc Code cleanup: declarations for removed functions 2014-02-04 07:20:19 +11:00
4b07579cd4 Cycles_server also needs to link to libdl on linux 2014-02-03 20:19:15 +01:00
cb96cf0b63 Cycles: small optimization for SSE 4.1 bvh intersector
Gives 0.7% - 1.3% speedup for BMW1M-MikePan scene.

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D280
2014-02-03 20:49:07 +04:00
eff3bd4e98 Fix T38439: allow IOR in range [0, inf] instead of [1, inf] in Cycles.
The same can be achieved by flipping normals on the mesh, but it can be
convenient to do this in the shader.
2014-02-03 17:08:34 +01:00
8b1731e13d Scanfill: skip checks for loose edges when they can't occur
Only editmesh needs this, text, curves, masks - can all skip this check
2014-02-04 02:57:27 +11:00
3314165a66 Fix T38452: on OS X 10.9, now always use Lion style fullscreen.
On earlier versions there is no proper multi-monitor support, so we leave the
choice still. But for 10.9 this just interacts better with other elements like
spaces and the dock.
2014-02-03 16:48:31 +01:00
0d7586739a Code cleanup: replace while -> for loops 2014-02-04 02:23:34 +11:00
68521841a8 Bevel: remove unused assignments.
Caught by coverity.
2014-02-03 09:53:27 -05:00
e996b88004 Fix T38424: modal number input ctrl - did not work, only ctrl numpad -.
Since there isn't always a numpad available this should work.
2014-02-03 15:49:24 +01:00
a0e03bb5cf Fix part of T38425: keymap editor search for "1" only showed numpad 1, not 1-key. 2014-02-03 15:48:50 +01:00
3d8c1068ba Fix T38420: Segfault when curve deform modifier and cyclic dependency
Crash was caused by missing curve_cache due to cyclic dependency.
This commit is rather a workaround, but we couldn't really guarantee
proper behavior in cases with cyclic dependency. So rather than calling
object update directly as it used to be let's don't perform curve
deform and be safe for threading instead.
2014-02-03 19:42:27 +06:00
037d5228a1 OSX: tentative set back TEST_BLENDER_EXE to Debug hardcoded for xcode case,
did not found a way yet to use Configuration or run CTEST out of xcode
2014-02-03 14:35:31 +01:00
7fbb7e32fd Fix T38450: Remove unused Children Offset option
This option was only exposed to the interface and internally
was doing basically nothing.

Removing it to prevent artists from being confused.
2014-02-03 19:34:29 +06:00
04984430ce Cycles: enable /arch:AVX in msvc 11 and later versions for avx kernel
This enables VEX-encoding in AVX kernel for windows msvc builds and gives 5-10% speedup for different scenes.

Reviewers: juicyfruit, dingto, brecht

Reviewed By: brecht

CC: brecht

Differential Revision: https://developer.blender.org/D284
2014-02-03 17:22:50 +04:00
d484eb8c25 Fix T38421: Vertex Parenting & Triangle Vertex Parenting causes segfaults.
Issue was caused by clearing dirty flags from element table in bmesh before
the data was fully ready.

This confused checks happening from threads and some threads did consider
element table is usable while other thread was still filling it in.
2014-02-03 19:13:25 +06:00
89a846df51 Add compatibility for older Collada files
The Fix in 273 creates a backward incompatibility:
Collada files that have been created with an older Blender version
will contain the spotlight_size in Radians where Collada wants
this value to be in DEGREE.

This fix adds a check for the Blender Version that was used to create the
Collada file. If the Collada file was made by an older version of Blender
then the importer will assume that spotlight_size is specified in RADIANS.

Reviewers: campbellbarton, sauraedron

Reviewed By: sauraedron

CC: jesterking

Differential Revision: https://developer.blender.org/D279
2014-02-03 13:04:51 +01:00
4bd6423b7e Fix EXECUTABLE_OUTPUT_PATH binpath for OSX makefiles ( no CMAKE_BUILD_TYPE dir used here ) 2014-02-03 12:58:03 +01:00
9bec4f7779 Fix T38455: Blenderplayer is not working
Was a regression since avg_frame_rate changes.

Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.
2014-02-03 17:25:47 +06:00
15f449c529 Add include for FreeBSD and clang 2014-02-03 22:04:56 +11:00
2f8de5075d Fix another player stub after type change 2014-02-03 11:55:55 +01:00
37381ef492 BGE: correct for last commit 2014-02-03 21:41:36 +11:00
b783140ef6 Image/Animation loading, remove user-pref extension check.
don't use extension checking preference for low level loading functions,
otherwise a user preference may impact a script loading a file for example.

looked into making this an argument and passing it in, but theres no
real advantage and its simpler just to remove.
2014-02-03 19:37:40 +11:00
107566ebf1 Code cleanup: check -1 for error return explicitly 2014-02-03 19:35:44 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
a948ae2c51 Fixed a possible access to null pointer reference.
Patch by tamerlan311 (Alex Babahin)

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D282
2014-02-03 13:56:03 +06:00
65b1ace941 Fix T38447: Deactivated hotkeys are still showing in menu 2014-02-03 19:23:50 +13:00
b320139c67 Use bool where appropriate 2014-02-03 19:23:49 +13:00
1dc1d92dab Code cleanup: white space and cmake was broken on all platforms 2014-02-03 13:56:34 +11:00
236e468359 Assure test works in all OSX buildenvironments/build-types 2014-02-02 23:35:00 +01:00
482823a1ab Fix T38435: Crash when pressing MMB in walk mode
Snap code may be called with a NULL region, add check about this and assume ray_start is OK in this case!
2014-02-02 20:35:45 +01:00
c0e6a0d318 Code cleanup / Cycles: Remove unused "curverender" variable from Object class, was never used. 2014-02-02 20:11:50 +01:00
5c06b2d33e Code cleanup / Cycles: Remove encasing_ratio variable, it was already hard coded, so define it in the kernel only. 2014-02-02 19:53:04 +01:00
44b71c8c6c Added bevel regression test to tests.
Goes with companion files bevel_regression.blend
and mesh_ops_test.py just added to svn lib/tests/modeling.

Also changed the blender executable path for Apple case:
needed either 'Debug' or 'Release' in the path. I chose
'Debug', because not sure how to add otherwise. At any
rate, what was currently there didn't work at all.
2014-02-02 13:29:55 -05:00
c11f6abc57 Add "Create" tab and panel for Metaball Edit Mode
This makes the Create tab consistent in metaball editmode with other object types.
2014-02-02 12:27:26 -06:00
6739d9b072 Reorder Curve "Create" tab and add "Create" tab for Surfaces
This ensures the Create tab doesn't move and that it's available for Surface object types.
2014-02-02 12:05:13 -06:00
97c2be3009 Remove Grease Pencil panels from toolbar, has own tab
The Grease Pencil has it's own dedicated tab. It's no longer necessary to draw in a panel for each object type.
2014-02-02 11:38:14 -06:00
c1bdf69805 Update tabs for non-mesh object types
This adds appropriate tabs, panels, etc for curves, surfaces, metaballs, text, and armatures. This brings it in line with the changes in rB0972c422c3ac4ed725414baa47838f833b3f4c90
2014-02-02 11:31:24 -06:00
0972c422c3 Update Object Mode Toolbar Tabs
This updates the object mode toolbar tabs to reflect the rationale from the Edit Mode tabs.
- Rename "Basic" to "Tools"
- Put "Transform" into it's own panel within Tools
- Also rename Edit Mode "Mesh Tools" to "Tools" for consistency and shorter names
- Ensure Tools tabs are in same location between Edit and Object modes
- Remove redundant "Transform" label from Transform panel
2014-02-02 11:05:08 -06:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
dda63375b2 Fix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)
Added some relevant #defines copied from extern\libmv\third_party\msinttypes to BLI_sys_types.h so they can be used in blenlib. Made smallhash.c use the BLI_sys_types.h include rather than including <stdint.h> directly
2014-02-02 14:40:52 +01:00
a16998911b Freestyle: Fix for iterations over 0D elements in the reversed order.
The revision is concerned with Interface0DIterator and StrokeVertexIterator.
These iterators can be generated by Interface1D::vertices_end() and
Stroke::stroke_vertices_end(), respectively.  These methods return an
iterator poinitng the next index of the last 0D element (i.e., iterator's is_end
property is true).  When the iterators created in this way are used with
Python's iterator protocol (e.g., in a for-loop), iterations over 0D elements
are automatically performed in the reversed order.  This functionality was
broken after recent revisions concerning Freestyle iterators.

Also made minor code cleanup (white space).
2014-02-02 22:05:32 +09:00
41d778fa5d Docstring updates and code cleanup by flokkievids (Folkert de Vries). 2014-02-02 22:05:31 +09:00
bab88fee20 Code cleanup (mostly indentation and white space). 2014-02-02 22:05:30 +09:00
e9e2813fbe Fix for iterators' at_start flag left unset in C++ to Python conversion utility functions.
Also changed the type of the 'reversed' flag from int to bool.
2014-02-02 22:05:29 +09:00
b58beed604 Imported D222 Diff 2 (ID 781) by flokkievids (Folkert de Vries). 2014-02-02 22:05:28 +09:00
41cc86a666 Add include needed for clang, quiet warning 2014-02-02 21:33:52 +11:00
42b68c2b1d BMesh: optimize loop_find_regions, reserve array size 2014-02-02 17:41:59 +11:00
b4ae05e4db BMesh: optimize lookups for triangle fill 2014-02-02 17:09:38 +11:00
c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
dcd90d67c8 Smallhash: fixes/improvements
- use magic numbers based on uintptr max, not uint max, to avoid possible collisions with real pointer values on 64bit systems.
- comment BLI_smallhash_remove for now, its not used.
- added smallhash_val_is_used replacing ELEM() checks
- updated docs
2014-02-02 16:24:33 +11:00
7c9b106589 Smallhash: optimizations
- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.
2014-02-02 02:24:48 +11:00
a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
798e684c7c Math lib: simplify size_to_mat4 and use in b_bone_spline_setup 2014-02-02 02:24:47 +11:00
5fce3457b7 Math lib: add axis_angle_normalized_to_quat, use when length is known 2014-02-02 02:24:47 +11:00
a9e7c7b848 Fix T38432, Fix 38432: more stupid error in view3d ray code, sorry about that. 2014-02-01 15:06:13 +01:00
1ff299b317 Cycles: less instructions for CPU perlin code
Also move shuffle() in bvh traversal back (was accidentally lost in SSE hair revert)
2014-02-01 14:07:53 +04:00
62a3fe2323 Fix player stub after type change 2014-01-31 20:56:51 +01:00
70f2389f5a Code cleanup: be less vague checking invalid index values 2014-02-01 02:01:00 +11:00
1af6e656ec Fix for error setting unique names for tracks 2014-02-01 02:01:00 +11:00
34a0532584 Code cleanup: comments and warnings 2014-02-01 02:01:00 +11:00
eeefbbcc78 SCons: Simplify Endian determination
Differential Revision: https://developer.blender.org/D252
2014-01-31 13:20:26 +01:00
9896508e14 Fix compilation error with msvc2012 and 2013 as well 2014-01-31 15:33:48 +06:00
d291d15c19 Fix for T32843
Exported angles for spot size animation is in radians , however Collada expects it to be in degrees.
This patch is for fixing import and export, and also renaming a variable

Reviewers: gaiaclary

Reviewed By: gaiaclary

Differential Revision: https://developer.blender.org/D273
2014-01-31 09:35:00 +01:00
a7b1349ce4 Events: fix for wmEvent prevx, prevy not updating 2014-01-31 07:42:34 +11:00
1e096ee816 More snapping fixes (this is ridiculous).
I hope this time we are done!
2014-01-30 18:50:12 +01:00
0e1c1b6196 Code cleanup: remove BLI_has_parent 2014-01-31 03:30:05 +11:00
3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
0cb49286ce Fix T38409: Snapping Bug
Issue partially caused by own errors (glicth in new BKE_boundbox_ray_hit_check() code causing segfault in volume snapping,
and we have to treat ortho and persp differently in case of face snapping, because in persp our ray_start might very well
already be *inside* the boundbox of the checked object), and partly due to the fact that ED_view3d_win_to_vector()
was returning wrong vector (negated one) for ortho views (see previous commit).
2014-01-30 17:16:07 +01:00
f54ed9f5e0 Fix a nice bug in ED_view3d_win_to_vector() - vector returned for an ortho view was negated compared to vector returned for the same view in perspective...
Found while working on snapping issues, confirmed using bisect tool: previous to this commit, inner/outer parts were swapped when switching from otho to persp!
2014-01-30 16:51:44 +01:00
2011156eec Fix for crash linking node groups through bpy.data.library
Defer creating the Python objects until after appending is finished
because NodeTree's types are not initialized until then.
2014-01-31 00:56:19 +11:00
2b55d7895c Fix T38403: Laplacian smooth on instanced objects leads to crash.
The laplacian modifiers (smooth and deform) use the OpenNL library,
which is not threadsafe due to the use of a global context variable.
Ideally this would be changed so that an explicit context can be
created for every caller of the OpenNL functions, but since OpenNL's
most recent version is from 2010 this is unlikely to happen.

As a workaround for now just use a mutex to prevent conflicting OpenNL
calls. Eventually OpenNL can be replaced by eigen or ceres.
2014-01-30 13:09:32 +01:00
810c6d1880 Fix T38358: typo in own rB77089a3bf203.
Also allowed me to fine another potential issue, hit.dist was no more initialized correctly - and I had forgotten to take into account Brecht's remark about normalize_v3() also returning the vector's previous length.
2014-01-30 11:54:55 +01:00
1f64371ec0 Smallhash: refactor and fixes
- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p
2014-01-30 21:10:55 +11:00
ab6157a06a PyAPI: noise.seed_set(), note that zero is a special case. 2014-01-30 17:56:07 +11:00
bd697dd4d7 Fix T38402: invalid message for bad type assignments (Quat, Vector) 2014-01-30 16:45:20 +11:00
6e479b18ef Code cleanup: remove (now) redundant empty text with icon_only 2014-01-30 16:31:57 +11:00
5f47f1370e UI: move toggle icons out of layout checks into rna 2014-01-30 16:24:51 +11:00
9598990b9b UI API: don't use a text label when icon_only is set 2014-01-30 15:28:39 +11:00
b3bb50f687 Warnings: quiet unused define message 2014-01-30 15:26:22 +11:00
dd684f5a04 Fix T38400: crash in image_listener accessing deleted object.
Listeners should never dereference this pointer because the object may have
been deleted, it can only be used for comparisons.
2014-01-29 20:29:30 +01:00
77089a3bf2 Fix T38358: Face snapping fails on Orthographic view
Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews.
The loss of precision on the ray location induced by this can lead to face snapping failures.

Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back
to the found distance the diff to the real start point once detection is done (as we need all hit distances
from all tested objects to be relative to a common point!).

Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer
from this issue.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D268
2014-01-29 20:10:03 +01:00
95e153a319 Fix T37661: color ramps and curve mapping editing not disabled for linked data. 2014-01-29 19:02:32 +01:00
8ba9702284 Code cleanup: remove redundant makesrna call with platform "linuxcross".
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D235
2014-01-29 18:29:20 +01:00
fa0d65d512 Fix accidental description change in recent commit. 2014-01-29 18:28:09 +01:00
6c329304c1 Fix bone transform issue where the bone roll depends on intermediate mouse positions.
It computed the roll compatible with the previous mouse position roll value,
now it uses the initial roll value.
2014-01-29 17:03:16 +01:00
26f3df5565 Update Edit Mode tabs for mesh objects
This greatly improves the mesh edit tabs after a few weeks of feedback, making the tabs more practical with less need to switch tabs often.  Based on discussion on IRC and T37568.

Reviewers: campbellbarton

CC: campbellbarton, brecht

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D269
2014-01-29 09:53:20 -06:00
289c5de7d8 Fix T38359: incorrect display of material slot with pinned particle settings.
Just hide it in this case, the material slot is not really valid without an
object in the context.
2014-01-29 16:50:37 +01:00
299180f3c6 Fix T36955: API docs referred to sys.maxint which does not exist in Python 3. 2014-01-29 16:49:12 +01:00
be849f6f7e Fix T37038: user preferences > input category names unnecessarily cut off. 2014-01-29 16:36:42 +01:00
1e0654f162 Fix T38393: bone roll not restored properly after cancelling rotation of bones. 2014-01-29 16:14:21 +01:00
41ee052a45 renamed unclear API parameter 2014-01-29 15:37:02 +01:00
f17a1bd58b Fix T38388: Creating a new scene with full copy sets rigidbody collision shapes to box.
Tweak world rebuilding logic, so it's not done before object data was
updated.
2014-01-29 15:03:41 +01:00
44cb138cf2 Fix sconscript syntax error when using python 2.x instead of 3.x. 2014-01-29 14:50:20 +01:00
ac27a1a0f6 Scons: Some tweaks for f70d966047, we don't need SSE41 kernel for 32bit, nor vc2008 x64. 2014-01-29 13:29:24 +01:00
bc08cf5857 UI: Make "Lock Interface" a icon only button and pack into the Display row, we don't need a dedicated row for this option, also it looked quite bad for Cycles. 2014-01-29 13:29:23 +01:00
9612433884 UI: minor optimization for button lookup, break early when button found
also reduce int/float conversion
2014-01-29 23:05:32 +11:00
5c750b76f2 Move depsgraph debug print under --debug-depsgraph command line argument 2014-01-29 17:48:07 +06:00
a68ceb0af8 Option to lock the interface while rendering
Added function called WM_set_locked_interface which does
two things:

- Prevents event queue from being handled, so no operators
  (see below) or values are even possible to run or change.
  This prevents any kind of "destructive" action performed
  from user while rendering.

- Locks interface refresh for regions which does have lock
  set to truth in their template. Currently it's just a 3D
  viewport, but in the future more regions could be considered
  unsafe, or we could want to lock different parts of
  interface when doing different jobs.

  This is needed because 3D viewport could be using or changing
  the same data as renderer currently uses, leading to threading
  conflict.

  Notifiers are still allowed to handle, so render progress is
  seen on the screen, but would need to doublecheck on this, in
  terms some notifiers could be changing the data.

  For now interface locking happens for render job only in case
  "Lock Interface" checkbox is enabled.

  Other tools like backing would also benefit of this option.

  It is possible to mark operator as safe to be used in locked
  interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator
  template flags.

  This bit is completely handled by wm_evem_system, not
  with operator run routines, so it's still possible to
  run operators from drivers and handlers.

  Currently allowed image editor navigation and zooming.

Reviewers: brecht, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D142
2014-01-29 16:07:14 +06:00
39eb314cb9 UI: Refactor timecode functions into BLI_timecode
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions

Patch D227 by Andrew Buttery with own refactoring.
2014-01-29 20:44:01 +11:00
f70d966047 Scons: refactor cycles kernel code to avoid building the AVX kernel with
compilers that don't support it.

CMake still needs to updated to work the same for consistency, but this should
fix the OS X buildbot at least.
2014-01-28 23:02:06 +01:00
52ea13e970 Fix T37999: incorrect windows size with Visual Studio 2013 builds.
This is a known bug in Windows, now work around it.
https://bugreports.qt-project.org/browse/QTBUG-36192
http://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
2014-01-28 21:37:40 +01:00
ae46e8a698 RNA: add rna_space_api.c for space functions 2014-01-29 07:31:54 +11:00
5643c29fbe File Reading: add revert operator
Patch D247 by Evans Jahja with edits
2014-01-29 05:34:57 +11:00
8c688a052c File Reading: add wrapper function for WM_file_read
also return cancelled when an operator fails to load a file
2014-01-29 05:33:05 +11:00
39202a53b5 Bevel: fix glitch in "pipe" case with square profile.
The "pipe" case -- where two beveled edges are in line
and there is at least one more beveled edge -- needed better
handling when profile parameter = 1.0 (square outward).
2014-01-28 13:20:42 -05:00
84f9587540 Cuda use streams and async to avoid busywaiting
This is my first stab at this and is based on this IRC converstation:

<mib2berlin> brecht: this is meaning as reminder only, I know you have other things to do > http://openvidia.sourceforge.net/index.php/Optimization_Notes#avoiding_busy_waits
<brecht> mib2berlin: thanks, bookmarked

only tested on Ubuntu 14.04 / cuda 5.0 but ill do some more testing tomorrow.

Also unsure about the placement and the lifetime of the stream and the event. But creating / deleting these seems to incur a non trivial cost.

Reviewers: brecht

Reviewed By: brecht

CC: mib2berlin, dingto

Differential Revision: https://developer.blender.org/D262
2014-01-28 18:40:08 +01:00
abf18033f3 Fix T38383: glitch drawing inactive slider 2014-01-29 04:10:39 +11:00
d34d7451a9 Viewport Drawing: apply matcaps to all objects 2014-01-29 03:39:19 +11:00
90ff9d7dca Code cleanup: remove check for painting non-mesh objects (its impossible) 2014-01-29 03:38:07 +11:00
aa51f499b3 Fix unused variable in the right way
It IS to be used :)
2014-01-28 22:14:50 +06:00
22e915e196 Code cleanup: unused var 2014-01-29 02:55:27 +11:00
9a1dcfbf2d Fix T38367: operators activated from popups didnt reuse settings 2014-01-29 02:54:46 +11:00
a283b099b1 Code cleanup: pep8 2014-01-29 02:20:59 +11:00
deab0d1040 Fix T38381, Fix T38184: key events getting lost when modal operator is running.
There is a hack for modal keymaps and double click events, which was (ab)using
the wmEvent.prevval variable to temporarily assign it KM_DBL_CLICK indicating
that the double click event was disabled. However the value of prevval can
actually be KM_DBL_CLICK in other circumstances too, which caused a key press
event to get converted to a double click event.
2014-01-28 16:15:45 +01:00
4683ac3886 Fix for a typo reported by flokkievids through code review comments D163#1. 2014-01-28 23:34:02 +09:00
0b22827033 Moved the Operators class from the 'freestyle' module to the 'freestyle.types' submodule. 2014-01-28 23:34:01 +09:00
e847328585 Patch set by Folkert Vries (flokkievids) with respect to T37565-patch-v1.zip (F32402).
Applied with minor modifications.
2014-01-28 23:34:00 +09:00
8ab3cf1db0 Fix for a missing submodule in the top-level 'freestyle' module package.
Reported by flokkievids, thanks!
2014-01-28 23:33:59 +09:00
54e9016770 Updated Freestyle API modules according to the new hierarchical package structure.
Additional bug fixes were also done along with the code updates:
* Fix for the use of old Interface1D.pointsBegin() and .pointsEnd() method names
in the definition of pyDensityAnisotropyF1D and pyViewMapGradientNormF1D.
* Fix for wrong data types (int instead of bool) for:
- pyChainSilhouetteGenericIterator constructor and its .orientation property in
modules/freestyle/chainingiterators.py.
- SpatialNoiseShader constructor in styles/external_contour_sketchy.py.
- ChainSilhouetteIterator constructor in styles/multiple_parameterization.py.
2014-01-28 23:33:58 +09:00
6498b96ce7 Reorganized the Freestyle Python API in a hierarchical package structure.
Both C- and Python-coded API components were rearranged into logical groups.
New Python modules are packaged as follows:

freestyle - Top-level package
freestyle.types - Classes for core data structues (e.g., view map)
freestyle.chainingiterators - Pre-defined chaining iterators
freestyle.functions - Pre-defined 0D and 1D functions
freestyle.predicates - Pre-defined 0D and 1D predicates
freestyle.shaders - Pre-defined stroke shaders
freestyle.utils - Utility functions

The Python modules are installed in scripts/freestyle/modules.  Pre-defined
styles are installed in scripts/freestyle/styles.

To-do: update styles according to the new Freestyle API package structure.
2014-01-28 23:33:57 +09:00
df471369e2 Bundle latest Libmv from upstream
Currently no functional changes, but we might want
to have scoped_array in the future.
2014-01-28 18:36:32 +06:00
37f1b717eb Bevel code cleanup: get rid of old 'ADJ' code.
The new subdiv 'adj' pattern is working well, so removing the
old code and taking opportunity to remove 'subdiv' from a number
of names.
2014-01-28 07:03:25 -05:00
be6643b5ec Followup to the previous commit
Need to take weight into account when drawing per-frame track
reprojection curve and when computing per-track average error.
2014-01-28 18:02:22 +06:00
c2da706a36 Code cleanup: remove references to svn and code style 2014-01-28 23:01:22 +11:00
59d1387c41 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.

Differential Revision: https://developer.blender.org/D265
2014-01-28 17:25:47 +06:00
1c0cdc385f 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.
2014-01-28 16:54:50 +06:00
98f5f989c9 Theme: update ubuntu and blender2.4x tab colors 2014-01-28 21:48:01 +11:00
9178dc9d38 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. It is also likely that less features
are detected, but better quality than quantity.

Blender will now use Harris detector by default, later we'll
remove FAST detector.
2014-01-28 15:37:19 +06:00
f194ab7659 Compilation fix for SCons
Was broken by recent FFmpeg changes.
2014-01-28 15:14:00 +06:00
dfdf19cc59 Code cleanup: more preprocessor indentation 2014-01-28 14:34:52 +06:00
790e30af67 Code cleanup: indentation of interior preprocessor 2014-01-28 14:33:42 +06:00
Anton Khirnov
2b858b45c2 audaspace: use new libavcodec audio encoding API where available 2014-01-28 14:25:40 +06:00
Anton Khirnov
f99e581ae1 libavformat API usage: use avformat_close_input() instead of av_close_input_file() 2014-01-28 14:20:22 +06:00
Anton Khirnov
414e40c353 libavformat API usage: use avg_frame_rate instead of r_frame_rate
r_frame_rate is a guessed number defined as "the least common multiple of
all framerates in the stream". It has been deprecated and removed in new
Libav releases.

Use avg_frame_rate instead, which is the average framerate of the
stream.
2014-01-28 14:18:41 +06:00
Anton Khirnov
b7f8bfef25 libavcodec API usage: use new video encoding API
avcodec_encode_video() has been replaced with avcodec_encode_video2()
in new libavcodec versions.
2014-01-28 14:17:50 +06:00
Anton Khirnov
8c3b27ce27 Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.

Update the code to use those new identifiers.

Added a compatibility code to ffmpeg_compat.h
2014-01-28 14:00:31 +06:00
6fe5b3be38 Fix T37673: Ray casting could fail with 0 collision margins
Use bullet's old method of doing ray casts to stay compatible with old
files. It's faster but a bit less accurate.
2014-01-28 08:31:56 +01:00
8fa4517a20 BGE: remove freestyle from stubs, all functions were out of use 2014-01-28 17:59:00 +11:00
8bf9bf37ec Identified the freestyle stubs breaking pragma GCC diagnostic error "-Wmissing-prototypes”, diasabling this case for now 2014-01-27 23:01:03 +01:00
3d408e10a4 Correct typo in the patch file as well 2014-01-28 02:16:44 +06:00
8870556def Fix compilation on Windows, syntax error. 2014-01-27 20:53:42 +01:00
11094a0b29 OSX/scons: fix own error in last commit and do a cleanup 2014-01-27 20:39:20 +01:00
efaadc3104 Attempt to fix compilation error with MSVC-2008 2014-01-28 01:37:41 +06:00
e983ed6aaa Revert the removal of Blender Internal Edge rendering, after artist feedback.
This reverts commit fb91a602c7.
2014-01-27 19:59:06 +01:00
15e08394a0 OSX/scons: consequently make use of the recently introduced C_COMPILER_ID and CCVERSION env vars 2014-01-27 19:56:15 +01:00
623a550eec OSX/scons: fix gnu gcc compile by using clang assembler ( openMP builds) 2014-01-27 19:46:05 +01:00
74108e2d6c Fix player compile in scons and disable -Wmissing-prototypes for Apple atm. 2014-01-27 19:36:05 +01:00
7280321f7a Revert recent OpenEXR cmake/linux fix and earlier OS X fix to use GCC for AVX.
Both need a better solution and break working builds.
2014-01-27 19:13:25 +01:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
60287e23b5 Buildbot OS X: compile with clang instead of GCC.
This should solve the missing -mavx option for Cycles, and also give better
performance since GCC 4.2 is now 5 years old already.
2014-01-27 17:16:10 +01:00
0c6a01ca00 Use includes for blenderplayer stubs
exposes many incorrect and redundant stubs
2014-01-28 01:55:10 +11:00
5aa006bc1c Fix incorrect extern 2014-01-28 01:50:09 +11:00
9e20d3e32a Attempt to fix T38373: cmake linux build failure with OpenEXR. 2014-01-27 15:26:03 +01:00
21c56f754f Fix T38355: Crash with Shader Node Group with missing datablock,
only in "Material" viewport shading.
2014-01-27 12:27:30 +01:00
31d679b667 Update Carve to latest update
Fixes some issues with NaN vertices in special cases.
Also adds edge interpolation routines which are currently
unused but which are requires to implement edge CD interpolation.
2014-01-27 17:04:06 +06:00
184294782e patch by liblib (lid b)
Default installation path of cuda nvcc.exe contain spaces

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D239
2014-01-27 11:43:41 +01:00
1d12c3fd53 Implement clipboard for mask splines
So now it's possible to copy-paste splines between layers.

Implementation is pretty much straightforward and duplicates
some logic which we've got in sequencer/tracking clipboards.

Will work on a common routine for clipboards later, for now
it's not so much crucial to have.
2014-01-27 15:42:46 +06:00
bee6c1779e Code Cleanup: de-duplicate nested node tree checking 2014-01-27 20:19:27 +11:00
2d3bd587fd Fix clip editor interface being broken by a71f072
Please do test commits before committing them.
This is second working day in a row which was started with
solving issues caused by untested patches.
2014-01-27 15:11:20 +06:00
e5b1498834 patch by Mihai Melinescu: boost hardcoded MSVC12
Updated CMakeLists.txt to account for boost hardcoded locations for VS 2013.

Reviewers: juicyfruit

Differential Revision: https://developer.blender.org/D261
2014-01-27 09:24:44 +01:00
029a7bbade UI: Fix for icon-only menus too small click-able area 2014-01-27 19:11:37 +11:00
a71f072f9c UI: Replace +/- menus with collapsible ones
Patch D160, by Scott Petrovic with  own modifications.
2014-01-27 18:42:11 +11:00
8f2eec5a15 Build System: icon files now depend on UI_icons.h for CMake
Now changing UI_icons.h causes icons to be re-generated, without this
adding a new icon wouldn't automatically get into the generated PNG.
2014-01-27 17:25:29 +11:00
Kevin Mackay
fbc7ab30ff Curves: save active point to file
Changed curve active point from pointer to index. Allows curve active point to be saved to file and retained between modes for free. Also some small optimisations by removing pointer look up code.

- Made active point access functions into BKE API calls.
- Fixes operators where curve de-selection resulted in unsel-active point.
- Split curve delete into 2 functions
2014-01-27 15:21:04 +11:00
f91368d822 .gitignore: Adding CMakeLists.txt.user for QtCreator users. 2014-01-26 17:52:14 -08:00
646cc46400 Fix typo in nla blend modes. 2014-01-26 20:12:29 +04:00
afb9393dda Fix T38354: Excess memory allocation when projecting onto object with multires
Found three cases where created bvhtree was not freed...
2014-01-26 16:56:50 +01:00
12109dd18e Cycles Standalone: Basic support for external OSL shaders.
* Very simple implementation, only allows for 1 output socket. As we haven't decided yet whether we keep the XML API, rather not spend more time on this now.

* To use an external osl shader, put the .osl file next to the xml file.
* Parameters: "output" is the output socket name, "output_type" the variable type (float, color and closure color are supported).
Example:
<osl_shader name="tex" src="ramp_closure.osl" output="Phong" output_type="closure color" />
<connect from="tex Phong" to="output surface" />
2014-01-26 16:23:07 +01:00
bb83bdf891 Fix T38366: export collada crash - if you set a keyframe
Don't assume all objects have a valid animdata...
2014-01-26 16:08:17 +01:00
d292d6ad74 Cleanup of BLI_smallhash
Factorized a bit the code here, think it's more readable now... No performance enhancement though.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D259
2014-01-26 15:18:02 +01:00
1c29fd77d3 Code Cleanup: style and correct API class ref 2014-01-26 22:17:01 +11:00
97aab5acc4 Cycles: Set samples to USHRT_MAX per default in the constructor, this is already used elsewhere. 2014-01-25 19:25:24 +01:00
f746d90398 Cycles Standalone: Various changes
* Change Info in header, put more important info to the left
* API: Move Camera width/height to camera, add some film properties
* Add ESC key to help menu
2014-01-25 18:57:02 +01:00
70e844ea11 Fix T38353: some EXR files from other applications not loading correctly.
* EXR layers with names like 'Z' without any pass name were not loaded at all
  and would break the Combined pass as well.
* EXR pass names longer than 16 characters where writing past the end of the
  array and getting invalid names.
2014-01-25 17:44:15 +01:00
b46dcafa7a fix building cycles standalone on windows / cmake 2014-01-25 14:20:25 +01:00
1dd05a1e7b Cleanup: Simplify Cycles standalone OSL detection code. 2014-01-25 13:25:26 +01:00
3b32507b41 Blender docs: Correct upper limit, shown for missing -t option value.
Differential Revision: https://developer.blender.org/D248
2014-01-25 12:29:37 +01:00
c7ac0edb34 Fix T38359: Not a bug, but better to grey out Material selector of particles when using Object or Group render type (since we always use duplicated objects' materials in this case!). 2014-01-25 09:01:32 +01:00
c0a4089265 Fix T38356: Crash when UIList.filter_items returns too few items. 2014-01-24 22:13:20 +01:00
28564e1583 Change tooltip text for Vertex Group in Bevel Modifier.
Reflects previous commit that now allows this group to
control edge bevels too.
2014-01-24 12:52:18 -05:00
2a8f6e2fd9 Bevel modifier can use vertex groups for edge bevel now.
Until now, the "vertex group" limit method in the modifier
only worked for "vertex only" bevels. With this change,
edges with both ends in a vertex group will be beveled
in the non-"vertex only" case.
Also changed the test for being in a vertex group from
"any nonzero weight" to "weight >= 0.5". This is because
cascaded bevels on disjoint vertex groups did not give
disjoint bevels, because weight interpolation would give
non-zero weights to newly created vertices in earlier bevels.
Chose 0.5 because that won't result from interpolation, but
still allows some dilution (e.g., cascaded bevels on the
same vertex group).
2014-01-24 12:42:20 -05:00
9e2ebecb21 Add convinient access to full bitangent for loops (some export formats like FBX expect full bitangents, better to compute them in C than in python...) 2014-01-24 17:49:29 +01:00
257f408864 Fix T38347: adding object visibility keyframes in the outliner groups and
libraries view not working.

This was disabled in the operator, there may have been a reason for this at
some point, but I can't see any reason to disallow it in the current code or
find a good reason why it was done in the commit logs.
2014-01-24 16:12:56 +01:00
01c1790a11 Make multisegment bevel profiles even for all parameters.
The method for calculating points on the profile for non-circles
and non-lines meant that the segments making up an edge had
uneven widths.
Use a numeric search technique to find superellipse evaluation
points that lead to equal-sized chords across the profile.
Also calculate the actual profile points sooner, so that they
don't have to be recalculated again and again.
This also sets up for a possible later feature of arbitrary
profile shapes, set by user.
2014-01-24 10:07:24 -05:00
544b7e6be4 Cycles Standalone: Add a help message, which appears when pressing the "h" key.
This is very basic for now, but can be extended with more info (available devices for example) later.

Thanks to Bastien and Sergey for some help with the glRect coordinates stuff.
2014-01-24 12:59:15 +01:00
456dc16e4a Fix currently harmless issue with converting ImBuf from sequencer space 2014-01-24 14:29:50 +06:00
f0b9b65740 Fix compilation error caused by 67f1fd2
Did one tried building blender before commit even?
2014-01-24 14:06:23 +06:00
Dalai Felinto
67f1fd25ee game engine: implement hitMaterial for collision and ray sensors
Reviewed By: moguri, kupoman

Differential Revision: https://developer.blender.org/D167
2014-01-24 02:10:45 -02:00
52f2c8aec5 Add support for new "bl_category" member (new panels "tabs" system). 2014-01-23 22:30:18 +01:00
18db6c58ec Fix T38150: implementation mismatch in bmesh python
Hopefully this time all mismatches are fixed (quickly checked the whole BMesh API files,
found a few others in addition to those reported in T38150).
2014-01-23 20:17:54 +01:00
037730b683 Make Tab Divider interopolate between the region background and tab outline.
Previously the divider was using the region background and the region text, leading to bad outlines with custom themes. This makes the outline behave more expectedly and allows better control.
2014-01-23 12:30:28 -06:00
0f72a8a7f0 Fix T38337: Crash when calling to_mesh() on a Curve object after clearing its parent
This is rather a workaround which only works because curve evaluation is only called
for a temporary object. Not a big deal if we'll skip path creation for such objects.

Still would need to think of general solution.
2014-01-24 00:18:22 +06:00
9f903208e8 Fix T36165: blender internal HDR textures with negative values got clamped.
For example for vector displacement, you may have an EXR texture that has
negative colors values. Blender clamps these by default, now the Colors panel
for textures has a Clamp option to disable this clamping.

This option affects all texture types and is enabled by default, you need
to disable it if you want negative values to have an influence.

Patch by Fredrik Hansson with modifications by me.
2014-01-23 18:49:10 +01:00
b119f471f4 Fix T37302: cycles slow hair export with many hairs, especially on Windows. 2014-01-23 18:14:19 +01:00
0847549009 Fix T37685: automatic weights affected by face masking outside weight paint mode.
Only when in weight paint mode should it check the selected vertices and faces,
in object mode it should just affect the entire mesh.
2014-01-23 17:47:20 +01:00
c37e8ecc50 Cleanup: int/short to bool in BKE_cdderivedmesh.h functions (and TRUE/FALSE to true/false in code using them). 2014-01-23 14:52:46 +01:00
26ae14d2dc Fix crash when changing space type to 3D space when having multiple windows
it is possible that different windows shares scene but displays different
layers. And it's also possible that different areas in the same window will
show different layers.

First case was violated in `dag_current_scene_layers()` which only checked
scene layers only once and if multiple windows shares the same scene only
one window was handled. Now made it so layers from all windows will be
squashed together into a single `DagSceneLayer`. This mainly solves issue
with `DAG_on_visible_update()` which didn't work reliable with multiple
open windows.

Second case required call of `DAG_on_visible_update()` when changing space
are type.

This commit slows things a bit actually because `dag_current_scene_layers()`
is actually called on every main WM loop iteration. It is possible to speed
some logic up perhaps. Not sure it's so much critical to do now because there
are unlikely to be more than few windows open anyway.

Will rather think of skipping all that flushing things if no objects are
tagged for update actually.
2014-01-23 19:35:20 +06:00
64bd4be6b2 Fix for crash getting the name of RNA properties with empty name 2014-01-24 00:25:11 +11:00
536800392a Code Cleanup: whitespace 2014-01-24 00:06:09 +11:00
45df9f4141 Code Cleanup: find operator once and reuse 2014-01-24 00:06:09 +11:00
a81cf3182f Fix typo in mmap commit from a while ago 2014-01-23 18:41:38 +06:00
898498c800 Fix for IMB_(un)premultiply_rect_float() not doing right business
- Made them receive number of channels rather than number of planes.
  This matches to how ImBuf structure stored planes and channels.
- IMB_premultiply_rect_float() was called with channels passed instead
  of planes already :S.
2014-01-23 16:51:32 +06:00
cbdedc169d Fix T38284: Crash with several shrinkwrap constraint using same target
Issue is caused by the race condition between getting custom data layers
from target's derived mesh (for vertices and faces) and releasing this
derived mesh from other threads.

When one releases the derived mesh it'll free temporary data from it,
and it'll also update data layers mapping.

General rule for threading is that no one is ever allowed to modify
data he doesn't own. This means that no temp layers are to be allocated
in derived mesh and making it so `CustomData_free_temporary()` doesn't
update mapping if nothing was freed will solve the race condition.

It is still possible to do other improvements, namely detect which
additional data/layers are to be present in derived mesh and create
it as a part of `object_handle_update()`, but this is to be solved
separately.
2014-01-23 16:30:57 +06:00
6c1c6f22ce Removed the omat matrix from DupliObject.
This was storing the original object matrix, which builds on the
assumption that obmat is modified during dupli construction, which is a
bad hack.

Now the obmats are still modified, but this only happens outside of the
dupli system itself and the original ("omat") is stored as local
variables in the same place where the obmat manipulation takes place.
This is easier to follow and avoids hidden hacks as much as possible.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D254
2014-01-23 10:20:42 +01:00
1713db2035 Fix T38042: Keymap crash after reloading operators
After some investigation with mont29, seems like the best way to ensure
keymaps point to valid operators is using WM_keyconfig_update().
2014-01-23 19:05:56 +11:00
b64f897606 WM: add WM_operatortype_remove_ptr to remove a known operator 2014-01-23 19:05:56 +11:00
12348318d1 Fix T38328: GLSL display shows texture mapping completely messed up in some cases
Own stupid typo in rB28ca299d4dfc...
2014-01-23 08:37:07 +01:00
3b71cab420 Fix T38110: GameEngine keyboard sensor ignores unicode characters 2014-01-23 14:58:04 +11:00
c02c2dfdd9 BGE Bitmap Text: add in check if the character is outside the range 2014-01-23 13:37:09 +11:00
2f46ed5564 Fix T38325: Game Engine Bitmap fonts failed for characters >128 2014-01-23 13:29:49 +11:00
c700103eab Themes: update for tab colors 2014-01-23 12:08:39 +11:00
80af3d6857 Tab theme colors
patch D234 from Jonathan Williamson with edits

- de-duplicate rna_def_userdef_theme_space_gradient and rna_def_userdef_theme_space_generic
- ui_theme_init_new_do now always sets theme settings (no need to test),
  used by bpy.ops.ui.reset_default_theme()
2014-01-23 11:48:36 +11:00
4b820fb673 Fix T38311: cycles BVH cache crash on Windows. 2014-01-23 01:13:46 +01:00
282ad434a8 Memory allocation: do not use mmap for memory allocation on 64 bit.
On Windows we can only do mmap memory allocation up to 4 GB, which causes a
crash when doing very large renders on 64 bit systems with a lot of memory.

As far as I can tell the reason to use mmap is to get around address space
limitation on some 32 bit operating systems, and I can't see a reason to use
it on 64 bit. For the original explanation see here:
http://orange.blender.org/blog/stupid-memory-problems

Fixes T37841.
2014-01-23 01:13:46 +01:00
28ca299d4d Fix T38316: Half of a Face is Missing on Newly Created Cubes or Cylinders.
Own bug from rBc691551249f3. Now at least I understand why `test_index_face()` is needed for tessellated quads!

Added a bunch of comments to explain the issue, as it's far from an obvious one...

We loose some performances, but it's still much quicker than org code.
2014-01-22 19:56:21 +01:00
c2fbec7bf1 Fix T38323: blender viewport render in particle hair edit mode renders halos.
Currently it's not supported to do viewport render of particles while in
particle edit mode, hide the particle instead of rendering halos.
2014-01-22 19:52:11 +01:00
1c8abf8d2a Fix T37940: Curve Render bug in Blender Internal Render.
Issue was caused by curve object really scale up. It was
caused by 677f519 to make scaled down curves work fine.

After some tweaks to epsilon value scaled up curves seems
to work as well.
2014-01-22 22:57:04 +06:00
7da44effe9 Fix T38319: no camera error message for render not showing correctly. 2014-01-22 17:45:29 +01:00
1ace875391 Fix T37198: Vorbis encoding is broken
Issue was caused by wrong PTS calculation. This commit
makes this calculation closer to what's happening in
FFmpeg itself.

Seems everything is working now including newer FFmpeg,
but there's one thing which still doesn't work: writing
avi files with h264 codec and Vorbis audio doesn't play
correct in mplayer here. But didn't manage to get this
working even using FFmpeg CLI, so this might be just a
bug in FFmpeg/mplayer. Since this file works fine in
blender just fine wouldn't consider this is crucial thing
to look into at this moment.
2014-01-22 22:15:40 +06:00
e2cd654a3e Fix tool properties region drawing even if the toolbar is hidden.
This would show as a line on the side of the 3D view with high DPI / retina,
not easy to notice.
2014-01-22 16:40:11 +01:00
162d6c73e3 Fix T38318: blender internal viewport now uses viewport, not render visibility.
This is the same as cycles and more consistent with it also using viewport
resolution.
2014-01-22 16:40:11 +01:00
c24a23f264 Fix for particle emission bug, reported on IRC by Thomas Beck
(@plasmasolutions): When the particle emitter is parented to a fast
moving object, the emission locations will not be interpolated over
subframes. This works if the particle emitter is animated itself.
Particle system evaluates the emitter location for each subframe, but
has to do this for the parent objects as well to get reliable results.
2014-01-22 16:28:45 +01:00
51c32ac199 Revert "Fix T37920: BGE LibLoad failed for meshes with no materials"
This reverts commit 6a473305af.

Caused T38296, need to investigate this further but for now
better not leave blender in unstable state.
2014-01-23 00:50:01 +11:00
9c883a1eca Fix T38011 and cleanup of Lens Distortion node code.
The area-of-interest calculation for that node didn't work reliably.
It tries to estimate the distorted rectangular area based on min/max
distortion and dispersion values, but this fails in some cases and
leaves uninitialized buffer chunks. So now simply use the full input
rect as the area, even though it may not be as efficient - at least it
works ...

Also cleaned up the code somewhat to make it understandable, using
separate functions for common stuff instead of cryptic walls of math.
2014-01-22 14:37:40 +01:00
418aafd503 Fix T38315: keymap configuration export did not export deactivated items correct. 2014-01-22 14:25:43 +01:00
4503f82ba2 Fix T38312: Crash when using snap transform in edit mode
Issue was caused by uninitialized boolean flag.
2014-01-22 16:32:52 +06:00
b722054db3 Make memory checker happy about FileGlobal
FileGlobal structure in write_global() didn't initialize
the while build_hash property and only placed there null
terminated meaningful content, leaving trailing uninitialized.

This made valgrind complain about using uninitialized memory
later in undo stack.
2014-01-22 16:32:52 +06:00
933c2b0521 BMesh: collapse_uvs - avoid clearing and flagging for every cd-layer 2014-01-22 17:16:38 +11:00
2aeb49204d Fix T38306: dupliframes causing viewport render to continually restart.
Evaluating the animation is causing the object to get tagged as changed, but in
this case it's not a permanent change so no one should be notified. Also found
a case where the persistent ID for duplis wasn't unique, fixed that as well.
2014-01-21 21:03:49 +01:00
ae3f577ac1 Cycles Standalone: Volume integrator settings. 2014-01-21 20:56:56 +01:00
aeca473a41 Usual UI messages fixes. 2014-01-21 20:18:07 +01:00
a6e697f6d7 Cycles Standalone: XML Updates for the integrator. 2014-01-21 19:15:54 +01:00
dbf50683fa Add missing struct Lattice declaration. 2014-01-21 17:24:15 +01:00
00119e5ac2 Code Cleanup: reduce sign conversion 2014-01-22 02:56:52 +11:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
70ce11d640 Minor cleanup from latest coverity checks - if we have a previous curve, we can safely assume we also have a previous stroke!
Better to assert here, than checking this randomly...
2014-01-21 16:45:31 +01:00
c691551249 Optimize tessellation code (min 20% better, up to 300% with some CD layers to tessellate).
The main idea is to store (during tessellation) or recreate (during tessdata update) a tessfaceverts-to-loops mapping, and then update all tessdata
in one pass, instead of calling `BKE_mesh_loops_to_mface_corners` repeatedly for all tfaces!

Differential Revision: https://developer.blender.org/D226

Reviewed by Campbell, thanks a lot!
2014-01-21 16:32:47 +01:00
cda894fcfd Fix T38229: 3D view shadeless display not supported with GLSL, so hide in UI. 2014-01-21 15:52:22 +01:00
8be4c6e8f3 Timing macros: remove the (void)0 at the end of TIMEIT_BLOCK_INIT,
it prevents declaring/using more than one of these timing blocks in a same code block
(C rule, no var declaration and code mixing)...
2014-01-21 15:50:44 +01:00
7acb7cb897 Replace XOR swapping by default ("naive", with extra var) one.
Ref: http://en.wikipedia.org/wiki/XOR_swap_algorithm, modern compilers/CPUs are much more efficient with "naive" algo than XOR one.
Doubled check, for me in an optimized build, XOR is several times slower than naive algo.
2014-01-21 15:50:44 +01:00
7198eee880 Enable XDND on FreeBSD 2014-01-22 01:49:13 +11:00
386d3a9cfb Fix T38265: transferring vertex weights from an object with modifiers not working.
It was using the modified mesh for the vertex coordinates, and the unmodified mesh
for the vertex weights, which can't work and crashed in some cases, now it used the
modified mesh for both.

Perhaps an option should be added to indicate if you want to transfer from the
unmodified mesh or transfer to the modified mesh, but I think this fix makes it
works as intended when this was implemented.
2014-01-21 15:36:00 +01:00
94325035f4 Fix T38298: crash saving float image with 3 channels from exr to png/jpeg. 2014-01-21 15:29:52 +01:00
8bcd8cb0bf Revert "Fix T38303: Inconsistent sorting of names in Append/Link view"
This reverts commit ba49d7e0e3.
2014-01-22 01:29:29 +11:00
ba49d7e0e3 Fix T38303: Inconsistent sorting of names in Append/Link view 2014-01-22 01:27:49 +11:00
3e1f78a611 Fix T38302: sequencer animation data lost in original scene when copying scene. 2014-01-21 15:17:35 +01:00
45b9822259 Fix T38300: Bevel didn't always reconstruct faces properly.
With new subdivision method for making the vertex mesh, we always
subdivide the edges between the new vertices around a vertex
(we used to not subdivide edges between two non-beveled edges).
This fixes a bug related to this change.
2014-01-21 09:02:27 -05:00
dcba34b411 Fix T38303: same names with different case sorted unpredictable in the file browser.
The string comparison was in lower case, so the same strings with different case
were considered the same which can make qsort give different results on each
sort since it's not a stable sort. Now take case into account in comparison.
2014-01-21 14:59:12 +01:00
19da32abf3 Fix T38128: snapping to node border uses node centers.
This was caused by recent change to transform locations being changed
to the upper-left corner of nodes (rBa857a6f).
2014-01-21 13:13:41 +01:00
8742f65513 Fix for dupli's using float for id's and signed/unsigned conversion
Enable strict flags exposed some strange issues.
2014-01-21 22:48:27 +11:00
6940bf0c96 Code cleanup and structural improvements for dupli generation.
This is a first step toward improving our dupli system. It implements a more
generic way of treating the various methods of dupli generation by adding a few
structs:
  * DupliContext holds a number of arguments commonly used in the recursive dupli functions and defines a recursion state for generating sub-duplis (nested groups). It also helps to prevent bloated argument lists.
  * DupliGenerator is a type struct that unifies the different dupli creation methods (groups, frames, verts, text chars, faces, particles). (As with context there should be no overhead from pointer indirection because everything can still be inlined inside anim.c)

Beside making the code more easily understandable this implementation should
also help to avoid weird side effects from custom matrix hacks by defining
clearly what a generator does. The DupliContext is deliberately made const, so a
generator can not simply add hidden matrix or flag modifications that are hard
to track down.

The result container for the generated duplis is stored in the context instead
of being passed explicitly. This means the generators are oblivious to the
storage of duplis, all they need to do is call the make_dupli function. This
will allow us to implement more efficient ways of storing DupliObject instances,
such as MemPools or batches. These can be implemented alongside the current
ListBase so we can improve dupli bottlenecks without having to replace each and
every dupli use case at once.

Differential Revision: https://developer.blender.org/D189
2014-01-21 12:11:34 +01:00
0c9d897043 Fix for Freestyle stroke rendering performed for each SSS material. 2014-01-21 19:55:33 +09:00
2a76656976 Fix T38295: Crash when changing screen with different visible layers
The issue was caused by missing object update for the curve object
before going to new screen. And that new screen had different visible
layers due to disabled lock_camera_and_layers option.

Solved by calling DAG_on_visible_update() in ED_screen_set() even
in cases scene doesn't change. This ensures all the objects which
weren't visible before are correctly updated.
2014-01-21 15:01:32 +06:00
e27dcc3423 Cleanup: no need to use constraint space transform API here, we can directly call
BKE_armature_mat_pose_to_bone (and avoids the need to get an Object pointer!).
Note the former just calls the later internally, in this case.
2014-01-21 09:18:48 +01:00
be87a65f49 Fix T38251: "Apply Visual Transform to Pose" Offsets bone unpredictably
Code here was using pchan->chan_mat, which for some reason does not work,
we rather have to use pchan->pose_mat, and convert it again from
pose space to bone space, as done by visual keyframing.
2014-01-21 09:18:48 +01:00
85a3d51078 Fix for own refcount error in recent commit 2014-01-21 14:23:39 +11:00
a0f25f2301 Fix own mistake with zealous check for face splitting
Was disallowing adjacent loops to be split which is correct for a single
split across a face, but not fore BM_face_split_n
2014-01-21 12:27:38 +11:00
37242e6b0b Code Cleanup: style 2014-01-21 12:05:27 +11:00
5ece1594ca Cycles Standalone: Updates for the XML API, added some missing nodes. Still not complete, but better. 2014-01-21 01:30:20 +01:00
7c6f60572b Fix T38264: undo/redo broken with text overwrite mode in text editor (insert key). 2014-01-20 22:13:42 +01:00
e9efde2a05 Fix T38297: missing StringProperty subtype 'PASSWORD' in API docs. 2014-01-20 22:01:11 +01:00
82a7a3d3ed Fix T37976: blender internal transparent shadows from volumes not working correct. 2014-01-20 21:56:42 +01:00
fd0b104f70 Cycles Standalone: GUI flag was not passed correctly to the code, own mistake when I added the GUI build option. 2014-01-20 21:12:28 +01:00
21264f89ac Cycles: Add a cmake config to easily compile Cycles Standalone.
On Linux/Mac OS X, simply type "make cycles" inside the Blender source directory, to get a standalone build of the engine.

Reviewed by: Brecht
Differential Revision: https://developer.blender.org/D228
2014-01-20 20:44:39 +01:00
fc3be511f0 Fix T37978: cycles nodes with multiple Material Output nodes not predictable.
Now it uses the last activated node like compositing does. This should have no
effect on existing files until you activate another output node there.
2014-01-20 20:31:10 +01:00
04f81c8225 Fix T37481: Image Sequence can't be loaded
Allow loading of image sequences in addition to single images in the open image operator

I solved it by adding the possibility to load an image sequence in the Load Image Operator.
The image user is passed in the operator customdata now as well, best solution for now, but general handling of image user still a bit weak. The offset and length of the image sequence is now calculated in the image open operator by storing all found frames in a list and sorting this list.

Reviewed By: campbellbarton, brecht, lukastoenne

Differential Revision: https://developer.blender.org/D209
2014-01-20 19:13:21 +01:00
4c6a72a7d8 Fix T38283: UV unwrap giving wrong results with particular meshes.
LSCM auto pinning where it picks two vertices on opposite sides of the outer
UV island boundary would in some cases give the same 3D coordinate, which
causes UV unwrap to give poor results.
2014-01-20 18:49:09 +01:00
8506e3a78c Fix T38294: enabling hair dynamics very slow / hangs with many hairs.
This function call was accidentally placed inside a loop which gave O(n^2)
behavior, but there's no reason for it.
2014-01-20 17:20:58 +01:00
a2930c634f Code cleanup: remove quicktime image loading code (not animation loading).
This code has been broken for a few years and no one noticed, it's also less
useful now that we support PSD image loading ourselves which was the original
motivation to have this.
2014-01-20 16:55:00 +01:00
9f2f2ed546 Fix part of T38280: UI inconsistencies in the texture/image paint stroke panels. 2014-01-20 16:54:08 +01:00
a502959e4b Bevel: fixed problems with vertex bevel and some 'weld' cases.
Vertex bevel was completely messed up after last change,
and this fixes.
'Weld' bevels, where there are exactly two beveled edges
meeting at a vertex, now look better in cases where one
of the beveled edges is on a flat plane.
2014-01-20 08:55:07 -05:00
f074b67108 Fix T38267: dynamic paint Use Object Material not working correct in some cases. 2014-01-20 14:50:10 +01:00
c8d0d9b383 Code Cleanup: tabs/spaces, no need to call CTX_data_edit_object twice 2014-01-21 00:33:00 +11:00
fbf821c50b Fix T37967: autosave does not save dynamic topology edits while in sculpt mode. 2014-01-20 14:26:48 +01:00
018fe81779 Fix T38269: scene full copy in mesh edit or sculpt mode did not copy mesh edits. 2014-01-20 14:16:22 +01:00
aa18c4c445 Clear object recalc flag on load
It is possible that object in .blend file will have non-zero
recalc flags. Clear them on load in order to prevent possible
unneeded recalc after the load.

Differential Revision: https://developer.blender.org/D224
2014-01-20 18:39:30 +06:00
59762ff0f7 Fix T38291: depgraph tagging was wrong for
OBJECT_OT_constraint_add_with_targets. This now works exactly the same
way as when setting the target via RNA/constraint buttons.
2014-01-20 13:28:26 +01:00
f70921d90c Fix T38221: node fcurves in compositor get deleted when muting a node.
This is because of the animdata cleanup in rBd2e55cb. This works ok in
general, but causes issues with the localized node trees used for compo/
shader/texture previews. These localized trees share the same default
action as their original trees, and then remove fcurves when removing
muted nodes (which should affect the localized tree only).

node_free_node_ex now has an argument for disabling animdata cleanup,
which is also not necessary when freeing the whole node tree (because
animdata is freed in advance anyway). In addition to that it also checks
the NTREE_IS_LOCALIZED flag to prevent freeing of fcurves in the action.
2014-01-20 12:52:30 +01:00
1b3fdc4309 Followup for 1728c1e: we don't need to replace flags at all
Replacing the flags isn't thread safe and could lead to bi troubles.
Such things are to be handled by the dependency graph.
2014-01-20 16:10:34 +06:00
2e01f38885 Python API: fix for help() failing on bpy instances
Caused by missing __name__ from bpy.types (alternate method to patch D232)
2014-01-20 18:13:15 +11:00
a696a0ff1e Python API: create args for meta-classes directly (a little faster).
Also add some new interned strings.
2014-01-20 18:09:00 +11:00
ece504aff8 Fix for incorrect use of DNA_struct_find_nr
Patch T38290 by ldo (Lawrence D'Oliveiro)
2014-01-20 14:13:59 +11:00
7436a3f4ce Correction for recent commit clearing font cache
- move cache reset into view2d and comment about the rationale for resetting cache there.
- missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload)
- comment about DPI wasn't correct.
2014-01-20 12:45:38 +11:00
60c53a5bde Fix for saving startup file ignoring editmode/sculpt edits 2014-01-20 12:14:09 +11:00
44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
1728c1e284 Fix for flag not being restored in BKE_vfont_to_curve_ex 2014-01-20 10:44:11 +11:00
62f6d5351f Revert "Cycles: mix hair minimum width code with SSE intersection code"
Code is not equivalent in min/max part (SSE works with NaNs differently), this results in black dots with cardinal_curve hair.

This reverts commit b886c26d1f.
2014-01-20 00:23:17 +04:00
d358f1f9e7 Fix last part of T38244: memory leak when scaling any panel
Issue is not noticeable with default font, but i18n one can use more than 500Mo of ram when cached in undreds of different sizes.

Campbell had already done most of the work in rBa780e7f3f09f and rB6b283f116829, just had to call BLF_cache_clear() in _exit funcs of VIEW2D_zoom & co operators.
2014-01-19 15:02:53 +01:00
621bf47e91 Docs: doxygen file descriptions for BLF, GPU and WM 2014-01-19 23:15:25 +11:00
Simon Repp
6cd132b29c Increase maximum allowed amount of points for Splines in both U and V directions
Increase the maximum allowed amount of points in a spline from currently 32,767 (short) to 2,147,483,647 (int).
Change variables that get assigned the value from pntsu/pntsv to int type all over the codebase.
Change function parameters that previously passed the count as short to int type as well.

(because https://developer.blender.org/T38191)

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D212
2014-01-19 00:22:04 +06:00
f6624b84cf Send sequencer render context as const pointer rather than as value
No functional changes just creepy to send rather huge structure by value.
2014-01-19 00:18:36 +06:00
7142b97085 Make it possible to hide/unhide a node during node transform operations.
During drag the H key can be used to toggle the hide flag of the selected nodes.
This makes it easier to 'attach' nodes to available links in narrow places.
2014-01-18 18:20:21 +01:00
90283843e3 install_deps.sh: Fix output conf for CMake (specifying root dirs for OIIO/OCIO is not needed when you use default path, but mandatory otherwise, simpler to always give them).
Spotted by dingto on IRC, thanks!
2014-01-18 16:03:23 +01:00
8d0055f3c8 CMake: Fix info message for Cycles standalone. 2014-01-18 15:19:49 +01:00
96e9c67b47 Code Cleanup: py script float comparisons 2014-01-18 09:13:51 +11:00
a025ff407e Math: Code cleanup
Remove stray #undef directives.
2014-01-17 20:44:34 +01:00
8e3a6bc876 Rigidbody: Add missing properties to "Copy Rigid Body Settings" operator 2014-01-17 20:20:46 +01:00
377bb55566 Fix T36190: Rigid Body bake to keyframes bakes wrong the rotations.
Make sure that quaternions are compatible.
2014-01-17 20:09:59 +01:00
09ce3c18ee Blender Internal: Tweak GLSL preview of the spot lamp to use shadow buffer also for ray shadows, to solve inconsistency with the sun lamp. 2014-01-18 02:23:44 +09:00
8b6b42b694 UI: tweak menu padding and make separator line more visible.
Adds some padding to the left of the icon, adds more space around the separator
line and make it more visible, and add some spacing at the top and bottom of
the menu. Ref T37794

Reviewed By: dingto, billrey

Differential Revision: https://developer.blender.org/D223
2014-01-17 17:06:11 +01:00
ac74718e6f Icons: make inkscape svg to png conversion work with Inkscape.app on OS X. 2014-01-17 16:50:11 +01:00
Simon Repp
a33656ed8c UI/Modifiers: add missing icon for Wireframe modifier
Reviewed By: carter2422, billrey, plasmasolutions, brecht

Differential Revision: https://developer.blender.org/D220
2014-01-17 16:47:21 +01:00
84fa507110 Fix T38141: wrong add reroute node location with shift LMB cut on OS X / retina. 2014-01-17 16:00:39 +01:00
c9c8872da0 Sequencer: don't cache frames during proxy rebuild job 2014-01-17 20:04:47 +06:00
8842569bc4 OSX/Cycles: tentative fix for avx, try use the compiler that is default on desired xcode version.
Atm. it is only verified to work with clang 5.0, so either this works too with llvm-gcc or apple gcc,
or we have to rise the requirements for osx.
2014-01-17 14:56:29 +01:00
bec9a3fa7c Followup to d03e768: was wrongly (void) non-existing argument 2014-01-17 19:45:13 +06:00
07346b62a5 Remove confusing recalc flag from simplify update callback
PSYS_RECALC_CHILD is not handled by handle_object_update at
all so it was rather pointless to set this flag.

Double-checked with Brecht.
2014-01-17 19:43:26 +06:00
d03e768761 Fix T38260: Missing object update with two visible scenes
It was an issue with early object update check which was
screwing up for second scene because of first one reset
ID recalc flags.

From the comment in the code about this:

  We need to check all visible scenes, otherwise resetting
  OB_ID changed flag will only work fine for first scene of
  multiple visible and all the rest will skip update.

  This could also lead to wrong behavior scene update handlers
  because of missing ID datablock changed flags.

  This is a bit of a bummer to allocate list here, but likely
  it wouldn't become too much bad because it only happens when
  objects were actually changed.
2014-01-17 18:57:49 +06:00
eb1bb9dfd6 Oops! Should have double checked before pushing that last commit. 2014-01-18 01:41:18 +13:00
4c89a658be Fix T38157: Rigid body, crazy f-curves after bake to keyframes
A logic error meant that the wrong "previous rotation" values were being used
when decomposing the rigidbody results back to transform channels. Instead of
using the previous values for the object in question, it was actually using
the rotation value of the previous object that was evaluated.
2014-01-18 01:38:40 +13:00
929fb8324b Similar reshuffling of theme settings order for DopeSheet to ensure pairs end up on same rows 2014-01-18 01:38:39 +13:00
d308bc7eba Reshuffle Graph Editor theme settings to get pairs of settings to line up 2014-01-18 01:38:38 +13:00
2df2ef5801 Bump up default size of vertices in Graph Editor to make them easier to see/select 2014-01-18 01:38:37 +13:00
df88dbf955 Fix T38161: Copy Material to Others causes incorrect viewport display if target object uses more materials
We need to update object data, like when removing a mat slot, since some mat indices might have become invalid!
2014-01-17 13:16:07 +01:00
6489c1f94d Blender Internal: Correct GLSL preview, material using shader nodes didn't consider "Transparency" is a shader pipeline option. 2014-01-17 16:32:45 +09:00
63ccb26303 Code Cleanup: spelling 2014-01-17 17:35:03 +11:00
477a84a738 BMesh: minor optimization for remove doubles
- replace heap allocation with stack for small arrays.
- remove edge-lookup when its already known.
2014-01-17 17:21:41 +11:00
5568d7c3a1 EditMesh: add delete loose operator (access from Cleanup menu) 2014-01-17 14:55:06 +11:00
7df8452d1a BMesh: add bmesh delete functions that dont depend on operator flags 2014-01-17 14:55:06 +11:00
5c74ac2c2a Build Modifier - Add "Reversed" Option
This commit introduces the ability to make the Build Modifier operate in reverse,
essentially allowing it to be used as a "deconstruction" effect.

(See D219 for more details about use cases for this)
2014-01-17 14:53:04 +13:00
607df8090b Fix for long keyframes not getting faded out with their associated keyframes on protected channels 2014-01-17 14:53:03 +13:00
d8fa72bfb1 Assorted polish fixes for keyframe theme settings patch
* Version patching fixes for theme settings
* Added missing support for NLA (needed for the keyframes drawn in the action lines)
* Fix for a lack of contrast between selected and unselected extreme keyframe type
  (restoring it back to the pre-patch color scheme)
* Fix for keyframes on protected channels not being drawn with partial opacity
2014-01-17 14:53:02 +13:00
5e5b0cee4f T37579: Theme settings for Keyframe Colours
This patch makes it possible to customise the colours used for the different
keyframe types (Keyframe, Breakdown, Extreme, Jitter) and the border colours
(normal and selected).

Reviewed by: Joshua Leung
2014-01-17 14:42:10 +13:00
74ae93d1cd Scons: Fix cycles OpenCL kernelcompile by distributing util_half.h 2014-01-17 00:33:32 +01:00
52bccd1188 Code Cleanup: remove redundant bmesh functions & make static 2014-01-17 09:42:30 +11:00
2883a48b3c BMesh: minor speedup for deleting faces. also remove unused delete-all 2014-01-17 09:35:53 +11:00
e7a6efa2a7 Code Cleanup: move delete funcs out of bmesh_construct.c into own file 2014-01-17 09:21:30 +11:00
d9bbcb371a Code Cleanup: avoid bpy.context when its passed in as an arg 2014-01-17 08:42:07 +11:00
5b1330e99d Outliner: minor speedup for drawing, avoid 3 rna lookups per object
also for movie-clip dope-sheet
2014-01-17 08:39:17 +11:00
e9227c76d4 Fix T37706: avoid cycles crash when using a stack that exceeds SVM stack limits.
This should be pretty rare, the shader in question had many parallel node links
because of copying the nodes many times, which is inefficient to run anyway.
2014-01-16 22:36:30 +01:00
568e678fa3 Code cleanup: fix gcc/clang compiler warning in release build. 2014-01-16 22:28:09 +01:00
62f9be7615 Fix T37958: part of blender internal approximate AO / indirect light preprocess
could not be cancelled.
2014-01-16 22:25:48 +01:00
024ecf9fc1 Forgot in previous commit to take care of user preferences 2014-01-16 22:16:43 +01:00
3110526bca Improved the Quit Confirm behaviour: Now confirm only shows up when current session is dirty 2014-01-16 21:42:16 +01:00
9cc5c157e8 Minor change to last commit to solidify, only allocate bitmap as needed 2014-01-17 06:59:14 +11:00
1b4ced86b9 Workaround for avx assembler not compiling with vanilla gcc ( with openMP case ) 2014-01-16 19:44:25 +01:00
da523185fb Fix compilation of Cycles AVX kernel with cmake. 2014-01-16 18:32:54 +01:00
6fdf78eaf6 Correct versioning check for manipulator 2014-01-17 04:24:59 +11:00
79bed4d9d3 Code Cleanup: loop over ThemeSpace's where possible 2014-01-17 03:52:25 +11:00
a780e7f3f0 BLF: Fix for changing the DPI storing many fonts (300+)
Each dpi value stores its own set of font sizes, so while dragging the
dpi value would collect many sizes and never free.

Also change how BLF_cache_clear works,
it was freeing memory but not the OpenGL textures.

Now just free all the cache and GL textures and let drawing allocate them again as needed.
2014-01-17 03:13:23 +11:00
de28a4d4b2 Cycles: Add an AVX kernel for CPU rendering.
* AVX is available on Intel Sandy Bridge and newer and AMD Bulldozer and newer.
* We don't use dedicated AVX intrinsics yet, but gcc auto vectorization gives a 3% performance improvement for Caminandes. Tested on an i5-3570, Linux x64.
* No change for Windows yet, MSVC 2008 does not support AVX.

Reviewed by: brecht
Differential Revision: https://developer.blender.org/D216
2014-01-16 17:04:11 +01:00
7c6d52eb07 BLF: avoid allocating empty array in blf_glyph_cache_texture 2014-01-17 02:16:22 +11:00
6b283f1168 Fix for BLF using realloc() on guarded-alloced memory 2014-01-17 02:13:55 +11:00
15ab4638cb Code Cleanup: spelling 2014-01-17 01:54:37 +11:00
88f65fdddb CMake: add missing dependency for icon target 2014-01-17 01:50:33 +11:00
38e683cbb1 Fix T38217: Fix glitch adding Monkey with view align
added an option so view-align can default to a different axis.
2014-01-16 23:54:04 +11:00
e9fb4299eb Fix T38116: Crash when using solidify modifier on multi-user mesh
Issue was caused by solidify modifier using original vertices bitfield
to store tags. This isn't thread-safe obviously. Now use bitmap to store
needed tags.

Reviewed by Campbell, thanks!
2014-01-16 17:49:33 +06:00
348cf17448 Code Cleanup: no need to pass empty strings as default values 2014-01-16 22:00:29 +11:00
9f16790840 Code Cleanup: avoid using G_PICKSEL for transform manipulator 2014-01-16 20:54:14 +11:00
4c2ba8e936 Correct error in own recent commit 2014-01-16 20:52:30 +11:00
a4e07aa825 Code Cleanup: outliner used magic numbers for active items and selecting
Replace with enums to make it more obvious whats happening
2014-01-16 20:23:46 +11:00
4f87ca47a6 Compilation error fix: mismatch declaration 2014-01-16 15:05:04 +06:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
bb1a7e4d87 Code Cleanup: simplify matcaps checks and quiet warning 2014-01-16 18:32:57 +11:00
d7c46c5d16 User Prefs: Manipulator unit and tooltip fixes
removal of x5 hardcoded size multiplier
2014-01-16 16:47:12 +11:00
95acd3b20a Tweak to early threaded update escape
Issue was caused by some objects being in bMain and tagged
for update but not being in the DAG. This means objects
wouldn't be updated and their recalc flag remains untouched
triggering threaded for the next frame.

Solved by tweaking POST_UPDATE_HANDLER_WORKAROUND in the way
that it checks objects' recalc flags from the DAG, not from
the bMain. This will work a bit longer since DAG stored more
nodes than objects in the scene, but this code only runs in
cases when there're some objects tagged for update, which
keeps overall CPU usage on such a workaround pretty low.

Now CPU usage on 11a_comp scene from project Pampa went down
from ~15% down to ~5% (2,69 release uses ~%7).

Pointed by Thomas Dinges in IRC.
2014-01-16 02:07:59 +06:00
c78d9a3184 Fix T38233: Right click in Particle Edit mode closes application
It was wrong memory access in selection operators when point doesn't
have keys.
2014-01-16 01:34:08 +06:00
df72d3cc7f Potential fix for T38111: Duplicating BOIDS emitter cause glitchy operation
Need to reset cached KD tree when duplicating particle system.
2014-01-16 00:56:35 +06:00
e79b244097 Fix collada and freestyle module compile errors after recent commit, forgot to
compile with those enabled.
2014-01-15 19:15:51 +01:00
3b5fa7bba0 UI: add "double click to rename" tooltip to list items.
This is to try to avoid some confusion now that the separate text fields are gone.

Reviewed By: billrey, brecht

Differential Revision: https://developer.blender.org/D217
2014-01-15 17:08:28 +01:00
1f2136b329 Python/Depsgraph: bpy.data.*.is_updated now detects add/remove of any datablock.
Previously this only worked for some datablocks relevant to rendering, now it
can be used to detect if any type of datablock was added or removed (but not
yet to detect if it was modified, we need many more depsgraph tags for that).

Most of the changes are some function parameter changes, the important parts
are the DAG_id_type_tag calls.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D195
2014-01-15 16:47:53 +01:00
8c444958fc Fix T38234: changing smooth/flat shading on linked mesh data should not be allowed. 2014-01-15 16:02:48 +01:00
d9e52ac98b Code cleanup: move half float functions to separate header file. 2014-01-15 15:29:22 +01:00
8af782ad22 Code cleanup: some reshuffling of SIMD defines moving more code to util_optimization.h. 2014-01-15 15:11:50 +01:00
ebbb6adf32 Fix for infinite freestyle re-render in the viewport
Was a regression since e618d8238e and was caused by the wrong
main being tagged for update.
2014-01-15 17:42:01 +06:00
8ff58ee491 Eek, terrible typo in previous commit
Pointed by Bastien!
2014-01-15 16:42:00 +06:00
6c629e7594 Only check OB_RECALC_ALL flags of the object in transform code
Because of the issue of how simplification works, there could
be more flags in on->recalc bitfield which are ignored by object
anyway.

Would save some update calls after simplificating the scene.
2014-01-15 16:38:47 +06:00
eb89570733 Followup to the previous commit
It was actually rather simple to make sure depsgraph is up to date
before calling BKE_object_handle_update() in the transform code by
just moving DAG_scene_relations_update() to the beginning of the
function.

Wouldn't expect any side effects for other cases since DAG is not
used bu the code between new location of the call and old one.
2014-01-15 16:36:48 +06:00
1ad4b85e8f Fix T38224: Blender crashes on duplicating curve
Issue is caused by the evaluation flags getter called with
NULL depsgraph. It happens on direct object update from the
transform code after duplicating the curve.

Proper solution is probably to make sure depsgraph is rebuild
after duplication, but for now it's better to prevent crashes.
2014-01-15 16:27:25 +06:00
5cd321203e Fix compilation error with stricg GCC flags 2014-01-15 16:21:53 +06:00
2678b12a36 Fix T38216: Cycles render crash Blender in some scene in versions
Issue was caused by evaluation flags getter function polluting
the DAG. Need to use dag_find_node() instead.

Still need to doublecheck exporting objects with curve deform
works properly. On the first thought it should, but might be
wrong again.
2014-01-15 15:54:27 +06:00
6ba02681de Fix a bunch of UI string issues... 2014-01-15 10:40:54 +01:00
054982d2dd Fix text overlap when using edge angle & length
From D193 by Ron Davis with some edits.
2014-01-15 20:03:19 +11:00
e07e8e31bb Fix T38166: Vertex slide C key doesn't work 2014-01-15 18:27:39 +11:00
a86f43df9f Fix T38227: Cloth cache storing only every 10 frames.
Make sure pointcache step is set to 1 for cloth when copying objects.
2014-01-15 06:47:03 +01:00
435a896fbe Fix for mistake in recent shadow addition in tabs 2014-01-15 15:46:32 +11:00
a19f077541 Fix T38207: Tab scale jitters when resizing region 2014-01-15 13:40:41 +11:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
e5c7535beb Code Cleanup: float/double promotions 2014-01-15 13:40:40 +11:00
da8619fe23 Math Lib: add iroundf function for: (int)floorf(a + 0.5f) 2014-01-15 13:40:40 +11:00
9e8428b09a Code cleanup - Commented out some code which wasn't actually doing anything
gpf->framenum is an int, not a float. Hence, this type of rounding has no effect.
2014-01-15 14:54:00 +13:00
fcec99d9cc Whitespace/Style fix 2014-01-15 14:45:46 +13:00
5196c4fd12 Fix uninitialised var warning 2014-01-15 14:45:45 +13:00
53f93ef66d Fix build issues with mingw's 2014-01-15 00:33:55 +02:00
eda49cf58e Rigidbody: Remove keyboard shortcuts to add/remove bodies
We had several reports where users would create rigid bodies by accident
and then wonder why transformations behave differently.
Since these actions aren't used that often, just remove the shortcuts.
2014-01-15 01:07:50 +01:00
fab5438943 Code Cleanup: avoid duplicate calls to WM_window_pixels_x/y 2014-01-15 10:41:13 +11:00
cc978dc0c1 Fix for minor precision glitch while zooming on clamped view2d 2014-01-15 10:06:12 +11:00
9e3ddd70d4 Cycles: Disable SSE41 kernel on 32bit, we don't use intrinsics here anyway. Also disable it for Visual Studio < 2012, broken blendv instruction. 2014-01-14 23:51:59 +01:00
c00b8c538c fixed wrong comment 2014-01-14 23:08:29 +01:00
875ddfcee0 Added missing include 2014-01-14 22:54:18 +01:00
0f3fed2970 OS X linker does not like empty compilation unit by itself in a library. Scons creates one library (.a) per kernel. This fixes that 2014-01-14 22:48:31 +01:00
a9f761708c Fix for icon generation with MSVC
Big thanks to Gaia for getting this working!
2014-01-15 08:40:56 +11:00
5d88f7c7db Cycles: Build SSE41 kernel per default, remove build option. This hopefully also fixes some compile errors on various systems. 2014-01-14 22:04:32 +01:00
839ddfbb65 Fix for rBec81feab6649: better to search for versionned libs first, else it can use your system ones instead of those built by install_deps! 2014-01-14 21:52:17 +01:00
a294d3a18f Cleanup: some boolean int to real bool. 2014-01-14 21:52:17 +01:00
993b946681 DingTo forgot to make sure kernel_sse41 is compiled in even when empty 2014-01-14 21:49:48 +01:00
ec81feab66 CMake: Fix libname handling of OpenEXR 2.1. The library built with Autotools was not found.
Weird library names having version suffix (e.g. libIex-2_1.so) are used only
when the OpenEXR was built with CMake.  Building the library with the Autotools
doesn't add the version suffix.
2014-01-15 04:43:31 +09:00
9351ac0d85 Cycles: Skip the compilation of the dedicated SSE2 kernel on x86-64, we can assume SSE2 here, so just re-use the regular one. Saves 500kb in the blender binary.
Reviewed by: brecht
Differential Revision: https://developer.blender.org/D199
2014-01-14 20:39:54 +01:00
d980c3eccb Further fix for T37817: non-ascii paths fix in Cycles broke OSL rendering.
Not quite sure yet what is going on here, but this works for me.
2014-01-14 20:01:26 +01:00
6e8321f2c0 Fix GLSL compatible_pow to give 1.0 for 0 ^ 0 2014-01-14 22:58:07 +04:00
1c49eb0072 Cycles, Code cleanup: simplify code for color linear interpolation and float math
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D215
2014-01-14 22:55:02 +04:00
1908c31b06 Fix for icon pin drawing too large when (U.pixelsize != 1) 2014-01-15 04:57:27 +11:00
43c2b36431 Correction to assert in previous commit 2014-01-14 23:51:26 +06:00
dad1d30bbf Fix to recent commit, == instead of = in do_version 2014-01-14 12:29:03 -05:00
Dalai Felinto
8a8ee2c601 fix #T37894: IK constraint desactivation does not work as expected
patch suggested by Séverin Lemaignan (skadge)
2014-01-14 14:45:00 -02:00
c5d3abc863 Bevel fix to clamping for percent type.
The clamp code is still very crude and over-conservative,
but was totally wrong for the percent amount type.
2014-01-14 11:21:56 -05:00
86616c675a Bevel Modifier: add width type and profile control.
This adds to the modifier the new controls that have been
added to the bevel tool.
2014-01-14 11:07:45 -05:00
Dalai Felinto
dfac6c4189 fix #T37892 BL_ArmatureConstraint.active returns wrong value
patch (with changes from me) by Séverin Lemaignan (skadge)
2014-01-14 13:22:41 -02:00
54e56cd309 Fix T38209: Curve's didn't account for negative scale
Would use the face winding from the previously drawn mesh
2014-01-15 00:35:43 +11:00
1fb9bb815a Fix for own regression, editmode object selection (Ctrl+RMB)
Wasn't working because of editmode override (which uses regular object selection in editmode)
2014-01-15 00:28:55 +11:00
ca2a14491e Fix T38196: Crash with smoke simulation
Issue was caused by KD tree being allocated with the wrong size.
2014-01-14 17:17:24 +06:00
e7d18eb7bd Add check for KD tree size to BLI_kdtree_insert()
Makes sure we're not trying to insert more nodes than we've
been expecting to.
2014-01-14 17:16:06 +06:00
b7f04acb0c Fix T38205, typo in Add Torus operator. 2014-01-14 09:45:40 +01:00
aa986c3f3d Correct bad mistake in own recent to commit to angle calculation 2014-01-14 13:47:24 +11:00
20cea92db1 Code Cleanup: minor edits to recent commit 2014-01-14 13:39:55 +11:00
0f30231686 Missed a comment on last commit.
This was missed in the previous commit. Adding back for future readability. Thanks @campbellbarton for spotting it.
2014-01-13 20:35:35 -06:00
b3101aba6a Make Toolbar Tabs more readable
This makes the tabs slightly larger, increases the text size slightly, and adjusts the colors a bit to improve overall contrast. It also makes inactive tabs draw with a full tab shape, improving the readability at a glance, particularly when tabs are very small.

The users most affected will be those on smaller displays, where previously tabs were very difficult to read.

Reviewers: @billrey, @campbellbarton

Differential Revision: https://developer.blender.org/D170
2014-01-13 20:25:40 -06:00
5611fb6a32 Fix T38186: mesh inset didn't follow edge directions for flat surfaces
also improve evenness when the inset direction wasn't exactly between both edges,
2014-01-14 09:48:59 +11:00
8cb9b42c9c Math Lib: minor optimization for angle functions 2014-01-14 09:48:59 +11:00
a02a97753b Fix T38192: OSL got incorrectly enabled in preview render when GPU was selected
for rendering of the main scene.
2014-01-13 23:29:35 +01:00
6eedf08cca Fix T38176: can't set vertex coordinate to 0.0 when it's set to 0.0000001. 2014-01-13 23:19:46 +01:00
ff98be83a9 Empties with Images draw type: add support for movies and image sequences
This adds an ImageUser to such empties with all the typical settings.

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D108
2014-01-13 22:18:31 +01:00
e9984653a8 Cycles: Fix Wave texture difference between OSL and SVM, OSL wasn't using the "Scale" properly for distortion. 2014-01-13 22:01:39 +01:00
6b61f7f755 Code cleanup / Cycles: Don't pass scale to texture functions, do the multiplication in the function call already. 2014-01-13 21:17:55 +01:00
ef67b9eec4 Ceres: more warnings cleanup 2014-01-14 01:18:09 +06:00
c48c62a831 Code Cleanup: replace checks for ima->source with BKE_image_is_animated 2014-01-14 04:59:58 +11:00
800e2283aa Fix T38171: Vertical tabs don't respond to clicks on the left most pixels 2014-01-14 04:15:54 +11:00
22c9e532dc Color control for bl_debug_draw functions 2014-01-14 03:59:22 +11:00
75ab57efed Fix T38190: Linux tablet: Issue with XInput/GHOST?
With edits by Campbell, thanks!

Looks like in some cases (driver dependent?), `XDeviceMotionEvent` get generated with only part of expected data
(e.g. only x coordinate, only pressure, etc.), data which did not change since last event being NULL.
We know which data to actually handle with `XDeviceMotionEvent.first_axis` and `XDeviceMotionEvent.axes_count` values.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D208
2014-01-13 17:51:17 +01:00
02386bd1e3 fix compilation for mingw-w64 2014-01-13 15:46:46 +02:00
9cf6946d31 Fix cycles texture crash on win x86-64 + msvc 11
Use union for __m128 aliasing; while gcc supports no-strict-aliasing attribute, unions are the most common way to deal with __m128 in msvc.
2014-01-13 18:31:02 +04:00
5ad5883ce3 Fix crash happening on render after recent imbuf PERSISTENT flag 2014-01-13 20:25:42 +06:00
a6ceb4a498 Re-bundle new Ceres library
- Fixes some harmless issues (in cases blender doesn't use Ceres yet)
- Fixes some compilation warnings
2014-01-13 19:17:28 +06:00
4c9a3a53bd UI Icons: store icons in git as uncompressed pixmaps (D196)
this allows for updating icons without committing a new PNG each time
(which is inefficient with git). The data files are converted into a
PNG at builds time and used just as they were before.
2014-01-14 00:14:03 +11:00
08981f3a91 Fix T37886: Material does no update when changing keyframes in dopesheet
It was a missing fcurve evaluation in scene update function which lead to
materials only being updated on frame change.

Added the same exception as we've got for the scene animation. It only
runs when there're materials tagged for the update, so wouldn't expect
speed regressions or so.
2014-01-13 19:02:23 +06:00
b1bb7d2ee0 Fix T38040: Crash after loading big image file in compositor
Issue was caused by cache limitor removing viewer image buffer
from the memory during compositing. Now made it so all viewer
images are persistent in the memory.

This solves the crash mentioned above and also makes it so
render/compo results are never lost.

Further tweaks are possible, but pretty much happy now, at
least no stoppers for work are there.
2014-01-13 18:47:15 +06:00
daedf5be8c UI Icons: use a python script rather then a shell (for non unix systems) 2014-01-13 23:18:25 +11:00
2ebe4f69a9 Compilation error fix and strict warning silence for previous commits 2014-01-13 16:33:18 +06:00
a8b3abc7fc Remove direct lattice modifiers calc from the drawing code
Same as mballs and curves it was only to work around DAG stupidness
which hopefully was fixed in one of the previous commits.

From quick tests everything works fine, if something is broken now
poke me to find a proper solution.
2014-01-13 16:29:07 +06:00
d01bb0b8b6 Avoid memcpy to self when validating UV layer name 2014-01-13 16:27:05 +06:00
63095e492b Remove direct mball creation from object conversion
Same as previous commit, mball shall be visible before conversion
meaning it is to be evaluated already.
2014-01-13 16:20:20 +06:00
b82cce04d6 Remove direct mball creation from the drawing code
This is the same case as curves, and really this is now
totally up to DAG, If something fails, poke me to fix the DAG.
2014-01-13 16:18:08 +06:00
881fb43878 Make bvhutil safe for multi-threaded usage
There were couple of reasons why it wasn't safe for usage from
multiple threads.

First of all, it was trying to cache BVH in derived mesh, which
wasn't safe because multiple threads might have requested BVH
tree and simultaneous reading and writing to the cache became a
big headache.

Solved this with RW lock so now access to BVH cache is safe.

Another issue is causes by the fact that it's not guaranteed
DM to have vert/edge/face arrays pre-allocated and when one
was calling functions like getVertDataArray() array could
have been allocated and marked as temporary. This is REALLY
bad, because NO ONE is ever allowed to modify data which
doesn't belong to him. This lead to situations when multiple
threads were using BVH tree and they run into race condition
with this temporary allocated arrays.

Now bvhtree owns allocated arrays and keeps track of them, so
no race condition happens with temporary data stored in the
derived mesh. This solved threading issues and likely wouldn't
introduce noticeable slowdown. Even when DM was keeping track
of this arrays, they were re-allocated on every BVH creation
anyway, because those arrays were temporary and were freed
with dm->release() call.

We might re-consider this a bit and make it so BVH trees are
allocated when DM itself is being allocated based on the DAG
layout, but that i'd consider an optimization and not something
we need to do 1st priority.

Fixes crash happening with 05_4g_track.blend from Mango after
the threaded object update landed to master.
2014-01-13 15:57:52 +06:00
bc989497de Fix T38139: Objects which are in cyclic dependency are not updated
Graph traversal which is based on counting parents which are still
to be updated fails in cases there are cycles in the graph.

If there are cyclic dependencies in the scene all the objects from
the cycles will be updated in a single thread now one by one. This
makes blender behave the same way as it was before multi-threaded
DAG landed to master.

This needed to tweak depsgraph a bit so now dag_check_cycle() sets
is_acyclic field of DAG forest if there are cycles in the graph.

TODO: It might be possible to save some time on evaluation when
      all the tagged objects were updated in multi-threaded DAG
      traversal.
2014-01-13 15:57:51 +06:00
e618d8238e Fix T38054: High CPU usage with many objects
This is a regression since threaded dependency graph landed to master.
Root of the issue goes to the loads of graph preparation being done
even if there's nothing to be updated.

The idea of this change is to use ID type recalc bits to determine
whether there're objects to be updated. Generally speaking, we now
check object and object data datablocks with DAG_id_type_tagged()
and if there's no such IDs tagged we skip the whole task pool creation
and so,

The only difficult aspect was that in some circumstances it was possible
that there are tagged objects but nothing in ID recalc bit fields.

There were several different circumstances when it was possible:

* When one assigns object->recalc flag directly DAG flush didn't
  set corresponding bits to ID recalc bits. Partially it is fixed
  by making it so flush will set bitfield, but also for object
  types there's no reason to assign recalc flag directly. Using
  generic DAG_id_type_tag works almost the same fast as direct
  assignment, ensures all the bitflags are set properly and for the
  long run it seems it's what we would actually want to.

* DAG_on_visible_update() didn't set recalc bits at all.

* Some areas were checking for object->recalc != 0, however it is was
  possible that object recalc flag contains PSYS_RECALC_CHILD which
  was never cleaned from there.

  No idea why would we need to assign such a flag when enabling
  scene simplification, this is to be investigated separately.

* It is possible that scene_update_post and frame_update_post handlers
  will modify objects. The issue is that DAG_ids_clear_recalc is called
  just after callbacks, which leaves objects with recalc flags but no
  corresponding bit in ID recalc bitfield. This leads to some kind of
  regression when using ID type tag fields to check whether there objects
  to be updated internally comparing threaded DAG with legacy one.

  For now let's have a workaround which will preserve tag for ID_OB
  if there're objects with OB_RECALC_ALL bits. This keeps behavior
  unchanged comparing with 2.69 release.
2014-01-13 15:57:51 +06:00
ac077f016d Remove direct displist creation from array modifier
First of all, it was needed to have that set scenes fix which
was done recently so curve is being evaluated properly on file
load.

And last but not least, also needed to tag DAG node to evaluate
path regardless to curve datablock settings so curve length is
always known.
2014-01-13 15:57:51 +06:00
ce7e6cebf2 Remove direct displist creation from constraints
Since recent DAG commit for set scenes in DAG_on_visible_update()
it seems there're no longer issues with missing curve_cache after
file load.
2014-01-13 15:57:51 +06:00
f00f959d52 Remove direct displist creation from curve deform
This solves threading conflict which happens when having
multiple objects using Curve Deform modifier with the same
curve datablock. This conflict was caused by the fact that
curve_deform_verts() used to temporary override curve's
flags to make it path is there.

Actually, it was setting CU_FOLLOW flag temporary which
was only used where_on_path() (only in terms that this
temporary assignment only affected this function) but it
is now commented out for a while, so no reason to set
this flag temporary, If it's ever to be done, we'll need
to pass flags as an additional function argument.

For the path creation i've extended DegNode structure
which now holds extra bits which indicates what additional
data depending on the graph topology is to be evaluated.

Currently this is only used to indicate that curve needs
path to be evaluated regardless to cu->flag state. This
is so Curve Deform modifier is always happy.

In the future this flag might also be used to indicate
whether bmesh verts are to update (see recent commit to
3-vertex parent crash fix) or to indicate that the object
is the motherball etc.
2014-01-13 15:57:51 +06:00
f86fbc4ea3 Remove direct displist creation from BKE_vfont_to_curve_ex()
This goes back to ancient era again and such a call isn't
safe for threading and really DAG is to make it sure display
list for dependencies is always there.
2014-01-13 15:57:51 +06:00
9d88203101 Code cleanup: no need to check display list elements in texture space match 2014-01-13 15:57:51 +06:00
405cab9663 Remove direct displist creation from object conversion
If the object is visible and editable it means there's no
way DAG to fail to create needed display lists.
2014-01-13 15:57:50 +06:00
b5592d86d6 Remove direct displist creation from bevel code
BKE_curve_bevel_make() is only used from object_handle_update()
friends and never called directly. This means if there's no
display list ready for the bevel object it's something wrong
happened with DAG.

In fact, this check goes back to ancient era and from tests
it appears this check is no longer needed.
2014-01-13 15:57:50 +06:00
ba15dd595f Remove direct displist creation from drawing code
It was some kind of workaround for DAG glitch in 2009
(commit hash 8c5c7ebb0) and according to the comment
was needed to make select outline show immediately.

After some tests it appears DAG behaves almost fine now
(just needed to make it so layer is flushed properly to
the set scene) and no reason to have rather confusing
call in the code.
2014-01-13 15:57:50 +06:00
9386559db0 UI: remove create new directory popup for button in file browser header.
We do keep it when typing an new directory name in the directory text field.

Reviewed By: brecht, billrey

Differential Revision: https://developer.blender.org/D188
2014-01-13 10:45:14 +01:00
7ae1949517 Select Random: add option to de-select
also made metaball operator behave like the others.

Path originally from Walid Shouman, with own edits.
2014-01-13 20:39:12 +11:00
f0fb60f8c9 Fix cycles standalone compile on some systems, CMAKE_DL_LIBS should be enough.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D205
2014-01-13 10:36:02 +01:00
61ff3dfdda Code Cleanup: spelling 2014-01-13 15:31:57 +11:00
717bf85545 Fix some harmless warnings that mostly appeared on MinGW64 2014-01-13 04:28:51 +02:00
c925b5bbb2 Bevel fixes for profiles: better way to calculate.
It is better to keep the profile as it is perpedicular
to the edge, and then project it onto a given plane
at the corners. Also fixed the interpolation to a
different number of segments when the profile is not
round.
2014-01-12 14:10:39 -05:00
d785c64397 Fix T38124: Grease Pencil Line thickness
Issue was in GP draw code: line thickness was not initiated properly (and a null one makes OGL draw a unity-width line).

Also tweaked threshold (when to start a new, width-different OGL linestrip), to make it inversaly proportional to thickness
(so that now, it's 0.2 for a thickness of 1, 0.1 for a thickness of 2, etc.), avoids too big steps when using large thickness.
2014-01-12 19:03:38 +01:00
190809d8ab UIList tweak: make active item visible when it changes somehow (useful e.g. when weight-paintings a rigged mesh). 2014-01-12 15:59:04 +01:00
d6c022d6d7 Fix compilation for OpenCL (and small stype fixes) 2014-01-12 18:18:43 +04:00
47c5898fa1 Cycles: SSE for Voronoi textures (targeted for Haswell CPUs)
Gives up to 15% speedup scenes with voronoi-based textures (up to 25% with volumes) on Haswell. The performance change for other CPUs is much smaller: 1-2%.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D203
2014-01-12 18:14:00 +04:00
fc39e895e9 Style Cleanup: whitespace 2014-01-12 22:27:55 +11:00
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
74216cfdce UI: More consistency for T/N sidebars. Logic Editor Properties are on the right now as well, and File Browser Bookmark sidebar uses "T" key, as its on the right. 2014-01-12 01:00:16 +01:00
dc9fff74cc Fix T38160, N and T sidebars in Image Editor are swapped. Now the Properties are on the right side, which is consistent with other editors.
Differential Revision: https://developer.blender.org/D201
2014-01-12 00:50:43 +01:00
9151f5d227 UI: Add a "New" button for the particle system, consistent to other areas like materials, world and textures.
Differential Revision: https://developer.blender.org/D171
2014-01-12 00:39:39 +01:00
da3fdf0b4b Code Cleanup: in Cycles SSE replace macros with templates, skip unused code with preprocessor, simplify casts 2014-01-11 22:20:03 +04:00
b886c26d1f Cycles: mix hair minimum width code with SSE intersection code
Gives 6.5% speedup for hair.blend from testsuite.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D197
2014-01-11 20:47:30 +04:00
5fc2fe9fad Code Cleanup: move MOUSEX/Y to BGE, describe INBETWEEN_MOUSEMOVE 2014-01-12 01:59:17 +11:00
50650e28ea Events: support for buttons 6 & 7 (some trackballs have these) X11 only
Patch by Marcus von Appen

Note: this patch makes ISMOUSE accept INBETWEEN_MOUSEMOVE as a mouse
event where before it didnt.
2014-01-12 00:40:23 +11:00
1a0c5eb83a Events: Use INBETWEEN_MOUSEMOVE for inactive windows too. 2014-01-12 00:30:16 +11:00
1bfa64895e Ghost: update multitest for changes in BLF 2014-01-11 23:53:23 +11:00
8952f58375 Add tangent space computation/access from RNA (i.e. python).
This simply mimics code used for loopnormals, to enable py scripts to generate and access (temporary)
a tangent 3D vector and bitangent sign for each loop. Together with the split normals, this allow
to recreate a complete tangent space for normal mapping (bitangent = bitangent_sign * cross(normal, tangent)).

Expects all faces to be tri or quads.

Reviewed By: Brecht, campbellbarton

Differential Revision: https://developer.blender.org/D185
2014-01-11 11:51:19 +01:00
274b2590fb Image API: add frame argument to gl_load(), gl_touch()
patch D103 by Krantz Geoffroy
2014-01-11 21:25:20 +11:00
c2508b6e1b Fix T38150: correct fix this time
also use fixed size lists for list creation.
2014-01-11 21:03:21 +11:00
3072d817d8 Scons: disable player along with game-engine. 2014-01-11 14:55:56 +11:00
6d6bb2d130 Fix T38145: python error popup when pressing shift+Z in blender game mode. 2014-01-11 00:59:22 +01:00
4d72a5e34a Fix T38129: cycles viewport render display with very bright colors turning black.
This happened when exceeding the maximum value representable by half floats.
2014-01-11 00:50:53 +01:00
241fccaf6a Fix T37817: cycles CUDA detection problem on Windows with non-ascii paths. 2014-01-11 00:47:58 +01:00
9e1ca28589 Fix T38149: crash adding metaball with zero radius.
This incorrectly use abs(), that's for integers, not floats.
2014-01-10 20:53:39 +01:00
bbab2ecd43 Fix clang warning for (harmless) use of uninitialized variable. 2014-01-10 19:43:31 +01:00
79e040ba95 Fix T38143: pressing F12 key in the text editor on OS X would type an invalid character. 2014-01-10 19:41:01 +01:00
10b5ad5bae Fix T38142: socket interface 'type' enums are not initialized. These are
not really needed anyway, but need to be adjusted to make use of the
socket value copy methods.
2014-01-10 16:53:20 +01:00
ee15db9db5 Fix T38150: BMLayerCollection.items/values docs switched 2014-01-10 22:18:34 +11:00
cc35ad2b3d Fix for random crash in localized node group freeing while tweaking
group default values.

This can happen when using value sliders for node group input values.
The localized copies were setting the "interface_type" runtime pointer
of the original tree to NULL instead of the new tree (which is created
on-the-fly in general). This type is used in RNA update functions
however, the original tree DNA should not be modified there.
2014-01-10 09:37:42 +01:00
18a1e17a20 OpenCollada: Fix error in printf-format (too much arguments). 2014-01-09 20:35:20 +01:00
06d70c7798 Cleanup: mostly, prefer array syntax to pointer arithmetic (keep the later only where it really makes sense). 2014-01-09 20:35:20 +01:00
08eaa8daac Fix T38135: Global start and end point of the curve was set to zero radius & weight, when using 'linked' option.
This was (more or less) OK with hand-drawn strokes, as the number of points made it nearly unoticable, but broke completely with line and poly strokes!

Did this when I implemented linked curve feature because it was easier! Now, convert code always adds a heading and trailing point to the curve,
to get initial/final zero radius. Adds even more complexity to those functions... :/
2014-01-09 20:35:20 +01:00
f12d93919b Grease pencil 'convert to curve' code: some cleanup & refactor. 2014-01-09 20:35:19 +01:00
f1c81a199a Cleanup: Remove tabs in empty lines, use bool when possible instead of int, and mark const values/parameters as such. 2014-01-09 20:35:19 +01:00
3d10343888 Code cleanup: remove WIP code came from the GSoC branch
DAG node tagging was rather an experiment to make derived render working.
However, it ended up in a whole can of worms and need to be re-considered.
It is likely that regular object update tagging and scene update routines
are to be used for this.

Meanwhile no need to keep extra field in dag node. Would save us the whole
byte of the struct which we can use for other purposes meanwhile.
2014-01-10 01:23:49 +06:00
492277b4a1 Fix own regression in font->curve conversion
Issue was introduced in a2bf25e and was caused by
do_makeDispListCurveTypes() no longer placing nurbs
to cu->nurb list.

Such an operation isn't thread-safe and proper solution
would require having granular update. For until them
just make object conversion take care of filling cu->nurb
in with splines from font.
2014-01-10 00:36:37 +06:00
1914d804cf Fix T38083: submenu arrow is overlayed by menu hotkey 2014-01-10 02:25:49 +11:00
0445454f1e Fix T38077: Scaling bones in EditMode drawn using envelope display mode scales joint radii instead
When trying to scale bones in EditMode and the bones were drawn using envelope display mode,
this resulted in the joint radii (i.e. the inner part of envelopes) being adjusted instead.
It turns out that this was due to an old hack that was put in place back in 2.4x (see the
tracker logs for full details of the problem here).

This commit introduces the following fixes:
1) Removed the old hack. Scaling (S) works normally now.
2) Ctrl-Alt-S (i.e. "Scale Envelopes/BBones") is as-is.
   That is, it is used to adjust the size falloff-region around a bone
   (i.e. the "dist" property)
3) Added Alt-S hotkey in EditMode for armatures for adjusting the radii of bones.
   This change just means that the "TFM_BONE_ENVELOPE" mode is now able to be
   accessed from the UI as a tool on its own right (instead of being accessible
   via the old undocumented hack). This tool adjusts the radii of the bone joints,
   which define the actual full-influence region of the envelopes.
2014-01-10 00:48:43 +13:00
da6bc87b57 Fix T38138: incorrect API docs 2014-01-09 21:49:11 +11:00
cc31722a41 Fix T38000: vertex parent crash due to threading issues
Issue is causes by vertex parent modifies original BMesh from
a multiple threads. Ideally this is to be done as a separate
update callback for mesh datablock, but it's not so much simple
now (would need to do some re-arranges to DAG which might conflict
with the work from Ali or will double amount of work we did).

So for now use simple solution with mutex lock.

Based on the patch from Campbell Barton with some fixes to make
changes really thread-safe.

Differential Revision: https://developer.blender.org/D168
2014-01-09 16:33:53 +06:00
113ff51476 Compilation error fix for NetBSD
Based on the patch from Joerg Sonnenberger.
2014-01-09 16:15:24 +06:00
2d8545f87e Fix compilation error on NetBSD
Original patch is by Jeorg Sonnenberger, thanks!
2014-01-09 16:03:02 +06:00
1ea5c2a8e3 Fix remaining sculpt mode crash using multires modifier, similar cause
to previous sculpt fix (OpenGL access from thread with no context
bound). The fact that this has gone unnoticed so far means that people
are dyntopoing like crazy these days.
2014-01-09 04:28:17 +02:00
e47a41e3fc Code Cleanup: style 2014-01-09 11:44:59 +11:00
8c0f9365c0 Fix T38134: missing cycles update when removing world volume scatter shader. 2014-01-09 01:26:43 +01:00
a0dbee6e93 Fix T38016: setting Object.matrix_world does not take bone parents into account. 2014-01-09 00:38:56 +01:00
aad731d51c Code cleanup: remove BKE_object_where_is_calc_simul function.
It doesn't make any sense anymore with the current depsgraph and probably was
not useful for a long time, just a leftover from the pre 2.04 game engine.
2014-01-09 00:17:18 +01:00
0d57724c64 Fix T38062: normal map baking gave randomly values 127 or 128 in flat areas.
Due to float precision issues it was basically random which of the two was used,
now it's slightly biased towards 128, which is the convention for flat colors.
The small difference between 127 and 128 could give problems with sharp glossy
shaders where it would be visible as seams.
2014-01-08 23:36:11 +01:00
2d073bbf21 Fix T38134: cycles viewport render not updating when adding a world volume shader. 2014-01-08 23:12:54 +01:00
55f7a4aebc Fix T38104: mathutils.cell_vector() always returns (0,0,0)
Reviewed By: brecht
2014-01-08 23:03:09 +01:00
b4644c658b Fix crash cancelling command line render to AVI movie file. 2014-01-08 22:28:29 +01:00
7bcb34e59b Fix T38131: node link buttons (like for cycles in material properties) were not
giving correct colors with theme menu colors set to bright values.

Thanks to Denis Declara for finding the cause of this bug.
2014-01-08 20:41:38 +01:00
20b046d763 Cycles: workaround for noise performance regression in CUDA 5.5
Use manual ternary operation widening in grad(). Without it nvcc 5.5 produces multiple branch splits with very big branches (because of inlining). This solves 19% performance regression for BMW1M-MikePan.blend.

Also remove one redundant instruction in perlin SSE (when h == 12 or h == 14, then h is always >= 4).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D190
2014-01-08 22:25:55 +04:00
61c9cacbd7 Fix T38074: sequence rendering gave "No camera" warning for other scenes that
didn't need a camera because they use only compositing nodes.
2014-01-08 18:29:16 +01:00
fa88c7ffae Fix T38105: Action Editor refresh is missing when a keyframe is inserted in 3D view
When yiz insert a keyframe (on a location keying set f.e.) in the 3D-view and you got an action editor open then the action datablock is  not changed (displaying only the button "new") until you hover the action editor with the mouse.

 Added a handler in the action_header_area_listener to handle this case

If non-obvious, some technical note about what the cause of the bug was and
how it was solved.
2014-01-08 17:57:33 +01:00
09d6ad6142 Fix T38108: blender freeze in remembering operator properties. 2014-01-08 17:54:49 +01:00
cdeb3c3922 Fix for incorrect use of abs() in intersect_sphere_sphere_2d 2014-01-09 03:15:59 +11:00
d5c9b509ec Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits.
Expose float precision helper in UI_interface.h API, so that numinput can use this helper as numbuttons already do.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D186
2014-01-08 17:05:05 +01:00
8305fd8841 Code Cleanup: style edits to bevel and remove unneeded boundvert_rep_face call 2014-01-09 00:50:32 +11:00
49aa701645 Add profile control parameter to Bevel.
Parameter controls concavity / convexity.
    <.25 means: concave inward
    .25 means: straight slanted
    >.25 means: concave outward
    .5 means: circular (the default)
    1 means: straight along original sides
For now, there is a hard lower limit of .15
because more work is needed to get decent
results in the range below that.

The profile is actually a superellipse, and the
parameter is 1/4 of the exponent in the implicit equation
for a superellipse, except at the extreme values of 0 and 1.
2014-01-08 07:40:01 -05:00
8094ac9194 Cycles: Fix World Homogeneous volume setting, had no influence.
Thanks to "storm" for noticing this!
2014-01-08 11:00:06 +01:00
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
3fbd63c52e Text3d: improve error checking when pasting from files 2014-01-08 16:14:19 +11:00
4529fe9010 Fix for RE_engine_begin_result using a NULL pointer 2014-01-08 15:43:49 +11:00
8aaf4aaae8 Sequencer: prevent unknown scopes from crashing 2014-01-08 15:40:55 +11:00
b243b4fe40 Fix for inorrect use of BLI_utf8_invalid_strip, add assert to prevent it happening again. 2014-01-08 14:46:06 +11:00
e781ea79b2 UV Unwrap: smart uv unwrap would fail still on some very small faces 2014-01-08 14:03:36 +11:00
3739f53a6e Fix T38112: Rigid Body can't be created for objects with linked mesh
Make poll function for rigid body add operators less strict.
2014-01-08 03:29:12 +01:00
7647a2b751 Much better solution for negate/inverse in numinput.
Previous one was way over complicated, and did not worked with units!
2014-01-07 22:23:03 +01:00
ab2bb94f6b Fix a small glitch with string generated by numinput, they could cut multi-bytes utf8 chars (like the '°' of angle values), now call BLI_utf8_invalid_strip() to prevent this. 2014-01-07 20:56:45 +01:00
d490e686f0 Fix T38100: laplacian smooth crash 2014-01-08 03:56:43 +11:00
d2fd8c75b0 UI / Nodes: Revert Slider for "Value" node, this is no percentage nor a 0-1 range. 2014-01-07 16:35:52 +01:00
073be286b4 Cycles: Update Integrator Presets and Total Samples info for latest changes. 2014-01-07 15:55:32 +01:00
7b0a46b1ff Fix CUDA/OpenCL compile errors in scattering commit. 2014-01-07 15:48:04 +01:00
2dd3328987 Cycles: Volume Scatter node was missing in the Add Node menu. 2014-01-07 15:24:53 +01:00
e23bcbbb6d Fix for crash in anim render: The callbacks in bMovieHandle are expected
to exist and accessed without prior NULL checks (with exception of
get_next_frame and get_movie_path). The callbacks are not reliably
initialized however if none of the video formats is enabled (AVI being
the default). Added stub functions now that ensure access to
bMovieHandle callbacks is safe and doesn't crash.
2014-01-07 15:18:37 +01:00
01df756bd1 Cycles Volume Render: scattering support.
This is done by adding a Volume Scatter node. In many cases you will want to
add together a Volume Absorption and Volume Scatter node with the same color
and density to get the expected results.

This should work with branched path tracing, mixing closures, overlapping
volumes, etc. However there's still various optimizations needed for sampling.
The main missing thing from the volume branch is the equiangular sampling for
homogeneous volumes.

The heterogeneous scattering code was arranged such that we can use a single
stratified random number for distance sampling, which gives less noise than
pseudo random numbers for each step. For volumes where the color is textured
there still seems to be something off, needs to be investigated.
2014-01-07 15:03:41 +01:00
b174e7b0b8 Fix for error in own recent commit 2014-01-08 00:57:58 +11:00
e87095fa5d Cleanup: silence warnings. 2014-01-07 14:53:32 +01:00
256a069987 Middle-clip tweaks:
* Now only middle-clip when both left and right parts of remaining strings are at least two times icon-width (thus most short labels will never be middle-clipped).
* Add a trailing ellipsis to right-clipped strings (unless it would take more than 20% of whole available width, in this case just clip chars, to keep as much data visible as possible!).
2014-01-07 14:53:32 +01:00
0213a43562 Armatures Editmode: option to recalculate roll from the angle to the parent 2014-01-08 00:35:11 +11:00
2328f94e1d Text3d: underline offset on curved path wasnt working right 2014-01-07 23:04:47 +11:00
ebf23b5144 Fix T38075, crash from shader node add/replace tree view template.
The sanity check for copying socket default value was using the socket
idname for type compatibility checks, which is too strict. Subtypes
would not be recognized as copyable, but since only the plain data type
is needed below this is all that needs to be checked.

That alone would not cause crash (just missing default value copy),
but the tree view template was messing with the default_value DNA
directly by freeing it in advance, which is not necessary and should
be left to blenkernel when freeing the node. Otherwise this would
leave the node invalid without a default_value if the copy function
bails out.
2014-01-07 10:54:31 +01:00
54ebaad377 Text3d: Add support for underline characters with text-on-path 2014-01-07 20:19:20 +11:00
da16b3000b Fix T38044: Filter Key Binding shows Incorrect result 2014-01-07 19:27:44 +11:00
ead8b82ca7 Object Operators: make-dupliface and join-uvs weren't using UNDO.
also improve make-dupliface tip
2014-01-07 18:09:02 +11:00
4a372102c7 Text3d: move text selection boxes from Curve to EditFont struct
resolves T38079
2014-01-07 17:12:24 +11:00
a97180046b Fix bash/ksh specific test syntax
[ foo = bar ] has been the traditional compare operator, using == is supported by some shells, but not all. The latter offers no advantage over the former.

Differential Revision: https://developer.blender.org/D179
2014-01-07 14:12:02 +11:00
fee66f7bc8 Code cleanup: defines for statfs were getting out of hand for BSD's.
add __DragonFly__ and internal defines to avoid copy-pasting checks.

also remove __CYGWIN32__ check, since cygwin is no longer supported.
2014-01-07 13:39:00 +11:00
17a4ba2c7c OSX/scons: after discussion i was told cycles does decide to use sse4.1 kernel on the fly,
so autodetection is obsolete @buildtime. Leave in print for testing case
2014-01-06 23:29:21 +01:00
d21ef02e8f OSX/scons: autodetecting sse4.1 capability and set it to used 2014-01-06 22:46:20 +01:00
e164a500c8 Fix to own previous commit for bevel vertex only case.
In separating out the adj mesh change from a profile change,
I'd forgotten that some profiles need to be flat (in particular,
for vertex-only bevels). This fixes that.
2014-01-06 15:53:22 -05:00
62c8bae872 Added scons option to actually build the sse41 kernel. CMake already has it 2014-01-06 21:38:56 +01:00
5022d9f81b Cycles: Don't include SIMD util file for OpenCL/CUDA, this fixes OpenCL compilation. 2014-01-06 21:28:18 +01:00
a0b424aa4c Take back last header copy, due it is for native only, must be a runtime solution, todo: do by definitions 2014-01-06 20:43:54 +01:00
48d8faeb79 Cmake: fix kernelcompile after introduction of util_simd.h 2014-01-06 20:26:02 +01:00
acc90b40bf Cycles: Minor optimization (~1%) for texture access on CPU 2014-01-06 22:05:31 +04:00
4817da0df4 Cleanup: use blend() in perlin noise (gives 12 less instructions on SSE4.1) 2014-01-06 21:24:28 +04:00
bdd20e18ef Bevel: use stack memory for interp_vmesh()
Rather then using the memarena and never freeing.
2014-01-07 03:17:32 +11:00
96903508bc Cycles: SSE optimization for sRGB conversion (gives 7% speedup on CPU for pavillon_barcelone scene)
Thanks brecht/dingto/juicyfruit et al. for testing and reviewing this patch in T38034.
2014-01-06 20:03:30 +04:00
e0a4a4afc3 Bevel: change 'adj' pattern to use subdivision.
This gets rid of a hacky way of setting the mesh
coordinates at corners, which created overlaps
in some cases.
Also, special case a cube-like corner with all
edges beveled, to snap to a sphere, giving more
expected curvature in that case.
2014-01-06 10:52:31 -05:00
4b30b22ecf Fix for recent kdtree py module with MSVC
also remove submodule includes from mathutils.h
2014-01-07 00:53:52 +11:00
4848f9029a Patch D133: Python wrapper for BLI_kdtree (adds mathutils.kdtree)
Originally by Dan Eicher, with my own fixes and adjustments (see patch page for details).

For details there are unit tests and api example usage.

	doc/python_api/sphinx-in-tmp/menu_id.png
2014-01-06 20:32:34 +11:00
90efa345c2 Python API: utility function for filling a tuple with a single value. 2014-01-06 16:46:00 +11:00
7b8e07b7d0 Fix for own error in recent text3d changes
Called important function from within an assert.
2014-01-06 14:41:33 +11:00
64fc94e93f Code Cleanup: osl style 2014-01-06 13:58:33 +11:00
ce6dce3b13 Code cleanup / Cycles: else/if for SSE41 kernel functions. 2014-01-06 03:22:14 +01:00
56081d596e Cycles / OSL: Add a new procedural texture template, Lyapunov fractals.
Based on a patch by Sylvio Sell, OSL port by myself.
Task and example renders: https://developer.blender.org/T32305
2014-01-06 02:39:18 +01:00
9686554633 Text3d: avoid assert, clamp position before getting the selection 2014-01-06 03:27:34 +11:00
ede891808c UI: pin icon was ignoring DPI 2014-01-06 03:10:15 +11:00
ca78e402eb UI: Use shift+lmb for toggling panel pinning (not to conflict with MMB emulation) 2014-01-06 03:00:54 +11:00
3027cdd0ba Fix own error in recent changes curve text storage,
Setting via rna crashed.
2014-01-06 02:40:17 +11:00
7f0239033b Text3d: font family dupli-objects now follow rotation of the curve path 2014-01-06 02:05:14 +11:00
5ff0d465ee Text3d: minor edits to the API, remove BKE_vfont_to_curve_nubase_ex 2014-01-06 01:49:21 +11:00
3b024d63fe Text3d: fix font family feature for unicode and correct tooltip 2014-01-06 01:37:19 +11:00
38bbd9c778 Text3d: paste additions
- Add paste from system clipboard which behaves like paste from file.
- Paste from file now replaces the selection rather then just adding to the end.
- Move paste operations into the 'Edit' menu.
- Added generic paste functions: font_paste_wchar, font_paste_utf8.
- Fix paste max length check not taking the selection length into account.
2014-01-06 00:39:13 +11:00
b0ab91c0a4 Code cleanup: fix type in malloc id string 2014-01-05 17:26:32 +06:00
039652a3e8 Fix memory leak caused by main library split
Evaluation Context wasn't freed for temporary mains.
2014-01-05 17:26:28 +06:00
a2bf25e8ff Fix crash when having multiple text objects sharing the same curve datablock
Issue was caused by BKE_vfont_to_curve() modifying curve->nurbs list which
gave threading issues.

Now added BKE_vfont_to_curve_nubase() which operates on a given nurbs list
base which is local in do_makeDispListCurveTypes().

By the looks of it it wouldn't give speed regression because previously it
also was creating nurbs for every font object sharing the same curve data.
2014-01-05 17:26:13 +06:00
ac3d33af73 Code cleanup: preprocessor indentation inside #ifdef block 2014-01-05 17:23:29 +06:00
99d050f88b Text3d: selection in editmode now follows rotated text along path 2014-01-05 22:20:33 +11:00
42bd5d7c80 Text3d: fix for smallcaps modifying the original text input in editmode.
Oversight in own recent commit to avoid allocating a new wchar_t array.
2014-01-05 21:15:25 +11:00
3eb818e53a Text3d: smallcaps wasnt working properly for text-on-path 2014-01-05 21:15:25 +11:00
4eed4b3bcd Text3d: remove sepchar, old feature which no longer has any UI access. 2014-01-05 21:15:24 +11:00
e20f357cc2 Text3d: error in own recent fix for thread safety 2014-01-05 21:15:24 +11:00
d9697bc145 Fix T38024 crash when rebuilding sculpt mode buffers.
Main issue here is that glBuf* calls were invoked from threads different than
main thread. This caused a crash (since those do not have a GL context active).

Fix here is twofold:
* add an ID buffer in buffer pool that handles pbvh buffers and is freed
from main thread when gpu_buffer_pool_free_unused is called.

* do not create glbuffers in derivedmesh creation routine, rather tag nodes
for update and create those in the draw function
(guaranteed to be called from main thread)

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D169
2014-01-05 04:58:27 +02:00
0074eac1ed More tweaks to clip middle:
* Do not apply margins with MENU (i.e. dropdowns) either.
* When middle clipping would remove only a few chars, rather clip right part!
2014-01-04 16:50:42 +01:00
76d9244843 Fix core issue with clipping labels (labels have no margins, so border should be 0 in this case!). 2014-01-04 16:18:08 +01:00
f25dbe320f Text API: make text.current_line_index writable
use for setting the text position when writing system info.
2014-01-05 01:24:10 +11:00
0a3ce15ce3 Revert "Quick fix for system info text always being scrolled out of view when loaded for the first time"
This can be done without extending the API, using RNA access instead.
2014-01-05 01:13:06 +11:00
1f2aec71b4 Fix for previous commit...sorry! 2014-01-04 13:47:40 +02:00
baa1ae0749 Fix MinGW32 compilation 2014-01-04 13:39:10 +02:00
1db7f2f93d Quick fix for system info text always being scrolled out of view when loaded for the first time
Added an API method to Text datablocks for moving the cursor to a specific line in the
file. This makes it possible to reset the cursor position at the end of the sysinfo
operator.
2014-01-05 01:24:54 +13:00
6063c58cc6 UI / 3D Toolbar: Animation panel had a too large gap at the top. 2014-01-04 13:03:46 +01:00
6734936c13 RNA API: use bool's for enum itemf callbacks. 2014-01-04 18:10:01 +11:00
b9114cb609 UI: Use bool rather then int/short's where possible 2014-01-04 18:10:01 +11:00
091740f858 Mesh Bisect: add header info message for modal operation
Fixes T37700

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D166
2014-01-04 05:41:58 +01:00
e505203e8d Units: Add milligrams for mass
Avoids having small values displayed as "0kg".
2014-01-04 04:22:20 +01:00
4915706df6 Revert "Units: Make grams base unit for mass"
This reverts commit ead6d397fd.
2014-01-04 04:22:20 +01:00
ea1ed3f4aa Rigidbody: Code cleanup
Convert int to bool.
2014-01-04 04:22:20 +01:00
cde3ff75d9 UI: Fix issue where tab text was too small and closely spaced 2014-01-04 13:55:40 +11:00
c3bc2fd941 CMake: cleanup and add include 2014-01-04 13:17:07 +11:00
a335137607 CMake: fix for OpenEXRConfig.h not being found on some Linux systems 2014-01-04 13:16:41 +11:00
fa4260ced9 Code Cleanup: use cmake case matching other find modules 2014-01-04 12:46:18 +11:00
fd6ef46d6d KDTree: ensure balance runs before usage (in debug mode) 2014-01-04 10:44:02 +11:00
1af82c0194 Add "Basic" and "Options" tabs for Mesh Edit Mode.
This creates the initial two tabs for Edit Mode to makes the new toolbar tabs usable. Further toolbar organization is to follow, but this at least makes the features work with the current organization.
2014-01-03 16:21:52 -06:00
8ccca6440e Add missing separator between Group: and Parent: 2014-01-03 15:28:19 -06:00
bab51c78cb Rename "Objects" to "Group:" and separate parent operators into "Parent:" section.
This also shortens the naming for the operators since they're now under clear labels.
2014-01-03 15:28:19 -06:00
aadce94f22 Rename Add to Group and Remove from Group operators in the toolbar.
The default operator names are too long and rather "obtuse" to use @Billrey's words.
2014-01-03 15:28:19 -06:00
bf3a4acffc Fix formatting on section names in the Relations tab. 2014-01-03 15:28:19 -06:00
0641bb1117 Rename "Object" to "Operations" in the 3D View Toolbar Basic tab.
This makes the naming less confusing, since all of the tools apply to objects.
2014-01-03 15:28:19 -06:00
83c9b80867 Fix alignment of Grease Pencil options. 2014-01-03 15:28:19 -06:00
53ef7a9932 Remove individual panels for primitive objects, adding only primary ones.
This makes for a much cleaner panel with a lot less wasted space. Thanks DingTo for the suggestions.
2014-01-03 15:28:19 -06:00
11bb89a632 Cleanup the Grease Pencil panel of the 3D View Toolbar.
This makes the panel slightly cleaner, giving more separation between the distinct elements. It also adds a new "Measure" label, so that the Ruler/Protractor is not so closely "related" to the Grease Pencil.
2014-01-03 15:28:19 -06:00
8a3923107c Add Undo/Redo and Undo History to the History tab of the 3D View Toolbar 2014-01-03 15:28:18 -06:00
addf274ce4 Add "Bake Action" to Animation tab of 3D View Toolbar.
This is based on the rationale here, in order to begin giving a more complete set of animation tools to the toolbar: https://developer.blender.org/file/data/hlt2vtyqo4iqwookyack/PHID-FILE-ghcjwtxvl7siwidxlw6b/3D_View_Object_Mode_Tools.png
2014-01-03 15:28:18 -06:00
a22a2c6fd7 Adding Relations category to 3D View Toolbar.
This creates the tab for relations in the toolbar. This tab includes those operators that relate to objects relationships with other objects and data.
2014-01-03 15:28:18 -06:00
c36070299f Adding remaining object categories to the Create tab of the 3D View Toolbar.
This adds the remaining object categories to the Create tab, including Nurb Surfaces, Lamps, Meta objects, etc. I've also updated the labeling for the various buttons to be consistent with one another.
2014-01-03 15:28:18 -06:00
2fbfa76808 Add "Add Curve" buttons to 3D View Toolbar
This creates a series of buttons in the 3D View toolbar to add new curve objects to the scene. This new panel is categorized under the Create tab.
2014-01-03 15:28:18 -06:00
153d415f1d Add Mesh buttons for 3D View Toolbar
This adds buttons in the 3D View toolbar to add new mesh objects to the scene. These buttons are added via the Create tab/category, soon to be populated with other object types as well.

A panel is added for both Object mode and Edit mode so as to not display in incorrect context (such as Pose Mode).
2014-01-03 15:28:18 -06:00
3a3cce2e9b Basic Tab for Object Mode 3D View Toolbar
This updates the organization and naming of the Basic tab for the 3D View toolbar. It reorganizes the tools that were already there and adds Mirror and Duplicate Linked object operators.
2014-01-03 15:28:18 -06:00
428a8d5980 Object Mode Toolbar Tabs
Summary:
Here are the initial tabs for the 3D View Object Mode toolbar. This is based on the discussions between myself and @billrey in T37569

P.S. apologies for the duplicate. The first one I mistakenly sent to the Edit Mode task, T37568. I have corrected it and also made a couple changes, per @campbellbarton's request.

Reviewers: campbellbarton

CC: campbellbarton, brecht, billrey

Maniphest Tasks: T37569

Differential Revision: http://developer.blender.org/D129
2014-01-03 15:28:18 -06:00
4d4222b761 Changed percentage and 0-1 number fields to use sliders. This is more consistent.
Reviewed by Brecht van Lommel, Thomas Dinges and Jonathan Williamson
2014-01-03 21:12:56 +01:00
975c048ecd Fix gcc compile error in last commit. 2014-01-03 19:24:55 +01:00
ca7060662d Fix cycles OSL volume render crash with multiple closures. 2014-01-03 18:57:38 +01:00
bb0a0315e2 Code refactor: move random number and MIS variables into PathState.
This makes it easier to pass this state around, and wraps some common RNG
dimension computations in utility functions.
2014-01-03 18:57:38 +01:00
57407d39b0 Fix crash when trying to reset color space to default value 2014-01-03 23:11:25 +06:00
0dabf824fb Fix T38045: Clone stamp crashes
Issue seems to be caused by thread-unsafe IMB_freeImBuf.
Now use generic BKE_image_release_ibuf to de-reference
image buffer which was acquired from image datablock.
2014-01-03 23:00:53 +06:00
56a531eb29 Fix T38043: Text clipping when it shouldn't
Tweak some more 'middle clipping' (zoom issues).
2014-01-03 15:49:07 +01:00
ba8d65a9a7 Code clean-up change naming of gpu buffers used by pbvh to better
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer,
renamed to GPU_PBVH_Buffers
2014-01-03 12:48:12 +02:00
c5cb42f402 Code Cleanup: use bool for bmesh operator boolean mapping functions 2014-01-03 21:35:29 +11:00
a288644b1e Code Cleanup: WIN32 defines, check for _MSC_VER instead of !FREE_WINDOWS 2014-01-03 20:46:12 +11:00
f489e0c14c Code Cleanup: remove strlen() and unneeded include in recent commit
also fix for incorrect sizeof() use.
2014-01-03 19:40:29 +11:00
15bc30f4ee Text3d: store number of characters and utf8 length separately
EditFont's use of Curve.len was very confusing, in editmode it
represented the number of characters, in object mode the number of
bytes. add Curve.len_wchar and keep track of both.

Also don't convert the editmode text into utf8 on every keystroke.
Now this is done on exiting editmode or save - to match most other
object types.

This also fixes curves 'body_format' being reported with an invalid size.
2014-01-03 17:08:23 +11:00
a5cb2229ab Text3d: avoid converting utf8 to wchar_t in editmode 2014-01-03 14:20:35 +11:00
f345414b89 Fix T38032, typo in Python API documentation. 2014-01-03 02:28:21 +01:00
99ed221a6b UI: Tooltip fix for the Particle Template ID.
Reviewed By: brecht, dingto
Differential Revision: https://developer.blender.org/D165
2014-01-03 02:14:32 +01:00
46a3752a1f Fix :I broke the build for MSVC 2008 this fixes it 2014-01-02 23:32:44 +01:00
1c8a12ee61 Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems 2014-01-02 22:19:10 +01:00
d0c6f14c73 Fix T38033: cycles volume emission changes with step size. 2014-01-02 21:34:22 +01:00
202bb32134 Fix T37056: Making segment flips curves it's not needed
Made the system around splines order a bit smarter, so
crating a segment between two splines wouldn't switch
direction if splines are selected in a way that they're
"co-linear".

It is possible to make things even smarter using active
point and so, but that i'd consider a TODO.
2014-01-03 01:44:46 +06:00
9b7f30d6b0 Bring back edit curve add menu
It was wrongly considered unused in rB5fdfa6d47542db32426ac080f071a1fd751e05a7
2014-01-03 01:34:35 +06:00
d94202b312 Fix T37170: Missing curve outline when using constructive modifiers
Issue was caused by wrong bool flag assignment.
2014-01-02 22:59:21 +06:00
51c6ecac52 Fix T38004: size of Waveform, Vectorscope and Histogram is incorrect in VSE
Made it so scopes image buffer is displayed without any additional scale
applied on them,

Further tweaks are possible here, but that i'd consider a TODO.
2014-01-02 17:57:01 +06:00
f54778b7ee Fix T38002: crash selecting a view mode for "Preview" in Sequence Editor 2014-01-02 17:44:56 +06:00
ad682f22fb Add back - and / shortcuts in modal numinput (as other 'special' keys, you have to use ctrl to activate them)... 2014-01-02 12:04:11 +01:00
28d578871d Fix "Flipped" drawn in edgeslide header text even when Even is disabled. 2014-01-02 12:04:10 +01:00
aef307cf31 Fix T38019: Edge/Vertex Slide recognises Even and Flipped as if they were numerical values
Further tweaked/simplified events handling in transform code, hope this time it works OK...
2014-01-02 12:04:10 +01:00
f9353b8e8d Code cleanup: remove patch series from libmv
Since we're using own libmv branch from git.blender.org
we don't need to have local patches for libmv in blender
source tree.
2014-01-02 15:24:46 +06:00
f9e0ac4ced 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.
2014-01-02 15:24:46 +06:00
f75441014c Fix T38025: Key-framing lattice points fails
Clarified the tooltip/description on the LatticePoint.co property to make it
clear that it shouldn't be edited, and that LatticePoint.co_deform should be
used instead.
2014-01-02 12:51:27 +13:00
c7029f06d9 Add new BGE Stereo mode: 3DTV top-bottom.
This mode is designed for passive 3D TV: the viewport is split
horizontally - left eye above, right eye below - but the original camera
viewport is squashed in each half (with half the vertical resolution).
This is necessary to restore the aspect ratio in the 3D output because the TV expands each half to the full screen size.
2014-01-02 00:26:15 +01:00
9a1585a533 Code cleanup: use bool flag for direction in clip prefetch
That was nothing really wrong with the old short used for
direction, but that became kinda annoying because of compiler
idiocy which considered direction might have been zero.

Using explicit dual-state flag is more clear anyway.
2014-01-01 23:27:17 +06:00
2c7b095f2b Code cleanup: line wraps and file names in doxy comments 2014-01-01 22:45:59 +06:00
fe00175c35 Fix crash happening in Cycles fcurve modifier
Summary:
Crash was happening because of fcurve modifier stack
used modifier's DNA to store temporary data.

Now made it so storage for such a thing is being
allocated locally per object update so multiple objects
which shares the same animation wouldn't run into
threading conflict anymore.

This storage might be a part of EvaluationContext,
but that'd mean passing this context all over in
object_where_is which will clutter API for now without
actual benefit for this.

Optimization notes: storage is only being allocated
if there're Cycles modifier in the stack, so there're
no extra allocations happening in all other cases.

To make code a bit less cluttered with this storage
passing all over the place added extra callbacks to
the FModifier storage which runs evaluation with the
given storage.

Reviewers: brecht, campbellbarton, aligorith

CC: plasmasolutions

Differential Revision: https://developer.blender.org/D147
2014-01-01 22:32:48 +06:00
5d701c6d25 Re-bundle libmv from new upstream repository
No functional changes, just to make sure all the patches
are ported nicely and that update scripts works fine.
2014-01-01 22:32:48 +06:00
2785e8e73d Split tracking.c into several files
File tracking.c became rather huge and annoying to
maintain and it really contains several independent
areas of motrack pipeline.

Now we've got:

* tracking.c: general-purpose functions which are used
  by blender, clip editor, RNA and so.

* tracking_detect.c: feature detection functions
  (blender-side, logic is still in libmv).

* tracking_plane_tracker.c: blender-side 2D tracking logic.

* tracking_plane_tracker.c: plane track tracker.

* tracking_solver.c: functions for camera solving.

* tracking_stabilize.c: 2D stabilization functions.

* tracking_util.c: utility functions for all those files
  and which shouldn't be public.
2014-01-01 22:32:48 +06:00
5933b2455c Update Ceres to the latest upstream
Summary:
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.

Reviewers: keir

Differential Revision: https://developer.blender.org/D153
2014-01-01 22:32:47 +06:00
71f689843d Fix deadlock happening when using Save Buffers for render
Summary:
Issue was caused by the same tile being written twice to
the EXR file. This was happening because of partial update
of work-in-progress tiles was merging result to the final
render result in order to make color management pipeline
happy.

We need to avoid such a merges and keep memory usage as
low as possible when Save Buffers is enabled.

Now render pipeline will allocate special display buffer
in render layer which will contain combined pass in the
display space. This keeps memory usage as low as we can
do at this moment.

There's one weak thing which is changing color management
settings during rendering would lead to lossy conversion.
This is because render result's display buffer uses color
space from the time when rendering was invoked.

This is actually what was happening in previous release
already actually so not a big issue.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D162
2014-01-01 22:32:47 +06:00
549248f64b Fix wrongly shorten labels in splash (allocated size was a bit too small, rB3c6b5b72a497). 2014-01-01 16:07:56 +01:00
c8dd6b67b6 Fix T38013: Incorrect RNA Path when trying to keyframe the nth vertex of Bezier curve shape key data
key->elemsize is set to 16 for ID_CU (i.e. Curves and NURBS surfaces). However,
this value is only correct for NURBS (which use BPoints). When trying to keyframe
the nth vertex of a particular shape key's data (where the shape keys are being
used on Bezier curves), the RNA Paths for that are generated with the wrong
data index. From empirical testing, it appears that this should be 12 instead.
2014-01-02 00:28:39 +13:00
de147a907f Fix T38008: Bug in templates operator_nodes.py 2014-01-01 12:02:43 +01:00
3c6b5b72a4 Add a new "shortening process" for UI string drawing, which keeps both right and left parts
of the drawstr and replaces the middle by '...'

Rationnal:
It's usually easier to figure out what a troncated string means if you have both its start and end parts.

Details:
It currently affects all UI items (text fields, buttons, labels...).
Only exceptions are buttons inside menus, text fields & co being edited, and numbuttons/sliders.
Note that some static texts (like panels' titles or items in outliner) do not use usual UI items,
and just draw the whole text, using OpenGL to clip it. Will make another patch to fix this.

Reviewers: campbellbarton, brecht, carter2422, #user_interface

Reviewed by: brecht, carter2422

CC: billrey

Differential Revision: https://developer.blender.org/D114
2014-01-01 11:58:45 +01:00
d8f4cb9b69 Fix T37965, loop multicut confirmation not happening when numeric input
is used. When numerical input was active confirmation events were not
getting handled.

Code here seems a bit duplicated, it may be possible to simplify it, but
leaving it slightly bloated for now.
2014-01-01 06:27:17 +02:00
bf0231f297 Clean up Zoom Style section of Input Preferences
This removes some grouping labels and improves option names to make them self explanatory and consistent with one another.

Before: https://www.dropbox.com/sh/zp4ildwpuew1w4x/RSLGK_gOG7
After: https://www.dropbox.com/s/c131zb5zb1ds5ap/Screenshot%202013-12-31%2018.54.38.png
2013-12-31 18:53:12 -06:00
e271e2d84e Align Author field and label horizontally
This aligns the User Preferences > File > Author field and label horizontally, saving space and making it more consistent with author text fields within the same section.
2013-12-31 18:20:33 -06:00
a594db4efc Improve readability of System panel of User Preferences
This commit adjusts the spacing of the items in User Preferences > System. The spacing is adjusted via separators between each section of options. This better differentiates between groups of options. It also removes a few extra separators for more consistency.
2013-12-31 18:20:33 -06:00
ead6d397fd Units: Make grams base unit for mass 2013-12-31 18:10:30 +01:00
33a027b3a3 Fix T37993: mass of Rigid Body ignores scene unit scale
Mass units weren't scaled in the ui.
2013-12-31 18:10:30 +01:00
aaabac069f Cycles Volume Render: these changes should have included in the last commit. 2013-12-31 18:03:22 +01:00
9cd2b19999 Cycles Volume Render: generated texture coordinates for volume render.
This does not support staying fixed while the surface deforms, but for static
meshes it should match up with the surface texture coordinates. Implemented
as a matrix transform from objects space to mesh texture space.

Making this work for deforming surfaces would be quite complicated, you might
need something like harmonic coordinates as used in the mesh deform modifier,
probably will not be possible anytime soon.
2013-12-31 17:38:26 +01:00
6b03f92aa7 Cycles Volume Render: optimization to avoid exporting surface attributes when
only a volume shader is used.
2013-12-31 17:30:34 +01:00
9939ec06dd Fix T37994: crash in preview render after recent color management changes.
Reviewed By: brecht
2013-12-31 15:03:06 +01:00
1fa63b317a Fix T37992: german NUMPAD-COMMA is not tranlated to decimal dot (for modal numinput). 2013-12-31 13:42:23 +01:00
e2e5b45ff7 Fix T37935: 3dsmax key configuration broken after recent mesh operator changes. 2013-12-31 02:19:21 +01:00
0775e739b7 Fix T37947: large cursors now also work on linux/mac for the edit mode cross. 2013-12-31 02:00:21 +01:00
Masakazu Ito
3d40e3f9db Fix console incorrectly showing on Windows Blender startup in some cases.
The console window is hidden by default, but we need to avoid this when
starting from the command prompt, because it would hide the window you just
typed the command in.

Previously it would check if Blender was started from "explorer.exe" to
determine that, but that wasn't working for application launchers like
Appetizer or Colibri. Instead we now check if the process ID is the same as
the process ID of the console window, which appears to work reliably.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D122
2013-12-31 00:17:38 +01:00
a1c740a420 UI: improve tooltip for use preview range option in timeline.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D161
2013-12-31 00:01:55 +01:00
cb4d32cba3 one more msvc 2013 change 2013-12-30 22:25:56 +01:00
a857a6fcf9 Fix T37970: Node scale/rotate use incorrect pivor
note: added code to use real node center, but ifdef'd for now since it
doesnt work well with absolute snapping.
2013-12-30 20:09:16 +11:00
4606ded232 Node Editor: enable transform helper line 2013-12-30 19:23:29 +11:00
6a473305af Fix T37920: BGE LibLoad failed for meshes with no materials 2013-12-30 15:49:13 +11:00
0d6ae3fda2 Main API: refactor naming, use BKE_main_ prefix and add main arg. 2013-12-30 13:25:27 +11:00
19103b4437 Code Cleanup: quiet unused define warning 2013-12-30 12:19:27 +11:00
d44132d0d0 Fix for crash with game engines LibLoad feature 2013-12-30 12:18:41 +11:00
6d9e6bca8f Code Cleanup: cycles tips and long lines 2013-12-30 12:06:36 +11:00
24c807ffd4 Code Cleanup: unused defines & style 2013-12-30 10:58:18 +11:00
889d77e6f6 Cycles Volume Render: heterogeneous (textured) volumes support.
Volumes can now have textured colors and density. There is a Volume Sampling
panel in the Render properties with these settings:

* Step size: distance between volume shader samples when rendering the volume.
  Lower values give more accurate and detailed results but also increased render
  time.
* Max steps: maximum number of steps through the volume before giving up, to
  protect from extremely long render times with big objects or small step sizes.

This is much more compute intensive than homogeneous volume, so when you are not
using a texture you should enable the Homogeneous Volume option in the material
or world for faster rendering.

One important missing feature is that Generated texture coordinates are not yet
working in volumes, and they are the default coordinates for nearly all texture
nodes. So until that works you need to plug in object texture coordinates or a
world space position.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-30 00:04:02 +01:00
af128c4c96 Fix cycles volume emission not working with OSL. 2013-12-30 00:04:02 +01:00
30aa0c2482 Code refactor: better distinguish scatter and absorption for volume integration. 2013-12-30 00:04:02 +01:00
5d3adafcbb Buildbot SCons MSVC 2013 packing also requires something extra 2013-12-29 19:56:03 +01:00
8c4d40d0e5 MSVC 2013 buildbot changes 2013-12-29 17:43:31 +01:00
21d587d9fc Added option to have a seperate environment for executing nvcc
This can be used to compiler cuda kernels with Visual Studio 2010 while
the rest of blender is compiled with MSVC 12.0 / 2013
2013-12-29 14:57:21 +01:00
42aa19088e Text3d: add select all operator
also add Edit menu for 3d text and move cut/copy/paste there.
2013-12-29 23:55:05 +11:00
1c8d1569da correction to previous commit 2013-12-29 23:34:13 +11:00
451343022a Fix crash moving the cursor after deleting 3d text 2013-12-29 23:18:38 +11:00
748b800eba Text3d: add assert's to check the selection and length are valid 2013-12-29 23:16:02 +11:00
873c6e5479 Fix movie output when using render border
Reported by @plasmasolutions in IRC.
2013-12-29 17:25:56 +06:00
3b08ee8996 Follow up to the previous commit: vfont_get_data is to use the same RW lock 2013-12-29 17:07:38 +06:00
df5631216a Fix T37980: Multiple font objects sharing an external font gives problems
Solved by adding RW lock to BKE_vfont_to_curve.

So now all the threads are allowed to read chars from ghash,
but they'll be locked as soon as one thread would need to load
more chars from font to the ghash.
2013-12-29 16:44:07 +06:00
57e8c5870a Text3d: setting upper/lower case now uses the selection 2013-12-29 21:05:39 +11:00
9a3855e655 Text3d: remove redundant call to wcslen 2013-12-29 21:04:54 +11:00
d0ec1b1caa Fix for 3d text ctrl+arrow keys failing for multi-byte characters. 2013-12-29 16:54:43 +11:00
07851dd8df Math Lib: replace point in polygon function with one thats ~23x faster.
rather then using angle summing, use line intersection checks.
2013-12-29 14:50:15 +11:00
28f5573197 Fix for inexact 3d cursor placement especially when zoomed out.
Even with the startup scene clicking multiple times in the corner of the
view without moving the mouse would move the cursor a little each time.
2013-12-29 13:35:00 +11:00
eb4090dadf Fix missing check if isect_plane_plane_v3 fails to find an intersection. 2013-12-29 12:51:27 +11:00
3f39af9cc2 Fix cycles volume render crash when trying to access primitive attributes
like generated texture coordinates or tangents.
2013-12-28 23:39:15 +01:00
fe222643b4 Cycles Volume Render: add volume emission support.
This is done using the existing Emission node and closure (we may add a volume
emission node, not clear yet if it will be needed).

Volume emission only supports indirect light sampling which means it's not very
efficient to make small or far away bright light sources. Using direct light
sampling and MIS would be tricky and probably won't be added anytime soon. Other
renderers don't support this either as far as I know, lamps and ray visibility
tricks may be used instead.
2013-12-28 23:20:53 +01:00
077fe03eaf Use ccl_device_inline for SSE perlin noise
msvc ignores inline hint here and generates a bunch of push/lea
2013-12-28 23:26:42 +04:00
2b39214c4d Cycles Volume Render: add support for overlapping volume objects.
This works pretty much as you would expect, overlapping volume objects gives
a more dense volume. What did change is that world volume shaders are now
active everywhere, they are no longer excluded inside objects.

This may not be desirable and we need to think of better control over this.
In some cases you clearly want it to happen, for example if you are rendering
a fire in a foggy environment. In other cases like the inside of a house you
may not want any fog, but it doesn't seem possible in general for the renderer
to automatically determine what is inside or outside of the house.

This is implemented using a simple fixed size array of shader/object ID pairs,
limited to max 15 overlapping objects. The closures from all shaders are put
into a single closure array, exactly the same as if an add shader was used to
combine them.
2013-12-28 20:12:11 +01:00
e369a5c485 Cycles Volume Render: support for rendering of homogeneous volume with absorption.
This is the simplest possible volume rendering case, constant density inside
the volume and no scattering or emission. My plan is to tweak, verify and commit
more volume rendering effects one by one, doing it all at once makes it
difficult to verify correctness and track down bugs.

Documentation is here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume

Currently this hooks into path tracing in 3 ways, which should get us pretty
far until we add more advanced light sampling. These 3 hooks are repeated in
the path tracing, branched path tracing and transparent shadow code:

* Determine active volume shader at start of the path
* Change active volume shader on transmission through a surface
* Light attenuation over line segments between camera, surfaces and background

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:10 +01:00
133f770ab3 Code cleanup: move shadow_blocked function into separate file. 2013-12-28 16:57:10 +01:00
37c4d6a50a Cycles Volume Render: add flags to quickly detect when objects have a volume shader. 2013-12-28 16:57:10 +01:00
a35db17cee Cycles Volume Render: work on nodes and closures.
* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
2013-12-28 16:57:02 +01:00
a06c9c277a Fix regression T37971: Crash setting recursive dupli-verts 2013-12-29 01:38:10 +11:00
fa9b5d5449 Fix T37939, concern raised in rBd9e0a94: Avoid access to linked node
tree ID data when freeing bNodeTree data blocks, while also making sure
localized node group copies get freed properly.
2013-12-28 14:54:53 +01:00
33b87dc1ad update console shell for changes in api 2013-12-29 00:51:51 +11:00
2654b28f04 Text3d: avoid calculating the font boundbox scale for every character 2013-12-28 19:45:54 +11:00
1aa62605cd Fix for text3d issue, \n was attempting to find a character too 2013-12-28 19:34:50 +11:00
1a91b8bd5d Fix for 3d fonts loading the character of the string terminator.
also remove redundant call to wcslen and ensure FT_Init_FreeType runs
once the font loads.
2013-12-28 19:06:45 +11:00
961d0409c8 3D Text: use ghash for character lookups 2013-12-28 17:40:13 +11:00
2b3fc4dea7 Fix for BKE_nurb_handles_autocalc using 2d tests on 3d data 2013-12-28 17:29:58 +11:00
6f5ced4a30 Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-text 2013-12-28 17:23:59 +11:00
114284b1fb creation of path from std::string on Windows (VC10/11/12) crashes (access error)
Summary:
Seems to be a known problem in boost: https://svn.boost.org/trac/boost/ticket/6320

Applied the solution but do not know if this is the right place.

Reviewers: dingto, brecht

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D140
2013-12-27 22:38:46 +01:00
1578b55c27 Cycles: Move SIMD utility functions into its own file.
Recently added SSE macros for noise texture can be moved here as well, but I leave this for later.
2013-12-27 21:30:21 +01:00
42044a96e4 Basic scons support for building with Visual Studio 2013 although full MSVC 2013 support still needs more work in scons itself 2013-12-27 19:46:55 +01:00
a92abf5089 Cycles / Perlin Noise: Optimize noise calculation by using SIMD instructions on CPU.
This makes scenes with a Noise Texture render faster, the BMW file is 12-15% faster now.

Patch by Sv. Lockal, many thanks! :)
2013-12-27 18:48:37 +01:00
602dcb47b0 Fix T36474: Blender 2.68a crashes upon rendering
Summary:
Original issue was caused by wring detection of whether
SS modifier is being applied for render/viewport. After
recent dependency graph commit this was no longer an
issue.

But it still might have happen conflict between viewport
draw and scene_update_for_newframe() invoked from render
thread when using external engines like Cycles.

Solved by adding viewport lock while scene is being
updated and objects being exported to the render engine.

Same lock was already used for Blender Internal.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T36474

Differential Revision: https://developer.blender.org/D138
2013-12-27 18:52:41 +06:00
8632aab88d Remove TODO. Those args could be useful in the future. 2013-12-27 18:34:36 +06:00
8870af6d37 Typo fix in a comment 2013-12-27 17:09:19 +06:00
d09a8ea9e7 Code Cleanup: style 2013-12-27 14:21:03 +11:00
81b64e506f API Docs: use a simpler example for merging namespaces 2013-12-27 14:21:03 +11:00
40f79cf6e7 Cycles / Hair: Avoid duplicate calculations and remove redundant if branch, instead add the condition to the one above. 2013-12-26 21:52:46 +01:00
4841acbecd Rigidbody: Code cleanup
Make some functions private.
Remove unneeded nested if statements.
Avoid mixing short and bool.
2013-12-26 21:33:58 +01:00
a706b9feda Rigidbody: Code cleanup
Remove redundant extern keyword.
2013-12-26 21:33:58 +01:00
79d8f1e4a5 Fix T37955: Freestyle render misalignment
Issue was caused by missing objects update for temporary
freestyle objects. This happened because of the fact that
such objects doesn't have any relations, as in they're
corresponding to root nodes in the DAG.

This situation wasn't handled by DAG_threaded_update_begin()
which considered there's only one root node in the DAG.
2013-12-27 02:32:56 +06:00
feac8ee090 Fix out-of-date comment which came from DAG-MT branch 2013-12-27 02:32:56 +06:00
ceb2430dd7 Rigidbody: Allow triangle mesh shapes to deform during simulation
Only supported when using the "Deform" mesh source.
2013-12-26 18:38:06 +01:00
c96601138d Rigidbody: Use own structure to store mesh data for collision shapes
This gives us better access to the data and should also be faster to
create.
2013-12-26 18:38:06 +01:00
2260a7dbc0 Rigidbody: Add option to choose mesh source for collision shapes
The options are:
Base: Base mesh
Deform: shape keys and deform modifiers
Final: All deformations and modifiers

It would be nice to have a way of specifying where exactly in the
modifier stack the collision shape is generated. However this is not
staight forward since the rigid body simulation is not part of the
modifier system and would require hacks to make it work.
2013-12-26 18:38:05 +01:00
55397c690d Usual minor UI messages fixes... 2013-12-26 17:16:11 +01:00
6727bf3a21 Avoid temporary change of animation data flags for nodes filter
Use temporary runtime flag of filter_mode argument instead.

This commit also fixes some weirdo mix of filter_mode with
filterflag bits.
2013-12-26 18:50:22 +06:00
05eebf49d3 Bullet: Update to svn r2719
Fixes part of T37905, fixed constraint didn't work correctly.
2013-12-26 12:45:57 +01:00
709041ed0b Threaded object update and EvaluationContext
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.

Technical details:

- Uses task scheduler which was recently committed to trunk
  (that one which Brecht ported from Cycles).

- Added two utility functions to dependency graph:
  * DAG_threaded_update_begin, which is called to  initialize threaded
    objects update. It will also schedule root DAG node to the queue,
    hence starting evaluation process.

    Initialization will calculate how much parents are to be evaluation
    before current DAG node can be scheduled. This value is used by task
    threads for faster detecting which nodes might be scheduled.

  * DAG_threaded_update_handle_node_updated which is  called from task
    thread function when node was fully handled.

	This function decreases num_pending_parents of node children and
	schedules children with zero valency.

    As it might have become clear, task thread receives DAG nodes and
    decides which callback to call for it.

    Currently only BKE_object_handle_update is called for object nodes.

    In the future it'll call node->callback() from Ali's new DAG.

- This required adding some workarounds to the render pipeline.
  Mainly to stop using get_object_dm() from modifiers' apply callback.
  Such a call was only a workaround for dependency graph glitch when
  rendering scene with, say, boolean modifiers before displaying
  this scene.

  Such change moves workaround from one place to another, so overall
  hackentropy remains the same.

- Added paradigm of EvaluaitonContext. Currently it's more like just a
  more reliable replacement for G.is_rendering which fails in some
  circumstances.

  Future idea of this context is to also store all the local data needed
  for objects evaluation such as local time, Copy-on-Write data and so.

  There're two types of EvaluationContext:

  * Context used for viewport updated and owned by Main. In the future
    this context might be easily moved to Window or Screen to allo
    per-window/per-screen local time.

  * Context used by render engines to evaluate objects for render purposes.
    Render engine is an owner of this context.

  This context is passed to all object update routines.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: lukastoenne

Differential Revision: https://developer.blender.org/D94
2013-12-26 17:24:42 +06:00
7025a1bd78 Fix T37945: Crash after undo
Issue was caused by some typos in readfile.c made in
original commit of image cache rewrite.
2013-12-26 16:34:57 +06:00
bc1eb0bf0a Simplify isect_point_poly_v2 functions using angle_signed_v2v2 2013-12-26 20:07:44 +11:00
03fed41e59 Cycles / Hair: Further cleanup of UI and internals.
* UI: Remove deprecated condition (CURVE_RIBBONS) and hide backface property, when it's hardcoded in C (Curve/Line segments && Ribbons).

* Remove "use_tangent_normal" and "CURVE_KN_TANGENTGNORMAL" as its unused (follow up for last commit).
2013-12-26 03:25:30 +01:00
db8293d456 Polyfill: minor changes to which fix rare errors with float precision 2013-12-26 12:21:40 +11:00
af32c1c77b Fix T37946: Error filling ngons 2013-12-26 12:06:52 +11:00
a649b6eef5 Cycles / Hair: Some cleanup and optimizations for hair code.
* Remove dead code from line segments BVH refine.
CURVE_KN_TANGENTGNORMAL and CURVE_KN_TRUETANGENTGNORMAL are either both true, or both false. Therefore a true/false condition is impossible.
This was a leftover of CURVE_CUSTOM, which was removed in r59234.

* Use "else if" in blender_curves.cpp.
2013-12-26 02:02:14 +01:00
ef9a9428a5 correction to last commit 2013-12-26 09:46:25 +11:00
282b99353c Correct alloc string and comment in makesdna 2013-12-26 09:29:25 +11:00
d9e0a94675 Fix T37939: Crash on exit (reading from freed node trees) 2013-12-26 08:57:44 +11:00
4936 changed files with 346231 additions and 134891 deletions

9
.gitignore vendored
View File

@@ -11,6 +11,9 @@ __pycache__/
*.swo
*#
# QtCreator
CMakeLists.txt.user
# ms-windows
Thumbs.db
ehthumbs.db
@@ -23,3 +26,9 @@ Desktop.ini
# local patches
/*.patch
/*.diff
# in-source doc-gen
/doc/doxygen/html/
/doc/python_api/sphinx-in-tmp/
/doc/python_api/sphinx-in/
/doc/python_api/sphinx-out/

File diff suppressed because it is too large Load Diff

View File

@@ -52,10 +52,18 @@ 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"
endif
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_cycles
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
endif
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
@@ -70,16 +78,16 @@ endif
# Get the number of cores for threaded build
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
endif
ifeq ($(OS), FreeBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif
@@ -125,7 +133,9 @@ all:
@echo
debug: all
full: all
lite: all
cycles: all
headless: all
bpy: all
@@ -142,8 +152,10 @@ 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"
@echo " * bpy - build as a python module which can be loaded from python directly"
@echo ""
@echo " * config - run cmake configuration tool to set build options"
@@ -186,7 +198,8 @@ help:
@echo ""
@echo "Utilities (not associated with building blender)"
@echo " * icons - updates PNG icons from SVG files."
@echo " * tbz - create a compressed svn export 'blender_archive.tar.bz2'"
@echo " * tgz - create a compressed archive of the source code."
@echo " * update - updates git and all submodules"
@echo ""
@echo "Documentation Targets (not associated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@@ -194,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
@@ -217,7 +233,7 @@ test:
# run pep8 check check on scripts we distribute.
test_pep8:
python3 source/tests/pep8.py > test_pep8.log 2>&1
python3 tests/python/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
@@ -227,30 +243,46 @@ test_cmake:
# run deprecation tests, see if we have anything to remove.
test_deprecated:
python3 source/tests/check_deprecated.py
python3 tests/check_deprecated.py
test_style_c:
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/source/blender" "$(BLENDER_DIR)/source/creator" --no-length-check
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc:
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/source/blender" "$(BLENDER_DIR)/source/creator" --no-length-check > \
test_style.tasks
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl:
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc:
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders" > \
test_style.tasks
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
@@ -275,7 +307,7 @@ check_cppcheck:
$(CMAKE_CONFIG)
cd "$(BUILD_DIR)" ; \
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
"$(BLENDER_DIR)/check_cppcheck.txt"
"$(BLENDER_DIR)/check_cppcheck.txt"
@echo "written: check_cppcheck.txt"
check_clang_array:
@@ -300,36 +332,57 @@ check_smatch:
check_spelling_py:
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/release/scripts"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/release/scripts"
check_spelling_c:
cd "$(BUILD_DIR)" ; \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/source"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
check_spelling_c_qtc:
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/source" > \
"$(BLENDER_DIR)/check_spelling_c.tasks"
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/source" \
"$(BLENDER_DIR)/intern/cycles" \
"$(BLENDER_DIR)/intern/guardedalloc" \
"$(BLENDER_DIR)/intern/ghost" \
> \
"$(BLENDER_DIR)/check_spelling_c.tasks"
check_spelling_osl:
cd "$(BUILD_DIR)" ; PYTHONIOENCODING=utf_8 python3 "$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" "$(BLENDER_DIR)/intern/cycles/kernel/shaders"
cd "$(BUILD_DIR)" ;\
PYTHONIOENCODING=utf_8 python3 \
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
check_descriptions:
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python "$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
# -----------------------------------------------------------------------------
# Utilities
#
tbz:
svn export . blender_archive
tar cjf blender_archive.tar.bz2 blender_archive/
rm -rf blender_archive/
@echo "blender_archive.tar.bz2 written"
tgz:
./build_files/utils/build_tgz.sh
icons:
"$(BLENDER_DIR)/release/datafiles/blender_icons.sh"
"$(BLENDER_DIR)/release/datafiles/prvicons.sh"
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
update:
if [ -d "../lib" ]; then \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule foreach git pull --rebase origin master
# -----------------------------------------------------------------------------
@@ -353,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

@@ -33,14 +33,6 @@
# TODO: directory copy functions are far too complicated, see:
# http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
import platform as pltfrm
# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
if pltfrm.architecture()[0] == '64bit':
bitness = 64
else:
bitness = 32
import sys
import os
import os.path
@@ -48,11 +40,13 @@ import string
import shutil
import re
# store path to tools
# store path to tools and modules
toolpath=os.path.join(".", "build_files", "scons", "tools")
modulespath=os.path.join(".", "build_files", "scons", "Modules")
# needed for importing tools
# needed for importing tools and modules
sys.path.append(toolpath)
sys.path.append(modulespath)
import Blender
import btools
@@ -76,7 +70,7 @@ quickdebug = None
##### BEGIN SETUP #####
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern']
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern', 'system']
B.binarykind = ['blender' , 'blenderplayer']
##################################
@@ -112,16 +106,10 @@ btools.print_targets(B.targets, B.bc)
# handling cmd line arguments & config file
# bitness stuff
tempbitness = int(B.arguments.get('BF_BITNESS', bitness)) # default to bitness found as per starting python
if tempbitness in (32, 64): # only set if 32 or 64 has been given
bitness = int(tempbitness)
if bitness:
B.bitness = bitness
else:
tempbitness = int(B.arguments.get('BF_BITNESS', B.bitness)) # default to bitness found as per starting python
if tempbitness in B.allowed_bitnesses.values() :
B.bitness = tempbitness
# first check cmdline for toolset and we create env to work on
quickie = B.arguments.get('BF_QUICK', None)
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
@@ -137,7 +125,7 @@ else:
B.quickie=[]
toolset = B.arguments.get('BF_TOOLSET', None)
vcver = B.arguments.get('MSVS_VERSION', '9.0')
vcver = B.arguments.get('MSVS_VERSION', '12.0')
if toolset:
print "Using " + toolset
@@ -149,7 +137,7 @@ if toolset:
if env:
btools.SetupSpawn(env)
else:
if bitness==64 and platform=='win32':
if B.bitness==64 and platform=='win32':
env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64', TARGET_ARCH='x86_64', MSVC_VERSION=vcver)
else:
env = BlenderEnvironment(ENV = os.environ, TARGET_ARCH='x86', MSVC_VERSION=vcver)
@@ -167,9 +155,9 @@ if cxx:
if sys.platform=='win32':
if env['CC'] in ['cl', 'cl.exe']:
platform = 'win64-vc' if bitness == 64 else 'win32-vc'
platform = 'win64-vc' if B.bitness == 64 else 'win32-vc'
elif env['CC'] in ['gcc']:
platform = 'win64-mingw' if bitness == 64 else 'win32-mingw'
platform = 'win64-mingw' if B.bitness == 64 else 'win32-mingw'
if 'mingw' in platform:
print "Setting custom spawn function"
@@ -219,12 +207,19 @@ opts = btools.read_opts(env, optfiles, B.arguments)
opts.Update(env)
if sys.platform=='win32':
if bitness==64:
if B.bitness==64:
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
if env['BF_DEBUG']:
env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
else:
env.Append(CPPDEFINES=['NDEBUG'])
if not env['BF_FANCY']:
B.bc.disable()
if env['WITH_BF_SDL_DYNLOAD']:
env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
# remove install dir so old and new files are not mixed.
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
@@ -284,6 +279,7 @@ if 'cudakernels' in B.targets:
env['WITH_BF_CYCLES'] = True
env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
env['WITH_BF_PYTHON'] = False
env['WITH_BF_LIBMV'] = False
# Configure paths for automated configuration test programs
env['CONFIGUREDIR'] = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "sconf_temp")))
@@ -299,16 +295,21 @@ if env['OURPLATFORM']=='darwin':
import subprocess
command = ["%s"%env['CC'], "--version"]
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=False)
line = process.communicate()[0]
ver = re.search(r'[0-9]+(\.[0-9]+)+', line)
line = btools.get_command_output(command)
ver = re.search(r'[0-9]+(\.[0-9]+[svn]+)+', line) or re.search(r'[0-9]+(\.[0-9]+)+', line) # read the "based on LLVM x.xsvn" version here, not the Apple version
if ver:
env['CCVERSION'] = ver.group(0)
env['CCVERSION'] = ver.group(0).strip('svn')
frontend = re.search(r'gcc', line) or re.search(r'clang', line) or re.search(r'llvm-gcc', line) or re.search(r'icc', line)
if frontend:
env['C_COMPILER_ID'] = frontend.group(0)
vendor = re.search(r'Apple', line)
if vendor:
C_VENDOR = vendor.group(0)
else:
C_VENDOR = 'Open Source'
print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION']
print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION'] + ' ( ' + C_VENDOR + ' )'
cmd = 'sw_vers -productVersion'
MAC_CUR_VER=cmd_res=commands.getoutput(cmd)
@@ -329,7 +330,10 @@ if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
if env['MACOSX_SDK'] == '': # no set sdk, choosing best one found
if 'OS X 10.9' in MACOSX_SDK_CHECK:
if 'OS X 10.10' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.10.sdk'
elif 'OS X 10.9' in MACOSX_SDK_CHECK:
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.9.sdk'
elif 'OS X 10.8' in MACOSX_SDK_CHECK:
@@ -387,7 +391,7 @@ if env['OURPLATFORM']=='darwin':
#Intel Macs are CoreDuo and Up
if env['MACOSX_ARCHITECTURE'] == 'i386' or env['MACOSX_ARCHITECTURE'] == 'x86_64':
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-msse','-msse2','-msse3']
if env['C_COMPILER_ID'] != 'clang' or (env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '5.0'):
if env['C_COMPILER_ID'] != 'clang' or (env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.3'):
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize'] # clang xcode 4 does not accept flag
else:
env['CCFLAGS'] = env['CCFLAGS']+['-fno-strict-aliasing']
@@ -396,7 +400,7 @@ if env['OURPLATFORM']=='darwin':
if env['MACOSX_ARCHITECTURE'] == 'x86_64':
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-mssse3']
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '5.0':
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.3':
env['CCFLAGS'].append('-ftemplate-depth=1024') # only valid for clang bundled with xcode 5
# 3DconnexionClient.framework, optionally install
@@ -418,27 +422,41 @@ 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']
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
# if your compiler does not have accurate suffix you may have to enable it by hand !
if env['WITH_BF_OPENMP'] == 1:
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # strip down to version string if any
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4' and C_VENDOR != 'Apple':
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
print B.bc.OKGREEN + "Using OpenMP"
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
OSX_OMP_LIBPATH = Dir(env.subst(env['LCGDIR'])).abspath
env.Append(BF_PROGRAM_LINKFLAGS=['-L'+OSX_OMP_LIBPATH+'/openmp/lib','-liomp5'])
env['CCFLAGS'].append('-I'+OSX_OMP_LIBPATH+'/openmp/include') # include for omp.h
else:
env['WITH_BF_OPENMP'] = 0
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
if env['WITH_BF_CYCLES_OSL'] == 1:
env['WITH_BF_LLVM'] = 1
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8': # strip down to version string if any
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-loslexec','-loslquery'])
else:
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
else:
env['WITH_BF_LLVM'] = 0
if env['WITH_BF_LLVM'] == 0:
# Due duplicated generic UTF functions, we pull them either from LLVMSupport or COLLADA
env.Append(BF_OPENCOLLADA_LIB=' UTF')
# Trying to get rid of eventually clashes, we export some symbols explicite as local
env.Append(LINKFLAGS=['-Xlinker','-unexported_symbols_list','-Xlinker','./source/creator/osx_locals.map'])
@@ -487,6 +505,9 @@ if 'blenderplayer' in B.targets:
if 'blendernogame' in B.targets:
env['WITH_BF_GAMEENGINE'] = False
if not env['WITH_BF_GAMEENGINE']:
env['WITH_BF_PLAYER'] = False
# build without elbeem (fluidsim)?
if env['WITH_BF_FLUID'] == 1:
env['CPPFLAGS'].append('-DWITH_MOD_FLUID')
@@ -506,13 +527,53 @@ else:
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CPPFLAGS'].append('-DWITH_AVI')
env['CPPFLAGS'].append('-DWITH_OPENNL')
env['CPPFLAGS'].append('-DWITH_BOOL_COMPAT')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
env['CPPFLAGS'].append('-D_ALLOW_KEYWORD_MACROS')
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
# 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')
@@ -598,6 +659,7 @@ if not os.path.isdir ( B.root_build_dir):
# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
# os.makedirs ( B.doc_build_dir )
###################################
# Ensure all data files are valid #
###################################
@@ -613,31 +675,36 @@ def data_to_c(FILE_FROM, FILE_TO, VAR_NAME):
FILE_FROM = FILE_FROM.replace("/", "\\")
FILE_TO = FILE_TO.replace("/", "\\")
# first check if we need to bother.
if os.path.exists(FILE_TO):
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
return
try:
# first check if we need to bother.
if os.path.exists(FILE_TO):
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
return
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
fpin = open(FILE_FROM, "rb")
fpin.seek(0, os.SEEK_END)
size = fpin.tell()
fpin.seek(0)
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
fpin = open(FILE_FROM, "rb")
fpin.seek(0, os.SEEK_END)
size = fpin.tell()
fpin.seek(0)
fpout = open(FILE_TO, "w")
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
fpout.write("char %s[] = {\n" % VAR_NAME)
fpout = open(FILE_TO, "w")
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
fpout.write("char %s[] = {\n" % VAR_NAME)
while size > 0:
size -= 1
if size % 32 == 31:
fpout.write("\n")
while size > 0:
size -= 1
if size % 32 == 31:
fpout.write("\n")
fpout.write("%3d," % ord(fpin.read(1)))
fpout.write("\n 0};\n\n")
fpout.write("%3d," % ord(fpin.read(1)))
fpout.write("\n 0};\n\n")
fpin.close()
fpout.close()
fpin.close()
fpout.close()
except KeyboardInterrupt:
if os.path.exists(FILE_TO):
os.remove(FILE_TO)
raise KeyboardInterrupt
def data_to_c_simple(FILE_FROM):
filename_only = os.path.basename(FILE_FROM)
@@ -647,6 +714,32 @@ def data_to_c_simple(FILE_FROM):
data_to_c(FILE_FROM, FILE_TO, VAR_NAME)
def data_to_c_simple_icon(PATH_FROM):
# first handle import
import sys
path = "source/blender/datatoc"
if path not in sys.path:
sys.path.append(path)
# convert the pixmaps to a png
import datatoc_icon
filename_only = os.path.basename(PATH_FROM)
FILE_TO_PNG = os.path.join(env['DATA_SOURCES'], filename_only + ".png")
FILE_TO = FILE_TO_PNG + ".c"
argv = [PATH_FROM, FILE_TO_PNG]
try:
datatoc_icon.main_ex(argv)
except KeyboardInterrupt:
if os.path.exists(FILE_TO_PNG):
os.remove(FILE_TO_PNG)
raise KeyboardInterrupt
# then the png to a c file
data_to_c_simple(FILE_TO_PNG)
if B.targets != ['cudakernels']:
data_to_c("source/blender/compositor/operations/COM_OpenCLKernels.cl",
B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
@@ -664,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")
@@ -674,8 +768,13 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/bmonofont.ttf")
data_to_c_simple("release/datafiles/splash.png")
data_to_c_simple("release/datafiles/blender_icons16.png")
data_to_c_simple("release/datafiles/blender_icons32.png")
data_to_c_simple("release/datafiles/splash_2x.png")
# data_to_c_simple("release/datafiles/blender_icons16.png")
# data_to_c_simple("release/datafiles/blender_icons32.png")
data_to_c_simple_icon("release/datafiles/blender_icons16")
data_to_c_simple_icon("release/datafiles/blender_icons32")
data_to_c_simple("release/datafiles/prvicons.png")
data_to_c_simple("release/datafiles/brushicons/add.png")
@@ -705,6 +804,8 @@ if B.targets != ['cudakernels']:
data_to_c_simple("release/datafiles/brushicons/soften.png")
data_to_c_simple("release/datafiles/brushicons/subtract.png")
data_to_c_simple("release/datafiles/brushicons/texdraw.png")
data_to_c_simple("release/datafiles/brushicons/texfill.png")
data_to_c_simple("release/datafiles/brushicons/texmask.png")
data_to_c_simple("release/datafiles/brushicons/thumb.png")
data_to_c_simple("release/datafiles/brushicons/twist.png")
data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
@@ -753,6 +854,22 @@ B.init_lib_dict()
##### END SETUP ##########
if B.targets != ['cudakernels']:
# Put all auto configuration run-time tests here
from FindSharedPtr import FindSharedPtr
from FindUnorderedMap import FindUnorderedMap
conf = Configure(env)
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
Export('env')
VariantDir(B.root_build_dir+'/source', 'source', duplicate=0)
@@ -767,7 +884,7 @@ SConscript(B.root_build_dir+'/extern/SConscript')
# libraries to give as objects to linking phase
mainlist = []
for tp in B.possible_types:
if (not tp == 'player') and (not tp == 'player2'):
if (not tp == 'player') and (not tp == 'player2') and (not tp == 'system'):
mainlist += B.create_blender_liblist(env, tp)
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
@@ -779,7 +896,17 @@ thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
blender_progname = "blender"
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
blender_progname = "blender-app"
lenv = env.Clone()
lenv.Append(LINKFLAGS = env['PLATFORM_LINKFLAGS'])
targetpath = B.root_build_dir + '/blender'
launcher_obj = [env.Object(B.root_build_dir + 'source/creator/creator/creator_launch_win', ['#source/creator/creator_launch_win.c'])]
env.BlenderProg(B.root_build_dir, 'blender', [launcher_obj] + B.resources, ['bf_utfconv'] + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
env.BlenderProg(B.root_build_dir, blender_progname, creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
playerlist += B.create_blender_liblist(env, 'player2')
@@ -829,6 +956,10 @@ if env['OURPLATFORM']!='darwin':
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
scriptinstall.append(env.InstallAs(env['BF_INSTALLDIR'] + '/blender-app.exe.manifest',
'source/icons/blender.exe.manifest'))
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
@@ -871,10 +1002,12 @@ if env['OURPLATFORM']!='darwin':
source.remove('CMakeLists.txt')
source.remove('svm')
source.remove('closure')
source.remove('geom')
source.remove('shaders')
source.remove('osl')
source=['intern/cycles/kernel/'+s for s in source]
source.append('intern/cycles/util/util_color.h')
source.append('intern/cycles/util/util_half.h')
source.append('intern/cycles/util/util_math.h')
source.append('intern/cycles/util/util_transform.h')
source.append('intern/cycles/util/util_types.h')
@@ -891,6 +1024,12 @@ if env['OURPLATFORM']!='darwin':
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/closure/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# geom
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'geom')
source=os.listdir('intern/cycles/kernel/geom')
if '__pycache__' in source: source.remove('__pycache__')
source=['intern/cycles/kernel/geom/'+s for s in source]
scriptinstall.append(env.Install(dir=dir,source=source))
# licenses
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
@@ -906,8 +1045,9 @@ if env['OURPLATFORM']!='darwin':
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
cubininstall.append(env.Install(dir=dir,source=cubin_file))
for suffix in ('', '_experimental'):
cubin_file = os.path.join(kernel_build_dir, "kernel%s_%s.cubin" % (suffix, arch))
cubininstall.append(env.Install(dir=dir,source=cubin_file))
# osl shaders
if env['WITH_BF_CYCLES_OSL']:
@@ -1048,16 +1188,15 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically already to SDL on win64
else:
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
dllsources.append('${BF_SDL_LIBPATH}/SDL2.dll')
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3_d.dll')
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3.dll')
if env['WITH_BF_ICONV']:
if env['OURPLATFORM'] == 'win64-vc':
@@ -1068,10 +1207,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
pass
else:
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
@@ -1082,7 +1218,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
# Since the thumb handler is loaded by Explorer, architecture is
# strict: the x86 build fails on x64 Windows. We need to ship
# both builds in x86 packages.
if bitness == 32:
if B.bitness == 32:
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')

File diff suppressed because it is too large Load Diff

View File

@@ -60,7 +60,7 @@ AMD64_PATH="$ENV_PATH/buildbot_${DEBIAN_BRANCH}_x86_64"
I686_PATH="$ENV_PATH/buildbot_${DEBIAN_BRANCH}_i686"
SOURCES_PATH="$ENV_PATH/sources"
THREADS=`cat /proc/cpuinfo | grep cores | uniq | sed -e "s/.*: *\(.*\)/\\1/"`
THREADS=$(nproc)
# Force vpx be installed from the backports
VPX_V="1.0.0-2~bpo60+1"

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']
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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']

View File

@@ -4,10 +4,11 @@ BF_NUMJOBS = 4
WITHOUT_BF_OVERWRITE_INSTALL = True
# Python configuration
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.3'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
@@ -21,7 +22,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
@@ -48,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
@@ -78,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
@@ -133,8 +136,8 @@ BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.1'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'

View File

@@ -4,10 +4,11 @@ BF_NUMJOBS = 4
WITHOUT_BF_OVERWRITE_INSTALL = True
# Python configuration
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.3'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
@@ -21,7 +22,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
@@ -48,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
@@ -78,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
@@ -133,8 +136,8 @@ BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
WITH_BF_LLVM = True
WITH_BF_STATICLLVM = False
BF_LLVM = '/opt/lib/llvm-3.1'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
BF_LLVM = '/opt/lib/llvm-3.4.2'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'

View File

@@ -1,3 +1,7 @@
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !

View File

@@ -1,2 +1,5 @@
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
WITH_BF_CYCLES_CUDA_BINARIES = True
WITH_BF_CYCLES_CUDA_BINARIES = True

View File

@@ -3,10 +3,11 @@ BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
BF_NUMJOBS = 4
# Python configuration
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.3'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
@@ -33,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
@@ -63,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,10 +3,11 @@ BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
BF_NUMJOBS = 4
# Python configuration
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_ABI_FLAGS = 'm'
BF_PYTHON = '/opt/lib/python-3.3'
BF_PYTHON = '/opt/lib/python-3.4'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_PYTHON_INSTALL_REQUESTS = True
WITH_BF_STATICPYTHON = True
@@ -33,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
@@ -63,6 +64,8 @@ WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
WITH_BF_SDL = True
WITH_BF_SDL_DYNLOAD = True
WITH_BF_OGG = False
WITH_BF_OPENMP = True

View File

@@ -3,6 +3,57 @@
# <pep8 compliant>
# List of the branches being built automatically overnight
NIGHT_SCHEDULE_BRANCHES=[None, "gooseberry"]
# List of the branches available for force build
FORCE_SCHEDULE_BRANCHES=["master", "gooseberry", "experimental-build"]
"""
Stock Twisted directory lister doesn't provide any information about last file
modification time, we hack the class a bit in order to have such functionaliity
:)
"""
from buildbot.status.web.base import DirectoryLister
def get_files_and_directories(self, directory):
from twisted.web.static import (getTypeAndEncoding,
formatFileSize)
import urllib
import cgi
import time
import os
files = []
dirs = []
for path in directory:
url = urllib.quote(path, "/")
escapedPath = cgi.escape(path)
lastmodified = time.ctime(os.path.getmtime(
os.path.join(self.path, path)))
if os.path.isdir(os.path.join(self.path, path)):
url = url + '/'
dirs.append({'text': escapedPath + "/", 'href': url,
'size': '', 'type': '[Directory]',
'encoding': '',
'lastmodified': lastmodified})
else:
mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
self.contentEncodings,
self.defaultType)
try:
size = os.stat(os.path.join(self.path, path)).st_size
except OSError:
continue
files.append({
'text': escapedPath, "href": url,
'type': '[%s]' % mimetype,
'encoding': (encoding and '[%s]' % encoding or ''),
'size': formatFileSize(size),
'lastmodified': lastmodified})
return dirs, files
DirectoryLister._getFilesAndDirectories = get_files_and_directories
# Dictionary that the buildmaster pays attention to.
c = BuildmasterConfig = {}
@@ -32,51 +83,87 @@ c['change_source'] = GitPoller(
'git://git.blender.org/blender.git',
pollinterval=1200)
# CODEBASES
#
# Allow to controll separately things like branches for each repo and submodules.
all_repositories = {
r'git://git.blender.org/blender.git': 'blender',
r'git://git.blender.org/blender-translations.git': 'blender-translations',
r'git://git.blender.org/blender-addons.git': 'blender-addons',
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
r'git://git.blender.org/scons.git': 'scons',
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
}
def codebaseGenerator(chdict):
return all_repositories[chdict['repository']]
c['codebaseGenerator'] = codebaseGenerator
# SCHEDULERS
#
# Decide how to react to incoming changes.
# from buildbot.scheduler import Scheduler
from buildbot.schedulers import timed
from buildbot.schedulers import timed, forcesched
c['schedulers'] = []
def schedule_build(name, hour, minute=0):
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
def schedule_force_build(name):
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
builderNames=[name],
hour=hour,
minute=minute))
codebases=[forcesched.CodebaseParameter(
codebase="blender",
branch=forcesched.ChoiceStringParameter(
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
# Do not hide revision, can be handy!
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
project=forcesched.FixedParameter(name="project", default="", hide=True)),
# For now, hide other codebases.
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
forcesched.CodebaseParameter(hide=True, codebase="scons"),
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
properties=[]))
"""
schedule_cycle = 4
for i in range(0, schedule_cycle):
names = []
for j in range(0, len(buildernames)):
if j % schedule_cycle == i:
names += [buildernames[j]]
def schedule_build(name, hour, minute=0):
for current_branch in NIGHT_SCHEDULE_BRANCHES:
scheduler_name = "nightly " + name
if current_branch:
scheduler_name += ' ' + current_branch
c['schedulers'].append(timed.Nightly(name=scheduler_name,
codebases={
"blender": {"repository": ""},
"blender-translations": {"repository": "", "branch": "master"},
"blender-addons": {"repository": "", "branch": "master"},
"blender-addons-contrib": {"repository": "", "branch": "master"},
"scons": {"repository": "", "branch": "master"},
"lib svn": {"repository": "", "branch": "master"}},
branch=current_branch,
builderNames=[name],
hour=hour,
minute=minute))
print(names)
c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
builderNames=names,
hour=3+i,
minute=0))
"""
# BUILDERS
#
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them. Note that any particular build will
# only take place on one slave.
# The 'builders' list defines the Builders, which tell Buildbot how to
# perform a build: what steps, and which slaves can execute them.
# Note that any particular build will only take place on one slave.
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Interpolate
from buildbot.steps.source import SVN
from buildbot.steps.source import Git
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Test
from buildbot.steps.transfer import FileUpload
# from buildbot.steps.transfer import FileDownload
from buildbot.steps.master import MasterShellCommand
from buildbot.config import BuilderConfig
@@ -86,7 +173,8 @@ c['builders'] = []
buildernames = []
def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute=0):
def add_builder(c, name, libdir, factory, branch='',
rsync=False, hour=3, minute=0):
slavenames = []
for slave in master_private.slaves:
@@ -95,31 +183,69 @@ def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute
if len(slavenames) > 0:
f = factory(name, libdir, branch, rsync)
c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
c['builders'].append(BuilderConfig(name=name,
slavenames=slavenames,
factory=f,
category='blender'))
buildernames.append(name)
schedule_build(name, hour, minute)
schedule_force_build(name)
# common steps
def git_submodule_step(submodule):
return Git(name=submodule+'.git', repourl='git://git.blender.org/' + submodule + '.git', mode='update', workdir=submodule + '.git')
return Git(name=submodule + '.git',
repourl='git://git.blender.org/' + submodule + '.git',
mode='update',
codebase=submodule,
workdir=submodule + '.git')
def git_step(branch=''):
if branch:
return Git(name='blender.git', repourl='git://git.blender.org/blender.git', mode='update', branch=branch, workdir='blender.git', submodules=True)
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
branch=branch,
codebase='blender',
workdir='blender.git',
submodules=True)
else:
return Git(name='blender.git', repourl='git://git.blender.org/blender.git', mode='update', workdir='blender.git', submodules=True)
return Git(name='blender.git',
repourl='git://git.blender.org/blender.git',
mode='update',
codebase='blender',
workdir='blender.git',
submodules=True)
def git_submodules_update():
command = ['git', 'submodule', 'foreach', '--recursive', 'git', 'pull', 'origin', 'master']
return ShellCommand(name='Submodules Update', command=command, description='updating', descriptionDone='up to date', workdir='blender.git')
command = ['git', 'submodule', 'foreach', '--recursive',
'git', 'pull', 'origin', 'master']
return ShellCommand(name='Submodules Update',
command=command,
description='updating',
descriptionDone='up to date',
workdir='blender.git')
def lib_svn_step(dir):
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
return SVN(name='lib svn',
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
codebase='lib svn',
mode='update',
defaultBranch='trunk',
workdir='lib/' + dir)
def rsync_step(id, branch, rsync_script):
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
return ShellCommand(name='rsync',
command=['python', rsync_script, id, branch],
description='uploading',
descriptionDone='uploaded',
workdir='install')
# generic builder
@@ -136,21 +262,38 @@ def generic_builder(id, libdir='', branch='', rsync=False):
if libdir != '':
f.addStep(lib_svn_step(libdir))
for submodule in ('blender-translations', 'blender-addons', 'blender-addons-contrib', 'scons'):
for submodule in ('blender-translations',
'blender-addons',
'blender-addons-contrib',
'scons'):
f.addStep(git_submodule_step(submodule))
f.addStep(git_step(branch))
f.addStep(git_submodules_update())
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
f.addStep(Test(command=['python', test_script, id]))
f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
f.addStep(ShellCommand(name='package',
command=['python', pack_script, id, branch or Interpolate('%(src:blender:branch)s')],
description='packaging',
descriptionDone='packaged'))
if rsync:
f.addStep(rsync_step(id, branch, rsync_script))
elif id.find('cmake') != -1:
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=150 * 1024 * 1024))
else:
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
f.addStep(FileUpload(name='upload',
slavesrc='buildbot_upload.zip',
masterdest=filename,
maxsize=150 * 1024 * 1024,
workdir='install'))
f.addStep(MasterShellCommand(name='unpack',
command=['python', unpack_script, filename],
description='unpacking',
descriptionDone='unpacked'))
return f
# builders
@@ -159,10 +302,10 @@ add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder,
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
add_builder(c, 'win32_scons', 'windows', generic_builder, hour=1)
add_builder(c, 'win64_scons', 'win64', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2012', 'windows_vc11', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2012', 'win64_vc11', generic_builder, hour=2)
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
@@ -193,15 +336,16 @@ authz_cfg = authz.Authz(
# change any of these to True to enable; see the manual for more
# options
gracefulShutdown=False,
forceBuild='auth', # use this to test your slave once it is set up
forceBuild=True, # use this to test your slave once it is set up
forceAllBuilds=False,
pingBuilder=False,
stopBuild='auth',
stopBuild=True,
stopAllBuilds=False,
cancelPendingBuild='auth',
cancelPendingBuild=True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
#c['status'].append(html.WebStatus(http_port=8010))
# PROJECT IDENTITY

View File

@@ -30,12 +30,12 @@ import zipfile
# extension stripping
def strip_extension(filename):
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
filename_noext, ext = os.path.splitext(filename)
if ext in extensions:
return strip_extension(filename_noext) # may have .tar.bz2
else:
return filename
for ext in extensions:
if filename.endswith(ext):
filename = filename[:-len(ext)]
return filename
# extract platform from package name
def get_platform(filename):
@@ -48,12 +48,11 @@ def get_platform(filename):
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
'win', 'linux', 'source',
'solaris',
'mingw')
'irix', 'solaris', 'mingw')
platform_tokens = []
found = False
for token in tokens:
for i, token in enumerate(tokens):
if not found:
for platform in platforms:
if platform in token.lower():
@@ -65,20 +64,19 @@ def get_platform(filename):
return '-'.join(platform_tokens)
def get_branch(filename):
tokens = filename.split("-")
branch = ""
for token in tokens:
if token == "blender":
return branch
if branch == "":
branch = token
else:
branch = branch + "-" + token
if token == "blender":
return branch
return ""
# get filename
@@ -112,11 +110,16 @@ branch = get_branch(packagename)
if platform == '':
sys.stderr.write('Failed to detect platform ' +
'from package: %r\n' % packagename)
'from package: %r\n' % packagename)
sys.exit(1)
# extract
directory = 'public_html/download'
if not branch or branch == 'master':
directory = 'public_html/download'
elif branch == 'experimental-build':
directory = 'public_html/download/experimental'
else:
directory = 'public_html/download'
try:
zf = z.open(package)
@@ -126,8 +129,6 @@ try:
zf.close()
z.close()
os.remove(filename)
except Exception, ex:
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
sys.exit(1)

View File

@@ -33,7 +33,7 @@ builder = sys.argv[1]
# we run from build/ directory
blender_dir = '../blender.git'
if builder.find('cmake') != -1:
if 'cmake' in builder:
# cmake
# set build options
@@ -46,16 +46,30 @@ if builder.find('cmake') != -1:
elif builder.endswith('mac_ppc_cmake'):
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
if 'win64' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013 Win64"'])
elif 'win32' in builder:
cmake_options.append(['-G','"Visual Studio 12 2013"'])
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
# configure and make
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
if retcode != 0:
sys.exit(retcode)
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
if 'win' in builder:
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
else:
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
sys.exit(retcode)
else:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
# scons
os.chdir(blender_dir)
scons_cmd = ['python', 'scons/scons.py']
scons_cmd = [python_bin, 'scons/scons.py']
scons_options = ['BF_FANCY=False']
# We're using the same rules as release builder, so tweak
@@ -64,6 +78,7 @@ else:
install_dir = os.path.join('..', 'install', builder)
# Clean install directory so we'll be sure there's no
# residual libs and files remained from the previous install.
if os.path.isdir(install_dir):
shutil.rmtree(install_dir)
@@ -143,8 +158,11 @@ else:
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2012'):
scons_options.append('MSVS_VERSION=11.0')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
scons_options.append('BF_NUMJOBS=1')
elif builder.find('mac') != -1:
@@ -158,10 +176,8 @@ else:
if builder.find('win') != -1:
if not os.path.exists(install_dir):
os.makedirs(install_dir)
if builder.endswith('vc2012'):
dlls = ('msvcp110.dll', 'msvcr110.dll', 'vcomp110.dll')
else:
dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest')
if builder.endswith('vc2013'):
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
if builder.find('win64') == -1:
dlls_path = '..\\..\\..\\redist\\x86'
else:
@@ -169,6 +185,6 @@ else:
for dll in dlls:
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)

View File

@@ -33,13 +33,15 @@ if len(sys.argv) < 2:
sys.exit(1)
builder = sys.argv[1]
branch = ''
if len(sys.argv) >= 3:
branch = sys.argv[2]
# Never write branch if it is master.
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
# scons does own packaging
if builder.find('scons') != -1:
python_bin = 'python'
if builder.find('linux') != -1:
python_bin = '/opt/lib/python-2.7/bin/python2.7'
os.chdir('../blender.git')
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
@@ -82,7 +84,7 @@ if builder.find('scons') != -1:
os.system('cp %s %s' % (software_gl, install_dir))
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', 'python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
@@ -99,8 +101,9 @@ if builder.find('scons') != -1:
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
if builder.endswith('vc2012'):
scons_options.append('MSVS_VERSION=11.0')
if builder.endswith('vc2013'):
scons_options.append('MSVS_VERSION=12.0')
scons_options.append('MSVC_VERSION=12.0')
elif builder.find('mac') != -1:
if builder.find('x86_64') != -1:
@@ -110,8 +113,30 @@ if builder.find('scons') != -1:
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
sys.exit(retcode)
else:
#cmake
if 'win' in builder:
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
for f in files:
os.remove(f)
retcode = subprocess.call(['cpack', '-G','ZIP'])
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
os.rename(result_file, "{}.zip".format(builder))
# create zip file
try:
upload_zip = "buildbot_upload.zip"
if os.path.exists(upload_zip):
os.remove(upload_zip)
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
z.write("{}.zip".format(builder))
z.close()
sys.exit(retcode)
except Exception, ex:
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
sys.exit(1)
# clean release directory if it already exists
release_dir = 'release'

View File

@@ -1,59 +1,79 @@
# - Find GLEW library
# Find the native Glew includes and library
# This module defines
# GLEW_INCLUDE_DIRS, where to find glew.h, Set when
# GLEW_INCLUDE_DIR is found.
# GLEW_ROOT_DIR, The base directory to search for Glew.
# This can also be an environment variable.
# GLEW_FOUND, If false, do not try to use Glew.
#
# Try to find GLEW library and include path.
# Once done this will define
# also defined,
# GLEW_LIBRARY, where to find the Glew library.
# GLEW_MX_LIBRARY, where to find the GlewMX library.
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
IF (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
$ENV{PROGRAMFILES}/GLEW/include
${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
DOC "The directory where GL/glew.h resides")
IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew64 glew64s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library (64-bit)"
)
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library"
)
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
ELSE (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES GLEW glew
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
DOC "The GLEW library")
ENDIF (WIN32)
# If GLEW_ROOT_DIR was defined in the environment, use it.
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
ENDIF()
IF (GLEW_INCLUDE_PATH)
SET(GLEW_FOUND TRUE)
ELSE (GLEW_INCLUDE_PATH)
SET(GLEW_FOUND FALSE)
ENDIF (GLEW_INCLUDE_PATH)
SET(_glew_SEARCH_DIRS
${GLEW_ROOT_DIR}
/usr/local
)
MARK_AS_ADVANCED( GLEW_FOUND )
FIND_PATH(GLEW_INCLUDE_DIR
NAMES
GL/glew.h
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
include
)
FIND_LIBRARY(GLEW_LIBRARY
NAMES
GLEW
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
FIND_LIBRARY(GLEW_MX_LIBRARY
NAMES
GLEWmx
HINTS
${_glew_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
GLEW_LIBRARY GLEW_INCLUDE_DIR)
IF(GLEW_FOUND)
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
ENDIF(GLEW_FOUND)
MARK_AS_ADVANCED(
GLEW_INCLUDE_DIR
GLEW_LIBRARY
GLEW_MX_LIBRARY
)
UNSET(_glew_SEARCH_DIRS)

View File

@@ -140,3 +140,8 @@ IF(OPENCOLLADA_FOUND)
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
ENDIF(OPENCOLLADA_FOUND)
UNSET(COMPONENT)
UNSET(UPPERCOMPONENT)
UNSET(_opencollada_LIBRARIES)
UNSET(_opencollada_INCLUDES)

View File

@@ -63,11 +63,12 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
PATH_SUFFIXES
lib64 lib
)
if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
endif()
ENDIF()
ENDFOREACH()
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -82,5 +83,13 @@ ENDIF(OPENCOLORIO_FOUND)
MARK_AS_ADVANCED(
OPENCOLORIO_INCLUDE_DIR
OPENCOLORIO_LIBRARY
OPENCOLORIO_OPENCOLORIO_LIBRARY
OPENCOLORIO_TINYXML_LIBRARY
OPENCOLORIO_YAML-CPP_LIBRARY
)
UNSET(COMPONENT)
UNSET(UPPERCOMPONENT)
UNSET(_opencolorio_FIND_COMPONENTS)
UNSET(_opencolorio_LIBRARIES)
UNSET(_opencolorio_SEARCH_DIRS)

View File

@@ -34,6 +34,17 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
ENDIF()
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
SET(_openexr_libs_ver_init "2.0")
SET(_openexr_FIND_COMPONENTS
Half
Iex
IlmImf
IlmThread
Imath
)
SET(_openexr_SEARCH_DIRS
${OPENEXR_ROOT_DIR}
/usr/local
@@ -52,42 +63,42 @@ FIND_PATH(OPENEXR_INCLUDE_DIR
)
# If the headers were found, get the version from config file, if not already set.
if (OPENEXR_INCLUDE_DIR)
if (NOT OPENEXR_VERSION)
FILE(STRINGS "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
IF(OPENEXR_INCLUDE_DIR)
IF(NOT OPENEXR_VERSION)
if(OPENEXR_BUILD_SPECIFICATION)
message(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
string(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION})
set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib")
else()
# Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though.
message(WARNING "Could not determine ILMBase library version, assuming 2.0.")
set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib")
endif()
endif()
endif ()
FIND_FILE(_openexr_CONFIG
NAMES
OpenEXRConfig.h
PATHS
"${OPENEXR_INCLUDE_DIR}"
"${OPENEXR_INCLUDE_DIR}/OpenEXR"
NO_DEFAULT_PATH
)
if (${OPENEXR_VERSION} VERSION_LESS "2.1")
SET(_openexr_FIND_COMPONENTS
Half
Iex
IlmImf
IlmThread
Imath
)
else ()
string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
SET(_openexr_FIND_COMPONENTS
Half
Iex-${_openexr_libs_ver}
IlmImf-${_openexr_libs_ver}
IlmThread-${_openexr_libs_ver}
Imath-${_openexr_libs_ver}
)
endif ()
IF(_openexr_CONFIG)
FILE(STRINGS "${_openexr_CONFIG}" OPENEXR_BUILD_SPECIFICATION
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
ELSE()
MESSAGE(WARNING "Could not find \"OpenEXRConfig.h\" in \"${OPENEXR_INCLUDE_DIR}\"")
ENDIF()
IF(OPENEXR_BUILD_SPECIFICATION)
MESSAGE(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
STRING(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
"\\1" _openexr_libs_ver_init ${OPENEXR_BUILD_SPECIFICATION})
ELSE()
MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_openexr_libs_ver_init}.")
ENDIF()
UNSET(_openexr_CONFIG CACHE)
ENDIF()
ENDIF()
SET("OPENEXR_VERSION" ${_openexr_libs_ver_init} CACHE STRING "Version of OpenEXR lib")
UNSET(_openexr_libs_ver_init)
STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
SET(_openexr_LIBRARIES)
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
@@ -95,7 +106,7 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES
${COMPONENT}
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
HINTS
${_openexr_SEARCH_DIRS}
PATH_SUFFIXES
@@ -104,6 +115,8 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
UNSET(_openexr_libs_ver)
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -116,8 +129,17 @@ IF(OPENEXR_FOUND)
SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
ENDIF()
MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR)
MARK_AS_ADVANCED(
OPENEXR_INCLUDE_DIR
OPENEXR_VERSION
)
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

@@ -37,7 +37,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
ENDIF()
SET(PYTHON_VERSION 3.3 CACHE STRING "Python Version (major and minor only)")
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
MARK_AS_ADVANCED(PYTHON_VERSION)
@@ -71,7 +71,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
SET(_python_ABI_FLAGS
"m;mu;u; " # release
"md;mud;ud;d" # debug
"dm;dmu;du;d" # debug
)
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
@@ -188,7 +188,7 @@ IF(PYTHONLIBSUNIX_FOUND)
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
# we need this for installation
# XXX No more valid with debian-like py3.3 packages...
# XXX No more valid with debian-like py3.4 packages...
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
# not used

View File

@@ -0,0 +1,47 @@
#=============================================================================
# Copyright 2014 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#
# Inspired on the Testing.cmake from Libmv
#
#=============================================================================
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
if(WITH_GTESTS)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY INCLUDE_DIRECTORIES)
set(TEST_INC
${_current_include_directories}
${CMAKE_SOURCE_DIR}/tests/gtests
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
${CMAKE_SOURCE_DIR}/extern/gtest/include
)
unset(_current_include_directories)
add_executable(${NAME}_test ${SRC})
target_link_libraries(${NAME}_test
${EXTRA_LIBS}
bf_testing_main
bf_intern_guardedalloc
extern_gtest
extern_glog)
set_target_properties(${NAME}_test PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
INCLUDE_DIRECTORIES "${TEST_INC}")
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
endif()
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
endmacro()

View File

@@ -2,38 +2,96 @@
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
# Extract working copy information for SOURCE_DIR into MY_XXX variables
# with a default in case anything fails, for examble when using git-svn
# with a default in case anything fails, for example when using git-svn
set(MY_WC_HASH "unknown")
set(MY_WC_BRANCH "unknown")
set(MY_WC_COMMIT_TIMESTAMP 0)
# Guess if this is a SVN working copy and then look up the revision
# Guess if this is a git working copy and then look up the revision
if(EXISTS ${SOURCE_DIR}/.git)
# The FindGit.cmake module is part of the standard distribution
include(FindGit)
if(GIT_FOUND)
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if (MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(MY_WC_BRANCH STREQUAL "HEAD")
# Detached HEAD, check whether commit hash is reachable
# in the master branch
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_contains_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
if(_git_contains_check STREQUAL "master")
set(MY_WC_BRANCH "master")
else()
execute_process(COMMAND git show-ref --tags -d
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_tag_hashes
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(_git_tag_hashes MATCHES "${_git_head_hash}")
set(MY_WC_BRANCH "master")
endif()
unset(_git_tag_hashes)
unset(_git_head_hashs)
endif()
unset(_git_contains_check)
else()
execute_process(COMMAND git log HEAD..@{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_below_check
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT _git_below_check STREQUAL "")
# If there're commits between HEAD and upstream this means
# that we're reset-ed to older revision. Use it's hash then.
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(COMMAND git rev-parse --short @{u}
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(MY_WC_HASH STREQUAL "")
# Local branch, not set to upstream.
# Well, let's use HEAD for now
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(MY_WC_BRANCH MATCHES "^blender-v")
set(MY_WC_BRANCH "master")
endif()
unset(_git_below_check)
endif()
execute_process(COMMAND git log -1 --format=%ct
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
@@ -52,7 +110,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
if(NOT _git_changed_files STREQUAL "")
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
else()
# Unpushed commits are also considered local odifications
# Unpushed commits are also considered local modifications
execute_process(COMMAND git log @{u}..
WORKING_DIRECTORY ${SOURCE_DIR}
OUTPUT_VARIABLE _git_unpushed_log
@@ -69,7 +127,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
# but BUILD_DATE and BUILD_TIME are plataform dependant
# but BUILD_DATE and BUILD_TIME are platform dependent
if(UNIX)
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -79,7 +137,7 @@ if(WIN32)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# Write a file with the SVNVERSION define
# Write a file with the BUILD_HASH define
file(WRITE buildinfo.h.txt
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"
@@ -88,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

@@ -41,7 +41,7 @@ defs_precalc = {
"glColor3dv": {0: 3},
"glColor4dv": {0: 4},
"glVertex2fv": {0: 2},
"glVertex3fv": {0: 3},
"glVertex4fv": {0: 4},
@@ -50,27 +50,27 @@ defs_precalc = {
"glEvalCoord1dv": {0: 1},
"glEvalCoord2fv": {0: 2},
"glEvalCoord2dv": {0: 2},
"glRasterPos2dv": {0: 2},
"glRasterPos3dv": {0: 3},
"glRasterPos4dv": {0: 4},
"glRasterPos2fv": {0: 2},
"glRasterPos3fv": {0: 3},
"glRasterPos4fv": {0: 4},
"glRasterPos2sv": {0: 2},
"glRasterPos3sv": {0: 3},
"glRasterPos4sv": {0: 4},
"glTexCoord2fv": {0: 2},
"glTexCoord3fv": {0: 3},
"glTexCoord4fv": {0: 4},
"glTexCoord2dv": {0: 2},
"glTexCoord3dv": {0: 3},
"glTexCoord4dv": {0: 4},
"glNormal3fv": {0: 3},
"glNormal3dv": {0: 3},
"glNormal3bv": {0: 3},
@@ -84,17 +84,17 @@ import sys
if 0:
# Examples with LLVM as the root dir: '/dsk/src/llvm'
# path containing 'clang/__init__.py'
CLANG_BIND_DIR = "/dsk/src/llvm/tools/clang/bindings/python"
# path containing libclang.so
CLANG_LIB_DIR = "/opt/llvm/lib"
else:
import os
CLANG_BIND_DIR = os.environ.get("CLANG_BIND_DIR")
CLANG_LIB_DIR = os.environ.get("CLANG_LIB_DIR")
if CLANG_BIND_DIR is None:
print("$CLANG_BIND_DIR python binding dir not set")
if CLANG_LIB_DIR is None:
@@ -117,6 +117,7 @@ args = sys.argv[2:]
tu = index.parse(sys.argv[1], args)
# print('Translation unit: %s' % tu.spelling)
filepath = tu.spelling
# -----------------------------------------------------------------------------
@@ -127,7 +128,7 @@ def function_parm_wash_tokens(parm):
CursorKind.VAR_DECL, # XXX, double check this
CursorKind.FIELD_DECL,
)
"""
Return tolens without trailing commads and 'const'
"""
@@ -135,14 +136,14 @@ def function_parm_wash_tokens(parm):
tokens = [t for t in parm.get_tokens()]
if not tokens:
return tokens
#if tokens[-1].kind == To
# if tokens[-1].kind == To
# remove trailing char
if tokens[-1].kind == TokenKind.PUNCTUATION:
if tokens[-1].spelling in (",", ")", ";"):
tokens.pop()
#else:
# print(tokens[-1].spelling)
# else:
# print(tokens[-1].spelling)
t_new = []
for t in tokens:
@@ -156,17 +157,17 @@ def function_parm_wash_tokens(parm):
ok = False # __restrict
elif t_kind in (TokenKind.COMMENT, ):
ok = False
# Use these
elif t_kind in (TokenKind.LITERAL,
TokenKind.PUNCTUATION,
TokenKind.IDENTIFIER):
# use but ignore
pass
else:
print("Unknown!", t_kind, t_spelling)
# if its OK we will add
if ok:
t_new.append(t)
@@ -175,9 +176,9 @@ def function_parm_wash_tokens(parm):
def parm_size(node_child):
tokens = function_parm_wash_tokens(node_child)
# print(" ".join([t.spelling for t in tokens]))
# NOT PERFECT CODE, EXTRACT SIZE FROM TOKENS
if len(tokens) >= 3: # foo [ 1 ]
if ((tokens[-3].kind == TokenKind.PUNCTUATION and tokens[-3].spelling == "[") and
@@ -200,14 +201,12 @@ def function_get_arg_sizes(node):
for i, node_child in enumerate(node_parms):
# print(node_child.kind, node_child.spelling)
#print(node_child.type.kind, node_child.spelling) # TypeKind.POINTER
if node_child.type.kind == TypeKind.POINTER:
# print(node_child.type.kind, node_child.spelling)
if node_child.type.kind == TypeKind.CONSTANTARRAY:
pointee = node_child.type.get_pointee()
if pointee.is_pod():
size = parm_size(node_child)
if size != -1:
arg_sizes[i] = size
size = parm_size(node_child)
if size != -1:
arg_sizes[i] = size
return arg_sizes
@@ -229,14 +228,14 @@ def lookup_function_size_def(func_id):
def file_check_arg_sizes(tu):
# main checking function
def validate_arg_size(node):
"""
Loop over args and validate sizes for args we KNOW the size of.
"""
assert node.kind == CursorKind.CALL_EXPR
if 0:
print("---",
" <~> ".join(
@@ -244,15 +243,15 @@ def file_check_arg_sizes(tu):
for C in node.get_children()]
))
# print(node.location)
# first child is the function call, skip that.
children = list(node.get_children())
if not children:
return # XXX, look into this, happens on C++
func = children[0]
# get the func declaration!
# works but we can better scan for functions ahead of time.
if 0:
@@ -264,42 +263,42 @@ def file_check_arg_sizes(tu):
print("AA", " ".join([t.spelling for t in node.get_tokens()]))
else:
args_size_definition = () # dummy
# get the key
tok = list(func.get_tokens())
if tok:
func_id = tok[0].spelling
args_size_definition = lookup_function_size_def(func_id)
if not args_size_definition:
return
children = children[1:]
for i, node_child in enumerate(children):
children = list(node_child.get_children())
# skip if we dont have an index...
size_def = args_size_definition.get(i, -1)
if size_def == -1:
continue
#print([c.kind for c in children])
# print([c.kind for c in children])
# print(" ".join([t.spelling for t in node_child.get_tokens()]))
if len(children) == 1:
arg = children[0]
if arg.kind in (CursorKind.DECL_REF_EXPR,
CursorKind.UNEXPOSED_EXPR):
if arg.type.kind == TypeKind.POINTER:
if arg.type.kind == TypeKind.CONSTANTARRAY:
dec = arg.get_definition()
if dec:
size = parm_size(dec)
# size == 0 is for 'float *a'
if size != -1 and size != 0:
# nice print!
if 0:
print("".join([t.spelling for t in func.get_tokens()]),
@@ -324,7 +323,7 @@ def file_check_arg_sizes(tu):
location.line,
location.column,
i + 1, size, size_def,
args[0] # always the same but useful when running threaded
filepath # always the same but useful when running threaded
))
# we dont really care what we are looking at, just scan entire file for
@@ -350,8 +349,8 @@ def recursive_arg_sizes(node, ):
args_sizes = node
else:
args_sizes = function_get_arg_sizes(node)
#if args_sizes:
# print(node.spelling, args_sizes)
# if args_sizes:
# print(node.spelling, args_sizes)
_defs[node.spelling] = args_sizes
# print("adding", node.spelling)
for c in node.get_children():

View File

@@ -58,7 +58,7 @@ def replace_line(f, i, text, keep_indent=True):
def source_list(path, filename_check=None):
for dirpath, dirnames, filenames in os.walk(path):
# skip '.svn'
# skip '.git'
if dirpath.startswith("."):
continue
@@ -174,7 +174,7 @@ def cmake_get_src(f):
elif is_c(new_file):
sources_c.append(new_file)
global_refs.setdefault(new_file, []).append((f, i))
elif l in ("PARENT_SCOPE", ):
elif l in {"PARENT_SCOPE", }:
# cmake var, ignore
pass
elif new_file.endswith(".list"):
@@ -201,7 +201,7 @@ def cmake_get_src(f):
# replace_line(f, i - 1, new_path_rel)
else:
raise Exception("non existant include %s:%d -> %s" % (f, i, new_file))
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
# print(new_file)

View File

@@ -2,6 +2,7 @@ import os
IGNORE = (
"/test/",
"/tests/gtests/",
"/BSP_GhostTest/",
"/release/",
"/xembed/",

View File

@@ -24,7 +24,7 @@
"""
Example linux usage
python3 ~/blenderSVN/blender/build_files/cmake/cmake_netbeans_project.py ~/blenderSVN/cmake
python3 ~/blender-git/blender/build_files/cmake/cmake_netbeans_project.py ~/blender-git/cmake
Windows not supported so far
"""
@@ -67,8 +67,8 @@ def create_nb_project_main():
if 0:
PROJECT_NAME = "Blender"
else:
# be tricky, get the project name from SVN if we can!
PROJECT_NAME = project_name_get(SOURCE_DIR)
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get()
# --------------- NB spesific
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
@@ -105,8 +105,8 @@ def create_nb_project_main():
f.write(' <data xmlns="http://www.netbeans.org/ns/make-project/1">\n')
f.write(' <name>%s</name>\n' % PROJECT_NAME)
f.write(' <c-extensions>c,m</c-extensions>\n')
f.write(' <cpp-extensions>cpp,mm</cpp-extensions>\n')
f.write(' <header-extensions>h,hpp,inl</header-extensions>\n')
f.write(' <cpp-extensions>cpp,cxx,cc,mm</cpp-extensions>\n')
f.write(' <header-extensions>h,hxx,hh,hpp,inl</header-extensions>\n')
f.write(' <sourceEncoding>UTF-8</sourceEncoding>\n')
f.write(' <make-dep-projects/>\n')
f.write(' <sourceRootList>\n')
@@ -118,16 +118,21 @@ def create_nb_project_main():
f.write(' <type>0</type>\n')
f.write(' </confElem>\n')
f.write(' </confList>\n')
f.write(' <formatting>\n')
f.write(' <project-formatting-style>false</project-formatting-style>\n')
f.write(' </formatting>\n')
f.write(' </data>\n')
f.write(' </configuration>\n')
f.write('</project>\n')
f.close()
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<configurationDescriptor version="79">\n')
f.write('<configurationDescriptor version="94">\n')
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
f.write(' <df name="blender" root="%s">\n' % SOURCE_DIR) # base_root_rel
f.write(' <df name="0" root="%s">\n' % SOURCE_DIR) # base_root_rel
# write files!
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
@@ -145,7 +150,7 @@ def create_nb_project_main():
for key, item in dirs:
f.write('%s <df name="%s">\n' % (ident, key))
write_df(item, ident + " ")
write_df(item, ident + " ")
f.write('%s </df>\n' % ident)
for key in files:
@@ -178,9 +183,10 @@ def create_nb_project_main():
f.write(' <conf name="Default" type="0">\n')
f.write(' <toolsSet>\n')
f.write(' <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>\n')
f.write(' <compilerSet>default</compilerSet>\n')
f.write(' </toolsSet>\n')
f.write(' <dependencyChecking>false</dependencyChecking>\n')
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
f.write(' <makefileType>\n')
f.write(' <makeTool>\n')
@@ -217,7 +223,7 @@ def create_nb_project_main():
f.write(' <item path="%s"\n' % path)
f.write(' ex="false"\n')
f.write(' tool="1"\n')
f.write(' flavor="0">\n')
f.write(' flavor2="0">\n')
f.write(' </item>\n')
f.write(' <runprofile version="9">\n')
@@ -239,6 +245,8 @@ def create_nb_project_main():
f.write('</configurationDescriptor>\n')
f.close()
def main():
create_nb_project_main()

View File

@@ -27,7 +27,7 @@ Example Win32 usage:
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
example linux usage
python .~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
python .~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
"""
from project_info import (SIMPLE_PROJECTFILE,
@@ -63,21 +63,21 @@ def create_qtc_project_main():
if SIMPLE_PROJECTFILE:
# --- qtcreator specific, simple format
PROJECT_NAME = "Blender"
f = open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w') as f:
f.write("\n".join(files_rel))
f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w')
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
with open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w') as f:
f.write("\n".join(sorted(list(set(os.path.dirname(f)
for f in files_rel if is_c_header(f))))))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
if not os.path.exists(qtc_cfg):
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")
else:
includes, defines = cmake_advanced_info()
@@ -92,33 +92,34 @@ def create_qtc_project_main():
if 0:
PROJECT_NAME = "Blender"
else:
# be tricky, get the project name from SVN if we can!
PROJECT_NAME = project_name_get(SOURCE_DIR)
# be tricky, get the project name from CMake if we can!
PROJECT_NAME = project_name_get()
FILE_NAME = PROJECT_NAME.lower()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8')
f.write("\n".join(sorted(includes)))
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8') as f:
f.write("\n".join(sorted(includes)))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
if os.path.exists(qtc_custom_cfg):
fc = open(qtc_custom_cfg, 'r')
f.write(fc.read())
fc.close()
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
if os.path.exists(qtc_custom_cfg):
with open(qtc_custom_cfg, 'r') as fc:
f.write(fc.read())
f.write("\n")
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
if sys.platform != "win32":
defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
print("Blender project file written to: %r" % qtc_prj)
# --- end
@@ -133,21 +134,21 @@ def create_qtc_project_python():
if 0:
PROJECT_NAME = "Blender_Python"
else:
# be tricky, get the project name from SVN if we can!
PROJECT_NAME = project_name_get(SOURCE_DIR) + "_Python"
# be tricky, get the project name from git if we can!
PROJECT_NAME = project_name_get() + "_Python"
FILE_NAME = PROJECT_NAME.lower()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
f.write("\n".join(files_rel))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
f = open(qtc_prj, 'w')
f.write("[General]\n")
with open(qtc_prj, 'w') as f:
f.write("[General]\n")
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
if not os.path.exists(qtc_cfg):
f = open(qtc_cfg, 'w')
f.write("// ADD PREDEFINED MACROS HERE!\n")
with open(qtc_cfg, 'w') as f:
f.write("// ADD PREDEFINED MACROS HERE!\n")
print("Python project file written to: %r" % qtc_prj)

View File

@@ -41,6 +41,8 @@ CHECKER_ARGS = [
os.path.join(os.path.dirname(__file__), "clang_array_check.py"),
# not sure why this is needed, but it is.
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
# stupid but needed
"-Dbool=char"
]

View File

@@ -70,7 +70,7 @@ def main():
def my_process(i, c, cmd):
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush()

View File

@@ -61,7 +61,7 @@ def main():
def my_process(i, c, cmd):
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush()

View File

@@ -59,7 +59,7 @@ def main():
def my_process(i, c, cmd):
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush()

View File

@@ -89,7 +89,7 @@ def main():
def my_process(i, c, cmd):
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.write("%s %s\n" % (percent_str, c))

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)
@@ -51,3 +52,8 @@ set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE OFF CACHE BOOL "" FORCE)
if(APPLE)
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
endif()

View File

@@ -0,0 +1,14 @@
# only compile Cycles standalone, without Blender
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/cycles_standalone.cmake ../blender
#
# disable Blender
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
# build Cycles
set(WITH_CYCLES_STANDALONE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_STANDALONE_GUI ON CACHE BOOL "" FORCE)

View File

@@ -1,37 +1,41 @@
#!/bin/sh
# This shell script checks out and compiles blender, tested on ubuntu 10.04
# assumes you have dependancies installed alredy
# assumes you have dependencies installed already
# See this page for more info:
# http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Generic_Distro/CMake
# http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Generic_Distro/CMake
# grab blender
mkdir ~/blender-svn
cd ~/blender-svn
svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender
mkdir ~/blender-git
cd ~/blender-git
# create cmake dir
mkdir ~/blender-svn/build-cmake
cd ~/blender-svn/build-cmake
git clone http://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
# create build dir
mkdir ~/blender-git/build-cmake
cd ~/blender-git/build-cmake
# cmake without copying files for fast rebuilds
# the files from svn will be used in place
# the files from git will be used in place
cmake ../blender
# make blender, will take some time
make
make -j$(nproc)
# link the binary to blenders source directory to run quickly
ln -s ~/blender-svn/build-cmake/bin/blender ~/blender-svn/blender/blender.bin
ln -s ~/blender-git/build-cmake/bin/blender ~/blender-git/blender/blender.bin
# useful info
echo ""
echo "* Useful Commands *"
echo " Run Blender: ~/blender-svn/blender/blender.bin"
echo " Update Blender: svn up ~/blender-svn/blender"
echo " Reconfigure Blender: cd ~/blender-svn/build-cmake ; cmake ."
echo " Build Blender: cd ~/blender-svn/build-cmake ; make"
echo " Run Blender: ~/blender-git/blender/blender.bin"
echo " Update Blender: git pull --rebase; git submodule foreach git pull --rebase origin master"
echo " Reconfigure Blender: cd ~/blender-git/build-cmake ; cmake ."
echo " Build Blender: cd ~/blender-git/build-cmake ; make"
echo ""

View File

@@ -221,7 +221,7 @@ macro(SETUP_LIBDIRS)
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
link_directories(${PYTHON_LIBPATH})
endif()
if(WITH_SDL)
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
link_directories(${SDL_LIBPATH})
endif()
if(WITH_CODEC_FFMPEG)
@@ -284,8 +284,7 @@ macro(setup_liblinks
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
target_link_libraries(${target}
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${BLENDER_GL_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY})
@@ -305,7 +304,7 @@ macro(setup_liblinks
endif()
if(WITH_SYSTEM_GLEW)
target_link_libraries(${target} ${GLEW_LIBRARY})
target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
target_link_libraries(${target} ${BULLET_LIBRARIES})
@@ -322,7 +321,7 @@ macro(setup_liblinks
if(WITH_CODEC_SNDFILE)
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
endif()
if(WITH_SDL)
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
target_link_libraries(${target} ${SDL_LIBRARY})
endif()
if(WITH_CODEC_QUICKTIME)
@@ -359,9 +358,12 @@ macro(setup_liblinks
endif()
if(WITH_CODEC_FFMPEG)
# Strange!, without this ffmpeg gives linking errors (on linux)
# even though its linked above
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
# Strange! Without this ffmpeg gives linking errors (on linux),
# even though it's linked above.
# XXX: Does FFMPEG depend on GLU?
if(WITH_GLU)
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
endif()
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
endif()
@@ -411,6 +413,252 @@ macro(setup_liblinks
endif()
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
target_link_libraries(${target} "extern_clew")
target_link_libraries(${target} "extern_cuew")
endif()
endmacro()
macro(SETUP_BLENDER_SORTED_LIBS)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
list(APPEND BLENDER_LINK_LIBS
bf_windowmanager
bf_render
)
if(WITH_MOD_FLUID)
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
endif()
if(WITH_CYCLES)
list(APPEND BLENDER_LINK_LIBS
cycles_render
cycles_bvh
cycles_device
cycles_kernel
cycles_util
cycles_subd)
if(WITH_CYCLES_OSL)
list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
endif()
endif()
# Sort libraries
set(BLENDER_SORTED_LIBS
bf_windowmanager
bf_editor_space_api
bf_editor_space_action
bf_editor_space_buttons
bf_editor_space_console
bf_editor_space_file
bf_editor_space_graph
bf_editor_space_image
bf_editor_space_info
bf_editor_space_logic
bf_editor_space_nla
bf_editor_space_node
bf_editor_space_outliner
bf_editor_space_script
bf_editor_space_sequencer
bf_editor_space_text
bf_editor_space_time
bf_editor_space_userpref
bf_editor_space_view3d
bf_editor_space_clip
bf_editor_transform
bf_editor_util
bf_editor_uvedit
bf_editor_curve
bf_editor_gpencil
bf_editor_interface
bf_editor_mesh
bf_editor_metaball
bf_editor_object
bf_editor_armature
bf_editor_physics
bf_editor_render
bf_editor_screen
bf_editor_sculpt_paint
bf_editor_sound
bf_editor_animation
bf_editor_datafiles
bf_editor_mask
bf_editor_io
bf_render
bf_python
bf_python_ext
bf_python_mathutils
bf_python_bmesh
bf_freestyle
bf_ikplugin
bf_modifiers
bf_bmesh
bf_blenkernel
bf_nodes
bf_rna
bf_gpu
bf_blenloader
bf_imbuf
bf_blenlib
bf_intern_ghost
bf_intern_string
bf_avi
bf_imbuf_cineon
bf_imbuf_openexr
bf_imbuf_openimageio
bf_imbuf_dds
bf_collada
bf_intern_elbeem
bf_intern_memutil
bf_intern_guardedalloc
bf_intern_ctr
bf_intern_utfconv
ge_blen_routines
ge_converter
ge_phys_dummy
ge_phys_bullet
bf_intern_smoke
extern_minilzo
extern_lzma
extern_colamd
ge_logic_ketsji
extern_recastnavigation
ge_logic
ge_rasterizer
ge_oglrasterizer
ge_logic_expressions
ge_scenegraph
ge_logic_network
ge_logic_ngnetwork
ge_logic_loopbacknetwork
bf_intern_moto
extern_openjpeg
extern_redcode
ge_videotex
bf_dna
bf_blenfont
bf_intern_audaspace
bf_intern_mikktspace
bf_intern_dualcon
bf_intern_cycles
cycles_render
cycles_bvh
cycles_device
cycles_kernel
cycles_util
cycles_subd
bf_intern_raskter
bf_intern_opencolorio
extern_rangetree
extern_wcwidth
extern_libmv
extern_glog
extern_sdlew
bf_intern_glew_mx
)
if(WITH_COMPOSITOR)
# added for opencl compositor
list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl")
endif()
if(WITH_LIBMV)
list(APPEND BLENDER_SORTED_LIBS extern_ceres)
endif()
if(WITH_MOD_CLOTH_ELTOPO)
list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
endif()
if(NOT WITH_SYSTEM_GLEW)
list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BINRELOC)
list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
endif()
if(WITH_CXX_GUARDEDALLOC)
list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
endif()
if(WITH_IK_SOLVER)
list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
endif()
if(WITH_IK_ITASC)
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
endif()
if(WITH_CODEC_QUICKTIME)
list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
endif()
if(WITH_INPUT_NDOF)
list(APPEND BLENDER_SORTED_LIBS bf_intern_ghostndof3dconnexion)
endif()
if(WITH_MOD_BOOLEAN)
list(APPEND BLENDER_SORTED_LIBS extern_carve)
endif()
if(WITH_GHOST_XDND)
list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
endif()
if(WITH_CYCLES_OSL)
list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
endif()
if(WITH_INTERNATIONAL)
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
endif()
if(WITH_OPENNL)
list_insert_after(BLENDER_SORTED_LIBS "bf_render" "bf_intern_opennl")
endif()
if(WITH_BULLET)
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
endif()
if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
endif()
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
set(REMLIB ${SORTLIB})
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
if(${SEARCHLIB} STREQUAL ${SORTLIB})
set(REMLIB "")
endif()
endforeach()
if(REMLIB)
# message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
list(APPEND REM_MSG ${REMLIB})
list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
endif()
endforeach()
if(REM_MSG)
list(SORT REM_MSG)
message(STATUS "Blender Skipping: (${REM_MSG})")
endif()
unset(SEARCHLIB)
unset(SORTLIB)
unset(REMLIB)
unset(REM_MSG)
# for top-level tests
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
endmacro()
macro(TEST_SSE_SUPPORT
@@ -475,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("
@@ -483,6 +733,149 @@ macro(TEST_STDBOOL_SUPPORT)
HAVE_STDBOOL_H)
endmacro()
macro(TEST_UNORDERED_MAP_SUPPORT)
# - Detect unordered_map availability
# Test if a valid implementation of unordered_map exists
# and define the include path
# This module defines
# HAVE_UNORDERED_MAP, whether unordered_map implementation was found
#
# HAVE_STD_UNORDERED_MAP_HEADER, <unordered_map.h> was found
# HAVE_UNORDERED_MAP_IN_STD_NAMESPACE, unordered_map is in namespace std
# HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE, unordered_map is in namespace std::tr1
#
# UNORDERED_MAP_INCLUDE_PREFIX, include path prefix for unordered_map, if found
# UNORDERED_MAP_NAMESPACE, namespace for unordered_map, if found
include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX("unordered_map" HAVE_STD_UNORDERED_MAP_HEADER)
if(HAVE_STD_UNORDERED_MAP_HEADER)
# Even so we've found unordered_map header file it doesn't
# mean unordered_map and unordered_set will be declared in
# std namespace.
#
# Namely, MSVC 2008 have unordered_map header which declares
# unordered_map class in std::tr1 namespace. In order to support
# this, we do extra check to see which exactly namespace is
# to be used.
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>
int main() {
std::unordered_map<int, int> map;
return 0;
}"
HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
message(STATUS "Found unordered_map/set in std namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "")
set(UNORDERED_MAP_NAMESPACE "std")
else()
CHECK_CXX_SOURCE_COMPILES("#include <unordered_map>
int main() {
std::tr1::unordered_map<int, int> map;
return 0;
}"
HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "")
set(UNORDERED_MAP_NAMESPACE "std::tr1")
else()
message(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
"or std::tr1::unordered_map.")
endif()
endif()
else()
CHECK_INCLUDE_FILE_CXX("tr1/unordered_map" HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
message(STATUS "Found unordered_map/set in std::tr1 namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "tr1")
set(UNORDERED_MAP_NAMESPACE "std::tr1")
else()
message(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
endif()
endif()
endmacro()
macro(TEST_SHARED_PTR_SUPPORT)
# This check are coming from Ceres library.
#
# Find shared pointer header and namespace.
#
# This module defines the following variables:
#
# SHARED_PTR_FOUND: TRUE if shared_ptr found.
# SHARED_PTR_TR1_MEMORY_HEADER: True if <tr1/memory> header is to be used
# for the shared_ptr object, otherwise use <memory>.
# SHARED_PTR_TR1_NAMESPACE: TRUE if shared_ptr is defined in std::tr1 namespace,
# otherwise it's assumed to be defined in std namespace.
include(CheckIncludeFileCXX)
set(SHARED_PTR_FOUND FALSE)
CHECK_INCLUDE_FILE_CXX(memory HAVE_STD_MEMORY_HEADER)
if(HAVE_STD_MEMORY_HEADER)
# Finding the memory header doesn't mean that shared_ptr is in std
# namespace.
#
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
# order to support this, we do an extra check to see which namespace
# should be used.
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <memory>
int main() {
std::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_STD_NAMESPACE)
if(HAVE_SHARED_PTR_IN_STD_NAMESPACE)
message("-- Found shared_ptr in std namespace using <memory> header.")
set(SHARED_PTR_FOUND TRUE)
else()
CHECK_CXX_SOURCE_COMPILES("#include <memory>
int main() {
std::tr1::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
message("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)
endif()
endif()
endif()
if(NOT SHARED_PTR_FOUND)
# Further, gcc defines shared_ptr in std::tr1 namespace and
# <tr1/memory> is to be included for this. And what makes things
# even more tricky is that gcc does have <memory> header, so
# all the checks above wouldn't find shared_ptr.
CHECK_INCLUDE_FILE_CXX("tr1/memory" HAVE_TR1_MEMORY_HEADER)
if(HAVE_TR1_MEMORY_HEADER)
CHECK_CXX_SOURCE_COMPILES("#include <tr1/memory>
int main() {
std::tr1::shared_ptr<int> int_ptr;
return 0;
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
message("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
set(SHARED_PTR_TR1_MEMORY_HEADER TRUE)
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)
endif()
endif()
endif()
endmacro()
# when we have warnings as errors applied globally this
# needs to be removed for some external libs which we dont maintain.
@@ -606,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)
@@ -641,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
@@ -762,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
@@ -781,6 +1168,7 @@ function(delayed_do_install
list(GET destinations ${i} d)
install(FILES ${f} DESTINATION ${targetdir}/${d})
endforeach()
unset(f)
endif()
endfunction()
@@ -831,6 +1219,52 @@ macro(data_to_c_simple
unset(_file_to_path)
endmacro()
# macro for converting pixmap directory to a png and then a c file
macro(data_to_c_simple_icons
path_from
list_to_add
)
# Conversion steps
# path_from -> _file_from -> _file_to
# foo/*.dat -> foo.png -> foo.png.c
get_filename_component(_path_from_abs ${path_from} ABSOLUTE)
# remove ../'s
get_filename_component(_file_from ${CMAKE_CURRENT_BINARY_DIR}/${path_from}.png REALPATH)
get_filename_component(_file_to ${CMAKE_CURRENT_BINARY_DIR}/${path_from}.png.c REALPATH)
list(APPEND ${list_to_add} ${_file_to})
get_filename_component(_file_to_path ${_file_to} PATH)
# ideally we wouldn't glob, but storing all names for all pixmaps is a bit heavy
file(GLOB _icon_files "${path_from}/*.dat")
add_custom_command(
OUTPUT ${_file_from} ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
#COMMAND python3 ${CMAKE_SOURCE_DIR}/source/blender/datatoc/datatoc_icon.py ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc_icon ${_path_from_abs} ${_file_from}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
DEPENDS
${_icon_files}
datatoc_icon
datatoc
# could be an arg but for now we only create icons depending on UI_icons.h
${CMAKE_SOURCE_DIR}/source/blender/editors/include/UI_icons.h
)
set_source_files_properties(${_file_from} ${_file_to} PROPERTIES GENERATED TRUE)
unset(_path_from_abs)
unset(_file_from)
unset(_file_to)
unset(_file_to_path)
unset(_icon_files)
endmacro()
# XXX Not used for now...
macro(svg_to_png
file_from
@@ -889,7 +1323,7 @@ macro(msgfmt_simple
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
DEPENDS msgfmt)
DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
@@ -898,3 +1332,65 @@ macro(msgfmt_simple
unset(_file_to)
unset(_file_to_path)
endmacro()
macro(find_python_package
package)
string(TOUPPER ${package} _upper_package)
# set but invalid
if((NOT ${PYTHON_${_upper_package}_PATH} STREQUAL "") AND
(NOT ${PYTHON_${_upper_package}_PATH} MATCHES NOTFOUND))
# if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}/${package}")
# message(WARNING "PYTHON_${_upper_package}_PATH is invalid, ${package} not found in '${PYTHON_${_upper_package}_PATH}' "
# "WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
# set(WITH_PYTHON_INSTALL${_upper_package} OFF)
# endif()
# not set, so initialize
else()
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
# re-cache
unset(PYTHON_${_upper_package}_PATH CACHE)
find_path(PYTHON_${_upper_package}_PATH
NAMES
${package}
HINTS
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
PATH_SUFFIXES
site-packages
dist-packages
NO_DEFAULT_PATH
)
if(NOT EXISTS "${PYTHON_${_upper_package}_PATH}")
message(WARNING "'${package}' path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/${package}', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/${package}', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/${package}', "
"WITH_PYTHON_INSTALL_${_upper_package} option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_${_upper_package} OFF)
else()
message(STATUS "${package} found at '${PYTHON_${_upper_package}_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
unset(_upper_package)
endmacro()
# like Python's 'print(dir())'
macro(print_all_vars)
get_cmake_property(_vars VARIABLES)
foreach(_var ${_vars})
message("${_var}=${${_var}}")
endforeach()
unset(_vars)
unset(_var)
endmacro()

View File

@@ -2,7 +2,6 @@ set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/rende
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
set(PROJECT_CONTACT "foundation@blender.org")
set(PROJECT_VENDOR "Blender Foundation")
set(ORG_WEBSITE "www.blender.org")
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
@@ -32,21 +31,23 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
endif()
endif()
set(BUILD_REV ${MY_WC_HASH})
unset(MY_WC_HASH)
# Force Package Name
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-1.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
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 "1.${BUILD_REV}")
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
set(CPACK_SET_DESTDIR "true")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_RELOCATABLE "false")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
endif()
@@ -60,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
@@ -75,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

@@ -239,26 +239,5 @@ def cmake_compiler_defines():
return lines
def project_name_get(path, fallback="Blender", prefix="Blender_"):
if not os.path.isdir(os.path.join(path, ".svn")):
return fallback
import subprocess
try:
info = subprocess.Popen(["svn", "info", path],
stdout=subprocess.PIPE).communicate()[0]
except:
# possibly 'svn' isnt found/installed
return fallback
# string version, we only want the URL
info = info.decode(encoding="utf-8", errors="ignore")
for l in info.split("\n"):
l = l.strip()
if l.startswith("URL"):
# https://svn.blender.org/svnroot/bf-blender/branches/bmesh/blender
# --> bmesh
if "/branches/" in l:
return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0]
return fallback
def project_name_get():
return cmake_cache_var("CMAKE_PROJECT_NAME")

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

@@ -1,13 +1,14 @@
import os
import platform
def FindPython():
all_abi_flags = ['m', 'mu', '']
python = "/usr"
abi_flags = "m" # Most common for linux distros
version = "3.3"
version = "3.4"
_arch = "x86_64-linux-gnu"
_arch = platform.uname()[4] + "-linux-gnu"
# Determine ABI flags used on this system
include = os.path.join(python, "include")

View File

@@ -0,0 +1,42 @@
def FindSharedPtr(conf):
"""
Detect shared_ptr availability
"""
found = False
namespace = None
header = None
if conf.CheckCXXHeader("memory"):
# Finding the memory header doesn't mean that shared_ptr is in std
# namespace.
#
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
# order to support this, we do an extra check to see which namespace
# should be used.
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std namespace using <memory> header.")
namespace = 'std'
header = 'memory'
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
namespace = 'std::tr1'
header = 'memory'
if not namespace and conf.CheckCXXHeader("tr1/memory"):
# Further, gcc defines shared_ptr in std::tr1 namespace and
# <tr1/memory> is to be included for this. And what makes things
# even more tricky is that gcc does have <memory> header, so
# all the checks above wouldn't find shared_ptr.
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
namespace = 'std::tr1'
header = 'tr1/memory'
if not namespace:
print("-- Unable to find shared_ptrred_map>.")
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
conf.env['SHARED_PTR_NAMESPACE'] = namespace
conf.env['SHARED_PTR_HEADER'] = header

View File

@@ -0,0 +1,38 @@
def FindUnorderedMap(conf):
"""
Detect unordered_map availability
"""
namespace = None
header = None
if conf.CheckCXXHeader("unordered_map"):
# Even so we've found unordered_map header file it doesn't
# mean unordered_map and unordered_set will be declared in
# std namespace.
#
# Namely, MSVC 2008 have unordered_map header which declares
# unordered_map class in std::tr1 namespace. In order to support
# this, we do extra check to see which exactly namespace is
# to be used.
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std namespace.")
namespace = 'std'
header = 'unordered_map'
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
print("-- Found unordered_map/set in std::tr1 namespace.")
namespace = 'std::tr1'
header = 'unordered_map'
else:
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
elif conf.CheckCXXHeader("tr1/unordered_map"):
print("-- Found unordered_map/set in std::tr1 namespace.")
namespace = 'std::tr1'
header = 'tr1/unordered_map'
else:
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
conf.env['UNORDERED_MAP_HEADER'] = header

View File

@@ -26,10 +26,10 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
#bz2 is a standard osx dynlib
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
WITH_OSX_STATICPYTHON = True
# python 3.3 uses precompiled libraries in bf svn /lib by default
# python 3.4 uses precompiled libraries in bf svn /lib by default
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
@@ -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
@@ -82,19 +82,18 @@ BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf
WITH_BF_DDS = True
#Color Management System
WITH_BF_LCMS = False
BF_LCMS = LIBDIR + '/lcms'
BF_LCMS_INC = '${BF_LCMS}/include'
BF_LCMS_LIB = 'lcms'
BF_LCMS_LIBPATH = '${BF_LCMS}/lib'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
@@ -109,7 +108,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
@@ -155,7 +154,7 @@ BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa'
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
BF_PCRE = LIBDIR + '/opencollada'
BF_PCRE_LIB = 'pcre'
@@ -182,7 +181,7 @@ WITH_BF_LLVM = True
BF_LLVM = LIBDIR + '/llvm'
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
WITH_BF_OIIO = True
@@ -206,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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Freestyle
WITH_BF_FREESTYLE = True
@@ -238,7 +237,7 @@ LLIBS = ['stdc++']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
CC_WARN = ['-Wall']
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
@@ -254,7 +253,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS = ['-g']
#############################################################################
################### Output directories ##################

View File

@@ -1,205 +0,0 @@
CC = 'gcc44'
CXX = 'g++44'
LCGDIR = '../lib/freebsd8'
LIBDIR = "${LCGDIR}"
BF_PYTHON_ABI_FLAGS = ''
BF_PYTHON = '/usr/local'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.3'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr/local'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
BF_CXX = '/usr/local'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_JACK = True
BF_JACK = '/usr/local'
BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = True
BF_SNDFILE = '/usr/local'
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
BF_SNDFILE_LIB = 'sndfile'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
WITH_BF_TIFF = True
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = False
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
BF_FFMPEG = '/usr/local'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = True
BF_OGG = '/usr/local'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/usr/local'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
# BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/local'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
WITH_BF_COLLADA = False
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = '/usr'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
BF_PCRE = '/usr/local'
BF_PCRE_LIB = 'pcre'
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
BF_EXPAT = '/usr/local'
BF_EXPAT_LIB = 'expat'
BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
WITH_BF_OPENMP = True
WITH_GHOST_XDND = False
#Freestyle
WITH_BF_FREESTYLE = True
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CPPFLAGS = []
CXXFLAGS = []
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_BUILDDIR = '../build/freebsd8'
BF_INSTALLDIR='../install/freebsd8'
#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']

View File

@@ -1,210 +0,0 @@
CC = 'gcc44'
CXX = 'g++44'
LCGDIR = '../lib/freebsd9'
LIBDIR = "${LCGDIR}"
BF_PYTHON_ABI_FLAGS = ''
BF_PYTHON = '/usr/local'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.3'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr/local'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
BF_CXX = '/usr/local'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_JACK = True
BF_JACK = '/usr/local'
BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = True
BF_SNDFILE = '/usr/local'
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
BF_SNDFILE_LIB = 'sndfile'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
WITH_BF_TIFF = True
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = False
WITH_BF_PLAYER = True
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
### XXX Find what this actually wants; it doesn't want libquicktime.
WITH_BF_QUICKTIME = False
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
BF_FFMPEG = '/usr/local'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = True
BF_OGG = '/usr/local'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/usr/local'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
# BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/local'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
WITH_BF_COLLADA = False
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = '/usr'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
BF_PCRE = '/usr/local'
BF_PCRE_LIB = 'pcre'
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
BF_EXPAT = '/usr/local'
BF_EXPAT_LIB = 'expat'
BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
WITH_BF_OPENMP = True
WITH_GHOST_XDND = False
#Freestyle
WITH_BF_FREESTYLE = True
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
CXXFLAGS = []
CPPFLAGS = []
if WITH_BF_FFMPEG:
# libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_BUILDDIR = '../build/freebsd9'
BF_INSTALLDIR='../install/freebsd9'
#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']

View File

@@ -1,4 +1,4 @@
from Modules.FindPython import FindPython
from FindPython import FindPython
py = FindPython()
@@ -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'
@@ -206,7 +206,7 @@ WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OPENMP = True
@@ -241,7 +241,7 @@ if WITH_BF_FFMPEG:
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
CC_WARN = ['-Wall']
@@ -254,7 +254,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR = '../build/linux'
BF_INSTALLDIR='../install/linux'
@@ -262,6 +262,6 @@ BF_INSTALLDIR='../install/linux'
#Link against pthread
PLATFORM_LINKFLAGS = ['-pthread']
#Fix for LLVM conflict with Mesa llvmpipe
if WITH_BF_LLVM:
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']

View File

@@ -1,189 +0,0 @@
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python31'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'OpenAL32 wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = False
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'sndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex IlmThread '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/gcc/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz_st'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
WITH_BF_OCEANSIM = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/gcc/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/gcc/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = False
# enable ffmpeg support
WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = False
BF_FFTW3 = LIBDIR + '/gcc/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a']
WITH_BF_OPENMP = False
BF_OPENMP = LIBDIR + '/gcc/gomp'
BF_OPENMP_INC = '${BF_OPENMP}/include'
BF_OPENMP_LIBPATH = '${BF_OPENMP}/lib'
WITH_BF_COLLADA = False
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib ${BF_ICONV_LIBPATH}'
#Freestyle
WITH_BF_FREESTYLE = True
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
CC_WARN = [ '-Wall' ]
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++', '-luuid', '-lole32'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
PLATFORM_LINKFLAGS = ['--stack,2097152']
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_BUILDDIR = '../build/linuxcross'
BF_INSTALLDIR='../install/linuxcross'

View File

@@ -2,12 +2,12 @@ LCGDIR = '#../lib/mingw32'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python33'
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
@@ -18,10 +18,10 @@ BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = True
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
BF_FFMPEG_LIB = 'avformat-55 avcodec-55 avdevice-55 avutil-52 swscale-2'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
@@ -145,7 +145,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -175,7 +175,7 @@ WITH_BF_OPENMP = True
#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']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
#Freestyle
WITH_BF_FREESTYLE = True
@@ -190,13 +190,13 @@ CXXFLAGS = []
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-limm32']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
@@ -205,7 +205,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']

View File

@@ -3,12 +3,13 @@ import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/windows_vc11'
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/windows_vc12'
else:
VC_VERSION = '9.0'
LCGDIR = '#../lib/windows'
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
sys.exit(1)
LIBDIR = '${LCGDIR}'
@@ -16,28 +17,23 @@ WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
if VC_VERSION == '11.0':
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
else:
BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python33'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
if VC_VERSION == '11.0':
BF_OPENAL_LIB = 'OpenAL32'
else:
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_ICONV = True
@@ -61,10 +57,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
if VC_VERSION == '11.0':
BF_SDL_LIB = 'SDL.lib dxguid.lib'
else:
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
@@ -76,7 +69,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -155,7 +148,7 @@ BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
@@ -197,23 +190,14 @@ WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
if VC_VERSION == '11.0':
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
else:
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
BF_BOOST_LIB_INTERNATIONAL = 'libboost_locale-vc90-mt-s-1_49'
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
# Workaround for ptxas.exe crash on VS2012 and cuda 5.5
if VC_VERSION == '11.0':
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30']
else:
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
@@ -233,22 +217,25 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
CC = 'cl.exe'
CXX = 'cl.exe'
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267', '/we4013']
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
if VC_VERSION == '12.0':
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'imm32']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
@@ -259,9 +246,6 @@ PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/IN
BF_BSC=False
if VC_VERSION == '11.0':
BF_BUILDDIR = '..\\build\\win32-vc11'
BF_INSTALLDIR='..\\install\\win32-vc11'
else:
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'

View File

@@ -2,12 +2,12 @@ LCGDIR = '#../lib/mingw64'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python33'
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
@@ -144,7 +144,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
@@ -169,8 +169,7 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
#May produce errors with unsupported MinGW-w64 builds
WITH_BF_OPENMP = False
WITH_BF_OPENMP = True
#Freestyle
WITH_BF_FREESTYLE = True
@@ -185,13 +184,13 @@ CXXFLAGS = [ '-fpermissive' ]
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-limm32']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
@@ -200,7 +199,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']

View File

@@ -3,42 +3,38 @@ import subprocess
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
if "17.00." in CL_STDERR:
VC_VERSION = '11.0'
LCGDIR = '#../lib/win64_vc11'
if "18.00." in CL_STDERR:
VC_VERSION = '12.0'
LCGDIR = '#../lib/win64_vc12'
else:
VC_VERSION = '9.0'
LCGDIR = '#../lib/win64'
import sys
print("Visual C version not supported {}\n".format(CL_STDERR))
sys.exit(1)
LIBDIR = '${LCGDIR}'
WITH_BF_FFMPEG = True
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
if VC_VERSION == '11.0':
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
else:
BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.3'
BF_PYTHON_VERSION = '3.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python33'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
if VC_VERSION == '11.0':
BF_OPENAL_LIB = 'OpenAL32'
else:
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_SNDFILE = True
@@ -56,10 +52,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
if VC_VERSION == '11.0':
BF_SDL_LIB = 'SDL.lib dxguid.lib'
else:
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIB = 'SDL2.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_JACK = False
@@ -73,7 +66,7 @@ WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
@@ -158,7 +151,7 @@ BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
@@ -187,7 +180,7 @@ WITH_BF_OIIO = True
BF_OIIO = '${LIBDIR}/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
WITH_BF_STATICOIIO = True
WITH_BF_OCIO = True
@@ -200,18 +193,14 @@ WITH_BF_STATICOCIO = True
WITH_BF_BOOST = True
BF_BOOST = '${LIBDIR}/boost'
BF_BOOST_INC = '${BF_BOOST}/include'
if VC_VERSION == '11.0':
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
else:
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49'
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
@@ -232,7 +221,13 @@ CC = 'cl.exe'
CXX = 'cl.exe'
CFLAGS = []
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
# We want to support Vista level ABI for x64
if VC_VERSION == '12.0':
CCFLAGS.append('/D_WIN32_WINNT=0x600')
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
@@ -241,18 +236,16 @@ BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '/Ob2']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'imm32']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
if VC_VERSION == '11.0':
BF_BUILDDIR = '..\\build\\win64-vc11'
BF_INSTALLDIR='..\\install\\win64-vc11'
else:
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'

192
build_files/scons/tools/Blender.py Normal file → Executable file
View File

@@ -15,8 +15,8 @@ to kill any code duplication
"""
import os
import os.path
import string
import ctypes as ct
import glob
import time
import sys
@@ -51,10 +51,8 @@ program_list = [] # A list holding Nodes to final binaries, used to create insta
arguments = None
targets = None
resources = []
bitness = 0
#some internals
blenderdeps = [] # don't manipulate this one outside this module!
allowed_bitnesses = {4 : 32, 8 : 64} # only expecting 32-bit or 64-bit
bitness = allowed_bitnesses[ct.sizeof(ct.c_void_p)]
##### LIB STUFF ##########
@@ -145,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'])
@@ -250,6 +248,11 @@ def setup_staticlibs(lenv):
libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"]
libincs.append('/usr/lib')
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
# Here we only store library path, actual library name will be added in setup_syslibs()
for syslib in create_blender_liblist(lenv, 'system'):
libincs.append(os.path.dirname(syslib))
return statlibs, libincs
def setup_syslibs(lenv):
@@ -265,7 +268,7 @@ def setup_syslibs(lenv):
if lenv['WITH_BF_OPENAL']:
if not lenv['WITH_BF_STATICOPENAL']:
syslibs += Split(lenv['BF_OPENAL_LIB'])
if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc' and not lenv['WITH_BF_STATICOPENMP']:
if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc' and lenv['C_COMPILER_ID'] != 'clang' and not lenv['WITH_BF_STATICOPENMP']:
if lenv['CC'] == 'cl.exe':
syslibs += ['vcomp']
else:
@@ -300,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'])
@@ -341,6 +344,10 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_STATICPNG']:
syslibs += Split(lenv['BF_PNG_LIB'])
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
for syslib in create_blender_liblist(lenv, 'system'):
syslibs.append(os.path.basename(syslib))
syslibs += lenv['LLIBS']
return syslibs
@@ -374,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')
@@ -408,43 +422,64 @@ def buildinfo(lenv, build_type):
"""
Generate a buildinfo object
"""
import subprocess
build_date = time.strftime ("%Y-%m-%d")
build_time = time.strftime ("%H:%M:%S")
if os.path.isdir(os.path.abspath('.git')):
build_commit_timestamp = os.popen('git log -1 --format=%ct').read().strip()
try:
build_commit_timestamp = btools.get_command_output(args=['git', 'log', '-1', '--format=%ct']).strip()
except OSError:
build_commit_timestamp = None
if not build_commit_timestamp:
# Git command not found
build_hash = 'unknown'
build_commit_timestamp = '0'
build_branch = 'unknown'
else:
import subprocess
no_upstream = False
process = subprocess.Popen(['git', 'rev-parse', '--short', '@{u}'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
build_hash, stderr = process.communicate()
build_hash = build_hash.strip()
build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
if build_hash == '':
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
try :
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
except subprocess.CalledProcessError:
# assume branch has no upstream configured
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
no_upstream = True
build_branch = btools.get_command_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
if build_branch == 'HEAD':
master_check = btools.get_command_output(['git', 'branch', '--list', 'master', '--contains', build_hash]).strip()
if master_check == 'master':
build_branch = 'master'
else:
head_hash = btools.get_command_output(['git', 'rev-parse', 'HEAD']).strip()
tag_hashes = btools.get_command_output(['git', 'show-ref', '--tags', '-d'])
if tag_hashes.find(head_hash) != -1:
build_branch = 'master'
if not no_upstream:
older_commits = btools.get_command_output(['git', 'log', '--oneline', 'HEAD..@{u}']).strip()
if older_commits:
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
# ## Check for local modifications
has_local_changes = False
# Update GIT index before getting dirty files
os.system('git update-index -q --refresh')
changed_files = os.popen('git diff-index --name-only HEAD --').read().strip()
changed_files = btools.get_command_output(['git', 'diff-index', '--name-only', 'HEAD', '--']).strip()
if changed_files:
has_local_changes = True
elif no_upstream == False:
unpushed_log = os.popen('git log @{u}..').read().strip()
unpushed_log = btools.get_command_output(['git', 'log', '--oneline', '@{u}..']).strip()
has_local_changes = unpushed_log != ''
if build_branch.startswith('blender-v'):
build_branch = 'master'
if has_local_changes:
build_branch += ' (modified)'
else:
@@ -588,17 +623,13 @@ def my_winpybundle_print(target, source, env):
def WinPyBundle(target=None, source=None, env=None):
import re
py_tar= env.subst( env['LCGDIR'] )
if py_tar[0]=='#':
py_tar= py_tar[1:]
py_tar = env.subst(env['LCGDIR']).lstrip("#")
if env['BF_DEBUG']:
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_d.tar.gz'
else:
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.tar.gz'
py_target = env.subst( env['BF_INSTALLDIR'] )
if py_target[0]=='#':
py_target=py_target[1:]
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib')
def printexception(func,path,ex):
if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
@@ -619,6 +650,34 @@ def WinPyBundle(target=None, source=None, env=None):
print "Unpacking '" + py_tar + "' to '" + py_target + "'"
untar_pybundle(py_tar,py_target,exclude_re)
# -------------
# Extract Numpy
if env['WITH_BF_PYTHON_INSTALL_NUMPY']:
py_tar = env.subst(env['LCGDIR']).lstrip("#")
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.8.tar.gz'
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib', 'site-packages')
# rmtree handled above
# files are cleaned up in their archive
exclude_re = []
print("Unpacking '" + py_tar + "' to '" + py_target + "'")
untar_pybundle(py_tar, py_target, exclude_re)
# --------------------
# Copy 'site-packages'
py_dir = env.subst(env['LCGDIR']).lstrip("#")
py_dir += '/release/site-packages'
# grr, we have to do one by one because the dir exists
for f in os.listdir(py_dir):
fn_src = os.path.join(py_dir, f)
fn_dst = os.path.join(py_target, f)
shutil.rmtree(fn_dst, False, printexception)
shutil.copytree(fn_src, fn_dst)
def my_appit_print(target, source, env):
a = '%s' % (target[0])
d, f = os.path.split(a)
@@ -659,37 +718,37 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
commands.getoutput(cmd)
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
# blenderplayer doesn't need all the files
if binary == 'blender':
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/datafiles/locale/languages %s/%s.app/Contents/MacOS/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
mo_dir = os.path.join(builddir[:-4], "locale")
for f in os.listdir(mo_dir):
cmd = 'ditto %s/%s %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
cmd = 'ditto %s/%s %s/%s.app/Contents/Resources/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
commands.getoutput(cmd)
cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/Resources/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
commands.getoutput(cmd)
if env['WITH_BF_OCIO']:
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/Resources/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
if VERSION_RELEASE_CYCLE == "release":
cmd = 'rm -rf %s/%s.app/Contents/MacOS/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
cmd = 'rm -rf %s/%s.app/Contents/Resources/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
commands.getoutput(cmd)
if env['WITH_BF_CYCLES']:
croot = '%s/intern/cycles' % (bldroot)
cinstalldir = '%s/%s.app/Contents/MacOS/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
cinstalldir = '%s/%s.app/Contents/Resources/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
cmd = 'mkdir %s' % (cinstalldir)
commands.getoutput(cmd)
@@ -703,7 +762,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/util/util_color.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, cinstalldir)
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
commands.getoutput(cmd)
cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
commands.getoutput(cmd)
@@ -717,9 +776,11 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
if env['WITH_OSX_STATICPYTHON']:
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/python/'%(installdir,binary, VERSION)
commands.getoutput(cmd)
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/Resources/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/Resources/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
@@ -730,23 +791,31 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
print "Bundling libgcc and libgomp"
instname = env['BF_CXX']
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
commands.getoutput(cmd)
cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
cmd = 'SetFile -d "%s)" -m "%s)" %s/%s.app'%(time.strftime("%m/%d/%Y %H:%M"),time.strftime("%m/%d/%Y %H:%M"),installdir,binary) # give the bundles actual creation/modification date
commands.getoutput(cmd)
if env['WITH_BF_OPENMP']:
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
print "Bundling libgcc and libgomp"
instname = env['BF_CXX']
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
commands.getoutput(cmd)
cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
print "Bundling libiomp5"
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.
@@ -826,6 +895,17 @@ def UnixPyBundle(target=None, source=None, env=None):
run("find '%s' -type d -name '*.a' -prune -exec rm -rf {} ';'" % numpy_target)
else:
print 'Failed to find numpy at %s, skipping copying' % numpy_src
del numpy_src, numpy_target
if env['WITH_BF_PYTHON_INSTALL_REQUESTS']:
requests_src = py_src + "/site-packages/requests"
requests_target = py_target + "/site-packages/requests"
if os.path.exists(requests_src):
run("cp -R '%s' '%s'" % (requests_src, os.path.dirname(requests_target)))
run("find '%s' -type d -name '*.pem -prune -exec rm -rf {} ';'" % requests_target)
else:
print('Failed to find requests at %s, skipping copying' % requests_src)
del requests_src, requests_target
run("find '%s' -type d -name 'test' -prune -exec rm -rf {} ';'" % py_target)
run("find '%s' -type d -name '__pycache__' -exec rm -rf {} ';'" % py_target)

View File

@@ -14,6 +14,21 @@ import sys
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
def get_command_output(*popenargs, **kwargs):
if hasattr(subprocess, "check_output"):
return subprocess.check_output(*popenargs, **kwargs)
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise subprocess.CalledProcessError(retcode, cmd)
return output
def get_version():
import re
@@ -56,26 +71,22 @@ def get_version():
raise Exception("%s: missing version string" % fname)
def get_hash():
build_hash = os.popen('git rev-parse --short HEAD').read().strip()
try:
build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
except OSError:
build_hash = None
print("WARNING: could not use git to retrieve current Blender repository hash...")
except subprocess.CalledProcessError as e:
build_hash = None
print("WARNING: git errored while retrieving current Blender repository hash (%d)..." % e.returncode)
if build_hash == '' or build_hash == None:
build_hash = 'UNKNOWN'
return build_hash
# copied from: http://www.scons.org/wiki/AutoconfRecipes
def checkEndian():
import struct
array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
i = struct.unpack('i', array)
# Little Endian
if i == struct.unpack('<i', array):
return "little"
# Big Endian
elif i == struct.unpack('>i', array):
return "big"
else:
raise Exception("cant find endian")
return sys.byteorder
# This is used in creating the local config directories
@@ -97,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',
@@ -125,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',
@@ -135,7 +149,8 @@ def validate_arguments(args, bc):
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
'WITHOUT_BF_INSTALL',
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', 'WITH_BF_PYTHON_INSTALL_NUMPY',
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
'WITH_BF_PYTHON_INSTALL_NUMPY', 'WITH_BF_PYTHON_INSTALL_REQUESTS',
'WITHOUT_BF_OVERWRITE_INSTALL',
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_STATICOPENMP', 'BF_OPENMP_STATIC_STATIC',
'WITH_GHOST_SDL',
@@ -160,11 +175,11 @@ def validate_arguments(args, bc):
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
'BUILDBOT_BRANCH',
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
'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'
]
@@ -173,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',
@@ -180,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'
]
@@ -283,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', ''),
@@ -449,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', ''),
@@ -531,7 +561,8 @@ def read_opts(env, cfg, args):
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python mumpy module', False)),
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python numpy module', False)),
(BoolVariable('WITH_BF_PYTHON_INSTALL_REQUESTS', 'install Python requests module', False)),
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
@@ -543,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()
@@ -570,7 +602,10 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_CYCLES_CUDA_BINARIES', 'Build with precompiled CUDA binaries', False)),
(BoolVariable('WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'Build several render kernels at once (using BF_NUMJOBS)', False)),
('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)),
@@ -688,8 +723,6 @@ def buildslave(target=None, source=None, env=None):
if platform == 'darwin':
platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE']
if env['MSVC_VERSION'] == '11.0':
platform = env['OURPLATFORM'] + '11'
branch = env['BUILDBOT_BRANCH']

63
build_files/utils/build_tgz.sh Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/sh
# This script can run from any location,
# output is created in the $CWD
BASE_DIR="$PWD"
blender_srcdir=$(dirname -- $0)/../..
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
if [ "$blender_version_cycle" = "release" ] ; then
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
else
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
SUBMODULE_EXCLUDE="^$" # dummy regex
fi
MANIFEST="blender-$VERSION-manifest.txt"
TARBALL="blender-$VERSION.tar.gz"
cd "$blender_srcdir"
# not so nice, but works
FILTER_FILES_PY="import os, sys; [print(l[:-1]) for l in sys.stdin.readlines() if os.path.isfile(l[:-1])]"
# Build master list
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
# Enumerate submodules
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
cd "$BASE_DIR"
cd "$blender_srcdir/$lcv"
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
cd "$BASE_DIR"
done
echo "OK"
# Create the tarball
cd "$blender_srcdir"
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
echo "OK"
# Create checksum file
cd "$BASE_DIR"
echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
md5sum "$TARBALL" > "$TARBALL.md5sum"
echo "OK"
# Cleanup
echo -n "Cleaning up ..."
rm "$BASE_DIR/$MANIFEST"
echo "OK"
echo "Done!"

View File

@@ -112,7 +112,7 @@ class DNACatalogHTML:
# ${version} and ${revision}
if bpy:
version = '.'.join(map(str, bpy.app.version))
revision = bpy.app.build_revision[:-1]
revision = bpy.app.build_hash
else:
version = str(header.Version)
revision = 'Unknown'
@@ -404,7 +404,7 @@ def main():
# Files
if '--dna-versioned' in sys.argv:
blender_version = '_'.join(map(str, bpy.app.version))
filename = 'dna-{0}-{1}_endian-{2}-r{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_revision[2:-1])
filename = 'dna-{0}-{1}_endian-{2}-{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_hash)
else:
filename = 'dna'
dir = os.path.dirname(__file__)
@@ -451,7 +451,7 @@ def main():
os.remove(Path_Blend)
# export dna to xhtml
log.info("6: export sdna to xhtml file")
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
handleHTML = open(Path_HTML, "w")
catalog.WriteToHTML(handleHTML)
handleHTML.close()

View File

@@ -1,457 +0,0 @@
.TH "BLENDER" "1" "February 14, 2013" "Blender Blender 2\&.66"
.SH NAME
blender \- a 3D modelling and rendering package
.SH SYNOPSIS
.B blender [args ...] [file] [args ...]
.br
.SH DESCRIPTION
.PP
.B blender
is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
http://www.blender.org
.SH OPTIONS
Blender 2.66
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
.TP
.B \-b or \-\-background <file>
.br
Load <file> in background (often used for UI\-less rendering)
.br
.TP
.B \-a or \-\-render\-anim
.br
Render frames from start to end (inclusive)
.br
.TP
.B \-S or \-\-scene <name>
.br
Set the active scene <name> for rendering
.br
.TP
.B \-f or \-\-render\-frame <frame>
.br
Render frame <frame> and save it.
.br
+<frame> start frame relative, \-<frame> end frame relative.
.br
.TP
.B \-s or \-\-frame\-start <frame>
.br
Set start to frame <frame> (use before the \-a argument)
.br
.TP
.B \-e or \-\-frame\-end <frame>
.br
Set end to frame <frame> (use before the \-a argument)
.br
.TP
.B \-j or \-\-frame\-jump <frames>
.br
Set number of frames to step forward after each rendered frame
.br
.TP
.B \-o or \-\-render\-output <path>
.br
Set the render path and file name.
.br
Use // at the start of the path to
.br
render relative to the blend file.
.br
The # characters are replaced by the frame number, and used to define zero padding.
.br
ani_##_test.png becomes ani_01_test.png
.br
test\-######.png becomes test\-000001.png
.br
When the filename does not contain #, The suffix #### is added to the filename
.br
The frame number will be added at the end of the filename.
.br
eg: blender \-b foobar.blend \-o //render_ \-F PNG \-x 1 \-a
.br
//render_ becomes //render_####, writing frames as //render_0001.png//
.br
.TP
.B \-E or \-\-engine <engine>
.br
Specify the render engine
.br
use \-E help to list available engines
.br
.IP
.SS "Format Options:"
.TP
.B \-F or \-\-render\-format <format>
.br
Set the render format, Valid options are...
.br
TGA IRIS JPEG MOVIE IRIZ RAWTGA
.br
AVIRAW AVIJPEG PNG BMP FRAMESERVER
.br
(formats that can be compiled into blender, not available on all systems)
.br
HDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS
.br
.TP
.B \-x or \-\-use\-extension <bool>
.br
Set option to add the file extension to the end of the file
.br
.TP
.B \-t or \-\-threads <threads>
.br
Use amount of <threads> for rendering in background
.br
[1\-64], 0 for systems processor count.
.br
.IP
.SS "Animation Playback Options:"
.TP
.B \-a <options> <file(s)>
.br
Playback <file(s)>, only operates this way when not running in background.
.br
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.br
\-m Read from disk (Don't buffer)
.br
\-f <fps> <fps\-base> Specify FPS to start with
.br
\-j <frame> Set frame step to <frame>
.br
\-s <frame> Play from <frame>
.br
\-e <frame> Play until <frame>
.br
.IP
.SS "Window Options:"
.TP
.B \-w or \-\-window\-border
.br
Force opening with borders (default)
.br
.TP
.B \-W or \-\-window\-borderless
.br
Force opening without borders
.br
.TP
.B \-p or \-\-window\-geometry <sx> <sy> <w> <h>
.br
Open with lower left corner at <sx>, <sy> and width and height as <w>, <h>
.br
.TP
.B \-con or \-\-start\-console
.br
Start with the console window open (ignored if \-b is set)
.br
.IP
.SS "Game Engine Specific Options:"
.TP
.B \-g Game Engine specific options
.br
\-g fixedtime Run on 50 hertz without dropping frames
.br
\-g vertexarrays Use Vertex Arrays for rendering (usually faster)
.br
\-g nomipmap No Texture Mipmapping
.br
\-g linearmipmap Linear Texture Mipmapping instead of Nearest (default)
.br
.IP
.SS "Misc Options:"
.TP
.B \-d or \-\-debug
.br
Turn debugging on
.br
.IP
* Prints every operator call and their arguments
.br
* Disables mouse grab (to interact with a debugger in some cases)
.br
* Keeps python sys.stdin rather than setting it to None
.br
.TP
.B \-\-debug\-fpe
.br
Enable floating point exceptions
.br
.TP
.B \-\-disable\-crash\-handler
.br
Disable the crash handler
.br
.IP
.TP
.B \-\-factory\-startup
.br
Skip reading the "startup.blend" in the users home directory
.br
.IP
.TP
.B \-\-env\-system\-datafiles
.br
Set the BLENDER_SYSTEM_DATAFILES environment variable
.br
.TP
.B \-\-env\-system\-scripts
.br
Set the BLENDER_SYSTEM_SCRIPTS environment variable
.br
.TP
.B \-\-env\-system\-python
.br
Set the BLENDER_SYSTEM_PYTHON environment variable
.br
.IP
.TP
.B \-nojoystick
.br
Disable joystick support
.br
.TP
.B \-noglsl
.br
Disable GLSL shading
.br
.TP
.B \-noaudio
.br
Force sound system to None
.br
.TP
.B \-setaudio
.br
Force sound system to a specific device
.br
NULL SDL OPENAL JACK
.br
.IP
.TP
.B \-h or \-\-help
.br
Print this help text and exit
.br
.IP
.TP
.B \-y or \-\-enable\-autoexec
.br
Enable automatic python script execution, (default)
.br
.TP
.B \-Y or \-\-disable\-autoexec
.br
Disable automatic python script execution (pydrivers & startup scripts)
.br
.IP
.TP
.B \-P or \-\-python <filename>
.br
Run the given Python script file
.br
.TP
.B \-\-python\-text <name>
.br
Run the given Python script text block
.br
.TP
.B \-\-python\-console
.br
Run blender with an interactive console
.br
.TP
.B \-\-addons
.br
Comma separated list of addons (no spaces)
.br
.TP
.B \-v or \-\-version
.br
Print Blender version and exit
.br
.TP
.B \-\-
.br
Ends option processing, following arguments passed unchanged. Access via python's sys.argv
.br
.SS "Other Options:"
.TP
.B /?
.br
Print this help text and exit (windows only)
.br
.TP
.B \-\-debug\-python
.br
Enable debug messages for python
.br
.TP
.B \-\-debug\-events
.br
Enable debug messages for the event system
.br
.TP
.B \-\-debug\-handlers
.br
Enable debug messages for event handling
.br
.TP
.B \-\-debug\-wm
.br
Enable debug messages for the window manager
.br
.TP
.B \-\-debug\-all
.br
Enable all debug messages (excludes libmv)
.br
.TP
.B \-\-debug\-value <value>
.br
Set debug value of <value> on startup
.br
.IP
.TP
.B \-\-debug\-jobs
.br
Enable time profiling for background jobs.
.br
.TP
.B \-\-verbose <verbose>
.br
Set logging verbosity level.
.br
.TP
.B \-R
.br
Register .blend extension, then exit (Windows only)
.br
.TP
.B \-r
.br
Silently register .blend extension, then exit (Windows only)
.br
.TP
.B \-\-no\-native\-pixels
.br
Do not use native pixel size, for high resolution displays (MacBook 'Retina')
.br
.SS "Argument Parsing:"
arguments must be separated by white space. eg
"blender \-ba test.blend"
...will ignore the 'a'
"blender \-b test.blend \-f8"
...will ignore 8 because there is no space between the \-f and the frame value
.br
.SS "Argument Order:"
Arguments are executed in the order they are given. eg
"blender \-\-background test.blend \-\-render\-frame 1 \-\-render\-output /tmp"
...will not render to /tmp because '\-\-render\-frame 1' renders before the output path is set
"blender \-\-background \-\-render\-output /tmp test.blend \-\-render\-frame 1"
...will not render to /tmp because loading the blend file overwrites the render output that was set
"blender \-\-background test.blend \-\-render\-output /tmp \-\-render\-frame 1" works as expected.
.br
.br
.SH "ENVIRONMENT VARIABLES"
\fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
\fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
\fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
\fIDirectory\fR for user data files (icons, translations, ..).
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
.br
.br
.br
.SH SEE ALSO
.B yafaray(1)
.br
.SH AUTHORS
This manpage was written for a Debian GNU/Linux system by Daniel Mester
<mester@uni-bremen.de> and updated by Cyril Brulebois
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.

47
doc/manpage/blender.1.py Normal file → Executable file
View File

@@ -18,10 +18,19 @@
#
# ##### END GPL LICENSE BLOCK #####
'''
This script generates the blender.1 man page, embedding the help text
from the Blender executable itself. Invoke it as follows:
blender.1.py <path-to-blender> <output-filename>
where <path-to-blender> is the path to the Blender executable,
and <output-filename> is where to write the generated man page.
'''
# <pep8 compliant>
import subprocess
import os
import sys
import time
@@ -33,26 +42,23 @@ def man_format(data):
data = data.replace("\t", " ")
return data
# allow passing blender as argument
if sys.argv[-1].endswith(os.sep + "blender"):
blender_bin = sys.argv[-1]
else:
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
if len(sys.argv) != 3:
import getopt
raise getopt.GetoptError("Usage: %s <path-to-blender> <output-filename>" % sys.argv[0])
blender_bin = sys.argv[1]
outfilename = sys.argv[2]
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8")
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8").strip()
blender_version = blender_version.split("Build")[0]
blender_help = subprocess.check_output(cmd).decode(encoding="utf-8")
blender_version = subprocess.check_output([blender_bin, "--version"]).decode(encoding="utf-8").strip()
blender_version = blender_version.split("build")[0].rstrip()
blender_version = blender_version.partition(" ")[2] # remove 'Blender' prefix.
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
filepath = os.path.splitext(__file__)[0]
file = open(filepath, "w")
fw = file.write
outfile = open(outfilename, "w")
fw = outfile.write
fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.replace(".", "\\&.")))
@@ -69,9 +75,9 @@ fw('''
.SH DESCRIPTION
.PP
.B blender
is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
is a 3D modelling and rendering package. Originating as the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
Use Blender to create TV commercials, to make technical visualizations, business graphics, to create content for games, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
http://www.blender.org''')
@@ -119,7 +125,7 @@ while lines:
fw('''
.br
.SH SEE ALSO
.B yafaray(1)
.B luxrender(1)
.br
.SH AUTHORS
@@ -128,4 +134,5 @@ This manpage was written for a Debian GNU/Linux system by Daniel Mester
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
''')
print("written:", filepath)
outfile.close()
print("written:", outfilename)

View File

@@ -75,7 +75,7 @@ print(scene.test_float)
scene.test_array = (True, False)
print([x for x in scene.test_array])
#scene.test_date = "blah" # this would fail, property is read-only
# scene.test_date = "blah" # this would fail, property is read-only
print(scene.test_date)
scene.test_enum = 'BLUE'

View File

@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
self.execute(context)
elif event.type == 'LEFTMOUSE': # Confirm
return {'FINISHED'}
elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
context.object.location.x = self.init_loc_x
return {'CANCELLED'}

View File

@@ -8,4 +8,3 @@ collection.foreach_get(attr, some_seq)
# Python equivalent
for i in range(len(seq)):
some_seq[i] = getattr(collection[i], attr)

View File

@@ -8,4 +8,3 @@ collection.foreach_set(attr, some_seq)
# Python equivalent
for i in range(len(some_seq)):
setattr(collection[i], attr, some_seq[i])

View File

@@ -5,7 +5,7 @@ import math
eul = mathutils.Euler((0.0, math.radians(45.0), 0.0), 'XYZ')
# rotate the euler
eul.rotate_axis(math.radians(10.0), 'Z')
eul.rotate_axis('Z', math.radians(10.0))
# you can access its components by attribute or index
print("Euler X", eul.x)

View File

@@ -0,0 +1,36 @@
import mathutils
# create a kd-tree from a mesh
from bpy import context
obj = context.object
# 3d cursor relative to the object data
co_find = context.scene.cursor_location * obj.matrix_world.inverted()
mesh = obj.data
size = len(mesh.vertices)
kd = mathutils.kdtree.KDTree(size)
for i, v in enumerate(mesh.vertices):
kd.insert(v.co, i)
kd.balance()
# Find the closest point to the center
co_find = (0.0, 0.0, 0.0)
co, index, dist = kd.find(co_find)
print("Close to center:", co, index, dist)
# Find the closest 10 points to the 3d cursor
print("Close 10 points")
for (co, index, dist) in kd.find_n(co_find, 10):
print(" ", co, index, dist)
# Find points within a radius of the 3d cursor
print("Close points within 0.5 distance")
co_find = context.scene.cursor_location
for (co, index, dist) in kd.find_range(co_find, 0.5):
print(" ", co, index, dist)

View File

@@ -28,6 +28,7 @@ Physics Constraints (bge.constraints)
- :class:`ANGULAR_CONSTRAINT`
- :class:`CONETWIST_CONSTRAINT`
- :class:`VEHICLE_CONSTRAINT`
- :class:`GENERIC_6DOF_CONSTRAINT`
:type constrainttype: int
@@ -49,7 +50,7 @@ Physics Constraints (bge.constraints)
:arg axisZ: Z axis
:type axisZ: float
:arg flag: .. to do
:arg flag: 128 to disable collision between linked bodies
:type flag: int
.. attribute:: error
@@ -78,7 +79,7 @@ Physics Constraints (bge.constraints)
:return: a vehicle constraint object.
:rtype: :class:`bge.types.KX_VehicleWrapper`
.. function:: getCharacter(gameobj)
:arg gameobj: The game object with the character physics.
@@ -237,101 +238,101 @@ Physics Constraints (bge.constraints)
Not implemented.
.. data:: DBG_NODEBUG
.. note::
Debug mode to be used with function :class:`setDebugMode`
No debug.
.. data:: DBG_DRAWWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw wireframe in debug.
.. data:: DBG_DRAWAABB
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw Axis Aligned Bounding Box in debug.
.. data:: DBG_DRAWFREATURESTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw freatures text in debug.
.. data:: DBG_DRAWCONTACTPOINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw contact points in debug.
.. data:: DBG_NOHELPTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Debug without help text.
.. data:: DBG_DRAWTEXT
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw text in debug.
.. data:: DBG_PROFILETIMINGS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw profile timings in debug.
.. data:: DBG_ENABLESATCOMPARISION
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable sat comparision in debug.
.. data:: DBG_DISABLEBULLETLCP
.. note::
Debug mode to be used with function :class:`setDebugMode`
Disable Bullet LCP.
.. data:: DBG_ENABLECCD
.. note::
Debug mode to be used with function :class:`setDebugMode`
Enable Continous Colision Detection in debug.
.. data:: DBG_DRAWCONSTRAINTS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraints in debug.
.. data:: DBG_DRAWCONSTRAINTLIMITS
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw constraint limits in debug.
.. data:: DBG_FASTWIREFRAME
.. note::
Debug mode to be used with function :class:`setDebugMode`
Draw a fast wireframe in debug.
.. data:: POINTTOPOINT_CONSTRAINT
@@ -368,3 +369,10 @@ Physics Constraints (bge.constraints)
Constraint type to be used with function :class:`createConstraint`
.. to do
.. data:: GENERIC_6DOF_CONSTRAINT
.. note::
Constraint type to be used with function :class:`createConstraint`
.. to do

View File

@@ -14,7 +14,7 @@ This module holds key constants for the SCA_KeyboardSensor.
# Set a connected keyboard sensor to accept F1
import bge
co = bge.logic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.sensors["Keyboard"]
@@ -24,7 +24,7 @@ This module holds key constants for the SCA_KeyboardSensor.
# Do the all keys thing
import bge
co = bge.logic.getCurrentController()
# 'Keyboard' is a keyboard sensor
sensor = co.sensors["Keyboard"]
@@ -46,20 +46,20 @@ This module holds key constants for the SCA_KeyboardSensor.
# The all keys thing without a keyboard sensor (but you will
# need an always sensor with pulse mode on)
import bge
# Just shortening names here
keyboard = bge.logic.keyboard
JUST_ACTIVATED = bge.logic.KX_INPUT_JUST_ACTIVATED
if keyboard.events[bge.events.WKEY] == JUST_ACTIVATED:
print("Activate Forward!")
if keyboard.events[bge.events.SKEY] == JUST_ACTIVATED:
print("Activate Backward!")
print("Activate Backward!")
if keyboard.events[bge.events.AKEY] == JUST_ACTIVATED:
print("Activate Left!")
print("Activate Left!")
if keyboard.events[bge.events.DKEY] == JUST_ACTIVATED:
print("Activate Right!")
*********
Functions
@@ -72,11 +72,11 @@ Functions
:arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type event: int
:rtype: string
.. function:: EventToCharacter(event, shift)
Return the string name of a key event. Returns an empty string if the event cant be represented as a character.
:type event: int
:arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type shift: bool

View File

@@ -72,6 +72,7 @@ See the actuator's reference for available methods
* :class:`~bge.types.KX_CameraActuator`
* :class:`~bge.types.KX_ConstraintActuator`
* :class:`~bge.types.KX_GameActuator`
* :class:`~bge.types.KX_MouseActuator`
* :class:`~bge.types.KX_NetworkMessageActuator`
* :class:`~bge.types.KX_ObjectActuator`
* :class:`~bge.types.KX_ParentActuator`
@@ -507,6 +508,18 @@ Property Sensor
:value: 5
.. data:: KX_PROPSENSOR_LESSTHAN
Activate when the property is less than the sensor value
:value: 6
.. data:: KX_PROPSENSOR_GREATERTHAN
Activate when the property is greater than the sensor value
:value: 7
------------
Radar Sensor
------------
@@ -752,6 +765,16 @@ See :class:`bge.types.KX_GameActuator`
.. data:: KX_GAME_SAVECFG
.. data:: KX_GAME_LOADCFG
.. _mouse-actuator:
---------------
Mouse Actuator
---------------
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_X
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_Y
.. data:: KX_ACT_MOUSE_OBJECT_AXIS_Z
---------------
Parent Actuator
---------------
@@ -845,6 +868,23 @@ See :class:`bge.types.KX_SteeringActuator.behavior`
:value: 3
.. _logic-trackto-actuator:
-----------------
TrackTo Actuator
-----------------
See :class:`bge.types.KX_TrackToActuator`
.. data:: KX_TRACK_UPAXIS_POS_X
.. data:: KX_TRACK_UPAXIS_POS_Y
.. data:: KX_TRACK_UPAXIS_POS_Z
.. data:: KX_TRACK_TRAXIS_POS_X
.. data:: KX_TRACK_TRAXIS_POS_Y
.. data:: KX_TRACK_TRAXIS_POS_Z
.. data:: KX_TRACK_TRAXIS_NEG_X
.. data:: KX_TRACK_TRAXIS_NEG_Y
.. data:: KX_TRACK_TRAXIS_NEG_Z
=======
Various

View File

@@ -301,6 +301,34 @@ Functions
Disable the motion blur effect.
.. function:: showFramerate(enable)
Show or hide the framerate.
:type enable: boolean
.. function:: showProfile(enable)
Show or hide the profile.
:type enable: boolean
.. function:: showProperties(enable)
Show or hide the debug properties.
:type enable: boolean
.. function:: autoDebugList(enable)
Enable or disable auto adding debug properties to the debug list.
:type enable: boolean
.. function:: clearDebugList()
Clears the debug property list.
.. function:: setVsync(value)
Set the vsync value

View File

@@ -34,7 +34,7 @@ base class --- :class:`PyObjectPlus`
:type: int
.. attribute:: walkDirection
The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
:type: list [x, y, z]

View File

@@ -11,8 +11,131 @@ base class --- :class:`PyObjectPlus`
.. method:: getConstraintId(val)
Returns the contraint's ID
Returns the contraint ID
:return: the constraint's ID
:return: the constraint ID
:rtype: integer
.. method:: setParam(axis, value0, value1)
Set the contraint limits
:arg axis:
:type axis: integer
.. note::
For each axis:
* Lowerlimit == Upperlimit -> axis is locked
* Lowerlimit > Upperlimit -> axis is free
* Lowerlimit < Upperlimit -> axis it limited in that range
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
axis = 3 is a constraint limit, with low/high limit value
* 3: X axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_CONE_TWIST_CONSTRAINT = 3:
axis = 3..5 are constraint limits, high limit values
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
PHY_GENERIC_6DOF_CONSTRAINT = 12:
axis = 0..2 are constraint limits, with low/high limit value
* 0: X axis position
* 1: Y axis position
* 2: Z axis position
axis = 3..5 are relative constraint (Euler) angles in radians
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:arg value0 (min): Set the minimum limit of the axis
:type value0: float
:arg value1 (max): Set the maximum limit of the axis
:type value1: float
axis = 6..8 are translational motors, with value0=target velocity, value1 = max motor force
* 6: X axis position
* 7: Y axis position
* 8: Z axis position
axis = 9..11 are rotational motors, with value0=target velocity, value1 = max motor force
* 9: X axis angle
* 10: Y axis angle
* 11: Z axis angle
:arg value0 (speed): Set the linear velocity of the axis
:type value0: float Range: -10,000.00 to 10,000.00
:arg value1 (force): Set the maximum force limit of the axis
:type value1: float Range: -10,000.00 to 10,000.00
axis = 12..14 are for linear springs on each of the position of freedom
* 12: X axis position
* 13: Y axis position
* 14: Z axis position
axis = 15..17 are for angular springs on each of the angle of freedom in radians
* 15: X axis angle
* 16: Y axis angle
* 17: Z axis angle
:arg value0 (stiffness): Set the stiffness of the spring
:type value0: float
:arg value1 (damping): Tendency of the spring to return to it's original position
:type value1: float
1.0 = springs back to original position (no damping)
0.0 = don't springs back
.. method:: getParam(axis)
Get the contraint position or euler angle of a generic 6DOF constraint
:arg axis:
:type axis: integer
axis = 0..2 are linear constraint values
* 0: X axis position
* 1: Y axis position
* 2: Z axis position
:return: position
:rtype: float
axis = 3..5 are relative constraint (Euler) angles in radians
* 3: X axis angle
* 4: Y axis angle
* 5: Z axis angle
:return: angle
:rtype: float
.. attribute:: constraint_id
Returns the contraint ID (read only)
:type: integer
.. attribute:: constraint_type
Returns the contraint type (read only)
:type: integer
* 1 = POINTTOPOINT_CONSTRAINT
* 2 = LINEHINGE_CONSTRAINT
* 3 = ANGULAR_CONSTRAINT (aka LINEHINGE_CONSTRAINT)
* 4 = CONETWIST_CONSTRAINT
* 11 = VEHICLE_CONSTRAINT
* 12 = GENERIC_6DOF_CONSTRAINT

View File

@@ -12,7 +12,7 @@ base class --- :class:`SCA_IObject`
Properties assigned to game objects are accessible as attributes of this class.
.. note::
Calling ANY method or attribute on an object that has been removed from a scene will raise a SystemError,
if an object may have been removed since last accessing it use the :data:`invalid` attribute to check.
@@ -75,25 +75,25 @@ base class --- :class:`SCA_IObject`
:type: float
.. note::
The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0.
.. attribute:: linVelocityMin
Enforces the object keeps moving at a minimum velocity.
:type: float
.. note::
Applies to dynamic and rigid body objects only.
.. note::
A value of 0.0 disables this option.
.. note::
While objects are stationary the minimum velocity will not be applied.
.. attribute:: linVelocityMax
@@ -101,9 +101,9 @@ base class --- :class:`SCA_IObject`
Clamp the maximum linear velocity to prevent objects moving beyond a set speed.
:type: float
.. note::
Applies to dynamic and rigid body objects only.
.. note::
@@ -247,25 +247,25 @@ base class --- :class:`SCA_IObject`
:type: :class:`mathutils.Matrix`
.. attribute:: localLinearVelocity
The object's local linear velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: worldLinearVelocity
The object's world linear velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: localAngularVelocity
The object's local angular velocity. [x, y, z]
:type: :class:`mathutils.Vector`
.. attribute:: worldAngularVelocity
The object's world angular velocity. [x, y, z]
:type: :class:`mathutils.Vector`
@@ -287,13 +287,13 @@ base class --- :class:`SCA_IObject`
a list meshes for this object.
:type: list of :class:`KX_MeshProxy`
.. note::
Most objects use only 1 mesh.
.. note::
Changes to this list will not update the KX_GameObject.
.. attribute:: sensors
@@ -301,13 +301,13 @@ base class --- :class:`SCA_IObject`
a sequence of :class:`SCA_ISensor` objects with string/index lookups and iterator support.
:type: list
.. note::
This attribute is experemental and may be removed (but probably wont be).
.. note::
Changes to this list will not update the KX_GameObject.
.. attribute:: controllers
@@ -315,13 +315,13 @@ base class --- :class:`SCA_IObject`
a sequence of :class:`SCA_IController` objects with string/index lookups and iterator support.
:type: list of :class:`SCA_ISensor`
.. note::
This attribute is experemental and may be removed (but probably wont be).
.. note::
Changes to this list will not update the KX_GameObject.
.. attribute:: actuators
@@ -329,7 +329,7 @@ base class --- :class:`SCA_IObject`
a list of :class:`SCA_IActuator` with string/index lookups and iterator support.
:type: list
.. note::
This attribute is experemental and may be removed (but probably wont be).
@@ -363,6 +363,18 @@ base class --- :class:`SCA_IObject`
:type: float
.. attribute:: debug
If true, the object's debug properties will be displayed on screen.
:type: boolean
.. attribute:: debugRecursive
If true, the object's and children's debug properties will be displayed on screen.
:type: boolean
.. method:: endObject()
Delete this object, can be used in place of the EndObject Actuator.
@@ -490,7 +502,7 @@ base class --- :class:`SCA_IObject`
Sets the game object's linear velocity.
This method sets game object's velocity through it's centre of mass,
This method sets game object's velocity through it's centre of mass,
ie no angular velocity component.
This requires a dynamic object.
@@ -551,7 +563,7 @@ base class --- :class:`SCA_IObject`
This is not implimented at the moment.
.. method:: applyImpulse(point, impulse)
.. method:: applyImpulse(point, impulse, local=False)
Applies an impulse to the game object.
@@ -559,8 +571,14 @@ base class --- :class:`SCA_IObject`
If point != position, applyImpulse will also change the object's angular momentum.
Otherwise, only linear momentum will change.
:arg point: the point to apply the impulse to (in world coordinates)
:type point: the point to apply the impulse to (in world coordinates)
:arg point: the point to apply the impulse to (in world or local coordinates)
:type point: point [ix, iy, iz] the point to apply the impulse to (in world or local coordinates)
:arg impulse: impulse vector.
:type impulse: 3D Vector
:arg local:
* False: you get the "global" impulse ie: relative to world coordinates with world orientation.
* True: you get the "local" impulse ie: relative to local coordinates with object orientation.
:type local: boolean
.. method:: suspendDynamics()
@@ -571,7 +589,7 @@ base class --- :class:`SCA_IObject`
Resumes physics for this object.
.. note::
The objects linear velocity will be applied from when the dynamics were suspended.
.. method:: enableRigidBody()
@@ -607,7 +625,7 @@ base class --- :class:`SCA_IObject`
:type ghost: boolean
.. note::
If the object type is sensor, it stays ghost regardless of ghost parameter
.. method:: removeParent()
@@ -720,11 +738,11 @@ base class --- :class:`SCA_IObject`
:rtype:
* 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz))
* or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`)
* or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`, 2-tuple (u, v))
* or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`)
* or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`, 2-tuple (u, v))
.. note::
The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x, y, z] points.
.. method:: setCollisionMargin(margin)
@@ -735,7 +753,7 @@ base class --- :class:`SCA_IObject`
:type margin: float
.. note::
If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
.. method:: sendMessage(subject, body="", to="")
@@ -766,11 +784,11 @@ base class --- :class:`SCA_IObject`
.. note::
If this object has instances the other instances will be updated too.
.. note::
The gameObject argument has an advantage that it can convert from a mesh with modifiers applied (such as subsurf).
.. warning::
Only triangle mesh type objects are supported currently (not convex hull)
@@ -791,7 +809,7 @@ base class --- :class:`SCA_IObject`
.. method:: playAction(name, start_frame, end_frame, layer=0, priority=0, blendin=0, play_mode=KX_ACTION_MODE_PLAY, layer_weight=0.0, ipo_flags=0, speed=1.0, blend_mode=KX_ACTION_BLEND_BLEND)
Plays an action.
:arg name: the name of the action
:type name: string
:arg start: the start frame of the action
@@ -812,42 +830,50 @@ base class --- :class:`SCA_IObject`
:type ipo_flags: int bitfield
:arg speed: the playback speed of the action as a factor (1.0 = normal speed, 2.0 = 2x speed, etc)
:type speed: float
:arg blend_mode: how to blend this layer with previous layers
:type blend_mode: one of :ref:`these constants <gameobject-playaction-blend>`
:arg blend_mode: how to blend this layer with previous layers
:type blend_mode: one of :ref:`these constants <gameobject-playaction-blend>`
.. method:: stopAction(layer=0)
Stop playing the action on the given layer.
:arg layer: The layer to stop playing.
:type layer: integer
.. method:: getActionFrame(layer=0)
Gets the current frame of the action playing in the supplied layer.
:arg layer: The layer that you want to get the frame from.
:type layer: integer
:return: The current frame of the action
:rtype: float
.. method:: setActionFrame(frame, layer=0)
Set the current frame of the action playing in the supplied layer.
:arg layer: The layer where you want to set the frame
:type layer: integer
:arg frame: The frame to set the action to
:type frame: float
.. method:: isPlayingAction(layer=0)
Checks to see if there is an action playing in the given layer.
:arg layer: The layer to check for a playing action.
:type layer: integer
:return: Whether or not the action is playing
:rtype: boolean
Checks to see if there is an action playing in the given layer.
:arg layer: The layer to check for a playing action.
:type layer: integer
:return: Whether or not the action is playing
:rtype: boolean
.. method:: addDebugProperty (name, debug = True)
Adds a single debug property to the debug list.
:arg name: name of the property that added to the debug list.
:type name: string
:arg debug: the debug state.
:type debug: boolean

View File

@@ -108,7 +108,7 @@ base class --- :class:`SCA_IObject`
:arg index: polygon number
:type index: integer
:return: a polygon object.
:rtype: :class:`PolyProxy`
:rtype: :class:`KX_PolyProxy`
.. method:: transform(matid, matrix)

View File

@@ -0,0 +1,103 @@
KX_MouseActuator(SCA_IActuator)
====================================
.. module:: bge.types
base class --- :class:`SCA_IActuator`
.. class:: KX_MouseActuator(SCA_IActuator)
The mouse actuator gives control over the visibility of the mouse cursor and rotates the parent object according to mouse movement.
.. method:: reset()
Undoes the rotation caused by the mouse actuator.
.. attribute:: visible
The visibility of the mouse cursor.
:type: boolean
.. attribute:: use_axis_x
Mouse movement along the x axis effects object rotation.
:type: boolean
.. attribute:: use_axis_y
Mouse movement along the y axis effects object rotation.
:type: boolean
.. attribute:: threshold
Amount of movement from the mouse required before rotation is triggered.
:type: list (vector of 2 floats)
The values in the list should be between 0.0 and 0.5.
.. attribute:: reset_x
Mouse is locked to the center of the screen on the x axis.
:type: boolean
.. attribute:: reset_y
Mouse is locked to the center of the screen on the y axis.
:type: boolean
.. attribute:: object_axis
The object's 3D axis to rotate with the mouse movement. ([x, y])
:type: list (vector of 2 integers from 0 to 2)
* KX_ACT_MOUSE_OBJECT_AXIS_X
* KX_ACT_MOUSE_OBJECT_AXIS_Y
* KX_ACT_MOUSE_OBJECT_AXIS_Z
.. attribute:: local_x
Rotation caused by mouse movement along the x axis is local.
:type: boolean
.. attribute:: local_y
Rotation caused by mouse movement along the y axis is local.
:type: boolean
.. attribute:: sensitivity
The amount of rotation caused by mouse movement along the x and y axis.
:type: list (vector of 2 floats)
Negative values invert the rotation.
.. attribute:: limit_x
The minimum and maximum angle of rotation caused by mouse movement along the x axis in degrees.
limit_x[0] is minimum, limit_x[1] is maximum.
:type: list (vector of 2 floats)
.. attribute:: limit_y
The minimum and maximum angle of rotation caused by mouse movement along the y axis in degrees.
limit_y[0] is minimum, limit_y[1] is maximum.
:type: list (vector of 2 floats)
.. attribute:: angle
The current rotational offset caused by the mouse actuator in degrees.
:type: list (vector of 2 floats)

View File

@@ -64,3 +64,20 @@ base class --- :class:`SCA_MouseSensor`
:type: boolean
.. attribute:: useXRay
If enabled it allows the sensor to see through game objects that don't have the selected property or material.
:type: boolean
.. attribute:: propName
The property or material the sensor is looking for.
:type: string
.. attribute:: useMaterial
Determines if the sensor is looking for a property or material. KX_True = Find material; KX_False = Find property.
:type: boolean

View File

@@ -51,6 +51,12 @@ base class --- :class:`SCA_ISensor`
:type: list [x, y, z]
.. attribute:: hitMaterial
The material of the object in the face hit by the ray. (read-only).
:type: string
.. attribute:: rayDirection
The direction from the ray (in worldcoordinates). (read-only).

View File

@@ -152,6 +152,8 @@ base class --- :class:`PyObjectPlus`
:arg scene: The name of the scene to replace this scene with.
:type scene: string
:return: True if the scene exists and was scheduled for addition, False otherwise.
:rtype: boolean
.. method:: suspend()

View File

@@ -39,3 +39,9 @@ base class --- :class:`SCA_ISensor`
:type: :class:`CListValue` of :class:`KX_GameObject`
.. attribute:: hitMaterial
The material of the object in the face hit by the ray. (read-only).
:type: string

View File

@@ -37,3 +37,25 @@ base class --- :class:`SCA_IActuator`
:type: boolean
.. attribute:: upAxis
The axis that points upward.
:type: integer from 0 to 2
* KX_TRACK_UPAXIS_POS_X
* KX_TRACK_UPAXIS_POS_Y
* KX_TRACK_UPAXIS_POS_Z
.. attribute:: trackAxis
The axis that points to the target object.
:type: integer from 0 to 5
* KX_TRACK_TRAXIS_POS_X
* KX_TRACK_TRAXIS_POS_Y
* KX_TRACK_TRAXIS_POS_Z
* KX_TRACK_TRAXIS_NEG_X
* KX_TRACK_TRAXIS_NEG_Y
* KX_TRACK_TRAXIS_NEG_Z

View File

@@ -10,6 +10,12 @@ base class --- :class:`SCA_IController`
A Python controller uses a Python script to activate it's actuators,
based on it's sensors.
.. attribute:: owner
The object the controller is attached to.
:type: :class:`KX_GameObject`
.. attribute:: script
The value of this variable depends on the execution methid.

View File

@@ -22,13 +22,13 @@ base class --- :class:`PyObjectPlus`
:type: dictionary {:ref:`keycode<keyboard-keys>`::ref:`status<input-status>`, ...}
.. function:: getClipboard()
.. method:: getClipboard()
Gets the clipboard text.
:rtype: string
.. function:: setClipboard(text)
.. method:: setClipboard(text)
Sets the clipboard text.

File diff suppressed because it is too large Load Diff

View File

@@ -408,17 +408,19 @@ These returns the absolute path which can be used with native python modules.
Unicode Problems
================
Python supports many different encodings so there is nothing stopping you from writing a script in latin1 or iso-8859-15.
Python supports many different encodings so there is nothing stopping you from
writing a script in ``latin1`` or ``iso-8859-15``.
See `pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_
However this complicates things for the python api because blend files themselves don't have an encoding.
However this complicates matters for Blender's Python API because ``.blend`` files don't have an explicit encoding.
To simplify the problem for python integration and script authors we have decided all strings in blend files **must** be UTF-8 or ASCII compatible.
To avoid the problem for Python integration and script authors we have decided all strings in blend files
**must** be ``UTF-8``, ``ASCII`` compatible.
This means assigning strings with different encodings to an object names for instance will raise an error.
Paths are an exception to this rule since we cannot ignore the existane of non-utf-8 paths on peoples filesystems.
Paths are an exception to this rule since we cannot ignore the existence of non ``UTF-8`` paths on users file-system.
This means seemingly harmless expressions can raise errors, eg.

View File

@@ -49,7 +49,7 @@ A quick list of helpful things to know before starting:
* Blender uses Python 3.x; some 3rd party extensions are not available yet.
* The interactive console is great for testing one-liners, It also has autocompleation so you can inspect the api quickly.
* The interactive console is great for testing one-liners, It also has autocompletion so you can inspect the api quickly.
* Button tool tips show Python attributes and operator names.
@@ -247,7 +247,8 @@ Examples:
Operator Poll()
^^^^^^^^^^^^^^^
Many operators have a "poll" function which may check that the mouse is a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc). When an operator's poll function fails within python, an exception is raised.
Many operators have a "poll" function which may check that the mouse is in a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc).
When an operator's poll function fails within python, an exception is raised.
For example, calling bpy.ops.view3d.render_border() from the console raises the following error:

View File

@@ -115,7 +115,7 @@ While this is not best practice - for testing you can extend the search path, th
import os
import bpy
blend_dir = os.path.basename(bpy.data.filepath)
blend_dir = os.path.dirname(bpy.data.filepath)
if blend_dir not in sys.path:
sys.path.append(blend_dir)
@@ -214,7 +214,7 @@ The next example is an equivalent single line version of the script above which
.. code-block:: python
__import__('code').interact(local={k: v for ns in (globals(), locals()) for k, v in ns.items()})
__import__('code').interact(local=dict(globals(), **locals()))
``code.interact`` can be added at any line in the script and will pause the script an launch an interactive interpreter in the terminal, when you're done you can quit the interpreter and the script will continue execution.

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

@@ -75,7 +75,7 @@ def main():
for l in fsrc:
l = l[:-1]
# weak but ok
if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and not "bmo_opdefines[]" in l:
if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and "bmo_opdefines[]" not in l:
is_block = True
block_ctx = []
blocks.append((comment_ctx, block_ctx))
@@ -113,7 +113,7 @@ def main():
fsrc.close()
del fsrc
# namespace hack
# namespace hack
vars = (
"BMO_OP_SLOT_ELEMENT_BUF",
"BMO_OP_SLOT_BOOL",
@@ -145,6 +145,7 @@ def main():
"BMO_OPTYPE_FLAG_NORMALS_CALC",
"BMO_OPTYPE_FLAG_UNTAN_MULTIRES",
"BMO_OPTYPE_FLAG_SELECT_FLUSH",
"BMO_OPTYPE_FLAG_SELECT_VALIDATE",
"BMO_OPTYPE_FLAG_NOP",
)
vars_dict = {}

View File

@@ -1,22 +1,22 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton, Luca Bonavita
#
# #**** END GPL LICENSE BLOCK #****
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
@@ -62,7 +62,7 @@ Sphinx: PDF generation
try:
import bpy # blender module
except:
except ImportError:
print("\nERROR: this script must run from inside Blender")
print(SCRIPT_HELP_MSG)
import sys
@@ -271,8 +271,15 @@ else:
"gpu",
"mathutils",
"mathutils.geometry",
"mathutils.kdtree",
"mathutils.noise",
"freestyle",
"freestyle.chainingiterators",
"freestyle.functions",
"freestyle.predicates",
"freestyle.shaders",
"freestyle.types",
"freestyle.utils",
]
# ------
@@ -315,7 +322,13 @@ try:
__import__("freestyle")
except ImportError:
BPY_LOGGER.debug("Warning: Built without 'freestyle' module, docs incomplete...")
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle"]
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle",
"freestyle.chainingiterators",
"freestyle.functions",
"freestyle.predicates",
"freestyle.shaders",
"freestyle.types",
"freestyle.utils"]
# examples
EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples"))
@@ -682,7 +695,7 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
fw(ident + ".. data:: %s\n\n" % identifier)
write_indented_lines(ident + " ", fw, doc, False)
fw("\n")
elif type(descr) in (MethodDescriptorType, ClassMethodDescriptorType):
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
write_indented_lines(ident, fw, doc, False)
fw("\n")
else:
@@ -876,7 +889,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
for attribute, value, value_type in module_dir_value_type:
if value_type == types.FunctionType:
pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False)
elif value_type in (types.BuiltinMethodType, types.BuiltinFunctionType): # both the same at the moment but to be future proof
elif value_type in {types.BuiltinMethodType, types.BuiltinFunctionType}: # both the same at the moment but to be future proof
# note: can't get args from these, so dump the string as is
# this means any module used like this must have fully formatted docstrings.
py_c_func2sphinx("", fw, module_name, None, attribute, value, is_class=False)
@@ -981,6 +994,7 @@ context_type_map = {
"image_paint_object": ("Object", False),
"lamp": ("Lamp", False),
"lattice": ("Lattice", False),
"line_style": ("FreestyleLineStyle", False),
"material": ("Material", False),
"material_slot": ("MaterialSlot", False),
"mesh": ("Mesh", False),
@@ -1625,7 +1639,7 @@ def write_rst_contents(basepath):
standalone_modules = (
# mathutils
"mathutils", "mathutils.geometry", "mathutils.noise",
"mathutils", "mathutils.geometry", "mathutils.kdtree", "mathutils.noise",
# misc
"freestyle", "bgl", "blf", "gpu", "aud", "bpy_extras",
# bmesh, submodules are in own page
@@ -1776,9 +1790,16 @@ def write_rst_importable_modules(basepath):
"bpy.props" : "Property Definitions",
"mathutils" : "Math Types & Utilities",
"mathutils.geometry" : "Geometry Utilities",
"mathutils.kdtree" : "KDTree Utilities",
"mathutils.noise" : "Noise Utilities",
"freestyle" : "Freestyle Data Types & Operators",
}
"freestyle" : "Freestyle Module",
"freestyle.types" : "Freestyle Types",
"freestyle.predicates" : "Freestyle Predicates",
"freestyle.functions" : "Freestyle Functions",
"freestyle.chainingiterators" : "Freestyle Chaining Iterators",
"freestyle.shaders" : "Freestyle Shaders",
"freestyle.utils" : "Freestyle Utilities",
}
for mod_name, mod_descr in importable_modules.items():
if mod_name not in EXCLUDE_MODULES:
module = __import__(mod_name,
@@ -1849,8 +1870,8 @@ def rna2sphinx(basepath):
# context
if "bpy.context" not in EXCLUDE_MODULES:
# one of a kind, context doc (uses ctypes to extract info!)
# doesn't work on mac
if PLATFORM != "darwin":
# doesn't work on mac and windows
if PLATFORM not in {"darwin", "windows"}:
pycontext2sphinx(basepath)
# internal modules

View File

@@ -3,6 +3,10 @@
# bash doc/python_api/sphinx_doc_gen.sh
# ssh upload means you need an account on the server
if [ "$1" == "" ] ; then
echo "Expected a single argument for the username on blender.org, aborting"
exit 1
fi
# ----------------------------------------------------------------------------
# Upload vars
@@ -16,9 +20,9 @@ DO_OUT_PDF=false
BLENDER="./blender.bin"
SSH_USER="ideasman42"
SSH_USER=$1
SSH_HOST=$SSH_USER"@blender.org"
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
SSH_UPLOAD="/data/www/vhosts/www.blender.org/api" # blender_python_api_VERSION, added after
# ----------------------------------------------------------------------------
# Blender Version & Info
@@ -26,13 +30,13 @@ SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api
# 'Blender 2.53 (sub 1) Build' --> '2_53_1' as a shell script.
# "_".join(str(v) for v in bpy.app.version)
# custom blender vars
blender_srcdir=$(dirname $0)/../../
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_version_char=$(grep BLENDER_VERSION_CHAR $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_srcdir=$(dirname -- $0)/../..
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
if [ "$blender_version_cycle" == "release" ] ; then
if [ "$blender_version_cycle" = "release" ] ; then
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
else
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion
@@ -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'
@@ -109,17 +113,17 @@ if $DO_UPLOAD ; then
ssh $SSH_USER@blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
# redirect for release only so wiki can point here
if [ "$blender_version_cycle" == "release" ] ; then
if [ "$blender_version_cycle" = "release" ] ; then
ssh $SSH_USER@blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/blender_python_api/index.html'
fi
if $DO_OUT_PDF ; then
# rename so local PDF has matching name.
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
rsync --progress -ave "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
fi
if $DO_OUT_HTML_ZIP ; then
rsync --progress -avze "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
rsync --progress -ave "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
fi
fi

View File

@@ -1,22 +1,22 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# #**** END GPL LICENSE BLOCK #****
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Contributor(s): Campbell Barton
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>

25
extern/CMakeLists.txt vendored
View File

@@ -47,7 +47,11 @@ if(WITH_BINRELOC)
endif()
if(NOT WITH_SYSTEM_GLEW)
add_subdirectory(glew)
if(WITH_GLEW_ES)
add_subdirectory(glew-es)
else()
add_subdirectory(glew)
endif()
endif()
if(WITH_GAMEENGINE)
@@ -70,12 +74,23 @@ if(WITH_LZMA)
add_subdirectory(lzma)
endif()
if(WITH_CYCLES OR WITH_COMPOSITOR)
add_subdirectory(clew)
add_subdirectory(cuew)
endif()
if(WITH_MOD_BOOLEAN)
add_subdirectory(carve)
endif()
if(WITH_GHOST_XDND)
if(UNIX AND NOT APPLE)
add_subdirectory(xdnd)
endif()
if(WITH_X11 AND WITH_GHOST_XDND)
add_subdirectory(xdnd)
endif()
if(WITH_GTESTS)
add_subdirectory(gtest)
endif()
if(WITH_SDL AND WITH_SDL_DYNLOAD)
add_subdirectory(sdlew)
endif()

View File

@@ -19,6 +19,12 @@
// defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization.
#include "src/Core/util/Macros.h"
// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3)
// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.
#if defined(__MINGW32__) && EIGEN_GNUC_AT_LEAST(4,6)
#pragma GCC optimize ("-fno-ipa-cp-clone")
#endif
#include <complex>
// this include file manages BLAS and MKL related macros
@@ -44,7 +50,7 @@
#endif
#else
// Remember that usage of defined() in a #define is undefined by the standard
#if (defined __SSE2__) && ( (!defined __GNUC__) || EIGEN_GNUC_AT_LEAST(4,2) )
#if (defined __SSE2__) && ( (!defined __GNUC__) || (defined __INTEL_COMPILER) || EIGEN_GNUC_AT_LEAST(4,2) )
#define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC
#endif
#endif
@@ -87,19 +93,25 @@
// so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too.
// notice that since these are C headers, the extern "C" is theoretically needed anyways.
extern "C" {
#include <emmintrin.h>
#include <xmmintrin.h>
#ifdef EIGEN_VECTORIZE_SSE3
#include <pmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSSE3
#include <tmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_1
#include <smmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_2
#include <nmmintrin.h>
// In theory we should only include immintrin.h and not the other *mmintrin.h header files directly.
// Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus:
#ifdef __INTEL_COMPILER
#include <immintrin.h>
#else
#include <emmintrin.h>
#include <xmmintrin.h>
#ifdef EIGEN_VECTORIZE_SSE3
#include <pmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSSE3
#include <tmmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_1
#include <smmintrin.h>
#endif
#ifdef EIGEN_VECTORIZE_SSE4_2
#include <nmmintrin.h>
#endif
#endif
} // end extern "C"
#elif defined __ALTIVEC__
@@ -236,15 +248,11 @@ using std::ptrdiff_t;
* \endcode
*/
/** \defgroup Support_modules Support modules [category]
* Category of modules which add support for external libraries.
*/
#include "src/Core/util/Constants.h"
#include "src/Core/util/ForwardDeclarations.h"
#include "src/Core/util/Meta.h"
#include "src/Core/util/XprHelper.h"
#include "src/Core/util/StaticAssert.h"
#include "src/Core/util/XprHelper.h"
#include "src/Core/util/Memory.h"
#include "src/Core/NumTraits.h"
@@ -297,6 +305,7 @@ using std::ptrdiff_t;
#include "src/Core/Map.h"
#include "src/Core/Block.h"
#include "src/Core/VectorBlock.h"
#include "src/Core/Ref.h"
#include "src/Core/Transpose.h"
#include "src/Core/DiagonalMatrix.h"
#include "src/Core/Diagonal.h"
@@ -330,6 +339,7 @@ using std::ptrdiff_t;
#include "src/Core/products/TriangularSolverMatrix.h"
#include "src/Core/products/TriangularSolverVector.h"
#include "src/Core/BandMatrix.h"
#include "src/Core/CoreIterators.h"
#include "src/Core/BooleanRedux.h"
#include "src/Core/Select.h"

View File

@@ -14,12 +14,25 @@
#error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header
#endif
#ifndef EIGEN_NO_EIGEN2_DEPRECATED_WARNING
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
#warning "Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)"
#else
#pragma message ("Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3. (Define EIGEN_NO_EIGEN2_DEPRECATED_WARNING to disable this warning)")
#endif
#endif // EIGEN_NO_EIGEN2_DEPRECATED_WARNING
#include "src/Core/util/DisableStupidWarnings.h"
/** \ingroup Support_modules
* \defgroup Eigen2Support_Module Eigen2 support module
* This module provides a couple of deprecated functions improving the compatibility with Eigen2.
*
* \warning Eigen2 support is deprecated in Eigen 3.2.x and it will be removed in Eigen 3.3.
*
* This module provides a couple of deprecated functions improving the compatibility with Eigen2.
*
* To use it, define EIGEN2_SUPPORT before including any Eigen header
* \code
* #define EIGEN2_SUPPORT

View File

@@ -33,6 +33,8 @@
#include "src/Eigenvalues/HessenbergDecomposition.h"
#include "src/Eigenvalues/ComplexSchur.h"
#include "src/Eigenvalues/ComplexEigenSolver.h"
#include "src/Eigenvalues/RealQZ.h"
#include "src/Eigenvalues/GeneralizedEigenSolver.h"
#include "src/Eigenvalues/MatrixBaseEigenvalues.h"
#ifdef EIGEN_USE_LAPACKE
#include "src/Eigenvalues/RealSchur_MKL.h"

Some files were not shown because too many files have changed in this diff Show More