Commit Graph

3425 Commits

Author SHA1 Message Date
Bastien Montagne
fd6ab0564d This should at least prevent crash in [#35172]... 2013-05-01 17:11:07 +00:00
Lukas Toenne
8843eb9063 Fix for bug reported by Thomas Dinges on IRC: OSL script node was not initializing the data_type variable for shader sockets and so tried to set a non-existing float RNA property, leading to failed assert. 2013-05-01 13:28:44 +00:00
Brecht Van Lommel
aa2a0e4ab0 More build fixes for visual studio 2012.
Patch #35019, #35131 and #35152 by Jurgen Herrmann.
2013-04-29 19:15:56 +00:00
Thomas Dinges
b13ef55973 Cycles / SCons:
* Fast math compiler flag was set for Cycles, but not OSL.
2013-04-29 15:52:38 +00:00
Sergey Sharybin
b1b5274549 Tweak allocation vars for XYZ space for more accurate GPU transform
Also extend 3DLUT edge size to 64 (1 meg of memory) to increase
transform accuracy as well.
2013-04-29 10:53:10 +00:00
Bastien Montagne
428debd9c8 Fix for "new" Cycles handling of textures, UI code assumed all texture users use "texture" as prop name, but at least WeightVG modifiers do not.
Fixed by adding a "texture_user_property" member to spacebuts' context, and using it to get the prop identifier in ui script.

Thanks to Brecht for its advice!
2013-04-28 15:20:52 +00:00
Brecht Van Lommel
8cd455f9b4 Fix #35121: cycles 3D viewport render pause button not working during render. 2013-04-28 12:31:24 +00:00
Ton Roosendaal
753fe9f0b9 Keeping my commit count high!
Previous GLSL code had error, the if() statement had to be negated.
2013-04-28 11:05:49 +00:00
Ton Roosendaal
eae651db3a GLSL display of float buffers with alpha:
Previous version worked, now a version with simplifying this GLSL code.
2013-04-28 11:03:01 +00:00
Ton Roosendaal
e355abebee This glsl shader works for OCIO with alpha. OSX iMac with ATI.
There's no logical reason I can find... but I commit it because many others have
the same error, so we can check.
2013-04-28 10:46:18 +00:00
Sergey Sharybin
69b0b0a624 Fix for fix in alpha de-premul
We do not need to premul shader result, opengl
is already configured for straight alpha.
2013-04-27 17:50:11 +00:00
Sergey Sharybin
6a04ff11af Premultiplication in OCIO shader went wrong,
it used to apply alpha on source color after
conversion, not on result.
2013-04-27 17:08:37 +00:00
Sergey Sharybin
d376a1b740 Apparently better not to use values like 1.0f in GLSL code
Fix from debug session of self and Ton, was affecting OSX
builds, making GLSL display transform not working on this
platform.
2013-04-27 16:43:15 +00:00
Sergey Sharybin
514e322895 Print error log to the console if OCIO shader compilation failed 2013-04-27 16:34:56 +00:00
Brecht Van Lommel
ac849f98f5 Fix #35102: crash with experimental cycles displacement feature due to
uninitialized memory usage.
2013-04-27 02:54:24 +00:00
Brecht Van Lommel
48a6fe86ca Fix #34172: cycles BVH build crashing in some rare circumstances on 32 bit linux.
The problem was (again) the x86 extended precision float register being used for
one float value while the other was rounded to lower precision. This caused the
strictly weak order requirement for std::sort to be broken.
2013-04-26 02:18:29 +00:00
Sergej Reich
3d1b24af00 rigidbody: Code cleanup
Remove outdated comment.
2013-04-25 19:50:51 +00:00
Brecht Van Lommel
811587ce32 Fix #35077: cycles incorrectly rendered an empty with dupligroup that was
dupliverted by its parent.
2013-04-25 14:16:24 +00:00
Francisco De La Cruz
70de23dabb Fix #29932 Left Shift + Numpad 1,2,3 not Aligning to Active
Intermediate Shift+Key messages were resetting modifier flags.
2013-04-25 05:32:32 +00:00
Brecht Van Lommel
18b1ab1598 Fix #34714: cycles viewport render would restart when minimizing and unminimizing
a maximized Blender window in Ubuntu Unity. The window size would slightly change
as part of the unminimize effect.

Now cycles waits 0.2 seconds before restarting rendering after a viewport resize,
also a bit less flickery when changing the 3d view size in Blender itself.
2013-04-24 20:12:12 +00:00
Brecht Van Lommel
dee74c299f Attempt to fix #35041 and #34725: cycles crash with OSL and both a 3D viewport
and preview running at the same time.

It seems there's something in OSL/LLVM that's not thread safe, but I couldn't
figure out what exactly. Now all renders share the same OSL ShadingSystem which
should avoid the problem.
2013-04-22 14:27:12 +00:00
Sergej Reich
ed19108891 rigidbody: Add function to perform convex sweep test
This is a experimental collision detection function, so the API might
change in the future.

Note: The simulation needs to be stepped before this function can be
used, otherwise the rigid body world might not be valid.

Patch [#34989]  Bullet Convex sweep test API
by Vilem Novak (pildanovak), thanks!
2013-04-21 19:53:40 +00:00
Alexander Kuznetsov
b0f8ece9d9 Forgot disable else and it became: else /* */ break;
Caused a crash on Windows on alt-key when a tablet was plug in.
2013-04-20 16:14:31 +00:00
Sergey Sharybin
349b71fd02 Bring back support of FFmpeg >= 0.7
After planar codecs support minimal FFmpeg was
bumped to 0.10 which was not so much nice because
it was only released only later last year.

Didn't find a way to make compatibility code local
in ffmpeg_compat, so there're some ifdefs in
audaspace and writeffmpeg.

Not entirely happy, but having a bit of ifdefs in
code better than lots of real PITA for platform
maintainers.
2013-04-19 17:23:08 +00:00
Alexander Kuznetsov
177080a15d Disabling live resize for Windows for now.
Bug #34990

However, cleanscreen on redraw is still disabled, so when resizing blender will have frozen image.
2013-04-18 13:30:41 +00:00
Antony Riakiotakis
a34acd0de4 Beware of SUBSURAFACES (sounds latin) 2013-04-18 12:40:04 +00:00
Brecht Van Lommel
ed1a08382f Cycles: code refactoring to deduplicate the various BVH traversal variations.
Now there is a single BVH traversal code with #ifdefs for various features.
At runtime it will then select the appropriate variation to use depending if
instancing, hair or motion blur is in use.

This makes scenes without hair render a bit faster, especially after the
minimum width feature was added. It's not the most beautiful code, but we can't
use c++ templates and there were already 4 copies, adding 4 more to handle the
hair case separately would be too much.
2013-04-17 20:07:22 +00:00
Brecht Van Lommel
45552a4595 Cycles: initialize LCG for sss and hair sampling without using the sobol sampler,
slightly faster but also fixes the u/v sampling dimensions not longer being at even
values which is needed for best results.
2013-04-17 14:48:01 +00:00
Brecht Van Lommel
cf0e457e52 Fix #35004: fireflies with .tif image in cycles, try to avoid extreme values when
openimageio can't detect premul/straight alpha correct.
2013-04-17 14:47:58 +00:00
Stuart Broadfoot
8c246ddb99 Cycles Hair: Corrected own stochastic hair rng mistake and removed an unnecessary padding variable
- Corrected the Sobol dimension and removed a pad variable in Curve Struct.
2013-04-17 11:27:56 +00:00
Brecht Van Lommel
c9fc3874d6 Cycles: when render layers have per layer number of samples set, the Sampling
panel now has an option to specify how to use them. There's three options:

* Use: render layer samples override scene samples
* Bounded: bound render layer samples by scene samples
* Ignore: ignore render layer sample settings
2013-04-16 16:18:14 +00:00
Brecht Van Lommel
18feb1630d Fix #34966: cycles packed PNG images were showing alpha fringe, packed images
were not properly premultiplied.
2013-04-16 13:52:38 +00:00
Campbell Barton
a120049c3b use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions. 2013-04-16 09:04:34 +00:00
Campbell Barton
d044fd3299 update uncrustify config, use floats for FloatProperty() min/max 2013-04-16 03:27:51 +00:00
Antony Riakiotakis
e93f00d73d Compile fixes for recent commits 2013-04-16 00:56:24 +00:00
Stuart Broadfoot
638b084f82 Cycles Hair: Strand Minimum Pixel Size
Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays.

The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.
2013-04-15 21:38:31 +00:00
Sergey Sharybin
427f56f1f0 Fix compilation with current FFmpeg trunk
AVCODEC_MAX_AUDIO_FRAME_SIZE was deprecated and
finally removed from current trunk.

Initial patch by Lawrence D'Oliveiro (ldo) with
own modification, Thanks!
2013-04-15 11:08:02 +00:00
Thomas Dinges
77a78658ea Cycles / Non-Progressive integrator:
* Subsurface samples were not taken into account for the Sobol directions table.
2013-04-14 19:22:12 +00:00
Peter Schlaile
1166609cd3 == FFMPEG / Canon DSLR footage workaround ==
The latest ffmpeg versions include a workaround to deal with a certain
pecularity in Canon DSLR footage: instead of decoding pictures with the
proper resolution of 1920x1080 they decode it with 1920x1088 and add a
black bar at the bottom.

Needless to say, that this screws up things in a lot of areas within blender
(proxy indices, mask animations etc.)

Since all blender versions besides Linux x86 32bit seem still to include
older ffmpeg versions which still contain this bug, this patch adds
a workaround for older versions until we have all versions on all platforms
up to date.

See also: http://git.libav.org/?p=libav.git;a=commit;h=30f515091c323da59c0f1b533703dedca2f4b95d
2013-04-14 13:44:04 +00:00
Antony Riakiotakis
15f3bbfe9e Fix some compilation errors for MinGW. Thanks to vildas on irc for
bringing this to attention.
2013-04-13 16:29:18 +00:00
Thomas Dinges
6f9495fc29 Fix for [#34968] Cross compiling from linux for windows is broken
* Patch by Martijn Berger (juicyfruit).
2013-04-13 09:28:07 +00:00
Sergey Sharybin
6569ab813f Fix for material icon rendering with cycles
Materials icons used to miss transparent background
and were using world environment which didn't give
so nice results.

Reviewed by Brecht, thanks!
2013-04-11 12:49:57 +00:00
Lukas Toenne
549fa84afa Fix #34948, bug in Cycles node groups. The proxy node maps used to identify external connections of node group nodes were having name clashes with input/output sockets of the same name, leading to invalid cyclic connections in the cycles shader graph that were subsequently removed (prints warnings in terminal). Solution is to use two separate maps for inputs and outputs so group node sockets can safely use the same identifier. 2013-04-11 09:16:36 +00:00
Campbell Barton
ece766ee7e code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin(). 2013-04-10 23:52:07 +00:00
Jens Verwiebe
b9b23d697b Fluid threads: re-add an erratically forgotten line, fix typo, set default threadcount to logical threadcount of machine 2013-04-10 23:19:57 +00:00
Jens Verwiebe
5ac66ee378 Fluid threads: add a restore to former omp threadcount when baking is done, todo: default should be logical corecount 2013-04-10 23:10:25 +00:00
Campbell Barton
8c1cb10cfd code cleanup: unused vars, make other vars static. 2013-04-10 22:49:50 +00:00
Jens Verwiebe
842d0a4258 The fluid threads setting is still WIP, for now fix compiling without openMP enabled 2013-04-10 20:05:11 +00:00
Jens Verwiebe
cbe9ae244e Add a gui control for setting omp threads in fluids 2013-04-10 18:35:18 +00:00
Brecht Van Lommel
34707c19f2 Fix 34764: cycles issue rendering instanced mesh with NaN coordinates. 2013-04-09 20:48:53 +00:00
Jens Verwiebe
84ba3f6521 Fix scons compile after GHOST_Sizer commit 2013-04-09 18:58:01 +00:00
Alexander Kuznetsov
f652b11ed1 Live window resizing on Windows
Custom implementation for resizing (GHOST_SizerWin32)

Some things still don't work:
* esc cancel
* max windows size
* aero (sizing) snap on win7

hbrBackground = 0 to disable clear screen.

Thanks to dfelinto for help in finding of root cause.
2013-04-09 17:21:05 +00:00
Brecht Van Lommel
e802efb7af Fix #34740: cycles rendering issue mixing glossy/glass BSDF's with zero or very
low roughness and same index of refraction.

Problem was bad float precision due to low roughness, which caused the pdf for
the different closures to not match properly.
2013-04-09 15:24:20 +00:00
Brecht Van Lommel
7cb4d78b52 Fix #34921: cycles rendered a specific scene with a small high poly object
contained in a large low poly object very slow, due to failure case of fast
multithread BVH binning. Tweaked parameter now to avoid this.
2013-04-08 20:04:03 +00:00
Campbell Barton
a4520320ef fix [#34900] Building blender as a python module is broken in trunk
patch provided by reporter - Martijn Berger (juicyfruit)

also quiet warnings for headless mode.
2013-04-08 05:01:35 +00:00
Thomas Dinges
68fc443194 Cycles UI:
* Revert ui.py changes from r55868, I merged that over manually with tweaks in r55858.
2013-04-07 08:42:08 +00:00
Tamito Kajiyama
4c42f5c8a9 Missing updates in the doc/ and intern/ folders during the merger in revision 55847. 2013-04-07 06:56:49 +00:00
Campbell Barton
63d523336f freestyle lineset tag attribute was defined but not used, also some code cleanup. 2013-04-07 01:38:03 +00:00
Thomas Dinges
9c117ba54e Properties Editor / Render Layers:
* Cycles Render layers UI was broken after freestyle merge (changes were not merged). Did manual edits now with some tweaks.
* Some layout fixes for Mask Layer.
2013-04-06 23:05:32 +00:00
Gaia Clary
92b6365e21 fix: #34871 Cycles/CUDA/sm_35: Build problems probably due to issues with float3 operators (on windows?) 2013-04-06 11:52:40 +00:00
Brecht Van Lommel
cf3ec257a2 Fix #34880: cycles motion blur render issue with some compilers. Actually is a bigger
problem where accessing float4 members with [] stops working due to optimizer, will
check that later.
2013-04-05 23:03:10 +00:00
Brecht Van Lommel
7404c1a553 Fix another part of #34877: cycles progress status text not showing correct with
per render layer samples in addition to the progress bar.

Also fixed job progress bar not working at all on high DPI / retina, was so small
the actual progress was not visible.
2013-04-05 17:57:26 +00:00
Thomas Dinges
5e0cdd6473 Code cleanup / Cycles / Object Attributes:
* Change some long "else if" conditions into switch case.
2013-04-05 17:03:59 +00:00
Sergey Sharybin
394a45a645 Fix #34877: The render status feedback (progress bar) does not take into account specific Renderlayer samples 2013-04-05 16:59:19 +00:00
Brecht Van Lommel
3863e72c73 Fix #34679: cycles image texture alpha fringes. New rule is now that color output
will not give straight RGB values if the alpha output is used, so that mixing with
a transparent BSDF gives the correct result.
2013-04-05 16:43:53 +00:00
Sergey Sharybin
e579400d92 Fixed typo in OCIO GLSL module, was using address to a pointer.. 2013-04-05 11:10:59 +00:00
Sergey Sharybin
a53a106065 Fix #34872: Every images are displayed as black in UV/image editor
Issue was caused by some mesa drivers does not support GL_RGBA16F.

Now added check around glTexImage2D to verify whether requested
internal format is actually supported. If not blender will fall
back to non-GLSL image display.
2013-04-05 11:01:35 +00:00
Brecht Van Lommel
54363910bc Attempt to fix #34871: random CUDA 3.5 compile failure due to recent change. 2013-04-04 23:52:33 +00:00
Brecht Van Lommel
c77f46d2dd Fix #34601: cycles OSL crash when using preview render and viewport render at
the same time, due to shared texture cache system.
2013-04-04 23:48:07 +00:00
Brecht Van Lommel
4c8e70d049 Fix #34700: orthographic camera DOF was still not working correct. 2013-04-03 17:32:30 +00:00
Brecht Van Lommel
743552ff2a Fix #34852: multilayer SSS material rendering different in progressive and
non-progressive integrator.
2013-04-03 16:12:13 +00:00
Sergey Sharybin
9c49e71216 Bunch of fixes for GLSL display transform
- GLSL shader wasn't aware of alpha predivide option,
  always assuming alpha is straight. Gave wrong results
  when displaying transparent float buffers.

- GLSL display wasn't aware of float buffers with number
  of channels different from 4, crashing when trying to
  display image with different number of channels.

  This required a bit larger changes, namely now it's
  possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
  to glaDrawPixelsTex, This also implied adding format to
  glaDrawPixelsAuto and modifying all places where this
  functions are called.

  Now GLSL will handle both 3 and 4 channels buffers,
  single channel images are handled by CPU.

- Replaced hack for render result displaying with a bit
  different hack.

  Namely CPU conversion will happen only during render,
  once render is done GLSL would be used for displaying
  render result on a screen.

  This is so because of the way renderer updates parts
  of the image -- it happens without respect to active
  render layer in image user. This is harmless because
  only display buffer is modifying, but this is tricky
  because we don't have original buffer opened during
  rendering.

  One more related fix here was about when rendering
  multiple layers, wrong image would be displaying when
  rendering is done. Added a signal to invalidate
  display buffer once rendering is done (only happens
  when using multiple layers). This solves issue with
  wrong buffer stuck on the display when using regular
  CPU display space transform and if GLSL is available
  it'll make image displayed with a GLSL shader.

- As an additional change, byte buffers now also uses
  GLSL display transform.

  So now only dutehr and RGB curves are stoppers for
  using GLSL for all kind of display transforms.
2013-04-03 15:59:54 +00:00
Brecht Van Lommel
9cd197cd82 Fix incorrect OS X warning message in console when using multisample antialiasing
about number of samples not matching the requested number.
2013-04-02 19:18:38 +00:00
Sergey Sharybin
f871d9a82f Fixes for recent GLSL display space conversions
- Building without OCIO will give correct results again
- If GLSL failed to compile, fallback to glaDrawPixelsAuto
  will happen.
2013-04-02 17:28:29 +00:00
Brecht Van Lommel
5c74e6dae2 Cycles: small code cleanup + fix SSS closure mixed with other closures doing
a bit too much work.
2013-04-02 16:37:28 +00:00
Brecht Van Lommel
be1a5a2328 Fix 34831: SSS issue with non-progressive render, due to error in closure merging code. 2013-04-02 15:53:24 +00:00
Joerg Mueller
97ce56dc76 Bugfix for [#34845] FFmpeg: .wav file playback crashes Blender since r55693 2013-04-02 15:48:09 +00:00
Brecht Van Lommel
952f03150f Fix #34832: SSS render freeze with object instances. 2013-04-02 14:19:05 +00:00
Brecht Van Lommel
5ac6e1ae84 Fix #34833: crash using SSS node on windows, invalid memory access when building lookup table. 2013-04-02 13:34:50 +00:00
Antony Riakiotakis
d067ba9cbc Fix build for MinGW without opencollada (updated libs coming soon), MinGW64 now builds with opencollada 2013-04-02 02:05:03 +00:00
Brecht Van Lommel
07d027b102 Fix FFMPEG build error with older versions after planar formats commit. 2013-04-01 20:51:52 +00:00
Brecht Van Lommel
de9dffc61e Cycles: initial subsurface multiple scattering support. It's not working as
well as I would like, but it works, just add a subsurface scattering node and
you can use it like any other BSDF.

It is using fully raytraced sampling compatible with progressive rendering
and other more advanced rendering algorithms we might used in the future, and
it uses no extra memory so it's suitable for complex scenes.

Disadvantage is that it can be quite noisy and slow. Two limitations that will
be solved are that it does not work with bump mapping yet, and that the falloff
function used is a simple cubic function, it's not using the real BSSRDF
falloff function yet.

The node has a color input, along with a scattering radius for each RGB color
channel along with an overall scale factor for the radii.

There is also no GPU support yet, will test if I can get that working later.

Node Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF

Implementation notes:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering
2013-04-01 20:26:52 +00:00
Brecht Van Lommel
40b05d364e Cycles: code refactoring to add generic lookup table memory. 2013-04-01 20:26:43 +00:00
Sergey Sharybin
03c337f61c Epic fail in original GLSL display transform commit
Apparently C== allowed to have implementations of
OCIOImpl::setupGLSLDraw, OCIOImpl::finishGLSLDraw and
OCIOImpl::freeGLState in two different files.

STUPID!
2013-04-01 13:41:45 +00:00
Sergey Sharybin
547342bf73 Hopefully compilation with FFmpeg 0.10 works fine now. 2013-04-01 10:53:29 +00:00
Joerg Mueller
271a7a5554 Audaspace: adding support for ffmpeg planar formats, breaks support for older ffmpeg versions. 2013-04-01 09:46:35 +00:00
Thomas Dinges
2c58e96685 Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected. 
This way we save some render time for complex node graphs. 

Example: http://www.pasteall.org/pic/show.php?id=48226
Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this. 

This only affects SVM, OSL was already doing these optimizations.
2013-03-31 01:18:10 +00:00
Daniel Genrich
68ac08681a Elbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems 2013-03-30 20:50:28 +00:00
Thomas Dinges
96c2647676 Compile fix for recent OCIO commit, missing GLEW include. 2013-03-29 16:17:22 +00:00
Sergey Sharybin
2dff7c01ad Implement GPU-side display transform for clip editor
Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:

- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
  transformation for a giver processor.

  This function compiles and links shader, sets  up it's
  argument. After this transformation would be applied
  on an image displaying as a 2D texture.

  So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
  do a proper color space transform.

- OCIO_finishGLSLDraw restores OpenGL context after all
  color-managed display is over.

- OCIO_freeOGLState frees allocated state structure used
  for cacheing some GLSL-related stuff.

There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.

Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.

Known issues:
- Texture buffer and GLSL are no longer checking for
  video card capabilities, possibly could lead to some
  artifacts on crappy drivers/cards.

- Only float buffers are displaying using GLSL, byte
  buffers will still use fallback display method.

  This is to be addressed later.

- If RGB curves are used as a part of display transform,
  GLSL display will also be disabled. This is also thing
  to be solved later.

Additional changes:

- glaDrawPixelsTexScaled will now use RGBA16F as an
  internal format of storing textures when it's used
  to draw float buffer. This is needed so LUT are
  applied without precision loss.
2013-03-29 16:02:27 +00:00
Campbell Barton
1777a69818 misc minor edits.
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
2013-03-29 06:25:22 +00:00
Campbell Barton
10b4a86dbf code cleanup: quiet warnings building with mingw. 2013-03-29 00:50:52 +00:00
Campbell Barton
8e3d590b76 code cleanup: python/pep8 and double-promotion warnings. 2013-03-28 19:33:14 +00:00
Campbell Barton
d15d78a33a style cleanup: osl and NULL pointer use, also correct sequencer gap operator id's 2013-03-27 20:27:07 +00:00
Thomas Dinges
535253cad0 Cycles / SunSky:
* Use already calculated theta^2 for theta^3 calculation.
2013-03-27 19:44:25 +00:00
Thomas Dinges
bf2c46f5bd Code cleanup / Cycles:
* Remove unused variable from noise_wave().
2013-03-27 19:08:29 +00:00
Sergey Sharybin
31eee77a45 Fix #33518: Jack sync doesn't work in 2.64, 2.64 or 2.65 stable versions
Added new build option WITH_JACK_DYNLOAD for CMake and
WITH_BF_JACK_DYNLOAD for SCons, which means there'll be
no build-time linking against libjack and getting symbols
from libjack will happen runtime using dlopen and dlsym
tricks.

Alternative would be to use weak linking, but it'll require
having wrapper for preloading libjack.

This new options are disabled by default and they only
intended to be used on linux. Other platforms shall not
be using this and there shall be no functional changes
on non-linux platforms at all.
2013-03-27 07:19:54 +00:00
Daniel Genrich
2cd0f0d2fe Bugfix [#34749] Fluid domain > 10GB crashes Blender - out of memory
I am unsure if I did catch all problematic code but I ran out of memorybefore the sim started ;)
2013-03-25 11:11:49 +00:00
Campbell Barton
e1a54214bb code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
Ton Roosendaal
70702f78b5 OS X Fullscreen: shortcut now is CTRL + Cmd + F. Is more common, and it keeps
Cmd + F for searches.
2013-03-24 14:56:03 +00:00
Thomas Dinges
c4ae6f2c36 Fix for [#34747] Rendering invisible tiles
* reset_session() was not taking render percentage into account in case persistent_data was enabled.
* also deprecate old "maximsize" DNA variable.
2013-03-24 10:52:20 +00:00
Campbell Barton
0bc791a34f Unix/X11 - use RGBA icon (netwm icon), rather then pixmap icon. 2013-03-24 06:23:15 +00:00
Lukas Toenne
e2baf49d79 Fix for cycles group node bug, reported on IRC: Group nodes input proxies did not get their correct default value set. Forgot to add this during r55440 ... 2013-03-23 16:45:38 +00:00
Ton Roosendaal
c79b923c1d Bug fix 34743
Mac OS X full screen: the old option to go full screen now didn't hide the
dock/topbar anymore. Also made it use dock auto-hide now, not permanent hide.
2013-03-23 16:08:02 +00:00
Thomas Dinges
349c5ecc95 Cycles:
* Avoid an unnecessary condition in light.cpp, (totarea > 0.0f) is always true inside the "if(kintegrator->use_direct_light)" branch.
2013-03-23 10:11:29 +00:00
Thomas Dinges
5cbc000f05 Cycles:
* Move OpenGL settings out of the film panel into its own. 

Imho these should go completely elsewhere, but better separated than mixed with Cycles settings.
2013-03-23 07:09:04 +00:00
Jens Verwiebe
a333ef0100 GHOST_Cocoa, let new fullscreen also appear on 10.6 deployed builds 2013-03-22 23:48:26 +00:00
Campbell Barton
ee6fe984ff fix for buffer out-of-bounds reading for STR_String comparisons with char arrays. 2013-03-22 21:26:59 +00:00
Ton Roosendaal
6690d2abdd OSX feature:
Blender now supports the 10.7+ "Full screen" mode, which pushes a window to a permanent
other "screen", with animated zoom and sliding.

Available via the icon in window header (right), Apple+F, or "Window" menu in top.

Works much nicer than Blender's own "full screen" option.

Todo: the zoom effect is still draws a bit ugly, because Blender doesn't have "live resize"
yet.
2013-03-22 16:11:00 +00:00
Campbell Barton
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
Campbell Barton
a79e10157d code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
2013-03-22 05:34:10 +00:00
Campbell Barton
dd0e2da784 code cleanup: use booleans and const's for operator vars. 2013-03-22 04:40:45 +00:00
Campbell Barton
3966722057 code cleanup: misc warnings/style 2013-03-21 02:58:21 +00:00
Brecht Van Lommel
5dbe5fc496 Fix #34700: cycles depth of field now works with orthographic cameras too. 2013-03-21 02:38:11 +00:00
Sergey Sharybin
808ac6debf Prefetching for movie clips
This commit basically implements frames prefetching for
movie clip datablock.

Number of frames to be prefetched is controlled in User
Preferences, System tab, Prefetch Frames option.

Currently prefetching is destructive-less for movie cache,
meaning mo frames will be removed from the cache when while
prefetching. This is because it's half of simplier to
implement, but it also makes sense from tracking point of
view -- we could want to playback in both directions and
removing frames from behind time cursor is not always a
good idea.

Anyway, smarter prefetching strategy could be developed
later.

Some implementation notes:

- Added MEM_CacheLimiter_get_memory_in_use function to get
  memory usage of specified memory limiter.

- Fixed prototype of MEM_CacheLimiter_get_maximum which
  was simply wrong (used wrong data type for output).

- Added some utility functions to movie clip and movie
  cache for direct cache interaction and obtaining cache
  statistics.

- Prefetching is implemented using general jobs system.
  which is invoking from clip draw function.

- Prefetcing will stop as soon other job or playback starts.
  This is done from performance point of view. Jobs will
  likely require lots of CPU power and better to provide
  whole CPU to it.

  Playback is a bit more complicated case. For jpeg sequence
  playback prefetching while paying back is nice. But trying
  to prefetch heavy exr images and doing color space
  conversion slows down both playback and prefetching.

TODO:

- Think of better policy of dealing with already cached frames
  (like when cached frames from other clips prevents frames
  from current clip to be prefetched)

- Currently a bit funky redraw notification happens from
  prefetch job. Perhaps own ND_ is better to have here.

- Hiding clip while prefetch is active in theory shall stop
  prefetching job.

- Having multiple clips opened on file load will prefetch
  frames for only one of them.
2013-03-20 17:03:20 +00:00
Jens Verwiebe
09a604561d OSX/tablet: fix a longstanding bug with certain devices and a cornercases 2013-03-20 16:51:50 +00:00
Lukas Toenne
1c3b3321e7 Fix for #34708 and #34709, cycles group nodes were not working well with 0 or 2+ group input/output nodes.
The issue here was that the proxy nodes created for connecting extern group node sockets to the internal nodes were generated by the input/output nodes themselves.

0 input/output nodes: there would be no proxy that external group node sockets can map to
2+ input/output nodes: additional nodes would overwrite entries from previous nodes, so that only one of the input/output nodes would be used.

Solution is to always generate exactly 1 proxy node for every group socket in advance, regardless of whether it is used internally. Internal node sockets can then all map to this proxy node.

In the case out output nodes there should only ever be one active node, otherwise the connection to the proxy would be ambiguous. For this purpose the NODE_DO_OUTPUT flag has been exposed to RNA, so that cycles can check it and only use the active output.
2013-03-20 13:17:35 +00:00
Jens Verwiebe
a207d76709 OSX/pen: change sensivity graduation to a good value found with Sebastian and remove debug print 2013-03-19 12:29:38 +00:00
Jens Verwiebe
05787db61f OSX/pen: change sensivity graduation so we don't get maximum too early and have more feeling 2013-03-19 11:38:40 +00:00
Daniel Genrich
7432924216 Smoke Bugfix /enhancement: Load pre 2.65 pointcaches.
Warning: Just make sure that you DON'T free the cache at any point. This patch can only display existing pointcaches from e.g. 2.64
2013-03-18 21:33:48 +00:00
Sergey Sharybin
6cdce15c3b Hopefully blender will compile with strict flags again. 2013-03-18 19:27:31 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
Campbell Barton
655ed9cc7f style cleanup 2013-03-18 11:44:56 +00:00
Thomas Dinges
50c28740d4 Cycles / CUDA:
* Simplify Computing Capability Check, only check for major.
2013-03-17 14:32:50 +00:00
Campbell Barton
0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
Campbell Barton
baf3bb37a9 - ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
Thomas Dinges
5bea78301d Fix for [#34654] Cycles hair particle system modifier obeys viewport visibility as well
* Now Show Render and Show Viewport flags work independently and correct.
2013-03-16 08:49:39 +00:00
Sergey Sharybin
9d896f8f84 Border rendering now works for all scenes used in compositor,
before this only active scene would be rendered with border.

When do_render_fields_blur_3d() is finished, it'll modify
render's display rect so it'll correspond bordered render
result placed on black backgrund. Actual border is stored
nowhere, which makes it only way to re-calculate disprect
for all other renders used in compo based on source. Not
so big deal actually.

Also needed to modify Cycles a bit, because before this
patch it used border settings from scene being rendered.
Now made it so render data is passing to external engines.

Using a property inside RenderEngine structure for this.
Not best ever design for passing render data, but this
would prevent API breakage. So now external engines could
access engine.render to access active rendering settings.

Reviewed by Brecht, thanks!
2013-03-14 07:38:37 +00:00
Campbell Barton
6a51379bf7 tweaks to clang so blender can build with -Werror 2013-03-14 07:25:54 +00:00
Brecht Van Lommel
dcbfa25bc8 Fix #34551: blender crash rendering with save buffers.
Problem was the new usage of access() on Windows, this doesn't accept X_OK. Also wrapped _waccess so that UTF-8 paths work.
2013-03-13 19:48:07 +00:00
Thomas Dinges
56538ea685 Cycles / OSL:
* More small improvements: return immediately, and use "else if".
2013-03-10 00:42:47 +00:00
Thomas Dinges
5ac628fb47 Cycles / OSL:
* Avoid some conditional branches for the Noise texture and return immediately.
2013-03-10 00:11:52 +00:00
Ton Roosendaal
bee0af076f Adding include for NULL define in c++ 2013-03-08 09:09:48 +00:00
Campbell Barton
6fd187e4df code cleanup: 0 --> NULL 2013-03-08 06:32:00 +00:00
Campbell Barton
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Jens Verwiebe
4cfa28b5ed OSX/locale: a further cleanup 2013-03-04 10:31:01 +00:00
Jens Verwiebe
f1f702a5ec OSX/locale: fix compile on older xcode by not using toll-free-bridging, which needs ARC 2013-03-03 20:32:27 +00:00
Brecht Van Lommel
e80b0db58c Fix #34508: particle emitter show/hide option did not work correct after
recent bugfix.
2013-03-03 15:07:18 +00:00
Jens Verwiebe
1c5f18f42b OSX: Get the current locale in objC-style 2013-03-02 22:50:46 +00:00
Brecht Van Lommel
69f746d04c Fix #34480: cycles hair render in dupligroup did hide the emitter properly in some cases. 2013-03-01 14:55:30 +00:00
Brecht Van Lommel
41935d10c9 Fix related to #34481: show units for camera aperature radius. 2013-03-01 14:06:20 +00:00
Sergey Sharybin
d7e427beff Fix/workaround for newer FFmpeg 1.1.3 and MP3 decoder
FFmpeg is now using S16P sampler for MP3 which is not actually
supported by audaspace, so request for S16 sampler instead.
2013-02-28 18:28:08 +00:00
Bastien Montagne
1039135965 More UI messages fixes... 2013-02-28 15:31:20 +00:00
Dalai Felinto
07cd75d7b0 fix for [#34440] motion blur (2d filter) not working in osx
thanks Jens Verwiebe for the tests and review.
2013-02-27 22:48:34 +00:00
Brecht Van Lommel
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Brecht Van Lommel
0f91a283d4 Fix #34421: cycles viewport render stuck with no objects in the scene. 2013-02-26 17:06:05 +00:00
Campbell Barton
87f1326108 fix for own regression in win32 from r54225, wrong args used in getAllDisplayDimensions()
caused bug [#34391] Window position not saving correctly for next start-up
2013-02-26 09:33:54 +00:00
Campbell Barton
282e5caecf is_crappy_intel_card() was checking strstr(glGetString(GL_VENDOR), "Intel") every call,
better store in static var.
2013-02-25 12:03:26 +00:00
Antony Riakiotakis
99497d1fa2 Hopefully last round of fixes for all OSes 2013-02-24 14:27:59 +00:00
Antony Riakiotakis
08ff355a3a Compile fix round 2. Still trying to do this from linux :p 2013-02-24 14:02:45 +00:00
Antony Riakiotakis
610017d0e8 Add bogus stabs for fullscreen window mode for BGE in GHOST. Platform maintainers should change these to replicate X11 behaviour. Also moved X11 implementation to public methods, just like the IWindow interface. Should fix compilation 2013-02-24 13:51:12 +00:00
Campbell Barton
963b1c1b16 fix for own commit r54806 with argument order and multisampling. 2013-02-24 10:50:33 +00:00
Campbell Barton
630a31a900 fix for fullscreen on X11 (used by the BGE, not blender application),
changing the screen resolution wasn't still allowed for larger virtual desktops.

added an exclusive option to ghost so the fullscreen window is ignored by the window manager and we get all events. (common practice for games on X11).
2013-02-24 05:05:29 +00:00
Campbell Barton
c42b51ed96 GHOST/X11 - free memory allocated by XF86VidModeGetAllModeLines(),
Comment from Zr says this crashes but looks like this was because there was no check if the function failed to allocate to begin with.
2013-02-23 23:15:38 +00:00
Sergej Reich
c82213359a rigidbody: Add motor constraint
It's implemented as a separate constraint instead of adding properties
to the existing constraints.
Motors only apply linear and angular impulses and don't limit the
movement of rigid bodies, so it's best to use them in conjunction with
other constraints to limit the degrees of freedom.

Thanks to Markus Kasten (markus111) for the initial patch.
2013-02-23 23:04:07 +00:00
Campbell Barton
233b69f0bd GHOST/X11 support for frequency, from SDL's mode switching.
also free the modes when done.
2013-02-23 22:48:16 +00:00
Alexander Kuznetsov
5f830a0863 Applying patch #33709 for dead keys on windows.
Thanks Harley Acheson!
2013-02-22 16:42:19 +00:00
Alexander Kuznetsov
7ae17e9ed4 Fix for windows size on win32 2013-02-22 15:57:50 +00:00
Gaia Clary
b30bdd5cb6 Fixing typos 2013-02-22 09:31:42 +00:00
Dalai Felinto
1cdaf1e329 bge bugfix: [#18967] alpha value is never available in the color buffer by Campbell Barton (X11) and me (Win32)
This is and old patch (June, 2009). The reason it never made into trunk it's that we (me at least) thought that
it should be optional, as a ui or command-line option.

However, it seems that OSX always have the OpenGL context with alpha enabled. So I think it's consistent to
have the other OSs to follow.

The main usage of this is the BGE (or more specifically people using BGE for TV broadcasting) but I think
pydevs can have their share of fun with it in Blender as well.
2013-02-22 07:37:17 +00:00
Thomas Dinges
51f22e639e Code cleanup:
* Cycles: Removed leftover include of "kernel_qbvh.h", which was removed in r51352.
2013-02-21 21:05:31 +00:00
Campbell Barton
091d86b9cb style cleanup: 'sizeof foo' --> 'sizeof(foo)', add check in style checking script. 2013-02-21 17:18:27 +00:00
Thomas Dinges
d4c97029ef Cycles GPU Rendering:
* Make Cycles aware of sm_35 (Tesla K20, GeForce GTX TITAN).

The CUDA Toolkit 5.0 is needed for that and this is not officially used yet, but people with access to such cards can start testing. (just build sm_35 kernels).
2013-02-21 17:16:32 +00:00
Thomas Dinges
dc90ce5b6d Cycles GPU rendering:
* Deprecate computing capability 1.3 (sm_13)

This commit disables auto build of sm_13 CUDA platform, which means that starting with Blender 2.67, we don't support sm_13 devices anymore. It has become difficult to support that and it was already feature incomplete (no render-passes, AO, Multi Closure etc).

It's still possible to manually enable sm_13 for own tests, but building might break in the future.
2013-02-21 17:14:07 +00:00
Thomas Dinges
a239700f43 Cycles:
* Code cleanup, remove deprecated support_advanced_shading() functions. Left over from r43734.
2013-02-21 17:10:14 +00:00
Thomas Dinges
3df2b93c6d Cycles Addon:
* Code cleanup
2013-02-21 17:08:13 +00:00
Brecht Van Lommel
4c287f1d4d Fix shadow pass issue with non-progressive render shadow pass with emitting
meshes and world MIS.
2013-02-20 12:10:05 +00:00
Campbell Barton
c3b96f33af internal: add include so blender builds against libpng1.6 2013-02-19 15:15:34 +00:00
Campbell Barton
0528162eb6 patch [#34320] Cross compiling with mingw-w64 on ubuntu
from Martijn Berger (juicyfruit)

applying since this is only corrects header case which is ignored on windows anyway.
2013-02-19 12:05:38 +00:00
Brecht Van Lommel
313dfbe35d Add some more detailed CUDA error prints to try to debug #34166. 2013-02-15 14:54:11 +00:00
Sergey Sharybin
bd1c6571c9 Fix #34205: Zooming in rendered mode during update out of sync with intended zoom
Yes, again.

There's some t within which reset is not allowed. This is so no reset happens
too often for performance issues. If camera changes too often, some reset could
be missed because of this timeout.

For now tag engine for update, which will update viewport from blender side.

Proper solution could be to detect such a changes from blender side and tag
cycles for refresh instead of trying to detect changes form cycles, but that's
for later.
2013-02-15 09:15:14 +00:00
Brecht Van Lommel
b94993941f Fix #34252: cycles rendering 16bit PNG with too light colors. 2013-02-14 21:40:29 +00:00
Brecht Van Lommel
6e03b70def Fix cycles hair curves with NaN values not rendering with dynamic BVH. These NaN
values were breaking the bounding box computation, now they should have no influence.
2013-02-14 21:40:28 +00:00
Thomas Dinges
cb75d64f7d Cycles:
* Compile fix when building without OSL.
2013-02-14 19:30:25 +00:00
Brecht Van Lommel
e0ca72735d Further fix for #34121: OSL + persistent images could crash in some cases still. 2013-02-14 16:48:43 +00:00
Brecht Van Lommel
adbd84c320 Fix #34121: OSL + persistent images option was not freeing shader memory properly,
causing memory to increase continuously during animation render.
2013-02-14 16:11:47 +00:00
Brecht Van Lommel
909d64079a Fix #34226: cycles shadow pass got incorrectly influenced by world multiple
importance sampleing.
2013-02-13 16:46:18 +00:00
Brecht Van Lommel
4061f96d94 Fix cycles issue with BVH cache created with 64 bits and used for 32 bits binary,
and vice versa.
2013-02-13 11:02:51 +00:00
Sergey Sharybin
ae385fb61c Correction for fix #34205: Zooming in rendered mode during update out of sync with intended zoom
Didn't initially notice one possibility when GPU render would fail here,
2013-02-13 07:50:41 +00:00
Brecht Van Lommel
d095bcc8aa Fix cycles not using SSE3 kernel after recent, order with SSE2 should be switched,
pointed out by Chad Fraleigh.
2013-02-12 14:58:46 +00:00
Brecht Van Lommel
45c70acd27 Fix some (quite harmless) use of uninitialized memory reported by valgrind. 2013-02-12 13:48:04 +00:00
Sergey Sharybin
b3b9931276 Fix #34205: Cycles: Zooming in rendered mode during update out of sync with intended zoom
Made sure no pause_cond.wait() happens at the same time as session as resetting.
2013-02-12 13:06:52 +00:00
Brecht Van Lommel
9307565269 Attempted fix for issue with latest CUDA kernel for 32 bit windows/linux/mac,
there seems to be some sort of compiler bug in CUDA toolkit 4.2, uninlining a
few functions seems to avoid it.
2013-02-11 22:41:11 +00:00
Miika Hamalainen
1c4f704d5c Smoke simulator: add more float precision checks to make sure other data types don't get messed up either. (Relating previous fire fixes) 2013-02-11 20:22:47 +00:00
Campbell Barton
1a8dcbcb4f quiet -Wnarrowing warning. 2013-02-11 16:22:20 +00:00
Campbell Barton
fb01dcea5f move atoms into their own struct and make all names match the original atom names, there were too many and mixed in with the classes namespace. 2013-02-11 09:30:04 +00:00
Campbell Barton
53bce285ab patch [#31636] no pressure with Genius Mousepen i608X tablet
from Viktoria S. (viktorias)
2013-02-11 08:16:32 +00:00
Campbell Barton
2005f7c6c0 style cleanup: also some typos 2013-02-11 00:49:00 +00:00
Brecht Van Lommel
50f7328fb6 Fix scons win32 link error with OSL, also fix a GLEW linker warning 2013-02-10 20:47:44 +00:00
Brecht Van Lommel
8d4d27de9f Fix #34184: cycles speed vector pass should be zero when using motion blur,
instead it had value 10000.
2013-02-10 18:02:59 +00:00
Campbell Barton
1994ed00a3 add option not to calculate tessellation faces when converting an object to a mesh. (OBJ export no longer needs, so save some CPU cycles and skip tessellation) 2013-02-10 13:44:18 +00:00
Campbell Barton
52df65b137 building ghost-sdl works again. 2013-02-08 08:02:05 +00:00
Campbell Barton
76b7afd909 removing xinerama on X11 dependency, this wasn't working very usefully. 2013-02-07 14:10:01 +00:00
Thomas Dinges
8011cbc751 CUDA / sm_20:
* Enable Lamp MIS again, it works on a GTX 570 (which is sm_20) with latest SVN. Tested by vitos1k in IRC:.
Feedback from GTX 580 users would be appreciated on this.
2013-02-06 23:19:14 +00:00
Brecht Van Lommel
d686b1c20f Fix small memory leak in cycles tile render, a few bytes for each tile.
Reported by "aquo" on IRC.
2013-02-06 21:32:34 +00:00
Campbell Barton
296444e1dc style cleanup: some warnigs & spelling. 2013-02-06 14:02:19 +00:00
Campbell Barton
a78cf854b4 add missing bullet header to cmake, quiet reports from 'make test_cmake' 2013-02-06 04:16:28 +00:00
Campbell Barton
2c1219dc17 enable xinerama for scons. 2013-02-06 01:28:56 +00:00
Sergej Reich
83b8cbeab1 rigidbody: Code cleanup
Stupid oversight, don't use floats for indices.
2013-02-05 21:51:18 +00:00
Sergej Reich
aa02ca126b rigidbody: Invert spring damping range
Before 1 was no damping, which is inconsistent with the rest of the
simulation.
2013-02-05 21:51:17 +00:00
Brecht Van Lommel
c8e0f993cd Fix cycles missing AA/alpha settings for OpenGL render, these are now in the film panel. 2013-02-05 15:58:15 +00:00
Sergey Sharybin
9157f8f833 Apparently my system here considers fullscreen window as maximized
which makes it impossible to toggle from fullscreen to windowed mode
when startup.blend is saved in fullscreen mode.

Reshuffled checks a bit, which is actually makes sense, will investigate
which change caused regression since 2.65a tomorrow.
2013-02-05 15:52:40 +00:00
Sergey Sharybin
87a0f09a22 Didn't notice this panel was already enabled for Cycles 2013-02-05 15:30:00 +00:00
Sergey Sharybin
0983e9c745 Add missing Custom Properties panels when Cycles render is active 2013-02-05 15:22:30 +00:00
Sergey Sharybin
fa671fd0d5 Fix #34041: rendered view + border
Issue was caused by rare cases when camera move happens just after
last sample was finished, this would lead to missing delay reset
because render cycle will go to pause_cond.wait(). No reset will
happen at this point because of some kind of optimization which
checks whether camera is tagged for update and wouldn't do reset
in this case.

Talked to Brecht and seems this optimization is not actually needed
and removing it will solve issue with frozen preview.
2013-02-05 14:16:19 +00:00
Brecht Van Lommel
1ca0d66bd2 Fix particle child render resolution access not working outside of the render thread,
and rename ToggleRender to set_resolution to follow RNA conventions.
2013-02-05 13:33:54 +00:00
Brecht Van Lommel
7ecc9cfdf4 Fix non-progressive lamps with multiple samples not giving correct intensity after
recent fix.
2013-02-05 13:33:24 +00:00
Sergey Sharybin
fdfa5910b5 Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashes
Issue was caused by couple of circumstances:

- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview

All this leads to threading conflict between preview render and undo
system.

Solved it in  way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.

This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:

- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
  but adds temporary mesh to specified Main.

So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.

Viewport render shall not be an issue because object sync happens from
main thread in this case.

It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.

Thanks to Brecht for review!
2013-02-05 12:46:15 +00:00
Thomas Dinges
13499c6240 Cycles UI Code:
* Some more variable cleanup for old texture output.
2013-02-04 18:50:09 +00:00
Thomas Dinges
fd2934b73a Fix for [#34110] Displacement modifier + Procedural texture + Cycles -> 'NoneType' object has no attribute 'texture_mapping'
* Issue was caused by a remaining part from the "OUTPUT_TEXTURE" node UI code, from the original Cycles branch.
2013-02-04 17:01:42 +00:00
Campbell Barton
9d713688ba code cleanup: warnings 2013-02-04 16:20:39 +00:00
Brecht Van Lommel
7c9d993347 Fix cycles intersection issue with overlapping faces on windows 32 bit and CPU
without SSE3 support, due to 80 bit precision float register being used for one
bounding box but not the one next to it.
2013-02-04 16:12:37 +00:00
Brecht Van Lommel
52303db217 Fix window fullscreen crash when building for Mac OS X 10.5. 2013-02-04 16:12:27 +00:00
Thomas Dinges
e3784a27d6 Cycles / OSL:
* Fix for r53689, there are two noise types, signed and unsigned.
Caused Musgrave Texture to render differently compared to SVM backend.
2013-02-04 11:23:40 +00:00
Campbell Barton
0515f933d9 fix [#33831] "Alt" key is "Alt Window Deactivated"
update to the ubuntu workaround from Shinsuke Irie.
2013-02-04 07:51:01 +00:00
Campbell Barton
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
Campbell Barton
9d4be17de4 style cleanup 2013-02-04 00:05:15 +00:00
Brecht Van Lommel
b31d9c6cd0 Fix #34087: cycles shadow pass not properly normalized for non-progressive integrator
with > 1 samples for a lamp.
2013-02-03 13:10:56 +00:00
Stuart Broadfoot
35e89d9cfc Cycles Hair: Fixed hair shape and inclusion of multiple attributes for triangle primitives
When using triangle primitives this fix enables 'closed tip'. 

UVs and vertex colours are added when using triangle primitives for hair.

Two new preset modes have also been included to allow easy access to curves and triangle planes.
2013-02-02 01:49:57 +00:00
Brecht Van Lommel
736d7810a0 Fix an issue with the new cycles lamp MIS option not working correct with
multiple lamps.
2013-02-01 18:54:24 +00:00
Brecht Van Lommel
1a5d0edf43 Fix cycles computing UV map tangents when they weren't needed. 2013-02-01 18:00:30 +00:00
Campbell Barton
2a71e4e4f0 make WITH_HEADLESS build again. 2013-02-01 08:24:18 +00:00
Sergey Sharybin
7dc33e3ef8 Move opencl and reigidbody from source/blender/ to intern/
This modules does not depend on any blender-specific data
structures or algorithms and due to our policy better be
placed to intern/

Shall be no functional changes, tested CMake and SCons on
Linux, hopefully other platforms will work as well.

P.S. SVN history shall be preserved for the files.
2013-02-01 06:24:49 +00:00
Campbell Barton
6341919354 code cleanup: make wmEvent's 'const' in interface code (reduces manual checking that they are not modified). 2013-02-01 01:01:20 +00:00
Thomas Dinges
d319d68c65 OSL 1.3x / Windows 64:
* Added missing define into SConscript file. This also makes r54232 obsolete, so removing this again.
2013-01-31 17:38:09 +00:00
Brecht Van Lommel
122a2084b5 Attempt to fix cycles OSL link error on windows 64 bit. 2013-01-31 13:44:03 +00:00
Campbell Barton
dbf54dacf7 Add Xinerama support for GHOST_GetMainDisplayDimensions() so X11 works as it should (previously would include all monitors).
Now the active monitor size is used on startup. 
Currently the cursor position is checked for intersection with the monitor bounds to find the active screen.
2013-01-31 11:05:09 +00:00
Campbell Barton
73f301c3a8 add ghost function getAllDisplayDimensions, GHOST_GetAllDisplayDimensions
This returns the desktop size, not just the size of the active monitor, useful since this constrains the mouse and we dont have to detect the active monitor (which isn't so straightforward with xlib).

carbon/cocoa are TODO, they still use getMainDisplayDimensions().
2013-01-31 10:42:26 +00:00
Campbell Barton
c2ee59b777 initializing maximized/fullscreen windows in x11 would start normal, then maximize - causing noticeable flicker. 2013-01-31 05:55:57 +00:00
Brecht Van Lommel
b5c439db47 Fix cycles windows link errors when building with OSL master branch. 2013-01-30 21:58:47 +00:00
Brecht Van Lommel
f6f5d17a50 Fix #33984: cycles shadow pass problem with CUDA. 2013-01-30 17:04:51 +00:00
Brecht Van Lommel
dc0f4b5618 Cycles: make multiple importance sampling for lamps an option per lamp now,
disabled by default for backwards compatibility.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Integrator
2013-01-30 15:57:15 +00:00
Campbell Barton
743b4f213e disable ubuntu unity workaround, causes issues with modifier keys held doun with multiple windows.
no time to fix now so disabling.
2013-01-30 13:44:24 +00:00
Sergey Sharybin
452a52575c Cycles material preview: fix for generated/packed/movie files
Issue was caused by cycles trying to find builtin images in a main
database and in case of preview render images are not in database,
they're just referenced by shader node tree.

Now builtin images in cycles have got void* pointer to store data
needed to load builtin images.

In case ob blender session, this pointer will store pointer from
PointerRNA for image datablock and used later to construct Image
class based on this pointer.

This also saves database lookup for final render which is nice :)

Reviewed by Brecht.
2013-01-30 13:42:12 +00:00
Campbell Barton
7b6a34a756 patch [#34039] Fix Alt key glitch on Unity desktop
by Shinsuke Irie (irie) with own minor changes.
2013-01-30 04:12:32 +00:00
Brecht Van Lommel
3eb800169f Cycles: collapse preview render panel by default. It's a matter of personal
preference, but it slows down 3D view rendering to have two renders going so
I rather disable it by default.
2013-01-29 17:30:26 +00:00
Stuart Broadfoot
6d2f104884 Cycles Hair: Addition of render settings and static BVH strand width scaling
Addition of a RNA function to toggle between the hair settings and rebuild the cache. This enables the usage of the render step, child number and full display percentage with f12 rendering.

A scaling to the strand radius has also been added for the static bvh. This only matches up with dynamic for uniform scaling.

A very small fix is included for multiple uvs/vertex colours when using child particles.
2013-01-29 12:32:43 +00:00
Brecht Van Lommel
5ac4b38a20 Cycles: preview rendering support for world/material/lamp.
Patch by Sergey, .blend by Thomas and some further tweaks by me.

Still to solve later: allow external engines to specify own preview .blend, for
now the code here is doing too much magic hacking on the preview scene still.
2013-01-28 17:37:51 +00:00
Thomas Dinges
431619e45b Windows compile fix:
* r54117 broke Windows, __func__ not declared.
2013-01-27 15:12:52 +00:00
Campbell Barton
9d36fade8f make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value. 2013-01-27 11:20:50 +00:00
Brecht Van Lommel
38c94e9194 Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.
2013-01-25 02:00:57 +00:00
Ton Roosendaal
4477d59b76 Put back minimum window sizes on 320x240.
This didnt work well with making blender areas into windows.

Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.
2013-01-24 17:57:38 +00:00
Sergey Sharybin
5e739ddae2 Added some code which helps troubleshooting issues caused by
non-threadsafe usage of guarded allocator.

Also added small chunk of code to check consistency of begin/end
threaded malloc.

All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
2013-01-24 08:14:05 +00:00
Stuart Broadfoot
976c6b7b6e Cycles Hair: Multiple vertex colours and UV coordinates
Added export of multiple UV coordinates and vertex colour attributes.

A debugging option to export the strands without using the cache has also been removed.
2013-01-23 17:15:45 +00:00
Brecht Van Lommel
543e06ce0e Fix #33915: tweak self intersection epsilon for motion blur a bit further, still
had some cases where there were artifacts. Also fix rendering error with shutter
time set to 0.
2013-01-23 16:56:02 +00:00
Sv. Lockal
36641078f8 Fix compilation with WITH_X11_XINPUT=OFF 2013-01-23 15:01:33 +00:00
Brecht Van Lommel
7bcbbe26d5 Fix #33905: cycles crash with bsdf node plugged twice into add shader. 2013-01-23 13:13:20 +00:00
Thomas Dinges
9ce9f6a477 Cycles:
* Small code cleanup of panel registering after Bullet merge.
2013-01-23 11:02:28 +00:00
Campbell Barton
47f23c1372 fix for blender quitting in X11 if you start blender with a tablet, unplug it, then open a new window. 2013-01-23 10:32:09 +00:00
Sergej Reich
2d8637946b rigidbody: Add rigid body simulation
Add operators to add/remove rigid body world and objects.
Add UI scripts.

The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.

Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
2013-01-23 05:56:44 +00:00