fix [#26754] Live Edit and Editing UI scripts don't work

This commit is contained in:
Campbell Barton 2011-04-04 10:13:04 +00:00
parent dfa3a6fc84
commit 265cdf29fb
43 changed files with 129 additions and 0 deletions

@ -92,3 +92,6 @@ class OnionSkinButtonsPanel():
col = split.column() col = split.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(arm, "show_only_ghost_selected", text="Selected Only") col.prop(arm, "show_only_ghost_selected", text="Selected Only")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -310,3 +310,6 @@ class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Pa
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Armature _property_type = bpy.types.Armature
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -368,3 +368,6 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
return "active_pose_bone" return "active_pose_bone"
else: else:
return "active_bone" return "active_bone"
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -134,3 +134,6 @@ class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.P
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Camera _property_type = bpy.types.Camera
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -390,3 +390,6 @@ class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Pan
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Curve _property_type = bpy.types.Curve
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -40,3 +40,6 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
layout.prop(ob, "empty_draw_type", text="Display") layout.prop(ob, "empty_draw_type", text="Display")
layout.prop(ob, "empty_draw_size", text="Size") layout.prop(ob, "empty_draw_size", text="Size")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -384,3 +384,6 @@ class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Lamp _property_type = bpy.types.Lamp
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -80,3 +80,6 @@ class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Pa
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Lattice _property_type = bpy.types.Lattice
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -349,3 +349,6 @@ class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.Mesh _property_type = bpy.types.Mesh
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -116,3 +116,6 @@ class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.P
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object.data" _context_path = "object.data"
_property_type = bpy.types.MetaBall _property_type = bpy.types.MetaBall
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -699,3 +699,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(md, "width", slider=True) col.prop(md, "width", slider=True)
col.prop(md, "narrowness", slider=True) col.prop(md, "narrowness", slider=True)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -496,3 +496,6 @@ class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Logic Steps:") col.label(text="Logic Steps:")
col.prop(gs, "logic_step_max", text="Max") col.prop(gs, "logic_step_max", text="Max")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -967,3 +967,6 @@ class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Pa
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "material" _context_path = "material"
_property_type = bpy.types.Material _property_type = bpy.types.Material
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -335,3 +335,6 @@ class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel)
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "object" _context_path = "object"
_property_type = bpy.types.Object _property_type = bpy.types.Object
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -779,3 +779,6 @@ class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
for con in context.pose_bone.constraints: for con in context.pose_bone.constraints:
self.draw_constraint(context, con) self.draw_constraint(context, con)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -1212,3 +1212,6 @@ class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Pa
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings" _context_path = "particle_system.settings"
_property_type = bpy.types.ParticleSettings _property_type = bpy.types.ParticleSettings
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -216,3 +216,6 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
cloth = context.cloth.settings cloth = context.cloth.settings
effector_weights_ui(self, context, cloth.effector_weights) effector_weights_ui(self, context, cloth.effector_weights)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -280,3 +280,6 @@ def basic_force_field_falloff_ui(self, context, field):
sub = row.row() sub = row.row()
sub.active = field.use_max_distance sub.active = field.use_max_distance
sub.prop(field, "distance_max", text="Maximum") sub.prop(field, "distance_max", text="Maximum")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -216,3 +216,6 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
col.label(text="Force Fields:") col.label(text="Force Fields:")
col.prop(settings, "absorption", text="Absorption") col.prop(settings, "absorption", text="Absorption")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -281,3 +281,6 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
col = layout.column(align=True) col = layout.column(align=True)
col.prop(fluid, "tracer_particles") col.prop(fluid, "tracer_particles")
col.prop(fluid, "generate_particles") col.prop(fluid, "generate_particles")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -201,3 +201,6 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
domain = context.smoke.domain_settings domain = context.smoke.domain_settings
effector_weights_ui(self, context, domain.effector_weights) effector_weights_ui(self, context, domain.effector_weights)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -261,3 +261,6 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
softbody = md.settings softbody = md.settings
effector_weights_ui(self, context, softbody.effector_weights) effector_weights_ui(self, context, softbody.effector_weights)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -636,3 +636,6 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
sub.active = rd.use_bake_selected_to_active sub.active = rd.use_bake_selected_to_active
sub.prop(rd, "bake_distance") sub.prop(rd, "bake_distance")
sub.prop(rd, "bake_bias") sub.prop(rd, "bake_bias")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -301,3 +301,6 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
wm = context.window_manager wm = context.window_manager
wm.fileselect_add(self) wm.fileselect_add(self)
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -1028,3 +1028,6 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Pane
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "texture" _context_path = "texture"
_property_type = bpy.types.Texture _property_type = bpy.types.Texture
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -265,3 +265,6 @@ class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "world" _context_path = "world"
_property_type = bpy.types.World _property_type = bpy.types.World
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -158,3 +158,6 @@ class ConsoleLanguage(bpy.types.Operator):
remove_duplicates=True) remove_duplicates=True)
return {'FINISHED'} return {'FINISHED'}
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -364,3 +364,6 @@ class DOPESHEET_MT_gpencil_frame(bpy.types.Menu):
#layout.separator() #layout.separator()
#layout.operator("action.copy") #layout.operator("action.copy")
#layout.operator("action.paste") #layout.operator("action.paste")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -72,3 +72,6 @@ class FILEBROWSER_HT_header(bpy.types.Header):
row.prop(params, "use_filter_font", text="") row.prop(params, "use_filter_font", text="")
row.prop(params, "use_filter_sound", text="") row.prop(params, "use_filter_sound", text="")
row.prop(params, "use_filter_text", text="") row.prop(params, "use_filter_text", text="")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -245,3 +245,6 @@ class GRAPH_MT_key_transform(bpy.types.Menu):
layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
layout.operator("transform.rotate", text="Rotate") layout.operator("transform.rotate", text="Rotate")
layout.operator("transform.resize", text="Scale") layout.operator("transform.resize", text="Scale")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -751,3 +751,6 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel):
row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP' row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP'
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -399,3 +399,6 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
textblock.write('\n'.join(op_strings)) textblock.write('\n'.join(op_strings))
self.report({'INFO'}, "See OperatorList.txt textblock") self.report({'INFO'}, "See OperatorList.txt textblock")
return {'FINISHED'} return {'FINISHED'}
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -85,3 +85,6 @@ class LOGIC_MT_view(bpy.types.Menu):
layout.column() layout.column()
layout.operator("logic.properties", icon='MENU_PANEL') layout.operator("logic.properties", icon='MENU_PANEL')
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -189,3 +189,6 @@ class NLA_MT_edit_transform(bpy.types.Menu):
layout.operator("transform.translate", text="Grab/Move") layout.operator("transform.translate", text="Grab/Move")
layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
layout.operator("transform.resize", text="Scale") layout.operator("transform.resize", text="Scale")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -191,3 +191,6 @@ class NODE_PT_properties(bpy.types.Panel):
col.prop(snode, "backdrop_x", text="X") col.prop(snode, "backdrop_x", text="X")
col.prop(snode, "backdrop_y", text="Y") col.prop(snode, "backdrop_y", text="Y")
col.operator("node.backimage_move", text="Move") col.operator("node.backimage_move", text="Move")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -115,3 +115,6 @@ class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
col.operator("outliner.drivers_add_selected") col.operator("outliner.drivers_add_selected")
col.operator("outliner.drivers_delete_selected") col.operator("outliner.drivers_delete_selected")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -799,3 +799,6 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
if st.display_mode == 'WAVEFORM': if st.display_mode == 'WAVEFORM':
col.prop(st, "show_separate_color") col.prop(st, "show_separate_color")
col.prop(st, "proxy_render_size") col.prop(st, "proxy_render_size")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -297,3 +297,6 @@ class TEXT_MT_toolbox(bpy.types.Menu):
layout.separator() layout.separator()
layout.operator("text.run_script") layout.operator("text.run_script")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -196,3 +196,6 @@ class TIME_MT_autokey(bpy.types.Menu):
layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS') layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS') layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -1188,3 +1188,6 @@ class WM_OT_addon_expand(bpy.types.Operator):
info = addon_utils.module_bl_info(mod) info = addon_utils.module_bl_info(mod)
info["show_expanded"] = not info["show_expanded"] info["show_expanded"] = not info["show_expanded"]
return {'FINISHED'} return {'FINISHED'}
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -781,3 +781,6 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
keyconfig = wm.keyconfigs.active keyconfig = wm.keyconfigs.active
wm.keyconfigs.remove(keyconfig) wm.keyconfigs.remove(keyconfig)
return {'FINISHED'} return {'FINISHED'}
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -2354,3 +2354,6 @@ def unregister():
if __name__ == "__main__": if __name__ == "__main__":
register() register()
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)

@ -1297,3 +1297,6 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
sub = col.row() sub = col.row()
sub.active = pe.use_fade_time sub.active = pe.use_fade_time
sub.prop(pe, "fade_frames", slider=True) sub.prop(pe, "fade_frames", slider=True)
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)