Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlockCanvas: Implement drag & drop the file from resource FileSystem #305

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

starnight
Copy link
Contributor

Dragging the files from resource FileSystem shows the files' type as
"files". So, allow the "files" type in _can_drop_data() and handle it in
_drop_data(). Then, implement getting the files' resource paths as
Variable blocks with _drop_files() in detail.

https://phabricator.endlessm.com/T35712

Extract dropping nodes codes as function _drop_node from _drop_data, if
the type is "nodes". So, other types such as "obj_property" can be added
later.

https://phabricator.endlessm.com/T35649
Dragging the node's property from Inspector shows the object's type as
"obj_property". So, allow the "obj_property" type in _can_drop_data()
and handle it in _drop_data(). Then, implement getting the property's
value as a Variable block with _drop_obj_property() in detail.

https://phabricator.endlessm.com/T35649
… if CTRL is pressed

Drag & drop the node's set property block from Inspector if the modifier
key CTRL is pressed. To detect pressing CTRL key, hook the input event
and set the _modifier_ctrl flag with the CTRL key's pressed state. If
the _modifier_ctrl is true, then drop a set Variable block. Otherwise,
it should be a get Variable block of the property.

https://phabricator.endlessm.com/T35649
@starnight
Copy link
Contributor Author

This depends on #296. So, set it as draft now.

@starnight starnight marked this pull request as draft November 5, 2024 08:32
@starnight
Copy link
Contributor Author

Here is the demo video:

Screencast.From.2024-11-05.16-28-04.mp4

Dragging the files from resource FileSystem shows the files' type as
"files". So, allow the "files" type in _can_drop_data() and handle it in
_drop_data(). Then, implement getting the files' resource paths as
Variable blocks with _drop_files() in detail.

https://phabricator.endlessm.com/T35712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant