Fix #27660: texture space panel was missing for curve & metaballs, now they
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 17 Jun 2011 13:53:47 +0000 (13:53 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 17 Jun 2011 13:53:47 +0000 (13:53 +0000)
have same panel as mesh. Patch by Ronan Ducluzeau, thanks!

release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_metaball.py

index 11a129377e8a7a1976e023a8eb761526401f25a0..cb26b093601cf3b4e75eef78b27521f738dc6cb9 100644 (file)
@@ -112,14 +112,25 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
             sub.prop(curve, "use_fill_front")
             sub.prop(curve, "use_fill_back")
             col.prop(curve, "use_fill_deform", text="Fill Deformed")
+            
+class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
+    bl_label = "Texture Space"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        ob = context.object
+        curve = context.curve
 
-        col.label(text="Textures:")
-        col.prop(curve, "use_uv_as_generated")
-        col.prop(curve, "use_auto_texspace")
+        row = layout.row()
+        row.prop(curve, "use_auto_texspace")
+        row.prop(curve, "use_uv_as_generated")
         
         row = layout.row()
-        row.column().prop(curve, "texspace_location")
-        row.column().prop(curve, "texspace_size")
+        row.column().prop(curve, "texspace_location", text="Location")
+        row.column().prop(curve, "texspace_size", text="Size")
 
 
 class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
index c568d10b3b03ad0e5db63e17860ce3b4f98c7d6f..606c13594f3ff8edb4728df1d1216f3a659756e5 100644 (file)
@@ -71,9 +71,22 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
         layout.label(text="Update:")
         layout.prop(mball, "update_method", expand=True)
         
+        
+class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
+    bl_label = "Texture Space"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+    
+    def draw(self, context):
+        layout = self.layout
+
+        mball = context.meta_ball
+
+        layout.prop(mball, "use_auto_texspace")
+        
         row = layout.row()
-        row.column().prop(mball, "texspace_location")
-        row.column().prop(mball, "texspace_size")
+        row.column().prop(mball, "texspace_location", text="Location")
+        row.column().prop(mball, "texspace_size", text="Size")
 
 
 class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
@@ -122,4 +135,4 @@ class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.P
     _property_type = bpy.types.MetaBall
 
 if __name__ == "__main__":  # only for live edit.
-    bpy.utils.register_module(__name__)
+    bpy.utils.register_module(__name__)
\ No newline at end of file