Newer
Older
Maurice Raybaud
committed
# except UnboundLocalError:
# # In case no transmit is specified ? put it to 0
# r,g,b,t = float(S[2]),float(S[3]),float(S[4],0)
# color = (r,g,b,t)
Maurice Raybaud
committed
# except (ValueError):
# color = (0.8,0.8,0.8,0)
# pass
Maurice Raybaud
committed
# if colors == [] or (colors != [] and color not in colors):
# colors.append(color)
# name = ob.name+"_mat"
# matNames.append(name)
# mat = bpy.data.materials.new(name)
# mat.diffuse_color = (r,g,b)
# mat.alpha = 1-t
# if mat.alpha != 1:
# mat.use_transparency=True
# ob.data.materials.append(mat)
# print (colors)
# else:
# for i in range(len(colors)):
# if color == colors[i]:
# ob.data.materials.append(bpy.data.materials[matNames[i]])
##To keep Avogadro Camera angle:
# for obj in bpy.context.view_layer.objects:
Maurice Raybaud
committed
# if obj.type == "CAMERA":
# track = obj.constraints.new(type = "TRACK_TO")
# track.target = ob
# track.track_axis ="TRACK_NEGATIVE_Z"
# track.up_axis = "UP_Y"
# obj.location = (0,0,0)
return {'FINISHED'}
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
classes = (
POVRAY_OT_lathe_add,
POVRAY_OT_superellipsoid_add,
POVRAY_OT_superellipsoid_update,
POVRAY_OT_supertorus_add,
POVRAY_OT_supertorus_update,
POVRAY_OT_loft_add,
POVRAY_OT_plane_add,
POVRAY_OT_box_add,
POVRAY_OT_cylinder_add,
POVRAY_OT_cylinder_update,
POVRAY_OT_sphere_add,
POVRAY_OT_sphere_update,
POVRAY_OT_cone_add,
POVRAY_OT_cone_update,
POVRAY_OT_isosurface_box_add,
POVRAY_OT_isosurface_sphere_add,
POVRAY_OT_sphere_sweep_add,
POVRAY_OT_blob_add,
POVRAY_OT_rainbow_add,
POVRAY_OT_height_field_add,
POVRAY_OT_torus_add,
POVRAY_OT_torus_update,
POVRAY_OT_prism_add,
POVRAY_OT_parametric_add,
POVRAY_OT_parametric_update,
POVRAY_OT_shape_polygon_to_circle_add,
ImportPOV,
)
def register():
#from bpy.utils import register_class
for cls in classes:
register_class(cls)
def unregister():
from bpy.utils import unregister_class
for cls in classes:
unregister_class(cls)