cleanup: pep8
also remove empty class parenthesis
This commit is contained in:
@@ -17,6 +17,7 @@ modification time, we hack the class a bit in order to have such functionaliity
|
|||||||
|
|
||||||
from buildbot.status.web.base import DirectoryLister
|
from buildbot.status.web.base import DirectoryLister
|
||||||
|
|
||||||
|
|
||||||
def get_files_and_directories(self, directory):
|
def get_files_and_directories(self, directory):
|
||||||
from twisted.web.static import (getTypeAndEncoding,
|
from twisted.web.static import (getTypeAndEncoding,
|
||||||
formatFileSize)
|
formatFileSize)
|
||||||
@@ -97,6 +98,7 @@ all_repositories = {
|
|||||||
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def codebaseGenerator(chdict):
|
def codebaseGenerator(chdict):
|
||||||
return all_repositories[chdict['repository']]
|
return all_repositories[chdict['repository']]
|
||||||
|
|
||||||
@@ -112,6 +114,7 @@ from buildbot.schedulers import timed, forcesched
|
|||||||
|
|
||||||
c['schedulers'] = []
|
c['schedulers'] = []
|
||||||
|
|
||||||
|
|
||||||
def schedule_force_build(name):
|
def schedule_force_build(name):
|
||||||
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
|
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
|
||||||
builderNames=[name],
|
builderNames=[name],
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ def strip_extension(filename):
|
|||||||
|
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
|
||||||
# extract platform from package name
|
# extract platform from package name
|
||||||
def get_platform(filename):
|
def get_platform(filename):
|
||||||
# name is blender-version-platform.extension. we want to get the
|
# name is blender-version-platform.extension. we want to get the
|
||||||
@@ -64,6 +65,7 @@ def get_platform(filename):
|
|||||||
|
|
||||||
return '-'.join(platform_tokens)
|
return '-'.join(platform_tokens)
|
||||||
|
|
||||||
|
|
||||||
def get_branch(filename):
|
def get_branch(filename):
|
||||||
tokens = filename.split("-")
|
tokens = filename.split("-")
|
||||||
branch = ""
|
branch = ""
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ if builder.find('scons') != -1:
|
|||||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||||
sys.exit(retcode)
|
sys.exit(retcode)
|
||||||
else:
|
else:
|
||||||
#cmake
|
# CMake
|
||||||
if 'win' in builder:
|
if 'win' in builder:
|
||||||
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
||||||
for f in files:
|
for f in files:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ A mix-in parent class can be used to share common properties and
|
|||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
class View3DPanel():
|
class View3DPanel:
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import argparse
|
import argparse
|
||||||
except:
|
except ImportError:
|
||||||
print("Old Blender, just dumping")
|
print("Old Blender, just dumping")
|
||||||
api_dump()
|
api_dump()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ def with_network():
|
|||||||
import _cycles
|
import _cycles
|
||||||
return _cycles.with_network
|
return _cycles.with_network
|
||||||
|
|
||||||
|
|
||||||
def system_info():
|
def system_info():
|
||||||
import _cycles
|
import _cycles
|
||||||
return _cycles.system_info()
|
return _cycles.system_info()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class CYCLES_MT_integrator_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class CyclesButtonsPanel():
|
class CyclesButtonsPanel:
|
||||||
bl_space_type = "PROPERTIES"
|
bl_space_type = "PROPERTIES"
|
||||||
bl_region_type = "WINDOW"
|
bl_region_type = "WINDOW"
|
||||||
bl_context = "render"
|
bl_context = "render"
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ def _gen_check_ctxt(settings):
|
|||||||
"spell_errors": {},
|
"spell_errors": {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _diff_check_ctxt(check_ctxt, minus_check_ctxt):
|
def _diff_check_ctxt(check_ctxt, minus_check_ctxt):
|
||||||
"""Returns check_ctxt - minus_check_ctxt"""
|
"""Returns check_ctxt - minus_check_ctxt"""
|
||||||
for key in check_ctxt:
|
for key in check_ctxt:
|
||||||
@@ -74,6 +75,7 @@ def _diff_check_ctxt(check_ctxt, minus_check_ctxt):
|
|||||||
if warning in check_ctxt[key]:
|
if warning in check_ctxt[key]:
|
||||||
del check_ctxt[key][warning]
|
del check_ctxt[key][warning]
|
||||||
|
|
||||||
|
|
||||||
def _gen_reports(check_ctxt):
|
def _gen_reports(check_ctxt):
|
||||||
return {
|
return {
|
||||||
"check_ctxt": check_ctxt,
|
"check_ctxt": check_ctxt,
|
||||||
@@ -473,7 +475,6 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
|
|||||||
|
|
||||||
return [_extract_string_merge(estr_ls, nds_ls) for estr_ls, nds_ls in bag]
|
return [_extract_string_merge(estr_ls, nds_ls) for estr_ls, nds_ls in bag]
|
||||||
|
|
||||||
|
|
||||||
i18n_ctxt_ids = {v for v in bpy.app.translations.contexts_C_to_py.values()}
|
i18n_ctxt_ids = {v for v in bpy.app.translations.contexts_C_to_py.values()}
|
||||||
def _ctxt_to_ctxt(node):
|
def _ctxt_to_ctxt(node):
|
||||||
# We must try, to some extend, to get contexts from vars instead of only literal strings...
|
# We must try, to some extend, to get contexts from vars instead of only literal strings...
|
||||||
|
|||||||
@@ -473,6 +473,7 @@ for p in set(INTERN_PY_SYS_PATHS.split(";")):
|
|||||||
def _do_get(ref, path):
|
def _do_get(ref, path):
|
||||||
return os.path.normpath(os.path.join(ref, path))
|
return os.path.normpath(os.path.join(ref, path))
|
||||||
|
|
||||||
|
|
||||||
def _do_set(ref, path):
|
def _do_set(ref, path):
|
||||||
path = os.path.normpath(path)
|
path = os.path.normpath(path)
|
||||||
# If given path is absolute, make it relative to current ref one (else we consider it is already the case!)
|
# If given path is absolute, make it relative to current ref one (else we consider it is already the case!)
|
||||||
@@ -484,6 +485,7 @@ def _do_set(ref, path):
|
|||||||
pass
|
pass
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
def _gen_get_set_path(ref, name):
|
def _gen_get_set_path(ref, name):
|
||||||
def _get(self):
|
def _get(self):
|
||||||
return _do_get(getattr(self, ref), getattr(self, name))
|
return _do_get(getattr(self, ref), getattr(self, name))
|
||||||
@@ -491,6 +493,7 @@ def _gen_get_set_path(ref, name):
|
|||||||
setattr(self, name, _do_set(getattr(self, ref), value))
|
setattr(self, name, _do_set(getattr(self, ref), value))
|
||||||
return _get, _set
|
return _get, _set
|
||||||
|
|
||||||
|
|
||||||
def _gen_get_set_paths(ref, name):
|
def _gen_get_set_paths(ref, name):
|
||||||
def _get(self):
|
def _get(self):
|
||||||
return [_do_get(getattr(self, ref), p) for p in getattr(self, name)]
|
return [_do_get(getattr(self, ref), p) for p in getattr(self, name)]
|
||||||
@@ -498,6 +501,7 @@ def _gen_get_set_paths(ref, name):
|
|||||||
setattr(self, name, [_do_set(getattr(self, ref), p) for p in value])
|
setattr(self, name, [_do_set(getattr(self, ref), p) for p in value])
|
||||||
return _get, _set
|
return _get, _set
|
||||||
|
|
||||||
|
|
||||||
class I18nSettings:
|
class I18nSettings:
|
||||||
"""
|
"""
|
||||||
Class allowing persistence of our settings!
|
Class allowing persistence of our settings!
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import pickle
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
class SpellChecker():
|
class SpellChecker:
|
||||||
"""
|
"""
|
||||||
A basic spell checker.
|
A basic spell checker.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ def keyconfig_export(wm, kc, filepath):
|
|||||||
# the default blender keyconfig, recreating the current setup from a fresh blender
|
# the default blender keyconfig, recreating the current setup from a fresh blender
|
||||||
# without needing to export keymaps which haven't been edited.
|
# without needing to export keymaps which haven't been edited.
|
||||||
|
|
||||||
class FakeKeyConfig():
|
class FakeKeyConfig:
|
||||||
keymaps = []
|
keymaps = []
|
||||||
edited_kc = FakeKeyConfig()
|
edited_kc = FakeKeyConfig()
|
||||||
for km in wm.keyconfigs.user.keymaps:
|
for km in wm.keyconfigs.user.keymaps:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ __all__ = (
|
|||||||
import bpy as _bpy
|
import bpy as _bpy
|
||||||
|
|
||||||
|
|
||||||
class _RestrictContext():
|
class _RestrictContext:
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
_real_data = _bpy.data
|
_real_data = _bpy.data
|
||||||
# safe, the pointer never changes
|
# safe, the pointer never changes
|
||||||
@@ -44,7 +44,7 @@ class _RestrictContext():
|
|||||||
return self._real_pref
|
return self._real_pref
|
||||||
|
|
||||||
|
|
||||||
class _RestrictData():
|
class _RestrictData:
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ _context_restrict = _RestrictContext()
|
|||||||
_data_restrict = _RestrictData()
|
_data_restrict = _RestrictData()
|
||||||
|
|
||||||
|
|
||||||
class RestrictBlend():
|
class RestrictBlend:
|
||||||
__slots__ = ("context", "data")
|
__slots__ = ("context", "data")
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ def _call_recursive(context, base, py_node):
|
|||||||
_call_recursive(context, base_new, py_node_child)
|
_call_recursive(context, base_new, py_node_child)
|
||||||
|
|
||||||
|
|
||||||
class BPyML_BaseUI():
|
class BPyML_BaseUI:
|
||||||
"""
|
"""
|
||||||
This is a mix-in class that defines a draw function
|
This is a mix-in class that defines a draw function
|
||||||
which checks for draw_data
|
which checks for draw_data
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
class NodeCategory():
|
class NodeCategory:
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return True
|
return True
|
||||||
@@ -42,7 +42,7 @@ class NodeCategory():
|
|||||||
self.items = items_gen
|
self.items = items_gen
|
||||||
|
|
||||||
|
|
||||||
class NodeItem():
|
class NodeItem:
|
||||||
def __init__(self, nodetype, label=None, settings={}, poll=None):
|
def __init__(self, nodetype, label=None, settings={}, poll=None):
|
||||||
self.nodetype = nodetype
|
self.nodetype = nodetype
|
||||||
self._label = label
|
self._label = label
|
||||||
@@ -73,7 +73,7 @@ class NodeItem():
|
|||||||
ops.value = setting[1]
|
ops.value = setting[1]
|
||||||
|
|
||||||
|
|
||||||
class NodeItemCustom():
|
class NodeItemCustom:
|
||||||
def __init__(self, poll=None, draw=None):
|
def __init__(self, poll=None, draw=None):
|
||||||
self.poll = poll
|
self.poll = poll
|
||||||
self.draw = draw
|
self.draw = draw
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
|
|||||||
assign_props(props, val_draw, key)
|
assign_props(props, val_draw, key)
|
||||||
|
|
||||||
|
|
||||||
class PropertyPanel():
|
class PropertyPanel:
|
||||||
"""
|
"""
|
||||||
The subclass should have its own poll function
|
The subclass should have its own poll function
|
||||||
and the variable '_context_path' MUST be set.
|
and the variable '_context_path' MUST be set.
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ def write_sysinfo(op):
|
|||||||
else:
|
else:
|
||||||
output.write("\nOpenGL\n")
|
output.write("\nOpenGL\n")
|
||||||
output.write(lilies)
|
output.write(lilies)
|
||||||
version = bgl.glGetString(bgl.GL_RENDERER);
|
version = bgl.glGetString(bgl.GL_RENDERER)
|
||||||
output.write("renderer:\t%r\n" % version)
|
output.write("renderer:\t%r\n" % version)
|
||||||
output.write("vendor:\t\t%r\n" % (bgl.glGetString(bgl.GL_VENDOR)))
|
output.write("vendor:\t\t%r\n" % (bgl.glGetString(bgl.GL_VENDOR)))
|
||||||
output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION)))
|
output.write("version:\t%r\n" % (bgl.glGetString(bgl.GL_VERSION)))
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class NodeSetting(PropertyGroup):
|
|||||||
|
|
||||||
|
|
||||||
# Base class for node 'Add' operators
|
# Base class for node 'Add' operators
|
||||||
class NodeAddOperator():
|
class NodeAddOperator:
|
||||||
|
|
||||||
type = StringProperty(
|
type = StringProperty(
|
||||||
name="Node Type",
|
name="Node Type",
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class SubdivisionSet(Operator):
|
|||||||
if not relative:
|
if not relative:
|
||||||
if level > mod.total_levels:
|
if level > mod.total_levels:
|
||||||
sub = level - mod.total_levels
|
sub = level - mod.total_levels
|
||||||
for i in range (0, sub):
|
for i in range(sub):
|
||||||
bpy.ops.object.multires_subdivide(modifier="Multires")
|
bpy.ops.object.multires_subdivide(modifier="Multires")
|
||||||
|
|
||||||
if obj.mode == 'SCULPT':
|
if obj.mode == 'SCULPT':
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ from bpy.types import Menu, Operator
|
|||||||
from bpy.props import StringProperty, BoolProperty
|
from bpy.props import StringProperty, BoolProperty
|
||||||
|
|
||||||
|
|
||||||
class AddPresetBase():
|
class AddPresetBase:
|
||||||
"""Base preset class, only for subclassing
|
"""Base preset class, only for subclassing
|
||||||
subclasses must define
|
subclasses must define
|
||||||
- preset_values
|
- preset_values
|
||||||
|
|||||||
@@ -176,8 +176,6 @@ class VertexPaintDirt(Operator):
|
|||||||
return (obj and obj.type == 'MESH')
|
return (obj and obj.type == 'MESH')
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
import time
|
|
||||||
|
|
||||||
obj = context.object
|
obj = context.object
|
||||||
mesh = obj.data
|
mesh = obj.data
|
||||||
|
|
||||||
|
|||||||
@@ -1988,7 +1988,6 @@ class WM_OT_addon_install(Operator):
|
|||||||
# if not compressed file just copy into the addon path
|
# if not compressed file just copy into the addon path
|
||||||
try:
|
try:
|
||||||
shutil.copyfile(pyfile, path_dest)
|
shutil.copyfile(pyfile, path_dest)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
# don't register these classes since they are only helpers.
|
# don't register these classes since they are only helpers.
|
||||||
|
|
||||||
|
|
||||||
class MotionPathButtonsPanel():
|
class MotionPathButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_label = "Motion Paths"
|
bl_label = "Motion Paths"
|
||||||
@@ -97,7 +97,7 @@ class MotionPathButtonsPanel():
|
|||||||
|
|
||||||
|
|
||||||
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
|
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
|
||||||
class OnionSkinButtonsPanel():
|
class OnionSkinButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_label = "Onion Skinning"
|
bl_label = "Onion Skinning"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
|
|
||||||
|
|
||||||
class ConstraintButtonsPanel():
|
class ConstraintButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "constraint"
|
bl_context = "constraint"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class ArmatureButtonsPanel():
|
class ArmatureButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ from bpy.types import Panel
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class BoneButtonsPanel():
|
class BoneButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "bone"
|
bl_context = "bone"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class CameraButtonsPanel():
|
class CameraButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
@@ -109,11 +109,11 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
|
|||||||
elif ccam.panorama_type == 'EQUIRECTANGULAR':
|
elif ccam.panorama_type == 'EQUIRECTANGULAR':
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
sub = row.column(align=True)
|
sub = row.column(align=True)
|
||||||
sub.prop(ccam, "latitude_min");
|
sub.prop(ccam, "latitude_min")
|
||||||
sub.prop(ccam, "latitude_max");
|
sub.prop(ccam, "latitude_max")
|
||||||
sub = row.column(align=True)
|
sub = row.column(align=True)
|
||||||
sub.prop(ccam, "longitude_min");
|
sub.prop(ccam, "longitude_min")
|
||||||
sub.prop(ccam, "longitude_max");
|
sub.prop(ccam, "longitude_max")
|
||||||
elif engine == 'BLENDER_RENDER':
|
elif engine == 'BLENDER_RENDER':
|
||||||
row = col.row()
|
row = col.row()
|
||||||
if cam.lens_unit == 'MILLIMETERS':
|
if cam.lens_unit == 'MILLIMETERS':
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ from rna_prop_ui import PropertyPanel
|
|||||||
from bpy.types import Curve, SurfaceCurve, TextCurve
|
from bpy.types import Curve, SurfaceCurve, TextCurve
|
||||||
|
|
||||||
|
|
||||||
class CurveButtonsPanel():
|
class CurveButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class LAMP_MT_sunsky_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ class MESH_UL_uvmaps_vcols(UIList):
|
|||||||
layout.label(text="", icon_value=icon)
|
layout.label(text="", icon_value=icon)
|
||||||
|
|
||||||
|
|
||||||
class MeshButtonsPanel():
|
class MeshButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel
|
|||||||
from bpy.app.translations import pgettext_iface as iface_
|
from bpy.app.translations import pgettext_iface as iface_
|
||||||
|
|
||||||
|
|
||||||
class ModifierButtonsPanel():
|
class ModifierButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "modifier"
|
bl_context = "modifier"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ from bpy.types import Menu, Panel, UIList
|
|||||||
|
|
||||||
# Render properties
|
# Render properties
|
||||||
|
|
||||||
class RenderFreestyleButtonsPanel():
|
class RenderFreestyleButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "render"
|
bl_context = "render"
|
||||||
@@ -62,7 +62,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
|
|||||||
|
|
||||||
# Render layer properties
|
# Render layer properties
|
||||||
|
|
||||||
class RenderLayerFreestyleButtonsPanel():
|
class RenderLayerFreestyleButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "render_layer"
|
bl_context = "render_layer"
|
||||||
@@ -701,7 +701,7 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
|||||||
|
|
||||||
# Material properties
|
# Material properties
|
||||||
|
|
||||||
class MaterialFreestyleButtonsPanel():
|
class MaterialFreestyleButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "material"
|
bl_context = "material"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel, Menu
|
from bpy.types import Panel, Menu
|
||||||
|
|
||||||
|
|
||||||
class PhysicsButtonsPanel():
|
class PhysicsButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
@@ -256,7 +256,7 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
|
|||||||
row.label()
|
row.label()
|
||||||
|
|
||||||
|
|
||||||
class RenderButtonsPanel():
|
class RenderButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "render"
|
bl_context = "render"
|
||||||
@@ -455,7 +455,7 @@ class RENDER_PT_game_display(RenderButtonsPanel, Panel):
|
|||||||
col.prop(gs, "frame_color", text="")
|
col.prop(gs, "frame_color", text="")
|
||||||
|
|
||||||
|
|
||||||
class SceneButtonsPanel():
|
class SceneButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "scene"
|
bl_context = "scene"
|
||||||
@@ -535,7 +535,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
|
|||||||
col.prop(scene, "audio_doppler_factor")
|
col.prop(scene, "audio_doppler_factor")
|
||||||
|
|
||||||
|
|
||||||
class WorldButtonsPanel():
|
class WorldButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "world"
|
bl_context = "world"
|
||||||
@@ -691,7 +691,7 @@ class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
|
|||||||
layout.prop(gs, "show_obstacle_simulation")
|
layout.prop(gs, "show_obstacle_simulation")
|
||||||
|
|
||||||
|
|
||||||
class DataButtonsPanel():
|
class DataButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "data"
|
bl_context = "data"
|
||||||
@@ -749,7 +749,7 @@ class DATA_PT_shadow_game(DataButtonsPanel, Panel):
|
|||||||
row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
|
row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
|
||||||
|
|
||||||
|
|
||||||
class ObjectButtonsPanel():
|
class ObjectButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "object"
|
bl_context = "object"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ def gpencil_stroke_placement_settings(context, layout, gpd):
|
|||||||
row.prop(gpd, "use_stroke_endpoints")
|
row.prop(gpd, "use_stroke_endpoints")
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilDrawingToolsPanel():
|
class GreasePencilDrawingToolsPanel:
|
||||||
# subclass must set
|
# subclass must set
|
||||||
# bl_space_type = 'IMAGE_EDITOR'
|
# bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_label = "Grease Pencil"
|
bl_label = "Grease Pencil"
|
||||||
@@ -89,7 +89,7 @@ class GreasePencilDrawingToolsPanel():
|
|||||||
col.operator("view3d.ruler")
|
col.operator("view3d.ruler")
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilStrokeEditPanel():
|
class GreasePencilStrokeEditPanel:
|
||||||
# subclass must set
|
# subclass must set
|
||||||
# bl_space_type = 'IMAGE_EDITOR'
|
# bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_label = "Edit Strokes"
|
bl_label = "Edit Strokes"
|
||||||
@@ -326,7 +326,7 @@ class GPENCIL_UL_layer(UIList):
|
|||||||
layout.label(text="", icon_value=icon)
|
layout.label(text="", icon_value=icon)
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilDataPanel():
|
class GreasePencilDataPanel:
|
||||||
# subclass must set
|
# subclass must set
|
||||||
# bl_space_type = 'IMAGE_EDITOR'
|
# bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_label = "Grease Pencil"
|
bl_label = "Grease Pencil"
|
||||||
@@ -455,7 +455,7 @@ class GreasePencilDataPanel():
|
|||||||
sub.prop(gpl, "ghost_after_range", text="After")
|
sub.prop(gpl, "ghost_after_range", text="After")
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilToolsPanel():
|
class GreasePencilToolsPanel:
|
||||||
# subclass must set
|
# subclass must set
|
||||||
# bl_space_type = 'IMAGE_EDITOR'
|
# bl_space_type = 'IMAGE_EDITOR'
|
||||||
# bl_options = {'DEFAULT_CLOSED'}
|
# bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class MASK_PT_layers:
|
|||||||
row.prop(active_layer, "use_fill_holes", text="Holes")
|
row.prop(active_layer, "use_fill_holes", text="Holes")
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_spline():
|
class MASK_PT_spline:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'UI'
|
#~ bl_region_type = 'UI'
|
||||||
@@ -146,7 +146,7 @@ class MASK_PT_spline():
|
|||||||
col.prop(spline, "use_self_intersection_check")
|
col.prop(spline, "use_self_intersection_check")
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_point():
|
class MASK_PT_point:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'UI'
|
#~ bl_region_type = 'UI'
|
||||||
@@ -201,7 +201,7 @@ class MASK_PT_point():
|
|||||||
tracks_list, icon='ANIM_DATA', text="Track:")
|
tracks_list, icon='ANIM_DATA', text="Track:")
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_display():
|
class MASK_PT_display:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'UI'
|
#~ bl_region_type = 'UI'
|
||||||
@@ -227,7 +227,7 @@ class MASK_PT_display():
|
|||||||
sub.prop(space_data, "mask_overlay_mode", text="")
|
sub.prop(space_data, "mask_overlay_mode", text="")
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_transforms():
|
class MASK_PT_transforms:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'TOOLS'
|
#~ bl_region_type = 'TOOLS'
|
||||||
@@ -251,7 +251,7 @@ class MASK_PT_transforms():
|
|||||||
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
|
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_tools():
|
class MASK_PT_tools:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'TOOLS'
|
#~ bl_region_type = 'TOOLS'
|
||||||
@@ -289,7 +289,7 @@ class MASK_PT_tools():
|
|||||||
col.operator("mask.shape_key_rekey", text="Re-Key Shape Points")
|
col.operator("mask.shape_key_rekey", text="Re-Key Shape Points")
|
||||||
|
|
||||||
|
|
||||||
class MASK_PT_add():
|
class MASK_PT_add:
|
||||||
# subclasses must define...
|
# subclasses must define...
|
||||||
#~ bl_space_type = 'CLIP_EDITOR'
|
#~ bl_space_type = 'CLIP_EDITOR'
|
||||||
#~ bl_region_type = 'TOOLS'
|
#~ bl_region_type = 'TOOLS'
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class MATERIAL_UL_matslots(UIList):
|
|||||||
layout.label(text="", icon_value=icon)
|
layout.label(text="", icon_value=icon)
|
||||||
|
|
||||||
|
|
||||||
class MaterialButtonsPanel():
|
class MaterialButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "material"
|
bl_context = "material"
|
||||||
@@ -875,7 +875,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel):
|
|||||||
layout.prop(mat, "alpha")
|
layout.prop(mat, "alpha")
|
||||||
|
|
||||||
|
|
||||||
class VolumeButtonsPanel():
|
class VolumeButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "material"
|
bl_context = "material"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class ObjectButtonsPanel():
|
class ObjectButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "object"
|
bl_context = "object"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
from bpy.types import Menu
|
from bpy.types import Menu
|
||||||
|
|
||||||
|
|
||||||
class UnifiedPaintPanel():
|
class UnifiedPaintPanel:
|
||||||
# subclass must set
|
# subclass must set
|
||||||
# bl_space_type = 'IMAGE_EDITOR'
|
# bl_space_type = 'IMAGE_EDITOR'
|
||||||
# bl_region_type = 'UI'
|
# bl_region_type = 'UI'
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class PARTICLE_MT_hair_dynamics_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class ParticleButtonsPanel():
|
class ParticleButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "particle"
|
bl_context = "particle"
|
||||||
@@ -104,6 +104,7 @@ def find_modifier(ob, psys):
|
|||||||
if md.particle_system == psys:
|
if md.particle_system == psys:
|
||||||
return md
|
return md
|
||||||
|
|
||||||
|
|
||||||
class PARTICLE_UL_particle_systems(bpy.types.UIList):
|
class PARTICLE_UL_particle_systems(bpy.types.UIList):
|
||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
|
||||||
ob = data
|
ob = data
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class CLOTH_MT_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ from bpy.types import Panel
|
|||||||
from bpy.app.translations import contexts as i18n_contexts
|
from bpy.app.translations import contexts as i18n_contexts
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class PHYSICS_UL_dynapaint_surfaces(UIList):
|
|||||||
row.label(text="", icon_value=sticon)
|
row.label(text="", icon_value=sticon)
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ from bl_ui.properties_physics_common import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class FLUID_MT_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_rigidbody_panel():
|
class PHYSICS_PT_rigidbody_panel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel
|
from bpy.types import Panel
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_rigidbody_constraint_panel():
|
class PHYSICS_PT_rigidbody_constraint_panel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ from bl_ui.properties_physics_common import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def softbody_panel_enabled(md):
|
|||||||
return (md.point_cache.is_baked is False)
|
return (md.point_cache.is_baked is False)
|
||||||
|
|
||||||
|
|
||||||
class PhysicButtonsPanel():
|
class PhysicButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "physics"
|
bl_context = "physics"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class RENDER_MT_framerate_presets(Menu):
|
|||||||
draw = Menu.draw_preset
|
draw = Menu.draw_preset
|
||||||
|
|
||||||
|
|
||||||
class RenderButtonsPanel():
|
class RenderButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "render"
|
bl_context = "render"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import bpy
|
|||||||
from bpy.types import Panel, UIList
|
from bpy.types import Panel, UIList
|
||||||
|
|
||||||
|
|
||||||
class RenderLayerButtonsPanel():
|
class RenderLayerButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "render_layer"
|
bl_context = "render_layer"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class SCENE_UL_keying_set_paths(UIList):
|
|||||||
layout.label(text="", icon_value=icon)
|
layout.label(text="", icon_value=icon)
|
||||||
|
|
||||||
|
|
||||||
class SceneButtonsPanel():
|
class SceneButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "scene"
|
bl_context = "scene"
|
||||||
@@ -85,7 +85,7 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
|
|||||||
row.prop(unit, "use_separate")
|
row.prop(unit, "use_separate")
|
||||||
|
|
||||||
|
|
||||||
class SceneKeyingSetsPanel():
|
class SceneKeyingSetsPanel:
|
||||||
def draw_keyframing_settings(self, context, layout, ks, ksp):
|
def draw_keyframing_settings(self, context, layout, ks, ksp):
|
||||||
self.draw_keyframing_setting(context, layout, ks, ksp, "Needed",
|
self.draw_keyframing_setting(context, layout, ks, ksp, "Needed",
|
||||||
"use_insertkey_override_needed", "use_insertkey_needed",
|
"use_insertkey_override_needed", "use_insertkey_needed",
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ def id_tex_datablock(bid):
|
|||||||
return bid
|
return bid
|
||||||
|
|
||||||
|
|
||||||
class TextureButtonsPanel():
|
class TextureButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "texture"
|
bl_context = "texture"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ from bpy.types import Panel
|
|||||||
from rna_prop_ui import PropertyPanel
|
from rna_prop_ui import PropertyPanel
|
||||||
|
|
||||||
|
|
||||||
class WorldButtonsPanel():
|
class WorldButtonsPanel:
|
||||||
bl_space_type = 'PROPERTIES'
|
bl_space_type = 'PROPERTIES'
|
||||||
bl_region_type = 'WINDOW'
|
bl_region_type = 'WINDOW'
|
||||||
bl_context = "world"
|
bl_context = "world"
|
||||||
@@ -49,7 +49,6 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
|
|||||||
scene = context.scene
|
scene = context.scene
|
||||||
world = context.world
|
world = context.world
|
||||||
space = context.space_data
|
space = context.space_data
|
||||||
rd = context.scene.render
|
|
||||||
|
|
||||||
texture_count = world and len(world.texture_slots.keys())
|
texture_count = world and len(world.texture_slots.keys())
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ class DOPESHEET_HT_header(Header):
|
|||||||
row.operator("action.paste", text="", icon='PASTEFLIPDOWN').flipped = True
|
row.operator("action.paste", text="", icon='PASTEFLIPDOWN').flipped = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DOPESHEET_MT_editor_menus(Menu):
|
class DOPESHEET_MT_editor_menus(Menu):
|
||||||
bl_idname = "DOPESHEET_MT_editor_menus"
|
bl_idname = "DOPESHEET_MT_editor_menus"
|
||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|||||||
@@ -1043,7 +1043,8 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
|
|||||||
|
|
||||||
# --- end mask ---
|
# --- end mask ---
|
||||||
|
|
||||||
class ImageScopesPanel():
|
|
||||||
|
class ImageScopesPanel:
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
sima = context.space_data
|
sima = context.space_data
|
||||||
@@ -1057,6 +1058,7 @@ class ImageScopesPanel():
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class IMAGE_PT_view_histogram(ImageScopesPanel, Panel):
|
class IMAGE_PT_view_histogram(ImageScopesPanel, Panel):
|
||||||
bl_space_type = 'IMAGE_EDITOR'
|
bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
@@ -1150,6 +1152,7 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel):
|
|||||||
|
|
||||||
# NOTE: this is just a wrapper around the generic GP Panel
|
# NOTE: this is just a wrapper around the generic GP Panel
|
||||||
|
|
||||||
|
|
||||||
# Grease Pencil drawing tools
|
# Grease Pencil drawing tools
|
||||||
class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
|
class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
|
||||||
bl_space_type = 'IMAGE_EDITOR'
|
bl_space_type = 'IMAGE_EDITOR'
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ class NODE_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
|
|||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|
||||||
|
|
||||||
def node_draw_tree_view(layout, context):
|
def node_draw_tree_view(layout, context):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ class SEQUENCER_MT_strip(Menu):
|
|||||||
layout.menu("SEQUENCER_MT_change")
|
layout.menu("SEQUENCER_MT_change")
|
||||||
|
|
||||||
|
|
||||||
class SequencerButtonsPanel():
|
class SequencerButtonsPanel:
|
||||||
bl_space_type = 'SEQUENCE_EDITOR'
|
bl_space_type = 'SEQUENCE_EDITOR'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ class SequencerButtonsPanel():
|
|||||||
return cls.has_sequencer(context) and (act_strip(context) is not None)
|
return cls.has_sequencer(context) and (act_strip(context) is not None)
|
||||||
|
|
||||||
|
|
||||||
class SequencerButtonsPanel_Output():
|
class SequencerButtonsPanel_Output:
|
||||||
bl_space_type = 'SEQUENCE_EDITOR'
|
bl_space_type = 'SEQUENCE_EDITOR'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
|
|
||||||
@@ -929,7 +929,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
|
|||||||
row.prop(strip.proxy, "build_50")
|
row.prop(strip.proxy, "build_50")
|
||||||
row.prop(strip.proxy, "build_75")
|
row.prop(strip.proxy, "build_75")
|
||||||
row.prop(strip.proxy, "build_100")
|
row.prop(strip.proxy, "build_100")
|
||||||
layout.prop(strip.proxy, "use_overwrite");
|
layout.prop(strip.proxy, "use_overwrite")
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
col.label(text="Build JPEG quality")
|
col.label(text="Build JPEG quality")
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class VIEW3D_MT_editor_menus(Menu):
|
|||||||
# ********** Utilities **********
|
# ********** Utilities **********
|
||||||
|
|
||||||
|
|
||||||
class ShowHideMenu():
|
class ShowHideMenu:
|
||||||
bl_label = "Show/Hide"
|
bl_label = "Show/Hide"
|
||||||
_operator_name = ""
|
_operator_name = ""
|
||||||
|
|
||||||
@@ -2723,6 +2723,7 @@ class VIEW3D_MT_edit_armature_roll(Menu):
|
|||||||
|
|
||||||
# ********** Panel **********
|
# ********** Panel **********
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
|
class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ from bl_ui.properties_paint_common import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class View3DPanel():
|
class View3DPanel:
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
|
|
||||||
@@ -786,6 +786,7 @@ class View3DPaintPanel(UnifiedPaintPanel):
|
|||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
|
class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
|
||||||
bl_category = "Tools"
|
bl_category = "Tools"
|
||||||
bl_label = "Missing Data"
|
bl_label = "Missing Data"
|
||||||
@@ -813,7 +814,6 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
|
|||||||
col.label("Missing Materials", icon='INFO')
|
col.label("Missing Materials", icon='INFO')
|
||||||
col.label("Add a material and paint slot below")
|
col.label("Add a material and paint slot below")
|
||||||
col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
|
col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
|
||||||
|
|
||||||
elif toolsettings.missing_texture:
|
elif toolsettings.missing_texture:
|
||||||
ob = context.active_object
|
ob = context.active_object
|
||||||
mat = ob.active_material
|
mat = ob.active_material
|
||||||
@@ -828,7 +828,6 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
|
|||||||
col.label("Add a material and paint slot below")
|
col.label("Add a material and paint slot below")
|
||||||
col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
|
col.operator_menu_enum("paint.add_texture_paint_slot", "type", text="Add Paint Slot")
|
||||||
|
|
||||||
|
|
||||||
elif toolsettings.mode == 'IMAGE':
|
elif toolsettings.mode == 'IMAGE':
|
||||||
if toolsettings.missing_texture:
|
if toolsettings.missing_texture:
|
||||||
col.separator()
|
col.separator()
|
||||||
@@ -846,6 +845,7 @@ class VIEW3D_PT_imapaint_tools_missing(Panel, View3DPaintPanel):
|
|||||||
col.template_ID(toolsettings, "stencil_image")
|
col.template_ID(toolsettings, "stencil_image")
|
||||||
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
|
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||||
bl_category = "Tools"
|
bl_category = "Tools"
|
||||||
bl_label = "Brush"
|
bl_label = "Brush"
|
||||||
@@ -1074,6 +1074,7 @@ class TEXTURE_UL_texpaintslots(UIList):
|
|||||||
layout.alignment = 'CENTER'
|
layout.alignment = 'CENTER'
|
||||||
layout.label(text="")
|
layout.label(text="")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
|
class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
|
||||||
bl_label = "Clone Layer"
|
bl_label = "Clone Layer"
|
||||||
|
|
||||||
@@ -1189,7 +1190,6 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
|||||||
col.template_ID(ipaint, "stencil_image")
|
col.template_ID(ipaint, "stencil_image")
|
||||||
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
|
col.operator("image.new", text="New").gen_context = 'PAINT_STENCIL'
|
||||||
|
|
||||||
|
|
||||||
col.label("Visualization")
|
col.label("Visualization")
|
||||||
row = col.row(align=True)
|
row = col.row(align=True)
|
||||||
row.prop(ipaint, "stencil_color", text="")
|
row.prop(ipaint, "stencil_color", text="")
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ def image_from_file(filepath):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import bpy
|
import bpy
|
||||||
except:
|
except ImportError:
|
||||||
bpy = None
|
bpy = None
|
||||||
|
|
||||||
if bpy is not None:
|
if bpy is not None:
|
||||||
|
|||||||
@@ -95,13 +95,23 @@ def main():
|
|||||||
print(" %s" % f)
|
print(" %s" % f)
|
||||||
|
|
||||||
# strict imports
|
# strict imports
|
||||||
print("\n\n\n# running pep8...")
|
print("\n\n\n# checking imports...")
|
||||||
import re
|
import re
|
||||||
import_check = re.compile(r"\s*from\s+[A-z\.]+\s+import \*\s*")
|
import_check = re.compile(r"\s*from\s+[A-z\.]+\s+import \*\s*")
|
||||||
for f, pep8_type in files:
|
for f, pep8_type in files:
|
||||||
for i, l in enumerate(open(f, 'r', encoding='utf8')):
|
for i, l in enumerate(open(f, 'r', encoding='utf8')):
|
||||||
if import_check.match(l):
|
if import_check.match(l):
|
||||||
print("%s:%d:0: global import bad practice" % (f, i + 1))
|
print("%s:%d:0: global import bad practice" % (f, i + 1))
|
||||||
|
del re, import_check
|
||||||
|
|
||||||
|
print("\n\n\n# checking class definitions...")
|
||||||
|
import re
|
||||||
|
class_check = re.compile(r"\s*class\s+.*\(\):.*")
|
||||||
|
for f, pep8_type in files:
|
||||||
|
for i, l in enumerate(open(f, 'r', encoding='utf8')):
|
||||||
|
if class_check.match(l):
|
||||||
|
print("%s:%d:0: empty class (), remove" % (f, i + 1))
|
||||||
|
del re, class_check
|
||||||
|
|
||||||
print("\n\n\n# running pep8...")
|
print("\n\n\n# running pep8...")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user