Commit Graph

45716 Commits

Author SHA1 Message Date
Campbell Barton
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
Campbell Barton
cb11af8b06 fix for knife tool crash when knife_make_chain_cut() couldn't create a new face. 2013-03-19 21:37:22 +00:00
Lukas Toenne
42d65dd7ff 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.
2013-03-19 20:37:25 +00:00
Bastien Montagne
d39c6fdf2d 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!
2013-03-19 19:37:22 +00:00
Campbell Barton
5c48eb3bb9 change to variable size bokeh blue, dont blur larger areas then the current pixel defines.
caused nasty looking errors with DOF.
2013-03-19 18:32:56 +00:00
Lukas Toenne
aa40fcb0a7 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. 2013-03-19 18:15:33 +00:00
Bastien Montagne
e45da6f40a Small changes/additions to i18n tools. 2013-03-19 15:49:53 +00:00
Lukas Toenne
57cc2fd4a0 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.
2013-03-19 14:53:46 +00:00
Thomas Dinges
7cba869a94 Fix for [#34693] Linked Duplicate of object with Ocean modifier fails to copy geometry_mode parameter 2013-03-19 14:38:03 +00:00
Antony Riakiotakis
526d79d688 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.
2013-03-19 14:25:12 +00:00
Thomas Dinges
8fe0c0eb45 Cycles / Mix Shader:
* Made "Fac" Socket a "PROP_FACTOR", like the other Fac sockets in the compositor.
2013-03-19 13:46:46 +00:00
Lukas Toenne
bbac76ee26 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.
2013-03-19 13:40:16 +00:00
Sergey Sharybin
c9d981c86d 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.
2013-03-19 13:38:43 +00:00
Antony Riakiotakis
8c90d23462 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
2013-03-19 13:32:57 +00:00
Thomas Dinges
d215f453df UI / Node Editor:
* Align Render Layer menu and Render button in "Render Layers" node. 
This looks better and the settings belong together as well.
2013-03-19 13:31:54 +00:00
Lukas Toenne
a7dd76c43f 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. 2013-03-19 13:00:32 +00:00
Jens Verwiebe
a207d76709 OSX/pen: change sensivity graduation to a good value found with Sebastian and remove debug print 2013-03-19 12:29:38 +00:00
Jens Verwiebe
05787db61f OSX/pen: change sensivity graduation so we don't get maximum too early and have more feeling 2013-03-19 11:38:40 +00:00
Campbell Barton
d466e1d3b4 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()
2013-03-19 10:54:52 +00:00
Lukas Toenne
0f3515d4e2 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.
2013-03-19 10:42:33 +00:00
Bastien Montagne
4857d62ac6 More i18n tools cleanup. Also do not import nl in trunk currently (void translation)! 2013-03-19 10:11:41 +00:00
Lukas Toenne
422ed07339 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. 2013-03-19 10:03:52 +00:00
Sergey Sharybin
4e93ac546f 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.
2013-03-19 08:53:01 +00:00
Bastien Montagne
fbbbb90af3 Some renaming/cleanup in i18n tools. 2013-03-19 08:33:24 +00:00
Sergey Sharybin
dc3ce6db6a 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.
2013-03-19 07:46:32 +00:00
Mitchell Stokes
460d21af6f BGE: Adding docs for bge.logic.getProfileInfo(). 2013-03-19 04:56:51 +00:00
Mitchell Stokes
e6020cd320 BGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python dictionary with the same information as the on screen profiler. 2013-03-19 04:51:37 +00:00
Dalai Felinto
4a5a5f2968 bge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
we need to check for booleans before testing for longs.
2013-03-18 22:52:43 +00:00
Pablo Vazquez
779b26058b 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.
2013-03-18 22:28:27 +00:00
Campbell Barton
03762409cd rewind 55389 and make this gcc4.6+ only 2013-03-18 21:36:12 +00:00
Daniel Genrich
7432924216 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
2013-03-18 21:33:48 +00:00
Dalai Felinto
650a44595b 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)
2013-03-18 21:16:04 +00:00
Sergej Reich
95bcb9d2fb Add capluse bounds drawing
Patch [#34566] by Alain Ducharme (phymec).
2013-03-18 20:32:30 +00:00
Sergej Reich
4285c45424 game engine: Increase hard limit for fps property
Patch by Alain Ducharme (phymec).
2013-03-18 20:32:28 +00:00
Lukas Toenne
d5c1a80294 Added back the custom limits for value properties in standard node socket types, to override the standard range based purely on subtype. 2013-03-18 20:27:39 +00:00
Thomas Dinges
3147d95bdf Node Interface:
* Small tweak to the "Interface" panel for group nodes, move separator into the branch to save some UI space.
2013-03-18 19:59:11 +00:00
Sergey Sharybin
6cdce15c3b Hopefully blender will compile with strict flags again. 2013-03-18 19:27:31 +00:00
Lukas Toenne
c285f1c02a Use extern "C" when including BKE_node.h in C++ compositor code, to avoid linker errors on windows (undefined NODE_INSTANCE_KEY_BASE). 2013-03-18 19:19:28 +00:00
Lukas Toenne
b2374f8de3 Node poll_instance callback is optional, check if it exists before executing. 2013-03-18 19:19:26 +00:00
Bastien Montagne
66c7b54a88 Usual minor UI messages fixes. 2013-03-18 18:43:22 +00:00
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