Commit Graph

524 Commits

Author SHA1 Message Date
Campbell Barton
27dc45ba24 BPyRender.imageFromObjectsOrtho's now sets all layers visible,
an error in Scene.c - scn.Layers disallowd all layer bits to be set.

made image_billboard.py rotate all images to be verticle for more efficient packing, added the option not to pack resulting images into 1.
2006-10-09 04:29:24 +00:00
Campbell Barton
74f2727a9e Adding a new script. heres the docstring.
________________________
Render Billboard Script
This can texture a simple billboard mesh from any number of selected objects.

Renders objects in the selection to quad faces on the active mesh.

Usage
* Light your model or enable the shadless flag so it is visible
* Make a low poly mesh out of quads with 90d corners. (this will be you billboard mesh)
* Select the model and any lamps that light it
* Select the billboard mesh so that it is active
* Run this script, Adjust settings such as image size or oversampling.
* Select a place to save the PNG image.
* Once the script has finished running return to the 3d view by pressing Shift+F5
* To see the newly applied textures change the drawtype to 'Textured Solid'
2006-10-08 17:05:57 +00:00
Campbell Barton
29daa64095 removed unusued vars from Geometry.c
uv_archimap still had python based line intersect

added plane2matrix function to BPyMathutils
added an optional arg to imageFromObjectsOrtho - camera_matrix
camera_matrix can be used to define a plane in 3d space where X and Y scale is used to set the width and height of the area to render.
2006-10-08 10:51:38 +00:00
Campbell Barton
30d207e650 Added python func Blender.Geometry.LineIntersect2D(v1,v2,v3,v4)
updated archimap and cookie cutter to use it, removed python version from BPyMathutils
archimap island merging is noticibly faster
2006-10-07 04:56:36 +00:00
Campbell Barton
fe50037f7e images wernt being applied to textures on import
added alpha support for material and texface. so teh faces transp mode is set as well as the Alpha and ztransp settings for the material
2006-10-05 11:15:22 +00:00
Campbell Barton
dac52bc6e1 Slw_sl fixed start/end frame export 2006-10-05 06:44:27 +00:00
Campbell Barton
55d49ffda3 pup block was being called too late and frames were not being set on export 2006-10-05 05:59:03 +00:00
Campbell Barton
3dddba4e06 updated to use some of the new additions to vector and minor speedups,
removed edge margin option (uv island margin should be enough)
2006-10-03 16:46:02 +00:00
Campbell Barton
323cc790fa added a BPyObject.py with 1 function- getDerivedObjects, gets all dupliObjects and can optionaly get a mesh generated from the objects particles.
export obj can now export duplis and particles as well as faster face exporting and other small cleanups/speedups.
2006-10-01 14:02:51 +00:00
Campbell Barton
22ce0faffe export matrix was wrong, cleanup import, more memory efficient and import the rest data to an unused key. 2006-09-28 04:45:08 +00:00
Campbell Barton
ad51edd3bf Adding MDD import and export from patch 4969 with modifications, (import and export rvks, MDD is from lightwave AFAIK)
Added Mesh .key .removeAllKeys() and .insertKey() for MDD support (was using NMesh just for keys before)
Since this is aparently an experemental feature in NMesh we may want to change this.
2006-09-27 16:33:02 +00:00
Campbell Barton
e6251f6ae7 removed .parent by mistake in Object.c
made some of the importers raise a nice error if a file disnt exist rather then a python error. will eventually apply to all.
2006-09-26 04:39:46 +00:00
Campbell Barton
65895ba6bd corrected image doc mistake - image.makeCurrent()
BPyRender.imageFromObjectsOrtho() returns an image

Made all image bake scripts ask before overwriting a file. as well as displaying the newly created image once its rendered.
2006-09-25 19:35:43 +00:00
Campbell Barton
4437c27091 forgot to add 'island margin' - so you can have a gap around each island so they dont bleed ento eachother once baked into a texture. 2006-09-25 16:37:37 +00:00
Campbell Barton
a3e3025663 Optimized merging uv islands when packing by testing only intersections of boundry uv edges.
updated to use more recent changes to the bpython api and some other cleanups.
2006-09-25 16:24:07 +00:00
Matt Ebb
2e7aa1dbf5 * Proportional edit mode 'random' falloff
This is another proportional edit falloff that slightly randomises the
influence. It's not strictly random, it's blended with linear falloff so that
it's a bit smoother. The nice thing is that it works with all transforms, axis
locking etc, including the special ones like to sphere, shrink/fatten/etc. It
can be used for all sorts of things like roughening surfaces. I most recently
used it to add a bit of randomness to the folds of some cloth. I
made a short demo video here: http://mke3.net/blender/etc/prop_random-h264.mov

Also included nicer icons for the falloff types.
2006-09-25 05:15:19 +00:00
Campbell Barton
7fce181d11 BPyMessages - added "Save over" message for scripts to use, so as not to overwrite files.
import_obj - comments, docstring additions, cleanup.

OBJ export: -renamed export_obj
 faster edge exporting (use edges LOOSE flag rather then finding zero face user edges)
 check for file before overwriting
 use object iterators
2006-09-25 05:12:37 +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
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
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
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
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
Campbell Barton
cfc9e31f04 fixed error fix in obj import mesh splitting. 2006-09-09 13:44:27 +00:00
Campbell Barton
1b6cf3e6ee Enabled threads for rendering. 2006-09-08 16:41:35 +00:00
Campbell Barton
c5fe47fc96 Script that bakes procedural textures into an image.
uses TexMesh to get the same values as rendered procedural textures.
2006-09-08 15:28:33 +00:00
Campbell Barton
352d8cd02d removed inverted and normalized from py scripts 2006-09-07 14:15:10 +00:00
Campbell Barton
f17e9a6cb9 resolved invalid bounding box from the object by freeing a new meshes bounding box.
added back bound box constraint to obj import (many OBJs have values outside the defulat clipping range)

BPyRender.py was missing a flag assignment.
2006-09-05 06:45:39 +00:00
Tom Musgrove
289105bcd9 ==blender2cal3d update==
unneeded line in the script was keeping it from showing up in the menus
2006-09-04 21:33:02 +00:00
Campbell Barton
a2b0bca7f7 removing old obj importer 2006-09-04 04:25:24 +00:00
Campbell Barton
ebde667956 rewrite of the obj importer,
The original obj importer was ok but it gradually got slower
as it had to support quirks of rare files.

This importer supports these quirks without bad workarounds and ~250 less lines.

* Moved from NMesh to Mesh
* Import smooth groups as hard edges
* Import Lines from sketchup (Thanks Wavk)
* Uses less memory
* faster (On a 70meg poser test model, benchmarked from 130sec to 41.2sec)

Not yet supported from the old importer-
* Scaling down to a bounding area
* Importing multiple obj's at once
* Using existing materials in the .blend
* Importing as a group instance.
2006-09-04 04:23:55 +00:00
Campbell Barton
9eae6278fc Silly mistake, made adding edges raise an exception. 2006-08-29 23:05:13 +00:00
Campbell Barton
24a2e90f82 Improved tri to quad converting.
added include to poseobject.c
2006-08-29 09:43:38 +00:00
Campbell Barton
e10613c7f7 cleanup and some speedups with assigning materials 2006-08-25 18:05:05 +00:00
Campbell Barton
62b8cad660 simplified 3ds mesh importing by storing verts and faces in a list rather then a mesh, before making the final mesh
also make use of meshes faces.extend() indexList option- which means lots of checking can be removed.

indexList is not relyable at the moment so some files wont import but this will be fixed.
2006-08-25 09:10:06 +00:00
Chris Want
1f68dfb499 A mesh from the Blender python Mesh module can sometimes have
a materials array with entries that are 'None'. Added some code
to check for this perverse situation.
2006-08-16 01:06:38 +00:00
Campbell Barton
3dce59a5df fixed a problem with UV coords and vert col's when reducing the mesh. 2006-08-15 06:12:55 +00:00
Campbell Barton
567f1bef14 Adding a cookie cutter that can cut multiple polyline meshes into multiple meshes into a mesh - allong the view axis.
leaving the faces inside the polyline selected.
UV's are maintained but not vertex colors at the moment.
2006-08-09 11:39:35 +00:00
Tom Musgrove
97e259a827 ==unweld script update==
spelling and grammatical changes..
2006-08-07 19:04:17 +00:00
Tom Musgrove
aaa7182aea ==unweld script update==
unweld script updated by JMS, brings script in line with the draft scripting guidelines thanks
2006-08-07 18:40:58 +00:00
Campbell Barton
531cd7c0fc Removed debug line added when testing for matrix memory leaks that messed up matrix.invert()
updated bvh import which was modified to account for that. as well as other minor changes.
2006-08-06 22:47:57 +00:00
Campbell Barton
e1828bbb63 added rotate 90d to obj export as default to match importer 2006-08-06 11:32:12 +00:00
Campbell Barton
0c748032a6 benchmark bvh output..
spellchecked/expanded comments in armature_symetry.py and tweaked functionality
2006-08-04 12:48:29 +00:00
Campbell Barton
4ae12081c0 found that the rotation order is as defined in the BVH file, store and apply the rotations in this order. 2006-08-04 08:53:28 +00:00
Kent Mein
454fceb5f5 Solaris was still using compress for make release.
Everyone else was using gzip.  On the latest downloads many of them
are using bzip2, (I think everyone using scons)
So I decided to update make release so that everyone is using
gzip2.  I don't mean to step on anyones toes, I know at least some of
the platform maintainers do not use make though so feel free to change
it back and or to something different for your platform.

While I was at it I also changed default path of OPENEXR to /usr on linux.
Was suggested on mailing list by Matt.
(I'm pretty sure the linux maintainer is using scons)

Kent
2006-08-03 10:48:20 +00:00
Campbell Barton
f9fb0cf9b0 Option to support non standard BVH files. (alternate rotation order) 2006-08-03 09:16:28 +00:00
Campbell Barton
1d05319e29 materials should render after import without having to enable texface. 2006-08-02 21:43:45 +00:00
Campbell Barton
7ec55d7a62 Made this script test 4 different collapse locations and use the one that results in the least error.
locations are: smart, middle, v1, and v2
where smart is an attempt to generate a loc that will collapse without loosing volume.

This can now collapse a subdivided cube properly.
2006-08-02 04:40:50 +00:00