Blender Git Loki

Git Commits -> Revision edfe78a

Revision edfe78a by Campbell Barton (master)
October 13, 2009, 15:30 (GMT)
Context operators for adjusting context values directly to avoid adding operators for adjusting single values which also need duplicate notifiers.

wm.context_set(path="scene.tool_settings.someattr", somevalue)
wm.context_toggle(path="scene.tool_settings.somebool")
wm.context_toggle_values(path="scene.tool_settings.some_enum", value_1="somevalue", value_2="othervalue") # switch between 2 values
wm.context_cycle_enum(path="scene.tool_settings.some_enum", reverse=False)

the path value is taken from the context so the full path is
context.scene.tool_settings...

This means in keymaps you can cycle draw modes, change PET- anything with rna access.
If its not so nice to map keys to operators like wm.context_set we could use macro's to wrap it and have its own name

Use this for PET and setting pivot options

- Made userpref key shortcut Ctrl+Alt+U since its not used in 2.4x
- added pivot_point_align (Alt+Comma)
- added PET wasnt rna wrapped correctly.


Commit Details:

Full Hash: edfe78aec90a679a5e95ca479192f6f9ecab7ff0
SVN Revision: 23809
Parent Commit: bdbae46
Lines Changed: +177, -10

13 Modified Paths:

/release/scripts/modules/bpy_ops.py (+95, -1) (Diff)
/source/blender/editors/curve/curve_ops.c (+2, -0) (Diff)
/source/blender/editors/include/ED_object.h (+3, -0) (Diff)
/source/blender/editors/mesh/mesh_ops.c (+2, -0) (Diff)
/source/blender/editors/object/object_ops.c (+23, -0) (Diff)
/source/blender/editors/physics/particle_edit.c (+1, -1) (Diff)
/source/blender/editors/screen/screen_ops.c (+1, -4) (Diff)
/source/blender/editors/space_view3d/view3d_ops.c (+25, -0) (Diff)
/source/blender/editors/transform/transform_generics.c (+2, -2) (Diff)
/source/blender/editors/uvedit/uvedit_ops.c (+2, -0) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+5, -0) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+11, -2) (Diff)
/source/blender/makesrna/intern/rna_space.c (+5, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021