bpy.types.World.lnx_project_package=StringProperty(name="Package",description="Package name for scripts",default="lnx",update=assets.invalidate_compiler_cache,set=set_project_package,get=get_project_package)
bpy.types.World.lnx_project_android_sdk_min=IntProperty(name="Minimal Version SDK",description="Minimal Version Android SDK",default=23,min=14,max=30,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_android_sdk_target=IntProperty(name="Target Version SDK",description="Target Version Android SDK",default=26,min=26,max=30,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_android_sdk_compile=IntProperty(name="Maximal Version SDK",description="Maximal Android SDK Version",default=30,min=26,max=30,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_android_build_apk=BoolProperty(name="Building APK After Publishing",description="Starting APK build after publishing",default=False,update=assets.invalidate_compiler_cache,get=get_android_build_apk,set=set_android_build_apk)
bpy.types.World.lnx_project_android_rename_apk=BoolProperty(name="Rename APK To Project Name",description="Rename APK file to project name + version after build",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_android_copy_apk=BoolProperty(name="Copy APK To Specified Folder",description="Copy the APK file to the folder specified in the settings after build",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_android_run_avd=BoolProperty(name="Run Emulator After Building APK",description="Starting android emulator after APK build",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_html5_copy=BoolProperty(name="Copy Files To Specified Folder",description="Copy files to the folder specified in the settings after publish",default=False,update=assets.invalidate_compiler_cache,set=set_project_html5_copy,get=get_project_html5_copy)
bpy.types.World.lnx_project_html5_start_browser=BoolProperty(name="Run Browser After Copy",description="Run browser after copy",default=False,update=assets.invalidate_compiler_cache,set=set_project_html5_start_browser,get=get_project_html5_start_browser)
bpy.types.World.lnx_project_html5_popupmenu_in_browser=BoolProperty(name="Disable Browser Context Menu",description="Disable the browser context menu for the canvas element on the page",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_win_build_cpu=IntProperty(name="CPU Count",description="Specifies the maximum number of concurrent processes to use when building",default=1,min=1,max=multiprocessing.cpu_count())
bpy.types.World.lnx_project_win_build_open=BoolProperty(name="Open Build Directory",description="Open the build directory after successfully assemble",default=False)
bpy.types.World.lnx_project_icon=StringProperty(name="Icon (PNG)",description="Exported project icon, must be a PNG image",default="",subtype="FILE_PATH",update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_project_root=StringProperty(name="Root",description="Set root folder for linked assets",default="",subtype="DIR_PATH",update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_khafile=PointerProperty(name="Append Khafile",description="Source appended to the project's khafile.js after it is generated",update=assets.invalidate_compiler_cache,type=bpy.types.Text)
bpy.types.World.lnx_copy_override=BoolProperty(name="Copy Override",description="Overrides any existing files when copying",default=False,update=assets.invalidate_compiled_data)
bpy.types.World.lnx_minimize=BoolProperty(name="Binary Scene Data",description="Export scene data in binary",default=True,update=assets.invalidate_compiled_data)
bpy.types.World.lnx_minify_js=BoolProperty(name="Minify JS",description="Minimize JavaScript output when publishing",default=True)
bpy.types.World.lnx_no_traces=BoolProperty(name="No Traces",description="Don't compile trace calls in the program when publishing",default=False)
bpy.types.World.lnx_optimize_data=BoolProperty(name="Optimize Data",description="Export more efficient geometry and shader data when publishing, prolongs build times",default=True,update=assets.invalidate_compiled_data)
bpy.types.World.lnx_export_tangents=BoolProperty(name="Precompute Tangents",description="Precompute tangents for normal mapping, otherwise computed in shader",default=True,update=assets.invalidate_compiled_data)
bpy.types.World.lnx_batch_meshes=BoolProperty(name="Batch Meshes",description="Group meshes by materials to speed up rendering",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_batch_materials=BoolProperty(name="Batch Materials",description="Marge similar materials into single pipeline state",default=False,update=assets.invalidate_shader_cache)
bpy.types.World.lnx_stream_scene=BoolProperty(name="Stream Scene",description="Stream scene content",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_lod_gen_levels=IntProperty(name="Levels",description="Number of levels to generate",default=3,min=1)
bpy.types.World.lnx_cache_build=BoolProperty(name="Cache Build",description="Cache build files to speed up compilation",default=True)
bpy.types.World.lnx_assert_level=EnumProperty(
items=[
('Warning','Warning','Warning level, warnings don\'t throw an LnxAssertException'),
('Error','Error','Error level. If assertions with this level fail, an LnxAssertException is thrown'),
('NoAssertions','No Assertions','Ignore all assertions'),
],
name="Assertion Level",description="Ignore all assertions below this level (assertions are turned off completely for published builds)",default='Warning',update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_assert_quit=BoolProperty(name="Quit On Assertion Fail",description="Whether to close the game when an 'Error' level assertion fails",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_live_patch=BoolProperty(name="Live Patch",description="Live patching for Krom",default=False)
bpy.types.World.lnx_clear_on_compile=BoolProperty(name="Clear Console",description="Clears the system console on compile",default=False)
bpy.types.World.lnx_play_scene=PointerProperty(name="Scene",description="Scene to launch",update=assets.invalidate_compiler_cache,type=bpy.types.Scene)
bpy.types.World.lnx_play_renderpath=StringProperty(name="Render Path",description="Default renderpath for debugging",update=assets.invalidate_compiler_cache)
# Debug Console
bpy.types.World.lnx_debug_console=BoolProperty(name="Enable",description="Show inspector in player and enable debug draw.\nRequires that Zui is not disabled",default=lnx.utils.get_debug_console_auto(),update=assets.invalidate_shader_cache)
bpy.types.World.lnx_debug_console_visible=BoolProperty(name="Visible",description="Setting the console visibility at application start",default=True,update=assets.invalidate_shader_cache)
bpy.types.World.lnx_debug_console_trace_pos=BoolProperty(name="Print With Position",description="Whether to prepend the position of print/trace statements to the printed text",default=True)
bpy.types.World.lnx_verbose_output=BoolProperty(name="Verbose Output",description="Print additional information to the console during compilation",default=False)
bpy.types.World.lnx_dce=BoolProperty(name="DCE",description="Enable dead code elimination for publish builds",default=True,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_asset_compression=BoolProperty(name="Asset Compression",description="Enable scene data compression with LZ4 when publishing. Warning: This will slow down export!",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_single_data_file=BoolProperty(name="Single Data File",description="Pack exported meshes and materials into single file",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_write_config=BoolProperty(name="Write Config",description="Allow this project to be configured at runtime via a JSON file",default=False,update=assets.invalidate_compiler_cache)
bpy.types.World.lnx_compiler_inline=BoolProperty(name="Compiler Inline",description="Favor speed over size",default=True,update=assets.invalidate_compiler_cache)
('Loc','Loc','Instances use their unique position (ipos)'),
('Loc + Rot','Loc + Rot','Instances use their unique position and rotation (ipos and irot)'),
('Loc + Scale','Loc + Scale','Instances use their unique position and scale (ipos and iscl)'),
('Loc + Rot + Scale','Loc + Rot + Scale','Instances use their unique position, rotation and scale (ipos, irot, iscl)')],
name="Instanced Children",default='Off',
description='Whether to use instancing to draw the children of this object. If enabled, this option defines what attributes may vary between the instances',
bpy.types.Object.lnx_spawn=BoolProperty(name="Spawn",description="Auto-add this object when creating scene",default=True,override={'LIBRARY_OVERRIDABLE'})
bpy.types.Object.lnx_mobile=BoolProperty(name="Mobile",description="Object moves during gameplay",default=False,override={'LIBRARY_OVERRIDABLE'})
bpy.types.Object.lnx_visible=BoolProperty(name="Visible",description="Render this object",default=True,override={'LIBRARY_OVERRIDABLE'})
bpy.types.Object.lnx_visible_shadow=BoolProperty(name="Lighting",description="Object contributes to the lighting even if invisible",default=True,override={'LIBRARY_OVERRIDABLE'})
bpy.types.Object.lnx_soft_body_margin=FloatProperty(name="Soft Body Margin",description="Collision margin",default=0.04)
bpy.types.Object.lnx_rb_linear_factor=FloatVectorProperty(name="Linear Factor",size=3,description="Set to 0 to lock axis",default=[1,1,1])
bpy.types.Object.lnx_rb_angular_factor=FloatVectorProperty(name="Angular Factor",size=3,description="Set to 0 to lock axis",default=[1,1,1])
bpy.types.Object.lnx_relative_physics_constraint=BoolProperty(name="Relative Physics Constraint",description="Add physics constraint relative to the parent object or collection when spawned",default=False)
bpy.types.Armature.lnx_relative_bone_constraints=BoolProperty(name="Relative Bone Constraints",description="Constraint are applied relative to Armature's parent",default=False)
# For camera
bpy.types.Camera.lnx_frustum_culling=BoolProperty(name="Frustum Culling",description="Perform frustum culling for this camera",default=True)
bpy.types.Material.lnx_depth_read=BoolProperty(name="Read Depth",description="Allow this material to read from a depth texture which is copied from the depth buffer. The meshes using this material will be drawn after all meshes that don't read from the depth texture",default=False)
bpy.types.Material.lnx_overlay=BoolProperty(name="Overlay",description="Renders the material, unshaded, over other shaded materials",default=False)
bpy.types.NodeSocket.is_uniform=BoolProperty(name="Is Uniform",description="Mark node sockets to be processed as material uniforms",default=False)
bpy.types.NodeTree.lnx_cached=BoolProperty(name="Node Tree Cached",description="No need to reexport node tree",default=False)
bpy.types.Material.signature=StringProperty(name="Signature",description="Unique string generated from material nodes",default="")
bpy.types.Material.lnx_cached=BoolProperty(name="Material Cached",description="No need to reexport material data",default=False)
bpy.types.Node.lnx_material_param=BoolProperty(name="Parameter",description="Control this node from script",default=False)
bpy.types.Node.lnx_watch=BoolProperty(name="Watch",description="Watch value of this node in debug console",default=False)
bpy.types.Node.lnx_version=IntProperty(name="Node Version",description="The version of an instanced node",default=0)
# Particles
bpy.types.ParticleSettings.lnx_count_mult=FloatProperty(name="Multiply Count",description="Multiply particle count when rendering in Leenkx",default=1.0)
bpy.types.ParticleSettings.lnx_loop=BoolProperty(name="Loop",description="Loop this particle system",default=False)
# Actions
bpy.types.Action.lnx_root_motion_pos=BoolProperty(name="Root Motion Position",description="Enable position root motion",default=False)