Brecht Van Lommel [Wed, 12 Nov 2008 21:16:53 +0000 (21:16 +0000)]
Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416
Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
later added in trunk also, but reverted partially, specifically revision
16683. I have left out this reversion in the 2.5 branch since I think it is
needed there.
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
-W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
differently. Since this is changed so much, and I don't think those fixes
would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
initialized when running with -P. The code that initializes the screen there
I had to disable, that can't work in 2.5 anymore but left it commented as a
reminder.
Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.
Still to be done:
* Go over files and functions that were moved to a different location but could
still use changes that were done in trunk.
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
Nathan Letwory [Tue, 11 Nov 2008 20:47:45 +0000 (20:47 +0000)]
spaces -> tabs
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)
Nathan Letwory [Tue, 11 Nov 2008 20:26:53 +0000 (20:26 +0000)]
fix problem with giving absolute paths to BF_BUILDDIR
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
Brecht Van Lommel [Tue, 11 Nov 2008 18:31:32 +0000 (18:31 +0000)]
Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.
Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
making it non-blocking.
* interface_regions: this is a part of interface.c, split off, contains code to
create regions for tooltips, menus, pupmenu (that one is crashing currently),
color chooser, basically regions with buttons which is fairly independent of
core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
icons yet. Panels should probably become (free floating) regions?
* text.c: (formerly language.c) for drawing text and translation. this works
but is using bad globals still and could be cleaned up.
Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.
Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
should be possible while editing a button. That means though that we need
some sort of persistence even though the blender model is to recreate buttons
for each redraw. So when a new block is created, some matching happens to
find out which buttons correspond to buttons in the previously created block,
and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
would integrate here?
* Currently only full window redraws are used, this should become per region
and maybe per button later.
Operators:
* Events are currently handled through two operators: button activate and menu
handle. Operators may not be the best way to implement this, since there are
currently some issues with events being missed, but they can become a special
handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
handle all interaction with that button until the button is not activated
anymore. This means clicking, text editing, number dragging, opening menu
blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
non-blocking. That means variables that were previously on the stack, now
need to be stored away in a struct such that they can be accessed again when
the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
needs to be set explicit in order to handle the right events in the right
state. So an activated button can be in one of these states: init, highlight,
wait_flash, wait_release, wait_key_event, num_editing, text_editing,
text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
from ui_do_but. This makes it possible to continuously apply the button as
text is being typed for example, and there is an option in the code to enable
this. Since the code non-blocking and can deal with the button being deleted
even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
being edited, since that would mean data is being edited without correct
updates happening, while some other part of blender may be accessing that
data in the meantime. So data values, strings, vectors are written to a
temporary location and only flush in the apply function.
Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
blocks give a handle to the button that creates it, which will contain the
results of the menu block once a MESSAGE event is received from that menu
block.
* For this type of menu block the coordinates used to be in window space. They
are still created that way and ui_positionblock still works with window
coordinates, but after that the block and buttons are brought back to region
coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
should have enough information with these screen level regions to have full
control over what gets drawn when and to then do correct compositing.
Testing:
* The header in the time space currently has some buttons to test the UI code.
Brecht Van Lommel [Tue, 11 Nov 2008 18:28:00 +0000 (18:28 +0000)]
* Compile fix for RNA + makefiles.
* Fix for bug in collection string lookup function.
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.
Brecht Van Lommel [Tue, 11 Nov 2008 15:18:21 +0000 (15:18 +0000)]
Various changes made in the process of working on the UI code:
* Added functions to generate Timer events. There was some unfinished code to
create one timer per window, this replaces that with a way to let operators
or other handlers add/remove their own timers as needed. This is currently
delivered as an event with the timer handle, perhaps this should be a notifier
instead? Also includes some fixes in ghost for timer events that were not
delivered in time, due to passing negative timeout.
* Added a Message event, which is a generic event that can be added by any
operator. This is used in the UI code to communicate the results of opened
blocks. Again, this may be better as a notifier.
* These two events should not be blocked as they are intended for a specific
operator or handler, so there were exceptions added for this, which is one
of the reasons they might work better as notifiers, but currently these
things can't listen to notifier yet.
* Added an option to events to indicate if the customdata should be freed or
not.
* Added a free() callback for area regions, and added a free function for
area regions in blenkernel since it was already there for screens and areas.
* Added ED_screen/area/region_exit functions to clean up things like operators
and handlers when they are closed.
* Added screen level regions, these will draw over areas boundaries, with the
last created region on top. These are useful for tooltips, menus, etc, and
are not saved to file. It's using the same ARegion struct as areas to avoid
code duplication, but perhaps that should be renamed then. Note that redraws
currently go correct, because only full window redraws are used, for partial
redraws without any frontbuffer drawing, the window manager needs to get
support for compositing subwindows.
* Minor changes in the subwindow code to retrieve the matrix, and moved
setlinestyle to glutil.c.
* Reversed argument order in WM_event_add/remove_keymap_handler to be consistent
with modal_handler.
* Operators can now block events but not necessarily cancel/finish.
* Modal operators are now stored in a list in the window/area/region they were
created in. This means for example that when a transform operator is invoked
from a region but registers a handler at the window level (since mouse motion
across areas should work), it will still get removed when the region is closed
while the operator is running.
Brecht Van Lommel [Tue, 11 Nov 2008 15:03:26 +0000 (15:03 +0000)]
* RNA: utility function to retrieve strings. It will use a fixed
size buffer if it's big enough, and otherwise allocate memory.
* Added BLI_dynstr_appendf() to construct strings easily in printf
style, this should make it easier to construct menu strings for
example.
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.
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
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
Campbell Barton [Tue, 11 Nov 2008 04:42:15 +0000 (04:42 +0000)]
removed some warnings
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).
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).
Benoit Bolsee [Mon, 10 Nov 2008 22:17:40 +0000 (22:17 +0000)]
VideoTexture: support VideoTexture in blenderplayer
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.
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)
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.
Benoit Bolsee [Mon, 10 Nov 2008 16:09:25 +0000 (16:09 +0000)]
Add MSVC90 project files - part 2.
Benoit Bolsee [Mon, 10 Nov 2008 15:36:58 +0000 (15:36 +0000)]
Add MSVC90 project files - part 1.
Campbell Barton [Mon, 10 Nov 2008 13:36:44 +0000 (13:36 +0000)]
missing comma made scons arg BF_CXX_LIB_STATIC not work
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.
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)
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.
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.
Nathan Letwory [Sat, 8 Nov 2008 13:39:37 +0000 (13:39 +0000)]
* typo fix
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.
Nathan Letwory [Sat, 8 Nov 2008 12:01:55 +0000 (12:01 +0000)]
* use msvc proposed names when building on win32
Benoit Bolsee [Fri, 7 Nov 2008 20:13:07 +0000 (20:13 +0000)]
VideoTexture: forgot to commit MSVC project file, strange that nobody noticed...
Nathan Letwory [Fri, 7 Nov 2008 19:49:55 +0000 (19:49 +0000)]
* fix typo found by brecht
Nathan Letwory [Fri, 7 Nov 2008 19:48:12 +0000 (19:48 +0000)]
* fix for typo found by brecht
Nathan Letwory [Fri, 7 Nov 2008 19:21:52 +0000 (19:21 +0000)]
=== SCons ===
* merge the recent scons changes from trunk, so this means that the same rules now apply:
- scons-local available
- platform default configs updated
- check your user-config.py if you have made a full copy of default config
Note: BGE and blenderplayer still not working, but that is normal ;) (so turn them off!)
Campbell Barton [Fri, 7 Nov 2008 15:16:30 +0000 (15:16 +0000)]
[#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.
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.
Ex:
matID = VideoTexture.materialID(obj,'IMvideo.png')
GameLogic.video = VideoTexture.Texture(obj, matID, 0)
Brecht Van Lommel [Fri, 7 Nov 2008 02:58:25 +0000 (02:58 +0000)]
RNA
* Added more error prints for wrong definitions, for cases that
would laters cause problems compiling or crash at runtime, and
also made messages more clear.
* Added some skeleton code for main/ID/mesh/vertex types for testing.
* Added support for automatic arrays as collections using SDNA.
* Changed how pointers to data work. Now they are always wrapped
in a PointerRNA struct, which contains the data pointer and type,
and also the data pointer and type of the ID datablock that this
belongs to, since for example a vertex on it's own may not have
enough information for some operations, it also needs the mesh.
* Added some code for defining dependencies with RNA, and looking up
data with paths like: scenes[0].objects["Cube"].data.verts[7].co.
Note sure either will end up being used, this is experimental.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
Benoit Bolsee [Thu, 6 Nov 2008 23:52:47 +0000 (23:52 +0000)]
VideoTexture: comment was misplaced after previous commit.
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 ;)
Benoit Bolsee [Thu, 6 Nov 2008 16:01:17 +0000 (16:01 +0000)]
VideoTexture: fix compile error when FFmpeg is disabled.
Nathan Letwory [Thu, 6 Nov 2008 00:28:26 +0000 (00:28 +0000)]
* 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.
Nathan Letwory [Wed, 5 Nov 2008 23:23:04 +0000 (23:23 +0000)]
Change remaining Copy() to Clone()
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.
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:
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.
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
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
Matt Ebb [Wed, 5 Nov 2008 04:48:08 +0000 (04:48 +0000)]
* Updated the 'Consolidate into one image' script to support alpha
Nathan Letwory [Tue, 4 Nov 2008 23:46:01 +0000 (23:46 +0000)]
* doing some warning cleaning
* accidently left priority tests around.
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.
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
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:
http://mke3.net/blender/etc/constant_ss.png
Nathan Letwory [Tue, 4 Nov 2008 21:14:54 +0000 (21:14 +0000)]
* remove redundant comment
Benoit Bolsee [Tue, 4 Nov 2008 12:04:59 +0000 (12:04 +0000)]
VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter.
Benoit Bolsee [Tue, 4 Nov 2008 09:21:27 +0000 (09:21 +0000)]
VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object.
Andre Susano Pinto [Tue, 4 Nov 2008 01:05:44 +0000 (01:05 +0000)]
Simple warning fixes
Matt Ebb [Tue, 4 Nov 2008 00:15:27 +0000 (00:15 +0000)]
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
Kent Mein [Mon, 3 Nov 2008 23:35:41 +0000 (23:35 +0000)]
Add's GSR's INT64_C fix and removes dos line endings...
Kent
Andre Susano Pinto [Mon, 3 Nov 2008 23:17:36 +0000 (23:17 +0000)]
Added Lattice vgroup support to shrinkwrap and simple deform modifier.
Martin Poirier [Mon, 3 Nov 2008 13:33:11 +0000 (13:33 +0000)]
Moving silence_log_ffmpeg to imbuf (it fits better there and fixes the link error in blenderplayer)
Ton Roosendaal [Mon, 3 Nov 2008 13:00:39 +0000 (13:00 +0000)]
Bugfix #17921
ALT+select face-loop on mesh with hidden faces ignored the hidden part.
Also caused errors on deleting faces that way.
Benoit Bolsee [Sun, 2 Nov 2008 18:41:24 +0000 (18:41 +0000)]
VideoTexture: fix compile error with GLint in ImageViewport under osx, part 2
Benoit Bolsee [Sun, 2 Nov 2008 18:31:54 +0000 (18:31 +0000)]
VideoTexture: fix compile error with GLint in ImageViewport under osx.
Ton Roosendaal [Sun, 2 Nov 2008 18:12:45 +0000 (18:12 +0000)]
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)
Ton Roosendaal [Sun, 2 Nov 2008 18:05:11 +0000 (18:05 +0000)]
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!
Benoit Bolsee [Sun, 2 Nov 2008 18:02:31 +0000 (18:02 +0000)]
VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3
Martin Poirier [Sun, 2 Nov 2008 16:28:34 +0000 (16:28 +0000)]
Quiet ffmpeg log by default. No more ugly stream info in console.
Starting Blender with -d turns info logging back on.
Enrico Fracasso [Sun, 2 Nov 2008 15:16:17 +0000 (15:16 +0000)]
Disable completely OpenAL if WITH_OPENAL is OFF
Enrico Fracasso [Sun, 2 Nov 2008 14:54:44 +0000 (14:54 +0000)]
Added bf_videotex to unix libraries (linking error)
Martin Poirier [Sun, 2 Nov 2008 14:36:32 +0000 (14:36 +0000)]
Include path for numpy no longer needed.
Ton Roosendaal [Sun, 2 Nov 2008 14:03:47 +0000 (14:03 +0000)]
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.
Daniel Genrich [Sun, 2 Nov 2008 12:50:11 +0000 (12:50 +0000)]
python25.zip wasn't copied using cmake. Should fix win64 python e.g. "import random" problem
Ton Roosendaal [Sun, 2 Nov 2008 12:27:25 +0000 (12:27 +0000)]
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
Brecht Van Lommel [Sun, 2 Nov 2008 00:25:39 +0000 (00:25 +0000)]
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.
Benoit Bolsee [Sat, 1 Nov 2008 22:28:27 +0000 (22:28 +0000)]
VideoTexture: remove numpy dependency.
Benoit Bolsee [Sat, 1 Nov 2008 20:18:15 +0000 (20:18 +0000)]
VideoTexture: fix NULL pointer crash when material name is not found.
Martin Poirier [Sat, 1 Nov 2008 17:44:12 +0000 (17:44 +0000)]
Adding include path for numpy to sconscript. There must be a better way to do this.
Benoit Bolsee [Sat, 1 Nov 2008 17:26:34 +0000 (17:26 +0000)]
VideoTexture: typo in linux code
Benoit Bolsee [Sat, 1 Nov 2008 17:15:17 +0000 (17:15 +0000)]
VideoTexture: AVFormatContext::pb is not a pointer for avformat library older than 52 (linux uses 51)
Brecht Van Lommel [Sat, 1 Nov 2008 17:07:24 +0000 (17:07 +0000)]
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.
Martin Poirier [Sat, 1 Nov 2008 17:06:36 +0000 (17:06 +0000)]
Getting video texture closer to compiling under linux
Ton Roosendaal [Sat, 1 Nov 2008 16:09:36 +0000 (16:09 +0000)]
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.
Benoit Bolsee [Sat, 1 Nov 2008 15:58:49 +0000 (15:58 +0000)]
Video Texture: missing newlines at the end of several files.
Benoit Bolsee [Sat, 1 Nov 2008 15:42:03 +0000 (15:42 +0000)]
Video Texture: remove support for capture device, the linux ffmpeg repository is not ready yet.
Brecht Van Lommel [Sat, 1 Nov 2008 14:00:16 +0000 (14:00 +0000)]
Patch 17909: 2D Filter texture coordinates changes, by Dalai Felinto:
* The second opengl texture coordinate (gl_TexCoord[1]) are now filled
in as well, and will give canvas coordinates from 0.0 to 1.0. The
first texture coordinates still give the coordinates in the texture
that is being used, which may not match the canvas exactly, so both
coordinates are needed.
* Also optimization to allow using smaller texture sizes with multiple
smaller viewports.
* Print the detailed GLSL shader errors (once), for easier debugging.
Benoit Bolsee [Sat, 1 Nov 2008 12:48:46 +0000 (12:48 +0000)]
BGE Video Texture: fix constant initializer problem with Exception description. Uniformized the line ending.
Remigiusz Fiedler [Sat, 1 Nov 2008 11:35:08 +0000 (11:35 +0000)]
fix a bug in matrix.invert() for 2x2 matrices
reported by Hans in http://blenderartists.org/forum/showthread.php?t=139748
Benoit Bolsee [Sat, 1 Nov 2008 11:15:13 +0000 (11:15 +0000)]
Fix Cmake for MSVC 32bit
Brecht Van Lommel [Sat, 1 Nov 2008 00:23:08 +0000 (00:23 +0000)]
RNA compile error and warning fixes for MSVC.
Brecht Van Lommel [Fri, 31 Oct 2008 23:50:02 +0000 (23:50 +0000)]
RNA / Data API
This is the first code for the Data API, also known as RNA system in the
2.5 Branch. It does not include a user interface, and only wraps some
Scene properties for testing. It is integrated with Scons and Makefiles,
and compiles a 'makesrna' program that generates an RNA.c file.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
The changes are quite local, basically adding a makesrna module which
works similar to the makesdna module. The one external change is in
moving genfile.c from blenloader to the makesdna module, so that it can
be reused by the RNA code. This also meant changing the DNA makefiles.
It seems to be doing dependencies correct still in my tests, but if
there is an issue with the DNA not being rebuilt this commit might be
the one causing it. Also it seems for scons the makesdna and makesrna
modules are compiling without warnings. Not a new issue but this should
be fixed.
The RNA code supports all types as defined in the Data API design, so
in that sense it is fairly complete and I hope that aspect will not
have to change much. Some obviously missing parts are context related
code, notify() functions for updates and user defined / ID properties.
Benoit Bolsee [Fri, 31 Oct 2008 22:35:52 +0000 (22:35 +0000)]
VideoTexture module.
The only compilation system that works for sure is the MSVC project files. I've tried my best to
update the other compilation system but I count on the community to check and fix them.
This is Zdeno Miklas video texture plugin ported to trunk.
The original plugin API is maintained (can be found here http://home.scarlet.be/~tsi46445/blender/blendVideoTex.html)
EXCEPT for the following:
The module name is changed to VideoTexture (instead of blendVideoTex).
A new (and only) video source is now available: VideoFFmpeg()
You must pass 1 to 4 arguments when you create it (you can use named arguments):
VideoFFmpeg(file) : play a video file
VideoFFmpeg(file, capture, rate, width, height) : start a live video capture
file:
In the first form, file is a video file name, relative to startup directory.
It can also be a URL, FFmpeg will happily stream a video from a network source.
In the second form, file is empty or is a hint for the format of the video capture.
In Windows, file is ignored and should be empty or not specified.
In Linux, ffmpeg supports two types of device: VideoForLinux and DV1394.
The user specifies the type of device with the file parameter:
[<device_type>][:<standard>]
<device_type> : 'v4l' for VideoForLinux, 'dv1394' for DV1394; default to 'v4l'
<standard> : 'pal', 'secam' or 'ntsc', default to 'ntsc'
The driver name is constructed automatically from the device types:
v4l : /dev/video<capture>
dv1394: /dev/dv1394/<capture>
If you have different driver name, you can specify the driver name explicitely
instead of device type. Examples of valid file parameter:
/dev/v4l/video0:pal
/dev/ieee1394/1:ntsc
dv1394:ntsc
v4l:pal
:secam
capture:
Defines the index number of the capture source, starting from 0. The first capture device is always 0.
The VideoTexutre modules knows that you want to start a live video capture when you set this parameter to a number >= 0. Setting this parameter < 0 indicates a video file playback. Default value is -1.
rate:
the capture frame rate, by default 25 frames/sec
width:
height:
Width and height of the video capture in pixel, default value 0.
In Windows you must specify these values and they must fit with the capture device capability.
For example, if you have a webcam that can capture at 160x120, 320x240 or 640x480,
you must specify one of these couple of values or the opening of the video source will fail.
In Linux, default values are provided by the VideoForLinux driver if you don't specify width and height.
Simple example
**************
1. Texture definition script:
import VideoTexture
contr = GameLogic.getCurrentController()
obj = contr.getOwner()
if not hasattr(GameLogic, 'video'):
matID = VideoTexture.materialID(obj, 'MAVideoMat')
GameLogic.video = VideoTexture.Texture(obj, matID)
GameLogic.vidSrc = VideoTexture.VideoFFmpeg('trailer_400p.ogg')
# Streaming is also possible:
#GameLogic.vidSrc = VideoTexture.VideoFFmpeg('http://10.32.1.10/trailer_400p.ogg')
GameLogic.vidSrc.repeat = -1
# If the video dimensions are not a power of 2, scaling must be done before
# sending the texture to the GPU. This is done by default with gluScaleImage()
# but you can also use a faster, but less precise, scaling by setting scale
# to True. Best approach is to convert the video offline and set the dimensions right.
GameLogic.vidSrc.scale = True
# FFmpeg always delivers the video image upside down, so flipping is enabled automatically
#GameLogic.vidSrc.flip = True
if contr.getSensors()[0].isPositive():
GameLogic.video.source = GameLogic.vidSrc
GameLogic.vidSrc.play()
2. Texture refresh script:
obj = GameLogic.getCurrentController().getOwner()
if hasattr(GameLogic, 'video') != 0:
GameLogic.video.refresh(True)
You can download this demo here:
http://home.scarlet.be/~tsi46445/blender/VideoTextureDemo.blend
http://home.scarlet.be/~tsi46445/blender/trailer_400p.ogg
Benoit Bolsee [Fri, 31 Oct 2008 21:06:48 +0000 (21:06 +0000)]
Preparation to VideoTexture: everything but the VideoTexture module itself.
Rename PHY_GetActiveScene() to KX_GetActiveScene(): more logical name
Add KX_GetActiveEngine()
new KX_KetsjiEngine::GetClockTime(void) to return current
render frame time: if the CPU does not keep up with the
frame rate, up to 5 consecutive logic frames are processed
between each render frame, so that the logic system stays
accurate even if the graphic system is slow. For the video
texture module, it is important to stay in sync with the
render frame: no need to update the texture for logic frame.
BL_Texture::swapTexture(): texture id manipulation
BL_Texture::getTex() : return material texture
Enable video support in ffmpeg for Linux.
Benoit Bolsee [Fri, 31 Oct 2008 20:50:07 +0000 (20:50 +0000)]
Update MSVC project files
Nathan Letwory [Fri, 31 Oct 2008 20:47:30 +0000 (20:47 +0000)]
* remove unreferenced var
Nathan Letwory [Fri, 31 Oct 2008 20:35:14 +0000 (20:35 +0000)]
* silence compiler about warnings for C++ files a bit more.
- from what I can see now, the larger part of warnings is now about conversions "possible loss of data" (ie. double to float, etc).
Nathan Letwory [Fri, 31 Oct 2008 16:33:42 +0000 (16:33 +0000)]
* doc update
Kent Mein [Fri, 31 Oct 2008 14:15:35 +0000 (14:15 +0000)]
This is coverity issue CID: 456
fixes a buffer overrun issue.
Kent
Martin Poirier [Fri, 31 Oct 2008 13:58:59 +0000 (13:58 +0000)]
corrections to the C_WARN and CC_WARN variables for scons config. I didn't actually changed what the flags were, just the format, but Platform Maintainers, please check.
Martin Poirier [Fri, 31 Oct 2008 00:23:01 +0000 (00:23 +0000)]
Fix compile flags in linux config to fit Nathan's changes.
Warning to others: Those flags are lists now, be careful and update other configs if needed.
Nathan Letwory [Thu, 30 Oct 2008 23:55:07 +0000 (23:55 +0000)]
* Minimum SCons version is now 1.0.0
- Code has been changed to reflect this (ie. deprecated functions are not anymore used)
* clean up the C and C++ compiler flags mess.
- in the environment construction of BlenderLib all the compile flag governing options have been split in the *C*, *CC* and *CXX* containing equivalents.
C is for C compiler only flags. CC is for C and C++ compiler flags and CXX is for C++ compiler only flags.
All the platform default config files need to be double checked and fixed wherever it looks necessary. Either DIY, or send me a note with needed changes.
- a start for the BlenderLib parameter list has been made - all the SConscripts need to be checked and modified to hand in flags properly.
* A theeth request: make -jN settable in the config file.
- I give you BF_NUMJOBS, which is set to 1 by default. In your user-config.py, set BF_NUMJOBS=4 to have 4 parallel jobs handled. Yay.
Nathan Letwory [Thu, 30 Oct 2008 18:56:20 +0000 (18:56 +0000)]
* Build aborts when giving options on command-line when WITH_BF_DOCS=True
- make sure epydoc generation doesn't get a fit over options given on scons command-line -> don't use arguments from command-line.