Commit Graph

47594 Commits

Author SHA1 Message Date
Campbell Barton
3d3b64768d Mesh iterators (me.faces, me.edges, me.verts, face and edge iterator) store the iterator progress in the python object.
This made nested loops with the same python object mess up.
eg-
faces= me.faces
for f1 in faces:
  for f2 in faces:
    print f1.index,f2.index

This didnt work, fixed by initializing the iter value at -1, so any greater value will create a new BPyObject with its own iter value.
once iteration is finished, its set back to -1.

Also made face and edges iter value a char instead of an int to save some memory.
2006-09-22 10:08:41 +00:00
Campbell Barton
d82f1f5f91 from looking at patch 4934 made all user preference paths settable with Blender.Set('val', data), also added exception errors which were on the todo.
image.filename was being limited to FILE_MAXDIR rather then FILE_MAXDIR + FILE_MAXFILE when setting.
2006-09-21 18:25:40 +00:00
Campbell Barton
95c185c4c5 Setting the image name was raising an error. 2006-09-21 17:03:24 +00:00
Campbell Barton
3a77b352a4 one liner,
editmode select grouped, face area and perimeter comparing didnt work sometimes, simpler comparison that still scales well
2006-09-21 13:53:32 +00:00
Campbell Barton
78e1426835 removed warning in EXPP_setVec3Clamped 2006-09-20 17:30:47 +00:00
Campbell Barton
27848c8f08 order of case statement was messed up with previous commit. 2006-09-19 10:52:56 +00:00
Geoffrey Bantle
e7874b3ff0 ->Knife Midpoint and Vertex Cutting
Cutting through vertices and vertex snap was only supported in
'knife exact' mode. Now works for 'Knife Midpoint' as well.
(Multicut and vertex cutting would require N-Gons)
2006-09-19 00:08:09 +00:00
Ton Roosendaal
ab2c57a29d Maximum amount of keys in a ColorBand now is 32.
This is static array stuff... could be dynamic once.
2006-09-18 15:32:11 +00:00
Ton Roosendaal
8e7e7e209a Bugfix #4999 part 2
Sky texture mapping option "Sphere" or "Tube" map now correctly maps to
world space as well, so a camera orientation or mirroring works fine.
2006-09-18 12:53:52 +00:00
Geoffrey Bantle
a36377abd9 -> Extrude Vertex Groups
Small fix, extrude did not copy vertex weights.
2006-09-18 05:48:10 +00:00
Campbell Barton
66bc9589a5 Type in docs and element.quat was checking for a vector type. 2006-09-18 02:33:00 +00:00
Ton Roosendaal
b50a32ce9d Bugfix #4999
The Sky render option "Ang Map", which should support spherical probes,
was always in local camera view space, instead of world space.

Check this report, it has cool images!
http://projects.blender.org/tracker/index.php?func=detail&aid=4999&group_id=9&atid=125
2006-09-17 15:28:32 +00:00
Ton Roosendaal
0d4f5335bf Bugfix #4925
When using a particle system in a dupli-group, and the group is in the
current scene but not visible, the particles are calculated on wrong
position. This is the recurring trouble with particle calculating... which
doesn't do despgraph stuff.

This commit fixes the error, but it will still display particles *once*
(one draw) on the wrong location. That's a lag in the system I cannot
solve quickly...

Note that this system does work OK when you put the group in another Scene,
or linked from another file. That's what it was coded for...
2006-09-17 13:12:57 +00:00
Ton Roosendaal
3eb8262cb5 Patch #4995, bugfix #4985
Patch for this bug provided by Johannes Meng.
Here's his log:

When using the mouse wheel on an inverted 3d view (that is back, left or
bottom) the name display changed to front (right, top). Also when using
mouse wheel with modifier keys (strg/shift) on a normal view, it changed
the display to the inverted variant.
What I did was check the type of event that is handeled before
setting/unsetting V3D_OPP_DIRECTION_NAME. I simply added two if statements
and expanded the comment by a line explaining it a bit.
2006-09-17 11:45:38 +00:00
Ton Roosendaal
3147963237 Bugfix #4983
- Using NLA stride didn't work at all for Motion Blur render... appeared to
  be a typo even, using 'ctime' instead of 'stime'. :)
- When entering editmode on a striding Armature, the position of the
  armature was incorrect (missing depsgraph refresh)
- changes in constraint.c is just a small cleanup, unused 'ctime' arg.
2006-09-17 11:40:28 +00:00
Campbell Barton
5f21cab631 corected some mistakes in the metaball docs. 2006-09-17 08:36:43 +00:00
Campbell Barton
d89240ba12 added mesh_create_derived_view(ob) to DerivedMesh.c
exactly the same as mesh_create_derived_render(ob) except it uses the view modifier settings.

Added an optional arg to getFromObject to 'render' so you can choose to get the mesh displayed in the 3d view or generate one with render settings.
Solved bug 4612 getFromObject now works with soft body meshes (error was caused by getting the derived mesh from a copy of the object)

removed workaround for softbody bug in object_apply_def.py
2006-09-17 05:15:56 +00:00
Campbell Barton
e472a3d852 renamed Blender.Image.SetCurrent(img) to img.makeCurrent() to be consistant with scene.
applied patch #4998 (array count), as well as adding other array settings, updated documentation as well.
added EXPP_setVec3Clamped() as a way to set a vector from getset attrs (used with array offset and scale)
2006-09-17 02:31:16 +00:00
Ton Roosendaal
eaad4e4129 Render display fix:
When using "Border" render, and output to UV/Image window, the compositing
result was not drawn. I had to add a refresh for reading results...
2006-09-16 13:53:33 +00:00
Ton Roosendaal
a200194b8b Vertex Parent fix: it gives error if you select > 3 points now. 2006-09-16 13:28:06 +00:00
Ton Roosendaal
e0fcfdb395 Bugfix #4997
Small tweak in depsgraph usage of transform: to make sure recalc tags get
set in invisible objects (in other layers) as well. That way switching
layers won't give errors with child-objects not being in the correct place.
2006-09-16 13:06:09 +00:00
Ton Roosendaal
1ee5b263cc Bugfix #4994
Proportional editing sometimes failed to work by a missing initialization.
It was caused by the combination of having manipulators on, and saving the
file with an active Armature Object in PoseMode.
2006-09-16 12:03:35 +00:00
Andrea Weikert
a3c7ec277c FIX: [ #4713 ] 2.42: Crash when saving .blend file as an unpriveledged user
- applied bugfix patch [ #4945 ] from Alex Rainchik - many thanks
2006-09-16 11:58:38 +00:00
Andrea Weikert
5277232d42 FIX: [ #4944 ] Shift F4 menu folders are freezed
- code for adding 'c:\' on Windows missed fact that BLI_convertstringcode is also used for databrowse.
- now only replacing when path starts with '/', which isn't the case with databrowse
2006-09-16 11:42:37 +00:00
Ton Roosendaal
b150f25c36 Enabling vertex-parenting to a Lattice didn't take deformed Lattices in
account...
2006-09-16 10:46:53 +00:00
Campbell Barton
c7d39e1a06 New images were being initialized with zero users (normal for other data types),
but for images user counts work differently.
(just noticed this is what blender does so Image.New() now does the same)

Many of the sys functions had maximum path thengths that were too short.
  char path[FILE_MAXFILE];
rather then
  char path[FILE_MAXDIR + FILE_MAXFILE];
2006-09-16 10:05:57 +00:00
Campbell Barton
e6960f3881 Python Metaballs api refactor, based on Mesh and Group modules.
* removed get/set in favor of setsetattrs
* added an element iterator to the metaball data type.
* now accepts vectors and quat for location dimensions and rotation.
and other small changes.
Docs updated shortly at.
http://members.iinet.net.au/~cpbarton/ideasman/BPY_API/Metaball-module.html

other changes
typo in image.c
metaballs constants in buttons_editing
2006-09-16 09:33:09 +00:00
Campbell Barton
2b7f09b8ea added Image.SetCurrent(img) and img.has_data so you can see if an image contains pixel info. 2006-09-16 06:18:41 +00:00
Campbell Barton
9932322fa8 active metaball stiffness was not being limited to 10.0 as a maximum in the 3d properties panel (10000 instead).
added radius, and type menu to the 3d properties panel.
2006-09-16 04:26:22 +00:00
Campbell Barton
6dbf2ccf55 bug of mine fixed
didnt chech that a material existed before accessing it- crashed with null materials and mesh.getFromObject()
2006-09-15 14:52:59 +00:00
Ton Roosendaal
26520225ee Special request: Drawmode "bounding box" now supports drawing 'extra' too,
like axis or object name.
2006-09-14 12:40:53 +00:00
Ton Roosendaal
bcb16ea280 Patch #4970 (brecht)
Added: Scale node in Compositor.

- Only works for RGBA buffers now
- I have added an option "Relative" or "Absolute" scale. So you can also
  define actual pixels for scale. Values for scale are reset when you
  switch, to prevent too weird situations.
- Scaling wasn't foreseen to work with the preview-panel in UV window, this
  preview cropping only happens for Image and RenderResult nodes... actually
  should be done for the scale too. I wait with t hat though... this preview
  method isn't very advanced yet.
- The pass_on_compbuf() here crashed in tests with preview panel, that's
  weak code... I have to recode that. For time being I use the
  dupalloc_compbuf to have it stable.
2006-09-14 12:21:18 +00:00
Campbell Barton
6c73b506cb commented metaballs dna with Jiri's help. no code changes to actial code made. 2006-09-14 11:37:34 +00:00
Ton Roosendaal
6283b5523a New: added SHIFT+A "Add Action Strip" menu to NLA editor. This gives a menu
with choices of Actions to be added.
2006-09-14 08:23:38 +00:00
Ton Roosendaal
f0614ad811 New: (partial) Shape Key support for Lattices
- Panel with Shape keys now shows for lattice too
- Supports VGroup weight value for Shapes

NOTE: this doesn't support Shape editing with linked duplicates. The
modifier system for Lattices (as for Curve/Surface) has no local Object
storage, so linked duplicates will all show identical.
2006-09-14 08:13:09 +00:00
Brecht Van Lommel
737458d2f4 Bugfix: texture paint didn't work correct with modifiers. 2006-09-12 16:53:27 +00:00
Ken Hughes
e02e8b0c71 Bugfix #4979: unlinking mesh obdata which has shape keys was not decrementing
the IPO user reference count when the key's reference count reached zero.
2006-09-12 14:05:26 +00:00
Ton Roosendaal
d9ff064cf7 Menu to copy Shapes (Editmode Mesh, CTRL+C) now displays in columns 2006-09-12 10:39:22 +00:00
Ton Roosendaal
5c1e2c4e04 fixed typo collumn -> column 2006-09-12 10:29:04 +00:00
Ton Roosendaal
e8111bd39d Patch 4981 (Tom Musgrave, revised)
New option: "Select Collumn" in Action editor. This selects all 'keys' on
the same time, based on already existing selection. Works for Actions as
well as Shape Keys. Hotkey K.
2006-09-12 08:29:50 +00:00
Ken Hughes
c3b9a550a3 ===Python API===
Internal code clean-up: make M_Object_New use existing code instead of
duplicating the steps of object initialization/creation.
2006-09-11 17:55:52 +00:00
Campbell Barton
5e4728369a made getFromObject() use a dummy mesh, rather then making a copy of the mesh and then replacing its data with the displist mesh.
aside from avoiding unneeded memory alloc/dealloc and bing faster this works around a recently discovered bug with the user count of copied Mesh keys... causing getFromObejct leak memory when used with mesh keys.
It also fixes a bug where getFromObejct with fluid-sim would corrupt memory.
2006-09-11 07:05:29 +00:00
Ton Roosendaal
0a74ce2c5a Bugfix #4927
Render: Flares were not corrected yet for border render.
2006-09-10 10:35:28 +00:00
Ton Roosendaal
1b1204a171 Bugfix #4976
When using the "Load without UI" option, and having a textfile open in the
Text Editor with syntax coloring, Blender crashed. Just a missing NULL
check here.
2006-09-10 09:44:43 +00:00
Ton Roosendaal
e16ec89128 Bugfix #4973
Pose mode; the Nkey "Properties" panel, using TAB to move to next button
assigned wrong values to rotation.
2006-09-10 09:18:33 +00:00
Ken Hughes
276e63c3f1 Silence warning messages about ‘struct Scene’ declared inside parameter list. 2006-09-08 21:12:59 +00:00
Ken Hughes
f108325904 ===Python API===
Bugfix for #4971: Scene.unlink() was incorrectly decrementing the datablock
user count whenever an object was removed from a scene, instead of only when
the object's count reached 0.  The Python code was modified to use the
existing free_and_unlink_base() function (with some modifications to allow
specifying a scene).  Also fixed a bug with the undocumented return codes
from the method; it now returns True if the object was found in the scene.
2006-09-08 18:31:09 +00:00
Ton Roosendaal
be4e97911d New: vertex-parent support for Lattice.
Works like vertex-parent for Mesh and Curve/Surface. Select one or three
vertices in edit mode, and use CTRL+Select to select another object.
Then press CTRL+P.
2006-09-08 12:05:36 +00:00
Roland Hess
bffe5dd087 Fixes bug #4834. The function was supposed to return a list of vertex
indices that are within the passed group. If one of the indices was not
in the group, it returned an exception, as opposed to just removing it from
the group as the documentation states.
2006-09-08 11:32:01 +00:00
Ben Batt
824fbff02c Fix to enable copying of the vertex group field for the Curve, Lattice,
Armature and Hook modifiers, and the flag field for the Mirror modifier. These
modifiers should all be copied correctly now.

This fix also means that converting modifiers to mesh with Alt-C now works
correctly (the convertmenu function copies the modifers before applying them,
so it wasn't always giving correct results for the above modifiers before).

The convertmenu function has also been changed to use DM_to_mesh instead of
converting to DispListMesh and using displistmesh_to_mesh, which means that
extra mesh data such as dverts is preserved.
2006-09-08 01:05:57 +00:00