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
Guillermo S. Romero
648122b1a2
String fix and a bunch of PEP8 issues I had collected in the meanwhile.
2009-12-04 17:54:48 +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
Martin Poirier
20a2100a36
Add missing snap properties to transform operator.
...
This is used to force snap on and off when needed.
Also, when transform is not run modal, it will use default values for PET and snap properties (False) instead of scene settings. No need to force them off when calling transform with Exec.
2009-11-27 16:15:34 +00:00
Campbell Barton
994776811f
edge loop delete was using snap, making it not actually delete the edge loop
2009-11-27 15:15:03 +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
Campbell Barton
8e09171d5b
temp hack to make the popup show wider when running the edit description operator
2009-11-23 00:56:19 +00:00
Campbell Barton
caab05ec8c
rna UI api rename...
...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.
itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()
batch script used http://www.pasteall.org/9345
2009-11-23 00:27:30 +00:00
Campbell Barton
247f9cfc04
- add cloth button wasnt working because it was set to execute the operator.
...
- for adding an operator, start with a blank name and dont write the default one. (still writes each name you type in, will need to fix this properly)
- move the AddPresetBase class into presets.py since all the presets are defined there.
2009-11-22 13:15:21 +00:00
Campbell Barton
8b84cc2ab6
use context member rather then modifier name in presets
2009-11-22 11:33:44 +00:00
Thomas Dinges
02e99b9a43
* Minor cleanups.
...
* Added Cloth Presets. Patch by nudelZ. Thanks!
2009-11-22 10:32:37 +00:00
Campbell Barton
adb14a2247
remove template uiTemplate_view3d_select_faceselmenu
2009-11-22 10:02:32 +00:00
Campbell Barton
9e2ed89105
SSS presets, Thomas and I added these at the same time, however I meant to make this a more general system.
...
this commit shows how to add a preset using the base preset class and menu with minimal effort.
2009-11-22 00:22:29 +00:00
Campbell Barton
6db600dddc
moving this file back, sorry for the noise
2009-11-22 00:18:43 +00:00
Campbell Barton
d46e83e1c5
looks like we both added sss at once :) , removing since Im using the base class and a single presets file
2009-11-22 00:17:36 +00:00
Thomas Dinges
4f6b95480f
* Added Subsurface Scattering Presets.
...
Note: Add doesn't work, it writes some text into the file, not the values. (Maybe because the values are arrays?!)
Campbell, please check :)
2009-11-22 00:03:42 +00:00
Campbell Barton
1dfbf3a9f6
- aspectx wasnt saved in the render preset
...
- define a preset base class
- cleanup some comments and whitespace
2009-11-21 23:55:14 +00:00
Thomas Dinges
2351d1c4d3
* Some cleanup for recent preset commit.
...
* Minor align fix for Frame Rate Buttons.
2009-11-21 22:54:02 +00:00
Campbell Barton
5e7debcecf
render presets, select from a directory, button to add own presets
2009-11-21 21:39:20 +00:00
Campbell Barton
3119eaf284
- dir() now works for collection functions
...
- group.objects.link/unlink use exceptions rather then return values
- scene.add_object/remove_object --> scene.objects.link/unlink
2009-11-20 10:00:54 +00:00
Campbell Barton
e61c90e416
operators were copying the properties from the rna operator into the class instance.
...
however this meant the invoke function could not modify properties for exec to use (unless it called exec directly after)
since the popup for eg would re-instance the python class each time.
now use the operator properties directly through rna without an automatic copy.
now an operator attribute is accessed like this...
self.path --> self.properties.path
2009-11-19 17:12:08 +00:00
Campbell Barton
966b01665b
use number keys to set the current brush in paint modes
2009-11-17 16:04:17 +00:00
Campbell Barton
51f2dcd08c
- access console languages as modules rather then having the py operator call an operator
...
- workaround for __getattr__ existing for types that dont support it
2009-11-17 12:21:41 +00:00
Campbell Barton
7636d17af6
property editor for bone and object ID props, add/remove/edit
...
good example of how editing NON rna data results in very weired scripts :/
2009-11-16 22:53:28 +00:00
Campbell Barton
c2624e1a4f
fix for skinning uneven loops, fixed to use even edge removal currently
2009-11-13 19:18:17 +00:00
Campbell Barton
5a322bd67c
F8 reload works again, script errors are printed but dont stop loading every other script
2009-11-13 11:10:29 +00:00
Campbell Barton
0750a8dc5c
simple fix, still worked on my PC somehow
2009-11-09 09:16:16 +00:00
Campbell Barton
af011f33a6
use the cwd for the shell prompt, use subprocess.getstatusoutput rather then popen()
2009-11-08 12:35:37 +00:00
Campbell Barton
fac2ca1c7c
bpy/rna api class feature
...
- python defined classes will be used when available (otherwise automaically generated metaclasses are made as before)
- use properties rather then functions for python defined rna class's
- call the classes getattr AFTER doing an RNA lookup, avoids setting and clearing exceptions for most attribute lookups, tested UI scripts are ~25% faster.
- extending rna py classes this way is a nicer alternative to modifying the generated metaclasses in place.
Example class
--- snip
class Object(bpy.types.ID):
def _get_children(self):
return [child for child in bpy.data.objects if child.parent == self]
children = property(_get_children)
--- snip
The C initialization function looks in bpy_types.py for classes matching RNA structure names, using them when available.
This means all objects in python will be instances of these classes.
Python properties/funcs defined in ID py class will also be available for subclasses for eg. (Group Mesh etc)
2009-11-08 01:13:19 +00:00
Campbell Barton
30c4c4599d
pedantic enum string consistancy
2009-11-07 22:12:03 +00:00
Campbell Barton
ddeb9f8e24
- added console language type
...
- separated python console from the interactive console
- added shell console type (simple example)
- console types are autodetected and can be selected in the menu
2009-11-06 23:53:40 +00:00
Campbell Barton
44db0b0e27
view docs was broken for operators - was getting the nested class string.
2009-11-05 19:31:38 +00:00
Campbell Barton
be4ceb5fdf
Select interior faces, access from the mesh select menu
...
new mesh functions, remove duplicates in uvproject and mesh_skin
- face.edge_keys()
- edge.key()
- mesh.edge_face_count()
- mesh.edge_face_count_dict()
2009-11-05 12:37:49 +00:00
Campbell Barton
48bc52ea1b
fix for editing docs
2009-11-05 10:02:14 +00:00
Campbell Barton
e6ea68a31c
- missing return values
...
- more detailed exceptions (always give file:line incase the python exception doesnt)
- fix some errors in the edit docs
editing docs still fails, need to figure out why.
2009-11-04 22:36:46 +00:00
Campbell Barton
08bbda5005
- Stopping jobs on undo wasnt fixing undo/redo while with render previews as it was supposed to: needed WM_jobs_stop_all rather then WM_jobs_stop because it ends the thread rather then just setting 'stop'.
...
- gpl header + warning fix
2009-11-04 20:50:09 +00:00
Campbell Barton
3fa8959bb5
- move WM operators out of bpy_ops.py into their own file
...
- fix operator template
2009-11-04 20:21:08 +00:00
Campbell Barton
4033aba579
new operator directory, move some scripts from io
2009-11-04 14:40:35 +00:00