13 years agosvn merge -r17471:HEAD
Campbell Barton [Wed, 19 Nov 2008 03:43:03 +0000 (03:43 +0000)]
svn merge -r17471:HEAD

13 years agoSplit up the following imbuf functions in 2...
Campbell Barton [Wed, 19 Nov 2008 03:28:07 +0000 (03:28 +0000)]
Split up the following imbuf functions in 2...
void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);

void bicubic_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void neareast_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void bilinear_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);

This is needed so for projection painting but generally useful if you want to get the interpolated color of a pixel in an image without having a destination imbuf.

While editing these I noticed the functons are a bit dodgy, they assume the input ImBuf has matching float/chr buffer to the output.

13 years agobicubic_interpolation - dont use pow(val, 3.0f) at all, do (val*val*val) instead,
Campbell Barton [Wed, 19 Nov 2008 02:07:23 +0000 (02:07 +0000)]
bicubic_interpolation - dont use pow(val, 3.0f) at all, do (val*val*val) instead,
Tested overall speedup is about 5x when scaling 4096x4096 -> 4000x4000 in the sequencer.

There were some artifacts in the resulting image but double checked and the old code gives the same problems.
Added back old code with #if 0's since its a bit more readable.

13 years agoSome improvements brecht suggested, only noticable change is faster multithreading
Campbell Barton [Tue, 18 Nov 2008 13:51:51 +0000 (13:51 +0000)]
Some improvements brecht suggested, only noticable change is faster multithreading

General optimizations
* Precompute 1/x when dividing by x multiple times.
* Use float constants like 0.0f instead of 0.0, avoids conversions from float to doubles and back.

* make pixel (and similar pointers elsewhere) a union with a float and unsigned int pointer to reduce the number of casts a little. generally there are a lot of casts going on in the code, makes it hard to read.

* the perspective case checks with (*projScreenCo)[3] > 0.001) for faces behind the view. - Changed to use the clip start from get_view3d_viewplane
* removed arbitrary check for brush size to disable threads.

* Make clone tool use IMB_blend_color to reduce the code and support blend modes.

* Make threaded and non threaded mode use same function (just dont start threads when its set to 1)
* removed PIL_sleep_ms, was not needed and slowed down threading (my bad!, was copied from bake code).

13 years agosome scons command line args were not working since recent changes-
Campbell Barton [Tue, 18 Nov 2008 05:47:19 +0000 (05:47 +0000)]
some scons command line args were not working since recent changes-
 scons CCFLAGS="-O0 -ggdp3"
for example would pass on the args including the "'s to scons, causing the build to fail.

13 years agoAdded option to use another UV layer as a clone source, to paint from one uv layer...
Campbell Barton [Tue, 18 Nov 2008 03:28:50 +0000 (03:28 +0000)]
Added option to use another UV layer as a clone source, to paint from one uv layer's image and UVs into the active layer.

13 years ago* Added buttons for accessing options "occlude", "backface cull" and "bleed", note...
Campbell Barton [Tue, 18 Nov 2008 00:17:13 +0000 (00:17 +0000)]
* Added buttons for accessing options "occlude", "backface cull" and "bleed", note that bleed is 0.0 by default, before it was always 2.0;
* use a faster method of getting a pixels screenspace location.
* check if its possible to break out of pixel to bucket/face intersection early - ~7% overall speedup (ignoring redraw time).
* removed scanline intersection function (added back incase they were needed but it looks like there not)
* speedup for painting with only 1 image (use a loop without context switching checks)
* more commenting + cleanup

13 years agoQuatOne was so wrong is would make Hamilton cry.
Martin Poirier [Mon, 17 Nov 2008 22:13:45 +0000 (22:13 +0000)]
QuatOne was so wrong is would make Hamilton cry.

Thankfully, very little code used it, the only exception being the retarget code in etch-a-ton.

13 years agoAdded BF_PROFILE_LINKFLAGS, Compiling with BF_PROFILE=1 was also throwing a python...
Campbell Barton [Mon, 17 Nov 2008 10:43:12 +0000 (10:43 +0000)]
Added BF_PROFILE_LINKFLAGS, Compiling with BF_PROFILE=1 was also throwing a python error.

13 years agoFix compilation on OS X
Martin Poirier [Mon, 17 Nov 2008 00:54:45 +0000 (00:54 +0000)]
Fix compilation on OS X

Patch by dfelinto

13 years agoDXF-Importer: updated version v1.12 - 2008.11.16 by migius
Remigiusz Fiedler [Sun, 16 Nov 2008 23:52:29 +0000 (23:52 +0000)]
DXF-Importer: updated version v1.12 - 2008.11.16 by migius
 - remove try_finally: cause not supported in python <2.5
 - add Bezier curves bevel radius support (default 1.0)

13 years agodisabled painting to offscreen buckets, was causing priblems when zooming in on large...
Campbell Barton [Sun, 16 Nov 2008 18:25:15 +0000 (18:25 +0000)]
disabled painting to offscreen buckets, was causing priblems when zooming in on large models. also simplified backface test.

13 years ago* fix "dot drawing" problem - draw lines inbetween updates when redrawing the view...
Campbell Barton [Sun, 16 Nov 2008 15:26:15 +0000 (15:26 +0000)]
* 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.

13 years agosvn merge -r17443:HEAD
Campbell Barton [Sat, 15 Nov 2008 16:55:37 +0000 (16:55 +0000)]
svn merge -r17443:HEAD

13 years ago* clone tool didnt work when the object was not at the center point.
Campbell Barton [Sat, 15 Nov 2008 16:20:37 +0000 (16:20 +0000)]
* 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.

13 years ago17973Patch by dfelinto, and also fixed a bug in 2d-filters
Hamed Zaghaghi [Sat, 15 Nov 2008 12:10:16 +0000 (12:10 +0000)]
17973Patch by dfelinto, and also fixed a bug in 2d-filters

13 years agomade undo on multiple images works
Campbell Barton [Sat, 15 Nov 2008 02:58:47 +0000 (02:58 +0000)]
made undo on multiple images works

13 years agotile based undo's now works while projection painting.
Campbell Barton [Fri, 14 Nov 2008 17:30:55 +0000 (17:30 +0000)]
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.

13 years agocopy over pthread dll to the install dir with cross compiling,
Campbell Barton [Fri, 14 Nov 2008 03:21:06 +0000 (03:21 +0000)]
copy over pthread dll to the install dir with cross compiling,
eventually should copy more libs but for now this makes blenderlite work
- (used for automatic blender builds on graphicall)

13 years agoTransform Roll Fixes for editbone. Special case for rotation, we don't need to guess...
Martin Poirier [Fri, 14 Nov 2008 03:13:40 +0000 (03:13 +0000)]
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.

13 years agoBugfix:
Joshua Leung [Fri, 14 Nov 2008 02:13:10 +0000 (02:13 +0000)]

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.

13 years agoupdate for compiling cross compiling win32 on linux, had a lot of trouble with makesd...
Campbell Barton [Thu, 13 Nov 2008 23:12:38 +0000 (23:12 +0000)]
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.

13 years ago==Armature==
Martin Poirier [Thu, 13 Nov 2008 22:35:40 +0000 (22:35 +0000)]

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.

13 years agoNormal Orientation on EditBones uses roll for Z axis.
Martin Poirier [Thu, 13 Nov 2008 21:44:32 +0000 (21:44 +0000)]
Normal Orientation on EditBones uses roll for Z axis.

13 years agosvn merge -r17405:HEAD
Campbell Barton [Thu, 13 Nov 2008 13:34:43 +0000 (13:34 +0000)]
svn merge -r17405:HEAD

13 years agosimple workaround slowdown with painting onto multiple parts of an image at once...
Campbell Barton [Thu, 13 Nov 2008 13:17:04 +0000 (13:17 +0000)]
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,

13 years ago* use the existing function to only update a part of the image, should increase speed...
Campbell Barton [Thu, 13 Nov 2008 11:30:34 +0000 (11:30 +0000)]
* 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.

13 years agoRemoved support for nested texture trees, minor ui enhancements
Robin Allen [Thu, 13 Nov 2008 09:57:11 +0000 (09:57 +0000)]
Removed support for nested texture trees, minor ui enhancements

13 years agofor scons on linux and other *nux systems
Campbell Barton [Thu, 13 Nov 2008 02:18:35 +0000 (02:18 +0000)]
for scons on linux and other *nux systems
only install locale data if international is enabled, only install fonts if freetype is enabled.

13 years ago2 utility functions added for projection painting.
Campbell Barton [Wed, 12 Nov 2008 22:35:58 +0000 (22:35 +0000)]
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

13 years ago== MSVC projectfiles ==
Andrea Weikert [Wed, 12 Nov 2008 21:03:42 +0000 (21:03 +0000)]
== MSVC projectfiles ==
update for texture nodes

13 years agofix bad level call in texture nodes
Andrea Weikert [Wed, 12 Nov 2008 21:02:45 +0000 (21:02 +0000)]
fix bad level call in texture nodes
BIF_preview_changed wasn't needed after all.

13 years agoAdded stubs to fix linker errors in texnodes
Robin Allen [Wed, 12 Nov 2008 20:11:54 +0000 (20:11 +0000)]
Added stubs to fix linker errors in texnodes

13 years agoBah, two more files!
Ton Roosendaal [Wed, 12 Nov 2008 19:14:46 +0000 (19:14 +0000)]
Bah, two more files!

13 years agoPatch #7897 Texture Nodes!
Ton Roosendaal [Wed, 12 Nov 2008 19:03:50 +0000 (19:03 +0000)]
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:

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. :)

13 years agoset default path to the version that creates a working binary of Blender, when buildi...
Nathan Letwory [Wed, 12 Nov 2008 16:04:14 +0000 (16:04 +0000)]
set default path to the version that creates a working binary of Blender, when building with mingw. Now there is no need to do extra copying/config changing

13 years agoChange the LCG_DIR usage to BF_name_LIBPATH where possible. FFMPEG can't be done...
Nathan Letwory [Wed, 12 Nov 2008 07:48:53 +0000 (07:48 +0000)]
Change the LCG_DIR usage to BF_name_LIBPATH where possible. FFMPEG can't be done like that yet, needs some extra thought to handle differences between vc and mingw setup

13 years agoOption to have painting multi-threaded.
Campbell Barton [Wed, 12 Nov 2008 05:56:37 +0000 (05:56 +0000)]
Option to have painting multi-threaded.
Each thread process the next free bucket the brush is over until they are all done.

13 years agoRemove BGE defines from highest level and define only there where needed. This preven...
Nathan Letwory [Tue, 11 Nov 2008 22:48:47 +0000 (22:48 +0000)]
Remove BGE defines from highest level and define only there where needed. This prevents scons from doing complete rebuilds when toggling BGE related options.

13 years agoprevious commits showed that the absolute path problem was even deeper. This should...
Nathan Letwory [Tue, 11 Nov 2008 21:37:53 +0000 (21:37 +0000)]
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

13 years agospaces -> tabs
Nathan Letwory [Tue, 11 Nov 2008 20:47:45 +0000 (20:47 +0000)]
spaces -> tabs

13 years agofix for another place where absolute paths for BF_BUILDDIR where a problem (generatin...
Nathan Letwory [Tue, 11 Nov 2008 20:46:46 +0000 (20:46 +0000)]
fix for another place where absolute paths for BF_BUILDDIR where a problem (generating results in the wrong place)

13 years agofix problem with giving absolute paths to BF_BUILDDIR
Nathan Letwory [Tue, 11 Nov 2008 20:26:53 +0000 (20:26 +0000)]
fix problem with giving absolute paths to BF_BUILDDIR

13 years agoFix typo that prevented CC_WARN from being added to build commands
Nathan Letwory [Tue, 11 Nov 2008 20:01:45 +0000 (20:01 +0000)]
Fix typo that prevented CC_WARN from being added to build commands

13 years agoMSVC90 project files: Tune projects build order to allow error-free build from clean...
Benoit Bolsee [Tue, 11 Nov 2008 16:48:34 +0000 (16:48 +0000)]
MSVC90 project files: Tune projects build order to allow error-free build from clean state.

13 years agoAdjusted scons files so disabling quicktime, python and sdl also removes their includ...
Campbell Barton [Tue, 11 Nov 2008 14:14:22 +0000 (14:14 +0000)]
Adjusted scons files so disabling quicktime, python and sdl also removes their includes when building.
writefile.c had usless include.

13 years agosvn merge -r17335:HEAD
Campbell Barton [Tue, 11 Nov 2008 12:56:57 +0000 (12:56 +0000)]
svn merge -r17335:HEAD

13 years agolast commit before some optimizations.
Campbell Barton [Tue, 11 Nov 2008 12:35:52 +0000 (12:35 +0000)]
last commit before some optimizations.
setting RT to 123 will paint from grease pencil (for benchmarking).

13 years agowasnt setting the struct size for normal brush types (was testing smear + clone but...
Campbell Barton [Tue, 11 Nov 2008 09:24:34 +0000 (09:24 +0000)]
wasnt setting the struct size for normal brush types (was testing smear + clone but not paint)
some disabled WIP too

13 years agoattempt to make executing an external command work with python 2.4 & 2.5, it seems...
Campbell Barton [Tue, 11 Nov 2008 08:21:09 +0000 (08:21 +0000)]
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

13 years agofix for [#17959] NURBS Circle: pie-shaped deformation, sticking to object origin
Campbell Barton [Tue, 11 Nov 2008 05:03:03 +0000 (05:03 +0000)]
fix for [#17959] NURBS Circle: pie-shaped deformation, sticking to object origin

13 years agoremoved some warnings
Campbell Barton [Tue, 11 Nov 2008 04:42:15 +0000 (04:42 +0000)]
removed some warnings

13 years ago* float image buffer support
Campbell Barton [Tue, 11 Nov 2008 03:43:21 +0000 (03:43 +0000)]
* float image buffer support
* bicubic interpolation for the clone tool

13 years agoMedian center didn't use TD_NOCENTER properly, making it work incorrectly with hinge...
Martin Poirier [Tue, 11 Nov 2008 03:12:31 +0000 (03:12 +0000)]
Median center didn't use TD_NOCENTER properly, making it work incorrectly with hinge bones (and with chain rotations).

13 years agobicubic_interpolation function was re-calculating a variable it didnt need to - ...
Campbell Barton [Tue, 11 Nov 2008 01:13:05 +0000 (01:13 +0000)]
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).

13 years agoVideoTexture: support VideoTexture in blenderplayer
Benoit Bolsee [Mon, 10 Nov 2008 22:17:40 +0000 (22:17 +0000)]
VideoTexture: support VideoTexture in blenderplayer

13 years agoChain rotations for objects and pose bones (for teamto)
Martin Poirier [Mon, 10 Nov 2008 21:23:54 +0000 (21:23 +0000)]
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.

[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)

13 years agoAdd MSVC90 project files - part 3. Extern and Intern projects are merged in projectfi...
Benoit Bolsee [Mon, 10 Nov 2008 21:22:22 +0000 (21:22 +0000)]
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.

13 years agoAdd MSVC90 project files - part 2.
Benoit Bolsee [Mon, 10 Nov 2008 16:09:25 +0000 (16:09 +0000)]
Add MSVC90 project files - part 2.

13 years agoAdd MSVC90 project files - part 1.
Benoit Bolsee [Mon, 10 Nov 2008 15:36:58 +0000 (15:36 +0000)]
Add MSVC90 project files - part 1.

13 years agomissing comma made scons arg BF_CXX_LIB_STATIC not work
Campbell Barton [Mon, 10 Nov 2008 13:36:44 +0000 (13:36 +0000)]
missing comma made scons arg BF_CXX_LIB_STATIC not work

13 years agoBugfix #17965
Ton Roosendaal [Mon, 10 Nov 2008 10:05:09 +0000 (10:05 +0000)]
Bugfix #17965

Most Surface (NURBS) tools in buttons didn't add undo pushes.

13 years agoPatch #17971 by Nathan Vegdahl:
Matt Ebb [Mon, 10 Nov 2008 05:42:07 +0000 (05:42 +0000)]
Patch #17971 by Nathan Vegdahl:
Makes colorband GUI display proper color interpolation

(for real this time)

13 years agoVideoTexture: Preserve alpha channel if present in video, images and sequences. Bette...
Benoit Bolsee [Sun, 9 Nov 2008 21:42:30 +0000 (21:42 +0000)]
VideoTexture: Preserve alpha channel if present in video, images and sequences. Better detection of end of video.

13 years ago* add Brecht's small patch to make values to BF_QUICK and BF_QUICKDEBUG function...
Nathan Letwory [Sun, 9 Nov 2008 21:00:49 +0000 (21:00 +0000)]
* 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.

13 years ago* clone tool didnt work when objects center was not 0,0,0
Campbell Barton [Sun, 9 Nov 2008 14:34:32 +0000 (14:34 +0000)]
* clone tool didnt work when objects center was not 0,0,0
* made backface culling work as expected in perspective view.

13 years agoPerspective mode painting works again
Campbell Barton [Sun, 9 Nov 2008 12:59:01 +0000 (12:59 +0000)]
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.

13 years agotriangles were could not be painted onto at all (serves me right for testing with...
Campbell Barton [Sun, 9 Nov 2008 04:08:08 +0000 (04:08 +0000)]
triangles were could not be painted onto at all (serves me right for testing with subsurf)

13 years agochanges to projection painting
Campbell Barton [Sun, 9 Nov 2008 02:47:30 +0000 (02:47 +0000)]
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.

13 years ago* typo fix
Nathan Letwory [Sat, 8 Nov 2008 13:39:37 +0000 (13:39 +0000)]
* typo fix

13 years ago=== BPy API ===
Nathan Letwory [Sat, 8 Nov 2008 13:38:21 +0000 (13:38 +0000)]
=== BPy API ===
* add two optional arguments to control click step and precision of Number buttons.

13 years ago* use msvc proposed names when building on win32
Nathan Letwory [Sat, 8 Nov 2008 12:01:55 +0000 (12:01 +0000)]
* use msvc proposed names when building on win32

13 years agoVideoTexture: forgot to commit MSVC project file, strange that nobody noticed...
Benoit Bolsee [Fri, 7 Nov 2008 20:13:07 +0000 (20:13 +0000)]
VideoTexture: forgot to commit MSVC project file, strange that nobody noticed...

13 years ago* fix typo found by brecht
Nathan Letwory [Fri, 7 Nov 2008 19:49:55 +0000 (19:49 +0000)]
* fix typo found by brecht

13 years ago[#17958] Windows path fix for script.
Campbell Barton [Fri, 7 Nov 2008 15:16:30 +0000 (15:16 +0000)]
[#17958] Windows path fix for 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.

13 years agoVideoTexture: VideoTexture.materialID() can now take texture image name.
Benoit Bolsee [Fri, 7 Nov 2008 10:54:32 +0000 (10:54 +0000)]
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.


matID = VideoTexture.materialID(obj,'IMvideo.png') = VideoTexture.Texture(obj, matID, 0)

13 years agosimple mistake broke clone tool.
Campbell Barton [Fri, 7 Nov 2008 06:50:19 +0000 (06:50 +0000)]
simple mistake broke clone tool.

13 years agoVideoTexture: comment was misplaced after previous commit.
Benoit Bolsee [Thu, 6 Nov 2008 23:52:47 +0000 (23:52 +0000)]
VideoTexture: comment was misplaced after previous commit.

13 years agoBugfix #17524
Diego Borghetti [Thu, 6 Nov 2008 18:49:53 +0000 (18:49 +0000)]
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 ;)

13 years agoVideoTexture: fix compile error when FFmpeg is disabled.
Benoit Bolsee [Thu, 6 Nov 2008 16:01:17 +0000 (16:01 +0000)]
VideoTexture: fix compile error when FFmpeg is disabled.

13 years agoWIP commit before some optimizations,
Campbell Barton [Thu, 6 Nov 2008 08:01:11 +0000 (08:01 +0000)]
WIP commit before some optimizations,
fix for possible divide by zero.
added BarryCentricWeights2f(), returns weights for points outside the triangle.

13 years agoadded support for smear brush type
Campbell Barton [Thu, 6 Nov 2008 02:08:41 +0000 (02:08 +0000)]
added support for smear brush type

13 years ago* While making changes to and, I completely forgot about the...
Nathan Letwory [Thu, 6 Nov 2008 00:28:26 +0000 (00:28 +0000)]
* While making changes to and, I completely forgot about the name changes.
  Here they are.

  Platform managers, double check that the compiler flag options still work.

13 years agosupport for brush blend modes (Mix, Multiply, Darken etc)
Campbell Barton [Wed, 5 Nov 2008 23:24:52 +0000 (23:24 +0000)]
support for brush blend modes (Mix, Multiply, Darken etc)

13 years agoChange remaining Copy() to Clone()
Nathan Letwory [Wed, 5 Nov 2008 23:23:04 +0000 (23:23 +0000)]
Change remaining Copy() to Clone()

13 years agopainting onto multiple images wasnt working, faces with different images are treated...
Campbell Barton [Wed, 5 Nov 2008 22:27:45 +0000 (22:27 +0000)]
painting onto multiple images wasnt working, faces with different images are treated as seams even if their UV's match.

13 years agoVideoTexture: new VideoTexture.ImageFFmpeg to load and reload images.
Benoit Bolsee [Wed, 5 Nov 2008 21:53:22 +0000 (21:53 +0000)]
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.

  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.

  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.

  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.

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

  returns the image data as a string of RGBA pixel

  returns the image size [x,y]

  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.

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

  get/set filter(s) on the image.


13 years agoVideoTexture: fixing a crash when loading an image as a video file - yes it works...
Benoit Bolsee [Wed, 5 Nov 2008 17:38:31 +0000 (17:38 +0000)]
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.

13 years agosvn merge -r17279:HEAD
Campbell Barton [Wed, 5 Nov 2008 15:11:40 +0000 (15:11 +0000)]
svn merge -r17279:HEAD
somehow scripts line endings change is messing things up, these changes wont be included
error is:
svn: File 'release/scripts/' has inconsistent newlines
svn: Inconsistent line ending style
svn: Error reading spooled REPORT request response

13 years agoprojection painting clone tool - gives a similar work flow to cloning in the gimp...
Campbell Barton [Wed, 5 Nov 2008 14:45:54 +0000 (14:45 +0000)]
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.

* 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.

13 years agoVideoTexture: Add support for GLSL. FIx small printout bug in Exception printout
Benoit Bolsee [Wed, 5 Nov 2008 13:22:10 +0000 (13:22 +0000)]
VideoTexture: Add support for GLSL. FIx small printout bug in Exception printout

13 years agouniform end-of-line format and set svn:eol-style property to "native" for all scripts
Remigiusz Fiedler [Wed, 5 Nov 2008 11:42:34 +0000 (11:42 +0000)]
uniform end-of-line format and set svn:eol-style property to "native" for all scripts

13 years agoerror in last commit, scanlines had extra offset causing overlapping lines between...
Campbell Barton [Wed, 5 Nov 2008 05:08:07 +0000 (05:08 +0000)]
error in last commit, scanlines had extra offset causing overlapping lines between faces without seams

13 years ago* Updated the 'Consolidate into one image' script to support alpha
Matt Ebb [Wed, 5 Nov 2008 04:48:08 +0000 (04:48 +0000)]
* Updated the 'Consolidate into one image' script to support alpha

13 years agofix for pixels not being drawn in 2 cases.
Campbell Barton [Wed, 5 Nov 2008 03:12:59 +0000 (03:12 +0000)]
fix for pixels not being drawn in 2 cases.

1 issue was caused by detecting 2d horizontal line intersections for lines that had points equal to the horizontal Y value -  solved by detecting point on line cases.
Another was because the 2D bounding box for painting could have faces edges running along it - solved by adding a small margin to the bounding box.

13 years ago* doing some warning cleaning
Nathan Letwory [Tue, 4 Nov 2008 23:46:01 +0000 (23:46 +0000)]
* doing some warning cleaning
* accidently left priority tests around.

13 years ago* enable openjpeg building for win32/msvc
Nathan Letwory [Tue, 4 Nov 2008 23:04:15 +0000 (23:04 +0000)]
* enable openjpeg building for win32/msvc
* add support for building redcode on win32/msvc, but disabled for now, as there are linking problems
  - I cleaned the redcode sconscript - the copying of headers within the source tree is not a clean solution
    This needs to be fixed later on. For now, lets use redcode from extern/ until a better way is found.

13 years ago=== SCons ===
Nathan Letwory [Tue, 4 Nov 2008 22:46:43 +0000 (22:46 +0000)]
=== SCons ===

* BlenderLib now expects lists for all compiler related flags (release, profile, debug, warn).
  I changed the default config files, but do double-check your user-config files, esp. if you did
  a full copy of an old default platform config

13 years ago* Changed the constant colorband interpolation to work left->right,
Matt Ebb [Tue, 4 Nov 2008 22:16:57 +0000 (22:16 +0000)]
* Changed the constant colorband interpolation to work left->right,
 rather than right -> left. This is how it works now:

13 years ago* remove redundant comment
Nathan Letwory [Tue, 4 Nov 2008 21:14:54 +0000 (21:14 +0000)]
* remove redundant comment