rebranding from mblender to tornavis

This commit is contained in:
Jaume Bellet 2023-12-02 17:56:11 +01:00
parent 2285de9e8d
commit c3d76d17a7
15 changed files with 93 additions and 93 deletions

View File

@ -159,7 +159,7 @@ add_subdirectory(functions)
add_subdirectory(makesdna)
add_subdirectory(makesrna)
add_subdirectory(compositor)
add_subdirectory(mblender)
add_subdirectory(tornavis)
if(WITH_BLENDER_THUMBNAILER)
add_subdirectory(blendthumb)

View File

@ -16,7 +16,7 @@ set(INC
../../windowmanager
../../../../intern/mantaflow/extern
../../../../intern/opencolorio
../../mblender
../../tornavis
# RNA_prototypes.h
${CMAKE_BINARY_DIR}/source/blender/makesrna
)
@ -41,7 +41,7 @@ set(SRC
bpy_app_timers.cc
bpy_app_translations.cc
bpy_app_usd.cc
bpy_app_mblender.cc
bpy_app_tornavis.cc
bpy_capi_utils.cc
bpy_driver.cc
bpy_gizmo_wrap.cc
@ -89,7 +89,7 @@ set(SRC
bpy_app_timers.h
bpy_app_translations.h
bpy_app_usd.h
bpy_app_mblender.h
bpy_app_tornavis.h
bpy_capi_utils.h
bpy_driver.h
bpy_gizmo_wrap.h
@ -131,7 +131,7 @@ set(LIB
PRIVATE bf::intern::guardedalloc
PRIVATE bf::animrig
bf_python_gpu
mblender
tornavis
${PYTHON_LINKFLAGS}
${PYTHON_LIBRARIES}

View File

@ -23,7 +23,7 @@
#include "bpy_app_openvdb.h"
#include "bpy_app_sdl.h"
#include "bpy_app_usd.h"
#include "bpy_app_mblender.h"
#include "bpy_app_tornavis.h"
#include "bpy_app_translations.h"
@ -117,7 +117,7 @@ static PyStructSequence_Field app_info_fields[] = {
{"build_options", "A set containing most important enabled optional build features"},
{"handlers", "Application handler callbacks"},
{"translations", "Application and addons internationalization API"},
{"mblender", "Mechanical Blender"},
{"tornavis", "Tornavis options"},
/* Modules (not struct sequence). */
{"icons", "Manage custom icons"},
@ -202,7 +202,7 @@ static PyObject *make_app_info()
SetObjItem(BPY_app_build_options_struct());
SetObjItem(BPY_app_handlers_struct());
SetObjItem(BPY_app_translations_struct());
SetObjItem(BPY_app_mblender_struct());
SetObjItem(BPY_app_tornavis_struct());
/* modules */
SetObjItem(BPY_app_icons_module());

View File

@ -1,71 +0,0 @@
/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup pythonintern
*/
#include <Python.h>
#include "BLI_utildefines.h"
#include "bpy_app_mblender.h"
#include "MB_blender.h"
static PyTypeObject BlenderAppMblenderType;
static PyStructSequence_Field app_mblender_info_fields[] = {
{"patches", nullptr},
{nullptr},
};
static PyStructSequence_Desc app_mblender_info_desc = {
"bpy.app.mblender", /* name */
"This module contains information about options blender is built with", /* doc */
app_mblender_info_fields, /* fields */
ARRAY_SIZE(app_mblender_info_fields) - 1,
};
static PyObject *make_mblender_info()
{
PyObject *mblender_info;
PyObject *list;
int pos=0;
char *patch = nullptr;
mblender_info = PyStructSequence_New(&BlenderAppMblenderType);
if (mblender_info == nullptr) {
return nullptr;
}
list = PyList_New(0);
PyStructSequence_SET_ITEM(mblender_info, pos++, list);
for (int i =0 ; (patch = MB_patch_get(i)); i++) {
PyList_Append(list, PyUnicode_FromString(patch));
}
return mblender_info;
}
PyObject *BPY_app_mblender_struct()
{
PyObject *ret;
PyStructSequence_InitType(&BlenderAppMblenderType, &app_mblender_info_desc);
ret = make_mblender_info();
/* prevent user from creating new instances */
BlenderAppMblenderType.tp_init = nullptr;
BlenderAppMblenderType.tp_new = nullptr;
/* Without this we can't do `set(sys.modules)` #29635. */
BlenderAppMblenderType.tp_hash = (hashfunc)_Py_HashPointer;
return ret;
}

View File

@ -0,0 +1,71 @@
/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup pythonintern
*/
#include <Python.h>
#include "BLI_utildefines.h"
#include "bpy_app_tornavis.h"
#include "MB_tornavis.h"
static PyTypeObject BlenderAppTornavisType;
static PyStructSequence_Field app_tornavis_info_fields[] = {
{"patches", nullptr},
{nullptr},
};
static PyStructSequence_Desc app_tornavis_info_desc = {
"bpy.app.tornavis", /* name */
"This module contains options about tornavis project", /* doc */
app_tornavis_info_fields, /* fields */
ARRAY_SIZE(app_tornavis_info_fields) - 1,
};
static PyObject *make_tornavis_info()
{
PyObject *tornavis_info;
PyObject *list;
int pos=0;
char *patch = nullptr;
tornavis_info = PyStructSequence_New(&BlenderAppTornavisType);
if (tornavis_info == nullptr) {
return nullptr;
}
list = PyList_New(0);
PyStructSequence_SET_ITEM(tornavis_info, pos++, list);
for (int i =0 ; (patch = MB_patch_get(i)); i++) {
PyList_Append(list, PyUnicode_FromString(patch));
}
return tornavis_info;
}
PyObject *BPY_app_tornavis_struct()
{
PyObject *ret;
PyStructSequence_InitType(&BlenderAppTornavisType, &app_tornavis_info_desc);
ret = make_tornavis_info();
/* prevent user from creating new instances */
BlenderAppTornavisType.tp_init = nullptr;
BlenderAppTornavisType.tp_new = nullptr;
/* Without this we can't do `set(sys.modules)` #29635. */
BlenderAppTornavisType.tp_hash = (hashfunc)_Py_HashPointer;
return ret;
}

View File

@ -12,7 +12,7 @@
extern "C" {
#endif
PyObject *BPY_app_mblender_struct(void);
PyObject *BPY_app_tornavis_struct(void);
#ifdef __cplusplus
}

View File

@ -18,7 +18,7 @@ if(WITH_BOOST)
${BOOST_INCLUDE_DIR}
)
else()
message (FATAL_ERROR "mblender requires WITH_BOOST")
message (FATAL_ERROR "tornavis requires WITH_BOOST")
endif()
# Auto fill source files, so patches will not touch that file
@ -42,4 +42,4 @@ file(GLOB patches "patches/*")
endforeach()
blender_add_lib(mblender "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
blender_add_lib(tornavis "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@ -55,7 +55,7 @@ char* MB_patch_get(int pos) {
void MB_print_info()
{
printf("%s", "Mechanical Blender Info\n");
printf("%s", "Tornavis Info\n");
printf("%s", "---------------------\n");
for (int i = 0; i < MAX_MB_PATCHES; i++) {
if (*patches[i] == '\0') {

View File

@ -13,7 +13,7 @@ set(INC
../blender/makesrna
../blender/render
../blender/windowmanager
../blender/mblender
../blender/tornavis
)
set(LIB
@ -22,7 +22,7 @@ set(LIB
PRIVATE bf::intern::clog
PRIVATE bf::intern::guardedalloc
bf_windowmanager
mblender
tornavis
)
if(HAVE_FEENABLEEXCEPT)
@ -479,9 +479,9 @@ install(
DESTINATION ${TARGETDIR_VER}/datafiles
)
#mblender
#tornavis
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/mblender
DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/tornavis
DESTINATION ${TARGETDIR_VER}/datafiles
)

View File

@ -57,7 +57,7 @@
#include "BKE_vfont.h"
#include "BKE_volume.hh"
#include "MB_blender.h"
#include "MB_tornavis.h"
#ifndef WITH_PYTHON_MODULE
# include "BLI_args.h"

View File

@ -47,7 +47,7 @@
# include "GPU_context.h"
# include "MB_blender.h"
# include "MB_tornavis.h"
# ifdef WITH_FFMPEG
# include "IMB_imbuf.h"
@ -1481,10 +1481,10 @@ static int arg_handle_start_with_console(int /*argc*/, const char ** /*argv*/, v
}
static const char arg_handle_mblender_info_doc[] =
static const char arg_handle_tornavis_info_doc[] =
"\n\t"
"Shows Mechanical Blender info on loading.";
static int arg_handle_mblender_info(int /*argc*/, const char ** /*argv*/, void * /*data*/)
"Shows Tornavis project info on loading.";
static int arg_handle_tornavis_info(int /*argc*/, const char ** /*argv*/, void * /*data*/)
{
MB_print_info();
return 0;
@ -2534,7 +2534,7 @@ void main_args_setup(bContext *C, bArgs *ba, bool all)
BLI_args_add(ba, nullptr, "--open-last", CB(arg_handle_load_last_file), C);
BLI_args_add(ba, nullptr, "--mblender-info", CB(arg_handle_mblender_info), nullptr);
BLI_args_add(ba, nullptr, "--tornavis-info", CB(arg_handle_tornavis_info), nullptr);
# undef CB
# undef CB_EX