[Bf-extensions-cvs] [684327ef] master: Castle - Made comments more Git friendly

NBurn noreply at git.blender.org
Fri Jan 18 00:29:59 CET 2019


Commit: 684327ef877c1ba41c9454cca0f91db1bac35b13
Author: NBurn
Date:   Thu Jan 17 18:29:41 2019 -0500
Branches: master
https://developer.blender.org/rBAC684327ef877c1ba41c9454cca0f91db1bac35b13

Castle - Made comments more Git friendly

===================================================================

M	add_mesh_castle/Castle.py

===================================================================

diff --git a/add_mesh_castle/Castle.py b/add_mesh_castle/Castle.py
index 10d71bd5..8681e8a5 100644
--- a/add_mesh_castle/Castle.py
+++ b/add_mesh_castle/Castle.py
@@ -251,14 +251,14 @@ class add_castle(bpy.types.Operator):
     # current wall level parameter value display.
     CLvl: IntProperty(name="Level", min=1, max=LVL_MAX, default=1)
 
-#    curLvl=CLvl
+    #    curLvl=CLvl
 
     # block sizing
     blockX: FloatProperty(name="Width", min=BLOCK_MIN, max=BLOCK_MAX, default=BLOCK_XDEF)
     blockZ: FloatProperty(name="Height", min=BLOCK_MIN, max=BLOCK_MAX, default=BLOCK_XDEF)
     blockD: FloatProperty(name="Depth", min=BLOCK_MIN, max=BLOCK_MAX, default=BLOCK_DDEF)
-# allow 0 for test cases...
-#    blockD=FloatProperty(name="Depth",min=0,max=BLOCK_MAX,default=BLOCK_DDEF)
+    # allow 0 for test cases...
+    #    blockD=FloatProperty(name="Depth",min=0,max=BLOCK_MAX,default=BLOCK_DDEF)
 
     blockVar: BoolProperty(name="Vary", default=True, description="Randomize block sizing")
 
@@ -268,7 +268,7 @@ class add_castle(bpy.types.Operator):
 
     blockMerge: BoolProperty(name="Merge", default=True, description="Merge closely adjoining blocks")
 
-# @todo: fix edgeing for mis-matched row sizing (or just call it a feature).
+    # @todo: fix edgeing for mis-matched row sizing (or just call it a feature).
     EdgeOffset: FloatProperty(name="Edging", min=0, max=HALF_WALL, default=0.25, description="stagger wall ends")
 
     # block spacing
@@ -277,12 +277,12 @@ class add_castle(bpy.types.Operator):
     wallRGB: FloatVectorProperty(min=0, max=1, default=(0.5, 0.5, 0.5), subtype='COLOR', size=3)
 
 
-# track height with each level...?
+    # track height with each level...?
     wallH: FloatProperty(name="Height", min=WALL_MIN, max=WALL_MAX, default=WALL_DEF)
 
     # floor per level - LVL_MAX
-# Base, always true (primary object/parent)
-#    CFloor1=BoolProperty(default=True)
+    # Base, always true (primary object/parent)
+    #    CFloor1=BoolProperty(default=True)
     CFloor2: BoolProperty(default=False)
     CFloor3: BoolProperty(default=False)
     CFloor4: BoolProperty(default=False)
@@ -383,7 +383,7 @@ class add_castle(bpy.types.Operator):
     wallRO9: BoolProperty(default=False)
     wallRO10: BoolProperty(default=False)
 
-#    CRoof=BoolProperty(name="Roof",default=False)
+    #    CRoof=BoolProperty(name="Roof",default=False)
 
     # Select wall modifier option to view/edit
     wallOpView: EnumProperty(items=(
@@ -395,7 +395,7 @@ class add_castle(bpy.types.Operator):
         ("6", "Shelf", ""),
     ),
         name="", description="View/Edit wall modifiers", default="1")
-# could add material selection for step and shelf...
+    # could add material selection for step and shelf...
 
     # Radiating from one point - round (disc), with slope makes dome.
     cDome: BoolProperty(name='Dome', default=False)
@@ -460,7 +460,7 @@ class add_castle(bpy.types.Operator):
     wallDR10: BoolProperty(default=False)
 
     # Slots, embrasure - classical slit for arrow/rifle ports.
-# need to prevent overlap with arch openings - though inversion is an interesting effect.
+    # need to prevent overlap with arch openings - though inversion is an interesting effect.
     SlotVW: FloatProperty(name="Width", min=BLOCK_MIN, max=HALF_WALL, default=0.5)
     SlotVH: FloatProperty(name="Height", min=BLOCK_MIN, max=HALF_WALL, default=3.5)
     SlotVL: FloatProperty(name="Indent", min=-WALL_MAX, max=WALL_MAX, default=0, description="The x position or spacing")
@@ -569,7 +569,7 @@ class add_castle(bpy.types.Operator):
     wallPR10: BoolProperty(default=False)
 
     # Crenel = "gaps" on top of wall.
-# review and determine min for % - should allow less...
+    # review and determine min for % - should allow less...
     CrenelXP: FloatProperty(name="Width %", min=0.10, max=1.0, default=0.15)
     CrenelZP: FloatProperty(name="Height %", min=0.10, max=1.0, default=0.10)
 
@@ -618,12 +618,12 @@ class add_castle(bpy.types.Operator):
     wallCR10: BoolProperty(default=False)
 
     # shelf location and size.
-# see "balcony" options for improved capabilities.
-# should limit x and z to wall boundaries
+    # see "balcony" options for improved capabilities.
+    # should limit x and z to wall boundaries
     ShelfX: FloatProperty(name="XOff", min=-WALL_MAX, max=WALL_MAX, default=-(WALL_DEF / 2), description="x origin")
     ShelfZ: FloatProperty(name="Base", min=-WALL_MAX, max=WALL_MAX, default=WALL_DEF, description="z origin")
     ShelfW: FloatProperty(name="Width", min=BLOCK_MIN, max=WALL_MAX, default=WALL_DEF, description="The Width of shelf area")
-# height seems to be double, check usage
+    # height seems to be double, check usage
     ShelfH: FloatProperty(name="Height", min=BLOCK_MIN, max=HALF_WALL, default=0.5, description="The Height of Shelf area")
     ShelfD: FloatProperty(name="Depth", min=BLOCK_MIN, max=WALL_MAX, default=BLOCK_DDEF, description="Depth of shelf")
     ShelfOut: BoolProperty(name="Out", default=True, description="Position outside of wall")
@@ -729,26 +729,26 @@ class add_castle(bpy.types.Operator):
     wallSR10: BoolProperty(default=False)
 
     # Experimental options
-# allow per wall and level?
+    # allow per wall and level?
     cXTest: BoolProperty(default=False)
     # wall shape modifiers
     # make the wall circular - if not curved it's a flat disc
     # Radiating from one point - round/disc; instead of square
-#    wallDisc=BoolProperty(default=False,description="Make wall disc")
+    #    wallDisc=BoolProperty(default=False,description="Make wall disc")
     # Warp/slope/curve wall - abstract use only (except for dome use)
     wallSlope: BoolProperty(default=False, description="Curve wall")  # top to bottom mid
     CTunnel: BoolProperty(default=False, description="Tunnel wall")  # bottom to top mid
-# rotate tunnel?...
+    # rotate tunnel?...
     CTower: BoolProperty(name='Tower', default=False)
 
-##
-####
-################################################################################
-# Show the UI - present properties to user.
+    ##
+    ####
+    ############################################################################
+    # Show the UI - present properties to user.
     # Display the toolbox options
-################################################################################
-####
-##
+    ############################################################################
+    ####
+    ##
     def draw(self, context):
 
         layout = self.layout
@@ -762,8 +762,9 @@ class add_castle(bpy.types.Operator):
         row = box.row()
         row.prop(self, 'cBaseW')
         row.prop(self, 'cBaseD')
-# this is 0 until more complex settings allowed... like repeat or per-level (like wall) selection.
-#        box.prop(self,'cBaseO') # vert offset from 3D cursor
+        # this is 0 until more complex settings allowed... like repeat or
+        # per-level (like wall) selection.
+        #        box.prop(self,'cBaseO') # vert offset from 3D cursor
 
         box.prop(self, 'cBaseT', text="Thickness")  # height/thickness of floor.
         row = box.row()
@@ -918,11 +919,11 @@ class add_castle(bpy.types.Operator):
             row.prop(self, 'cDomeRGB', text='')
             box.prop(self, 'cDomeH')
             box.prop(self, 'cDomeZ')
-# Oculus - opening in top of dome
-#            box.prop(self,'cDomeO')
+        # Oculus - opening in top of dome
+        #            box.prop(self,'cDomeO')
 
         # abstract/experimental
-# Use "icon="MESH_CONE" for roof
+        # Use "icon="MESH_CONE" for roof
         box = layout.box()
         row = box.row()
         row.prop(self, 'cXTest', text='Experimental')
@@ -930,14 +931,15 @@ class add_castle(bpy.types.Operator):
             box.prop(self, 'wallSlope', text='Curve')
             box.prop(self, 'CTunnel', text='Tunnel', icon="CURVE_DATA")
             box.prop(self, 'CTower', text='Tower', icon="CURVE_DATA")
-##
-####
-################################################################################
-# Respond to UI - process the properties set by user.
-    # Check and process UI settings to generate castle.
-################################################################################
-####
-##
+
+    ##
+    ####
+    ############################################################################
+    # Respond to UI - process the properties set by user.
+        # Check and process UI settings to generate castle.
+    ############################################################################
+    ####
+    ##
 
     def execute(self, context):
 
@@ -975,23 +977,23 @@ class add_castle(bpy.types.Operator):
             self.properties.cBaseD = minWallW
         CastleD = self.properties.cBaseD
         midWallD = (CastleD + blockDepth) / 2
-#        midWallD=CastleD/2
-#        midWallD=(CastleD-blockDepth)/2
+        #        midWallD=CastleD/2
+        #        midWallD=(CastleD-blockDepth)/2
 
         # gap cannot reduce block below minimum.
         if self.properties.Grout > blockHeight / 2 - BLOCK_MIN:
             self.properties.Grout = blockHeight / 2 - BLOCK_MIN
 
         # Variance limit for minimum block height.
-# not quite right, but usuable.
+        # not quite right, but usuable.
         blockHMin = self.properties.Grout + BLOCK_MIN
 
         # floor "thickness" cannot exceed block height
         if self.properties.cBaseT > blockHeight:
             self.properties.cBaseT = blockHeight
 
-############
-#
+        ############
+        #
         if self.properties.cDome:
             # base can't be lower than floor
             # consider limiting base to roof or wall height by levels?
@@ -1017,30 +1019,32 @@ class add_castle(bpy.types.Operator):
             # Dome Oculus (opening) can't be more than half dome height
             if self.properties.cDomeO > domeMaxO:
                 self.properties.cDomeO = domeMaxO
-#
-############
-#####
-#
-# After validating all the properties see if need to create...
-# @todo: fix so last object preserved... (i.e. changing levels).
+
+        #
+        ############
+        #####
+        #
+        # After validating all the properties see if need to create...
+        

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list