diff options
author | Peter Kim <pk15950@gmail.com> | 2021-09-10 11:25:15 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2021-09-10 11:25:15 +0300 |
commit | 3433c06c4ca5253533c34a88955dabbcbb51f3a0 (patch) | |
tree | 48674c5d6fb4dbff71fd8daffc4a9a34963a0a20 | |
parent | e2c0ecc936945e27b17eaf69096f2fefff4a851a (diff) | |
parent | 32baafe44dc56edd1baf6e5a16b4439ded8238f2 (diff) |
Merge branch 'master' into xr-controller-support
-rw-r--r-- | amaranth/render/final_resolution.py | 4 | ||||
-rw-r--r-- | io_scene_x3d/import_x3d.py | 6 | ||||
-rwxr-xr-x | render_povray/render_gui.py | 2 | ||||
-rw-r--r-- | space_view3d_math_vis/draw.py | 8 | ||||
-rw-r--r-- | space_view3d_math_vis/utils.py | 13 |
5 files changed, 21 insertions, 12 deletions
diff --git a/amaranth/render/final_resolution.py b/amaranth/render/final_resolution.py index deb81a66..953b793f 100644 --- a/amaranth/render/final_resolution.py +++ b/amaranth/render/final_resolution.py @@ -46,8 +46,8 @@ def render_final_resolution_ui(self, context): def register(): - bpy.types.RENDER_PT_dimensions.append(render_final_resolution_ui) + bpy.types.RENDER_PT_format.append(render_final_resolution_ui) def unregister(): - bpy.types.RENDER_PT_dimensions.remove(render_final_resolution_ui) + bpy.types.RENDER_PT_format.remove(render_final_resolution_ui) diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index 5d681a96..92189372 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -1622,8 +1622,10 @@ def importMesh_ApplyColors(bpymesh, geom, ancestry): elif len(rgb) == len(bpymesh.loops): rgb = tuple(chain(*rgb)) else: - printf("WARNING not applying vertex colors, non matching numbers of vertices or loops (%d vs %d/%d)" - "" % (len(rgb), len(bpymesh.vertices), len(bpymesh.loops))) + print( + "WARNING not applying vertex colors, non matching numbers of vertices or loops (%d vs %d/%d)" % + (len(rgb), len(bpymesh.vertices), len(bpymesh.loops)) + ) return lcol_layer.data.foreach_set("color", rgb) diff --git a/render_povray/render_gui.py b/render_povray/render_gui.py index 8e584079..ff5e20ec 100755 --- a/render_povray/render_gui.py +++ b/render_povray/render_gui.py @@ -64,7 +64,7 @@ del properties_view_layer from bl_ui import properties_render # DEPRECATED#properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER') -# DEPRECATED#properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER') +# DEPRECATED#properties_render.RENDER_PT_format.COMPAT_ENGINES.add('POVRAY_RENDER') # properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER') # TORECREATE##DEPRECATED#properties_render.RENDER_PT_shading.COMPAT_ENGINES.add('POVRAY_RENDER') # DEPRECATED#properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER') diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py index 0420044e..33f6a965 100644 --- a/space_view3d_math_vis/draw.py +++ b/space_view3d_math_vis/draw.py @@ -149,8 +149,12 @@ def draw_callback_view(): bgl.glDepthFunc(bgl.GL_LESS) data_matrix, data_quat, data_euler, data_vector, data_vector_array = utils.console_math_data() - active_index = settings.index - active_key = prop_states[active_index].name if active_index >= 0 else None + if settings.index in range(0,len(prop_states)): + active_index = settings.index + active_key = prop_states[active_index].name + else: + active_index = -1 + active_key = None if data_vector: coords = [tuple(vec.to_3d()) for vec in data_vector.values()] diff --git a/space_view3d_math_vis/utils.py b/space_view3d_math_vis/utils.py index 8174ee5d..a175dd5c 100644 --- a/space_view3d_math_vis/utils.py +++ b/space_view3d_math_vis/utils.py @@ -23,11 +23,14 @@ import bpy def console_namespace(): import console_python - get_consoles = console_python.get_console - consoles = getattr(get_consoles, "consoles", None) - if consoles: - for console, stdout, stderr in get_consoles.consoles.values(): - return console.locals + for window in bpy.context.window_manager.windows: + for area in window.screen.areas: + if area.type == 'CONSOLE': + for region in area.regions: + if region.type == 'WINDOW': + console = console_python.get_console(hash(region)) + if console: + return console[0].locals return {} |