Commit Graph

38760 Commits

Author SHA1 Message Date
Campbell Barton
83fff218cc svn merge ^/trunk/blender -r55700:55776 2013-04-04 13:37:07 +00:00
Sergey Sharybin
3c5c4fb4f6 Remove unused function.
It was only used for movie clips prefetching, no need
in it nowadays.
2013-04-04 12:26:31 +00:00
Sergey Sharybin
c1b704a11a Use GLSL display for compositor backdrop and sequencer preview
Now only background images remained to be ported. Plus implement
GLSL for dithering and RGB curves.
2013-04-04 12:20:13 +00:00
Bastien Montagne
f6add59e91 Fix blenderplayer (missing stub...). 2013-04-04 12:12:33 +00:00
Campbell Barton
69035e183b quiet warnings (building with -Werror) 2013-04-04 11:47:48 +00:00
Campbell Barton
19dd08a482 metaballs were not scaling/rotating about their own centers when V3D_LOCAL was used. 2013-04-04 09:59:06 +00:00
Sergey Sharybin
65023edabd Changes to cache invalidation policy for movie clips
- When changing clip in clip editor, remove all frames
  from it's cache to free memory for new clip.

- When changing proxy render settings, free cache as well.
2013-04-04 09:50:51 +00:00
Sergey Sharybin
845aea6864 Clip editor prefetch changes
Made it an operator instead of automatic prefetching.
Filling the whole memory with frames is not always
desired behavior.

Now prefetching is available via P-key, or from Clip
panel in toolbox or from Clip menu.

Also enabled prefetching for non-proxied movies.
2013-04-04 09:50:38 +00:00
Campbell Barton
ef1af9f9c4 fix [#34802] Individual Transformation Confusing in Edit Mode
Individual transformation now works in editmode mesh faces/edge, armature bones and metaballs.
2013-04-04 09:20:46 +00:00
Campbell Barton
82636ab0fb improved method of getting the tangent axis from a bmesh triangle,
rather then getting the longest edge, get the edge which which is most different from the 2 others ends up giving more useful results: for an isosceles triangle it returns the base weather its longer or shorter then the other sides.
2013-04-04 08:47:07 +00:00
Campbell Barton
66aed41d75 fix [#34860] View in Weight Painting mode no longer rotates around active bone 2013-04-04 04:26:13 +00:00
Campbell Barton
2804caff4c code cleanup: use bools, (float)sin/(float)cos -> sinf/cosf, more meaningful var names. 2013-04-04 04:22:38 +00:00
Mitchell Stokes
966e86cd2d Fix for [#34754] "Revision 55527 provokes glitchy GLSL shadow map rendering" reported by Alain Ducharme. Per material uniforms and per object uniforms are now better separated. 2013-04-04 03:55:43 +00:00
Campbell Barton
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
Brecht Van Lommel
47fffc86bc Fix #34625: duplivert/face rendering with modifier could crash accessing UV and
generated coordinates on the original mesh, after the change that made duplis
take modifiers into account.
2013-04-03 20:10:08 +00:00
Tamito Kajiyama
215033506a Fix for Freestyle face marks not effective with the Mirror modifier.
Reported by IRIE Shinsuke through a branch code review comment, thanks!
2013-04-03 18:26:51 +00:00
Sergey Sharybin
e6a16e585c Apparently zoom in clip editor was broken
Also silenced some warnings in glutil.
2013-04-03 16:21:14 +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
Campbell Barton
03b07a719f code cleanup: unused functions 2013-04-03 15:04:24 +00:00
Brecht Van Lommel
13ec0cd6c3 Fix #34856: crash passing an object rather than a mesh to bpy.data.mesh.remove(),
this should give an error message but it didn't.
2013-04-03 13:43:12 +00:00
Lukas Toenne
07677e836f Fix for old compatibility issue: 2.59.2 do_versions was not handling all local node trees (world and lamp missing). 2013-04-03 11:36:48 +00:00
Campbell Barton
d407aeecc7 code cleanup: use more (blender) conventional naming for group functions.
also change dump_rna2xml.py to dump bpy.data by default.
2013-04-03 11:28:42 +00:00
Campbell Barton
efa4c5be4b new ruler option to be able to interactively measure surface thichness as you drag the ruler about.
Request from Bart Veldhuizen.

Access with Shift+Drag
2013-04-03 10:45:13 +00:00
Campbell Barton
9a901691ee pass snap arguments so the ruler doesn't have to temp overwrite scene vars.
also expose snapObjectsRayEx() for more convenient ray-casting about the scene.
2013-04-03 09:48:21 +00:00
Lukas Toenne
bb4ab6a007 Fix #33628, Segmentation fault after pasting a closed group of nodes into an open group. Finally now there is a proper check for pasting nodes into groups. It uses the poll_instance callback of node types to determine if a node can be added into a specific node tree. Currently this is only implemented for group nodes and does a recursive check to avoid pasting a node group into itself (on any level, also nested groups). 2013-04-03 09:10:29 +00:00
Sergey Sharybin
bfeef2f5f0 Fix/Workaround #34854: render buffer update writes to wrong layer
Was caused by recent change in image_buffer_rect_update which
was writing data to ibuf-rect_float. Apparently, this buffer
could point to different render layer than came from RenderResult.

Made quick fix for this, which ends up in skipping float buffer
update in image_buffer_rect_update and skipping GLSL when image
has both byte and float buffers.

This will bring speed down a bit, but slower blender is better
than broken blender.

Proper fix will arrive later this week.
2013-04-03 09:08:02 +00:00
Lukas Toenne
9512ae1a4a Fix #34838, Can not append mesh from 2.5 (Crash in Nodes). The compatibility code for node group socket indices was assuming the new group node types even for 2.56.2 files, before these node groups had actually been converted ... Needs to use old way of identifying node group links (fromnode/tonode == NULL) instead of input/output node types. 2013-04-03 08:25:29 +00:00
Lukas Toenne
3092b24ef2 Fix for missing integer 'type' of the virtual extension socket in group nodes. This could lead to crash in node groups when trying to undefined stack values of the extension socket. type just needs to be set to SOCK_CUSTOM==-1, so the BI execution knows not to look for a stack entry. 2013-04-03 07:56:36 +00:00
Dan Eicher
de0b017127 Cleanup outliner_dropzone code
* deduplicated a bunch of code and moved it into outliner_dropzone_find()
 * moved all the per-dropzone checks into the poll functions
 * one functional change, disable drop parenting on self & self->parent

The basic assumption: if poll() == true then outliner_dropzone_find() will return a valid TreeElement
2013-04-03 07:42:56 +00:00
Campbell Barton
beb4d385bb use floats for transform snapping distance comparisons 2013-04-03 07:36:37 +00:00
Campbell Barton
fc3c13c309 fix [#34825] Transparent background of Empty Images clips objects behind them away when Empty is not selected
allow 'Transparency' option to be used on empty-images.
2013-04-03 05:16:15 +00:00
Campbell Barton
6ee5b2d40c fix [#34850] "x" to clear ID prop fields is too close to the right border 2013-04-03 05:02:33 +00:00
Campbell Barton
a5bd9cbb93 fix [#34847] Box selecting shape keys of a mask causes crash 2013-04-03 03:25:26 +00:00
Campbell Barton
ff7b353ce6 style cleanup 2013-04-03 01:36:00 +00:00
Campbell Barton
6a47f756a6 remove workaround for [#34346], checked on applying this workaround for armatures too but it happens in more cases then I originally thought.
for now users of opensource Nouveau and ATI drivers can't use multiple windows, the bug needs to be fixed in the driver.
2013-04-03 01:35:24 +00:00
Tamito Kajiyama
1e8d69ac74 Use of text datablocks for storing Python style modules.
Suggested by Brecht Van Lommel and Campbell Barton through code review comments.

Previously style modules were external Python script files whose absolute paths
were kept in .blend files.  Now style modules are stored in .blend files as text
datablocks.

Style modules are configured in three steps:
1. Open an external style module file (or create a new text datablock) in the
Text Editor in Blender.
2. Add a style module to the list of style modules (by pressing the "Add" button)
in the Render Layer properties window.
3. Click the name entry and select the style module from the drop-down menu.
2013-04-03 00:00:29 +00:00
Brecht Van Lommel
498983a9a4 Fix #34759: cycles texture influence for particles not shown correct when switching
to a different texture slot.
2013-04-02 18:19:37 +00:00
Brecht Van Lommel
902eb76f49 Fix #34849: crash in operator search menu, due to brush stencil poll
function not checking NULL pointer.
2013-04-02 18:19:35 +00:00
Sergey Sharybin
ed792b5de0 Box and Ellipse mask nodes will now output shape
even if nothing is attached to input.

They'll use black image with render resolution
as a background if nothing is attached to mask input.

Was a request from 4K ToS project.
2013-04-02 17:56:41 +00:00
Brecht Van Lommel
f7efb51054 Fix #34803: blender internal SSS rendering black/nan with negative texture colors. 2013-04-02 17:49:31 +00:00
Sergey Sharybin
c4780c233e Fix for potential missing draw-update when building without OCIO 2013-04-02 17:39:34 +00:00
Sergey Sharybin
752ad1bc37 More usage of GLSL for color managed image drawing
Uses GLSL for drawing image in Image Editor space.

This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.

Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.

Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).

internal changes:

- Added functions to setup GLSL shader for color
  space conversion in colormanagement.c. Currently
  conversion form a colorspace defined by a role to
  linear space is implemented. Easy to extend to
  other cases.

- Added helper functions to glutil.c which does
  smarter image buffer draw (calling all needed OCIO
  stuff, editors now could draw image buffer with a
  single function call -- all the checks are done in
  glutil.c).

- Also added helper function for buffer linearization
  from a given role to glutil.c. Everyone now able to
  linearize buffer with a single call.

  This function will do nothing is GLSL routines fails
  or not supported.

  And one last this: this function uses offscreen
  drawing, could potentially give issues on some
  cards, also will keep an eye on this.
2013-04-02 17:28:37 +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
Ton Roosendaal
726dedafbc More Histogram fixes:
Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)
2013-04-02 17:12:21 +00:00
Brecht Van Lommel
dc685bc1c3 Fix #34711: matcap option not showing when switching from cycles material/rendered
draw mode to blender internal.
2013-04-02 16:51:23 +00:00
Brecht Van Lommel
0aada35e93 Fix #34788, #34744: GLSL error, #version line needs to be at the top of the shader
and this wasn't the case anymore after recent changes.
2013-04-02 16:37:31 +00:00
Ton Roosendaal
00a1dca612 Removed leftover debug print. 2013-04-02 13:15:12 +00:00
Antony Riakiotakis
dbfadcad61 Fix compilation on MinGW(64/32)
Also, add appropriate lib paths for recent OpenCollada for mingw32 (coming soon to an svn server near you)
2013-04-02 13:07:01 +00:00
Ton Roosendaal
5105ddae74 Missing GLEW path in CMake, fixes compile error in OS X. 2013-04-02 12:54:47 +00:00
Ton Roosendaal
58530a5aff Usability fix, for color grading.
The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings. 

- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.
2013-04-02 12:41:11 +00:00
Ton Roosendaal
a78aa15cd6 Key mapping conflict for 'find node' versus 'add socket link' (noodle).
Historically, F shortcut was for 'add edge/face' in Blender.
In Node editor, F makes a noodle, ctrl+f made a noodle replace too.

To keep ALT+F work for "Unattach from frame", the solution I now propose
is to make CTRL+F for finding nodes, and SHIFT+F for 'add noodle with replace'.
2013-04-02 12:38:05 +00:00
Lukas Toenne
8abfaf880d Fix for #34756 and #34810, crashes when dropping nodes onto noodles and a related forward compatibility bug.
Added a sanity check to the ED_node_link_insert function to ensure it exits gracefully if no suitable sockets can be found. This was the problem with custom pynodes, which don't define the 'type' DNA of old sockets. The operator will have to be generalized for future nodes, but for now just not crashing seems good enough.

Script node crashes in #34810 were caused by uninitialized 'type' integer as well. This is now done in the set_typeinfo function for sockets (like for trees and nodes too), to avoid any potential remaining issues of this kind. Note that new files need to be loaded and saved again once to be forward compatible again.
2013-04-02 11:59:27 +00:00
Campbell Barton
37bf7dd98a draw helper lines for inset and bevel operators, the mouse distance from the selection center was used, but often it was hard to tell where this was and you'd have to guess.
adds ED_region_draw_mouse_line_cb() generic draw callback for mouse helper lines.
2013-04-02 10:48:11 +00:00
Bastien Montagne
932820499a Usual typo fixing... 2013-04-02 07:27:39 +00:00
Joshua Leung
186f0e241e Compile fix: size_t (required by BLI_string.h) was undefined 2013-04-02 03:51:42 +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
Tamito Kajiyama
8709d4b624 Fix for Mesh::drawflag to store ME_DRAW_FREESTYLE_EDGE and ME_DRAW_FREESTYLE_FACE.
Problem report from IRIE Shinsuke, many thanks!
2013-04-01 19:31:09 +00:00
Tamito Kajiyama
eec0d2ee53 Removed ME_CDFLAG_FREESTYLE_EDGE and ME_CDFLAG_FREESTYLE_FACE from Mesh::cd_flag.
Suggested by Campbell Barton through a review comment of the Freestyle branch.
2013-04-01 18:32:19 +00:00
Joerg Mueller
8588fec935 FFMPEG: adding support for ffmpeg planar formats also to writeffmpeg.c. 2013-04-01 15:31:27 +00:00
Ton Roosendaal
c35dec60b5 Node editing feature:
New operator "Find Node".
Opens search menu, and allows to find a node based on name or label.

On selecting name, menu selects/activates the node and moves the view to it.

Shortcut: ALT+F 
Menu: Node editor, "Select"
2013-04-01 15:07:22 +00:00
Tamito Kajiyama
5524ed9ba2 Merged changes in the trunk up to revision 55700.
Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
2013-04-01 13:47:19 +00:00
Sergey Sharybin
689f3aa174 Fix for recent changes in IMB_display_buffer_acquire
Do early out when ibuf has 4 channels only, allocate
4-channels display buffer.

So now we could always assume byte buffer is always
in RGBA format.
2013-04-01 12:22:52 +00:00
Sergey Sharybin
daa1e5bff2 Fix for GLSL display: NULL view_settings are allowed now
Currently no functional changes for users, but this change
is crucial for further GLSL images display.
2013-04-01 12:08:43 +00:00
Campbell Barton
5d234f0a0b code cleanup: includes 2013-04-01 11:27:47 +00:00
Campbell Barton
9328ae282c remove duplicate defines in makesrna.c 2013-04-01 10:26:16 +00:00
Campbell Barton
6d8e25dfdc code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c
2013-04-01 10:18:01 +00:00
Sergey Sharybin
e8d0e77856 Fix #34813: smooth brush used on a shape key messes up the topology - part2
This reverts rev55642 and fixes issue in a different way.

The thing here is: isolated vertices are for sure not in BVH
and updating keyblock could not only rely on idea that all
vertices are in BVH (no idea why it was noticed just now).

Solved in a way, that uses old keyblock coordinates as new
keyblock, and then refines it using coordinates from BVH.

Hopefully it'll cover all cases now :)
2013-04-01 09:55:37 +00:00
Sergey Sharybin
3657f3d938 Draw checker backdrop for sequencer when in RGBA mode 2013-04-01 09:15:37 +00:00
Campbell Barton
c7e2a31bf2 correct too-big allocation in mesh beautify. 2013-04-01 07:57:33 +00:00
Sergey Sharybin
5e02acf887 Fix #34819: Background image gets pixelated when zooming in
Was a regression in glaDrawPixelsTex changes related on zoom filter.
For background image linear interpolation was used.
2013-04-01 07:50:51 +00:00
Sergej Reich
4e0e9eb994 Draw relationship lines for rigid body constraints
Makes it easier to see what's connected to what.
2013-03-31 19:52:37 +00:00
Thomas Dinges
6382ebe67d Fix for [#34821] Split Viewer node won't show the backdrop
* Regression introduced in r55451
2013-03-31 19:46:11 +00:00
Antony Riakiotakis
8d036a21d7 Changes to Stencil control:
* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil

Also,
* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)
2013-03-31 16:17:18 +00:00
Antony Riakiotakis
c33d5c7133 optimize away reloading of brush texture when rotating the stencil 2013-03-31 11:20:30 +00:00
Antony Riakiotakis
514c449a54 UI cleanup:
* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.
2013-03-31 11:04:13 +00:00
Tamito Kajiyama
1360bb6fb0 Work-in-progress re-implementation of CustomData-based edge/face marks.
Most changes in revision 55228 were reverted and Freestyle edge/face marks
were re-implemented using CD_ORIGINDEX layers of edge/poly custom data.

For this implementation to work properly, modifiers were updated so that
required CD_ORIGINDEX layers will be set.  As pilot cases, the Mirror and
Solidify modifiers were updated (see comments in the code).

Some Freestyle-specific code is necessary in DerivedMesh.c so that the
CD_FREESTYLE_EDGE/FACE layers will be transferred from meshes to derived
meshes.  This seems unnecessary, so further investigation is foreseen.
2013-03-31 10:33:27 +00:00
Campbell Barton
e8d532f1dd style cleanup 2013-03-31 03:28:46 +00:00
Campbell Barton
829a2cc1b0 remove blender foundation copyright from freestyle files.
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
2013-03-31 01:11:07 +00:00
Antony Riakiotakis
1fea6220a2 Woot woot commit.
Stencil style texture mapping. Ready for field testing and user feedback.

This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use

Q: translation
Shift - Q: scaling
Ctrl - Q: rotation

There's extra work that has been done to make this work:

* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.

There are some TODOs to work on during bcon3:

* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.

WIP design docs will be in

http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design
2013-03-31 00:38:50 +00:00
Tamito Kajiyama
7072f234d3 Updated default line style parameters.
- Line color set to black.
- Line thickness set to 3.
Based on review comments by IRIE Shinsuke.
2013-03-30 16:42:59 +00:00
Antony Riakiotakis
ae1028df73 Tidy up stroke options and make them sexy, aka the paint option
sculptification commit. We have a drop menu to select the stroke mode
now. Jitter controls appear under stroke panel under all modes (As they
should! They stroke control options). Also enable jittering for all
modes. I really fail to see why not.
2013-03-30 11:40:09 +00:00
Campbell Barton
cd6d337d41 Beautify - use a heap for the edge rotation queue rather then checking to rotate all edges until none can be rotated.
this means the best edges to rotate are done first, also speeds up execution ~20% in my tests.
2013-03-30 11:05:57 +00:00
Campbell Barton
20376f3337 code cleanup: move beauty fill calculation into its own function and some style cleanup 2013-03-30 09:57:35 +00:00
Campbell Barton
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +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
Antony Riakiotakis
44a43afd0e Slight cleanup for 2d painting. Cache is always enabled (used one of the
bookkeeping variables from when the code was shared with texture
painting) Also texonly now is always zero, probably another leftover
from 2d/3d painting entanglement era.
2013-03-29 15:18:22 +00:00
Antony Riakiotakis
57666b3ff1 Support for brush overlay in texture paint mode. For the image editor,
the tiled overlay is still a bit off, investigating on how to better
correct this, though it may well be non trivial.
2013-03-29 14:02:28 +00:00
Campbell Barton
3f8bb2b079 remove unused GLUquadricObj in draw_manipulator_rotate() 2013-03-29 11:44:52 +00:00
Campbell Barton
c4e2de11ad fix/workaround [#34346] Blender total crashes when File/User preferences twice and go to System tab 2013-03-29 07:14:18 +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
ab41583bc2 style cleanup 2013-03-29 06:21:28 +00:00
Campbell Barton
c826174056 minor improvement to edge-angle-drawing, when transforming verts draw the angle of the opposite edge since this is the angle thats being changed. 2013-03-29 04:38:10 +00:00
Campbell Barton
4506f73055 add edge-angle drawing in editmode for manifold edges. 2013-03-29 04:01:52 +00:00
Campbell Barton
e8105fbf50 minor fix for annoyance with directory selection on windows.
selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.
2013-03-29 01:34:04 +00:00
Campbell Barton
10b4a86dbf code cleanup: quiet warnings building with mingw. 2013-03-29 00:50:52 +00:00
Thomas Dinges
63290beee1 Code cleanup / Sequencer:
* Remove "use_frame_blend" from RNA and UI file, not used anywhere in the code, also mark SEQ_SPEED_BLEND as deprecated.
2013-03-28 22:09:55 +00:00
Campbell Barton
93deb27dd4 fix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame
also add macros for looping on listbases as if they were circular lists which is handy for cycling over items.
2013-03-28 20:58:14 +00:00
Campbell Barton
986bbbfe8a don't save select extend state for marker selection. 2013-03-28 20:34:12 +00:00
Campbell Barton
8e3d590b76 code cleanup: python/pep8 and double-promotion warnings. 2013-03-28 19:33:14 +00:00
Gaia Clary
8fce915b6e scon update for new collada libraries 2013-03-28 18:04:07 +00:00
Gaia Clary
32ec0c762e Updated Blender Collada module to newest opencollada API 2013-03-28 18:03:01 +00:00
Bastien Montagne
5262fcd4d3 I18n: various fixing.
* Reflect changes stated in prev commit about contexts in py code.

* Add a "Plural" context, to handle cases where english does not mark plural at all (e.g. shorten labels of only one adjective). Not so happy with that, but can't see any other way to do it, for now.

* Abuse "ID_CURVE" context for all falloff curves (this should solve some confusion issues, e.g. "sharp"...).
2013-03-28 15:41:43 +00:00
Lukas Toenne
4b5be1c097 Fix for node groups, now exposing a socket will copy the default value from internal nodes again. Also this value can be changed in the node group Interface panel. 2013-03-28 10:32:04 +00:00
Sergey Sharybin
c5c34ca65f Fix #34782: Video Editor - Substract after transform fails
Couple of precision issues here:

- Interpolation was rounding trunkcating colors, and because
  of some precision issues value 254.999 became 254 leading
  to troubles later.

  Now color interpolaiton will do rounding to nearest int.

- Subtract was setting channels to something negative which
  confused color management (especially negative alpha),

  Now subtract effect will clamp channels to 0 from bottom
  and also do some tricks to prevent small alpha which
  could also confuse color management.
2013-03-28 08:21:29 +00:00
Campbell Barton
ed99c94bef fix [#34636] bpy.app.handlers.load_post not run on startup file loading after splashscreen 2013-03-28 06:36:09 +00:00
Sergey Sharybin
ebc538c56c Fix #34773: smooth brush used on a shape key messes up the topology
Key block update was missing coordinates for hidden vertices.
2013-03-28 06:11:32 +00:00
Campbell Barton
765060acd4 BMesh: make the context create operator (Fkay) more logical, before calling each operator check the state that it can even run and do something. 2013-03-28 06:01:58 +00:00
Campbell Barton
abac71c474 own error in recent commit, uninitialized variable. 2013-03-28 05:51:32 +00:00
Campbell Barton
0237e7eef2 fix for loosing recent-files when running 'Copy Previous Settings'. 2013-03-28 02:29:10 +00:00
Antony Riakiotakis
eab20832d9 Fix typo with non-system bullet. 2013-03-28 00:58:50 +00:00
Campbell Barton
3e2619b3e7 workaround for crash when accessing vertex colors in editmode,
just disallow vertex color access in editmode as is done with UV's.
2013-03-27 23:48:35 +00:00
Campbell Barton
f13829c782 svn merge ^/trunk/blender -r55594:55635 2013-03-27 22:24:38 +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
Bastien Montagne
c766b0792a I18n fixes for C panels & menus (we have to specify the default bpyrna context here, else we get the horrible "empty" string (as translation_context of panels is an array, not a pointer, so it's never NULL). 2013-03-27 19:09:50 +00:00
Ton Roosendaal
9c73c91039 Sequencer
"Insert Gap" and "Remove Gap" tooltip fix - to denote this doesn't use selection.
The use of this tool is to insert or remove time for a timeline.
2013-03-27 18:31:18 +00:00
Ton Roosendaal
b163256b33 Node Editor
To complete previous commit:

New "Activate same type next/prev" operator - replaces the two not working previous ones.
This selects/activates and views the next or previous node of same type.

Shortcuts: Shift ] and Shift [
2013-03-27 18:28:25 +00:00
Ton Roosendaal
1c886435c8 Fix for Node Editor tool "Find next/prev of same type".
This is the first half of the commit, it's going to be reviewed further.
It also depends on other work in node drawing (to not reshuffle order on
every select/activate).

At least it works quite nice for the shortcuts shift [ and shift ]
2013-03-27 17:22:12 +00:00
Sergey Sharybin
6aec2d4ddc Fix #34785: only one curve cap is visible while backface culling is enabled
Simply extra normals flip happened.
2013-03-27 16:33:49 +00:00
Ton Roosendaal
92689be7a0 Bug report #34775
Packed file print was misleading (no files packed).
It should be "no new files packed".
2013-03-27 13:28:51 +00:00
Ton Roosendaal
79b8d89027 Tiny fix for sequencer:
"View selected strip(s)" now includes the active strip (which can be deselected 
in cases). Less confusing this way, also because active strip is being drawn 
very visible.
2013-03-27 12:29:00 +00:00
Sergey Sharybin
68d8c6ad3d Fix #34779: Channels disappear from multilayer exr sequence
Issue was caused by delayed or missing image user frame
number update, which lead to image loading failure in
cases node is updating from image signal callback.

Solved in a way that file from image datablock is used
for sockets detection instead of loading image for
current frame.
2013-03-27 11:26:10 +00:00
Campbell Barton
cb6f4160cc api cleanup: replace BMO_vert_edge_flags_count() with more reusable function - BMO_iter_elem_count_flag().
closely matching existing BM_iter_elem_count_flag() function but checks tool-flags instead.
2013-03-27 10:14:09 +00:00
Ton Roosendaal
93d5e106aa Fix for timing print in renders.
The time it was printing was excluding the time spent on color and file saving.
Now it includes this too, plus it prints the time spent on color/files.

Makes quite a difference when you do sequencer conversions or grading in 
terminals - time that was printed was very misleading.

For readablity of logs, also added an extra empty line after this print.
2013-03-27 10:05:31 +00:00
Irie Shinsuke
da4401587c Fix [#34768] Out of bounds access in console selection.
txt_utf8_column_to_offset(): don't advance the offset anymore if a null character is found.
2013-03-27 09:57:34 +00:00
Sergey Sharybin
f834f485d6 Why oh why makesrna is split into two separate scons files..
Fixed missing audio devices when building with scons
2013-03-27 08:06:07 +00:00
Campbell Barton
d358458a8d fix for mesh face filling when a valid edge-loop was selected but unselected connecting geometry existed inside the loop.
In this case edgenet_fill operator failed and it would fallback to filling as unordered vertices which was mostly fine but failed on some concave loops.

Add a new bmesh operator 'edgeloop_fill' fills in closed loops even if they don't make a valid edge-net.
2013-03-27 07:54:11 +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
Campbell Barton
91b2b970ad api cleanup: move edgenet bmesh operator into its own file. 2013-03-27 06:49:16 +00:00
Campbell Barton
29c8bd7b24 api cleanup: split part of BM_face_create_ngon_vcloud() into a new function BM_face_create_ngon_verts(),
a function to create a bmesh face from an ordered vertex array, optionally creating edges and calculating winding.
2013-03-27 05:52:28 +00:00
Campbell Barton
1390abfaa9 code cleanup: quiet shadow warnings 2013-03-27 04:41:20 +00:00
Tamito Kajiyama
765a10a8cd Fix for Freestyle edge/face marks not working with most modifiers (except for Subdivision Surface). 2013-03-27 02:06:36 +00:00
Campbell Barton
4af9004efa fix [#34776] Linking the group in this .blend causes crash with this starting scene
disallow linked objects to be in editmode.
2013-03-26 23:46:54 +00:00
Campbell Barton
36d25daa09 style cleanup 2013-03-26 22:45:06 +00:00
Campbell Barton
9f91fc10ab move FOREACH_NODETREE internal checks into functions.
BKE_node_tree_iter_init,step()
2013-03-26 22:37:41 +00:00
Antony Riakiotakis
1942452ce5 Paint system:
Random texture mapping
* Support for 2d painting.
* Better random generation and useof the result.
2013-03-26 21:34:39 +00:00
Campbell Barton
974d73bfbf report [#34772] Incorrect aspect for tex mapping from camera view
There was no good way to UV project from a camera with non-square view-border without it stretching the image (even using 'Correct Aspect').

While this isnt a bug its useful to do a UV projection without stretching the image, added 'Camera Bounds' option.
2013-03-26 21:26:44 +00:00
Campbell Barton
aaa547faff uv project tool: take scene aspect into account when calculating the camera bounds. 2013-03-26 20:51:43 +00:00
Campbell Barton
879e4fd9be sequencer gaps
- remove unneeded checks (poll checks editor is non-null)
- use booleans
- rename operator SEQUENCER_OT_gap_remove, _gap_insert

also quiet shadow warning in rigidbody.c (shadowing 'loc')
2013-03-26 20:34:13 +00:00
Ton Roosendaal
166cdf8b5a Bug fix - own collection.
- Scopes in Sequencer were not drawing OK (drawing code assumed alpha)
- Histogram in Sequencer now uses same formula to quantify R G B as the
  other histogram in Blender (per channel).

I seriously thought of dropping this, and add the same sidebar here as we
have for Image window. However, what stops me is that current code is
very optimized, and has OMP hints.

Will check instead on cleaner drawing here now.
2013-03-26 17:49:57 +00:00
Sergey Sharybin
bd69bd65d6 Fix regression introduced by svn rev55545
After this revision BLI_stringdec worked incorrect
in cases there's no digits in original file name,
making head one character shorter than it should be.

Time to cover BLI with unit-tests?
2013-03-26 15:52:43 +00:00
Sergey Sharybin
22000aa2fc Wrong soft/hard limits used in r55600 2013-03-26 15:48:20 +00:00
Ton Roosendaal
e1db5a050d Sequencer usability:
Brought back old tools "Remove Gap(s)" and "Insert Gap".
It's actually one of the first tools I ever coded for it in 90ies, so useful!

* Remove Gap(s)

This checks if there's no strip at a given position, and slides all strips
together to the left, until the gap is closed.

- BackSpace key, remove gap at current frame (or first gap at right of frame)
- SHIFT+BackSpace, remove all gaps at or to right of current frame.

* Insert Gap

Shifts all strips to right of current frame with 10 frames. (Amount can be
set in Toolbar redo panel).
2013-03-26 15:00:56 +00:00
Bastien Montagne
b4bd43e022 I18n: various "new data translation" fixes... 2013-03-26 14:33:53 +00:00
Sergey Sharybin
0c07c33fec Correction to recent prefetch commit
When using movie as a clip no need to prefetch in cases
no proxies are sued at this moment.
2013-03-26 12:45:10 +00:00
Ton Roosendaal
6e076c4164 Better fix for "To Sphere" crashing in Image editor. It appeared to be in use for
mask/uv modes.
2013-03-26 10:28:19 +00:00
Sergey Sharybin
4a0351cba2 Freestyle changes:
- Revert some stylistic changes made in branch
  They weren't directly related on freestyle project
  and better be handled in trunk. Helps reading patches
  ad prevents possible merge conflicts.

- Solved issue introduced with recent deprecation of
  RenderData.maximize,
2013-03-26 09:59:43 +00:00
Sergey Sharybin
18d2dd7e3a Merging r55547 through r55594 from trunk into soc-2008-mxcurioni 2013-03-26 09:09:31 +00:00
Sergey Sharybin
fc9e0a37f0 Freestyle: fix crash unlinking object
Was getting an address of pointer variable.
2013-03-26 08:32:53 +00:00
Sergey Sharybin
7b16c59e87 Freestyle: fix compilation with strict flags used 2013-03-26 08:05:56 +00:00
Campbell Barton
f1ed223e34 grease pencil eraser mouse-wheel resize was inverted compared to circle-select. 2013-03-26 07:44:48 +00:00
Campbell Barton
5a978a9d21 grease pencil xray option wasn't being applied to single points in the 3d view. 2013-03-26 07:41:59 +00:00
Campbell Barton
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
Campbell Barton
ef961319e0 fix [#34658] GreasePencil eraser deletes strokes through geometry, surfacemode
add depth check to grease pencil eraser when xray option is disabled.
2013-03-26 06:07:21 +00:00
Campbell Barton
b0ef03565d fix [#34698] Axis Locking works incorrect
don't do projection when constraints are used.
2013-03-26 03:36:18 +00:00
Campbell Barton
09721bffc0 replace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int() 2013-03-26 02:37:29 +00:00
Campbell Barton
ae0e356de6 improve beauty-fill tool for non-flat triangles.
Project the triangle pair into 2d coords before measuring.

before/after - http://www.graphicall.org/ftp/ideasman42/beauty_fill_fix.png

note: I committed this r54403 but it caused eternal looping so I reverted for 2.66 release.
ran extensive tests and its not giving problems so re-applying this improvement.
2013-03-26 01:49:55 +00:00
Campbell Barton
32f63f6b4c misc minor changes
- make it clear that navmesh visualize option only works in path mode.
- use 2 decimal places for motion-blur shutter speed (user request).
- use 'const' for some bmesh functions.
2013-03-26 01:46:12 +00:00
Campbell Barton
4fbf4590c9 edit to VIEW3D_OT_view_center_pick
- pan when nothing is under the mouse
- use key binding alt+f
2013-03-26 01:43:00 +00:00
Tamito Kajiyama
7c08191d2f Fix for missing CustomData flag updates in the temporary code for migrating
Freestyle edge/face marks from old .blend files.
Problem report and patch by IRIE Shinsuke, many thanks!
2013-03-26 00:36:43 +00:00
Campbell Barton
0eee4021c9 fix [#34603] ALT-F fails, freezes, CPU=100%
The way beauty fill was working was too fragile and prone to eternal loops,
Solution used is to is to store previous states and ensure edges don't get rotated back into those.

Also added an optimization to avoid testing the same edge rotation many times - using edge tags to only re-test edge rotations around areas that have been modified.
2013-03-26 00:29:57 +00:00
Campbell Barton
f9b1494158 internal changes to beautify fill, use an array of edges that can be rotated, rather then looping over all edges each time. 2013-03-25 23:21:16 +00:00
Campbell Barton
6f9f1399a0 code cleanup: operator headers 2013-03-25 22:40:11 +00:00
Campbell Barton
be780cb4a6 code cleanup: move beautify into its own file (more changes coming) 2013-03-25 22:04:12 +00:00
Campbell Barton
8f8613df90 fix for missing redraw in own commit r55554 (Ctrl+F text editor find).
since an event wasn't added to the queue no redraws we're done when the panel was already open, instead use a notifier.
2013-03-25 21:31:24 +00:00
Ton Roosendaal
c347b48784 Bug report, IRC:
Operator "To Sphere" should only be allowed to be called in 3d view.
Crashed in Image editor.
2013-03-25 18:41:28 +00:00
Bastien Montagne
09bae3d35d Fix [#34716] Change Trim Duration (soft) value nothing happening. until mouse drag footage(image sequence)
As those two properties do not need a custom set func, yet need recalc of strips drawing/positions in addition to usual rna_Sequencer_update() (cache invalidating), I renamed rna_Sequence_frame_change_update to do_sequence_frame_change_update, and made a new rna_Sequence_frame_change_update which is directly usable as RNA update func, and call both the strip and cache update funcs.

Thanks to Sergey for advices!
2013-03-25 17:22:00 +00:00
Ton Roosendaal
40ab9be14a Bug fix:
On screen/area refresh calls the header scroll offset was cleared too. 
Probably an old remainder of early 2.5 coding. Should be not needed so much.
2013-03-25 15:45:59 +00:00
Sergey Sharybin
a5fe1de7f9 Clip editor prefetching changes
Now prefetching happens from cursor up to scene end frame
and then from cursor down to scene start frame.

Also disabled prefetching for non-unidistorted proxies
because of issues with timecodes (seek horribly fails
in some cases). This seek need to be fixed since it's
actually happens for manual timeline scrubbing as well,
but that's another story..
2013-03-25 15:32:15 +00:00
Sergey Sharybin
7635de3fee Better handing of frames below actual sequence range
When trying to load file below actual sequence range
(like trying to load file for scene frame 10 when clip's
start frame is 20) first frame from file sequence is used.

Before this change first file used to be loaded for every
scene frame below start frame, which polluted memory with
unwanted data.

Now first frame would be loaded only once in this case.
2013-03-25 15:32:11 +00:00
Bastien Montagne
74e37ec0e6 Fix to EnumProperty doc (content of items tuples was rather fuzzy, ways how these "parameters" are interpreted are rather strange, current text should now reflect exactly code's behavior). 2013-03-25 14:46:34 +00:00
Bastien Montagne
4cb9414b39 I18n: use id_windowmanager context for keymap idnames. Solves some issues with those names (notably "Clip" one, and "Screen" too) in some translations. Also move "Key" as "Keyboard" (opposed to "Keyframe") to same context. 2013-03-25 11:35:42 +00:00
Lukas Toenne
b58ffcce86 Fix #34758, another Crash with NodeGroup. Took a while to get to the bottom, but the root of the issue was that nested node groups (groups inside other groups) were ungrouped ("inlined") repeatedly. This lead to preview operations being added to the same group more than once, and the redundant preview operations (beside working on the same preview buffer) did not get their correct resolution set. This in turn would then lead to previews writing beyond allocated size and causing corrupted memory + crash.
Simple fix: don't expand node groups more than once.
2013-03-25 11:08:14 +00:00
Bastien Montagne
6926596174 More new data names translation (most cases should be covered now).
Also done a few cleanup here and there...
2013-03-25 08:29:06 +00:00
Campbell Barton
1b4c9e1ad4 beautify fill: skip testing invalid cases (2 triangles that _don't_ have 4 unique verts between them). 2013-03-25 04:48:30 +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
Antony Riakiotakis
153eea5f23 Fix #34730, set special brush rotation to zero if brush is not rake or
anchored.
2013-03-25 01:42:58 +00:00
Campbell Barton
5e7372a7ce cancel face/edge creation operator if nothing is done (so it wont register or do an undo push) 2013-03-25 01:25:46 +00:00
Campbell Barton
00e3aa529e patch [#34763] Center the View to the ZDepth Position under the Mouse Cursor
from Ralf Holzemer (cheleb)

use Fkey in object mode (since its a mode-less fly).
2013-03-25 01:11:16 +00:00
Antony Riakiotakis
ceb3225db7 Alpha mask textures porting part 1: Support for projective texturing.
Also add random mapping to brushes.
2013-03-25 01:00:16 +00:00
Campbell Barton
48a256c910 fix [#34745] TGA with size of 4Kx8K won't load
Checked the size limit on TGA files in svn history and this is was just an arbitrary limit that might have made sense some years back, but not now.
2013-03-24 20:59:53 +00:00
Andrea Weikert
ae1325c963 FIX: [#34467] File Browser Deletes Unselected Files
* delete now acts on selected file(s) rather than the highlighted file.
2013-03-24 19:29:49 +00:00
Campbell Barton
8bf206ce4b edit to 55549, replace fake click event with call to uiButActiveOnly().
also make it more clear args are for rna buttons.
2013-03-24 19:08:24 +00:00
Ton Roosendaal
d74cf43575 UI small fixes:
- Theme color for the brush popup was not correctly coded. Now it follows menu item
  style correctly, which also allows all the themes we have to give readable text.

- RMB cancel also added for slider buttons and the color picker.
2013-03-24 18:59:15 +00:00
Thomas Dinges
bf295c1c36 Code cleanup:
* Remove non used booleanops_mesh.c and header, got obsolete with Carve.
2013-03-24 18:14:38 +00:00
Ton Roosendaal
82ffa62e90 Small feature:
While using number sliders, you can now press RMB to cancel (like ESC)
2013-03-24 16:43:40 +00:00
Ton Roosendaal
1165236f69 Usablity:
In text editor, the CTRL+F find now opens property region (or keeps it) and
activates the search button for input.

That's already nice! But next step should be to do a search on exit of 
the button (or while typing). That's stuff I need Campbell to help with though.

Notes:
- Probably Py api for property buttons could get an "operator=" arg?
- The warning menu "not found" should go away
- I also suggest to make "wrap" search default for new editors
2013-03-24 13:43:40 +00:00
Tamito Kajiyama
385c72f5f2 Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
2013-03-24 12:13:13 +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
08aef8a7c8 code cleanup: move doxy docs from headers into source. also replace strncpy();str[len]=0 with BLI_strncpy() in BLI_stringdec(). 2013-03-24 01:51:54 +00:00
Campbell Barton
92d7955d13 fix for struct definition building with msvc2008 and some style cleanup. 2013-03-24 01:19:55 +00:00
Tamito Kajiyama
866d80bdf2 Removed a Freestyle-specific function call from bf_windowmanager.
Suggested by Sergey Sharybin through a code review of the branch.
2013-03-23 21:38:35 +00:00
Campbell Barton
224c7a273a code cleanup: quiet shadow warning. 2013-03-23 17:11:03 +00:00
Campbell Barton
5a87e4d255 code cleanup: remove unused button type HSVSLI 2013-03-23 16:03:13 +00:00
Ton Roosendaal
1c32b516f7 Theme fix:
Node Editor and Sequencer were not using grid theme color, but 'back'.

This commit adds versioning to copy background color to grid. I do this
without increasing sub-version, which allows to add correct drawing when
the subversion has to go up anyway for something else.
2013-03-23 12:46:07 +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
838c263be1 Constraint UI:
* Hide Script Constraint from UI, not functional.
* Alphabetical order fix for Motion tracking constraints.
2013-03-23 08:47:29 +00:00
Thomas Dinges
259880de6f Code cleanuo:
* Remove already commented "use_radiosity" flag from RNA. 
* Remove some commented exceptions for old 2.4x 3D View preview region. 
* Remove empty and commented function declarations from 2.4x UI times
2013-03-23 08:38:53 +00:00
Thomas Dinges
961df69526 Code cleanup:
* Remove already deprecated USER_DISABLE_AA flag from code, only commented DNA flag left.
2013-03-23 08:25:29 +00:00
Thomas Dinges
dd713654d5 Code cleanup:
* Use bpy.app.build_options for UI checks rather than custom ones.
2013-03-23 06:55:59 +00:00
Mitchell Stokes
2006103a52 OpenGL: Moving the GPU_pass_update_uniforms() call from GPU_material_bind_uniforms() to GPU_material_bind(). This way, material specific uniforms don't need to be resent when sending object specific uniforms. This saves uniform update calls in the BGE where one material is bound and multiple objects can be drawn. This doesn't offer much in the way of performance, but it cleans up our OpenGL usage a bit. One test scene went from 8k OpenGL calls to 4k with just this one change. 2013-03-23 03:11:48 +00:00
Mitchell Stokes
1356e3b490 BGE: getting rid of a few maybe-uninitialized warnings. 2013-03-23 03:04:02 +00:00
Tamito Kajiyama
62cede96d3 A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle.  Suggested
by Sergey Sharybin through a code review of the branch.

* Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific
DNA file specification and RNA for it built in Blender.  This will allow Freestyle
setting survive even when a non-Freestyle build is used for loading and saving
files.  It is noted that operations are still conditionally built through #ifdef
WITH_FREESTYLE blocks.

* To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have
been added.  All API functions in FRS_freestyle_config.h as well as some of those
in FRS_freestyle.h were moved to the new files.  Now the relocated API functions
have BKE_ prefix instead of FRS_.
2013-03-23 03:00:37 +00:00
Tamito Kajiyama
865e80f0f4 Fix for missing -DWITH_FREESTYLE. 2013-03-22 23:04:14 +00:00
Campbell Barton
dad877bc3b fix for BGE crash replicating a navmesh. 2013-03-22 20:19:55 +00:00
Miika Hamalainen
327f0a0f8e Fix [#34721]: Smoke adaptive domain threshold ignores high resolution data.
In some cases high resolution domain could have higher density than the low resolution counterpart, causing adaptive domain to clip off areas where density is still above domain threshold. Now also high resolution data is used to determine domain bounds.
2013-03-22 17:11:32 +00:00
Miika Hamalainen
4074768493 Fix [#34685]: Dynamic paint sub-steps don't work if brush is animated through parent chain longer than 2 objects.
Maximum number of parents updated is now 5. Hopefully this will be enough until Blender has better subframe sampling system.
2013-03-22 17:08:55 +00:00
Campbell Barton
cb1d26d794 code cleanup: shadowing, adjust type. 2013-03-22 15:47:02 +00:00
Lukas Toenne
750be44f31 Added missing node->id pointer checks in case node groups have unavailable node_tree data blocks. 2013-03-22 15:46:38 +00:00
Lukas Toenne
25fc8b3d76 Fix #34728, Int values in script Node can't be changed. Was caused by a bad typecast of the node socket default_value, which caused invalid value range. 2013-03-22 15:39:10 +00:00
Sergey Sharybin
16618bc3a8 Add missing comment for m_isResolutionSet 2013-03-22 14:54:02 +00:00
Sergey Sharybin
6e777ded99 Increase hard limit for prefetch frames to INT_MAX
Don't see why it could give issues to use large number
of frames to be prefetched, but just in case make it
unlimited hard limit and kept soft limit still at 500.
2013-03-22 14:41:52 +00:00
Campbell Barton
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
Pablo Vazquez
1d68c28541 spaces->tabs 2013-03-22 13:53:58 +00:00
Lukas Toenne
309c487b96 Fix for the use_hidden_preview setting in SpaceNode. The application of this flag to new nodes got lost during merges at some point. Also is now in the python node.add_node operator as well as the C function. 2013-03-22 13:08:37 +00:00
Pablo Vazquez
7f86b8afeb Nodes editor,
Draw an extra outline on hidden nodes that have custom colors, otherwise you can't recognize them unless you unhide.

Example: http://pasteall.org/pic/show.php?id=42359
2013-03-22 12:57:32 +00:00
Ton Roosendaal
fbdec13005 Bug fix #34405
On opening a text editor for first time, and use search (CTRL+F) the scrollers were not
correct initialized, so the view would jump a bit on redraw.
2013-03-22 12:00:29 +00:00
Ton Roosendaal
5fb95d5567 Bug fix #34726
Appending a group (which adds all object members to scene), didn't follow the
setting "In active layer".

One note: only the scene layers are copied over, not local view3d layers.
2013-03-22 11:14:04 +00:00
Lukas Toenne
70319509ba Node preview merge function now has an additional option "remove_old", which could be used if previous previews should be retained after recalculating (not used currently, old previews are dropped entirely for now, because it could be confusing).
Also moved the sync and merge for previews into the respective tree callbacks for consistency. This way the handling of previews can be changed for each tree type individually if necessary.
2013-03-22 10:34:52 +00:00
Sergey Sharybin
19476cead4 Enable previews for inactive compo output and viewer nodes.
This keeps old behavior and could be nice. However, it'll
make compositing slower  (doing final compo after editing
tree). This is easy to hide preview in this case, and also
i hope to implement percentage rendering soon.
2013-03-22 10:10:21 +00:00
Sergey Sharybin
88683ce71c Fix #34720: Sculpt mode T panel has no texture preview
Cycles was not able to render texture icons, same actually
goes to lux. Now made it so blender internal is used to render
icons for textures.
2013-03-22 09:42:16 +00:00
Sergey Sharybin
afe46eeb40 Fix #34689: Multilayer EXRs don't load correctly if one layer is named and the other is not
OpenEXR's ChannelList.layers() will not include empty layer names,
which caused the issue. Made it so if there's one non-empty layer
name, check for empty names happens.

If there's empty layer name in case one non-empty layer name, file
will be considered multilayer now.
2013-03-22 09:18:35 +00:00
Lukas Toenne
f11f6d179e Fix for compositor node preview sizes: Use the render output aspect ratio for estimating the required preview rect size instead of assuming a square, to avoid wasted space. Note that this does not work for newly added nodes until they have first been evaluated and a preview image has been generated (same behavior as before pynodes merge and associated preview changes). 2013-03-22 08:50:56 +00:00
Campbell Barton
75a5e239d7 correct enums which were in fact variables defined in headers. 2013-03-22 05:46:39 +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
e537fae726 fix error with merge operator not handing error cases properly (errors wouldn't cancel the operator as they should).
was mixing up OPERATOR_CANCELLED with 0.
2013-03-22 04:39:43 +00:00
Joshua Leung
b5b83ce601 Tweak to previous commit - make range check less strict so that indicators don't
flicker off so easily when target moves off screen
2013-03-22 03:25:31 +00:00
Joshua Leung
48b50ec154 Graph Editor: Draw indicators on the active Driver F-Curve which show the
relationship between the result of driver evaluation (NKEY region stuff) and the
end result applied to the driven properties.

Example:
http://www.pasteall.org/pic/47687
2013-03-22 02:28:55 +00:00
Dalai Felinto
5ef9a20671 BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material
Bug introduced on rev.36723
2013-03-21 23:20:46 +00:00
Campbell Barton
f254ba77fd code cleanup: conversion from blender to BGE was unnecessarily confusing in checking weather to use vertex colors,
move check to function.
2013-03-21 23:11:52 +00:00
Tamito Kajiyama
0fd8e638b6 Fix for default values different from the factory settings.
Suggested by IRIE Shinsuke through a code review of the branch.
2013-03-21 21:30:05 +00:00
Dalai Felinto
6d8b3d2d94 BGE bugfix: [#34550] getVertexArrayLength changed in 2.66
This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.

Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
2013-03-21 21:10:14 +00:00
Campbell Barton
b57fc113aa python api: add functionality to remove uv-texture layers. 2013-03-21 20:54:48 +00:00
Lukas Toenne
8ff3fa8ab2 Fix for Render Layers node, reported by Jason van Gumster (Fweeb) on IRC. The render layer operations need their RenderData pointer set. This was done for all connected output operations, but not for the preview operation which uses the image color layer. In case the image output is unconnected this leads to NULL pointer access. 2013-03-21 20:31:09 +00:00
Campbell Barton
fa1cd9ce9b python api: add functionality to remove vertex color layers.
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
	  since being in vertex-paint mode without a vertex color layer is supported.

also minor change to drawing camera limits while picking from previous commit.
2013-03-21 20:15:39 +00:00
Campbell Barton
21c55d5304 mist line can now be used for camera selection. 2013-03-21 18:57:05 +00:00
Lukas Toenne
9713d5e740 Fix for a node compatibility code bug (reported by kopias in IRC). Compatibility data (links with NULL fromnode/tonode pointers) was created for all node trees in library data, including local scene/material/... trees, but on loading was only actually removed for node groups. Now cleans up all trees in the library to be sure, and only generate new compat data for actual group trees. 2013-03-21 18:33:38 +00:00
Campbell Barton
245a9db713 patch [#34687] Patch for AutoMerge button in 3d editor
from Dan McGrath (dmcgrath)
2013-03-21 17:26:15 +00:00
Campbell Barton
fdc3b7dfef fix for own recent commit - added function into wrong side of ifdef 2013-03-21 16:06:46 +00:00
Campbell Barton
a8b6b5ec4c use clip alpha setting for empty-image drawing. 2013-03-21 15:43:05 +00:00
Sergey Sharybin
f3db38de56 Render border + crop will be handled correct in compositor now
This commit simply implements mapping from centered cropped canvas
to a full-frame coordinates, so operations like alpha-overing render
result on top of image will be properly aligned.
2013-03-21 15:26:41 +00:00
Campbell Barton
0b40266afc revert edit from r55461, causing build error on some systems. 2013-03-21 14:46:37 +00:00
Campbell Barton
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
Campbell Barton
dad7afa1af code cleanup: remove double call to BKE_node_instance_key(), rename ruler (lots of tools are 3d :)), and redundant assignment. 2013-03-21 14:16:55 +00:00
Campbell Barton
401fdf5065 py api: add Object.update_from_editmode(),
Useful for python exporters to avoid toggling editmode on export, moved into own function ED_object_editmode_load(obedit).
2013-03-21 14:12:04 +00:00
Lukas Toenne
fa0e2603f5 Add a little bit of space between socket layouts on nodes. 2013-03-21 13:21:18 +00:00
Lukas Toenne
8066c09df2 Fix for extra string width padding in ui_text_icon_width, causing labels in right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect. 2013-03-21 12:58:31 +00:00
Ton Roosendaal
0d7f7c253b Bug fix #34713
Using MultiSample, the code that inspects Z buffer values fail, like for grease pencil
drawing on "Surface".

It appears to me that all this depth draw/read code is ignoring gpu offscreen entirely.
This should be confirmed by Campbell though :)

I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.
2013-03-21 11:48:13 +00:00
Joshua Leung
67e54eb819 Bugfix: Transform autokey warning indicator text was getting clipped prematurely
After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.
2013-03-21 11:14:53 +00:00