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_FixSettings(bpy.types.PropertyGroup): lock_main_cam : BoolProperty( name="Lock Main Cam", description="Lock the main camera (works only if 'layout' is not in name)", default=False, options={'HIDDEN'}) set_scene_res : BoolProperty( name="Reset Scene Resolution", description="Set the scene resolution to current prefs project settings", default=True, options={'HIDDEN'}) set_res_percentage : BoolProperty( name="Reset Resolution Percentage To 100%", description="", default=True, options={'HIDDEN'}) set_fps : BoolProperty( name="Reset Fps", description="Set the framerate of the scene to current prefs project settings", default=False, options={'HIDDEN'}) set_slider_n_sync : BoolProperty( name="Dopesheets Show Slider And Sync Range", description="Toggle on the use of show slider and sync range", default=True, options={'HIDDEN'}) set_cursor_type : BoolProperty( name="Set Select Cursor Mode", description="Set the type of the selection cursor (according to addon prefs)", default=True, options={'HIDDEN'}) check_front_axis : BoolProperty( name="Check If Draw Axis is Front (X-Z)", description="Alert if the current grease pencil draw axis is not front (X-Z)", default=True, options={'HIDDEN'}) check_placement : BoolProperty( name="Check Stroke Placement", description="Alert if the current grease pencil stroke placement is not Origin", default=True, options={'HIDDEN'}) set_pivot_median_point : BoolProperty( name="Set Pivot To Median Point", description="Change the pivot point to the most used median point", default=True, options={'HIDDEN'}) disable_guide : BoolProperty( name="Disable Drawing Guide", description="Disable constrained guide in draw mode", default=False, options={'HIDDEN'}) list_disabled_anim : BoolProperty( name="List Disabled Animation", description="Alert if there are disabled animations", default=True, options={'HIDDEN'}) autokey_add_n_replace : BoolProperty( name="Autokey Mode Add and Replace", description="Change autokey mode back to 'Add & Replace'", default=True, options={'HIDDEN'}) class GP_PG_ToolsSettings(bpy.types.PropertyGroup): eraser_radius : IntProperty( name="Eraser Radius", description="Radius of eraser brush", default=20, min=0, max=500, subtype='PIXEL') 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) """