mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
Cleanup: remove unused functions, imports
This commit is contained in:
parent
3091dadfeb
commit
444f1064c9
11 changed files with 2 additions and 64 deletions
|
@ -651,20 +651,6 @@ def undocumented_message(module_name, type_name, identifier):
|
|||
return "Undocumented, consider `contributing <https://developer.blender.org/>`__."
|
||||
|
||||
|
||||
def range_str(val):
|
||||
"""
|
||||
Converts values to strings for the range directive.
|
||||
(unused function it seems)
|
||||
"""
|
||||
if val < -10000000:
|
||||
return "-inf"
|
||||
if val > 10000000:
|
||||
return "inf"
|
||||
if type(val) == float:
|
||||
return "{:g}".format(val)
|
||||
return str(val)
|
||||
|
||||
|
||||
def example_extract_docstring(filepath):
|
||||
"""
|
||||
Return (text, line_no, line_no_has_content) where:
|
||||
|
|
|
@ -12,7 +12,6 @@ expanding an operator into a menu.
|
|||
|
||||
|
||||
def main():
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
|
||||
def dummy_func(_test):
|
||||
|
|
|
@ -22,6 +22,7 @@ __all__ = (
|
|||
"app_template_paths",
|
||||
"register_class",
|
||||
"register_cli_command",
|
||||
"time_from_frame",
|
||||
"unregister_cli_command",
|
||||
"register_manual_map",
|
||||
"unregister_manual_map",
|
||||
|
|
|
@ -39,11 +39,6 @@ def eevee_shader_nodes_poll(context):
|
|||
return context.engine == 'BLENDER_EEVEE_NEXT'
|
||||
|
||||
|
||||
def object_cycles_shader_nodes_poll(context):
|
||||
return (object_shader_nodes_poll(context) and
|
||||
cycles_shader_nodes_poll(context))
|
||||
|
||||
|
||||
def object_not_eevee_shader_nodes_poll(context):
|
||||
return (object_shader_nodes_poll(context) and
|
||||
not eevee_shader_nodes_poll(context))
|
||||
|
|
|
@ -562,29 +562,6 @@ class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
|
|||
_property_type = bpy.types.Camera
|
||||
|
||||
|
||||
def draw_display_safe_settings(layout, safe_data, settings):
|
||||
show_safe_areas = settings.show_safe_areas
|
||||
show_safe_center = settings.show_safe_center
|
||||
|
||||
layout.use_property_split = True
|
||||
|
||||
col = layout.column()
|
||||
col.active = show_safe_areas
|
||||
|
||||
sub = col.column()
|
||||
sub.prop(safe_data, "title", slider=True)
|
||||
sub.prop(safe_data, "action", slider=True)
|
||||
|
||||
col.separator()
|
||||
|
||||
col.prop(settings, "show_safe_center", text="Center-Cut Safe Areas")
|
||||
|
||||
sub = col.column()
|
||||
sub.active = show_safe_areas and show_safe_center
|
||||
sub.prop(safe_data, "title_center", slider=True)
|
||||
sub.prop(safe_data, "action_center", slider=True)
|
||||
|
||||
|
||||
classes = (
|
||||
CAMERA_PT_presets,
|
||||
CAMERA_PT_safe_areas_presets,
|
||||
|
|
|
@ -1041,10 +1041,6 @@ class NODE_PT_annotation(AnnotationDataPanel, Panel):
|
|||
return snode is not None and snode.node_tree is not None
|
||||
|
||||
|
||||
def node_draw_tree_view(_layout, _context):
|
||||
pass
|
||||
|
||||
|
||||
# Adapt properties editor panel to display in node editor. We have to
|
||||
# copy the class rather than inherit due to the way bpy registration works.
|
||||
def node_panel(cls):
|
||||
|
|
|
@ -593,7 +593,6 @@ def spell_check_file_recursive(
|
|||
extract_type: str = 'COMMENTS',
|
||||
cache_data: CacheData | None = None,
|
||||
) -> None:
|
||||
import os
|
||||
from os.path import join
|
||||
|
||||
def source_list(
|
||||
|
@ -780,8 +779,6 @@ def argparse_create() -> argparse.ArgumentParser:
|
|||
def main() -> int:
|
||||
global _suggest_map
|
||||
|
||||
import os
|
||||
|
||||
args = argparse_create().parse_args()
|
||||
|
||||
regex_list = []
|
||||
|
|
|
@ -27,7 +27,6 @@ __all__ = (
|
|||
)
|
||||
|
||||
import gdb
|
||||
import functools
|
||||
from contextlib import contextmanager
|
||||
from gdb.FrameDecorator import FrameDecorator
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ class BlendFile:
|
|||
fields_len = d[1]
|
||||
dna_offset = 0
|
||||
|
||||
for field_index in range(fields_len):
|
||||
for _field_index in range(fields_len):
|
||||
d2 = shortstruct2.unpack_from(data, offset)
|
||||
field_type_index = d2[0]
|
||||
field_name_index = d2[1]
|
||||
|
|
|
@ -100,8 +100,6 @@ def addr2line_fn(arg_pair: tuple[tuple[str, str, bool], Sequence[str]]) -> Seque
|
|||
|
||||
|
||||
def argparse_create() -> argparse.ArgumentParser:
|
||||
import argparse
|
||||
|
||||
# When `--help` or no arguments are given, print this help.
|
||||
epilog = "This is typically used from the output of a stack-trace on Linux/Unix."
|
||||
|
||||
|
|
|
@ -48,13 +48,3 @@ PATHS_EXCLUDE: set[str] = set(
|
|||
"scripts/modules/rna_manual_reference.py",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def files(path: str, test_fn: Callable[[str], bool]) -> Iterator[str]:
|
||||
for dirpath, dirnames, filenames in os.walk(path):
|
||||
# skip '.git'
|
||||
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
|
||||
for filename in filenames:
|
||||
if test_fn(filename):
|
||||
filepath = os.path.join(dirpath, filename)
|
||||
yield filepath
|
||||
|
|
Loading…
Reference in a new issue