Commit Graph

38760 Commits

Author SHA1 Message Date
Antony Riakiotakis
f6604f7612 New implementation for twist brushes.
It has much better rotation and avoids the compression effect that old
twist brushes have. Also twisting is now non periodic, meaning you can
twist beyond 180 degrees. The amount of twist is also calculated
relative to the angle formed after first translating the mouse away from
the brush center.
2013-04-15 14:55:42 +00:00
Antony Riakiotakis
faaa739580 WIP, jason's patch 2013-04-15 14:55:36 +00:00
Sergey Sharybin
91ee88dfd0 Fix #34972: Blender crashes when Force Field-> Curve Guide is created
Made it so where_on_path works correct when Curve does
have editNurbs but no Curve->nurbs.
2013-04-15 12:04:55 +00:00
Campbell Barton
f294b3b082 minor edits to DM_update_weight_mcol(), skip getting vars when in editmode, also remove old/invalid comment. 2013-04-15 08:43:17 +00:00
Lukas Toenne
d1f90abfa9 Removed the extra ntree->update flag check in lib_verify_nodetree in readfile.c. This is unnecessary as the update flag will be checked internally in ntreeUpdateTree anyway, except for the generic bNodeTreeType->update callback (it could even be harmful by preventing necessary updates that don't use the ntree->update flag). Executing this once after loading a node tree is a useful feature for pynodes, so they can do initial verification. 2013-04-15 07:58:15 +00:00
Campbell Barton
be71c46b24 code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid. 2013-04-15 04:34:14 +00:00
Brecht Van Lommel
c9a10b99ff Cycles: optimization for 3D viewport border render with heavy scenes, the OpenGL
render of objects could slow things down when redrawing the view each time a new
sample is displayed.

Now it does a partial redraw of the viewport with only the render border area,
skipping OpenGL object drawing while the render is refining.
2013-04-14 21:42:58 +00:00
Mitchell Stokes
8051ab07fc BGE: Cleaning up BL_ShapeDeformer's use of Blender's Key. This also fixes a bug with replicas (added objects) crashing when using shape keys. 2013-04-14 18:54:06 +00:00
Tamito Kajiyama
86f306f1d9 Freestyle stroke rendering is now done before lens flare. Suggested by Ton on IRC. 2013-04-14 17:24:02 +00:00
Sergey Sharybin
04680a0340 Fix for r55961 which revered texture icons fix at r55499
Reported by Antony Riakiotakis, thanks!
2013-04-14 14:54:08 +00:00
Peter Schlaile
1166609cd3 == FFMPEG / Canon DSLR footage workaround ==
The latest ffmpeg versions include a workaround to deal with a certain
pecularity in Canon DSLR footage: instead of decoding pictures with the
proper resolution of 1920x1080 they decode it with 1920x1088 and add a
black bar at the bottom.

Needless to say, that this screws up things in a lot of areas within blender
(proxy indices, mask animations etc.)

Since all blender versions besides Linux x86 32bit seem still to include
older ffmpeg versions which still contain this bug, this patch adds
a workaround for older versions until we have all versions on all platforms
up to date.

See also: http://git.libav.org/?p=libav.git;a=commit;h=30f515091c323da59c0f1b533703dedca2f4b95d
2013-04-14 13:44:04 +00:00
Campbell Barton
456f3b318a code cleanup: minor changes, clang checker option for exact size matches and use vector functions. 2013-04-14 12:01:12 +00:00
Campbell Barton
eb66c45301 correct pyapi function intersect_line_sphere_2d() using 3d vecs when only 2d are needed. 2013-04-14 11:57:35 +00:00
Campbell Barton
e369c2375b fix for tangent curve flipping only doing 2d angle tests. 2013-04-14 11:56:11 +00:00
Antony Riakiotakis
1e839ec8bc Texture stencil:
Robustness: Avoid translating the stencil outside the active area. Helps
to avoid losing the stencil somewhere in bitspace.

Usability: Take image repeat mapping and scaling into account when
fitting stencil aspect. Togglable by operator properties.
2013-04-14 09:43:12 +00:00
Thomas Dinges
356b393c0a Node Socket UI:
* Fix for Min/Max labels, they started with a lower-case character.
2013-04-14 09:07:38 +00:00
Campbell Barton
1e373ac048 minor speedup to BM_mesh_normals_update() 2013-04-14 07:46:45 +00:00
Lukas Toenne
ab6915b847 Fix for #34910, NodeGroup input/output sliders bug. Initially i thought this was a limitation of the "only 1 list per panel supported" type, but this has since been fixed. Lists just need an additional identifier to distinguish lists in the same panel, thanks to Bastien Montagne for the uiList overhaul! 2013-04-14 07:23:44 +00:00
Campbell Barton
585062a1cd use UNLIKELY macro for frequently called inline bli math functions. 2013-04-14 07:18:37 +00:00
Campbell Barton
da5e0ea8fe bmesh operators: use operator type-flag to specify which operations require normal-calculations and which operations require selection flushing.
eg, no need to flush selection after 'Smooth' tool, no need to recalculate normals after 'Select Similar'.
2013-04-14 06:22:34 +00:00
Campbell Barton
ba283d6c9b modify snapObjectsRayEx() to use a pointer to 'ray_dist' rather then passing the dist, this is to better support multiple calls to ray-cast where only closer distances are accepted. 2013-04-14 05:37:43 +00:00
Mitchell Stokes
d2b14ed4f0 BGE: Adding mipmapping control to bge.render via bge.render.setMipmapping() and bge.render.getMipmapping(). 2013-04-14 00:40:24 +00:00
Tamito Kajiyama
6b37baf34c Fix for [#34913] Freestyle: Problem w/ Edge Marks combined w/ Collision.
Freestyle edge marks were messed up with Collision and other physics mesh modifiers.
The issue was due to copied Vlak instances without resetting edge marks to proper values.

Also made minor changes for avoiding unnecessary hash table lookups, and added an
assertion to check potential buffer overrun.
2013-04-14 00:27:31 +00:00
Mitchell Stokes
dbf4328f3f BGE: Adding a render.setFullScreen() and a render.getFullScreen() to allow fulscreening games via Python. 2013-04-13 21:09:02 +00:00
Campbell Barton
81cfbaacb0 code cleanup: edit-derived-mesh, define 'BMesh *bm' as local variable, avoid 'bmdm->em->bm' within functions. 2013-04-13 20:58:49 +00:00
Campbell Barton
5996242291 fix for error in editmesh derived callbacks, emDM_getVert(), emDM_getEdge(), emDM_getTessFace().
Currently the functions aren't used since they would fail have failed immediately.
2013-04-13 20:40:34 +00:00
Campbell Barton
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
Campbell Barton
31c375b97a Mesh Drawing:
Option to draw mesh vertex-weights in editmode, available from the 'Mesh Display' panel.

TODO: get this to work when modifiers are applied in solid mode (texface-solidmode is working).
2013-04-13 20:20:21 +00:00
Campbell Barton
e1c9353c94 code cleanup: more minor changes for editmesh face drawing. 2013-04-13 18:11:27 +00:00
Campbell Barton
4d1e8cec1a code cleanup: editmesh draw functions, make face drawing more consistent. 2013-04-13 17:57:11 +00:00
Lukas Toenne
dfeddd3549 Node editor: create the toolbar area right at the start in node space, in order to show the '+' icon for expanding. 2013-04-13 17:36:31 +00:00
Bastien Montagne
649b92e688 Fix: uiBlockSetNFunc was using uiButHandleFunc as param signature, instead of uiButHandleNFunc one (was working because both are the same currently). 2013-04-13 16:28:39 +00:00
Lukas Toenne
94931f9f45 Replacing the node Add menu and making the toolbar useful
As some people have already noticed, the "Add" menu for nodes is a bit messy since pynodes merge. The reason for this is that the order of nodes in submenus (categories) was previously defined by the order in which all nodes are registered (at the bottom of blenkernel/intern/node.c). For the dynamic registration of node types now possible this system of defining node order along with registration is no longer viable: while it would still sort of work for C nodes, it is completely meaningless for dynamic (python) nodes, which are basically registered automatically in whatever order modules and addons are loaded, with the added complexity of unloading and reloading.

To fix this problem and add a bunch of desirable features this commit replaces the C menu with a python implementation. The new menu does not rely on any particular order of types in the node registry, but instead uses a simple explicit list of all the available nodes, grouped by categories (in scripts/nodeitems_builtins.py).

There are a number of additional features that become possible with this implementation:

1) Node Toolbar can be populated!
The list of nodes is used to create 2 UI items for each node: 1 entry in a submenu of "Add" menu and 1 item in a node toolbar panel with basically the same functionality. Clicking a button in the toolbar will add a new node of this type, just like selecting an item in the menu. The toolbar has the advantage of having collapsible panels for each category, so users can decide if they don't need certain nodes categories and have the rest more easily accessible.

2) Each node item is a true operator call.
The old Add menu is a pretty old piece of C code which doesn't even use proper operator buttons. Now there is a generic node_add operator which can be used very flexibly for adding any of the available nodes.

3) Node Items support additional settings.
Each "NodeItem" consists of the basic node type plus an optional list of initial settings that shall be applied to a new instance. This gives additional flexibility for creating variants of the same node or for defining preferred initial settings. E.g. it has been requested to disable previews for all nodes except inputs, this would be simple change in the py code and much less intrusive than in C.

4) Node items can be generated with a function.
A callback can be used in any category instead of the fixed list, which generates a set of items based on the context (much like dynamic enum items in bpy.props). Originally this was implemented for group nodes, because these nodes only make sense when linked to a node tree from the library data. This principle could come in handy for a number of other nodes, e.g. Image nodes could provide a similar list of node variants based on images in the library - no need to first add node, then select an image.

WARNING: pynodes scripters will have to rework their "draw_add_menu" callback in node tree types, this has been removed now! It was already pretty redundant, since one can add draw functions to the Add menu just like for any other menu. In the future i'd like to improve the categories system further so scripters can use it for custom node systems too, for now just make a draw callback and attach it to the Add menu.
2013-04-13 15:38:02 +00:00
Ton Roosendaal
a710434f56 Usability fix, own collection.
If you have two windows, each with different scene, the render output for a window
would go to the other, if it was already drawing a render for the other scene.

Now you can have renders draw correct in two windows for two scenes.
2013-04-13 15:14:34 +00:00
Campbell Barton
2baa59e36d code cleanup: remove unused string formatting in bli_adddirstrings(), also remove unused initializations and comment unused vars. 2013-04-13 14:57:08 +00:00
Ton Roosendaal
53bb59f209 Accidentally left in test function. All's fine now! 2013-04-13 14:15:16 +00:00
Antony Riakiotakis
9e8047d37b Fix compilation, ifdef test_file just in case it is useful for later. 2013-04-13 14:05:31 +00:00
Thomas Dinges
84071fbf0a Cycles / Save Buffers:
* Save Buffers could not be disabled in the UI, when "Full Sample" was enabled in Blender Internal.
2013-04-13 12:49:22 +00:00
Ton Roosendaal
d867cefa32 Bug fix #34896
The feature "Keep Session" was also loading that session when you double-click
on a .blend to open it, or when a .blend file was on commandline.

Moved this feature to the main() in creator.c, so it can check on it properly, skipping the
kept session when a file was loaded.
2013-04-13 12:03:20 +00:00
Gaia Clary
9eea6c7057 improved tooltips even more (as discussed in IRC) 2013-04-13 09:32:27 +00:00
Gaia Clary
f181952a28 improved tooltips 2013-04-13 09:27:03 +00:00
Antony Riakiotakis
fb9d88692d Add update to brush texture preview when brush is changed. Solves
cycling through tools with number or tool keys and no texture preview
getting updated.
2013-04-13 08:41:52 +00:00
Campbell Barton
2c47244954 code cleanup: use const char for args and replace wm_keyconfig_list_find() -> BLI_findstring() 2013-04-13 04:28:04 +00:00
Campbell Barton
2f9b7410dc code cleanup: warnings + style 2013-04-13 00:43:49 +00:00
Antony Riakiotakis
7cf1d86e4a Allow rake/random brush rotation for random mapping mode. Some
interesting things can be accomplished this way, such as tiger stripes
for instance.
2013-04-12 23:55:11 +00:00
Antony Riakiotakis
9d0b08365f 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.
2013-04-12 21:58:18 +00:00
Antony Riakiotakis
a074df37c7 oversight on scons, this should fix. 2013-04-12 17:59:38 +00:00
Antony Riakiotakis
d0beabb642 Add function to query maximum texture size. Also, make texture upload
functions aware of this limit.
2013-04-12 17:56:07 +00:00
Antony Riakiotakis
a305452275 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.
2013-04-12 17:21:31 +00:00
Antony Riakiotakis
8f658d4264 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.
2013-04-12 15:45:44 +00:00