Commit Graph

539 Commits

Author SHA1 Message Date
Campbell Barton
e48c4d73d3 Replace MFace with looptri for dynamicpaint
D1429 by @lichtwerk, with edits
2015-07-27 16:01:56 +10:00
Sergey Sharybin
3d36489672 OpenSubdiv: Commit of OpenSubdiv integration into Blender
This commit contains all the remained parts needed for initial integration of
OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU
backends which works in the following way:

- When SubSurf modifier is the last in the modifiers stack then GPU pipeline
  of OpenSubdiv is used, making viewport performance as fast as possible.

  This also requires graphscard with GLSL 1.5 support. If this requirement is
  not met, then no GPU pipeline is used at all.

- If SubSurf is not a last modifier or if DerivesMesh is being evaluated for
  rendering then CPU limit evaluation API from OpenSubdiv is used. This only
  replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG
  structures exactly the same as they used to be for ages now.

This integration is fully covered with ifdef and not enabled by default
because there are several TODOs to be solved first:

- Face varying data interpolation is not really cleanly implemented for GPU
  in OpenSubdiv 3.0. It is also not implemented for limit evaluation API.

  This basically means we'll have really hard time supporting UVs.

- Limit evaluation only works with adaptivly subdivided meshes so far, which
  basically means all the points of CCG are pushed to the limit. This gives
  different result from old code.

- There are some serious optimizations possible on the topology refiner
  creation, which would speed up initial OpenSubdiv mesh creation.

- There are some hardcoded asumptions in the GPU and DerivedMesh areas which
  could be generalized.

  That's something where Antony and Campbell can help, making it so the code
  is structured in a way which is reusable by all planned viewport projects.

- There are also some workarounds in the dependency graph to make sure OpenGL
  buffers are only freed from the main thread.

Those who'll be wanting to make experiments with this code should grab dev
branch (NOT master) from

  https://github.com/Nazg-Gul/OpenSubdiv/tree/dev

There are some patches applied in there which we're working on on getting
into upstream.
2015-07-20 22:29:26 +02:00
Sergey Sharybin
2f15a1f66e Point density: Add utility function to sample density outside of render pipeline
Not currently used, it's a preparation for the further work.

Should not be functional changes.
2015-07-18 21:42:39 +02:00
Antony Riakiotakis
13c39e90b3 VBO offscreen selection drawing, cdderivedmesh
Get rid of legacy drawing, it's only used for selection,
    in which case we can prepare a temporary color buffer and draw
    at once. Code is not complete here because we still redundantly
    set the draw color in the draw function and don't ommit hidden
    faces automatically. Still it works 100% without immediate mode
    now.
2015-07-15 18:50:02 +02:00
Alexander Romanov
38940662e5 Particle Info node support for GLSL mode and the internal render.
With this patch "Particle Info" node from Cycles works in GLSL and BI

Alexander (Blend4Web Team)

Reviewers: psy-fi
Note: moved particle info to object render instance instead of
shadeinput during review - Antony.

Differential Revision: https://developer.blender.org/D1313
2015-07-14 18:52:29 +02:00
Bastien Montagne
582e7a6347 Add a skeleton of C API for Eigen3.
Title says pretty much everything. For now, only thing available is a solver of eigen
values/vectors for self-adjoint matrices.

We can easily add more when needed.

Thanks to Sergey and Campbell for quick review.
2015-07-13 18:05:38 +02:00
Campbell Barton
0119539e4b Add icon scale argument for ui-template-previews 2015-07-14 01:46:25 +10:00
Bastien Montagne
d3109a1937 BPlayer compile fix © 2015-07-01 12:34:04 +02:00
Porteries Tristan
a1ac42f5eb Fix (d4e5df) blenderplayer compiling.
dfelinto is the second time that you forgot to modify bad_level_call_stubs/stubs.c. Please compile with the blenderplayer to see the error.
2015-06-13 20:23:48 +02:00
Ines Almeida
78250f1d1d IconView template: adding optional labels to popup buttons 2015-05-23 16:21:05 +01:00
Porteries Tristan
192fddb324 BGE: Fix blenderplayer bad call stubs not updated.
Please (dfelinto) compile the bge to avoid these kind of problems.
2015-05-18 18:54:13 +02:00
Sergey Sharybin
bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
Campbell Barton
a077be3658 Cleanup: use r_* prefix for return args 2015-05-08 07:25:39 +10:00
Sergey Sharybin
d04ba6d562 Remove unused stubs
Noticed by TristanPorteries in IRC.
2015-04-29 21:47:30 +05:00
Bastien Montagne
fa0f936a64 Fix BPlayer (c) 2015-04-17 16:03:14 +02:00
Dalai Felinto
d5f1b9c222 Multi-View and Stereo 3D
Official Documentation:
http://www.blender.org/manual/render/workflows/multiview.html

Implemented Features
====================
Builtin Stereo Camera
* Convergence Mode
* Interocular Distance
* Convergence Distance
* Pivot Mode

Viewport
* Cameras
* Plane
* Volume

Compositor
* View Switch Node
* Image Node Multi-View OpenEXR support

Sequencer
* Image/Movie Strips 'Use Multiview'

UV/Image Editor
* Option to see Multi-View images in Stereo-3D or its individual images
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

I/O
* Save/Open Multi-View (OpenEXR, Stereo3D, individual views) images

Scene Render Views
* Ability to have an arbitrary number of views in the scene

Missing Bits
============
First rule of Multi-View bug report: If something is not working as it should *when Views is off* this is a severe bug, do mention this in the report.

Second rule is, if something works *when Views is off* but doesn't (or crashes) when *Views is on*, this is a important bug. Do mention this in the report.

Everything else is likely small todos, and may wait until we are sure none of the above is happening.

Apart from that there are those known issues:
* Compositor Image Node poorly working for Multi-View OpenEXR
(this was working prefectly before the 'Use Multi-View' functionality)
* Selecting camera from Multi-View when looking from camera is problematic
* Animation Playback (ctrl+F11) doesn't support stereo formats
* Wrong filepath when trying to play back animated scene
* Viewport Rendering doesn't support Multi-View
* Overscan Rendering
* Fullscreen display modes need to warn the user
* Object copy should be aware of views suffix

Acknowledgments
===============
* Francesco Siddi for the help with the original feature specs and design
* Brecht Van Lommel for the original review of the code and design early on
* Blender Foundation for the Development Fund to support the project wrap up

Final patch reviewers:
* Antony Riakiotakis (psy-fi)
* Campbell Barton (ideasman42)
* Julian Eisel (Severin)
* Sergey Sharybin (nazgul)
* Thomas Dinged (dingto)

Code contributors of the original branch in github:
* Alexey Akishin
* Gabriel Caraballo
2015-04-06 10:40:12 -03:00
Sergey Sharybin
93048873f1 Fix compilation error of blenderplayer after recent constraint commit 2015-03-19 19:10:40 +05:00
Sergey Sharybin
2ef2f085fb Add an option to mesh.calc_tessface() to get rid of polygons and loops
The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.

This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.

Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().

However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.

In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1125
2015-03-13 17:39:21 +05:00
Bastien Montagne
9e2abbc9ba FileBrowser: Editable Bookmarks.
Bookmarks are now editable (i.e. you can rename them, and reorder them).
They are also listed in regular UILists, so you can filter/sort them as usual too.

Also, FileBrowser 'T' side area is changed to something similar to 3DView one,
in this case because we need op panel to remain at the bottom, and later because
we'll more than likely need tabs here!

Thanks to Campbell and Sergey for reviews.

Differential Revision: https://developer.blender.org/D1093
2015-02-11 00:09:45 +01:00
Bastien Montagne
4f1e387588 UI: add optional tip callback to uiBut, and use it for per-item tooltips in UIList.
When defined, uiBut->tip_func is called when button's tip is generated. This allows
for advanced, dynamic generation of tooltips.

For now, only used by UIList, which can now optionaly use a given string property
of each item for its tooltip.

Thanks to Campbell for the reviews!
2015-02-11 00:07:09 +01:00
Bastien Montagne
2d86f58e0f And one more infamous BPlayer Fix (tm).
Seriously, please build complete Blender when you change some public func signature...
2015-01-27 16:28:54 +01:00
Sergey Sharybin
c2a7f26cbc Add missing stub to the player, so buildbot keeps delivering gooseberry builds 2015-01-20 09:30:10 +01:00
Lukas Tönne
3b938f3d7f Fix for missing library linking in blenderplayer. 2015-01-20 09:30:08 +01:00
Bastien Montagne
1187b98d48 Fix T43174: "Record animation" does not update fcurve handles
`INSERT_FAST` implies you call `calchandles_fcurve()` at the end...
For now, since we do not store edited FCurves nor can we get them easily
(requires RNA...), just update handles of all fcurves, it's much more
performant than removing usage of `INSERT_FAST` anyway.
2015-01-09 15:29:47 +01:00
Martin Felke
e0e9cd0163 PyAPI: Call to get the pixel x,y in a text block
This allows scripts to request the screen location of any (line, column) pair.
2015-01-08 01:22:11 +11:00
Antony Riakiotakis
19eb700fef Fix blenderplayer compilation (tm) 2014-12-11 20:34:53 +01:00
Jens Verwiebe
871cf70144 Fix playercompile after ecc03c8ed 2014-12-05 18:51:19 +01:00
Campbell Barton
b00a943fe8 UI: avoid property lookup for uiItemMenuEnumR 2014-11-24 21:05:47 +01:00
Bastien Montagne
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
Jens Verwiebe
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
Bastien Montagne
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
Sergey Sharybin
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
Martijn Berger
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
Antony Riakiotakis
72aa0ebe6a Fix cmake install of blenderplayer for linux. 2014-11-13 13:37:27 +01:00
Campbell Barton
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
Campbell Barton
26b5fb8f58 Correct stub 2014-10-29 17:27:32 +01:00
Jens Verwiebe
485293647f Player: fix conflicting type introduced in 2f0bdcb306999 2014-10-28 21:39:54 +01:00
Campbell Barton
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
Campbell Barton
cb7afe5e41 WM: unneeded alloc the operator-type iterator 2014-10-28 15:41:05 +01:00
Antony Riakiotakis
928be3013a Classic blenderplayer fix + small optimization 2014-10-09 16:05:00 +02:00
Bastien Montagne
8f1cdc1949 Fix bplayer linking after recent addition of glew_mx. 2014-10-07 23:28:28 +02:00
Jason Wilkins
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
Bastien Montagne
b4860de6f1 One more bplayer infamous stub fix! 2014-10-06 20:28:21 +02:00
Bastien Montagne
69356b0b9b Fix freestyle/bplayer build (usual stub stuff). 2014-10-02 12:47:05 +02:00
Campbell Barton
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
Antony Riakiotakis
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
Sergey Sharybin
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
Bastien Montagne
5e3af04b08 Fix build player... 2014-07-31 17:34:13 +02:00
Antony Riakiotakis
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
Antony Riakiotakis
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