removing all stuff related to mb-0008, will be merged on next commit
This commit is contained in:
parent
a782515ff1
commit
391f2b37bd
|
@ -1 +0,0 @@
|
|||
Binary data like icons or images related to mechanical blender
|
|
@ -66,7 +66,7 @@ _preferences = _bpy.context.preferences
|
|||
_is_factory_startup = _bpy.app.factory_startup
|
||||
|
||||
# Directories added to the start of `sys.path` for all of Blender's "scripts" directories.
|
||||
_script_module_dirs = "startup", "modules","tornavis"
|
||||
_script_module_dirs = "startup", "modules"
|
||||
|
||||
# Base scripts, this points to the directory containing: "modules" & "startup" (see `_script_module_dirs`).
|
||||
# In Blender's code-base this is `./scripts`.
|
||||
|
@ -308,10 +308,6 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False, extensions=True
|
|||
for mod in modules_from_path(path, loaded_modules):
|
||||
test_register(mod)
|
||||
|
||||
if path_subdir == "tornavis":
|
||||
for mod in modules_from_path(path, loaded_modules):
|
||||
test_register(mod)
|
||||
|
||||
if reload_scripts:
|
||||
# Update key-maps for key-map items referencing operators defined in "startup".
|
||||
# Without this, key-map items wont be set properly, see: #113309.
|
||||
|
|
|
@ -159,7 +159,6 @@ add_subdirectory(functions)
|
|||
add_subdirectory(makesdna)
|
||||
add_subdirectory(makesrna)
|
||||
add_subdirectory(compositor)
|
||||
add_subdirectory(tornavis)
|
||||
|
||||
if(WITH_BLENDER_THUMBNAILER)
|
||||
add_subdirectory(blendthumb)
|
||||
|
|
|
@ -15,7 +15,6 @@ set(INC
|
|||
../../windowmanager
|
||||
../../../../intern/mantaflow/extern
|
||||
../../../../intern/opencolorio
|
||||
../../tornavis
|
||||
# RNA_prototypes.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
||||
)
|
||||
|
@ -40,7 +39,6 @@ set(SRC
|
|||
bpy_app_timers.cc
|
||||
bpy_app_translations.cc
|
||||
bpy_app_usd.cc
|
||||
bpy_app_tornavis.cc
|
||||
bpy_capi_utils.cc
|
||||
bpy_driver.cc
|
||||
bpy_gizmo_wrap.cc
|
||||
|
@ -88,7 +86,6 @@ set(SRC
|
|||
bpy_app_timers.h
|
||||
bpy_app_translations.h
|
||||
bpy_app_usd.h
|
||||
bpy_app_tornavis.h
|
||||
bpy_capi_utils.h
|
||||
bpy_driver.h
|
||||
bpy_gizmo_wrap.h
|
||||
|
@ -131,7 +128,6 @@ set(LIB
|
|||
PRIVATE bf::intern::guardedalloc
|
||||
PRIVATE bf::animrig
|
||||
bf_python_gpu
|
||||
tornavis
|
||||
|
||||
${PYTHON_LINKFLAGS}
|
||||
${PYTHON_LIBRARIES}
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "bpy_app_openvdb.h"
|
||||
#include "bpy_app_sdl.h"
|
||||
#include "bpy_app_usd.h"
|
||||
#include "bpy_app_tornavis.h"
|
||||
|
||||
#include "bpy_app_translations.h"
|
||||
|
||||
|
@ -117,7 +116,6 @@ 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"},
|
||||
{"tornavis", "Tornavis options"},
|
||||
|
||||
/* Modules (not struct sequence). */
|
||||
{"icons", "Manage custom icons"},
|
||||
|
@ -204,7 +202,6 @@ static PyObject *make_app_info()
|
|||
SetObjItem(BPY_app_build_options_struct());
|
||||
SetObjItem(BPY_app_handlers_struct());
|
||||
SetObjItem(BPY_app_translations_struct());
|
||||
SetObjItem(BPY_app_tornavis_struct());
|
||||
|
||||
/* modules */
|
||||
SetObjItem(BPY_app_icons_module());
|
||||
|
|
|
@ -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_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;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup pythonintern
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
PyObject *BPY_app_tornavis_struct(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
set(INC
|
||||
.
|
||||
../blenlib
|
||||
)
|
||||
|
||||
set(LIB
|
||||
PRIVATE bf::blenlib
|
||||
)
|
||||
|
||||
|
||||
if(WITH_BOOST)
|
||||
list(APPEND INC_SYS
|
||||
${BOOST_INCLUDE_DIR}
|
||||
)
|
||||
else()
|
||||
message (FATAL_ERROR "tornavis requires WITH_BOOST")
|
||||
endif()
|
||||
|
||||
# Auto fill source files, so patches will not touch that file
|
||||
file(GLOB sources "MB_*")
|
||||
foreach(source ${sources})
|
||||
get_filename_component(name ${source} NAME)
|
||||
list(APPEND SRC "${name}")
|
||||
endforeach()
|
||||
|
||||
# Generate a Definition for each found patch
|
||||
file(GLOB patches "patches/*")
|
||||
foreach(patch ${patches})
|
||||
get_filename_component(def ${patch} NAME_WE)
|
||||
get_filename_component(name ${patch} NAME)
|
||||
if (${name} MATCHES "^MB_[0-9][0-9][0-9][0-9]\.h$" )
|
||||
add_definitions(-D${def})
|
||||
list(APPEND SRC "patches/${name}")
|
||||
else()
|
||||
message (FATAL_ERROR "invalid patch file ${name}")
|
||||
endif ()
|
||||
endforeach()
|
||||
|
||||
|
||||
blender_add_lib(tornavis "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
@ -1,149 +0,0 @@
|
|||
#ifndef MB_BLENDER_PATCHES_H
|
||||
#define MB_BLENDER_PATCHES_H
|
||||
|
||||
#ifdef MB_0001
|
||||
#include "patches/MB_0001.h"
|
||||
#define MB_0001_APPLIED 1
|
||||
#else
|
||||
#define MB_0001_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0002
|
||||
#include "patches/MB_0002.h"
|
||||
#define MB_0002_APPLIED 1
|
||||
#else
|
||||
#define MB_0002_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0003
|
||||
#include "patches/MB_0003.h"
|
||||
#define MB_0003_APPLIED 1
|
||||
#else
|
||||
# define MB_0003_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0004
|
||||
#include "patches/MB_0004.h"
|
||||
#define MB_0004_APPLIED 1
|
||||
#else
|
||||
# define MB_0004_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0005
|
||||
#include "patches/MB_0005.h"
|
||||
#define MB_0005_APPLIED 1
|
||||
#else
|
||||
# define MB_0005_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0006
|
||||
#include "patches/MB_0006.h"
|
||||
#define MB_0006_APPLIED 1
|
||||
#else
|
||||
#define MB_0006_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0007
|
||||
#include "patches/MB_0007.h"
|
||||
#define MB_0007_APPLIED 1
|
||||
#else
|
||||
#define MB_0007_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0008
|
||||
#include "patches/MB_0008.h"
|
||||
#define MB_0008_APPLIED 1
|
||||
#else
|
||||
#define MB_0008_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0009
|
||||
#include "patches/MB_0009.h"
|
||||
#define MB_0009_APPLIED 1
|
||||
#else
|
||||
#define MB_0009_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0010
|
||||
#include "patches/MB_0010.h"
|
||||
#define MB_0010_APPLIED 1
|
||||
#else
|
||||
#define MB_0010_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0011
|
||||
#include "patches/MB_0011.h"
|
||||
#define MB_0011_APPLIED 1
|
||||
#else
|
||||
#define MB_0011_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0012
|
||||
#include "patches/MB_0012.h"
|
||||
#define MB_0012_APPLIED 1
|
||||
#else
|
||||
#define MB_0012_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0013
|
||||
#include "patches/MB_0013.h"
|
||||
#define MB_0013_APPLIED 1
|
||||
#else
|
||||
#define MB_0013_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0014
|
||||
#include "patches/MB_0014.h"
|
||||
#define MB_0014_APPLIED 1
|
||||
#else
|
||||
#define MB_0014_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0015
|
||||
#include "patches/MB_0015.h"
|
||||
#define MB_0015_APPLIED 1
|
||||
#else
|
||||
#define MB_0015_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0016
|
||||
#include "patches/MB_0016.h"
|
||||
#define MB_0016_APPLIED 1
|
||||
#else
|
||||
#define MB_0016_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0017
|
||||
#include "patches/MB_0017.h"
|
||||
#define MB_0017_APPLIED 1
|
||||
#else
|
||||
#define MB_0017_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0018
|
||||
#include "patches/MB_0018.h"
|
||||
#define MB_0018_APPLIED 1
|
||||
#else
|
||||
#define MB_0018_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0019
|
||||
#include "patches/MB_0019.h"
|
||||
#define MB_0019_APPLIED 1
|
||||
#else
|
||||
#define MB_0019_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifdef MB_0020
|
||||
#include "patches/MB_0020.h"
|
||||
#define MB_0020_APPLIED 1
|
||||
#else
|
||||
#define MB_0020_APPLIED 0
|
||||
#endif
|
||||
|
||||
#ifndef MB_0021
|
||||
#define MAX_MB_PATCHES 21
|
||||
#endif
|
||||
|
||||
|
||||
#endif // !MB_BLENDER_PATCHES_H
|
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
#include "MB_patches.h"
|
||||
|
||||
#include <boost/preprocessor/if.hpp>
|
||||
|
||||
#include <BLI_assert.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
char patches[MAX_MB_PATCHES][8] = {0};
|
||||
|
||||
void MB_patches_discover()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
BOOST_PP_IF(MB_0001_APPLIED, strcpy(patches[i++], "MB_0001"), );
|
||||
BOOST_PP_IF(MB_0002_APPLIED, strcpy(patches[i++], "MB_0002"), );
|
||||
BOOST_PP_IF(MB_0003_APPLIED, strcpy(patches[i++], "MB_0003"), );
|
||||
BOOST_PP_IF(MB_0004_APPLIED, strcpy(patches[i++], "MB_0004"), );
|
||||
BOOST_PP_IF(MB_0005_APPLIED, strcpy(patches[i++], "MB_0005"), );
|
||||
BOOST_PP_IF(MB_0006_APPLIED, strcpy(patches[i++], "MB_0006"), );
|
||||
BOOST_PP_IF(MB_0007_APPLIED, strcpy(patches[i++], "MB_0007"), );
|
||||
BOOST_PP_IF(MB_0008_APPLIED, strcpy(patches[i++], "MB_0008"), );
|
||||
BOOST_PP_IF(MB_0009_APPLIED, strcpy(patches[i++], "MB_0009"), );
|
||||
BOOST_PP_IF(MB_0010_APPLIED, strcpy(patches[i++], "MB_0010"), );
|
||||
BOOST_PP_IF(MB_0011_APPLIED, strcpy(patches[i++], "MB_0011"), );
|
||||
BOOST_PP_IF(MB_0012_APPLIED, strcpy(patches[i++], "MB_0012"), );
|
||||
BOOST_PP_IF(MB_0013_APPLIED, strcpy(patches[i++], "MB_0013"), );
|
||||
BOOST_PP_IF(MB_0014_APPLIED, strcpy(patches[i++], "MB_0014"), );
|
||||
BOOST_PP_IF(MB_0015_APPLIED, strcpy(patches[i++], "MB_0015"), );
|
||||
BOOST_PP_IF(MB_0016_APPLIED, strcpy(patches[i++], "MB_0016"), );
|
||||
BOOST_PP_IF(MB_0017_APPLIED, strcpy(patches[i++], "MB_0017"), );
|
||||
BOOST_PP_IF(MB_0018_APPLIED, strcpy(patches[i++], "MB_0018"), );
|
||||
BOOST_PP_IF(MB_0019_APPLIED, strcpy(patches[i++], "MB_0019"), );
|
||||
BOOST_PP_IF(MB_0020_APPLIED, strcpy(patches[i++], "MB_0020"), );
|
||||
|
||||
// Not necessary becuase initialitzed to {0}
|
||||
strcpy(patches[i++], "\0");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void MB_init(void) {
|
||||
MB_patches_discover();
|
||||
}
|
||||
|
||||
char* MB_patch_get(int pos) {
|
||||
BLI_assert(pos < MAX_MB_PATCHES);
|
||||
return *patches[pos] == '\0' ? nullptr : patches[pos];
|
||||
}
|
||||
|
||||
void MB_print_info()
|
||||
{
|
||||
printf("%s", "Tornavis Info\n");
|
||||
printf("%s", "---------------------\n");
|
||||
for (int i = 0; i < MAX_MB_PATCHES; i++) {
|
||||
if (*patches[i] == '\0') {
|
||||
break;
|
||||
}
|
||||
printf("Applied Patch %s\n", patches[i]);
|
||||
}
|
||||
printf("%s", "---------------------\n");
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MB_BLENDER_H
|
||||
#define MB_BLENDER_H
|
||||
|
||||
void MB_init(void);
|
||||
void MB_patches_discover(void);
|
||||
char* MB_patch_get(int pos);
|
||||
void MB_print_info(void);
|
||||
|
||||
#endif
|
|
@ -1 +0,0 @@
|
|||
/* Empty file */
|
|
@ -12,7 +12,6 @@ set(INC
|
|||
../blender/makesrna
|
||||
../blender/render
|
||||
../blender/windowmanager
|
||||
../blender/tornavis
|
||||
)
|
||||
|
||||
set(LIB
|
||||
|
@ -22,7 +21,6 @@ set(LIB
|
|||
PRIVATE bf::intern::clog
|
||||
PRIVATE bf::intern::guardedalloc
|
||||
bf_windowmanager
|
||||
tornavis
|
||||
)
|
||||
|
||||
if(HAVE_FEENABLEEXCEPT)
|
||||
|
@ -504,13 +502,6 @@ install(
|
|||
DESTINATION ${TARGETDIR_VER}/datafiles
|
||||
)
|
||||
|
||||
#tornavis
|
||||
install(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/tornavis
|
||||
DESTINATION ${TARGETDIR_VER}/datafiles
|
||||
)
|
||||
|
||||
|
||||
# localization
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(_locale_dir "${CMAKE_SOURCE_DIR}/locale")
|
||||
|
|
|
@ -54,8 +54,6 @@
|
|||
#include "BKE_vfont.hh"
|
||||
#include "BKE_volume.hh"
|
||||
|
||||
#include "MB_tornavis.h"
|
||||
|
||||
#ifndef WITH_PYTHON_MODULE
|
||||
# include "BLI_args.h"
|
||||
#endif
|
||||
|
@ -470,8 +468,6 @@ int main(int argc,
|
|||
/* After parsing number of threads argument. */
|
||||
BLI_task_scheduler_init();
|
||||
|
||||
MB_init();
|
||||
|
||||
#ifndef WITH_PYTHON_MODULE
|
||||
/* The settings pass includes:
|
||||
* - Background-mode assignment (#Global.background), checked by other subsystems
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
|
||||
# include "GPU_context.h"
|
||||
|
||||
# include "MB_tornavis.h"
|
||||
|
||||
# ifdef WITH_PYTHON
|
||||
# include "BPY_extern_python.h"
|
||||
# include "BPY_extern_run.h"
|
||||
|
@ -1508,16 +1506,6 @@ static int arg_handle_start_with_console(int /*argc*/, const char ** /*argv*/, v
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const char arg_handle_tornavis_info_doc[] =
|
||||
"\n\t"
|
||||
"Shows Tornavis project info on loading.";
|
||||
static int arg_handle_tornavis_info(int /*argc*/, const char ** /*argv*/, void * /*data*/)
|
||||
{
|
||||
MB_print_info();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char arg_handle_register_extension_doc[] =
|
||||
"\n\t"
|
||||
"Register blend-file extension for current user, then exit (Windows only).";
|
||||
|
@ -2572,8 +2560,6 @@ 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, "--tornavis-info", CB(arg_handle_tornavis_info), nullptr);
|
||||
|
||||
# undef CB
|
||||
# undef CB_EX
|
||||
# undef CB_ALL
|
||||
|
|
Loading…
Reference in New Issue