Commit Graph

45676 Commits

Author SHA1 Message Date
Campbell Barton
b38870ce25 quiet warning about writing to deprecated member with gcc. 2013-03-18 18:37:59 +00:00
Ton Roosendaal
25fa2eedc4 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? ;)
2013-03-18 18:29:22 +00:00
Thomas Dinges
471238ebfc 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.
2013-03-18 18:27:28 +00:00
Campbell Barton
01e9dae3dc code cleanup 2013-03-18 18:25:05 +00:00
Lukas Toenne
57f69f2f18 Added missing stub for uiTemplateNodeSocket. 2013-03-18 17:24:47 +00:00
Lukas Toenne
061cdee6dc Fix for stupid MSVC compiler, float array cast not supported. 2013-03-18 17:24:16 +00:00
Bastien Montagne
e7010e1b7d Fix blenderplayer (looks like gcc4.7 dislikes unamed parameters ;) ). 2013-03-18 17:08:29 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

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

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

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

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

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
Campbell Barton
7bfef29f2f replace format checks with is_movie_format 2013-03-18 16:17:45 +00:00
Thomas Dinges
8ec1f3eae1 Fix for [#34671] Video file overwritten even though overwrite option is unselected
* Grey out Placeholders and Overwrite for Movie formats.
2013-03-18 16:01:13 +00:00
Ton Roosendaal
ee692508d9 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.
2013-03-18 13:57:47 +00:00
Ton Roosendaal
0ee5a2b956 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.
2013-03-18 12:16:19 +00:00
Campbell Barton
655ed9cc7f style cleanup 2013-03-18 11:44:56 +00:00
Sergey Sharybin
b19155e76c 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.
2013-03-18 11:34:05 +00:00
Ton Roosendaal
4c1d80bf86 Forgot to commit the button to set memory limit for using GPU Images... 2013-03-18 09:05:15 +00:00
Antony Riakiotakis
7049bf0598 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.
2013-03-17 20:24:47 +00:00
Campbell Barton
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
Campbell Barton
09c41019a8 use const pointers for file loading and booleans for animation system return values passed as pointers. 2013-03-17 19:13:04 +00:00
Campbell Barton
16b82845ee code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3 2013-03-17 18:30:31 +00:00
Antony Riakiotakis
e2b2d083e0 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.
2013-03-17 18:09:09 +00:00
Ton Roosendaal
66a35e089a 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.
2013-03-17 17:32:45 +00:00
Ton Roosendaal
ce7bde9677 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.
2013-03-17 16:54:06 +00:00
Antony Riakiotakis
0089830044 Fix evil own bug: paint_redraw accessed freed memory. Still doesn't
solve problem not being able to paint with black in image editor.
2013-03-17 16:53:35 +00:00
Ton Roosendaal
0a4b030145 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.
2013-03-17 14:38:58 +00:00
Thomas Dinges
50c28740d4 Cycles / CUDA:
* Simplify Computing Capability Check, only check for major.
2013-03-17 14:32:50 +00:00
Campbell Barton
0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
Campbell Barton
1174c7d662 fix for missing NULL pointer checks and incorrect array free 2013-03-17 10:15:06 +00:00
Joshua Leung
a4e284091b Added descriptions for each constraint type, including common usage
restrictions/limits to reduce confusion
2013-03-17 03:45:15 +00:00
Antony Riakiotakis
84c7df0a2d 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.
2013-03-17 03:08:46 +00:00
Campbell Barton
baf3bb37a9 - ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
Campbell Barton
9e2db2dad4 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
2013-03-16 18:52:09 +00:00
Nicholas Bishop
0fedc6e45b 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.
2013-03-16 18:22:45 +00:00
Nicholas Bishop
994265b204 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
2013-03-16 17:45:58 +00:00
Campbell Barton
fc11cf1581 fix for buffer overrun in reading bookmarks when a line was over 256 bytes. 2013-03-16 17:33:16 +00:00
Ton Roosendaal
0f8660064a Bug fix, irc reported:
Using new off-screen backbuffer selection failed for Lasso in editmode.
2013-03-16 17:12:39 +00:00
Campbell Barton
3be732f3ef don't create empty mesh object when separating if nothing is selected. 2013-03-16 16:38:18 +00:00
Campbell Barton
8a4a034325 patch [#34634] Select vertices without a group
from Kevin Mackay (yakca)
2013-03-16 16:11:50 +00:00
Campbell Barton
a38dbb5eac own error in recent knife-project changes. 2013-03-16 16:10:27 +00:00
Campbell Barton
afe9970d48 style cleanup 2013-03-16 14:42:05 +00:00
Campbell Barton
7ec47aa864 code cleanup: shadowing 2013-03-16 14:33:32 +00:00
Campbell Barton
a7b83837db 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).
2013-03-16 14:18:32 +00:00
Thomas Dinges
5bea78301d Fix for [#34654] Cycles hair particle system modifier obeys viewport visibility as well
* Now Show Render and Show Viewport flags work independently and correct.
2013-03-16 08:49:39 +00:00
Joshua Leung
31356c86d3 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
2013-03-16 05:58:59 +00:00
Joshua Leung
9aa4396a97 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
2013-03-16 05:48:46 +00:00
Joshua Leung
150891605f NLA "Add Track" can now be used to add tracks to previously empty AnimData
blocks, provided the blocks in question are in fact selected.
2013-03-16 05:09:32 +00:00
Joshua Leung
7fc79615e0 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.
2013-03-16 03:59:03 +00:00
Joshua Leung
4db11a9e55 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
2013-03-16 02:53:45 +00:00
Joshua Leung
ce1a1d94d0 NLA Editor: Show the ID+AnimData block that the AnimData panel is showing the
active action for
2013-03-16 02:42:19 +00:00
Campbell Barton
a0351fd97e 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.
2013-03-16 01:19:03 +00:00
Campbell Barton
db77fdc6ff fix for own mistake in using alloca in a loop, replace with BLI_buffer 2013-03-16 00:41:32 +00:00