Page MenuHome

Amaranth updated with latest API changes
ClosedPublic

Authored by CansecoGPC (CansecoGPC) on Mar 8 2019, 7:42 PM.

Details

Summary

Hi,

As the title says, i tried to update Amaranth addon to work with latest API changes.

There's a TODO because i'm not sure how to substitute them or if they are even needed anymore.

Diff Detail

Event Timeline

Did more fixes after testing all the options.

Fixed addon error when activating it.
Shift+Z and Shift+Alt+Z shorcuts functions are already integrated in Blender 2.80.
Maybe only_render.py on render folder could be removed?

Fixed addon error when activating it.
Shift+Z and Shift+Alt+Z shorcuts functions are already integrated in Blender 2.80.
Maybe only_render.py on render folder could be removed?

Absolutely, we should just remove:

  • Only Render
  • Unsimplify

Both features are now in one way or another in 2.80. Good to see Amaranth features making it to the mainstream :)

Thanks a lot for your help!

amaranth/animation/jump_frames.py
177

Why commenting this out?

amaranth/render/only_render.py
34

Let's get rid of only_render.py altogether I'd say.

amaranth/render/unsimplify.py
65

Unsimplify is also no needed anymore, now that there are Render specific settings for Simplify.

CansecoGPC (CansecoGPC) marked 3 inline comments as done.Mar 12 2019, 8:10 PM
CansecoGPC (CansecoGPC) added inline comments.
amaranth/animation/jump_frames.py
177

This is what happens if i don't:

Traceback (most recent call last):
Exception in module register(): /usr/share/blender/2.80/scripts/addons_contrib/amaranth/__init__.py
Traceback (most recent call last):

File "/usr/share/blender/2.80/scripts/modules/addon_utils.py", line 393, in enable
  mod.register()
File "/usr/share/blender/2.80/scripts/addons_contrib/amaranth/__init__.py", line 115, in register
  _call_globals("register")
File "/usr/share/blender/2.80/scripts/addons_contrib/amaranth/__init__.py", line 104, in _call_globals
  getattr(m, attr_name)()
File "/usr/share/blender/2.80/scripts/addons_contrib/amaranth/animation/jump_frames.py", line 176, in register
  bpy.types.USERPREF_PT_edit.append(ui_userpreferences_edit)

AttributeError: 'RNA_Types' object has no attribute 'USERPREF_PT_edit'

amaranth/render/only_render.py
34

Sure.

amaranth/render/unsimplify.py
65

Removed the files and the call from root init file.

CansecoGPC (CansecoGPC) marked 3 inline comments as done.Mar 12 2019, 8:12 PM
CansecoGPC (CansecoGPC) updated this revision to Diff 14143.

Fixed requested changes.

The only function that doesn't work now is List Missing Images on Scene Debug:

Traceback (most recent call last):

File "/usr/share/blender/2.80/scripts/addons_contrib/amaranth/scene/debug.py", line 693, in execute
  ar.spaces.active.background_images:

AttributeError: 'SpaceView3D' object has no attribute 'background_images'

Color management presets option wasn't working.

Background-images counting has to be refactored to check on Empty images now. Is that something you can do? I can look into it in a few weeks otherwise.

amaranth/animation/jump_frames.py
177

The panel USERPREF_PT_edit doesn't exist anymore. We could simply use USERPREF_PT_animation_timeline instead

CansecoGPC (CansecoGPC) updated this revision to Diff 14152.EditedMar 13 2019, 12:47 PM

Updated latest requested change.
I would try to make the refactor, but i can't promise anything, still learning, XD

CansecoGPC (CansecoGPC) marked an inline comment as done.Mar 13 2019, 12:48 PM
CansecoGPC (CansecoGPC) added inline comments.
amaranth/animation/jump_frames.py
177

Like this?

CansecoGPC (CansecoGPC) marked an inline comment as done.Mar 18 2019, 4:23 PM

@Pablo Vazquez (pablovazquez) Did you have time to look how to solve the List Missing Images feature?

CansecoGPC (CansecoGPC) updated this revision to Diff 15500.

Updated patch after contrib changes made by @nBurn (nBurn) for this addon.

I will commit this since it fixes the most important part which is registration of the add-on itself. We can work on fixing individual features (like Background Images counting) in different patches.

Thanks @CansecoGPC (CansecoGPC) and @nBurn (nBurn)!

This revision is now accepted and ready to land.Wed, May 22, 4:20 PM
This revision was automatically updated to reflect the committed changes.