Skip to content

Commit

Permalink
Merge branch 'main' into feat/colored-formation-import
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Jul 9, 2023
2 parents c27d66e + 3748294 commit 4e91e93
Show file tree
Hide file tree
Showing 25 changed files with 770 additions and 186 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Transitions can now be marked as locked. Keyframes corresponding to the
locked transitions are never modified by transition recalculations.

- You can now tweak the departure and arrival times of individual drones within
a transition with schedule overrides. This can be used to resolve collisions
during a staggered transition manually, or to manually create more complex
transition patterns.

### Fixed

- View scaling setting from the Blender preferences is now taken into account
Expand Down
2 changes: 0 additions & 2 deletions doc/modules/ROOT/pages/panels/formations/swarm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ image::panels/swarm/takeoff.jpg[Takeoff]

This button should ideally be pressed right after the takeoff grid is created before any other formations are added yet. It is also possible to use the operator later after having defined the first few formations, but you must ensure that there is enough time before the first formation to perform the takeoff _and_ get to the first formation in time.

The btn:[Relative Altitude] checkbox specifies whether the altitude is interpreted relative to the current altitude of each drone (when checked) or as an absolute altitude above ground level (when unchecked). Typically you can leave it unchecked; it makes a difference only if the drones are placed at different heights before takeoff.

NOTE: Skybrush requires you to specify the _average_ vertical velocity of the drones during takeoff. This lets you gauge easily how much time the takeoff will need (e.g., taking off to 6 meters with an average velocity of 1.5 m/s takes 4 seconds), but since the drones need time to accelerate and decelerate, their _maximum_ vertical velocity will be higher than the average velocity to compensate for the time lost during acceleration and deceleration. Make sure to take this into account in order not to overshoot the vertical velocity limits of the drones.

== Return to home (RTH)
Expand Down
82 changes: 35 additions & 47 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ homepage = "https://skybrush.io"
repository = "https://github.com/skybrush-io/studio-plugin-blender"
documentation = "https://doc.collmot.com/public/skybrush-plugin-blender/latest/"

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

[[tool.poetry.source]]
name = "collmot"
url = "https://pypi.collmot.com/simple/"
secondary = true
priority = "explicit"

[[tool.poetry.source]]
name = "fury"
url = "https://pypi.fury.io/skybrush/"
secondary = true
priority = "supplemental"

[tool.poetry.dependencies]
python = "^3.9"
Expand All @@ -28,9 +32,14 @@ svgpathtools = { version = "^1.6.1", optional = true, source = "fury" }
[tool.poetry.extras]
standalone = ["skybrush-studio", "svgpathtools"]

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
pyclean = "^2.0.0"

[tool.ruff]
ignore = ["B905", "C901", "E402", "E501"]
line-length = 80
select = ["B", "C", "E", "F", "W"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down
13 changes: 9 additions & 4 deletions src/addons/io_import_skybrush_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@
# Note: This code needs to be harmonized with the plugin installer to have
# the same target directory for all add-on specific dependencies.

candidates = [
abspath(bpy.context.preferences.filepaths.script_directory),
Path(sys.modules[__name__].__file__).parent.parent,
]
if bpy.app.version >= (3, 6, 0):
candidates = [
abspath(script_directory.directory)
for script_directory in bpy.context.preferences.filepaths.script_directories
]
else:
candidates = [abspath(bpy.context.preferences.filepaths.script_directory)]
candidates.append(Path(sys.modules[__name__].__file__).parent.parent)

for candidate in candidates:
path = (Path(candidate) / "vendor" / "skybrush").resolve()
if path.exists():
Expand Down
14 changes: 10 additions & 4 deletions src/addons/io_import_skybrush_sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@
# Note: This code needs to be harmonized with the plugin installer to have
# the same target directory for all add-on specific dependencies.

candidates = [
abspath(bpy.context.preferences.filepaths.script_directory),
Path(sys.modules[__name__].__file__).parent.parent,
]

if bpy.app.version >= (3, 6, 0):
candidates = [
abspath(script_directory.directory)
for script_directory in bpy.context.preferences.filepaths.script_directories
]
else:
candidates = [abspath(bpy.context.preferences.filepaths.script_directory)]
candidates.append(Path(sys.modules[__name__].__file__).parent.parent)

for candidate in candidates:
path = (Path(candidate) / "vendor" / "skybrush").resolve()
if path.exists():
Expand Down
13 changes: 11 additions & 2 deletions src/addons/ui_skybrush_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
#############################################################################
# imports needed by the addon

from sbstudio.plugin.lists import SKYBRUSH_UL_lightfxlist
from sbstudio.plugin.lists import (
SKYBRUSH_UL_lightfxlist,
SKYBRUSH_UL_scheduleoverridelist,
)
from sbstudio.plugin.menus import GenerateMarkersMenu
from sbstudio.plugin.model import (
DroneShowAddonFileSpecificSettings,
Expand All @@ -54,6 +57,7 @@
LightEffectCollection,
MappingType,
SafetyCheckProperties,
ScheduleOverride,
StoryboardEntry,
Storyboard,
)
Expand All @@ -64,6 +68,7 @@
AppendFormationToStoryboardOperator,
ApplyColorsToSelectedDronesOperator,
CreateFormationOperator,
CreateNewScheduleOverrideEntryOperator,
CreateNewStoryboardEntryOperator,
CreateLightEffectOperator,
CreateTakeoffGridOperator,
Expand All @@ -82,6 +87,7 @@
RecalculateTransitionsOperator,
RemoveFormationOperator,
RemoveLightEffectOperator,
RemoveScheduleOverrideEntryOperator,
RemoveStoryboardEntryOperator,
ReorderFormationMarkersOperator,
ReturnToHomeOperator,
Expand Down Expand Up @@ -142,6 +148,7 @@
LightEffect,
LightEffectCollection,
MappingType,
ScheduleOverride,
StoryboardEntry,
Storyboard,
LEDControlPanelProperties,
Expand All @@ -168,6 +175,8 @@
MoveStoryboardEntryUpOperator,
SelectStoryboardEntryForCurrentFrameOperator,
RemoveStoryboardEntryOperator,
CreateNewScheduleOverrideEntryOperator,
RemoveScheduleOverrideEntryOperator,
UpdateFrameRangeFromStoryboardOperator,
UpdateTimeMarkersFromStoryboardOperator,
CreateLightEffectOperator,
Expand Down Expand Up @@ -198,7 +207,7 @@
)

#: List widgets in this addon.
lists = (SKYBRUSH_UL_lightfxlist,)
lists = (SKYBRUSH_UL_lightfxlist, SKYBRUSH_UL_scheduleoverridelist)

#: Menus in this addon
menus = (GenerateMarkersMenu,)
Expand Down
Loading

0 comments on commit 4e91e93

Please sign in to comment.