[Bf-extensions-cvs] [d7262c9b] master: Fixed perfect POV Sphere (no polygons)
Maurice Raybaud
noreply at git.blender.org
Sat Oct 5 04:38:06 CEST 2019
Commit: d7262c9be0bb04b93348e111be53b48b226b72e5
Author: Maurice Raybaud
Date: Sat Oct 5 04:37:58 2019 +0200
Branches: master
https://developer.blender.org/rBAd7262c9be0bb04b93348e111be53b48b226b72e5
Fixed perfect POV Sphere (no polygons)
post 2.8 API has broken many primitives
===================================================================
M render_povray/primitives.py
M render_povray/ui.py
===================================================================
diff --git a/render_povray/primitives.py b/render_povray/primitives.py
index 547da240..29897fe3 100644
--- a/render_povray/primitives.py
+++ b/render_povray/primitives.py
@@ -750,7 +750,7 @@ def pov_sphere_define(context, op, ob, loc):
bpy.ops.mesh.reveal()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.delete(type='VERT')
- bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, size=ob.pov.sphere_radius, location=loc, rotation=obrot)
+ bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, radius=ob.pov.sphere_radius, location=loc, rotation=obrot)
#bpy.ops.transform.rotate(axis=obrot,orient_type='GLOBAL')
bpy.ops.transform.resize(value=obscale)
#bpy.ops.transform.rotate(axis=obrot, proportional_size=1)
@@ -762,7 +762,7 @@ def pov_sphere_define(context, op, ob, loc):
#bpy.ops.transform.rotate(axis=obrot,orient_type='GLOBAL')
if not ob:
- bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, size=R, location=loc)
+ bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, radius=R, location=loc)
ob = context.object
ob.name = ob.data.name = "PovSphere"
ob.pov.object_as = "SPHERE"
diff --git a/render_povray/ui.py b/render_povray/ui.py
index 2a31fd36..5f415727 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -2574,7 +2574,7 @@ class OBJECT_PT_povray_obj_sphere(PovDataButtonsPanel, Panel):
col.active = obj.pov.unlock_parameters
- layout.operator("pov.sphere_update", text="Update",icon="SOLID")
+ layout.operator("pov.sphere_update", text="Update",icon="SHADING_RENDERED")
#col.label(text="Parameters:")
col.prop(obj.pov, "sphere_radius", text="Radius of Sphere")
@@ -2868,7 +2868,7 @@ class BasicShapesMenu(bpy.types.Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("pov.addplane", text="Infinite Plane",icon = 'MESH_PLANE')
layout.operator("pov.addbox", text="Box",icon = 'MESH_CUBE')
- layout.operator("pov.addsphere", text="Sphere",icon = 'SOLID')
+ layout.operator("pov.addsphere", text="Sphere",icon = 'SHADING_RENDERED')
layout.operator("pov.addcylinder", text="Cylinder",icon="MESH_CYLINDER")
layout.operator("pov.cone_add", text="Cone",icon="MESH_CONE")
layout.operator("pov.addtorus", text="Torus",icon = 'MESH_TORUS')
More information about the Bf-extensions-cvs
mailing list