rna api - replace panel properties bl_default_closed and bl_show_header with bl_optio...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Aug 2010 01:05:37 +0000 (01:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Aug 2010 01:05:37 +0000 (01:05 +0000)
this matches operators which also uses bl_options like this

29 files changed:
release/scripts/modules/rna_prop_ui.py
release/scripts/ui/properties_animviz.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_armature_rigify.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_image.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_userpref_keymap.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
source/blender/makesrna/intern/rna_ui.c

index 63762855737c69df47981ce4338fc402a80aa533..91fc4e9092dfa5868ec4187c03a19e0abb9c2419 100644 (file)
@@ -130,7 +130,7 @@ class PropertyPanel():
     and the variable '_context_path' MUST be set.
     """
     bl_label = "Custom Properties"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 9b605d022159900c4f3701e23c3c48dc64a8c7cf..2a463331ac7d4444d797665e44a6146e7664979c 100644 (file)
@@ -27,7 +27,7 @@ class MotionPathButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Motion Paths"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw_settings(self, context, avs, bones=False):
         layout = self.layout
@@ -65,7 +65,7 @@ class OnionSkinButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Onion Skinning"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
index c5748c45fb49051037cb22243c92b9a610eab19e..17186378cb064367edc541f348280b3457a4e66c 100644 (file)
@@ -33,7 +33,7 @@ class ArmatureButtonsPanel():
 
 class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
@@ -187,7 +187,7 @@ class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
 
 class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
     bl_label = "iTaSC parameters"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 1c2370cbb28b043cc30be9a66633d889cdd52b6e..5903e433a4e3ec5f4e950e4b1182492bd3a7f249 100644 (file)
@@ -38,7 +38,7 @@ class DATA_PT_template(bpy.types.Panel):
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     templates = []
 
index 086a55aec4f7ae68d5cb9886af65fd183eb4260b..4df6177c1fcc1d1402f34257d5ddfc941c6f7d4b 100644 (file)
@@ -33,7 +33,7 @@ class BoneButtonsPanel():
 
 class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
@@ -95,7 +95,7 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
 
 class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Transform Locks"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -207,7 +207,7 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
 
 class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Inverse Kinematics"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -295,7 +295,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
 
 class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Deform"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
         bone = context.bone
index 1e4ec6deb18c970897d07d5c777d7c75c22d5414..f7a7ec6b7a95340d116d5bd7e267f26514cd1288 100644 (file)
@@ -34,7 +34,7 @@ class CameraButtonsPanel():
 
 class DATA_PT_context_camera(CameraButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
index 3008db11b36c2ed72062c2a5bebb99ea9b7a1450..375136a335fdd8f2949600dbcc10bb8cf88bdb5e 100644 (file)
@@ -50,7 +50,7 @@ class CurveButtonsPanelActive(CurveButtonsPanel):
 
 class DATA_PT_context_curve(CurveButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
index ce0d404434d628b1706c90f5ec2430e7523e3287..e43b3379aca3ad78e8e29a7c6a4fddb4fedb9387 100644 (file)
@@ -42,7 +42,7 @@ class DataButtonsPanel():
 
 class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -367,7 +367,7 @@ class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
 
 class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Falloff Curve"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
index c01aa034413c77a87194c9b76ea2e14324e2abd2..05b331ea0a2533508319b798b53a043ff460e734 100644 (file)
@@ -33,7 +33,7 @@ class DataButtonsPanel():
 
 class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
index af0df284fe4a3dfb39adbf6e5c8aac18f635fad3..9995fd3445f99eb9dbe5fdd0e11c67eefa9cdeb3 100644 (file)
@@ -60,7 +60,7 @@ class MeshButtonsPanel():
 
 class DATA_PT_context_mesh(MeshButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
index 747ed56c12e10158d3987a9a78dc3fc71fb12f62..b4bf8dc5d700f1aa9c7725d7d4572399fa904825 100644 (file)
@@ -33,7 +33,7 @@ class DataButtonsPanel():
 
 class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
index 8d2f075fce08af3b5a6c1d532827fd5cc43f6964..e703f4a98124c64f7b9a6bbfa0cafae0e4345e9a 100644 (file)
@@ -368,7 +368,7 @@ class WorldButtonsPanel():
 
 class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
index e5f53d9ed0daac420895fd81b9fc71830c4f9dad..a71700706f776d2750379e160c87e3b3a40a0709 100644 (file)
@@ -65,7 +65,7 @@ class MaterialButtonsPanel():
 
 class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -300,7 +300,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
 
 class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Transparency"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -362,7 +362,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
             
 class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Mirror"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -420,7 +420,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
 
 class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Subsurface Scattering"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -581,7 +581,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
 
 class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Strand"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -673,7 +673,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
 
 class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Shadow"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -710,7 +710,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
 
 class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Transparency"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -871,7 +871,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
 class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Options"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
index c0d37c16519b93c0e9833a2a6701a91d60aa6aa3..bf1878cc66621d1752a05040b95be7b5cccc0f96 100644 (file)
@@ -29,7 +29,7 @@ class ObjectButtonsPanel():
 
 class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
@@ -72,7 +72,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
 
 class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Transform Locks"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
@@ -238,7 +238,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
 
 class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Animation Hacks"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
index 5dd7ef7e94b977173e92ee5e46deb31f2146da1b..fbcc83240f118061f7baca9471187f9cd5f6a87a 100644 (file)
@@ -52,7 +52,7 @@ class ParticleButtonsPanel():
 
 class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -196,7 +196,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Hair dynamics"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -254,7 +254,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Cache"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -828,7 +828,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -884,7 +884,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Children"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -966,7 +966,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Field Weights"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -979,7 +979,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Force Field Settings"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -1007,7 +1007,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
 
 class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Vertexgroups"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
index 7936b5e04ee1f306f3b1ecb7750e74fff6b07d69..099711f6dec9a2a24c25a2f3f1f39c62600f4f46 100644 (file)
@@ -131,7 +131,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Cache"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -144,7 +144,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Collision"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -183,7 +183,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Stiffness Scaling"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -219,7 +219,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Field Weights"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 80ea999eedb405f766ee13728b9d9c7e87e93cfd..07d748e8c28138b9dfcd1d84b66652befc065ce3 100644 (file)
@@ -158,7 +158,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Collision"
-    #bl_default_closed = True
+    #bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 035eefe6c2a87fb87d59d6828b0f02c52233788d..9973141653b4712e731e1230cdb0fcd2e0bfc539 100644 (file)
@@ -201,7 +201,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain World"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -251,7 +251,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain Boundary"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -279,7 +279,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain Particles"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 41658daf808c90a325a9a04dfa9254ec44bc7cc2..c1b088da78584aa28dbb62f8af1c8396bd0e1db8 100644 (file)
@@ -121,7 +121,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Groups"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -149,7 +149,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Cache"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -170,7 +170,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke High Resolution"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -205,7 +205,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke High Resolution Cache"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -226,7 +226,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Field Weights"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index 0403e256bdf7cb37e6b15c9e5547d47b59a267fa..2411f460f4b77308e9b3317a5c964e6f70f928da 100644 (file)
@@ -86,7 +86,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Cache"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -99,7 +99,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Goal"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -142,7 +142,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Edges"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -196,7 +196,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Self Collision"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -228,7 +228,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Solver"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -264,7 +264,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
 
 class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Field Weights"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index fcd5a229cd9a02bbb06e93d647e337c5a6c617fa..aef950563914295a603d0f63a52f2bfec868acd1 100644 (file)
@@ -68,7 +68,7 @@ class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Layers"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -194,7 +194,7 @@ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Performance"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -236,7 +236,7 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Post Processing"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -389,7 +389,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Encoding"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -485,7 +485,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Full Sample Motion Blur"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
@@ -550,7 +550,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Stamp"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
@@ -594,7 +594,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
 
 class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Bake"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
index be523f735d8826906c89743fe25e7278391d6aea..5f44f573a2596366d2f1966e7f9d06717c6dc8a8 100644 (file)
@@ -76,7 +76,7 @@ class TextureButtonsPanel():
 
 class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -157,7 +157,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
 
 class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
     bl_label = "Colors"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -592,7 +592,7 @@ def texture_filter_common(tex, layout):
 
 class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
     bl_label = "Image Sampling"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -630,7 +630,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
 
 class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
     bl_label = "Image Mapping"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -721,7 +721,7 @@ class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
 
 class TEXTURE_PT_envmap_sampling(TextureTypePanel, bpy.types.Panel):
     bl_label = "Environment Map Sampling"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'ENVIRONMENT_MAP'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
index a42516a63b4d70c0d4aa64d24767b6b787f89fa4..9f93137252e63d3d58a75f8df72b1267ed872696 100644 (file)
@@ -36,7 +36,7 @@ class WorldButtonsPanel():
 
 class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
     bl_label = ""
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -204,7 +204,7 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
 
 class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "Mist"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
@@ -233,7 +233,7 @@ class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
 
 class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "Stars"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
index eaafa1a7038d3e6246f9b08498c214ca78955e67..bd59aaa42faa8e3ce3a09a83ae7a12ee5c97ef97 100644 (file)
@@ -604,7 +604,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
 
 class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel):
     bl_label = "Texture"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
@@ -621,7 +621,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel):
 
 class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
     bl_label = "Paint Stroke"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
@@ -645,7 +645,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
 
 class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel):
     bl_label = "Paint Curve"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
         layout = self.layout
index feeae5d3f9b51ce18e83e82fd45e0a07cb20c22e..cf0ef4939efe7643d19f73825fd78ba41c31671a 100644 (file)
@@ -100,7 +100,7 @@ class USERPREF_PT_tabs(bpy.types.Panel):
     bl_label = ""
     bl_space_type = 'USER_PREFERENCES'
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
         layout = self.layout
@@ -134,7 +134,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Interface"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     @classmethod
     def poll(cls, context):
@@ -229,7 +229,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Edit"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     @classmethod
     def poll(cls, context):
@@ -344,7 +344,7 @@ class USERPREF_PT_system(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "System"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     @classmethod
     def poll(cls, context):
@@ -479,7 +479,7 @@ class USERPREF_PT_theme(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Themes"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     @staticmethod
     def _theme_generic(split, themedata):
@@ -642,7 +642,7 @@ class USERPREF_PT_file(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Files"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     @classmethod
     def poll(cls, context):
@@ -807,7 +807,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Addons"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
     
     _addons_fake_modules = {}
 
index ac6ac9ea238e4d62c872487ab437a50d4b3ae8f7..6805646ded4ddec7c1cfde3822d3582af6e29894 100644 (file)
@@ -128,7 +128,7 @@ class InputKeyMapPanel(bpy.types.Panel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Input"
     bl_region_type = 'WINDOW'
-    bl_show_header = False
+    bl_options = {'HIDE_HEADER'}
 
     def draw_entry(self, display_keymaps, entry, col, level=0):
         idname, spaceid, regionid, children = entry
index b7e7ba39eb5a6bd1962c4888a7212548c03708b4..fa2cd753e86e6fa4a1de5f7657adf9b098ea2981 100644 (file)
@@ -2002,7 +2002,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Display"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -2130,7 +2130,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Background Images"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -2180,7 +2180,7 @@ class VIEW3D_PT_transform_orientations(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Transform Orientations"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -2208,7 +2208,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Skeleton Sketching"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -2252,7 +2252,7 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Properties"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     def _active_context_member(context):
         obj = context.object
index 58923748607d9449a025f21be0954d14f0d99546..712f06c8fe3d14b441855632028a46bb418db5c1 100644 (file)
@@ -719,7 +719,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
     bl_label = "Texture"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -818,7 +818,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
     bl_label = "Tool"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -854,7 +854,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
     bl_label = "Stroke"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -952,7 +952,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
     bl_label = "Curve"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -979,7 +979,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
     bl_label = "Options"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -1018,7 +1018,7 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
                
 class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
     bl_label = "Symmetry"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -1053,7 +1053,7 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
 
 class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
     bl_label = "Appearance"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
@@ -1244,7 +1244,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, bpy.types.Panel):
 
 class VIEW3D_PT_imagepaint_options(PaintPanel):
     bl_label = "Options"
-    bl_default_closed = True
+    bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
     def poll(cls, context):
index a659ff7c260792454611cdb301c81bb66acf43be..f2c33f354c29127b11d98ab3fbf0481bcb12752a 100644 (file)
@@ -583,6 +583,11 @@ static void rna_def_panel(BlenderRNA *brna)
        PropertyRNA *parm;
        FunctionRNA *func;
        
+       static EnumPropertyItem panel_flag_items[] = {
+                       {PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed", "Defines if the panel has to be open or collapsed at the time of its creation."},
+                       {PNL_NO_HEADER, "HIDE_HEADER", 0, "Show Header", "If set to True, the panel shows a header, which contains a clickable arrow to collapse the panel and the label (see bl_label)."},
+                       {0, NULL, 0, NULL, NULL}};
+       
        srna= RNA_def_struct(brna, "Panel", NULL);
        RNA_def_struct_ui_text(srna, "Panel", "Panel containing UI elements");
        RNA_def_struct_sdna(srna, "Panel");
@@ -646,15 +651,11 @@ static void rna_def_panel(BlenderRNA *brna)
        RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* should this be optional? - Campbell */
        RNA_def_property_ui_text(prop, "Context", "The context in which the panel belongs to. (TODO: explain the possible combinations bl_context/bl_region_type/bl_space_type)");
        
-       prop= RNA_def_property(srna, "bl_default_closed", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_DEFAULT_CLOSED);
-       RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-       RNA_def_property_ui_text(prop, "Default closed", "Defines if the panel has to be open or collapsed at the time of its creation. Note that once the panel has been created with bl_default_closed = True, at reload (F8) it stays open.");
-       
-       prop= RNA_def_property(srna, "bl_show_header", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", PNL_NO_HEADER);
-       RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
-       RNA_def_property_ui_text(prop, "Show Header", "If set to True, the panel shows a header, which contains a clickable arrow to collapse the panel and the label (see bl_label).");
+       prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "type->flag");
+       RNA_def_property_enum_items(prop, panel_flag_items);
+       RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
+       RNA_def_property_ui_text(prop, "Options",  "Options for this panel type");
 }
 
 static void rna_def_header(BlenderRNA *brna)