Age | Commit message (Collapse) | Author |
|
* Split object_edit.c into multiple files:
object_add.c, object_edit.c, object_hook.c, object_relations.c,
object_select.c, object_transform.c.
* Rename files to have consistent object_ and mball_ prefix:
object_shapekey.c, object_lattice.c, object_vgroup.c, mball_edit.c.
* Added operators:
* vertex group menu and set active
* apply location, rotation, scale, visual transform (location is new)
* make local
* make vertex parent
* move to layer
* convert to curve/mesh (not finished yet)
* Many small fixes for marked issues, but still much code to be cleaned
up here...
|
|
replacements...
MTC_cross3Float -> Crossf
MTC_diff3Float -> VecSubf
MTC_dot3Float -> Inpf
MTC_Mat3CpyMat4 -> Mat3CpyMat4
MTC_Mat3MulVecd -> Mat3MulVecd
MTC_Mat3MulVecfl -> Mat3MulVecfl
MTC_Mat4CpyMat4 -> Mat4CpyMat4
MTC_Mat4Invert -> Mat4Invert
MTC_Mat4Mul3Vecfl -> Mat4Mul3Vecfl
MTC_Mat4MulMat4 -> Mat4MulMat4
MTC_Mat4MulSerie -> Mat4MulSerie
MTC_Mat4MulVec4fl -> Mat4MulVec4fl
MTC_Mat4MulVecfl -> Mat4MulVecfl
MTC_Mat4One -> Mat4One
MTC_Mat4Ortho -> Mat4Ortho
MTC_Mat4SwapMat4 -> Mat4SwapMat4
|
|
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
|
|
* Don't do shared vertex colors for every vpaint dot. Profiling on a large mesh showed vpaint spent about 65% of the time in this function, but most of the time no difference will be apparent in the result. (Could make an operator so the user can force this operation after doing some painting.)
TODO:
Profiling now shows most time spent in drawing the mesh. (This is done twice for vpaint, the first time for finding backbuf sampling.)
|
|
* Removed the BKE_sculpt file and moved it's contents (basically just the sculpt session struct) to BKE_paint
|
|
* Cleaned up some vertex paint code. Reduces code duplication a bit.
|
|
* Deleted unused file
|
|
* Added operator for filling vertex colors with the brush color
* Pythonized the vertex paint menu
|
|
gave ugly center area of 100% opacity)
|
|
* Updated texture paint UI for stroke settings.
* Removed duplicate brush blend types, just use the ones defined in imbuf instead
|
|
* Added airbrush and airbrush rate options to paint stroke. Works for sculpt, vertex paint, and weight paint.
|
|
* Little bugfix, was passing an invalid pointer
|
|
* Weight paint and vertex paint now use the same cursor setup as sculpt
|
|
* Refactored weight paint to use the new stroke code, now does smooth stroke and stroke spacing.
Note: weight paint is failing to free it's MocNodes in 2.5, someone might want to look into that
|
|
* Fixed sculpt brush stroke exec (F4 operator)
* Made a generic paint stroke exec
|
|
* Converted vertex paint to use the new stroke system. Now supports the same smooth stroke and stroke spacing as sculpt mode.
* Refactored the paint cursor a bit, just sculpt for now but other modes soon.
* A couple warning fixes
|
|
* Some initial work on a new paint abstraction, PaintStroke. For now, most of the code just pulls out stroke-related stuff from sculpt mode, next step is to integrate the other paint modes to use this. It'll enable stuff like smooth stroke for all the paint modes with less code duplication.
|
|
* Fixed CMake includes for blenkernel
* Fixed an RNA property read that was causing failures in a couple paint modes
|
|
* Added UI for brush stroke. Contains for now spacing and smooth stroke
* Removed Sculpt UI for airbrush -- doesn't do anything in sculpt mode
* Improved smooth stroke by using float instead of int precision, so smooth stroke is even smoother now
|
|
* Fixed tablet pressure for brush size.
|
|
* Fixed a mem leak with the grab brush
|
|
* Added icons to viewport shading enum. On a side note, why do we have an icon called "ICON_POTATO" for texture mode?
* Fixed clay brush at zero-strength bug, was dividing by zero. Still todo is fixing clay brush strength relative to other brushes.
|
|
* Hopefully fixed the tablet pressure in sculpt mode? Can't test because Blender isn't seeing my tablet.
|
|
* Updated the brush selection UI to make the slots less apparent; adding and removing brushes now directly adds and removes slots.
|
|
* Converted to use Paint struct. Now all the brush modes are done.
TODO:
* Make the UI better
|
|
* Converted vertex paint and weight paint to use the new Paint type
|
|
global, passing along enable/disable mipmap setting through
various functions instead.
|
|
* Added a new Paint type in scene DNA. This is now the base struct for Sculpt.
* The Paint type contains a list of Brushes, you can add or remove these much like material and texture slots.
* Modified the UI for the new Paint type, now shows the list of brushes active for this mode
* Added a New Brush operator, shows in the UI as a list of brush tool types to add
* Made the sculpt tool property UI smaller and not expanded, expectation is that we will have a number of preset brushes that will cover the basic sculpt brush types
TODO:
* Vertex paint, weight paint, texture paint need to be converted to this system next
* Add brush presets to the default blend
|
|
* Pose mode was already object-localized, but moved the flag from object->flag to object->mode, with all the other modes.
* Updated object mode RNA
* Commented out some dubious use of base->flag with the posemode flag. So far as I could see the value was only being set, not read, so a hopefully safe change.
|
|
* Made texture paint object-localized too.
Note for Brecht: gpu_draw.c had three uses of G_TEXTUREPAINT that I was not able to cleanly fix, so commented out for now. Can you take a look and see what should be done here?
|
|
* Weightpaint is now object-local like sculpt and vertexpaint.
* Fixed a bug spotted by DingTo, going from editmode to sculptmode didn't fully leave editmode
|
|
* Made vertex paint local to object, like sculpt mode.
* New test for vertex paint is (ob->mode & OB_MODE_VERTEX_PAINT)
|
|
* Replaced FACESEL_PAINT_TEST macro with paint_facesel_test. This removes one more thing from BKE_global, and it'll make it easier to localize.
* Fixed sculpt paint cursor sometimes not showing.
|
|
* Made sculpt mode local to object.
* This also fixes loading files from 2.4x saved in sculptmode
Touched a lot of things here, let me know if anything breaks
TODO:
* The other paint modes should be converted as well
|
|
* Moved brush curve preset operator out of sculpt to paint_utils
* Added a button to the curve panel to set the preset
|
|
* Moved the brush texture settings to MTex/TextureSlot. The mapping settings now show up in the texture panel, pretty much like they do for textures used with materials.
TODO:
* Tiled mode should not show Z size setting
* Add a locked mode so that texture size can be changed uniformly like in 2.4x
|
|
* Fixed clay brush to work more like the original patch. It should now correctly limit the depth being added or subtracted.
|
|
* Added toolbar UI for setting "anchored" mode
* Added a "persistent" mode for the layer brush; basically you can keep sculpting on the same layer between strokes when this is on. There's a button to reset the base so you can add another layer on top of that, and so on.
This feature was suggested by Blenderer on BA, thanks!
Note, I think these options could use better names in the UI, but I couldn't really think of anything very descriptive, suggestions welcome
|
|
instead of casting everywhere.
|
|
Outliner: brought back to near full functioning:
- proper operators, like for open/close items, exec operations
(note: select is still same operator as activate, should
become modal ops later)
- rename works again (ctrl+click)
- proper notifiers for redraws
- select / extend select works again
- editmode in/out works again
- enter key opens/closes again
- right mouse operations work again
Didn't do:
- options for Sequence strips
- signals to change button views on clicks
- error/warning messages
UI:
- added new uiButSetRenameFunc(), which passes on the old name
- added uiButActiveOnly(), which ensures a button gets created in
active state, and gets removed when used. Needed for editing
names in outliner.
Andrea: check outliner.c for uiButActiveOnly(), very easy to use!
Also:
- Added posemode operator, CTRL+TAB tied to it.
|
|
* Fixed the NKEY panel not updating when switching to sculpt mode
* Removed some old XXX'd code for testing textures, can replace that now with proper brush-texture UI
|
|
|
|
* Cursor grabbing is now done only if the OPTYPE_BLOCKING flag
is set for the operator, since for e.g. render it should not
block.
|
|
* Weight paint: brush strength was changed to both define weight
and strength, this can't work, made them separate buttons.
* Allow adding particle system as modifier (fix crash).
* 3D view modal ops (zoom ..) could not be ended when invoked
from a button.
* Fix some warnings.
* Fix spelling in particle RNA property.
|
|
Bugfix, mesh face normals not getting updated because a list was freed in the wrong place.
|
|
== Re-added smooth stroke ==
UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.
It's a different implementation than in 2.4, works like this:
The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.
Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.
Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?
== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.
Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
|
|
Improved sculpting in perspective mode; starting a stroke on the background would sometimes result in the brush having a huge effect on the mesh. Fixed by waiting to start the stroke until the mouse moves over the model.
The fix is not quite perfect, because detection of the edge of the model is based on the depth buffer, so other things that change the depth buffer, like the grid and axis lines in the 3d view, can throw off the calculation.
|
|
Removed a bunch of old code that was #ifdef'd out. Mostly relates to partial visibility and partial redraw. Both of these are important features, but need better design updated for 2.5.
Also removed the old (huge/ugly!) sculpt() function that is now handled by the stroke operator code.
|
|
|
|
Fixed the Lock X/Y/Z buttons for sculpt, should work for all brushes now.
|