Skip to content

Commit

Permalink
Improve UX, fix distribute function overriding Y & Z coords
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvinas01 committed Dec 3, 2024
1 parent bd37e61 commit 39941b2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.0.12](https://github.com/chark/blender-skunk/compare/v0.0.11...v0.0.12) - 2024-12-03

### Added

- Labels to operations for easier reading.

### Changed

- Distribute objects operation will maintain Y and Z axis of selected objects.

### Fixed

- Some typos in tooltips.

## [v0.0.11](https://github.com/chark/blender-skunk/compare/v0.0.10...v0.0.11) - 2024-09-28

### Changed
Expand Down
20 changes: 14 additions & 6 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
'tracker_url': 'https://github.com/chark/blender-skunk',
'doc_url': 'https://github.com/chark/blender-skunk',
'support': 'COMMUNITY',
'version': (0, 0, 11),
'blender': (4, 1, 0),
'version': (0, 0, 12),
'blender': (4, 3, 0),
'category': 'Object',
}

Expand Down Expand Up @@ -58,14 +58,15 @@ def distribute_objects(objects, distance=10):
if object.parent:
continue

object.location = (offset_x, 0, 0)
(object_x, object_y, object_z) = object.location.copy()
object.location = (offset_x, object_y, object_z)
offset_x = offset_x + distance


class OpCreateEmptyParents(bpy.types.Operator):
bl_idname = 'object.skunk_create_empty_parents'
bl_label = 'Create Empty Parents'
bl_description = 'Creates empty parent for selected objects'
bl_description = 'Creates empty parent for each selected object'
bl_options = {'REGISTER', 'UNDO'}

child_name_suffix: bpy.props.StringProperty(
Expand Down Expand Up @@ -121,7 +122,7 @@ def create_empty_parent(object):
class OpMatchMeshNames(bpy.types.Operator):
bl_idname = 'object.skunk_match_mesh_names'
bl_label = 'Match Mesh Names'
bl_description = 'Matches names of selected object meshes to the object names'
bl_description = 'Matches names of selected object mesh data to object names'
bl_options = {'REGISTER', 'UNDO'}

def invoke(self, context, event):
Expand Down Expand Up @@ -160,7 +161,7 @@ class OpSortMeshByMaterial(bpy.types.Operator):
bl_idname = 'object.skunk_sort_mesh_by_material'
bl_label = 'Sort Mesh By Material'
bl_description = (
'Sorts mesh data by material information, this ensures same the material '
'Sorts mesh data by material information, this ensures same material '
'order on each selected object'
)

Expand Down Expand Up @@ -617,13 +618,20 @@ class SkunkPanel(bpy.types.Panel):
def draw(self, context):
layout = self.layout

layout.label(text='Structure')
layout.operator(OpDistributeObjects.bl_idname)
layout.operator(OpCreateEmptyParents.bl_idname)

layout.label(text='Mesh Data')
layout.operator(OpMatchMeshNames.bl_idname)
layout.operator(OpSortMeshByMaterial.bl_idname)
layout.operator(OpCreateUVs.bl_idname)

layout.label(text='LODs')
layout.operator(OpDeleteLODs.bl_idname)
layout.operator(OpCreateLODs.bl_idname)

layout.label(text='Exporting')
layout.operator(OpBulkExport.bl_idname)


Expand Down

0 comments on commit 39941b2

Please sign in to comment.