diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-03 20:02:42 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-06 14:03:16 +0300 |
commit | 9ff1e5eca76413b0f178ead688e9cde1c1385e36 (patch) | |
tree | 5cf865f4cee63b16baa25bd70984c04e7dd0b327 /space_view3d_display_tools | |
parent | 11320854664f35f44b30da5453d0d78033d6a3d3 (diff) |
2.8: update for x_ray and draw/display renaming.
Diffstat (limited to 'space_view3d_display_tools')
-rw-r--r-- | space_view3d_display_tools/__init__.py | 8 | ||||
-rw-r--r-- | space_view3d_display_tools/display.py | 12 | ||||
-rw-r--r-- | space_view3d_display_tools/fast_navigate.py | 16 |
3 files changed, 18 insertions, 18 deletions
diff --git a/space_view3d_display_tools/__init__.py b/space_view3d_display_tools/__init__.py index 58699f98..9aa53a31 100644 --- a/space_view3d_display_tools/__init__.py +++ b/space_view3d_display_tools/__init__.py @@ -80,7 +80,7 @@ class DisplayToolsPanel(Panel): bl_category = "Display" bl_options = {'DEFAULT_CLOSED'} - draw_type_icons = { + display_type_icons = { 'BOUNDS': 'BBOX', 'WIRE': 'WIRE', 'SOLID': 'SOLID', @@ -142,7 +142,7 @@ class DisplayToolsPanel(Panel): col.prop(view, "show_all_objects_origin", toggle=True) col.prop(view, "show_backface_culling", toggle=True) if obj: - col.prop(obj, "show_x_ray", text="X-Ray", toggle=True) + col.prop(obj, "show_in_front", text="X-Ray", toggle=True) if obj and obj_type == 'MESH': col.prop(obj, "show_transparent", text="Transparency", toggle=True) @@ -176,8 +176,8 @@ class DisplayToolsPanel(Panel): if obj: col = layout.column(align=True) col.alignment = 'EXPAND' - col.label(text="Maximum:") - col.prop(obj, "draw_type", text="", icon=self.draw_type_icons[obj.draw_type]) + col.label(text="Display As:") + col.prop(obj, "display_type", text="", icon=self.display_type_icons[obj.display_type]) col = layout.column(align=True) col.alignment = 'CENTER' diff --git a/space_view3d_display_tools/display.py b/space_view3d_display_tools/display.py index d0310ee8..6c1c6796 100644 --- a/space_view3d_display_tools/display.py +++ b/space_view3d_display_tools/display.py @@ -82,10 +82,10 @@ class DisplayDrawChange(Operator, BasePollCheck): if not selection: for obj in bpy.data.objects: - obj.draw_type = self.drawing + obj.display_type = self.drawing else: for obj in selection: - obj.draw_type = self.drawing + obj.display_type = self.drawing except: self.report({'ERROR'}, "Setting Draw Type could not be applied") return {'CANCELLED'} @@ -110,12 +110,12 @@ class DisplayBoundsSwitch(Operator, BasePollCheck): for obj in bpy.data.objects: obj.show_bounds = self.bounds if self.bounds: - obj.draw_bounds_type = scene.BoundingMode + obj.display_bounds_type = scene.BoundingMode else: for obj in selection: obj.show_bounds = self.bounds if self.bounds: - obj.draw_bounds_type = scene.BoundingMode + obj.display_bounds_type = scene.BoundingMode except: self.report({'ERROR'}, "Display/Hide Bounding box overlay failed") return {'CANCELLED'} @@ -164,10 +164,10 @@ class DisplayXRayOn(Operator, BasePollCheck): if not selection: for obj in bpy.data.objects: - obj.show_x_ray = self.xrays + obj.show_in_front = self.xrays else: for obj in selection: - obj.show_x_ray = self.xrays + obj.show_in_front = self.xrays except: self.report({'ERROR'}, "Turn on/off X-ray mode failed") return {'CANCELLED'} diff --git a/space_view3d_display_tools/fast_navigate.py b/space_view3d_display_tools/fast_navigate.py index 269aec2c..5d61138a 100644 --- a/space_view3d_display_tools/fast_navigate.py +++ b/space_view3d_display_tools/fast_navigate.py @@ -43,14 +43,14 @@ def display_particles(mode, dis_particles): for particles in bpy.data.particles: if scene.ShowParticles is False: - particles.draw_method = 'NONE' + particles.display_method = 'NONE' else: if particles.type == 'EMITTER': - particles.draw_method = 'DOT' - particles.draw_percentage = 100 + particles.display_method = 'DOT' + particles.display_percentage = 100 else: - particles.draw_method = 'RENDER' - particles.draw_percentage = dis_particles + particles.display_method = 'RENDER' + particles.display_percentage = dis_particles return dis_particles @@ -149,15 +149,15 @@ class FastNavigate(Operator): self.store_viewport_shade = shade for particle in bpy.data.particles: self.store_init_particles[particle.name] = \ - [particle.draw_method, particle.draw_percentage] + [particle.display_method, particle.display_percentage] else: if not shade: self.store_fail = True else: shade = self.store_viewport_shade or 'SOLID' for particle in bpy.data.particles: - particle.draw_method = self.store_init_particles[particle.name][0] - particle.draw_percentage = self.store_init_particles[particle.name][1] + particle.display_method = self.store_init_particles[particle.name][0] + particle.display_percentage = self.store_init_particles[particle.name][1] except: self.store_fail = True |