[Bf-extensions-cvs] [4ec89ee8] master: amaranth: meshlight: part commit D5710

meta-androcto noreply at git.blender.org
Sun Sep 8 09:15:09 CEST 2019


Commit: 4ec89ee84b315cba98aec6a0e07921953f2d29cc
Author: meta-androcto
Date:   Sun Sep 8 17:14:47 2019 +1000
Branches: master
https://developer.blender.org/rBAC4ec89ee84b315cba98aec6a0e07921953f2d29cc

amaranth: meshlight: part commit D5710

===================================================================

M	amaranth/render/meshlight_add.py

===================================================================

diff --git a/amaranth/render/meshlight_add.py b/amaranth/render/meshlight_add.py
index 6e457f5d..a4c4230c 100644
--- a/amaranth/render/meshlight_add.py
+++ b/amaranth/render/meshlight_add.py
@@ -70,7 +70,7 @@ class AMTH_OBJECT_OT_meshlight_add(bpy.types.Operator):
 
         bpy.ops.mesh.primitive_grid_add(
             x_subdivisions=4, y_subdivisions=4,
-            rotation=self.rotation, radius=self.size)
+            rotation=self.rotation, size=self.size)
 
         bpy.context.object.name = meshlight_name
         meshlight = scene.objects[meshlight_name]
@@ -86,7 +86,7 @@ class AMTH_OBJECT_OT_meshlight_add(bpy.types.Operator):
         meshlight.active_material = material
 
         material.use_nodes = True
-        material.diffuse_color = (1, 0.5, 0)
+        material.diffuse_color = (1, 0.5, 0, 1)
         nodes = material.node_tree.nodes
         links = material.node_tree.links
 
@@ -179,16 +179,16 @@ def ui_menu_lamps_add(self, context):
         self.layout.separator()
         self.layout.operator(
             AMTH_OBJECT_OT_meshlight_add.bl_idname,
-            icon="LAMP_AREA", text="Meshlight")
+            icon="LIGHT_AREA", text="Meshlight")
 
 # //FEATURE: Add Meshlight: Single Sided
 
 
 def register():
     bpy.utils.register_class(AMTH_OBJECT_OT_meshlight_add)
-    bpy.types.VIEW3D_MT_mesh_add.append(ui_menu_lamps_add)
+    bpy.types.VIEW3D_MT_light_add.append(ui_menu_lamps_add)
 
 
 def unregister():
     bpy.utils.unregister_class(AMTH_OBJECT_OT_meshlight_add)
-    bpy.types.VIEW3D_MT_mesh_add.remove(ui_menu_lamps_add)
+    bpy.types.VIEW3D_MT_light_add.remove(ui_menu_lamps_add)



More information about the Bf-extensions-cvs mailing list