JacquesLucke / Blender-Camera-Addon

Professional camera animations for motion graphics.
86 stars 19 forks source link

Upgrading to Blender 2.9x? #12

Closed 3dcinetv closed 3 years ago

3dcinetv commented 3 years ago

Hi. I found the Sniper addon, really useful to do motion graphics. Is there a 2.9x update planned? Thanks!

MarioCMFlys commented 3 years ago

I have tested the latest version of Sniper in this Github repository in 2.90 and it appears to work the same as it does in 2.8x, so it should work correctly for your use. If you find any problems using it, please create an issue for them here!

3dcinetv commented 3 years ago

Immediately after pressing "add camera" from the N panel I get: (yes, a text was selected when I pressed this).

Python: Traceback (most recent call last): File "C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Blender-Camera-Addon-master\target_camera.py", line 788, in execute insertTargetCamera() File "C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Blender-Camera-Addon-master\target_camera.py", line 93, in insertTargetCamera newTargetsFromSelection() File "C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Blender-Camera-Addon-master\target_camera.py", line 455, in newTargetsFromSelection targets.append(newRealTarget(object)) File "C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Blender-Camera-Addon-master\target_camera.py", line 470, in newRealTarget setCustomProperty(empty, stayTimePropertyName, 20, min = 0, description = "How many frames will the camera hold on this target.") File "C:\Users\3DCompositor\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Blender-Camera-Addon-master\sniper_utils.py", line 57, in setCustomProperty object[propertyName] = value KeyError: 'IDProperty names cannot include ", \, or \''

location: :-1

bug

MarioCMFlys commented 3 years ago

I can't seem to reproduce this error, are you using the version stored in the Git repository? If not, go to the homepage of this Git repo and click "Download Code" and then click "Download ZIP" and then use the contents of this ZIP file as the Blender addon instead of downloading it from somewhere else.

3dcinetv commented 3 years ago

Thanks! I will check it out.

Drazcmd commented 3 years ago

I also encountered this error - was using a brand new install of the latest blender version (on macOS Catalina) + brand new Download ZIP from the repo.

I spent a couple minutes looking at the code, seems to likely be result of a typo in the 'property data paths' section of target_camera.py. Take a look at line 54 vs the preceding ones:

travelDataPath = getDataPathFromPropertyName(travelPropertyName)
...
loadingTimeDataPath = getDataPathFromPropertyName(loadingTimePropertyName)
# Line 54: note how the lhs ends in 'PropertyName' and not 'DataPath'!
stayTimePropertyName = getDataPathFromPropertyName(stayTimePropertyName)

The fix is likely to replace the leftside stayTimePropertyName with something like stayTimeDataPath. Since right now it fails to create a dataPath for stayTime, and reassigns stayTimePropertyName to the datapath (which explains the keyError). Have NOT tested it yet though (about to go do so though).

MarioCMFlys commented 3 years ago

I have reproduced this error in 2.91, I am going to try and fix it now. @Drazcmd If your solution works after testing, feel free to submit a pull request.

MarioCMFlys commented 3 years ago

I have tested for myself and it appears that the problem was the stayTimePropertyName typo. I am going to push a commit to fix this shortly.

Spikerama commented 1 year ago

Hi guys, I'm wondering if you can help me.

How are you installing Sniper into newer versions of Blender? I've tried it on every version from 2.79 to 3.3. I can only get it to work on 2,79. I think mainly because on 2.79 the option to chose File tab on the addons preferences is there. That way I can allow "Auto Run of Pi Scripts."

This tab isn't in the future versions of Blender so maybe that's the issue because Sniper doesn't appear in the Tools Shelf on the later installs I do.

Anyway I'd love to get to the bottom of it, so any advice would be very much appreciated.

I used the Sniper 1.3.2 version.