Commit Graph

779 Commits

Author SHA1 Message Date
Campbell Barton
99857e40e3 some PLY files dont have faces, made these import without raising an error. 2007-01-11 02:09:45 +00:00
Tom Musgrove
20413f17bb = dxf update =
update by the script author - may have killed some changes cambo did to the previous version but the layout of the script is too significantly different to merge them.
2007-01-10 11:37:19 +00:00
Campbell Barton
4b9051501f forgot to remove when I changed the name. 2007-01-09 16:58:39 +00:00
Campbell Barton
e2da632f8f ply export patch 5576 applied with parts rewritten.
BPyMesh getMeshFromObject bugfix in some cases non mesh object types could be a problem.
2007-01-09 16:01:38 +00:00
Campbell Barton
9065f0b55a Made skinning between 2 open edge loops work better 2007-01-09 09:24:20 +00:00
Campbell Barton
ca97ede0cd fixes spelling of filename.
Window.c was calling undo_push_mesh, even for non mesh objects, exiting editmode would crash for any non mesh object (found with the armature symmetry script), bad juju.
2007-01-09 05:28:37 +00:00
Campbell Barton
d01374b4d0 image_auto_layout update to use new UV coords, bugfix #5624 thenaks (fredz)
added some text to mesh_boneweight_copy
2007-01-09 00:36:42 +00:00
Martin Poirier
eb3d720bd9 === Transform Snapping ===
Snap/Grid icon button in 3D view header (edit mesh). FIXME NOTICE: make nice looking icons (yes, that's for you Matt)
When snap is on, a drop down appears for the target method (closest, median, center)

Hotkey to toggle snap is Shift-Tab (this was previously used for a not totally equivalent to Tab. Ton said OK to scrap it). That hotkey is currently restricted to edit mesh (where snap is currently restricted).

Changed a couple of ugliness on how snap settings are stored.
2007-01-07 19:33:00 +00:00
Campbell Barton
713f42dc3c Metaball - docs were wrong
Sound - needed t ohave the PyType as extern
3ds_export can now export derived objects (dupli's)
2007-01-07 15:33:28 +00:00
Campbell Barton
95a202322d made python 2.3 compat again. 2007-01-07 07:33:40 +00:00
Campbell Barton
0306a86d94 bugfix, would make bow-tie faces when skinning more then 2 loops.
big speedup to loop detection
added support for skinning open loops (could be improved, dosnt work that well when open loops have different vert counts)
speedup elsewhere with LC's
2007-01-05 16:41:04 +00:00
Campbell Barton
330efd46fa standard set of minor improvements, tho this is a good script and not much to change.
faster dict/list operations.
use layer flags ratehr then lists.
2007-01-05 03:49:54 +00:00
Tom Musgrove
85c2a0a9b7 = mdd import update =
changed menu location from animation menu to import menu
2007-01-05 01:45:54 +00:00
Tom Musgrove
aaf91787c2 = mdd export update =
changed menu location from animation menu to export menu
2007-01-05 01:42:19 +00:00
Tom Musgrove
e586ec7bcd ==dxf import script ==
script for DXF import by kitsu (Ed Blake) - provide superior import to our native DXF import for many files
2007-01-05 00:51:12 +00:00
Campbell Barton
d26d0e2889 Update to JMSs scripts fixed bug 5419.
Optimized 3ds_export.py
  newstyle classes and fixed an error where objects with no material would fail to export.
2007-01-04 20:44:33 +00:00
Campbell Barton
eb424ec18d 3ds_export now exports Texface UV images to 3ds's materials - supports material images as well
3ds_import - made it support image maps without a file chunk. unlikely but possible.
2007-01-04 15:20:28 +00:00
Campbell Barton
7cacb35845 toolbox.c - for the label in VarStruct use the tooltip for the text to get around the 15 char limit that only allowed you to fill about half of the available area on the clever numbuts panel,
the tip isnt used for a label anyway. added comments explaining whats going on. only effects clever numbuts internaly.

type fixes for weightpaint_envelope_assign.py
2007-01-04 11:43:13 +00:00
Campbell Barton
50edac630b removed blender2cal3d.py, this is the second time where nobody has been able to maintain this script to fix minor bugs, aparently the cal3d/soya guys maintain their own scripts anyhow.
Adding switchDirection() for curNurbs. simple function and double checked to make sure its ok.
2007-01-04 10:18:37 +00:00
Campbell Barton
6d5b24fcb8 bugfix for #5167 images are now exported from the material, (todo - texface) thanks to digiboy
Also found that the exported UV coords were scrambled, now fixed.
2007-01-04 05:59:23 +00:00
Kent Mein
7356ede09c I commited a dumb little icon for Sculpt mode since we didn't have anything.
If anyone has anything better feel free to blow this one away.
I was going for a chunk of marble and a chisel if anyone is going wtf?

Kent
2007-01-03 21:12:56 +00:00
Campbell Barton
426cc6dca3 weightpaint_envelope_assign - was making an error checking a null vgroup
API_intro - changed URL from elysuin
others - added __copy__() docs.
2007-01-02 13:12:23 +00:00
Willian Padovani Germano
91b2bc5c23 Python API:
-Added missing access to Node win theme (thanks Mickaël Le-bihan for pointing) and also options group and group_active.
-Added Node space to Window.Types dict.
-Tiny update to the save theme script version numbers (keeping 2.42 for now to avoid popups, but should change to 2.43 right before release).

BTW: Happy New Year everyone :).
2006-12-30 18:28:49 +00:00
Campbell Barton
98f607e127 use new edge/face keys ittributes 2006-12-30 09:40:05 +00:00
Campbell Barton
5af67129f8 * theme save script now saves iconThemes and supports string types.
* added .iconTheme variable
* bugfix. drawType was not being saved because Py_BuildValue and __members__ was missing an "s"
* added Blender.Get('icondir')
2006-12-30 07:32:58 +00:00
Joseph Eagar
4763c3817b =IDProperties Python Test GUI Script update=
Another stupid little coding mistake, made switching
idblock types (like from object to scene) crash the
script.
2006-12-29 21:17:57 +00:00
Campbell Barton
60544bb7cc JMS's latest SVG importer with his compatibility fixes and optimizations.
http://blenderartists.org/forum/showthread.php?t=66207
2006-12-29 11:09:29 +00:00
Campbell Barton
9ca61ba44d Scene.c - deprecation warning for getScene
bvh_import.py - use old slow method of adding keyframes. setting IPO's was having problems.
2006-12-29 08:57:33 +00:00
Campbell Barton
37c42e2949 adding this script that takes 3 clicks to set the selected faces projections.
Will try to add visual guides to make this easier to understand before release.

http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Click_project_from_face
2006-12-29 00:25:56 +00:00
Campbell Barton
c95eda7a8b added a call to mesh calcNormals so smooth faces look right 2006-12-28 22:56:24 +00:00
Campbell Barton
2feea3dcc3 made scn.objects more flexible... you can now things like...
scn.objects.selected = [] # deselect all
scn.objects.selected = scn.objects # select all
scn.objects.context = [ob1, ob2...]

Added epydoc examples and updates importer scripts to use this de-select-all method.
2006-12-28 11:09:36 +00:00
Campbell Barton
de04849752 mesh skin was flipping the skin between 2 loops because of an error in AngleBetweenVecs python function that always returned 180d 2006-12-28 06:51:44 +00:00
Campbell Barton
ab06e52343 Mech cleanup use new edge_keys
continual script stuff, minor stuff..

fix for bad return in group.
Added back group.objects.append/remove but print deprectaed warning. also some epydoc changes.
2006-12-28 05:00:35 +00:00
Campbell Barton
7b93fff204 Added a function to BPyMesh - getFaceLoopEdges(faces, seams=[])
returns all face loops as a list of their edge keys

Used this in uvcalc_follow_active_coords to speed it from 5.53sec to 0.098 on a 1000 face mesh.
2006-12-27 15:21:34 +00:00
Campbell Barton
84f60b19c8 weightpaint_clean, option to clean all vgroups
weightpaint_envelope_assign - can update active vgroup only
weightpaint_normalize - fixups
BKE_plugin_types - made the max length 32 ratehr then 16 so you can fill the text space in pupBlock
2006-12-27 09:31:28 +00:00
Campbell Barton
470f91b506 object_cookie_cutter - use edge keys
widgetwizard - made a mistake in last commit, works and also dosnt creash with bug.
https://projects.blender.org/tracker/index.php?func=detail&aid=5289&group_id=9&atid=125
Can others test so we can close?

Object_join was messing up object usercounts
2006-12-26 01:45:58 +00:00
Campbell Barton
8f010d2a58 mesh_skin updated to use ed.key, other minor cleanups.
updated the url in other scripts
2006-12-25 23:14:48 +00:00
Campbell Barton
604defd8f2 somehow pasted some text by mistake that raised an error. 2006-12-25 10:53:00 +00:00
Campbell Barton
859b7f207e modified scripts from using older/depricated Python API commands, deprecated scn.getChildren() in the docs. 2006-12-25 09:17:23 +00:00
Campbell Barton
7816c3ca07 adding this script that makes surrounding quads follow the mapping of the active face.
Added a new mode that generaly gives better results. "Loop Average" -
It gives good results for mapping roads that are more then just 1 quad wide.
Thanks LucidMonkey for pointing this out.

See the bottom of these docs.
http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Follow_active_quads
2006-12-23 10:42:34 +00:00
Campbell Barton
ea837b25e3 Added Draw.BeginAlign(), Draw.EndAlign()
added align to a few scripts where it looks nice.
2006-12-23 00:56:40 +00:00
Campbell Barton
9197b25490 removed typo from Render
added extFromFormat to BPyRender to get the extension for a format
2006-12-22 07:07:20 +00:00
Campbell Barton
60ebff78ab rewrote this script, it was the most out of date script and had some errors that are solved in the new script.
- moved to the weightpaint menu
- Use a group for envelope objects, no special names.
- Can use non mesh data for envalopes (anything that can be converted into a mesh - metaballs, text, surface)
- Dosnt rely on applying loc/size/rot for it to work properly
- Uses a good point-inside-mesh method (optimized with mesh and face bounding checks)
- uses Mesh instead of NMesh

todo, only update active vgroup
2006-12-22 00:19:45 +00:00
Campbell Barton
b3eb2d19a9 fix for bevel center as pointed out of the forums 2006-12-21 22:13:14 +00:00
Campbell Barton
0325ee8f22 boxpack2d - python 2.3 compat fix, thanks brecht
gen_utils - needed to include BKE_library.h
off_import - use ed.key
2006-12-21 21:56:11 +00:00
Campbell Barton
04fc326371 Updated to use face.edge_keys,
fixed problem with merging islands not detecting an island in an island (wrong offset)
better island merging from user input
2006-12-21 04:20:07 +00:00
Joseph Eagar
6acadfe982 =IDProperties Python Test GUI Script update=
Stupid typo in script, you couldn't go into
a subgroup if it was the first property in 
the list.

Also, name collision code needed a little work.
This could result in overwriting properties
with the New button, which should instead
work as the rest of blender and add .XXX
to the name.
2006-12-17 01:08:47 +00:00
Joseph Eagar
36bfa35b9e =IDProperties Python update=
Added a test gui script for ID Properties.  To use,
just select ID Property Browser from the help menu.
You can browse, create and edit ID Properties
for several library block types.  Should be
fairly straightforward to use.

This is a test gui script; once an actual ID property
gui is implemented in blender it will be removed.  It
is *not* going to be in the release, obviously, so once
the real gui is implemented this script will be removed.
Also, this being a testing non-release script it seems to me
to be okay to add it without all the proper review stuff.  If
not, I can remove it.

I believe a test script is really, really needed to properly
test/review id properties, so I feel this is worth it.
2006-12-17 00:51:07 +00:00
Campbell Barton
08e3f8b1da Use ed.key and face.edge_keys to build connectivity data faster. 2006-12-17 00:08:05 +00:00
Campbell Barton
711a1f8686 made editmode select grouped work with mixed selections - can show select grouped items for vert/edges/faces all at once.
bad comment in Axiscopy and spelling fix in export_obj
2006-12-16 10:39:08 +00:00
Campbell Barton
827cce172c update to Axiscopy, more error checking. basic functionality the same.
- Dont allow it to apply the matrix twice to a linked-dupe. (Same as Apply Loc/Size/Rot)
- Make sure that the source object is active, not just the first selected object.
- Use Mesh instead of NMesh.
- use mesh.transform(mat) rather then vert by vert vec*mat

Other scripts had pupBlock changes for better layout.
2006-12-15 22:14:33 +00:00
Campbell Barton
0369f08299 made the hax height of the clever_numbers 8 rather then 5, was wrapping on too many scripts.
bvh import was having errors on joints with no animation.
typo in uvcopy from my previous commit.
2006-12-15 20:22:59 +00:00
Campbell Barton
65d5b47a10 removing uvcalc_from_adjacent for review on Sunday's meeting.
image_dump2path is a stopgap util. We need to look into making Pack/Unpack use filenames, not IDnames. or have some other datamanagement utility.
2006-12-15 09:25:57 +00:00
Campbell Barton
e4340d1b58 Shift flips the current axis your draging.
uv's and mocified vertex coords are now in a big list rather then stored be faces, should be faster
2006-12-15 04:49:06 +00:00
Campbell Barton
0254065f3b Updated, optimizations and cleanup.
* accurate mouse to mapping using ray intersect,
* right clicking cancels and returns original coords

Doc is here
http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Click_project_from_face
2006-12-15 04:14:09 +00:00
Campbell Barton
f631c2d49e new Uv-Calculation tool,
Click project, a nifty 3 click way to use a face to set a projection aurientation and then 2 more clicks for the U and V scales
with realtime updating as you move the mouse
should be faster then using view project all the time because you dont have to line the view up with the faces.
2006-12-14 19:36:37 +00:00
Campbell Barton
b995593eee faster sorting syntax in python, try/except for py 2.3 backwards compat
ls.sort(key = lambda v: v.foo)
rather then
  ls.sort(lambda a,b: cmp(a.foo, b.foo))
2006-12-14 14:53:32 +00:00
Campbell Barton
3a739d9bd2 fixed mouseViewRay in BPyWindow, was not applying the objects matrix to the mouse direction correctly.
VCol and Weight gradient work again.
2006-12-14 09:56:56 +00:00
Campbell Barton
c5fba51131 object_apply_def - use new BPy Object API funcs, no error in localview
off_export - minor changes
uv_archimap - cleanup. slightly slower but less duplicate code
uv_from_adjacent - nothing

BPY_menus - renamed py slot UvCalculation to UVCalculation to be consistant
2006-12-14 03:43:02 +00:00
Campbell Barton
824f391c75 mesh_edges2curves - edge key optimize and made use of scn.objects rather then Object.New()..
Object.py - passIndex mistake
2006-12-12 21:38:04 +00:00
Campbell Barton
09e4fa8f6a simple change, made
Changed...
  me = NMesh.GetRaw(ob.data.name)
To
  me = NMesh.GetRaw(ob.getData(name_only=1))

The line above converts the entire mesh to a python thick wrapper just to get its name, then only to that that same mesh again??
A lot of older scripts did this but theres no reason to do it.

in most (all?) cases..
  me = ob.data - should be ok, but theres a subtle difference and I dont want to break anything.

xfig_export, xsi_export and videoscape_export need error checking too.
2006-12-12 10:38:43 +00:00
Campbell Barton
848d3ae617 popup error if the active objects datatype cant have keys as well as other cases where it would quit,
use Mesh rather then NMesh to get the keyblock, enable restrictRender for driver objects.
2006-12-12 08:05:08 +00:00
Campbell Barton
6959e689be added many checks to uvcopy so it dosnt raise errors.
Minor changes to radiosity_export, updated to work with the new API (vertexColors MTFace)
obdatacopier - was getting the selection but not using it. made it ignore some read only properties.
BPyMesh - minor change: use face iterator rather then making a tuple()
2006-12-12 07:28:20 +00:00
Campbell Barton
8063417de5 bevel_center.py - avoid 2 python errors. (doing recursive before bevel, now UI prevents this)
console.py - if the scriptdir didnt exist it would do an error, now just ignore and dont try to do the console_autoexec.py stuff
doc_browser.py - If you typed in an invalid module it would give an error and exit, now have a message instead.
2006-12-12 05:29:42 +00:00
Campbell Barton
e22feb7d6e made the script work with no images, redraw when done and some optimizations. 2006-12-12 04:34:35 +00:00
Campbell Barton
97b6a65c74 Added a new Python slot "UvCalculate", moved Archimap and "UVs from adjacent" into it.
Removed 1/2 1/4 1/8 uv mapping options.
made re-evaluating the py-scripts dir use the wait cursor (could take a while at times)
2006-12-12 04:18:45 +00:00
Campbell Barton
5841ba740a dont remove dummy 0 index verts to workaround me.verts.delete([...]) being buggy (since tface > mtface conversion) 2006-12-11 23:03:14 +00:00
Campbell Barton
9c3cacd283 added the flag group_exclusive to material
added restrictDraw/Select/Render to objects in python
updated group and scene docs for last commit
made 3ds import use new scn.objects rather then Object.New() - (removed import as instance for now)
fixes off import error from this report http://blenderartists.org/forum/showthread.php?t=84182
2006-12-11 08:57:39 +00:00
Ton Roosendaal
00becf015b Preview.blend: made lightgroup "Override" for all lamps, to allow
lightgroups to be ignored in preview render.
2006-12-08 18:38:37 +00:00
Campbell Barton
d9c68666f3 Adding a function that gets a list of polylines from a curve object
curve2vecs(ob, WORLDSPACE= True):
'''
Takes a curve object and returns a list of vec lists (polylines)
one list per curve

This is usefull as a way to get a polyline per curve
so as not to have to deal with the spline types directly
'''
2006-12-07 15:22:55 +00:00
Campbell Barton
93e920aea9 UV islands are now detected by edge connection (was using verts) - added support for seams to delimit UV islands. 2006-12-02 09:44:40 +00:00
Campbell Barton
4b982acf17 Made work with new vertex colors 2006-11-30 21:32:32 +00:00
Campbell Barton
0d5a152094 request from malefico - select faces based on there weight in the active group.
Access from the face select menu
2006-11-28 21:26:00 +00:00
Campbell Barton
a314527e20 when importing am OBJ referencing an unknown image (PSD in linux for eg) - it creates a dummy image.
checking the .depth of this dummy image raised an error. now a check for has_data is done.
2006-11-27 23:59:53 +00:00
Joseph Eagar
7101e76d9c =md2_export.py small fix=
There was an integer division error in md2_export.py,
where values were getting clamped to either 0 or 1.
Fixed it by putting the appropriate vars in float().

Reported by deltab on IRC.
2006-11-27 01:05:44 +00:00
Campbell Barton
703647d08b previous commit to fix this script with VCols didnt work, should be ok now. 2006-11-26 23:47:53 +00:00
Campbell Barton
b36bafe524 removing image bake scripts to make room for Ton's built in baking stuff. 2006-11-26 19:08:19 +00:00
Campbell Barton
d2c482115e minor change so other scripts can call image_edit.edit_extern(img) to edit an image in the gimp, photoshop etc. 2006-11-26 18:40:04 +00:00
Ed Halley
8292e4ac1a Was crashing the import_obj script when using Python 2.3.
Python 2.4+ supports large list processing with generators, but
Python 2.3 will break if you use that syntax.  Until we depend on
the newer versions, I have commented out the generator syntax and
only use the list-comprehension type instead.
2006-11-25 17:34:57 +00:00
Campbell Barton
909cb06dfe modified to support new vcol operation (separate from tface)
updated name and tooltip
minor fixes
2006-11-24 07:35:53 +00:00
Ken Hughes
7b9fac49f5 Bugfix #5289: "Shape Wizard Widget" script was using non-existant key:
changed so "Key 0" is substituted for "Basis".  This may not be correct...
Also, fix to make ob.setEuler() accept a tuple again.
2006-11-23 00:28:09 +00:00
Chris Want
0b0c8c9244 =Texture Plugins=
Added a callback instance_init() so that any particular instance of a
texture plugin can initialize data. Updated the clouds2 and tile example
plugins to have a (dummy) call back.
2006-11-22 15:53:46 +00:00
Matt Ebb
a317ef6828 * The raw blenderbuttons image (note, I've updated interface_icons.c to now use the extra space on the right side of this image, since we'd run out of room) 2006-11-20 05:14:37 +00:00
Chris Want
27c42ee062 A fix for an indentation error, and better handling of faces with
images when materials are defined for the face (i.e., only use
the image as a texture in this case if 'Texface' is selected
for the material).
2006-11-17 16:11:03 +00:00
Campbell Barton
a84f60a3bd fixed error that was caused by 2 vertex loops center being 0.0 distance apart, also made the python 2.3 syntax default. 2006-11-15 21:12:53 +00:00
Matt Ebb
2e55867c23 Woops, I think I committed some wrong versions of the *nix icons the first time,
trying again now.
2006-11-15 03:43:47 +00:00
Matt Ebb
0597e17710 Tweaked the makefile build system to copy the new freedesktop icons
into an icons folder in the release package on linux, freebsd and openbsd
when doing 'make release'.
2006-11-14 04:29:04 +00:00
Matt Ebb
56b11f6e48 Added a great new set of Linux Blender icons, conforming to the
freedesktop.org standard.

Many thanks to Jakub Steiner, who created these!
( http://jimmac.musichall.cz/weblog.php/Artwork/WarOnBlobs.php )
2006-11-14 04:16:05 +00:00
Martin Poirier
51fa185ec5 == Script: UV Export ==
* SVG export support (thanks to Jarod's patch in the tracker)
* Faster tga export (from Jarod's patch too)
* Fixes from the review thread and the wiki:
** No longer adds the extension (tga or svg) if already there
** Adds the object name in between the filename and extension (and not after the extension if it was already present)
** Renamed options here and there.
2006-11-14 00:56:46 +00:00
Campbell Barton
26ef99157e made mesh.getFromObject() accept a python object as well as the object name.
accepting the name only was causing big problems when exporting library data, because duplicate names are possible the wrong data was exporting.
2006-11-13 17:37:01 +00:00
Chris Want
05c59da48f Fix for bug #4922
The VRML97 exporter was rounding a lot of stuff to three decimal points.
This is silly, since the spec says single-precision floats are used for
most things, which gives about 7 decimal points precision.
2006-11-11 19:12:43 +00:00
Campbell Barton
daec99c470 new image names were being created with 2 ..'s
added a function to BPyMesh.py to get faces in linked groups (like split by loose parts) - but returns lists of faces only.
2006-11-10 02:23:30 +00:00
Ton Roosendaal
10a4b1ad8b Patch #4743, Stephane Soppera
gamma.c plugin (sequencer) now supports float rects.
2006-11-06 18:37:26 +00:00
Campbell Barton
2dcf23c327 added Jiri as a contributer to the obj importer
Added a new script - 'Dump All Images to Path'

This script copies all the images used by 1 blend to a spesified path and references the new images from Blender
Usefull for moving projects between computers or when you reference many images. naming collisions and multiple images using the same image path are delt with properly only creating new image names when needed.

Blender images will reference the newly copied files - So be mindfull when you save your blend after running the script.

Notes, images with the path "Untitled will be ignored"

Image path collisions are managed by enumerating the path names so images will never be overwritten at the target path.
2006-11-03 20:04:56 +00:00
Campbell Barton
5ee546f053 added batch import back in - Hold shift as you click import 2006-11-02 17:42:30 +00:00
Campbell Barton
0dbac3ab69 attempt to make zero area faces result in NAN or INF loc verts happen less. 2006-11-02 00:13:38 +00:00
Campbell Barton
55d1618990 check for devide by zero error 2006-10-30 16:01:38 +00:00
Campbell Barton
8177125b0f An arg was left in that should have been removed, raised an error for reflect MTL files. 2006-10-29 19:56:52 +00:00
Campbell Barton
9b7125fafc added the option to rename objects to their DupGroups name. 2006-10-25 01:32:46 +00:00
Campbell Barton
23eb8b7a1f added the option to poly reduce all visible selected objects 2006-10-21 19:38:42 +00:00
Campbell Barton
a43bfad9e5 removed this script since Briggs ported it to C 2006-10-20 00:17:34 +00:00
Campbell Barton
1730b7b41d Fix from Bob Holcomb, some materials could be floating point value, I have only had this from Cararra generated 3ds files. 2006-10-19 21:56:11 +00:00
Campbell Barton
7a88ffd922 fix for [ #5093 ] OBJ importer gives errors on usage
extending a list was using a python 2.4 compatible syntax but failed with 2.3
2006-10-13 05:48:50 +00:00
Matt Ebb
39b2fda676 * Added the bfont TTF itself, along with the source of my changes for lighter
file size, and license.
2006-10-12 03:10:14 +00:00
Campbell Barton
de3c54569d BPyRender sets renderlayers right now
Object groups were get/set without user counts changeing.
2006-10-11 10:33:34 +00:00
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
Campbell Barton
19f3550eab Mostly finished work on bvh import.
before funky stuff like IPO bezier curve fitting etc are added.

* Fixed problem with zero length bones being removed.
* Sped up import by writing to ipo curves rather then inserting keyframes
* detect linear rate of change and ommit unneeded ipo points.
* cleanup
2006-08-01 18:28:42 +00:00
Campbell Barton
4e261039a9 Adding back bvh2arm.py - There is a problem when working with BVH files (small but noticable rotation error)
but aparently its still usefull for empties and Jean assures me the bug will be fixed.
2006-08-01 08:20:19 +00:00
Campbell Barton
6bc2ada6fc Made all the scripts use the file browser for saving images
Added better docscrings

Added a texture baker for procedural textures,

Its able to make a WYSIWYG image from the texture, by using the texmesh property, so texture coords arnt lost up when flattening the mesh.

Use a high res image not to see any seams
2006-07-31 15:22:20 +00:00
Campbell Barton
6a48654cce Added a octree implimentation for doing fast locational vertex lookups. 2006-07-31 13:28:00 +00:00
Campbell Barton
876885df45 rewrote bvh import to be modular,
BVHs can now be imported as armatures pose animations as well as empties.
2006-07-31 09:12:18 +00:00
Campbell Barton
6ca1c28837 Cleaned up and made a bit more efficient.
Now multiplys with existing colors.
2006-07-30 12:28:20 +00:00
Campbell Barton
96b2c0912d Fixed some logical errors and improved skinning method some more. 2006-07-30 05:48:28 +00:00
Campbell Barton
acbc574534 problem reported with making aeroplane wings,
attempted to fix the filling logic, was 50% now is 80% -  not quite up to snuff still.
2006-07-29 19:32:07 +00:00
Campbell Barton
0672038093 Fixed a bug in obj_import
would load faces
f 0 1 2 \
  3 4 5

but not
f 0 1 2\
  3 4 5

Updated JMS's hotkeys script
2006-07-29 17:22:56 +00:00
Campbell Barton
d56de7edb7 Mostly fixed archimap issue where "fill holes" - island filling would hang ths script.
Some optimizations and Ctrl will escape the script properly if you want to skip merging the islands.

Thanks to Melchior FRANZ for the report and debug blend
2006-07-29 12:21:38 +00:00
Campbell Barton
792114e476 removed image_bake_from_uvs and replaced it with a module that does all the work and 4 scripts accessable from the UV/Image menu.
- bake wire
- bake image
- bake vcol
- bake normals

Fitting all the options for these into 1 PupBlock was not good.

An example of 4 different baking made from these scripts

http://members.iinet.net.au/~cpbarton/temp.png
2006-07-29 07:14:11 +00:00
Campbell Barton
9054a81eb2 Big speedup, 2-3x, from better mesh importing. 2006-07-28 19:09:09 +00:00
Campbell Barton
cb86998653 removing this uv relax python script until it has better all round results. 2006-07-28 09:57:50 +00:00
Campbell Barton
92e9a88996 fixed stupid error in flt_import (only allowed 15 materials, not 16)
added an option to Bake From UV's - Selected Faces Only
2006-07-28 09:27:11 +00:00
Campbell Barton
093bc78783 fixed flt_import problem adding materials to the mesh, made untextured faces not go pink.
removed mesh_bbrush, Not worth maintaining anymore with recent developments.
2006-07-28 08:59:44 +00:00
Campbell Barton
a7a3285235 Much needed update to flt_import.py
* NMesh to Mesh
* Optimized vertex importing
* Import NGons properly and make them blender FGons
* lots of other small updates

image_bake_from_uvs - ignore meshes without faceUV's
2006-07-28 08:17:04 +00:00
Campbell Barton
f6ddf8a3c3 removed kloputils, was too old/broken/messy to maintain- functionality needs to be split into a number of scripts.
bvh2arm was for importing empties in a BVH, direct bvh armature import should be good for next release. and Iv removed the Old bvh importer anyway.

Will add a slot in the imaeg meny for image scripts, renamed scripts to go there.
2006-07-28 02:38:02 +00:00
Campbell Barton
aa90678154 renamed texture baker to "Bake Image from UVs"
Added options to use material colors (can be multiplied with vcol)
Added wire option for UV Export type functionality. (implys no bleeding)
Added Option to render with no oversampling
changed alpha blending
2006-07-28 02:08:36 +00:00
Campbell Barton
3d0f27c19d uv_vcol_to_image.py
Added optional support for baking more then 1 unique mesh objects at once.
2006-07-27 17:29:34 +00:00
Campbell Barton
671a7b8e49 Moved this importer to the Mesh module and dropped meshtools dep's
Now imports ngons as fgons and dosent mess up with '#' comments at the start of the file.
2006-07-27 14:17:15 +00:00
Campbell Barton
3f5e14abef updated py scripts for changes in mathutils 2006-07-27 03:15:37 +00:00
Campbell Barton
6a087fcb8b 10-20% speedup with better logic and limit the cache size for box intersections. 2006-07-26 17:43:16 +00:00
Campbell Barton
0740e4ab1c removed the now unneeded resize4d operation for instant 2.43 incompatability. :/ 2006-07-26 12:54:54 +00:00
Campbell Barton
f36fc4fe21 removed reload,
BPyRender accedentaly left the scene rather then removing it.
2006-07-26 11:39:32 +00:00
Campbell Barton
fd281bec04 rewrote this script, for the new bones api.
Use a best fit mirror location to match pairs rather then bone names only.
Location matching works well, but name matching method can be added in also if its needed.
2006-07-26 11:12:29 +00:00
Campbell Barton
c03179c9b3 Added a script that makes an image from vertex colors using UV coords. the advantage this has over other existing scripts is that it bleeds the colors from edge polygons so you dont get mipmapping errors.
usefull for baking radiosity back into an image (with non overlapping UV's) and also has an option for including the texface image, and using normals (instead of colors)

Added BPyRender with a utility function to render off an ortho image from a number of objects.
2006-07-26 02:07:12 +00:00
Campbell Barton
1bf883b799 Added the option for all objects to have their UV's packed into the same texture space, enabled by default. 2006-07-26 01:30:21 +00:00
Campbell Barton
c4429fb796 Added a note in the object docs about object data and editmode
removed mirror_bone_weights, as it was a double another script, contacted the author and hes ok with it.
2006-07-26 00:41:52 +00:00
Campbell Barton
e7263b0c66 removed unused unzip function from console.py,
replaced   x,y,z= tuple(Vec)  with  x,y,z= Vec
2006-07-26 00:30:31 +00:00
Campbell Barton
6234c25678 This script randomizes the selected objects loc/size/rot a set ammount. 2006-07-26 00:20:55 +00:00
Ton Roosendaal
26013bb2ab Bumped version to 2.42a for release target. 2006-07-23 15:09:42 +00:00
Peter Schlaile
873d46aeac == Sequencer plugins ==
applied bugfix by Stephane Soppera, removing two warnings and declaring
pointers explicitly as unsigned char*. (has worked without it, since the
compiler flags declare all (char*) in blender to be unsigned...)
2006-07-20 13:15:28 +00:00
Chris Want
6122d501e7 Converting a mesh object with modifiers to a temporary mesh during
export would cause a problem since the temporary meshes created
would often reuse the same name for many objects. This fix mangles
the object name and uses this for the temporary mesh name to avoid
this problem. (The naming is important, since vrml has 'DEF' and 'USE'
statements that are used like C macros, so if two meshes have the
same name the exporter will try to 'recycle' data to keep file sizes
low).
2006-07-19 13:05:11 +00:00
Campbell Barton
38b6f07251 fixed error that mode this script not work in python 2.3 2006-07-18 10:20:43 +00:00
Campbell Barton
13e4883b96 Bugfix only for a queer bug that occurs (in non of my previous tests) where an edge is added with the same verts- an invalid edge of course. 2006-07-16 13:54:33 +00:00
Ton Roosendaal
5ee3d1da10 The mother of all commits! Bumping version up to 2.42, and new splash. 2006-07-13 16:53:52 +00:00
Campbell Barton
f1eed11ad7 Missing constant added. 2006-07-13 13:41:26 +00:00
Campbell Barton
cfeaf8dfdf Simplified some parts of this script 2006-07-12 12:36:19 +00:00
Campbell Barton
b7e534f412 error it pup block title, still had clean meshes. 2006-07-12 12:09:43 +00:00
Willian Padovani Germano
d6ef293851 Scripts:
- Updating Blender Lip Synchro to the newest version sent by the author,
Benoit Foucque (Dienben). Thanks!

I'm committing a version with a few minor (tested) changes to make it
easier and to fix a small problem, the author received the changes a few
days ago. He would try to send another update implementing a couple
suggestions, but it may not come in time, so better have this. Anyway,
interested users can check his blog for test files and more information:

http://blenderlipsynchro.blogspot.com/
2006-07-12 10:21:38 +00:00
Campbell Barton
6d972220ac rename and update to archimap.
Mainly syntax optimizations and cleaned up parts.
2006-07-12 09:55:09 +00:00
Campbell Barton
0d9002354f Fixed many small errors in this script.
This is a real mess and should be removed/re-written but until we have a nice clean alignment script and its close to release, have to keep it.
2006-07-11 17:59:23 +00:00
Campbell Barton
893a36408c This shold fix 3ds opening on macs. thx blendix 2006-07-11 13:30:57 +00:00
Campbell Barton
5f761a4707 mesh cleanup optimized with some LC's
renameobjectbyblock - made more readable, only operate on objects in the current scene. optimized dict usage.
2006-07-10 10:46:53 +00:00
Campbell Barton
309fb2ec26 removed a script I wrote and added it under a different name.
Moved from NMesh to Mesh and optimized.
2006-07-10 09:22:07 +00:00