blender-staging.git
7 years agocode cleanup: use `const char` for args and replace wm_keyconfig_list_find() -> BLI_f...
Campbell Barton [Sat, 13 Apr 2013 04:28:04 +0000 (04:28 +0000)]
code cleanup: use `const char` for args and replace wm_keyconfig_list_find() -> BLI_findstring()

7 years agocode cleanup: warnings + style
Campbell Barton [Sat, 13 Apr 2013 00:43:49 +0000 (00:43 +0000)]
code cleanup: warnings + style

7 years agoAllow rake/random brush rotation for random mapping mode. Some
Antony Riakiotakis [Fri, 12 Apr 2013 23:55:11 +0000 (23:55 +0000)]
Allow rake/random brush rotation for random mapping mode. Some
interesting things can be accomplished this way, such as tiger stripes
for instance.

7 years agoFixes:
Antony Riakiotakis [Fri, 12 Apr 2013 21:58:18 +0000 (21:58 +0000)]
Fixes:

* Overlay invalidation did not happen when changing brush, .either
through UI or through shortcuts
* Add initiliazation of curves before threaded overlay texture
evaluation or we may get memory leaks due to race conditions.

7 years agooversight on scons, this should fix.
Antony Riakiotakis [Fri, 12 Apr 2013 17:59:38 +0000 (17:59 +0000)]
oversight on scons, this should fix.

7 years agoAdd function to query maximum texture size. Also, make texture upload
Antony Riakiotakis [Fri, 12 Apr 2013 17:56:07 +0000 (17:56 +0000)]
Add function to query maximum texture size. Also, make texture upload
functions aware of this limit.

7 years agoPaint refactoring commit, non-disruptive (in theory :p)
Antony Riakiotakis [Fri, 12 Apr 2013 17:21:31 +0000 (17:21 +0000)]
Paint refactoring commit, non-disruptive (in theory :p)

* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:

Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:

These attributes/aspects are:

Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)

Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.

Properties that affect this are:

Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.

These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.

7 years agoAdd property update for radial control operator. It will be necessary
Antony Riakiotakis [Fri, 12 Apr 2013 15:45:44 +0000 (15:45 +0000)]
Add property update for radial control operator. It will be necessary
for upcoming overlay refresh commit, but since that commit is becoming
too big, better have this separate to avoid getting this lost in the
noise.

7 years agoFix for user count when adding a new library node tree. This needs to decrease user...
Lukas Toenne [Fri, 12 Apr 2013 15:42:16 +0000 (15:42 +0000)]
Fix for user count when adding a new library node tree. This needs to decrease user count by 1 to compensate for increment in RNA_property_pointer_set.

7 years agoFix #34322: cycles crash with (undo) save during threaded render. The mesh save
Brecht Van Lommel [Fri, 12 Apr 2013 15:33:09 +0000 (15:33 +0000)]
Fix #34322: cycles crash with (undo) save during threaded render. The mesh save
code was modifying pointers in the Mesh which gave crashes with another thread
accessing the data at the same time. This could crash other threaded operations
like blender internal render or physics baking too but was less likely.

As a solution I've now changed the save code that it does not modify the mesh
data structure in place but rather a copy, as undo file saving should probably
be fully read-only regardless of how an improved threading architecture might
work.

Thanks to Sergey for tracking down the cause of this crash.

7 years agoFix #34961: camera fly mode would reset camera scale.
Brecht Van Lommel [Fri, 12 Apr 2013 14:25:08 +0000 (14:25 +0000)]
Fix #34961: camera fly mode would reset camera scale.

7 years agoBlender is compilable with strict compiler flags again
Sergey Sharybin [Fri, 12 Apr 2013 13:01:50 +0000 (13:01 +0000)]
Blender is compilable with strict compiler flags again

7 years agoAdding scrollbar default to Python console and Python Info log.
Ton Roosendaal [Fri, 12 Apr 2013 12:30:05 +0000 (12:30 +0000)]
Adding scrollbar default to Python console and Python Info log.

7 years agoMore fixes for addon i18n messages management.
Bastien Montagne [Fri, 12 Apr 2013 12:19:50 +0000 (12:19 +0000)]
More fixes for addon i18n messages management.

7 years agoAdded 'move' functions to the inputs and outputs node socket collections (similar...
Lukas Toenne [Fri, 12 Apr 2013 12:19:22 +0000 (12:19 +0000)]
Added 'move' functions to the inputs and outputs node socket collections (similar to move function in CollectionProperty). This is useful to change the socket order in pynodes. Otherwise one would have to remember socket values and links, remove a socket, insert a new one and copy back these values, which is tedious and error prone.

7 years agominor edit to bake printouts which could get mixed because of \r.
Campbell Barton [Fri, 12 Apr 2013 12:03:56 +0000 (12:03 +0000)]
minor edit to bake printouts which could get mixed because of \r.

7 years agoRemoved a lot of now-unnecessary checks from node RNA. The typeinfo pointers in bNode...
Lukas Toenne [Fri, 12 Apr 2013 11:43:21 +0000 (11:43 +0000)]
Removed a lot of now-unnecessary checks from node RNA. The typeinfo pointers in bNodeTree, bNode and bNodeSocket are now always pointing to valid type structs. If a tree, node or socket has an unknown type at load time it will be pointed to a dummy "UndefinedType" struct instead, which has default settings and allows for nice debugging. Checking if node->typeinfo etc. is NULL is not necessary any more, makes code a lot easier and smaller.

7 years agoImage draw method option
Sergey Sharybin [Fri, 12 Apr 2013 10:52:47 +0000 (10:52 +0000)]
Image draw method option

This option replaces previously added GPU limit
option, which became tricky to follow after GLSL
display space conversion.

There're 4 modes available:
- AUTO which will try to guess which mode is
  best to use.
  Currently It'll try using GLSL and if it fails,
  will fallback to 2D textures.
  Probably it'll make sense checking on whether
  2D textures works well but currently such behavior
  shall be sufficient.
  Later we could make this method smarter (for example
  don't try to use GLSL on certain GPU or so).
- GLSL will currently behave the same way as AUTO,
  but it is intended to always try using GLSL
  (unless it can not be used because of existing
  limitation of dither and RGB curves).
- 2D Textures will use CPU-based color space conversion
  and use OGL 2D Texture to display the image.
  Image will be displayed in tiles, so there shall be
  no big GPU memory consumption.
- DrawPixels will straightly fallback to glDrawPixels
  without trying to use any fancy GPU stuff.

Hopefully this will also fix
#34943: Blender crashes when resizing the Compositing Screen Window

7 years agoadd render slot cycle forward/backwards menu items.
Campbell Barton [Fri, 12 Apr 2013 10:19:31 +0000 (10:19 +0000)]
add render slot cycle forward/backwards menu items.

7 years agoMade the update callback in bNodeTree registerable in RNA, this was still missing...
Lukas Toenne [Fri, 12 Apr 2013 08:43:08 +0000 (08:43 +0000)]
Made the update callback in bNodeTree registerable in RNA, this was still missing for pynodes. This update callback can be used for "global" updates of the node tree as a whole, as opposed to "local" updates of individual nodes. Any kind of update that takes node connections into account (such as dependency sorting) and does not just work on a single node should be done in the nodetree.update function rather than node.update.

7 years agoSmall change to the node space RNA function for opening a node group: pass the node...
Lukas Toenne [Fri, 12 Apr 2013 07:35:49 +0000 (07:35 +0000)]
Small change to the node space RNA function for opening a node group: pass the node tree as explicit argument plus an optional group node, instead of trying to get the node tree from a node property. This is more flexible for future nodes that want to change the node editor. Node group operators can rely on group node types, but the generic RNA functions should not.

7 years agofix for own recent addition of transform indervidual-axis in editmode, not working...
Campbell Barton [Fri, 12 Apr 2013 02:16:44 +0000 (02:16 +0000)]
fix for own recent addition of transform indervidual-axis in editmode, not working if the object was rotated.

7 years agobge fix: framing mode "Expanded" not updated when resizing blenderplayer
Dalai Felinto [Fri, 12 Apr 2013 01:52:30 +0000 (01:52 +0000)]
bge fix: framing mode "Expanded" not updated when resizing blenderplayer
now, with a 'resize' routine for the engine we can/should also recreate some
buffers that are created only at init time (e.g., 2d filters, dome fbos, ...).

This bug was always present in Blender (since 2.49 at least).

Bugfix supported by NF-UBC Nereus Program as part of the development
of OceanViz/NereusViz

7 years agocode cleanup: warnings and style.
Campbell Barton [Fri, 12 Apr 2013 00:50:40 +0000 (00:50 +0000)]
code cleanup: warnings and style.

7 years agoRelated to #34558: clarify the description for the "default" parameter in bpy.props...
Brecht Van Lommel [Thu, 11 Apr 2013 18:10:57 +0000 (18:10 +0000)]
Related to #34558: clarify the description for the "default" parameter in bpy.props.EnumProperty.

7 years agoCorrect stub for snapObjectsRayEx
Jens Verwiebe [Thu, 11 Apr 2013 15:40:57 +0000 (15:40 +0000)]
Correct stub for snapObjectsRayEx

7 years agoAdd stub for snapObjectsRayEx
Jens Verwiebe [Thu, 11 Apr 2013 15:35:16 +0000 (15:35 +0000)]
Add stub for snapObjectsRayEx

7 years agoAdd stub for snapObjectsRayEx
Jens Verwiebe [Thu, 11 Apr 2013 15:33:10 +0000 (15:33 +0000)]
Add stub for snapObjectsRayEx

7 years agoAnd another compile fix for Windows / scons for r55946.
Thomas Dinges [Thu, 11 Apr 2013 15:33:04 +0000 (15:33 +0000)]
And another compile fix for Windows / scons for r55946.

7 years agoCompile fix for r55970.
Thomas Dinges [Thu, 11 Apr 2013 15:21:03 +0000 (15:21 +0000)]
Compile fix for r55970.

7 years agoFix #34817: improve OpenGL preview render speed, it got quite a bit slower since...
Brecht Van Lommel [Thu, 11 Apr 2013 15:15:06 +0000 (15:15 +0000)]
Fix #34817: improve OpenGL preview render speed, it got quite a bit slower since 2.60.

Doing linearization with GLSL was already faster, but even faster is to just read the
bytes instead of floats and convert those to linear, since byte => float is just a quick
256 entry table lookup. Also made it assign the bytes directly to the image buffer so
they do not need to be converted back from float to byte for file saving, and made sky
render write the background color with OpenGL instead of doing it on the CPU.

7 years agoFix #34956: rendering animation with audio would crash with an older ffmpeg
Brecht Van Lommel [Thu, 11 Apr 2013 14:46:41 +0000 (14:46 +0000)]
Fix #34956: rendering animation with audio would crash with an older ffmpeg
after recent changes.

New ffmpeg versions accept align = 0 as a parameter and will set it to 1
automatically, but older ones need to pass align = 1.

7 years agoFix issue with bright frames appearing in clip editor when compositor is open.
Sergey Sharybin [Thu, 11 Apr 2013 14:15:52 +0000 (14:15 +0000)]
Fix issue with bright frames appearing in clip editor when compositor is open.

Allocate float buffer outside of image buffer,
so work-in-progress color space conversion doesn't
interfere with other parts of blender.

Covers most of cases -- since image buffer wouldn't
have partially-update float buffer all the rest
areas would be happy.

However, if there're places which updates float
buffer from byte buffer, it's still possible
some WIP color space conversion is displayed on
the screen.

But what a heck someone will do such a crappy
conversion anyway!

7 years agoFix #34954, due to hardcoded key release it was impossible to change key
Antony Riakiotakis [Thu, 11 Apr 2013 14:15:25 +0000 (14:15 +0000)]
Fix #34954, due to hardcoded key release it was impossible to change key
for sample color and exit the operator. Also tweaked stencil to behave
similarly, so it is now possible to assign custom keys to stencil
control.

7 years agoFix #34929: windows would show a "No disk in drive" error popup when one of the recen...
Brecht Van Lommel [Thu, 11 Apr 2013 14:13:20 +0000 (14:13 +0000)]
Fix #34929: windows would show a "No disk in drive" error popup when one of the recently opened files was on a DVD that's no longer there in the DVD drive.

7 years agoHide preview for nodes created with Setup Tracking Scene
Sergey Sharybin [Thu, 11 Apr 2013 13:34:51 +0000 (13:34 +0000)]
Hide preview for nodes created with Setup Tracking Scene

7 years agoSetup tracking scene shall work with Cycles now
Sergey Sharybin [Thu, 11 Apr 2013 13:29:51 +0000 (13:29 +0000)]
Setup tracking scene shall work with Cycles now

7 years agoAdded circle selection menu entry for lattice, pose and armature.
Konrad Kleine [Thu, 11 Apr 2013 13:29:01 +0000 (13:29 +0000)]
Added circle selection menu entry for lattice, pose and armature.

7 years agoFix for Setup Tracking Scene operator
Sergey Sharybin [Thu, 11 Apr 2013 13:25:05 +0000 (13:25 +0000)]
Fix for Setup Tracking Scene operator

- Ported to new node add operator
- Alpha mode shall be set to Transparent

7 years agoFix for material icon rendering with cycles
Sergey Sharybin [Thu, 11 Apr 2013 12:49:57 +0000 (12:49 +0000)]
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!

7 years agoFix #34923 Images that have their alpha calculated should not get de-premultiplied.
Antony Riakiotakis [Thu, 11 Apr 2013 12:37:33 +0000 (12:37 +0000)]
Fix #34923 Images that have their alpha calculated should not get de-premultiplied.

7 years agomake scene.ray_cast() behave like object.ray_cast(), add distance arg to snapObjectsR...
Campbell Barton [Thu, 11 Apr 2013 10:17:06 +0000 (10:17 +0000)]
make scene.ray_cast() behave like object.ray_cast(), add distance arg to snapObjectsRayEx().

7 years agopy api: minor change to operator attribute access, do identity comparison with None...
Campbell Barton [Thu, 11 Apr 2013 10:16:18 +0000 (10:16 +0000)]
py api: minor change to operator attribute access, do identity comparison with None (no functional change).

7 years agopy api:
Campbell Barton [Thu, 11 Apr 2013 09:57:26 +0000 (09:57 +0000)]
py api:

ray cast function, very useful to be able to cast rays into the scene for scripts.

  hit_co, hit_no, success = scene.ray_cast(start_co, end_co)

7 years agoUse SWS_FULL_CHR_H_INT for SWS context for more accurate conversion
Sergey Sharybin [Thu, 11 Apr 2013 09:37:52 +0000 (09:37 +0000)]
Use SWS_FULL_CHR_H_INT for SWS context for more accurate conversion

Suggestion by Bjeorn Sonnenschein from report #34755.

7 years agoFix #34948, bug in Cycles node groups. The proxy node maps used to identify external...
Lukas Toenne [Thu, 11 Apr 2013 09:16:36 +0000 (09:16 +0000)]
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.

7 years agofix [#34805] Bake action ignores parent motion
Campbell Barton [Thu, 11 Apr 2013 08:42:25 +0000 (08:42 +0000)]
fix [#34805] Bake action ignores parent motion

in fact this is more feature request.
add an option to bake a parented objects animation, then clear the parent and apply the action.

7 years agofix for crash in own recent commit. searchbox's need their own keynav state since...
Campbell Barton [Thu, 11 Apr 2013 08:33:19 +0000 (08:33 +0000)]
fix for crash in own recent commit. searchbox's need their own keynav state since they won't always be in a uiPopupBlockHandle.

7 years agofix [#34936] Unable to select items using only the arrow keys
Campbell Barton [Thu, 11 Apr 2013 02:28:34 +0000 (02:28 +0000)]
fix [#34936] Unable to select items using only the arrow keys

ignore small mouse motions for menu/search-box after using the keyboard to navigate.

7 years agoadd 2d length functions for testing pixel coords. len_manhattan_v2_int, len_manhattan...
Campbell Barton [Thu, 11 Apr 2013 02:23:45 +0000 (02:23 +0000)]
add 2d length functions for testing pixel coords. len_manhattan_v2_int, len_manhattan_v2v2_int

7 years agofix own mistake in recent inset-interpolation option, some faces were not interpolating.
Campbell Barton [Thu, 11 Apr 2013 00:23:09 +0000 (00:23 +0000)]
fix own mistake in recent inset-interpolation option, some faces were not interpolating.

7 years agofix [#34947] Alt-F Fill not working
Campbell Barton [Wed, 10 Apr 2013 23:59:37 +0000 (23:59 +0000)]
fix [#34947] Alt-F Fill not working
Regression in r54579.

7 years agocode cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_...
Campbell Barton [Wed, 10 Apr 2013 23:52:07 +0000 (23:52 +0000)]
code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin().

7 years agointerpolate verts as well as loops for inset.
Campbell Barton [Wed, 10 Apr 2013 23:25:44 +0000 (23:25 +0000)]
interpolate verts as well as loops for inset.
- add vertex option to BM_face_interp_from_face, also expose via python.

7 years agoFluid threads: re-add an erratically forgotten line, fix typo, set default threadcoun...
Jens Verwiebe [Wed, 10 Apr 2013 23:19:57 +0000 (23:19 +0000)]
Fluid threads: re-add an erratically forgotten line, fix typo, set default threadcount to logical threadcount of machine

7 years agoFluid threads: add a restore to former omp threadcount when baking is done, todo...
Jens Verwiebe [Wed, 10 Apr 2013 23:10:25 +0000 (23:10 +0000)]
Fluid threads: add a restore to former omp threadcount when baking is done, todo: default should be logical corecount

7 years agocorrection to own recent changes to exitmode using axis-matrix, fallback to old behav...
Campbell Barton [Wed, 10 Apr 2013 23:05:35 +0000 (23:05 +0000)]
correction to own recent changes to exitmode using axis-matrix, fallback to old behavior for editmodes where the axis-matrix isnt set (curve, surface, lattice)

7 years agocode cleanup: unused vars, make other vars static.
Campbell Barton [Wed, 10 Apr 2013 22:49:50 +0000 (22:49 +0000)]
code cleanup: unused vars, make other vars static.

7 years agoFix for a crash in the Bezier Curve geometry modifier.
Tamito Kajiyama [Wed, 10 Apr 2013 22:20:24 +0000 (22:20 +0000)]
Fix for a crash in the Bezier Curve geometry modifier.
Least-squares fitting parameters were stored in a fixed size array, causing a
buffer overflow depending on the number of input points.
Problem report with a .blend file to reproduce the issue and a bugfix patch by
christiankrupa and jensverwiebe on IRC, thanks a lot!
Many thanks also to Bastien Montagne for forwarding the problem report by email.

7 years ago* Better tooltip for WM_OT_properties_context_change.
Thomas Dinges [Wed, 10 Apr 2013 20:36:22 +0000 (20:36 +0000)]
* Better tooltip for WM_OT_properties_context_change.

7 years agoAdded to the Freestyle panel in the Render buttons a button to switch to the Render...
Tamito Kajiyama [Wed, 10 Apr 2013 20:20:20 +0000 (20:20 +0000)]
Added to the Freestyle panel in the Render buttons a button to switch to the Render Layers context.

7 years agoThe fluid threads setting is still WIP, for now fix compiling without openMP enabled
Jens Verwiebe [Wed, 10 Apr 2013 20:05:11 +0000 (20:05 +0000)]
The fluid threads setting is still WIP, for now fix compiling without openMP enabled

7 years agoAdd a gui control for setting omp threads in fluids
Jens Verwiebe [Wed, 10 Apr 2013 18:35:18 +0000 (18:35 +0000)]
Add a gui control for setting omp threads in fluids

7 years agoFix #34941: Space.draw_handler_add now supports PRE_VIEW and POST_VIEW callbacks
Brecht Van Lommel [Wed, 10 Apr 2013 16:59:55 +0000 (16:59 +0000)]
Fix #34941: Space.draw_handler_add now supports PRE_VIEW and POST_VIEW callbacks
for more editors: timeline, graph, action, NLA, sequencer, image, clip.

7 years agoOSX: remove the applescript and env var for omp_set_treads from plist
Jens Verwiebe [Wed, 10 Apr 2013 15:22:39 +0000 (15:22 +0000)]
OSX: remove the applescript and env var for omp_set_treads from plist

7 years agopy api: path_reference_copy() use try/except when copying images, can fail for odd...
Campbell Barton [Wed, 10 Apr 2013 12:16:27 +0000 (12:16 +0000)]
py api: path_reference_copy() use try/except when copying images, can fail for odd reasons (currently fails if the dest dir is a symlink and not using expected permissions).

7 years agopy api: simple function to get an image from an objects for simple formats that only...
Campbell Barton [Wed, 10 Apr 2013 11:43:25 +0000 (11:43 +0000)]
py api: simple function to get an image from an objects for simple formats that only support one image per object.

7 years agoalternate solution for r55921 which was calling invoke() from exec(), which shouldnt...
Campbell Barton [Wed, 10 Apr 2013 09:49:44 +0000 (09:49 +0000)]
alternate solution for r55921 which was calling invoke() from exec(), which shouldnt be done.

7 years agoCode cleanup.
Thomas Dinges [Wed, 10 Apr 2013 02:58:22 +0000 (02:58 +0000)]
Code cleanup.

7 years agoFix for [#34904] and [#34913]: broken Freestyle edge/face marks with modifiers.
Tamito Kajiyama [Wed, 10 Apr 2013 01:12:37 +0000 (01:12 +0000)]
Fix for [#34904] and [#34913]: broken Freestyle edge/face marks with modifiers.

7 years agoFix for the subtype of range_min/max parameters in RNA Freestyle settings.
Tamito Kajiyama [Wed, 10 Apr 2013 00:20:05 +0000 (00:20 +0000)]
Fix for the subtype of range_min/max parameters in RNA Freestyle settings.
These parameters specify a distance in Blender units, so PROP_DISTANCE is more appropriate.
Suggested by Bastien Montagne through personal communications, thanks!

7 years agoFix for [#34934] Freestyle options are in wrong tab.
Tamito Kajiyama [Tue, 9 Apr 2013 23:54:11 +0000 (23:54 +0000)]
Fix for [#34934] Freestyle options are in wrong tab.

Added a label to guide users to line style settings in the Render Layers context
(in line with the similar labels found in the Cloth and Soft Body modifier panels),
so that Freestyle options per render layer can be more easily found.

7 years agoFix 34764: cycles issue rendering instanced mesh with NaN coordinates.
Brecht Van Lommel [Tue, 9 Apr 2013 20:48:53 +0000 (20:48 +0000)]
Fix 34764: cycles issue rendering instanced mesh with NaN coordinates.

7 years agoFix scons compile after GHOST_Sizer commit
Jens Verwiebe [Tue, 9 Apr 2013 18:58:01 +0000 (18:58 +0000)]
Fix scons compile after GHOST_Sizer commit

7 years agoFix #34938: Not freeing dynstr_cstring memory blocks when setting shape keys
Sergey Sharybin [Tue, 9 Apr 2013 17:31:34 +0000 (17:31 +0000)]
Fix #34938: Not freeing dynstr_cstring memory blocks when setting shape keys

In fact almost any rna pointer-to-string had a memory leak.

Patch by Jakub Zolcik (sftd) with minor modification.

7 years agoLive window resizing on Windows
Alexander Kuznetsov [Tue, 9 Apr 2013 17:21:05 +0000 (17:21 +0000)]
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.

7 years agoFixes for sequencer effects
Sergey Sharybin [Tue, 9 Apr 2013 16:20:24 +0000 (16:20 +0000)]
Fixes for sequencer effects

- Add and subtract effects will now affect on only RGB channels,
  and alpha of first input is used as an alpha for the result.

  Also solved creepyness with straight->premul->straight conversion
  in byte versions of add/subtract.

- Solved issue with multiply modifier, which lead to white*white
  not being white (was off by 1.0/255) due to wrong optimization
  of division by 255 with shr by 8.

  According to Ton this issue goes back to 2000!

This fixes #34811: Wrong result of add/subtract effects

7 years agoFix #34932: drivers on world nodes not updating on frame changes.
Brecht Van Lommel [Tue, 9 Apr 2013 15:30:15 +0000 (15:30 +0000)]
Fix #34932: drivers on world nodes not updating on frame changes.

7 years agoFix #34740: cycles rendering issue mixing glossy/glass BSDF's with zero or very
Brecht Van Lommel [Tue, 9 Apr 2013 15:24:20 +0000 (15:24 +0000)]
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.

7 years agotemporary fix for saving custom template files similar to startup .blend file
Gaia Clary [Tue, 9 Apr 2013 15:18:31 +0000 (15:18 +0000)]
temporary fix for saving custom template files similar to startup .blend file

7 years agoVarious edits preparing addons' translations tools (not everything yet functionnal...
Bastien Montagne [Tue, 9 Apr 2013 08:56:35 +0000 (08:56 +0000)]
Various edits preparing addons' translations tools (not everything yet functionnal/tested, though).

Also workaround a nasty bug, where unregistered py classes remain listed in relevant __subclasses__() calls, which would lead to crash with python addons i18n tools (main translation was not affected, as messages extracting tools are executed in a brand new "factory startup" Blender ;) ).

7 years agoBGE: Non-mesh objects (lamps, empties, group instances, etc.) are now "No Collision...
Mitchell Stokes [Tue, 9 Apr 2013 05:02:10 +0000 (05:02 +0000)]
BGE: Non-mesh objects (lamps, empties, group instances, etc.) are now "No Collision" by default.

7 years agorigidbody operators poll functions were mixing up CTX_data_active_object/ED_object_ac...
Campbell Barton [Tue, 9 Apr 2013 01:43:39 +0000 (01:43 +0000)]
rigidbody operators poll functions were mixing up CTX_data_active_object/ED_object_active_context.
- replace ED_operator_rigidbody_add_poll with ED_operator_object_active_editable_mesh
- replace ED_operator_rigidbody_active_poll with ED_operator_scene_editable for operators that use the entire selection.
- remove rigid-body from objects that are converted from meshes to curves, while this isnt crashing it is confusing to see in the UI.

7 years agocode cleanup: abbreviations ob, con - aren't normally used in global identifiers.
Campbell Barton [Tue, 9 Apr 2013 01:36:44 +0000 (01:36 +0000)]
code cleanup: abbreviations ob, con - aren't normally used in global identifiers.

7 years agoPressing Ctrl+R when blender was built without bullet would crash.
Campbell Barton [Tue, 9 Apr 2013 00:57:47 +0000 (00:57 +0000)]
Pressing Ctrl+R when blender was built without bullet would crash.
- add checks so rigid-body operators only return FINISHED when they make some changes to the scene.
- remove (scene == NULL) checks, poll already catches these.

7 years agoAttempt to fix a potential name conflict between Freestyle and the compositor.
Tamito Kajiyama [Tue, 9 Apr 2013 00:46:49 +0000 (00:46 +0000)]
Attempt to fix a potential name conflict between Freestyle and the compositor.

A crash in the Freestyle renderer was reported by Ton on IRC with a stack trace
below.  Note that #2 is in Freestyle, whereas #1 is in the compositor.  The problem
was observed in a debug build on OS X 10.7 (gcc 4.2, openmp disabled, no llvm).

----------------------------------------------------------------------
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
[Switching to process 72386 thread 0xf303]
0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
43 delete (this->m_outputsockets.back());
Current language:  auto; currently c++
(gdb) where
#0  0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
#1  0x0000000100c29066 in Node::~Node (this=0x10e501c80) at COM_Node.h:49
#2  0x000000010089c273 in NodeShape::~NodeShape (this=0x10e501c80) at NodeShape.cpp:43
#3  0x000000010089910b in NodeGroup::destroy (this=0x10e501da0) at NodeGroup.cpp:61
#4  0x00000001008990cd in NodeGroup::destroy (this=0x10e5014b0) at NodeGroup.cpp:59
#5  0x00000001008990cd in NodeGroup::destroy (this=0x114e18da0) at NodeGroup.cpp:59
#6  0x00000001007e6602 in Controller::ClearRootNode (this=0x114e19640) at Controller.cpp:329
#7  0x00000001007ea52e in Controller::LoadMesh (this=0x114e19640, re=0x10aba4638, srl=0x1140f5258) at Controller.cpp:302
#8  0x00000001008030ad in prepare (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:302
#9  0x000000010080457a in FRS_do_stroke_rendering (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:600
#10 0x00000001006aeb9d in add_freestyle (re=0x10aba4638) at pipeline.c:1584
#11 0x00000001006aceb7 in do_render_3d (re=0x10aba4638) at pipeline.c:1094
#12 0x00000001006ae061 in do_render_fields_blur_3d (re=0x10aba4638) at pipeline.c:1367
#13 0x00000001006afa16 in do_render_composite_fields_blur_3d (re=0x10aba4638) at pipeline.c:1815
#14 0x00000001006b04e4 in do_render_all_options (re=0x10aba4638) at pipeline.c:2021
----------------------------------------------------------------------

Apparently a name conflict between the two Blender modules is taking place.
The present commit hence intends to address it by putting all the Freestyle C++
classes in the namespace 'Freestyle'.  This revision will also prevent potential
name conflicts with other Blender modules in the future.

Special thanks to Lukas Toenne for the help with C++ namespace.

7 years agofix [#34902] Unicode decode error in Python console when completing a method name...
Campbell Barton [Tue, 9 Apr 2013 00:42:01 +0000 (00:42 +0000)]
fix [#34902] Unicode decode error in Python console when completing a method name of text object in edit mode

7 years agofix for error in recent changes to beautify, clear edge tags before use.
Campbell Barton [Tue, 9 Apr 2013 00:07:47 +0000 (00:07 +0000)]
fix for error in recent changes to beautify, clear edge tags before use.

7 years agoFix #34921: cycles rendered a specific scene with a small high poly object
Brecht Van Lommel [Mon, 8 Apr 2013 20:04:03 +0000 (20:04 +0000)]
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.

7 years agoCompatibility and robustness:
Antony Riakiotakis [Mon, 8 Apr 2013 19:56:38 +0000 (19:56 +0000)]
Compatibility and robustness:

* Make masking depend on texture mode only if there's an actual texture
present
* New stroke system uses diameter to calculate stroke spacing, while old
texture painting brushes and system used radius. So divide spacing of
brushes in old files to half. Since I expect trunk users to have already
adapted this, I do this for an old subversion of blender.

7 years agoFix #34875: 0 digits of precision was not supported for FloatProperty, now
Brecht Van Lommel [Mon, 8 Apr 2013 18:55:08 +0000 (18:55 +0000)]
Fix #34875: 0 digits of precision was not supported for FloatProperty, now
you can specify precision=0 for this, and use -1 for the default 2.

7 years agoBundle adjustment improvements
Sergey Sharybin [Mon, 8 Apr 2013 17:05:52 +0000 (17:05 +0000)]
Bundle adjustment improvements

- Get rid of rotation matrix parameterization,
  use angle-axis instead.

  Also Joined rotation and translation into a
  single parameter block.

  This made minimization go significantly faster,
  like 1.3x times in average.

- Fix first camera when bundling. This is to
  address orientation ambiguity.

  Reconstruction result could still vary in
  size, but that's another issue to be addressed
  later.

Additional change:

Split EuclideanBundleCommonIntrinsics into
smaller functions, so it's now a bit easier
to follow.

7 years agoUpdate ceres to current upstream version
Sergey Sharybin [Mon, 8 Apr 2013 17:05:48 +0000 (17:05 +0000)]
Update ceres to current upstream version

Brings fixes for BLAS.

7 years agoTexture tools robustness:
Antony Riakiotakis [Mon, 8 Apr 2013 15:42:13 +0000 (15:42 +0000)]
Texture tools robustness:
* Pressing x or y to scale overlay immediately presents visual feedback
instead of requiring mouse motion
* Hide the ovelay icon when stencil is active since you can't deactivate
then.

7 years agoFix #34908: compressed DDS files did not display properly when their mipmap levels
Brecht Van Lommel [Mon, 8 Apr 2013 15:39:38 +0000 (15:39 +0000)]
Fix #34908: compressed DDS files did not display properly when their mipmap levels
did not go down to 1x1 image size, need to set GL_TEXTURE_MAX_LEVEL then.

7 years agoA few more UI messages fixes...
Bastien Montagne [Mon, 8 Apr 2013 13:19:50 +0000 (13:19 +0000)]
A few more UI messages fixes...

7 years agofix for bug where notifiers could hold pointers to freed data which listeners would...
Campbell Barton [Mon, 8 Apr 2013 13:03:04 +0000 (13:03 +0000)]
fix for bug where notifiers could hold pointers to freed data which listeners would operate on.

7 years agorewind part of r55893, smooth-view for pan was annoying with mousewheel.
Campbell Barton [Mon, 8 Apr 2013 11:45:20 +0000 (11:45 +0000)]
rewind part of r55893, smooth-view for pan was annoying with mousewheel.

7 years ago2D stabilization default filter to bilinear
Sergey Sharybin [Mon, 8 Apr 2013 11:26:56 +0000 (11:26 +0000)]
2D stabilization default filter to bilinear

7 years agoCamera stabilization fixes and improvements
Sergey Sharybin [Mon, 8 Apr 2013 10:56:50 +0000 (10:56 +0000)]
Camera stabilization fixes and improvements

- Nearest interpolation was always used when there's
  no rotation for stabilization. Was a failure of
  optimization heuristic.

- Made 2d stabilization frame acquiring threaded.
  This function is only used for display and sequencer
  which will only benefit of threads here.

- Fixed bug introduced in r48749 which lead to
  re-making stable frame on every redraw.