67 lines
2.8 KiB
Python
67 lines
2.8 KiB
Python
|
import bpy
|
||
|
from bpy.props import (
|
||
|
IntProperty,
|
||
|
BoolProperty,
|
||
|
StringProperty,
|
||
|
FloatProperty,
|
||
|
)
|
||
|
|
||
|
from .OP_cursor_snap_canvas import cursor_follow_update
|
||
|
|
||
|
def change_edit_lines_opacity(self, context):
|
||
|
# for o in context.scene.objects:
|
||
|
# if o.type != 'GPENCIL':
|
||
|
# continue
|
||
|
# o.data.edit_line_color[3]=self.edit_lines_opacity
|
||
|
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) :
|
||
|
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)#, get=None, set=None
|
||
|
|
||
|
## render
|
||
|
name_for_current_render : StringProperty(
|
||
|
name="Render_name", description="Name use for render current",
|
||
|
default="")
|
||
|
|
||
|
|
||
|
"""
|
||
|
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)
|
||
|
"""
|