natecraddock / projectile

An artist-friendly tool for throwing stuff around inside Blender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error adding emitter: AttributeError: 'RigidBodyWorld' object has no attribute 'steps_per_second'

Domoninic opened this issue · comments

Using Blender 2.91.0 I have installed the addon but every time I create a new emitter I get this error.
The addon seems to work except that the path is not projected.

OS details:
Edition Windows 10 Pro
Version 20H2
OS build 19042.685
Experience Windows Feature Experience Pack 120.2212.551.0

This is the console log from starting Blender and, with the default cube selected, creating a new emitter:

Read prefs: C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender 2.91\2.91\python
Python: Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\ops.py", line 84, in execute
utils.set_quality(context)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 291, in set_quality
context.scene.rigidbody_world.steps_per_second = frame_rate * 1
AttributeError: 'RigidBodyWorld' object has no attribute 'steps_per_second'

location: :-1
Error: Python: Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\ops.py", line 84, in execute
utils.set_quality(context)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 291, in set_quality
context.scene.rigidbody_world.steps_per_second = frame_rate * 1
AttributeError: 'RigidBodyWorld' object has no attribute 'steps_per_second'

location: :-1

Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer
Traceback (most recent call last):
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 234, in draw_trajectory
coordinates += calculate_trajectory(context, emitter)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 202, in calculate_trajectory
cast = raycast(context, coordinates[-1], coord, distance)
File "C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\projectile\utils.py", line 92, in raycast
cast = context.scene.ray_cast(view_layer, origin, direction, distance=distance)
TypeError: Scene.ray_cast(): error with argument 1, "depsgraph" - Function.depsgraph expected a Depsgraph type, not ViewLayer

Hi @fatoms, I have a fix for this and should have a new version released in the next couple of days. Thanks for the reminder!

Hi @natecraddock, I just tried the updated master branch, the error is gone and Trajectory projection is working expected. Thanks.

You're welcome! Closing now that I have updated to the 2.91 API changes

Hey same error still occur on blender version 2.93.1

@MohitDevli I just downloaded the most recent version of Projectile and installed it fresh in Blender 2.93.1. I do not see any issues. Do you have the most recent version of Projectile?