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
path: root/intern
diff options
context:
space:
mode:
authorPeter Staples <batfinger@gmail.com>2013-12-14 20:56:47 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-12-14 21:00:25 +0400
commit4a141022c39cefd422e66772714f54ccb3ec7733 (patch)
tree1c1ad662cffb953c1c8ffe451a3aa1d2866e901a /intern
parentd833aab887cbfa2b7d5931619d734224408cb51e (diff)
Fix T37816: make cycles panel registration work better with addons.
This would give an error when an addon removed a panel.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/ui.py171
1 files changed, 86 insertions, 85 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 05d3c15d076..8f81e93f7c8 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1273,91 +1273,92 @@ def draw_pause(self, context):
def get_panels():
types = bpy.types
- return (
- types.RENDER_PT_render,
- types.RENDER_PT_output,
- types.RENDER_PT_encoding,
- types.RENDER_PT_dimensions,
- types.RENDER_PT_stamp,
- types.RENDERLAYER_PT_layers,
- types.SCENE_PT_scene,
- types.SCENE_PT_color_management,
- types.SCENE_PT_custom_props,
- types.SCENE_PT_audio,
- types.SCENE_PT_unit,
- types.SCENE_PT_keying_sets,
- types.SCENE_PT_keying_set_paths,
- types.SCENE_PT_physics,
- types.WORLD_PT_context_world,
- types.WORLD_PT_custom_props,
- types.DATA_PT_context_mesh,
- types.DATA_PT_context_camera,
- types.DATA_PT_context_lamp,
- types.DATA_PT_context_speaker,
- types.DATA_PT_texture_space,
- types.DATA_PT_curve_texture_space,
- types.DATA_PT_mball_texture_space,
- types.DATA_PT_vertex_groups,
- types.DATA_PT_shape_keys,
- types.DATA_PT_uv_texture,
- types.DATA_PT_vertex_colors,
- types.DATA_PT_camera,
- types.DATA_PT_camera_display,
- types.DATA_PT_lens,
- types.DATA_PT_speaker,
- types.DATA_PT_distance,
- types.DATA_PT_cone,
- types.DATA_PT_customdata,
- types.DATA_PT_custom_props_mesh,
- types.DATA_PT_custom_props_camera,
- types.DATA_PT_custom_props_lamp,
- types.DATA_PT_custom_props_speaker,
- types.DATA_PT_custom_props_arm,
- types.DATA_PT_custom_props_curve,
- types.DATA_PT_custom_props_lattice,
- types.DATA_PT_custom_props_metaball,
- types.TEXTURE_PT_custom_props,
- types.TEXTURE_PT_clouds,
- types.TEXTURE_PT_wood,
- types.TEXTURE_PT_marble,
- types.TEXTURE_PT_magic,
- types.TEXTURE_PT_blend,
- types.TEXTURE_PT_stucci,
- types.TEXTURE_PT_image,
- types.TEXTURE_PT_image_sampling,
- types.TEXTURE_PT_image_mapping,
- types.TEXTURE_PT_musgrave,
- types.TEXTURE_PT_voronoi,
- types.TEXTURE_PT_distortednoise,
- types.TEXTURE_PT_voxeldata,
- types.TEXTURE_PT_pointdensity,
- types.TEXTURE_PT_pointdensity_turbulence,
- types.TEXTURE_PT_mapping,
- types.TEXTURE_PT_influence,
- types.TEXTURE_PT_colors,
- types.PARTICLE_PT_context_particles,
- types.PARTICLE_PT_custom_props,
- types.PARTICLE_PT_emission,
- types.PARTICLE_PT_hair_dynamics,
- types.PARTICLE_PT_cache,
- types.PARTICLE_PT_velocity,
- types.PARTICLE_PT_rotation,
- types.PARTICLE_PT_physics,
- types.SCENE_PT_rigid_body_world,
- types.SCENE_PT_rigid_body_cache,
- types.SCENE_PT_rigid_body_field_weights,
- types.PARTICLE_PT_boidbrain,
- types.PARTICLE_PT_render,
- types.PARTICLE_PT_draw,
- types.PARTICLE_PT_children,
- types.PARTICLE_PT_field_weights,
- types.PARTICLE_PT_force_fields,
- types.PARTICLE_PT_vertexgroups,
- types.MATERIAL_PT_custom_props,
- types.BONE_PT_custom_props,
- types.OBJECT_PT_custom_props,
- )
-
+ panels = [
+ "RENDER_PT_render",
+ "RENDER_PT_output",
+ "RENDER_PT_encoding",
+ "RENDER_PT_dimensions",
+ "RENDER_PT_stamp",
+ "RENDERLAYER_PT_layers",
+ "SCENE_PT_scene",
+ "SCENE_PT_color_management",
+ "SCENE_PT_custom_props",
+ "SCENE_PT_audio",
+ "SCENE_PT_unit",
+ "SCENE_PT_keying_sets",
+ "SCENE_PT_keying_set_paths",
+ "SCENE_PT_physics",
+ "WORLD_PT_context_world",
+ "WORLD_PT_custom_props",
+ "DATA_PT_context_mesh",
+ "DATA_PT_context_camera",
+ "DATA_PT_context_lamp",
+ "DATA_PT_context_speaker",
+ "DATA_PT_texture_space",
+ "DATA_PT_curve_texture_space",
+ "DATA_PT_mball_texture_space",
+ "DATA_PT_vertex_groups",
+ "DATA_PT_shape_keys",
+ "DATA_PT_uv_texture",
+ "DATA_PT_vertex_colors",
+ "DATA_PT_camera",
+ "DATA_PT_camera_display",
+ "DATA_PT_lens",
+ "DATA_PT_speaker",
+ "DATA_PT_distance",
+ "DATA_PT_cone",
+ "DATA_PT_customdata",
+ "DATA_PT_custom_props_mesh",
+ "DATA_PT_custom_props_camera",
+ "DATA_PT_custom_props_lamp",
+ "DATA_PT_custom_props_speaker",
+ "DATA_PT_custom_props_arm",
+ "DATA_PT_custom_props_curve",
+ "DATA_PT_custom_props_lattice",
+ "DATA_PT_custom_props_metaball",
+ "TEXTURE_PT_custom_props",
+ "TEXTURE_PT_clouds",
+ "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_musgrave",
+ "TEXTURE_PT_voronoi",
+ "TEXTURE_PT_distortednoise",
+ "TEXTURE_PT_voxeldata",
+ "TEXTURE_PT_pointdensity",
+ "TEXTURE_PT_pointdensity_turbulence",
+ "TEXTURE_PT_mapping",
+ "TEXTURE_PT_influence",
+ "TEXTURE_PT_colors",
+ "PARTICLE_PT_context_particles",
+ "PARTICLE_PT_custom_props",
+ "PARTICLE_PT_emission",
+ "PARTICLE_PT_hair_dynamics",
+ "PARTICLE_PT_cache",
+ "PARTICLE_PT_velocity",
+ "PARTICLE_PT_rotation",
+ "PARTICLE_PT_physics",
+ "SCENE_PT_rigid_body_world",
+ "SCENE_PT_rigid_body_cache",
+ "SCENE_PT_rigid_body_field_weights",
+ "PARTICLE_PT_boidbrain",
+ "PARTICLE_PT_render",
+ "PARTICLE_PT_draw",
+ "PARTICLE_PT_children",
+ "PARTICLE_PT_field_weights",
+ "PARTICLE_PT_force_fields",
+ "PARTICLE_PT_vertexgroups",
+ "MATERIAL_PT_custom_props",
+ "BONE_PT_custom_props",
+ "OBJECT_PT_custom_props",
+ ]
+
+ return [getattr(types, p) for p in panels if hasattr(types, p)]
def register():
bpy.types.RENDER_PT_render.append(draw_device)