Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/btrace
diff options
context:
space:
mode:
authorNBurn <7nburn@gmail.com>2019-01-29 18:54:49 +0300
committerNBurn <7nburn@gmail.com>2019-01-29 18:54:49 +0300
commitd609009748a604c1df2d8babfa4098260666d01a (patch)
tree98150e04df48252889e2fc8e049c13115e0afe72 /btrace
parent5c994fde52196dfe8a7e0db03b6935bac001d353 (diff)
addons: objects.link/unlink syntax update
Changed objects.link and objects.unlink from scene to collection
Diffstat (limited to 'btrace')
-rw-r--r--btrace/bTrace.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/btrace/bTrace.py b/btrace/bTrace.py
index 2fdb1b94..9897afcc 100644
--- a/btrace/bTrace.py
+++ b/btrace/bTrace.py
@@ -140,7 +140,7 @@ class OBJECT_OT_objectconnect(Operator):
spline = tracer.splines.new('BEZIER')
spline.bezier_points.add(len(lists) - 1)
curve = bpy.data.objects.new('curve', tracer)
- bpy.context.scene.objects.link(curve)
+ bpy.context.collection.objects.link(curve)
# render ready curve
tracer.resolution_u = Btrace.curve_u
@@ -205,7 +205,7 @@ def curvetracer(curvename, splinename):
tracer = bpy.data.curves.new(splinename, 'CURVE')
tracer.dimensions = '3D'
curve = bpy.data.objects.new(curvename, tracer)
- bpy.context.scene.objects.link(curve)
+ bpy.context.collection.objects.link(curve)
try:
tracer.fill_mode = 'FULL'
except:
@@ -336,7 +336,7 @@ class OBJECT_OT_traceallparticles(Operator):
# Create new object with settings listed above
curve = bpy.data.objects.new('Tracer', tracer)
# Link newly created object to the scene
- bpy.context.scene.objects.link(curve)
+ bpy.context.collection.objects.link(curve)
# add a new Bezier point in the new curve
spline = tracer.splines.new('BEZIER')
spline.bezier_points.add(setting.count - 1)