Precision Drawing Tools (PDT) #70238
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#70238
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A set of Precision Drawing Tools, displayed in the N Panel under its own tab, to assist with precise modelling in Blender.
This set includes options to place the cursor and other features, by Absolute, Delta and Direction inputs, along with other options including Normal & Convergence Intersection and Percentage between selected features.
There is a Pivot Point toolset to provide an alternative location for geometry manipulation, this is displayed optionally as a 3-Axis graphic in the 3D View.
There is also a primitive Parts Library section, still in its infancy, that will be developed over time into a capable repository for standard parts to be used frequently in modelling projects, for example sets of gears, or windows for architecture, etc.
This is my first attempt at a Blender Add-on so I am open to advice and guidance, not only on the design of the code, but also in the procedures for getting an Add-on accepted. I have also opened a GitHub project for this Add-0n here:
https://github.com/Clockmender/Precision-Drawing-Tools
And my website below, contains much more information and help facilities, I know I have to do more work here, but this is going to take time.
https://clockmender.uk/blender/precision-drawing-tools/
Zip file below, I hope I have put this in the right place!
clockworxpdt.zip
Added subscriber: @clockmender
Added subscriber: @BrendonMurphy
Hi, thanks very much for your Interest and hard work. We will look at this shortly. KI think certainly this is a good target for 2.82. We will need to organize commit access for you. we would be able to add this right after 2.81 release and iron out any issue during the pre-release stage. Thanks again. Aweosme work.
Thank you for the support, just keep me informed of what I need to do and when, I am very new to this...
Added subscriber: @Jaydead
Added subscriber: @jesterking
@BrendonMurphy , @clockmender if all goes well you probably can start working on that after stabilizing branch is created. We'll see how that pans out in a few weeks time.
Added subscriber: @jc4d
Added subscriber: @ermo
Added subscriber: @tetha.z
Latest Version (Release 1.1.4) is now on our GitHub:
https://github.com/Clockmender/Precision-Drawing-Tools/releases
I am now getting help from @ermo to get the code up to standard, thanks to him for his work.
I have incorporated 3 functions from TinyCAD, with @tetha.z permission for the next release.
We are also working on the Error messages to be able to have multi-language support.
Added subscriber: @jiku
@ermo and I have been busy with the code. We have added Docstrings and run "Black" https://black.readthedocs.io/en/stable/ on the code to get the formatting from my amateur mess to his professional look, brief example below:
We have also changed all the messages so they are now in a messages file and called by their names, this means that messages can be translated, we have also done same for input descriptions:
This is for the next release, 1.1.5, which also has a new Fillet Tool.
Cheers, Clock.
For maintainability's sake, we've gone with Google-style docstrings for now.
I haven't (yet) been able to figure out which docstring format Blender officially recommends, but links/pointers/tips are most welcome.
EDIT: Oh and the choice of black as THE code formatting tool was deliberate. If someone decides to create a PR, they are expected to run the code through
black -l100
. Manually turning off blackening of a section is only acceptable for math stuff, otherwise not.hi, thanks very much for the updates, I've been speaking with @ermo and I think the plans are to move this forward after 2.81 release. I'll get back here in a week or so and we can discuss starting the review process. Thanks again, you guys are doing a great job here.
I have a question:
Rather than have a command line input like this:
Could I trap a keyed input of say
pdt-fg0.1,4,0.5
and get that interpreted as the PDT command line, so users don't have to key into the command line input, just type the input?Thanks, Clock.
@BrendonMurphy :
We would like to prepare a manual for PDT. Should we be using the official Blender wiki or ...?
hi @ermo the best option at this time is to create a wiki on your github. I'm still working on the Add-ons Manual, we have already accepted docs from github wiki or/and linked into github wiki via the addon. Later down the track I can look at the Blender Manual page and either transfer your work or link to your git.
@ermo @clockmender hi, the following is a template about access to the blender addons project. I think it's a good time now to start the review process.
hi, if you can join this mailing list: bf-committers@blender.org and mail:
Subject:
Content:
It's also useful to join this mailing list: bf-extensions-cvs@blender.org as this list mails out the commits.
https://wiki.blender.org/wiki/Developer_Intro/Overview is a good read.
https:*blender.chat/channel/python and https:*blender.chat/channel/blender-coders provide a good place to discuss your addon or issues if needed. It's good also to drop in and say hi and meet other developers and provides a good communication platform.
Final note: Addons in the Blender repository are updated by addons devs and Blender core devs help with api updates/fixes. As there's multiple people committing it's important to make sure your local folders are updated to current before committing yourself.
Any issues please let us know.
Thanks for your interest and support. Brendon.
@BrendonMurphy We are both signed up and will send the email as soon as we have prepared it thoughtfully.
Thank you for this, we have studied the links you gave us.
EDIT:
Application submitted 19/10/2019.
@BrendonMurphy We have started to produce a Wiki:
https://github.com/Clockmender/Precision-Drawing-Tools/wiki
I should very much appreciate some comments as to whether you think this good enough for purpose.
Thanks Alan.
@ideasman42 Did you get my email re repo access? it was sent on 19th October. I am going to be away from 1st to 30th November and in my absence can you communicate with @ermo please. I will have email and internet some of the time, but there is not very good access in Antarctica!
thanks, Alan.
Added subscriber: @ideasman42
@clockmender from looking at the add-on, it includes a blend file, which we normally try to avoid.
This used to be documented as a requirement, however checking https://wiki.blender.org/wiki/Process/Addons/Guidelines - it seems this wasn't kept, it's since been updated.
Looking at it's contents it has primitive shapes (cone, torus, cylinder), and basic colored materials.
These primitives can be generated at run-time.
@ideasman42 If you look at the latest release, v 1.1.5, we have removed this blend file. Sorry for brevity of reply, I am on holiday and just using my phone!
I was looking at the git repository: https://github.com/Clockmender/Precision-Drawing-Tools/tree/master/clockworxpdt
Both the master branch and
clockworxpdt.zip
linked in this task contain blend files.Which repository/branch should I checkout for the latest version being proposed for Blender?
The code in the v1.1.5 branch is what we intend to propose for inclusion.
Note that the pdt_command functionality still needs to be re-implemented since it currently duplicates code unnecessarily.
@ideasman42 :
I'm guessing you're quite busy so this is just meant as a heads up that we feel that the v1.1.5 code is ready for serious review as we don't expect any more significant churn in the v1.1.x branch.
Let me know if we need to change anything and thanks for taking on the task of whipping us into shape! =)
Once we implement the changes you suggest, the goal is to tag the final RC and advertise it on devtalk. Any issues will be tackled in further RCs.
If no issues pop up, we'll merge the v.1.1.5 branch to master and from there, push it to the blender add-on repo (possibly in the contrib area to begin with?). Guidance welcome.
Went over the
v.1.1.5
branch (sha1,d69431959af14e720e382b1620bf23777a541ded
).Review for Inclusion
Changes which I think are reasonable to do before inclusion:
bpy.types.PropertyGroup
for instead of adding all properties directly into the scene.bpy.props.FloatVectorProperty
for XYZ delta/rotation.©
in this case,(c)
serves just as well.print
calls frompdt_cad_module.py
, these look like they're for debugging and add noise to the output.DEBUG_LOGGING = bpy.app.debug
, then check this before printing debug info.Suggestions
Assign
layout = self.layout
, avoids some repetition, especially for large blocks with many labels.Use static sets for checks like:
if mode not in ["a", "d", "i", "p"]:
.from mathutils.geometry import intersect_line_line as LineIntersect
from mathutils.geometry import intersect_point_line as PtLineIntersect
@ideasman42 - this bit here:
was some legacy code taken from TinyCAD - it does not need to exist, so I have removed it completely, it was only used once and seems to have no useful purpose as a defined function.
We have now implemented all your requirements and suggestions, in a new branch that is currently undergoing extensive testing. Once this is complete we will advise you here and move to a new release.
The only thing we should like to discuss is the need to import all maths functions into the pdt_command.py file as the user may enter any valid mathematical expression to calculate values, via maths expressions, into input fields. so for example a command of:
mxsqrt(45) puts the square root of 45 into the X coordinate input (now a FloatVectorProperty).
There are no restrictions on which maths functions the user may use, so we must import all maths functions. If there is a better way of doing this that we are not aware of, please advise and we can change it. All other "globbings" have been sorted.
@clockmender you can still remove import globbing.
pdb_commands.py
would be cleaner to define a name-space to pass toeval
, otherwise the user may accesscmd
oroper
or any of the other variables.Then it's clear which variables are intended for command access and which are needed for command execution.
Re. input globbing: Are you suggesting that we maintain a list of valid mathematical functions from the math module instead?
We're currently looking for examples of supplying namespaces to eval().
You don't have to maintain a list, you can do something like this.
@ideasman42 :
Thanks. I'm afraid that I accidentally mistyped 'import' and wrote 'input' instead, so it was really two questions -- the first of which was intended to be:
Re. import globbing: Are you suggesting that we maintain a list of valid mathematical functions from the math module instead?
Thanks for the namespace example. We'll have a good look.
@ideasman42 We have investigated this now and are testing some new code. We will advise once the testing is complete, but early indications are that we have a solution.
The code you posted earlier caused a syntax error (it didn't like the * for some reason), but I think we have it sorted. This will conclude all the points you raised for inclusion and suggestions. Thanks for all your help.
Example:
This command (mzsin(pi/5)*sqrt(64)) set the Z input to 4.70228.
This command (mxhypot(3,4)) will set the X input to 5.
@ideasman42
We believe that we have fixed all the review nits you have mentioned, including suggestions. We've done our best to reference the relevant review nits in the commit logs.
@clockmender is doing a final testing pass of the functionality, but I thought it prudent to give you a heads up before we run into time constraints re. the 2.82 cut-off date. So if you have any further nits (or if our changes prove to be insufficient) please let us know and we will do our best to address them.
The newest commit lives on the github PDT propertygroup branch at revision 9ebd5d7.
Since we've force pushed to the propertygroup branch on github, you may need to re-clone.
My mistake it should have been two
**
, I see you're using update method which works too.As mentioned in my review some posts back, there are unused imports.
Going over the code with pylint, there are still quite some unused imports & variables being defined.
If you need to define variables that aren't used (
data_to
for example), use_
prefix to quiet the warnings.These were generated from running:
With commit 2b2c1ae the remaining
Unused (import|variable) foo
warnings should be fixed. This was checked withpylint -j0 -d all -e W0611,W0612 *.py
which gave the output:We apologise for you having to cover the same ground twice. We're still trying to get in the habit of using pylint before each commit.
pylint version info on my box:
Changed status from 'Open' to: 'Resolved'
@ermo thanks for resolving these issues, as far as I an see the add-on is ready.
I've emailed @clockmender, adding him as a committer to the add-ons project.
@ideasman42
Thank you very much for your patience and input during the review phase.
We shall endeavour to keep improving the quality of the add-on (re. pep8 compliance and pylint warnings) as we develop it further in the future.
Added subscriber: @PeterMOUEZA