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:
Diffstat (limited to 'release/ui/buttons_data_curve.py')
-rw-r--r--release/ui/buttons_data_curve.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py
index b8b7d6a324f..869d29802e1 100644
--- a/release/ui/buttons_data_curve.py
+++ b/release/ui/buttons_data_curve.py
@@ -7,18 +7,21 @@ class DataButtonsPanel(bpy.types.Panel):
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'CURVE' and context.curve)
+ return (context.object and context.object.type == 'CURVE' and context.curve)
class DATA_PT_shape_curve(DataButtonsPanel):
__idname__ = "DATA_PT_shape_curve"
__label__ = "Shape"
+
+ def poll(self, context):
+ return (context.object and context.object.type == 'CURVE')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
curve = context.curve
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
@@ -63,8 +66,8 @@ class DATA_PT_geometry(DataButtonsPanel):
__label__ = "Geometry"
def draw(self, context):
- curve = context.curve
layout = self.layout
+ curve = context.curve
split = layout.split()
@@ -85,9 +88,9 @@ class DATA_PT_pathanim(DataButtonsPanel):
__label__ = "Path Animation"
def draw_header(self, context):
+ layout = self.layout
curve = context.curve
- layout = self.layout
layout.itemR(curve, "path", text="")
def draw(self, context):
@@ -110,8 +113,8 @@ class DATA_PT_current_curve(DataButtonsPanel):
__label__ = "Current Curve"
def draw(self, context):
- currentcurve = context.curve.curves[0] # XXX
layout = self.layout
+ currentcurve = context.curve.curves[0] # XXX
split = layout.split()