Commit Graph

859 Commits

Author SHA1 Message Date
Ken Hughes
69d00bccaa ===Python API===
Bugfix: make face and edge .extend() methods check that input vertices are
from the same mesh.  Fixes a bug found by Cam.
2006-02-17 17:50:54 +00:00
Ken Hughes
7592c09c2b ===Python API===
Allow object.setMatrix() to accept 3x3 matrices by extending to a 4x4
internally.  Also check the dimensions of the new matrix and throw an
exception if not a 3x3 or 4x4.
2006-02-16 20:09:32 +00:00
9fedbd6c51 ==Python==
Small bug reported on irc, matrix.translationPart didn't check bounds
properly (needed to use || instead of &&). Also fixed similar bugs in
rotationPart and rich compare.
2006-02-15 22:31:43 +00:00
4c966a3141 assignment typo: had == instead of =
Reported by jkw on the forums.
source/blender/python/api2_2x/Text3d.c

Kent
2006-02-13 01:25:03 +00:00
ee4c7ef22a Added ability to render Zbuffer to an image.
Just use SHIFT-F3 and save an image.

	Basically all this does is copy the zbuffer to a new Image buffer
	and pass that to the save image function.

Sample output:
	http://www.cs.umn.edu/~mein/blender/kungfu_zbuf255.jpg

	Also thanks to Jesterking for helping me debug dumbness... ;)
	and the nice screenshot.

Kent
2006-02-10 21:10:58 +00:00
Ken Hughes
83ea72de1a ===Python API===
Three more changes for the Mesh module:
(1) Bug fix for UV vertices ("sticky").  me->msticky was not being updated
   when vertices were added or deleted from the mesh.
(2) Vertex, edge and face .extend() methods accept zero-length sequences
   instead of throwing an exception.  (Note that not giving any argument
   is still an error).
(3) Edge and face .extend() methods ignore "invalid" edges or faces which
   have the same vertex twice instead of throwing an exception.  Cam and I
   argued about this for a while... :-)

Ken
2006-02-10 00:08:06 +00:00
a3d0d456ac More things for easying the job of replacing proxy/working armatures in the scenes of Elephants Dream with the final ones: 1) adds removing Fakeusers from Actions to PyAPI, now with a hackish call in the Blender module. Possibility of better ways should be discussed on bf-python. 2) adds BPY Object.copyNLA(otherob) - that was simple 'cause the copy_nla function was nicely in kernel nla.c. 3) Object.convertActionToStrip(), here it gets tricky: the function to convert the active action of an object to a NLA strip was buried inside the respective function in the GUI editnla.c which had also code for reading mouse coordinates and whatnot. So I took the actual copying out of it and moved it to the kernel nla.c as a new function, bActionStrip *convert_action_to_strip (Object *ob). that code used other functions, of which find_stridechannel() was also in editnla.c but free of UI code so i moved it to kernel too. kept things with UI code in editnla.c. tried to be careful with keeping mallocs and the pointer business intact, and tested that this works and after usage Blender gives no memory warnings or anything, so seems ok - but certainly is best reviewed by ppl more active with c coding than me. hopefully this little refactor makes it possible to add this function to the menus too, which was not straightforward earlier when Matt took a look at it. 2006-02-08 16:58:12 +00:00
0b1cf0a01f Add the WITH_OPENEXR to sconscript. I needed this for toni's latest SceneRender stuff to work. Strange that it worked ok on his computer without this. 2006-02-07 19:04:24 +00:00
3fe6fca3f6 additions to make the orange rendering preparation script work, sorry undocumented again (we are testing this now and gotta commit to get this to other compus at studio, Stivs make a note to bug me about the doc or someone add it.. :o) 2006-02-07 18:33:01 +00:00
680756393a - Header changes to support hdaudio, memcache limitor and framecount boost. 2006-02-05 19:36:32 +00:00
Ken Hughes
ccedf6d833 ==Python API==
Bugfix #3849: "break" instead of "continue" caused memory corruption in
faces.extend() if an edge was given in the middle of parameter list.
2006-02-05 19:15:58 +00:00
Ken Hughes
8c333c63a4 Previous commit broke faces.extend() and edges.extend() for single edges
and faces.
2006-02-05 15:43:47 +00:00
e66b5e5cd5 UV Editor Tweaks:
- Set local sticky in the uv editor as default.
- Don't do live unwrap on fully selected charts or charts with no pins
  selected.
- Fixed bug with live unwrap not respecting transform cancel in some cases.
- "View Home" didn't work without an image.
- Move UV Calculation settings (cube size, cylinder radius, ..) into the scene
  toolsettings, instead of global variables
- Remove the name LSCM from the UI (and python docs on seams), and replace it
  with 'Unwrap', with upcoming ABF this didn't make sense anymore.
- Move the Old/New LSCM switch into the UV Calculation panel. New LSCM is the
  default now. Also renamed LSCM there to "Conformal".
- Made some room in the UV Calculation panel by removing the buttons to execute
  the UV calculation, only leaving the settings.

Fill Holes:

- LSCM now has an option to fill holes in the chart before unwrapping. This on
  by default, and enables two things:
  - Prevent internal overlaps (e.g. eyes, mouth) for LSCM unwrapping.
  - Allow the internal boundaries to move freely during stretch minimize.
- The possibility to switch it off is there because it is not always possible
  to define which the outer boundary is. For example with an open cylinder
  where there are two identical holes.
2006-02-05 14:12:45 +00:00
Ken Hughes
eb185d7032 ==Python API==
A couple of bug fixes and enhancements:
(1) Setting the UV attributes of a mesh face will create texture faces if
    they are not already defined.  Previously this threw an exception.
(2) Setting the image attribute of a mesh face will also set the TEX bit
    of the face.mode flag
(3) When "sticky" vertices are created with mesh.vertexUV, the color is
    set to white instead of black.
(4) Bugfix #3872: copying the mode attribute of one mesh to another would
    sometimes result in an exception due to unexpected bits being set. I
    still don't know how these other bits are being set, but this patch will
    stop the complaint if they are set.
2006-02-05 07:19:37 +00:00
Nathan Letwory
3bb82a27fc == SCons ==
* This commit is all of the rewrite work done on the SCons system. For
  documentation see doc/blender-scons.txt and doc/blender-scons-dev.txt.
  Also http://mediawiki.blender.org/index.php/BlenderDev/SconsRefactoring
  contains valuable information, along with what still needs to be done.

    - linux, os x and windows compile now.
    - files are compiled to BF_INSTALLDIR (see config/(platform)-config.py)
        - NOTE: Jean-Luc P will commit sometime during the weekend proper
          appit() for OS X. For now, copy the resulting binary to an
          existing .app bundle.
    - features:
        - cleaner structure for better maintenance
        - cleaner output during compile
        - better handling of build options
        - general overall speed increase
        - see the wiki for more info

  Cygwin, FreeBSD and Solaris systems still need work. For these systems:
    1) copy a config/(platform)-config.py to ie. config/cygwin-config.py
    2) set the proper defaults for your platform
    3) mail me at jesterking at letwory dot net with you configuration. if
       you need any modifications to the system, do send a patch, too.

  I'll be giving first-aid today and tomorrow, after that it'll be all
  regular development work :)

  /Nathan
2006-02-04 14:15:10 +00:00
1db5c23716 More work on render stuff!
- Scene support in RenderLayers
You now can indicate in Compositor to use RenderLayer(s) from other scenes.
Use the new dropdown menu in the "Render Result" node. It will change the
title of the node to indicate that.

The other Scenes are rendered fully separate, creating own databases (and
octrees) after the current scene was finished. They use their own render
settings, with as exception the render output size (and optional border).
This makes the option an interesting memory saver and speedup.

Also note that the render-results of other scenes are kept in memory while
you work. So, after a render, you can tweak all composit effects.

- Render Stats
Added an 'info string' to stats, printed in renderwindow header. It gives
info now on steps "creating database", "shadow buffers", and "octree".

- Bug fixes

Added redraw event for Image window, when using compositor render.

Text objects were not rendered using background render (probably a bug
since depsgraph was added)

Dropdown buttons in Node editor were not refreshed after usage

Sometimes render window did not open, this due to wrong check for 'esc'.

Removed option that renders view-layers on F12, with mouse in 3d window.
Not only was it confusing, it's now more efficient with the Preview Panel,
which does this nicely.
2006-02-04 13:28:50 +00:00
afb5a2acf5 yet another temporary strange but straightforward hack for a script at orange to work! that is: while Joseph is working on the actual Constraint API for bones etc., this allows our armature script to set influences with a simple call: armatureobject.setConstraintInfluenceForBone(bonename, constraintname, influence); fails silently at failure ('cause the c calls used do and no retvals are checked) and is in the strange place (as the current api is largely not object level) but works for us for now (e.g. next few weeks). 2006-02-01 22:21:46 +00:00
Ken Hughes
1b0ad97f46 ==Python API===
Minor typo fixes for Object API.
2006-01-31 22:18:07 +00:00
240e25ab65 Cleanup of blender/ module; Makefiles now compile this warning free.
Mostly was unused variables, unused functions, missing prototypes and
missing include files.
2006-01-28 20:17:48 +00:00
Chris Want
c8b48e70e6 Final merge of HEAD (bf-blender) into the orange branch.
Here are my notes on things to look out for as potential problem
spots:

source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.

source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()

source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)

source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.

source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless

source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)

source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.
2006-01-28 16:35:18 +00:00
no-author
e8afec9f9a This commit was manufactured by cvs2svn to create branch 'orange'. 2006-01-26 22:47:31 +00:00
Chris Want
164a7929ce Not a show stopper, and does not add or remove any functionality
... but a pythoner forgot to do a cast, causing an error with an
anally retentive compiler.
2006-01-24 17:23:01 +00:00
042d612df2 Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:

Render:
- Full cleanup of render code, removing *all* globals and bad level calls
  all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
  default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
  tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.

Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
  easier use of movies in Blender

PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
  code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)

3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
  (pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
  rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!

Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
  with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
  done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
  window. (yes, output nodes to render-result, and to files, is on the list!)

The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
  system should be built from scratch. I can't really understand this code...
  I expect it is not much needed, especially with advanced layer/passes
  control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
  recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
  effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
  to check first the option to render to a Image window, so Blender can become
  a true single-window application. :)
  For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again

OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
Ken Hughes
6e1db67cc0 ===Python API===
Bugfix: Hos discovered that recent fixes broke mesh.verts.extend(); it now
accepts three floats again.  Sorry....
2006-01-21 06:21:03 +00:00
Ken Hughes
0fcfd5bd40 ===Python API===
Bugfix #3660:  NMesh.getVertexInfluences() was broken following the changes
to the armature system.  Tron Thomas (kudos) came up with a fix that seems
to perform identically to the old method.  I'm also adding it to the Mesh
module for compatibility.
2006-01-19 15:48:56 +00:00
Ken Hughes
a8cb639f0b ==Python API==
Bugfix #3761: Attempting to set mesh.faceUV=1 when a mesh has no faces
now throws a RuntimeError exception.  Previous behavior was to do nothing.
2006-01-18 06:15:17 +00:00
cf5570c45b ==python api==
epyDoc for insertShapeKey
2006-01-17 16:32:09 +00:00
75aa68e821 ==python api==
clarification of Blender.Mesh.Mode() tip
2006-01-17 09:20:37 +00:00
427b132ad0 ==python api==
patch from jean-michel soler (jms) - .insertShapeKey()

Python API, a function to insert a shape key in an object . It works on Mesh, Lattice curve ans surface .
Example of use :

import Blender
OBJECT=Blender.Object.GetSelected()[0]
OBJECT.insertShapeKey()

a docstring to follow soon
2006-01-17 06:47:48 +00:00
Ken Hughes
aeffb121c8 ==Python API==
Added Mesh.Modes() function, which allows scripts to get/set the selection
mode settings for meshes.  This was necessary in order for the mesh tools
such as triangulate, remove doubles, etc., to work properly.
2006-01-17 06:18:43 +00:00
Ken Hughes
cfdf71bc5c Patches submitted by Michael Reimpell to get/set relative key selection, and
to get the current value of the IPO shape key.  There are still some issues
to discuss as to whether methods/attributes should be used and what they
should be named, but this will (or should) be addressed in the upcoming API
rewrite.
2006-01-17 06:12:53 +00:00
Stephen Swaney
14cc1192a3 clean up some warnings in bpy code 2006-01-16 17:55:03 +00:00
7d536502f8 *fixes global redefinitions
- added some extern keywords
2006-01-16 16:34:08 +00:00
bb9cadbb77 BPython:
- minor: added missing theme options (bone_solid, bone_pose, strip,
strip_select) to Blender.Window.Theme and also updated accordingly
(version info) the script that saves themes as scripts and the module's
doc.
2006-01-16 03:51:32 +00:00
Ken Hughes
df3fd052dd Fixed Window.Editmode(0) so that it only calls undo_push_mesh() when
U.undosteps is nonzero.  Also added optional parameter to avoid pushing
undo info alltogether if desired.
2006-01-16 02:06:02 +00:00
Ken Hughes
4f916b3081 Removed printfs in setPoints(), add proper exception handling. 2006-01-15 17:14:58 +00:00
Ken Hughes
e35f73cd00 Bugfix #3731: User reported that cyclic IPO curves reported the wrong value
in the BPy API for the "end point".  It was a minunderstanding of what
happens with cyclic Ipos, but we updated the documentation to make this
clearer in the future.
2006-01-14 22:05:16 +00:00
Stephen Swaney
148134205f fix previously fixed error msg. 2006-01-14 19:05:33 +00:00
Stephen Swaney
adcef46599 Object.Get( name ) was throwing an AttributeError.
Change to throw more correct ValueError when name
is not found as per IRC discussion
2006-01-14 02:13:15 +00:00
Ken Hughes
c18db96f56 Cam Barton discovered the setter for me.faces[i].col was missing. 2006-01-13 17:22:53 +00:00
144e3f827d * [ #3746 ] Calling getPose on a mesh object generates "RuntimeError: Pose - Error: PyPose_FromPose: Internal Error Ocurred"
- added returns where appropriate.
2006-01-13 16:19:11 +00:00
1a4c31442f *head/tail addition
- forgot to add the ability to get pose head/tail positions
- no setters (yet) as they are calculated
2006-01-13 15:53:22 +00:00
2aa6d4fc11 *bone.children fix
- fixes bone.children to return direct bone children
- added bone.getAllChildren() to allow previous behavior
2006-01-13 15:27:23 +00:00
Ken Hughes
5951b4dda7 Another bug fix for reference counting in extend methods. 2006-01-13 07:11:30 +00:00
Stephen Swaney
dea1ac52b4 bugfix: #3738 Armature bones returns none instead of key error
BonesDict was returning None instead of throwing a KeyError
when key not found.
Also fixed a few compile warnings about struct initialization.
2006-01-12 21:21:41 +00:00
Ken Hughes
6ded7d67d1 Clean-up of some reference counting issues with delete() methods. Also
further relax the input types for edge.extend() and face.extend() so that
single lists or tuples are accepted without errors.
2006-01-12 07:51:19 +00:00
150d36e4da BPy: Mathutils fix: bug #3737
Vector.resize4D() didn't put 1 in the 4th component (the scale factor), as it did in 2.37.
While this is more "correct", it is much less usefull. Also, matrix.resize4x4 puts a 1 there too,
so might as well revert and be consistent.
2006-01-12 01:11:42 +00:00
81f42b491a Scons fix:
new BPy Pose files weren't added to Sconscript
2006-01-12 00:07:08 +00:00
468dd24cd5 remove Constraint.h since it doesn't exist.
Provided by Letterrip.

Kent
2006-01-11 21:58:37 +00:00
f41c1f1c73 Forgot the pose file.... :p 2006-01-11 20:48:46 +00:00