Commit Graph

7890 Commits

Author SHA1 Message Date
Alfredo de Greef
db7c3d3271 A possible problem was noted by Cyril Brulebois regarding copyright issues
with regards to the noise functions in yafray based on Ken Musgrave's
original code.
I had left the 'Copyright' notice in the comments, and according to
Cyril Brulebois this is a problem. In fact, from what I understand this
makes it even impossible to use or modify the code in other software.
But since it is not a verbatim copy of the code but rather based on Musgrave's
work, he suggested I change it to explicitely state that it is in fact
based on the code from the 'Texturing & Modeling' book.
And since the yafray code is in turn based on the blender code, I better
adapt the blender code too.

This reminded me that I also have forgotten to include the copyright notice
in the mersenne twister rng code I used for the Python Noise module.
This does clearly state to include the original notice with any resdistributed
code, in modified form or not. So I added that too.

I hope that solves the problems.
2006-09-25 04:54:45 +00:00
Matt Ebb
71284959d5 * Added backwards compat check for curve radius value, so old files act properly. 2006-09-25 03:22:54 +00:00
Matt Ebb
7639f0890a * Updated the auto-generated UV test image (Image Editor -> Image -> New). The
previous one was ok as a quick fix during orange and showed distortion obviously
but it was kind of extreme, and I'd rather not be blamed for causing blindness
or brain tumours because of it. This pattern is nicer, and still shows
distortion and its location on the map well.
2006-09-25 03:15:58 +00:00
Brecht Van Lommel
ef7200741b Basic pressure sensitivity support in imagepaint, for opacity, size,
falloff and spacing. Click the button labeled "P" next to the sliders.
Works best for opacity, other options can give poor quality strokes in
some cases. Also performance needs to be improved.

Remember, works only on X11 and Mac, no Windows support for tablets yet.
2006-09-24 19:29:25 +00:00
Campbell Barton
7f7f35d1ca fixed mistakes and warnings in previous commit. 2006-09-24 09:21:18 +00:00
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
a2ecfa8cc9 adding a script that copies material colors to vertex colors,
usefull when consolidating 3d models from formats that use many materials for different colors, into 1 object with fewer materials.
2006-09-21 01:36:09 +00:00
Campbell Barton
78e1426835 removed warning in EXPP_setVec3Clamped 2006-09-20 17:30:47 +00:00
Campbell Barton
2446288ad3 fix in MTL library loading, if none is spesified the same name as the OBJ is used. 2006-09-20 17:11:45 +00:00
Campbell Barton
ac160e56ae makes image paths relative even if the files referenced exist.
this functionality might be better in a seperate script.
2006-09-20 09:44:41 +00:00
Campbell Barton
360d7a1083 OBJ Import should now meet up to the python standards
http://mediawiki.blender.org/index.php/ScriptDev/Guidelines

* Recursive search was enabled by default, if your OBJ happened to be at root path, loading the OBJ could take ages. Made recursive searching optional.
* MAX's MTL exporter replaces spaces with underscores, image loading checks for this and loads the name with spaces if the one with underscores dosnt exist. not realy a problem with the importer but annoying to manually replace lots of images.
2006-09-20 05:03:53 +00:00
Campbell Barton
fd0628c6db Update and add a new script -
Makes the mesh solid by creating a second skin of a set width
works with UV's and Vertex col's but not weights at the moment.
2006-09-20 02:43:09 +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
Campbell Barton
7494a3c966 error in place holder creation function was making the image twice, effected 3ds and obj importers 2006-09-18 14:08:04 +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
Andrea Weikert
857f7a66fa ==== MSVC 7 project files ===
maintenance work:
- added missing files in blenkernel
- updated Bullet in extern
- Python: SurfNurb.c
- removed compile and dependency of PHY_Ode
- made blenderplayer compile again (had to add pthreads lib)
2006-09-17 17:55:57 +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
Jens Ole Wund
b71a05227a adding include pathes 2006-09-15 19:21:11 +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
Campbell Barton
cca79d086a changed the defaults for image edit. will open the image instantly with no options. hold shift for setting the application. 2006-09-15 10:21:25 +00:00