Skip to content

Commit

Permalink
Don't process layouting node inside templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Mar 10, 2022
1 parent 505ff9a commit 7465212
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion editor_scripts/create_druid_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ def main():
for node in root.iter_elements("nodes"):
node_name = node.get_attribute("id").value
scheme_list.append("\t" + get_id(node_name) + " = \"" + node_name + "\"")
process_component(node_name, component_name)

is_template = node.get_attribute("template")
is_in_template = "/" in node_name
if not is_template and not is_in_template:
process_component(node_name, component_name)

if len(component_define) > 2:
component_define = "\n" + component_define
Expand Down
5 changes: 3 additions & 2 deletions editor_scripts/create_druid_component.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

is_defree_installed=$(pip3 list --disable-pip-version-check | grep -E "deftree")
if [ -z "$is_defree_installed" ]; then
echo "The python deftree is not installed. Installing..."
pip3 install deftree
echo "The python deftree is not installed. Please install it via"
echo "pip3 install deftree"
exit 0
fi

python3 $DIR/create_druid_component.py $@
5 changes: 3 additions & 2 deletions editor_scripts/setup_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

is_defree_installed=$(pip3 list --disable-pip-version-check | grep -E "deftree")
if [ -z "$is_defree_installed" ]; then
echo "The python deftree is not installed. Installing..."
pip3 install deftree
echo "The python deftree is not installed. Please install it via"
echo "pip3 install deftree"
exit 0
fi

python3 $DIR/setup_layers.py $@

0 comments on commit 7465212

Please sign in to comment.