Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-04-18various minor fixesCampbell Barton
- collada export would run MEM_freeN on an un-initialized pointer in some cases. - makesrna was missing a call to close a file. - text cursor update function was missing a NULL check for st->text. - possible (unlikely) un-initialized return value for bge python lamp.type, set error instead. - possible (unlikely) missing NULL terminator with strncpy for ffmpeg.
2010-04-18SVN maintenance.Guillermo S. Romero
2010-04-17- for BGE mouse and keyboard events use tuples rather then listsCampbell Barton
- pep8 corrections
2010-04-17bugfix and cleanupCampbell Barton
- BGE Shader.setSampler(name, index): index range check was wrong. - Compositor check for an invalid channel was incorrect. - getting the center of selected verts used an uninitalized z axis. - do_init_render_material() used && rather then & when testing for MA_TRANSP. - weight paint activate flipped bone used && rather then & for flag checking.
2010-04-17Patch #21789 - BGE Keyboard and Mouse Python types - by Mitchell Stokes(Moguri)Dalai Felinto
The patch exposes mouse and keyboard read-only properties in the GameLogic module Also renames bge.keys to bge.events (* Note: name of bge submodules (logic, render, ...) may change before 2.5 final release [right Campbell?]). """ This patch adds two new types to the BGE: SCA_PythonKeyboard SCA_PythonMouse These two types allow users to make use of the keyboard and mouse without the need for a keyboard or mouse sensor. SCA_PythonKeyboard has an events property that acts just like SCA_KeyboardSensor.events. SCA_PythonMouse also has an events property to check for mouse events. Further more it supports getting and setting normalized cursor position (from 0.0 to 1.0) with SCA_PythonMouse.position. The cursor can be shown/hidden using SCA_PythonMouse.visible. """ Its use is similar with current mouse and keyboard controllers. With the exception of mouse position being normalized and writable as well (replacing Rasterizer.setMousePosition). Code Sample: ###### from bge import logic, events mouse = logic.mouse keyboard = logic.keyboard for key,status in keyboard.events: if status == logic.KX_INPUT_JUST_ACTIVATED: if key == events.WKEY: print(mouse.position) # move_forward() mouse.visible = True # turn cursor visible mouse.position = 0.5,0.5 # centralize mouse - use tuple ###### * Important Note: mouse.position still will not work properly for Letterbox mode. In order to fix letterboxing I may need to move the set x,y mouse function to inside the canvas code (to avoid duplicated code between mouse sensor and bge.logic.mouse). I'll leave this for another commit though. Thanks Mitchell for the work on that.
2010-04-15Make memstat easier to read, add missing Intel ID and cleanups.Guillermo S. Romero
2010-04-11PyAPICampbell Barton
- added new mathutils.Color() type, use with rna so we can do for eg: material.diffuse_color.r = 1.0 # also has hsv access material.diffuse_color.s = 0.6 - made Mathutils and Geometry module names lowercase.
2010-04-11py api file renameCampbell Barton
- prefix mathutils api. - 2 blf.c files (annoying for debugging) - py api docs ignore keying sets as with operators.
2010-04-11BGE fix #20456 - 2.5: mouse position problem (offseted by 1 vertically)Dalai Felinto
In Blender 2.49 the win width and height were been calculated including an extra pixel (e.g. a fullscreen editor would be (width + 1) by (height + 1) ) In opposite to that, Blender 2.5 window/editor code were fixed to have the exact width,height size. So although the BGE canvas code was still the same as 2.49 it was producing a wrong result. I'm also adding some commentaries in the setViewport code. BGE is setting the viewports 1 pixel larger. the setViewport command is been used as if one should pass (minx, miny, width, height), while it should be (minx, miny, maxx, maxy). I will take care of that later, if any one has extra comments on that, please let me know.
2010-04-02bugfix [#21230] set-scene animation updates not workingCampbell Barton
fix for empty scenes with SETLOOPER macro.
2010-04-01BGE fix: Parenting the object to itself crashes BGE + stubs updateDalai Felinto
it may happen if you start doing exec, setParent, ... in Python not a big deal, but to crash Blender is always bad
2010-03-30BGE API DOC: a guide on how to build epydoc for windowsDalai Felinto
We have already a .sh file to build epydocs from Linux, so why not to have it in Windows as well ;) I think that this guide can help people interested in help with the API documentation to test their work. I'm actually already in touch with at least one volunteer helping with PhysicsConstraints module. VideoTexture may not be a one man job though, for I hope this document can also help.
2010-03-30BGE PyDoc: fix for KX_Object not linked to the class in some actuators API pageDalai Felinto
2010-03-29BGE patch [#21019]: Python function for Scene suspend/resume.Benoit Bolsee
2010-03-29VideoTexture: more PyDoc.Benoit Bolsee
2010-03-29VideoTexture: clean previous commit.Benoit Bolsee
2010-03-29BGE: repair armature animation. Was broken since commit 27766.Benoit Bolsee
2010-03-28VideoTexture: fix video capture lagging when CPU is busy. This problem was ↵Benoit Bolsee
caused by special frame handling that was appropriate for video streaming but not for video capture: drift compensation and no frame skipping. Disable that for video capture to take into account the realtime nature of video.
2010-03-28bgl/BGE: glCopyTexImage2D + bgl.buffer creation error more verbose + dome ↵Dalai Felinto
post_draw (it draw only for the last overlayed scene) 1) glCopyTexImage2D - www.opengl.org/sdk/docs/man/xhtml/glCopyTexImage2D.xml 2) dome post_draw. Now dome mode can also use scene.post_draw. It only runs for the last scene. It's really useful. I'm working on a nice showcase for this (a dome visualizer for the dome mode running with bgl. In the mean time this is a (lame) example of both working together (the buffer is being copied and draw on top of the window): http://blenderecia.orgfree.com/blender/tmp/dome_bgl_copytex2d.jpg
2010-03-26BGE: fix for [#21180] - missing min and max values in the API + mode fix ↵Dalai Felinto
(interval wasn't working) of course it wasn't only a matter of adding the properties in the api :) The code of validValueForIntervalProperty and modeChange are the same BUT in the future they shouldn't be, for I think it's fine to keep them as separated functions. Bonus fix: Also we are now checking if the new mode is interval and update the range expression.
2010-03-26BGE: [#19836] Recursive Parenting in game crashes Blender. Added parenting ↵Benoit Bolsee
loop detection.
2010-03-25Fix compilation error in MinGW with my last commit.Benoit Bolsee
2010-03-25BGE: bug #21684 fixed: multiple material with static modifier now supported ↵Benoit Bolsee
with display list.
2010-03-24enable compiling without python againCampbell Barton
2010-03-21Fix syntax for ID keyword.Guillermo S. Romero
2010-03-20BGE: bindId property in VideoTexture.Texture (to get the openGL id of the ↵Dalai Felinto
texture) Now if you have a VideoTexture.Texture you can use its id and draw it with bgl The Id is only going to be valid if the obj you are getting the VideoTexture.Texture from has a valid texture. In the examples you will see them as planes, that become invisible at load time, but are needed to validate the texture id. This is a simple example file: http://blenderecia.orgfree.com/blender/bind_id_simple.blend And a (much) more advanced one: http://blenderecia.orgfree.com/blender/bind_id.blend (get also this image and save it to the same folder of your blend file - http://blenderecia.orgfree.com/blender/mask.png ) Benoit, I couldn't decide on better names so for now I'm glad with this one.
2010-03-16Keying Set Fixes:Joshua Leung
* 'Export Keying Set' operator works again - a change in the previous commit broke the created code * Relative Keying Sets don't get their paths shown * Keying Set paths show options for inserting keyframes too now --- Another attempt at fixing compile troubles, and removed some commented out + obsolete stuff.
2010-03-10[#21261] Bugfix for dynamically loaded scenes' lights not mixing in multitextureCampbell Barton
from Mitchell Stokes (moguri)
2010-03-09rename some functions to use easier to understand names.Campbell Barton
'BLI_makestringcode' --> 'BLI_path_rel' 'BLI_convertstringcwd' --> 'BLI_path_cwd' 'BLI_convertstringframe' --> 'BLI_path_frame' 'BLI_convertstringframe_range' --> 'BLI_path_frame_range' 'BLI_make_cwdpath' --> 'BLI_path_cwd'
2010-03-08image re-project now uses offscreen render function and has input for render ↵Campbell Barton
size. unrelated changes that ended up being more trouble to commit separate... - removed BLI_split_dirfile(), was nasty, occasionaly modifying the source string, it could create directories and used the $CWD in some cases. was only used in 2 places in filesel.c, if this gives problems can address without bringing back this function. renamed BLI_split_dirfile_basic --> BLI_split_dirfile - view3d_operator_needs_opengl was being called for offscreen render when it wasnt needed.
2010-03-07BGE 2D Filters: slightly change dfelinto patch to use SCA_IScene instead of ↵Benoit Bolsee
KX_Scene. It is rather anecdotic since KX_Scene is the only implementation of SCA_IScene but it's better to keep GameLogic and Ketsji separated.
2010-03-03small png include adjustments (ifndef NOPNG ...).Dalai Felinto
* gameplayer is now probably not going to build without PNG turned ON. To fix that it would be necessary to use #ifndef NOPNG around the GPC_Canvas::MakeScreenShot. Since I don't this function it's working in 2.5 yet it's better to wait for that before doing it.
2010-03-03fix for CMake compile in windows. ($PNG_INC was needed) - partial revert of ↵Dalai Felinto
commit 27251
2010-03-03fix for minor errors/warningsCampbell Barton
2010-03-03BGE 2D Filters: filters run per scene now (fix for [#18152]) - it (slightly) ↵Dalai Felinto
breaks backward compatibility !!! Originally we had 2DFilters (m_filtermanager) stored in RenderTools. That way filters were stored globally and were being called once per each scene. This was producing two big problems: (1) performance and (2) flexibility of use. (1) Performance - To run the filters 2X == 2X slower (2) flexibility of use - Very often we want the filter in the scene but not in the UI for example. For those reasons I believe that 2DFilters with multiple scenes was very useless or unpredictable. I hope they work fine now. To make it work as before (2.4) you can simply recreate the 2dfilter actuators across the scenes. * * * * * Imagine that we have: (a) Main Scene (b) Overlay Scene in Main Scene the Z Buffer and RGB will be from the main scene. in Overlay Scene the Z Buffer will be from the Overlay Scene and the RBG buffer is from both [(a + 2D Filter) + b]. So in pseudo code if we have a,b,c,d,e scenes we have: (2DFilterE(2DFilterD(2DFilterC(2DFilterB(2DFilterA(a) + b) + c) + d) + e)
2010-02-28make BGL and BLF modile names lowercaseCampbell Barton
2010-02-27VideoTexture: optional arguments to ImageBuff constructor.Benoit Bolsee
ImageBuff([width,height[,color[,scale]]]) width, height: size of buffer in pixel. default: buffer not allocated. color: initial value of RGB channels. Alpha channel is 255. Possible values: 0(black=default) -> 255 (white) scale: True or False to enable or disable fast scaling default: False This constructors eliminates the need to use the load function when you just want to initialize the image buffer to black or white.
2010-02-26use negate_v3 rather then multiplying a vector by -1.0 (no functional changes)Campbell Barton
2010-02-26VideoTexture: fix a bug with AV sync that was causing a loss of sync in case ↵Benoit Bolsee
of rewind to the begining of the file.
2010-02-25BGE Dome: BlenderPlayer Console arguments: warpdata working now (only with ↵Dalai Felinto
absolute path) I forgot to say in the last commit that those arguments are only for the BlenderPlayer. we can now set external warpdata files. 2Do: (1) convert relative to absolute paths for warpdata files (2) investigate weird bug on lack of light in blenderplayer with warpmesh ... [old 2Do] (3) documentation (4) preserve scene settings (at least scene->gm.dome) even if you load a new file inside the game (e.g. Yo Frankie loading new levels)
2010-02-25BGE Dome: Console arguments: angle, tilt, mode and warpdata (not working yet)Dalai Felinto
2Do: (1) open external warpdata file (2) documentation (3) preserve scene settings (at least scene->gm.dome) even if you load a new file inside the game (e.g. Yo Frankie loading new levels) otherwise it's a nightmare to update all your files every time you change your projection system. See note. Maybe SYS_WriteCommandLineInt/Float/String can be used for that. Gotta investigate further. * Note: an external warpdata file is a must ! Currently every time you need to calibrate your system you have to update the warp file in all your demo files. This is terrible. I'm glad I *now* have a dome near by to test it ;) * FYI: A recent 'Yo Frankie in a dome' video if you want to see how it works: http://www.vimeo.com/9629626 I'm going to record a better one tomorrow.
2010-02-23matrix functions, to_3x3, to_4x4Campbell Barton
force fixed time when recording in the BGE.
2010-02-22game engine support for recording animation back & some other minor changes.Campbell Barton
2010-02-22use BLI_findstring in more places & remove some warnings, no functional changes.Campbell Barton
2010-02-22fix for typoCampbell Barton
2010-02-22Fix for the player by nazg-gul.Joerg Mueller
2010-02-22VideoTexture: improvements to image data access API. Benoit Bolsee
- Use BGL buffer instead of string for image data. - Add buffer interface to image source. - Allow customization of pixel format. - Add valid property to check if the image data is available. The image property of all Image source objects will now return a BGL 'buffer' object. Previously it was returning a string, which was not working at all with Python 3.1. The BGL buffer type allows sequence access to bytes and is directly usable in BGL OpenGL wrapper functions. The buffer is formated as a 1 dimensional array of bytes with 4 bytes per pixel in RGBA order. BGL buffers will also be accepted in the ImageBuff load() and plot() functions. It is possible to customize the pixel format by using the VideoTexture.imageToArray(image, mode) function: the first argument is a Image source object, the second optional argument is a format string using the R, G, B, A, 0 and 1 characters. For example "BGR" means that each pixel will be 3 bytes, corresponding to the Blue, Green and Red channel in that order. Use 0 for a fixed hex 00 value, 1 for hex FF. The default mode is "RGBA". All Image source objects now support the buffer interface which allows to create memoryview objects for direct access to the image internal buffer without memory copy. The buffer format is one dimensional array of bytes with 4 bytes per pixel in RGBA order. The buffer is writable, which allows custom modifications of the image data. v = memoryview(source) A bug in the Python 3.1 buffer API will cause a crash if the memoryview object cannot be created. Therefore, you must always check first that an image data is available before creating a memoryview object. Use the new valid attribute for that: if source.valid: v = memoryview(source) ... Note: the BGL buffer object itself does not yet support the buffer interface. Note: the valid attribute makes sense only if you use image source in conjunction with texture object like this: # refresh texture but keep image data in memory texture.refresh(False) if texture.source.valid: v = memoryview(texture.source) # process image ... # invalidate image for next texture refresh texture.source.refresh() Limitation: While memoryview objects exist, the image cannot be resized. Resizing occurs with ImageViewport objects when the viewport size is changed or with ImageFFmpeg when a new image is reloaded for example. Any attempt to resize will cause a runtime error. Delete the memoryview objects is you want to resize an image source object.
2010-02-21No need for this change anymore (force include to get BLO_sys_types.h in GE)Martin Poirier
2010-02-21Compile fix for CMakeElia Sarti
2010-02-16[#18961] Use const char * where appropriate (2.5)Campbell Barton
from Sean Bartell (wtachi) added own changes bpy_props.c