blender-staging.git
8 years agoMake Blender compile again normal again with gcc 4.2
Ton Roosendaal [Wed, 20 Mar 2013 12:34:20 +0000 (12:34 +0000)]
Make Blender compile again normal again with gcc 4.2

-Wredundant-decls is giving 1000s of lines of warnings for every file...

8 years agoFix for compositor bug introduced in pynodes branch by removing the default MuteNode...
Lukas Toenne [Wed, 20 Mar 2013 10:06:28 +0000 (10:06 +0000)]
Fix for compositor bug introduced in pynodes branch by removing the default MuteNode for unspecified nodes in the COM_Converter. Not sure why i removed this in the first place, but it means that reroute nodes are not properly replaced in composites. It worked for preview and viewer composite because the reroute nodes are replaced there already by the node tree localization ... this needs to be cleaned up.

8 years agoFix for bug reported on bf-committers: RNA function nodetree.links.new does not remov...
Lukas Toenne [Wed, 20 Mar 2013 09:53:29 +0000 (09:53 +0000)]
Fix for bug reported on bf-committers: RNA function nodetree.links.new does not remove existing links when connecting to a linked input. The check for socket connection limits was 1 off, needs to add 1 to the link counter to anticipate the newly added link.

8 years agoUI Tweak: "Add to Group" button creates new group if no groups exist
Joshua Leung [Wed, 20 Mar 2013 01:41:33 +0000 (01:41 +0000)]
UI Tweak: "Add to Group" button creates new group if no groups exist

Previously, the "Add to Group" button would show an empty search popup when there were no existing groups. While this does mean that the button behaves differently at different times, this way is more streamlined and should be less confusing than seeing an empty search popup or a greyed out "add to group" button or a "+" button which jumps around in different situations.

8 years agocode cleanup: use booleans for mesh and selection code.
Campbell Barton [Tue, 19 Mar 2013 23:17:44 +0000 (23:17 +0000)]
code cleanup: use booleans for mesh and selection code.

8 years agofix for knife tool crash when knife_make_chain_cut() couldn't create a new face.
Campbell Barton [Tue, 19 Mar 2013 21:37:22 +0000 (21:37 +0000)]
fix for knife tool crash when knife_make_chain_cut() couldn't create a new face.

8 years agoFix #34697, Undoing a node group crashes Blender.
Lukas Toenne [Tue, 19 Mar 2013 20:37:25 +0000 (20:37 +0000)]
Fix #34697, Undoing a node group crashes Blender.

The problem here was that the extra forward compatibility data for node groups (links to the node interface sockets) was written for files as well as undo memfiles. But only in the case of true .blend files is this data subsequently removed again after loading, which in the case of undo leaves invalid links hanging around in the node tree. Forward compat data is now skipped for undo.

8 years agoVarious cleanup around default i18n context.
Bastien Montagne [Tue, 19 Mar 2013 19:37:22 +0000 (19:37 +0000)]
Various cleanup around default i18n context.

Issue is that the real default context is NULL, however, in python and RNA, this value can't be used easily. So we use a specific string instead ("*"), defined as BLF_I18NCONTEXT_DEFAULT_BPYRNA.

From now on, all bpy/rna code should only use the BLF_I18NCONTEXT_DEFAULT_BPYRNA value, while all "usual" C code should use the BLF_I18NCONTEXT_DEFAULT value (BLF_pgettext is still able to "understand" both, anyway).

Also added BLF_is_default_context helper func, so that we can keep that check in a single place!

Finally, we should no need anymore to understand the void string "" as default context too - two values for a same thing are more than enough!

8 years agochange to variable size bokeh blue, dont blur larger areas then the current pixel...
Campbell Barton [Tue, 19 Mar 2013 18:32:56 +0000 (18:32 +0000)]
change to variable size bokeh blue, dont blur larger areas then the current pixel defines.
caused nasty looking errors with DOF.

8 years agoRemoved the is_local_tree property from compo/shader/texture node trees. This was...
Lukas Toenne [Tue, 19 Mar 2013 18:15:33 +0000 (18:15 +0000)]
Removed the is_local_tree property from compo/shader/texture node trees. This was using an ID property, which causes trouble with 2.62 builds (possibly later) due to an old bug that causes ID properties in local node trees not loaded correctly. The bug has been fixed since then, but creating id properties will break with these builds. The property was not really necessary, so removing it will make it work as long as users don't add id properties themselves.

8 years agoSmall changes/additions to i18n tools.
Bastien Montagne [Tue, 19 Mar 2013 15:49:53 +0000 (15:49 +0000)]
Small changes/additions to i18n tools.

8 years agoFix for an old issue: Node names need to be unique to ensure proper preview image...
Lukas Toenne [Tue, 19 Mar 2013 14:53:46 +0000 (14:53 +0000)]
Fix for an old issue: Node names need to be unique to ensure proper preview image mapping (node instance keys are generated from node names). This caused problems with some of the old test files (e.g. compo_map_zcombine_cubes.blend).

When the uniqueness requirement was introduced in r24478 (2.50.8) for unambiguous RNA paths for animation a do_versions check was also added, but this was incorrectly only applied to main->nodetree (i.e. node groups) and not local trees in scene, material, etc.

8 years agoFix for [#34693] Linked Duplicate of object with Ocean modifier fails to copy geometr...
Thomas Dinges [Tue, 19 Mar 2013 14:38:03 +0000 (14:38 +0000)]
Fix for [#34693] Linked Duplicate of object with Ocean modifier fails to copy geometry_mode parameter

8 years agoFix: jittered brushes are not jittered, reported by kursad karatas.
Antony Riakiotakis [Tue, 19 Mar 2013 14:25:12 +0000 (14:25 +0000)]
Fix: jittered brushes are not jittered, reported by kursad karatas.
Issue is sharing using global random generator which is shared with
particle system which resets the seed due to some scene/option
combination. Since it may be desirable to get predictable results with
particles, made sure brushes allocate their own random number generator
on startup and use that for jittering.

8 years agoCycles / Mix Shader:
Thomas Dinges [Tue, 19 Mar 2013 13:46:46 +0000 (13:46 +0000)]
Cycles / Mix Shader:
* Made "Fac" Socket a "PROP_FACTOR", like the other Fac sockets in the compositor.

8 years agoNicer handling of undefined node, tree and socket types.
Lukas Toenne [Tue, 19 Mar 2013 13:40:16 +0000 (13:40 +0000)]
Nicer handling of undefined node, tree and socket types.

When nodes are loaded from a .blend file they can potentially have undefined types. This can happen if a type has been deprecated and removed, or if node types were defined in a python script that has not been loaded correctly. Previously all such nodes would automatically be removed from a node tree, assuming that their types were deprecated and no longer in use (more commonly caused by loading new nodes in an older Blender version). Due to the possibility of dynamic registration it is no longer feasible to simply delete such nodes.

Display and handling of node trees was simply disabled before this patch, so that a node tree where any node or socket type was undefined would not be displayed at all. To give more information and avoid problems caused by necessary checks for the typeinfo pointer, there is now a 'Undefined' fallback type for trees, nodes and sockets. These types are used as placeholders in case the real type is not registered and can provide useful visual feedback on undefined nodes.

8 years agoFix regression in viewport background image transparency
Sergey Sharybin [Tue, 19 Mar 2013 13:38:43 +0000 (13:38 +0000)]
Fix regression in viewport background image transparency

Was caused by recent changes to automatically switch between
glaDrawPixelsTex and glaDrawPixelsSafe depending on resolution.

glaDrawPixelsSafe could not be sued for viewport because it'll
miss alpha transparency.

8 years agoFix: Clamp alpha to 1.0 or adding alpha in paint creates "isolines" due
Antony Riakiotakis [Tue, 19 Mar 2013 13:32:57 +0000 (13:32 +0000)]
Fix: Clamp alpha to 1.0 or adding alpha in paint creates "isolines" due
to integer overflow. One of the beautiful bugs that is sad to see fixed.

Also remove unused timer variable

8 years agoUI / Node Editor:
Thomas Dinges [Tue, 19 Mar 2013 13:31:54 +0000 (13:31 +0000)]
UI / Node Editor:
* Align Render Layer menu and Render button in "Render Layers" node.
This looks better and the settings belong together as well.

8 years agoFix for GLSL shader nodes when using Cycles nodes with shader sockets. These did...
Lukas Toenne [Tue, 19 Mar 2013 13:00:32 +0000 (13:00 +0000)]
Fix for GLSL shader nodes when using Cycles nodes with shader sockets. These did not get a stack index assigned, but for GLSL they are simply replaced by colors.

8 years agoOSX/pen: change sensivity graduation to a good value found with Sebastian and remove...
Jens Verwiebe [Tue, 19 Mar 2013 12:29:38 +0000 (12:29 +0000)]
OSX/pen: change sensivity graduation to a good value found with Sebastian and remove debug print

8 years agoOSX/pen: change sensivity graduation so we don't get maximum too early and have...
Jens Verwiebe [Tue, 19 Mar 2013 11:38:40 +0000 (11:38 +0000)]
OSX/pen: change sensivity graduation so we don't get maximum  too early and have more feeling

8 years agoadd BLI_rcti,f_recenter()
Campbell Barton [Tue, 19 Mar 2013 10:54:52 +0000 (10:54 +0000)]
add BLI_rcti,f_recenter()
fix for uninitialized variable use in radial_control_get_properties() and bad cast in bpy api's foreach_parse_args()

8 years agoFixes for context updates of the node editor:
Lukas Toenne [Tue, 19 Mar 2013 10:42:33 +0000 (10:42 +0000)]
Fixes for context updates of the node editor:
* If the node tree can be updated from context (tree has get_from_context callback defined), reset the pointers first to clear the editor path if no tree can be found.
* Stupid mistake: snode->from != snode->from is always false.
* Shader nodes context update: set the 'from' pointer to the active object, even if it doesn't have a material or node tree.

8 years agoMore i18n tools cleanup. Also do not import nl in trunk currently (void translation)!
Bastien Montagne [Tue, 19 Mar 2013 10:11:41 +0000 (10:11 +0000)]
More  i18n tools cleanup. Also do not import nl in trunk currently (void translation)!

8 years agoFix for shader node sockets not displaying the name when unconnected. Default button...
Lukas Toenne [Tue, 19 Mar 2013 10:03:52 +0000 (10:03 +0000)]
Fix for shader node sockets not displaying the name when unconnected. Default button draw implementation for node sockets should be to display just the name label.

8 years agoUse checker backdrop for footage with alpha channel in clip editor
Sergey Sharybin [Tue, 19 Mar 2013 08:53:01 +0000 (08:53 +0000)]
Use checker backdrop for footage with alpha channel in clip editor

Also use glaDrawPixelsAuto as a fallback method. Hopefully it'll
make using 2D textures for frames higher resolution than
GL_MAX_TEXTURE_SIZE.

8 years agoSome renaming/cleanup in i18n tools.
Bastien Montagne [Tue, 19 Mar 2013 08:33:24 +0000 (08:33 +0000)]
Some renaming/cleanup in  i18n tools.

8 years agoAdded alpha output to movie clip compositor node
Sergey Sharybin [Tue, 19 Mar 2013 07:46:32 +0000 (07:46 +0000)]
Added alpha output to movie clip compositor node

Pretty much straightforward change, made in the same way as
texture input node.

Shall not be any regressions or crashes when mixing usage
of 2.66 and current trunk.

8 years agoBGE: Adding docs for bge.logic.getProfileInfo().
Mitchell Stokes [Tue, 19 Mar 2013 04:56:51 +0000 (04:56 +0000)]
BGE: Adding docs for bge.logic.getProfileInfo().

8 years agoBGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python...
Mitchell Stokes [Tue, 19 Mar 2013 04:51:37 +0000 (04:51 +0000)]
BGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python dictionary with the same information as the on screen profiler.

8 years agobge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
Dalai Felinto [Mon, 18 Mar 2013 22:52:43 +0000 (22:52 +0000)]
bge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
we need to check for booleans before testing for longs.

8 years agoGrease Pencil UI
Pablo Vazquez [Mon, 18 Mar 2013 22:28:27 +0000 (22:28 +0000)]
Grease Pencil UI
The recent addition of the up/down arrows wasn't aligned.

Before/After: http://www.pasteall.org/pic/show.php?id=47512

Patch by Francesco Siddi.

8 years agorewind 55389 and make this gcc4.6+ only
Campbell Barton [Mon, 18 Mar 2013 21:36:12 +0000 (21:36 +0000)]
rewind 55389 and make this gcc4.6+ only

8 years agoSmoke Bugfix /enhancement: Load pre 2.65 pointcaches.
Daniel Genrich [Mon, 18 Mar 2013 21:33:48 +0000 (21:33 +0000)]
Smoke Bugfix /enhancement: Load pre 2.65 pointcaches.

Warning: Just make sure that you DON'T free the cache at any point. This patch can only display existing pointcaches from e.g. 2.64

8 years agofix for build error: "#pragma GCC diagnostic not allowed inside functions"
Dalai Felinto [Mon, 18 Mar 2013 21:16:04 +0000 (21:16 +0000)]
fix for build error: "#pragma GCC diagnostic not allowed inside functions"

It works in a newest gcc (e.g. 4.6.3) but fails here:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.11.00)

8 years agoAdd capluse bounds drawing
Sergej Reich [Mon, 18 Mar 2013 20:32:30 +0000 (20:32 +0000)]
Add capluse bounds drawing

Patch [#34566] by Alain Ducharme (phymec).

8 years agogame engine: Increase hard limit for fps property
Sergej Reich [Mon, 18 Mar 2013 20:32:28 +0000 (20:32 +0000)]
game engine: Increase hard limit for fps property

Patch by Alain Ducharme (phymec).

8 years agoAdded back the custom limits for value properties in standard node socket types,...
Lukas Toenne [Mon, 18 Mar 2013 20:27:39 +0000 (20:27 +0000)]
Added back the custom limits for value properties in standard node socket types, to override the standard range based purely on subtype.

8 years agoNode Interface:
Thomas Dinges [Mon, 18 Mar 2013 19:59:11 +0000 (19:59 +0000)]
Node Interface:
* Small tweak to the "Interface" panel for group nodes, move separator into the branch to save some UI space.

8 years agoHopefully blender will compile with strict flags again.
Sergey Sharybin [Mon, 18 Mar 2013 19:27:31 +0000 (19:27 +0000)]
Hopefully blender will compile with strict flags again.

8 years agoUse extern "C" when including BKE_node.h in C++ compositor code, to avoid linker...
Lukas Toenne [Mon, 18 Mar 2013 19:19:28 +0000 (19:19 +0000)]
Use extern "C" when including BKE_node.h in C++ compositor code, to avoid linker errors on windows (undefined NODE_INSTANCE_KEY_BASE).

8 years agoNode poll_instance callback is optional, check if it exists before executing.
Lukas Toenne [Mon, 18 Mar 2013 19:19:26 +0000 (19:19 +0000)]
Node poll_instance callback is optional, check if it exists before executing.

8 years agoUsual minor UI messages fixes.
Bastien Montagne [Mon, 18 Mar 2013 18:43:22 +0000 (18:43 +0000)]
Usual minor UI messages fixes.

8 years agoquiet warning about writing to deprecated member with gcc.
Campbell Barton [Mon, 18 Mar 2013 18:37:59 +0000 (18:37 +0000)]
quiet warning about writing to deprecated member with gcc.

8 years agoUI fix: drawing disabled buttons now draw OK in all cases.
Ton Roosendaal [Mon, 18 Mar 2013 18:29:22 +0000 (18:29 +0000)]
UI fix: drawing disabled buttons now draw OK in all cases.

The old 2.5 code was just drawing a blended rect over buttons, which looks bad
in cases the backdrop is undefined.

Now widget drawing code just draws everything half transparent. Much nicer!
Time for textured backdrops? ;)

8 years agoNode Editor / Group UI:
Thomas Dinges [Mon, 18 Mar 2013 18:27:28 +0000 (18:27 +0000)]
Node Editor / Group UI:
* Add, Move and Remove Socket operators missed a notifier for UI redraw.

Note: ND_DISPLAY seems to be for the Text editor only, according to WM_types.h, but seems to be used in quite a few places.
Time to cleanup notifiers again.

8 years agocode cleanup
Campbell Barton [Mon, 18 Mar 2013 18:25:05 +0000 (18:25 +0000)]
code cleanup

8 years agoAdded missing stub for uiTemplateNodeSocket.
Lukas Toenne [Mon, 18 Mar 2013 17:24:47 +0000 (17:24 +0000)]
Added missing stub for uiTemplateNodeSocket.

8 years agoFix for stupid MSVC compiler, float array cast not supported.
Lukas Toenne [Mon, 18 Mar 2013 17:24:16 +0000 (17:24 +0000)]
Fix for stupid MSVC compiler, float array cast not supported.

8 years agoFix blenderplayer (looks like gcc4.7 dislikes unamed parameters ;) ).
Bastien Montagne [Mon, 18 Mar 2013 17:08:29 +0000 (17:08 +0000)]
Fix blenderplayer (looks like gcc4.7 dislikes unamed parameters ;) ).

8 years agoMerge of the PyNodes branch (aka "custom nodes") into trunk.
Lukas Toenne [Mon, 18 Mar 2013 16:34:57 +0000 (16:34 +0000)]
Merge ... the PyNodes branch (aka "custom nodes") into trunk.

PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

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

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

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

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

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/

8 years agoreplace format checks with is_movie_format
Campbell Barton [Mon, 18 Mar 2013 16:17:45 +0000 (16:17 +0000)]
replace format checks with is_movie_format

8 years agoFix for [#34671] Video file overwritten even though overwrite option is unselected
Thomas Dinges [Mon, 18 Mar 2013 16:01:13 +0000 (16:01 +0000)]
Fix for [#34671] Video file overwritten even though overwrite option is unselected
* Grey out Placeholders and Overwrite for Movie formats.

8 years agoBug fix, irc:
Ton Roosendaal [Mon, 18 Mar 2013 13:57:47 +0000 (13:57 +0000)]
Bug fix, irc:

Curves widget error: after deleting a point, and click to add a new point, on dragging
it the point flipped up 20 pixels. Was caused by changed layout and region view matrix.

Solved by storing actual mousecoords instead of mapped ones.

8 years agoJust added a comment:
Ton Roosendaal [Mon, 18 Mar 2013 12:16:19 +0000 (12:16 +0000)]
Just added a comment:

To make circle select allow pass-through for view events, several issues have to be
tackled.
 1) other modal ops run on top (border select),
 2) middlemouse is used now
 3) and what for tablet/trackpad or people without middlemouse?

The MMB deselection for border/circle is not optimal now... needs rethinking this.

Better would be to check on non-persistant-modality for circle, to start with gesture style
event like lasso or border can do now.

8 years agostyle cleanup
Campbell Barton [Mon, 18 Mar 2013 11:44:56 +0000 (11:44 +0000)]
style cleanup

8 years agoFix #34672: Image sampling line didn't use color management for byte buffers
Sergey Sharybin [Mon, 18 Mar 2013 11:34:05 +0000 (11:34 +0000)]
Fix #34672: Image sampling line didn't use color management for byte buffers

This makes it so sample line (for all image editor, sequencer and compositor)
displaying managed color for byte buffers as well. It was simply not implemented
before.

8 years agoForgot to commit the button to set memory limit for using GPU Images...
Ton Roosendaal [Mon, 18 Mar 2013 09:05:15 +0000 (09:05 +0000)]
Forgot to commit the button to set memory limit for using GPU Images...

8 years agoFix: Setting cursor to semitransparent objects will fail because of clip
Antony Riakiotakis [Sun, 17 Mar 2013 20:24:47 +0000 (20:24 +0000)]
Fix: Setting cursor to semitransparent objects will fail because of clip
alpha, added option when drawing depth to disable alpha clip override.
We use that in texture paint cursor now. Not too common but may be
useful for people dealing with cloning plugins.

Reported by kgeogeo on irc, thanks.

8 years agocode cleanup: name mesh functions more consistently, also use bools for mesh args.
Campbell Barton [Sun, 17 Mar 2013 19:55:10 +0000 (19:55 +0000)]
code cleanup: name mesh functions more consistently, also use bools for mesh args.

8 years agouse const pointers for file loading and booleans for animation system return values...
Campbell Barton [Sun, 17 Mar 2013 19:13:04 +0000 (19:13 +0000)]
use const pointers for file loading and booleans for animation system return values passed as pointers.

8 years agocode cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *...
Campbell Barton [Sun, 17 Mar 2013 18:30:31 +0000 (18:30 +0000)]
code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3

8 years agoFix "can't paint" bug no.1, painting with black on image editor did not
Antony Riakiotakis [Sun, 17 Mar 2013 18:09:09 +0000 (18:09 +0000)]
Fix "can't paint" bug no.1, painting with black on image editor did not
paint. Was own regression when optimizing colour operations. I will not
use an alpha bit mask since it may run into portability issues with byte
order.

8 years agoFix for "draw images as texture"
Ton Roosendaal [Sun, 17 Mar 2013 17:32:45 +0000 (17:32 +0000)]
Fix for "draw images as texture"

Zooming in on images in Image window now shows pixels again (was filtered).

Now the glaDrawPixelsTex() and glaDrawPixelsAuto() have an argument to
define if images should zoom in with linear filter, or draw pixels.

8 years agoFeature:
Ton Roosendaal [Sun, 17 Mar 2013 16:54:06 +0000 (16:54 +0000)]
Feature:

Image Editor and 3D view background image now use new automatic switching for
drawing GPU texture or OpenGL DrawPixels too. For large zoomed images
it gives massive speedup.

8 years agoFix evil own bug: paint_redraw accessed freed memory. Still doesn't
Antony Riakiotakis [Sun, 17 Mar 2013 16:53:35 +0000 (16:53 +0000)]
Fix evil own bug: paint_redraw accessed freed memory. Still doesn't
solve problem not being able to paint with black in image editor.

8 years agoNew feature:
Ton Roosendaal [Sun, 17 Mar 2013 14:38:58 +0000 (14:38 +0000)]
New feature:

Automatic switching for drawing pixel buffers via glDrawPixels or using GPU textures

It works with a User Preference limit, in megapixels, to define whether to use
GPU or direct pixel drawing. Default is now initialized to 10 MP (4k buffers).

Especially for zooming out (draw smaller) texture drawing is much smaller. Also
Nvidia cards typically draw much faster with textures in general.

Added to node backdrop first now, the other editors follow in a next commit.

For coders: added new DNA function to initialize new struct variables, so you
don't have to sub-version files anymore.

   DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname")

"filesdna" is the sdna description of the current file being versioned.

8 years agoCycles / CUDA:
Thomas Dinges [Sun, 17 Mar 2013 14:32:50 +0000 (14:32 +0000)]
Cycles / CUDA:
* Simplify Computing Capability Check, only check for major.

8 years agocode cleanup: incorrect sized array args, remove some redundant code.
Campbell Barton [Sun, 17 Mar 2013 10:26:23 +0000 (10:26 +0000)]
code cleanup: incorrect sized array args, remove some redundant code.

8 years agofix for missing NULL pointer checks and incorrect array free
Campbell Barton [Sun, 17 Mar 2013 10:15:06 +0000 (10:15 +0000)]
fix for missing NULL pointer checks and incorrect array free

8 years agoAdded descriptions for each constraint type, including common usage
Joshua Leung [Sun, 17 Mar 2013 03:45:15 +0000 (03:45 +0000)]
Added descriptions for each constraint type, including common usage
restrictions/limits to reduce confusion

8 years agoSetting clone cursor is now an option for paint operator. This is not
Antony Riakiotakis [Sun, 17 Mar 2013 03:08:46 +0000 (03:08 +0000)]
Setting clone cursor is now an option for paint operator. This is not
too nice but it frees the Ctrl-LClick shortcut and allows us to set
invert mode for other paint tools, such as sharpen vs blur or invert
colour for draw brush. This conflict has existed on GSOC branch, better
resolve now before merging invert functionality.

8 years ago- ghost-sdl builds again.
Campbell Barton [Sat, 16 Mar 2013 20:49:46 +0000 (20:49 +0000)]
- ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.

8 years agorevert own change: don't use memchr for strnlen, causes problems when the len is...
Campbell Barton [Sat, 16 Mar 2013 18:52:09 +0000 (18:52 +0000)]
revert own change: don't use memchr for strnlen, causes problems when the len is longer then the string data, instead use strnlen from freebsd.
also simplify empty string checks in logic_ops.c

8 years agoStop dyntopo updates from happening in masked areas
Nicholas Bishop [Sat, 16 Mar 2013 18:22:45 +0000 (18:22 +0000)]
Stop dyntopo updates from happening in masked areas

Fixes [#34348] Collapse short edges affects masked geometry
/projects.blender.org/tracker/?func=detail&aid=34348&group_id=9&atid=498

Fixed by disallowing topology updates on edges with a vertex masked at
50% or greater. This is a necessarily arbitrary choice; can't do
halfway updates for topology like we can with displacement.

8 years agoFix sculpt view normal for transformed objects
Nicholas Bishop [Sat, 16 Mar 2013 17:45:58 +0000 (17:45 +0000)]
Fix sculpt view normal for transformed objects

Patch from Antony Riakiotakis, thanks!

Fixes [#34641] "Front Faces Only" option in SculptMode behaves weird
projects.blender.org/tracker/?func=detail&aid=34641&group_id=9&atid=498

8 years agofix for buffer overrun in reading bookmarks when a line was over 256 bytes.
Campbell Barton [Sat, 16 Mar 2013 17:33:16 +0000 (17:33 +0000)]
fix for buffer overrun in reading bookmarks when a line was over 256 bytes.

8 years agoBug fix, irc reported:
Ton Roosendaal [Sat, 16 Mar 2013 17:12:39 +0000 (17:12 +0000)]
Bug fix, irc reported:

Using new off-screen backbuffer selection failed for Lasso in editmode.

8 years agodon't create empty mesh object when separating if nothing is selected.
Campbell Barton [Sat, 16 Mar 2013 16:38:18 +0000 (16:38 +0000)]
don't create empty mesh object when separating if nothing is selected.

8 years agopatch [#34634] Select vertices without a group
Campbell Barton [Sat, 16 Mar 2013 16:11:50 +0000 (16:11 +0000)]
patch [#34634] Select vertices without a group
from Kevin Mackay (yakca)

8 years agoown error in recent knife-project changes.
Campbell Barton [Sat, 16 Mar 2013 16:10:27 +0000 (16:10 +0000)]
own error in recent knife-project changes.

8 years agostyle cleanup
Campbell Barton [Sat, 16 Mar 2013 14:42:05 +0000 (14:42 +0000)]
style cleanup

8 years agocode cleanup: shadowing
Campbell Barton [Sat, 16 Mar 2013 14:33:32 +0000 (14:33 +0000)]
code cleanup: shadowing

8 years agofix for crash when using BM_face_calc_tessellation(), its not ensured that all tris...
Campbell Barton [Sat, 16 Mar 2013 14:18:32 +0000 (14:18 +0000)]
fix for crash when using BM_face_calc_tessellation(), its not ensured that all tris will be filled in.
(effected knife project and laplacian smooth).

8 years agoFix for [#34654] Cycles hair particle system modifier obeys viewport visibility as...
Thomas Dinges [Sat, 16 Mar 2013 08:49:39 +0000 (08:49 +0000)]
Fix for [#34654] Cycles hair particle system modifier obeys viewport visibility as well
* Now Show Render and Show Viewport flags work independently and correct.

8 years agoSome more assorted fixes
Joshua Leung [Sat, 16 Mar 2013 05:58:59 +0000 (05:58 +0000)]
Some more assorted fixes
* More duplicate/wrong comments (copy+paste errors)
* Brough Calculate/Clear Motion Path UI for bones more in line with the Object
version

8 years agoAssorted anim editor fixes
Joshua Leung [Sat, 16 Mar 2013 05:48:46 +0000 (05:48 +0000)]
Assorted anim editor fixes
* Click-select operators don't have "register" flag anymore
* Graph Editor click select can be undone, just like everything else
* "Current frame" -> "Current Frame" for consistency with rest of menu

8 years agoNLA "Add Track" can now be used to add tracks to previously empty AnimData
Joshua Leung [Sat, 16 Mar 2013 05:09:32 +0000 (05:09 +0000)]
NLA "Add Track" can now be used to add tracks to previously empty AnimData
blocks, provided the blocks in question are in fact selected.

8 years agoAny ID Selector Template: ID Type dropdown now shows icon only as originally
Joshua Leung [Sat, 16 Mar 2013 03:59:03 +0000 (03:59 +0000)]
Any ID Selector Template: ID Type dropdown now shows icon only as originally
intended

Finally, I've figured out a way to get the ID Selector Template to only show the
icon for the type of ID block (i.e. the intended design), instead of icon+text.
This improves the layout a bit, as previously the type selector and ID-block
pointer and label would all be the same sizes (roughly 1/3rd of the overall
width each), which meant that there wasn't much room left to actually see which
datablock had been selected.

Additionally, I've fixed a few more layout types which still didn't correctly
propagate the red-alert flags.

8 years agoAssorted small fixes
Joshua Leung [Sat, 16 Mar 2013 02:53:45 +0000 (02:53 +0000)]
Assorted small fixes
* Incorrect comment (copy+paste error) in nla_edit
* Whitespace in rna_gpencil
* The icon for AnimData is now attached to its RNA definition

8 years agoNLA Editor: Show the ID+AnimData block that the AnimData panel is showing the
Joshua Leung [Sat, 16 Mar 2013 02:42:19 +0000 (02:42 +0000)]
NLA Editor: Show the ID+AnimData block that the AnimData panel is showing the
active action for

8 years agoobject converting curve/mball to a mesh would give invalid selection state (edges...
Campbell Barton [Sat, 16 Mar 2013 01:19:03 +0000 (01:19 +0000)]
object converting curve/mball to a mesh would give invalid selection state (edges selected but nothing else).
add arg to BKE_mesh_calc_edges() so selecting newly created edges is optional.

8 years agofix for own mistake in using alloca in a loop, replace with BLI_buffer
Campbell Barton [Sat, 16 Mar 2013 00:41:32 +0000 (00:41 +0000)]
fix for own mistake in using alloca in a loop, replace with BLI_buffer

8 years agochanges to BLI_buffer
Campbell Barton [Sat, 16 Mar 2013 00:12:14 +0000 (00:12 +0000)]
changes to BLI_buffer
- assert if BLI_buffer_at() is called with an out of bounds value.
- add BLI_buffer_resize_data() macro which resizes and returns a pointer to the new array.
- warn if missing call to BLI_buffer_free().

8 years agocorrect lasso, weightpaint select, was calling BLI_lasso_boundbox() twice.
Campbell Barton [Fri, 15 Mar 2013 22:56:24 +0000 (22:56 +0000)]
correct lasso, weightpaint select, was calling BLI_lasso_boundbox() twice.

8 years agocode cleanup: quiet some -Wshadow warnings, mix of obvious mistakes and harmless...
Campbell Barton [Fri, 15 Mar 2013 22:55:10 +0000 (22:55 +0000)]
code cleanup: quiet some -Wshadow warnings, mix of obvious mistakes and harmless global/local naming conflict.

8 years agominor cleanup and calculate rake angle before jittering or result
Antony Riakiotakis [Fri, 15 Mar 2013 22:32:44 +0000 (22:32 +0000)]
minor cleanup and calculate rake angle before jittering or result
becomes essentially, random

8 years agoknife project improvements
Campbell Barton [Fri, 15 Mar 2013 20:39:56 +0000 (20:39 +0000)]
knife project improvements
When running in non-interactive mode, dont add a area draw callback or adjust the cursor, use a fixed snap value and don't use opengl lookups on faces.
Minor optimization - compare squared distances where possible.

8 years agofix for error pasting into a color button (tried to read its rna index of -1)
Campbell Barton [Fri, 15 Mar 2013 20:16:20 +0000 (20:16 +0000)]
fix for error pasting into a color button (tried to read its rna index of -1)