Commit Graph

53000 Commits

Author SHA1 Message Date
Ton Roosendaal
f6a6ad5688 New render feature:
If you define multiple RenderLayers with different view-layers, these
view-layers are rendered entirely, not looking at the faces that are
invisible. This allows layered composite, but only when geometry does
not intersect or overlap partially.

This new Renderlayer option "All Z values" will fill in the Z of not
visible faces (in the Scene view-layers) as well, which then allows
masking out as if these faces were set to Material option "Env".

Here's an example composite to show the effect:

Two cubes, in view-layers 1 and 2, and rendered in 2 RenderLayers:
http://www.blender.org/bf/all_z0.jpg

Same scene, but with both RenderLayers set to "All Z values":
http://www.blender.org/bf/all_z.jpg
2006-09-24 09:21:04 +00:00
Campbell Barton
e8495d1fdd Extra generic errors for Scene, Groups and Metaballs to raise errors when trying to do anything with a python objects thats had its data removed in Blender.
Added to existing scn.objects
scn.objects.active    (get/set the active object for the scene)

scn.objects.selected    - an iterator that only uses selected objects
scn.objects.context    - an iterator on objects in the user context (visible in the current 3d views layer and selected)
These are the same type as scn.objects but .add() .remove() .new() .active etc raise errors. so scn.objects.selected.add() will raise an error.

Made nested loops possible with scn.objects, metaball.elements and ob.modifiers, by initializing the iter value as NULL and creating copys of the pyobject when _getIter() is called if ->iter is not NULL.
This is how pythons xrange() works.
2006-09-24 08:30:38 +00:00
Geoffrey Bantle
e136fe0acb -> Adjustable Tolerance for Knife Vertex Cutting
Previously had Vertex snapping in knife tool adjustable by the 'threshold'
value in the 'Mesh Tools' panel. This was actually a misunderstanding on
my part of a user request (oops). What was really needed was to make the
sensitivity of intersection code for vertex cutting adjustable. Vertex Snap
is now set at same tolerance as vertex selection.
2006-09-24 05:14:29 +00:00
Campbell Barton
d728cd1a52 new read only object property to be used for the collada exporter
ob.parentType and a constant dict Blender.Object.ParentTypes
2006-09-23 15:07:03 +00:00
Roland Hess
3c8fe64910 This commit adds backwards compatability for the new floor constraint
feature. Old files that had "sticky" set would not show "sticky" under
the new system. Not that anyone ever actually used "sticky".

Also, these commits only add support for rotated external target objects,
not target bones inside the same armature.
2006-09-22 16:42:39 +00:00
Roland Hess
4725ca6c02 This commit adds local target rotation support to the floor constraint,
making it much more useful. Requested and taunted for frequently by
Plumiferos folks. Click on "Use Rot" to take target object rotations
into account.

Good for using rotated empties, etc., as a sloped floor.
2006-09-22 15:57:58 +00:00
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