Commit Graph

6767 Commits

Author SHA1 Message Date
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
444e4e36fe Commited 3ds export enhancements from Mark Stijnman (beowulff)
Will need to do some updates, Mesh over NMesh and optimize some areas but it works and is a big improvement.

from
https://projects.blender.org/tracker/index.php?func=detail&aid=4156&group_id=9&atid=127

Detailed description:
Modified the 3ds export script 3ds_export.py:
- It now exports face UV correctly. 3ds only supports one UV coordinate per vertex. The script now duplicates vertices that had multiple UV pairs assigned to them so that each duplicate now only contains one and only one UV. Faces have their vertex indices adjusted accordingly.
- Quads are now split into triangles better. 3ds only supports triangles, so quads need to be split into two triangles. Instead of rather arbitrarily splitting along the diagonal between points 0 and 2, the script now splits along the shortest diagonal. This creates a higher quality triangular mesh, as well as better preservation of symmetry.
- Now creates an object node block, exporting object nodes, needed by some 3D importers. Among others, allows one to export object hierarchy.
- Now exports Empties as 3ds Dummies.

To be able to add all of the above new features, the script has been mostly rewritten and strongly restructured.

Motivation for the rewrite was the desire to be able to use Blender to produce custom 3d cars for Trackmania:Sunrise (TM:S). Previously, the TM:S importer could not correctly handle the 3ds files from the Blender 3ds export script. With this version, one can export cars complete with UV textures, correct wheel placement and light placement. To my knowledge, this script would make Blender the first fully free 3d modeller that allows one to export 3ds models for TM:S (expect a tutorial soon). The ability to have proper UV coordinates exported into the 3ds file should also be very welcome to many.

Add A Comment: Notepad
2006-05-02 11:26:32 +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
Campbell Barton
702207f03f * Added optional X Zero snapping with tolerence limit.
* optionaly work with more then 1 mesh.
2006-04-28 11:41:11 +00:00
Jens Ole Wund
0a3e6a771f msvc6 .. adding mofifiers for happy PY complie
still no GE and still std::std::string in El'Beem
2006-04-28 07:31:27 +00:00
Erwin Coumans
43b3256be4 missing commit. this profiling is disabled in Blender, but the headerfile is needed. 2006-04-28 01:49: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
Campbell Barton
2d6224a0d7 All negative vert indicies are assumed relative, removed relative vert option. 2006-04-27 23:22:04 +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
2883242cde Lightwave mot exporter now does worldspace loc/size/rot 2006-04-27 12:51:09 +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
Daniel Dunbar
16a816c38d - initialize some globals to 0 explicitly 2006-04-26 00:51:58 +00:00
Tom Musgrove
512cb9799d ==scripts ==
update to MD2 exporter by Bob Holcomb
2006-04-25 22:05:03 +00:00
Ken Hughes
74acf8224d ===Python API===
Fix some small typos in Pose epydocs.
2006-04-25 22:00:18 +00:00
Campbell Barton
ab5c87cbf4 Re arranged how modifiers are used.
All settings through Blender.Modifier.Settings
see the epydocs
Also added some error checking to fix some possible segfaults.
Added more epydocs

Modifiers API should be stable enough to use now, though give it a bit of time for testing.
2006-04-25 13:01:19 +00:00
Matt Ebb
2bbfd3a801 * patch #3876: Rotating view icon
submitted by Davide Vercelli

This replaces (as a user preference) the static icon shown in the bottom-left of the 3D View with a small rotating axis that updates live in all ortho/perspective modes

I made several modifications to the original patch. In the patch, it displayed the axis on top of the 'object info' text since when floating panels are minimised, they sit in the bottom corner and cover the axis up. This annoyance is not limited to the axis, it also covers the frame number and info text, which can be frustrating. Sending them to the bottom is not that useful either, since it's quicker (with esc) and just as much movement to close and re-open them again.

I decided to solve this problem at the cause: Now when using the disclosure triangle on floating panels, they 'minimise in place' rather than going to the bottom.

User preferences are in the 'View & controls' section to:
- Display either the 3D axis or the old icon
- The size of the axis
- the brightness of the axis (colours are taken from grid theme settings)

* patch #3801: Option to show view direction in 3D View
submitted by Daniele Fornaciari

Simple one, just adds an user pref to show the name of the view's direction as text in the top left corner.
2006-04-25 12:26:46 +00:00
Campbell Barton
5c02b01395 Congrats to ZanQdo, first script lightwave motion exporter.
We need a way to get worldspace loc/size/rot.
there is currently no simple way to do this. location can be found the the world matrix.
but size and rot arnt that simple...
Maybe worldLocX.. worldRotX etc?
2006-04-25 07:25:22 +00:00
Ken Hughes
5fa5ea352e ===Bugfix===
matrix.resize4x4() was incorrectly allocating a array of pointers using
the wrong cast -- sizeof(float) instead of sizeof(float *).  Worked fine
on 32-bit systems but caused a crash on AMD64.  Discovered by a student
in one of my classes (kudos, Joe).
2006-04-24 23:00:03 +00:00
Joseph Gilbert
9e7a0e1987 *projectfiles update*
-only 1 dll for pthreads needed in release build
2006-04-24 21:34:05 +00:00
Joseph Gilbert
26c8d8f983 For some reason the render docs didn't mention the fact that you the RenderData stuct has the 'currentFrame' method for proper frame access. 2006-04-24 16:17:03 +00:00
Joseph Gilbert
87949e5c67 warnings cleanup for the python project on windows 2006-04-24 15:09:07 +00:00
Joseph Gilbert
4bfb0e30ec *msvc7 projectfiles update*
- post-build steps improved
- properly moves all the python scripts into the .blender directory on build
- only moves pthreadVSE2.dll from the pthreads libs
- moves release text into the build directory
2006-04-24 14:33:35 +00:00
Joseph Gilbert
a77ab034d4 *projectfiles update*
- added Modifier.c to python project
2006-04-24 14:07:09 +00:00
Campbell Barton
52d50b3cbc fix removal of groups for non selected verts.
removed debug prints
2006-04-24 11:34:16 +00:00
Campbell Barton
11586835da Added utility functions to BPyMesh.py
- dictWeightFlipGroups, return a vert weight with flipped group names.
- dictWeightMerge, takes a list of dictWeights and merges them

mesh_mirror_tool.py
Added vertex weight support for the mirror tool, its able to mirror arbitary meshes weights with optional name flipping and creation of name flipped groups.
This also uses the mode for l<>r, l>r, r>l so you can copy from left to right only for eg.
2006-04-24 11:26:04 +00:00
Ken Hughes
94ebee891c Some Ipo getseters calling setter methods; added the necessary wrapper
functions to make this work correctly.
2006-04-24 05:24:58 +00:00
Erwin Coumans
8291024b99 fixes in raycasting 2006-04-24 04:58:37 +00:00
Erwin Coumans
c781a840b2 fixed collision sensor for dynamically created objects using Bullet physics 2006-04-24 02:03:55 +00:00
Erwin Coumans
d1c0a4e6d1 use ContinuousConvexCollision for raycaster, fixes raycast problems 2006-04-23 18:42:17 +00:00
Ken Hughes
a26ef58877 ===Tools===
Patch #4119, submitted by Lukas Steiblys (imbusy1).  Mesh objects (created
through the toolbox) which take user input such as number of verts, are not
created if the user cancels input.  Thanks for the patch!
2006-04-23 18:19:37 +00:00