WIP. write derived block creator

This commit is contained in:
yyc12345 2020-10-08 17:12:38 +08:00
parent f0e3c3a597
commit 512cbce7fe
3 changed files with 45 additions and 90 deletions

View File

@ -38,18 +38,6 @@ class BALLANCE_OT_add_floor(bpy.types.Operator):
default=1.0,
)
rotation_inside_mesh: bpy.props.EnumProperty(
name="Rotation",
description="Rotation inside mesh",
items=(
("R0", "0 degree", ""),
("R90", "90 degree", ""),
("R180", "180 degree", ""),
("R270", "270 degree", "")
),
default="R0"
)
use_2d_top : bpy.props.BoolProperty(
name="Top side"
)
@ -83,7 +71,7 @@ class BALLANCE_OT_add_floor(bpy.types.Operator):
load_basic_floor(
objmesh,
self.floor_type,
self.rotation_inside_mesh,
'R0',
self.height_multiplier,
self.expand_length_1,
self.expand_length_2,
@ -98,7 +86,7 @@ class BALLANCE_OT_add_floor(bpy.types.Operator):
load_derived_floor(
objmesh,
self.floor_type,
self.rotation_inside_mesh,
'R0',
self.height_multiplier,
self.expand_length_1,
self.expand_length_2,
@ -139,7 +127,6 @@ class BALLANCE_OT_add_floor(bpy.types.Operator):
col = layout.column()
col.label(text="Basic param")
col.prop(self, "floor_type")
col.prop(self, "rotation_inside_mesh")
col.prop(self, "height_multiplier")
col.separator()

View File

@ -3,6 +3,10 @@
"Type": "SinkBorder",
"BindingDisplayTexture": "SinkBorder.png",
"UnitSize": "Small",
"MinSize": {
"D1": 0,
"D2": 0
},
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
@ -78,7 +82,7 @@
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorSide"
"Textures": "FloorTopBorderless"
}
]
},
@ -124,7 +128,7 @@
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorSide"
"Textures": "FloorTopBorderless"
}
]
},
@ -151,79 +155,9 @@
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0,0,-5;;;-d3",
"0,2.5,-5;;;-d3",
"0,2.5,-2.5;;;",
"0,0,-2.5;;;",
"0,0,0;;;",
"0,2.5,-0.7;;;"
],
"UVs": [
"0.5,0.5;;",
"0.5,0;;",
"0,0;;",
"0,0.5;;",
"0,0;;",
"0,0.5;;",
"0.5,0.5;+d3;",
"0.5,0;+d3;"
],
"Faces": [
{
"P1": 2,
"P2": 3,
"P3": 4,
"P4": 5,
"Textures": "FloorTopBorder"
},
{
"P1": 3,
"P2": 2,
"P3": 1,
"P4": 0,
"Textures": "FloorTopBorderless"
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": {
"Vertices": [
"2.5,0,-5;+d1;;-d3",
"2.5,2.5,-5;+d1;;-d3",
"2.5,2.5,-2.5;+d1;;",
"2.5,0,-2.5;+d1;;",
"2.5,0,0;+d1;;",
"2.5,2.5,-0.7;+d1;;"
],
"UVs": [
"0,0.5;;",
"0,0;;",
"0.5,0;;",
"0.5,0.5;;",
"0.5,0;+d3;",
"0.5,0.5;+d3;",
"0,0.5;;",
"0,0;;"
],
"Faces": [
{
"P1": 5,
"P2": 4,
"P3": 3,
"P4": 2,
"Textures": "FloorTopBorder"
},
{
"P1": 0,
"P2": 1,
"P3": 2,
"P4": 3,
"Textures": "FloorTopBorderless"
}
]
},
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5,0,-5;+d1;;-d3",

View File

@ -1,3 +1,37 @@
[
{
"Type": "SinkFloor",
"BindingDisplayTexture": "SinkFloor.png",
"UnitSize": "Small",
"MinSize": {
"D1": 0,
"D2": 0
},
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkBorder",
"StartPosition": "0,0;,,,",
"ExpandPosition": "0,0;,d1,,",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom"
},
{
"Type": "SinkBorder",
"StartPosition": "0,1;,d1,,",
"ExpandPosition": "0,0;,d1,,",
"Rotation": "R180",
"SideSync": "2dBottom;False;2dTop;2dRight;3dTop;3dBottom"
}
]
}
]