Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-17 16:26:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-17 16:26:40 +0400
commita705f6424567873b64f6309311106ec1e918b4e0 (patch)
tree076fc80e7cdd8b19737a01a79c94c687dfca1b0f /release/ui/buttons_particle.py
parent1ef729358517248888073be71ba5d3b6e3d723ee (diff)
python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api. bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec() eg. split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit") For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup. bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__ personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
Diffstat (limited to 'release/ui/buttons_particle.py')
-rw-r--r--release/ui/buttons_particle.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/release/ui/buttons_particle.py b/release/ui/buttons_particle.py
index 2d269967e4b..56e586a7271 100644
--- a/release/ui/buttons_particle.py
+++ b/release/ui/buttons_particle.py
@@ -36,13 +36,13 @@ class PARTICLE_PT_particles(ParticleButtonsPanel):
row.template_list(ob, "particle_systems", ob, "active_particle_system_index")
col = row.column(align=True)
- col.itemO("OBJECT_OT_particle_system_add", icon="ICON_ZOOMIN", text="")
- col.itemO("OBJECT_OT_particle_system_remove", icon="ICON_ZOOMOUT", text="")
+ col.itemO("object.particle_system_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("object.particle_system_remove", icon="ICON_ZOOMOUT", text="")
if psys:
split = layout.split(percentage=0.65)
- split.template_ID(psys, "settings", new="PARTICLE_OT_new")
+ split.template_ID(psys, "settings", new="particle.new")
#row = layout.row()
#row.itemL(text="Viewport")
@@ -65,9 +65,9 @@ class PARTICLE_PT_particles(ParticleButtonsPanel):
split = layout.split(percentage=0.65)
if part.type=='HAIR':
if psys.editable==True:
- split.itemO("PARTICLE_OT_editable_set", text="Free Edit")
+ split.itemO("particle.editable_set", text="Free Edit")
else:
- split.itemO("PARTICLE_OT_editable_set", text="Make Editable")
+ split.itemO("particle.editable_set", text="Make Editable")
row = split.row()
row.enabled = particle_panel_enabled(psys)
row.itemR(part, "hair_step")
@@ -149,17 +149,17 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
row = layout.row()
if cache.baked == True:
- row.itemO("PTCACHE_OT_free_bake_particle_system", text="Free Bake")
+ row.itemO("ptcache.free_bake_particle_system", text="Free Bake")
else:
- row.item_booleanO("PTCACHE_OT_cache_particle_system", "bake", True, text="Bake")
+ row.item_booleanO("ptcache.cache_particle_system", "bake", True, text="Bake")
subrow = row.row()
subrow.enabled = (cache.frames_skipped or cache.outdated) and particle_panel_enabled(psys)
- subrow.itemO("PTCACHE_OT_cache_particle_system", text="Calculate to Current Frame")
+ subrow.itemO("ptcache.cache_particle_system", text="Calculate to Current Frame")
row = layout.row()
row.enabled = particle_panel_enabled(psys)
- row.itemO("PTCACHE_OT_bake_from_particles_cache", text="Current Cache to Bake")
+ row.itemO("ptcache.bake_from_particles_cache", text="Current Cache to Bake")
row.itemR(cache, "step");
row = layout.row()
@@ -172,9 +172,9 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
layout.itemS()
row = layout.row()
- row.item_booleanO("PTCACHE_OT_bake_all", "bake", True, text="Bake All Dynamics")
- row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
- layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+ row.item_booleanO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", text="Update All Dynamics to current frame")
# for particles these are figured out automatically
#row.itemR(cache, "start_frame")
@@ -294,12 +294,12 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
col = row.column()
subrow = col.row()
subcol = subrow.column(align=True)
- subcol.itemO("PARTICLE_OT_new_keyed_target", icon="ICON_ZOOMIN", text="")
- subcol.itemO("PARTICLE_OT_remove_keyed_target", icon="ICON_ZOOMOUT", text="")
+ subcol.itemO("particle.new_keyed_target", icon="ICON_ZOOMIN", text="")
+ subcol.itemO("particle.remove_keyed_target", icon="ICON_ZOOMOUT", text="")
subrow = col.row()
subcol = subrow.column(align=True)
- subcol.itemO("PARTICLE_OT_keyed_target_move_up", icon="VICON_MOVE_UP", text="")
- subcol.itemO("PARTICLE_OT_keyed_target_move_down", icon="VICON_MOVE_DOWN", text="")
+ subcol.itemO("particle.keyed_target_move_up", icon="VICON_MOVE_UP", text="")
+ subcol.itemO("particle.keyed_target_move_down", icon="VICON_MOVE_DOWN", text="")
key = psys.active_keyed_target
if key: