Commit Graph

14609 Commits

Author SHA1 Message Date
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
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
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
5161c2ee3a attempt to make executing an external command work with python 2.4 & 2.5, it seems that only py 2.6 wanted list args for subprocess.Popen 2008-11-11 08:21:09 +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
Benoit Bolsee
61a83d2fba Add MSVC90 project files - part 3. Extern and Intern projects are merged in projectfiles_vc9\blender\blender.sln solution, you just need to open that solution to compile everything with VS2008. 2008-11-10 21:22:22 +00:00
Benoit Bolsee
c27a8da6dd Add MSVC90 project files - part 2. 2008-11-10 16:09:25 +00:00
Benoit Bolsee
8eec6cecc0 Add MSVC90 project files - part 1. 2008-11-10 15:36:58 +00:00
Campbell Barton
d63f1d6ab9 missing comma made scons arg BF_CXX_LIB_STATIC not work 2008-11-10 13:36:44 +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
Nathan Letwory
0a8e8c8c9e * add Brecht's small patch to make values to BF_QUICK and BF_QUICKDEBUG function as partial search entries.
- this means you can do BF_QUICK=bf_ and it would build all libs that contain bf_ in their name. This makes
    it easier to use, since you don't have to remember the exact names

* Update documentation to mention scons-local.
2008-11-09 21:00:49 +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
Nathan Letwory
fecdd60453 * use msvc proposed names when building on win32 2008-11-08 12:01:55 +00:00
Benoit Bolsee
e3ca8765be VideoTexture: forgot to commit MSVC project file, strange that nobody noticed... 2008-11-07 20:13:07 +00:00
Nathan Letwory
0a825b4d72 * fix typo found by brecht 2008-11-07 19:49:55 +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
Campbell Barton
4d460369c0 WIP commit before some optimizations,
fix for possible divide by zero.
added BarryCentricWeights2f(), returns weights for points outside the triangle.
2008-11-06 08:01:11 +00:00
Campbell Barton
f018a3b5bb added support for smear brush type 2008-11-06 02:08:41 +00:00
Nathan Letwory
f3d1be5638 * While making changes to btools.py and Blender.py, I completely forgot about the name changes.
Here they are.

  Platform managers, double check that the compiler flag options still work.
2008-11-06 00:28:26 +00:00
Campbell Barton
5b6708c278 support for brush blend modes (Mix, Multiply, Darken etc) 2008-11-05 23:24:52 +00:00
Nathan Letwory
76320b76ad Change remaining Copy() to Clone() 2008-11-05 23:23:04 +00:00
Campbell Barton
769a43d3c0 painting onto multiple images wasnt working, faces with different images are treated as seams even if their UV's match. 2008-11-05 22:27:45 +00:00
Benoit Bolsee
ce1625ebc0 VideoTexture: new VideoTexture.ImageFFmpeg to load and reload images.
The FFmpeg library allows to load image files. Although it is possible
to load images using the VideoFFmpeg class, it is not very efficient.
The new class VideoTexture.ImageFFmpeg is dedicated to image management.

Constructor:
-----------
VideoTexture.ImageFFmpeg('image_file_name')
  Opens the file but does not load the texture yet.
  The file name can also be a network address. It can also be a video
  file name; in that case only the first image is loaded.

Methods:
-------
refresh(True)
  Loads the image to texture. 
  You just need to call it once, the file is automatically closed after
  that and calling refresh() again will have no effect.

reload('new_file_name')
  Reloads the image (if new_file_name is omitted) or loads a new image.
  The file is opened but the texture is not updated yet, you need
  to call refresh() once to load the texture.

Attributes:
----------
status
  returns the image status:
    2 : file opened, texture not loaded
    3 : file closed, texture loaded

image
  returns the image data as a string of RGBA pixel

size
  returns the image size [x,y]

scale
  get/set the scale flag. 
  If the scale flag is False, the image is rescale to texture format
  using gluScaleImage() function, slow but good quality.
  If the scale flag is True, the image is rescaled using a fast but
  less accurate algorithm.

flip
  get/set Y-flip flag.
  Set to True by default as FFmpeg always provides the image upside down

filter
  get/set filter(s) on the image.

Example:
2008-11-05 21:53:22 +00:00
Benoit Bolsee
0ade815aff VideoTexture: fixing a crash when loading an image as a video file - yes it works, provided that you don't set repeat and also no need to refresh all the time. 2008-11-05 17:38:31 +00:00
Campbell Barton
aa1ba2f3fb svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17279:HEAD
somehow scripts line endings change is messing things up, these changes wont be included
error is:
svn: File 'release/scripts/scripttemplate_metaball_create.py' has inconsistent newlines
svn: Inconsistent line ending style
svn: Error reading spooled REPORT request response
2008-11-05 15:11:40 +00:00
Campbell Barton
b98b4e8be8 projection painting clone tool - gives a similar work flow to cloning in the gimp, Ctrl+Click to set the cursor source, then paint from this location.
todo...
* pixel interpolation.
* clone option can currently only be set from the image paint panel.
* only initialize clone pixels under the mouse.
* overlap between source/target while painting could cause problems. need to look into this.

also fixed some cashes in painting normally.
2008-11-05 14:45:54 +00:00
Benoit Bolsee
8916f84622 VideoTexture: Add support for GLSL. FIx small printout bug in Exception printout 2008-11-05 13:22:10 +00:00
Remigiusz Fiedler
3b2a07a866 uniform end-of-line format and set svn:eol-style property to "native" for all scripts 2008-11-05 11:42:34 +00:00
Campbell Barton
ea168748eb error in last commit, scanlines had extra offset causing overlapping lines between faces without seams 2008-11-05 05:08:07 +00:00