Merge branch 'blender-v2.81-release'
This commit is contained in:
7
extern/draco/src/draco-compressor.cpp
vendored
7
extern/draco/src/draco-compressor.cpp
vendored
@@ -38,6 +38,7 @@
|
||||
#include "draco/point_cloud/point_cloud.h"
|
||||
#include "draco/core/vector_d.h"
|
||||
#include "draco/io/mesh_io.h"
|
||||
#include "draco/compression/encode.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define DLL_EXPORT(retType) extern "C" __declspec(dllexport) retType __cdecl
|
||||
@@ -158,16 +159,14 @@ DLL_EXPORT(bool) compress(
|
||||
printf("%s: Normal quantization bits: %d\n", logTag, compressor->quantizationBitsNormal);
|
||||
printf("%s: Position quantization bits: %d\n", logTag, compressor->quantizationBitsTexCoord);
|
||||
|
||||
draco::ExpertEncoder encoder(compressor->mesh);
|
||||
draco::Encoder encoder;
|
||||
|
||||
encoder.SetSpeedOptions(10 - compressor->compressionLevel, 10 - compressor->compressionLevel);
|
||||
encoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, compressor->quantizationBitsPosition);
|
||||
encoder.SetAttributeQuantization(draco::GeometryAttribute::NORMAL, compressor->quantizationBitsNormal);
|
||||
encoder.SetAttributeQuantization(draco::GeometryAttribute::TEX_COORD, compressor->quantizationBitsTexCoord);
|
||||
|
||||
encoder.SetEncodingMethod(draco::MESH_EDGEBREAKER_ENCODING);
|
||||
|
||||
draco::Status result = encoder.EncodeToBuffer(&compressor->encoderBuffer);
|
||||
draco::Status result = encoder.EncodeMeshToBuffer(compressor->mesh, &compressor->encoderBuffer);
|
||||
|
||||
if(!result.ok()) {
|
||||
printf("%s: Could not compress mesh: %s\n", logTag, result.error_msg());
|
||||
|
||||
@@ -59,7 +59,7 @@ GHOST_IWindow *GHOST_SystemSDL::createWindow(const STR_String &title,
|
||||
GHOST_GLSettings glSettings,
|
||||
const bool exclusive,
|
||||
const bool /* is_dialog */,
|
||||
const GHOST_TEmbedderWindowID parentWindow)
|
||||
const GHOST_IWindow *parentWindow)
|
||||
{
|
||||
GHOST_WindowSDL *window = NULL;
|
||||
|
||||
@@ -70,10 +70,10 @@ GHOST_IWindow *GHOST_SystemSDL::createWindow(const STR_String &title,
|
||||
width,
|
||||
height,
|
||||
state,
|
||||
parentWindow,
|
||||
type,
|
||||
((glSettings.flags & GHOST_glStereoVisual) != 0),
|
||||
exclusive);
|
||||
exclusive,
|
||||
parentWindow);
|
||||
|
||||
if (window) {
|
||||
if (GHOST_kWindowStateFullScreen == state) {
|
||||
|
||||
@@ -90,7 +90,7 @@ class GHOST_SystemSDL : public GHOST_System {
|
||||
GHOST_GLSettings glSettings,
|
||||
const bool exclusive = false,
|
||||
const bool is_dialog = false,
|
||||
const GHOST_TEmbedderWindowID parentWindow = 0);
|
||||
const GHOST_IWindow *parentWindow = NULL);
|
||||
|
||||
/* SDL specific */
|
||||
GHOST_WindowSDL *findGhostWindow(SDL_Window *sdl_win);
|
||||
|
||||
@@ -33,10 +33,10 @@ GHOST_WindowSDL::GHOST_WindowSDL(GHOST_SystemSDL *system,
|
||||
GHOST_TUns32 width,
|
||||
GHOST_TUns32 height,
|
||||
GHOST_TWindowState state,
|
||||
const GHOST_TEmbedderWindowID parentWindow,
|
||||
GHOST_TDrawingContextType type,
|
||||
const bool stereoVisual,
|
||||
const bool exclusive)
|
||||
const bool exclusive,
|
||||
const GHOST_IWindow *parentWindow)
|
||||
: GHOST_Window(width, height, state, stereoVisual, exclusive),
|
||||
m_system(system),
|
||||
m_valid_setup(false),
|
||||
@@ -557,7 +557,7 @@ static SDL_Cursor *sdl_ghost_CreateCursor(
|
||||
}
|
||||
|
||||
/* TODO, this is currently never freed but it wont leak either. */
|
||||
static void getStandardCursorShape(GHOST_TStandardCursor shape)
|
||||
static SDL_Cursor *getStandardCursorShape(GHOST_TStandardCursor shape)
|
||||
{
|
||||
if (sdl_std_cursor_array[0] == NULL) {
|
||||
#define DEF_CURSOR(name, ind) \
|
||||
|
||||
@@ -60,10 +60,10 @@ class GHOST_WindowSDL : public GHOST_Window {
|
||||
GHOST_TUns32 width,
|
||||
GHOST_TUns32 height,
|
||||
GHOST_TWindowState state,
|
||||
const GHOST_TEmbedderWindowID parentWindow,
|
||||
GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
|
||||
const bool stereoVisual = false,
|
||||
const bool exclusive = false);
|
||||
const bool exclusive = false,
|
||||
const GHOST_IWindow *parentWindow = NULL);
|
||||
|
||||
~GHOST_WindowSDL();
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class PhysicButtonsPanel:
|
||||
|
||||
class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Fluid"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -92,7 +92,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
||||
class PHYSICS_PT_fluid_flow(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Flow"
|
||||
bl_parent_id = "PHYSICS_PT_fluid"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -164,7 +164,7 @@ class PHYSICS_PT_fluid_flow(PhysicButtonsPanel, Panel):
|
||||
class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Settings"
|
||||
bl_parent_id = "PHYSICS_PT_fluid"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -253,7 +253,7 @@ class PHYSICS_PT_fluid_settings(PhysicButtonsPanel, Panel):
|
||||
class PHYSICS_PT_fluid_particle_cache(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Cache"
|
||||
bl_parent_id = "PHYSICS_PT_fluid"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -276,7 +276,7 @@ class PHYSICS_PT_domain_bake(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Bake"
|
||||
bl_parent_id = 'PHYSICS_PT_fluid'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -308,7 +308,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
|
||||
bl_label = "World"
|
||||
bl_parent_id = 'PHYSICS_PT_fluid'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -361,7 +361,7 @@ class PHYSICS_PT_domain_viscosity(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Viscosity"
|
||||
bl_parent_id = 'PHYSICS_PT_fluid'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -391,7 +391,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Boundary"
|
||||
bl_parent_id = 'PHYSICS_PT_fluid'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -425,7 +425,7 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Particles"
|
||||
bl_parent_id = 'PHYSICS_PT_fluid'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
||||
@@ -33,8 +33,18 @@
|
||||
|
||||
static bNodeSocketTemplate cmp_node_denoise_in[] = {
|
||||
{SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, 0, N_("Normal"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f},
|
||||
{SOCK_RGBA, 1, N_("Albedo"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR,
|
||||
1,
|
||||
N_("Normal"),
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
-1.0f,
|
||||
1.0f,
|
||||
PROP_NONE,
|
||||
SOCK_HIDE_VALUE},
|
||||
{SOCK_RGBA, 1, N_("Albedo"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{-1, 0, ""}};
|
||||
static bNodeSocketTemplate cmp_node_denoise_out[] = {{SOCK_RGBA, 0, N_("Image")}, {-1, 0, ""}};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user