BProjection: Also added soft boundaries for scale and UV sliders
authorGaia Clary <gaia.clary@machinimatrix.org>
Sun, 7 Oct 2012 13:52:36 +0000 (13:52 +0000)
committerGaia Clary <gaia.clary@machinimatrix.org>
Sun, 7 Oct 2012 13:52:36 +0000 (13:52 +0000)
space_view3d_paint_bprojection.py

index 1ea7345920a60ca9537af3252b8649f7d3cca71b..46330c27941732660f32fd321c74c4b2d1f164ad 100644 (file)
@@ -269,10 +269,17 @@ class custom_props(bpy.types.PropertyGroup):
                                        subtype = 'XYZ',
                                        min = 0.1,
                                        max = 10,
+                                       soft_min=0.1,
+                                       soft_max=10,
                                        step=0.1,
                                        size=2)
     custom_propscale = FloatProperty(name="PropScale", description="Scale the Plane",
-                                           default=1.0,min = 0.1)
+                                     default=1.0,
+                                     min = 0.1,
+                                     max = 10,
+                                     soft_min=0.1,
+                                     soft_max=10,
+                                     step=0.1)
                                                                                     
     custom_linkscale = BoolProperty(name="linkscale", default=True)
    
@@ -322,15 +329,19 @@ def createcustomprops(context):
                                           default=(1.0, 1.0),
                                           min = 0.1,
                                           max = 10,
+                                          soft_min = 0.1,
+                                          soft_max = 10,
                                           size=2,
                                           step=0.5,
                                           update = update_Scale)
                                           
     Ob.custom_propscale = FloatProperty(name="PropScale", description="Scale the Plane",
-                                        default=1.0,
-                                        min = 0.1,
-                                        step=0.5,
-                                        update = update_PropScale)
+                                        default  = 1.0,
+                                        min      = 0.1,
+                                        soft_min = 0.1,
+                                        soft_max = 10,
+                                        step     = 0.5,
+                                        update   = update_PropScale)
                                            
     Ob.custom_old_scale = FloatVectorProperty(name="old_Scales", description="Old Scale the planes",
                                           subtype = 'XYZ', default=(1.0, 1.0),min = 0.1, size=2)
@@ -343,9 +354,21 @@ def createcustomprops(context):
     
     # UV properties
     Ob.custom_scaleuv = FloatVectorProperty(name="ScaleUV", description="Scale the texture's UV",
-                                            default=(1.0,1.0),min = 0.01, subtype = 'XYZ', size=2,update = update_UVScale)
+                                            default  = (1.0,1.0),
+                                            soft_min = 0.01,
+                                            soft_max = 100,
+                                            min      = 0.01, 
+                                            subtype  = 'XYZ',
+                                            size     = 2,
+                                            update   = update_UVScale)
+                                            
     Ob.custom_propscaleuv = FloatProperty(name="PropScaleUV", description="Scale the texture's UV",
-                                           default=1.0,min = 0.01,update = update_PropUVScale)    
+                                          default    = 1.0,
+                                          soft_min   = 0.01,
+                                          soft_max   = 100,
+                                          min        = 0.01,
+                                          update     = update_PropUVScale)    
+
     Ob.custom_old_scaleuv = FloatVectorProperty(name="old_ScaleUV", description="Scale the texture's UV",
                                                 default=(1.0,1.0),min = 0.01, subtype = 'XYZ', size=2)
     Ob.custom_offsetuv = FloatVectorProperty(name="OffsetUV", description="Decal the texture's UV",