Cleanup: trailing space, remove tabs, pep8

This commit is contained in:
2019-09-10 06:11:52 +10:00
parent 51334dd3a6
commit c8c3e7d284
29 changed files with 90 additions and 79 deletions

View File

@@ -719,7 +719,7 @@ macro(remove_strict_flags)
endif() endif()
if(MSVC) if(MSVC)
remove_cc_flag(/w34189) # Restore warn C4189 (unused variable) back to w4 remove_cc_flag(/w34189) # Restore warn C4189 (unused variable) back to w4
endif() endif()
endmacro() endmacro()

View File

@@ -35,7 +35,7 @@ class OBJECT_OT_evaluated_example(bpy.types.Operator):
# modifiers. # modifiers.
# #
# For mesh objects the object.data will be a mesh with all modifiers applied. # For mesh objects the object.data will be a mesh with all modifiers applied.
# This means that in access to vertices or faces after modifier stack happens via fields of # This means that in access to vertices or faces after modifier stack happens via fields of
# object_eval.object. # object_eval.object.
# #
# For other types of objects the object_eval.data does not have modifiers applied on it, # For other types of objects the object_eval.data does not have modifiers applied on it,

View File

@@ -210,4 +210,3 @@ def unregister():
if __name__ == "__main__": if __name__ == "__main__":
register() register()

View File

@@ -45,4 +45,4 @@ class BlenderViewportParameters {
CCL_NAMESPACE_END CCL_NAMESPACE_END
#endif #endif

View File

@@ -46,7 +46,7 @@ import bpy
# Generic functions # Generic functions
def area_tri_signed_2x_v2(v1, v2, v3): def area_tri_signed_2x_v2(v1, v2, v3):
return (v1[0] - v2[0]) * (v2[1] - v3[1]) + (v1[1] - v2[1]) * (v3[0] - v2[0]) return (v1[0] - v2[0]) * (v2[1] - v3[1]) + (v1[1] - v2[1]) * (v3[0] - v2[0])
class TriMesh: class TriMesh:

View File

@@ -41,8 +41,8 @@ Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP
bpred = TrueBP1D() bpred = TrueBP1D()
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.0007,5)) upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.0007,5))
Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0))) Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [ shaders_list = [
ConstantThicknessShader(2), ConstantThicknessShader(2),
ConstantColorShader(0.0, 0.0, 0.0, 1.0) ConstantColorShader(0.0, 0.0, 0.0, 1.0)
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -37,29 +37,29 @@ import ctypes
import re import re
#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */ #define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */
FRIBIDI_PAR_ON = 0x00000040 FRIBIDI_PAR_ON = 0x00000040
#define FRIBIDI_FLAG_SHAPE_MIRRORING 0x00000001 #define FRIBIDI_FLAG_SHAPE_MIRRORING 0x00000001
#define FRIBIDI_FLAG_REORDER_NSM 0x00000002 #define FRIBIDI_FLAG_REORDER_NSM 0x00000002
#define FRIBIDI_FLAG_SHAPE_ARAB_PRES 0x00000100 #define FRIBIDI_FLAG_SHAPE_ARAB_PRES 0x00000100
#define FRIBIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200 #define FRIBIDI_FLAG_SHAPE_ARAB_LIGA 0x00000200
#define FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400 #define FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE 0x00000400
#define FRIBIDI_FLAG_REMOVE_BIDI 0x00010000 #define FRIBIDI_FLAG_REMOVE_BIDI 0x00010000
#define FRIBIDI_FLAG_REMOVE_JOINING 0x00020000 #define FRIBIDI_FLAG_REMOVE_JOINING 0x00020000
#define FRIBIDI_FLAG_REMOVE_SPECIALS 0x00040000 #define FRIBIDI_FLAG_REMOVE_SPECIALS 0x00040000
#define FRIBIDI_FLAGS_DEFAULT ( \ #define FRIBIDI_FLAGS_DEFAULT ( \
# FRIBIDI_FLAG_SHAPE_MIRRORING | \ # FRIBIDI_FLAG_SHAPE_MIRRORING | \
# FRIBIDI_FLAG_REORDER_NSM | \ # FRIBIDI_FLAG_REORDER_NSM | \
# FRIBIDI_FLAG_REMOVE_SPECIALS ) # FRIBIDI_FLAG_REMOVE_SPECIALS )
#define FRIBIDI_FLAGS_ARABIC ( \ #define FRIBIDI_FLAGS_ARABIC ( \
# FRIBIDI_FLAG_SHAPE_ARAB_PRES | \ # FRIBIDI_FLAG_SHAPE_ARAB_PRES | \
# FRIBIDI_FLAG_SHAPE_ARAB_LIGA ) # FRIBIDI_FLAG_SHAPE_ARAB_LIGA )
FRIBIDI_FLAG_SHAPE_MIRRORING = 0x00000001 FRIBIDI_FLAG_SHAPE_MIRRORING = 0x00000001
FRIBIDI_FLAG_REORDER_NSM = 0x00000002 FRIBIDI_FLAG_REORDER_NSM = 0x00000002

View File

@@ -542,7 +542,7 @@ def BuildRNAInfo():
# Use for faster lookups # Use for faster lookups
# use rna_struct.identifier as the key for each dict # use rna_struct.identifier as the key for each dict
rna_struct_dict = {} # store identifier:rna lookups rna_struct_dict = {} # store identifier:rna lookups
rna_full_path_dict = {} # store the result of full_rna_struct_path(rna_struct) rna_full_path_dict = {} # store the result of full_rna_struct_path(rna_struct)
rna_children_dict = {} # store all rna_structs nested from here rna_children_dict = {} # store all rna_structs nested from here
rna_references_dict = {} # store a list of rna path strings that reference this type rna_references_dict = {} # store a list of rna path strings that reference this type
# rna_functions_dict = {} # store all functions directly in this type (not inherited) # rna_functions_dict = {} # store all functions directly in this type (not inherited)

View File

@@ -3166,7 +3166,7 @@ def km_grease_pencil_stroke_paint_draw_brush(params):
("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, ("gpencil.draw", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}), {"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
# Constrain Guides Speedlines # Constrain Guides Speedlines
# Freehand # Freehand
("gpencil.draw", {"type": 'O', "value": 'PRESS'}, None), ("gpencil.draw", {"type": 'O', "value": 'PRESS'}, None),
("gpencil.draw", {"type": 'J', "value": 'PRESS'}, None), ("gpencil.draw", {"type": 'J', "value": 'PRESS'}, None),
("gpencil.draw", {"type": 'J', "value": 'PRESS', "alt": True}, None), ("gpencil.draw", {"type": 'J', "value": 'PRESS', "alt": True}, None),
@@ -3178,11 +3178,11 @@ def km_grease_pencil_stroke_paint_draw_brush(params):
("gpencil.draw", {"type": 'L', "value": 'PRESS', "alt": True}, None), ("gpencil.draw", {"type": 'L', "value": 'PRESS', "alt": True}, None),
("gpencil.draw", {"type": 'L', "value": 'PRESS', "ctrl": True}, None), ("gpencil.draw", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
("gpencil.draw", {"type": 'V', "value": 'PRESS'}, None), ("gpencil.draw", {"type": 'V', "value": 'PRESS'}, None),
# Mirror or flip # Mirror or flip
("gpencil.draw", {"type": 'M', "value": 'PRESS'}, None), ("gpencil.draw", {"type": 'M', "value": 'PRESS'}, None),
# Mode # Mode
("gpencil.draw", {"type": 'C', "value": 'PRESS'}, None), ("gpencil.draw", {"type": 'C', "value": 'PRESS'}, None),
# Set reference point # Set reference point
("gpencil.draw", {"type": 'C', "value": 'PRESS', "alt": True}, None), ("gpencil.draw", {"type": 'C', "value": 'PRESS', "alt": True}, None),
# Tablet Mappings for Drawing ------------------ */ # Tablet Mappings for Drawing ------------------ */
# For now, only support direct drawing using the eraser, as most users using a tablet # For now, only support direct drawing using the eraser, as most users using a tablet

View File

@@ -20,7 +20,7 @@
from bpy.types import Menu from bpy.types import Menu
from bpy.app.translations import contexts as i18n_contexts from bpy.app.translations import contexts as i18n_contexts
class MASK_MT_add(Menu): class MASK_MT_add(Menu):
bl_idname = "MASK_MT_add" bl_idname = "MASK_MT_add"

View File

@@ -670,9 +670,9 @@ class AddPresetGpencilMaterial(AddPresetBase, Operator):
"gpcolor.stroke_image", "gpcolor.stroke_image",
"gpcolor.pixel_size", "gpcolor.pixel_size",
"gpcolor.use_stroke_pattern", "gpcolor.use_stroke_pattern",
"gpcolor.use_stroke_texture_mix", "gpcolor.use_stroke_texture_mix",
"gpcolor.mix_stroke_factor", "gpcolor.mix_stroke_factor",
"gpcolor.alignment_mode", "gpcolor.alignment_mode",
"gpcolor.fill_style", "gpcolor.fill_style",
"gpcolor.fill_color", "gpcolor.fill_color",
"gpcolor.fill_image", "gpcolor.fill_image",

View File

@@ -55,10 +55,10 @@ def pointInTri2D(v, v1, v2, v3):
x= key[i] x= key[i]
y= key[i+1] y= key[i+1]
if xmax<x: xmax= x if xmax<x: xmax= x
if ymax<y: ymax= y if ymax<y: ymax= y
if xmin>x: xmin= x if xmin>x: xmin= x
if ymin>y: ymin= y if ymin>y: ymin= y
x= v.x x= v.x
y= v.y y= v.y
@@ -169,7 +169,7 @@ def island2Edge(island):
# Its okay to leave the length in there. # Its okay to leave the length in there.
# for e in length_sorted_edges: # for e in length_sorted_edges:
# e.pop(2) # e.pop(2)
# return edges and unique points # return edges and unique points
return length_sorted_edges, [v.to_3d() for v in unique_points.values()] return length_sorted_edges, [v.to_3d() for v in unique_points.values()]
@@ -410,7 +410,7 @@ def mergeUvIslands(islandList):
elif Intersect == 0: # No intersection?? Place it. elif Intersect == 0: # No intersection?? Place it.
# Progress # Progress
removedCount += 1 removedCount += 1
# XXX Window.DrawProgressBar(0.0, 'Merged: %i islands, Ctrl to finish early.' % removedCount) # XXX Window.DrawProgressBar(0.0, 'Merged: %i islands, Ctrl to finish early.' % removedCount)
# Move faces into new island and offset # Move faces into new island and offset
targetIsland[0].extend(sourceIsland[0]) targetIsland[0].extend(sourceIsland[0])
@@ -485,7 +485,7 @@ def getUvIslands(faceGroups, me):
islandList = [] islandList = []
# XXX Window.DrawProgressBar(0.0, 'Splitting %d projection groups into UV islands:' % len(faceGroups)) # XXX Window.DrawProgressBar(0.0, 'Splitting %d projection groups into UV islands:' % len(faceGroups))
# print '\tSplitting %d projection groups into UV islands:' % len(faceGroups), # print '\tSplitting %d projection groups into UV islands:' % len(faceGroups),
# Find grouped faces # Find grouped faces
@@ -552,7 +552,7 @@ def getUvIslands(faceGroups, me):
break break
# if not ok will stop looping # if not ok will stop looping
# XXX Window.DrawProgressBar(0.1, 'Optimizing Rotation for %i UV Islands' % len(islandList)) # XXX Window.DrawProgressBar(0.1, 'Optimizing Rotation for %i UV Islands' % len(islandList))
for island in islandList: for island in islandList:
optiRotateUvIsland(island) optiRotateUvIsland(island)
@@ -562,7 +562,7 @@ def getUvIslands(faceGroups, me):
def packIslands(islandList): def packIslands(islandList):
if USER_FILL_HOLES: if USER_FILL_HOLES:
# XXX Window.DrawProgressBar(0.1, 'Merging Islands (Ctrl: skip merge)...') # XXX Window.DrawProgressBar(0.1, 'Merging Islands (Ctrl: skip merge)...')
mergeUvIslands(islandList) # Modify in place mergeUvIslands(islandList) # Modify in place
# Now we have UV islands, we need to pack them. # Now we have UV islands, we need to pack them.
@@ -611,18 +611,18 @@ def packIslands(islandList):
# with the islands. # with the islands.
# print '\tPacking UV Islands...' # print '\tPacking UV Islands...'
# XXX Window.DrawProgressBar(0.7, "Packing %i UV Islands..." % len(packBoxes) ) # XXX Window.DrawProgressBar(0.7, "Packing %i UV Islands..." % len(packBoxes) )
# time1 = time.time() # time1 = time.time()
packWidth, packHeight = geometry.box_pack_2d(packBoxes) packWidth, packHeight = geometry.box_pack_2d(packBoxes)
# print 'Box Packing Time:', time.time() - time1 # print 'Box Packing Time:', time.time() - time1
# if len(pa ckedLs) != len(islandList): # if len(packedLs) != len(islandList):
# raise ValueError("Packed boxes differs from original length") # raise ValueError("Packed boxes differs from original length")
# print '\tWriting Packed Data to faces' # print '\tWriting Packed Data to faces'
# XXX Window.DrawProgressBar(0.8, "Writing Packed Data to faces") # XXX Window.DrawProgressBar(0.8, "Writing Packed Data to faces")
# Sort by ID, so there in sync again # Sort by ID, so there in sync again
islandIdx = len(islandList) islandIdx = len(islandList)

View File

@@ -127,7 +127,7 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
row = layout.row() row = layout.row()
layer_rows = 7 layer_rows = 7
col = row.column() col = row.column()
col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index", col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
rows=layer_rows, sort_reverse=True, sort_lock=True) rows=layer_rows, sort_reverse=True, sort_lock=True)
@@ -152,13 +152,13 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
sub = col.column(align=True) sub = col.column(align=True)
sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
# Layer main properties # Layer main properties
row = layout.row() row = layout.row()
col = layout.column(align=True) col = layout.column(align=True)
if gpl: if gpl:
layout = self.layout layout = self.layout
layout.use_property_split = True layout.use_property_split = True
layout.use_property_decorate = True layout.use_property_decorate = True

View File

@@ -459,6 +459,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
col.operator("mesh.vertex_color_add", icon='ADD', text="") col.operator("mesh.vertex_color_add", icon='ADD', text="")
col.operator("mesh.vertex_color_remove", icon='REMOVE', text="") col.operator("mesh.vertex_color_remove", icon='REMOVE', text="")
class DATA_PT_remesh(MeshButtonsPanel, Panel): class DATA_PT_remesh(MeshButtonsPanel, Panel):
bl_label = "Remesh" bl_label = "Remesh"
bl_options = {'DEFAULT_CLOSED'} bl_options = {'DEFAULT_CLOSED'}

View File

@@ -1783,7 +1783,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.label(text="Material:") col.label(text="Material:")
row = col.row(align=True) row = col.row(align=True)
row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE') row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE')
row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT') row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT')
row = layout.row(align=True) row = layout.row(align=True)

View File

@@ -604,10 +604,10 @@ class GPENCIL_MT_move_to_layer(Menu):
while(i >= 0): while(i >= 0):
gpl = gpd.layers[i] gpl = gpd.layers[i]
if gpl.info == gpl_active.info: if gpl.info == gpl_active.info:
icon='GREASEPENCIL' icon = 'GREASEPENCIL'
else: else:
icon = 'NONE' icon = 'NONE'
layout.operator("gpencil.move_to_layer", text=gpl.info, icon=icon).layer=i layout.operator("gpencil.move_to_layer", text=gpl.info, icon=icon).layer = i
i -= 1 i -= 1
layout.separator() layout.separator()
@@ -640,7 +640,7 @@ class GPENCIL_MT_cleanup(Menu):
if ob.mode != 'PAINT_GPENCIL': if ob.mode != 'PAINT_GPENCIL':
layout.operator("gpencil.stroke_merge_by_distance", text="Merge by Distance") layout.operator("gpencil.stroke_merge_by_distance", text="Merge by Distance")
layout.separator() layout.separator()
layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes").mode = 'ACTIVE' layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes").mode = 'ACTIVE'

View File

@@ -48,6 +48,7 @@ class GPENCIL_MT_color_context_menu(Menu):
layout.operator("object.material_slot_remove_unused") layout.operator("object.material_slot_remove_unused")
class GPENCIL_UL_matslots(UIList): class GPENCIL_UL_matslots(UIList):
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index): def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
slot = item slot = item
@@ -164,6 +165,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
if gpcolor.mode == 'LINE' and gpcolor.stroke_style != 'TEXTURE': if gpcolor.mode == 'LINE' and gpcolor.stroke_style != 'TEXTURE':
col.prop(gpcolor, "use_overlap_strokes") col.prop(gpcolor, "use_overlap_strokes")
class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
bl_label = "Fill" bl_label = "Fill"
bl_parent_id = 'MATERIAL_PT_gpencil_surface' bl_parent_id = 'MATERIAL_PT_gpencil_surface'
@@ -274,7 +276,8 @@ class MATERIAL_PT_gpencil_material_presets(PresetPanel, Panel):
preset_add_operator = "scene.gpencil_material_preset_add" preset_add_operator = "scene.gpencil_material_preset_add"
classes = (GPENCIL_UL_matslots, classes = (
GPENCIL_UL_matslots,
GPENCIL_MT_color_context_menu, GPENCIL_MT_color_context_menu,
MATERIAL_PT_gpencil_slots, MATERIAL_PT_gpencil_slots,
MATERIAL_PT_gpencil_preview, MATERIAL_PT_gpencil_preview,
@@ -283,7 +286,8 @@ classes = (GPENCIL_UL_matslots,
MATERIAL_PT_gpencil_strokecolor, MATERIAL_PT_gpencil_strokecolor,
MATERIAL_PT_gpencil_fillcolor, MATERIAL_PT_gpencil_fillcolor,
MATERIAL_PT_gpencil_options, MATERIAL_PT_gpencil_options,
MATERIAL_PT_gpencil_custom_props,) MATERIAL_PT_gpencil_custom_props,
)
if __name__ == "__main__": # only for live edit. if __name__ == "__main__": # only for live edit.
from bpy.utils import register_class from bpy.utils import register_class

View File

@@ -1257,14 +1257,14 @@ class CLIP_MT_view(Menu):
layout.operator("clip.view_all", text="View Fit").fit_view = True layout.operator("clip.view_all", text="View Fit").fit_view = True
layout.separator() layout.separator()
layout.operator("clip.view_zoom_in") layout.operator("clip.view_zoom_in")
layout.operator("clip.view_zoom_out") layout.operator("clip.view_zoom_out")
layout.separator() layout.separator()
layout.prop(sc, "show_metadata") layout.prop(sc, "show_metadata")
layout.separator() layout.separator()
layout.menu("CLIP_MT_view_zoom") layout.menu("CLIP_MT_view_zoom")

View File

@@ -125,6 +125,7 @@ class CONSOLE_MT_console(Menu):
layout.operator("console.autocomplete", text="Autocomplete") layout.operator("console.autocomplete", text="Autocomplete")
class CONSOLE_MT_context_menu(Menu): class CONSOLE_MT_context_menu(Menu):
bl_label = "Console Context Menu" bl_label = "Console Context Menu"

View File

@@ -450,7 +450,7 @@ class FILEBROWSER_MT_select(Menu):
layout.separator() layout.separator()
layout.operator("file.select_box") layout.operator("file.select_box")
class FILEBROWSER_MT_context_menu(Menu): class FILEBROWSER_MT_context_menu(Menu):
bl_label = "Files Context Menu" bl_label = "Files Context Menu"

View File

@@ -113,6 +113,7 @@ class INFO_MT_context_menu(Menu):
layout.operator("info.report_copy", text="Copy") layout.operator("info.report_copy", text="Copy")
layout.operator("info.report_delete", text="Delete") layout.operator("info.report_delete", text="Delete")
classes = ( classes = (
INFO_HT_header, INFO_HT_header,
INFO_MT_editor_menus, INFO_MT_editor_menus,

View File

@@ -998,10 +998,11 @@ class _defs_sculpt:
label="Mesh Filter", label="Mesh Filter",
icon="ops.sculpt.mesh_filter", icon="ops.sculpt.mesh_filter",
widget=None, widget=None,
keymap= (), keymap=(),
draw_settings=draw_settings, draw_settings=draw_settings,
) )
class _defs_vertex_paint: class _defs_vertex_paint:
@staticmethod @staticmethod

View File

@@ -605,7 +605,7 @@ class VIEW3D_HT_header(Header):
row.prop(tool_settings, "gpencil_selectmode_edit", text="", expand=True) row.prop(tool_settings, "gpencil_selectmode_edit", text="", expand=True)
# Select mode for Sculpt # Select mode for Sculpt
if gpd.is_stroke_sculpt_mode : if gpd.is_stroke_sculpt_mode:
row = layout.row(align=True) row = layout.row(align=True)
row.prop(tool_settings, "use_gpencil_select_mask_point", text="") row.prop(tool_settings, "use_gpencil_select_mask_point", text="")
row.prop(tool_settings, "use_gpencil_select_mask_stroke", text="") row.prop(tool_settings, "use_gpencil_select_mask_stroke", text="")
@@ -2654,7 +2654,6 @@ class VIEW3D_MT_make_links(Menu):
layout.operator("object.join_uvs") # stupid place to add this! layout.operator("object.join_uvs") # stupid place to add this!
class VIEW3D_MT_brush_paint_modes(Menu): class VIEW3D_MT_brush_paint_modes(Menu):
bl_label = "Enabled Modes" bl_label = "Enabled Modes"
@@ -2849,27 +2848,27 @@ class VIEW3D_MT_sculpt(Menu):
props = layout.operator("sculpt.mask_filter", text='Smooth Mask') props = layout.operator("sculpt.mask_filter", text='Smooth Mask')
props.filter_type = 'SMOOTH' props.filter_type = 'SMOOTH'
props.auto_iteration_count = True; props.auto_iteration_count = True
props = layout.operator("sculpt.mask_filter", text='Sharpen Mask') props = layout.operator("sculpt.mask_filter", text='Sharpen Mask')
props.filter_type = 'SHARPEN' props.filter_type = 'SHARPEN'
props.auto_iteration_count = True; props.auto_iteration_count = True
props = layout.operator("sculpt.mask_filter", text='Grow Mask') props = layout.operator("sculpt.mask_filter", text='Grow Mask')
props.filter_type = 'GROW' props.filter_type = 'GROW'
props.auto_iteration_count = True; props.auto_iteration_count = True
props = layout.operator("sculpt.mask_filter", text='Shrink Mask') props = layout.operator("sculpt.mask_filter", text='Shrink Mask')
props.filter_type = 'SHRINK' props.filter_type = 'SHRINK'
props.auto_iteration_count = True; props.auto_iteration_count = True
props = layout.operator("sculpt.mask_filter", text='Increase Contrast') props = layout.operator("sculpt.mask_filter", text='Increase Contrast')
props.filter_type = 'CONTRAST_INCREASE' props.filter_type = 'CONTRAST_INCREASE'
props.auto_iteration_count = False; props.auto_iteration_count = False
props = layout.operator("sculpt.mask_filter", text='Decrease Contrast') props = layout.operator("sculpt.mask_filter", text='Decrease Contrast')
props.filter_type = 'CONTRAST_DECREASE' props.filter_type = 'CONTRAST_DECREASE'
props.auto_iteration_count = False; props.auto_iteration_count = False
layout.separator() layout.separator()
@@ -4813,6 +4812,7 @@ class VIEW3D_MT_proportional_editing_falloff_pie(Menu):
pie.prop(tool_settings, "proportional_edit_falloff", expand=True) pie.prop(tool_settings, "proportional_edit_falloff", expand=True)
class VIEW3D_MT_sculpt_mask_edit_pie(Menu): class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
bl_label = "Mask Edit" bl_label = "Mask Edit"
@@ -4826,22 +4826,22 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
op.mode = 'VALUE' op.mode = 'VALUE'
op = pie.operator("sculpt.mask_filter", text='Smooth Mask') op = pie.operator("sculpt.mask_filter", text='Smooth Mask')
op.filter_type = 'SMOOTH' op.filter_type = 'SMOOTH'
op.auto_iteration_count = True; op.auto_iteration_count = True
op = pie.operator("sculpt.mask_filter", text='Sharpen Mask') op = pie.operator("sculpt.mask_filter", text='Sharpen Mask')
op.filter_type = 'SHARPEN' op.filter_type = 'SHARPEN'
op.auto_iteration_count = True; op.auto_iteration_count = True
op = pie.operator("sculpt.mask_filter", text='Grow Mask') op = pie.operator("sculpt.mask_filter", text='Grow Mask')
op.filter_type = 'GROW' op.filter_type = 'GROW'
op.auto_iteration_count = True; op.auto_iteration_count = True
op = pie.operator("sculpt.mask_filter", text='Shrink Mask') op = pie.operator("sculpt.mask_filter", text='Shrink Mask')
op.filter_type = 'SHRINK' op.filter_type = 'SHRINK'
op.auto_iteration_count = True; op.auto_iteration_count = True
op = pie.operator("sculpt.mask_filter", text='Increase Contrast') op = pie.operator("sculpt.mask_filter", text='Increase Contrast')
op.filter_type = 'CONTRAST_INCREASE' op.filter_type = 'CONTRAST_INCREASE'
op.auto_iteration_count = False; op.auto_iteration_count = False
op = pie.operator("sculpt.mask_filter", text='Decrease Contrast') op = pie.operator("sculpt.mask_filter", text='Decrease Contrast')
op.filter_type = 'CONTRAST_DECREASE' op.filter_type = 'CONTRAST_DECREASE'
op.auto_iteration_count = False; op.auto_iteration_count = False
# ********** Panel ********** # ********** Panel **********

View File

@@ -1158,6 +1158,7 @@ class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
col = flow.column() col = flow.column()
col.operator("sculpt.detail_flood_fill") col.operator("sculpt.detail_flood_fill")
class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
bl_context = ".sculpt_mode" # dot on purpose (access from topbar) bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Remesh" bl_label = "Remesh"
@@ -1191,6 +1192,7 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
# TODO, move to space_view3d.py # TODO, move to space_view3d.py
class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
bl_context = ".sculpt_mode" # dot on purpose (access from topbar) bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Options" bl_label = "Options"

View File

@@ -126,4 +126,4 @@ void EEVEE_random_rotation_m4(int sample_ofs, float scale, float r_mat[4][4])
rotate_m4(r_mat, 'X', ht_point[0] * scale); rotate_m4(r_mat, 'X', ht_point[0] * scale);
rotate_m4(r_mat, 'Y', ht_point[1] * scale); rotate_m4(r_mat, 'Y', ht_point[1] * scale);
rotate_m4(r_mat, 'Z', ht_point[2] * scale); rotate_m4(r_mat, 'Z', ht_point[2] * scale);
} }

View File

@@ -409,4 +409,4 @@ void EEVEE_shadows_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, DRWView
void EEVEE_shadows_free(void) void EEVEE_shadows_free(void)
{ {
DRW_SHADER_FREE_SAFE(e_data.shadow_sh); DRW_SHADER_FREE_SAFE(e_data.shadow_sh);
} }

View File

@@ -436,4 +436,4 @@ void EEVEE_shadows_draw_cascades(EEVEE_ViewLayerData *sldata,
GPU_framebuffer_clear_depth(sldata->shadow_fb, 1.0f); GPU_framebuffer_clear_depth(sldata->shadow_fb, 1.0f);
DRW_draw_pass(psl->shadow_pass); DRW_draw_pass(psl->shadow_pass);
} }
} }

View File

@@ -8,4 +8,4 @@ void main()
#ifdef USE_WORLD_CLIP_PLANES #ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance(world_pos); world_clip_planes_calc_clip_distance(world_pos);
#endif #endif
} }

View File

@@ -133,8 +133,10 @@ seek(bpy.data, 'bpy.data', 0)
''' '''
for d in dir(bpy.types): for d in dir(bpy.types):
t = getattr(bpy.types, d) t = getattr(bpy.types, d)
try: r = t.bl_rna try:
except: r = None r = t.bl_rna
except:
r = None
if r: if r:
seek(r, 'bpy.types.' + d + '.bl_rna', 0) seek(r, 'bpy.types.' + d + '.bl_rna', 0)
''' '''