Skip to content

Commit

Permalink
Fix : Cell thickness won't change if stairs == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gorgious56 committed Oct 17, 2020
1 parent df7e4b2 commit 59013a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Maze Generator/blender_logic/drivers/objects/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ def setup_drivers(scene, props):
f'int(var) in ({space_reps.cylinder}, {space_reps.moebius}, {space_reps.torus})')
setup_driver_from_addon_props(
obj_cells, names.moebius, show, scene, "maze_space_dimension", f'int(var) == {space_reps.moebius}')
setup_driver_from_addon_props(
obj_cells, names.thickness_disp, show, scene, "maze_basement", 'not var')

setup_driver(obj_cells.modifiers[names.thickness_disp], DriverProperties(
show,
[
DriverVariable("basement", 'SCENE', scene, "maze_basement"),
DriverVariable("stairs", 'OBJECT', obj_cells,
f'modifiers["{names.stairs}"].strength'),
],
expression="not basement or stairs == 0"))

setup_driver(obj_cells.modifiers[names.thickness_solid], DriverProperties(
show,
Expand Down

0 comments on commit 59013a6

Please sign in to comment.