blenderui 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- blenderui-0.1.0/.gitignore +11 -0
- blenderui-0.1.0/ARCHITECTURE.md +120 -0
- blenderui-0.1.0/CHANGELOG.md +31 -0
- blenderui-0.1.0/CMakeLists.txt +69 -0
- blenderui-0.1.0/INTEGRATION.md +234 -0
- blenderui-0.1.0/LICENSE +674 -0
- blenderui-0.1.0/PKG-INFO +462 -0
- blenderui-0.1.0/README.md +429 -0
- blenderui-0.1.0/SYNTAX_COVERAGE.md +110 -0
- blenderui-0.1.0/api/CMakeLists.txt +6 -0
- blenderui-0.1.0/api/bui_c_api.c +42 -0
- blenderui-0.1.0/api/bui_c_api.h +33 -0
- blenderui-0.1.0/backends/qt/BuiQtSink.cpp +105 -0
- blenderui-0.1.0/backends/qt/BuiQtSink.h +50 -0
- blenderui-0.1.0/backends/qt/BuiWidget.cpp +56 -0
- blenderui-0.1.0/backends/qt/BuiWidget.h +37 -0
- blenderui-0.1.0/backends/qt/CMakeLists.txt +28 -0
- blenderui-0.1.0/bindings/python/CMakeLists.txt +90 -0
- blenderui-0.1.0/bindings/python/blenderui/__init__.py +56 -0
- blenderui-0.1.0/bindings/python/bui/__init__.py +125 -0
- blenderui-0.1.0/bindings/python/bui/_realtk.py +40 -0
- blenderui-0.1.0/bindings/python/bui/_surface.py +309 -0
- blenderui-0.1.0/bindings/python/bui/_version.py +6 -0
- blenderui-0.1.0/bindings/python/bui/components/__init__.py +58 -0
- blenderui-0.1.0/bindings/python/bui/components/app.py +94 -0
- blenderui-0.1.0/bindings/python/bui/components/containers.py +216 -0
- blenderui-0.1.0/bindings/python/bui/components/core.py +165 -0
- blenderui-0.1.0/bindings/python/bui/components/editors.py +241 -0
- blenderui-0.1.0/bindings/python/bui/components/menus.py +102 -0
- blenderui-0.1.0/bindings/python/bui/components/templates.py +126 -0
- blenderui-0.1.0/bindings/python/bui/components/views.py +218 -0
- blenderui-0.1.0/bindings/python/bui/components/widgets.py +432 -0
- blenderui-0.1.0/bindings/python/bui/host.py +304 -0
- blenderui-0.1.0/bindings/python/bui/qt.py +178 -0
- blenderui-0.1.0/bindings/python/bui/qtsyntax.py +2767 -0
- blenderui-0.1.0/bindings/python/bui/svg.py +99 -0
- blenderui-0.1.0/bindings/python/bui/theme.py +186 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/__init__.py +79 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/__main__.py +26 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/_core.py +2543 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/_images.py +498 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/_widgets.py +3445 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/colorchooser.py +91 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/commondialog.py +31 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/constants.py +113 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/dialog.py +25 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/filedialog.py +142 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/font.py +164 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/messagebox.py +113 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/scrolledtext.py +31 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/simpledialog.py +254 -0
- blenderui-0.1.0/bindings/python/bui/tksyntax/ttk.py +1414 -0
- blenderui-0.1.0/bindings/python/setup.py +74 -0
- blenderui-0.1.0/bindings/python/src/buipy_kit.c +2244 -0
- blenderui-0.1.0/bindings/python/src/buipy_module.c +1289 -0
- blenderui-0.1.0/bindings/python/tests/test_advanced.py +208 -0
- blenderui-0.1.0/bindings/python/tests/test_buipy.py +53 -0
- blenderui-0.1.0/bindings/python/tests/test_components.py +767 -0
- blenderui-0.1.0/bindings/python/tests/test_render.py +263 -0
- blenderui-0.1.0/bindings/python/tests/test_syntax.py +267 -0
- blenderui-0.1.0/bindings/python/tests/test_tk_compat.py +545 -0
- blenderui-0.1.0/bindings/python/tests/test_tk_input.py +232 -0
- blenderui-0.1.0/compat/CMakeLists.txt +16 -0
- blenderui-0.1.0/compat/include/ANIM_action.hh +27 -0
- blenderui-0.1.0/compat/include/AS_asset_representation.hh +4 -0
- blenderui-0.1.0/compat/include/BIF_glutil.hh +212 -0
- blenderui-0.1.0/compat/include/BKE_addon.h +42 -0
- blenderui-0.1.0/compat/include/BKE_appdir.hh +192 -0
- blenderui-0.1.0/compat/include/BKE_colorband.hh +33 -0
- blenderui-0.1.0/compat/include/BKE_colortools.hh +244 -0
- blenderui-0.1.0/compat/include/BKE_context.hh +516 -0
- blenderui-0.1.0/compat/include/BKE_curveprofile.h +175 -0
- blenderui-0.1.0/compat/include/BKE_fcurve.hh +3 -0
- blenderui-0.1.0/compat/include/BKE_global.hh +379 -0
- blenderui-0.1.0/compat/include/BKE_lib_id.hh +26 -0
- blenderui-0.1.0/compat/include/BKE_report.hh +161 -0
- blenderui-0.1.0/compat/include/BKE_screen.hh +977 -0
- blenderui-0.1.0/compat/include/BKE_tracking.hh +33 -0
- blenderui-0.1.0/compat/include/BKE_wm_runtime.hh +198 -0
- blenderui-0.1.0/compat/include/BLF_api.hh +470 -0
- blenderui-0.1.0/compat/include/BLF_enums.hh +70 -0
- blenderui-0.1.0/compat/include/BLO_userdef_default.h +22 -0
- blenderui-0.1.0/compat/include/BLT_translation.hh +246 -0
- blenderui-0.1.0/compat/include/CLG_log.h +206 -0
- blenderui-0.1.0/compat/include/ED_asset.hh +3 -0
- blenderui-0.1.0/compat/include/ED_buttons.hh +49 -0
- blenderui-0.1.0/compat/include/ED_node.hh +20 -0
- blenderui-0.1.0/compat/include/ED_screen.hh +794 -0
- blenderui-0.1.0/compat/include/ED_screen_types.hh +133 -0
- blenderui-0.1.0/compat/include/ED_space_api.hh +81 -0
- blenderui-0.1.0/compat/include/GPU_texture.hh +11 -0
- blenderui-0.1.0/compat/include/IMB_colormanagement.hh +41 -0
- blenderui-0.1.0/compat/include/IMB_imbuf.hh +718 -0
- blenderui-0.1.0/compat/include/IMB_imbuf_enums.h +64 -0
- blenderui-0.1.0/compat/include/IMB_imbuf_types.hh +407 -0
- blenderui-0.1.0/compat/include/OCIO_scope.hh +46 -0
- blenderui-0.1.0/compat/include/OCIO_view.hh +3 -0
- blenderui-0.1.0/compat/include/RNA_access.hh +1114 -0
- blenderui-0.1.0/compat/include/RNA_define.hh +751 -0
- blenderui-0.1.0/compat/include/RNA_prototypes.hh +18 -0
- blenderui-0.1.0/compat/include/RNA_types.hh +1092 -0
- blenderui-0.1.0/compat/include/WM_api.hh +2418 -0
- blenderui-0.1.0/compat/include/WM_gizmo_api.hh +479 -0
- blenderui-0.1.0/compat/include/WM_gizmo_types.hh +535 -0
- blenderui-0.1.0/compat/include/WM_keymap.hh +246 -0
- blenderui-0.1.0/compat/include/WM_message.hh +11 -0
- blenderui-0.1.0/compat/include/WM_toolsystem.hh +169 -0
- blenderui-0.1.0/compat/include/WM_types.hh +1527 -0
- blenderui-0.1.0/compat/include/gizmo/WM_gizmo_types.hh +528 -0
- blenderui-0.1.0/compat/include/wm_cursors.hh +78 -0
- blenderui-0.1.0/compat/include/wm_draw.hh +39 -0
- blenderui-0.1.0/compat/include/wm_event_system.hh +220 -0
- blenderui-0.1.0/compat/include/wm_event_types.hh +549 -0
- blenderui-0.1.0/compat/include/wm_gizmo_fn.hh +97 -0
- blenderui-0.1.0/compat/include/wm_window.hh +163 -0
- blenderui-0.1.0/compat/intern/bui_stubs.cc +0 -0
- blenderui-0.1.0/core/CMakeLists.txt +68 -0
- blenderui-0.1.0/core/include/BLI_alloca.h +23 -0
- blenderui-0.1.0/core/include/BLI_allocator.hh +137 -0
- blenderui-0.1.0/core/include/BLI_any.hh +397 -0
- blenderui-0.1.0/core/include/BLI_any_derived.hh +178 -0
- blenderui-0.1.0/core/include/BLI_args.h +72 -0
- blenderui-0.1.0/core/include/BLI_array.hh +489 -0
- blenderui-0.1.0/core/include/BLI_array_state.hh +89 -0
- blenderui-0.1.0/core/include/BLI_array_store.h +131 -0
- blenderui-0.1.0/core/include/BLI_array_store_utils.h +34 -0
- blenderui-0.1.0/core/include/BLI_array_utils.h +148 -0
- blenderui-0.1.0/core/include/BLI_array_utils.hh +484 -0
- blenderui-0.1.0/core/include/BLI_asan.h +36 -0
- blenderui-0.1.0/core/include/BLI_assert.h +98 -0
- blenderui-0.1.0/core/include/BLI_astar.h +150 -0
- blenderui-0.1.0/core/include/BLI_atomic_disjoint_set.hh +158 -0
- blenderui-0.1.0/core/include/BLI_binary_search.hh +56 -0
- blenderui-0.1.0/core/include/BLI_bit_bool_conversion.hh +29 -0
- blenderui-0.1.0/core/include/BLI_bit_group_vector.hh +166 -0
- blenderui-0.1.0/core/include/BLI_bit_ref.hh +246 -0
- blenderui-0.1.0/core/include/BLI_bit_span.hh +486 -0
- blenderui-0.1.0/core/include/BLI_bit_span_ops.hh +369 -0
- blenderui-0.1.0/core/include/BLI_bit_span_to_index_ranges.hh +140 -0
- blenderui-0.1.0/core/include/BLI_bit_vector.hh +406 -0
- blenderui-0.1.0/core/include/BLI_bitmap.h +150 -0
- blenderui-0.1.0/core/include/BLI_bitmap_draw_2d.h +55 -0
- blenderui-0.1.0/core/include/BLI_bounds.hh +515 -0
- blenderui-0.1.0/core/include/BLI_bounds_types.hh +83 -0
- blenderui-0.1.0/core/include/BLI_boxpack_2d.h +74 -0
- blenderui-0.1.0/core/include/BLI_build_config.h +457 -0
- blenderui-0.1.0/core/include/BLI_cache_mutex.hh +122 -0
- blenderui-0.1.0/core/include/BLI_color.hh +155 -0
- blenderui-0.1.0/core/include/BLI_color_mix.hh +1064 -0
- blenderui-0.1.0/core/include/BLI_color_types.hh +217 -0
- blenderui-0.1.0/core/include/BLI_colorspace.hh +38 -0
- blenderui-0.1.0/core/include/BLI_compiler_attrs.h +92 -0
- blenderui-0.1.0/core/include/BLI_compiler_compat.h +52 -0
- blenderui-0.1.0/core/include/BLI_compiler_typecheck.h +682 -0
- blenderui-0.1.0/core/include/BLI_compression.hh +43 -0
- blenderui-0.1.0/core/include/BLI_compute_context.hh +184 -0
- blenderui-0.1.0/core/include/BLI_concurrent_map.hh +198 -0
- blenderui-0.1.0/core/include/BLI_console.h +18 -0
- blenderui-0.1.0/core/include/BLI_convexhull_2d.hh +42 -0
- blenderui-0.1.0/core/include/BLI_cpp_type.hh +766 -0
- blenderui-0.1.0/core/include/BLI_cpp_type_make.hh +476 -0
- blenderui-0.1.0/core/include/BLI_csv_parse.hh +247 -0
- blenderui-0.1.0/core/include/BLI_delaunay_2d.hh +217 -0
- blenderui-0.1.0/core/include/BLI_devirtualize_parameters.hh +169 -0
- blenderui-0.1.0/core/include/BLI_dial_2d.h +45 -0
- blenderui-0.1.0/core/include/BLI_disjoint_set.hh +93 -0
- blenderui-0.1.0/core/include/BLI_dot_export.hh +298 -0
- blenderui-0.1.0/core/include/BLI_dot_export_attribute_enums.hh +112 -0
- blenderui-0.1.0/core/include/BLI_dynamic_stack_buffer.hh +62 -0
- blenderui-0.1.0/core/include/BLI_dynstr.h +106 -0
- blenderui-0.1.0/core/include/BLI_easing.h +51 -0
- blenderui-0.1.0/core/include/BLI_endian_defines.h +26 -0
- blenderui-0.1.0/core/include/BLI_endian_switch.h +44 -0
- blenderui-0.1.0/core/include/BLI_endian_switch_inline.h +84 -0
- blenderui-0.1.0/core/include/BLI_enum_flags.hh +85 -0
- blenderui-0.1.0/core/include/BLI_enumerable_thread_specific.hh +112 -0
- blenderui-0.1.0/core/include/BLI_execution_mode.hh +88 -0
- blenderui-0.1.0/core/include/BLI_expr_pylike_eval.h +61 -0
- blenderui-0.1.0/core/include/BLI_fftw.hh +30 -0
- blenderui-0.1.0/core/include/BLI_fileops.h +473 -0
- blenderui-0.1.0/core/include/BLI_fileops.hh +36 -0
- blenderui-0.1.0/core/include/BLI_fileops_types.h +46 -0
- blenderui-0.1.0/core/include/BLI_filereader.h +63 -0
- blenderui-0.1.0/core/include/BLI_fixed_string.hh +28 -0
- blenderui-0.1.0/core/include/BLI_fixed_width_int.hh +573 -0
- blenderui-0.1.0/core/include/BLI_fixed_width_int_str.hh +79 -0
- blenderui-0.1.0/core/include/BLI_fnmatch.h +47 -0
- blenderui-0.1.0/core/include/BLI_function_ref.hh +165 -0
- blenderui-0.1.0/core/include/BLI_generic_array.hh +260 -0
- blenderui-0.1.0/core/include/BLI_generic_key.hh +60 -0
- blenderui-0.1.0/core/include/BLI_generic_key_string.hh +50 -0
- blenderui-0.1.0/core/include/BLI_generic_pointer.hh +139 -0
- blenderui-0.1.0/core/include/BLI_generic_span.hh +281 -0
- blenderui-0.1.0/core/include/BLI_generic_value_map.hh +115 -0
- blenderui-0.1.0/core/include/BLI_generic_vector_array.hh +149 -0
- blenderui-0.1.0/core/include/BLI_generic_virtual_array.hh +994 -0
- blenderui-0.1.0/core/include/BLI_generic_virtual_vector_array.hh +173 -0
- blenderui-0.1.0/core/include/BLI_ghash.h +650 -0
- blenderui-0.1.0/core/include/BLI_gsqueue.h +44 -0
- blenderui-0.1.0/core/include/BLI_hash.h +110 -0
- blenderui-0.1.0/core/include/BLI_hash.hh +268 -0
- blenderui-0.1.0/core/include/BLI_hash_fwd.hh +14 -0
- blenderui-0.1.0/core/include/BLI_hash_md5.hh +33 -0
- blenderui-0.1.0/core/include/BLI_hash_mm2.h +18 -0
- blenderui-0.1.0/core/include/BLI_hash_mm2a.hh +35 -0
- blenderui-0.1.0/core/include/BLI_hash_mm3.h +18 -0
- blenderui-0.1.0/core/include/BLI_hash_mm3.hh +17 -0
- blenderui-0.1.0/core/include/BLI_hash_tables.hh +322 -0
- blenderui-0.1.0/core/include/BLI_heap.h +79 -0
- blenderui-0.1.0/core/include/BLI_heap_simple.h +46 -0
- blenderui-0.1.0/core/include/BLI_implicit_sharing.h +26 -0
- blenderui-0.1.0/core/include/BLI_implicit_sharing.hh +315 -0
- blenderui-0.1.0/core/include/BLI_implicit_sharing_ptr.hh +262 -0
- blenderui-0.1.0/core/include/BLI_index_mask.hh +1306 -0
- blenderui-0.1.0/core/include/BLI_index_mask_expression.hh +98 -0
- blenderui-0.1.0/core/include/BLI_index_mask_fwd.hh +23 -0
- blenderui-0.1.0/core/include/BLI_index_range.hh +369 -0
- blenderui-0.1.0/core/include/BLI_index_ranges_builder.hh +125 -0
- blenderui-0.1.0/core/include/BLI_index_ranges_builder_fwd.hh +15 -0
- blenderui-0.1.0/core/include/BLI_inplace_priority_queue.hh +298 -0
- blenderui-0.1.0/core/include/BLI_iterator.h +51 -0
- blenderui-0.1.0/core/include/BLI_jitter_2d.h +17 -0
- blenderui-0.1.0/core/include/BLI_kdopbvh.hh +362 -0
- blenderui-0.1.0/core/include/BLI_kdtree.hh +1272 -0
- blenderui-0.1.0/core/include/BLI_kdtree_types.hh +68 -0
- blenderui-0.1.0/core/include/BLI_lasso_2d.hh +25 -0
- blenderui-0.1.0/core/include/BLI_lazy_threading.hh +96 -0
- blenderui-0.1.0/core/include/BLI_length_parameterize.hh +189 -0
- blenderui-0.1.0/core/include/BLI_linear_allocator.hh +316 -0
- blenderui-0.1.0/core/include/BLI_linear_allocator_chunked_list.hh +209 -0
- blenderui-0.1.0/core/include/BLI_link_utils.h +57 -0
- blenderui-0.1.0/core/include/BLI_linklist.h +97 -0
- blenderui-0.1.0/core/include/BLI_linklist_lockfree.h +56 -0
- blenderui-0.1.0/core/include/BLI_linklist_stack.h +171 -0
- blenderui-0.1.0/core/include/BLI_listbase.h +370 -0
- blenderui-0.1.0/core/include/BLI_listbase_iterator.hh +324 -0
- blenderui-0.1.0/core/include/BLI_listbase_wrapper.hh +128 -0
- blenderui-0.1.0/core/include/BLI_map.hh +1379 -0
- blenderui-0.1.0/core/include/BLI_map_slots.hh +362 -0
- blenderui-0.1.0/core/include/BLI_math_angle_types.hh +726 -0
- blenderui-0.1.0/core/include/BLI_math_axis_angle.hh +116 -0
- blenderui-0.1.0/core/include/BLI_math_axis_angle_types.hh +92 -0
- blenderui-0.1.0/core/include/BLI_math_base.h +376 -0
- blenderui-0.1.0/core/include/BLI_math_base.hh +303 -0
- blenderui-0.1.0/core/include/BLI_math_base_safe.h +32 -0
- blenderui-0.1.0/core/include/BLI_math_basis_types.hh +481 -0
- blenderui-0.1.0/core/include/BLI_math_bits.h +65 -0
- blenderui-0.1.0/core/include/BLI_math_boolean.hh +68 -0
- blenderui-0.1.0/core/include/BLI_math_color.h +190 -0
- blenderui-0.1.0/core/include/BLI_math_color.hh +49 -0
- blenderui-0.1.0/core/include/BLI_math_color_blend.h +131 -0
- blenderui-0.1.0/core/include/BLI_math_constants.h +77 -0
- blenderui-0.1.0/core/include/BLI_math_euler.hh +114 -0
- blenderui-0.1.0/core/include/BLI_math_euler_types.hh +437 -0
- blenderui-0.1.0/core/include/BLI_math_filter.hh +24 -0
- blenderui-0.1.0/core/include/BLI_math_geom.h +1417 -0
- blenderui-0.1.0/core/include/BLI_math_half.hh +55 -0
- blenderui-0.1.0/core/include/BLI_math_inline.h +36 -0
- blenderui-0.1.0/core/include/BLI_math_interp.hh +513 -0
- blenderui-0.1.0/core/include/BLI_math_matrix.h +591 -0
- blenderui-0.1.0/core/include/BLI_math_matrix.hh +1826 -0
- blenderui-0.1.0/core/include/BLI_math_matrix_types.hh +1042 -0
- blenderui-0.1.0/core/include/BLI_math_mpq.hh +30 -0
- blenderui-0.1.0/core/include/BLI_math_quaternion.hh +709 -0
- blenderui-0.1.0/core/include/BLI_math_quaternion_types.hh +319 -0
- blenderui-0.1.0/core/include/BLI_math_rotation.h +449 -0
- blenderui-0.1.0/core/include/BLI_math_rotation.hh +501 -0
- blenderui-0.1.0/core/include/BLI_math_rotation_legacy.hh +29 -0
- blenderui-0.1.0/core/include/BLI_math_rotation_types.hh +20 -0
- blenderui-0.1.0/core/include/BLI_math_solvers.h +113 -0
- blenderui-0.1.0/core/include/BLI_math_statistics.h +63 -0
- blenderui-0.1.0/core/include/BLI_math_time.h +57 -0
- blenderui-0.1.0/core/include/BLI_math_vector.h +643 -0
- blenderui-0.1.0/core/include/BLI_math_vector.hh +832 -0
- blenderui-0.1.0/core/include/BLI_math_vector_mpq_types.hh +79 -0
- blenderui-0.1.0/core/include/BLI_math_vector_swizzle.hh +377 -0
- blenderui-0.1.0/core/include/BLI_math_vector_types.hh +789 -0
- blenderui-0.1.0/core/include/BLI_math_vector_unroll.hh +209 -0
- blenderui-0.1.0/core/include/BLI_memarena.h +83 -0
- blenderui-0.1.0/core/include/BLI_memblock.h +55 -0
- blenderui-0.1.0/core/include/BLI_memiter.h +67 -0
- blenderui-0.1.0/core/include/BLI_memory_cache.hh +80 -0
- blenderui-0.1.0/core/include/BLI_memory_cache_file_load.hh +34 -0
- blenderui-0.1.0/core/include/BLI_memory_counter.hh +70 -0
- blenderui-0.1.0/core/include/BLI_memory_counter_fwd.hh +23 -0
- blenderui-0.1.0/core/include/BLI_memory_utils.hh +364 -0
- blenderui-0.1.0/core/include/BLI_mempool.h +130 -0
- blenderui-0.1.0/core/include/BLI_mesh_boolean.hh +75 -0
- blenderui-0.1.0/core/include/BLI_mesh_intersect.hh +411 -0
- blenderui-0.1.0/core/include/BLI_mmap.h +39 -0
- blenderui-0.1.0/core/include/BLI_multi_value_map.hh +173 -0
- blenderui-0.1.0/core/include/BLI_mutex.hh +51 -0
- blenderui-0.1.0/core/include/BLI_noise.h +138 -0
- blenderui-0.1.0/core/include/BLI_noise.hh +252 -0
- blenderui-0.1.0/core/include/BLI_offset_indices.hh +232 -0
- blenderui-0.1.0/core/include/BLI_offset_span.hh +113 -0
- blenderui-0.1.0/core/include/BLI_ordered_edge.hh +63 -0
- blenderui-0.1.0/core/include/BLI_parameter_pack_utils.hh +130 -0
- blenderui-0.1.0/core/include/BLI_path_utils.hh +802 -0
- blenderui-0.1.0/core/include/BLI_polyfill_2d.h +46 -0
- blenderui-0.1.0/core/include/BLI_polyfill_2d_beautify.h +65 -0
- blenderui-0.1.0/core/include/BLI_pool.hh +86 -0
- blenderui-0.1.0/core/include/BLI_probing_strategies.hh +232 -0
- blenderui-0.1.0/core/include/BLI_quadric.h +37 -0
- blenderui-0.1.0/core/include/BLI_radial_tiling.hh +24 -0
- blenderui-0.1.0/core/include/BLI_rand.h +101 -0
- blenderui-0.1.0/core/include/BLI_rand.hh +153 -0
- blenderui-0.1.0/core/include/BLI_random_access_iterator_mixin.hh +137 -0
- blenderui-0.1.0/core/include/BLI_rect.h +216 -0
- blenderui-0.1.0/core/include/BLI_resource_scope.hh +243 -0
- blenderui-0.1.0/core/include/BLI_scanfill.h +124 -0
- blenderui-0.1.0/core/include/BLI_serialize.hh +311 -0
- blenderui-0.1.0/core/include/BLI_session_uid.h +54 -0
- blenderui-0.1.0/core/include/BLI_set.hh +991 -0
- blenderui-0.1.0/core/include/BLI_set_slots.hh +378 -0
- blenderui-0.1.0/core/include/BLI_shared_cache.hh +112 -0
- blenderui-0.1.0/core/include/BLI_simd.hh +45 -0
- blenderui-0.1.0/core/include/BLI_smaa_textures.h +41 -0
- blenderui-0.1.0/core/include/BLI_sort.h +27 -0
- blenderui-0.1.0/core/include/BLI_sort.hh +34 -0
- blenderui-0.1.0/core/include/BLI_sort_utils.h +48 -0
- blenderui-0.1.0/core/include/BLI_span.hh +763 -0
- blenderui-0.1.0/core/include/BLI_stack.h +91 -0
- blenderui-0.1.0/core/include/BLI_stack.hh +415 -0
- blenderui-0.1.0/core/include/BLI_strict_flags.h +4 -0
- blenderui-0.1.0/core/include/BLI_string.h +701 -0
- blenderui-0.1.0/core/include/BLI_string_cursor_utf8.h +69 -0
- blenderui-0.1.0/core/include/BLI_string_ref.hh +681 -0
- blenderui-0.1.0/core/include/BLI_string_search.hh +144 -0
- blenderui-0.1.0/core/include/BLI_string_utf8.h +350 -0
- blenderui-0.1.0/core/include/BLI_string_utf8_symbols.h +87 -0
- blenderui-0.1.0/core/include/BLI_string_utils.hh +564 -0
- blenderui-0.1.0/core/include/BLI_sub_frame.hh +94 -0
- blenderui-0.1.0/core/include/BLI_subprocess.hh +157 -0
- blenderui-0.1.0/core/include/BLI_sys_types.h +67 -0
- blenderui-0.1.0/core/include/BLI_system.h +67 -0
- blenderui-0.1.0/core/include/BLI_task.h +32 -0
- blenderui-0.1.0/core/include/BLI_task.hh +256 -0
- blenderui-0.1.0/core/include/BLI_task_size_hints.hh +182 -0
- blenderui-0.1.0/core/include/BLI_tempfile.h +35 -0
- blenderui-0.1.0/core/include/BLI_threads.h +42 -0
- blenderui-0.1.0/core/include/BLI_time.h +37 -0
- blenderui-0.1.0/core/include/BLI_time_utildefines.h +115 -0
- blenderui-0.1.0/core/include/BLI_timecode.h +64 -0
- blenderui-0.1.0/core/include/BLI_timeit.hh +91 -0
- blenderui-0.1.0/core/include/BLI_timer.h +46 -0
- blenderui-0.1.0/core/include/BLI_unique_sorted_indices.hh +169 -0
- blenderui-0.1.0/core/include/BLI_unroll.hh +31 -0
- blenderui-0.1.0/core/include/BLI_ustring.hh +6 -0
- blenderui-0.1.0/core/include/BLI_utildefines.h +633 -0
- blenderui-0.1.0/core/include/BLI_utildefines_iter.h +36 -0
- blenderui-0.1.0/core/include/BLI_utildefines_stack.h +90 -0
- blenderui-0.1.0/core/include/BLI_utildefines_variadic.h +36 -0
- blenderui-0.1.0/core/include/BLI_utility_mixins.hh +43 -0
- blenderui-0.1.0/core/include/BLI_uuid.h +92 -0
- blenderui-0.1.0/core/include/BLI_vector.hh +1167 -0
- blenderui-0.1.0/core/include/BLI_vector_list.hh +303 -0
- blenderui-0.1.0/core/include/BLI_vector_set.hh +1164 -0
- blenderui-0.1.0/core/include/BLI_vector_set_slots.hh +147 -0
- blenderui-0.1.0/core/include/BLI_virtual_array.hh +1219 -0
- blenderui-0.1.0/core/include/BLI_virtual_array_fwd.hh +16 -0
- blenderui-0.1.0/core/include/BLI_virtual_vector_array.hh +83 -0
- blenderui-0.1.0/core/include/BLI_voxel.h +22 -0
- blenderui-0.1.0/core/include/BLI_winstuff.h +145 -0
- blenderui-0.1.0/core/include/BLI_winstuff_com.hh +42 -0
- blenderui-0.1.0/core/include/DNA_listBase.h +129 -0
- blenderui-0.1.0/core/include/MEM_guardedalloc.h +102 -0
- blenderui-0.1.0/core/include/UI_interface_types.hh +52 -0
- blenderui-0.1.0/core/include/fmt/format.h +29 -0
- blenderui-0.1.0/core/include/fmt/ranges.h +2 -0
- blenderui-0.1.0/core/intern/BLI_assert.c +55 -0
- blenderui-0.1.0/core/intern/BLI_dynstr.c +189 -0
- blenderui-0.1.0/core/intern/BLI_ghash.c +1229 -0
- blenderui-0.1.0/core/intern/BLI_ghash_utils.c +278 -0
- blenderui-0.1.0/core/intern/BLI_linklist.c +347 -0
- blenderui-0.1.0/core/intern/BLI_memarena.c +249 -0
- blenderui-0.1.0/core/intern/BLI_mempool.c +865 -0
- blenderui-0.1.0/core/intern/BLI_mempool_private.h +56 -0
- blenderui-0.1.0/core/intern/array_utils_c.c +375 -0
- blenderui-0.1.0/core/intern/atomic/CMakeLists.txt +39 -0
- blenderui-0.1.0/core/intern/atomic/atomic_ops.h +150 -0
- blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_ext.h +248 -0
- blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_msvc.h +284 -0
- blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_unix.h +690 -0
- blenderui-0.1.0/core/intern/atomic/intern/atomic_ops_utils.h +131 -0
- blenderui-0.1.0/core/intern/atomic/tests/atomic_test.cc +1105 -0
- blenderui-0.1.0/core/intern/bui_c_compat.h +30 -0
- blenderui-0.1.0/core/intern/bui_eigen_shim.h +17 -0
- blenderui-0.1.0/core/intern/bui_system_stubs.c +53 -0
- blenderui-0.1.0/core/intern/bui_threads.c +65 -0
- blenderui-0.1.0/core/intern/endian_switch.c +92 -0
- blenderui-0.1.0/core/intern/fnmatch.c +239 -0
- blenderui-0.1.0/core/intern/gsqueue.c +179 -0
- blenderui-0.1.0/core/intern/guardedalloc.c +133 -0
- blenderui-0.1.0/core/intern/hash_mm2.c +47 -0
- blenderui-0.1.0/core/intern/hash_mm3.c +132 -0
- blenderui-0.1.0/core/intern/list_sort_impl.h +321 -0
- blenderui-0.1.0/core/intern/listbase.c +955 -0
- blenderui-0.1.0/core/intern/math_base.c +83 -0
- blenderui-0.1.0/core/intern/math_base_inline.c +651 -0
- blenderui-0.1.0/core/intern/math_base_safe_inline.c +66 -0
- blenderui-0.1.0/core/intern/math_bits_inline.c +184 -0
- blenderui-0.1.0/core/intern/math_color.c +839 -0
- blenderui-0.1.0/core/intern/math_color_blend_inline.c +1133 -0
- blenderui-0.1.0/core/intern/math_color_inline.c +355 -0
- blenderui-0.1.0/core/intern/math_geom.c +5641 -0
- blenderui-0.1.0/core/intern/math_geom_inline.c +167 -0
- blenderui-0.1.0/core/intern/math_matrix_c.c +2973 -0
- blenderui-0.1.0/core/intern/math_rotation_c.c +2474 -0
- blenderui-0.1.0/core/intern/math_vector.c +1051 -0
- blenderui-0.1.0/core/intern/math_vector_inline.c +1073 -0
- blenderui-0.1.0/core/intern/matrix_invert.c +62 -0
- blenderui-0.1.0/core/intern/porting/string_utils.cc +665 -0
- blenderui-0.1.0/core/intern/rct.c +1200 -0
- blenderui-0.1.0/core/intern/sort_utils.c +86 -0
- blenderui-0.1.0/core/intern/stack.c +268 -0
- blenderui-0.1.0/core/intern/string.c +1337 -0
- blenderui-0.1.0/core/intern/string_cursor_utf8.c +429 -0
- blenderui-0.1.0/core/intern/string_utf8.c +1505 -0
- blenderui-0.1.0/core/intern/svd_m3.c +99 -0
- blenderui-0.1.0/core/intern/wcwidth/CMakeLists.txt +23 -0
- blenderui-0.1.0/core/intern/wcwidth/README.blender +8 -0
- blenderui-0.1.0/core/intern/wcwidth/wcwidth.c +309 -0
- blenderui-0.1.0/core/intern/wcwidth/wcwidth.h +46 -0
- blenderui-0.1.0/core/tests/CMakeLists.txt +14 -0
- blenderui-0.1.0/core/tests/test_core.c +176 -0
- blenderui-0.1.0/docs/c-api.md +99 -0
- blenderui-0.1.0/docs/components.md +216 -0
- blenderui-0.1.0/docs/getting-started.md +104 -0
- blenderui-0.1.0/docs/images/components.png +0 -0
- blenderui-0.1.0/docs/images/qt.png +0 -0
- blenderui-0.1.0/docs/images/tkinter_canvas.png +0 -0
- blenderui-0.1.0/docs/images/tkinter_items.png +0 -0
- blenderui-0.1.0/docs/images/tkinter_messagebox.png +0 -0
- blenderui-0.1.0/docs/images/tkinter_notes.png +0 -0
- blenderui-0.1.0/docs/publishing.md +96 -0
- blenderui-0.1.0/docs/qt.md +145 -0
- blenderui-0.1.0/docs/tkinter.md +227 -0
- blenderui-0.1.0/examples/CMakeLists.txt +11 -0
- blenderui-0.1.0/examples/components_demo.py +293 -0
- blenderui-0.1.0/examples/kit_hello.c +60 -0
- blenderui-0.1.0/examples/python_demo.py +50 -0
- blenderui-0.1.0/examples/qt_syntax_demo.py +89 -0
- blenderui-0.1.0/examples/svg_demo.c +143 -0
- blenderui-0.1.0/examples/tk_syntax_demo.py +92 -0
- blenderui-0.1.0/examples/tk_unchanged_app.py +104 -0
- blenderui-0.1.0/gpu/CMakeLists.txt +27 -0
- blenderui-0.1.0/gpu/include/GPU_backend_sink.h +56 -0
- blenderui-0.1.0/gpu/include/GPU_batch.hh +230 -0
- blenderui-0.1.0/gpu/include/GPU_batch_presets.hh +6 -0
- blenderui-0.1.0/gpu/include/GPU_framebuffer.hh +6 -0
- blenderui-0.1.0/gpu/include/GPU_immediate.hh +67 -0
- blenderui-0.1.0/gpu/include/GPU_immediate_util.hh +64 -0
- blenderui-0.1.0/gpu/include/GPU_index_buffer.hh +6 -0
- blenderui-0.1.0/gpu/include/GPU_matrix.hh +30 -0
- blenderui-0.1.0/gpu/include/GPU_raster.h +185 -0
- blenderui-0.1.0/gpu/include/GPU_shader_shared.hh +19 -0
- blenderui-0.1.0/gpu/include/GPU_state.hh +52 -0
- blenderui-0.1.0/gpu/include/GPU_uniform_buffer.hh +18 -0
- blenderui-0.1.0/gpu/include/GPU_vertbuf.hh +6 -0
- blenderui-0.1.0/gpu/include/GPU_vertex_format.hh +6 -0
- blenderui-0.1.0/gpu/intern/gpu_null.c +810 -0
- blenderui-0.1.0/gpu/intern/gpu_raster.c +1730 -0
- blenderui-0.1.0/kit/CMakeLists.txt +30 -0
- blenderui-0.1.0/kit/include/BUI_kit.h +350 -0
- blenderui-0.1.0/kit/intern/kit_color.c +1371 -0
- blenderui-0.1.0/kit/intern/kit_core.c +3318 -0
- blenderui-0.1.0/kit/intern/kit_draw.c +1376 -0
- blenderui-0.1.0/kit/intern/kit_frame.c +1030 -0
- blenderui-0.1.0/kit/intern/kit_icons_data.c +590 -0
- blenderui-0.1.0/kit/intern/kit_icons_data.h +29 -0
- blenderui-0.1.0/kit/intern/kit_intern.h +535 -0
- blenderui-0.1.0/kit/intern/kit_menus.c +969 -0
- blenderui-0.1.0/kit/intern/kit_textarea.c +612 -0
- blenderui-0.1.0/kit/intern/kit_views.c +1288 -0
- blenderui-0.1.0/kit/intern/kit_widgets.c +2844 -0
- blenderui-0.1.0/kit/intern/kit_window.c +868 -0
- blenderui-0.1.0/pyproject.toml +73 -0
- blenderui-0.1.0/tools/extract_api.py +93 -0
- blenderui-0.1.0/tools/gen_doc_images.py +70 -0
- blenderui-0.1.0/tools/gen_kit_icons.py +117 -0
- blenderui-0.1.0/tools/kit_icons_src.py +613 -0
- blenderui-0.1.0/types/CMakeLists.txt +17 -0
- blenderui-0.1.0/types/dna/include/DNA_ID.h +1394 -0
- blenderui-0.1.0/types/dna/include/DNA_ID_enums.h +187 -0
- blenderui-0.1.0/types/dna/include/DNA_action_types.h +1373 -0
- blenderui-0.1.0/types/dna/include/DNA_anim_enums.h +584 -0
- blenderui-0.1.0/types/dna/include/DNA_anim_types.h +765 -0
- blenderui-0.1.0/types/dna/include/DNA_armature_types.h +598 -0
- blenderui-0.1.0/types/dna/include/DNA_asset_types.h +206 -0
- blenderui-0.1.0/types/dna/include/DNA_attribute_types.h +74 -0
- blenderui-0.1.0/types/dna/include/DNA_boid_types.h +164 -0
- blenderui-0.1.0/types/dna/include/DNA_brush_enums.h +596 -0
- blenderui-0.1.0/types/dna/include/DNA_brush_types.h +503 -0
- blenderui-0.1.0/types/dna/include/DNA_cachefile_types.h +118 -0
- blenderui-0.1.0/types/dna/include/DNA_camera_types.h +268 -0
- blenderui-0.1.0/types/dna/include/DNA_cloth_types.h +250 -0
- blenderui-0.1.0/types/dna/include/DNA_collection_types.h +201 -0
- blenderui-0.1.0/types/dna/include/DNA_color_types.h +242 -0
- blenderui-0.1.0/types/dna/include/DNA_colorband_types.h +79 -0
- blenderui-0.1.0/types/dna/include/DNA_constraint_types.h +1180 -0
- blenderui-0.1.0/types/dna/include/DNA_curve_enums.h +263 -0
- blenderui-0.1.0/types/dna/include/DNA_curve_types.h +427 -0
- blenderui-0.1.0/types/dna/include/DNA_curveprofile_types.h +85 -0
- blenderui-0.1.0/types/dna/include/DNA_curves_types.h +253 -0
- blenderui-0.1.0/types/dna/include/DNA_customdata_types.h +268 -0
- blenderui-0.1.0/types/dna/include/DNA_defs.h +171 -0
- blenderui-0.1.0/types/dna/include/DNA_documentation.h +67 -0
- blenderui-0.1.0/types/dna/include/DNA_dynamicpaint_types.h +248 -0
- blenderui-0.1.0/types/dna/include/DNA_effect_types.h +141 -0
- blenderui-0.1.0/types/dna/include/DNA_fileglobal_types.h +52 -0
- blenderui-0.1.0/types/dna/include/DNA_fluid_types.h +858 -0
- blenderui-0.1.0/types/dna/include/DNA_freestyle_types.h +136 -0
- blenderui-0.1.0/types/dna/include/DNA_genfile.h +244 -0
- blenderui-0.1.0/types/dna/include/DNA_gpencil_legacy_types.h +796 -0
- blenderui-0.1.0/types/dna/include/DNA_gpencil_modifier_types.h +1225 -0
- blenderui-0.1.0/types/dna/include/DNA_gpu_types.h +27 -0
- blenderui-0.1.0/types/dna/include/DNA_grease_pencil_types.h +741 -0
- blenderui-0.1.0/types/dna/include/DNA_image_types.h +266 -0
- blenderui-0.1.0/types/dna/include/DNA_key_types.h +155 -0
- blenderui-0.1.0/types/dna/include/DNA_lattice_types.h +89 -0
- blenderui-0.1.0/types/dna/include/DNA_layer_types.h +284 -0
- blenderui-0.1.0/types/dna/include/DNA_light_types.h +172 -0
- blenderui-0.1.0/types/dna/include/DNA_lightprobe_types.h +371 -0
- blenderui-0.1.0/types/dna/include/DNA_lineart_types.h +78 -0
- blenderui-0.1.0/types/dna/include/DNA_linestyle_types.h +688 -0
- blenderui-0.1.0/types/dna/include/DNA_listBase.h +109 -0
- blenderui-0.1.0/types/dna/include/DNA_mask_types.h +275 -0
- blenderui-0.1.0/types/dna/include/DNA_material_types.h +453 -0
- blenderui-0.1.0/types/dna/include/DNA_mesh_types.h +588 -0
- blenderui-0.1.0/types/dna/include/DNA_meshdata_types.h +449 -0
- blenderui-0.1.0/types/dna/include/DNA_meta_types.h +134 -0
- blenderui-0.1.0/types/dna/include/DNA_modifier_enums.h +339 -0
- blenderui-0.1.0/types/dna/include/DNA_modifier_types.h +3579 -0
- blenderui-0.1.0/types/dna/include/DNA_movieclip_types.h +203 -0
- blenderui-0.1.0/types/dna/include/DNA_nla_types.h +97 -0
- blenderui-0.1.0/types/dna/include/DNA_node_tree_interface_types.h +513 -0
- blenderui-0.1.0/types/dna/include/DNA_node_types.h +3980 -0
- blenderui-0.1.0/types/dna/include/DNA_object_enums.h +66 -0
- blenderui-0.1.0/types/dna/include/DNA_object_fluidsim_types.h +139 -0
- blenderui-0.1.0/types/dna/include/DNA_object_force_types.h +408 -0
- blenderui-0.1.0/types/dna/include/DNA_object_types.h +772 -0
- blenderui-0.1.0/types/dna/include/DNA_outliner_types.h +139 -0
- blenderui-0.1.0/types/dna/include/DNA_packedFile_types.h +27 -0
- blenderui-0.1.0/types/dna/include/DNA_particle_types.h +768 -0
- blenderui-0.1.0/types/dna/include/DNA_pointcache_types.h +168 -0
- blenderui-0.1.0/types/dna/include/DNA_pointcloud_types.h +102 -0
- blenderui-0.1.0/types/dna/include/DNA_rigidbody_types.h +361 -0
- blenderui-0.1.0/types/dna/include/DNA_scene_enums.h +239 -0
- blenderui-0.1.0/types/dna/include/DNA_scene_types.h +2955 -0
- blenderui-0.1.0/types/dna/include/DNA_screen_types.h +934 -0
- blenderui-0.1.0/types/dna/include/DNA_sdna_types.h +148 -0
- blenderui-0.1.0/types/dna/include/DNA_sequence_types.h +1020 -0
- blenderui-0.1.0/types/dna/include/DNA_session_uid_types.h +30 -0
- blenderui-0.1.0/types/dna/include/DNA_shader_fx_types.h +240 -0
- blenderui-0.1.0/types/dna/include/DNA_sound_types.h +71 -0
- blenderui-0.1.0/types/dna/include/DNA_space_enums.h +1151 -0
- blenderui-0.1.0/types/dna/include/DNA_space_types.h +1300 -0
- blenderui-0.1.0/types/dna/include/DNA_speaker_types.h +60 -0
- blenderui-0.1.0/types/dna/include/DNA_text_types.h +81 -0
- blenderui-0.1.0/types/dna/include/DNA_texture_types.h +442 -0
- blenderui-0.1.0/types/dna/include/DNA_theme_types.h +572 -0
- blenderui-0.1.0/types/dna/include/DNA_tracking_types.h +601 -0
- blenderui-0.1.0/types/dna/include/DNA_userdef_enums.h +57 -0
- blenderui-0.1.0/types/dna/include/DNA_userdef_types.h +1247 -0
- blenderui-0.1.0/types/dna/include/DNA_uuid_types.h +35 -0
- blenderui-0.1.0/types/dna/include/DNA_vec_defaults.h +40 -0
- blenderui-0.1.0/types/dna/include/DNA_vec_types.h +149 -0
- blenderui-0.1.0/types/dna/include/DNA_vfont_types.h +41 -0
- blenderui-0.1.0/types/dna/include/DNA_view2d_types.h +191 -0
- blenderui-0.1.0/types/dna/include/DNA_view3d_enums.h +53 -0
- blenderui-0.1.0/types/dna/include/DNA_view3d_types.h +806 -0
- blenderui-0.1.0/types/dna/include/DNA_viewer_path_types.h +96 -0
- blenderui-0.1.0/types/dna/include/DNA_volume_types.h +162 -0
- blenderui-0.1.0/types/dna/include/DNA_windowmanager_enums.h +75 -0
- blenderui-0.1.0/types/dna/include/DNA_windowmanager_types.h +511 -0
- blenderui-0.1.0/types/dna/include/DNA_workspace_types.h +251 -0
- blenderui-0.1.0/types/dna/include/DNA_world_types.h +150 -0
- blenderui-0.1.0/types/dna/include/DNA_xr_types.h +216 -0
- blenderui-0.1.0/ui/CMakeLists.txt +56 -0
- blenderui-0.1.0/ui/include/UI_abstract_view.hh +462 -0
- blenderui-0.1.0/ui/include/UI_grid_view.hh +257 -0
- blenderui-0.1.0/ui/include/UI_icons.hh +1186 -0
- blenderui-0.1.0/ui/include/UI_interface.hh +291 -0
- blenderui-0.1.0/ui/include/UI_interface_c.hh +3170 -0
- blenderui-0.1.0/ui/include/UI_interface_icons.hh +126 -0
- blenderui-0.1.0/ui/include/UI_interface_layout.hh +1027 -0
- blenderui-0.1.0/ui/include/UI_interface_types.hh +62 -0
- blenderui-0.1.0/ui/include/UI_resources.hh +534 -0
- blenderui-0.1.0/ui/include/UI_string_search.hh +38 -0
- blenderui-0.1.0/ui/include/UI_tree_view.hh +485 -0
- blenderui-0.1.0/ui/include/UI_view2d.hh +612 -0
- blenderui-0.1.0/ui/intern/abstract_view.cc +266 -0
- blenderui-0.1.0/ui/intern/abstract_view_item.cc +489 -0
- blenderui-0.1.0/ui/intern/interface_align.cc +509 -0
- blenderui-0.1.0/ui/intern/interface_button_group.cc +54 -0
- blenderui-0.1.0/ui/intern/interface_button_sections.cc +253 -0
- blenderui-0.1.0/ui/intern/interface_context_path.cc +84 -0
- blenderui-0.1.0/ui/intern/interface_drag.cc +135 -0
- blenderui-0.1.0/ui/intern/interface_draw.cc +2586 -0
- blenderui-0.1.0/ui/intern/interface_drop.cc +95 -0
- blenderui-0.1.0/ui/intern/interface_intern.hh +1823 -0
- blenderui-0.1.0/ui/intern/interface_query.cc +904 -0
- blenderui-0.1.0/ui/intern/interface_region_popup.cc +1193 -0
- blenderui-0.1.0/ui/intern/interface_region_search.cc +1262 -0
- blenderui-0.1.0/ui/intern/interface_regions_intern.hh +33 -0
- blenderui-0.1.0/ui/intern/interface_string_search.cc +118 -0
- blenderui-0.1.0/ui/intern/interface_style.cc +616 -0
- blenderui-0.1.0/ui/intern/interface_textbox.cc +316 -0
- blenderui-0.1.0/ui/intern/interface_textbox.hh +64 -0
- blenderui-0.1.0/ui/intern/interface_utils.cc +1020 -0
- blenderui-0.1.0/ui/intern/interface_widgets.cc +6359 -0
- blenderui-0.1.0/ui/intern/resources.cc +1615 -0
- blenderui-0.1.0/ui/intern/view2d.cc +2198 -0
- blenderui-0.1.0/ui/intern/view2d_edge_pan.cc +397 -0
- blenderui-0.1.0/ui/intern/view2d_intern.hh +50 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# BUI Architecture
|
|
2
|
+
|
|
3
|
+
BUI is a decoupled UI toolkit extracted from the Blender project
|
|
4
|
+
(`source/blender/editors/interface` and its support layers). It contains **only**
|
|
5
|
+
reusable interface machinery — no Blender application logic (no scene graph,
|
|
6
|
+
depsgraph, nodes, operators-on-datablocks, file loading, Python).
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
10
|
+
│ ui/ widget toolkit: blocks/buttons, layout engine, │
|
|
11
|
+
│ widget drawing, handlers, views, view2d │
|
|
12
|
+
└──────┬───────────────┬──────────────┬─────────────┬──────────────┘
|
|
13
|
+
│ │ │ │
|
|
14
|
+
┌──────▼──────┐ ┌──────▼──────┐ ┌─────▼──────────┐ ┌▼──────────────────┐
|
|
15
|
+
│ types/ │ │ gpu/ │ │ compat/ │ │ api/ stable C │
|
|
16
|
+
│ DNA data │ │ draw seam │ │ RNA / CTX / WM │ │ ABI for hosts │
|
|
17
|
+
│ shapes │ │ (null back- │ │ / ED / BLF / │ │ & bindings │
|
|
18
|
+
│ (verbatim) │ │ end + sink │ │ IMB seams │ └───┬─────────┬─────┘
|
|
19
|
+
│ │ │ dispatch) │ │ (stubs & hooks)│ │ │
|
|
20
|
+
└──────┬──────┘ └──────┬──────┘ └─────┬──────────┘ ┌───▼───┐ ┌───▼──────┐
|
|
21
|
+
│ │ │ │buipy │ │bui_qt │
|
|
22
|
+
│ │ │ │Python │ │QPainter │
|
|
23
|
+
│ │ │ │binding│ │backend │
|
|
24
|
+
┌──────▼───────────────▼──────────────▼──────────┐└───────┘ └──────────┘
|
|
25
|
+
│ core/ pure C11 foundation extracted from blenlib │
|
|
26
|
+
│ listbase · ghash · mempool · memarena · dynstr │
|
|
27
|
+
│ math (vec/mat/rot/color/geom) · strings · rct │
|
|
28
|
+
│ guarded-allocator shim · threads stubs │
|
|
29
|
+
└────────────────────────────────────────────────────────────────┘
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Dependency rule: arrows point downward only. `ui/` never includes Blender
|
|
33
|
+
application code; everything it needs arrives through `types/`, `gpu/`, or
|
|
34
|
+
`compat/`.
|
|
35
|
+
|
|
36
|
+
## Modules
|
|
37
|
+
|
|
38
|
+
| Module | Contents | Status |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `core/` | C11 subset of blenlib, de-C++ified with mechanical transforms (namespaces stripped, casts normalized, MEM API mapped). Inline math lives in `include/intern/*.c` included by headers (`MINLINE` = `static inline` in C). | **Builds + tested** |
|
|
41
|
+
| `types/` | Verbatim `DNA_*_types.h` struct definitions. `DNA_listBase.h` aliases `blender::{Link,LinkData,ListBase}` onto the core's C structs so DNA structs and the C listbase API share one type. | **Builds** |
|
|
42
|
+
| `gpu/` | The draw surface used by the toolkit (`GPU_*`, `imm*`) behind seam headers + a null backend that *records and forwards*: with a sink installed it emits screen-space primitives (`GPU_backend_sink.h`); without one it discards them. Theme colors reach the GPU layer through function-pointer hooks. | **Builds + tested** |
|
|
43
|
+
| `compat/` | Seam headers carrying upstream API names (`RNA_access.hh`, `BLF_api.hh`, …) with BUI-owned opaque types and stub implementations (`intern/bui_stubs.cc`). | **Builds** |
|
|
44
|
+
| `ui/` | The toolkit sources from `editors/interface`: interface.cc family, widgets, handlers, regions, view2d, views, textbox. Option-gated (`-DBUI_BUILD_UI=ON`). | **Compiles + links** |
|
|
45
|
+
| `kit/` | Blender's UI as a retained-mode C runtime: node tree, uiLayout-style layout, `interface_handlers.cc` interaction rules, widget drawing ported from `interface_widgets.cc` (widget-base shader parameters rendered by `gpu/` raster), menus, color picker, views, editors; Tk-style pack/grid/place geometry managers, canvas display list, multi-line text area; UI undo/redo, Tab field traversal, vertical multi-drag, panel animation; damage-driven rendering; native Win32 window host (`kit_window.c`). C API: `kit/include/BUI_kit.h`. | **Builds + tested** |
|
|
46
|
+
| `api/` | `bui_c_api.h` — small stable C ABI: version info + sink/viewport plumbing for hosts and bindings. | **Builds + tested** |
|
|
47
|
+
| `bindings/python/` | `buipy` CPython extension (no third-party deps) + `bui` package: `bui.components` (Blender component library), `bui.qtsyntax` / `bui.tksyntax` (Qt / tkinter APIs as thin facades over the kit), `bui.host` (native or Tk windows), `SvgSink` headless renderer, `bui.qt.BuiCanvas` PySide6/PyQt6 widget. | **Builds + tested** |
|
|
48
|
+
| `backends/qt/` | C++ Qt backend: `BUI::QtSink` (BuiGpuSink → QPainter) + `BUI::BuiWidget` (QWidget host, no moc needed). Gate: `-DBUI_BUILD_QT_BACKEND=ON`. | **Shipped** (builds where Qt exists) |
|
|
49
|
+
| `examples/` | `bui_svg_demo.c` (C, sink → SVG), `python_demo.py` (buipy → SVG). | **Builds + run** |
|
|
50
|
+
|
|
51
|
+
## Render-sink dispatch
|
|
52
|
+
|
|
53
|
+
The null backend is the integration seam. `gpu/include/GPU_backend_sink.h`
|
|
54
|
+
defines `BuiGpuSink` — a function-pointer table (`triangles`, `lines`,
|
|
55
|
+
`points`, `text`, `scissor`, `begin_frame`, `end_frame`). The null backend:
|
|
56
|
+
|
|
57
|
+
- records immediate-mode vertices (`immBegin/immAttr*/immVertex*/immEnd`),
|
|
58
|
+
- decodes vertex batches (pos/color attributes, index buffers),
|
|
59
|
+
- applies the model matrix and forwards screen-space primitives to the sink,
|
|
60
|
+
- or, with no sink installed, discards everything (pure null).
|
|
61
|
+
|
|
62
|
+
Real renderers plug in at three levels: C (`bui_set_render_sink`), Qt/C++
|
|
63
|
+
(`BUI::QtSink`), Python (`buipy.set_backend`). See INTEGRATION.md.
|
|
64
|
+
|
|
65
|
+
## Build
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
cmake -S . -B build -G "MinGW Makefiles" # or any generator
|
|
69
|
+
cmake --build build
|
|
70
|
+
ctest --test-dir build # core tests + buipy tests
|
|
71
|
+
cmake -S . -B build-ui -DBUI_BUILD_UI=ON -DBUI_BUILD_EXAMPLES=ON
|
|
72
|
+
cmake --build build-ui # + widget toolkit (bui_ui)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Options: `BUI_BUILD_PYTHON_BINDINGS` (ON; auto-skips without Python dev
|
|
76
|
+
files), `BUI_BUILD_QT_BACKEND` (OFF; needs Qt5/Qt6 Widgets),
|
|
77
|
+
`BUI_BUILD_EXAMPLES`, `BUI_BUILD_TESTS`.
|
|
78
|
+
|
|
79
|
+
Windows note: the toolchain must resolve MinGW runtime DLLs from
|
|
80
|
+
`/c/msys64/ucrt64/bin` **before** `/mingw64/bin` or other vendors' paths
|
|
81
|
+
(cc1.exe loads zlib1/gmp from PATH). If builds fail silently, prepend the
|
|
82
|
+
ucrt64 dir: `export PATH="/c/msys64/ucrt64/bin:$PATH"`.
|
|
83
|
+
|
|
84
|
+
## Decoupling inventory (what was cut, what remains)
|
|
85
|
+
|
|
86
|
+
Cut entirely (Blender application logic): scene/mesh/node/depsgraph/modifiers,
|
|
87
|
+
animrig (only the DNA structs + a minimal `animrig::Slot` wrapper remain),
|
|
88
|
+
asset system, sequencer, render, Python-in-Blender, file I/O (BLO),
|
|
89
|
+
eyedroppers, app-specific UI templates, window manager backends (GHOST),
|
|
90
|
+
operator system.
|
|
91
|
+
|
|
92
|
+
Remaining seams before a *hosted* toolkit (real widgets on screen) works —
|
|
93
|
+
call-site counts measured from the copied sources:
|
|
94
|
+
|
|
95
|
+
| Seam | Touchpoints | Notes |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| WM (events/operators/keymaps) | ~183 | Needs lite `wmEvent`/`wmOperator` structs + handler plumbing in `compat/` |
|
|
98
|
+
| ED (screen/region services) | ~120 | Region redraw tagging, area/region lookup — small BUI-owned implementations |
|
|
99
|
+
| CTX (context) | ~46 | Minimal `bContext` replacement |
|
|
100
|
+
| BLF (fonts) | ~45 | Text measurement/draw hook; null impl first |
|
|
101
|
+
| IMB (images/icons) | ~23 | Icon texture registration hook |
|
|
102
|
+
| RNA (properties) | ~16 entry points | Opaque `PropertyRNA` + accessor vtable |
|
|
103
|
+
|
|
104
|
+
These seams block *widget-tree hosting* (creating blocks/buttons driven by
|
|
105
|
+
events), not compilation: all five libraries — `bui_core`, `bui_gpu`,
|
|
106
|
+
`bui_compat`, `bui_api`, `bui_ui` — build and link cleanly today, and the
|
|
107
|
+
render pipeline is exercisable end-to-end through the sink (see
|
|
108
|
+
`examples/`).
|
|
109
|
+
|
|
110
|
+
## Porting notes
|
|
111
|
+
|
|
112
|
+
- Upstream files keep their names and SPDX headers (GPL-2.0-or-later). The
|
|
113
|
+
mechanical de-C++ pass is intentionally boring so future syncs stay easy.
|
|
114
|
+
- `core/include/fmt/*` is a declaration-level stand-in for the external {fmt}
|
|
115
|
+
library; swap for real {fmt} if you need formatted strings.
|
|
116
|
+
- `MEM_guardedalloc.h` is a plain-malloc shim with the upstream C++ template
|
|
117
|
+
surface (`MEM_new<T>`, `MEM_new_zeroed<T>`, `MEM_new_array_uninitialized<T>`,
|
|
118
|
+
`MEM_delete<T>`, `MEM_SAFE_DELETE`).
|
|
119
|
+
- `GPU_batch.hh` carries a layout contract: the first four members of
|
|
120
|
+
`blender::gpu::VertBuf` must match `GPUVertBufInternal` in `gpu_null.c`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **blenderui** (BUI). The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com); versions follow
|
|
5
|
+
[Semantic Versioning](https://semver.org).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - first release
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **C kit** (`kit/`): Blender's UI as a C runtime. It has the node tree,
|
|
13
|
+
Tk's packer and gridder in C, input and interaction (hover, drag grabs,
|
|
14
|
+
continuous cursor, menus, tooltips), widget drawing ported from Blender's
|
|
15
|
+
`interface_widgets.cc`, and damage-driven raster rendering. Also: undo and
|
|
16
|
+
redo, animation, the text area, canvas, scroll views, scrollbars and
|
|
17
|
+
multi-select.
|
|
18
|
+
- **Native window host** for Windows (Win32): DPI-aware, vsync'd
|
|
19
|
+
animation, clipboard, cursors, window-manager features. Other platforms use
|
|
20
|
+
a stdlib-Tk-hosted window.
|
|
21
|
+
- **`bui.tksyntax`**: the complete tkinter API (7846/7846 public names of
|
|
22
|
+
the tkinter and ttk classes), plus `ttk`, `messagebox`, `filedialog`,
|
|
23
|
+
`simpledialog`, `colorchooser`, `font` and `scrolledtext`. Run existing apps
|
|
24
|
+
unchanged with `python -m bui.tksyntax app.py`, `blenderui-tk app.py` or
|
|
25
|
+
`install()`.
|
|
26
|
+
- **`bui.qtsyntax`**: a Qt-style API subset (widgets, layouts, signals,
|
|
27
|
+
`QPainter`, menus, timers).
|
|
28
|
+
- **`bui.components`**: 45 Blender components (layouts, values, views,
|
|
29
|
+
menus, pie menus, the color picker, editors, templates).
|
|
30
|
+
- Packaging as `blenderui` (scikit-build-core), with `import blenderui` as
|
|
31
|
+
an alias of `bui`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# BUI - Blender-derived UI toolkit
|
|
2
|
+
#
|
|
3
|
+
# A decoupled UI library extracted from the Blender project.
|
|
4
|
+
# The application-specific layers (scene, nodes, depsgraph, operators on
|
|
5
|
+
# datablocks...) are NOT part of this library. Only reusable interface
|
|
6
|
+
# machinery lives here: core containers/math (C), UI types, drawing
|
|
7
|
+
# abstraction, and the widget toolkit.
|
|
8
|
+
#
|
|
9
|
+
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
10
|
+
|
|
11
|
+
cmake_minimum_required(VERSION 3.20)
|
|
12
|
+
|
|
13
|
+
# One version for the C library, the Python package and the PyPI wheel.
|
|
14
|
+
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/bui/_version.py" _bui_version_line
|
|
15
|
+
REGEX "^__version__")
|
|
16
|
+
string(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" BUI_VERSION "${_bui_version_line}")
|
|
17
|
+
project(bui LANGUAGES C CXX VERSION ${BUI_VERSION})
|
|
18
|
+
|
|
19
|
+
option(BUI_BUILD_TESTS "Build BUI test executables" ON)
|
|
20
|
+
option(BUI_BUILD_EXAMPLES "Build BUI example applications" OFF)
|
|
21
|
+
option(BUI_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
|
|
22
|
+
option(BUI_BUILD_PYTHON_BINDINGS "Build the buipy CPython bindings (needs Python3 dev files)" ON)
|
|
23
|
+
option(BUI_BUILD_QT_BACKEND "Build the Qt/QPainter backend (needs Qt5/Qt6 with Widgets)" OFF)
|
|
24
|
+
|
|
25
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
26
|
+
set(CMAKE_BUILD_TYPE Release)
|
|
27
|
+
endif()
|
|
28
|
+
|
|
29
|
+
set(CMAKE_C_STANDARD 11)
|
|
30
|
+
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
31
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
32
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
33
|
+
|
|
34
|
+
if(MSVC)
|
|
35
|
+
add_compile_options(/W3)
|
|
36
|
+
else()
|
|
37
|
+
add_compile_options(-Wall -Wno-unused-parameter -Wno-missing-field-initializers)
|
|
38
|
+
if(NOT BUI_WARNINGS_AS_ERRORS)
|
|
39
|
+
add_compile_options(-Wno-error)
|
|
40
|
+
endif()
|
|
41
|
+
endif()
|
|
42
|
+
|
|
43
|
+
set(BUI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
44
|
+
|
|
45
|
+
# Dependency order matters: each layer may only use layers above it in this list.
|
|
46
|
+
add_subdirectory(core) # pure C foundation
|
|
47
|
+
add_subdirectory(types) # BUI-owned shared data types
|
|
48
|
+
add_subdirectory(gpu) # draw abstraction (null backend + sink dispatch)
|
|
49
|
+
add_subdirectory(compat) # seam headers/stubs replacing Blender-app APIs
|
|
50
|
+
add_subdirectory(ui) # the widget toolkit
|
|
51
|
+
add_subdirectory(kit) # Blender UI runtime in C (widgets, input, damage rendering)
|
|
52
|
+
add_subdirectory(api) # stable C ABI for hosts & bindings
|
|
53
|
+
|
|
54
|
+
if(BUI_BUILD_TESTS)
|
|
55
|
+
enable_testing()
|
|
56
|
+
add_subdirectory(core/tests)
|
|
57
|
+
endif()
|
|
58
|
+
|
|
59
|
+
if(BUI_BUILD_PYTHON_BINDINGS)
|
|
60
|
+
add_subdirectory(bindings/python)
|
|
61
|
+
endif()
|
|
62
|
+
|
|
63
|
+
if(BUI_BUILD_QT_BACKEND)
|
|
64
|
+
add_subdirectory(backends/qt)
|
|
65
|
+
endif()
|
|
66
|
+
|
|
67
|
+
if(BUI_BUILD_EXAMPLES)
|
|
68
|
+
add_subdirectory(examples)
|
|
69
|
+
endif()
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Host integration guide
|
|
2
|
+
|
|
3
|
+
> **High-level syntax layers (recommended):** you may not need any of the
|
|
4
|
+
> plumbing below. `bindings/python` ships two application-facing APIs that
|
|
5
|
+
> render through BUI — **Qt syntax** (`bui.qtsyntax`) and **tkinter syntax**
|
|
6
|
+
> (`bui.tksyntax`). See "High-level syntax layers" at the bottom, and
|
|
7
|
+
> "Testing the Python bindings" for the one setup step they need.
|
|
8
|
+
|
|
9
|
+
BUI draws; you present. The toolkit never opens a window, creates a GL
|
|
10
|
+
context, or picks a UI framework. Instead, every draw call funnels through the
|
|
11
|
+
**GPU seam** into a render **sink** you install. This document covers the
|
|
12
|
+
three supported paths: plain C/C++, Qt (C++), and Python (PySide6/PyQt6 or
|
|
13
|
+
headless).
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
┌────────────────────────┐
|
|
17
|
+
your host │ sink (BuiGpuSink) │
|
|
18
|
+
┌────────────────┐ │ triangles() │ renderer
|
|
19
|
+
│ ui toolkit ────┼─┼─▶ lines() ────────────┼──▶ Qt QPainter /
|
|
20
|
+
│ (bui_ui) │ │ points() │ PySide6 QPainter /
|
|
21
|
+
│ gpu seam │ │ text() scissor() │ OpenGL / SVG / console
|
|
22
|
+
│ (gpu_null.c) │ │ begin/end_frame() │ — anything
|
|
23
|
+
└────────────────┘ └────────────────────────┘
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 1. Plain C / C++
|
|
27
|
+
|
|
28
|
+
```c
|
|
29
|
+
#include "bui_c_api.h"
|
|
30
|
+
|
|
31
|
+
static void my_triangles(void *user, const float (*coords)[2],
|
|
32
|
+
const float (*colors)[4], int count) {
|
|
33
|
+
/* rasterize / record / forward `count` vertices */
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
BuiGpuSink sink = {0};
|
|
37
|
+
sink.user = my_renderer_state;
|
|
38
|
+
sink.triangles = my_triangles;
|
|
39
|
+
/* sink.lines, sink.points, sink.text, sink.scissor,
|
|
40
|
+
sink.begin_frame, sink.end_frame are optional */
|
|
41
|
+
bui_set_render_sink(&sink);
|
|
42
|
+
|
|
43
|
+
bui_set_viewport(1280, 720); /* pixels */
|
|
44
|
+
/* ... drive BUI drawing ... */
|
|
45
|
+
bui_set_render_sink(NULL); /* restore the discarding backend */
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The coordinate contract: 2D positions transformed by the current model matrix
|
|
49
|
+
(identity matrices → pixel coordinates), colors as RGBA floats 0..1.
|
|
50
|
+
|
|
51
|
+
A complete minimal example is `examples/svg_demo.c` — it installs an SVG
|
|
52
|
+
recorder and draws through the immediate-mode seam:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
cmake --build build --target bui_svg_demo
|
|
56
|
+
./build/examples/bui_svg_demo out.svg
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 2. Qt (C++)
|
|
60
|
+
|
|
61
|
+
Enable the backend and link it:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
cmake -S . -B build-qt -DBUI_BUILD_QT_BACKEND=ON # needs Qt5/Qt6 Widgets
|
|
65
|
+
cmake --build build-qt
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```cpp
|
|
69
|
+
#include "BuiWidget.h" // backends/qt
|
|
70
|
+
|
|
71
|
+
BUI::BuiWidget *canvas = new BUI::BuiWidget(window);
|
|
72
|
+
canvas->render_func = [&](int w, int h) {
|
|
73
|
+
// BUI draw calls; primitives land on QPainter automatically.
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`BUI::BuiWidget` handles paint/resize/mouse plumbing; `BUI::QtSink` maps BUI
|
|
78
|
+
primitives onto `QPainter` (per-vertex colors reduce to the first vertex color
|
|
79
|
+
per primitive, which matches how the toolkit draws shapes). The backend does
|
|
80
|
+
not require moc or OpenGL.
|
|
81
|
+
|
|
82
|
+
## 3. Python
|
|
83
|
+
|
|
84
|
+
The `buipy` extension (built by default when Python development files are
|
|
85
|
+
found) exposes the same sink protocol to Python — no third-party packages.
|
|
86
|
+
|
|
87
|
+
### Headless / CI — SVG output
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
import buipy
|
|
91
|
+
from bui.svg import SvgSink
|
|
92
|
+
|
|
93
|
+
sink = SvgSink(640, 480)
|
|
94
|
+
buipy.set_backend(sink)
|
|
95
|
+
buipy.demo_scene(640, 480) # or your own draw calls
|
|
96
|
+
sink.save("frame.svg")
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### PySide6 / PyQt6 window
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
import sys
|
|
103
|
+
from PySide6.QtWidgets import QApplication # PyQt6 works identically
|
|
104
|
+
import buipy
|
|
105
|
+
from bui.qt import BuiCanvas
|
|
106
|
+
|
|
107
|
+
app = QApplication(sys.argv)
|
|
108
|
+
canvas = BuiCanvas() # default renders the demo scene
|
|
109
|
+
# canvas.render_func = lambda: <BUI draw calls>
|
|
110
|
+
canvas.resize(800, 600)
|
|
111
|
+
canvas.show()
|
|
112
|
+
sys.exit(app.exec())
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`BuiCanvas` installs a `QtPainterBackend` for each paint pass, so the toolkit
|
|
116
|
+
renders through the same QPainter path as the C++ backend — pure Python, no
|
|
117
|
+
shiboken build.
|
|
118
|
+
|
|
119
|
+
## High-level syntax layers
|
|
120
|
+
|
|
121
|
+
Two facades speak the syntax of established toolkits on top of the C kit
|
|
122
|
+
(`kit/`, exposed to Python as `buipy.KitNode` / `buipy.KitContext`): widgets
|
|
123
|
+
are kit nodes, layouts are the kit's C geometry managers, and windows come
|
|
124
|
+
from `bui.host` (native Win32 on Windows, Tk elsewhere or with
|
|
125
|
+
`BUI_HOST=tk`):
|
|
126
|
+
|
|
127
|
+
### Qt syntax — `bui.qtsyntax`
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
from bui.qtsyntax import QApplication, QWidget, QPushButton, QLabel, QVBoxLayout
|
|
131
|
+
|
|
132
|
+
app = QApplication([])
|
|
133
|
+
window = QWidget()
|
|
134
|
+
window.setWindowTitle("BUI — Qt syntax")
|
|
135
|
+
layout = QVBoxLayout()
|
|
136
|
+
status = QLabel("Press the button.")
|
|
137
|
+
button = QPushButton("Click me")
|
|
138
|
+
button.clicked.connect(lambda: status.setText("Clicked!"))
|
|
139
|
+
layout.addWidget(status)
|
|
140
|
+
layout.addWidget(button)
|
|
141
|
+
window.setLayout(layout)
|
|
142
|
+
window.show()
|
|
143
|
+
app.exec()
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Supported surface: see [SYNTAX_COVERAGE.md](SYNTAX_COVERAGE.md) for the
|
|
147
|
+
exact, honest list (the daily-driver core: windows, labels, buttons,
|
|
148
|
+
checkboxes, box layouts, signals, a `setStyleSheet` subset). Anything not
|
|
149
|
+
yet implemented raises a clear error naming that file. The window host is
|
|
150
|
+
chosen at runtime: **PySide6/PyQt6** if installed, otherwise a stdlib
|
|
151
|
+
tkinter window — the same code runs either way, always rendered by BUI.
|
|
152
|
+
|
|
153
|
+
### tkinter syntax — `bui.tksyntax`
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from bui.tksyntax import Tk, Label, Button, Checkbutton
|
|
157
|
+
|
|
158
|
+
root = Tk()
|
|
159
|
+
root.title("BUI — tkinter syntax")
|
|
160
|
+
root.geometry("420x260")
|
|
161
|
+
status = Label(root, text="")
|
|
162
|
+
status.pack()
|
|
163
|
+
Button(root, text="Click me", command=lambda: status.setText("Clicked!")).pack(pady=4)
|
|
164
|
+
Checkbutton(root, text="Enable feature").pack()
|
|
165
|
+
root.mainloop()
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Runs on the Python standard library alone. `pack(side=, padx=, pady=)`,
|
|
169
|
+
`place(x=, y=)`, `config(**kw)`, `invoke()` are supported; widgets render onto
|
|
170
|
+
a tk.Canvas **via the BUI sink**, so swapping the host renderer (Qt, SVG,
|
|
171
|
+
custom) changes nothing in app code.
|
|
172
|
+
|
|
173
|
+
## Testing the Python bindings
|
|
174
|
+
|
|
175
|
+
`buipy` is a **compiled extension** — it lives in the CMake build tree and is
|
|
176
|
+
built for one specific interpreter. `ModuleNotFoundError: No module named
|
|
177
|
+
'buipy'` means Python cannot find (or cannot load) that file. Three ways to
|
|
178
|
+
fix, fastest first:
|
|
179
|
+
|
|
180
|
+
**1. Nothing to install (auto-locate).** `import bui` finds the extension in
|
|
181
|
+
`build*/bindings/python` automatically. Just build and run:
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
cmake -S . -B build -G "MinGW Makefiles"
|
|
185
|
+
cmake --build build --target buipy
|
|
186
|
+
python examples/python_demo.py # needs the interpreter CMake used
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**2. Match the interpreter.** The extension only loads in the interpreter it
|
|
190
|
+
was built for (CMake found Python 3.14 on this machine →
|
|
191
|
+
`buipy.cp314-win_amd64.pyd`). Check which one CMake picked and run that one:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
grep Python3_EXECUTABLE build/CMakeCache.txt
|
|
195
|
+
C:/Users/ppmpr/AppData/Local/Programs/Python/Python314/python.exe examples/python_demo.py
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
To target a different interpreter, point CMake at it explicitly:
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
cmake -S . -B build-py312 -DPython3_EXECUTABLE="C:/Path/Python312/python.exe"
|
|
202
|
+
cmake --build build-py312 --target buipy
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**3. pip install (no PYTHONPATH ever again):**
|
|
206
|
+
|
|
207
|
+
```sh
|
|
208
|
+
cmake --build build --target buipy
|
|
209
|
+
python -m pip install bindings/python # stages bui/ + the .pyd into site-packages
|
|
210
|
+
python -c "import bui; print(bui.version())"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Sanity check either way:
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
python -c "import bui; print(bui.version())" # -> 0.1.0
|
|
217
|
+
python -m pytest bindings/python/tests # or: ctest --test-dir build
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Wire format reference
|
|
221
|
+
|
|
222
|
+
| Callback | Payload |
|
|
223
|
+
|---|---|
|
|
224
|
+
| `begin_frame(w, h)` | Start of a frame batch; viewport in pixels |
|
|
225
|
+
| `scissor(x, y, w, h)` | Clip rect; `w`/`h` ≤ 0 clears clipping |
|
|
226
|
+
| `triangles(coords, colors, n)` | Non-indexed triangles, 3 vertices each |
|
|
227
|
+
| `lines(coords, colors, n)` | Line list, endpoints in pairs |
|
|
228
|
+
| `points(coords, colors, n, size)` | Points at `size` pixels |
|
|
229
|
+
| `text(x, y, text, size, rgba)` | UTF-8 text run at baseline |
|
|
230
|
+
| `end_frame()` | End of frame batch |
|
|
231
|
+
|
|
232
|
+
All coordinates are 2D floats; colors RGBA floats 0..1. Callbacks may be
|
|
233
|
+
invoked with or without the GIL held — the Python bindings handle this
|
|
234
|
+
internally.
|