83 lines
3.5 KiB
Python
83 lines
3.5 KiB
Python
import bpy
|
|
from bpy.props import (
|
|
IntProperty,
|
|
BoolProperty,
|
|
StringProperty,
|
|
FloatProperty,
|
|
EnumProperty,
|
|
)
|
|
|
|
from .OP_cursor_snap_canvas import cursor_follow_update
|
|
|
|
def change_edit_lines_opacity(self, context):
|
|
for gp in bpy.data.grease_pencils:
|
|
if not gp.is_annotation:
|
|
gp.edit_line_color[3]=self.edit_lines_opacity
|
|
|
|
class GP_PG_ToolsSettings(bpy.types.PropertyGroup) :
|
|
|
|
drawcam_passepartout : BoolProperty(
|
|
name="Show cam passepartout",
|
|
description="Show a darkened overlay outside image area in Camera view",
|
|
default=True,
|
|
options={'HIDDEN'})
|
|
|
|
autotint_offset : IntProperty(
|
|
name="Tint hue offset", description="offset the tint by this value for better color",
|
|
default=0, min=-5000, max=5000, soft_min=-999, soft_max=999, step=1,
|
|
options={'HIDDEN'})#, subtype='PERCENTAGE'
|
|
|
|
autotint_namespace : BoolProperty(
|
|
name="Use prefix", description="Put same color on layers unsing the same prefix (separated by '_') of full name withjout separator",
|
|
default=True,
|
|
options={'HIDDEN'})
|
|
|
|
resolution_percentage: IntProperty(
|
|
name="Resolution %", description="Overrides resolution percentage for playblast",
|
|
default = 50, min=1, max= 100, subtype='PERCENTAGE')#, precision=0
|
|
|
|
cursor_follow : BoolProperty(
|
|
name='Cursor Follow', description="3D cursor follow active object animation when activated",
|
|
default=False, update=cursor_follow_update)
|
|
|
|
edit_lines_opacity : FloatProperty(
|
|
name="edit lines Opacity", description="Change edit lines opacity for all grease pencils",
|
|
default=0.5, min=0.0, max=1.0, step=3, precision=2, update=change_edit_lines_opacity)
|
|
|
|
## render
|
|
name_for_current_render : StringProperty(
|
|
name="Render_name", description="Name use for render current",
|
|
default="")
|
|
|
|
keyframe_type : EnumProperty(
|
|
name="Keyframe Filter", description="Only jump to defined keyframe type",
|
|
default='ALL', options={'HIDDEN', 'SKIP_SAVE'},
|
|
items=(
|
|
('ALL', 'All', '', 0), # 'KEYFRAME'
|
|
('KEYFRAME', 'Keyframe', '', 'KEYTYPE_KEYFRAME_VEC', 1),
|
|
('BREAKDOWN', 'Breakdown', '', 'KEYTYPE_BREAKDOWN_VEC', 2),
|
|
('MOVING_HOLD', 'Moving Hold', '', 'KEYTYPE_MOVING_HOLD_VEC', 3),
|
|
('EXTREME', 'Extreme', '', 'KEYTYPE_EXTREME_VEC', 4),
|
|
('JITTER', 'Jitter', '', 'KEYTYPE_JITTER_VEC', 5),
|
|
))
|
|
|
|
"""
|
|
reconnect_parent = bpy.props.PointerProperty(type =bpy.types.Object,poll=poll_armature)
|
|
render_settings = bpy.props.BoolProperty(default = False)
|
|
render_color = bpy.props.BoolProperty(default = True)
|
|
render_contour = bpy.props.BoolProperty(default = False)
|
|
precision = bpy.props.IntProperty(default = 75,subtype = 'PERCENTAGE',min=0,max=100)
|
|
|
|
border_render = bpy.props.BoolProperty(default = False)
|
|
|
|
spacialize = bpy.props.BoolProperty(default = False)
|
|
depth = bpy.props.FloatProperty(default = 2.0)
|
|
|
|
extra_tools = bpy.props.BoolProperty(default = False)
|
|
enable_ob_filter = bpy.props.BoolProperty(default = False)
|
|
auto_cursor = bpy.props.BoolProperty(default = True)
|
|
|
|
opacity_layers = bpy.props.FloatProperty(min=0,max=1,default = 1,update = update_layers_opacity)
|
|
|
|
stroke_select = bpy.props.EnumProperty(items = [("POINT","Point",""),("STROKE","Stroke","")],update = update_selection_mode)
|
|
""" |