diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2019-10-05 05:37:58 +0300 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2019-10-05 05:37:58 +0300 |
commit | d7262c9be0bb04b93348e111be53b48b226b72e5 (patch) | |
tree | 2ba7892de82ce15d152075bd21fb3768163c8e08 /render_povray | |
parent | 04bee5da6bde2a745da16efbb1fc96efcaafc43a (diff) |
Fixed perfect POV Sphere (no polygons)
post 2.8 API has broken many primitives
Diffstat (limited to 'render_povray')
-rw-r--r-- | render_povray/primitives.py | 4 | ||||
-rw-r--r-- | render_povray/ui.py | 4 |
2 files changed, 4 insertions, 4 deletions
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') |