Commit Graph

12539 Commits

Author SHA1 Message Date
0066b6a8aa fix for big in yesterdays commit, color values were not initialized 2009-01-13 05:55:48 +00:00
d0b953d860 can now add sequencer effects with the python api
also fixed crashes when incorrect args were used

cross = 13; track= 5; frame = 1 # no effect constants 
scene.sequence.new((cross, seq1, seq2), frame, track)
2009-01-12 15:58:32 +00:00
9ce30005de BGE bug #18070 fixed: 2dFilter actuator is always pulsed. 2009-01-02 22:15:05 +00:00
10702bf93f BGE API cleanup: more bricks converted to attributes. 2009-01-02 22:09:57 +00:00
cc569504d0 BGE API Cleanup: update the python attribute definition framework.
* Value clamping to min/max is now supported as an option for integer, float 
  and string attribute (for string clamping=trim to max length)
* Post check function now take PyAttributeDef parameter so that more 
  generic function can be written.
* Definition of SCA_ILogicBrick::CheckProperty() function to check that
  a string attribute contains a valid property name of the parent game object.
* Definition of enum attribute vi KX_PYATTRIBUTE_ENUM... macros. 
  Enum are handled just like integer but to be totally paranoid, the sizeof()
  of the enum member is check at run time to match integer size.
* More bricks updated to use the framework.
2009-01-02 17:43:56 +00:00
abd4934d1a fix for a memory leak in NMesh (deprecated api) while looking at bug report...
[#18139] Memory Leaks while using Py_BuildValue
2009-01-01 16:18:54 +00:00
2dfd34994f BGE API cleanup: introduction of a generic framework to link Python attributes to logic brick class member. See KX_PYATTRIBUTE macros in PyObjectPlus.h. 2008-12-31 20:35:20 +00:00
cbceb6c8b2 BGE API cleanup: more consistent type check on set attribute (mouse and keyboard so far). Check type after name so that the user get a type error when assigning a wrong type to a built-in attribute. 2008-12-30 16:44:34 +00:00
bd97dd0846 mistake in previous commit, stopped CurNurbs from appending 2008-12-30 05:00:19 +00:00
1c663bbc7e First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. 
To make porting of game code easier, the properties have usually the same type and use than
the return values/parameters of the get/set methods. 
More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up

Old methods are still available but will produce deprecation warnings on the console: 

"<method> is deprecated, use the <property> property instead"

You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu.

PyDoc is updated to include the new properties and display a deprecation warning
for the get/set methods that are being deprecated.
2008-12-29 16:36:58 +00:00
aa56346b12 * disable back buffer selection drawing while projection painting (was redoing for every update while painting)
* remove unneeded return from game engines py api - ConvertPythonToGameObject
2008-12-24 21:53:15 +00:00
cbebe4ad46 * bpy curve api wouldn't give correct errors for bad arguments when appending nurbs.
* the radius on the curves first point was ignored. 
* mesh_edges2curves.py was giving all points a tilt of 1.0
2008-12-24 15:46:26 +00:00
3a4ead8f0f fix for own mistake - [#18119] Texture Paint: "clone from layer" button not drawn in buttons window 2008-12-24 02:06:34 +00:00
05fc2aa9da pose_grab_with_ik_clear(): fix bug with memory used after being freed. 2008-12-22 16:56:14 +00:00
601fb5e6fa Bugfix - Fixed crashes in Action Editor on Ctrl-L due to missing NULL checks. 2008-12-22 10:52:17 +00:00
f288a43457 define WITH_CCGSUBSURF isnt used anymore 2008-12-21 03:11:32 +00:00
eb1d0e139f Bugfix since rev 2, BLO_setversionnumber() was using sizeof(array), which gives the sizeof the pointer, not the array.
On a 64bit system I assume this would set 8 chars of a 4 char array.

Turns out this isnt such a problem since BLO_setversionnumber isn't used anymore but way as well commit.
2008-12-20 17:09:45 +00:00
c67d26602f id prop update function was receiving a tuple when it only needed a single arg 2008-12-20 08:41:46 +00:00
630c16feb7 patch [#18110] [patch] Update blenderplayer.exe -h text
from Mitchell Stokes (moguri)
2008-12-20 07:12:38 +00:00
5881922bc5 Add G_FILE_IGNORE_DEPRECATION_WARNINGS option to G.fileflags in preparation of BGE python API cleanup 2008-12-19 20:35:53 +00:00
3c9ae035fb Typo was making actuator.getExecutePriority() crash 2008-12-19 03:26:41 +00:00
a755342b14 Bugfix for crash with loading fluidsim files, reported by Gimble3d and nudelZ 2008-12-18 22:08:57 +00:00
04ef5be177 FFmpeg upgrade to revision 12758 (avformat version 52.13): support libavdevice for video capture in VideoTexture module (BGE). Makefile, CMake, scons updated. FFmpeg binaries will have to be rebuilt for certain OS (irix), win32 binaries already up to date. You MUST do a clean rebuild after this patch. Scons users: pay attention that the config/<os>-config.py files have changed, adapt your user-config.py in consequence 2008-12-17 20:52:39 +00:00
Nathan Letwory
3c886d7c38 * commit r17900 by Genscher was wrong.
- Instead of defining such defines for the entire codebase in Blender.py, add
    the right checks and definitions to the places where it matters.
  - Only check+set WITH_BULLET instead of also GAMEBLENDER=1
  - NOTE: No global defines allowed in BlenderLib.
2008-12-17 05:40:40 +00:00
9776749438 Reverting revision 17417 which broke cloth collisions which check also in blenkernel/intern for WITH_BULLET 2008-12-17 00:41:07 +00:00
882d85a968 Patch from Banlu Kemiyatorn
replace VecMulf(var,-1) with new VecNegf(var) function.
2008-12-16 12:32:10 +00:00
4da3c4b9d5 fix for [bf-blender-Bug Tracker][18089] scons compiling bug
and removed unused vars
2008-12-16 11:26:55 +00:00
Chris Want
024b4b3dda B
Linking of blenderplayer was failing with unresolved symbols
(initVideoTexture) when building without FFMPEG. Needs
testing with SCons and Makefiles.
2008-12-15 20:53:45 +00:00
Chris Want
b99f74c8e8 Make sure that WITH_OPENEXR is defined when sources are configured
with OpenEXR in the CMake system. This is a compilation fix from
Miguel A. Figueroa Villanueva for building Debug versions of Blender
using OpenEXR (thanks!).
2008-12-15 17:47:57 +00:00
4d21036829 bugfix #17989
Patch from Xavier Thomas.

Compositor, filter node, had shifted output when used on single-value
buffers.
2008-12-15 08:37:39 +00:00
d99686a783 Touch/NoOverwrite options were not disabled for video. 2008-12-15 08:29:31 +00:00
Ken Hughes
ba6972eb4d Python API
----------
Bugfix #18044: missing return statements in getter for displacement modifier
caused incorrect values to be returned.
2008-12-15 05:30:09 +00:00
f8aa295596 projection paint cleanup (nothing to see here)
* BarycentricWeightsPersp2f was calling BarycentricWeights2f, and re-weighting. Changed so the re-weighting isnt needed.
* replaced tri_depth_2d with VecZDepthOrtho and VecZDepthPersp
* project_paint_occlude_ptv_clip now calls project_paint_occlude_ptv to remove duplicate code.
2008-12-13 16:11:52 +00:00
aa40953210 Projection Painting, merge from branch
Additions/Features...
 - Painting onto multiple images at once.
 - Clone with an offset similar to the gimp, also an option to clone between UV layers, (not both offset and between layers atm)
 - Stencil layer, similar to The Gimp's quickmask.
 - Face mask mode - (painting onto only selected faces).
 - Texture brushes (so image and texture-node brushes too)
 - Seam bleed so you don't see gaps when painting over UV seams (new option set in the panit panel)
 - Occlusion (only point onto the first face under the paintbrush, can also be used for masking out parts of the model to paint onto) - (new option set in the paint panel)
 - Muti-threaded, each thread operates on its own bucket.
 - Support partial updates to speedup OpenGL texture refreshing.
 - Support tile based multiple undo's
 - Support float image buffers.
 - Backface culling (new option set in the paint panel)
 - All color blending modes - Add/Multiply.. etc.
 - Airbrush rate. (used to be broken) 
 - Improve the way paint is mixed when painting, so painting with 0.2 alpha will not accumulate above 0.2 alpha on the image as you paint.
 - Option to use normals to fade out strokes on the edge of a surface to avoid ugly edges. (same as Vertex Paints "Normal" option) 

Known Problems
 - Not directly related to painting but changes in selection flags are not updated on the final derived mesh.
 - Smear tool has some distortion when in perspective mode. 
 - While in perspective view any faces with 1 vert behind the viewpoint, will be completely ignored.
 - Painting can be initially slow while buckets are being initialized, a number of solutions exist.
 - Size 1 brushes don't work yet.
 - When painting onto large faces its still possible to get artifacts.
 - Spatial optimizations are needed to skip occluded faces and test pixel occlusion. (will look into using blenders BVH )
2008-12-12 18:59:17 +00:00
696ef1afd2 minor changes 2008-12-12 18:31:34 +00:00
6f78cdd79f view.c
* Renamed view_autodist to view_mouse_depth
 * Accept args for mouse location and pixel distance around the hotspot used to lookup the depth.
 * removed persp(PERSP_VIEW) within this function, since it didnt set the view back.

imagepaint.c
 * normal falloff now works as Brecht suggests. Normal limit of 80 will blend between 80 and 85deg,  70deg limit blends between 70-80deg.
 * convert normal falloff to radians on initializing rather then on every comparison.
 * Ctrl+Click setting the cursor in its own function.
 * projection painting wasnt accounting for an exception for too high pressure values on first touch in windows for some tablets.
 * removed grease pencil benchmark function
2008-12-12 17:56:19 +00:00
1ecf855276 VideoTexture.ImageMirror: if the mirror is horizontal in mesh coord, take the Y axis as the up direction for the UV map. If the mirror is not perfectly vertical(horizontal), the projection of the Z(Y) axis on the mirror plane is the mirror Up direction. 2008-12-11 23:02:33 +00:00
6dc2714c78 fix for [18069] open nurbs curve snaps end to centerpoint
made nurbs surface curves use the same number of points as nurbs curves.
2008-12-10 11:42:26 +00:00
2ef5af67ca merge from trunk - r17500 to HEAD 2008-12-10 09:45:48 +00:00
2f39ae3b2e move the paint buttons from the image view and buttons window into one function. 2008-12-10 05:41:21 +00:00
ce5b9d21a7 tweaks to brush falloff and alpha, giving nicer looking strokes. 2008-12-10 03:13:48 +00:00
42f792309f bugfix - [#18063] Projection paint branch: draw tool "drops out" when model extends beyond view borders
reported by michael williamson.

Was caused by point inside triangle test using an error limit that didnt adjust for different size triangles.
2008-12-09 14:30:05 +00:00
cd47292745 ImageMirror: add clip attribute to limit clipping distance of mirror rendering 2008-12-09 14:16:10 +00:00
4251912b54 * tablet pressure changing opacity while painting didnt work
* pixels with <= the current opacity are not painted onto, speeds up painting especially with low spacing. (only when airbrush is disabled)
* use qsort rather then own crufty sorting function
* grouped projection painting functions together.
2008-12-09 08:21:53 +00:00
12fbd936dd Fix mistake in last commit.. it's pic + 1 ;) 2008-12-09 04:57:42 +00:00
1adb5b5442 patch from Mitchell Stokes
#18045] [patch] A patch that exposes the rest of the motion functions of KX_GameObject to Python.

*applyForce	=> setForce
*applyTorque	=> setTorque
*applyRotation	=> setDRot
*applyMovement	=> setDLoc
2008-12-09 04:13:23 +00:00
cac797eff6 Commit patch [#18057] by Dalai Felinto (dfelinto)
This implement the option of playback an animation using the
step value in the render panel (or -a -j).

Tested here and work fine, about the ffmpeg/avi bug it's my
fault, I don't think in "step + video format", so now it's
in my todo-list :)
2008-12-09 04:02:18 +00:00
caf58fe4b2 == Python Space Handlers ==
- Old feature request: now space handlers can report release events, too. For that a new space handler type was added, here's the header for it:

# SPACEHANDLER.VIEW3D.EVENT.ALL

These scripts report both "presses and releases". For release events, Blender.eventValue is zero and Blender.link == Blender.SpaceHandlers.VIEW3D_EVENT_RELEASE. Check the API_related bpy doc for more info.

- Bug fix: left mouse clicks could be reported twice.

Important: for both the feature and the fix, to make the code nicer and to let space handlers become available in more situations, I moved the check for space handlers in space.c. Now it happens before checks for grease pencil, sculpt and left/right mouse button swapping. If this causes any problem (it shouldn't), please report.

PS: Thanks to Steven Truppe, who asked for this and even sent me a patch, but to preserve compatibility with existing event space handler scripts I did things in a different way.
2008-12-09 00:18:30 +00:00
69298b7b76 * layer mask (similar to the gimp), uses a UV layer's image as mask for painting.
* cloning between layers was broken
* Added buttons for selecting the souce clone/mask layer in the UV layer list.
2008-12-07 19:24:41 +00:00
00cc0f6852 split code for applying each paint tool into its own function. 2008-12-07 08:54:42 +00:00