Commit Graph

26 Commits

Author SHA1 Message Date
Campbell Barton
231d29ccce Join as UVs.... (copies matching UVs to another object with the same topology)
nice that it uses foreach_get/set for fast array copying from python.

note: this is getting out of hand, we beed some central panel/interface for copying mesh data about - shapes, UVs weights etc. at the moment they are accessed from all different places.
2010-01-14 14:06:27 +00:00
Campbell Barton
08c9ecb3b0 RNA/Py API
change how data is added. eg.
 bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
 bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)


image and texture stil use add_* funcs
2010-01-09 23:44:01 +00:00
Campbell Barton
e292b5badc fix for crash when setting a shapekeys name in rna, (probably other properties too).
When the shapekey was returned from the object it didnt use the data's ID which is expected elsewhere in RNA.

Transfer shape now also sets the name.
2010-01-06 12:19:46 +00:00
Campbell Barton
bb2c074822 missing check for shape key 2010-01-06 11:21:57 +00:00
Campbell Barton
8177f343a0 - object.add_shape_key(name="Key", from_mix=True)
- ensure new shape key names are unique
- Transfer ShapeKey now can have its settings changes (redo operator)
2009-12-28 18:03:04 +00:00
Campbell Barton
351f5d1837 - loading missing files didnt give any warning
- shape key transfer poll function
2009-12-27 23:29:34 +00:00
Campbell Barton
0767cdd4a0 Transfer Shape Key
Useful if you have 2 different characters with the same base mesh (matching indicies), and want to copy a facial expression for eg, from one to another.
Durian request to re-use shapes between characters. 

* Copies the active shape to other selected objects
* Different methods to apply the shape
* * OFFSET, simple translation offset
* * RELATIVE (EDGE/FACE), Use Barycentric transformation to copy the shape. This means the target mesh can be a different orientation and scale and the shape should still apply since the surrounding geometry is used as a basis for the offset.

bug: barycentric transform's depth was inverted.

Note:
* This isnt added into a menu yet,
* This cant be redone since adding a shape key messes up the redo stack. needs fixing for other scripts too.
2009-12-27 11:14:06 +00:00
Campbell Barton
5f4e24d599 operator draw function working again. needed to add layout to the operator to give access to "self.layout" - like panels, headers and manu's have 2009-12-24 21:17:14 +00:00
Campbell Barton
bbe13e7823 * register operators like other classes
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24 19:50:43 +00:00
Campbell Barton
bb094b8655 key shortcits for sculpt back
- T was 'Flatten Brush', now Shift+T
- added an option to OBJECT_OT_subdivision_set to set the level relatively (so page up/down works), however RNA lets it set one level higher then the maximum, this seems displays OK in the 3D view so not sure whats going on here (as if there is always an extra hidden multires level).
2009-12-23 12:13:48 +00:00
Campbell Barton
5bdcb2dff2 py error fix and minor changes to rna info class 2009-12-21 23:14:16 +00:00
Campbell Barton
de7ffa1bac make subsurf keys - Ctrl+1,2,3,4, apply to all selected objects. not just the active ones 2009-12-18 23:17:23 +00:00
Brecht Van Lommel
7b70ec6b9d Fix #20356: ctrl+1/2/.. could set multires levels outside limits. 2009-12-14 14:08:04 +00:00
Campbell Barton
a1656300ba script for automating pep8 checks.
On ubuntu/debian install these tools...

   sudo apt-get install pylint pyflakes python-setuptools python-pip
   sudo pip install pep8

then run from blenders source dir...
   python release/test/pep8.py

This searches for the comments "# <pep8 compliant>" and "# <pep8-80 compliant>", running the checking tools on these scripts only.

* some minor pep8 corrections too.
2009-12-13 13:59:16 +00:00
Brecht Van Lommel
a321e2b139 Sculpt Branch:
Subdivision set with Ctrl+1-5 now works for multires as well.
2009-12-07 19:56:59 +00:00
Campbell Barton
764c4c94fa use sets rather then tuples for enum/flags so you can use bitfield operators 2009-12-07 02:20:55 +00:00
Campbell Barton
750764f411 rna flag PROP_ENUM_FLAG which makes rna props a tuple of enums when converted into a PyObject
only used by wm.invoke_props_popup() currently
2009-12-07 00:16:57 +00:00
Campbell Barton
5ebe54f470 pep8 edits and fix some warnings 2009-12-05 22:03:07 +00:00
Campbell Barton
6372c63ae9 select pattern for bones 2009-12-01 14:48:36 +00:00
Campbell Barton
dc1af66d8a - grease pencil drawing on the surface of objects (only when enable face snap & projection, a bit hidden I know)
- retopo operator to convert grease pencil drawn topology into geometry, not in the convert menu yet since its not quite finished, use the operator search menu for retopo. will test this week and see what needs fixing.
2009-11-30 01:13:46 +00:00
Campbell Barton
36cbf42e5d Draw function for operators (just like panels), used for the redo popup, file selector and redo tool panel.
Used for ply export & select pattern.
2009-11-29 01:49:22 +00:00
Campbell Barton
8b897879cd pep8 cleanup in ui and op dirs, added popup to select pattern 2009-11-28 23:37:56 +00:00
Campbell Barton
a2b370dd6f py/rna api
- object.modifiers.add()/remove()
- armature.edit_bones.active wasnt named correctly
2009-11-28 13:33:56 +00:00
Thomas Dinges
22f49ffe71 * Small Cleanup. 2009-11-27 18:55:59 +00:00
Campbell Barton
c3937c93d5 minor changes made before commit broke this script 2009-11-26 16:05:32 +00:00
Campbell Barton
64f552356a ctrl 1-5 for changing subsurf levels 2009-11-26 15:36:23 +00:00