Cleanup: move line art panel into properties_objects
No need for a module to define a single panel, since this is an object panel it can be included with other object panels. If centralizing line-art properties is needed in the future, this can be done in a `*_common` module.
This commit is contained in:
parent
b787581c9c
commit
80c86e274d
|
@ -105,8 +105,6 @@ import bpy
|
|||
if bpy.app.build_options.freestyle:
|
||||
_modules.append("properties_freestyle")
|
||||
|
||||
_modules.append("properties_lineart")
|
||||
|
||||
__import__(name=__name__, fromlist=_modules)
|
||||
_namespace = globals()
|
||||
_modules_loaded = [_namespace[name] for name in _modules]
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
from bpy.types import Panel
|
||||
|
||||
|
||||
class LineartButtonsPanel:
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
bl_context = "object"
|
||||
|
||||
|
||||
class OBJECT_PT_lineart(LineartButtonsPanel, Panel):
|
||||
bl_label = "Line Art"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
return (ob.type in {'MESH', 'FONT', 'CURVE', 'SURFACE'})
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
lineart = context.object.lineart
|
||||
|
||||
layout.use_property_split = True
|
||||
|
||||
layout.prop(lineart, 'usage')
|
||||
layout.use_property_split = True
|
||||
|
||||
row = layout.row(heading="Override Crease")
|
||||
row.prop(lineart, "use_crease_override", text="")
|
||||
row.prop(lineart, "crease_threshold", slider=True, text="")
|
||||
|
||||
|
||||
classes = (
|
||||
OBJECT_PT_lineart,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
|
@ -308,6 +308,29 @@ class OBJECT_PT_instancing_size(ObjectButtonsPanel, Panel):
|
|||
layout.prop(ob, "instance_faces_scale", text="Factor")
|
||||
|
||||
|
||||
class OBJECT_PT_lineart(ObjectButtonsPanel, Panel):
|
||||
bl_label = "Line Art"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
return (ob.type in {'MESH', 'FONT', 'CURVE', 'SURFACE'})
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
lineart = context.object.lineart
|
||||
|
||||
layout.use_property_split = True
|
||||
|
||||
layout.prop(lineart, "usage")
|
||||
layout.use_property_split = True
|
||||
|
||||
row = layout.row(heading="Override Crease")
|
||||
row.prop(lineart, "use_crease_override", text="")
|
||||
row.prop(lineart, "crease_threshold", slider=True, text="")
|
||||
|
||||
|
||||
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
#bl_label = "Object Motion Paths"
|
||||
bl_context = "object"
|
||||
|
@ -393,6 +416,7 @@ classes = (
|
|||
OBJECT_PT_motion_paths_display,
|
||||
OBJECT_PT_display,
|
||||
OBJECT_PT_visibility,
|
||||
OBJECT_PT_lineart,
|
||||
OBJECT_PT_custom_props,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue