Commit Graph

125 Commits

Author SHA1 Message Date
Campbell Barton
b00c3b801b new weight paint draw option to display unweighted vertices with the option to check on the active group or all groups.
notes:
- vertices with zero weights are considered the same as vertices outside of a group.
- currently these show black but this can be made a theme color.
- multi-paint overrides this option (noted in description)
2013-02-22 04:09:04 +00:00
Joshua Leung
e663f24978 Expose a few more operators for curves on the toolbar. Some of these were
previously not available anywhere.
2013-02-22 02:10:41 +00:00
Bastien Montagne
5c5b753779 Fix [#34300] Slider for list of particle systems (keyed particles) is not doing anything. Navigating a list of more than 5 elements requires keyboard.
Systematically adding some custom id to template_list using default UI_UL_list class, this one is commoly used more than once in an area, yielding collision issues if they do not have a custom id...
2013-02-18 13:30:40 +00:00
Campbell Barton
d26c063121 disable translations for some python buttons. 2013-02-08 16:41:02 +00:00
Bastien Montagne
a2e55171fe Bunch of fixes for UI messages.
Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).

Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!
2013-01-27 18:14:24 +00:00
Sergej Reich
47c96081d0 rigidbody: Add rigid body constraints
Constraints connect two rigid bodies.
Depending on which constraint is used different degrees of freedom
are limited, e.g. a hinge constraint only allows the objects to rotate
around a common axis.

Constraints are implemented as individual objects and bahave similar to
rigid bodies in terms of adding/removing/validating.

The position and orientation of the constraint object is the pivot point
of the constraint.

Constraints have their own group in the rigid body world.

To make connecting rigid bodies easier, there is a "Connect" operator that
creates an empty objects with a rigid body constraint connecting the selected
objects to active.

Currently the following constraints are implemented:
* Fixed
* Point
* Hinge
* Slider
* Piston
* Generic

Note: constraint limits aren't animatable yet).
2013-01-23 05:56:56 +00:00
Sergej Reich
cdc8ed24bf rigidbody: Add "Copy Rigid Body Settings" and "Bake To Keyframes" operators
Based on a script by liero, thanks!
2013-01-23 05:56:49 +00:00
Sergej Reich
2d8637946b rigidbody: Add rigid body simulation
Add operators to add/remove rigid body world and objects.
Add UI scripts.

The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.

Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
2013-01-23 05:56:44 +00:00
Campbell Barton
ea86ac5446 revert previous commit, the properties here are confusing since there are 2 rna properties to access the same value. 2013-01-16 19:51:47 +00:00
Campbell Barton
677f61baf5 sculpt mode: there was no UI access to the brushes 'use_space' option, yet its used to draw the interface and by sculpting tool as well. 2013-01-16 19:46:30 +00:00
Antony Riakiotakis
1d45242208 Get rid of the BRUSH_FIXED_TEX flag, use mapping modes instead. Version
patched all previous texture paint brushes to use tiled mapping since
mappping is now shared between 2d and 3d painting.
2013-01-16 14:36:13 +00:00
Antony Riakiotakis
cb8158cce6 Unification of brush code
* rename sculpt_brush_texture_settings to brush_texture_settings
* Expose texture scale and offset in texture paint mode
* Introduce still inactive mapping mode for texture paint, tiled and
view aligned only. Projective paint uses only tiled, while 2d paint can
use both. Commit will come that will use both appropriately for both
modes, omitting fixed brush flag (which is tiled with another name)
2013-01-16 12:57:35 +00:00
Sergey Sharybin
4ed46b4043 Make "Clone" option in project paint options more clear name 2013-01-08 13:58:01 +00:00
Antony Riakiotakis
ab9915ba8d revert 53478, it looks this is still useful for a couple of use cases in non-projective texture painting such as stamping a static texture and using image space size in pixels. 2013-01-02 20:51:47 +00:00
Antony Riakiotakis
b79ec3ac2e UI cleanup: fixed texture is a 2d image painting option, hide in 3D viewport toolbar 2013-01-01 11:46:12 +00:00
Nicholas Bishop
21d79cf769 Add UI and keybindings for dynamic-topology sculpt mode
* New topology panel in 3D view toolbar with the enable/disable button
  for dynamic topology and other controls

* Ctrl+DKEY to toggle dynamic topology

* Shift+DKEY to show a radial control for detail size
2012-12-30 18:31:17 +00:00
Bastien Montagne
7504cf34b4 This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!

This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!

To make all this work, other changes were also necessary:

* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.

* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.

* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.

* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
  Note: not sure whether we should add that one to all UILayout's prop funcs?

Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
Campbell Barton
a735a2370b Weight gradient tool for weight paint mode
- blends from current weight into alpha zero.
- uses brush alpha & curve.
- respects weight paint vertex/face select modes.
- updates realtime.


Access With
- Alt+LMB (linear gradient)
- Ctrl+Alt+LMB (radial gradient)


note:
- WM_gesture_straightline_* are used but not well suited to this task, may end up replacing with own modal operator.
- Key handling works but needs to be done better.
2012-12-22 08:19:27 +00:00
Campbell Barton
c046b13b56 rename template_color_wheel() to template_color_picker() 2012-11-09 11:03:53 +00:00
Campbell Barton
5effa2923a fix [#33037] Soften brush can't handle seams in texture paint
project paint never worked with soften (blur), support now added.
2012-11-06 09:19:51 +00:00
Sergey Sharybin
6e62491c5a Fix #32522: Object's diffuse color not showing in Sculpt Mode
Added option to display object's diffuse color multiplied by sculpting
mask. This option could be found in Options panel of toolshelf when in
sculpting mode.

Thanks to Nicholas and Brecht for reviewing the patch!
2012-10-22 17:33:53 +00:00
Campbell Barton
d81d75b20d transfer weight's now operates on selected vertices (when vertex select is enabled). 2012-10-09 22:55:05 +00:00
Ove Murberg Henriksen
cb42de588d Adding weightpaint transfer tool.
From: https://svn.blender.org/svnroot/bf-blender/branches/meshdata_transfer

Bachelor project at Narvik university collage (Norway).
By Ove M Henriksen (Cyborgmuppet)
 
Thesis will be published at Cyborgmuppets blender page.

Thanks for letting me participate!
2012-10-09 12:25:10 +00:00
Campbell Barton
8730b390fb patch [#31919] limit the number of bone deform weights per vertex. Many game engines require a limit of 4.
from Kesten Broughton (kestion)


Usage: In weight paint mode, select the mesh to have its weights culled. Click on "Limit Weights" button. A sub-panel will appear "Limit Number of Vertex Weights" with a slider field "Limit" which you can set to the appropriate level. The default level is 4, and it gets executed upon pressing "Limit Weights" so you will need to do an "undo" if your max bone limit is above 4. The checkbox "All Deform Weights" will consider all vertex weights, not just bone deform weights.
2012-10-09 10:56:35 +00:00
Ove Murberg Henriksen
7247af6af5 svn merge ^/trunk/blender -r48592:HEAD 2012-10-09 10:53:20 +00:00
Campbell Barton
9fa36b12cc style cleanup: pep8 2012-10-08 08:28:05 +00:00
Campbell Barton
acfff7a65f fixes for weight paint mode:
- sample weight didnt work when the object was transformed.
- sample weight didnt work when vertex selection was enabled.
- 'All faces' option is used by weight paint mode, but there was no UI access.

add ED_mesh_pick_face_vert(). which uses the face selection buffer but returns the closest vertex.
2012-09-07 05:54:54 +00:00
Campbell Barton
9281f3e27e rename mask 'Shrink/Fatten' --> 'Scale Feather' 2012-08-17 13:59:08 +00:00
Campbell Barton
2553cdf195 style cleanup 2012-07-29 12:07:06 +00:00
Thomas Dinges
ab38e1d379 User Interface Scripts:
* Code cleanup, removed unneeded code.
* Style cleanup, don't break lines to early 
(unless marked as pep8-80 or pep8-120 compliant) 
* Keep 1 line after layout declaration empty.
2012-07-29 10:03:46 +00:00
Ove Murberg Henriksen
d43e1fa7be svn merge ^/trunk/blender -r48095:48592 2012-07-04 15:56:42 +00:00
Campbell Barton
fca0112ba3 add back blending for vertex and weight paint modes, you may want to keep the one brush and switch blending options. 2012-06-20 09:34:26 +00:00
Campbell Barton
98e6912480 style cleanup 2012-06-19 22:17:19 +00:00
Ove Murberg Henriksen
736daa9f04 svn merge ^/trunk/blender -r46844:HEAD 2012-05-23 10:56:06 +00:00
Nicholas Bishop
5f95f7d2ad Add input sample averaging to PaintStroke.
Averages input samples to make the brush stroke smoother. Only mouse
location is averaged right now, not pressure/tilt/etc.

The DNA is in struct Paint.num_input_samples, RNA is
Paint.input_samples. In combination with PaintStroke usage this change
applies to sculpt, vpaint, and wpaint.

The range of useful values varies quite a bit depending on input
device; mouse needs higher values to match tablet pen, so set max
samples pretty high (64).

Release note section:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Sculpting#Input_Stroke_Averaging
2012-05-21 23:32:46 +00:00
Ove Murberg Henriksen
74a889d8b1 svn merge ^/trunk/blender -r46644:HEAD 2012-05-17 23:34:54 +00:00
Ove Murberg Henriksen
0978d1eb9d Added framework for transfer weight options.
vertex_group_transfer_weight_exec() governs all.
Functions renamed/added with _transfer_weight_
as opposed to _copy_by_ 
This is to reflect changes in parameters and usage as the internal code will change.
2012-05-17 01:42:06 +00:00
Nicholas Bishop
a8e9d5533f Code/UI cleanup: improvements for sculpt brush texture settings.
Settings are shown in both the View3D toolbar and texture properties
panel; code is now in shared sculpt_brush_texture_settings() function
in properties_paint_common.py.

Also added a few new properties to the SculptCapabilities RNA to
replace "X in {Y, Z}" tests in the Python code.
2012-05-15 04:50:47 +00:00
Ove Murberg Henriksen
90759d4243 svn merge ^/trunk/blender -r46559:HEAD 2012-05-15 01:28:12 +00:00
Thomas Dinges
7735e56058 More work for [#31429] Curve menu polish.
* Curve Extrude and Duplicate from Toolbar also moves the points now, same as for Mesh and in alignment with the menu. 

* Fixed yet another tooltip.
2012-05-13 09:13:47 +00:00
Ove Murberg Henriksen
736c0ca6e0 svn merge ^/trunk/blender -r46463:HEAD 2012-05-11 19:26:43 +00:00
Nicholas Bishop
c8465eb42c Add mask brush for sculpt mode.
The mask brush currently has two modes, 'draw' and 'smooth'.
2012-05-10 20:35:32 +00:00
Ove Murberg Henriksen
8776458e74 gui fixed 2012-05-09 16:38:49 +00:00
Campbell Barton
fbf06d0f5d update for recent RNA change 2012-05-06 13:41:27 +00:00
Nicholas Bishop
f7ec94cbc6 Add per-brush weight field.
Patch from Jaggz H, thanks!

[#31096] Weight-painting: Brush-specific weights
http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9

Each brush's weight can now be set individually, can also enable
unified setting (same as size and strength have.)

Added readfile code to the patch: subversion bumped to 1, brushes get
default weight of 0.5, unified weight enabled by default and value
from old vgroup_weight field.
2012-04-29 20:04:25 +00:00
Campbell Barton
3d851bfd5b knife tool modifications
from user freedback it seems there are 2 use cases, both valid.
* Select geometry and cut the selection in half (as 2.4x worked)
* Point-to-point define the faces to cut, dont cut through everything (only cut what you see).

With the second, since you are already selecting the edges to cut and snapping to them. only cutting the selecting is limiting/annoying.


Modifying these options while the knife tool runs doesn't work well, so expose under 2 keys, K, Shift-K.
2012-04-20 10:52:13 +00:00
Campbell Barton
7f8aaaf100 expose double limit used by auto-merge, addresses bug [#30884] 2012-04-10 01:45:22 +00:00
Campbell Barton
fc257b1f71 fix [#30817] Toolshelf delete vs X menu don't match? Bug/Inconsistancy? 2012-04-05 01:55:49 +00:00
Campbell Barton
c93c8bda3d replace relative imports with absolute imports so scritps can be executed directly (live editing). 2012-04-04 14:39:52 +00:00
Campbell Barton
d37d17019c fix for vertex group blend - wasn't functional since the deform verts were being tken from a NULL array,
also made some other improvements
- make it work in weight paint vert sel mode (some unused code for this was in the function).
- add factor slider.
- add to weight paint toolbar.
2012-04-03 02:16:27 +00:00