UI/RNA:
* Code cleanup.
This commit is contained in:
@@ -262,10 +262,6 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
|
|||||||
return psys.settings.type == 'HAIR' and (engine in cls.COMPAT_ENGINES)
|
return psys.settings.type == 'HAIR' and (engine in cls.COMPAT_ENGINES)
|
||||||
|
|
||||||
def draw_header(self, context):
|
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
|
psys = context.particle_system
|
||||||
self.layout.prop(psys, "use_hair_dynamics", text="")
|
self.layout.prop(psys, "use_hair_dynamics", text="")
|
||||||
|
|
||||||
|
@@ -195,14 +195,13 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
|
|||||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
scene = context.scene
|
rd = context.scene.render
|
||||||
rd = scene.render
|
|
||||||
self.layout.prop(rd, "use_simplify", text="")
|
self.layout.prop(rd, "use_simplify", text="")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
scene = context.scene
|
|
||||||
rd = scene.render
|
rd = context.scene.render
|
||||||
|
|
||||||
layout.active = rd.use_simplify
|
layout.active = rd.use_simplify
|
||||||
|
|
||||||
|
@@ -474,16 +474,14 @@ class CLIP_PT_stabilization(Panel):
|
|||||||
return sc.mode == 'RECONSTRUCTION' and sc.clip
|
return sc.mode == 'RECONSTRUCTION' and sc.clip
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
sc = context.space_data
|
stab = context.space_data.clip.tracking.stabilization
|
||||||
tracking = sc.clip.tracking
|
|
||||||
stab = tracking.stabilization
|
|
||||||
|
|
||||||
self.layout.prop(stab, "use_2d_stabilization", text="")
|
self.layout.prop(stab, "use_2d_stabilization", text="")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
sc = context.space_data
|
|
||||||
tracking = sc.clip.tracking
|
tracking = context.space_data.clip.tracking
|
||||||
stab = tracking.stabilization
|
stab = tracking.stabilization
|
||||||
|
|
||||||
layout.active = stab.use_2d_stabilization
|
layout.active = stab.use_2d_stabilization
|
||||||
|
@@ -2192,10 +2192,9 @@ class VIEW3D_PT_view3d_motion_tracking(Panel):
|
|||||||
return (view)
|
return (view)
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
layout = self.layout
|
|
||||||
view = context.space_data
|
view = context.space_data
|
||||||
|
|
||||||
layout.prop(view, "show_reconstruction", text="")
|
self.layout.prop(view, "show_reconstruction", text="")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -2277,10 +2276,9 @@ class VIEW3D_PT_background_image(Panel):
|
|||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
def draw_header(self, context):
|
||||||
layout = self.layout
|
|
||||||
view = context.space_data
|
view = context.space_data
|
||||||
|
|
||||||
layout.prop(view, "show_background_images", text="")
|
self.layout.prop(view, "show_background_images", text="")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -2359,14 +2357,12 @@ class VIEW3D_PT_transform_orientations(Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
view = context.space_data
|
view = context.space_data
|
||||||
|
orientation = view.current_orientation
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
|
|
||||||
col.prop(view, "transform_orientation")
|
col.prop(view, "transform_orientation")
|
||||||
col.operator("transform.create_orientation", text="Create")
|
col.operator("transform.create_orientation", text="Create")
|
||||||
|
|
||||||
orientation = view.current_orientation
|
|
||||||
|
|
||||||
if orientation:
|
if orientation:
|
||||||
col.prop(orientation, "name")
|
col.prop(orientation, "name")
|
||||||
col.operator("transform.delete_orientation", text="Delete")
|
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);
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
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_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);
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user