Merge branch 'master' into xr-controller-support

This commit is contained in:
Peter Kim 2021-09-10 17:25:15 +09:00
commit 3433c06c4c
5 changed files with 21 additions and 12 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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')

View File

@ -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()]

View File

@ -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 {}