7 years agocorrect too-big allocation in mesh beautify.
Campbell Barton [Mon, 1 Apr 2013 07:57:33 +0000 (07:57 +0000)]
correct too-big allocation in mesh beautify.

7 years agoFix #34819: Background image gets pixelated when zooming in
Sergey Sharybin [Mon, 1 Apr 2013 07:50:51 +0000 (07:50 +0000)]
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.

7 years agoDraw relationship lines for rigid body constraints
Sergej Reich [Sun, 31 Mar 2013 19:52:37 +0000 (19:52 +0000)]
Draw relationship lines for rigid body constraints

Makes it easier to see what's connected to what.

7 years agoFix for [#34821] Split Viewer node won't show the backdrop
Thomas Dinges [Sun, 31 Mar 2013 19:46:11 +0000 (19:46 +0000)]
Fix for [#34821] Split Viewer node won't show the backdrop
* Regression introduced in r55451

7 years agoFix typo in recent i18n changes
Sergej Reich [Sun, 31 Mar 2013 17:41:22 +0000 (17:41 +0000)]
Fix typo in recent i18n changes

Broke rigid body buttons in physics tab.

7 years agoChanges to Stencil control:
Antony Riakiotakis [Sun, 31 Mar 2013 16:17:18 +0000 (16:17 +0000)]
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

* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)

7 years agooptimize away reloading of brush texture when rotating the stencil
Antony Riakiotakis [Sun, 31 Mar 2013 11:20:30 +0000 (11:20 +0000)]
optimize away reloading of brush texture when rotating the stencil

7 years agoUI cleanup:
Antony Riakiotakis [Sun, 31 Mar 2013 11:04:13 +0000 (11:04 +0000)]
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.

7 years agostyle cleanup
Campbell Barton [Sun, 31 Mar 2013 03:28:46 +0000 (03:28 +0000)]
style cleanup

7 years agoCycles / Shader Graph optimization:
Thomas Dinges [Sun, 31 Mar 2013 01:18:10 +0000 (01:18 +0000)]
Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected.
This way we save some render time for complex node graphs.

Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this.

This only affects SVM, OSL was already doing these optimizations.

7 years agoWoot woot commit.
Antony Riakiotakis [Sun, 31 Mar 2013 00:38:50 +0000 (00:38 +0000)]
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

7 years agoElbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems
Daniel Genrich [Sat, 30 Mar 2013 20:50:28 +0000 (20:50 +0000)]
Elbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems

7 years agoTidy up stroke options and make them sexy, aka the paint option
Antony Riakiotakis [Sat, 30 Mar 2013 11:40:09 +0000 (11:40 +0000)]
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.

7 years agoBeautify - use a heap for the edge rotation queue rather then checking to rotate...
Campbell Barton [Sat, 30 Mar 2013 11:05:57 +0000 (11:05 +0000)]
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.

7 years agocode cleanup: move beauty fill calculation into its own function and some style cleanup
Campbell Barton [Sat, 30 Mar 2013 09:57:35 +0000 (09:57 +0000)]
code cleanup: move beauty fill calculation into its own function and some style cleanup

7 years agocode comments: bmesh operator doxy header descriptions.
Campbell Barton [Sat, 30 Mar 2013 08:54:50 +0000 (08:54 +0000)]
code comments: bmesh operator doxy header descriptions.

7 years agoCompile fix for recent OCIO commit, missing GLEW include.
Thomas Dinges [Fri, 29 Mar 2013 16:17:22 +0000 (16:17 +0000)]
Compile fix for recent OCIO commit, missing GLEW include.

7 years agoImplement GPU-side display transform for clip editor
Sergey Sharybin [Fri, 29 Mar 2013 16:02:27 +0000 (16:02 +0000)]
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.

7 years agoSlight cleanup for 2d painting. Cache is always enabled (used one of the
Antony Riakiotakis [Fri, 29 Mar 2013 15:18:22 +0000 (15:18 +0000)]
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.

7 years agoSupport for brush overlay in texture paint mode. For the image editor,
Antony Riakiotakis [Fri, 29 Mar 2013 14:02:28 +0000 (14:02 +0000)]
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.

7 years agoremove unused GLUquadricObj in draw_manipulator_rotate()
Campbell Barton [Fri, 29 Mar 2013 11:44:52 +0000 (11:44 +0000)]
remove unused GLUquadricObj in draw_manipulator_rotate()

7 years agofix/workaround [#34346] Blender total crashes when File/User preferences twice and...
Campbell Barton [Fri, 29 Mar 2013 07:14:18 +0000 (07:14 +0000)]
fix/workaround [#34346] Blender total crashes when File/User preferences twice and go to System tab

7 years agomisc minor edits.
Campbell Barton [Fri, 29 Mar 2013 06:25:22 +0000 (06:25 +0000)]
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.

7 years agostyle cleanup
Campbell Barton [Fri, 29 Mar 2013 06:21:28 +0000 (06:21 +0000)]
style cleanup

7 years agominor improvement to edge-angle-drawing, when transforming verts draw the angle of...
Campbell Barton [Fri, 29 Mar 2013 04:38:10 +0000 (04:38 +0000)]
minor improvement to edge-angle-drawing, when transforming verts draw the angle of the opposite edge since this is the angle thats being changed.

7 years agoadd edge-angle drawing in editmode for manifold edges.
Campbell Barton [Fri, 29 Mar 2013 04:01:52 +0000 (04:01 +0000)]
add edge-angle drawing in editmode for manifold edges.

7 years agominor fix for annoyance with directory selection on windows.
Campbell Barton [Fri, 29 Mar 2013 01:34:04 +0000 (01:34 +0000)]
minor fix for annoyance with directory selection on windows.

selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.

7 years agocode cleanup: quiet warnings building with mingw.
Campbell Barton [Fri, 29 Mar 2013 00:50:52 +0000 (00:50 +0000)]
code cleanup: quiet warnings building with mingw.

7 years agoCode cleanup / Sequencer:
Thomas Dinges [Thu, 28 Mar 2013 22:09:55 +0000 (22:09 +0000)]
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.

7 years agofix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame
Campbell Barton [Thu, 28 Mar 2013 20:58:14 +0000 (20:58 +0000)]
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.

7 years agodon't save select extend state for marker selection.
Campbell Barton [Thu, 28 Mar 2013 20:34:12 +0000 (20:34 +0000)]
don't save select extend state for marker selection.

7 years agoUse same opencollada rev as windows' libs.
Bastien Montagne [Thu, 28 Mar 2013 20:24:36 +0000 (20:24 +0000)]
Use same opencollada rev as windows' libs.

7 years agocode cleanup: python/pep8 and double-promotion warnings.
Campbell Barton [Thu, 28 Mar 2013 19:33:14 +0000 (19:33 +0000)]
code cleanup: python/pep8 and double-promotion warnings.

7 years agoscon update for new collada libraries
Gaia Clary [Thu, 28 Mar 2013 18:04:07 +0000 (18:04 +0000)]
scon update for new collada libraries

7 years agoUpdated Blender Collada module to newest opencollada API
Gaia Clary [Thu, 28 Mar 2013 18:03:01 +0000 (18:03 +0000)]
Updated Blender Collada module to newest opencollada API

7 years agomodified build system for updated opencollada libraries (windows only, other platform...
Gaia Clary [Thu, 28 Mar 2013 18:02:24 +0000 (18:02 +0000)]
modified build system for updated opencollada libraries (windows only, other platforms might want to update as well)

7 years agoI18n: various fixing.
Bastien Montagne [Thu, 28 Mar 2013 15:41:43 +0000 (15:41 +0000)]
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"...).

7 years agoI18n: fix/enhance how predefined contexts are handled in py code. Now they should...
Bastien Montagne [Thu, 28 Mar 2013 15:03:47 +0000 (15:03 +0000)]
I18n: fix/enhance how predefined contexts are handled in py code. Now they should be specified by an attribute with the same name as the one in named tuple (i18n_contexts.default, .id_windowmanager, etc.).

This way, i18n message extracting code is now able to get the right context!

7 years agoFix for node groups, now exposing a socket will copy the default value from internal...
Lukas Toenne [Thu, 28 Mar 2013 10:32:04 +0000 (10:32 +0000)]
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.

7 years agoFix #34782: Video Editor - Substract after transform fails
Sergey Sharybin [Thu, 28 Mar 2013 08:21:29 +0000 (08:21 +0000)]
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.

7 years agofix [#34636] not run on startup file loading after splashs...
Campbell Barton [Thu, 28 Mar 2013 06:36:09 +0000 (06:36 +0000)]
fix [#34636] not run on startup file loading after splashscreen

7 years agoFix #34773: smooth brush used on a shape key messes up the topology
Sergey Sharybin [Thu, 28 Mar 2013 06:11:32 +0000 (06:11 +0000)]
Fix #34773: smooth brush used on a shape key messes up the topology

Key block update was missing coordinates for hidden vertices.

7 years agoBMesh: make the context create operator (Fkay) more logical, before calling each...
Campbell Barton [Thu, 28 Mar 2013 06:01:58 +0000 (06:01 +0000)]
BMesh: make the context create operator (Fkay) more logical, before calling each operator check the state that it can even run and do something.

7 years agoown error in recent commit, uninitialized variable.
Campbell Barton [Thu, 28 Mar 2013 05:51:32 +0000 (05:51 +0000)]
own error in recent commit, uninitialized variable.

7 years agofix for loosing recent-files when running 'Copy Previous Settings'.
Campbell Barton [Thu, 28 Mar 2013 02:29:10 +0000 (02:29 +0000)]
fix for loosing recent-files when running 'Copy Previous Settings'.

7 years agoFix typo with non-system bullet.
Antony Riakiotakis [Thu, 28 Mar 2013 00:58:50 +0000 (00:58 +0000)]
Fix typo with non-system bullet.

7 years agoworkaround for crash when accessing vertex colors in editmode,
Campbell Barton [Wed, 27 Mar 2013 23:48:35 +0000 (23:48 +0000)]
workaround for crash when accessing vertex colors in editmode,
just disallow vertex color access in editmode as is done with UV's.

7 years agostyle cleanup: osl and NULL pointer use, also correct sequencer gap operator id's
Campbell Barton [Wed, 27 Mar 2013 20:27:07 +0000 (20:27 +0000)]
style cleanup: osl and NULL pointer use, also correct sequencer gap operator id's

7 years agoCycles / SunSky:
Thomas Dinges [Wed, 27 Mar 2013 19:44:25 +0000 (19:44 +0000)]
Cycles / SunSky:
* Use already calculated theta^2 for theta^3 calculation.

7 years agoI18n fixes for C panels & menus (we have to specify the default bpyrna context here...
Bastien Montagne [Wed, 27 Mar 2013 19:09:50 +0000 (19:09 +0000)]
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).

7 years agoCode cleanup / Cycles:
Thomas Dinges [Wed, 27 Mar 2013 19:08:29 +0000 (19:08 +0000)]
Code cleanup / Cycles:
* Remove unused variable from noise_wave().

7 years agoCMake fix: OpenEXR and Tiff are linking dependencies of OIIO, and fix for Boost-Cycle...
Dalai Felinto [Wed, 27 Mar 2013 18:44:46 +0000 (18:44 +0000)]
CMake fix: OpenEXR and Tiff are linking dependencies of OIIO, and fix for Boost-Cycles-OIIO order

The NOT BOOST test was changing Cycles so should be before the
cycles-oiio link (by Campbell Barton, thanks)

And exr and tiff are required for oiio (on OSX at least)

7 years agoSequencer
Ton Roosendaal [Wed, 27 Mar 2013 18:31:18 +0000 (18:31 +0000)]

"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.

7 years agoNode Editor
Ton Roosendaal [Wed, 27 Mar 2013 18:28:25 +0000 (18:28 +0000)]
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 [

7 years agoFix for Node Editor tool "Find next/prev of same type".
Ton Roosendaal [Wed, 27 Mar 2013 17:22:12 +0000 (17:22 +0000)]
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 ]

7 years agoFix #34785: only one curve cap is visible while backface culling is enabled
Sergey Sharybin [Wed, 27 Mar 2013 16:33:49 +0000 (16:33 +0000)]
Fix #34785: only one curve cap is visible while backface culling is enabled

Simply extra normals flip happened.

7 years agoBug report #34775
Ton Roosendaal [Wed, 27 Mar 2013 13:28:51 +0000 (13:28 +0000)]
Bug report #34775

Packed file print was misleading (no files packed).
It should be "no new files packed".

7 years agoTiny fix for sequencer:
Ton Roosendaal [Wed, 27 Mar 2013 12:29:00 +0000 (12:29 +0000)]
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.

7 years agoFix #34779: Channels disappear from multilayer exr sequence
Sergey Sharybin [Wed, 27 Mar 2013 11:26:10 +0000 (11:26 +0000)]
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.

7 years agoapi cleanup: replace BMO_vert_edge_flags_count() with more reusable function - BMO_it...
Campbell Barton [Wed, 27 Mar 2013 10:14:09 +0000 (10:14 +0000)]
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.

7 years agoFix for timing print in renders.
Ton Roosendaal [Wed, 27 Mar 2013 10:05:31 +0000 (10:05 +0000)]
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.

7 years agoFix [#34768] Out of bounds access in console selection.
Irie Shinsuke [Wed, 27 Mar 2013 09:57:34 +0000 (09:57 +0000)]
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.

7 years agoWhy oh why makesrna is split into two separate scons files..
Sergey Sharybin [Wed, 27 Mar 2013 08:06:07 +0000 (08:06 +0000)]
Why oh why makesrna is split into two separate scons files..

Fixed missing audio devices when building with scons

7 years agofix for mesh face filling when a valid edge-loop was selected but unselected connecti...
Campbell Barton [Wed, 27 Mar 2013 07:54:11 +0000 (07:54 +0000)]
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.

7 years agoFix #33518: Jack sync doesn't work in 2.64, 2.64 or 2.65 stable versions
Sergey Sharybin [Wed, 27 Mar 2013 07:19:54 +0000 (07:19 +0000)]
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

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.

7 years agoapi cleanup: move edgenet bmesh operator into its own file.
Campbell Barton [Wed, 27 Mar 2013 06:49:16 +0000 (06:49 +0000)]
api cleanup: move edgenet bmesh operator into its own file.

7 years agoapi cleanup: split part of BM_face_create_ngon_vcloud() into a new function BM_face_c...
Campbell Barton [Wed, 27 Mar 2013 05:52:28 +0000 (05:52 +0000)]
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.

7 years agocode cleanup: quiet shadow warnings
Campbell Barton [Wed, 27 Mar 2013 04:41:20 +0000 (04:41 +0000)]
code cleanup: quiet shadow warnings

7 years agofix [#34776] Linking the group in this .blend causes crash with this starting scene
Campbell Barton [Tue, 26 Mar 2013 23:46:54 +0000 (23:46 +0000)]
fix [#34776] Linking the group in this .blend causes crash with this starting scene

disallow linked objects to be in editmode.

7 years agostyle cleanup
Campbell Barton [Tue, 26 Mar 2013 22:45:06 +0000 (22:45 +0000)]
style cleanup

7 years agomove FOREACH_NODETREE internal checks into functions.
Campbell Barton [Tue, 26 Mar 2013 22:37:41 +0000 (22:37 +0000)]
move FOREACH_NODETREE internal checks into functions.

7 years agoPaint system:
Antony Riakiotakis [Tue, 26 Mar 2013 21:34:39 +0000 (21:34 +0000)]
Paint system:
Random texture mapping
* Support for 2d painting.
* Better random generation and useof the result.

7 years agoreport [#34772] Incorrect aspect for tex mapping from camera view
Campbell Barton [Tue, 26 Mar 2013 21:26:44 +0000 (21:26 +0000)]
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.

7 years agouv project tool: take scene aspect into account when calculating the camera bounds.
Campbell Barton [Tue, 26 Mar 2013 20:51:43 +0000 (20:51 +0000)]
uv project tool: take scene aspect into account when calculating the camera bounds.

7 years agosequencer gaps
Campbell Barton [Tue, 26 Mar 2013 20:34:13 +0000 (20:34 +0000)]
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')

7 years agoBug fix - own collection.
Ton Roosendaal [Tue, 26 Mar 2013 17:49:57 +0000 (17:49 +0000)]
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.

7 years agoFix regression introduced by svn rev55545
Sergey Sharybin [Tue, 26 Mar 2013 15:52:43 +0000 (15:52 +0000)]
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?

7 years agoWrong soft/hard limits used in r55600
Sergey Sharybin [Tue, 26 Mar 2013 15:48:20 +0000 (15:48 +0000)]
Wrong soft/hard limits used in r55600

7 years agoSequencer usability:
Ton Roosendaal [Tue, 26 Mar 2013 15:00:56 +0000 (15:00 +0000)]
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).

7 years agoI18n: various "new data translation" fixes...
Bastien Montagne [Tue, 26 Mar 2013 14:33:53 +0000 (14:33 +0000)]
I18n: various "new data translation" fixes...

7 years agoCorrection to recent prefetch commit
Sergey Sharybin [Tue, 26 Mar 2013 12:45:10 +0000 (12:45 +0000)]
Correction to recent prefetch commit

When using movie as a clip no need to prefetch in cases
no proxies are sued at this moment.

7 years agoBetter fix for "To Sphere" crashing in Image editor. It appeared to be in use for
Ton Roosendaal [Tue, 26 Mar 2013 10:28:19 +0000 (10:28 +0000)]
Better fix for "To Sphere" crashing in Image editor. It appeared to be in use for
mask/uv modes.

7 years agogrease pencil eraser mouse-wheel resize was inverted compared to circle-select.
Campbell Barton [Tue, 26 Mar 2013 07:44:48 +0000 (07:44 +0000)]
grease pencil eraser mouse-wheel resize was inverted compared to circle-select.

7 years agogrease pencil xray option wasn't being applied to single points in the 3d view.
Campbell Barton [Tue, 26 Mar 2013 07:41:59 +0000 (07:41 +0000)]
grease pencil xray option wasn't being applied to single points in the 3d view.

7 years agostyle cleanup:
Campbell Barton [Tue, 26 Mar 2013 07:29:01 +0000 (07:29 +0000)]
style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.

7 years agofix [#34658] GreasePencil eraser deletes strokes through geometry, surfacemode
Campbell Barton [Tue, 26 Mar 2013 06:07:21 +0000 (06:07 +0000)]
fix [#34658] GreasePencil eraser deletes strokes through geometry, surfacemode

add depth check to grease pencil eraser when xray option is disabled.

7 years agofix [#34698] Axis Locking works incorrect
Campbell Barton [Tue, 26 Mar 2013 03:36:18 +0000 (03:36 +0000)]
fix [#34698] Axis Locking works incorrect
don't do projection when constraints are used.

7 years agoreplace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int()
Campbell Barton [Tue, 26 Mar 2013 02:37:29 +0000 (02:37 +0000)]
replace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int()

7 years agoimprove beauty-fill tool for non-flat triangles.
Campbell Barton [Tue, 26 Mar 2013 01:49:55 +0000 (01:49 +0000)]
improve beauty-fill tool for non-flat triangles.
Project the triangle pair into 2d coords before measuring.

before/after -

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.

7 years agomisc minor changes
Campbell Barton [Tue, 26 Mar 2013 01:46:12 +0000 (01:46 +0000)]
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.

7 years agoedit to VIEW3D_OT_view_center_pick
Campbell Barton [Tue, 26 Mar 2013 01:43:00 +0000 (01:43 +0000)]
edit to VIEW3D_OT_view_center_pick
- pan when nothing is under the mouse
- use key binding alt+f

7 years agofix [#34603] ALT-F fails, freezes, CPU=100%
Campbell Barton [Tue, 26 Mar 2013 00:29:57 +0000 (00:29 +0000)]
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.

7 years agointernal changes to beautify fill, use an array of edges that can be rotated, rather...
Campbell Barton [Mon, 25 Mar 2013 23:21:16 +0000 (23:21 +0000)]
internal changes to beautify fill, use an array of edges that can be rotated, rather then looping over all edges each time.

7 years agocode cleanup: operator headers
Campbell Barton [Mon, 25 Mar 2013 22:40:11 +0000 (22:40 +0000)]
code cleanup: operator headers

7 years agocode cleanup: move beautify into its own file (more changes coming)
Campbell Barton [Mon, 25 Mar 2013 22:04:12 +0000 (22:04 +0000)]
code cleanup: move beautify into its own file (more changes coming)

7 years agofix for missing redraw in own commit r55554 (Ctrl+F text editor find).
Campbell Barton [Mon, 25 Mar 2013 21:31:24 +0000 (21:31 +0000)]
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.

7 years agoBug report, IRC:
Ton Roosendaal [Mon, 25 Mar 2013 18:41:28 +0000 (18:41 +0000)]
Bug report, IRC:

Operator "To Sphere" should only be allowed to be called in 3d view.
Crashed in Image editor.

7 years agoFix [#34716] Change Trim Duration (soft) value nothing happening. until mouse drag...
Bastien Montagne [Mon, 25 Mar 2013 17:22:00 +0000 (17:22 +0000)]
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!

7 years agoBug fix:
Ton Roosendaal [Mon, 25 Mar 2013 15:45:59 +0000 (15:45 +0000)]
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.

7 years agoClip editor prefetching changes
Sergey Sharybin [Mon, 25 Mar 2013 15:32:15 +0000 (15:32 +0000)]
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..