blainder-range-scanner icon indicating copy to clipboard operation
blainder-range-scanner copied to clipboard

AttributeError: 'Scene' object has no attribute 'scannerProperties'

Open ozge-albayrak opened this issue 2 years ago • 5 comments

Hi! I am trying to use your toolbox for my application and I would like to utilize your scripts. In order to do that I have tried to run the script_usage.blend file. However, I am getting the following error.

File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons_contrib\range_scanner\ui\user_interface.py", line 1565, in scan_static properties = scene.scannerProperties AttributeError: 'Scene' object has no attribute 'scannerProperties'

Since I am pretty new to Blender scripting I couldn't quite figure out the issue. I would appreciate if someone can guide me in the right direction. Thanks!

ozge-albayrak avatar Aug 02 '22 19:08 ozge-albayrak

Hey @ozge-albayrak, could you please have a look under Edit > Preferences > Add-ons? The checkbox for 3D View: range_scanner needs to be checked, otherwise the add-on is not installed properly.

grafik

ln-12 avatar Aug 03 '22 06:08 ln-12

Hi!

Thanks for the reply! I am trying to use scripting only rather than GUI. Thus, I have followed the steps given for only "Script Usage". Apparently, you don't need to copy paste the range_scanner folder into Blender 2.93/2.93/scripts/addons_contrib folder. Once I removed that folder from addons_contrib and checked the checkbox of 3D View: range_scanner, I think the add on was installed properly.

Now, when I run the script_usage.blend file, the rendering starts, however, the script fails and I get this error.

Scanning scene: [--------------------] 0.0%Traceback (most recent call last):
  File "C:\Users\oezge\PATH\blender\blainder-range-scanner\example_scenes\script_usage.blend\Text", line 61, in <module>
  File "C:\Users\oezge\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\range_scanner\ui\user_interface.py", line 1539, in scan_sonar
    performScan(context, dependencies_installed, properties)
  File "C:\Users\oezge\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\range_scanner\ui\user_interface.py", line 1387, in performScan
    modifyAndScan(context, dependencies_installed, properties, None)
  File "C:\Users\oezge\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\range_scanner\ui\user_interface.py", line 1284, in modifyAndScan
    generic.startScan(context, dependencies_installed, properties, objectName)
  File "C:\Users\oezge\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\range_scanner\scanners\generic.py", line 271, in startScan
    sonar.performScan(context,
  File "C:\Users\oezge\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\range_scanner\scanners\sonar.py", line 336, in performScan
    partIDIndex = closestHit.target.material_slots[materialMappings[closestHit.target][closestHit.faceIndex]].name
TypeError: only integer scalar arrays can be converted to a scalar index
Error: Python script failed, check the message in the system console

Do you have any comments on this? I really appreciate your help in advance!

ozge-albayrak avatar Aug 04 '22 17:08 ozge-albayrak

Could you please upload a minimal example as .blend file?

ln-12 avatar Aug 06 '22 14:08 ln-12

Sorry for extremely late response. I am using the script provided by use called script_usage.blend in the example_scenes folder. And when I run it I get this error.

ozge-albayrak avatar Dec 03 '22 16:12 ozge-albayrak

In case anyone else is confused by this: ticking the checkbox in the GUI is still necessary even if you are using the script-usage instructions.

tomhill206 avatar Jan 03 '24 16:01 tomhill206