Commit Graph

1039 Commits

Author SHA1 Message Date
ba13c4082b Added an example of using edge flags in the epydocs 2006-07-06 05:51:13 +00:00
1c9a7a032b fixed a bug in poly redux's vgroup weight merging (was reducing the weight each collapse by about half)
fixed some other UI logic in the python menu script
Added an option to use a vertex group for a reduction weight map to force reducing some areas more then others.

Mesh epydocs activeGroups can be None as well as string.
2006-07-05 20:37:07 +00:00
Ken Hughes
64d0d62ddd ===Python API===
Bugfix #4605: mball_to_mesh() doesn't create edges for new mesh, so
me.getFromObject() wouldn't display the new mesh until edit mode was entered.
Added a call to displistmesh_add_edges() to calculate them and then insert
into the new mesh.
2006-07-05 18:28:51 +00:00
cb8fa00a09 Added a note in mathutils about how line intersect works
getSBEnable was removed and replaced by isSB, docs needed to be updated.
2006-07-05 03:51:32 +00:00
Ken Hughes
e6f4bd6baf ===Python API===
Plumiferos request: added sceneRender.set attribute, which give access
to the Render "Set" link for scenes.  Always wondered what that button
was for.
2006-07-04 00:08:40 +00:00
da83509dca fixed an error in DECREF'ing a variable that could have been null, also gave more helpfull error messages, thanks Theeth 2006-07-03 05:27:29 +00:00
aaf05a1d20 Made geometrys polyfill work with all iterators (not just lists) and updated bpymeshes ngon to ignore polylines with <3 verts. 2006-07-02 23:09:37 +00:00
Ken Hughes
f000ce6fba ===Python API===
Bugfix: key curve names compared using strncmp instead of strcmp,
resulting in wrong comparisons.
2006-07-02 21:37:06 +00:00
df9c9e6caa === warnings cleanup ===
- removed obvious typo after #include
- put back include for using EXPP_check_sequence_consistency and EXPP_ReturnPyObjError
2006-07-02 18:59:40 +00:00
6adf0e6543 finish adding Geometry module, removed polyfill from mathutils, updated epydoc links and updated BPyMesh NGon function 2006-07-02 15:28:28 +00:00
156f2030fd Adding new geometry module, at the moment it only contains polyfill.. more commits to come, moving from mathutils. 2006-07-02 15:25:37 +00:00
f2d80ee097 wasnt decref'ing items I got from PySequence_GetItem for PolyFill or ob.join() fixed and tested, memory dosent increse when used in a large loop. 2006-07-02 10:37:24 +00:00
Stephen Swaney
1eb2724983 bugfix for #4533 Text3d.Get() fails in retrieving Text3d objects
The objects were returned properly, however the repr() method was
printing "" making it look like the Get() failed."
2006-07-01 16:59:10 +00:00
7809809e8a Added a scanfill wraper to Mathutils, allows you to fill polylines without using Meshes .fill() function.
Takes a list of polylines and returns a list of face index triplets.

Added this so using mesh.fill() could be avoided since it requires making an object, linking to the scene and cycling editmode for every NGon imported.
Since this is so close to release, It might be good if ken, willian or stivs takes a look at the function to make sure its ok. - Ran 100's of times for importing lightwave models but would be good to doublecheck.
2006-07-01 15:29:04 +00:00
2174b90307 added an example of getting the worldspace matrix of a bone 2006-07-01 12:03:44 +00:00
dc458265e3 There are a few BPy functions that are documented to return a list but actually return tuples.
Blender.sys.splitext() raises an error if the path is longer then 80 chars. seems a bit short, noted this anyhow end added an example.
(hope its okay to do small doc corrections as I notice them.)
2006-06-29 06:04:21 +00:00
7dc92c6b25 === warnings cleanup ===
added missing includes for undefined symbols in windows release build

warnings:
creator.c(490) : 'libtiff_init' undefined;
transform_manipulator.c(237) : 'EM_editselection_center' undefined;
src\transform_manipulator.c(241) : 'EM_editselection_normal' undefined;
transform_manipulator.c(242) : 'EM_editselection_plane' undefined;
\python\api2_2x\Object.c(3658) : 'get_local_bounds' undefined;
2006-06-28 17:46:46 +00:00
Ken Hughes
9ac6482f85 ===Python API===
Added reminder in addCurve() doc for how to determine valid Key IPO curve
names.
2006-06-28 17:27:07 +00:00
Ken Hughes
6d0b3bf2b7 Bugfix #4516: Allow ipo.addCurve() to create Key IPO curve for a
corresponding keyblock.
2006-06-28 17:13:39 +00:00
1937162af5 EpyDoc/Object: Added notes and updated the makeDisplayList example for new modifier stuff. 2006-06-28 04:53:19 +00:00
816ed68db5 BPython:
Bug #4484:

http://projects.blender.org/tracker/?func=detail&aid=4484&group_id=9&atid=125

A recent update to Draw.c made the button attr setter function not exit
where it should for one of the cases, when new and old strings had
same length (code was missing a "return 0;" line in one of the if
cases). Should work fine now, I don't get the error under linux anymore.
Also saw in the same function that a py object could be created but
was not being decref'ed in two other 'if' cases.

Thanks elbarto for reporting the bug.
2006-06-27 17:51:11 +00:00
be2c208077 Fixed a bug where face flags could not be set because of the faces existing flags.
A problem with the current flag seting in Mesh is that Mesh needs to know of all possible flags or setting a flag can raise an error from the faces own unrecognezed flag.
also stopped the active face flag raising an error so pythoners can do face1.flag |= face2.flag without checking for active face flags. if the flag is a part of the arg its removed quietly.
Checked Mesh flags, face modes and edge flags, should all be ok now.
2006-06-27 02:49:55 +00:00
d5246c43de Object_join Was raising exceptions about being in background mode when it wasnt, this seems to fix it. memory corruption is an unlikely resion because its the first check. 2006-06-26 04:26:51 +00:00
1e9ce63b40 Fixed a bug where loose edges would raise an error when the FGON value was unset.
also added LOOSE to the EdgeFlags dict.
2006-06-26 04:14:12 +00:00
a6fc975d49 join could crash blender in background mode or if the mesh was not in the current scene. added exceptions for both and notes in the EpyDocs. 2006-06-26 02:43:15 +00:00
4d061263a9 Draw.c fixed error in exception I added with string max length.
Window.py added note about the view offset being flipped.
editview.c Fly mode timed redraws so motion is the same speed erespective of scene complexity.
2006-06-23 23:58:50 +00:00
c435b0f5d7 And another syntax error for Python Noise api, this time a crasher even.
(Thanks Tim!)
2006-06-21 14:20:43 +00:00
fc98a121fc Bugfix #4396
(From Timothy) Python vNoise() function couldn't be used, had wrong check
for syntax.
2006-06-21 14:10:59 +00:00
447593d7b9 Enforced a limit of 399 (UI_MAX_DRAW_STR) for pythons button object. using larger strings would segfailt blender. 2006-06-20 18:31:05 +00:00
c8b6425f61 scaled comparison adjustment only effects editmode select group
documented a workaround for python drawinf pixel aligned text in teh 2d view
Added links from Draw.Test to the OpenGL functions that set the location and color.
2006-06-20 00:30:10 +00:00
03449818b3 Added a note about Draw.ColorPicker needed Draw.Register to have a non None event function. 2006-06-19 13:21:44 +00:00
2ca99a5e09 Scripts:
- Jean-Michel Soler updated the svg to obj module used by Paths
Importer (thanks!)
- user request: added option to control whether user prefers per face
(uv face select "TwoSided" toggle) or per mesh ("Double Sided") single /
double face info in ac3d exporter.

BPY:
- Blender_ShowHelp() was now crashing Blender when called for the
second time, due to EXPP_dict_set_item_str decrementing the reference
count of an object passed as argument to Blender_ShowHelp() (so not
owned by that function).
2006-06-18 19:05:51 +00:00
Ken Hughes
f478c9eca3 ===Python API===
Bugfix #4347: deleting vertex 0 incorrectly deleted all triangle face, since
check for v4==0 wasn't being done.
2006-06-17 14:08:15 +00:00
Ken Hughes
8400859f64 ===Python API===
Change to displayMode attribute to support the new render window options, and
correct description in the documentation.
2006-06-16 14:40:26 +00:00
Ken Hughes
4ed583ea8a ===Python API===
Moved .up() and .down() methods from Constraint API to Constraint sequence
API (also renamed them to moveUp() and moveDown() ).  Again, methods which
modify the "parent" structure didn't seem consistent.
2006-06-14 05:16:39 +00:00
Ken Hughes
da33f51b76 ===Python API===
Moved .up() and .down() methods from Modifier API to Modifier sequence
API (also renamed them to moveUp() and moveDown() ).  Locating methods
which modify the "parent" structure in objects didn't seem consistent.
2006-06-14 04:41:31 +00:00
b58998729b Last minute patch from Chris Want
Nkey "Properties Panel" now has Dimension ("Dim") buttons too.
This reads from the actual bounding box value to see the size. Note that
dimensions for animated & deformed objects will change per frame.

(Cleaned up buttons layout for patch, and added support for Curve, Text and
Surface objects)
2006-06-12 20:01:18 +00:00
bad72cec61 New feature! (Well, replacement for the exisiting cumbersome "DispView")
Next to the "DispWindow" there are now two new choices:

- Display render output to Image Editor
- Display render output to Screen-sized Image Editor

Both options won't open a 2nd window anymore, which makes work quite more
smooth even, especially because 'focus' isn't lost. Further it fits in the
'single window UI' paradigm of Blender. Should have been done 10 years ago!

Lastly it might bypass issues with X11... having 2 windows with opengl
context is not always stable in Linux.

This option uses an identical trick as for the Compositor viewer, using an
Image block with a fixed name ("Render Result").

The flow, when invoking a Render, goes as follows:
- first it checks if there's an Image Editor visible displaying the "Render
  Result", if so then it uses that area-window.
   (Use this option for dual-monitor setups for example, a render will always
   go to the same location then)
- else it checks if there's an Image Editor open in general, it then
  assigns that window the "Render Result" Image.
- else: it searches for the largest Area in the screen, and turns that into
  a temporal Image Editor showing render output.

After a render, an ESC will push back the former view, if the Area type has
changed.

Same rules apply for the "Full Screen" option. Here an ESC will always go
back to the regular Screen, and restore Area type if required.

While rendering, the queue for the renderwindow isn't handled yet, so you can
not zoom (nor get full redraws), as for the regular render window.

Existing conflicts:
- in FaceSelect mode, the Image editor enforces to display the face texture
  after rendering again.
- when using an Image window for compositing, you'll lose the Viewer output
  on a render.

Implementation note:
While rendering updates, nothing is drawn in frontbuffer anymore. That's
good news for b0rked OpenGL drivers (and faster). However, for the few
OpenGL cards that don't do a "swap copy" but a "swap exchange" you get
issues... has to be worked on. I'm afraid we have to drop frontbuffer
drawing altogether.

Other fixes:

- Hotkeys NumPad 1, 2, 4, 8 will set zoom levels (was half coded only?)
  Use SHIFT to zoom out (smaller).

- Rendering Tile updates still had draw errors on edges of tiles, in OSA
  only. (Caused by commit 4 days ago)
2006-06-12 14:39:08 +00:00
873e2eaae3 == Python Button Evaluation ==
Users can write any valid Python expression (that evals to an int or float) inside Blender's gui number buttons (preceded by #) and have them evaluated to their actual int or float value.

Button Evaluation has access to the same modules as PyDrivers.

For example:

#1.0*9-2.3
#ob("Camera").LocZ
#1.0/ob("Cube").LocX
#math.sin(math.pi) -- or simply #m.sin(m.pi)
etc
2006-06-12 00:10:00 +00:00
Ken Hughes
962c81208b ===Python API===
Removed recently added Material API methods getRbFriction() and
getRbRestitution().  Erwin had already added attributes rbFriction and
rbRestitution, and current API design goal is to eventualy replace
all getStuff()/setStuff() with attributes.
2006-06-11 15:35:40 +00:00
af3f454cd8 ==Sequencer==
Added patch by Matt Ebb, that enhances the sequencer GUI in several ways:
- It looks a lot better
- Strip colours are themeable.
- The drawing code is more readable.
- The background of the timeline makes now distinguishing the channels easier
  by alternating between different shades of gray.
- Handle-scaling is clamped to min and max-values, making it possible to
  grab strips at large zooming levels more easily.
- Preview-images can be panned by dragging it with the middle mouse button.
  Home-Key resets the position.
- Since some people can't grab the meaning of "C 0", it is renamed to "Chan: 0"
- Effect strips have slightly different colors to distinguish them better.

Additionally:
- fixed an off by one error in Matt's patch
- Scene-rendering saves CFRA to avoid jumping current-scene on scrub
  (might be academic fix, since most likely it only happens if you add
  the sequencer-scene to the timeline... But nevertheless it bugs you on
  testing the GUI ;-)
2006-06-08 19:05:58 +00:00
Ken Hughes
e77112f76b ===Python API===
added len() operator for MFaces, which returns number of MVerts.
2006-06-06 18:14:31 +00:00
721de110b2 Added Py_DECREF since PySequence_GetItem adds a reference where as PyTuple_GetItem borrows it.
Thank ken.
2006-06-06 17:28:39 +00:00
46329e5ab0 made it so a meshes uvsel could be set with any sequence, not just a tuple. 2006-06-06 17:04:00 +00:00
ce202f7540 Clicking on the arrows of a python float button did not change the value :/ - (Click step was zero) Fixed in Draw.c
Added a comment to interface.c on how a1 and a2 are used with float buttons.
Added an example to Draw.py epydocs of a script using a float button.
2006-06-05 01:23:56 +00:00
Ken Hughes
cc28a00d15 ===Python API===
Patch to add 'NoSpecular' to Lamp.Modes constant dict, submitted by Jonathan
Merritt.  Thanks!
2006-06-04 13:16:31 +00:00
6f44fc5c1a Added an option to OBJ import "As Instance" - so people can import all the objs objects into a new scene and have a group instanced in the current scene.
some extra details in Epydocs about how groups work.
2006-06-03 07:46:56 +00:00
a4817c518c added basic docs for rbFriction and rbRestitution 2006-06-02 23:26:41 +00:00
9c2707572a added friction and restitution for the Collada Physics export/import
See http://colladablender.illusoft.com
2006-06-02 20:59:29 +00:00
Ken Hughes
d631abe4fe ===Python API===
Define macros for Py_RETURN_TRUE and Py_RETURN_FALSE (for Python 2.3).  Also
make Py_RETURN_NONE macro a little safer.  Current macro will not work as
expected in situations like below since it expands to two C statements:

	if( !attr )
		Py_RETURN_NONE;
2006-06-02 19:42:09 +00:00