Commit Graph

4430 Commits

Author SHA1 Message Date
Nicholas Bishop 67073db49c 2.5/Sculpt:
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.
2009-06-27 21:14:04 +00:00
Nicholas Bishop b097f7250d 2.5/Sculpt:
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.
2009-06-27 17:10:19 +00:00
Guillermo S. Romero 333e231fa6 SVN maintenance. 2009-06-23 00:09:26 +00:00
Nicholas Bishop 1efffc1f56 2.5/Sculpt:
Fixed the Lock X/Y/Z buttons for sculpt, should work for all brushes now.
2009-06-21 18:59:26 +00:00
Nicholas Bishop 03c46c1e54 2.5/Sculpt:
Some improvements to the layer brush; the displacement is now tied to brush size, like for draw and inflate.

Fixes for layer brush in subtract mode and anchor mode.
2009-06-21 17:04:17 +00:00
Nicholas Bishop de77b4a9b3 2.5/Sculpt:
Fixed bug where anchor brush would leave messed up normals (was related to using face normals, not vertex normals.)
2009-06-21 15:59:43 +00:00
Nicholas Bishop 64274de2fe 2.5/Sculpt:
Fix for the poll used for the operator to set the brush curve to a preset. The 3 brush curve presets in the Sculpt menu are now functional.
2009-06-21 03:34:30 +00:00
Nicholas Bishop 001dab25d4 2.5/Sculpt:
Added a clay brush. It behaves like a combination of the flatten and draw brushes.

Credit to Fredrik Hannson for the original patch (#18666)
2009-06-20 20:29:25 +00:00
Nicholas Bishop 7349d775b0 2.5/Sculpt:
Made some improvements to how brush strength works.

* For the draw and inflate brushes, the brush's 3D radius is used to set the "goal" distance, towards which vertices move. A strength setting of 1.0 will move verts there immediately (with the usual exceptions of tablet pressure, texture/curve input, etc.)

* Also changed strength calculation to use the square of the strength slider, so that you don't have to be as finicky setting a low brush strength.

* For smooth brush, added an extra loop through the verts. So, a bit slower, but now verts take into account more than the immediate vertex ring.

TODO:
Still some magic numbers:
* Pinch limits the effect to moving vertices half of the way towards brush center. I see no use for a 100% pinch (it pretty much destroys the mesh.) Even half may be too high a limit, but this is hard to place an exact number on.

* Smooth has two magic numbers, the strength fudge factor and the number of smooth repetitions (currently 2.)

* The way the layer brush works is left unchanged for now.
2009-06-19 22:16:30 +00:00
Brecht Van Lommel 401b58cb45 2.5: Image Editor
* Started porting over to python, menus nearly done, header WIP.
* Game Properties panel is in python too
* Deprecated "Tiles" as a per face flag here, now it's always on
  the image, used to be both, working in a very confusing way.
  Unlikely someone actually had a purpose for this being per face.
* Remove GPC_PolygonMaterial.cpp/h, it's not actually used anymore,
  so I don't want to bother updating it.
* Fix crash in image painting (own mistake in porting over bugfix
  from 2.4x).
2009-06-16 01:22:56 +00:00
Brecht Van Lommel 51fbc95e8c RNA
* Added icon to property and enum property items. The latter is
  responsible for the large number of files changed.
* For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA
  as argument instead of a C pointer, instead of doing it implicitly
  with the AnyType type.

* Material: properly wrap diffuse/specular param variables, and
  rename some things for consistency.
* MaterialTextureSlot: added "enabled" property (ma->septex).
* Image: make animated property editable.
* Image Editor: make some things editable, notifiers, respect state.
* Context: fix issue with screen not being set as ID.
2009-06-16 00:52:21 +00:00
Joseph Eagar fc79b456fd merge with 2.5 at r20783 2009-06-10 19:15:27 +00:00
Joseph Eagar be286db322 (NOTE: DO NOT TEST)
Start of planned DerivedMesh refactoring.  The mface
interfaces in DerivedMesh have been renamed to reflect
their new status as tesselated face interfaces (rather 
then the primary ones, which are now stored in mpolys).

short review: mpolys store "primary" face data, while
mfaces store the tesselated form of the mesh (generally
as triangles).  mpolys are defined by mloops, and each
mpoly defines a range of loops it "owns" in the main
mloop array.

I've also added basic read-only face iterators, which
are implemented for CDDM, ccgsubsurf, and the bmeditmesh
derivedmesh.  Since faces are now variable-length things,
trying to implement the same interface as mfaces would not
have worked well (especially since faces are stored as
an mpoly + a range of mloops).

I figure first we can evaluate these simple read-only
face iterators, then decide if a) we like using iterators
in DerivedMesh, b) how much of it should use them, and c)
if we want write-capable iterators.

I plan to write official docs on this design after I get
it more stable; I'm committing now because there's a rather
lot of changes, and I might do a merge soon.
2009-06-10 10:06:25 +00:00
Brecht Van Lommel c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
Nicholas Bishop 98444f6770 Multires/2.5:
Attempt to make multires updating a little cleaner by
assuming that no update needs to be performed, and only
doing the update when the modified flag is set (either
by sculpting or using some other tool that needs an update.)
2009-06-07 18:09:22 +00:00
Janne Karhu 880c43ad5a First new particle code:
-Many things not yet working properly :)
-Experimental new (hopefully more logical) categorization of buttons, feedback on this is very welcome.
-Separate render & draw types, for example now there is actually a render option "halo" instead of all the different point draw types.
-Particles get recalculated only from buttons that actually change something that has to be recalculated, for example changing visualization doesn't reset particles any more.
-Boid physics buttons are still missing as I'm currently redoing the whole boids code.
-Point caching is still very wip, so baking is not possible for example, but I added a few cache baking flags for rna that were/will be needed for particle buttons logic.
2009-06-05 23:59:33 +00:00
Nicholas Bishop edd783db73 2.5/Sculpt:
Bugfix for doing a multires subdivision while in sculptmode (forgot to resize projected vertices.)
2009-05-24 23:05:27 +00:00
Joseph Eagar f026266e18 merge with 2.5 at r20307. note there were some python hacking necassary for this to work, so um hopefully there's not too much cruft from that.
[[Split portion of a mixed commit.]]
2009-05-23 03:24:15 +00:00
Ton Roosendaal 0cd511eee8 2.5
Text drawing in 3D window fixed, using BLF default font (yes, nice AA'ed
fonts too :)

Solved it by gathering all strings that needs to be drawn for an object,
and then draw in end of object drawing, in pixelspace. Also cleaned up
some of the code for projecting 3d coords, much nicer now (mat stored in
region-view3d)
2009-05-18 16:42:34 +00:00
Diego Borghetti 405cf80eb8 Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
   the old BMF api.

I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.

MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
        Always have to link/include the freetype2 library
        Remove any reference to libbmfont
        Remove any reference to libftfont
        Remove any reference to libbftgl (or libbFTGL)
2009-05-05 23:10:32 +00:00
Brecht Van Lommel 874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
Campbell Barton 931527e648 - use clear, set, add, enable, disable and toggle as a prefix in operator names
- use select as a suffix eg UV_OT_loop_select -> UV_OT_select_loop
- Each select all operator was using slightly different wording...
  select_all, deselect_all, de_select_all, select_de_select_all -> select_all_toggle

- selection -> select
- POSE_OT_select_connected -> POSE_OT_select_linked to match other operators
- NODE_OT_delete_selection -> NODE_OT_delete since its not used in other operators
- ANIM_OT_previewrange_define -> ANIM_OT_previewrange_set to match other operators
- NODE_OT_fit_all -> NODE_OT_view_all to match other operators
- View2D_OT_* -> VIEW2D_OT_* to match VIEW3D
- View2D_OT_view_downscroll -> VIEW2D_OT_scroll_down more logical
- removed MARKER_OT_mouseselect_extend and made extend a boolean property of MARKER_OT_mouseselect
- MARKER_OT_mouseselect -> MARKER_OT_select
- GROUP_OT_group_remove -> GROUP_OT_objects_remove more logical since its removing objects from groups
- MESH_OT_removedoublesflag -> MESH_OT_remove_doubles
- redundant words MESH_OT_split_mesh -> MESH_OT_split,  OBJECT_OT_object_delete -> OBJECT_OT_delete

renamed selection operator properties
 extend_select -> extend
 column_select -> column
 select_children_only -> children_only
 ... Since these are all in the context of selection operators there is no need for the extra 'select' in the property name.
 
Updated docs
http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
2009-03-29 02:15:13 +00:00
Brecht Van Lommel d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +00:00
Nicholas Bishop 891c3bc663 Simplified vpaint/wpaint radial control calls. Removed also some unused radial control code. 2009-03-11 00:52:00 +00:00
Nicholas Bishop 33509e8510 Changed vertexpaint and weightpaint to use the standard Brush struct, so they too work with the brush panel.
Note: these modes are only using color/alpha/size from Brush, so there's more integration work todo yet.
2009-03-11 00:43:08 +00:00
Brecht Van Lommel 9ac7c8e91a 2.5: Particle edit mode more functional now. Transform, brush
editing, paint cursor, radial control, mouse/border/circle/lasso
select, mirroring, bad level calls fixed, etc.
2009-02-25 19:29:58 +00:00
Ton Roosendaal 576cb47945 2.5
Added more strict poll() to radial control for texture paint.
I'd advise to use wherever possible G.f checks in the polls for now, 
easier to get this solved later.
2009-02-23 16:31:58 +00:00
Nicholas Bishop 674aae36b6 * Added radial control for texture paint (in both view3d and image)
* bugfix: for older files, initialize the brush curve on file load
2009-02-22 19:31:25 +00:00
Brecht Van Lommel ebd2b1212d 2.5: Particle Edit, work in progress commit.
* Still incomplete and some operators don't work, refresh issues, etc.
* Made Hide/Reveal operators consistent for various modes.
2009-02-20 20:39:27 +00:00
Brecht Van Lommel 8e41a21607 2.5:
* Image painting back. 2d paint, 3d paint and projection, undo,
  pressure, repeating paint operations, etc should all work.
  Drawing cursor needs a bit of work, only gets shown when enabling
  texture paint mode now.

* Move sculpt, image paint, and vertex/weight paint into a single
  sculpt_paint module. Doesn't make much difference now, but nice
  to have it together for better integration and consistency in
  the future.
2009-02-19 23:53:40 +00:00