Merge branch 'master' into blender2.8
This commit is contained in:
commit
e99094035c
Notes:
blender-bot
2023-02-14 10:21:10 +01:00
Referenced by commit bfa51b1b0c
, Fix subsurf modifier after error in merge commit
|
@ -78,10 +78,10 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
|
|||
self.report({'ERROR'}, "Unexpected modifier type: " + m.type)
|
||||
return {'CANCELLED'}
|
||||
# Find selected vertices in editmesh
|
||||
ob = bpy.context.active_object
|
||||
ob = context.active_object
|
||||
if ob.type == 'MESH' and ob.mode == 'EDIT' and ob.name != ref.name:
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
selected_verts = [v for v in bpy.context.active_object.data.vertices if v.select]
|
||||
selected_verts = [v for v in ob.data.vertices if v.select]
|
||||
bpy.ops.object.mode_set(mode='EDIT')
|
||||
# Compute the min/max distance from the reference to mesh vertices
|
||||
min_dist = sys.float_info.max
|
||||
|
|
|
@ -66,13 +66,13 @@ def GlobalBB_LQ(bb_world):
|
|||
return (Vector((left, front, up)), Vector((right, back, down)))
|
||||
|
||||
|
||||
def GlobalBB_HQ(obj):
|
||||
def GlobalBB_HQ(scene, obj):
|
||||
|
||||
matrix_world = obj.matrix_world.copy()
|
||||
|
||||
# Initialize the variables with the last vertex
|
||||
|
||||
me = obj.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
|
||||
me = obj.to_mesh(scene=scene, apply_modifiers=True, settings='PREVIEW')
|
||||
verts = me.vertices
|
||||
|
||||
val = matrix_world * verts[-1].co
|
||||
|
@ -155,7 +155,7 @@ def align_objects(context,
|
|||
for obj, bb_world in objects:
|
||||
|
||||
if bb_quality and obj.type == 'MESH':
|
||||
GBB = GlobalBB_HQ(obj)
|
||||
GBB = GlobalBB_HQ(scene, obj)
|
||||
else:
|
||||
GBB = GlobalBB_LQ(bb_world)
|
||||
|
||||
|
@ -219,7 +219,7 @@ def align_objects(context,
|
|||
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
|
||||
|
||||
if bb_quality and obj.type == 'MESH':
|
||||
GBB = GlobalBB_HQ(obj)
|
||||
GBB = GlobalBB_HQ(scene, obj)
|
||||
else:
|
||||
GBB = GlobalBB_LQ(bb_world)
|
||||
|
||||
|
|
|
@ -2223,7 +2223,7 @@ class WM_OT_addon_userpref_show(Operator):
|
|||
info = addon_utils.module_bl_info(mod)
|
||||
info["show_expanded"] = True
|
||||
|
||||
bpy.context.user_preferences.active_section = 'ADDONS'
|
||||
context.user_preferences.active_section = 'ADDONS'
|
||||
context.window_manager.addon_filter = 'All'
|
||||
context.window_manager.addon_search = info["name"]
|
||||
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
|
||||
|
|
|
@ -938,13 +938,14 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
|||
row.prop(md, "material_offset_rim", text="Rim")
|
||||
|
||||
def SUBSURF(self, layout, ob, md):
|
||||
from bpy import context
|
||||
layout.row().prop(md, "subdivision_type", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
|
||||
scene = bpy.context.scene
|
||||
engine = scene.view_render.engine
|
||||
scene = context.scene
|
||||
engine = scene.render.engine
|
||||
show_adaptive_options = (
|
||||
engine == 'CYCLES' and md == ob.modifiers[-1] and
|
||||
scene.cycles.feature_set == 'EXPERIMENTAL'
|
||||
|
|
|
@ -119,7 +119,7 @@ class TIME_MT_marker(Menu):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
marker_menu_generic(layout)
|
||||
marker_menu_generic(layout, context)
|
||||
|
||||
|
||||
class TIME_MT_view(Menu):
|
||||
|
@ -239,6 +239,7 @@ class TIME_MT_autokey(Menu):
|
|||
|
||||
|
||||
def marker_menu_generic(layout):
|
||||
from bpy import context
|
||||
|
||||
# layout.operator_context = 'EXEC_REGION_WIN'
|
||||
|
||||
|
@ -265,7 +266,7 @@ def marker_menu_generic(layout):
|
|||
layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
|
||||
|
||||
layout.separator()
|
||||
ts = bpy.context.tool_settings
|
||||
ts = context.tool_settings
|
||||
layout.prop(ts, "lock_markers")
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#ifndef __DNA_OBJECT_FLUIDSIM_H__
|
||||
#define __DNA_OBJECT_FLUIDSIM_H__
|
||||
#ifndef __DNA_OBJECT_FLUIDSIM_TYPES_H__
|
||||
#define __DNA_OBJECT_FLUIDSIM_TYPES_H__
|
||||
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_defs.h"
|
||||
|
@ -189,6 +189,5 @@ typedef struct FluidsimSettings {
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __DNA_OBJECT_FLUIDSIM_TYPES_H__ */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
* \ingroup DNA
|
||||
*/
|
||||
|
||||
#ifndef __DNA_OBJECT_FORCE_H__
|
||||
#define __DNA_OBJECT_FORCE_H__
|
||||
#ifndef __DNA_OBJECT_FORCE_TYPES_H__
|
||||
#define __DNA_OBJECT_FORCE_TYPES_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -459,5 +459,5 @@ typedef struct SoftBody {
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __DNA_OBJECT_FORCE_TYPES_H__ */
|
||||
|
||||
|
|
Loading…
Reference in New Issue