Skip to content

Commit

Permalink
Title Case, Mesh Bridges Fix, README Update
Browse files Browse the repository at this point in the history
Enforced title case and naming consistency across names, labels, print and progress strings.

Fixed Bridge Generation for Mesh-based objects, though path generation does not account for bridges unless they are made into meshes and joined with the main object - will need to be patched separately.

Updated the README to fix an inconsistency with the pipes in the Files Organization diagram, and to change the comment in 'documentation' to reflect the naming used elsewhere - 'How to Use (Wiki)'
  • Loading branch information
SpectralVectors authored Apr 11, 2024
1 parent 4e87fb3 commit a56bd33
Show file tree
Hide file tree
Showing 46 changed files with 806 additions and 804 deletions.
10 changes: 5 additions & 5 deletions scripts/addons/cam/async_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@types.coroutine
def progress_async(text, n=None, value_type='%'):
"""function for reporting during the script, works for background operations in the header."""
"""Function for Reporting During the Script, Works for Background Operations in the Header."""
throw_exception = yield ('progress', {'text': text, 'n': n, "value_type": value_type})
if throw_exception is not None:
raise throw_exception
Expand Down Expand Up @@ -65,7 +65,7 @@ def tick(self, context):
self.coroutine = self.execute_async(context)
try:
if self._is_cancelled:
(msg, args) = self.coroutine.send(AsyncCancelledException("Cancelled with ESC key"))
(msg, args) = self.coroutine.send(AsyncCancelledException("Cancelled with ESC Key"))
raise StopIteration
else:
(msg, args) = self.coroutine.send(None)
Expand All @@ -77,7 +77,7 @@ def tick(self, context):
except StopIteration:
return False
except Exception as e:
print("Exception thrown in tick:", e)
print("Exception Thrown in Tick:", e)

def execute(self, context):
if bpy.app.background:
Expand All @@ -93,9 +93,9 @@ def execute(self, context):


class AsyncTestOperator(bpy.types.Operator, AsyncOperatorMixin):
"""test async operator"""
"""Test Async Operator"""
bl_idname = "object.cam_async_test_operator"
bl_label = "Test operator for async stuff"
bl_label = "Test Operator for Async Stuff"
bl_options = {'REGISTER', 'UNDO', 'BLOCKING'}

async def execute_async(self, context):
Expand Down
18 changes: 9 additions & 9 deletions scripts/addons/cam/autoupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@


class UpdateChecker(bpy.types.Operator):
"""check for updates"""
"""Check for Updates"""
bl_idname = "render.cam_check_updates"
bl_label = "Check for updates in blendercam plugin"
bl_label = "Check for Updates in BlenderCAM Plugin"
bl_options = {'REGISTER', 'UNDO'}

def execute(self, context):
Expand All @@ -31,7 +31,7 @@ def execute(self, context):
if match:
update_source = f"https://api.github.com/repos/{match.group(1)}/releases"

print(f"update check: {update_source}")
print(f"Update Check: {update_source}")
if update_source == "None" or len(update_source) == 0:
return {'FINISHED'}

Expand All @@ -46,7 +46,7 @@ def execute(self, context):
if len(release_list) > 0:
release = release_list[0]
tag = release["tag_name"]
print(f"Found release: {tag}")
print(f"Found Release: {tag}")
match = re.match(r".*(\d+)\.(\s*\d+)\.(\s*\d+)", tag)
if match:
version_num = tuple(map(int, match.groups()))
Expand All @@ -71,13 +71,13 @@ def execute(self, context):


class Updater(bpy.types.Operator):
"""update to newer version if possible """
"""Update to Newer Version if Possible"""
bl_idname = "render.cam_update_now"
bl_label = "Update"
bl_options = {'REGISTER', 'UNDO'}

def execute(self, context):
print("update check")
print("Update Check")
last_update_check = bpy.context.preferences.addons['cam'].preferences.last_update_check
today = date.today().toordinal()
update_source = bpy.context.preferences.addons['cam'].preferences.update_source
Expand All @@ -96,7 +96,7 @@ def execute(self, context):
if len(release_list) > 0:
release = release_list[0]
tag = release["tag_name"]
print(f"Found release: {tag}")
print(f"Found Release: {tag}")
match = re.match(r".*(\d+)\.(\s*\d+)\.(\s*\d+)", tag)
if match:
version_num = tuple(map(int, match.groups()))
Expand All @@ -105,7 +105,7 @@ def execute(self, context):
bpy.ops.wm.save_userpref()

if version_num > current_version:
print("Version is newer, downloading source")
print("Version Is Newer, Downloading Source")
zip_url = release["zipball_url"]
self.install_zip_from_url(zip_url)
return {'FINISHED'}
Expand Down Expand Up @@ -166,7 +166,7 @@ def install_zip_from_url(self, zip_url):

class UpdateSourceOperator(bpy.types.Operator):
bl_idname = "render.cam_set_update_source"
bl_label = "Set blendercam update source"
bl_label = "Set BlenderCAM Update Source"

new_source: StringProperty(
default='',
Expand Down
Loading

0 comments on commit a56bd33

Please sign in to comment.