forked from bartvdbraak/blender
UI/RNA:
* Code cleanup.
This commit is contained in:
parent
f515e430bc
commit
01b0cc7f21
@ -262,10 +262,6 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
|
||||
return psys.settings.type == 'HAIR' and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
#cloth = context.cloth.collision_settings
|
||||
|
||||
#self.layout.active = cloth_panel_enabled(context.cloth)
|
||||
#self.layout.prop(cloth, "use_collision", text="")
|
||||
psys = context.particle_system
|
||||
self.layout.prop(psys, "use_hair_dynamics", text="")
|
||||
|
||||
|
@ -195,14 +195,13 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
rd = context.scene.render
|
||||
self.layout.prop(rd, "use_simplify", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
rd = context.scene.render
|
||||
|
||||
layout.active = rd.use_simplify
|
||||
|
||||
|
@ -474,16 +474,14 @@ class CLIP_PT_stabilization(Panel):
|
||||
return sc.mode == 'RECONSTRUCTION' and sc.clip
|
||||
|
||||
def draw_header(self, context):
|
||||
sc = context.space_data
|
||||
tracking = sc.clip.tracking
|
||||
stab = tracking.stabilization
|
||||
|
||||
stab = context.space_data.clip.tracking.stabilization
|
||||
|
||||
self.layout.prop(stab, "use_2d_stabilization", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
sc = context.space_data
|
||||
tracking = sc.clip.tracking
|
||||
|
||||
tracking = context.space_data.clip.tracking
|
||||
stab = tracking.stabilization
|
||||
|
||||
layout.active = stab.use_2d_stabilization
|
||||
|
@ -2192,10 +2192,9 @@ class VIEW3D_PT_view3d_motion_tracking(Panel):
|
||||
return (view)
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
|
||||
layout.prop(view, "show_reconstruction", text="")
|
||||
self.layout.prop(view, "show_reconstruction", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@ -2277,10 +2276,9 @@ class VIEW3D_PT_background_image(Panel):
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
|
||||
layout.prop(view, "show_background_images", text="")
|
||||
self.layout.prop(view, "show_background_images", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@ -2359,14 +2357,12 @@ class VIEW3D_PT_transform_orientations(Panel):
|
||||
layout = self.layout
|
||||
|
||||
view = context.space_data
|
||||
orientation = view.current_orientation
|
||||
|
||||
col = layout.column()
|
||||
|
||||
col.prop(view, "transform_orientation")
|
||||
col.operator("transform.create_orientation", text="Create")
|
||||
|
||||
orientation = view.current_orientation
|
||||
|
||||
if orientation:
|
||||
col.prop(orientation, "name")
|
||||
col.operator("transform.delete_orientation", text="Delete")
|
||||
|
@ -1123,8 +1123,8 @@ static void rna_def_transform_orientation(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation");
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user