Commit Graph

12389 Commits

Author SHA1 Message Date
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
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
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
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
Benoit Bolsee
8916f84622 VideoTexture: Add support for GLSL. FIx small printout bug in Exception printout 2008-11-05 13:22:10 +00:00
Nathan Letwory
f59f5e67a5 * doing some warning cleaning
* accidently left priority tests around.
2008-11-04 23:46:01 +00:00
Nathan Letwory
beea73b110 * 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.
2008-11-04 23:04:15 +00:00
Matt Ebb
a19366f34a * Changed the constant colorband interpolation to work left->right,
rather than right -> left. This is how it works now:

http://mke3.net/blender/etc/constant_ss.png
2008-11-04 22:16:57 +00:00
Benoit Bolsee
1886b7bf52 VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
Benoit Bolsee
6eb3bf53dd VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object. 2008-11-04 09:21:27 +00:00
Andre Susano Pinto
ca80578e4e Simple warning fixes 2008-11-04 01:05:44 +00:00
Matt Ebb
1f83dffeb4 Added a new interpolation type for colorbands: Constant
This can be useful for toon shading etc.

Example: http://mke3.net/blender/etc/constant_ss.png
2008-11-04 00:15:27 +00:00
Kent Mein
b7fdf2ab50 Add's GSR's INT64_C fix and removes dos line endings...
Kent
2008-11-03 23:35:41 +00:00
Andre Susano Pinto
ec462b8cea Added Lattice vgroup support to shrinkwrap and simple deform modifier. 2008-11-03 23:17:36 +00:00
Martin Poirier
6cc1466c61 Moving silence_log_ffmpeg to imbuf (it fits better there and fixes the link error in blenderplayer) 2008-11-03 13:33:11 +00:00
Ton Roosendaal
858e2ec776 Bugfix #17921
ALT+select face-loop on mesh with hidden faces ignored the hidden part.
Also caused errors on deleting faces that way.
2008-11-03 13:00:39 +00:00
Benoit Bolsee
17296efd62 VideoTexture: fix compile error with GLint in ImageViewport under osx, part 2 2008-11-02 18:41:24 +00:00
Benoit Bolsee
7d63f5a7fe VideoTexture: fix compile error with GLint in ImageViewport under osx. 2008-11-02 18:31:54 +00:00
Ton Roosendaal
db24487449 Makefile fixes for compiling with new videotexture code.
Also: buttons for logic, controllers, didn't line up correct when 
multiple objects were selected (too little space)
2008-11-02 18:12:45 +00:00
Ton Roosendaal
a775719e23 Bugfix #17942
Python dict error: when trying to access a Bone via a key, and the key
was not found, a wrong error message got printed. Fix provided by
reporter Gregor Riepl. Thanks!
2008-11-02 18:05:11 +00:00
Benoit Bolsee
2973bd8ea2 VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
Martin Poirier
f180702a12 Quiet ffmpeg log by default. No more ugly stream info in console.
Starting Blender with -d turns info logging back on.
2008-11-02 16:28:34 +00:00
Enrico Fracasso
407e38a744 Added bf_videotex to unix libraries (linking error) 2008-11-02 14:54:44 +00:00
Martin Poirier
12b2f1c83c Include path for numpy no longer needed. 2008-11-02 14:36:32 +00:00
Ton Roosendaal
fdc1ef2c25 Bugfix #17902
Black dots appearing in mirroring 3d beveled curves, when using orco
texture coords. Appeared there was memory read just outside of the 
allocation.
2008-11-02 14:03:47 +00:00
Daniel Genrich
752920c531 python25.zip wasn't copied using cmake. Should fix win64 python e.g. "import random" problem 2008-11-02 12:50:11 +00:00
Ton Roosendaal
30016909c7 Bugfix #17920
When entering a wrong expression (or garbish) in a Nkey panel button,
the cursor jumps to the place where the button was clicked. On failure
the button could return a B_NOP, not a 0
2008-11-02 12:27:25 +00:00
Brecht Van Lommel
a4f8f06479 Fix for two proxy + undo related crashes:
* When making a proxy, the lib linked IPO driver was also changed to
  point to the proxy object, and after undo this local proxy object
  was replaced so the pointer became invalid. In fact it is not needed
  at all to change this because the IPO code maps the pointer to the
  local proxy object already.
* Undoing the make proxy operation would crash because the proxy_from
  pointer in the library linked object would still point to the removed
  object. Now it clears all these pointers before undo, because on each
  undo memory file read they will be set again anyway.
2008-11-02 00:25:39 +00:00
Benoit Bolsee
68f50e0c6b VideoTexture: remove numpy dependency. 2008-11-01 22:28:27 +00:00
Benoit Bolsee
e72d6c7bfa VideoTexture: fix NULL pointer crash when material name is not found. 2008-11-01 20:18:15 +00:00
Martin Poirier
b24c6ef70d Adding include path for numpy to sconscript. There must be a better way to do this. 2008-11-01 17:44:12 +00:00
Benoit Bolsee
19cdef1f71 VideoTexture: typo in linux code 2008-11-01 17:26:34 +00:00
Benoit Bolsee
e6a2ab319f VideoTexture: AVFormatContext::pb is not a pointer for avformat library older than 52 (linux uses 51) 2008-11-01 17:15:17 +00:00
Brecht Van Lommel
4870db578b Bug #17912: fix for some SSS floating point precision issues, and also
fix a divide by zero in the subsurf code found in the process.
2008-11-01 17:07:24 +00:00
Martin Poirier
58d0dc21aa Getting video texture closer to compiling under linux 2008-11-01 17:06:36 +00:00
Ton Roosendaal
0aff409d54 Bugfix #17913
Bah... fix for envmaps just before 2.48 release gave good looking envmaps 
only when there was no sky involved...

The alpha in environment maps should be reset to 255... something that was 
never done before, but also didn't show errors until other fixes in image 
rendering were done.
2008-11-01 16:09:36 +00:00
Benoit Bolsee
bd81d96b78 Video Texture: missing newlines at the end of several files. 2008-11-01 15:58:49 +00:00
Benoit Bolsee
5cb16c2d03 Video Texture: remove support for capture device, the linux ffmpeg repository is not ready yet. 2008-11-01 15:42:03 +00:00