Skip to content

Commit

Permalink
v1.0.12 - UI & Keymap Improvements
Browse files Browse the repository at this point in the history
- Shortened add-on name from "Smart Frame Selection" to "Smart Frame"

- Set default sidebar tab name to "Neltulz" so that all Neltulz related sidebars from various Neltulz add-ons will be organized here.

- Changed operator bl_idnames to improve organization. This may break things if you've added operators to any custom pie menus. Sorry for the inconvenience.

- Improved sidebar panel significantly. Better use of space.

- Reduced the number of keymaps by switching over to "3D View Generic. This should make it easier for users to customize keymaps

- Ability to isolate even when all objects in the scene are selected
  • Loading branch information
Neltulz committed Dec 22, 2019
1 parent c4dac1a commit b13bbd4
Show file tree
Hide file tree
Showing 10 changed files with 282 additions and 435 deletions.
31 changes: 21 additions & 10 deletions README_Neltulz_Smart_Frame_Selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Neltulz - Smart Frame Selection - ReadMe</title>
<title>Neltulz - Smart Frame - ReadMe</title>

<!-- Twitter Card data -->
<meta name="twitter:card" value="summary">

<!-- Open Graph data -->
<meta property="og:title" content="Neltulz - Smart Frame Selection v1.0.11" />
<meta property="og:title" content="Neltulz - Smart Frame v1.0.12" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.logichaos.com/neltulz_blender_addons/neltulz_smart_frame_selection/README_Neltulz_Smart_Frame_Selection"/>
<meta property="og:image" content="https://www.logichaos.com/neltulz_blender_addons/neltulz_smart_frame_selection/readme_html_files/img/logo.png" />
<meta property="og:description" content="Updated: 12/21/2019 - A blender addon that provides a quick way to frame selected objects, or frame all objects if nothing is selected." />
<meta property="og:description" content="Updated: 12/22/2019 - A blender addon that provides a quick way to frame selected objects, or frame all objects if nothing is selected." />

<link href="readme_html_files/fontawesome-free-5.10.1-web/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="readme_html_files/css/bootstrap-reboot.min.css">
Expand Down Expand Up @@ -83,7 +83,7 @@
</picture>

<h1 class="pageTitle">
Neltulz - Smart Frame Selection<br><span class="versionNum">Version: 1.0.11<br>Updated: 12/21/2019</span>
Neltulz - Smart Frame<br><span class="versionNum">Version: 1.0.12<br>Updated: 12/22/2019</span>
</h1>

<div class="versionAndDownloadBar">
Expand Down Expand Up @@ -171,7 +171,7 @@ <h3 id="keyFeatures">Key Features</h3>
<h3 id="installation">Installation</h3>

<ol>
<li>Download the <span class="focusText">Neltulz - Smart Frame Selection</span> zip file anywhere on your
<li>Download the <span class="focusText">Neltulz - Smart Frame</span> zip file anywhere on your
computer.</li>

<li>Run Blender.</li>
Expand All @@ -182,10 +182,10 @@ <h3 id="installation">Installation</h3>

<li>At the top right, click <span class="focusText">Install</span>.</li>

<li>Browse for the <span class="focusText">Neltulz - Smart Frame Selection</span> zip file and click Install Add-on
<li>Browse for the <span class="focusText">Neltulz - Smart Frame</span> zip file and click Install Add-on
from File <br>Alternatively, you may double click the zip file to install it.</li>

<li>Next to Generic: <span class="focusText">Neltulz - Smart Frame Selection</span>, enable the checkbox.</li>
<li>Next to Generic: <span class="focusText">Neltulz - Smart Frame</span>, enable the checkbox.</li>

<li>At the lower left of the preferences window, click <span class="focusText">Save Preferences</span> and
close the preferences window.</li>
Expand Down Expand Up @@ -215,21 +215,21 @@ <h5>Hotkeys</h5>
<tr>
<td class="hotkey primary">F</td>
<td class="result success">Frame</td>
<td class="command">object.neltulz_smart_frame_sel</td>
<td class="command">ntz_smrt_frm.select</td>
<td class="properties">frameSelection = True<br>isolateSelection = False</td>
</tr>

<tr>
<td class="hotkey primary">SHIFT+F</td>
<td class="result success">Isolate</td>
<td class="command">object.neltulz_smart_frame_sel</td>
<td class="command">ntz_smrt_frm.select</td>
<td class="properties">frameSelection = False<br>isolateSelection = True</td>
</tr>

<tr>
<td class="hotkey primary">CTRL+SHIFT+F</td>
<td class="result success">Frame & Isolate</td>
<td class="command">object.neltulz_smart_frame_sel</td>
<td class="command">ntz_smrt_frm.select</td>
<td class="properties">frameSelection = True<br>isolateSelection = True</td>
</tr>

Expand Down Expand Up @@ -295,6 +295,17 @@ <h1>From the GNU GPL v3.0:</h1>
<h3 id="changelog">Changelog</h3>

<ul>
<li>
2019-12-22
<ul>
<li>Shortened add-on name from "Smart Frame Selection" to "Smart Frame"</li>
<li>Set default sidebar tab name to "Neltulz" so that all Neltulz related sidebars from various Neltulz add-ons will be organized here.</li>
<li>Changed operator bl_idnames to improve organization. This may break things if you've added operators to any custom pie menus. Sorry for the inconvenience.</li>
<li>Improved sidebar panel significantly. Better use of space.</li>
<li>Reduced the number of keymaps by switching over to "3D View Generic. This should make it easier for users to customize keymaps</li>
<li>Ability to isolate even when all objects in the scene are selected</li>
</ul>
</li>
<li>
2019-12-21
<ul>
Expand Down
12 changes: 3 additions & 9 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bl_info = {
"name" : "Neltulz - Smart Frame Selection",
"name" : "Neltulz - Smart Frame",
"author" : "Neil V. Moore",
"description" : 'More ways to "Frame Selection" when pressing the keyboard shortcut',
"blender" : (2, 80, 0),
"version" : (1, 0, 11),
"version" : (1, 0, 12),
"location" : "View3D",
"warning" : "",
"category" : "Generic",
Expand Down Expand Up @@ -35,7 +35,6 @@

PendingDeprecationWarning


# -----------------------------------------------------------------------------
# Store classes in List so that they can be easily registered/unregistered
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -76,9 +75,6 @@ def register():
#add property group to the scene
bpy.types.Scene.neltulzSmartFrameSel = bpy.props.PointerProperty(type=NeltulzSmartFrameSel_IgnitProperties)




def unregister():
from bpy.utils import unregister_class
for cls in reversed(classes):
Expand All @@ -87,10 +83,8 @@ def unregister():
#remove keymaps
keymaps.neltulz_smart_frame_sel_unregister_keymaps(addon_keymaps)



if __name__ == "__main__":
register()

# test call
bpy.ops.object.neltulz_smart_frame_sel()
bpy.ops.ntz_smrt_frm.select()
17 changes: 3 additions & 14 deletions addon_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,8 @@
import bpy
from . panels import OBJECT_PT_NeltulzSmartFrameSel

from bpy.props import (StringProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
EnumProperty,
PointerProperty,
)
from bpy.types import (Panel,
Operator,
AddonPreferences,
PropertyGroup,
)
from bpy.props import (StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty, PointerProperty)
from bpy.types import (Panel, Operator, AddonPreferences, PropertyGroup)

# Define Panel classes for updating
panels = (
Expand Down Expand Up @@ -50,7 +39,7 @@ class OBJECT_OT_NeltulzSmartFrameSel_Preferences(AddonPreferences):
category: StringProperty(
name="Tab Category",
description="Choose a name for the category of the panel",
default="Smart Frame Sel",
default="Neltulz",
update=update_panel
)

Expand Down
117 changes: 5 additions & 112 deletions keymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,139 +12,32 @@ def neltulz_smart_frame_sel_register_keymaps(addon_keymaps):
def createSmartFrameSelKeymap(bCreateFrameKeymap, bCreateIsolateKeymap, bCreateFrameAndIsolateKeymap):
#Frame
if bCreateFrameKeymap:
kmi = km.keymap_items.new("object.neltulz_smart_frame_sel", type = "F", ctrl=False, shift=False, alt=False, value = "PRESS")
kmi = km.keymap_items.new("ntz_smrt_frm.select", type = "F", ctrl=False, shift=False, alt=False, value = "PRESS")
kmi.properties.frameSelection = True
kmi.properties.isolateSelection = False

#Isolate / Unhide Selection
if bCreateIsolateKeymap:
kmi = km.keymap_items.new("object.neltulz_smart_frame_sel", type = "F", ctrl=False, shift=True, alt=False, value = "PRESS")
kmi = km.keymap_items.new("ntz_smrt_frm.select", type = "F", ctrl=False, shift=True, alt=False, value = "PRESS")
kmi.properties.frameSelection = False
kmi.properties.isolateSelection = True

#Frame & Isolate
if bCreateFrameAndIsolateKeymap:
kmi = km.keymap_items.new("object.neltulz_smart_frame_sel", type = "F", ctrl=True, shift=True, alt=False, value = "PRESS")
kmi = km.keymap_items.new("ntz_smrt_frm.select", type = "F", ctrl=True, shift=True, alt=False, value = "PRESS")
kmi.properties.frameSelection = True
kmi.properties.isolateSelection = True



#------------------------------ Object Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Object Mode", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Mesh Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Mesh", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Curve Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Curve", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Surface Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Surface", space_type="EMPTY")

createSmartFrameSelKeymap(True, False, False)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Meta Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Metaball", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)


#------------------------------ Grease Pencil Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Grease Pencil Stroke Edit Mode", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Grease Pencil Stroke Paint Mode", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Grease Pencil Stroke Sculpt Mode", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Grease Pencil Stroke Weight Mode", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Armature Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Armature", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)
#------------------------------ 3D View Generic ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Pose", space_type="EMPTY")
km = wm.keyconfigs.addon.keymaps.new(name="3D View Generic", space_type="VIEW_3D")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)

#------------------------------ Lattice Mode ----------------------------------------------------------------------------

#create new keymap
km = wm.keyconfigs.addon.keymaps.new(name="Lattice", space_type="EMPTY")

createSmartFrameSelKeymap(True, True, True)

#add list of keymaps
addon_keymaps.append(km)



def neltulz_smart_frame_sel_unregister_keymaps(addon_keymaps):
# handle the keymap
wm = bpy.context.window_manager
Expand Down
Loading

0 comments on commit b13bbd4

Please sign in to comment.