Skip to content

Commit

Permalink
Removed Simple updater
Browse files Browse the repository at this point in the history
### Removed
- Simple Updater, think about Blenders Extension Platform, easier method perhaps

### Fixed
- poll issue with nodes light object > use different approach to get active node vs material
  • Loading branch information
schroef committed Nov 12, 2024
1 parent e339a26 commit 34439b6
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 267 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.


## [0.2.9] - 2024-11-08

### Removed

- Simple Updater, think about Blenders Extension Platform, easier method perhaps

### Fixed

- poll issue with nodes light object > use different approach to get active node vs material

## [0.2.8] - 2024-11-05

### Fixed
Expand Down Expand Up @@ -80,6 +90,7 @@ 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).

[0.2.9]:https://github.com/schroef/Extra-Image-List/releases/tag/v0.2.9
[0.2.8]:https://github.com/schroef/Extra-Image-List/releases/tag/v0.2.8
[0.2.3]:https://github.com/schroef/Extra-Image-List/releases/tag/v.0.2.3
[0.2.2_2.80]:https://github.com/schroef/Extra-Image-List/releases/tag/v.0.2.2_2.80
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
I added a cleaner look to the panel and added the panel settings to option bool. I also added source image so users can pick image sequence or sinle image. I Also added is showing the image texture name above its size, this is very convienent because the source path only shows a very small section. This makes it much easier to identify the used texture.

!['Preview extra imge list'](https://raw.githubusercontent.com/wiki/schroef/extra-image-list/images/extra-image-list-v028.jpg?2025-11-06)
!['Preview extra imge list'](https://raw.githubusercontent.com/wiki/schroef/extra-image-list/images/extra-image-list-v029.jpg?2025-11-12)


## Features
Expand Down
66 changes: 42 additions & 24 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@
# Changelog
## v0.2.8 - 2024-11-05
## [0.2.9] - 2024-11-12
### Removed
- Updater, thing about Blenders Extension Platform, easier method perhaps
### Fixed
- poll issue with nodes light object > use different approach to get active node vs material
## [0.2.8] - 2024-11-05
### Fixed
Expand All @@ -28,25 +38,25 @@
-Shortcut double Right Click to preview texture UV Editor > Double Left click
## v0.2.7 - 2022-05-16
## 0.2.7] - 2022-05-16
### Fixed
- Poll isseu texture preview > #295
## v0.2.6 - 2021-11-01
## [0.2.6] - 2021-11-01
### Fixed
- Poll isseu texture preview
## v0.2.5 - 2021-07-29
## [0.2.5] - 2021-07-29
### Fixed
- Panel issue difference 2.83 and 290
## v0.2.4 - 2021-04-06
## [0.2.4] - 2021-04-06
### Added
Expand All @@ -63,7 +73,7 @@
- List view updating with arrow buttons
## v0.2.3 - 2019-11-01
## [0.2.3] - 2019-11-01
### Fixed
Expand All @@ -83,7 +93,7 @@
"category": "UV",
"description": "An alternative image list for UV/Image Editor.",
"location": "UV/Image Editor > Tools > Image List",
"version": (0, 2, 8),
"version": (0, 2, 9),
"blender": (2, 80, 0),
"wiki_url": "https://github.com/schroef/Extra-Image-List",
"tracker_url": "https://github.com/schroef/Extra-Image-List/issues",
Expand All @@ -110,9 +120,6 @@
PointerProperty
)
from bpy.app.handlers import persistent

from . import updater

#-------------------------------------------------------------------------------
# UI PANEL - Extra Image List
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -324,28 +331,43 @@ class EIL_OT_UpdateNode(Operator):

@classmethod
def poll(cls, context):
aNode = None
# print(bpy.context.active_object.active_material)
# print(bpy.context.active_object.active_material.node_tree.nodes.active)
# return context.active_node and context.active_node.type == 'TEX_IMAGE'
# source: https://blender.stackexchange.com/a/68351/7631
# return context.scene.node_tree.nodes.active and context.scene.node_tree.nodes.active.type == 'TEX_IMAGE'
# return context.active_object.active_material.node_tree.nodes.active is not None
# return context.active_node is not None
if bpy.context.active_object.active_material:
actN = bpy.context.active_object.active_material.node_tree.nodes.active
if actN.type=='GROUP':
actN = actN.node_tree.nodes.active
# actN = context.active_node
if bpy.context.active_object.type == 'LIGHT':
ntree = bpy.context.active_object.data.id_data.node_tree
aNode = ntree.nodes.active
else:
if bpy.context.active_object.active_material:
aNode = bpy.context.active_object.active_material.node_tree.nodes.active
if aNode!=None:
if aNode.type=='GROUP':
aNode = aNode.node_tree.nodes.active
else:
return False
# print(actN)
# print(actN.type)
return actN.type == 'TEX_IMAGE' and actN != None and bpy.context.active_object.active_material.node_tree.nodes
return aNode.type == 'TEX_IMAGE' and aNode != None #and bpy.context.active_object.active_material.node_tree.nodes

def execute(self, context):
aNode = None
# Get active node
aNode = context.active_object.active_material.node_tree.nodes.active
if aNode.type=='GROUP':
aNode = aNode.node_tree.nodes.active
if bpy.context.active_object.type == 'LIGHT':
ntree = bpy.context.active_object.data.id_data.node_tree
aNode = ntree.nodes.active
else:
if bpy.context.active_object.active_material:
aNode = bpy.context.active_object.active_material.node_tree.nodes.active

# print(aNode.type)
# aNode = context.active_object.active_material.node_tree.nodes.active
if aNode!=None:
if aNode.type=='GROUP':
aNode = aNode.node_tree.nodes.active

# Get list of all images
img_list = list(bpy.data.images)
Expand Down Expand Up @@ -640,8 +662,6 @@ def register():
bpy.types.Scene.extra_image_list = PointerProperty(type=ExtraImageList_Props)
bpy.app.handlers.depsgraph_update_post.append(update_image_list)

updater.check(bl_info)
updater.register()

# Add custom shortcut (image node double click)
kc = bpy.context.window_manager.keyconfigs.addon
Expand All @@ -651,8 +671,6 @@ def register():
icon_Load()

def unregister():

updater.unregister()
global custom_icons
bpy.utils.previews.remove(custom_icons)

Expand Down
Loading

0 comments on commit 34439b6

Please sign in to comment.