Commit Graph

12443 Commits

Author SHA1 Message Date
Campbell Barton
a0a7018363 * fix "dot drawing" problem - draw lines inbetween updates when redrawing the view like how existing painting works. (this means slow systems wont have the problems when they would only see dots as they dragged their mouse around)
* bucket resolution is now set from the brush size so there is around 9 buckets under the brush - (previously was fixed to 128x128).
* brush sizes below 40 disable multithreading, since threads only speeds up cases where each bucket has enough pixels in it for each core to spend some time.
* make smear use bicubic pixel lookups so a low Spacing value works as expected.
* smear tool was darkening pixels a tiny bit.
* fix for simple mistake causing ProjectPaintImage arrays not to be thread safe.
2008-11-16 15:26:15 +00:00
Campbell Barton
63d3829144 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17443:HEAD 2008-11-15 16:55:37 +00:00
Campbell Barton
db434c3434 * clone tool didnt work when the object was not at the center point.
* added clone button to the paint editbuttons (was only in the image window before)
* ctrl+clicking to set the 3d cursor also sets its depth to the face its over (much more useful when cloning and rotating the view)
* support for painting and cloning for tiled textures (for UV's outside 0-1)
* more consistant veriable names, merged image arrays into a ProjectPaintImage type to be less confusing.
2008-11-15 16:20:37 +00:00
Hamed Zaghaghi
da1738377f 17973Patch by dfelinto, and also fixed a bug in 2d-filters 2008-11-15 12:10:16 +00:00
Campbell Barton
a92969e8f1 made undo on multiple images works 2008-11-15 02:58:47 +00:00
Campbell Barton
1462aa4bc3 tile based undo's now works while projection painting.
TODO - float buffer support & for some reason painting on multiple images at once dosnt restore the tiles to the right image then undoing.
2008-11-14 17:30:55 +00:00
Martin Poirier
7401c57fb3 Transform Roll Fixes for editbone. Special case for rotation, we don't need to guess in those case and the result is better if we use the real rotation. 2008-11-14 03:13:40 +00:00
Joshua Leung
fece3f5e97 Bugfix:
Grease Pencil crashed after duplicating a screen-area, and deleting a layer from the original screen-area. The duplication code was not reassigning some pointers.
2008-11-14 02:13:10 +00:00
Campbell Barton
ff0c599c4b update for compiling cross compiling win32 on linux, had a lot of trouble with makesdna, the only way I could build and link was as a
win32 binary.
Still unable to link blender.exe
and run with wine.
2008-11-13 23:12:38 +00:00
Martin Poirier
dc4ef17eea ==Armature==
Fix the roll mess in transform. Since roll is based on an automatically calculated up axis, transforming bones would mess up bone orientation. This code automatically adjusts the roll value to keep bone orientation as consistant as possible. That works all around in transform for all transformations.

Doesn't work with x-axis mirror though as that doesn't use transform elements (fixing it would be nice for later)

Most interesting is that it works with the mirror tool (obviously), so you don't have to fix all the rolls after mirroring one side of an armature.

It could be made an option if someone presents a good enough point for that, but I can't see why you'd want the previous mess instead.

NB: this also ports a utility fonction from etch-a-ton to set bone roll from an up axis.
2008-11-13 22:35:40 +00:00
Martin Poirier
e76f7e7930 Normal Orientation on EditBones uses roll for Z axis. 2008-11-13 21:44:32 +00:00
Campbell Barton
bb6d39687a svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17405:HEAD 2008-11-13 13:34:43 +00:00
Campbell Barton
1f3e4771b1 simple workaround slowdown with painting onto multiple parts of an image at once, just use a grid of boundboxes per image.
was also running undo calls when it shouldnt,
2008-11-13 13:17:04 +00:00
Campbell Barton
fb4ff9e514 * use the existing function to only update a part of the image, should increase speed a lot, except when painting on seams from opposite parts of the image. - can speed this up with multiple boundboxes - TODO.
* use brush spacing and airbrush settings
* draw a circle while in texture paint mode.
2008-11-13 11:30:34 +00:00
Robin Allen
c838ee9592 Removed support for nested texture trees, minor ui enhancements 2008-11-13 09:57:11 +00:00
Campbell Barton
a35345f8ba 2 utility functions added for projection painting.
* BLI_linklist_index() - to get an items index in a  LinkList
* BLI_memarena_use_malloc() - BLI_memarena_use_calloc alredy existed but there was no way to switch back to malloc.

also added texnodes to cmake
2008-11-12 22:35:58 +00:00
Andrea Weikert
ae3bb90975 fix bad level call in texture nodes
BIF_preview_changed wasn't needed after all.
2008-11-12 21:02:45 +00:00
Robin Allen
bc53b942fe Added stubs to fix linker errors in texnodes 2008-11-12 20:11:54 +00:00
Ton Roosendaal
0509409c6b Bah, two more files! 2008-11-12 19:14:46 +00:00
Ton Roosendaal
8030cb03fd Patch #7897 Texture Nodes!
Robin (Frrr) Allen did a decent job on this, so we can also welcome him
as a member in the svn committers team to maintain it!

I do the first commit with some minor fixes:
- get Makefiles work
- fix rounding issue with tiles on unit faces
- removed UI includes from tex node

A nice doc in wiki is here:
http://wiki.blender.org/index.php/User:Frr/TexnodeManual

On the todo for Robin is:
- When using one or more Texture-input nodes, you cannot edit them by activating
  (as works now for Material nodes).
- The new "output node" option fails on the default case, when only one
  output node is active. It then shows often a blank menu. Will get fixed asap.
- When using a NodeTree-Texture as input node, the menu for 'active output'
  should not show. NodeTree should ignore other nodetrees to keep things sane
  for now.
- On a future todo is proper usage of "Dxt" and "Dyt" texture vectors for
  superior antialising of checkers/bricks.

General note; I know people are dying to get a full integrated shader system
with nodes. In theory we could merge this with Material Nodetrees... but I 
rather wait for a solid and very well thought out design proposal for this, 
also including design ideas for unifying with a shader language (GPU, CPU).
For the time being this is a nice extension of current textures. :)
2008-11-12 19:03:50 +00:00
Campbell Barton
c63c99d49e Option to have painting multi-threaded.
Each thread process the next free bucket the brush is over until they are all done.
2008-11-12 05:56:37 +00:00
Nathan Letwory
b8fb31e236 Remove BGE defines from highest level and define only there where needed. This prevents scons from doing complete rebuilds when toggling BGE related options. 2008-11-11 22:48:47 +00:00
Nathan Letwory
7e4db234ce previous commits showed that the absolute path problem was even deeper. This should fix yet again some of the problems with giving them to BF_BUILDDIR 2008-11-11 21:37:53 +00:00
Nathan Letwory
7f3b158030 fix problem with giving absolute paths to BF_BUILDDIR 2008-11-11 20:26:53 +00:00
Campbell Barton
483136c8e4 Adjusted scons files so disabling quicktime, python and sdl also removes their includes when building.
writefile.c had usless include.
2008-11-11 14:14:22 +00:00
Campbell Barton
58b861170c svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17335:HEAD 2008-11-11 12:56:57 +00:00
Campbell Barton
aac928d5bc last commit before some optimizations.
setting RT to 123 will paint from grease pencil (for benchmarking).
2008-11-11 12:35:52 +00:00
Campbell Barton
8a61376c65 wasnt setting the struct size for normal brush types (was testing smear + clone but not paint)
some disabled WIP too
2008-11-11 09:24:34 +00:00
Campbell Barton
db67426dbf fix for [#17959] NURBS Circle: pie-shaped deformation, sticking to object origin 2008-11-11 05:03:03 +00:00
Campbell Barton
13fe65cf46 removed some warnings 2008-11-11 04:42:15 +00:00
Campbell Barton
a331848092 * float image buffer support
* bicubic interpolation for the clone tool
2008-11-11 03:43:21 +00:00
Martin Poirier
8b32ad784b Median center didn't use TD_NOCENTER properly, making it work incorrectly with hinge bones (and with chain rotations). 2008-11-11 03:12:31 +00:00
Campbell Barton
a00e63a542 bicubic_interpolation function was re-calculating a variable it didnt need to - (was calling 32 pow()'s per pixel, now only 8 - approx 3-4x speedup on my system). 2008-11-11 01:13:05 +00:00
Benoit Bolsee
773824bbea VideoTexture: support VideoTexture in blenderplayer 2008-11-10 22:17:40 +00:00
Martin Poirier
3c69864540 Chain rotations for objects and pose bones (for teamto)
This commit adds an exception for rotations (standard rotation and tracball) to still work on children of transformed objects and bones in an expected fashion. That is, you can select a chain of finger bones and rotate to flex them all at once.

Notes:
[1] This could be expended to other transformations if needed.
[2] Center of transformation is determined using the same principle as hinge bones (transformed children aren't taken into account)
2008-11-10 21:23:54 +00:00
Ton Roosendaal
8fc7d4640c Bugfix #17965
Most Surface (NURBS) tools in buttons didn't add undo pushes.
2008-11-10 10:05:09 +00:00
Matt Ebb
ac224d0b89 Patch #17971 by Nathan Vegdahl:
Makes colorband GUI display proper color interpolation

(for real this time)
2008-11-10 05:42:07 +00:00
Benoit Bolsee
2de476c88f VideoTexture: Preserve alpha channel if present in video, images and sequences. Better detection of end of video. 2008-11-09 21:42:30 +00:00
Campbell Barton
16443062a9 * clone tool didnt work when objects center was not 0,0,0
* made backface culling work as expected in perspective view.
2008-11-09 14:34:32 +00:00
Campbell Barton
4caedd34d7 Perspective mode painting works again
SeamBleed in perspective mode mostly working (some small artifacts but generally looks ok)

Added BarycentricWeightsPersp2f and BarycentricWeightsSimplePersp2f for getting weights from verts with perspective matrix applied.
2008-11-09 12:59:01 +00:00
Campbell Barton
7403fc923f triangles were could not be painted onto at all (serves me right for testing with subsurf) 2008-11-09 04:08:08 +00:00
Campbell Barton
74d1a04f30 changes to projection painting
* initializing a bucket only initializes pixels from that bucket (was initializing all pixels in intersecting faces before which made large faces slow to paint onto)
* removed scanline functions, they are not as useful when initializing small areas. 
* UV seam checking also sets the seam flag on the adjacent face to avoid double lookups.

TODO - uv seam bleed doesn't work in perspective mode.
2008-11-09 02:47:30 +00:00
Nathan Letwory
d5ae032a60 * typo fix 2008-11-08 13:39:37 +00:00
Nathan Letwory
d1248ff6d8 === BPy API ===
* add two optional arguments to control click step and precision of Number buttons.
2008-11-08 13:38:21 +00:00
Campbell Barton
37c1fd2303 [#17958] Windows path fix for image_edit.py script.
Modified to work in linux too,  on my system subprocess.Popen(appstring) only works when appstring is a list.

Blenders __import__ didnt support keywords like pythons causing the subprocess module to fail for me.
added keywords to blenders c/api import to match pythons.
2008-11-07 15:16:30 +00:00
Benoit Bolsee
8b2811d9d5 VideoTexture: VideoTexture.materialID() can now take texture image name.
You can specify a image name (starting with 'IM') instead of a material
name in VideoTexture.materialID() and return the material ID matching
this texture.
The advantage of this method is that is works with blender material
and UV texture. In case of UV texture, it grabs the internal material
corresponding to the faces that are assigned to this texture. In case
of blender material, it grabs the material that has an image texture
matching the name as first texture channel.
In both cases, the texture id used in VideoTexture.Texture() should be 0.

Ex:

matID = VideoTexture.materialID(obj,'IMvideo.png')
GameLogic.video = VideoTexture.Texture(obj, matID, 0)
2008-11-07 10:54:32 +00:00
Campbell Barton
f7135d981a simple mistake broke clone tool. 2008-11-07 06:50:19 +00:00
Benoit Bolsee
5567f3dded VideoTexture: comment was misplaced after previous commit. 2008-11-06 23:52:47 +00:00
Diego Borghetti
7b15e8cd64 Bugfix #17524
The problem is that the audio_fill_seq function try to load the hd file
if the sequence don't have it, but it join the two string (directory path +
file path) without the / (Linux... \ Windows), so the result is a wrong path.

 I change the the strncpy and strncat function for a BLI_join_dirfile (like
the reload_sequence_new_file) and all work fine now.

 Also note that the "them go" that Luca report is (or what happen here) the
ctrl+z function, and now both case work fine here.

(interesting.. date from Feb 05.. 2006 ;)
2008-11-06 18:49:53 +00:00
Benoit Bolsee
87538be426 VideoTexture: fix compile error when FFmpeg is disabled. 2008-11-06 16:01:17 +00:00