Commit Graph

5749 Commits

Author SHA1 Message Date
Ton Roosendaal
d0acd78ad8 Bugfix #4175
Copying a Mesh did set the "texco mesh" pointer to zero... very weird code
from NaN days, which is a line that should just be removed. :)
2006-05-10 17:22:49 +00:00
Campbell Barton
8f84542c23 Modified mesh to allow writing to normals.
renamed meshPrettyNormals to meshCalcNormals, and it now writes to normals rather then returning a list of vecs.
updated vertexpaint_selfshadow_ao to be a bit more efficient and make use of the above changes.
2006-05-10 12:12:21 +00:00
Campbell Barton
f81206228c Fixed typo 2006-05-10 03:59:16 +00:00
Erwin Coumans
1567254b12 (experimental) logic timestep to 60hertz instead of 30 hertz. 2006-05-10 02:04:21 +00:00
Campbell Barton
41623cbdb9 made mesh's getFromObject pick the materials from object or obdata as set by the objects colbits.
its crufty that None of the exports currently export materials correctly, hopefully this will help.
2006-05-10 01:38:02 +00:00
Erwin Coumans
4c9f07e59f Disabled Sumo, and use Bullet physics instead.
Until too many people complain: People can use older versions of Blender / player if they really need Sumo.
Sumo is not supported by anyone, and Bullet needs more feedback.

Note: Sumo is not removed yet, because no discussion is started about this. It's currently just a simple switch that replaced Sumo by Bullet.
2006-05-10 00:30:35 +00:00
Erwin Coumans
bcc6704299 fixed [ #3863 ] Baking game physics to IPOs misses the first few frames of motion
Also, the recording starts from the actual 'curframe' onwards, rather then from frame 1
2006-05-10 00:05:49 +00:00
Erwin Coumans
55ab57519d modified behaviour of PropertySensor and MessageSensor on popular request.
Logic systems should be improved, with consistent Level and Edge triggering usage in the logic bricks.
2006-05-09 23:43:14 +00:00
Ton Roosendaal
12e2f68bff Potential bugfix #4141
The curves tool didn't extend after last point correctly, in linux/windows.
Stupid bug found by Joeedh. thanks!
2006-05-09 20:26:34 +00:00
Erwin Coumans
cc8f876950 applied Charlies patch (commenting out unused extensions that cause compile problems under Solaris and probably other platforms) 2006-05-09 18:23:45 +00:00
Ken Hughes
4de7589720 Bugfix: mesh.removeVertsFromGroup() caused segfault due to NULL pointer. 2006-05-09 14:17:34 +00:00
Ton Roosendaal
1736624d3e Small fix: "Curves" UI widget used wrong method for defining shades for
drawing grid lines, which didn't show in default theme.
2006-05-09 07:45:06 +00:00
Ken Hughes
4b310f2b8f ===Python API===
Correct error in Constraint example code.
2006-05-09 01:34:59 +00:00
Erwin Coumans
e19fcdc670 fixed Bullet raycasting filtering issue 2006-05-09 01:15:12 +00:00
Ken Hughes
5f6a5f1b17 ===Python API===
Bugfix: replaced calls to enter_editmode() and exit_editmode(), which would
cause segfaults on scripts run in background mode (discovered by NichG).
2006-05-08 05:37:00 +00:00
Ken Hughes
cd3af13a1b ===Python API===
New Constraint API.  Constraints are accessible through a "constraints"
attribute in poses and objects.  Would be REALLY NICE for armature users to
pound on this code.
2006-05-07 14:57:58 +00:00
Campbell Barton
bb52e70c8a Added "VertexPaint" slot for python menus 2006-05-07 13:09:29 +00:00
Peter Schlaile
390380e97b Bugfixes for frame number boost:
- Found several places, where people explicitly casted the frame number
  to short.
- Fixed the crash in BPY_interface by adding an empty line (to make it
  recompile everywhere, make clean doesn't help...)

  For the build system maintainers:

  Problem was: The change in makesdna changed the position of the
  scriptlink structure. BPY_interface.c somehow didn't get recompiled
  (not even after a make clean!!!) which triggered crashes on adding
  scriptlinks.
2006-05-07 08:23:51 +00:00
Campbell Barton
53e777aae1 added optional 'worldspace' arg to getLocation/getSize/getEuler
getSize is never flipped, but added a note in the docs.
correction to getEuler, its not wrapped.

also removed all // comments to shut GCC up.
2006-05-07 08:12:18 +00:00
Peter Schlaile
5f571e4ded ==Bugfix==
Made the frame boost from short to int (30000 -> 300000 frames) complete
by walking through the source and finally changing all frame-variables
to ints.

This should finally fix the framecounter warp around seen in some buttons.

If you step on any further problems that may arise starting from frame
32768 please just give me a hint and I'll fix it.

(Sorry about that, didn't know enough about Blender, when I did it the first
time...)
2006-05-06 15:26:53 +00:00
Campbell Barton
e9718958ee Applied pack unpack from Pablo Martin (caedes),
http://projects.blender.org/tracker/?func=detail&atid=127&aid=3246&group_id=9
adds

Blender.c:
Blender.UnpackModes (dict with the unpack modes)
Blender.UnpackAll(mode)
Blender.PackAll()
Blender.CountPackedFiles()

Image.c:
image.packed (this was working)
image.pack()
image.unpack()

Sound.c:
sound.packed
sound.pack()
sound.unpack()
2006-05-06 06:17:46 +00:00
Campbell Barton
9681a329c1 added a python menu slot for weight pain.
Also needed to seperate
  view3d_paintmenu
into
  view3d_vpaintmenu
  view3d_tpaintmenu
  view3d_wpaintmenu

The view3d_paintmenu and do_view3d_paintmenu were getting messy and had a lot of if's in it.
2006-05-05 06:57:33 +00:00
Ken Hughes
18a23ab8c9 ===Python API===
Bufgix #4171: Action_setName() didn't call rename_id(), messing up the
internal database.  Patch provided by Roland Hess (thanks).
2006-05-04 13:42:12 +00:00
Jiri Hnidek
4646ee2aaa Bugfix for sequencer:
When you wanted to display "Chroma VectorScope" or "Luma WaveForm" for
 image/window with small width/height, then Blender crashed, because
 Blender has used fixed limits of ibuf->rect size. Statistics informations
 should be created corectly now too.
2006-05-04 11:55:29 +00:00
Campbell Barton
cb67cba19a Multiple armatures<>mesh objects now work with name flipping.
previously would only work if the armature was the first in the meshes modifier list,
in that case the armature would be name flipped but the mesh would not)
2006-05-04 00:59:02 +00:00
Ken Hughes
e5ccb8773d Bugfix #4169: unlinking an empty object using scene.unlink() wasn't checking
for ob->data == NULL, causing segfault.
2006-05-03 17:15:33 +00:00
Ton Roosendaal
e80099d921 Bugfix for Node editing;
When multiple output nodes exist (Material), the active Output flag could
get copied and wasn't reset properly. Now the depenendency sorting code
ensures only 1 output node is the active output for execution.
2006-05-03 13:20:25 +00:00
Ken Hughes
9874d5c76f ===Python API===
Added activeGroup attribute to Mesh API, to get/set active vertex group for
meshes.
2006-05-02 17:44:44 +00:00
Kent Mein
88f225f226 Added some comments on what vec in BezTriple contains.
(Provided by harkyman)

I also added comments explaining what the Blank lines with #
where for above a couple of structures.
(compiler ignores them and they specifiy to makesdna that that structure
can be ignored)

Kent
2006-05-02 14:35:47 +00:00
Peter Schlaile
7deaac1d25 ==Sequencer==
- Added early-out optimisation to add-effect (the case, where fac == 0)
- Bugfixes:
  * hddaudio: ffmpeg does not seek always to the correct frame,
    if the SEEK_BACKWARD flag is used. Now we account for this and
    seek a little bit further... (hack, urghs)
  * hddaudio: on long timelines, the new seek code didn't work
    (forgot a long long cast)
  * the audio mixdown code now also calculates meta-strip IPOs
2006-05-02 13:22:00 +00:00
Campbell Barton
bd09b7703a editmesh's seperate was crashing because the em->selected wasnt being flushed along with the seperated data.
easy 1 liner, seperate now clears the selection order linkedList.

Watch out for places where removing verts might not remove the selection order data.
2006-05-02 10:43:58 +00:00
Campbell Barton
c3c0c38ad0 added a glDisable(GL_DEPTH_TEST); before the UI drawing because face select and wp mode were drawing mesh data over the UI. 2006-05-02 07:55:26 +00:00
Willian Padovani Germano
35b8dac2ca As mentioned in the pydrivers commit, I had to change the order in
exit_usiblender() to finalize Python before main library data was freed.
This solved a somewhat specific sigsegv with pydrivers, but as Ken
Hughes found out (thanks!) caused one with scripts that called Blender.Exit().

Now running scripts (G.main->script) are freed in BPY_end_python()
itself (so before the rest of the library data is freed), before
Py_Finalize(). Works fine in all my tests so far.

The file script.c should become obsolete with this change (I added a
comment about it there). If all is indeed fine, it will be removed
later.
2006-05-02 02:42:08 +00:00
Ken Hughes
30f4f3e2c4 ===Python API===
Remove references in epydoc to deleted NMesh modes SUBSURF and OPTIMAL.
2006-05-01 21:15:49 +00:00
Ken Hughes
02506b1a5b ===Python API===
Make EXPP_setBitfield() PyObject_IsTrue() to evaluate parameter, so
boolean-type attribute setters will accept wider range of true/false inputs.
2006-05-01 05:28:51 +00:00
Willian Padovani Germano
066a2b2ed2 Small update for pydrivers: force reloading the pydrivers.py Blender
text module when user edits the input text box of any pydriver
(Transform Properties panel, Ipo window).

It's enough to click in and out of a single pydriver's text input box
for the module reloading and also re-evaluation of all pydrivers
available. Maybe this "refreshing" should also be available from a
menu, let's see.

Note for Python fans:

Definitions and redefinitions in a reloaded module are properly handled
in Python, but previously defined data in the module doesn't disappear.
So if you define a function "f" inside a module, import it, then change
the function's name to "g" and reload the module, both "f" and "g" will
be available. This is considered a feature, check reload's documentation:
http://docs.python.org/lib/built-in-funcs.html#l2h-59
2006-04-30 22:10:39 +00:00
Willian Padovani Germano
89dab4397d Pydrivers: Ipo Drivers controlled by Python expressions
wiki with info: http://mediawiki.blender.org/index.php/BlenderDev/PyDrivers

(there are two sample .blends in the patch tracker entry, last link in
the wiki page)

Notes:

In usiblender.c I just made Python exit before the main library gets
freed. I found a situation with pydrivers where py's gc tried to del
objects on exit and their ID's were not valid anymore (so sigsegv).

Ton needs to check the depsgraph part.

For now pydrivers can reference their own object, something normal
ipodrivers can't. This seems to work fine and is quite useful, but if
tests prove the restriction is necessary, we just need to uncomment a
piece of code in EXPP_interface.c, marked with "XXX".

Thanks Ton for the ipodrivers code and adding the hooks for the py part
and Martin for the "Button Python Evaluation" patch from which I started
this one.

Anyone interested, please check the wiki, the .blends (they have
README's) and tell me about any issue.
2006-04-30 16:22:31 +00:00
Ken Hughes
3b84767824 ===Python API===
Remove "EXPP_MOD_" from descriptions in Settings dictionary.
2006-04-29 14:24:30 +00:00
Ton Roosendaal
50b5d83a97 Bugfix #4139
Included a patch from Jacques Beaurain. On pressing "Play" the position of
the playback window didn't use same code as for pressing "Render".
2006-04-29 11:37:26 +00:00
Ken Hughes
fce1ff5634 ===Python API===
Bugfix: call to EXPP_ReturnPyObjError() was discarding value
2006-04-28 20:32:41 +00:00
Erwin Coumans
be282bdf3f - Charlie fixed some bugs related to copying armature-constraint data (these are different from Bullet rigidbody constraints like the hinge, and point 2 point!)
- fixed a crashing bug related to objects without meshes (tried to get material info from it)
2006-04-28 17:35:03 +00:00
Erwin Coumans
f51d1ef7d6 - fixed Bullet noResponse/ghost mode
- added ccd option (future use, very basic and inefficient)
- some internal Bullet refactoring/improvements
2006-04-28 00:08:18 +00:00
Ken Hughes
139c190605 ===Python API===
Added render.getRenderWinSize() method, to complement render.setRenderWinSize()
2006-04-27 20:24:27 +00:00
Campbell Barton
176a4c8507 Added scalePart to mathutils matrix type object.
and made it so toEuler converts a 4x4 matrix to a 3x3 rather then raising an error.

Its not straight fwd to get an objects worldspace loc/size/rot from its 4x4 matrix.
Example from updated docs.
      import Blender
      scn = Blender.Scene.GetCurrent()
      ob = scn.getActiveObject()
      if ob:
        mat= ob.mat # Same as martixWorld
        print 'Location", mat.translationPart() # 3D Vector
        print 'Size", mat.scalePart() # 3D Vector
        print 'Rotation", mat.toEuler() # Euler object
2006-04-27 12:32:44 +00:00
Erwin Coumans
b18763a265 make Bullet default physics engine. However, it still loads some default .blend that set's sumo default. todo: find out about this.
commented out some code that makes Blender crashing, after leaving the game engine (armature deletes some pose, which deletes constraints, which are still in the dependency graph. Ask Charlie)
2006-04-27 04:37:20 +00:00
Matt Ebb
444f4e894f == interface ==
* Floating panel edge snapping

Floating panels now have a snapping mechanism that sticks them to the edge of a window when you drag them within a small range of it. This not only allows nice easy alignment of panels within a window, but also keeps them stuck to window edges when the window is resized. This means that you no longer get panels that were once on the edge of the window left drifting in the middle of your view if you resize it larger, which was rather annoying before.

Another goodie is that panels snapped to the bottom edge of the screen will minimise down to the bottom when collapsed, and will move back up to be edge aligned when maximised again, preventing collapsed panels down here from hanging around in space.
2006-04-26 14:47:04 +00:00
Campbell Barton
b69db8f090 Made space handelers check that G_DOSCRIPTLINKS is enabled before running.
Its scary to think that a redraw space handeler could run
  import os
  os.system('rm -rf ~/')
removing all user files, Just by opening the blend file!

This means at least you can opt not to run any python scripts you dont want to..
2006-04-26 08:22:39 +00:00
Erwin Coumans
f9597df32d added Bullet rigidbodies that behave like Sumo 'dynamic', without rotations. Done using a special hinge constraint (no translational degrees of freedom removed) 2006-04-26 06:01:46 +00:00
Erwin Coumans
45d0123a59 fixed several internal Bullet rigidbody dynamics bugs:
- broadphase had bugs in removing objects,
- persistent manifold renamed value,
- cylinder penetration depth fixed,
- memory leak for persistent manifold
2006-04-26 03:20:28 +00:00
Matt Ebb
94dd1085e3 Trying a new method for setting the brightness of the mini axis. Let's see how this goes. 2006-04-26 01:42:35 +00:00