├── .gitignore ├── MyCustomNode.py ├── MyCustomSocket.py ├── MyCustomTree.py ├── MyCustomTreeNode.py ├── MyNodeCategory.py ├── README.md ├── SeaSide ├── BKE_DerivedMesh.h ├── BKE_action.h ├── BKE_addon.h ├── BKE_anim_data.h ├── BKE_anim_path.h ├── BKE_anim_visualization.h ├── BKE_animsys.h ├── BKE_appdir.h ├── BKE_armature.h ├── BKE_asset.h ├── BKE_attribute.h ├── BKE_attribute_access.hh ├── BKE_attribute_math.hh ├── BKE_autoexec.h ├── BKE_blender.h ├── BKE_blender_copybuffer.h ├── BKE_blender_undo.h ├── BKE_blender_user_menu.h ├── BKE_blender_version.h ├── BKE_blendfile.h ├── BKE_boids.h ├── BKE_bpath.h ├── BKE_brush.h ├── BKE_bvhutils.h ├── BKE_cachefile.h ├── BKE_callbacks.h ├── BKE_camera.h ├── BKE_ccg.h ├── BKE_cdderivedmesh.h ├── BKE_cloth.h ├── BKE_collection.h ├── BKE_collision.h ├── BKE_colorband.h ├── BKE_colortools.h ├── BKE_constraint.h ├── BKE_context.h ├── BKE_crazyspace.h ├── BKE_cryptomatte.h ├── BKE_cryptomatte.hh ├── BKE_curve.h ├── BKE_curveprofile.h ├── BKE_customdata.h ├── BKE_customdata_file.h ├── BKE_data_transfer.h ├── BKE_deform.h ├── BKE_displist.h ├── BKE_displist_tangent.h ├── BKE_duplilist.h ├── BKE_dynamicpaint.h ├── BKE_editlattice.h ├── BKE_editmesh.h ├── BKE_editmesh_bvh.h ├── BKE_editmesh_cache.h ├── BKE_editmesh_tangent.h ├── BKE_effect.h ├── BKE_fcurve.h ├── BKE_fcurve_driver.h ├── BKE_fluid.h ├── BKE_font.h ├── BKE_freestyle.h ├── BKE_geometry_set.h ├── BKE_geometry_set.hh ├── BKE_geometry_set_instances.hh ├── BKE_global.h ├── BKE_gpencil.h ├── BKE_gpencil_curve.h ├── BKE_gpencil_geom.h ├── BKE_gpencil_modifier.h ├── BKE_hair.h ├── BKE_icons.h ├── BKE_idprop.h ├── BKE_idtype.h ├── BKE_image.h ├── BKE_image_save.h ├── BKE_ipo.h ├── BKE_kelvinlet.h ├── BKE_key.h ├── BKE_keyconfig.h ├── BKE_lattice.h ├── BKE_layer.h ├── BKE_lib_id.h ├── BKE_lib_override.h ├── BKE_lib_query.h ├── BKE_lib_remap.h ├── BKE_library.h ├── BKE_light.h ├── BKE_lightprobe.h ├── BKE_linestyle.h ├── BKE_main.h ├── BKE_main_idmap.h ├── BKE_mask.h ├── BKE_material.h ├── BKE_mball.h ├── BKE_mball_tessellate.h ├── BKE_mesh.h ├── BKE_mesh_boolean_convert.hh ├── BKE_mesh_fair.h ├── BKE_mesh_iterators.h ├── BKE_mesh_mapping.h ├── BKE_mesh_mirror.h ├── BKE_mesh_remap.h ├── BKE_mesh_remesh_voxel.h ├── BKE_mesh_runtime.h ├── BKE_mesh_sample.hh ├── BKE_mesh_tangent.h ├── BKE_mesh_types.h ├── BKE_mesh_wrapper.h ├── BKE_modifier.h ├── BKE_movieclip.h ├── BKE_multires.h ├── BKE_nla.h ├── BKE_node.h ├── BKE_node_ui_storage.hh ├── BKE_object.h ├── BKE_object_deform.h ├── BKE_object_facemap.h ├── BKE_ocean.h ├── BKE_outliner_treehash.h ├── BKE_packedFile.h ├── BKE_paint.h ├── BKE_particle.h ├── BKE_pbvh.h ├── BKE_persistent_data_handle.hh ├── BKE_pointcache.h ├── BKE_pointcloud.h ├── BKE_preferences.h ├── BKE_report.h ├── BKE_rigidbody.h ├── BKE_scene.h ├── BKE_screen.h ├── BKE_sequencer_offscreen.h ├── BKE_shader_fx.h ├── BKE_shrinkwrap.h ├── BKE_simulation.h ├── BKE_softbody.h ├── BKE_sound.h ├── BKE_speaker.h ├── BKE_studiolight.h ├── BKE_subdiv.h ├── BKE_subdiv_ccg.h ├── BKE_subdiv_deform.h ├── BKE_subdiv_eval.h ├── BKE_subdiv_foreach.h ├── BKE_subdiv_mesh.h ├── BKE_subdiv_topology.h ├── BKE_subsurf.h ├── BKE_text.h ├── BKE_text_suggestions.h ├── BKE_texture.h ├── BKE_tracking.h ├── BKE_undo_system.h ├── BKE_unit.h ├── BKE_volume.h ├── BKE_volume_render.h ├── BKE_volume_to_mesh.hh ├── BKE_workspace.h ├── BKE_world.h ├── BKE_writeavi.h ├── BKE_writeffmpeg.h ├── BLI_alloca.h ├── BLI_allocator.hh ├── BLI_args.c ├── BLI_args.h ├── BLI_array.c ├── BLI_array.h ├── BLI_array.hh ├── BLI_array_store.h ├── BLI_array_store_utils.h ├── BLI_array_utils.h ├── BLI_asan.h ├── BLI_assert.c ├── BLI_assert.h ├── BLI_astar.h ├── BLI_bitmap.h ├── BLI_bitmap_draw_2d.h ├── BLI_blenlib.h ├── BLI_boxpack_2d.h ├── BLI_buffer.h ├── BLI_color.hh ├── BLI_compiler_attrs.h ├── BLI_compiler_compat.h ├── BLI_compiler_typecheck.h ├── BLI_console.h ├── BLI_convexhull_2d.h ├── BLI_delaunay_2d.h ├── BLI_dial_2d.c ├── BLI_dial_2d.h ├── BLI_disjoint_set.hh ├── BLI_dlrbTree.h ├── BLI_dot_export.hh ├── BLI_dot_export_attribute_enums.hh ├── BLI_double2.hh ├── BLI_double3.hh ├── BLI_dynlib.h ├── BLI_dynstr.c ├── BLI_dynstr.h ├── BLI_easing.h ├── BLI_edgehash.h ├── BLI_endian_switch.h ├── BLI_endian_switch_inline.h ├── BLI_expr_pylike_eval.h ├── BLI_filelist.c ├── BLI_fileops.h ├── BLI_fileops_types.h ├── BLI_float2.hh ├── BLI_float3.hh ├── BLI_float4x4.hh ├── BLI_fnmatch.h ├── BLI_function_ref.hh ├── BLI_ghash.c ├── BLI_ghash.h ├── BLI_ghash_utils.c ├── BLI_gsqueue.h ├── BLI_hash.h ├── BLI_hash.hh ├── BLI_hash_md5.h ├── BLI_hash_mm2a.h ├── BLI_hash_mm3.h ├── BLI_hash_tables.hh ├── BLI_heap.c ├── BLI_heap.h ├── BLI_heap_simple.c ├── BLI_heap_simple.h ├── BLI_index_mask.hh ├── BLI_index_range.cc ├── BLI_index_range.hh ├── BLI_inplace_priority_queue.hh ├── BLI_iterator.h ├── BLI_jitter_2d.h ├── BLI_kdopbvh.c ├── BLI_kdopbvh.h ├── BLI_kdtree.h ├── BLI_kdtree_impl.h ├── BLI_lasso_2d.h ├── BLI_linear_allocator.hh ├── BLI_link_utils.h ├── BLI_linklist.c ├── BLI_linklist.h ├── BLI_linklist_lockfree.c ├── BLI_linklist_lockfree.h ├── BLI_linklist_stack.h ├── BLI_listbase.h ├── BLI_listbase_wrapper.hh ├── BLI_map.hh ├── BLI_map_slots.hh ├── BLI_math.h ├── BLI_math_base.h ├── BLI_math_base_safe.h ├── BLI_math_bits.h ├── BLI_math_boolean.hh ├── BLI_math_color.h ├── BLI_math_color_blend.h ├── BLI_math_geom.h ├── BLI_math_inline.h ├── BLI_math_interp.h ├── BLI_math_matrix.h ├── BLI_math_mpq.hh ├── BLI_math_rotation.h ├── BLI_math_solvers.h ├── BLI_math_statistics.h ├── BLI_math_vector.h ├── BLI_memarena.c ├── BLI_memarena.h ├── BLI_memblock.c ├── BLI_memblock.h ├── BLI_memiter.c ├── BLI_memiter.h ├── BLI_memory_utils.h ├── BLI_memory_utils.hh ├── BLI_mempool.c ├── BLI_mempool.h ├── BLI_mesh_boolean.hh ├── BLI_mesh_intersect.hh ├── BLI_mmap.c ├── BLI_mmap.h ├── BLI_mpq2.hh ├── BLI_mpq3.hh ├── BLI_multi_value_map.hh ├── BLI_noise.h ├── BLI_path_util.h ├── BLI_polyfill_2d.h ├── BLI_polyfill_2d_beautify.h ├── BLI_probing_strategies.hh ├── BLI_quadric.h ├── BLI_rand.h ├── BLI_rand.hh ├── BLI_rect.h ├── BLI_resource_scope.hh ├── BLI_scanfill.h ├── BLI_session_uuid.h ├── BLI_set.hh ├── BLI_set_slots.hh ├── BLI_simd.h ├── BLI_smallhash.h ├── BLI_sort.h ├── BLI_sort_utils.h ├── BLI_span.hh ├── BLI_stack.h ├── BLI_stack.hh ├── BLI_strict_flags.h ├── BLI_string.h ├── BLI_string_cursor_utf8.h ├── BLI_string_ref.hh ├── BLI_string_search.h ├── BLI_string_utf8.h ├── BLI_string_utils.h ├── BLI_sys_types.h ├── BLI_system.h ├── BLI_task.h ├── BLI_task.hh ├── BLI_threads.h ├── BLI_timecode.h ├── BLI_timeit.hh ├── BLI_timer.c ├── BLI_timer.h ├── BLI_user_counter.hh ├── BLI_utildefines.h ├── BLI_utildefines_iter.h ├── BLI_utildefines_stack.h ├── BLI_utildefines_variadic.h ├── BLI_utility_mixins.hh ├── BLI_uvproject.h ├── BLI_vector.hh ├── BLI_vector_adaptor.hh ├── BLI_vector_set.hh ├── BLI_vector_set_slots.hh ├── BLI_vfontdata.h ├── BLI_virtual_array.hh ├── BLI_virtual_vector_array.hh ├── BLI_voronoi_2d.h ├── BLI_voxel.h ├── BLI_winstuff.h ├── BLO_read_write.h ├── BLT_translation.h ├── CLG_log.h ├── DEG_depsgraph.h ├── DEG_depsgraph_build.h ├── DEG_depsgraph_query.h ├── DLRB_tree.c ├── DNA_ID.h ├── DNA_ID_enums.h ├── DNA_action_types.h ├── DNA_anim_types.h ├── DNA_armature_defaults.h ├── DNA_armature_types.h ├── DNA_asset_defaults.h ├── DNA_asset_types.h ├── DNA_boid_types.h ├── DNA_brush_defaults.h ├── DNA_brush_enums.h ├── DNA_brush_types.h ├── DNA_cachefile_defaults.h ├── DNA_cachefile_types.h ├── DNA_camera_defaults.h ├── DNA_camera_types.h ├── DNA_cloth_types.h ├── DNA_collection_defaults.h ├── DNA_collection_types.h ├── DNA_color_types.h ├── DNA_constraint_types.h ├── DNA_curve_defaults.h ├── DNA_curve_types.h ├── DNA_curveprofile_types.h ├── DNA_customdata_types.h ├── DNA_defaults.h ├── DNA_defs.h ├── DNA_documentation.h ├── DNA_dynamicpaint_types.h ├── DNA_effect_types.h ├── DNA_fileglobal_types.h ├── DNA_fluid_defaults.h ├── DNA_fluid_types.h ├── DNA_freestyle_types.h ├── DNA_genfile.h ├── DNA_gpencil_modifier_defaults.h ├── DNA_gpencil_modifier_types.h ├── DNA_gpencil_types.h ├── DNA_gpu_types.h ├── DNA_hair_defaults.h ├── DNA_hair_types.h ├── DNA_image_defaults.h ├── DNA_image_types.h ├── DNA_ipo_types.h ├── DNA_key_types.h ├── DNA_lattice_defaults.h ├── DNA_lattice_types.h ├── DNA_layer_types.h ├── DNA_light_defaults.h ├── DNA_light_types.h ├── DNA_lightprobe_defaults.h ├── DNA_lightprobe_types.h ├── DNA_lineart_types.h ├── DNA_linestyle_defaults.h ├── DNA_linestyle_types.h ├── DNA_listBase.h ├── DNA_mask_types.h ├── DNA_material_defaults.h ├── DNA_material_types.h ├── DNA_mesh_defaults.h ├── DNA_mesh_types.h ├── DNA_meshdata_types.h ├── DNA_meta_defaults.h ├── DNA_meta_types.h ├── DNA_modifier_defaults.h ├── DNA_modifier_types.h ├── DNA_movieclip_defaults.h ├── DNA_movieclip_types.h ├── DNA_nla_types.h ├── DNA_node_types.h ├── DNA_object_defaults.h ├── DNA_object_enums.h ├── DNA_object_fluidsim_types.h ├── DNA_object_force_types.h ├── DNA_object_types.h ├── DNA_outliner_types.h ├── DNA_packedFile_types.h ├── DNA_particle_defaults.h ├── DNA_particle_types.h ├── DNA_pointcache_types.h ├── DNA_pointcloud_defaults.h ├── DNA_pointcloud_types.h ├── DNA_rigidbody_types.h ├── DNA_scene_defaults.h ├── DNA_scene_types.h ├── DNA_screen_types.h ├── DNA_sdna_types.h ├── DNA_sequence_types.h ├── DNA_session_uuid_types.h ├── DNA_shader_fx_types.h ├── DNA_simulation_defaults.h ├── DNA_simulation_types.h ├── DNA_sound_types.h ├── DNA_space_types.h ├── DNA_speaker_defaults.h ├── DNA_speaker_types.h ├── DNA_text_types.h ├── DNA_texture_defaults.h ├── DNA_texture_types.h ├── DNA_tracking_types.h ├── DNA_userdef_types.h ├── DNA_vec_defaults.h ├── DNA_vec_types.h ├── DNA_vfont_types.h ├── DNA_view2d_types.h ├── DNA_view3d_defaults.h ├── DNA_view3d_enums.h ├── DNA_view3d_types.h ├── DNA_volume_defaults.h ├── DNA_volume_types.h ├── DNA_windowmanager_types.h ├── DNA_workspace_types.h ├── DNA_world_defaults.h ├── DNA_world_types.h ├── DNA_xr_types.h ├── FN_cpp_type.hh ├── FN_generic_pointer.hh ├── FN_generic_span.hh ├── FN_generic_value_map.hh ├── FN_generic_virtual_array.hh ├── GPU_material.h ├── GPU_state.h ├── GPU_texture.h ├── IMB_imbuf.h ├── MEM_guardedalloc.h ├── MakesDNA │ ├── .gitignore │ ├── MakesDNA.vcxproj │ └── MakesDNA.vcxproj.filters ├── NOD_derived_node_tree.hh ├── NOD_geometry.h ├── NOD_geometry_exec.hh ├── NOD_node_tree_ref.hh ├── NOD_socket.h ├── PIL_time.h ├── RNA_access.h ├── RNA_types.h ├── SeaSide │ ├── .gitignore │ ├── SeaSide.sln │ ├── SeaSide.vcxproj │ └── SeaSide.vcxproj.filters ├── array_store.c ├── array_store_utils.c ├── array_utils.c ├── astar.c ├── atomic_ops.h ├── attribute_access_intern.hh ├── basedir.h ├── bitmap.c ├── bitmap_draw_2d.c ├── blenloader │ ├── BLO_blend_defs.h │ ├── BLO_blend_validate.h │ ├── BLO_read_write.h │ ├── BLO_readfile.h │ ├── BLO_undofile.h │ ├── BLO_writefile.h │ ├── CMakeLists.txt │ ├── intern │ │ ├── blend_validate.c │ │ ├── readblenentry.c │ │ ├── readfile.c │ │ ├── readfile.h │ │ ├── readfile_tempload.c │ │ ├── undofile.c │ │ ├── versioning_250.c │ │ ├── versioning_260.c │ │ ├── versioning_270.c │ │ ├── versioning_280.c │ │ ├── versioning_290.c │ │ ├── versioning_300.c │ │ ├── versioning_cycles.c │ │ ├── versioning_defaults.c │ │ ├── versioning_dna.c │ │ ├── versioning_legacy.c │ │ ├── versioning_userdef.c │ │ └── writefile.c │ └── tests │ │ ├── blendfile_load_test.cc │ │ ├── blendfile_loading_base_test.cc │ │ └── blendfile_loading_base_test.h ├── bmesh │ ├── CMakeLists.txt │ ├── bmesh.h │ ├── bmesh_class.h │ ├── bmesh_tools.h │ ├── intern │ │ ├── bmesh_callback_generic.c │ │ ├── bmesh_callback_generic.h │ │ ├── bmesh_construct.c │ │ ├── bmesh_construct.h │ │ ├── bmesh_core.c │ │ ├── bmesh_core.h │ │ ├── bmesh_delete.c │ │ ├── bmesh_delete.h │ │ ├── bmesh_edgeloop.c │ │ ├── bmesh_edgeloop.h │ │ ├── bmesh_error.h │ │ ├── bmesh_inline.h │ │ ├── bmesh_interp.c │ │ ├── bmesh_interp.h │ │ ├── bmesh_iterators.c │ │ ├── bmesh_iterators.h │ │ ├── bmesh_iterators_inline.h │ │ ├── bmesh_log.c │ │ ├── bmesh_log.h │ │ ├── bmesh_marking.c │ │ ├── bmesh_marking.h │ │ ├── bmesh_mesh.c │ │ ├── bmesh_mesh.h │ │ ├── bmesh_mesh_convert.c │ │ ├── bmesh_mesh_convert.h │ │ ├── bmesh_mesh_duplicate.c │ │ ├── bmesh_mesh_duplicate.h │ │ ├── bmesh_mesh_validate.c │ │ ├── bmesh_mesh_validate.h │ │ ├── bmesh_mods.c │ │ ├── bmesh_mods.h │ │ ├── bmesh_opdefines.c │ │ ├── bmesh_operator_api.h │ │ ├── bmesh_operator_api_inline.h │ │ ├── bmesh_operators.c │ │ ├── bmesh_operators.h │ │ ├── bmesh_operators_private.h │ │ ├── bmesh_polygon.c │ │ ├── bmesh_polygon.h │ │ ├── bmesh_polygon_edgenet.c │ │ ├── bmesh_polygon_edgenet.h │ │ ├── bmesh_private.h │ │ ├── bmesh_query.c │ │ ├── bmesh_query.h │ │ ├── bmesh_query_inline.h │ │ ├── bmesh_query_uv.c │ │ ├── bmesh_query_uv.h │ │ ├── bmesh_structure.c │ │ ├── bmesh_structure.h │ │ ├── bmesh_structure_inline.h │ │ ├── bmesh_walkers.c │ │ ├── bmesh_walkers.h │ │ ├── bmesh_walkers_impl.c │ │ └── bmesh_walkers_private.h │ ├── operators │ │ ├── bmo_beautify.c │ │ ├── bmo_bevel.c │ │ ├── bmo_bisect_plane.c │ │ ├── bmo_bridge.c │ │ ├── bmo_connect.c │ │ ├── bmo_connect_concave.c │ │ ├── bmo_connect_nonplanar.c │ │ ├── bmo_connect_pair.c │ │ ├── bmo_create.c │ │ ├── bmo_dissolve.c │ │ ├── bmo_dupe.c │ │ ├── bmo_edgenet.c │ │ ├── bmo_extrude.c │ │ ├── bmo_fill_attribute.c │ │ ├── bmo_fill_edgeloop.c │ │ ├── bmo_fill_grid.c │ │ ├── bmo_fill_holes.c │ │ ├── bmo_hull.c │ │ ├── bmo_inset.c │ │ ├── bmo_join_triangles.c │ │ ├── bmo_mesh_convert.c │ │ ├── bmo_mirror.c │ │ ├── bmo_normals.c │ │ ├── bmo_offset_edgeloops.c │ │ ├── bmo_planar_faces.c │ │ ├── bmo_poke.c │ │ ├── bmo_primitive.c │ │ ├── bmo_removedoubles.c │ │ ├── bmo_rotate_edges.c │ │ ├── bmo_smooth_laplacian.c │ │ ├── bmo_split_edges.c │ │ ├── bmo_subdivide.c │ │ ├── bmo_subdivide_edgering.c │ │ ├── bmo_symmetrize.c │ │ ├── bmo_triangulate.c │ │ ├── bmo_unsubdivide.c │ │ ├── bmo_utils.c │ │ └── bmo_wireframe.c │ ├── tests │ │ └── bmesh_core_test.cc │ └── tools │ │ ├── bmesh_beautify.c │ │ ├── bmesh_beautify.h │ │ ├── bmesh_bevel.c │ │ ├── bmesh_bevel.h │ │ ├── bmesh_bisect_plane.c │ │ ├── bmesh_bisect_plane.h │ │ ├── bmesh_boolean.cc │ │ ├── bmesh_boolean.h │ │ ├── bmesh_decimate.h │ │ ├── bmesh_decimate_collapse.c │ │ ├── bmesh_decimate_dissolve.c │ │ ├── bmesh_decimate_unsubdivide.c │ │ ├── bmesh_edgenet.c │ │ ├── bmesh_edgenet.h │ │ ├── bmesh_edgesplit.c │ │ ├── bmesh_edgesplit.h │ │ ├── bmesh_intersect.c │ │ ├── bmesh_intersect.h │ │ ├── bmesh_intersect_edges.c │ │ ├── bmesh_intersect_edges.h │ │ ├── bmesh_path.c │ │ ├── bmesh_path.h │ │ ├── bmesh_path_region.c │ │ ├── bmesh_path_region.h │ │ ├── bmesh_path_region_uv.c │ │ ├── bmesh_path_region_uv.h │ │ ├── bmesh_path_uv.c │ │ ├── bmesh_path_uv.h │ │ ├── bmesh_region_match.c │ │ ├── bmesh_region_match.h │ │ ├── bmesh_separate.c │ │ ├── bmesh_separate.h │ │ ├── bmesh_triangulate.c │ │ ├── bmesh_triangulate.h │ │ ├── bmesh_wireframe.c │ │ └── bmesh_wireframe.h ├── boxpack_2d.c ├── buffer.c ├── build_config.h ├── ccall.h ├── convexhull_2d.c ├── curve_fit_nd │ ├── CMakeLists.txt │ ├── README.blender │ ├── curve_fit_nd.h │ └── intern │ │ ├── curve_fit_corners_detect.c │ │ ├── curve_fit_cubic.c │ │ ├── curve_fit_cubic_refit.c │ │ ├── curve_fit_inline.h │ │ ├── generic_alloc_impl.h │ │ ├── generic_heap.c │ │ └── generic_heap.h ├── delaunay_2d.cc ├── dna.c ├── dna │ ├── MakesDNA.exe │ ├── basedir.h │ ├── dna.c │ ├── dna_type_offsets.h │ └── gen.bat ├── dna_defaults.c ├── dna_genfile.c ├── dna_rename_defs.h ├── dna_struct_offsets.h ├── dna_utils.c ├── dna_utils.h ├── dot_export.cc ├── dynlib.c ├── easing.c ├── edgehash.c ├── eigen_capi.h ├── eigenvalues.cc ├── eigenvalues.h ├── endian_switch.c ├── expr_pylike_eval.c ├── fileops.c ├── fnmatch.c ├── freetypefont.c ├── gsqueue.c ├── hash_md5.c ├── hash_mm2a.c ├── hash_mm3.c ├── ikplugin │ ├── BIK_api.h │ ├── CMakeLists.txt │ └── intern │ │ ├── ikplugin_api.c │ │ ├── ikplugin_api.h │ │ ├── iksolver_plugin.c │ │ ├── iksolver_plugin.h │ │ ├── itasc_plugin.cpp │ │ └── itasc_plugin.h ├── intern │ ├── CCGSubSurf.c │ ├── CCGSubSurf.h │ ├── CCGSubSurf_inline.h │ ├── CCGSubSurf_intern.h │ ├── CCGSubSurf_legacy.c │ ├── CCGSubSurf_util.c │ ├── DerivedMesh.cc │ ├── action.c │ ├── action_mirror.c │ ├── addon.c │ ├── anim_data.c │ ├── anim_path.c │ ├── anim_sys.c │ ├── anim_visualization.c │ ├── appdir.c │ ├── armature.c │ ├── armature_deform.c │ ├── armature_pose.cc │ ├── armature_test.cc │ ├── armature_update.c │ ├── asset.cc │ ├── atomic_ops_ext.h │ ├── atomic_ops_msvc.h │ ├── atomic_ops_unix.h │ ├── atomic_ops_utils.h │ ├── attribute.c │ ├── attribute_access.cc │ ├── attribute_access_intern.hh │ ├── attribute_math.cc │ ├── autoexec.c │ ├── blender.c │ ├── blender_copybuffer.c │ ├── blender_undo.c │ ├── blender_user_menu.c │ ├── blendfile.c │ ├── boids.c │ ├── bpath.c │ ├── brush.c │ ├── bvhutils.c │ ├── cachefile.c │ ├── callbacks.c │ ├── camera.c │ ├── cdderivedmesh.c │ ├── cloth.c │ ├── collection.c │ ├── collision.c │ ├── colorband.c │ ├── colortools.c │ ├── constraint.c │ ├── context.c │ ├── crazyspace.c │ ├── cryptomatte.cc │ ├── cryptomatte_test.cc │ ├── curve.c │ ├── curve_bevel.c │ ├── curve_convert.c │ ├── curve_decimate.c │ ├── curve_deform.c │ ├── curveprofile.c │ ├── customdata.c │ ├── customdata_file.c │ ├── data_transfer.c │ ├── data_transfer_intern.h │ ├── deform.c │ ├── displist.cc │ ├── displist_tangent.c │ ├── dynamicpaint.c │ ├── editlattice.c │ ├── editmesh.c │ ├── editmesh_bvh.c │ ├── editmesh_cache.c │ ├── editmesh_tangent.c │ ├── effect.c │ ├── fcurve.c │ ├── fcurve_cache.c │ ├── fcurve_driver.c │ ├── fcurve_test.cc │ ├── fluid.c │ ├── fmodifier.c │ ├── font.c │ ├── freestyle.c │ ├── geometry_component_instances.cc │ ├── geometry_component_mesh.cc │ ├── geometry_component_pointcloud.cc │ ├── geometry_component_volume.cc │ ├── geometry_set.cc │ ├── geometry_set_instances.cc │ ├── gpencil.c │ ├── gpencil_curve.c │ ├── gpencil_geom.c │ ├── gpencil_modifier.c │ ├── hair.c │ ├── icons.cc │ ├── icons_rasterize.c │ ├── idprop.c │ ├── idprop_utils.c │ ├── idtype.c │ ├── image.c │ ├── image_gen.c │ ├── image_gpu.c │ ├── image_save.c │ ├── ipo.c │ ├── kelvinlet.c │ ├── key.c │ ├── keyconfig.c │ ├── lattice.c │ ├── lattice_deform.c │ ├── lattice_deform_test.cc │ ├── layer.c │ ├── layer_test.cc │ ├── layer_utils.c │ ├── leak_detector.cc │ ├── lib_id.c │ ├── lib_id_delete.c │ ├── lib_intern.h │ ├── lib_override.c │ ├── lib_query.c │ ├── lib_remap.c │ ├── library.c │ ├── light.c │ ├── lightprobe.c │ ├── linestyle.c │ ├── main.c │ ├── main_idmap.c │ ├── mallocn.c │ ├── mallocn_guarded_impl.c │ ├── mallocn_inline.h │ ├── mallocn_intern.h │ ├── mallocn_lockfree_impl.c │ ├── mask.c │ ├── mask_evaluate.c │ ├── mask_rasterize.c │ ├── material.c │ ├── math_base_inline.c │ ├── math_color_inline.c │ ├── math_geom_inline.c │ ├── math_vector_inline.c │ ├── mball.c │ ├── mball_tessellate.c │ ├── mesh.c │ ├── mesh_boolean_convert.cc │ ├── mesh_convert.c │ ├── mesh_evaluate.c │ ├── mesh_fair.cc │ ├── mesh_iterators.c │ ├── mesh_mapping.c │ ├── mesh_merge.c │ ├── mesh_mirror.c │ ├── mesh_remap.c │ ├── mesh_remesh_voxel.c │ ├── mesh_runtime.c │ ├── mesh_sample.cc │ ├── mesh_tangent.c │ ├── mesh_validate.c │ ├── mesh_validate.cc │ ├── mesh_wrapper.c │ ├── modifier.c │ ├── movieclip.c │ ├── multires.c │ ├── multires_inline.h │ ├── multires_reshape.c │ ├── multires_reshape.h │ ├── multires_reshape_apply_base.c │ ├── multires_reshape_ccg.c │ ├── multires_reshape_smooth.c │ ├── multires_reshape_subdivide.c │ ├── multires_reshape_util.c │ ├── multires_reshape_vertcos.c │ ├── multires_subdiv.c │ ├── multires_unsubdivide.c │ ├── multires_unsubdivide.h │ ├── multires_versioning.c │ ├── nla.c │ ├── node.cc │ ├── node_ui_storage.cc │ ├── object.c │ ├── object_deform.c │ ├── object_dupli.cc │ ├── object_facemap.c │ ├── object_update.c │ ├── ocean.c │ ├── ocean_intern.h │ ├── ocean_spectrum.c │ ├── outliner_treehash.c │ ├── packedFile.c │ ├── paint.c │ ├── paint_toolslots.c │ ├── particle.c │ ├── particle_child.c │ ├── particle_distribute.c │ ├── particle_system.c │ ├── pbvh.c │ ├── pbvh_bmesh.c │ ├── pbvh_intern.h │ ├── pointcache.c │ ├── pointcloud.cc │ ├── preferences.c │ ├── report.c │ ├── rigidbody.c │ ├── scene.c │ ├── screen.c │ ├── shader_fx.c │ ├── shrinkwrap.c │ ├── simulation.cc │ ├── softbody.c │ ├── sound.c │ ├── speaker.c │ ├── studiolight.c │ ├── subdiv.c │ ├── subdiv_ccg.c │ ├── subdiv_ccg_mask.c │ ├── subdiv_ccg_material.c │ ├── subdiv_converter.c │ ├── subdiv_converter.h │ ├── subdiv_converter_mesh.c │ ├── subdiv_deform.c │ ├── subdiv_displacement.c │ ├── subdiv_displacement_multires.c │ ├── subdiv_eval.c │ ├── subdiv_foreach.c │ ├── subdiv_inline.h │ ├── subdiv_mesh.c │ ├── subdiv_stats.c │ ├── subdiv_topology.c │ ├── subsurf_ccg.c │ ├── text.c │ ├── text_suggestions.c │ ├── texture.c │ ├── tracking.c │ ├── tracking_auto.c │ ├── tracking_detect.c │ ├── tracking_plane_tracker.c │ ├── tracking_region_tracker.c │ ├── tracking_solver.c │ ├── tracking_stabilize.c │ ├── tracking_test.cc │ ├── tracking_util.c │ ├── undo_system.c │ ├── unit.c │ ├── volume.cc │ ├── volume_render.cc │ ├── volume_to_mesh.cc │ ├── workspace.c │ ├── world.c │ ├── writeavi.c │ └── writeffmpeg.c ├── jitter_2d.c ├── kdtree_1d.c ├── kdtree_2d.c ├── kdtree_3d.c ├── kdtree_4d.c ├── kdtree_impl.h ├── lasso_2d.c ├── leak_detector.cc ├── lib_id.c ├── lib_id_delete.c ├── lib_intern.h ├── lib_override.c ├── lib_query.c ├── lib_remap.c ├── linear_solver.cc ├── linear_solver.h ├── list_sort_impl.h ├── listbase.c ├── makesdna.c ├── mallocn.c ├── mallocn_guarded_impl.c ├── mallocn_inline.h ├── mallocn_intern.h ├── mallocn_lockfree_impl.c ├── math_base.c ├── math_base_inline.c ├── math_base_safe_inline.c ├── math_bits_inline.c ├── math_boolean.cc ├── math_color.c ├── math_color_blend_inline.c ├── math_color_inline.c ├── math_geom.c ├── math_geom_inline.c ├── math_interp.c ├── math_matrix.c ├── math_rotation.c ├── math_solvers.c ├── math_statistics.c ├── math_vec.cc ├── math_vector.c ├── math_vector_inline.c ├── matrix.cc ├── matrix.h ├── memory_utils.c ├── mesh_boolean.cc ├── mesh_intersect.cc ├── nla_private.h ├── node_geo_transform.cc ├── node_geometry_util.hh ├── node_util.h ├── noise.c ├── numaapi.c ├── numaapi.h ├── numaapi_win32.c ├── particle_private.h ├── path_util.c ├── polyfill_2d.c ├── polyfill_2d_beautify.c ├── pthread │ ├── _ptw32.h │ ├── pthread.h │ ├── pthreadVC3.lib │ ├── sched.h │ └── semaphore.h ├── quadric.c ├── rand.cc ├── rct.c ├── scanfill.c ├── scanfill_utils.c ├── session_uuid.c ├── smallhash.c ├── sort.c ├── sort_utils.c ├── stack.c ├── storage.c ├── storage_apple.mm ├── string.c ├── string_cursor_utf8.c ├── string_search.cc ├── string_utf8.c ├── string_utils.c ├── svd.cc ├── svd.h ├── system.c ├── system_win32.c ├── task_graph.cc ├── task_iterator.c ├── task_pool.cc ├── task_range.cc ├── task_scheduler.cc ├── threads.cc ├── time.c ├── timecode.c ├── timeit.cc ├── tracking_private.h ├── utf_winfunc.c ├── utf_winfunc.h ├── utfconv.c ├── utfconv.h ├── uvproject.c ├── voronoi_2d.c ├── voxel.c ├── wcwidth.c ├── wcwidth.h ├── winstuff.c ├── winstuff_dir.c └── zlib │ ├── libz_st.lib │ ├── libz_st_d.lib │ ├── zconf.h │ └── zlib.h ├── __init__.py ├── geometry_node_group_empty_new.py ├── images ├── console.png ├── diff.png └── nodeconsole.png ├── node_group_items.py ├── readmemory.py └── reference ├── custom_nodes.py ├── geometry_nodes.py ├── nodeitems_builtins.py └── nodeitems_utils.py /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | -------------------------------------------------------------------------------- /MyCustomSocket.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from bpy.types import NodeTree, Node, NodeSocket 3 | 4 | # Custom socket type 5 | class MyCustomSocket(NodeSocket): 6 | # Description string 7 | '''Custom node socket type''' 8 | # Optional identifier string. If not explicitly defined, the python class name is used. 9 | bl_idname = 'CustomSocketType' 10 | # Label for nice name display 11 | bl_label = "Custom Node Socket" 12 | 13 | # Enum items list 14 | my_items = ( 15 | ('DOWN', "Down", "Where your feet are"), 16 | ('UP', "Up", "Where your head should be"), 17 | ('LEFT', "Left", "Not right"), 18 | ('RIGHT', "Right", "Not left"), 19 | ) 20 | 21 | my_enum_prop: bpy.props.EnumProperty( 22 | name="Direction", 23 | description="Just an example", 24 | items=my_items, 25 | default='UP', 26 | ) 27 | 28 | # Optional function for drawing the socket input value 29 | def draw(self, context, layout, node, text): 30 | if self.is_output or self.is_linked: 31 | layout.label(text=text) 32 | else: 33 | layout.prop(self, "my_enum_prop", text=text) 34 | 35 | # Socket color 36 | def draw_color(self, context, node): 37 | return (1.0, 0.4, 0.216, 0.5) 38 | 39 | -------------------------------------------------------------------------------- /MyCustomTree.py: -------------------------------------------------------------------------------- 1 | from bpy.types import NodeTree, Node, NodeSocket 2 | 3 | # Derived from the NodeTree base type, similar to Menu, Operator, Panel, etc. 4 | class MyCustomTree(NodeTree): 5 | # Description string 6 | '''A custom node tree type that will show up in the editor type list''' 7 | # Optional identifier string. If not explicitly defined, the python class name is used. 8 | bl_idname = 'CustomTreeType' 9 | # Label for nice name display 10 | bl_label = "Custom Node Tree" 11 | # Icon identifier 12 | bl_icon = 'NODETREE' 13 | -------------------------------------------------------------------------------- /MyCustomTreeNode.py: -------------------------------------------------------------------------------- 1 | # Mix-in class for all custom nodes in this tree type. 2 | # Defines a poll function to enable instantiation. 3 | class MyCustomTreeNode: 4 | @classmethod 5 | def poll(cls, ntree): 6 | return ntree.bl_idname == 'CustomTreeType' 7 | -------------------------------------------------------------------------------- /MyNodeCategory.py: -------------------------------------------------------------------------------- 1 | from nodeitems_utils import NodeCategory, NodeItem 2 | 3 | # our own base class with an appropriate poll function, 4 | # so the categories only show up in our own tree type 5 | class MyNodeCategory(NodeCategory): 6 | @classmethod 7 | def poll(cls, context): 8 | return context.space_data.tree_type == 'CustomTreeType' 9 | -------------------------------------------------------------------------------- /SeaSide/BKE_addon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | #pragma once 17 | 18 | /** \file 19 | * \ingroup bke 20 | */ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | struct ListBase; 27 | struct bAddon; 28 | 29 | #ifdef __RNA_TYPES_H__ 30 | typedef struct bAddonPrefType { 31 | /* type info */ 32 | char idname[64]; /* best keep the same size as #BKE_ST_MAXNAME */ 33 | 34 | /* RNA integration */ 35 | ExtensionRNA rna_ext; 36 | } bAddonPrefType; 37 | 38 | #else 39 | typedef struct bAddonPrefType bAddonPrefType; 40 | #endif 41 | 42 | bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet); 43 | void BKE_addon_pref_type_add(bAddonPrefType *apt); 44 | void BKE_addon_pref_type_remove(const bAddonPrefType *apt); 45 | 46 | void BKE_addon_pref_type_init(void); 47 | void BKE_addon_pref_type_free(void); 48 | 49 | struct bAddon *BKE_addon_new(void); 50 | struct bAddon *BKE_addon_find(struct ListBase *addon_list, const char *module); 51 | struct bAddon *BKE_addon_ensure(struct ListBase *addon_list, const char *module); 52 | bool BKE_addon_remove_safe(struct ListBase *addon_list, const char *module); 53 | void BKE_addon_free(struct bAddon *addon); 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | -------------------------------------------------------------------------------- /SeaSide/BKE_autoexec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | #pragma once 17 | 18 | /** \file 19 | * \ingroup bke 20 | */ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | bool BKE_autoexec_match(const char *path); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /SeaSide/BKE_blender_copybuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | #pragma once 17 | 18 | /** \file 19 | * \ingroup bke 20 | */ 21 | 22 | #include "BLI_sys_types.h" 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | struct ID; 29 | struct Main; 30 | struct ReportList; 31 | struct bContext; 32 | 33 | /* copybuffer (wrapper for BKE_blendfile_write_partial) */ 34 | void BKE_copybuffer_begin(struct Main *bmain_src); 35 | void BKE_copybuffer_tag_ID(struct ID *id); 36 | bool BKE_copybuffer_save(struct Main *bmain_src, const char *filename, struct ReportList *reports); 37 | bool BKE_copybuffer_read(struct Main *bmain_dst, 38 | const char *libname, 39 | struct ReportList *reports, 40 | const uint64_t id_types_mask); 41 | int BKE_copybuffer_paste(struct bContext *C, 42 | const char *libname, 43 | const short flag, 44 | struct ReportList *reports, 45 | const uint64_t id_types_mask); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /SeaSide/BKE_blender_undo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | #pragma once 17 | 18 | /** \file 19 | * \ingroup bke 20 | */ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | struct Main; 27 | struct MemFileUndoData; 28 | struct bContext; 29 | 30 | enum eUndoStepDir; 31 | 32 | #define BKE_UNDO_STR_MAX 64 33 | 34 | struct MemFileUndoData *BKE_memfile_undo_encode(struct Main *bmain, 35 | struct MemFileUndoData *mfu_prev); 36 | bool BKE_memfile_undo_decode(struct MemFileUndoData *mfu, 37 | const enum eUndoStepDir undo_direction, 38 | const bool use_old_bmain_data, 39 | struct bContext *C); 40 | void BKE_memfile_undo_free(struct MemFileUndoData *mfu); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SeaSide/BKE_blender_user_menu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct ListBase; 28 | struct bUserMenu; 29 | struct bUserMenuItem; 30 | 31 | struct bUserMenu *BKE_blender_user_menu_find(struct ListBase *lb, 32 | char space_type, 33 | const char *context); 34 | struct bUserMenu *BKE_blender_user_menu_ensure(struct ListBase *lb, 35 | char space_type, 36 | const char *context); 37 | 38 | struct bUserMenuItem *BKE_blender_user_menu_item_add(struct ListBase *lb, int type); 39 | void BKE_blender_user_menu_item_free(struct bUserMenuItem *umi); 40 | void BKE_blender_user_menu_item_free_list(struct ListBase *lb); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SeaSide/BKE_cdderivedmesh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2006 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | * \section aboutcdderivedmesh CDDerivedMesh interface 23 | * CDDerivedMesh (CD = Custom Data) is a DerivedMesh backend which stores 24 | * mesh elements (vertices, edges and faces) as layers of custom element data. 25 | * 26 | * \note This is deprecated & should eventually be removed. 27 | */ 28 | 29 | #pragma once 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | struct DerivedMesh; 36 | struct Mesh; 37 | 38 | /* creates a CDDerivedMesh from the given Mesh, this will reference the 39 | * original data in Mesh, but it is safe to apply vertex coordinates or 40 | * calculate normals as those functions will automatically create new 41 | * data to not overwrite the original. */ 42 | struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh); 43 | 44 | /* Copies the given DerivedMesh with verts, faces & edges stored as 45 | * custom element data. */ 46 | struct DerivedMesh *CDDM_copy(struct DerivedMesh *source); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /SeaSide/BKE_colorband.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | #pragma once 20 | 21 | /** \file 22 | * \ingroup bke 23 | */ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | struct ColorBand; 30 | 31 | /** #ColorBand.data length. */ 32 | #define MAXCOLORBAND 32 33 | 34 | void BKE_colorband_init(struct ColorBand *coba, bool rangetype); 35 | void BKE_colorband_init_from_table_rgba(struct ColorBand *coba, 36 | const float (*array)[4], 37 | const int array_len, 38 | bool filter_sample); 39 | struct ColorBand *BKE_colorband_add(bool rangetype); 40 | bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4]); 41 | void BKE_colorband_evaluate_table_rgba(const struct ColorBand *coba, float **array, int *size); 42 | struct CBData *BKE_colorband_element_add(struct ColorBand *coba, float position); 43 | bool BKE_colorband_element_remove(struct ColorBand *coba, int index); 44 | void BKE_colorband_update_sort(struct ColorBand *coba); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /SeaSide/BKE_displist_tangent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void BKE_displist_tangent_calc(const DispList *dl, float (*fnormals)[3], float (**r_tangent)[4]); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /SeaSide/BKE_editlattice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bke 19 | */ 20 | 21 | #pragma once 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct Object; 28 | 29 | void BKE_editlattice_free(struct Object *ob); 30 | void BKE_editlattice_make(struct Object *obedit); 31 | void BKE_editlattice_load(struct Object *obedit); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /SeaSide/BKE_editmesh_cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct BMEditMesh; 28 | struct EditMeshData; 29 | 30 | void BKE_editmesh_cache_ensure_poly_normals(struct BMEditMesh *em, struct EditMeshData *emd); 31 | void BKE_editmesh_cache_ensure_vert_normals(struct BMEditMesh *em, struct EditMeshData *emd); 32 | 33 | void BKE_editmesh_cache_ensure_poly_centers(struct BMEditMesh *em, struct EditMeshData *emd); 34 | 35 | bool BKE_editmesh_cache_calc_minmax(struct BMEditMesh *em, 36 | struct EditMeshData *emd, 37 | float min[3], 38 | float max[3]); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /SeaSide/BKE_editmesh_tangent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void BKE_editmesh_loop_tangent_calc(BMEditMesh *em, 28 | bool calc_active_tangent, 29 | const char (*tangent_names)[MAX_NAME], 30 | int tangent_names_len, 31 | const float (*poly_normals)[3], 32 | const float (*loop_normals)[3], 33 | const float (*vert_orco)[3], 34 | CustomData *dm_loopdata_out, 35 | const uint dm_loopdata_out_len, 36 | short *tangent_mask_curr_p); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SeaSide/BKE_geometry_set.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct Collection; 28 | struct GeometrySet; 29 | struct Object; 30 | 31 | /* Each geometry component has a specific type. The type determines what kind of data the component 32 | * stores. Functions modifying a geometry will usually just modify a subset of the component types. 33 | */ 34 | typedef enum GeometryComponentType { 35 | GEO_COMPONENT_TYPE_MESH = 0, 36 | GEO_COMPONENT_TYPE_POINT_CLOUD = 1, 37 | GEO_COMPONENT_TYPE_INSTANCES = 2, 38 | GEO_COMPONENT_TYPE_VOLUME = 3, 39 | } GeometryComponentType; 40 | 41 | void BKE_geometry_set_free(struct GeometrySet *geometry_set); 42 | 43 | bool BKE_geometry_set_has_instances(const struct GeometrySet *geometry_set); 44 | 45 | typedef enum InstancedDataType { 46 | INSTANCE_DATA_TYPE_OBJECT = 0, 47 | INSTANCE_DATA_TYPE_COLLECTION = 1, 48 | } InstancedDataType; 49 | 50 | typedef struct InstancedData { 51 | InstancedDataType type; 52 | union { 53 | struct Object *object; 54 | struct Collection *collection; 55 | } data; 56 | } InstancedData; 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | -------------------------------------------------------------------------------- /SeaSide/BKE_ipo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | #pragma once 20 | 21 | /** \file 22 | * \ingroup bke 23 | */ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | struct Main; 30 | 31 | void do_versions_ipos_to_animato(struct Main *main); 32 | 33 | /* --------------------- xxx stuff ------------------------ */ 34 | 35 | #ifdef __cplusplus 36 | }; 37 | #endif 38 | -------------------------------------------------------------------------------- /SeaSide/BKE_library.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | #pragma once 20 | 21 | /** \file 22 | * \ingroup bke 23 | * 24 | * API to manage `Library` data-blocks. 25 | */ 26 | 27 | #include "BLI_compiler_attrs.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | struct Library; 34 | struct Main; 35 | 36 | void BKE_library_filepath_set(struct Main *bmain, struct Library *lib, const char *filepath); 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /SeaSide/BKE_light.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bke 24 | * \brief General operations, lookup, etc. for blender lights. 25 | */ 26 | 27 | #include "BLI_compiler_attrs.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | struct Depsgraph; 34 | struct Light; 35 | struct Main; 36 | 37 | struct Light *BKE_light_add(struct Main *bmain, const char *name) ATTR_WARN_UNUSED_RESULT; 38 | 39 | void BKE_light_eval(struct Depsgraph *depsgraph, struct Light *la); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SeaSide/BKE_lightprobe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bke 24 | * \brief General operations for probes. 25 | */ 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct LightProbe; 32 | struct Main; 33 | 34 | void BKE_lightprobe_type_set(struct LightProbe *probe, const short lightprobe_type); 35 | void *BKE_lightprobe_add(struct Main *bmain, const char *name); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SeaSide/BKE_mball_tessellate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | #pragma once 17 | 18 | /** \file 19 | * \ingroup bke 20 | */ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | struct Depsgraph; 27 | struct Object; 28 | struct Scene; 29 | 30 | void BKE_mball_polygonize(struct Depsgraph *depsgraph, 31 | struct Scene *scene, 32 | struct Object *ob, 33 | struct ListBase *dispbase); 34 | 35 | void BKE_mball_cubeTable_free(void); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SeaSide/BKE_mesh_boolean_convert.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2019 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bke 24 | */ 25 | 26 | #include "BLI_array.hh" 27 | #include "BLI_float4x4.hh" 28 | #include "BLI_mesh_boolean.hh" 29 | #include "BLI_span.hh" 30 | 31 | struct Mesh; 32 | 33 | namespace blender::meshintersect { 34 | 35 | Mesh *direct_mesh_boolean(blender::Span meshes, 36 | blender::Span obmats, 37 | const float4x4 &target_transform, 38 | blender::Span> material_remaps, 39 | const bool use_self, 40 | const bool hole_tolerant, 41 | const int boolean_mode); 42 | 43 | } // namespace blender::meshintersect 44 | -------------------------------------------------------------------------------- /SeaSide/BKE_mesh_sample.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | */ 22 | 23 | #include "FN_generic_virtual_array.hh" 24 | 25 | #include "BLI_float3.hh" 26 | 27 | #include "BKE_attribute.h" 28 | 29 | struct Mesh; 30 | 31 | namespace blender::bke::mesh_surface_sample { 32 | 33 | using fn::CPPType; 34 | using fn::GMutableSpan; 35 | using fn::GSpan; 36 | using fn::GVArray; 37 | 38 | void sample_point_attribute(const Mesh &mesh, 39 | Span looptri_indices, 40 | Span bary_coords, 41 | const GVArray &data_in, 42 | GMutableSpan data_out); 43 | 44 | void sample_corner_attribute(const Mesh &mesh, 45 | Span looptri_indices, 46 | Span bary_coords, 47 | const GVArray &data_in, 48 | GMutableSpan data_out); 49 | 50 | void sample_face_attribute(const Mesh &mesh, 51 | Span looptri_indices, 52 | const GVArray &data_in, 53 | GMutableSpan data_out); 54 | 55 | } // namespace blender::bke::mesh_surface_sample 56 | -------------------------------------------------------------------------------- /SeaSide/BKE_mesh_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2020 by Blender Foundation 17 | * All rights reserved. 18 | */ 19 | #pragma once 20 | 21 | /** \file 22 | * \ingroup bke 23 | */ 24 | 25 | typedef enum eMeshBatchDirtyMode { 26 | BKE_MESH_BATCH_DIRTY_ALL = 0, 27 | BKE_MESH_BATCH_DIRTY_SELECT, 28 | BKE_MESH_BATCH_DIRTY_SELECT_PAINT, 29 | BKE_MESH_BATCH_DIRTY_SHADING, 30 | BKE_MESH_BATCH_DIRTY_UVEDIT_ALL, 31 | BKE_MESH_BATCH_DIRTY_UVEDIT_SELECT, 32 | } eMeshBatchDirtyMode; 33 | -------------------------------------------------------------------------------- /SeaSide/BKE_simulation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | struct Depsgraph; 24 | struct Main; 25 | struct Scene; 26 | struct Simulation; 27 | 28 | void *BKE_simulation_add(struct Main *bmain, const char *name); 29 | 30 | void BKE_simulation_data_update(struct Depsgraph *depsgraph, 31 | struct Scene *scene, 32 | struct Simulation *simulation); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /SeaSide/BKE_speaker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bke 21 | * \brief General operations for speakers. 22 | */ 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | struct Main; 29 | 30 | void *BKE_speaker_add(struct Main *bmain, const char *name); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /SeaSide/BKE_subdiv_deform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2019 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "BLI_sys_types.h" 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | struct Mesh; 33 | struct Subdiv; 34 | 35 | /* Special version of subdivision surface which calculates final positions for coarse vertices. 36 | * Effectively is pushing the coarse positions to the limit surface. 37 | * 38 | * One of the usage examples is calculation of crazy space of subdivision modifier, allowing to 39 | * paint on a deformed mesh with sub-surf on it. 40 | * 41 | * vertex_cos are supposed to hold coordinates of the coarse mesh. */ 42 | void BKE_subdiv_deform_coarse_vertices(struct Subdiv *subdiv, 43 | const struct Mesh *coarse_mesh, 44 | float (*vertex_cos)[3], 45 | int num_verts); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /SeaSide/BKE_subdiv_mesh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #pragma once 25 | 26 | #include "BLI_sys_types.h" 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | struct Mesh; 33 | struct Subdiv; 34 | 35 | typedef struct SubdivToMeshSettings { 36 | /* Resolution at which regular ptex (created for quad polygon) are being 37 | * evaluated. This defines how many vertices final mesh will have: every 38 | * regular ptex has resolution^2 vertices. Special (irregular, or ptex 39 | * created for a corner of non-quad polygon) will have resolution of 40 | * `resolution - 1`. 41 | */ 42 | int resolution; 43 | /* When true, only edges emitted from coarse ones will be displayed. */ 44 | bool use_optimal_display; 45 | } SubdivToMeshSettings; 46 | 47 | /* Create real hi-res mesh from subdivision, all geometry is "real". */ 48 | struct Mesh *BKE_subdiv_to_mesh(struct Subdiv *subdiv, 49 | const SubdivToMeshSettings *settings, 50 | const struct Mesh *coarse_mesh); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | -------------------------------------------------------------------------------- /SeaSide/BKE_subdiv_topology.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2019 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #pragma once 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | struct Subdiv; 31 | 32 | int BKE_subdiv_topology_num_fvar_layers_get(const struct Subdiv *subdiv); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /SeaSide/BKE_volume_to_mesh.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #include "DNA_modifier_types.h" 18 | 19 | #ifdef WITH_OPENVDB 20 | # include 21 | #endif 22 | 23 | struct Mesh; 24 | 25 | namespace blender::bke { 26 | 27 | struct VolumeToMeshResolution { 28 | VolumeToMeshResolutionMode mode; 29 | union { 30 | float voxel_size; 31 | float voxel_amount; 32 | } settings; 33 | }; 34 | 35 | #ifdef WITH_OPENVDB 36 | struct Mesh *volume_to_mesh(const openvdb::GridBase &grid, 37 | const VolumeToMeshResolution &resolution, 38 | const float threshold, 39 | const float adaptivity); 40 | #endif 41 | 42 | } // namespace blender::bke 43 | -------------------------------------------------------------------------------- /SeaSide/BKE_world.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | #pragma once 20 | 21 | /** \file 22 | * \ingroup bke 23 | */ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | struct Depsgraph; 30 | struct Main; 31 | struct World; 32 | 33 | struct World *BKE_world_add(struct Main *bmain, const char *name); 34 | void BKE_world_eval(struct Depsgraph *depsgraph, struct World *world); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /SeaSide/BLI_alloca.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | * 22 | * Defines alloca and utility macro BLI_array_alloca 23 | */ 24 | 25 | /* BLI_array_alloca / alloca */ 26 | 27 | #include 28 | 29 | #if defined(__GNUC__) || defined(__clang__) 30 | # if defined(__cplusplus) && (__cplusplus > 199711L) 31 | # define BLI_array_alloca(arr, realsize) (decltype(arr)) alloca(sizeof(*arr) * (realsize)) 32 | # else 33 | # define BLI_array_alloca(arr, realsize) (typeof(arr)) alloca(sizeof(*arr) * (realsize)) 34 | # endif 35 | #else 36 | # define BLI_array_alloca(arr, realsize) alloca(sizeof(*arr) * (realsize)) 37 | #endif 38 | -------------------------------------------------------------------------------- /SeaSide/BLI_array_store_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct BArrayStore; 28 | 29 | struct BArrayStore_AtSize { 30 | struct BArrayStore **stride_table; 31 | int stride_table_len; 32 | }; 33 | 34 | BArrayStore *BLI_array_store_at_size_ensure(struct BArrayStore_AtSize *bs_stride, 35 | const int stride, 36 | const int chunk_size); 37 | 38 | BArrayStore *BLI_array_store_at_size_get(struct BArrayStore_AtSize *bs_stride, const int stride); 39 | 40 | void BLI_array_store_at_size_clear(struct BArrayStore_AtSize *bs_stride); 41 | 42 | void BLI_array_store_at_size_calc_memory_usage(struct BArrayStore_AtSize *bs_stride, 43 | size_t *r_size_expanded, 44 | size_t *r_size_compacted); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /SeaSide/BLI_asan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /* Clang defines this. */ 20 | #ifndef __has_feature 21 | # define __has_feature(x) 0 22 | #endif 23 | 24 | #if (defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)) && !defined(_MSC_VER) 25 | # include "sanitizer/asan_interface.h" 26 | #else 27 | /* Ensure return value is used. Just using UNUSED_VARS results in a warning. */ 28 | # define ASAN_POISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL)) 29 | # define ASAN_UNPOISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL)) 30 | #endif 31 | 32 | /** 33 | * Mark a region of memory as "freed". When using address sanitizer, accessing the given memory 34 | * region will cause an use-after-poison error. This can be used to find errors when dealing with 35 | * uninitialized memory in custom containers. 36 | */ 37 | #define BLI_asan_poison(addr, size) ASAN_POISON_MEMORY_REGION(addr, size) 38 | 39 | /** 40 | * Mark a region of memory as usable again. 41 | */ 42 | #define BLI_asan_unpoison(addr, size) ASAN_UNPOISON_MEMORY_REGION(addr, size) 43 | -------------------------------------------------------------------------------- /SeaSide/BLI_bitmap_draw_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void BLI_bitmap_draw_2d_line_v2v2i(const int p1[2], 28 | const int p2[2], 29 | bool (*callback)(int, int, void *), 30 | void *user_data); 31 | 32 | void BLI_bitmap_draw_2d_tri_v2i(const int p1[2], 33 | const int p2[2], 34 | const int p3[2], 35 | void (*callback)(int x, int x_end, int y, void *), 36 | void *user_data); 37 | 38 | void BLI_bitmap_draw_2d_poly_v2i_n(const int xmin, 39 | const int ymin, 40 | const int xmax, 41 | const int ymax, 42 | const int verts[][2], 43 | const int verts_len, 44 | void (*callback)(int x, int x_end, int y, void *), 45 | void *user_data); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | -------------------------------------------------------------------------------- /SeaSide/BLI_boxpack_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | struct ListBase; 31 | 32 | /* Box Packer */ 33 | 34 | typedef struct BoxPack { 35 | float x; 36 | float y; 37 | float w; 38 | float h; 39 | 40 | /* Verts this box uses 41 | * (BL,TR,TL,BR) / 0,1,2,3 */ 42 | struct BoxVert *v[4]; 43 | 44 | int index; 45 | } BoxPack; 46 | 47 | void BLI_box_pack_2d(BoxPack *boxarray, const unsigned int len, float *r_tot_x, float *r_tot_y); 48 | 49 | typedef struct FixedSizeBoxPack { 50 | struct FixedSizeBoxPack *next, *prev; 51 | int x, y; 52 | int w, h; 53 | } FixedSizeBoxPack; 54 | 55 | void BLI_box_pack_2d_fixedarea(struct ListBase *boxes, 56 | int width, 57 | int height, 58 | struct ListBase *packed); 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | -------------------------------------------------------------------------------- /SeaSide/BLI_compiler_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /* clang-format off */ 18 | 19 | /* #define typeof() triggers a bug in some clang-format versions, disable format 20 | * for entire file to keep results consistent. */ 21 | 22 | #pragma once 23 | 24 | 25 | /** \file 26 | * \ingroup bli 27 | * 28 | * Use to help with cross platform portability. 29 | */ 30 | 31 | #if defined(_MSC_VER) 32 | # define alloca _alloca 33 | #endif 34 | 35 | #if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus) 36 | extern "C++" { 37 | /* Some magic to be sure we don't have reference in the type. */ 38 | template static inline T decltype_helper(T x) 39 | { 40 | return x; 41 | } 42 | #define typeof(x) decltype(decltype_helper(x)) 43 | } 44 | #endif 45 | 46 | /* little macro so inline keyword works */ 47 | #if defined(_MSC_VER) 48 | # define BLI_INLINE static __forceinline 49 | #else 50 | # define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__)) 51 | #endif 52 | 53 | #if defined(__GNUC__) 54 | # define BLI_NOINLINE __attribute__((noinline)) 55 | #else 56 | # define BLI_NOINLINE 57 | #endif 58 | -------------------------------------------------------------------------------- /SeaSide/BLI_console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | /** \file 27 | * \ingroup bli 28 | * \brief Set of utility functions and constants to work with consoles. 29 | */ 30 | 31 | /* Format string where one could BLI_snprintf() R, G and B values 32 | * and get proper marker to start colored output in the console. 33 | */ 34 | #define TRUECOLOR_ANSI_COLOR_FORMAT "\x1b[38;2;%d;%d;%dm" 35 | 36 | /* Marker which indicates that colored output is finished. */ 37 | #define TRUECOLOR_ANSI_COLOR_FINISH "\x1b[0m" 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /SeaSide/BLI_convexhull_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int BLI_convexhull_2d_sorted(const float (*points)[2], const int n, int r_points[]); 28 | int BLI_convexhull_2d(const float (*points)[2], const int n, int r_points[]); 29 | 30 | float BLI_convexhull_aabb_fit_hull_2d(const float (*points_hull)[2], unsigned int n); 31 | float BLI_convexhull_aabb_fit_points_2d(const float (*points)[2], unsigned int n); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /SeaSide/BLI_dynlib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bli 22 | */ 23 | 24 | #pragma once 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct DynamicLibrary DynamicLibrary; 31 | 32 | DynamicLibrary *BLI_dynlib_open(const char *name); 33 | void *BLI_dynlib_find_symbol(DynamicLibrary *lib, const char *symname); 34 | char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib); 35 | void BLI_dynlib_close(DynamicLibrary *lib); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /SeaSide/BLI_fileops_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | * \brief Some types for dealing with directories. 25 | */ 26 | 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #if defined(WIN32) 34 | typedef unsigned int mode_t; 35 | #endif 36 | 37 | #define FILELIST_DIRENTRY_SIZE_LEN 16 38 | #define FILELIST_DIRENTRY_MODE_LEN 4 39 | #define FILELIST_DIRENTRY_OWNER_LEN 16 40 | #define FILELIST_DIRENTRY_TIME_LEN 8 41 | #define FILELIST_DIRENTRY_DATE_LEN 16 42 | 43 | struct direntry { 44 | mode_t type; 45 | const char *relname; 46 | const char *path; 47 | #ifdef WIN32 /* keep in sync with the definition of BLI_stat_t in BLI_fileops.h */ 48 | # if defined(_MSC_VER) 49 | struct _stat64 s; 50 | # else 51 | struct _stat s; 52 | # endif 53 | #else 54 | struct stat s; 55 | #endif 56 | }; 57 | 58 | struct dirlink { 59 | struct dirlink *next, *prev; 60 | char *name; 61 | }; 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /SeaSide/BLI_gsqueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #include "BLI_utildefines.h" 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | typedef struct _GSQueue GSQueue; 33 | 34 | GSQueue *BLI_gsqueue_new(const size_t elem_size); 35 | bool BLI_gsqueue_is_empty(const GSQueue *queue); 36 | size_t BLI_gsqueue_len(const GSQueue *queue); 37 | void BLI_gsqueue_pop(GSQueue *queue, void *r_item); 38 | void BLI_gsqueue_push(GSQueue *queue, const void *item); 39 | void BLI_gsqueue_free(GSQueue *queue); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SeaSide/BLI_hash_md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The 28 | * result is always in little endian byte order, so that a byte-wise 29 | * output yields to the wanted ASCII representation of the message 30 | * digest. */ 31 | 32 | void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock); 33 | 34 | /* Compute MD5 message digest for bytes read from STREAM. The 35 | * resulting message digest number will be written into the 16 bytes 36 | * beginning at RESBLOCK. */ 37 | 38 | int BLI_hash_md5_stream(FILE *stream, void *resblock); 39 | 40 | char *BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33]); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /SeaSide/BLI_hash_mm2a.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #include "BLI_sys_types.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | typedef struct BLI_HashMurmur2A { 30 | uint32_t hash; 31 | uint32_t tail; 32 | uint32_t count; 33 | uint32_t size; 34 | } BLI_HashMurmur2A; 35 | 36 | void BLI_hash_mm2a_init(BLI_HashMurmur2A *mm2, uint32_t seed); 37 | 38 | void BLI_hash_mm2a_add(BLI_HashMurmur2A *mm2, const unsigned char *data, size_t len); 39 | 40 | void BLI_hash_mm2a_add_int(BLI_HashMurmur2A *mm2, int data); 41 | 42 | uint32_t BLI_hash_mm2a_end(BLI_HashMurmur2A *mm2); 43 | 44 | uint32_t BLI_hash_mm2(const unsigned char *data, size_t len, uint32_t seed); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /SeaSide/BLI_hash_mm3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #include "BLI_sys_types.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | uint32_t BLI_hash_mm3(const unsigned char *data, size_t len, uint32_t seed); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /SeaSide/BLI_heap_simple.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | * \brief A min-heap / priority queue ADT 22 | */ 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | struct HeapSimple; 29 | typedef struct HeapSimple HeapSimple; 30 | 31 | typedef void (*HeapSimpleFreeFP)(void *ptr); 32 | 33 | HeapSimple *BLI_heapsimple_new_ex(unsigned int tot_reserve) ATTR_WARN_UNUSED_RESULT; 34 | HeapSimple *BLI_heapsimple_new(void) ATTR_WARN_UNUSED_RESULT; 35 | void BLI_heapsimple_clear(HeapSimple *heap, HeapSimpleFreeFP ptrfreefp) ATTR_NONNULL(1); 36 | void BLI_heapsimple_free(HeapSimple *heap, HeapSimpleFreeFP ptrfreefp) ATTR_NONNULL(1); 37 | void BLI_heapsimple_insert(HeapSimple *heap, float value, void *ptr) ATTR_NONNULL(1); 38 | bool BLI_heapsimple_is_empty(const HeapSimple *heap) ATTR_NONNULL(1); 39 | uint BLI_heapsimple_len(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); 40 | float BLI_heapsimple_top_value(const HeapSimple *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); 41 | void *BLI_heapsimple_pop_min(HeapSimple *heap) ATTR_NONNULL(1); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | -------------------------------------------------------------------------------- /SeaSide/BLI_jitter_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void BLI_jitter_init(float (*jitarr)[2], int num); 31 | void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float radius1); 32 | void BLI_jitterate2(float (*jit1)[2], float (*jit2)[2], int num, float radius2); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /SeaSide/BLI_lasso_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | struct rcti; 31 | 32 | void BLI_lasso_boundbox(struct rcti *rect, const int mcoords[][2], const unsigned int mcoords_len); 33 | bool BLI_lasso_is_point_inside(const int mcoords[][2], 34 | const unsigned int mcoords_len, 35 | const int sx, 36 | const int sy, 37 | const int error_value); 38 | bool BLI_lasso_is_edge_inside(const int mcoords[][2], 39 | const unsigned int mcoords_len, 40 | int x0, 41 | int y0, 42 | int x1, 43 | int y1, 44 | const int error_value); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /SeaSide/BLI_math_base_safe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | * 22 | * This file provides safe alternatives to common math functions like sqrt, powf. 23 | * In this context "safe" means that the output is not NaN if the input is not NaN. 24 | */ 25 | 26 | #include "BLI_math_base.h" 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | MINLINE float safe_divide(float a, float b); 33 | MINLINE float safe_modf(float a, float b); 34 | MINLINE float safe_logf(float a, float base); 35 | MINLINE float safe_sqrtf(float a); 36 | MINLINE float safe_inverse_sqrtf(float a); 37 | MINLINE float safe_asinf(float a); 38 | MINLINE float safe_acosf(float a); 39 | MINLINE float safe_powf(float base, float exponent); 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #if BLI_MATH_DO_INLINE 46 | # include "math_base_safe_inline.c" 47 | #endif 48 | -------------------------------------------------------------------------------- /SeaSide/BLI_math_inline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | * 19 | * The Original Code is: some of this file. 20 | */ 21 | 22 | #pragma once 23 | 24 | /** \file 25 | * \ingroup bli 26 | */ 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | /* add platform/compiler checks here if it is not supported */ 33 | /* all platforms support forcing inline so this is always enabled */ 34 | #define BLI_MATH_DO_INLINE 1 35 | 36 | #if BLI_MATH_DO_INLINE 37 | # ifdef _MSC_VER 38 | # define MINLINE static __forceinline 39 | # define MALWAYS_INLINE MINLINE 40 | # else 41 | # define MINLINE static inline 42 | # define MALWAYS_INLINE static inline __attribute__((always_inline)) __attribute__((unused)) 43 | # endif 44 | #else 45 | # define MINLINE 46 | # define MALWAYS_INLINE 47 | #endif 48 | 49 | /* gcc 4.6 (supports push/pop) */ 50 | #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) 51 | # define BLI_MATH_GCC_WARN_PRAGMA 1 52 | #endif 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | -------------------------------------------------------------------------------- /SeaSide/BLI_math_mpq.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef WITH_GMP 24 | 25 | /* This file uses an external file header to define the multi-precision 26 | * rational type, mpq_class. 27 | * This class keeps separate multi-precision integer numerator and 28 | * denominator, reduced to lowest terms after each arithmetic operation. 29 | * It can be used where it is important to have exact arithmetic results. 30 | * 31 | * See gmplib.org for full documentation. In particular: 32 | * https://gmplib.org/manual/C_002b_002b-Interface-Rationals 33 | */ 34 | # include "gmpxx.h" 35 | 36 | #endif /* WITH_GMP */ 37 | -------------------------------------------------------------------------------- /SeaSide/BLI_memory_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /* Use a define instead of `#pragma once` because of `BLI_utildefines.h` */ 18 | #ifndef __BLI_MEMORY_UTILS_H__ 19 | #define __BLI_MEMORY_UTILS_H__ 20 | 21 | /** \file 22 | * \ingroup bli 23 | * \brief Generic memory manipulation API. 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* it may be defined already */ 31 | #ifndef __BLI_UTILDEFINES_H__ 32 | bool BLI_memory_is_zero(const void *arr, const size_t size); 33 | #endif 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* __BLI_MEMORY_UTILS_H__ */ 40 | -------------------------------------------------------------------------------- /SeaSide/BLI_polyfill_2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | struct MemArena; 28 | 29 | void BLI_polyfill_calc_arena(const float (*coords)[2], 30 | const unsigned int coords_tot, 31 | const int coords_sign, 32 | unsigned int (*r_tris)[3], 33 | 34 | struct MemArena *arena); 35 | 36 | void BLI_polyfill_calc(const float (*coords)[2], 37 | const unsigned int coords_tot, 38 | const int coords_sign, 39 | unsigned int (*r_tris)[3]); 40 | 41 | /* default size of polyfill arena */ 42 | #define BLI_POLYFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /SeaSide/BLI_quadric.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct Quadric { 31 | double a2, ab, ac, ad, b2, bc, bd, c2, cd, d2; 32 | } Quadric; 33 | 34 | /* conversion */ 35 | void BLI_quadric_from_plane(Quadric *q, const double v[4]); 36 | void BLI_quadric_to_vector_v3(const Quadric *q, double v[3]); 37 | 38 | void BLI_quadric_clear(Quadric *q); 39 | 40 | /* math */ 41 | void BLI_quadric_add_qu_qu(Quadric *a, const Quadric *b); 42 | void BLI_quadric_add_qu_ququ(Quadric *r, const Quadric *a, const Quadric *b); 43 | void BLI_quadric_mul(Quadric *a, const double scalar); 44 | 45 | /* solve */ 46 | double BLI_quadric_evaluate(const Quadric *q, const double v[3]); 47 | bool BLI_quadric_optimize(const Quadric *q, double v[3], const double epsilon); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /SeaSide/BLI_simd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | * 22 | * SIMD instruction support. 23 | */ 24 | 25 | #if defined(__ARM_NEON) && defined(WITH_SSE2NEON) 26 | /* SSE/SSE2 emulation on ARM Neon. Match SSE precision. */ 27 | # define SSE2NEON_PRECISE_MINMAX 1 28 | # define SSE2NEON_PRECISE_DIV 1 29 | # define SSE2NEON_PRECISE_SQRT 1 30 | # include 31 | # define BLI_HAVE_SSE2 32 | #elif defined(__SSE2__) 33 | /* Native SSE2 on Intel/AMD. */ 34 | # include 35 | # define BLI_HAVE_SSE2 36 | #endif 37 | -------------------------------------------------------------------------------- /SeaSide/BLI_sort.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2013 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #include 27 | 28 | /* glibc 2.8+ */ 29 | #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)) 30 | # define BLI_qsort_r qsort_r 31 | #endif 32 | 33 | /* Quick sort re-entrant */ 34 | typedef int (*BLI_sort_cmp_t)(const void *a, const void *b, void *ctx); 35 | 36 | void BLI_qsort_r(void *a, size_t n, size_t es, BLI_sort_cmp_t cmp, void *thunk) 37 | #ifdef __GNUC__ 38 | __attribute__((nonnull(1, 5))) 39 | #endif 40 | ; 41 | -------------------------------------------------------------------------------- /SeaSide/BLI_sort_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2013 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /** 31 | * \note keep \a sort_value first, 32 | * so cmp functions can be reused. 33 | */ 34 | struct SortPtrByFloat { 35 | float sort_value; 36 | void *data; 37 | }; 38 | 39 | struct SortIntByFloat { 40 | float sort_value; 41 | int data; 42 | }; 43 | 44 | struct SortPtrByInt { 45 | int sort_value; 46 | void *data; 47 | }; 48 | 49 | struct SortIntByInt { 50 | int sort_value; 51 | int data; 52 | }; 53 | 54 | int BLI_sortutil_cmp_float(const void *a_, const void *b_); 55 | int BLI_sortutil_cmp_float_reverse(const void *a_, const void *b_); 56 | 57 | int BLI_sortutil_cmp_int(const void *a_, const void *b_); 58 | int BLI_sortutil_cmp_int_reverse(const void *a_, const void *b_); 59 | 60 | int BLI_sortutil_cmp_ptr(const void *a_, const void *b_); 61 | int BLI_sortutil_cmp_ptr_reverse(const void *a_, const void *b_); 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /SeaSide/BLI_string_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | typedef struct StringSearch StringSearch; 24 | 25 | StringSearch *BLI_string_search_new(void); 26 | void BLI_string_search_add(StringSearch *search, const char *str, void *user_data); 27 | int BLI_string_search_query(StringSearch *search, const char *query, void ***r_data); 28 | void BLI_string_search_free(StringSearch *search); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #ifdef __cplusplus 35 | 36 | # include "BLI_linear_allocator.hh" 37 | # include "BLI_span.hh" 38 | # include "BLI_string_ref.hh" 39 | # include "BLI_vector.hh" 40 | 41 | namespace blender::string_search { 42 | 43 | int damerau_levenshtein_distance(StringRef a, StringRef b); 44 | int get_fuzzy_match_errors(StringRef query, StringRef full); 45 | void extract_normalized_words(StringRef str, 46 | LinearAllocator<> &allocator, 47 | Vector &r_words); 48 | 49 | } // namespace blender::string_search 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /SeaSide/BLI_timeit.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "BLI_sys_types.h" 24 | 25 | namespace blender::timeit { 26 | 27 | using Clock = std::chrono::steady_clock; 28 | using TimePoint = Clock::time_point; 29 | using Nanoseconds = std::chrono::nanoseconds; 30 | 31 | void print_duration(Nanoseconds duration); 32 | 33 | class ScopedTimer { 34 | private: 35 | std::string name_; 36 | TimePoint start_; 37 | 38 | public: 39 | ScopedTimer(std::string name) : name_(std::move(name)) 40 | { 41 | start_ = Clock::now(); 42 | } 43 | 44 | ~ScopedTimer() 45 | { 46 | const TimePoint end = Clock::now(); 47 | const Nanoseconds duration = end - start_; 48 | 49 | std::cout << "Timer '" << name_ << "' took "; 50 | print_duration(duration); 51 | std::cout << '\n'; 52 | } 53 | }; 54 | 55 | } // namespace blender::timeit 56 | 57 | #define SCOPED_TIMER(name) blender::timeit::ScopedTimer scoped_timer(name) 58 | -------------------------------------------------------------------------------- /SeaSide/BLI_utildefines_iter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bli 21 | * 22 | * General looping helpers, use `BLI_FOREACH` prefix. 23 | */ 24 | 25 | /** 26 | * Even value distribution. 27 | * 28 | * \a src must be larger than \a dst, 29 | * \a dst defines the number of iterations, their values are evenly spaced. 30 | * 31 | * The following pairs represent (src, dst) arguments and the values they loop over. 32 | *
33 |  * (19, 4) ->    [2, 7, 11. 16]
34 |  * (100, 5) ->   [9, 29, 49, 69, 89]
35 |  * (100, 3) ->   [16, 49, 83]
36 |  * (100, 100) -> [0..99]
37 |  * 
38 | * \note this is mainly useful for numbers that might not divide evenly into eachother. 39 | */ 40 | #define BLI_FOREACH_SPARSE_RANGE(src, dst, i) \ 41 | for (int _src = (src), _src2 = _src * 2, _dst2 = (dst)*2, _error = _dst2 - _src, i = 0, _delta; \ 42 | ((void)(_delta = divide_floor_i(_error, _dst2)), (void)(i -= _delta), (i < _src)); \ 43 | _error -= (_delta * _dst2) + _src2) 44 | -------------------------------------------------------------------------------- /SeaSide/BLI_utility_mixins.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | */ 20 | 21 | #pragma once 22 | 23 | namespace blender { 24 | 25 | /** 26 | * A type that inherits from NonCopyable cannot be copied anymore. 27 | */ 28 | class NonCopyable { 29 | public: 30 | /* Disable copy construction and assignment. */ 31 | NonCopyable(const NonCopyable &other) = delete; 32 | NonCopyable &operator=(const NonCopyable &other) = delete; 33 | 34 | /* Explicitly enable default construction, move construction and move assignment. */ 35 | NonCopyable() = default; 36 | NonCopyable(NonCopyable &&other) = default; 37 | NonCopyable &operator=(NonCopyable &&other) = default; 38 | }; 39 | 40 | /** 41 | * A type that inherits from NonMovable cannot be moved anymore. 42 | */ 43 | class NonMovable { 44 | public: 45 | /* Disable move construction and assignment. */ 46 | NonMovable(NonMovable &&other) = delete; 47 | NonMovable &operator=(NonMovable &&other) = delete; 48 | 49 | /* Explicitly enable default construction, copy construction and copy assignment. */ 50 | NonMovable() = default; 51 | NonMovable(const NonMovable &other) = default; 52 | NonMovable &operator=(const NonMovable &other) = default; 53 | }; 54 | 55 | } // namespace blender 56 | -------------------------------------------------------------------------------- /SeaSide/BLI_vfontdata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | * \brief A structure to represent vector fonts, 25 | * and to load them from PostScript fonts. 26 | */ 27 | 28 | #include "DNA_listBase.h" 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | struct PackedFile; 35 | struct VFont; 36 | 37 | typedef struct VFontData { 38 | struct GHash *characters; 39 | char name[128]; 40 | float scale; 41 | /* Calculated from the font. */ 42 | float em_height; 43 | float ascender; 44 | } VFontData; 45 | 46 | typedef struct VChar { 47 | ListBase nurbsbase; 48 | unsigned int index; 49 | float width; 50 | } VChar; 51 | 52 | VFontData *BLI_vfontdata_from_freetypefont(struct PackedFile *pf); 53 | VFontData *BLI_vfontdata_copy(const VFontData *vfont_src, const int flag); 54 | 55 | VChar *BLI_vfontchar_from_freetypefont(struct VFont *vfont, unsigned long character); 56 | VChar *BLI_vfontchar_copy(const VChar *vchar_src, const int flag); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | -------------------------------------------------------------------------------- /SeaSide/BLI_voxel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bli 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /** Find the index number of a voxel, given x/y/z integer coords and resolution vector. */ 31 | 32 | #define BLI_VOXEL_INDEX(x, y, z, res) \ 33 | ((int64_t)(x) + (int64_t)(y) * (int64_t)(res)[0] + \ 34 | (int64_t)(z) * (int64_t)(res)[0] * (int64_t)(res)[1]) 35 | 36 | /* all input coordinates must be in bounding box 0.0 - 1.0 */ 37 | float BLI_voxel_sample_nearest(const float *data, const int res[3], const float co[3]); 38 | float BLI_voxel_sample_trilinear(const float *data, const int res[3], const float co[3]); 39 | float BLI_voxel_sample_triquadratic(const float *data, const int res[3], const float co[3]); 40 | float BLI_voxel_sample_tricubic(const float *data, 41 | const int res[3], 42 | const float co[3], 43 | int bspline); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /SeaSide/DNA_armature_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name bArmature Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_bArmature \ 31 | { \ 32 | .deformflag = ARM_DEF_VGROUP | ARM_DEF_ENVELOPE, \ 33 | .flag = ARM_COL_CUSTOM, /* custom bone-group colors */ \ 34 | .layer = 1, \ 35 | .drawtype = ARM_OCTA, \ 36 | } 37 | 38 | /** \} */ 39 | 40 | /* clang-format on */ 41 | -------------------------------------------------------------------------------- /SeaSide/DNA_asset_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Asset Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_AssetMetaData \ 31 | { \ 32 | 0 \ 33 | } 34 | 35 | /** \} */ 36 | 37 | /* clang-format on */ 38 | -------------------------------------------------------------------------------- /SeaSide/DNA_cachefile_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name CacheFile Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_CacheFile \ 31 | { \ 32 | .filepath[0] = '\0', \ 33 | .override_frame = false, \ 34 | .frame = 0.0f, \ 35 | .is_sequence = false, \ 36 | .scale = 1.0f, \ 37 | .object_paths ={NULL, NULL}, \ 38 | \ 39 | .handle = NULL, \ 40 | .handle_filepath[0] = '\0', \ 41 | .handle_readers = NULL, \ 42 | } 43 | 44 | /** \} */ 45 | 46 | /* clang-format on */ 47 | -------------------------------------------------------------------------------- /SeaSide/DNA_collection_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Collection Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Collection \ 31 | { \ 32 | .color_tag = COLLECTION_COLOR_NONE, \ 33 | } 34 | 35 | /** \} */ 36 | 37 | /* clang-format on */ 38 | -------------------------------------------------------------------------------- /SeaSide/DNA_curve_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Curve Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Curve \ 31 | { \ 32 | .size = {1, 1, 1}, \ 33 | .flag = CU_DEFORM_BOUNDS_OFF | CU_PATH_RADIUS, \ 34 | .pathlen = 100, \ 35 | .resolu = 12, \ 36 | .resolv = 12, \ 37 | .width = 1.0, \ 38 | .wordspace = 1.0, \ 39 | .spacing = 1.0f, \ 40 | .linedist = 1.0, \ 41 | .fsize = 1.0, \ 42 | .ulheight = 0.05, \ 43 | .texflag = CU_AUTOSPACE, \ 44 | .smallcaps_scale = 0.75f, \ 45 | /* This one seems to be the best one in most cases, at least for curve deform. */ \ 46 | .twist_mode = CU_TWIST_MINIMUM, \ 47 | .bevfac1 = 0.0f, \ 48 | .bevfac2 = 1.0f, \ 49 | .bevfac1_mapping = CU_BEVFAC_MAP_RESOLU, \ 50 | .bevfac2_mapping = CU_BEVFAC_MAP_RESOLU, \ 51 | .bevresol = 4, \ 52 | .bevel_mode = CU_BEV_MODE_ROUND, \ 53 | .taper_radius_mode = CU_TAPER_RADIUS_OVERRIDE, \ 54 | } 55 | 56 | /** \} */ 57 | 58 | /* clang-format on */ 59 | -------------------------------------------------------------------------------- /SeaSide/DNA_defaults.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * This program is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU General Public License 5 | * as published by the Free Software Foundation; either version 2 6 | * of the License, or (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software Foundation, 15 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | * 17 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 18 | * All rights reserved. 19 | */ 20 | 21 | /** \file 22 | * \ingroup DNA 23 | * 24 | * \see dna_defaults.c for details on how to use this system. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "BLI_utildefines.h" 30 | 31 | #include "dna_type_offsets.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | extern const void *DNA_default_table[SDNA_TYPE_MAX]; 38 | 39 | char *_DNA_struct_default_alloc_impl(const char *data_src, size_t size, const char *alloc_str); 40 | 41 | /** 42 | * Wrap with macro that casts correctly. 43 | */ 44 | #define DNA_struct_default_get(struct_name) \ 45 | (const struct_name *)DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)] 46 | 47 | #define DNA_struct_default_alloc(struct_name) \ 48 | (struct_name *)_DNA_struct_default_alloc_impl( \ 49 | DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)], sizeof(struct_name), __func__) 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /SeaSide/DNA_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | * 20 | * Group generic defines for all DNA headers may use in this file. 21 | */ 22 | 23 | #pragma once 24 | 25 | /* makesdna ignores */ 26 | #ifdef DNA_DEPRECATED_ALLOW 27 | /* allow use of deprecated items */ 28 | # define DNA_DEPRECATED 29 | #else 30 | # ifndef DNA_DEPRECATED 31 | # ifdef __GNUC__ 32 | # define DNA_DEPRECATED __attribute__((deprecated)) 33 | # else 34 | /* TODO, msvc & others */ 35 | # define DNA_DEPRECATED 36 | # endif 37 | # endif 38 | #endif 39 | 40 | #ifdef __GNUC__ 41 | # define DNA_PRIVATE_ATTR __attribute__((deprecated)) 42 | #else 43 | # define DNA_PRIVATE_ATTR 44 | #endif 45 | 46 | /* poison pragma */ 47 | #ifdef DNA_DEPRECATED_ALLOW 48 | # define DNA_DEPRECATED_GCC_POISON 0 49 | #else 50 | /* enable the pragma if we can */ 51 | # ifdef __GNUC__ 52 | # define DNA_DEPRECATED_GCC_POISON 1 53 | # else 54 | # define DNA_DEPRECATED_GCC_POISON 0 55 | # endif 56 | #endif 57 | 58 | /* hrmf, we need a better include then this */ 59 | #include "BLI_sys_types.h" /* needed for int64_t only! */ 60 | 61 | /* non-id name variables should use this length */ 62 | #define MAX_NAME 64 63 | -------------------------------------------------------------------------------- /SeaSide/DNA_gpu_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup DNA 22 | */ 23 | 24 | #pragma once 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* Keep for 'Camera' versioning. */ 31 | /** Properties for dof effect. */ 32 | typedef struct GPUDOFSettings { 33 | /** Focal distance for depth of field. */ 34 | float focus_distance; 35 | float fstop; 36 | float focal_length; 37 | float sensor; 38 | float rotation; 39 | float ratio; 40 | int num_blades; 41 | int high_quality; 42 | } GPUDOFSettings; 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /SeaSide/DNA_hair_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Hair Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Hair \ 31 | { \ 32 | .flag = 0, \ 33 | } 34 | 35 | /** \} */ 36 | 37 | /* clang-format on */ 38 | -------------------------------------------------------------------------------- /SeaSide/DNA_image_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Image Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Image \ 31 | { \ 32 | .aspx = 1.0, \ 33 | .aspy = 1.0, \ 34 | .gen_x = 1024, \ 35 | .gen_y = 1024, \ 36 | .gen_type = IMA_GENTYPE_GRID, \ 37 | \ 38 | .gpuframenr = INT_MAX, \ 39 | .gpu_pass = SHRT_MAX, \ 40 | .gpu_layer = SHRT_MAX, \ 41 | } 42 | 43 | /** \} */ 44 | 45 | /* clang-format on */ 46 | -------------------------------------------------------------------------------- /SeaSide/DNA_lattice_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Lattice Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Lattice \ 31 | { \ 32 | .flag = LT_GRID, \ 33 | .typeu = KEY_BSPLINE, \ 34 | .typev = KEY_BSPLINE, \ 35 | .typew = KEY_BSPLINE, \ 36 | .actbp = LT_ACTBP_NONE, \ 37 | } 38 | 39 | /** \} */ 40 | 41 | /* clang-format on */ 42 | -------------------------------------------------------------------------------- /SeaSide/DNA_lightprobe_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name LightProbe Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_LightProbe \ 31 | { \ 32 | .grid_resolution_x = 4, \ 33 | .grid_resolution_y = 4, \ 34 | .grid_resolution_z = 4, \ 35 | .distinf = 2.5f, \ 36 | .distpar = 2.5f, \ 37 | .falloff = 0.2f, \ 38 | .clipsta = 0.8f, \ 39 | .clipend = 40.0f, \ 40 | .vis_bias = 1.0f, \ 41 | .vis_blur = 0.2f, \ 42 | .intensity = 1.0f, \ 43 | .flag = LIGHTPROBE_FLAG_SHOW_INFLUENCE, \ 44 | } 45 | 46 | /** \} */ 47 | 48 | /* clang-format on */ 49 | -------------------------------------------------------------------------------- /SeaSide/DNA_linestyle_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name FreestyleLineStyle Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_FreestyleLineStyle \ 31 | { \ 32 | .panel = LS_PANEL_STROKES, \ 33 | .r = 0, \ 34 | .g = 0, \ 35 | .b = 0, \ 36 | .alpha = 1.0f, \ 37 | .thickness = 3.0f, \ 38 | .thickness_position = LS_THICKNESS_CENTER, \ 39 | .thickness_ratio = 0.5f, \ 40 | .flag = LS_SAME_OBJECT | LS_NO_SORTING | LS_TEXTURE, \ 41 | .chaining = LS_CHAINING_PLAIN, \ 42 | .rounds = 3, \ 43 | .min_angle = DEG2RADF(0.0f), \ 44 | .max_angle = DEG2RADF(0.0f), \ 45 | .min_length = 0.0f, \ 46 | .max_length = 10000.0f, \ 47 | .split_length = 100, \ 48 | .chain_count = 10, \ 49 | .sort_key = LS_SORT_KEY_DISTANCE_FROM_CAMERA, \ 50 | .integration_type = LS_INTEGRATION_MEAN, \ 51 | .texstep = 1.0f, \ 52 | .pr_texture = TEX_PR_TEXTURE, \ 53 | .caps = LS_CAPS_BUTT, \ 54 | } 55 | 56 | /** \} */ 57 | 58 | /* clang-format on */ 59 | -------------------------------------------------------------------------------- /SeaSide/DNA_listBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup DNA 22 | * \brief These structs are the foundation for all linked lists in the library system. 23 | * 24 | * Doubly-linked lists start from a ListBase and contain elements beginning 25 | * with Link. 26 | */ 27 | 28 | #pragma once 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | /** Generic - all structs which are put into linked lists begin with this. */ 35 | typedef struct Link { 36 | struct Link *next, *prev; 37 | } Link; 38 | 39 | /** Simple subclass of Link. Use this when it is not worth defining a custom one. */ 40 | typedef struct LinkData { 41 | struct LinkData *next, *prev; 42 | void *data; 43 | } LinkData; 44 | 45 | /** Never change the size of this! dna_genfile.c detects pointer_size with it. */ 46 | typedef struct ListBase { 47 | void *first, *last; 48 | } ListBase; 49 | 50 | /* 8 byte alignment! */ 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | -------------------------------------------------------------------------------- /SeaSide/DNA_material_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Material Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Material \ 31 | { \ 32 | .r = 0.8, \ 33 | .g = 0.8, \ 34 | .b = 0.8, \ 35 | .specr = 1.0, \ 36 | .specg = 1.0, \ 37 | .specb = 1.0, \ 38 | .a = 1.0f, \ 39 | .spec = 0.5, \ 40 | \ 41 | .roughness = 0.4f, \ 42 | \ 43 | .pr_type = MA_SPHERE, \ 44 | \ 45 | .alpha_threshold = 0.5f, \ 46 | \ 47 | .blend_shadow = MA_BS_SOLID, \ 48 | } 49 | 50 | /** \} */ 51 | 52 | /* clang-format on */ 53 | -------------------------------------------------------------------------------- /SeaSide/DNA_mesh_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Mesh Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Mesh \ 31 | { \ 32 | .size = {1.0f, 1.0f, 1.0f}, \ 33 | .smoothresh = DEG2RADF(30), \ 34 | .texflag = ME_AUTOSPACE, \ 35 | .remesh_voxel_size = 0.1f, \ 36 | .remesh_voxel_adaptivity = 0.0f, \ 37 | .face_sets_color_seed = 0, \ 38 | .face_sets_color_default = 1, \ 39 | .flag = ME_REMESH_FIX_POLES | ME_REMESH_REPROJECT_VOLUME, \ 40 | .editflag = ME_EDIT_MIRROR_VERTEX_GROUPS \ 41 | } 42 | 43 | /** \} */ 44 | 45 | /* clang-format on */ 46 | -------------------------------------------------------------------------------- /SeaSide/DNA_meta_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name MetaBall Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_MetaBall \ 31 | { \ 32 | .size = {1, 1, 1}, \ 33 | .texflag = MB_AUTOSPACE, \ 34 | .wiresize = 0.4f, \ 35 | .rendersize = 0.2f, \ 36 | .thresh = 0.6f, \ 37 | } 38 | 39 | /** \} */ 40 | 41 | /* clang-format on */ 42 | -------------------------------------------------------------------------------- /SeaSide/DNA_movieclip_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name MovieClip Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_MovieClipProxy \ 31 | { \ 32 | .build_size_flag = IMB_PROXY_25, \ 33 | .build_tc_flag = IMB_TC_RECORD_RUN | IMB_TC_FREE_RUN | \ 34 | IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN | IMB_TC_RECORD_RUN_NO_GAPS, \ 35 | .quality = 50, \ 36 | } 37 | 38 | 39 | #define _DNA_DEFAULT_MovieClip \ 40 | { \ 41 | .aspx = 1.0f, \ 42 | .aspy = 1.0f, \ 43 | .proxy = _DNA_DEFAULT_MovieClipProxy, \ 44 | .start_frame = 1, \ 45 | .frame_offset = 0, \ 46 | } 47 | 48 | /** \} */ 49 | 50 | /* clang-format on */ 51 | -------------------------------------------------------------------------------- /SeaSide/DNA_packedFile_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup DNA 22 | */ 23 | 24 | #pragma once 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct PackedFile { 31 | int size; 32 | int seek; 33 | void *data; 34 | } PackedFile; 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /SeaSide/DNA_pointcloud_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name PointCloud Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_PointCloud \ 31 | { \ 32 | .flag = 0, \ 33 | } 34 | 35 | /** \} */ 36 | 37 | /* clang-format on */ 38 | -------------------------------------------------------------------------------- /SeaSide/DNA_pointcloud_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "DNA_ID.h" 24 | #include "DNA_customdata_types.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct PointCloud { 31 | ID id; 32 | struct AnimData *adt; /* animation data (must be immediately after id) */ 33 | 34 | int flag; 35 | int _pad1[1]; 36 | 37 | /* Geometry */ 38 | float (*co)[3]; 39 | float *radius; 40 | int totpoint; 41 | int _pad2[1]; 42 | 43 | /* Custom Data */ 44 | struct CustomData pdata; 45 | int attributes_active_index; 46 | int _pad4; 47 | 48 | /* Material */ 49 | struct Material **mat; 50 | short totcol; 51 | short _pad3[3]; 52 | 53 | /* Draw Cache */ 54 | void *batch_cache; 55 | } PointCloud; 56 | 57 | /* PointCloud.flag */ 58 | enum { 59 | PT_DS_EXPAND = (1 << 0), 60 | }; 61 | 62 | /* Only one material supported currently. */ 63 | #define POINTCLOUD_MATERIAL_NR 1 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /SeaSide/DNA_session_uuid_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "BLI_sys_types.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | /* Is a structure because of the following considerations: 30 | * 31 | * - It is not possible to use custom types in DNA members: makesdna does not recognize them. 32 | * - It allows to add more bits, more than standard fixed-size types can store. For example, if 33 | * we ever need to go 128 bits, it is as simple as adding extra 64bit field. 34 | */ 35 | typedef struct SessionUUID { 36 | /* Never access directly, as it might cause a headache when more bits are needed: if the field 37 | * is used directly it will not be easy to find all places where partial access is used. */ 38 | uint64_t uuid_; 39 | } SessionUUID; 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /SeaSide/DNA_simulation_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Simulation Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Simulation \ 31 | { \ 32 | .flag = 0, \ 33 | } 34 | 35 | /** \} */ 36 | 37 | /* clang-format on */ 38 | -------------------------------------------------------------------------------- /SeaSide/DNA_simulation_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "DNA_ID.h" 24 | #include "DNA_customdata_types.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct Simulation { 31 | ID id; 32 | struct AnimData *adt; /* animation data (must be immediately after id) */ 33 | 34 | /* This nodetree is embedded into the data block. */ 35 | struct bNodeTree *nodetree; 36 | 37 | uint32_t flag; 38 | char _pad[4]; 39 | } Simulation; 40 | 41 | /* Simulation.flag */ 42 | enum { 43 | SIM_DS_EXPAND = (1 << 0), 44 | }; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /SeaSide/DNA_speaker_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Speaker Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_Speaker \ 31 | { \ 32 | .attenuation = 1.0f, \ 33 | .cone_angle_inner = 360.0f, \ 34 | .cone_angle_outer = 360.0f, \ 35 | .cone_volume_outer = 1.0f, \ 36 | .distance_max = FLT_MAX, \ 37 | .distance_reference = 1.0f, \ 38 | .flag = 0, \ 39 | .pitch = 1.0f, \ 40 | .sound = NULL, \ 41 | .volume = 1.0f, \ 42 | .volume_max = 1.0f, \ 43 | .volume_min = 0.0f, \ 44 | } 45 | 46 | /** \} */ 47 | 48 | /* clang-format on */ 49 | -------------------------------------------------------------------------------- /SeaSide/DNA_speaker_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "DNA_ID.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | struct AnimData; 30 | struct bSound; 31 | 32 | typedef struct Speaker { 33 | ID id; 34 | /** Animation data (must be immediately after id for utilities to use it). */ 35 | struct AnimData *adt; 36 | 37 | struct bSound *sound; 38 | 39 | /* not animatable properties */ 40 | float volume_max; 41 | float volume_min; 42 | float distance_max; 43 | float distance_reference; 44 | float attenuation; 45 | float cone_angle_outer; 46 | float cone_angle_inner; 47 | float cone_volume_outer; 48 | 49 | /* animatable properties */ 50 | float volume; 51 | float pitch; 52 | 53 | /* flag */ 54 | short flag; 55 | char _pad1[6]; 56 | } Speaker; 57 | 58 | /* **************** SPEAKER ********************* */ 59 | 60 | /* flag */ 61 | #define SPK_DS_EXPAND (1 << 0) 62 | #define SPK_MUTED (1 << 1) 63 | // #define SPK_RELATIVE (1 << 2) /* UNUSED */ 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /SeaSide/DNA_vec_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Generic Defaults 28 | * \{ */ 29 | 30 | /** See #unit_m4. */ 31 | #define _DNA_DEFAULT_UNIT_M4 \ 32 | { \ 33 | {1, 0, 0, 0}, \ 34 | {0, 1, 0, 0}, \ 35 | {0, 0, 1, 0}, \ 36 | {0, 0, 0, 1}, \ 37 | } 38 | 39 | #define _DNA_DEFAULT_UNIT_M3 \ 40 | { \ 41 | {1, 0, 0}, \ 42 | {0, 1, 0}, \ 43 | {0, 0, 1}, \ 44 | } 45 | 46 | /** See #unit_qt. */ 47 | #define _DNA_DEFAULT_UNIT_QT \ 48 | {1, 0, 0, 0} 49 | 50 | /** \} */ 51 | 52 | /* clang-format on */ 53 | -------------------------------------------------------------------------------- /SeaSide/DNA_volume_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name Volume Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_VolumeDisplay \ 31 | { \ 32 | .density = 1.0f, \ 33 | .wireframe_type = VOLUME_WIREFRAME_BOXES, \ 34 | .wireframe_detail = VOLUME_WIREFRAME_COARSE, \ 35 | .slice_depth = 0.5f, \ 36 | } 37 | 38 | #define _DNA_DEFAULT_VolumeRender \ 39 | { \ 40 | .space = VOLUME_SPACE_OBJECT, \ 41 | .step_size = 0.0f, \ 42 | .clipping = 0.001f, \ 43 | } 44 | 45 | #define _DNA_DEFAULT_Volume \ 46 | { \ 47 | .filepath[0] = '\0', \ 48 | .frame_start = 1, \ 49 | .frame_offset = 0, \ 50 | .frame_duration = 0, \ 51 | .display = _DNA_DEFAULT_VolumeDisplay, \ 52 | .render = _DNA_DEFAULT_VolumeRender, \ 53 | } 54 | 55 | /** \} */ 56 | 57 | /* clang-format on */ 58 | -------------------------------------------------------------------------------- /SeaSide/DNA_world_defaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Struct members on own line. */ 24 | /* clang-format off */ 25 | 26 | /* -------------------------------------------------------------------- */ 27 | /** \name World Struct 28 | * \{ */ 29 | 30 | #define _DNA_DEFAULT_World \ 31 | { \ 32 | .horr = 0.05f, \ 33 | .horg = 0.05f, \ 34 | .horb = 0.05f, \ 35 | \ 36 | .aodist = 10.0f, \ 37 | .aoenergy = 1.0f, \ 38 | \ 39 | .preview = NULL, \ 40 | .miststa = 5.0f, \ 41 | .mistdist = 25.0f, \ 42 | } 43 | 44 | /** \} */ 45 | 46 | /* clang-format on */ 47 | -------------------------------------------------------------------------------- /SeaSide/DNA_xr_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup DNA 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "DNA_view3d_types.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | typedef struct XrSessionSettings { 30 | /** Shading settings, struct shared with 3D-View so settings are the same. */ 31 | struct View3DShading shading; 32 | 33 | char _pad[7]; 34 | 35 | char base_pose_type; /* eXRSessionBasePoseType */ 36 | /** Object to take the location and rotation as base position from. */ 37 | Object *base_pose_object; 38 | float base_pose_location[3]; 39 | float base_pose_angle; 40 | 41 | /** View3D draw flags (V3D_OFSDRAW_NONE, V3D_OFSDRAW_SHOW_ANNOTATION, ...). */ 42 | char draw_flags; 43 | char _pad2[3]; 44 | 45 | /** Clipping distance. */ 46 | float clip_start, clip_end; 47 | 48 | int flag; 49 | } XrSessionSettings; 50 | 51 | typedef enum eXrSessionFlag { 52 | XR_SESSION_USE_POSITION_TRACKING = (1 << 0), 53 | } eXrSessionFlag; 54 | 55 | typedef enum eXRSessionBasePoseType { 56 | XR_BASE_POSE_SCENE_CAMERA = 0, 57 | XR_BASE_POSE_OBJECT = 1, 58 | XR_BASE_POSE_CUSTOM = 2, 59 | } eXRSessionBasePoseType; 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | -------------------------------------------------------------------------------- /SeaSide/PIL_time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bli 22 | * \brief Platform independent time functions. 23 | */ 24 | 25 | #pragma once 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | extern 32 | /** Return an indication of time, expressed as 33 | * seconds since some fixed point. Successive calls 34 | * are guaranteed to generate values greater than or 35 | * equal to the last call. */ 36 | double 37 | PIL_check_seconds_timer(void); 38 | 39 | extern 40 | /** `int` version of #PIL_check_seconds_timer. */ 41 | long int 42 | PIL_check_seconds_timer_i(void); 43 | 44 | /** 45 | * Platform-independent sleep function. 46 | * \param ms: Number of milliseconds to sleep 47 | */ 48 | void PIL_sleep_ms(int ms); 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | -------------------------------------------------------------------------------- /SeaSide/basedir.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/basedir.h -------------------------------------------------------------------------------- /SeaSide/blenloader/BLO_blend_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup blenloader 24 | * \brief Utils ensuring .blend file (i.e. Main) 25 | * is in valid state during write and/or read process. 26 | */ 27 | 28 | struct Main; 29 | struct ReportList; 30 | 31 | bool BLO_main_validate_libraries(struct Main *bmain, struct ReportList *reports); 32 | bool BLO_main_validate_shapekeys(struct Main *bmain, struct ReportList *reports); 33 | -------------------------------------------------------------------------------- /SeaSide/blenloader/tests/blendfile_load_test.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2019 by Blender Foundation. 17 | */ 18 | #include "blendfile_loading_base_test.h" 19 | 20 | class BlendfileLoadingTest : public BlendfileLoadingBaseTest { 21 | }; 22 | 23 | TEST_F(BlendfileLoadingTest, CanaryTest) 24 | { 25 | /* Load the smallest blend file we have in the SVN lib/tests directory. */ 26 | if (!blendfile_load("modifier_stack/array_test.blend")) { 27 | return; 28 | } 29 | depsgraph_create(DAG_EVAL_RENDER); 30 | EXPECT_NE(nullptr, this->depsgraph); 31 | } 32 | -------------------------------------------------------------------------------- /SeaSide/bmesh/bmesh_tools.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | * 22 | * Utility functions that operate directly on the BMesh, 23 | * These can be used by both Modifiers and BMesh-Operators. 24 | */ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include "tools/bmesh_beautify.h" 31 | #include "tools/bmesh_bevel.h" 32 | #include "tools/bmesh_bisect_plane.h" 33 | #include "tools/bmesh_boolean.h" 34 | #include "tools/bmesh_decimate.h" 35 | #include "tools/bmesh_edgenet.h" 36 | #include "tools/bmesh_edgesplit.h" 37 | #include "tools/bmesh_path.h" 38 | #include "tools/bmesh_path_region.h" 39 | #include "tools/bmesh_path_region_uv.h" 40 | #include "tools/bmesh_path_uv.h" 41 | #include "tools/bmesh_region_match.h" 42 | #include "tools/bmesh_separate.h" 43 | #include "tools/bmesh_triangulate.h" 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_callback_generic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bmesh 19 | * 20 | * BM element callback functions. 21 | */ 22 | 23 | #include "BLI_utildefines.h" 24 | 25 | #include "bmesh.h" 26 | 27 | #include "intern/bmesh_callback_generic.h" 28 | 29 | bool BM_elem_cb_check_hflag_ex(BMElem *ele, void *user_data) 30 | { 31 | const uint hflag_pair = POINTER_AS_INT(user_data); 32 | const char hflag_p = (hflag_pair & 0xff); 33 | const char hflag_n = (hflag_pair >> 8); 34 | 35 | return ((BM_elem_flag_test(ele, hflag_p) != 0) && (BM_elem_flag_test(ele, hflag_n) == 0)); 36 | } 37 | 38 | bool BM_elem_cb_check_hflag_enabled(BMElem *ele, void *user_data) 39 | { 40 | const char hflag = POINTER_AS_INT(user_data); 41 | 42 | return (BM_elem_flag_test(ele, hflag) != 0); 43 | } 44 | 45 | bool BM_elem_cb_check_hflag_disabled(BMElem *ele, void *user_data) 46 | { 47 | const char hflag = POINTER_AS_INT(user_data); 48 | 49 | return (BM_elem_flag_test(ele, hflag) == 0); 50 | } 51 | 52 | bool BM_elem_cb_check_elem_not_equal(BMElem *ele, void *user_data) 53 | { 54 | return (ele != user_data); 55 | } 56 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_callback_generic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | bool BM_elem_cb_check_hflag_enabled(BMElem *, void *user_data); 24 | bool BM_elem_cb_check_hflag_disabled(BMElem *, void *user_data); 25 | bool BM_elem_cb_check_hflag_ex(BMElem *, void *user_data); 26 | bool BM_elem_cb_check_elem_not_equal(BMElem *ele, void *user_data); 27 | 28 | #define BM_elem_cb_check_hflag_ex_simple(type, hflag_p, hflag_n) \ 29 | (bool (*)(type, void *)) BM_elem_cb_check_hflag_ex, \ 30 | POINTER_FROM_UINT(((hflag_p) | (hflag_n << 8))) 31 | 32 | #define BM_elem_cb_check_hflag_enabled_simple(type, hflag_p) \ 33 | (bool (*)(type, void *)) BM_elem_cb_check_hflag_enabled, POINTER_FROM_UINT((hflag_p)) 34 | 35 | #define BM_elem_cb_check_hflag_disabled_simple(type, hflag_n) \ 36 | (bool (*)(type, void *)) BM_elem_cb_check_hflag_disabled, POINTER_FROM_UINT(hflag_n) 37 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_delete.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | void BMO_mesh_delete_oflag_tagged(BMesh *bm, const short oflag, const char htype); 24 | void BM_mesh_delete_hflag_tagged(BMesh *bm, const char hflag, const char htype); 25 | 26 | void BMO_mesh_delete_oflag_context(BMesh *bm, const short oflag, const int type); 27 | void BM_mesh_delete_hflag_context(BMesh *bm, const char hflag, const int type); 28 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_mesh_duplicate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | void BM_mesh_copy_arrays(BMesh *bm_src, 24 | BMesh *bm_dst, 25 | BMVert **verts_src, 26 | uint verts_src_len, 27 | BMEdge **edges_src, 28 | uint edges_src_len, 29 | BMFace **faces_src, 30 | uint faces_src_len); 31 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_mesh_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2012 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #pragma once 21 | 22 | /** \file 23 | * \ingroup bmesh 24 | */ 25 | 26 | bool BM_mesh_validate(BMesh *bm); 27 | -------------------------------------------------------------------------------- /SeaSide/bmesh/intern/bmesh_polygon_edgenet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | bool BM_face_split_edgenet(BMesh *bm, 24 | BMFace *f, 25 | BMEdge **edge_net, 26 | const int edge_net_len, 27 | BMFace ***r_face_arr, 28 | int *r_face_arr_len); 29 | 30 | bool BM_face_split_edgenet_connect_islands(BMesh *bm, 31 | BMFace *f, 32 | BMEdge **edge_net_init, 33 | const uint edge_net_init_len, 34 | bool use_partial_connect, 35 | struct MemArena *arena, 36 | BMEdge ***r_edge_net_new, 37 | uint *r_edge_net_new_len) ATTR_WARN_UNUSED_RESULT 38 | ATTR_NONNULL(1, 2, 3, 6, 7, 8); 39 | -------------------------------------------------------------------------------- /SeaSide/bmesh/operators/bmo_split_edges.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bmesh 19 | * 20 | * Just a wrapper around #BM_mesh_edgesplit 21 | */ 22 | 23 | #include "BLI_utildefines.h" 24 | 25 | #include "bmesh.h" 26 | #include "bmesh_tools.h" 27 | 28 | #include "intern/bmesh_operators_private.h" /* own include */ 29 | 30 | /* keep this operator fast, its used in a modifier */ 31 | void bmo_split_edges_exec(BMesh *bm, BMOperator *op) 32 | { 33 | const bool use_verts = BMO_slot_bool_get(op->slots_in, "use_verts"); 34 | 35 | BM_mesh_elem_hflag_disable_all(bm, BM_EDGE, BM_ELEM_TAG, false); 36 | BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false); 37 | 38 | if (use_verts) { 39 | /* this slows down the operation but its ok because the modifier doesn't use */ 40 | BMO_slot_buffer_hflag_enable(bm, op->slots_in, "verts", BM_VERT, BM_ELEM_TAG, false); 41 | } 42 | 43 | /* this is where everything happens */ 44 | BM_mesh_edgesplit(bm, use_verts, true, false); 45 | 46 | BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "edges.out", BM_EDGE, BM_ELEM_TAG); 47 | } 48 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tests/bmesh_core_test.cc: -------------------------------------------------------------------------------- 1 | #include "testing/testing.h" 2 | 3 | #include "BLI_math.h" 4 | #include "BLI_utildefines.h" 5 | #include "bmesh.h" 6 | 7 | TEST(bmesh_core, BMVertCreate) 8 | { 9 | BMesh *bm; 10 | BMVert *bv1, *bv2, *bv3; 11 | const float co1[3] = {1.0f, 2.0f, 0.0f}; 12 | 13 | BMeshCreateParams bm_params; 14 | bm_params.use_toolflags = true; 15 | bm = BM_mesh_create(&bm_mesh_allocsize_default, &bm_params); 16 | EXPECT_EQ(bm->totvert, 0); 17 | /* make a custom layer so we can see if it is copied properly */ 18 | BM_data_layer_add(bm, &bm->vdata, CD_PROP_FLOAT); 19 | bv1 = BM_vert_create(bm, co1, nullptr, BM_CREATE_NOP); 20 | ASSERT_TRUE(bv1 != nullptr); 21 | EXPECT_EQ(bv1->co[0], 1.0f); 22 | EXPECT_EQ(bv1->co[1], 2.0f); 23 | EXPECT_EQ(bv1->co[2], 0.0f); 24 | EXPECT_TRUE(is_zero_v3(bv1->no)); 25 | EXPECT_EQ(bv1->head.htype, (char)BM_VERT); 26 | EXPECT_EQ(bv1->head.hflag, 0); 27 | EXPECT_EQ(bv1->head.api_flag, 0); 28 | bv2 = BM_vert_create(bm, nullptr, nullptr, BM_CREATE_NOP); 29 | ASSERT_TRUE(bv2 != nullptr); 30 | EXPECT_TRUE(is_zero_v3(bv2->co)); 31 | /* create with example should copy custom data but not select flag */ 32 | BM_vert_select_set(bm, bv2, true); 33 | BM_elem_float_data_set(&bm->vdata, bv2, CD_PROP_FLOAT, 1.5f); 34 | bv3 = BM_vert_create(bm, co1, bv2, BM_CREATE_NOP); 35 | ASSERT_TRUE(bv3 != nullptr); 36 | EXPECT_FALSE(BM_elem_flag_test((BMElem *)bv3, BM_ELEM_SELECT)); 37 | EXPECT_EQ(BM_elem_float_data_get(&bm->vdata, bv3, CD_PROP_FLOAT), 1.5f); 38 | EXPECT_EQ(BM_mesh_elem_count(bm, BM_VERT), 3); 39 | BM_mesh_free(bm); 40 | } 41 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_beautify.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | enum { 24 | /** Vertices tags must match (special case). */ 25 | VERT_RESTRICT_TAG = (1 << 0), 26 | /** Don't rotate out of degenerate state (needed for iterative rotation). */ 27 | EDGE_RESTRICT_DEGENERATE = (1 << 1), 28 | }; 29 | 30 | void BM_mesh_beautify_fill(BMesh *bm, 31 | BMEdge **edge_array, 32 | const int edge_array_len, 33 | const short flag, 34 | const short method, 35 | const short oflag_edge, 36 | const short oflag_face); 37 | 38 | float BM_verts_calc_rotate_beauty(const BMVert *v1, 39 | const BMVert *v2, 40 | const BMVert *v3, 41 | const BMVert *v4, 42 | const short flag, 43 | const short method); 44 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_bevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | struct CurveProfile; 24 | struct MDeformVert; 25 | 26 | void BM_mesh_bevel(BMesh *bm, 27 | const float offset, 28 | const int offset_type, 29 | const int profile_type, 30 | const int segments, 31 | const float profile, 32 | const bool affect_type, 33 | const bool use_weights, 34 | const bool limit_offset, 35 | const struct MDeformVert *dvert, 36 | const int vertex_group, 37 | const int mat, 38 | const bool loop_slide, 39 | const bool mark_seam, 40 | const bool mark_sharp, 41 | const bool harden_normals, 42 | const int face_strength_mode, 43 | const int miter_outer, 44 | const int miter_inner, 45 | const float spread, 46 | const float smoothresh, 47 | const struct CurveProfile *custom_profile, 48 | const int vmesh_method); 49 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_bisect_plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | void BM_mesh_bisect_plane(BMesh *bm, 24 | const float plane[4], 25 | const bool use_snap_center, 26 | const bool use_tag, 27 | const short oflag_center, 28 | const short oflag_new, 29 | const float eps); 30 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_edgenet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | void BM_mesh_edgenet(BMesh *bm, const bool use_edge_tag, const bool use_new_face_tag); 24 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_edgesplit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void BM_mesh_edgesplit(BMesh *bm, 28 | const bool use_verts, 29 | const bool tag_only, 30 | const bool copy_select); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_intersect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | bool BM_mesh_intersect(BMesh *bm, 28 | struct BMLoop *(*looptris)[3], 29 | const int looptris_tot, 30 | int (*test_fn)(BMFace *f, void *user_data), 31 | void *user_data, 32 | const bool use_self, 33 | const bool use_separate, 34 | const bool use_dissolve, 35 | const bool use_island_connect, 36 | const bool use_partial_connect, 37 | const bool use_edge_tag, 38 | const int boolean_mode, 39 | const float eps); 40 | 41 | enum { 42 | BMESH_ISECT_BOOLEAN_NONE = -1, 43 | /* aligned with BooleanModifierOp */ 44 | BMESH_ISECT_BOOLEAN_ISECT = 0, 45 | BMESH_ISECT_BOOLEAN_UNION = 1, 46 | BMESH_ISECT_BOOLEAN_DIFFERENCE = 2, 47 | }; 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_intersect_edges.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bmesh 19 | */ 20 | 21 | #pragma once 22 | 23 | bool BM_mesh_intersect_edges( 24 | BMesh *bm, const char hflag, const float dist, const bool split_faces, GHash *r_targetmap); 25 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_path_uv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | struct BMCalcPathUVParams { 24 | uint use_topology_distance : 1; 25 | uint use_step_face : 1; 26 | uint cd_loop_uv_offset; 27 | float aspect_y; 28 | }; 29 | 30 | struct LinkNode *BM_mesh_calc_path_uv_vert(BMesh *bm, 31 | BMLoop *l_src, 32 | BMLoop *l_dst, 33 | const struct BMCalcPathUVParams *params, 34 | bool (*filter_fn)(BMLoop *, void *), 35 | void *user_data) ATTR_WARN_UNUSED_RESULT 36 | ATTR_NONNULL(1, 2, 3, 5); 37 | 38 | struct LinkNode *BM_mesh_calc_path_uv_face(BMesh *bm, 39 | BMFace *f_src, 40 | BMFace *f_dst, 41 | const struct BMCalcPathUVParams *params, 42 | bool (*filter_fn)(BMFace *, void *), 43 | void *user_data) ATTR_WARN_UNUSED_RESULT 44 | ATTR_NONNULL(1, 2, 3, 5); 45 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_region_match.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | int BM_mesh_region_match(BMesh *bm, 24 | BMFace **faces_region, 25 | uint faces_region_len, 26 | ListBase *r_face_regions); 27 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_separate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #pragma once 18 | 19 | /** \file 20 | * \ingroup bmesh 21 | */ 22 | 23 | void BM_mesh_separate_faces(BMesh *bm, BMFaceFilterFunc filter_fn, void *user_data); 24 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_triangulate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bmesh 19 | * 20 | * Triangulate. 21 | */ 22 | 23 | #pragma once 24 | 25 | void BM_mesh_triangulate(BMesh *bm, 26 | const int quad_method, 27 | const int ngon_method, 28 | const int min_vertices, 29 | const bool tag_only, 30 | BMOperator *op, 31 | BMOpSlot *slot_facemap_out, 32 | BMOpSlot *slot_facemap_double_out); 33 | -------------------------------------------------------------------------------- /SeaSide/bmesh/tools/bmesh_wireframe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bmesh 19 | * 20 | * Wire Frame. 21 | */ 22 | 23 | #pragma once 24 | 25 | void BM_mesh_wireframe(BMesh *bm, 26 | const float offset, 27 | const float offset_fac, 28 | const float offset_fac_vg, 29 | const bool use_replace, 30 | const bool use_boundary, 31 | const bool use_even_offset, 32 | const bool use_relative_offset, 33 | const bool use_crease, 34 | const float crease_weight, 35 | const int defgrp_index, 36 | const bool defgrp_invert, 37 | const short mat_offset, 38 | const short mat_max, 39 | const bool use_tag); 40 | -------------------------------------------------------------------------------- /SeaSide/ccall.h: -------------------------------------------------------------------------------- 1 | #ifndef CCALL_H 2 | #define CCALL_H 3 | 4 | #ifdef __cplusplus 5 | # define EXTERNC extern "C" 6 | #else 7 | # define EXTERNC extern 8 | #endif 9 | 10 | #ifdef EMSCRIPTEN 11 | # include 12 | # define CCALL EXTERNC EMSCRIPTEN_KEEPALIVE 13 | #else 14 | # if defined(_MSC_VER) 15 | # define CCALL EXTERNC __declspec(dllexport) 16 | # else 17 | # define CCALL EXTERNC __attribute__((visibility("default"))) 18 | # endif 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /SeaSide/curve_fit_nd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ***** BEGIN GPL LICENSE BLOCK ***** 2 | # 3 | # This program is free software; you can redistribute it and/or 4 | # modify it under the terms of the GNU General Public License 5 | # as published by the Free Software Foundation; either version 2 6 | # of the License, or (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software Foundation, 15 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | # 17 | # ***** END GPL LICENSE BLOCK ***** 18 | 19 | set(INC 20 | . 21 | ) 22 | 23 | set(INC_SYS 24 | 25 | ) 26 | 27 | set(SRC 28 | intern/curve_fit_cubic.c 29 | intern/curve_fit_cubic_refit.c 30 | intern/curve_fit_corners_detect.c 31 | 32 | curve_fit_nd.h 33 | intern/curve_fit_inline.h 34 | intern/generic_alloc_impl.h 35 | intern/generic_heap.c 36 | intern/generic_heap.h 37 | ) 38 | 39 | set(LIB 40 | ) 41 | 42 | blender_add_lib(extern_curve_fit_nd "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") 43 | -------------------------------------------------------------------------------- /SeaSide/curve_fit_nd/README.blender: -------------------------------------------------------------------------------- 1 | Project: Curve-Fit-nD 2 | URL: https://github.com/ideasman42/curve-fit-nd 3 | License: BSD 3-Clause 4 | Upstream version: ddcd5bd (Last Release) 5 | Local modifications: None 6 | -------------------------------------------------------------------------------- /SeaSide/dna.c: -------------------------------------------------------------------------------- 1 | #error "Error! can't make correct DNA.c file from c:\users\kung\desktop\blender-2.92.0-7d24aa8aa8ca-windows64\2.92\scripts\addons\killtube\seaside\makesdna.c:1479, check alignment." 2 | -------------------------------------------------------------------------------- /SeaSide/dna/MakesDNA.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/dna/MakesDNA.exe -------------------------------------------------------------------------------- /SeaSide/dna/gen.bat: -------------------------------------------------------------------------------- 1 | MakesDNA dna.c dna_type_offsets.h basedir.h 2 | -------------------------------------------------------------------------------- /SeaSide/dna_struct_offsets.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/dna_struct_offsets.h -------------------------------------------------------------------------------- /SeaSide/eigen_capi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2015 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __EIGEN_C_API_H__ 21 | #define __EIGEN_C_API_H__ 22 | 23 | #include "eigenvalues.h" 24 | #include "linear_solver.h" 25 | #include "matrix.h" 26 | #include "svd.h" 27 | 28 | #endif /* __EIGEN_C_API_H__ */ 29 | -------------------------------------------------------------------------------- /SeaSide/eigenvalues.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2015 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __EIGEN3_EIGENVALUES_C_API_H__ 21 | #define __EIGEN3_EIGENVALUES_C_API_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | bool EIG_self_adjoint_eigen_solve(const int size, 28 | const float *matrix, 29 | float *r_eigen_values, 30 | float *r_eigen_vectors); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif /* __EIGEN3_EIGENVALUES_C_API_H__ */ 37 | -------------------------------------------------------------------------------- /SeaSide/ikplugin/BIK_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | * Original author: Benoit Bolsee 19 | */ 20 | 21 | /** \file 22 | * \ingroup ikplugin 23 | */ 24 | 25 | #pragma once 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | struct Depsgraph; 32 | struct Object; 33 | struct Scene; 34 | struct bConstraint; 35 | struct bPose; 36 | struct bPoseChannel; 37 | 38 | void BIK_init_tree(struct Depsgraph *depsgraph, 39 | struct Scene *scene, 40 | struct Object *ob, 41 | float ctime); 42 | void BIK_execute_tree(struct Depsgraph *depsgraph, 43 | struct Scene *scene, 44 | struct Object *ob, 45 | struct bPoseChannel *pchan, 46 | float ctime); 47 | void BIK_release_tree(struct Scene *scene, struct Object *ob, float ctime); 48 | void BIK_clear_data(struct bPose *pose); 49 | void BIK_clear_cache(struct bPose *pose); 50 | void BIK_update_param(struct bPose *pose); 51 | void BIK_test_constraint(struct Object *ob, struct bConstraint *cons); 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | -------------------------------------------------------------------------------- /SeaSide/ikplugin/intern/iksolver_plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | * Original author: Benoit Bolsee 19 | */ 20 | 21 | /** \file 22 | * \ingroup ikplugin 23 | */ 24 | 25 | #pragma once 26 | 27 | #include "ikplugin_api.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | void iksolver_initialize_tree(struct Depsgraph *depsgraph, 34 | struct Scene *scene, 35 | struct Object *ob, 36 | float ctime); 37 | void iksolver_execute_tree(struct Depsgraph *depsgraph, 38 | struct Scene *scene, 39 | struct Object *ob, 40 | struct bPoseChannel *pchan_root, 41 | float ctime); 42 | void iksolver_release_tree(struct Scene *scene, struct Object *ob, float ctime); 43 | void iksolver_clear_data(struct bPose *pose); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /SeaSide/ikplugin/intern/itasc_plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 17 | * All rights reserved. 18 | * Original author: Benoit Bolsee 19 | */ 20 | 21 | /** \file 22 | * \ingroup ikplugin 23 | */ 24 | 25 | #pragma once 26 | 27 | #include "ikplugin_api.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | void itasc_initialize_tree(struct Depsgraph *depsgraph, 34 | struct Scene *scene, 35 | struct Object *ob, 36 | float ctime); 37 | void itasc_execute_tree(struct Depsgraph *depsgraph, 38 | struct Scene *scene, 39 | struct Object *ob, 40 | struct bPoseChannel *pchan_root, 41 | float ctime); 42 | void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime); 43 | void itasc_clear_data(struct bPose *pose); 44 | void itasc_clear_cache(struct bPose *pose); 45 | void itasc_update_param(struct bPose *pose); 46 | void itasc_test_constraint(struct Object *ob, struct bConstraint *cons); 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /SeaSide/intern/lib_intern.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #pragma once 25 | 26 | extern BKE_library_free_notifier_reference_cb free_notifier_reference_cb; 27 | 28 | extern BKE_library_remap_editor_id_reference_cb remap_editor_id_reference_cb; 29 | -------------------------------------------------------------------------------- /SeaSide/intern/subdiv_displacement.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #include "BKE_subdiv.h" 25 | 26 | #include "BLI_utildefines.h" 27 | 28 | #include "MEM_guardedalloc.h" 29 | 30 | void BKE_subdiv_displacement_detach(Subdiv *subdiv) 31 | { 32 | if (subdiv->displacement_evaluator == NULL) { 33 | return; 34 | } 35 | if (subdiv->displacement_evaluator->free != NULL) { 36 | subdiv->displacement_evaluator->free(subdiv->displacement_evaluator); 37 | } 38 | MEM_freeN(subdiv->displacement_evaluator); 39 | subdiv->displacement_evaluator = NULL; 40 | } 41 | -------------------------------------------------------------------------------- /SeaSide/intern/subdiv_topology.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2019 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #include "BKE_subdiv_topology.h" 25 | 26 | #include "BKE_subdiv.h" 27 | 28 | #include "opensubdiv_topology_refiner_capi.h" 29 | 30 | int BKE_subdiv_topology_num_fvar_layers_get(const struct Subdiv *subdiv) 31 | { 32 | OpenSubdiv_TopologyRefiner *topology_refiner = subdiv->topology_refiner; 33 | return topology_refiner->getNumFVarChannels(topology_refiner); 34 | } 35 | -------------------------------------------------------------------------------- /SeaSide/kdtree_1d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | */ 20 | 21 | #define KD_DIMS 1 22 | #define KDTREE_PREFIX_ID BLI_kdtree_1d 23 | #define KDTree KDTree_1d 24 | #define KDTreeNearest KDTreeNearest_1d 25 | #include "kdtree_impl.h" 26 | -------------------------------------------------------------------------------- /SeaSide/kdtree_2d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | */ 20 | 21 | #define KD_DIMS 2 22 | #define KDTREE_PREFIX_ID BLI_kdtree_2d 23 | #define KDTree KDTree_2d 24 | #define KDTreeNearest KDTreeNearest_2d 25 | #include "kdtree_impl.h" 26 | -------------------------------------------------------------------------------- /SeaSide/kdtree_3d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | */ 20 | 21 | #define KD_DIMS 3 22 | #define KDTREE_PREFIX_ID BLI_kdtree_3d 23 | #define KDTree KDTree_3d 24 | #define KDTreeNearest KDTreeNearest_3d 25 | #include "kdtree_impl.h" 26 | -------------------------------------------------------------------------------- /SeaSide/kdtree_4d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | */ 20 | 21 | #define KD_DIMS 4 22 | #define KDTREE_PREFIX_ID BLI_kdtree_4d 23 | #define KDTree KDTree_4d 24 | #define KDTreeNearest KDTreeNearest_4d 25 | #include "kdtree_impl.h" 26 | -------------------------------------------------------------------------------- /SeaSide/lib_intern.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 by Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | /** \file 21 | * \ingroup bke 22 | */ 23 | 24 | #pragma once 25 | 26 | extern BKE_library_free_notifier_reference_cb free_notifier_reference_cb; 27 | 28 | extern BKE_library_remap_editor_id_reference_cb remap_editor_id_reference_cb; 29 | -------------------------------------------------------------------------------- /SeaSide/matrix.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2018 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __EIGEN3_MATRIX_C_API_CC__ 21 | #define __EIGEN3_MATRIX_C_API_CC__ 22 | 23 | /* Eigen gives annoying huge amount of warnings here, silence them! */ 24 | #if defined(__GNUC__) && !defined(__clang__) 25 | # pragma GCC diagnostic ignored "-Wlogical-op" 26 | #endif 27 | 28 | #ifdef __EIGEN3_MATRIX_C_API_CC__ /* quiet warning */ 29 | #endif 30 | 31 | #include 32 | #include 33 | 34 | #include "matrix.h" 35 | 36 | using Eigen::Map; 37 | using Eigen::Matrix4f; 38 | 39 | bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4]) 40 | { 41 | Map M = Map((float *)matrix); 42 | Matrix4f R; 43 | bool invertible = true; 44 | M.computeInverseWithCheck(R, invertible, 0.0f); 45 | if (!invertible) { 46 | R = R.Zero(); 47 | } 48 | memcpy(inverse, R.data(), sizeof(float) * 4 * 4); 49 | return invertible; 50 | } 51 | 52 | #endif /* __EIGEN3_MATRIX_C_API_CC__ */ 53 | -------------------------------------------------------------------------------- /SeaSide/matrix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2015 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __EIGEN3_MATRIX_C_API_H__ 21 | #define __EIGEN3_MATRIX_C_API_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4]); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* __EIGEN3_MATRIX_C_API_H__ */ 34 | -------------------------------------------------------------------------------- /SeaSide/memory_utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | /** \file 18 | * \ingroup bli 19 | * \brief Generic memory manipulation API. 20 | * 21 | * This is to extend on existing functions 22 | * such as ``memcpy`` & ``memcmp``. 23 | */ 24 | #include 25 | 26 | #include "BLI_sys_types.h" 27 | #include "BLI_utildefines.h" 28 | 29 | #include "BLI_memory_utils.h" 30 | 31 | #include "BLI_strict_flags.h" 32 | 33 | /** 34 | * Check if memory is zero'd, as with memset(arr, 0, arr_size) 35 | */ 36 | bool BLI_memory_is_zero(const void *arr, const size_t arr_size) 37 | { 38 | const char *arr_byte = arr; 39 | const char *arr_end = (const char *)arr + arr_size; 40 | 41 | while ((arr_byte != arr_end) && (*arr_byte == 0)) { 42 | arr_byte++; 43 | } 44 | 45 | return (arr_byte == arr_end); 46 | } 47 | -------------------------------------------------------------------------------- /SeaSide/numaapi.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, libnumaapi authors 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to 5 | // deal in the Software without restriction, including without limitation the 6 | // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | // sell copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | // IN THE SOFTWARE. 20 | // 21 | // Author: Sergey Sharybin 22 | 23 | #include "numaapi.h" 24 | 25 | #include 26 | 27 | const char* numaAPI_ResultAsString(NUMAAPI_Result result) { 28 | switch (result) { 29 | case NUMAAPI_SUCCESS: return "SUCCESS"; 30 | case NUMAAPI_NOT_AVAILABLE: return "NOT_AVAILABLE"; 31 | case NUMAAPI_ERROR: return "ERROR"; 32 | case NUMAAPI_ERROR_ATEXIT: return "ERROR_AT_EXIT"; 33 | } 34 | assert(!"Unknown result was passed to numapi_ResultAsString()."); 35 | return "UNKNOWN"; 36 | } 37 | -------------------------------------------------------------------------------- /SeaSide/pthread/pthreadVC3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/pthread/pthreadVC3.lib -------------------------------------------------------------------------------- /SeaSide/svd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2015 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __EIGEN3_SVD_C_API_H__ 21 | #define __EIGEN3_SVD_C_API_H__ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | void EIG_svd_square_matrix( 28 | const int size, const float *matrix, float *r_U, float *r_S, float *r_V); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif /* __EIGEN3_SVD_C_API_H__ */ 35 | -------------------------------------------------------------------------------- /SeaSide/timeit.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #include "BLI_timeit.hh" 18 | 19 | namespace blender::timeit { 20 | 21 | void print_duration(Nanoseconds duration) 22 | { 23 | if (duration < std::chrono::microseconds(100)) { 24 | std::cout << duration.count() << " ns"; 25 | } 26 | else if (duration < std::chrono::seconds(5)) { 27 | std::cout << duration.count() / 1.0e6 << " ms"; 28 | } 29 | else { 30 | std::cout << duration.count() / 1.0e9 << " s"; 31 | } 32 | } 33 | 34 | } // namespace blender::timeit 35 | -------------------------------------------------------------------------------- /SeaSide/utf_winfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2012 Blender Foundation. 17 | * All rights reserved. 18 | * 19 | */ 20 | 21 | #ifndef __UTF_WINFUNC_H__ 22 | #define __UTF_WINFUNC_H__ 23 | 24 | #ifndef WIN32 25 | # error "This file can only compile on windows" 26 | #endif 27 | 28 | #include 29 | 30 | FILE *ufopen(const char *filename, const char *mode); 31 | int uopen(const char *filename, int oflag, int pmode); 32 | int uaccess(const char *filename, int mode); 33 | int urename(const char *oldname, const char *newname); 34 | 35 | char *u_alloc_getenv(const char *varname); 36 | void u_free_getenv(char *val); 37 | 38 | int uput_getenv(const char *varname, char *value, size_t buffsize); 39 | int uputenv(const char *name, const char *value); 40 | 41 | int umkdir(const char *pathname); 42 | 43 | #endif /* __UTF_WINFUNC_H__ */ 44 | -------------------------------------------------------------------------------- /SeaSide/wcwidth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License 4 | * as published by the Free Software Foundation; either version 2 5 | * of the License, or (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software Foundation, 14 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | * 16 | * The Original Code is Copyright (C) 2013 Blender Foundation. 17 | * All rights reserved. 18 | */ 19 | 20 | #ifndef __WCWIDTH_H__ 21 | #define __WCWIDTH_H__ 22 | 23 | #ifndef __cplusplus 24 | # if defined(__APPLE__) || defined(__NetBSD__) 25 | /* The standard header is missing on macOS. */ 26 | #include 27 | typedef unsigned int char32_t; 28 | # else 29 | # include 30 | # endif 31 | #endif 32 | 33 | int mk_wcwidth(char32_t ucs); 34 | int mk_wcswidth(const char32_t *pwcs, size_t n); 35 | int mk_wcwidth_cjk(char32_t ucs); 36 | int mk_wcswidth_cjk(const char32_t *pwcs, size_t n); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /SeaSide/zlib/libz_st.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/zlib/libz_st.lib -------------------------------------------------------------------------------- /SeaSide/zlib/libz_st_d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/SeaSide/zlib/libz_st_d.lib -------------------------------------------------------------------------------- /geometry_node_group_empty_new.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | 3 | def geometry_node_group_empty_new(context): 4 | group = bpy.data.node_groups.new("Geometry Nodes", 'GeometryNodeTree') 5 | group.inputs.new('NodeSocketGeometry', "Geometry") 6 | group.outputs.new('NodeSocketGeometry', "Geometry") 7 | input_node = group.nodes.new('NodeGroupInput') 8 | output_node = group.nodes.new('NodeGroupOutput') 9 | output_node.is_active_output = True 10 | 11 | input_node.select = False 12 | output_node.select = False 13 | 14 | input_node.location.x = -200 - input_node.width 15 | output_node.location.x = 200 16 | 17 | group.links.new(output_node.inputs[0], input_node.outputs[0]) 18 | 19 | return group 20 | -------------------------------------------------------------------------------- /images/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/images/console.png -------------------------------------------------------------------------------- /images/diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/images/diff.png -------------------------------------------------------------------------------- /images/nodeconsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KILLTUBE/BlenderCustomGeometryNodes/6f56fdd2987f6b6e6070309e3ad4fb6642946a20/images/nodeconsole.png -------------------------------------------------------------------------------- /node_group_items.py: -------------------------------------------------------------------------------- 1 | # generic node group items generator for shader, compositor, geometry and texture node groups 2 | def node_group_items(context): 3 | if context is None: 4 | return 5 | space = context.space_data 6 | if not space: 7 | return 8 | ntree = space.edit_tree 9 | if not ntree: 10 | return 11 | 12 | yield NodeItemCustom(draw=group_tools_draw) 13 | 14 | def contains_group(nodetree, group): 15 | if nodetree == group: 16 | return True 17 | else: 18 | for node in nodetree.nodes: 19 | if node.bl_idname in node_tree_group_type.values() and node.node_tree is not None: 20 | if contains_group(node.node_tree, group): 21 | return True 22 | return False 23 | 24 | for group in context.blend_data.node_groups: 25 | if group.bl_idname != ntree.bl_idname: 26 | continue 27 | # filter out recursive groups 28 | if contains_group(group, ntree): 29 | continue 30 | # filter out hidden nodetrees 31 | if group.name.startswith('.'): 32 | continue 33 | yield NodeItem(node_tree_group_type[group.bl_idname], 34 | group.name, 35 | {"node_tree": "bpy.data.node_groups[%r]" % group.name}) 36 | --------------------------------------------------------------------------------