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:
authorMartin Poirier <theeth@yahoo.com>2010-08-02 06:55:12 +0400
committerMartin Poirier <theeth@yahoo.com>2010-08-02 06:55:12 +0400
commit5b345524ea4aed30aa2fc9ef735ccae82bdffeae (patch)
tree8d8e9ffbe5a0254ea78c4f4e56ba27f3f1b2db1c /release
parent9f575e5446924770d8a0d118a14100dcd7366ead (diff)
RNA Types metaclass registration
See mailing list posts for details [1][2][3] Addons still need to be fixed; Campbell said he'd do it today. See any of the py files (outside netrender) in this commit for how to do it (it's rather simple). [1] http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html [2] http://lists.blender.org/pipermail/bf-committers/2010-August/028311.html [3] http://lists.blender.org/pipermail/bf-committers/2010-August/028321.html
Diffstat (limited to 'release')
-rw-r--r--release/scripts/io/export_3ds.py3
-rw-r--r--release/scripts/io/export_fbx.py2
-rw-r--r--release/scripts/io/export_mdd.py2
-rw-r--r--release/scripts/io/export_obj.py2
-rw-r--r--release/scripts/io/export_ply.py2
-rw-r--r--release/scripts/io/export_x3d.py2
-rw-r--r--release/scripts/io/import_anim_bvh.py2
-rw-r--r--release/scripts/io/import_scene_3ds.py2
-rw-r--r--release/scripts/io/import_scene_obj.py2
-rw-r--r--release/scripts/io/import_shape_mdd.py2
-rw-r--r--release/scripts/io/netrender/client.py1
-rw-r--r--release/scripts/io/netrender/operators.py14
-rw-r--r--release/scripts/io/netrender/ui.py11
-rw-r--r--release/scripts/io/netrender/utils.py4
-rw-r--r--release/scripts/modules/bpy/utils.py22
-rw-r--r--release/scripts/modules/bpy_types.py71
-rw-r--r--release/scripts/modules/rna_prop_ui.py129
-rw-r--r--release/scripts/op/add_armature_human.py2
-rw-r--r--release/scripts/op/add_mesh_torus.py2
-rw-r--r--release/scripts/op/fcurve_euler_filter.py4
-rw-r--r--release/scripts/op/image.py15
-rw-r--r--release/scripts/op/mesh.py14
-rw-r--r--release/scripts/op/nla.py4
-rw-r--r--release/scripts/op/object.py20
-rw-r--r--release/scripts/op/object_align.py2
-rw-r--r--release/scripts/op/object_randomize_transform.py2
-rw-r--r--release/scripts/op/presets.py29
-rw-r--r--release/scripts/op/screen_play_rendered_anim.py4
-rw-r--r--release/scripts/op/sequencer.py12
-rw-r--r--release/scripts/op/uv.py2
-rw-r--r--release/scripts/op/uvcalc_follow_active.py2
-rw-r--r--release/scripts/op/uvcalc_smart_project.py2
-rw-r--r--release/scripts/op/vertexpaint_dirt.py4
-rw-r--r--release/scripts/op/wm.py151
-rw-r--r--release/scripts/templates/operator.py1
-rw-r--r--release/scripts/templates/operator_simple.py4
-rw-r--r--release/scripts/templates/operator_uv.py1
-rw-r--r--release/scripts/templates/panel_simple.py1
-rw-r--r--release/scripts/ui/properties_animviz.py112
-rw-r--r--release/scripts/ui/properties_data_armature.py77
-rw-r--r--release/scripts/ui/properties_data_armature_rigify.py26
-rw-r--r--release/scripts/ui/properties_data_bone.py37
-rw-r--r--release/scripts/ui/properties_data_camera.py26
-rw-r--r--release/scripts/ui/properties_data_curve.py41
-rw-r--r--release/scripts/ui/properties_data_empty.py15
-rw-r--r--release/scripts/ui/properties_data_lamp.py45
-rw-r--r--release/scripts/ui/properties_data_lattice.py23
-rw-r--r--release/scripts/ui/properties_data_mesh.py42
-rw-r--r--release/scripts/ui/properties_data_metaball.py26
-rw-r--r--release/scripts/ui/properties_data_modifier.py16
-rw-r--r--release/scripts/ui/properties_game.py55
-rw-r--r--release/scripts/ui/properties_material.py87
-rw-r--r--release/scripts/ui/properties_object.py87
-rw-r--r--release/scripts/ui/properties_object_constraint.py20
-rw-r--r--release/scripts/ui/properties_particle.py59
-rw-r--r--release/scripts/ui/properties_physics_cloth.py30
-rw-r--r--release/scripts/ui/properties_physics_field.py19
-rw-r--r--release/scripts/ui/properties_physics_fluid.py25
-rw-r--r--release/scripts/ui/properties_physics_smoke.py31
-rw-r--r--release/scripts/ui/properties_physics_softbody.py34
-rw-r--r--release/scripts/ui/properties_render.py52
-rw-r--r--release/scripts/ui/properties_scene.py37
-rw-r--r--release/scripts/ui/properties_texture.py91
-rw-r--r--release/scripts/ui/properties_world.py44
-rw-r--r--release/scripts/ui/space_console.py23
-rw-r--r--release/scripts/ui/space_dopesheet.py17
-rw-r--r--release/scripts/ui/space_filebrowser.py12
-rw-r--r--release/scripts/ui/space_graph.py17
-rw-r--r--release/scripts/ui/space_image.py33
-rw-r--r--release/scripts/ui/space_info.py25
-rw-r--r--release/scripts/ui/space_logic.py16
-rw-r--r--release/scripts/ui/space_nla.py17
-rw-r--r--release/scripts/ui/space_node.py15
-rw-r--r--release/scripts/ui/space_outliner.py15
-rw-r--r--release/scripts/ui/space_sequencer.py55
-rw-r--r--release/scripts/ui/space_text.py25
-rw-r--r--release/scripts/ui/space_time.py17
-rw-r--r--release/scripts/ui/space_userpref.py29
-rw-r--r--release/scripts/ui/space_userpref_keymap.py22
-rw-r--r--release/scripts/ui/space_view3d.py131
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py91
81 files changed, 665 insertions, 1603 deletions
diff --git a/release/scripts/io/export_3ds.py b/release/scripts/io/export_3ds.py
index 910d462a9f9..22b842b2905 100644
--- a/release/scripts/io/export_3ds.py
+++ b/release/scripts/io/export_3ds.py
@@ -1138,7 +1138,6 @@ class Export3DS(bpy.types.Operator):
def poll(self, context): # Poll isnt working yet
return context.active_object != None
-
# Add to a menu
def menu_func(self, context):
default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds"
@@ -1146,11 +1145,9 @@ def menu_func(self, context):
def register():
- bpy.types.register(Export3DS)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(Export3DS)
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/export_fbx.py b/release/scripts/io/export_fbx.py
index 72b03a110bd..8d28500dba5 100644
--- a/release/scripts/io/export_fbx.py
+++ b/release/scripts/io/export_fbx.py
@@ -3439,12 +3439,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportFBX)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(ExportFBX)
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/export_mdd.py b/release/scripts/io/export_mdd.py
index d2e53070910..5cbda8a76b7 100644
--- a/release/scripts/io/export_mdd.py
+++ b/release/scripts/io/export_mdd.py
@@ -189,12 +189,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportMDD)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(ExportMDD)
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/export_obj.py b/release/scripts/io/export_obj.py
index a4d98aac12e..4100c2a5de9 100644
--- a/release/scripts/io/export_obj.py
+++ b/release/scripts/io/export_obj.py
@@ -970,11 +970,9 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportOBJ)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(ExportOBJ)
bpy.types.INFO_MT_file_export.remove(menu_func)
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py
index 07865e4f65a..03529c4023c 100644
--- a/release/scripts/io/export_ply.py
+++ b/release/scripts/io/export_ply.py
@@ -317,12 +317,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportPLY)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(ExportPLY)
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/export_x3d.py b/release/scripts/io/export_x3d.py
index 7f5dd57171c..b2f2647fc3a 100644
--- a/release/scripts/io/export_x3d.py
+++ b/release/scripts/io/export_x3d.py
@@ -1248,11 +1248,9 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportX3D)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- bpy.types.unregister(ExportX3D)
bpy.types.INFO_MT_file_export.remove(menu_func)
# NOTES
diff --git a/release/scripts/io/import_anim_bvh.py b/release/scripts/io/import_anim_bvh.py
index 89097fd53f5..ba9b8a1f91d 100644
--- a/release/scripts/io/import_anim_bvh.py
+++ b/release/scripts/io/import_anim_bvh.py
@@ -612,12 +612,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(BvhImporter)
bpy.types.INFO_MT_file_import.append(menu_func)
def unregister():
- bpy.types.unregister(BvhImporter)
bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/import_scene_3ds.py b/release/scripts/io/import_scene_3ds.py
index 435e08a209e..fe242ca1f29 100644
--- a/release/scripts/io/import_scene_3ds.py
+++ b/release/scripts/io/import_scene_3ds.py
@@ -1032,11 +1032,9 @@ def menu_func(self, context):
self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)")
def register():
- bpy.types.register(IMPORT_OT_autodesk_3ds)
bpy.types.INFO_MT_file_import.append(menu_func)
def unregister():
- bpy.types.unregister(IMPORT_OT_autodesk_3ds)
bpy.types.INFO_MT_file_import.remove(menu_func)
# NOTES:
diff --git a/release/scripts/io/import_scene_obj.py b/release/scripts/io/import_scene_obj.py
index 5b29a5ded90..e832489a560 100644
--- a/release/scripts/io/import_scene_obj.py
+++ b/release/scripts/io/import_scene_obj.py
@@ -1606,11 +1606,9 @@ def menu_func(self, context):
def register():
- bpy.types.register(IMPORT_OT_obj)
bpy.types.INFO_MT_file_import.append(menu_func)
def unregister():
- bpy.types.unregister(IMPORT_OT_obj)
bpy.types.INFO_MT_file_import.remove(menu_func)
diff --git a/release/scripts/io/import_shape_mdd.py b/release/scripts/io/import_shape_mdd.py
index ec0e7696630..16fed1798c4 100644
--- a/release/scripts/io/import_shape_mdd.py
+++ b/release/scripts/io/import_shape_mdd.py
@@ -143,12 +143,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(importMDD)
bpy.types.INFO_MT_file_import.append(menu_func)
def unregister():
- bpy.types.unregister(importMDD)
bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/io/netrender/client.py b/release/scripts/io/netrender/client.py
index 9f6d1a7639e..e9479f92ea8 100644
--- a/release/scripts/io/netrender/client.py
+++ b/release/scripts/io/netrender/client.py
@@ -189,7 +189,6 @@ def clientSendJob(conn, scene, anim = False):
def requestResult(conn, job_id, frame):
conn.request("GET", renderURL(job_id, frame))
-@rnaType
class NetworkRenderEngine(bpy.types.RenderEngine):
bl_idname = 'NET_RENDER'
bl_label = "Network Render"
diff --git a/release/scripts/io/netrender/operators.py b/release/scripts/io/netrender/operators.py
index 858ec800dbc..4530491dae1 100644
--- a/release/scripts/io/netrender/operators.py
+++ b/release/scripts/io/netrender/operators.py
@@ -26,7 +26,6 @@ from netrender.utils import *
import netrender.client as client
import netrender.model
-@rnaType
class RENDER_OT_netslave_bake(bpy.types.Operator):
'''NEED DESCRIPTION'''
bl_idname = "render.netslavebake"
@@ -84,7 +83,6 @@ class RENDER_OT_netslave_bake(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientanim(bpy.types.Operator):
'''Start rendering an animation on network'''
bl_idname = "render.netclientanim"
@@ -111,7 +109,6 @@ class RENDER_OT_netclientanim(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientrun(bpy.types.Operator):
'''Start network rendering service'''
bl_idname = "render.netclientstart"
@@ -128,7 +125,6 @@ class RENDER_OT_netclientrun(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientsend(bpy.types.Operator):
'''Send Render Job to the Network'''
bl_idname = "render.netclientsend"
@@ -158,7 +154,6 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientsendframe(bpy.types.Operator):
'''Send Render Job with current frame to the Network'''
bl_idname = "render.netclientsendframe"
@@ -188,7 +183,6 @@ class RENDER_OT_netclientsendframe(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientstatus(bpy.types.Operator):
'''Refresh the status of the current jobs'''
bl_idname = "render.netclientstatus"
@@ -228,7 +222,6 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
'''Operator documentation text, will be used for the operator tooltip and python docs.'''
bl_idname = "render.netclientblacklistslave"
@@ -258,7 +251,6 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
'''Operator documentation text, will be used for the operator tooltip and python docs.'''
bl_idname = "render.netclientwhitelistslave"
@@ -289,7 +281,6 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientslaves(bpy.types.Operator):
'''Refresh status about available Render slaves'''
bl_idname = "render.netclientslaves"
@@ -334,7 +325,6 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientcancel(bpy.types.Operator):
'''Cancel the selected network rendering job.'''
bl_idname = "render.netclientcancel"
@@ -363,7 +353,6 @@ class RENDER_OT_netclientcancel(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class RENDER_OT_netclientcancelall(bpy.types.Operator):
'''Cancel all running network rendering jobs.'''
bl_idname = "render.netclientcancelall"
@@ -390,7 +379,6 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class netclientdownload(bpy.types.Operator):
'''Download render results from the network'''
bl_idname = "render.netclientdownload"
@@ -435,7 +423,6 @@ class netclientdownload(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class netclientscan(bpy.types.Operator):
'''Listen on network for master server broadcasting its address and port.'''
bl_idname = "render.netclientscan"
@@ -458,7 +445,6 @@ class netclientscan(bpy.types.Operator):
def invoke(self, context, event):
return self.execute(context)
-@rnaType
class netclientweb(bpy.types.Operator):
'''Open new window with information about running rendering jobs'''
bl_idname = "render.netclientweb"
diff --git a/release/scripts/io/netrender/ui.py b/release/scripts/io/netrender/ui.py
index c82a031100b..594ebcd12db 100644
--- a/release/scripts/io/netrender/ui.py
+++ b/release/scripts/io/netrender/ui.py
@@ -87,7 +87,6 @@ class RenderButtonsPanel():
return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
# Setting panel, use in the scene for now.
-@rnaType
class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Network Settings"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -122,7 +121,6 @@ class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
layout.operator("render.netclientweb", icon='QUESTION')
-@rnaType
class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slave Settings"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -147,7 +145,7 @@ class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
sub = layout.column()
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
-@rnaType
+
class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Master Settings"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -166,7 +164,6 @@ class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
layout.prop(netsettings, "master_broadcast")
layout.prop(netsettings, "master_clear")
-@rnaType
class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Job Settings"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -207,7 +204,6 @@ class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
row.prop(netsettings, "priority")
row.prop(netsettings, "chunks")
-@rnaType
class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slaves Status"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -246,7 +242,6 @@ class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Seen: " + time.ctime(slave.last_seen))
layout.label(text="Stats: " + slave.stats)
-@rnaType
class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slaves Blacklist"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -284,7 +279,6 @@ class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Seen: " + time.ctime(slave.last_seen))
layout.label(text="Stats: " + slave.stats)
-@rnaType
class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Jobs"
COMPAT_ENGINES = {'NET_RENDER'}
@@ -325,15 +319,12 @@ class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Done: %04i" % job.results[DONE])
layout.label(text="Error: %04i" % job.results[ERROR])
-@rnaType
class NetRenderSettings(bpy.types.IDPropertyGroup):
pass
-@rnaType
class NetRenderSlave(bpy.types.IDPropertyGroup):
pass
-@rnaType
class NetRenderJob(bpy.types.IDPropertyGroup):
pass
diff --git a/release/scripts/io/netrender/utils.py b/release/scripts/io/netrender/utils.py
index fa2eb6fb5f5..31123ce26da 100644
--- a/release/scripts/io/netrender/utils.py
+++ b/release/scripts/io/netrender/utils.py
@@ -57,10 +57,6 @@ FRAME_STATUS_TEXT = {
ERROR: "Error"
}
-def rnaType(rna_type):
- if bpy: bpy.types.register(rna_type)
- return rna_type
-
def reporting(report, message, errorType = None):
if errorType:
t = 'ERROR'
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index 06dbe8fd4cc..f09c5872ab1 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -29,6 +29,7 @@ import sys as _sys
from _bpy import blend_paths
from _bpy import script_paths as _bpy_script_paths
+from _bpy import LoadModule, UnloadModule
def _test_import(module_name, loaded_modules):
@@ -84,7 +85,7 @@ def modules_from_path(path, loaded_modules):
modules.append(mod)
return modules
-
+
_loaded = [] # store loaded modules for reloading.
_bpy_types = __import__("bpy_types") # keep for comparisons, never ever reload this.
@@ -108,6 +109,15 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if refresh_scripts:
original_modules = _sys.modules.values()
+ def unload_module(mod):
+ UnloadModule(mod.__name__)
+ unregister = getattr(mod, "unregister", None)
+ if unregister:
+ try:
+ unregister()
+ except:
+ traceback.print_exc()
+
def sys_path_ensure(path):
if path not in _sys.path: # reloading would add twice
_sys.path.insert(0, path)
@@ -134,6 +144,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
mod = test_reload(mod)
if mod:
+ LoadModule(mod.__name__, reload_scripts)
register = getattr(mod, "register", None)
if register:
try:
@@ -165,12 +176,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
# loop over and unload all scripts
_loaded.reverse()
for mod in _loaded:
- unregister = getattr(mod, "unregister", None)
- if unregister:
- try:
- unregister()
- except:
- traceback.print_exc()
+ unload_module(mod)
for mod in _loaded:
reload(mod)
@@ -336,7 +342,7 @@ _presets = _os.path.join(_scripts[0], "presets") # FIXME - multiple paths
def preset_paths(subdir):
'''
- Returns a list of paths for a spesific preset.
+ Returns a list of paths for a specific preset.
'''
return (_os.path.join(_presets, subdir), )
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 8cbb2bf4e80..7e7b7f128ab 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
from _bpy import types as bpy_types
+import _bpy
from mathutils import Vector
StructRNA = bpy_types.Struct.__bases__[0]
@@ -539,8 +540,64 @@ class Text(bpy_types.ID):
import collections
+TypeMap = {}
+# Properties (IDPropertyGroup) are different from types because they need to be registered
+# before adding sub properties to them, so they are registered on definition
+# and unregistered on unload
+PropertiesMap = {}
+
+def UnloadModule(module):
+ global TypeMap, PropertiesMap
+ for t in TypeMap.get(module, []):
+ bpy_types.unregister(t)
+
+ TypeMap = {}
+
+ for t in PropertiesMap.get(module, []):
+ bpy_types.unregister(t)
+
+ PropertiesMap = {}
+
+def LoadModule(module, force=False):
+ for t in TypeMap.get(module, []):
+ bpy_types.register(t)
+
+_bpy.LoadModule = LoadModule
+_bpy.UnloadModule = UnloadModule
+
+class RNAMeta(type):
+ @classmethod
+ def _immediate(cls):
+ return bpy_types.immediate();
+
+ def __new__(cls, name, bases, classdict, **args):
+ result = type.__new__(cls, name, bases, classdict)
+ if bases and bases[0] != StructRNA:
+ module = result.__module__
+
+ ClassMap = TypeMap
+
+ # Register right away if needed
+ if cls._immediate():
+ bpy_types.register(result)
+ ClassMap = PropertiesMap
+
+ # first part of packages only
+ if "." in module:
+ module = module[:module.index(".")]
+
+ if not module in ClassMap:
+ ClassMap[module] = []
+
+ ClassMap[module].append(result)
+ return result
+
+class RNAMetaRegister(RNAMeta):
+ @classmethod
+ def _immediate(cls):
+ return True;
-class OrderedMeta(type):
+class OrderedMeta(RNAMeta):
def __init__(cls, name, bases, attributes):
super(OrderedMeta, cls).__init__(name, bases, attributes)
@@ -549,7 +606,6 @@ class OrderedMeta(type):
def __prepare__(name, bases, **kwargs):
return collections.OrderedDict()
-
# Only defined so operators members can be used by accessing self.order
class Operator(StructRNA, metaclass=OrderedMeta):
__slots__ = ()
@@ -564,7 +620,12 @@ class Macro(StructRNA, metaclass=OrderedMeta):
def define(self, opname):
from _bpy import ops
return ops.macro_define(self, opname)
+
+class IDPropertyGroup(StructRNA, metaclass=RNAMetaRegister):
+ __slots__ = ()
+class RenderEngine(StructRNA, metaclass=RNAMeta):
+ __slots__ = ()
class _GenericUI:
__slots__ = ()
@@ -606,15 +667,15 @@ class _GenericUI:
pass
-class Panel(StructRNA, _GenericUI):
+class Panel(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = ()
-class Header(StructRNA, _GenericUI):
+class Header(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = ()
-class Menu(StructRNA, _GenericUI):
+class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = ()
def path_menu(self, searchpaths, operator, props_default={}):
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py
index 3e8662c275f..eda27240fb5 100644
--- a/release/scripts/modules/rna_prop_ui.py
+++ b/release/scripts/modules/rna_prop_ui.py
@@ -124,7 +124,7 @@ def draw(layout, context, context_member, use_edit=True):
assign_props(prop, val_draw, key)
-class PropertyPanel(bpy.types.Panel):
+class PropertyPanel():
"""
The subclass should have its own poll function
and the variable '_context_path' MUST be set.
@@ -135,130 +135,3 @@ class PropertyPanel(bpy.types.Panel):
def draw(self, context):
draw(self.layout, context, self._context_path)
-
-from bpy.props import *
-
-
-rna_path = StringProperty(name="Property Edit",
- description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
-
-rna_value = StringProperty(name="Property Value",
- description="Property value edit", maxlen=1024, default="")
-
-rna_property = StringProperty(name="Property Name",
- description="Property name edit", maxlen=1024, default="")
-
-rna_min = FloatProperty(name="Min", default=0.0, precision=3)
-rna_max = FloatProperty(name="Max", default=1.0, precision=3)
-
-
-class WM_OT_properties_edit(bpy.types.Operator):
- '''Internal use (edit a property data_path)'''
- bl_idname = "wm.properties_edit"
- bl_label = "Edit Property"
-
- data_path = rna_path
- property = rna_property
- value = rna_value
- min = rna_min
- max = rna_max
- description = StringProperty(name="Tip", default="")
-
- def execute(self, context):
- data_path = self.properties.data_path
- value = self.properties.value
- prop = self.properties.property
- prop_old = self._last_prop[0]
-
- try:
- value_eval = eval(value)
- except:
- value_eval = value
-
- # First remove
- item = eval("context.%s" % data_path)
-
- rna_idprop_ui_prop_clear(item, prop_old)
- exec_str = "del item['%s']" % prop_old
- # print(exec_str)
- exec(exec_str)
-
-
- # Reassign
- exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
- # print(exec_str)
- exec(exec_str)
- self._last_prop[:] = [prop]
-
- prop_type = type(item[prop])
-
- prop_ui = rna_idprop_ui_prop_get(item, prop)
-
- if prop_type in (float, int):
-
- prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
- prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
-
- prop_ui['description'] = self.properties.description
-
- return {'FINISHED'}
-
- def invoke(self, context, event):
-
- self._last_prop = [self.properties.property]
-
- item = eval("context.%s" % self.properties.data_path)
-
- # setup defaults
- prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
- if prop_ui:
- self.properties.min = prop_ui.get("min", -1000000000)
- self.properties.max = prop_ui.get("max", 1000000000)
- self.properties.description = prop_ui.get("description", "")
-
- wm = context.manager
- # This crashes, TODO - fix
- #return wm.invoke_props_popup(self, event)
-
- wm.invoke_props_popup(self, event)
- return {'RUNNING_MODAL'}
-
-
-class WM_OT_properties_add(bpy.types.Operator):
- '''Internal use (edit a property data_path)'''
- bl_idname = "wm.properties_add"
- bl_label = "Add Property"
-
- data_path = rna_path
-
- def execute(self, context):
- item = eval("context.%s" % self.properties.data_path)
-
- def unique_name(names):
- prop = 'prop'
- prop_new = prop
- i = 1
- while prop_new in names:
- prop_new = prop + str(i)
- i += 1
-
- return prop_new
-
- property = unique_name(item.keys())
-
- item[property] = 1.0
- return {'FINISHED'}
-
-
-class WM_OT_properties_remove(bpy.types.Operator):
- '''Internal use (edit a property data_path)'''
- bl_idname = "wm.properties_remove"
- bl_label = "Remove Property"
-
- data_path = rna_path
- property = rna_property
-
- def execute(self, context):
- item = eval("context.%s" % self.properties.data_path)
- del item[self.properties.property]
- return {'FINISHED'}
diff --git a/release/scripts/op/add_armature_human.py b/release/scripts/op/add_armature_human.py
index 164bbfb100b..5d6ec1f559f 100644
--- a/release/scripts/op/add_armature_human.py
+++ b/release/scripts/op/add_armature_human.py
@@ -606,12 +606,10 @@ menu_func = (lambda self, context: self.layout.operator(AddHuman.bl_idname,
def register():
- bpy.types.register(AddHuman)
bpy.types.INFO_MT_armature_add.append(menu_func)
def unregister():
- bpy.types.unregister(AddHuman)
bpy.types.INFO_MT_armature_add.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py
index 16bf4e1c92c..d64b92a8b19 100644
--- a/release/scripts/op/add_mesh_torus.py
+++ b/release/scripts/op/add_mesh_torus.py
@@ -137,12 +137,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(AddTorus)
bpy.types.INFO_MT_mesh_add.append(menu_func)
def unregister():
- bpy.types.unregister(AddTorus)
bpy.types.INFO_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/fcurve_euler_filter.py b/release/scripts/op/fcurve_euler_filter.py
index 39c226294ee..11431c52eb6 100644
--- a/release/scripts/op/fcurve_euler_filter.py
+++ b/release/scripts/op/fcurve_euler_filter.py
@@ -56,10 +56,10 @@ class DiscontFilterOp(bpy.types.Operator):
return {'FINISHED'}
def register():
- bpy.types.register(DiscontFilterOp)
+ pass
def unregister():
- bpy.types.unregister(DiscontFilterOp)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/image.py b/release/scripts/op/image.py
index be583012d7a..bcef8b9afd3 100644
--- a/release/scripts/op/image.py
+++ b/release/scripts/op/image.py
@@ -186,23 +186,12 @@ class ProjectApply(bpy.types.Operator):
return {'FINISHED'}
-classes = [
- EditExternally,
- SaveDirty,
- ProjectEdit,
- ProjectApply]
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
-
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/mesh.py b/release/scripts/op/mesh.py
index b63997b8eba..ee3e93c58c4 100644
--- a/release/scripts/op/mesh.py
+++ b/release/scripts/op/mesh.py
@@ -172,22 +172,12 @@ class MeshMirrorUV(bpy.types.Operator):
return {'FINISHED'}
-# Register the operator
-classes = [
- MeshSelectInteriorFaces,
- MeshMirrorUV]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/nla.py b/release/scripts/op/nla.py
index ceb4621d643..bec5f5b3909 100644
--- a/release/scripts/op/nla.py
+++ b/release/scripts/op/nla.py
@@ -178,12 +178,12 @@ class BakeAction(bpy.types.Operator):
def register():
- bpy.types.register(BakeAction)
+ pass
# bpy.types.INFO_MT_mesh_add.append(menu_func)
def unregister():
- bpy.types.unregister(BakeAction)
+ pass
# bpy.types.INFO_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py
index 403491bfa28..8d9280e43af 100644
--- a/release/scripts/op/object.py
+++ b/release/scripts/op/object.py
@@ -558,28 +558,12 @@ class ClearAllRestrictRender(bpy.types.Operator):
return {'FINISHED'}
-classes = [
- SelectPattern,
- SelectCamera,
- SelectHierarchy,
- SubdivisionSet,
- ShapeTransfer,
- JoinUVs,
- IsolateTypeRender,
- MakeDupliFace,
- ClearAllRestrictRender]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register() \ No newline at end of file
diff --git a/release/scripts/op/object_align.py b/release/scripts/op/object_align.py
index 6e5eef0fbc2..39b642c1b9f 100644
--- a/release/scripts/op/object_align.py
+++ b/release/scripts/op/object_align.py
@@ -286,12 +286,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(AlignObjects)
bpy.types.VIEW3D_MT_transform.append(menu_func)
def unregister():
- bpy.types.unregister(AlignObjects)
bpy.types.VIEW3D_MT_transform.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/object_randomize_transform.py b/release/scripts/op/object_randomize_transform.py
index 89884b1767f..8c3f4eb6dfd 100644
--- a/release/scripts/op/object_randomize_transform.py
+++ b/release/scripts/op/object_randomize_transform.py
@@ -140,12 +140,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(RandomizeLocRotSize)
bpy.types.VIEW3D_MT_transform.append(menu_func)
def unregister():
- bpy.types.unregister(RandomizeLocRotSize)
bpy.types.VIEW3D_MT_transform.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py
index f80c5e69ddd..2012ba913fb 100644
--- a/release/scripts/op/presets.py
+++ b/release/scripts/op/presets.py
@@ -22,7 +22,7 @@ import bpy
import os
-class AddPresetBase(bpy.types.Operator):
+class AddPresetBase():
'''Base preset class, only for subclassing
subclasses must define
- preset_values
@@ -91,7 +91,7 @@ class ExecutePreset(bpy.types.Operator):
return {'FINISHED'}
-class AddPresetRender(AddPresetBase):
+class AddPresetRender(AddPresetBase, bpy.types.Operator):
'''Add a Render Preset'''
bl_idname = "render.preset_add"
bl_label = "Add Render Preset"
@@ -113,7 +113,7 @@ class AddPresetRender(AddPresetBase):
preset_subdir = "render"
-class AddPresetSSS(AddPresetBase):
+class AddPresetSSS(AddPresetBase, bpy.types.Operator):
'''Add a Subsurface Scattering Preset'''
bl_idname = "material.sss_preset_add"
bl_label = "Add SSS Preset"
@@ -138,7 +138,7 @@ class AddPresetSSS(AddPresetBase):
preset_subdir = "sss"
-class AddPresetCloth(AddPresetBase):
+class AddPresetCloth(AddPresetBase, bpy.types.Operator):
'''Add a Cloth Preset'''
bl_idname = "cloth.preset_add"
bl_label = "Add Cloth Preset"
@@ -156,7 +156,7 @@ class AddPresetCloth(AddPresetBase):
preset_subdir = "cloth"
-class AddPresetSunSky(AddPresetBase):
+class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
'''Add a Sky & Atmosphere Preset'''
bl_idname = "lamp.sunsky_preset_add"
bl_label = "Add Sunsky Preset"
@@ -181,7 +181,7 @@ class AddPresetSunSky(AddPresetBase):
preset_subdir = "sunsky"
-class AddPresetInteraction(AddPresetBase):
+class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
'''Add an Application Interaction Preset'''
bl_idname = "wm.interaction_preset_add"
bl_label = "Add Interaction Preset"
@@ -203,25 +203,12 @@ class AddPresetInteraction(AddPresetBase):
preset_subdir = "interaction"
-classes = [
- ExecutePreset,
- AddPresetRender,
- AddPresetSSS,
- AddPresetCloth,
- AddPresetSunSky,
- AddPresetInteraction]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/screen_play_rendered_anim.py b/release/scripts/op/screen_play_rendered_anim.py
index 2ecd445df1d..7893ce0ff3e 100644
--- a/release/scripts/op/screen_play_rendered_anim.py
+++ b/release/scripts/op/screen_play_rendered_anim.py
@@ -144,11 +144,11 @@ class PlayRenderedAnim(bpy.types.Operator):
def register():
- bpy.types.register(PlayRenderedAnim)
+ pass
def unregister():
- bpy.types.unregister(PlayRenderedAnim)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/sequencer.py b/release/scripts/op/sequencer.py
index 432486b70cf..e01f2dcb23a 100644
--- a/release/scripts/op/sequencer.py
+++ b/release/scripts/op/sequencer.py
@@ -132,19 +132,11 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
def register():
- register = bpy.types.register
-
- register(SequencerCrossfadeSounds)
- register(SequencerCutMulticam)
- register(SequencerDeinterlaceSelectedMovies)
+ pass
def unregister():
- unregister = bpy.types.unregister
-
- unregister(SequencerCrossfadeSounds)
- unregister(SequencerCutMulticam)
- unregister(SequencerDeinterlaceSelectedMovies)
+ pass
if __name__ == "__main__":
diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py
index a7abd475b8d..23e06c968cd 100644
--- a/release/scripts/op/uv.py
+++ b/release/scripts/op/uv.py
@@ -216,12 +216,10 @@ def menu_func(self, context):
def register():
- bpy.types.register(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.append(menu_func)
def unregister():
- bpy.types.unregister(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/uvcalc_follow_active.py b/release/scripts/op/uvcalc_follow_active.py
index 6466d48a9fe..6f337bd623d 100644
--- a/release/scripts/op/uvcalc_follow_active.py
+++ b/release/scripts/op/uvcalc_follow_active.py
@@ -263,12 +263,10 @@ menu_func = (lambda self, context: self.layout.operator(FollowActiveQuads.bl_idn
def register():
- bpy.types.register(FollowActiveQuads)
bpy.types.VIEW3D_MT_uv_map.append(menu_func)
def unregister():
- bpy.types.unregister(FollowActiveQuads)
bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py
index 78cef26f78c..637dccda4ba 100644
--- a/release/scripts/op/uvcalc_smart_project.py
+++ b/release/scripts/op/uvcalc_smart_project.py
@@ -1138,12 +1138,10 @@ menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
def register():
- bpy.types.register(SmartProject)
bpy.types.VIEW3D_MT_uv_map.append(menu_func)
def unregister():
- bpy.types.unregister(SmartProject)
bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/op/vertexpaint_dirt.py b/release/scripts/op/vertexpaint_dirt.py
index 63a3aa3896b..21c19d528cc 100644
--- a/release/scripts/op/vertexpaint_dirt.py
+++ b/release/scripts/op/vertexpaint_dirt.py
@@ -180,11 +180,11 @@ class VertexPaintDirt(bpy.types.Operator):
def register():
- bpy.types.register(VertexPaintDirt)
+ pass
def unregister():
- bpy.types.unregister(VertexPaintDirt)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py
index ed77f32ff6d..0cd68cf6368 100644
--- a/release/scripts/op/wm.py
+++ b/release/scripts/op/wm.py
@@ -576,46 +576,139 @@ class WM_OT_doc_edit(bpy.types.Operator):
return wm.invoke_props_dialog(self, width=600)
-import rna_prop_ui
+from bpy.props import *
+
+
+rna_path = StringProperty(name="Property Edit",
+ description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
+
+rna_value = StringProperty(name="Property Value",
+ description="Property value edit", maxlen=1024, default="")
+
+rna_property = StringProperty(name="Property Name",
+ description="Property name edit", maxlen=1024, default="")
+
+rna_min = FloatProperty(name="Min", default=0.0, precision=3)
+rna_max = FloatProperty(name="Max", default=1.0, precision=3)
+
+
+class WM_OT_properties_edit(bpy.types.Operator):
+ '''Internal use (edit a property data_path)'''
+ bl_idname = "wm.properties_edit"
+ bl_label = "Edit Property"
+
+ data_path = rna_path
+ property = rna_property
+ value = rna_value
+ min = rna_min
+ max = rna_max
+ description = StringProperty(name="Tip", default="")
+
+ def execute(self, context):
+ data_path = self.properties.data_path
+ value = self.properties.value
+ prop = self.properties.property
+ prop_old = self._last_prop[0]
+
+ try:
+ value_eval = eval(value)
+ except:
+ value_eval = value
+
+ # First remove
+ item = eval("context.%s" % data_path)
+
+ rna_idprop_ui_prop_clear(item, prop_old)
+ exec_str = "del item['%s']" % prop_old
+ # print(exec_str)
+ exec(exec_str)
+
+
+ # Reassign
+ exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
+ # print(exec_str)
+ exec(exec_str)
+ self._last_prop[:] = [prop]
+
+ prop_type = type(item[prop])
+
+ prop_ui = rna_idprop_ui_prop_get(item, prop)
+
+ if prop_type in (float, int):
+
+ prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
+ prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
-classes = [
- MESH_OT_delete_edgeloop,
+ prop_ui['description'] = self.properties.description
+
+ return {'FINISHED'}
+
+ def invoke(self, context, event):
+
+ self._last_prop = [self.properties.property]
+
+ item = eval("context.%s" % self.properties.data_path)
+
+ # setup defaults
+ prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
+ if prop_ui:
+ self.properties.min = prop_ui.get("min", -1000000000)
+ self.properties.max = prop_ui.get("max", 1000000000)
+ self.properties.description = prop_ui.get("description", "")
+
+ wm = context.manager
+ # This crashes, TODO - fix
+ #return wm.invoke_props_popup(self, event)
+
+ wm.invoke_props_popup(self, event)
+ return {'RUNNING_MODAL'}
- WM_OT_context_set_boolean,
- WM_OT_context_set_int,
- WM_OT_context_scale_int,
- WM_OT_context_set_float,
- WM_OT_context_set_string,
- WM_OT_context_set_enum,
- WM_OT_context_set_value,
- WM_OT_context_toggle,
- WM_OT_context_toggle_enum,
- WM_OT_context_cycle_enum,
- WM_OT_context_cycle_int,
- WM_OT_context_modal_mouse,
- WM_OT_url_open,
- WM_OT_path_open,
+class WM_OT_properties_add(bpy.types.Operator):
+ '''Internal use (edit a property data_path)'''
+ bl_idname = "wm.properties_add"
+ bl_label = "Add Property"
- WM_OT_doc_view,
- WM_OT_doc_edit,
+ data_path = rna_path
- # experemental!
- rna_prop_ui.WM_OT_properties_edit,
- rna_prop_ui.WM_OT_properties_add,
- rna_prop_ui.WM_OT_properties_remove]
+ def execute(self, context):
+ item = eval("context.%s" % self.properties.data_path)
+
+ def unique_name(names):
+ prop = 'prop'
+ prop_new = prop
+ i = 1
+ while prop_new in names:
+ prop_new = prop + str(i)
+ i += 1
+
+ return prop_new
+
+ property = unique_name(item.keys())
+
+ item[property] = 1.0
+ return {'FINISHED'}
+class WM_OT_properties_remove(bpy.types.Operator):
+ '''Internal use (edit a property data_path)'''
+ bl_idname = "wm.properties_remove"
+ bl_label = "Remove Property"
+
+ data_path = rna_path
+ property = rna_property
+
+ def execute(self, context):
+ item = eval("context.%s" % self.properties.data_path)
+ del item[self.properties.property]
+ return {'FINISHED'}
+
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/templates/operator.py b/release/scripts/templates/operator.py
index e20b92c9b6a..038e76bd6d3 100644
--- a/release/scripts/templates/operator.py
+++ b/release/scripts/templates/operator.py
@@ -55,7 +55,6 @@ class ExportSomeData(bpy.types.Operator):
-bpy.types.register(ExportSomeData)
# Only needed if you want to add into a dynamic menu
menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...")
diff --git a/release/scripts/templates/operator_simple.py b/release/scripts/templates/operator_simple.py
index 985a628c2d0..739c1aa7d26 100644
--- a/release/scripts/templates/operator_simple.py
+++ b/release/scripts/templates/operator_simple.py
@@ -17,10 +17,10 @@ class SimpleOperator(bpy.types.Operator):
return {'FINISHED'}
def register():
- bpy.types.register(SimpleOperator)
+ pass
def unregister():
- bpy.types.unregister(SimpleOperator)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/templates/operator_uv.py b/release/scripts/templates/operator_uv.py
index 9327de33312..395b0bb3f24 100644
--- a/release/scripts/templates/operator_uv.py
+++ b/release/scripts/templates/operator_uv.py
@@ -37,7 +37,6 @@ class UvOperator(bpy.types.Operator):
main(context)
return {'FINISHED'}
-bpy.types.register(UvOperator)
if __name__ == "__main__":
bpy.ops.uv.simple_operator()
diff --git a/release/scripts/templates/panel_simple.py b/release/scripts/templates/panel_simple.py
index aac4b6e715e..531f9f1a106 100644
--- a/release/scripts/templates/panel_simple.py
+++ b/release/scripts/templates/panel_simple.py
@@ -19,4 +19,3 @@ class OBJECT_PT_hello(bpy.types.Panel):
row = layout.row()
row.prop(obj, "name")
-bpy.types.register(OBJECT_PT_hello)
diff --git a/release/scripts/ui/properties_animviz.py b/release/scripts/ui/properties_animviz.py
index 9eb046cc2c8..e15b7354cee 100644
--- a/release/scripts/ui/properties_animviz.py
+++ b/release/scripts/ui/properties_animviz.py
@@ -25,7 +25,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
# Generic Panels (Independent of DataType)
-class MotionPathButtonsPanel(bpy.types.Panel):
+class MotionPathButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = "Motion Paths"
@@ -67,7 +67,7 @@ class MotionPathButtonsPanel(bpy.types.Panel):
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
-class OnionSkinButtonsPanel(bpy.types.Panel):
+class OnionSkinButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = "Onion Skinning"
@@ -102,119 +102,19 @@ class OnionSkinButtonsPanel(bpy.types.Panel):
col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only")
-################################################
-# Specific Panels for DataTypes
-
-
-class OBJECT_PT_motion_paths(MotionPathButtonsPanel):
- #bl_label = "Object Motion Paths"
- bl_context = "object"
-
- def poll(self, context):
- return (context.object)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- wide_ui = context.region.width > narrowui
-
- self.draw_settings(context, ob.animation_visualisation, wide_ui)
-
- layout.separator()
-
- split = layout.split()
-
- col = split.column()
- col.operator("object.paths_calculate", text="Calculate Paths")
-
- if wide_ui:
- col = split.column()
- col.operator("object.paths_clear", text="Clear Paths")
-
-
-class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):
- #bl_label = "Object Onion Skinning"
- bl_context = "object"
-
- def poll(self, context):
- return (context.object)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- wide_ui = context.region.width > narrowui
-
- self.draw_settings(context, ob.animation_visualisation, wide_ui)
-class DATA_PT_motion_paths(MotionPathButtonsPanel):
- #bl_label = "Bones Motion Paths"
- bl_context = "data"
-
- def poll(self, context):
- # XXX: include posemode check?
- return (context.object) and (context.armature)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- wide_ui = context.region.width > narrowui
-
- self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
-
- layout.separator()
-
- split = layout.split()
-
- col = split.column()
- col.operator("pose.paths_calculate", text="Calculate Paths")
-
- if wide_ui:
- col = split.column()
- col.operator("pose.paths_clear", text="Clear Paths")
-
-
-class DATA_PT_onion_skinning(OnionSkinButtonsPanel):
- #bl_label = "Bones Onion Skinning"
- bl_context = "data"
-
- def poll(self, context):
- # XXX: include posemode check?
- return (context.object) and (context.armature)
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
- wide_ui = context.region.width > narrowui
-
- self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
-
# NOTE:
-# The specialised panel types defined here (i.e. OBJECT_PT_*, etc.)
-# aren't registered here, but are rather imported to (and registered)
-# in the files defining the contexts where they reside. Otherwise,
-# these panels appear at the top of the lists by default.
-#
-# However, we keep these empty register funcs here just in case
-# something will need them again one day, and also to make
-# it easier to maintain these scripts.
-classes = []
+# The specialised panel types are derived in their respective UI modules
+
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py
index 31ede4adfb5..f32cbe97165 100644
--- a/release/scripts/ui/properties_data_armature.py
+++ b/release/scripts/ui/properties_data_armature.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.armature
-class DATA_PT_context_arm(DataButtonsPanel):
+class DATA_PT_context_arm(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -56,11 +56,11 @@ class DATA_PT_context_arm(DataButtonsPanel):
layout.template_ID(ob, "data")
-class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
-class DATA_PT_skeleton(DataButtonsPanel):
+class DATA_PT_skeleton(DataButtonsPanel, bpy.types.Panel):
bl_label = "Skeleton"
def draw(self, context):
@@ -95,7 +95,7 @@ class DATA_PT_skeleton(DataButtonsPanel):
col.prop(arm, "deform_quaternion", text="Quaternion")
-class DATA_PT_display(DataButtonsPanel):
+class DATA_PT_display(DataButtonsPanel, bpy.types.Panel):
bl_label = "Display"
def draw(self, context):
@@ -124,7 +124,7 @@ class DATA_PT_display(DataButtonsPanel):
col.prop(arm, "delay_deform", text="Delay Refresh")
-class DATA_PT_bone_groups(DataButtonsPanel):
+class DATA_PT_bone_groups(DataButtonsPanel, bpy.types.Panel):
bl_label = "Bone Groups"
def poll(self, context):
@@ -174,7 +174,7 @@ class DATA_PT_bone_groups(DataButtonsPanel):
# TODO: this panel will soon be depreceated too
-class DATA_PT_ghost(DataButtonsPanel):
+class DATA_PT_ghost(DataButtonsPanel, bpy.types.Panel):
bl_label = "Ghost"
def draw(self, context):
@@ -207,7 +207,7 @@ class DATA_PT_ghost(DataButtonsPanel):
col.prop(arm, "ghost_only_selected", text="Selected Only")
-class DATA_PT_iksolver_itasc(DataButtonsPanel):
+class DATA_PT_iksolver_itasc(DataButtonsPanel, bpy.types.Panel):
bl_label = "iTaSC parameters"
bl_default_closed = True
@@ -261,33 +261,58 @@ class DATA_PT_iksolver_itasc(DataButtonsPanel):
row.prop(itasc, "dampmax", text="Damp", slider=True)
row.prop(itasc, "dampeps", text="Eps", slider=True)
-# import generic panels from other files
-from properties_animviz import DATA_PT_motion_paths, DATA_PT_onion_skinning
+from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
-classes = [
- DATA_PT_context_arm,
- DATA_PT_skeleton,
- DATA_PT_display,
- DATA_PT_bone_groups,
- DATA_PT_ghost,
- DATA_PT_iksolver_itasc,
+class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+ #bl_label = "Bones Motion Paths"
+ bl_context = "data"
+
+ def poll(self, context):
+ # XXX: include posemode check?
+ return (context.object) and (context.armature)
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ wide_ui = context.region.width > narrowui
+
+ self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
+
+ layout.separator()
- DATA_PT_motion_paths,
- #DATA_PT_onion_skinning,
+ split = layout.split()
+
+ col = split.column()
+ col.operator("pose.paths_calculate", text="Calculate Paths")
- DATA_PT_custom_props_arm]
+ if wide_ui:
+ col = split.column()
+ col.operator("pose.paths_clear", text="Clear Paths")
+
+
+class DATA_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
+ #bl_label = "Bones Onion Skinning"
+ bl_context = "data"
+
+ def poll(self, context):
+ # XXX: include posemode check?
+ return (context.object) and (context.armature)
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ wide_ui = context.region.width > narrowui
+ self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py
index 5af676d5aa8..8331f2d517b 100644
--- a/release/scripts/ui/properties_data_armature_rigify.py
+++ b/release/scripts/ui/properties_data_armature_rigify.py
@@ -307,33 +307,11 @@ class INFO_MT_armature_metarig_add(bpy.types.Menu):
text = bpy.utils.display_name(submodule_type)
layout.operator("pose.metarig_sample_add", text=text, icon='OUTLINER_OB_ARMATURE').metarig_type = submodule_type
-classes = [
- DATA_PT_template,
-
- PoseTemplateSettings,
- PoseTemplate,
-
- Reload,
- Generate,
- Validate,
- Sample,
- Graph,
- AsScript,
-
- ActiveAssign,
- ActiveClear,
-
- INFO_MT_armature_metarig_add]
-
menu_func = (lambda self, context: self.layout.menu("INFO_MT_armature_metarig_add", icon='OUTLINER_OB_ARMATURE'))
import space_info # ensure the menu is loaded first
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
-
PoseTemplate.StringProperty(attr="name",
name="Name of the slave",
description="",
@@ -361,10 +339,6 @@ def register():
def unregister():
bpy.types.Scene.RemoveProperty("pose_templates")
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
-
space_info.INFO_MT_armature_add.remove(menu_func)
if __name__ == "__main__":
diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py
index a4be7b31042..d68253aac4d 100644
--- a/release/scripts/ui/properties_data_bone.py
+++ b/release/scripts/ui/properties_data_bone.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class BoneButtonsPanel(bpy.types.Panel):
+class BoneButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "bone"
@@ -32,7 +32,7 @@ class BoneButtonsPanel(bpy.types.Panel):
return (context.bone or context.edit_bone)
-class BONE_PT_context_bone(BoneButtonsPanel):
+class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -48,7 +48,7 @@ class BONE_PT_context_bone(BoneButtonsPanel):
row.prop(bone, "name", text="")
-class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel):
+class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
@property
def _context_path(self):
@@ -59,7 +59,7 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel):
return "active_bone"
-class BONE_PT_transform(BoneButtonsPanel):
+class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Transform"
def draw(self, context):
@@ -128,7 +128,7 @@ class BONE_PT_transform(BoneButtonsPanel):
col.prop(pchan, "scale")
-class BONE_PT_transform_locks(BoneButtonsPanel):
+class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Transform Locks"
bl_default_closed = True
@@ -159,7 +159,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel):
row.column().prop(pchan, "lock_scale")
-class BONE_PT_relations(BoneButtonsPanel):
+class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Relations"
def draw(self, context):
@@ -206,7 +206,7 @@ class BONE_PT_relations(BoneButtonsPanel):
sub.prop(bone, "local_location", text="Local Location")
-class BONE_PT_display(BoneButtonsPanel):
+class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Display"
def poll(self, context):
@@ -242,7 +242,7 @@ class BONE_PT_display(BoneButtonsPanel):
col.prop_object(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
-class BONE_PT_inverse_kinematics(BoneButtonsPanel):
+class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Inverse Kinematics"
bl_default_closed = True
@@ -340,7 +340,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
#row.prop(pchan, "ik_lin_weight", text="Weight", slider=True)
-class BONE_PT_deform(BoneButtonsPanel):
+class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Deform"
bl_default_closed = True
@@ -390,28 +390,13 @@ class BONE_PT_deform(BoneButtonsPanel):
col.label(text="Offset:")
col.prop(bone, "cyclic_offset")
-classes = [
- BONE_PT_context_bone,
- BONE_PT_transform,
- BONE_PT_transform_locks,
- BONE_PT_relations,
- BONE_PT_display,
- BONE_PT_inverse_kinematics,
- BONE_PT_deform,
-
- BONE_PT_custom_props]
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py
index 3abd460c427..5152e004f28 100644
--- a/release/scripts/ui/properties_data_camera.py
+++ b/release/scripts/ui/properties_data_camera.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -33,7 +33,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.camera and (engine in self.COMPAT_ENGINES)
-class DATA_PT_context_camera(DataButtonsPanel):
+class DATA_PT_context_camera(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -61,12 +61,12 @@ class DATA_PT_context_camera(DataButtonsPanel):
layout.template_ID(space, "pin_id")
-class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-class DATA_PT_camera(DataButtonsPanel):
+class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lens"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -127,7 +127,7 @@ class DATA_PT_camera(DataButtonsPanel):
col.prop(cam, "dof_distance", text="Distance")
-class DATA_PT_camera_display(DataButtonsPanel):
+class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel):
bl_label = "Display"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -155,24 +155,12 @@ class DATA_PT_camera_display(DataButtonsPanel):
sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
-classes = [
- DATA_PT_context_camera,
- DATA_PT_camera,
- DATA_PT_camera_display,
-
- DATA_PT_custom_props_camera]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py
index fd836f5e5d4..279301ae330 100644
--- a/release/scripts/ui/properties_data_curve.py
+++ b/release/scripts/ui/properties_data_curve.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -47,7 +47,7 @@ class DataButtonsPanelActive(DataButtonsPanel):
return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
-class DATA_PT_context_curve(DataButtonsPanel):
+class DATA_PT_context_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -73,11 +73,11 @@ class DATA_PT_context_curve(DataButtonsPanel):
layout.template_ID(ob, "data")
-class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
-class DATA_PT_shape_curve(DataButtonsPanel):
+class DATA_PT_shape_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shape"
def draw(self, context):
@@ -130,7 +130,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
col.prop(curve, "auto_texspace")
-class DATA_PT_geometry_curve(DataButtonsPanel):
+class DATA_PT_geometry_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Geometry"
def poll(self, context):
@@ -164,7 +164,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
col.prop(curve, "bevel_object", text="")
-class DATA_PT_pathanim(DataButtonsPanelCurve):
+class DATA_PT_pathanim(DataButtonsPanelCurve, bpy.types.Panel):
bl_label = "Path Animation"
def draw_header(self, context):
@@ -196,7 +196,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
col.prop(curve, "use_time_offset", text="Offset Children")
-class DATA_PT_active_spline(DataButtonsPanelActive):
+class DATA_PT_active_spline(DataButtonsPanelActive, bpy.types.Panel):
bl_label = "Active Spline"
def draw(self, context):
@@ -267,7 +267,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
layout.prop(act_spline, "smooth")
-class DATA_PT_font(DataButtonsPanel):
+class DATA_PT_font(DataButtonsPanel, bpy.types.Panel):
bl_label = "Font"
def poll(self, context):
@@ -329,7 +329,7 @@ class DATA_PT_font(DataButtonsPanel):
col.prop(char, "use_small_caps")
-class DATA_PT_paragraph(DataButtonsPanel):
+class DATA_PT_paragraph(DataButtonsPanel, bpy.types.Panel):
bl_label = "Paragraph"
def poll(self, context):
@@ -362,7 +362,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
col.prop(text, "offset_y", text="Y")
-class DATA_PT_textboxes(DataButtonsPanel):
+class DATA_PT_textboxes(DataButtonsPanel, bpy.types.Panel):
bl_label = "Text Boxes"
def poll(self, context):
@@ -404,29 +404,12 @@ class DATA_PT_textboxes(DataButtonsPanel):
row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
-classes = [
- DATA_PT_context_curve,
- DATA_PT_shape_curve,
- DATA_PT_geometry_curve,
- DATA_PT_pathanim,
- DATA_PT_active_spline,
- DATA_PT_font,
- DATA_PT_paragraph,
- DATA_PT_textboxes,
-
- DATA_PT_custom_props_curve]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_empty.py b/release/scripts/ui/properties_data_empty.py
index 577e32ed840..0a246f237a8 100644
--- a/release/scripts/ui/properties_data_empty.py
+++ b/release/scripts/ui/properties_data_empty.py
@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -31,7 +31,7 @@ class DataButtonsPanel(bpy.types.Panel):
return (context.object and context.object.type == 'EMPTY')
-class DATA_PT_empty(DataButtonsPanel):
+class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
bl_label = "Empty"
def draw(self, context):
@@ -48,20 +48,13 @@ class DATA_PT_empty(DataButtonsPanel):
layout.prop(ob, "empty_draw_size", text="Size")
-classes = [
- DATA_PT_empty]
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py
index 14493301b1e..e72739f5ec7 100644
--- a/release/scripts/ui/properties_data_lamp.py
+++ b/release/scripts/ui/properties_data_lamp.py
@@ -31,7 +31,7 @@ class LAMP_MT_sunsky_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -40,16 +40,14 @@ class DataButtonsPanel(bpy.types.Panel):
engine = context.scene.render.engine
return context.lamp and (engine in self.COMPAT_ENGINES)
-
-class DATA_PT_preview(DataButtonsPanel):
+class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
self.layout.template_preview(context.lamp)
-
-class DATA_PT_context_lamp(DataButtonsPanel):
+class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -77,12 +75,12 @@ class DATA_PT_context_lamp(DataButtonsPanel):
layout.template_ID(space, "pin_id")
-class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-class DATA_PT_lamp(DataButtonsPanel):
+class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lamp"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -129,7 +127,7 @@ class DATA_PT_lamp(DataButtonsPanel):
col.prop(lamp, "diffuse")
-class DATA_PT_sunsky(DataButtonsPanel):
+class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
bl_label = "Sky & Atmosphere"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -202,7 +200,7 @@ class DATA_PT_sunsky(DataButtonsPanel):
sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
-class DATA_PT_shadow(DataButtonsPanel):
+class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shadow"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -327,7 +325,7 @@ class DATA_PT_shadow(DataButtonsPanel):
sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
-class DATA_PT_area(DataButtonsPanel):
+class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
bl_label = "Area Shape"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -354,7 +352,7 @@ class DATA_PT_area(DataButtonsPanel):
sub.prop(lamp, "size_y", text="Size Y")
-class DATA_PT_spot(DataButtonsPanel):
+class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
bl_label = "Spot Shape"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -390,7 +388,7 @@ class DATA_PT_spot(DataButtonsPanel):
sub.prop(lamp, "halo_step", text="Step")
-class DATA_PT_falloff_curve(DataButtonsPanel):
+class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Falloff Curve"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -407,31 +405,12 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
self.layout.template_curve_mapping(lamp, "falloff_curve")
-classes = [
- LAMP_MT_sunsky_presets,
-
- DATA_PT_context_lamp,
- DATA_PT_preview,
- DATA_PT_lamp,
- DATA_PT_falloff_curve,
- DATA_PT_area,
- DATA_PT_spot,
- DATA_PT_shadow,
- DATA_PT_sunsky,
-
- DATA_PT_custom_props_lamp]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py
index 2aa719437a7..4bc6d9865e0 100644
--- a/release/scripts/ui/properties_data_lattice.py
+++ b/release/scripts/ui/properties_data_lattice.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.lattice
-class DATA_PT_context_lattice(DataButtonsPanel):
+class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -59,11 +59,11 @@ class DATA_PT_context_lattice(DataButtonsPanel):
layout.template_ID(space, "pin_id")
-class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
-class DATA_PT_lattice(DataButtonsPanel):
+class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lattice"
def draw(self, context):
@@ -98,23 +98,12 @@ class DATA_PT_lattice(DataButtonsPanel):
row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")
-classes = [
- DATA_PT_context_lattice,
- DATA_PT_lattice,
-
- DATA_PT_custom_props_lattice]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py
index c3170be8860..b3d5215db58 100644
--- a/release/scripts/ui/properties_data_mesh.py
+++ b/release/scripts/ui/properties_data_mesh.py
@@ -49,7 +49,7 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -59,7 +59,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.mesh and (engine in self.COMPAT_ENGINES)
-class DATA_PT_context_mesh(DataButtonsPanel):
+class DATA_PT_context_mesh(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -87,12 +87,12 @@ class DATA_PT_context_mesh(DataButtonsPanel):
layout.template_ID(space, "pin_id")
-class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-class DATA_PT_normals(DataButtonsPanel):
+class DATA_PT_normals(DataButtonsPanel, bpy.types.Panel):
bl_label = "Normals"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -117,7 +117,7 @@ class DATA_PT_normals(DataButtonsPanel):
col.prop(mesh, "double_sided")
-class DATA_PT_settings(DataButtonsPanel):
+class DATA_PT_settings(DataButtonsPanel, bpy.types.Panel):
bl_label = "Settings"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -129,7 +129,7 @@ class DATA_PT_settings(DataButtonsPanel):
layout.prop(mesh, "texture_mesh")
-class DATA_PT_vertex_groups(DataButtonsPanel):
+class DATA_PT_vertex_groups(DataButtonsPanel, bpy.types.Panel):
bl_label = "Vertex Groups"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -176,7 +176,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
-class DATA_PT_shape_keys(DataButtonsPanel):
+class DATA_PT_shape_keys(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shape Keys"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -274,7 +274,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
row.prop(key, "slurph")
-class DATA_PT_uv_texture(DataButtonsPanel):
+class DATA_PT_uv_texture(DataButtonsPanel, bpy.types.Panel):
bl_label = "UV Texture"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -344,7 +344,7 @@ class DATA_PT_texface(DataButtonsPanel):
col.label(text="No UV Texture")
-class DATA_PT_vertex_colors(DataButtonsPanel):
+class DATA_PT_vertex_colors(DataButtonsPanel, bpy.types.Panel):
bl_label = "Vertex Colors"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -367,32 +367,12 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
layout.prop(lay, "name")
-classes = [
- MESH_MT_vertex_group_specials,
- MESH_MT_shape_key_specials,
-
- DATA_PT_context_mesh,
- DATA_PT_normals,
- DATA_PT_settings,
- DATA_PT_vertex_groups,
- DATA_PT_shape_keys,
- DATA_PT_uv_texture,
- DATA_PT_texface,
- DATA_PT_vertex_colors,
-
- DATA_PT_custom_props_mesh]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py
index e0155059b98..1cce0cea66f 100644
--- a/release/scripts/ui/properties_data_metaball.py
+++ b/release/scripts/ui/properties_data_metaball.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.meta_ball
-class DATA_PT_context_metaball(DataButtonsPanel):
+class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -59,11 +59,11 @@ class DATA_PT_context_metaball(DataButtonsPanel):
layout.template_ID(space, "pin_id")
-class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data"
-class DATA_PT_metaball(DataButtonsPanel):
+class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
bl_label = "Metaball"
def draw(self, context):
@@ -92,7 +92,7 @@ class DATA_PT_metaball(DataButtonsPanel):
layout.prop(mball, "flag", text="")
-class DATA_PT_metaball_element(DataButtonsPanel):
+class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
bl_label = "Active Element"
def poll(self, context):
@@ -136,24 +136,12 @@ class DATA_PT_metaball_element(DataButtonsPanel):
col.prop(metaelem, "size_y", text="Y")
-classes = [
- DATA_PT_context_metaball,
- DATA_PT_metaball,
- DATA_PT_metaball_element,
-
- DATA_PT_custom_props_metaball]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py
index 37764e20854..ea0fb606aa4 100644
--- a/release/scripts/ui/properties_data_modifier.py
+++ b/release/scripts/ui/properties_data_modifier.py
@@ -23,13 +23,13 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
narrowmod = 260
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "modifier"
-class DATA_PT_modifiers(DataButtonsPanel):
+class DATA_PT_modifiers(DataButtonsPanel, bpy.types.Panel):
bl_label = "Modifiers"
def draw(self, context):
@@ -766,20 +766,12 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.prop(md, "narrowness", slider=True)
-classes = [
- DATA_PT_modifiers]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_game.py b/release/scripts/ui/properties_game.py
index 88803993c92..b12f368f5f4 100644
--- a/release/scripts/ui/properties_game.py
+++ b/release/scripts/ui/properties_game.py
@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check
-class PhysicsButtonsPanel(bpy.types.Panel):
+class PhysicsButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicsButtonsPanel(bpy.types.Panel):
return ob and ob.game and (rd.engine in self.COMPAT_ENGINES)
-class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
+class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -162,7 +162,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
layout.prop(ob, "hide_render", text="Invisible")
-class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
+class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
bl_label = "Collision Bounds"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -198,7 +198,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
col.prop(game, "collision_compound", text="Compound")
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "render"
@@ -208,7 +208,7 @@ class RenderButtonsPanel(bpy.types.Panel):
return (rd.engine in self.COMPAT_ENGINES)
-class RENDER_PT_game(RenderButtonsPanel):
+class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Game"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -220,7 +220,7 @@ class RENDER_PT_game(RenderButtonsPanel):
row.label()
-class RENDER_PT_game_player(RenderButtonsPanel):
+class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Standalone Player"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -258,7 +258,7 @@ class RENDER_PT_game_player(RenderButtonsPanel):
col.prop(gs, "framing_color", text="")
-class RENDER_PT_game_stereo(RenderButtonsPanel):
+class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Stereo"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -318,7 +318,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel):
layout.prop(gs, "dome_text")
-class RENDER_PT_game_shading(RenderButtonsPanel):
+class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -347,7 +347,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel):
col.prop(gs, "glsl_extra_textures", text="Extra Textures")
-class RENDER_PT_game_performance(RenderButtonsPanel):
+class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Performance"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -373,7 +373,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel):
col.prop(gs, "use_display_lists")
-class RENDER_PT_game_sound(RenderButtonsPanel):
+class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Sound"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -391,7 +391,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel):
layout.prop(scene, "doppler_factor")
-class WorldButtonsPanel(bpy.types.Panel):
+class WorldButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "world"
@@ -401,7 +401,7 @@ class WorldButtonsPanel(bpy.types.Panel):
return (scene.render.engine in self.COMPAT_ENGINES) and (scene.world is not None)
-class WORLD_PT_game_context_world(WorldButtonsPanel):
+class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -431,7 +431,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel):
layout.template_ID(space, "pin_id")
-class WORLD_PT_game_world(WorldButtonsPanel):
+class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "World"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -451,7 +451,7 @@ class WORLD_PT_game_world(WorldButtonsPanel):
col.prop(world, "ambient_color")
-class WORLD_PT_game_mist(WorldButtonsPanel):
+class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -477,7 +477,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel):
col.prop(world.mist, "depth")
-class WORLD_PT_game_physics(WorldButtonsPanel):
+class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -523,33 +523,12 @@ class WORLD_PT_game_physics(WorldButtonsPanel):
col.prop(gs, "logic_step_max", text="Max")
-classes = [
- PHYSICS_PT_game_physics,
- PHYSICS_PT_game_collision_bounds,
-
- RENDER_PT_game,
- RENDER_PT_game_player,
- RENDER_PT_game_stereo,
- RENDER_PT_game_shading,
- RENDER_PT_game_performance,
- RENDER_PT_game_sound,
-
- WORLD_PT_game_context_world,
- WORLD_PT_game_world,
- WORLD_PT_game_mist,
- WORLD_PT_game_physics]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py
index 8d379491983..31dc23563bd 100644
--- a/release/scripts/ui/properties_material.py
+++ b/release/scripts/ui/properties_material.py
@@ -54,7 +54,7 @@ class MATERIAL_MT_specials(bpy.types.Menu):
layout.operator("material.paste", icon='PASTEDOWN')
-class MaterialButtonsPanel(bpy.types.Panel):
+class MaterialButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "material"
@@ -66,7 +66,7 @@ class MaterialButtonsPanel(bpy.types.Panel):
return mat and (engine in self.COMPAT_ENGINES)
-class MATERIAL_PT_preview(MaterialButtonsPanel):
+class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -74,7 +74,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
self.layout.template_preview(context.material)
-class MATERIAL_PT_context_material(MaterialButtonsPanel):
+class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -141,12 +141,12 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
layout.prop(mat, "type", text="")
-class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel):
+class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "material"
-class MATERIAL_PT_shading(MaterialButtonsPanel):
+class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -184,7 +184,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
layout.prop(mat, "alpha")
-class MATERIAL_PT_strand(MaterialButtonsPanel):
+class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Strand"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -233,7 +233,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
sub.prop(tan, "blend_distance", text="Distance")
-class MATERIAL_PT_physics(MaterialButtonsPanel):
+class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -257,7 +257,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
col.prop(phys, "damp", slider=True)
-class MATERIAL_PT_options(MaterialButtonsPanel):
+class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -302,7 +302,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
col.prop(mat, "object_color")
-class MATERIAL_PT_shadow(MaterialButtonsPanel):
+class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Shadow"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -339,8 +339,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
col.prop(mat, "cast_approximate")
-
-class MATERIAL_PT_diffuse(MaterialButtonsPanel):
+class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Diffuse"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -411,7 +410,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
row.prop(mat, "diffuse_ramp_factor", text="Factor")
-class MATERIAL_PT_specular(MaterialButtonsPanel):
+class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Specular"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -480,7 +479,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
row.prop(mat, "specular_ramp_factor", text="Factor")
-class MATERIAL_PT_sss(MaterialButtonsPanel):
+class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Subsurface Scattering"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -532,7 +531,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
col.prop(sss, "error_tolerance", text="Error")
-class MATERIAL_PT_mirror(MaterialButtonsPanel):
+class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Mirror"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -592,7 +591,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
-class MATERIAL_PT_transp(MaterialButtonsPanel):
+class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Transparency"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -659,7 +658,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
sub.prop(rayt, "gloss_samples", text="Samples")
-class MATERIAL_PT_transp_game(MaterialButtonsPanel):
+class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Transparency"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -694,7 +693,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel):
col.prop(mat, "alpha")
-class MATERIAL_PT_halo(MaterialButtonsPanel):
+class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Halo"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -744,7 +743,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
sub.prop(halo, "star_tips")
-class MATERIAL_PT_flare(MaterialButtonsPanel):
+class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Flare"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -779,7 +778,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
col.prop(halo, "flare_subsize", text="Subsize")
-class VolumeButtonsPanel(bpy.types.Panel):
+class VolumeButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "material"
@@ -790,7 +789,7 @@ class VolumeButtonsPanel(bpy.types.Panel):
return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
-class MATERIAL_PT_volume_density(VolumeButtonsPanel):
+class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Density"
bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -810,7 +809,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel):
col.prop(vol, "density_scale")
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
+class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -838,7 +837,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
sub.prop(vol, "reflection_color", text="")
-class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
+class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Lighting"
bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -876,7 +875,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
sub.prop(vol, "ms_intensity")
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
+class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Transparency"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -892,7 +891,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
layout.prop(mat, "transparency_method", text="")
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
+class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Integration"
bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -917,7 +916,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col.prop(vol, "depth_cutoff")
-class MATERIAL_PT_volume_options(VolumeButtonsPanel):
+class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
bl_default_closed = True
@@ -943,46 +942,12 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel):
row.prop(mat, "light_group_exclusive", text="Exclusive")
-classes = [
- MATERIAL_PT_context_material,
- MATERIAL_PT_preview,
- MATERIAL_PT_diffuse,
- MATERIAL_PT_specular,
- MATERIAL_PT_shading,
- MATERIAL_PT_transp,
- MATERIAL_PT_mirror,
- MATERIAL_PT_sss,
- MATERIAL_PT_halo,
- MATERIAL_PT_flare,
- MATERIAL_PT_physics,
- MATERIAL_PT_strand,
- MATERIAL_PT_options,
- MATERIAL_PT_shadow,
- MATERIAL_PT_transp_game,
-
- MATERIAL_MT_sss_presets,
- MATERIAL_MT_specials,
-
- MATERIAL_PT_volume_density,
- MATERIAL_PT_volume_shading,
- MATERIAL_PT_volume_lighting,
- MATERIAL_PT_volume_transp,
- MATERIAL_PT_volume_integration,
- MATERIAL_PT_volume_options,
-
- MATERIAL_PT_custom_props]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py
index 4e60879d665..f09de20c8f3 100644
--- a/release/scripts/ui/properties_object.py
+++ b/release/scripts/ui/properties_object.py
@@ -23,13 +23,13 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class ObjectButtonsPanel(bpy.types.Panel):
+class ObjectButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
-class OBJECT_PT_context_object(ObjectButtonsPanel):
+class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -46,11 +46,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
row.prop(ob, "name", text="")
-class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel):
- _context_path = "object"
-
-
-class OBJECT_PT_transform(ObjectButtonsPanel):
+class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Transform"
def draw(self, context):
@@ -90,7 +86,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
col.prop(ob, "scale")
-class OBJECT_PT_transform_locks(ObjectButtonsPanel):
+class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Transform Locks"
bl_default_closed = True
@@ -117,7 +113,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel):
row.column().prop(ob, "lock_scale", text="Scale")
-class OBJECT_PT_relations(ObjectButtonsPanel):
+class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Relations"
def draw(self, context):
@@ -146,7 +142,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel):
sub.active = (parent is not None)
-class OBJECT_PT_groups(ObjectButtonsPanel):
+class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Groups"
def draw(self, context):
@@ -187,7 +183,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
index += 1
-class OBJECT_PT_display(ObjectButtonsPanel):
+class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Display"
def draw(self, context):
@@ -223,7 +219,7 @@ class OBJECT_PT_display(ObjectButtonsPanel):
col.prop(ob, "draw_transparent", text="Transparency")
-class OBJECT_PT_duplication(ObjectButtonsPanel):
+class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Duplication"
def draw(self, context):
@@ -272,8 +268,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
# XXX: the following options are all quite buggy, ancient hacks that should be dropped
-
-class OBJECT_PT_animation(ObjectButtonsPanel):
+class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Animation Hacks"
bl_default_closed = True
@@ -306,36 +301,60 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
col.prop(ob, "track_axis", text="Axis")
col.prop(ob, "up_axis", text="Up Axis")
+from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
+
+
+class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+ #bl_label = "Object Motion Paths"
+ bl_context = "object"
+
+ def poll(self, context):
+ return (context.object)
-# import generic panels from other files
-from properties_animviz import OBJECT_PT_motion_paths, OBJECT_PT_onion_skinning
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ wide_ui = context.region.width > narrowui
+
+ self.draw_settings(context, ob.animation_visualisation, wide_ui)
-classes = [
- OBJECT_PT_context_object,
- OBJECT_PT_transform,
- OBJECT_PT_transform_locks,
- OBJECT_PT_relations,
- OBJECT_PT_groups,
- OBJECT_PT_display,
- OBJECT_PT_duplication,
- OBJECT_PT_animation, # XXX: panel of old hacks pending to be removed...
+ layout.separator()
- OBJECT_PT_motion_paths,
- #OBJECT_PT_onion_skinning,
+ split = layout.split()
- OBJECT_PT_custom_props]
+ col = split.column()
+ col.operator("object.paths_calculate", text="Calculate Paths")
+ if wide_ui:
+ col = split.column()
+ col.operator("object.paths_clear", text="Clear Paths")
+
+
+class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
+ #bl_label = "Object Onion Skinning"
+ bl_context = "object"
+
+ def poll(self, context):
+ return (context.object)
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ wide_ui = context.region.width > narrowui
+
+ self.draw_settings(context, ob.animation_visualisation, wide_ui)
+
+class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel):
+ _context_path = "object"
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index edeadb9326b..bc8fd6ad9da 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -23,7 +23,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
narrowcon = 260
-class ConstraintButtonsPanel(bpy.types.Panel):
+class ConstraintButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "constraint"
@@ -749,8 +749,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
col = layout.column()
col.prop(con, "enabled_rotation_range", text="Pivot When")
-
-class OBJECT_PT_constraints(ConstraintButtonsPanel):
+class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
bl_label = "Object Constraints"
bl_context = "constraint"
@@ -768,7 +767,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(context, con)
-class BONE_PT_constraints(ConstraintButtonsPanel):
+class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
bl_label = "Bone Constraints"
bl_context = "bone_constraint"
@@ -784,21 +783,12 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(context, con)
-classes = [
- OBJECT_PT_constraints,
- BONE_PT_constraints]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py
index f858c9b8511..ed516b49dea 100644
--- a/release/scripts/ui/properties_particle.py
+++ b/release/scripts/ui/properties_particle.py
@@ -42,7 +42,7 @@ def particle_panel_poll(panel, context):
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES)
-class ParticleButtonsPanel(bpy.types.Panel):
+class ParticleButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "particle"
@@ -51,7 +51,7 @@ class ParticleButtonsPanel(bpy.types.Panel):
return particle_panel_poll(self, context)
-class PARTICLE_PT_context_particles(ParticleButtonsPanel):
+class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -136,12 +136,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel):
split.prop(psys, "reactor_target_particle_system", text="Particle System")
-class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel):
+class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings"
-class PARTICLE_PT_emission(ParticleButtonsPanel):
+class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Emission"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -203,7 +203,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
row.prop(part, "grid_resolution")
-class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
+class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Hair dynamics"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -260,7 +260,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
col.prop(cloth, "quality", text="Steps", slider=True)
-class PARTICLE_PT_cache(ParticleButtonsPanel):
+class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Cache"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -283,7 +283,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS')
-class PARTICLE_PT_velocity(ParticleButtonsPanel):
+class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Velocity"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -330,7 +330,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel):
# sub.prop(part, "reaction_shape", slider=True)
-class PARTICLE_PT_rotation(ParticleButtonsPanel):
+class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Rotation"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -376,7 +376,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
sub.prop(part, "angular_velocity_factor", text="")
-class PARTICLE_PT_physics(ParticleButtonsPanel):
+class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -573,7 +573,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.prop(key, "system", text="System")
-class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
+class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Boid Brain"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -673,7 +673,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
row.prop(rule, "flee_distance")
-class PARTICLE_PT_render(ParticleButtonsPanel):
+class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -843,7 +843,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
col.label(text="")
-class PARTICLE_PT_draw(ParticleButtonsPanel):
+class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Display"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -902,7 +902,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
#sub.label(text="Override material color")
-class PARTICLE_PT_children(ParticleButtonsPanel):
+class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Children"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -987,7 +987,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
col.prop(part, "kink_shape", slider=True)
-class PARTICLE_PT_field_weights(ParticleButtonsPanel):
+class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Field Weights"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1000,7 +1000,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel):
self.layout.prop(part.effector_weights, "do_growing_hair")
-class PARTICLE_PT_force_fields(ParticleButtonsPanel):
+class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Force Field Settings"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1028,7 +1028,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel):
basic_force_field_falloff_ui(self, context, part.force_field_2)
-class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
+class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Vertexgroups"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1096,35 +1096,12 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
row.prop(psys, "vertex_group_field_negate", text="")
-classes = [
- PARTICLE_PT_context_particles,
- PARTICLE_PT_hair_dynamics,
- PARTICLE_PT_cache,
- PARTICLE_PT_emission,
- PARTICLE_PT_velocity,
- PARTICLE_PT_rotation,
- PARTICLE_PT_physics,
- PARTICLE_PT_boidbrain,
- PARTICLE_PT_render,
- PARTICLE_PT_draw,
- PARTICLE_PT_children,
- PARTICLE_PT_field_weights,
- PARTICLE_PT_force_fields,
- PARTICLE_PT_vertexgroups,
-
- PARTICLE_PT_custom_props]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py
index 61e1fe81812..af393c0d239 100644
--- a/release/scripts/ui/properties_physics_cloth.py
+++ b/release/scripts/ui/properties_physics_cloth.py
@@ -40,7 +40,7 @@ class CLOTH_MT_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -51,7 +51,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-class PHYSICS_PT_cloth(PhysicButtonsPanel):
+class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth"
def draw(self, context):
@@ -133,7 +133,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
col.prop_object(cloth, "rest_shape_key", key, "keys", text="")
-class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Cache"
bl_default_closed = True
@@ -145,7 +145,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
-class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Collision"
bl_default_closed = True
@@ -185,7 +185,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
layout.prop(cloth, "group")
-class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Stiffness Scaling"
bl_default_closed = True
@@ -222,7 +222,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
col.prop(cloth, "bending_stiffness_max", text="Max")
-class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Field Weights"
bl_default_closed = True
@@ -234,26 +234,12 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, cloth.effector_weights)
-classes = [
- CLOTH_MT_presets,
-
- PHYSICS_PT_cloth,
- PHYSICS_PT_cloth_cache,
- PHYSICS_PT_cloth_collision,
- PHYSICS_PT_cloth_stiffness,
- PHYSICS_PT_cloth_field_weights]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_physics_field.py b/release/scripts/ui/properties_physics_field.py
index 57fa40e4c5d..963fbe08226 100644
--- a/release/scripts/ui/properties_physics_field.py
+++ b/release/scripts/ui/properties_physics_field.py
@@ -26,7 +26,7 @@ from properties_physics_common import basic_force_field_settings_ui
from properties_physics_common import basic_force_field_falloff_ui
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -36,7 +36,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (context.object) and (not rd.use_game_engine)
-class PHYSICS_PT_field(PhysicButtonsPanel):
+class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Force Fields"
def draw(self, context):
@@ -169,7 +169,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub.prop(field, "radial_maximum", text="Distance")
-class PHYSICS_PT_collision(PhysicButtonsPanel):
+class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Collision"
#bl_default_closed = True
@@ -243,21 +243,12 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
col.prop(settings, "absorption", text="Absorption")
-classes = [
- PHYSICS_PT_field,
- PHYSICS_PT_collision]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_physics_fluid.py b/release/scripts/ui/properties_physics_fluid.py
index 32acd88654d..c24052c59fe 100644
--- a/release/scripts/ui/properties_physics_fluid.py
+++ b/release/scripts/ui/properties_physics_fluid.py
@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-class PHYSICS_PT_fluid(PhysicButtonsPanel):
+class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Fluid"
def draw(self, context):
@@ -216,7 +216,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
sub.prop(fluid, "velocity_radius", text="Radius")
-class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
+class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain World"
bl_default_closed = True
@@ -267,7 +267,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
col.prop(fluid, "compressibility", slider=True)
-class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
+class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain Boundary"
bl_default_closed = True
@@ -296,7 +296,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
col.prop(fluid, "surface_subdivisions", text="Subdivisions")
-class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
+class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain Particles"
bl_default_closed = True
@@ -314,23 +314,12 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
col.prop(fluid, "generate_particles")
-classes = [
- PHYSICS_PT_fluid,
- PHYSICS_PT_domain_gravity,
- PHYSICS_PT_domain_boundary,
- PHYSICS_PT_domain_particles]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py
index 9bae4c5b63f..5709a239858 100644
--- a/release/scripts/ui/properties_physics_smoke.py
+++ b/release/scripts/ui/properties_physics_smoke.py
@@ -26,7 +26,7 @@ from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -37,7 +37,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-class PHYSICS_PT_smoke(PhysicButtonsPanel):
+class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke"
def draw(self, context):
@@ -126,7 +126,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
# layout.separator()
-class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Groups"
bl_default_closed = True
@@ -155,7 +155,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
col.prop(group, "coll_group", text="")
-class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Cache"
bl_default_closed = True
@@ -175,7 +175,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
-class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke High Resolution"
bl_default_closed = True
@@ -211,7 +211,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
col.prop(md, "strength")
-class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke High Resolution Cache"
bl_default_closed = True
@@ -231,7 +231,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
-class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Field Weights"
bl_default_closed = True
@@ -244,25 +244,12 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, domain.effector_weights)
-classes = [
- PHYSICS_PT_smoke,
- PHYSICS_PT_smoke_field_weights,
- PHYSICS_PT_smoke_cache,
- PHYSICS_PT_smoke_highres,
- PHYSICS_PT_smoke_groups,
- PHYSICS_PT_smoke_cache_highres]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py
index 60149cf533b..5e7aae26630 100644
--- a/release/scripts/ui/properties_physics_softbody.py
+++ b/release/scripts/ui/properties_physics_softbody.py
@@ -30,7 +30,7 @@ def softbody_panel_enabled(md):
return (md.point_cache.baked is False)
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
@@ -43,7 +43,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine)
-class PHYSICS_PT_softbody(PhysicButtonsPanel):
+class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body"
def draw(self, context):
@@ -88,7 +88,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col.prop(softbody, "speed")
-class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Cache"
bl_default_closed = True
@@ -100,7 +100,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
-class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Goal"
bl_default_closed = True
@@ -144,7 +144,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
layout.prop_object(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
-class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Edges"
bl_default_closed = True
@@ -199,7 +199,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
col.prop(softbody, "face_collision", text="Face")
-class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Self Collision"
bl_default_closed = True
@@ -234,7 +234,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
col.prop(softbody, "ball_damp", text="Dampening")
-class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Solver"
bl_default_closed = True
@@ -271,7 +271,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout.prop(softbody, "estimate_matrix")
-class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Field Weights"
bl_default_closed = True
@@ -285,26 +285,12 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, softbody.effector_weights)
-classes = [
- PHYSICS_PT_softbody,
- PHYSICS_PT_softbody_cache,
- PHYSICS_PT_softbody_goal,
- PHYSICS_PT_softbody_edge,
- PHYSICS_PT_softbody_collision,
- PHYSICS_PT_softbody_solver,
- PHYSICS_PT_softbody_field_weights]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py
index 9a153875756..4e6596957d7 100644
--- a/release/scripts/ui/properties_render.py
+++ b/release/scripts/ui/properties_render.py
@@ -36,7 +36,7 @@ class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "render"
@@ -47,7 +47,7 @@ class RenderButtonsPanel(bpy.types.Panel):
return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES)
-class RENDER_PT_render(RenderButtonsPanel):
+class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -69,7 +69,7 @@ class RENDER_PT_render(RenderButtonsPanel):
layout.prop(rd, "display_mode", text="Display")
-class RENDER_PT_layers(RenderButtonsPanel):
+class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Layers"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -174,7 +174,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
row.prop(rl, "pass_refraction_exclude", text="")
-class RENDER_PT_shading(RenderButtonsPanel):
+class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -199,7 +199,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
col.prop(rd, "alpha_mode", text="Alpha")
-class RENDER_PT_performance(RenderButtonsPanel):
+class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Performance"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -243,7 +243,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
sub.prop(rd, "use_local_coords", text="Local Coordinates")
-class RENDER_PT_post_processing(RenderButtonsPanel):
+class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Post Processing"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -287,7 +287,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
sub.prop(rd, "edge_color", text="")
-class RENDER_PT_output(RenderButtonsPanel):
+class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Output"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -407,7 +407,7 @@ class RENDER_PT_output(RenderButtonsPanel):
col.prop(rd, "quicktime_audio_resampling_hq")
-class RENDER_PT_encoding(RenderButtonsPanel):
+class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Encoding"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -479,7 +479,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.prop(rd, "ffmpeg_audio_volume", slider=True)
-class RENDER_PT_antialiasing(RenderButtonsPanel):
+class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Anti-Aliasing"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -509,7 +509,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
col.prop(rd, "filter_size", text="Size")
-class RENDER_PT_motion_blur(RenderButtonsPanel):
+class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Full Sample Motion Blur"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -529,8 +529,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
row.prop(rd, "motion_blur_samples")
row.prop(rd, "motion_blur_shutter")
-
-class RENDER_PT_dimensions(RenderButtonsPanel):
+class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Dimensions"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -577,7 +576,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
sub.prop(rd, "fps_base", text="/")
-class RENDER_PT_stamp(RenderButtonsPanel):
+class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Stamp"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -623,7 +622,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
sub.prop(rd, "stamp_note_text", text="")
-class RENDER_PT_bake(RenderButtonsPanel):
+class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Bake"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -670,33 +669,12 @@ class RENDER_PT_bake(RenderButtonsPanel):
sub.prop(rd, "bake_bias")
-classes = [
- RENDER_MT_presets,
- RENDER_MT_ffmpeg_presets,
- RENDER_PT_render,
- RENDER_PT_layers,
- RENDER_PT_dimensions,
- RENDER_PT_antialiasing,
- RENDER_PT_motion_blur,
- RENDER_PT_shading,
- RENDER_PT_output,
- RENDER_PT_encoding,
- RENDER_PT_performance,
- RENDER_PT_post_processing,
- RENDER_PT_stamp,
- RENDER_PT_bake]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py
index 06ad1eda835..859fcc3ce47 100644
--- a/release/scripts/ui/properties_scene.py
+++ b/release/scripts/ui/properties_scene.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class SceneButtonsPanel(bpy.types.Panel):
+class SceneButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
@@ -32,7 +32,7 @@ class SceneButtonsPanel(bpy.types.Panel):
return context.scene
-class SCENE_PT_scene(SceneButtonsPanel):
+class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Scene"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -49,11 +49,11 @@ class SCENE_PT_scene(SceneButtonsPanel):
layout.prop(scene, "set", text="")
-class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel):
+class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "scene"
-class SCENE_PT_unit(SceneButtonsPanel):
+class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Units"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -78,7 +78,7 @@ class SCENE_PT_unit(SceneButtonsPanel):
layout.column().prop(unit, "rotation_units")
-class SCENE_PT_keying_sets(SceneButtonsPanel):
+class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Keying Sets"
def draw(self, context):
@@ -115,7 +115,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
col.prop(ks, "insertkey_xyz_to_rgb", text="XYZ to RGB")
-class SCENE_PT_keying_set_paths(SceneButtonsPanel):
+class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Active Keying Set"
def poll(self, context):
@@ -169,7 +169,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel):
col.prop(ksp, "insertkey_xyz_to_rgb", text="XYZ to RGB")
-class SCENE_PT_physics(SceneButtonsPanel):
+class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Gravity"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -190,7 +190,7 @@ class SCENE_PT_physics(SceneButtonsPanel):
layout.column().prop(scene, "gravity", text="")
-class SCENE_PT_simplify(SceneButtonsPanel):
+class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Simplify"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -334,29 +334,12 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
return {'RUNNING_MODAL'}
-classes = [
- SCENE_PT_scene,
- SCENE_PT_unit,
- SCENE_PT_keying_sets,
- SCENE_PT_keying_set_paths,
- SCENE_PT_physics,
- SCENE_PT_simplify,
-
- SCENE_PT_custom_props,
-
- ANIM_OT_keying_set_export]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 2bfbe188c9e..d9d8e5cb24d 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -65,7 +65,7 @@ def context_tex_datablock(context):
return idblock
-class TextureButtonsPanel(bpy.types.Panel):
+class TextureButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "texture"
@@ -78,7 +78,7 @@ class TextureButtonsPanel(bpy.types.Panel):
return (tex.type != 'NONE' or tex.use_nodes) and (engine in self.COMPAT_ENGINES)
-class TEXTURE_PT_preview(TextureButtonsPanel):
+class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -95,7 +95,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
layout.template_preview(tex, slot=slot)
-class TEXTURE_PT_context_texture(TextureButtonsPanel):
+class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -166,7 +166,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
layout.prop(tex, "type", text="")
-class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel):
+class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "texture"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -175,7 +175,7 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel):
return context.texture and (engine in self.COMPAT_ENGINES)
-class TEXTURE_PT_colors(TextureButtonsPanel):
+class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Colors"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -220,7 +220,7 @@ class TextureSlotPanel(TextureButtonsPanel):
return TextureButtonsPanel.poll(self, context) and (engine in self.COMPAT_ENGINES)
-class TEXTURE_PT_mapping(TextureSlotPanel):
+class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel):
bl_label = "Mapping"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -317,7 +317,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
col.prop(tex, "size")
-class TEXTURE_PT_influence(TextureSlotPanel):
+class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
bl_label = "Influence"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -451,7 +451,7 @@ class TextureTypePanel(TextureButtonsPanel):
return ((tex and tex.type == self.tex_type and not tex.use_nodes) and (engine in self.COMPAT_ENGINES))
-class TEXTURE_PT_clouds(TextureTypePanel):
+class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
bl_label = "Clouds"
tex_type = 'CLOUDS'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -481,7 +481,7 @@ class TEXTURE_PT_clouds(TextureTypePanel):
col.prop(tex, "nabla", text="Nabla")
-class TEXTURE_PT_wood(TextureTypePanel):
+class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
bl_label = "Wood"
tex_type = 'WOOD'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -518,7 +518,7 @@ class TEXTURE_PT_wood(TextureTypePanel):
col.prop(tex, "nabla")
-class TEXTURE_PT_marble(TextureTypePanel):
+class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
bl_label = "Marble"
tex_type = 'MARBLE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -550,7 +550,7 @@ class TEXTURE_PT_marble(TextureTypePanel):
col.prop(tex, "nabla")
-class TEXTURE_PT_magic(TextureTypePanel):
+class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
bl_label = "Magic"
tex_type = 'MAGIC'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -571,7 +571,7 @@ class TEXTURE_PT_magic(TextureTypePanel):
col.prop(tex, "turbulence")
-class TEXTURE_PT_blend(TextureTypePanel):
+class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
bl_label = "Blend"
tex_type = 'BLEND'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -593,7 +593,7 @@ class TEXTURE_PT_blend(TextureTypePanel):
sub.prop(tex, "flip_axis", expand=True)
-class TEXTURE_PT_stucci(TextureTypePanel):
+class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
bl_label = "Stucci"
tex_type = 'STUCCI'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -622,7 +622,7 @@ class TEXTURE_PT_stucci(TextureTypePanel):
col.prop(tex, "turbulence")
-class TEXTURE_PT_image(TextureTypePanel):
+class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
bl_label = "Image"
tex_type = 'IMAGE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -648,7 +648,7 @@ def texture_filter_common(tex, layout):
layout.prop(tex, "filter_size_minimum")
-class TEXTURE_PT_image_sampling(TextureTypePanel):
+class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
bl_label = "Image Sampling"
bl_default_closed = True
tex_type = 'IMAGE'
@@ -689,7 +689,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel):
texture_filter_common(tex, col)
-class TEXTURE_PT_image_mapping(TextureTypePanel):
+class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
bl_label = "Image Mapping"
bl_default_closed = True
tex_type = 'IMAGE'
@@ -748,7 +748,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
col.prop(tex, "crop_max_y", text="Y")
-class TEXTURE_PT_plugin(TextureTypePanel):
+class TEXTURE_PT_plugin(TextureTypePanel, bpy.types.Panel):
bl_label = "Plugin"
tex_type = 'PLUGIN'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -761,7 +761,7 @@ class TEXTURE_PT_plugin(TextureTypePanel):
layout.label(text="Nothing yet")
-class TEXTURE_PT_envmap(TextureTypePanel):
+class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
bl_label = "Environment Map"
tex_type = 'ENVIRONMENT_MAP'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -802,7 +802,7 @@ class TEXTURE_PT_envmap(TextureTypePanel):
col.prop(env, "clip_end", text="End")
-class TEXTURE_PT_envmap_sampling(TextureTypePanel):
+class TEXTURE_PT_envmap_sampling(TextureTypePanel, bpy.types.Panel):
bl_label = "Environment Map Sampling"
bl_default_closed = True
tex_type = 'ENVIRONMENT_MAP'
@@ -816,7 +816,7 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel):
texture_filter_common(tex, layout)
-class TEXTURE_PT_musgrave(TextureTypePanel):
+class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel):
bl_label = "Musgrave"
tex_type = 'MUSGRAVE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -864,7 +864,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel):
col.prop(tex, "nabla")
-class TEXTURE_PT_voronoi(TextureTypePanel):
+class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
bl_label = "Voronoi"
tex_type = 'VORONOI'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -908,7 +908,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel):
col.prop(tex, "nabla")
-class TEXTURE_PT_distortednoise(TextureTypePanel):
+class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
bl_label = "Distorted Noise"
tex_type = 'DISTORTED_NOISE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -937,7 +937,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel):
col.prop(tex, "nabla")
-class TEXTURE_PT_voxeldata(TextureButtonsPanel):
+class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Voxel Data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -975,7 +975,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel):
layout.prop(vd, "intensity")
-class TEXTURE_PT_pointdensity(TextureButtonsPanel):
+class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Point Density"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -1035,7 +1035,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel):
col.prop(pd, "falloff_softness")
-class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
+class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Turbulence"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -1076,49 +1076,12 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
col.prop(pd, "turbulence_strength")
-classes = [
- TEXTURE_MT_specials,
- TEXTURE_MT_envmap_specials,
-
- TEXTURE_PT_context_texture,
- TEXTURE_PT_preview,
-
- TEXTURE_PT_clouds, # Texture Type Panels
- TEXTURE_PT_wood,
- TEXTURE_PT_marble,
- TEXTURE_PT_magic,
- TEXTURE_PT_blend,
- TEXTURE_PT_stucci,
- TEXTURE_PT_image,
- TEXTURE_PT_image_sampling,
- TEXTURE_PT_image_mapping,
- TEXTURE_PT_plugin,
- TEXTURE_PT_envmap,
- TEXTURE_PT_envmap_sampling,
- TEXTURE_PT_musgrave,
- TEXTURE_PT_voronoi,
- TEXTURE_PT_distortednoise,
- TEXTURE_PT_voxeldata,
- TEXTURE_PT_pointdensity,
- TEXTURE_PT_pointdensity_turbulence,
-
- TEXTURE_PT_colors,
- TEXTURE_PT_mapping,
- TEXTURE_PT_influence,
-
- TEXTURE_PT_custom_props]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py
index 22acd49f897..fe1c085dc02 100644
--- a/release/scripts/ui/properties_world.py
+++ b/release/scripts/ui/properties_world.py
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check
-class WorldButtonsPanel(bpy.types.Panel):
+class WorldButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "world"
@@ -34,7 +34,7 @@ class WorldButtonsPanel(bpy.types.Panel):
return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
-class WORLD_PT_preview(WorldButtonsPanel):
+class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -42,7 +42,7 @@ class WORLD_PT_preview(WorldButtonsPanel):
self.layout.template_preview(context.world)
-class WORLD_PT_context_world(WorldButtonsPanel):
+class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -70,12 +70,12 @@ class WORLD_PT_context_world(WorldButtonsPanel):
layout.template_ID(scene, "world", new="world.new")
-class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel):
+class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "world"
-class WORLD_PT_world(WorldButtonsPanel):
+class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "World"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -103,7 +103,7 @@ class WORLD_PT_world(WorldButtonsPanel):
row.column().prop(world, "ambient_color")
-class WORLD_PT_mist(WorldButtonsPanel):
+class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -134,7 +134,7 @@ class WORLD_PT_mist(WorldButtonsPanel):
layout.prop(world.mist, "falloff")
-class WORLD_PT_stars(WorldButtonsPanel):
+class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Stars"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -163,7 +163,7 @@ class WORLD_PT_stars(WorldButtonsPanel):
col.prop(world.stars, "average_separation", text="Separation")
-class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
+class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Ambient Occlusion"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -182,7 +182,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
split.prop(light, "ao_blend_mode", text="")
-class WORLD_PT_environment_lighting(WorldButtonsPanel):
+class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Environment Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -201,7 +201,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel):
split.prop(light, "environment_color", text="")
-class WORLD_PT_indirect_lighting(WorldButtonsPanel):
+class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Indirect Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -224,7 +224,7 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel):
split.prop(light, "indirect_bounces", text="Bounces")
-class WORLD_PT_gather(WorldButtonsPanel):
+class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Gather"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -272,30 +272,12 @@ class WORLD_PT_gather(WorldButtonsPanel):
col.prop(light, "correction")
-classes = [
- WORLD_PT_context_world,
- WORLD_PT_preview,
- WORLD_PT_world,
- WORLD_PT_ambient_occlusion,
- WORLD_PT_environment_lighting,
- WORLD_PT_indirect_lighting,
- WORLD_PT_gather,
- WORLD_PT_mist,
- WORLD_PT_stars,
-
- WORLD_PT_custom_props]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_console.py b/release/scripts/ui/space_console.py
index 512af350a47..f2c757adaf5 100644
--- a/release/scripts/ui/space_console.py
+++ b/release/scripts/ui/space_console.py
@@ -196,31 +196,12 @@ class ConsoleLanguage(bpy.types.Operator):
return {'FINISHED'}
-classes = [
- CONSOLE_HT_header,
- CONSOLE_MT_console,
- CONSOLE_MT_report,
- CONSOLE_MT_language,
-
- # Stubs that call the language operators
- ConsoleExec,
- ConsoleAutocomplete,
- ConsoleBanner,
-
- # Set the language and call the banner
- ConsoleLanguage]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_dopesheet.py b/release/scripts/ui/space_dopesheet.py
index 41917acd997..f7e7ee724d7 100644
--- a/release/scripts/ui/space_dopesheet.py
+++ b/release/scripts/ui/space_dopesheet.py
@@ -196,25 +196,12 @@ class DOPESHEET_MT_key_transform(bpy.types.Menu):
layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
-classes = [
- DOPESHEET_HT_header, # header/menu classes
- DOPESHEET_MT_view,
- DOPESHEET_MT_select,
- DOPESHEET_MT_channel,
- DOPESHEET_MT_key,
- DOPESHEET_MT_key_transform]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_filebrowser.py b/release/scripts/ui/space_filebrowser.py
index 39bae6ca59b..a67bffc37c5 100644
--- a/release/scripts/ui/space_filebrowser.py
+++ b/release/scripts/ui/space_filebrowser.py
@@ -65,20 +65,12 @@ class FILEBROWSER_HT_header(bpy.types.Header):
row.prop(params, "filter_text", text="")
-classes = [
- FILEBROWSER_HT_header]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py
index 1533b891202..7eb728cc668 100644
--- a/release/scripts/ui/space_graph.py
+++ b/release/scripts/ui/space_graph.py
@@ -204,25 +204,12 @@ class GRAPH_MT_key_transform(bpy.types.Menu):
layout.operator("transform.resize", text="Scale")
-classes = [
- GRAPH_HT_header, # header/menu classes
- GRAPH_MT_view,
- GRAPH_MT_select,
- GRAPH_MT_channel,
- GRAPH_MT_key,
- GRAPH_MT_key_transform]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py
index a28ddb90a40..a51d237019a 100644
--- a/release/scripts/ui/space_image.py
+++ b/release/scripts/ui/space_image.py
@@ -674,41 +674,12 @@ class IMAGE_PT_paint_curve(bpy.types.Panel):
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
-classes = [
- IMAGE_MT_view,
- IMAGE_MT_select,
- IMAGE_MT_image,
- IMAGE_MT_uvs_showhide,
- IMAGE_MT_uvs_transform,
- IMAGE_MT_uvs_snap,
- IMAGE_MT_uvs_mirror,
- IMAGE_MT_uvs_weldalign,
- IMAGE_MT_uvs,
- IMAGE_HT_header,
- IMAGE_PT_image_properties,
- IMAGE_PT_paint,
- IMAGE_PT_tools_brush_texture,
- IMAGE_PT_paint_stroke,
- IMAGE_PT_paint_curve,
- IMAGE_PT_game_properties,
- IMAGE_PT_view_properties,
- IMAGE_PT_view_histogram,
- IMAGE_PT_view_waveform,
- IMAGE_PT_view_vectorscope,
- IMAGE_PT_sample_line,
- IMAGE_PT_scope_sample]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py
index 25f4e8b2097..618cd3c51c9 100644
--- a/release/scripts/ui/space_info.py
+++ b/release/scripts/ui/space_info.py
@@ -354,34 +354,13 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
return {'FINISHED'}
-classes = [
- INFO_HT_header,
- INFO_MT_file,
- INFO_MT_file_import,
- INFO_MT_file_export,
- INFO_MT_file_external_data,
- INFO_MT_add,
- INFO_MT_mesh_add,
- INFO_MT_curve_add,
- INFO_MT_surface_add,
- INFO_MT_armature_add,
- INFO_MT_game,
- INFO_MT_render,
- INFO_MT_help,
-
- HELP_OT_operator_cheat_sheet]
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_logic.py b/release/scripts/ui/space_logic.py
index 6003c4d4bd7..4a70695024a 100644
--- a/release/scripts/ui/space_logic.py
+++ b/release/scripts/ui/space_logic.py
@@ -88,24 +88,12 @@ class LOGIC_MT_view(bpy.types.Menu):
layout.operator("logic.properties", icon='MENU_PANEL')
-classes = [
- LOGIC_HT_header,
- LOGIC_MT_view,
-
- LOGIC_PT_properties,
- LOGIC_MT_logicbricks_add]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_nla.py b/release/scripts/ui/space_nla.py
index 0eb342d4b15..1141a640534 100644
--- a/release/scripts/ui/space_nla.py
+++ b/release/scripts/ui/space_nla.py
@@ -159,25 +159,12 @@ class NLA_MT_edit_transform(bpy.types.Menu):
layout.operator("transform.resize", text="Scale")
-classes = [
- NLA_HT_header, # header/menu classes
- NLA_MT_view,
- NLA_MT_select,
- NLA_MT_edit,
- NLA_MT_add,
- NLA_MT_edit_transform]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_node.py b/release/scripts/ui/space_node.py
index 21b2ebc5390..0a3cebf5faa 100644
--- a/release/scripts/ui/space_node.py
+++ b/release/scripts/ui/space_node.py
@@ -160,23 +160,12 @@ class NODE_MT_node(bpy.types.Menu):
layout.operator("node.show_cyclic_dependencies")
-classes = [
- NODE_HT_header,
- NODE_MT_view,
- NODE_MT_select,
- NODE_MT_node]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_outliner.py b/release/scripts/ui/space_outliner.py
index ec3c430feaa..6b2743027ba 100644
--- a/release/scripts/ui/space_outliner.py
+++ b/release/scripts/ui/space_outliner.py
@@ -117,23 +117,12 @@ class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
col.operator("outliner.drivers_delete_selected")
-classes = [
- OUTLINER_HT_header,
- OUTLINER_MT_view,
- OUTLINER_MT_search,
- OUTLINER_MT_edit_datablocks]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py
index adf80635bc1..abae5f23f6b 100644
--- a/release/scripts/ui/space_sequencer.py
+++ b/release/scripts/ui/space_sequencer.py
@@ -312,7 +312,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
layout.operator("sequencer.swap_data")
-class SequencerButtonsPanel(bpy.types.Panel):
+class SequencerButtonsPanel():
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@@ -323,7 +323,7 @@ class SequencerButtonsPanel(bpy.types.Panel):
return self.has_sequencer(context) and (act_strip(context) is not None)
-class SequencerButtonsPanel_Output(bpy.types.Panel):
+class SequencerButtonsPanel_Output():
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@@ -334,7 +334,7 @@ class SequencerButtonsPanel_Output(bpy.types.Panel):
return self.has_preview(context)
-class SEQUENCER_PT_edit(SequencerButtonsPanel):
+class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Edit Strip"
def draw(self, context):
@@ -381,7 +381,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
-class SEQUENCER_PT_effect(SequencerButtonsPanel):
+class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Effect Strip"
def poll(self, context):
@@ -510,7 +510,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel):
col.prop(strip, "rotation_start", text="Rotation")
-class SEQUENCER_PT_input(SequencerButtonsPanel):
+class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Strip Input"
def poll(self, context):
@@ -635,8 +635,7 @@ class SEQUENCER_PT_input_secondary(SEQUENCER_PT_input):
def draw_filename(self, context):
pass
-
-class SEQUENCER_PT_sound(SequencerButtonsPanel):
+class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Sound"
def poll(self, context):
@@ -676,7 +675,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel):
col.prop(strip, "animation_end_offset", text="End")
-class SEQUENCER_PT_scene(SequencerButtonsPanel):
+class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Scene"
def poll(self, context):
@@ -700,7 +699,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel):
layout.template_ID(strip, "scene_camera")
-class SEQUENCER_PT_filter(SequencerButtonsPanel):
+class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Filter"
def poll(self, context):
@@ -761,7 +760,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
col.prop(strip.color_balance, "inverse_gain", text="Inverse")
-class SEQUENCER_PT_proxy(SequencerButtonsPanel):
+class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Proxy"
def poll(self, context):
@@ -794,7 +793,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel):
flow.prop(strip.proxy, "filepath")
-class SEQUENCER_PT_preview(SequencerButtonsPanel_Output):
+class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel):
bl_label = "Scene Preview/Render"
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@@ -818,7 +817,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output):
'''
-class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
+class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
bl_label = "View Settings"
def draw(self, context):
@@ -834,40 +833,12 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
col.prop(st, "separate_color_preview")
col.prop(st, "proxy_render_size")
-classes = [
- SEQUENCER_HT_header, # header/menu classes
- SEQUENCER_MT_view,
- SEQUENCER_MT_view_toggle,
- SEQUENCER_MT_select,
- SEQUENCER_MT_marker,
- SEQUENCER_MT_add,
- SEQUENCER_MT_add_effect,
- SEQUENCER_MT_strip,
-
- SEQUENCER_PT_edit, # sequencer panels
- SEQUENCER_PT_effect,
- SEQUENCER_PT_input_movie,
- SEQUENCER_PT_input_image,
- SEQUENCER_PT_input_secondary,
- SEQUENCER_PT_sound,
- SEQUENCER_PT_scene,
- SEQUENCER_PT_filter,
- SEQUENCER_PT_proxy,
-
- SEQUENCER_PT_preview,
- SEQUENCER_PT_view] # view panels
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py
index 552621d87c6..29a5674d377 100644
--- a/release/scripts/ui/space_text.py
+++ b/release/scripts/ui/space_text.py
@@ -297,33 +297,12 @@ class TEXT_MT_toolbox(bpy.types.Menu):
layout.operator("text.run_script")
-
-classes = [
- TEXT_HT_header,
- TEXT_PT_properties,
- TEXT_PT_find,
- TEXT_MT_view,
- TEXT_MT_text,
- TEXT_MT_templates,
- TEXT_MT_format,
- TEXT_MT_edit,
- TEXT_MT_edit_view,
- TEXT_MT_edit_select,
- TEXT_MT_edit_markers,
- TEXT_MT_edit_to3d,
- TEXT_MT_toolbox]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_time.py b/release/scripts/ui/space_time.py
index 8c24dbc2d9c..3825d774f1e 100644
--- a/release/scripts/ui/space_time.py
+++ b/release/scripts/ui/space_time.py
@@ -192,25 +192,12 @@ class TIME_MT_autokey(bpy.types.Menu):
layout.prop_enum(tools, "autokey_mode", 'ADD_REPLACE_KEYS')
layout.prop_enum(tools, "autokey_mode", 'REPLACE_KEYS')
-classes = [
- TIME_HT_header,
- TIME_MT_view,
- TIME_MT_cache,
- TIME_MT_frame,
- TIME_MT_autokey,
- TIME_MT_playback]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 2c040168490..f31f976e653 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -1129,36 +1129,11 @@ class WM_OT_addon_expand(bpy.types.Operator):
return {'FINISHED'}
-classes = [
- USERPREF_HT_header,
- USERPREF_PT_tabs,
- USERPREF_PT_interface,
- USERPREF_PT_theme,
- USERPREF_PT_edit,
- USERPREF_PT_system,
- USERPREF_PT_file,
- USERPREF_PT_input,
- USERPREF_PT_addons,
-
- USERPREF_MT_interaction_presets,
- USERPREF_MT_splash,
-
- WM_OT_addon_enable,
- WM_OT_addon_disable,
- WM_OT_addon_install,
- WM_OT_addon_expand]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
-
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_userpref_keymap.py b/release/scripts/ui/space_userpref_keymap.py
index c93b24d5cb2..a76b7249d5d 100644
--- a/release/scripts/ui/space_userpref_keymap.py
+++ b/release/scripts/ui/space_userpref_keymap.py
@@ -784,29 +784,11 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
wm.remove_keyconfig(keyconfig)
return {'FINISHED'}
-
-classes = [
- WM_OT_keyconfig_export,
- WM_OT_keyconfig_import,
- WM_OT_keyconfig_test,
- WM_OT_keyconfig_remove,
- WM_OT_keymap_edit,
- WM_OT_keymap_restore,
- WM_OT_keyitem_add,
- WM_OT_keyitem_remove,
- WM_OT_keyitem_restore]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
-
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 7b59b00dc56..8cc3669014b 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -75,11 +75,16 @@ class VIEW3D_HT_header(bpy.types.Header):
row.prop(view, "occlude_geometry", text="")
# Proportional editing
- if obj.mode in ('OBJECT', 'EDIT', 'PARTICLE_EDIT'):
+ if obj.mode in ('EDIT', 'PARTICLE_EDIT'):
row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
if toolsettings.proportional_editing != 'DISABLED':
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
+ elif obj.mode == 'OBJECT':
+ row = layout.row(align=True)
+ row.prop(toolsettings, "proportional_editing_objects", text="", icon_only=True)
+ if toolsettings.proportional_editing_objects:
+ row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
# Snap
row = layout.row(align=True)
@@ -114,7 +119,7 @@ class VIEW3D_HT_header(bpy.types.Header):
# ********** Utilities **********
-class VIEW3D_MT_showhide(bpy.types.Menu):
+class ShowHideMenu():
bl_label = "Show/Hide"
_operator_name = ""
@@ -1086,7 +1091,7 @@ class VIEW3D_MT_particle_specials(bpy.types.Menu):
layout.operator("particle.remove_doubles")
-class VIEW3D_MT_particle_showhide(VIEW3D_MT_showhide):
+class VIEW3D_MT_particle_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "particle"
# ********** Pose Menu **********
@@ -1236,7 +1241,7 @@ class VIEW3D_MT_pose_constraints(bpy.types.Menu):
layout.operator("pose.constraints_clear")
-class VIEW3D_MT_pose_showhide(VIEW3D_MT_showhide):
+class VIEW3D_MT_pose_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "pose"
@@ -1602,7 +1607,7 @@ class VIEW3D_MT_edit_mesh_normals(bpy.types.Menu):
layout.operator("mesh.flip_normals")
-class VIEW3D_MT_edit_mesh_showhide(VIEW3D_MT_showhide):
+class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "mesh"
# Edit Curve
@@ -1694,7 +1699,7 @@ class VIEW3D_MT_edit_curve_specials(bpy.types.Menu):
layout.operator("curve.smooth_radius")
-class VIEW3D_MT_edit_curve_showhide(VIEW3D_MT_showhide):
+class VIEW3D_MT_edit_curve_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "curve"
@@ -2269,123 +2274,13 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
# Draw with no edit button
rna_prop_ui.draw(self.layout, context, member, False)
-classes = [
- VIEW3D_OT_edit_mesh_extrude_move, # detects constraints setup and extrude region
- VIEW3D_OT_edit_mesh_extrude_individual_move,
-
- VIEW3D_HT_header, # Header
-
- VIEW3D_MT_view, #View Menus
- VIEW3D_MT_view_navigation,
- VIEW3D_MT_view_align,
- VIEW3D_MT_view_align_selected,
- VIEW3D_MT_view_cameras,
-
- VIEW3D_MT_select_object, # Select Menus
- VIEW3D_MT_select_pose,
- VIEW3D_MT_select_particle,
- VIEW3D_MT_select_edit_mesh,
- VIEW3D_MT_select_edit_curve,
- VIEW3D_MT_select_edit_surface,
- VIEW3D_MT_select_edit_metaball,
- VIEW3D_MT_select_edit_lattice,
- VIEW3D_MT_select_edit_armature,
- VIEW3D_MT_select_face, # XXX todo
-
- VIEW3D_MT_transform, # Object/Edit Menus
- VIEW3D_MT_mirror, # Object/Edit Menus
- VIEW3D_MT_snap, # Object/Edit Menus
- VIEW3D_MT_uv_map, # Edit Menus
-
- VIEW3D_MT_object, # Object Menu
- VIEW3D_MT_object_specials,
- VIEW3D_MT_object_apply,
- VIEW3D_MT_object_clear,
- VIEW3D_MT_object_parent,
- VIEW3D_MT_object_track,
- VIEW3D_MT_object_group,
- VIEW3D_MT_object_constraints,
- VIEW3D_MT_object_showhide,
- VIEW3D_MT_make_single_user,
- VIEW3D_MT_make_links,
- VIEW3D_MT_object_game_properties,
- VIEW3D_MT_object_game_logicbricks,
-
- VIEW3D_MT_hook,
- VIEW3D_MT_vertex_group,
-
- VIEW3D_MT_sculpt, # Sculpt Menu
- VIEW3D_MT_paint_vertex,
- VIEW3D_MT_paint_weight,
-
- VIEW3D_MT_particle, # Particle Menu
- VIEW3D_MT_particle_specials,
- VIEW3D_MT_particle_showhide,
-
- VIEW3D_MT_pose, # POSE Menu
- VIEW3D_MT_pose_transform,
- VIEW3D_MT_pose_pose,
- VIEW3D_MT_pose_motion,
- VIEW3D_MT_pose_group,
- VIEW3D_MT_pose_ik,
- VIEW3D_MT_pose_constraints,
- VIEW3D_MT_pose_showhide,
- VIEW3D_MT_pose_apply,
-
- VIEW3D_MT_edit_mesh,
- VIEW3D_MT_edit_mesh_specials, # Only as a menu for keybindings
- VIEW3D_MT_edit_mesh_selection_mode, # Only as a menu for keybindings
- VIEW3D_MT_edit_mesh_vertices,
- VIEW3D_MT_edit_mesh_edges,
- VIEW3D_MT_edit_mesh_faces,
- VIEW3D_MT_edit_mesh_normals,
- VIEW3D_MT_edit_mesh_showhide,
- VIEW3D_MT_edit_mesh_extrude, # use with VIEW3D_OT_edit_mesh_extrude_menu
-
- VIEW3D_MT_edit_curve,
- VIEW3D_MT_edit_curve_ctrlpoints,
- VIEW3D_MT_edit_curve_segments,
- VIEW3D_MT_edit_curve_specials,
- VIEW3D_MT_edit_curve_showhide,
-
- VIEW3D_MT_edit_surface,
-
- VIEW3D_MT_edit_text,
- VIEW3D_MT_edit_text_chars,
-
- VIEW3D_MT_edit_meta,
- VIEW3D_MT_edit_meta_showhide,
-
- VIEW3D_MT_edit_lattice,
-
- VIEW3D_MT_edit_armature,
- VIEW3D_MT_edit_armature_parent,
- VIEW3D_MT_edit_armature_roll,
-
- VIEW3D_MT_armature_specials, # Only as a menu for keybindings
-
- # Panels
- VIEW3D_PT_view3d_properties,
- VIEW3D_PT_view3d_display,
- VIEW3D_PT_view3d_name,
- VIEW3D_PT_view3d_meshdisplay,
- VIEW3D_PT_view3d_curvedisplay,
- VIEW3D_PT_background_image,
- VIEW3D_PT_transform_orientations,
- VIEW3D_PT_etch_a_ton,
- VIEW3D_PT_context_properties]
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register() \ No newline at end of file
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index ebf9f8e5af3..34132069017 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -21,7 +21,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check
-class View3DPanel(bpy.types.Panel):
+class View3DPanel():
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
@@ -29,7 +29,7 @@ class View3DPanel(bpy.types.Panel):
# ********** default tools for objectmode ****************
-class VIEW3D_PT_tools_objectmode(View3DPanel):
+class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel):
bl_context = "objectmode"
bl_label = "Object Tools"
@@ -79,7 +79,7 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
# ********** default tools for editmode_mesh ****************
-class VIEW3D_PT_tools_meshedit(View3DPanel):
+class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
bl_context = "mesh_edit"
bl_label = "Mesh Tools"
@@ -147,7 +147,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
-class VIEW3D_PT_tools_meshedit_options(View3DPanel):
+class VIEW3D_PT_tools_meshedit_options(View3DPanel, bpy.types.Panel):
bl_context = "mesh_edit"
bl_label = "Mesh Options"
@@ -166,7 +166,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel):
# ********** default tools for editmode_curve ****************
-class VIEW3D_PT_tools_curveedit(View3DPanel):
+class VIEW3D_PT_tools_curveedit(View3DPanel, bpy.types.Panel):
bl_context = "curve_edit"
bl_label = "Curve Tools"
@@ -220,7 +220,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
# ********** default tools for editmode_surface ****************
-class VIEW3D_PT_tools_surfaceedit(View3DPanel):
+class VIEW3D_PT_tools_surfaceedit(View3DPanel, bpy.types.Panel):
bl_context = "surface_edit"
bl_label = "Surface Tools"
@@ -260,7 +260,7 @@ class VIEW3D_PT_tools_surfaceedit(View3DPanel):
# ********** default tools for editmode_text ****************
-class VIEW3D_PT_tools_textedit(View3DPanel):
+class VIEW3D_PT_tools_textedit(View3DPanel, bpy.types.Panel):
bl_context = "text_edit"
bl_label = "Text Tools"
@@ -293,7 +293,7 @@ class VIEW3D_PT_tools_textedit(View3DPanel):
# ********** default tools for editmode_armature ****************
-class VIEW3D_PT_tools_armatureedit(View3DPanel):
+class VIEW3D_PT_tools_armatureedit(View3DPanel, bpy.types.Panel):
bl_context = "armature_edit"
bl_label = "Armature Tools"
@@ -330,7 +330,7 @@ class VIEW3D_PT_tools_armatureedit(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
-class VIEW3D_PT_tools_armatureedit_options(View3DPanel):
+class VIEW3D_PT_tools_armatureedit_options(View3DPanel, bpy.types.Panel):
bl_context = "armature_edit"
bl_label = "Armature Options"
@@ -345,7 +345,7 @@ class VIEW3D_PT_tools_armatureedit_options(View3DPanel):
# ********** default tools for editmode_mball ****************
-class VIEW3D_PT_tools_mballedit(View3DPanel):
+class VIEW3D_PT_tools_mballedit(View3DPanel, bpy.types.Panel):
bl_context = "mball_edit"
bl_label = "Meta Tools"
@@ -373,7 +373,7 @@ class VIEW3D_PT_tools_mballedit(View3DPanel):
# ********** default tools for editmode_lattice ****************
-class VIEW3D_PT_tools_latticeedit(View3DPanel):
+class VIEW3D_PT_tools_latticeedit(View3DPanel, bpy.types.Panel):
bl_context = "lattice_edit"
bl_label = "Lattice Tools"
@@ -405,7 +405,7 @@ class VIEW3D_PT_tools_latticeedit(View3DPanel):
# ********** default tools for posemode ****************
-class VIEW3D_PT_tools_posemode(View3DPanel):
+class VIEW3D_PT_tools_posemode(View3DPanel, bpy.types.Panel):
bl_context = "posemode"
bl_label = "Pose Tools"
@@ -453,7 +453,7 @@ class VIEW3D_PT_tools_posemode(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
-class VIEW3D_PT_tools_posemode_options(View3DPanel):
+class VIEW3D_PT_tools_posemode_options(View3DPanel, bpy.types.Panel):
bl_context = "posemode"
bl_label = "Pose Options"
@@ -469,7 +469,7 @@ class VIEW3D_PT_tools_posemode_options(View3DPanel):
# ********** default tools for paint modes ****************
-class PaintPanel(bpy.types.Panel):
+class PaintPanel():
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
@@ -490,7 +490,7 @@ class PaintPanel(bpy.types.Panel):
return False
-class VIEW3D_PT_tools_brush(PaintPanel):
+class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
bl_label = "Brush"
def poll(self, context):
@@ -735,7 +735,7 @@ class VIEW3D_PT_tools_brush(PaintPanel):
#row.prop(brush, "use_jitter_pressure", toggle=True, text="")
-class VIEW3D_PT_tools_brush_texture(PaintPanel):
+class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
bl_label = "Texture"
bl_default_closed = True
@@ -837,7 +837,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
col.active = tex_slot.map_mode in ('FIXED', 'TILED') and brush.use_texture_overlay
-class VIEW3D_PT_tools_brush_tool(PaintPanel):
+class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
bl_label = "Tool"
bl_default_closed = True
@@ -866,7 +866,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel):
col.prop(brush, "vertexpaint_tool", expand=False, text="")
-class VIEW3D_PT_tools_brush_stroke(PaintPanel):
+class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
bl_label = "Stroke"
bl_default_closed = True
@@ -963,7 +963,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel):
# row.prop(brush, "use_spacing_pressure", toggle=True, text="")
-class VIEW3D_PT_tools_brush_curve(PaintPanel):
+class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
bl_label = "Curve"
bl_default_closed = True
@@ -987,7 +987,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
-class VIEW3D_PT_sculpt_options(PaintPanel):
+class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
bl_label = "Options"
bl_default_closed = True
@@ -1105,7 +1105,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel):
# ********** default tools for weightpaint ****************
-class VIEW3D_PT_tools_weightpaint(View3DPanel):
+class VIEW3D_PT_tools_weightpaint(View3DPanel, bpy.types.Panel):
bl_context = "weightpaint"
bl_label = "Weight Tools"
@@ -1120,7 +1120,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel):
col.operator("object.vertex_group_levels", text="Levels")
-class VIEW3D_PT_tools_weightpaint_options(View3DPanel):
+class VIEW3D_PT_tools_weightpaint_options(View3DPanel, bpy.types.Panel):
bl_context = "weightpaint"
bl_label = "Options"
@@ -1157,7 +1157,7 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel):
# ********** default tools for vertexpaint ****************
-class VIEW3D_PT_tools_vertexpaint(View3DPanel):
+class VIEW3D_PT_tools_vertexpaint(View3DPanel, bpy.types.Panel):
bl_context = "vertexpaint"
bl_label = "Options"
@@ -1186,7 +1186,7 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel):
# ********** default tools for texturepaint ****************
-class VIEW3D_PT_tools_projectpaint(View3DPanel):
+class VIEW3D_PT_tools_projectpaint(View3DPanel, bpy.types.Panel):
bl_context = "texturepaint"
bl_label = "Project Paint"
@@ -1294,7 +1294,7 @@ class VIEW3D_MT_tools_projectpaint_stencil(bpy.types.Menu):
prop.value = i
-class VIEW3D_PT_tools_particlemode(View3DPanel):
+class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
'''default tools for particle mode'''
bl_context = "particlemode"
bl_label = "Options"
@@ -1361,49 +1361,12 @@ class VIEW3D_PT_tools_particlemode(View3DPanel):
sub.prop(pe, "fade_frames", slider=True)
-classes = [
- VIEW3D_PT_tools_weightpaint,
- VIEW3D_PT_tools_objectmode,
- VIEW3D_PT_tools_meshedit,
- VIEW3D_PT_tools_meshedit_options,
- VIEW3D_PT_tools_curveedit,
- VIEW3D_PT_tools_surfaceedit,
- VIEW3D_PT_tools_textedit,
- VIEW3D_PT_tools_armatureedit,
- VIEW3D_PT_tools_armatureedit_options,
- VIEW3D_PT_tools_mballedit,
- VIEW3D_PT_tools_latticeedit,
- VIEW3D_PT_tools_posemode,
- VIEW3D_PT_tools_posemode_options,
- VIEW3D_PT_tools_brush,
- VIEW3D_PT_tools_brush_texture,
- VIEW3D_PT_tools_brush_stroke,
- VIEW3D_PT_tools_brush_curve,
- VIEW3D_PT_tools_brush_appearance,
- VIEW3D_PT_tools_brush_tool,
- VIEW3D_PT_sculpt_symmetry,
- VIEW3D_PT_sculpt_options,
- VIEW3D_PT_tools_vertexpaint,
- VIEW3D_PT_tools_weightpaint_options,
- VIEW3D_PT_imagepaint_options,
-
- VIEW3D_PT_tools_projectpaint,
- VIEW3D_MT_tools_projectpaint_clone,
- VIEW3D_MT_tools_projectpaint_stencil,
-
- VIEW3D_PT_tools_particlemode]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()