Draft
Conversation
This might be a patch for the problem, but it works
Also used as a backup for me
Owner
|
Great work! Regarding the higlighting issue: it's not possible to start an operator when a workplace tool is selected, tools are mostly just a keymap. I would suggest to have your line projection command simply be an operator and add it to the sidebar, there's already a 'Tools' panel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building off of @MagicBOTAlex's great work in pr #481. addresses issue #36
Major Changes:
added a "Project-Include" tool based off of the same tool within Fusion360. This tool allows the user to select a mesh object, or a face within a mesh object and project it onto the Workplane.
Will add example gif to this PR sometime soon
Tested a few options for "highlighting" geometry for easier selection. ended up needing to tweak the OperatorSubclass.evaluate_state() method to allow the desired behavior. I wanted the UX to be: when the tool is selected blender activates modal mode automatically and utilizes the highlighting logic present in the operator. After some light research, that didn't seem possible (though I'm fairly new to blender Addons), so i ended up with the following UX: the user selects the tool, clicks somewhere on the screen to activate modal mode, and the highlighting happens.
The highlighting itself is also somewhat janky, I couldn't get any custom GL code to run without crashing blender so I'm creating temporary meshes on screen with a highlight material (more visible in viewport shading). Definitely open to suggestions here, but this seemed to get the job done.
Additional Thoughts:
As mentioned in the previous PR, if we can find a way to connect the geometry to the sketch s.t. if the source geometry moves, so does the sketch projection then that would really make this work great. I'm not entirely sure how best to tackle that, so open to ideas there.
Additional Work: