Skip to content

Commit

Permalink
Upgrading to 2.92 (#10)
Browse files Browse the repository at this point in the history
* Fixing breaking changes for Blender 2.92

* Changing Plugin version descriptions

* Adding bpy autocomplete to latest 2.92 version
  • Loading branch information
UncleFirefox authored Mar 16, 2021
1 parent a04e909 commit 153f8c1
Show file tree
Hide file tree
Showing 116 changed files with 17,510 additions and 6,861 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This Blender addon is intended to accelerate the creation of measures for an Ava
## Developing the plugin
Install the following tools:

- [Blender 2.90](https://download.blender.org/release/Blender2.90/) **Other versions won't work**
- [Blender 2.92](https://download.blender.org/release/Blender2.92/) **Other versions won't work**
- [Visual Studio Code](https://code.visualstudio.com/)
- [Python for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- [Blender Development](https://marketplace.visualstudio.com/items?itemName=JacquesLucke.blender-development)
Expand All @@ -23,7 +23,7 @@ Follow the instructions of the Blender Development plugin setup to connect to yo
## Installing in Blender
If you simply want to test how the addon works, get the latest version of the addon from the [releases page](https://github.com/UncleFirefox/Measures-Addon-For-Blender/releases).

**Remember, only Blender 2.90 works with this plugin**
**Remember, only Blender 2.92 works with this plugin**

Inside Blender go to: `Edit > Preferences`, go the the `Add-ons` section in the left menu, hit the `Install...` button and select the file you donwloaded.

Expand Down
6 changes: 3 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "Measures Library",
"author": "Albert Rodriguez",
"description": "Tools to take measures for Avatar",
"blender": (2, 90, 0),
"version": (0, 4, 0),
"blender": (2, 92, 0),
"version": (0, 4, 1),
"location": "View3D > Toolshelf",
"warning": "This plugin is only compatible with Blender 2.90",
"warning": "This plugin is only compatible with Blender 2.92",
"category": "Add measures",
"wiki_url": "https://github.com/UncleFirefox/Measures-Addon-For-Blender/wiki",
"support": "COMMUNITY",
Expand Down
2 changes: 1 addition & 1 deletion addon/utility/ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ def mouse_raycast_to_scene(context, event):
bpy.context.region, bpy.context.region_data, mouse_pos)

hit, location, normal, index, object, matrix = context.scene.ray_cast(
context.view_layer, origin, direction)
context.view_layer.depsgraph, origin, direction)

return hit, location, normal, index, object, matrix
2 changes: 1 addition & 1 deletion blender_autocomplete/aud.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def pause(cls, catKey: int) -> bool:
pass

@classmethod
def setVolume(cls, sound: 'bpy.types.Sound', catKey: int) -> 'Handle':
def play(cls, sound: 'bpy.types.Sound', catKey: int) -> 'Handle':
''' Plays a sound through the playback manager and assigns it to a category.
:param sound: The sound to play.
Expand Down
36 changes: 18 additions & 18 deletions blender_autocomplete/bgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(
type: int,
dimensions: typing.Union[typing.List[int], typing.
List['bpy.context.object']],
template=' None') -> typing.Union['Buffer', 'bpy.context.object']:
template=' None') -> typing.Union['bpy.context.object', 'Buffer']:
''' This will create a new Buffer object for use with other bgl OpenGL commands. Only the type of argument to store in the buffer and the dimensions of the buffer are necessary. Buffers are zeroed by default unless a template is supplied, in which case the buffer is initialized to the template.
:param type: The format to store data in. The type should be one of GL_BYTE, GL_SHORT, GL_INT, or GL_FLOAT.
Expand All @@ -30,7 +30,7 @@ def __init__(
:type dimensions: typing.Union[typing.List[int], typing.List['bpy.context.object']]
:param template: A sequence of matching dimensions which will be used to initialize the Buffer. If a template is not passed in all fields will be initialized to 0.
:type template: typing.List['bpy.context.object']
:rtype: typing.Union['Buffer', 'bpy.context.object']
:rtype: typing.Union['bpy.context.object', 'Buffer']
:return: The newly created buffer as a PyObject.
'''
pass
Expand Down Expand Up @@ -294,13 +294,13 @@ def glClearStencil(s: int):


def glClipPlane(plane: typing.Union[int, str],
equation: typing.Union['Buffer', 'bpy.context.object']):
equation: typing.Union['bpy.context.object', 'Buffer']):
''' Specify a plane against which all geometry is clipped
:param plane: Specifies which clipping plane is being positioned.
:type plane: typing.Union[int, str]
:param equation: Specifies the address of an array of four double- precision floating-point values. These values are interpreted as a plane equation.
:type equation: typing.Union['Buffer', 'bpy.context.object']
:type equation: typing.Union['bpy.context.object', 'Buffer']
'''

pass
Expand All @@ -318,18 +318,18 @@ def glColor(red, green, blue, alpha):
pass


def glColorMask(red: typing.Union[int, bool], green: typing.Union[int, bool],
blue: typing.Union[int, bool], alpha: typing.Union[int, bool]):
def glColorMask(red: typing.Union[bool, int], green: typing.Union[bool, int],
blue: typing.Union[bool, int], alpha: typing.Union[bool, int]):
''' Enable and disable writing of frame buffer color components
:param red: Specify whether red, green, blue, and alpha can or cannot be written into the frame buffer. The initial values are all GL_TRUE, indicating that the color components can be written.
:type red: typing.Union[int, bool]
:type red: typing.Union[bool, int]
:param green: Specify whether red, green, blue, and alpha can or cannot be written into the frame buffer. The initial values are all GL_TRUE, indicating that the color components can be written.
:type green: typing.Union[int, bool]
:type green: typing.Union[bool, int]
:param blue: Specify whether red, green, blue, and alpha can or cannot be written into the frame buffer. The initial values are all GL_TRUE, indicating that the color components can be written.
:type blue: typing.Union[int, bool]
:type blue: typing.Union[bool, int]
:param alpha: Specify whether red, green, blue, and alpha can or cannot be written into the frame buffer. The initial values are all GL_TRUE, indicating that the color components can be written.
:type alpha: typing.Union[int, bool]
:type alpha: typing.Union[bool, int]
'''

pass
Expand Down Expand Up @@ -640,11 +640,11 @@ def glDepthFunc(func: typing.Union[int, str]):
pass


def glDepthMask(flag: typing.Union[int, bool]):
def glDepthMask(flag: typing.Union[bool, int]):
''' Enable or disable writing into the depth buffer
:param flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE, depth buffer writing is disabled. Otherwise, it is enabled. Initially, depth buffer writing is enabled.
:type flag: typing.Union[int, bool]
:type flag: typing.Union[bool, int]
'''

pass
Expand Down Expand Up @@ -822,15 +822,15 @@ def glEvalPoint(i: int, j: int):


def glFeedbackBuffer(size: int, type: typing.Union[int, str],
buffer: typing.Union['Buffer', 'bpy.context.object']):
buffer: typing.Union['bpy.context.object', 'Buffer']):
''' Controls feedback mode
:param size: Specifies the maximum number of values that can be written into buffer.
:type size: int
:param type: Specifies a symbolic constant that describes the information that will be returned for each vertex.
:type type: typing.Union[int, str]
:param buffer: Returns the feedback data.
:type buffer: typing.Union['Buffer', 'bpy.context.object']
:type buffer: typing.Union['bpy.context.object', 'Buffer']
'''

pass
Expand Down Expand Up @@ -938,13 +938,13 @@ def glGenRenderbuffers(p0: int, p1: int):


def glGenTextures(n: int,
textures: typing.Union['Buffer', 'bpy.context.object']):
textures: typing.Union['bpy.context.object', 'Buffer']):
''' Generate texture names
:param n: Specifies the number of textures name to be generated.
:type n: int
:param textures: Specifies an array in which the generated textures names are stored.
:type textures: typing.Union['Buffer', 'bpy.context.object']
:type textures: typing.Union['bpy.context.object', 'Buffer']
'''

pass
Expand Down Expand Up @@ -1972,7 +1972,7 @@ def glReadBuffer(mode: typing.Union[int, str]):

def glReadPixels(x: int, y: int, width: int, height: int,
format: typing.Union[int, str], type: typing.Union[int, str],
pixels: typing.Union['Buffer', 'bpy.context.object']):
pixels: typing.Union['bpy.context.object', 'Buffer']):
''' Read a block of pixels from the frame buffer
:param x: Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
Expand All @@ -1988,7 +1988,7 @@ def glReadPixels(x: int, y: int, width: int, height: int,
:param type: Specifies the data type of the pixel data.
:type type: typing.Union[int, str]
:param pixels: Returns the pixel data.
:type pixels: typing.Union['Buffer', 'bpy.context.object']
:type pixels: typing.Union['bpy.context.object', 'Buffer']
'''

pass
Expand Down
9 changes: 5 additions & 4 deletions blender_autocomplete/bl_i18n_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import sys
import typing
from . import utils_languages_menu
from . import settings
from . import bl_extract_messages
from . import utils_rtl
from . import utils
from . import utils_languages_menu
from . import merge_po
from . import utils
from . import utils_rtl
from . import bl_extract_messages
from . import utils_cli
16 changes: 16 additions & 0 deletions blender_autocomplete/bl_i18n_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,22 @@ def is_valid_po_path(path):
pass


def list_po_dir(root_path, settings):
'''
'''

pass


def locale_explode(locale):
'''
'''

pass


def locale_match(loc1, loc2):
'''
Expand Down
50 changes: 50 additions & 0 deletions blender_autocomplete/bl_i18n_utils/utils_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import sys
import typing


def cleanup_po(args, settings):
'''
'''

pass


def language_menu(args, settings):
'''
'''

pass


def main():
'''
'''

pass


def rtl_process_po(args, settings):
'''
'''

pass


def strip_po(args, settings):
'''
'''

pass


def update_po(args, settings):
'''
'''

pass
5 changes: 3 additions & 2 deletions blender_autocomplete/bl_keymap_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import typing
from . import keymap_hierarchy
from . import platform_helpers
from . import keymap_from_toolbar
from . import platform_helpers
from . import io
from . import keymap_hierarchy
from . import versioning
2 changes: 1 addition & 1 deletion blender_autocomplete/bl_keymap_utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def keyconfig_export_as_data(wm, kc, filepath, all_keymaps):
pass


def keyconfig_import_from_data(name, keyconfig_data):
def keyconfig_import_from_data(name, keyconfig_data, keyconfig_version):
'''
'''
Expand Down
10 changes: 10 additions & 0 deletions blender_autocomplete/bl_keymap_utils/versioning.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import sys
import typing


def keyconfig_update(keyconfig_data, keyconfig_version):
'''
'''

pass
37 changes: 18 additions & 19 deletions blender_autocomplete/bl_operators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
import sys
import typing
from . import screen_play_rendered_anim
from . import assets
from . import vertexpaint_dirt
from . import object_align
from . import object_randomize_transform
from . import anim
from . import view3d
from . import add_mesh_torus
from . import clip
from . import gpencil_mesh_bake
from . import sequencer
from . import presets
from . import node
from . import rigidbody
from . import simulation
from . import uvcalc_lightmap
from . import userpref
from . import console
from . import constraint
from . import anim
from . import sequencer
from . import bmesh
from . import geometry_nodes
from . import mesh
from . import object_quick_effects
from . import object
from . import add_mesh_torus
from . import uvcalc_lightmap
from . import wm
from . import image
from . import userpref
from . import mesh
from . import screen_play_rendered_anim
from . import node
from . import freestyle
from . import constraint
from . import object_align
from . import uvcalc_follow_active
from . import object
from . import wm
from . import uvcalc_smart_project
from . import bmesh
from . import file
from . import clip
from . import view3d
from . import presets


def register():
Expand Down
Loading

0 comments on commit 153f8c1

Please sign in to comment.