visibility fix
authorhgn <hgodden00@gmail.com>
Wed, 3 Aug 2022 13:00:20 +0000 (14:00 +0100)
committerhgn <hgodden00@gmail.com>
Wed, 3 Aug 2022 13:00:20 +0000 (14:00 +0100)
blender_graphics_cropper.py

index ad12dfcdaa4230f4bd1993ae5c207688c150c30e..10c6ec91d8e79d5e141135bac0b56d57a2280723 100644 (file)
@@ -27,7 +27,7 @@ def cropper_draw_ui():
    h = bpy.context.region.height
 
    for obj in bpy.context.scene.objects:
    h = bpy.context.region.height
 
    for obj in bpy.context.scene.objects:
-      if obj.cropper_data.enabled:
+      if obj.cropper_data.enabled and obj.visible_get():
          x = obj.cropper_data.resolution[0]
          y = obj.cropper_data.resolution[1]
          c = Vector((1,1,0,1)) if obj.select_get() else Vector((0.6,0.4,0,1))
          x = obj.cropper_data.resolution[0]
          y = obj.cropper_data.resolution[1]
          c = Vector((1,1,0,1)) if obj.select_get() else Vector((0.6,0.4,0,1))
@@ -59,7 +59,7 @@ def cropper_draw():
    colours = []
 
    for obj in bpy.context.scene.objects:
    colours = []
 
    for obj in bpy.context.scene.objects:
-      if obj.cropper_data.enabled:
+      if obj.cropper_data.enabled and obj.visible_get():
          x = obj.cropper_data.resolution[0]
          y = obj.cropper_data.resolution[1]
          c = Vector((1,1,0,1)) if obj.select_get() else Vector((0.6,0.4,0,1))
          x = obj.cropper_data.resolution[0]
          y = obj.cropper_data.resolution[1]
          c = Vector((1,1,0,1)) if obj.select_get() else Vector((0.6,0.4,0,1))