Age | Commit message (Collapse) | Author |
|
DRAW sculpt brush
front and back face test was reversed. This problem still shows up when sculpting from the inside of a mesh, but this
cant be worked around unless its know which faces are visible or not. (tried some different workarounds but this
seems acceptable)
|
|
also added some checks for sculpt mixing with other modes (was possible to mix sculpt+posemode)
|
|
|
|
|
|
were pointing away from the view.
deal with this by making 2 average vectors, one for front pointing faces, and another for back pointing faces,
also removed an unneeded acos().
|
|
Calculating the area normal now checks each normal against the angle of the camera. If the normal is pointing away from the camera, it is ignored.
|
|
Undoing in sculpt mode correctly returns to previous pivots now.
|
|
* initial values I added in radialcontrol.c might need to be reviewed if they cause problems(I used 200, as it seems many tools were setting that)
* #pragma warnings are the only warnings I still get, so that means we have a clean slate again
|
|
Fixed crasher in my previous commit; wasn't checking for NULL pointer.
|
|
Fix bug with layer brush + anchored.
|
|
Added a new brush option, "Anchored". When enabled, the brush doesn't move with the mouse, but rather stays in it's initial location and grows larger or smaller to follow the mouse. Good for brushing alphas on to the mesh. (Note that this option isn't available for the grab brush, and ignores the smooth stroke option.)
|
|
Added bilinear filtering to sculpt brushes when accessing textures.
|
|
Switched point projection used in brush texturing to floating point rather than integer; fixes some ugly artifacts in texture application.
|
|
Replace a 'magic number' used in several places with a proper constant
|
|
Cleaned up some old parts of sculpt. Got rid of the old EditData struct in favor of two new "brush action" structures, which split the symmetry data out from everything else. Cleaned up various names and such as well. There should be no user-visible changes.
|
|
Disabled smooth stroke when the grab brush is active
|
|
|
|
* Generalized the interactive brush property control from sculpt mode into a simple API
* Modified sculpt mode to take advantage of this (even fixes some minor bugs!)
* Added shortcuts in particle edit to set brush size/strength (FKEY/shift+FKEY)
Still todo are the other modes that have brushes...
|
|
Added undo pushes after changing the brush type using the CTRL+TAB menu and after interactive change of brush size/strength/rotate.
|
|
Fixed a memory leak when using the interactive brush resize tool.
|
|
Fixed bad level calls in sculptmode.
|
|
Applying Stephan Kassemeyer's patch (#6750) to add a curve modifier for sculpting.
A few changes from the patch:
* The default curve is closer to the old behavior
* Fixed loading files already saved in sculpt mode
* Changed the interface; split the brush texture controls off into a third sculpt tab, and put the curve (and curve reset) into the Brush tab.
|
|
Division by zero fix
|
|
Improved some memory allocation; it doesn't actually use less memory now, just avoids reallocating the same block of memory over and over again.
|
|
Minor refactoring of the overgrown sculpt() function.
|
|
when used with a 2D brush texture, the texture is automatically rotated to follow the direction of the brush stroke.
|
|
Fixes flickering in the 3D view header after using the interactive brush size tool.
|
|
Previously, the implementation of this was quite awkward, with
the preference swapping mouse buttons globally, rather than just
selection, as is advertised on the pref. This had the effect of
changing the painting in sculpt/texture paint/weight paint/etc to
the left mouse button. This was totally silly, since when using a
tablet, left mouse select is the sane way to go, but it meant
that every time you wanted to sculpt or paint, you had to switch
the mouse buttons around so you could actually use the tablet as
normal.
This commit fixes that, and makes the preference do just what it
says, use left mouse for selection (i.e. in object/edit mode) and
only that.
|
|
* Made partial redraw mode a bit more robust, fixed a couple of potential problem spots
* Fixed display of smooth stroke with partial redraw.
|
|
Removed the draw_flag field from SculptData, moved the two draw flags over to SculptData.flags
|
|
Added a new input control that smooths the brush stroke.
This option controlled by the menu item Sculpt>Input Control>Smooth Stroke. When enabled, the brush has a delayed effect on the model; a green line is drawn to indicate the smoothed path of the stroke. After ~200 pixels, the first half of the stroke will be applied to the model; the process then repeats, with a new segment of the stroke being applied to the model after every 200 pixels. On mouse up, any remaining portion of the stroke will be applied.
Other changes:
* Added a flags field to SculptData; currently only used for smooth stroke but other flags can be moved into it
* Moved the damaged_rects/verts into SculptSession
* Simplified brush application by moving init_editdata into do_symmetrical_brush_actions
* Removed Averaging from sculpt Input menu; smooth stroke should take its place
TODO:
* Fix display of the smooth line in Partial Redraw mode
* Make the smoothing and delay factors adjustable
* Optimize the stroke application (currently using the old 'dot' style of applying the brush)
|
|
Kind of fixed [#6688] sculpt - if 2.44 blend is openned in 2.43 with flatten brush selected causes crash
* Added better handling for new brushes; if more brushes are added they will no longer cause a crash (but this doesn't help older Blenders compiled without this fix.)
|
|
Fixed bug #6631, Sculpt Tool don't works correctly on a mesh with Armature modifier
* Modified the calculation of projected (2D) vertex locations to use deformed vertex locations when appropriate
|
|
Fixed bug #6639 ] Sculpt mode clearing brush texture causes a crash (null pointer)
* Added code to clear the brush texture preview (used for propset) when deleting a brush texture
* Added a check in tex_strength() for an empty (NULL) texture slot to prevent the crash
|
|
Fix for bug #6556, Sculpt draw/inflate brush strength is dependent on object scale value
Added a scaling factor to brushes that adjusts for objects which have been scaled. Usually this means that the vertex locations are also scaled up or down.
|
|
This commit should hopefully fix some of the problems some people were
having with tablet support in sculpt mode, and also the problems I made
visible with my previous commit related to number field dragging.
Now, all the ghost related stuff is tucked away in ghostwinlay.c and a
simple Blender API, similar to the existing get_mbut() for example, is
provided to access the tablet data. As with the other mouse related data in
Blender, the tablet data is cached upon each mouse move or click, in the
Window struct.
You can now just use:
float get_pressure(void);
void get_tilt(float *xtilt, float *ytilt);
short get_activedevice(void);
to get such data from the tablet. Documentation on the returned data
is in ghostwinlay.c in the _Window struct definition.
Brecht and Nicholas, I've updated the painting and sculpt code and it works
just fine here, you may want to give it a check though to make sure I
haven't done anything silly.
|
|
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
|
|
Added a #define for the number of vertices the flatten brush should sample when calculating the distance to flatten to.
|
|
|
|
* Added new brush, "Flatten". This brush pushes vertices along the normal defined by the average normal of each vertex within the brush area. The vertices are pushed towards the plane defined by vertices towards the edge of the brush. Essentially, this means that the direction of flattening is dependent on the surface beneath the brush.
* In order to make space for the flatten brush, the controls inside the Sculpt palette were widened to 268. (Note that the panel width didn't change, so it still fits properly in the vertical layout.)
* Todo: it would probably make sense to make the "View" slider available under the Brush tab available for the Flatten brush (currently it's only used for the Draw brush.)
|
|
Added a SculptSession parameter to sculptmode_propset_end, to avoid propset_end creating a new session (propset_end is called when freeing the session, so this can cause a memory leak.)
|
|
Removed special Sculpt Mode undo code. Sculpt Mode undo is no longer so useful, since in order to make it more correct it has gotten slower, so normal BIF_undo_push is used now. Fixes bug with Shape Keys, sculpting on a shape key wasn't doing undo properly.
|
|
Followup to joeedh's commit, removed use of RenderInfo struct from Sculpt Mode.
|
|
I forgot a few hide functions that needed undo pushes, and misnamed
an undo push in one of them.
|
|
Fixed bug #6056, Brush Grab in SculptMode don't works for ShapeKeys
* Grab Brush stores active vertices differently from other brushes, need to read from a different List when updating shape keys.
|
|
* Replaced get_tex_angle() with tex_angle() and set_tex_angle(). This removes the need to do a bunch of error-prone NULL checking everywhere the texture angle is used.
|
|
When in sculptmode, enter editmode, add faces or vertices, exit editmode,
then undos/redos screw up mesh.
Now the stack for sculpt is freed. Later on one could precisely test why
this undo isn't resistant to such changes.
|
|
- possible fix for crash mentioned in [ #5781 ] Sculpt Brush Tool not working correctly
- workaround for possible compiler glitch with floating point conversion.
|
|
Texture brushes were writing outside of array boundary. Might be the bad
one as reported for windows...
|
|
Crash when in sculptmode, add armature, switch to object mode.
|