Merge branch 'master' into 28

This commit is contained in:
Campbell Barton 2018-06-05 16:35:20 +02:00
commit 7436fb2ef1
32 changed files with 158 additions and 137 deletions

View File

@ -31,7 +31,8 @@ endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_CLANG On)
set(MSVC_REDIST_DIR $ENV{VCToolsRedistDir})
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
if (DEFINED MSVC_REDIST_DIR)
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
else()

View File

@ -1,5 +1,3 @@
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS%
if "%BUILD_ARCH%"=="x64" (
set MSBUILD_PLATFORM=x64
) else if "%BUILD_ARCH%"=="x86" (
@ -11,9 +9,9 @@ if "%BUILD_ARCH%"=="x64" (
)
if "%WITH_CLANG%"=="1" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -T"LLVM-vs2017"
set CLANG_CMAKE_ARGS=-T"LLVM-vs2017"
if "%WITH_ASAN%"=="1" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_COMPILER_ASAN=On
set ASAN_CMAKE_ARGS=-DWITH_COMPILER_ASAN=On
)
) else (
if "%WITH_ASAN%"=="1" (
@ -21,6 +19,7 @@ if "%WITH_CLANG%"=="1" (
exit /b 1
)
)
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS%
if NOT EXIST %BUILD_DIR%\nul (
mkdir %BUILD_DIR%

View File

@ -22,4 +22,6 @@ set BUILD_SHOW_HASHES=
set SHOW_HELP=
set BUILD_WITH_NINJA=
set WITH_CLANG=
set WITH_ASAN=
set WITH_ASAN=
set CLANG_CMAKE_ARGS=
set ASAN_CMAKE_ARGS=

View File

@ -88,7 +88,7 @@ _modules = [
"space_userpref",
"space_view3d",
"space_view3d_toolbar",
]
]
import bpy
@ -167,6 +167,8 @@ def unregister():
# Define a default UIList, when a list does not need any custom drawing...
# Keep in sync with its #defined name in UI_interface.h
class UI_UL_list(bpy.types.UIList):
# These are common filtering or ordering operations (same as the default C ones!).
@staticmethod

View File

@ -941,6 +941,7 @@ class BONE_PT_constraints(ConstraintButtonsPanel, Panel):
for con in context.pose_bone.constraints:
self.draw_constraint(context, con)
classes = (
OBJECT_PT_constraints,
BONE_PT_constraints,

View File

@ -180,6 +180,7 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel):
sub.active = curve.taper_object is not None
sub.prop(curve, "use_map_taper")
class DATA_PT_geometry_curve_bevel(CurveButtonsPanelCurve, Panel):
bl_label = "Bevel"
bl_parent_id = "DATA_PT_geometry_curve"
@ -348,6 +349,7 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
row.prop(char, "use_underline", toggle=True)
row.prop(char, "use_small_caps", toggle=True)
class DATA_PT_font_transform(CurveButtonsPanelText, Panel):
bl_label = "Transform"
bl_parent_id = "DATA_PT_font"
@ -404,7 +406,6 @@ class DATA_PT_paragraph_alignment(CurveButtonsPanelText, Panel):
layout.row().prop(text, "align_y", expand=True)
class DATA_PT_paragraph_spacing(CurveButtonsPanelText, Panel):
bl_parent_id = "DATA_PT_paragraph"
bl_label = "Spacing"

View File

@ -182,7 +182,6 @@ class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
class DATA_PT_EEVEE_shadow_cascaded_shadow_map(DataButtonsPanel, Panel):
bl_label = "Cascaded Shadow Map"
bl_parent_id = "DATA_PT_EEVEE_shadow"

View File

@ -629,7 +629,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
row = layout.row(align=True)
row.prop(linestyle, "panel", expand=True)
if linestyle.panel == 'STROKES':
## Chaining
# Chaining
layout.prop(linestyle, "use_chaining", text="Chaining:")
split = layout.split(align=True)
split.active = linestyle.use_chaining
@ -643,7 +643,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
col = split.column()
col.prop(linestyle, "use_same_object")
## Splitting
# Splitting
layout.label(text="Splitting:")
split = layout.split(align=True)
# First column
@ -679,7 +679,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
sub.prop(linestyle, "split_dash3", text="D3")
sub.prop(linestyle, "split_gap3", text="G3")
## Sorting
# Sorting
layout.prop(linestyle, "use_sorting", text="Sorting:")
col = layout.column()
col.active = linestyle.use_sorting
@ -693,7 +693,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
row = col.row(align=True)
row.prop(linestyle, "sort_order", expand=True)
## Selection
# Selection
layout.label(text="Selection:")
split = layout.split(align=True)
# First column
@ -716,12 +716,12 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
sub.active = linestyle.use_chain_count
sub.prop(linestyle, "chain_count")
## Caps
# Caps
layout.label(text="Caps:")
row = layout.row(align=True)
row.prop(linestyle, "caps", expand=True)
## Dashed lines
# Dashed lines
layout.prop(linestyle, "use_dashed_line", text="Dashed Line:")
row = layout.row(align=True)
row.active = linestyle.use_dashed_line
@ -786,9 +786,10 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
row = layout.row()
props = row.operator(
"wm.properties_context_change",
text="Go to Linestyle Textures Properties",
icon='TEXTURE')
"wm.properties_context_change",
text="Go to Linestyle Textures Properties",
icon='TEXTURE',
)
props.context = 'TEXTURE'
elif linestyle.panel == 'MISC':

View File

@ -242,7 +242,6 @@ class GreasePencilStrokeEditPanel:
if is_3d_view:
layout.separator()
layout.separator()
col = layout.column(align=True)
col.operator("gpencil.stroke_subdivide", text="Subdivide")
@ -1100,11 +1099,11 @@ class GreasePencilPaletteColorPanel:
row = layout.row()
sub = row.row(align=True)
sub.label(text="Isolate:") # based on active color only
sub.label(text="Isolate:") # based on active color only
sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True
sub = row.row(align=True)
sub.label(text="Lock:") # based on other stuff...
sub.label(text="Lock:") # based on other stuff...
sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="")
sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="")

View File

@ -43,8 +43,8 @@ class MASK_UL_layers(UIList):
class MASK_PT_mask:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'UI'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
bl_label = "Mask Settings"
bl_options = {'DEFAULT_CLOSED'}
@ -66,8 +66,8 @@ class MASK_PT_mask:
class MASK_PT_layers:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'UI'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
bl_label = "Mask Layers"
@classmethod
@ -114,8 +114,8 @@ class MASK_PT_layers:
class MASK_PT_spline:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'UI'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
bl_label = "Active Spline"
@classmethod
@ -148,8 +148,8 @@ class MASK_PT_spline:
class MASK_PT_point:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'UI'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
bl_label = "Active Point"
@classmethod
@ -203,8 +203,8 @@ class MASK_PT_point:
class MASK_PT_display:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'UI'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
bl_label = "Mask Display"
bl_options = {'DEFAULT_CLOSED'}
@ -229,8 +229,8 @@ class MASK_PT_display:
class MASK_PT_transforms:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'TOOLS'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'TOOLS'
bl_label = "Transforms"
bl_category = "Mask"
bl_options = {'DEFAULT_CLOSED'}
@ -253,8 +253,8 @@ class MASK_PT_transforms:
class MASK_PT_tools:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'TOOLS'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'TOOLS'
bl_label = "Mask Tools"
bl_category = "Mask"
@ -291,8 +291,8 @@ class MASK_PT_tools:
class MASK_PT_add:
# subclasses must define...
#~ bl_space_type = 'CLIP_EDITOR'
#~ bl_region_type = 'TOOLS'
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'TOOLS'
bl_label = "Add"
bl_category = "Mask"

View File

@ -126,7 +126,7 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
col.prop(brush, "gradient_stroke_mode", text="Mode")
if brush.gradient_stroke_mode in {'SPACING_REPEAT', 'SPACING_CLAMP'}:
col.prop(brush, "grad_spacing")
else: # if brush.image_tool == 'FILL':
else: # if brush.image_tool == 'FILL':
col.prop(brush, "gradient_fill_mode")
else:
row = col.row(align=True)

View File

@ -404,7 +404,7 @@ class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel):
@classmethod
def poll(cls, context):
return context.particle_system.cloth != None
return context.particle_system.cloth is not None
def draw(self, context):
layout = self.layout
@ -436,7 +436,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel):
@classmethod
def poll(cls, context):
return context.particle_system.cloth != None
return context.particle_system.cloth is not None
def draw(self, context):
layout = self.layout
@ -591,6 +591,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
if part.type != 'HAIR':
col.prop(part, "use_dynamic_rotation")
class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel):
bl_label = "Angular Velocity"
bl_parent_id = "PARTICLE_PT_rotation"
@ -812,6 +813,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
sub.prop(key, "object", text="")
sub.prop(key, "system", text="System")
class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel):
bl_label = "Deflection"
bl_parent_id = "PARTICLE_PT_physics"
@ -820,8 +822,8 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel):
@classmethod
def poll(cls, context):
part = particle_get_settings(context)
return part.physics_type in {'NEWTON', 'FLUID'}
part = particle_get_settings(context)
return part.physics_type in {'NEWTON', 'FLUID'}
def draw(self, context):
layout = self.layout
@ -846,8 +848,8 @@ class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel):
@classmethod
def poll(cls, context):
part = particle_get_settings(context)
return part.physics_type == 'NEWTON'
part = particle_get_settings(context)
return part.physics_type == 'NEWTON'
def draw(self, context):
layout = self.layout
@ -873,8 +875,8 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel):
@classmethod
def poll(cls, context):
part = particle_get_settings(context)
return part.physics_type == 'NEWTON'
part = particle_get_settings(context)
return part.physics_type == 'NEWTON'
def draw(self, context):
layout = self.layout
@ -924,7 +926,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
# Currently boids can only use the first state so these are commented out for now.
#row = layout.row()
#row.template_list("UI_UL_list", "particle_boids", boids, "states",
# row.template_list("UI_UL_list", "particle_boids", boids, "states",
# boids, "active_boid_state_index", compact="True")
#col = row.row()
#sub = col.row(align=True)
@ -1039,6 +1041,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col.prop(part, "material_slot", text="Material")
col.prop(psys, "parent", text="Coordinate System")
class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
bl_label = "Extra"
bl_parent_id = "PARTICLE_PT_render"
@ -1058,7 +1061,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col = layout.column()
col.prop(part, "use_parent_particles", text="Parent Particles")
@ -1066,7 +1069,6 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
col.prop(part, "use_dead", text="Dead")
class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel):
bl_label = "Line"
bl_parent_id = "PARTICLE_PT_render"
@ -1086,7 +1088,7 @@ class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.separator()
sub = col.column(align=True)
@ -1094,6 +1096,7 @@ class PARTICLE_PT_render_line(ParticleButtonsPanel, Panel):
sub.prop(part, "line_length_head", text="Head")
col.prop(part, "use_velocity_length", text="Velocity Length")
class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel):
bl_label = "Path"
bl_parent_id = "PARTICLE_PT_render"
@ -1113,7 +1116,7 @@ class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "use_strand_primitive")
sub = col.column()
@ -1148,7 +1151,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "use_absolute_path_time")
@ -1160,6 +1163,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel):
col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time)
col.prop(part, "length_random", text="Random", slider=True)
class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel):
bl_label = "Object"
bl_parent_id = "PARTICLE_PT_render"
@ -1179,7 +1183,7 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "dupli_object", text="Instance Object")
sub = col.column()
@ -1207,7 +1211,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "dupli_group")
@ -1219,6 +1223,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
sub.prop(part, "use_rotation_dupli", text="Object Rotation")
sub.prop(part, "use_scale_dupli", text="Object Scale")
class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
bl_label = "Use Count"
bl_parent_id = "PARTICLE_PT_render_collection"
@ -1246,13 +1251,13 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
layout.active = part.use_group_count and not part.use_whole_group
row = layout.row()
row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights",
part, "active_dupliweight_index")
part, "active_dupliweight_index")
col = row.column()
sub = col.row()
@ -1267,6 +1272,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
row = layout.row()
row.prop(weight, "count")
class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel):
bl_label = "Billboard Alignment"
bl_parent_id = "PARTICLE_PT_render"
@ -1286,12 +1292,13 @@ class PARTICLE_PT_render_billboards_alignment(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "billboard_align", text="Align To")
col.prop(part, "lock_billboard", text="Lock Axis")
col.prop(part, "billboard_object")
class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel):
bl_label = "Billboard Tilt"
bl_parent_id = "PARTICLE_PT_render"
@ -1311,7 +1318,7 @@ class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
sub = col.column(align=True)
sub.prop(part, "billboard_tilt", text="Angle", slider=True)
@ -1325,6 +1332,7 @@ class PARTICLE_PT_render_billboards_tilt(ParticleButtonsPanel, Panel):
col.prop(part, "billboard_velocity_head", text="Velocity ScaleHead")
col.prop(part, "billboard_velocity_tail", text="Tail")
class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel):
bl_label = "Billboard UVs"
bl_parent_id = "PARTICLE_PT_render"
@ -1344,7 +1352,7 @@ class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel):
ob = context.object
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
if psys:
col.prop_search(psys, "billboard_normal_uv", ob.data, "uv_layers")
@ -1361,7 +1369,6 @@ class PARTICLE_PT_render_billboards_uv(ParticleButtonsPanel, Panel):
sub.prop(part, "billboard_offset_split")
class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel):
bl_label = "Trails"
bl_parent_id = "PARTICLE_PT_render"
@ -1380,7 +1387,7 @@ class PARTICLE_PT_render_trails(ParticleButtonsPanel, Panel):
psys = context.particle_system
part = particle_get_settings(context)
col=layout.column()
col = layout.column()
col.prop(part, "trail_count")
@ -1532,6 +1539,7 @@ class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel):
col.prop(part, "child_parting_min", text="Min")
col.prop(part, "child_parting_max", text="Max")
class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel):
bl_label = "Clumping"
bl_parent_id = "PARTICLE_PT_children"
@ -1573,6 +1581,7 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel):
if part.use_twist_curve:
sub.template_curve_mapping(part, "twist_curve")
class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
bl_label = "Roughness"
bl_parent_id = "PARTICLE_PT_children"

View File

@ -257,6 +257,7 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
cloth = context.cloth.settings
effector_weights_ui(self, context, cloth.effector_weights, 'CLOTH')
classes = (
CLOTH_MT_presets,
PHYSICS_PT_cloth,

View File

@ -274,7 +274,7 @@ def basic_force_field_settings_ui(self, context, field):
elif field.type == 'HARMONIC':
col.prop(field, "use_multiple_springs")
if field.type == 'FORCE':
col.prop(field, "use_gravity_falloff", text="Gravitation")
col.prop(field, "use_gravity_falloff", text="Gravitation")
split = layout.split()

View File

@ -117,7 +117,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
rbo = ob.rigid_body
#col = layout.column(align=1)
#col.label(text="Activation:")
# col.label(text="Activation:")
# XXX: settings such as activate on collison/etc.
split = layout.split()

View File

@ -222,6 +222,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel):
bl_label = "Burn Into Image"
bl_parent_id = "RENDER_PT_stamp"

View File

@ -296,9 +296,7 @@ class SCENE_PT_color_management_curves(SceneButtonsPanel, Panel):
layout.use_property_split = False
layout.enabled = view.use_curve_mapping
layout.template_curve_mapping(view, "curve_mapping", levels = True)
layout.template_curve_mapping(view, "curve_mapping", levels=True)
class SCENE_PT_audio(SceneButtonsPanel, Panel):

View File

@ -59,6 +59,7 @@ class TEXTURE_UL_texslots(UIList):
layout.alignment = 'CENTER'
layout.label(text="", icon_value=icon)
def context_tex_datablock(context):
idblock = context.brush
if idblock:
@ -106,6 +107,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
if isinstance(idblock, Brush):
layout.prop(tex, "use_preview_alpha")
class TEXTURE_PT_context(TextureButtonsPanel, Panel):
bl_label = ""
bl_context = "texture"

View File

@ -43,7 +43,7 @@ class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
rd = scene.render
layer = bpy.context.view_layer
layout.prop(layer, "use", text="Use for Rendering");
layout.prop(layer, "use", text="Use for Rendering")
layout.prop(rd, "use_single_layer", text="Render Single Layer")

View File

@ -1018,9 +1018,11 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
if clip.use_proxy_custom_directory:
col.prop(clip.proxy, "directory")
col.operator("clip.rebuild_proxy",
text="Build Proxy / Timecode" if clip.source == 'MOVIE'
else "Build Proxy")
col.operator(
"clip.rebuild_proxy",
text="Build Proxy / Timecode" if clip.source == 'MOVIE'
else "Build Proxy"
)
if clip.source == 'MOVIE':
col2 = col.column()
@ -1189,6 +1191,7 @@ class CLIP_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
class CLIP_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
bl_space_type = 'CLIP_EDITOR'
class CLIP_MT_view(Menu):
bl_label = "View"

View File

@ -425,11 +425,11 @@ class DOPESHEET_MT_gpencil_channel(Menu):
layout.operator("anim.channels_editable_toggle")
# XXX: to be enabled when these are ready for use!
#layout.separator()
#layout.operator("anim.channels_expand")
#layout.operator("anim.channels_collapse")
# layout.separator()
# layout.operator("anim.channels_expand")
# layout.operator("anim.channels_collapse")
#layout.separator()
# layout.separator()
#layout.operator_menu_enum("anim.channels_move", "direction", text="Move...")
@ -450,9 +450,9 @@ class DOPESHEET_MT_gpencil_frame(Menu):
layout.separator()
layout.operator("action.keyframe_type")
#layout.separator()
#layout.operator("action.copy")
#layout.operator("action.paste")
# layout.separator()
# layout.operator("action.copy")
# layout.operator("action.paste")
class DOPESHEET_MT_delete(Menu):
@ -496,18 +496,18 @@ class DOPESHEET_MT_specials(Menu):
layout.operator_menu_enum("action.mirror", "type", text="Mirror")
layout.operator_menu_enum("action.snap", "type", text="Snap")
class DOPESHEET_MT_channel_specials(Menu):
bl_label = "Dope Sheet Channel Context Menu"
def draw(self, context):
layout = self.layout
layout.operator("anim.channels_setting_enable", text="Mute Channels").type='MUTE'
layout.operator("anim.channels_setting_disable", text="Unmute Channels").type='MUTE'
layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE'
layout.operator("anim.channels_setting_disable", text="Unmute Channels").type = 'MUTE'
layout.separator()
layout.operator("anim.channels_setting_enable", text="Protect Channels").type='PROTECT'
layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type='PROTECT'
layout.operator("anim.channels_setting_enable", text="Protect Channels").type = 'PROTECT'
layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type = 'PROTECT'
layout.separator()
layout.operator("anim.channels_group")

View File

@ -336,11 +336,11 @@ class GRAPH_MT_channel_specials(Menu):
st = context.space_data
layout.separator()
layout.operator("anim.channels_setting_enable", text="Mute Channels").type='MUTE'
layout.operator("anim.channels_setting_disable", text="Unmute Channels").type='MUTE'
layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE'
layout.operator("anim.channels_setting_disable", text="Unmute Channels").type = 'MUTE'
layout.separator()
layout.operator("anim.channels_setting_enable", text="Protect Channels").type='PROTECT'
layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type='PROTECT'
layout.operator("anim.channels_setting_enable", text="Protect Channels").type = 'PROTECT'
layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type = 'PROTECT'
layout.separator()
layout.operator("anim.channels_group")

View File

@ -621,6 +621,7 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
bl_region_type = 'TOOLS'
bl_category = 'Mask'
class IMAGE_PT_tools_mask_add(MASK_PT_add, Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'TOOLS'
@ -1164,8 +1165,6 @@ class IMAGE_PT_uv_sculpt(Panel, ImagePaintPanel):
col.prop(uvsculpt, "show_brush")
class IMAGE_PT_options_uvs(Panel, UVToolsPanel):
bl_label = "UV Options"
bl_category = "Options"

View File

@ -542,11 +542,15 @@ class NODE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel):
bl_region_type = 'TOOLS'
# Grease Pencil drawing brushes
class NODE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'TOOLS'
# Grease Pencil drawing curves
class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
bl_space_type = 'NODE_EDITOR'
bl_region_type = 'TOOLS'
@ -557,6 +561,7 @@ class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Pane
def node_draw_tree_view(layout, context):
pass
classes = (
NODE_HT_header,
NODE_MT_editor_menus,

View File

@ -179,7 +179,7 @@ class OUTLINER_MT_collection(Menu):
layout.operator("outliner.collection_instance", text="Instance to Scene")
if space.display_mode != 'VIEW_LAYER':
layout.operator("outliner.collection_link", text="Link to Scene")
layout.operator("outliner.id_operation", text="Unlink").type='UNLINK'
layout.operator("outliner.id_operation", text="Unlink").type = 'UNLINK'
if space.display_mode == 'VIEW_LAYER':
layout.separator()
@ -206,20 +206,20 @@ class OUTLINER_MT_object(Menu):
space = context.space_data
layout.operator("outliner.object_operation", text="Delete").type='DELETE'
layout.operator("outliner.object_operation", text="Delete").type = 'DELETE'
if space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection:
layout.operator("outliner.object_operation", text="Delete Hierarchy").type='DELETE_HIERARCHY'
layout.operator("outliner.object_operation", text="Delete Hierarchy").type = 'DELETE_HIERARCHY'
layout.separator()
layout.operator("outliner.object_operation", text="Select").type='SELECT'
layout.operator("outliner.object_operation", text="Select Hierarchy").type='SELECT_HIERARCHY'
layout.operator("outliner.object_operation", text="Deselect").type='DESELECT'
layout.operator("outliner.object_operation", text="Select").type = 'SELECT'
layout.operator("outliner.object_operation", text="Select Hierarchy").type = 'SELECT_HIERARCHY'
layout.operator("outliner.object_operation", text="Deselect").type = 'DESELECT'
layout.separator()
if not (space.display_mode == 'VIEW_LAYER' and not space.use_filter_collection):
layout.operator("outliner.id_operation", text="Unlink").type='UNLINK'
layout.operator("outliner.id_operation", text="Unlink").type = 'UNLINK'
layout.separator()
layout.operator_menu_enum("outliner.id_operation", 'type', text="ID Data")

View File

@ -73,7 +73,6 @@ class STATUSBAR_HT_header(Header):
return
classes = (
STATUSBAR_HT_header,
)

View File

@ -117,6 +117,7 @@ class TIME_MT_editor_menus(Menu):
panel_type="TIME_PT_keyframing_settings",
text="Keying")
class TIME_MT_marker(Menu):
bl_label = "Marker"
@ -217,6 +218,7 @@ def marker_menu_generic(layout):
###################################
class TimelinePanelButtons:
bl_space_type = 'DOPESHEET_EDITOR'
bl_region_type = 'UI'

View File

@ -427,7 +427,6 @@ class ToolSelectPanelHelper:
return ui_gen, show_text
@classmethod
def draw_cls(cls, layout, context, detect_layout=True):
# Use a classmethod so it can be called outside of a panel context.
@ -676,6 +675,7 @@ def keymap_from_context(context, space_type):
wm.keyconfigs.update()
return keymap
classes = (
WM_MT_toolsystem_submenu,
)

View File

@ -91,7 +91,7 @@ class _defs_view3d_generic:
("transform.translate",
dict(release_confirm=True, cursor_transform=True),
dict(type='EVT_TWEAK_A', value='ANY'),
),
),
),
)
@ -292,7 +292,6 @@ class _defs_edit_armature:
class _defs_edit_mesh:
@ToolDef.from_fn
def cube_add():
return dict(

View File

@ -141,7 +141,6 @@ class USERPREF_MT_app_templates(Menu):
layout.operator_context = 'INVOKE_DEFAULT'
props = layout.operator("wm.app_template_install")
def draw(self, context):
self.draw_ex(context, use_splash=False, use_default=True, use_install=True)
@ -282,14 +281,14 @@ class USERPREF_PT_interface(Panel):
row.separator()
col = row.column()
#Toolbox doesn't exist yet
#col.label(text="Toolbox:")
# Toolbox doesn't exist yet
# col.label(text="Toolbox:")
#col.prop(view, "show_column_layout")
#col.label(text="Open Toolbox Delay:")
#col.prop(view, "open_left_mouse_delay", text="Hold LMB")
#col.prop(view, "open_right_mouse_delay", text="Hold RMB")
col.prop(view, "show_manipulator")
## Currently not working
# Currently not working
# col.prop(view, "show_manipulator_shaded")
sub = col.column()
sub.active = view.show_manipulator
@ -328,7 +327,6 @@ class USERPREF_PT_interface(Panel):
col.prop(view, "show_view3d_cursor")
class USERPREF_PT_edit(Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Edit"
@ -412,7 +410,7 @@ class USERPREF_PT_edit(Panel):
sub = col.column()
#~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable
# ~ sub.active = edit.use_keyframe_insert_auto # incorrect, time-line can enable
sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
col.separator()
@ -1217,7 +1215,7 @@ class USERPREF_PT_input(Panel):
#sub.prop(inputs, "use_mouse_mmb_paste")
#col.separator()
# col.separator()
sub = col.column()
sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
@ -1332,7 +1330,7 @@ class USERPREF_PT_addons(Panel):
'OFFICIAL': 'FILE_BLEND',
'COMMUNITY': 'POSE_DATA',
'TESTING': 'MOD_EXPLODE',
}
}
@classmethod
def poll(cls, context):
@ -1410,7 +1408,6 @@ class USERPREF_PT_addons(Panel):
sub_col.label(" " + addon_file)
sub_col.label(" " + addon_path)
if addon_utils.error_encoding:
self.draw_error(
col,
@ -1435,11 +1432,11 @@ class USERPREF_PT_addons(Panel):
# check if addon should be visible with current filters
if ((filter == "All") or
(filter == info["category"]) or
(filter == "Enabled" and is_enabled) or
(filter == "Disabled" and not is_enabled) or
(filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder))))
):
(filter == info["category"]) or
(filter == "Enabled" and is_enabled) or
(filter == "Disabled" and not is_enabled) or
(filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder))))
):
if search and search not in info["name"].lower():
if info["author"]:
if search not in info["author"].lower():

View File

@ -70,7 +70,7 @@ def draw_vpaint_symmetry(layout, vpaint):
class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
bl_category = "Options"
bl_context = ".mesh_edit" # dot on purpose (access from topbar)
bl_context = ".mesh_edit" # dot on purpose (access from topbar)
bl_label = "Mesh Options"
@classmethod
@ -101,9 +101,10 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
# ********** default tools for editmode_curve ****************
class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel):
bl_category = "Options"
bl_context = ".curve_edit" # dot on purpose (access from topbar)
bl_context = ".curve_edit" # dot on purpose (access from topbar)
bl_label = "Curve Stroke"
def draw(self, context):
@ -155,8 +156,6 @@ class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel):
colsub.prop(cps, "surface_plane", expand=True)
# ********** default tools for editmode_armature ****************
@ -175,7 +174,7 @@ class VIEW3D_PT_tools_armatureedit_options(View3DPanel, Panel):
class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
bl_category = "Options"
bl_context = ".posemode" # dot on purpose (access from topbar)
bl_context = ".posemode" # dot on purpose (access from topbar)
bl_label = "Pose Options"
def draw(self, context):
@ -194,7 +193,7 @@ class View3DPaintPanel(UnifiedPaintPanel):
class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
bl_category = "Tools"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Missing Data"
@classmethod
@ -528,7 +527,7 @@ class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Slots"
bl_category = "Slots"
@ -589,7 +588,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Mask"
bl_category = "Slots"
@ -723,7 +722,7 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel):
bl_category = "Tools"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Texture Mask"
bl_options = {'DEFAULT_CLOSED'}
@ -886,11 +885,11 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
def draw_header(self, context):
layout = self.layout
layout.operator(
"sculpt.dynamic_topology_toggle",
icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT',
text="",
emboss=False,
)
"sculpt.dynamic_topology_toggle",
icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT',
text="",
emboss=False,
)
def draw(self, context):
layout = self.layout
@ -1124,7 +1123,7 @@ class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel):
bl_category = "Tools"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "External"
bl_options = {'DEFAULT_CLOSED'}
@ -1146,7 +1145,7 @@ class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel):
bl_category = "Tools"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Symmetry"
bl_options = {'DEFAULT_CLOSED'}
@ -1165,7 +1164,7 @@ class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel):
class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
bl_category = "Options"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Project Paint"
@classmethod
@ -1323,6 +1322,8 @@ class VIEW3D_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel):
bl_space_type = 'VIEW_3D'
# Grease Pencil drawingcurves
class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel):
bl_space_type = 'VIEW_3D'

View File

@ -302,8 +302,8 @@ static StructRNA *rna_Panel_register(
static StructRNA *rna_Panel_refine(PointerRNA *ptr)
{
Panel *hdr = (Panel *)ptr->data;
return (hdr->type && hdr->type->ext.srna) ? hdr->type->ext.srna : &RNA_Panel;
Panel *menu = (Panel *)ptr->data;
return (menu->type && menu->type->ext.srna) ? menu->type->ext.srna : &RNA_Panel;
}
/* UIList */
@ -696,7 +696,7 @@ static int menu_poll(const bContext *C, MenuType *pt)
return visible;
}
static void menu_draw(const bContext *C, Menu *hdr)
static void menu_draw(const bContext *C, Menu *menu)
{
extern FunctionRNA rna_Menu_draw_func;
@ -704,12 +704,12 @@ static void menu_draw(const bContext *C, Menu *hdr)
ParameterList list;
FunctionRNA *func;
RNA_pointer_create(&CTX_wm_screen(C)->id, hdr->type->ext.srna, hdr, &mtr);
RNA_pointer_create(&CTX_wm_screen(C)->id, menu->type->ext.srna, menu, &mtr);
func = &rna_Menu_draw_func; /* RNA_struct_find_function(&mtr, "draw"); */
RNA_parameter_list_create(&list, &mtr, func);
RNA_parameter_set_lookup(&list, "context", &C);
hdr->type->ext.call((bContext *)C, &mtr, func, &list);
menu->type->ext.call((bContext *)C, &mtr, func, &list);
RNA_parameter_list_free(&list);
}
@ -818,8 +818,8 @@ static StructRNA *rna_Menu_register(
static StructRNA *rna_Menu_refine(PointerRNA *mtr)
{
Menu *hdr = (Menu *)mtr->data;
return (hdr->type && hdr->type->ext.srna) ? hdr->type->ext.srna : &RNA_Menu;
Menu *menu = (Menu *)mtr->data;
return (menu->type && menu->type->ext.srna) ? menu->type->ext.srna : &RNA_Menu;
}
static void rna_Menu_bl_description_set(PointerRNA *ptr, const char *value)