Mesh: Replace auto smooth with node group #108014
|
@ -4,9 +4,13 @@
|
|||
|
||||
/* Metal kernel entry points. */
|
||||
|
||||
/* NOTE: Must come prior to other includes. */
|
||||
#include "kernel/device/metal/compat.h"
|
||||
#include "kernel/device/metal/globals.h"
|
||||
|
||||
/* NOTE: Must come prior to the kernel.h. */
|
||||
#include "kernel/device/metal/function_constants.h"
|
||||
|
||||
#include "kernel/device/gpu/kernel.h"
|
||||
|
||||
/* MetalRT intersection handlers. */
|
||||
|
@ -65,7 +69,7 @@ TReturn metalrt_local_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
{
|
||||
TReturn result;
|
||||
|
||||
#ifdef __BVH_LOCAL__
|
||||
# ifdef __BVH_LOCAL__
|
||||
uint prim = primitive_id + kernel_data_fetch(object_prim_offset, object);
|
||||
|
||||
if ((object != payload.local_object) || intersection_skip_self_local(payload.self, prim)) {
|
||||
|
@ -137,10 +141,10 @@ TReturn metalrt_local_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
result.accept = false;
|
||||
result.continue_search = true;
|
||||
return result;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
[[intersection(triangle, triangle_data )]] TriangleIntersectionResult
|
||||
[[intersection(triangle, triangle_data)]] TriangleIntersectionResult
|
||||
__anyhit__cycles_metalrt_local_hit_tri_prim(
|
||||
constant KernelParamsMetal &launch_params_metal [[buffer(1)]],
|
||||
ray_data MetalKernelContext::MetalRTIntersectionLocalPayload &payload [[payload]],
|
||||
|
@ -148,9 +152,10 @@ __anyhit__cycles_metalrt_local_hit_tri_prim(
|
|||
float2 barycentrics [[barycentric_coord]],
|
||||
float ray_tmax [[distance]])
|
||||
{
|
||||
//instance_id, aka the user_id has been removed. If we take this function we optimized the
|
||||
//SSS for starting traversal from a primitive acceleration structure instead of the root of the global AS.
|
||||
//this means we will always be intersecting the correct object no need for the userid to check
|
||||
// instance_id, aka the user_id has been removed. If we take this function we optimized the
|
||||
// SSS for starting traversal from a primitive acceleration structure instead of the root of the
|
||||
// global AS. this means we will always be intersecting the correct object no need for the userid
|
||||
// to check
|
||||
return metalrt_local_hit<TriangleIntersectionResult, METALRT_HIT_TRIANGLE>(
|
||||
launch_params_metal, payload, payload.local_object, primitive_id, barycentrics, ray_tmax);
|
||||
}
|
||||
|
@ -178,7 +183,7 @@ __anyhit__cycles_metalrt_local_hit_box(const float ray_tmax [[max_distance]])
|
|||
return result;
|
||||
}
|
||||
|
||||
[[intersection(bounding_box, triangle_data )]] BoundingBoxIntersectionResult
|
||||
[[intersection(bounding_box, triangle_data)]] BoundingBoxIntersectionResult
|
||||
__anyhit__cycles_metalrt_local_hit_box_prim(const float ray_tmax [[max_distance]])
|
||||
{
|
||||
/* unused function */
|
||||
|
@ -197,26 +202,26 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
const float2 barycentrics,
|
||||
const float ray_tmax)
|
||||
{
|
||||
#ifdef __SHADOW_RECORD_ALL__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __SHADOW_RECORD_ALL__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
const uint visibility = payload.visibility;
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
/* continue search */
|
||||
return true;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
const float u = barycentrics.x;
|
||||
const float v = barycentrics.y;
|
||||
const int prim_type = kernel_data_fetch(objects, object).primitive_type;
|
||||
int type = prim_type;
|
||||
# ifdef __HAIR__
|
||||
# ifdef __HAIR__
|
||||
if (intersection_type != METALRT_HIT_TRIANGLE) {
|
||||
if ( (prim_type == PRIMITIVE_CURVE_THICK || prim_type == PRIMITIVE_CURVE_RIBBON)) {
|
||||
if ((prim_type == PRIMITIVE_CURVE_THICK || prim_type == PRIMITIVE_CURVE_RIBBON)) {
|
||||
const KernelCurveSegment segment = kernel_data_fetch(curve_segments, prim);
|
||||
type = segment.type;
|
||||
prim = segment.prim;
|
||||
|
||||
|
||||
/* Filter out curve endcaps */
|
||||
if (u == 0.0f || u == 1.0f) {
|
||||
/* continue search */
|
||||
|
@ -224,19 +229,19 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
if (intersection_skip_self_shadow(payload.self, object, prim)) {
|
||||
/* continue search */
|
||||
return true;
|
||||
}
|
||||
|
||||
# ifndef __TRANSPARENT_SHADOWS__
|
||||
# ifndef __TRANSPARENT_SHADOWS__
|
||||
/* No transparent shadows support compiled in, make opaque. */
|
||||
payload.result = true;
|
||||
/* terminate ray */
|
||||
return false;
|
||||
# else
|
||||
# else
|
||||
short max_hits = payload.max_hits;
|
||||
short num_hits = payload.num_hits;
|
||||
short num_recorded_hits = payload.num_recorded_hits;
|
||||
|
@ -245,7 +250,8 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
|
||||
/* If no transparent shadows, all light is blocked and we can stop immediately. */
|
||||
if (num_hits >= max_hits ||
|
||||
!(context.intersection_get_shader_flags(NULL, prim, type) & SD_HAS_TRANSPARENT_SHADOW)) {
|
||||
!(context.intersection_get_shader_flags(NULL, prim, type) & SD_HAS_TRANSPARENT_SHADOW))
|
||||
{
|
||||
payload.result = true;
|
||||
/* terminate ray */
|
||||
return false;
|
||||
|
@ -304,10 +310,10 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
|
|||
INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, record_index, prim) = prim;
|
||||
INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, record_index, object) = object;
|
||||
INTEGRATOR_STATE_ARRAY_WRITE(state, shadow_isect, record_index, type) = type;
|
||||
|
||||
|
||||
/* Continue tracing. */
|
||||
# endif /* __TRANSPARENT_SHADOWS__ */
|
||||
#endif /* __SHADOW_RECORD_ALL__ */
|
||||
# endif /* __TRANSPARENT_SHADOWS__ */
|
||||
# endif /* __SHADOW_RECORD_ALL__ */
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -351,9 +357,11 @@ inline TReturnType metalrt_visibility_test(
|
|||
{
|
||||
TReturnType result;
|
||||
|
||||
#ifdef __HAIR__
|
||||
# ifdef __HAIR__
|
||||
const int type = kernel_data_fetch(objects, object).primitive_type;
|
||||
if (intersection_type == METALRT_HIT_BOUNDING_BOX && (type == PRIMITIVE_CURVE_THICK || type == PRIMITIVE_CURVE_RIBBON)) {
|
||||
if (intersection_type == METALRT_HIT_BOUNDING_BOX &&
|
||||
(type == PRIMITIVE_CURVE_THICK || type == PRIMITIVE_CURVE_RIBBON))
|
||||
{
|
||||
/* Filter out curve endcaps. */
|
||||
if (u == 0.0f || u == 1.0f) {
|
||||
result.accept = false;
|
||||
|
@ -361,16 +369,16 @@ inline TReturnType metalrt_visibility_test(
|
|||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
uint visibility = payload.visibility;
|
||||
#ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
result.accept = false;
|
||||
result.continue_search = true;
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
|
||||
if (intersection_type == METALRT_HIT_TRIANGLE) {
|
||||
}
|
||||
|
@ -437,7 +445,7 @@ __anyhit__cycles_metalrt_visibility_test_box(const float ray_tmax [[max_distance
|
|||
|
||||
/* Primitive intersection functions. */
|
||||
|
||||
#ifdef __HAIR__
|
||||
# ifdef __HAIR__
|
||||
ccl_device_inline void metalrt_intersection_curve(
|
||||
constant KernelParamsMetal &launch_params_metal,
|
||||
ray_data MetalKernelContext::MetalRTIntersectionPayload &payload,
|
||||
|
@ -451,19 +459,20 @@ ccl_device_inline void metalrt_intersection_curve(
|
|||
const float ray_tmax,
|
||||
thread BoundingBoxIntersectionResult &result)
|
||||
{
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
const uint visibility = payload.visibility;
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
Intersection isect;
|
||||
isect.t = ray_tmax;
|
||||
|
||||
MetalKernelContext context(launch_params_metal);
|
||||
if (context.curve_intersect(
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type)) {
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type))
|
||||
{
|
||||
result = metalrt_visibility_test<BoundingBoxIntersectionResult, METALRT_HIT_BOUNDING_BOX>(
|
||||
launch_params_metal, payload, object, prim, isect.u);
|
||||
if (result.accept) {
|
||||
|
@ -489,19 +498,20 @@ ccl_device_inline void metalrt_intersection_curve_shadow(
|
|||
const float ray_tmax,
|
||||
thread BoundingBoxIntersectionResult &result)
|
||||
{
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
const uint visibility = payload.visibility;
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
Intersection isect;
|
||||
isect.t = ray_tmax;
|
||||
|
||||
MetalKernelContext context(launch_params_metal);
|
||||
if (context.curve_intersect(
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type)) {
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type))
|
||||
{
|
||||
result.continue_search = metalrt_shadow_all_hit<METALRT_HIT_BOUNDING_BOX>(
|
||||
launch_params_metal, payload, object, prim, float2(isect.u, isect.v), ray_tmax);
|
||||
result.accept = !result.continue_search;
|
||||
|
@ -535,11 +545,11 @@ __intersection__curve_ribbon(constant KernelParamsMetal &launch_params_metal [[b
|
|||
segment.type,
|
||||
ray_P,
|
||||
ray_D,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
@ -575,11 +585,11 @@ __intersection__curve_ribbon_shadow(
|
|||
segment.type,
|
||||
ray_P,
|
||||
ray_D,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
@ -613,11 +623,11 @@ __intersection__curve_all(constant KernelParamsMetal &launch_params_metal [[buff
|
|||
segment.type,
|
||||
ray_P,
|
||||
ray_D,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
@ -651,20 +661,20 @@ __intersection__curve_all_shadow(
|
|||
segment.type,
|
||||
ray_P,
|
||||
ray_D,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* __HAIR__ */
|
||||
# endif /* __HAIR__ */
|
||||
|
||||
#ifdef __POINTCLOUD__
|
||||
# ifdef __POINTCLOUD__
|
||||
ccl_device_inline void metalrt_intersection_point(
|
||||
constant KernelParamsMetal &launch_params_metal,
|
||||
ray_data MetalKernelContext::MetalRTIntersectionPayload &payload,
|
||||
|
@ -678,19 +688,20 @@ ccl_device_inline void metalrt_intersection_point(
|
|||
const float ray_tmax,
|
||||
thread BoundingBoxIntersectionResult &result)
|
||||
{
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
const uint visibility = payload.visibility;
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
Intersection isect;
|
||||
isect.t = ray_tmax;
|
||||
|
||||
MetalKernelContext context(launch_params_metal);
|
||||
if (context.point_intersect(
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type)) {
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type))
|
||||
{
|
||||
result = metalrt_visibility_test<BoundingBoxIntersectionResult, METALRT_HIT_BOUNDING_BOX>(
|
||||
launch_params_metal, payload, object, prim, isect.u);
|
||||
if (result.accept) {
|
||||
|
@ -716,19 +727,20 @@ ccl_device_inline void metalrt_intersection_point_shadow(
|
|||
const float ray_tmax,
|
||||
thread BoundingBoxIntersectionResult &result)
|
||||
{
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
# ifdef __VISIBILITY_FLAG__
|
||||
const uint visibility = payload.visibility;
|
||||
if ((kernel_data_fetch(objects, object).visibility & visibility) == 0) {
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
Intersection isect;
|
||||
isect.t = ray_tmax;
|
||||
|
||||
MetalKernelContext context(launch_params_metal);
|
||||
if (context.point_intersect(
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type)) {
|
||||
NULL, &isect, ray_P, ray_D, ray_tmin, isect.t, object, prim, time, type))
|
||||
{
|
||||
result.continue_search = metalrt_shadow_all_hit<METALRT_HIT_BOUNDING_BOX>(
|
||||
launch_params_metal, payload, object, prim, float2(isect.u, isect.v), ray_tmax);
|
||||
result.accept = !result.continue_search;
|
||||
|
@ -764,11 +776,11 @@ __intersection__point(constant KernelParamsMetal &launch_params_metal [[buffer(1
|
|||
type,
|
||||
ray_origin,
|
||||
ray_direction,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
@ -802,16 +814,16 @@ __intersection__point_shadow(constant KernelParamsMetal &launch_params_metal [[b
|
|||
type,
|
||||
ray_origin,
|
||||
ray_direction,
|
||||
# if defined(__METALRT_MOTION__)
|
||||
# if defined(__METALRT_MOTION__)
|
||||
payload.time,
|
||||
# else
|
||||
# else
|
||||
0.0f,
|
||||
# endif
|
||||
# endif
|
||||
ray_tmin,
|
||||
ray_tmax,
|
||||
result);
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif /* __POINTCLOUD__ */
|
||||
#endif /* __METALRT__ */
|
||||
# endif /* __POINTCLOUD__ */
|
||||
#endif /* __METALRT__ */
|
||||
|
|
|
@ -229,13 +229,13 @@ class GHOST_DeviceVK {
|
|||
VkDeviceCreateInfo device_create_info = {};
|
||||
device_create_info.pNext = &maintenance_4;
|
||||
device_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
||||
device_create_info.queueCreateInfoCount = static_cast<uint32_t>(queue_create_infos.size());
|
||||
device_create_info.queueCreateInfoCount = uint32_t(queue_create_infos.size());
|
||||
device_create_info.pQueueCreateInfos = queue_create_infos.data();
|
||||
/* layers_enabled are the same as instance extensions.
|
||||
* This is only needed for 1.0 implementations. */
|
||||
device_create_info.enabledLayerCount = static_cast<uint32_t>(layers_enabled.size());
|
||||
device_create_info.enabledLayerCount = uint32_t(layers_enabled.size());
|
||||
device_create_info.ppEnabledLayerNames = layers_enabled.data();
|
||||
device_create_info.enabledExtensionCount = static_cast<uint32_t>(extensions_device.size());
|
||||
device_create_info.enabledExtensionCount = uint32_t(extensions_device.size());
|
||||
device_create_info.ppEnabledExtensionNames = extensions_device.data();
|
||||
device_create_info.pEnabledFeatures = &device_features;
|
||||
|
||||
|
@ -947,9 +947,9 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
|
|||
VkInstanceCreateInfo create_info = {};
|
||||
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
create_info.pApplicationInfo = &app_info;
|
||||
create_info.enabledLayerCount = static_cast<uint32_t>(layers_enabled.size());
|
||||
create_info.enabledLayerCount = uint32_t(layers_enabled.size());
|
||||
create_info.ppEnabledLayerNames = layers_enabled.data();
|
||||
create_info.enabledExtensionCount = static_cast<uint32_t>(extensions_enabled.size());
|
||||
create_info.enabledExtensionCount = uint32_t(extensions_enabled.size());
|
||||
create_info.ppEnabledExtensionNames = extensions_enabled.data();
|
||||
VK_CHECK(vkCreateInstance(&create_info, nullptr, &instance));
|
||||
}
|
||||
|
|
|
@ -1763,7 +1763,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
|||
dx = [event scrollingDeltaX];
|
||||
dy = [event scrollingDeltaY];
|
||||
|
||||
/* However, Wacom tablet (intuos5) needs old deltas,
|
||||
/* However, WACOM tablet (intuos5) needs old deltas,
|
||||
* it then has momentum and phase at zero. */
|
||||
if (phase == NSEventPhaseNone && momentumPhase == NSEventPhaseNone) {
|
||||
dx = [event deltaX];
|
||||
|
|
|
@ -482,7 +482,7 @@ static void SleepTillEvent(Display *display, int64_t maxSleep)
|
|||
}
|
||||
}
|
||||
|
||||
/* This function borrowed from Qt's X11 support qclipboard_x11.cpp */
|
||||
/* This function borrowed from QT's X11 support `qclipboard_x11.cpp`. */
|
||||
struct init_timestamp_data {
|
||||
Time timestamp;
|
||||
};
|
||||
|
|
|
@ -224,7 +224,7 @@ class pySketchyChainSilhouetteIterator(ChainingIterator):
|
|||
# keeping this local saves passing a reference to 'self' around
|
||||
def make_sketchy(self, ve):
|
||||
"""
|
||||
Creates the skeychy effect by causing the chain to run from
|
||||
Creates the sketchy effect by causing the chain to run from
|
||||
the start again. (loop over itself again)
|
||||
"""
|
||||
if ve is None:
|
||||
|
@ -459,9 +459,8 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
|
|||
self._percent = float(percent)
|
||||
|
||||
def init(self):
|
||||
# each time we're evaluating a chain length
|
||||
# we try to do it once. Thus we reinit
|
||||
# the chain length here:
|
||||
# Each time we're evaluating a chain length we try to do it once.
|
||||
# Thus we reinitialize the chain length here:
|
||||
self._length = 0.0
|
||||
|
||||
def traverse(self, iter):
|
||||
|
@ -531,7 +530,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
|
|||
self._percent = percent
|
||||
|
||||
def init(self):
|
||||
# A chain's length should preverably be evaluated only once.
|
||||
# A chain's length should preferably be evaluated only once.
|
||||
# Therefore, the chain length is reset here.
|
||||
self._length = 0.0
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : shaders.py
|
||||
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
|
||||
# Date : 11/08/2005
|
||||
# Purpose : Stroke shaders to be used for creation of stylized strokes
|
||||
|
@ -834,7 +833,7 @@ class pyPerlinNoise1DShader(StrokeShader):
|
|||
"""
|
||||
Displaces the stroke using the curvilinear abscissa. This means
|
||||
that lines with the same length and sampling interval will be
|
||||
identically distorded.
|
||||
identically distorted.
|
||||
"""
|
||||
|
||||
def __init__(self, freq=10, amp=10, oct=4, seed=-1):
|
||||
|
@ -855,10 +854,10 @@ class pyPerlinNoise1DShader(StrokeShader):
|
|||
class pyPerlinNoise2DShader(StrokeShader):
|
||||
"""
|
||||
Displaces the stroke using the strokes coordinates. This means
|
||||
that in a scene no strokes will be distorded identically.
|
||||
that in a scene no strokes will be distorted identically.
|
||||
|
||||
More information on the noise shaders can be found at:
|
||||
freestyleintegration.wordpress.com/2011/09/25/development-updates-on-september-25/
|
||||
https://freestyleintegration.wordpress.com/2011/09/25/development-updates-on-september-25/
|
||||
"""
|
||||
|
||||
def __init__(self, freq=10, amp=10, oct=4, seed=-1):
|
||||
|
@ -898,7 +897,7 @@ class pyBluePrintCirclesShader(StrokeShader):
|
|||
C = self.__random_center
|
||||
|
||||
# The directions (and phases) are calculated using a separate
|
||||
# function decorated with an lru-cache. This guarantees that
|
||||
# function decorated with an LRU-cache. This guarantees that
|
||||
# the directions (involving sin and cos) are calculated as few
|
||||
# times as possible.
|
||||
#
|
||||
|
@ -977,7 +976,7 @@ class pyBluePrintEllipsesShader(StrokeShader):
|
|||
class pyBluePrintSquaresShader(StrokeShader):
|
||||
def __init__(self, turns=1, bb_len=10, bb_rand=0):
|
||||
StrokeShader.__init__(self)
|
||||
self.__turns = turns # does not have any effect atm
|
||||
self.__turns = turns # Does not have any effect ATM.
|
||||
self.__bb_len = bb_len
|
||||
self.__bb_rand = bb_rand
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ def normal_at_I0D(it: Interface0DIterator) -> Vector:
|
|||
# give iterator back in original state
|
||||
it.decrement()
|
||||
elif it.is_end:
|
||||
# just fail hard: this shouldn not happen
|
||||
# Just fail hard: this should not happen.
|
||||
raise StopIteration()
|
||||
else:
|
||||
# this case sometimes has a small difference with Normal2DF0D (1e-3 -ish)
|
||||
|
@ -197,8 +197,8 @@ def phase_to_direction(length):
|
|||
return results
|
||||
|
||||
|
||||
# -- simplification of a set of points; based on simplify.js by Vladimir Agafonkin --
|
||||
# https://mourner.github.io/simplify-js/
|
||||
# Simplification of a set of points; based on `simplify.js`:
|
||||
# See: https://mourner.github.io/simplify-js
|
||||
|
||||
def getSquareSegmentDistance(p, p1, p2):
|
||||
"""
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : parameter_editor.py
|
||||
# Authors : Tamito Kajiyama
|
||||
# Date : 26/07/2010
|
||||
# Purpose : Interactive manipulation of stylization parameters
|
||||
|
@ -811,7 +810,7 @@ class PerlinNoise1DShader(StrokeShader):
|
|||
"""
|
||||
Displaces the stroke using the curvilinear abscissa. This means
|
||||
that lines with the same length and sampling interval will be
|
||||
identically distorded.
|
||||
identically distorted.
|
||||
"""
|
||||
|
||||
def __init__(self, freq=10, amp=10, oct=4, angle=radians(45), seed=-1):
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : anisotropic_diffusion.py
|
||||
# Author : Fredo Durand
|
||||
# Date : 12/08/2004
|
||||
# Purpose : Smooth lines using an anisotropic diffusion scheme
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : apriori_and_causal_density.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Selects the lines with high a priori density and
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : apriori_density.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws lines having a high a prior density
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : backbone_stretcher.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Stretches the geometry of visible lines
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : blueprint_circles.py
|
||||
# Author : Emmanuel Turquin
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Produces a blueprint using circular contour strokes
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : blueprint_ellipses.py
|
||||
# Author : Emmanuel Turquin
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Produces a blueprint using elliptic contour strokes
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : blueprint_squares.py
|
||||
# Author : Emmanuel Turquin
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Produces a blueprint using square contour strokes
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : cartoon.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws colored lines. The color is automatically
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : contour.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws each object's visible contour
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : curvature2d.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : The stroke points are colored in gray levels and depending
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : external_contour.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the external contour of the scene
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : external_contour_sketchy.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the external contour of the scene using a sketchy
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : external_contour_smooth.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws a smooth external contour
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : haloing.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : This style module selects the lines that
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : ignore_small_occlusions.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : The strokes are drawn through small occlusions
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : invisible_lines.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws all lines whose Quantitative Invisibility
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : japanese_bigbrush.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Simulates a big brush fr oriental painting
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : long_anisotropically_dense.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Selects the lines that are long and have a high anisotropic
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : multiple_parameterization.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : The thickness and the color of the strokes vary continuously
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : nature.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Uses the NatureUP1D predicate to select the lines
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : near_lines.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the lines that are "closer" than a threshold
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : occluded_by_specific_object.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws only the lines that are occluded by a given object
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : polygonalize.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Make the strokes more "polygonal"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : qi0.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the visible lines (chaining follows same nature lines)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : qi0_not_external_contour.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the visible lines (chaining follows same nature lines)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : qi1.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws lines hidden by one surface.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : qi2.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws lines hidden by two surfaces.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : sequentialsplit_sketchy.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Use the sequential split with two different
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : sketchy_multiple_parameterization.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Builds sketchy strokes whose topology relies on a
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : sketchy_topology_broken.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : The topology of the strokes is, first, built
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : sketchy_topology_preserved.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : The topology of the strokes is built
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : split_at_highest_2d_curvature.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the visible lines (chaining follows same nature lines)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : split_at_tvertices.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws strokes that starts and stops at Tvertices (visible or not)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : suggestive.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Draws the suggestive contours.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : thickness_fof_depth_discontinuity.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : tipremover.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Removes strokes extremities
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : tvertex_remover.py
|
||||
# Author : Stephane Grabli
|
||||
# Date : 04/08/2005
|
||||
# Purpose : Removes TVertices
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Filename : uniformpruning_zsort.py
|
||||
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
|
||||
# Date : 08/04/2005
|
||||
|
||||
|
|
|
@ -441,9 +441,9 @@ def disable(module_name, *, default_set=False, handle_error=None):
|
|||
|
||||
mod = sys.modules.get(module_name)
|
||||
|
||||
# possible this addon is from a previous session and didn't load a
|
||||
# Possible this add-on is from a previous session and didn't load a
|
||||
# module this time. So even if the module is not found, still disable
|
||||
# the addon in the user prefs.
|
||||
# the add-on in the user preferences.
|
||||
if mod and getattr(mod, "__addon_enabled__", False) is not False:
|
||||
mod.__addon_enabled__ = False
|
||||
mod.__addon_persistent = False
|
||||
|
|
|
@ -23,7 +23,7 @@ _app_template = {
|
|||
"id": "",
|
||||
}
|
||||
|
||||
# instead of sys.modules
|
||||
# Instead of `sys.modules`
|
||||
# note that we only ever have one template enabled at a time
|
||||
# so it may not seem necessary to use this.
|
||||
#
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (c) 2009 www.stani.be
|
||||
# Copyright (c) 2009 https://www.stani.be
|
||||
|
||||
"""Package for console specific modules."""
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (c) 2009 www.stani.be
|
||||
# Copyright (c) 2009 https://www.stani.be
|
||||
|
||||
import inspect
|
||||
import re
|
||||
|
@ -131,7 +131,7 @@ def get_argspec(func, *, strip_self=True, doc=None, source=None):
|
|||
|
||||
|
||||
def complete(line, cursor, namespace):
|
||||
"""Complete callable with calltip.
|
||||
"""Complete callable with call-tip.
|
||||
|
||||
:arg line: incomplete text line
|
||||
:type line: str
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (c) 2009 Fernando Perez, www.stani.be
|
||||
# Copyright (c) 2009 Fernando Perez, https://www.stani.be
|
||||
|
||||
# Original copyright (see doc-string):
|
||||
# ****************************************************************************
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (c) 2009 www.stani.be
|
||||
# Copyright (c) 2009 https://www.stani.be
|
||||
|
||||
"""Autocomplete with the standard library"""
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Copyright (c) 2009 www.stani.be
|
||||
# Copyright (c) 2009 https://www.stani.be
|
||||
|
||||
"""This module provides intellisense features such as:
|
||||
|
||||
|
|
|
@ -1105,7 +1105,7 @@ def dump_addon_messages(module_name, do_checks, settings):
|
|||
dump_rna_messages(msgs, reports, settings)
|
||||
print("C")
|
||||
|
||||
# Now disable our addon, and rescan RNA.
|
||||
# Now disable our addon, and re-scan RNA.
|
||||
utils.enable_addons(addons={module_name}, disable=True)
|
||||
print("D")
|
||||
reports["check_ctxt"] = minus_check_ctxt
|
||||
|
|
|
@ -26,13 +26,13 @@ except ModuleNotFoundError:
|
|||
|
||||
# The languages defined in Blender.
|
||||
LANGUAGES_CATEGORIES = (
|
||||
# Min completeness level, UI english label.
|
||||
# Min completeness level, UI English label.
|
||||
(0.95, "Complete"),
|
||||
(0.33, "In Progress"),
|
||||
(-1.0, "Starting"),
|
||||
)
|
||||
LANGUAGES = (
|
||||
# ID, UI english label, ISO code.
|
||||
# ID, UI English label, ISO code.
|
||||
(0, "Automatic (Automatic)", "DEFAULT"),
|
||||
(1, "English (English)", "en_US"),
|
||||
(2, "Japanese (日本語)", "ja_JP"),
|
||||
|
@ -195,8 +195,8 @@ PYGETTEXT_CONTEXTS = "#define\\s+(BLT_I18NCONTEXT_[A-Z_0-9]+)\\s+\"([^\"]*)\""
|
|||
# autopep8: off
|
||||
|
||||
# Keywords' regex.
|
||||
# XXX Most unfortunately, we can't use named backreferences inside character sets,
|
||||
# which makes the regexes even more twisty... :/
|
||||
# XXX Most unfortunately, we can't use named back-references inside character sets,
|
||||
# which makes the REGEXES even more twisty... :/
|
||||
_str_base = (
|
||||
# Match void string
|
||||
"(?P<{_}1>[\"'])(?P={_}1)" # Get opening quote (' or "), and closing immediately.
|
||||
|
@ -258,7 +258,7 @@ PYGETTEXT_KEYWORDS = (() +
|
|||
tuple(("{}\\((?:[^,]+,){{2}}\\s*" + _msg_re + r"\s*(?:\)|,)").format(it)
|
||||
for it in ("modifier_subpanel_register", "gpencil_modifier_subpanel_register")) +
|
||||
|
||||
# Node socket declarations: contextless names
|
||||
# Node socket declarations: context-less names.
|
||||
tuple((r"\.{}<decl::.*?>\(\s*" + _msg_re + r"(?:,[^),]+)*\s*\)"
|
||||
r"(?![^;]*\.translation_context\()").format(it)
|
||||
for it in ("add_input", "add_output")) +
|
||||
|
|
|
@ -133,9 +133,9 @@ def find_best_isocode_matches(uid, iso_codes):
|
|||
|
||||
def get_po_files_from_dir(root_dir, langs=set()):
|
||||
"""
|
||||
Yield tuples (uid, po_path) of translations for each po file found in the given dir, which should be either
|
||||
a dir containing po files using language uid's as names (e.g. fr.po, es_ES.po, etc.), or
|
||||
a dir containing dirs which names are language uids, and containing po files of the same names.
|
||||
Yield tuples (uid, po_path) of translations for each po file found in the given directory, which should be either
|
||||
a directory containing po files using language uid's as names (e.g. fr.po, es_ES.po, etc.), or
|
||||
a directory containing directories which names are language uids, and containing po files of the same names.
|
||||
"""
|
||||
found_uids = set()
|
||||
for p in os.listdir(root_dir):
|
||||
|
@ -324,12 +324,12 @@ class I18nMessage:
|
|||
sources = property(_get_sources, _set_sources)
|
||||
|
||||
def _get_is_tooltip(self):
|
||||
# XXX For now, we assume that all messages > 30 chars are tooltips!
|
||||
# XXX For now, we assume that all messages > 30 chars are tool-tips!
|
||||
return len(self.msgid) > 30
|
||||
is_tooltip = property(_get_is_tooltip)
|
||||
|
||||
def copy(self):
|
||||
# Deepcopy everything but the settings!
|
||||
# Deep-copy everything but the settings!
|
||||
return self.__class__(msgctxt_lines=self.msgctxt_lines[:], msgid_lines=self.msgid_lines[:],
|
||||
msgstr_lines=self.msgstr_lines[:], comment_lines=self.comment_lines[:],
|
||||
is_commented=self.is_commented, is_fuzzy=self.is_fuzzy, settings=self.settings)
|
||||
|
@ -345,7 +345,7 @@ class I18nMessage:
|
|||
lns = text.splitlines()
|
||||
return [l + "\n" for l in lns[:-1]] + lns[-1:]
|
||||
|
||||
# We do not need the full power of textwrap... We just split first at escaped new lines, then into each line
|
||||
# We do not need the full power of text-wrap... We just split first at escaped new lines, then into each line
|
||||
# if needed... No word splitting, nor fancy spaces handling!
|
||||
def _wrap(text, max_len, init_len):
|
||||
if len(text) + init_len < max_len:
|
||||
|
|
|
@ -22,7 +22,7 @@ FLAG_MESSAGES = {
|
|||
|
||||
def gen_menu_file(stats, settings):
|
||||
# Generate languages file content used by Blender's i18n system.
|
||||
# First, match all entries in LANGUAGES to a lang in stats, if possible!
|
||||
# First, match all entries in LANGUAGES to a `lang` in stats, if possible!
|
||||
# Returns a iterable of text lines.
|
||||
tmp = []
|
||||
for uid_num, label, uid in settings.LANGUAGES:
|
||||
|
|
|
@ -128,7 +128,7 @@ def protect_format_seq(msg):
|
|||
def log2vis(msgs, settings):
|
||||
"""
|
||||
Globally mimics deprecated fribidi_log2vis.
|
||||
msgs should be an iterable of messages to rtl-process.
|
||||
msgs should be an iterable of messages to RTL-process.
|
||||
"""
|
||||
fbd = ctypes.CDLL(settings.FRIBIDI_LIB)
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ class SpellChecker:
|
|||
"freestyle",
|
||||
"enum", "enums",
|
||||
"gizmogroup",
|
||||
"gon", "gons", # N-Gon(s)
|
||||
"gon", "gons", # N-GON(s)
|
||||
"gpencil",
|
||||
"idcol",
|
||||
"keyframe", "keyframes", "keyframing", "keyframed",
|
||||
|
@ -786,7 +786,7 @@ class SpellChecker:
|
|||
"rgb", "rgba",
|
||||
"ris",
|
||||
"rhs",
|
||||
"rpp", # Eevee ray-tracing?
|
||||
"rpp", # EEVEE ray-tracing?
|
||||
"rv",
|
||||
"sdf",
|
||||
"sdl",
|
||||
|
@ -816,7 +816,7 @@ class SpellChecker:
|
|||
"bpy",
|
||||
"bvh",
|
||||
"dbvt",
|
||||
"dop", # BLI K-Dop BVH
|
||||
"dop", # BLI K-DOP BVH
|
||||
"ik",
|
||||
"nla",
|
||||
"py",
|
||||
|
|
|
@ -57,7 +57,9 @@ def main():
|
|||
|
||||
# Initializes Python classes.
|
||||
# (good place to run a profiler or trace).
|
||||
utils.load_scripts()
|
||||
# Postpone loading `extensions` scripts (add-ons & app-templates),
|
||||
# until after the key-maps have been initialized.
|
||||
utils.load_scripts(extensions=False)
|
||||
|
||||
|
||||
main()
|
||||
|
|
|
@ -189,7 +189,7 @@ _global_loaded_modules = [] # store loaded module names for reloading.
|
|||
import bpy_types as _bpy_types # keep for comparisons, never ever reload this.
|
||||
|
||||
|
||||
def load_scripts(*, reload_scripts=False, refresh_scripts=False):
|
||||
def load_scripts(*, reload_scripts=False, refresh_scripts=False, extensions=True):
|
||||
"""
|
||||
Load scripts and run each modules register function.
|
||||
|
||||
|
@ -199,6 +199,8 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False):
|
|||
:arg refresh_scripts: only load scripts which are not already loaded
|
||||
as modules.
|
||||
:type refresh_scripts: bool
|
||||
:arg: extensions: Loads additional scripts (add-ons & app-templates).
|
||||
:type: extensions: bool
|
||||
"""
|
||||
use_time = use_class_register_check = _bpy.app.debug_python
|
||||
use_user = not _is_factory_startup
|
||||
|
@ -306,21 +308,8 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False):
|
|||
for mod in modules_from_path(path, loaded_modules):
|
||||
test_register(mod)
|
||||
|
||||
# load template (if set)
|
||||
if any(_bpy.utils.app_template_paths()):
|
||||
import bl_app_template_utils
|
||||
bl_app_template_utils.reset(reload_scripts=reload_scripts)
|
||||
del bl_app_template_utils
|
||||
|
||||
# Deal with add-ons separately.
|
||||
_initialize_once = getattr(_addon_utils, "_initialize_once", None)
|
||||
if _initialize_once is not None:
|
||||
# First time, use fast-path.
|
||||
_initialize_once()
|
||||
del _addon_utils._initialize_once
|
||||
else:
|
||||
_addon_utils.reset_all(reload_scripts=reload_scripts)
|
||||
del _initialize_once
|
||||
if extensions:
|
||||
load_scripts_extensions(reload_scripts=reload_scripts)
|
||||
|
||||
if reload_scripts:
|
||||
_bpy.context.window_manager.tag_script_reload()
|
||||
|
@ -342,6 +331,31 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False):
|
|||
)
|
||||
|
||||
|
||||
def load_scripts_extensions(*, reload_scripts=False):
|
||||
"""
|
||||
Load extensions scripts (add-ons and app-templates)
|
||||
|
||||
:arg reload_scripts: Causes all scripts to have their unregister method
|
||||
called before loading.
|
||||
:type reload_scripts: bool
|
||||
"""
|
||||
# load template (if set)
|
||||
if any(_bpy.utils.app_template_paths()):
|
||||
import bl_app_template_utils
|
||||
bl_app_template_utils.reset(reload_scripts=reload_scripts)
|
||||
del bl_app_template_utils
|
||||
|
||||
# deal with addons separately
|
||||
_initialize = getattr(_addon_utils, "_initialize", None)
|
||||
if _initialize is not None:
|
||||
# first time, use fast-path
|
||||
_initialize()
|
||||
del _addon_utils._initialize
|
||||
else:
|
||||
_addon_utils.reset_all(reload_scripts=reload_scripts)
|
||||
del _initialize
|
||||
|
||||
|
||||
def script_path_user():
|
||||
"""returns the env var and falls back to home dir or None"""
|
||||
path = _user_resource('SCRIPTS')
|
||||
|
|
|
@ -364,7 +364,7 @@ def bake_action_iter(
|
|||
while obj.constraints:
|
||||
obj.constraints.remove(obj.constraints[0])
|
||||
|
||||
# Create compatible eulers, quats.
|
||||
# Create compatible euler & quaternion rotations.
|
||||
euler_prev = None
|
||||
quat_prev = None
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ class ProgressReport:
|
|||
|
||||
This object can be used as a context manager.
|
||||
|
||||
It supports multiple levels of 'substeps' - you shall always enter at least one substep (because level 0
|
||||
It supports multiple levels of 'sub-steps' - you shall always enter at least one sub-step (because level 0
|
||||
has only one single step, representing the whole 'area' of the progress stuff).
|
||||
|
||||
You should give the expected number of substeps each time you enter a new one (you may then step more or less then
|
||||
You should give the expected number of sub-steps each time you enter a new one (you may then step more or less then
|
||||
given number, but this will give incoherent progression).
|
||||
|
||||
Leaving a substep automatically steps by one the parent level.
|
||||
Leaving a sub-step automatically steps by one the parent level.
|
||||
|
||||
with ProgressReport() as progress: # Not giving a WindowManager here will default to console printing.
|
||||
progress.enter_substeps(10)
|
||||
|
@ -110,7 +110,7 @@ class ProgressReportSubstep:
|
|||
|
||||
Its exit method always ensure ProgressReport is back on 'level' it was before entering this context.
|
||||
This means it is especially useful to ensure a coherent behavior around code that could return/continue/break
|
||||
from many places, without having to bother to explicitly leave substep in each and every possible place!
|
||||
from many places, without having to bother to explicitly leave sub-step in each and every possible place!
|
||||
|
||||
with ProgressReport() as progress: # Not giving a WindowManager here will default to console printing.
|
||||
with ProgressReportSubstep(progress, 10, final_msg="Finished!") as subprogress1:
|
||||
|
@ -122,7 +122,7 @@ class ProgressReportSubstep:
|
|||
__slots__ = ("progress", "nbr", "msg", "final_msg", "level")
|
||||
|
||||
def __init__(self, progress, nbr, msg="", final_msg=""):
|
||||
# Allows to generate a subprogress context handler from another one.
|
||||
# Allows to generate a sub-progress context handler from another one.
|
||||
progress = getattr(progress, "progress", progress)
|
||||
|
||||
self.progress = progress
|
||||
|
|
|
@ -973,7 +973,7 @@ class _GenericUI:
|
|||
for func in draw_ls._draw_funcs:
|
||||
|
||||
# Begin 'owner_id' filter.
|
||||
# Exclude Import/Export menus from this filtering (io addons should always show there)
|
||||
# Exclude Import/Export menus from this filtering (IO add-ons should always show there).
|
||||
if not getattr(self, "bl_owner_use_filter", True):
|
||||
pass
|
||||
elif owner_names is not None:
|
||||
|
|
|
@ -298,7 +298,7 @@ def copy_as_script(context):
|
|||
text = line.body
|
||||
type = line.type
|
||||
|
||||
if type == 'INFO': # ignore autocomp.
|
||||
if type == 'INFO': # Ignore auto-completion.
|
||||
continue
|
||||
if type == 'INPUT':
|
||||
if text.startswith(PROMPT):
|
||||
|
|
|
@ -118,7 +118,7 @@ def register_node_categories(identifier, cat_list):
|
|||
if cat.poll(context):
|
||||
layout.menu("NODE_MT_category_%s" % cat.identifier)
|
||||
|
||||
# stores: (categories list, menu draw function, submenu types)
|
||||
# Stores: (categories list, menu draw function, sub-menu types).
|
||||
_node_categories[identifier] = (cat_list, draw_add_menu, menu_types)
|
||||
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ def draw(layout, context, context_member, property_type, *, use_edit=True):
|
|||
operator_row.alignment = 'RIGHT'
|
||||
|
||||
# Do not allow editing of overridden properties (we cannot use a poll function
|
||||
# of the operators here since they's have no access to the specific property).
|
||||
# of the operators here since they have no access to the specific property).
|
||||
operator_row.enabled = not (is_lib_override and key in rna_item.id_data.override_library.reference)
|
||||
|
||||
if use_edit:
|
||||
|
|
|
@ -106,7 +106,7 @@ def rna2xml(
|
|||
if issubclass(value_type, skip_classes):
|
||||
return
|
||||
|
||||
# XXX, fixme, pointcache has eternal nested pointer to itself.
|
||||
# XXX, FIXME, point-cache has eternal nested pointer to itself.
|
||||
if value == parent:
|
||||
return
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
>
|
||||
<wcol_regular>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#dbdbdbff"
|
||||
inner_sel="#668cccff"
|
||||
item="#191919ff"
|
||||
|
@ -48,7 +48,7 @@
|
|||
</wcol_regular>
|
||||
<wcol_tool>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#dbdbdbff"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#191919ff"
|
||||
|
@ -63,7 +63,7 @@
|
|||
</wcol_tool>
|
||||
<wcol_toolbar_item>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#434343ff"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#e6e6e6cc"
|
||||
|
@ -78,7 +78,7 @@
|
|||
</wcol_toolbar_item>
|
||||
<wcol_radio>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#3b3b3bff"
|
||||
inner_sel="#5680c2e6"
|
||||
item="#ffffffff"
|
||||
|
@ -93,10 +93,10 @@
|
|||
</wcol_radio>
|
||||
<wcol_text>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#282828ff"
|
||||
inner_sel="#333333ff"
|
||||
item="#5680c2ff"
|
||||
item="#8aace6ff"
|
||||
text="#dddddd"
|
||||
text_sel="#ffffff"
|
||||
show_shaded="TRUE"
|
||||
|
@ -108,7 +108,7 @@
|
|||
</wcol_text>
|
||||
<wcol_option>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#3c3c3cff"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#ffffffff"
|
||||
|
@ -123,7 +123,7 @@
|
|||
</wcol_option>
|
||||
<wcol_toggle>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#dbdbdbff"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#191919ff"
|
||||
|
@ -138,7 +138,7 @@
|
|||
</wcol_toggle>
|
||||
<wcol_num>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#d3d3d3ff"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#80b1ffff"
|
||||
|
@ -153,7 +153,7 @@
|
|||
</wcol_num>
|
||||
<wcol_numslider>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#999999ff"
|
||||
inner_sel="#999999ff"
|
||||
item="#e6e6e6ff"
|
||||
|
@ -168,7 +168,7 @@
|
|||
</wcol_numslider>
|
||||
<wcol_box>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#80808080"
|
||||
inner_sel="#5680c2ff"
|
||||
item="#191919ff"
|
||||
|
@ -183,7 +183,7 @@
|
|||
</wcol_box>
|
||||
<wcol_menu>
|
||||
<ThemeWidgetColors
|
||||
outline="#3d3d3d"
|
||||
outline="#3d3d3dff"
|
||||
inner="#3b3b3bff"
|
||||
inner_sel="#767676ff"
|
||||
item="#808080ff"
|
||||
|
@ -198,7 +198,7 @@
|
|||
</wcol_menu>
|
||||
<wcol_pulldown>
|
||||
<ThemeWidgetColors
|
||||
outline="#4d4d4d"
|
||||
outline="#4d4d4dff"
|
||||
inner="#b3b3b3cc"
|
||||
inner_sel="#5680c2e6"
|
||||
item="#727272ff"
|
||||
|
@ -213,7 +213,7 @@
|
|||
</wcol_pulldown>
|
||||
<wcol_menu_back>
|
||||
<ThemeWidgetColors
|
||||
outline="#a6a6a6"
|
||||
outline="#a6a6a6ff"
|
||||
inner="#c0c0c0ff"
|
||||
inner_sel="#cdcdcdff"
|
||||
item="#727272ff"
|
||||
|
@ -228,7 +228,7 @@
|
|||
</wcol_menu_back>
|
||||
<wcol_pie_menu>
|
||||
<ThemeWidgetColors
|
||||
outline="#333333"
|
||||
outline="#333333ff"
|
||||
inner="#212121ef"
|
||||
inner_sel="#5680c2e6"
|
||||
item="#585858ff"
|
||||
|
@ -243,7 +243,7 @@
|
|||
</wcol_pie_menu>
|
||||
<wcol_tooltip>
|
||||
<ThemeWidgetColors
|
||||
outline="#19191a"
|
||||
outline="#19191aff"
|
||||
inner="#19191aef"
|
||||
inner_sel="#19191aef"
|
||||
item="#19191aef"
|
||||
|
@ -258,7 +258,7 @@
|
|||
</wcol_tooltip>
|
||||
<wcol_menu_item>
|
||||
<ThemeWidgetColors
|
||||
outline="#000000"
|
||||
outline="#00000000"
|
||||
inner="#00000000"
|
||||
inner_sel="#5680c2e6"
|
||||
item="#ffffff8f"
|
||||
|
@ -273,7 +273,7 @@
|
|||
</wcol_menu_item>
|
||||
<wcol_scroll>
|
||||
<ThemeWidgetColors
|
||||
outline="#999999"
|
||||
outline="#999999ff"
|
||||
inner="#50505000"
|
||||
inner_sel="#646464b3"
|
||||
item="#c2c2c299"
|
||||
|
@ -288,7 +288,7 @@
|
|||
</wcol_scroll>
|
||||
<wcol_progress>
|
||||
<ThemeWidgetColors
|
||||
outline="#b3b3b3"
|
||||
outline="#b3b3b3ff"
|
||||
inner="#ccccccff"
|
||||
inner_sel="#646464b4"
|
||||
item="#5094ffff"
|
||||
|
@ -303,12 +303,12 @@
|
|||
</wcol_progress>
|
||||
<wcol_list_item>
|
||||
<ThemeWidgetColors
|
||||
outline="#e6e6e6"
|
||||
outline="#e6e6e6ff"
|
||||
inner="#1a1a1a00"
|
||||
inner_sel="#668cccff"
|
||||
item="#1a1a1aff"
|
||||
item="#8aace6ff"
|
||||
text="#1a1a1a"
|
||||
text_sel="#000000"
|
||||
text_sel="#ffffff"
|
||||
show_shaded="FALSE"
|
||||
shadetop="0"
|
||||
shadedown="0"
|
||||
|
@ -334,7 +334,7 @@
|
|||
</wcol_state>
|
||||
<wcol_tab>
|
||||
<ThemeWidgetColors
|
||||
outline="#333333"
|
||||
outline="#333333ff"
|
||||
inner="#808080cc"
|
||||
inner_sel="#b3b3b3ff"
|
||||
item="#28292dff"
|
||||
|
@ -355,6 +355,7 @@
|
|||
clipping_border_3d="#606060ff"
|
||||
wire="#000000"
|
||||
wire_edit="#000000"
|
||||
edge_width="1"
|
||||
gp_vertex="#000000"
|
||||
gp_vertex_select="#ff8500"
|
||||
gp_vertex_size="3"
|
||||
|
@ -384,6 +385,7 @@
|
|||
face_dot="#ff8500"
|
||||
facedot_size="4"
|
||||
freestyle_face_mark="#7fff7f33"
|
||||
face_retopology="#50c8ff1e"
|
||||
face_back="#ff0000b3"
|
||||
face_front="#0000ffb3"
|
||||
nurb_uline="#909000"
|
||||
|
@ -441,7 +443,7 @@
|
|||
tab_active="#b3b3b3"
|
||||
tab_inactive="#8e8e8e"
|
||||
tab_back="#656565ff"
|
||||
tab_outline="#4d4d4d"
|
||||
tab_outline="#4d4d4dff"
|
||||
>
|
||||
<gradients>
|
||||
<ThemeGradientColors
|
||||
|
@ -461,6 +463,13 @@
|
|||
</panelcolors>
|
||||
</ThemeSpaceGradient>
|
||||
</space>
|
||||
<asset_shelf>
|
||||
<ThemeAssetShelf
|
||||
header_back="#1d1d1dff"
|
||||
back="#303030ff"
|
||||
>
|
||||
</ThemeAssetShelf>
|
||||
</asset_shelf>
|
||||
</ThemeView3D>
|
||||
</view_3d>
|
||||
<graph_editor>
|
||||
|
@ -516,7 +525,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#cccccc"
|
||||
tab_back="#999999ff"
|
||||
tab_outline="#999999"
|
||||
tab_outline="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -562,7 +571,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#cccccc"
|
||||
tab_back="#999999ff"
|
||||
tab_outline="#999999"
|
||||
tab_outline="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -620,7 +629,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -676,6 +685,7 @@
|
|||
summary="#d3660066"
|
||||
preview_range="#a14d0066"
|
||||
interpolation_line="#94e575cc"
|
||||
simulated_frames="#721e65ff"
|
||||
>
|
||||
<space>
|
||||
<ThemeSpaceGeneric
|
||||
|
@ -695,7 +705,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -732,10 +742,12 @@
|
|||
face_dot="#ff8500"
|
||||
facedot_size="3"
|
||||
freestyle_face_mark="#7fff7f33"
|
||||
face_back="#00000000"
|
||||
face_front="#00000000"
|
||||
face_retopology="#50c8ff1e"
|
||||
face_back="#ff0000b3"
|
||||
face_front="#0000ffb3"
|
||||
editmesh_active="#ffffff40"
|
||||
wire_edit="#c0c0c0"
|
||||
edge_width="1"
|
||||
edge_select="#ff8500"
|
||||
scope_back="#727272ff"
|
||||
preview_stitch_face="#7f7f0033"
|
||||
|
@ -780,7 +792,7 @@
|
|||
tab_active="#b3b3b3"
|
||||
tab_inactive="#8e8e8e"
|
||||
tab_back="#656565ff"
|
||||
tab_outline="#4d4d4d"
|
||||
tab_outline="#4d4d4dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -804,7 +816,7 @@
|
|||
scene_strip="#828f50"
|
||||
audio_strip="#4c8f8f"
|
||||
effect_strip="#4c456c"
|
||||
transition_strip="#50458F"
|
||||
transition_strip="#50458f"
|
||||
color_strip="#8f8f8f"
|
||||
meta_strip="#5b4d91"
|
||||
mask_strip="#8f5656"
|
||||
|
@ -841,7 +853,7 @@
|
|||
tab_active="#b3b3b3"
|
||||
tab_inactive="#8e8e8e"
|
||||
tab_back="#656565ff"
|
||||
tab_outline="#4d4d4d"
|
||||
tab_outline="#4d4d4dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -887,7 +899,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -934,7 +946,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -979,6 +991,8 @@
|
|||
layout_node="#6c696f"
|
||||
geometry_node="#00d6a3"
|
||||
attribute_node="#001566"
|
||||
simulation_zone="#66416233"
|
||||
repeat_zone="#76512f33"
|
||||
>
|
||||
<space>
|
||||
<ThemeSpaceGeneric
|
||||
|
@ -998,7 +1012,7 @@
|
|||
tab_active="#b3b3b3"
|
||||
tab_inactive="#8e8e8e"
|
||||
tab_back="#656565ff"
|
||||
tab_outline="#4d4d4d"
|
||||
tab_outline="#4d4d4dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1049,7 +1063,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1098,7 +1112,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1132,7 +1146,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1173,7 +1187,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1238,7 +1252,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c"
|
||||
tab_outline="#3c3c3cff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1281,7 +1295,7 @@
|
|||
tab_active="#446499"
|
||||
tab_inactive="#28292d"
|
||||
tab_back="#28292dff"
|
||||
tab_outline="#28292d"
|
||||
tab_outline="#28292dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1315,7 +1329,7 @@
|
|||
tab_active="#446499"
|
||||
tab_inactive="#28292d"
|
||||
tab_back="#28292dff"
|
||||
tab_outline="#28292d"
|
||||
tab_outline="#28292dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
@ -1351,7 +1365,7 @@
|
|||
tab_active="#6697e6"
|
||||
tab_inactive="#cccccc"
|
||||
tab_back="#999999ff"
|
||||
tab_outline="#999999"
|
||||
tab_outline="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
|
|
|
@ -267,7 +267,7 @@ def any_except(*args):
|
|||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Keymap Item Wrappers
|
||||
# Key-map Item Wrappers
|
||||
|
||||
def op_menu(menu, kmi_args):
|
||||
return ("wm.call_menu", kmi_args, {"properties": [("name", menu)]})
|
||||
|
@ -918,7 +918,7 @@ def km_view2d(_params):
|
|||
)
|
||||
|
||||
items.extend([
|
||||
# Scrollbars
|
||||
# Scroll-bars.
|
||||
("view2d.scroller_activate", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("view2d.scroller_activate", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
|
||||
# Pan/scroll
|
||||
|
@ -960,7 +960,7 @@ def km_view2d_buttons_list(_params):
|
|||
)
|
||||
|
||||
items.extend([
|
||||
# Scrollbars
|
||||
# Scroll-bars.
|
||||
("view2d.scroller_activate", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("view2d.scroller_activate", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
|
||||
# Pan scroll
|
||||
|
@ -5717,7 +5717,7 @@ def km_edit_armature(params):
|
|||
return keymap
|
||||
|
||||
|
||||
# Metaball edit mode.
|
||||
# Meta-ball edit mode.
|
||||
def km_edit_metaball(params):
|
||||
items = []
|
||||
keymap = (
|
||||
|
@ -6743,7 +6743,7 @@ def km_generic_gizmo_tweak_modal_map(_params):
|
|||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Popup Keymaps
|
||||
# Popup Key-maps
|
||||
|
||||
def km_popup_toolbar(_params):
|
||||
return (
|
||||
|
@ -8472,7 +8472,7 @@ def generate_keymaps(params=None):
|
|||
km_generic_gizmo_select(params),
|
||||
km_generic_gizmo_tweak_modal_map(params),
|
||||
|
||||
# Pop-Up Keymaps.
|
||||
# Pop-Up Key-maps.
|
||||
km_popup_toolbar(params),
|
||||
|
||||
# Tool System.
|
||||
|
|
|
@ -315,7 +315,7 @@ def km_view2d(params):
|
|||
)
|
||||
|
||||
items.extend([
|
||||
# Scrollbars
|
||||
# Scroll-bars.
|
||||
("view2d.scroller_activate", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("view2d.scroller_activate", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
|
||||
# Pan/scroll
|
||||
|
@ -359,7 +359,7 @@ def km_view2d_buttons_list(params):
|
|||
)
|
||||
|
||||
items.extend([
|
||||
# Scrollbars
|
||||
# Scroll-bars.
|
||||
("view2d.scroller_activate", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
|
||||
("view2d.scroller_activate", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
|
||||
# Pan scroll
|
||||
|
@ -3673,7 +3673,8 @@ def km_sculpt(params):
|
|||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.sculpt.brush.use_smooth_stroke')]}),
|
||||
# Tools
|
||||
# This is the only mode without an Annotate shortcut. The multires shortcuts took precedence instead.
|
||||
# This is the only mode without an Annotate shortcut.
|
||||
# The multi-resolution shortcuts took precedence instead.
|
||||
op_tool_cycle("builtin.box_mask", {"type": 'Q', "value": 'PRESS'}),
|
||||
op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}),
|
||||
op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}),
|
||||
|
@ -4268,7 +4269,7 @@ def km_transform_modal_map(_params):
|
|||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Tool System Keymaps
|
||||
# Tool System Key-maps
|
||||
#
|
||||
# Named are auto-generated based on the tool name and it's toolbar.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ def update_factory_startup_screens():
|
|||
space = area.spaces.active
|
||||
space.context = 'TOOL'
|
||||
elif area.type == 'DOPESHEET_EDITOR':
|
||||
# Open sidebar in Dopesheet.
|
||||
# Open sidebar in Dope-sheet.
|
||||
space = area.spaces.active
|
||||
space.show_region_ui = True
|
||||
|
||||
|
|
|
@ -89,13 +89,13 @@ class ANIM_OT_keying_set_export(Operator):
|
|||
if ksp.id in id_to_paths_cache:
|
||||
continue
|
||||
|
||||
# - idtype_list is used to get the list of id-datablocks from
|
||||
# bpy.data.* since this info isn't available elsewhere
|
||||
# - id.bl_rna.name gives a name suitable for UI,
|
||||
# - `idtype_list` is used to get the list of ID-data-blocks from
|
||||
# `bpy.data.*` since this info isn't available elsewhere.
|
||||
# - `id.bl_rna.name` gives a name suitable for UI,
|
||||
# with a capitalized first letter, but we need
|
||||
# the plural form that's all lower case
|
||||
# the plural form that's all lower case.
|
||||
# - special handling is needed for "nested" ID-blocks
|
||||
# (e.g. nodetree in Material)
|
||||
# (e.g. node-tree in Material).
|
||||
if ksp.id.bl_rna.identifier.startswith("ShaderNodeTree"):
|
||||
# Find material or light using this node tree...
|
||||
id_bpy_path = "bpy.data.nodes[\"%s\"]"
|
||||
|
@ -120,7 +120,7 @@ class ANIM_OT_keying_set_export(Operator):
|
|||
tip_("Could not find material or light using Shader Node Tree - %s") %
|
||||
(ksp.id))
|
||||
elif ksp.id.bl_rna.identifier.startswith("CompositorNodeTree"):
|
||||
# Find compositor nodetree using this node tree...
|
||||
# Find compositor node-tree using this node tree.
|
||||
for scene in bpy.data.scenes:
|
||||
if scene.node_tree == ksp.id:
|
||||
id_bpy_path = "bpy.data.scenes[\"%s\"].node_tree" % (scene.name)
|
||||
|
|
|
@ -85,7 +85,7 @@ class MeshMirrorUV(Operator):
|
|||
puvs_cpy[i] = tuple(uv.copy() for uv in puvs[i])
|
||||
puvsel[i] = (False not in
|
||||
(uv.select for uv in uv_loops[lstart:lend]))
|
||||
# Vert idx of the poly.
|
||||
# Vert index of the poly.
|
||||
vidxs[i] = tuple(l.vertex_index for l in loops[lstart:lend])
|
||||
pcents[i] = p.center
|
||||
# Preparing next step finding matching polys.
|
||||
|
|
|
@ -493,7 +493,7 @@ class QuickSmoke(ObjectModeOperator, Operator):
|
|||
|
||||
# Setup material
|
||||
|
||||
# Cycles and Eevee
|
||||
# Cycles and EEVEE.
|
||||
bpy.ops.object.material_slot_add()
|
||||
|
||||
mat = bpy.data.materials.new("Smoke Domain Material")
|
||||
|
|
|
@ -936,7 +936,7 @@ class PREFERENCES_OT_app_template_install(Operator):
|
|||
return {'CANCELLED'}
|
||||
|
||||
else:
|
||||
# Only support installing zipfiles
|
||||
# Only support installing zip-files.
|
||||
self.report({'WARNING'}, tip_("Expected a zip-file %r\n") % filepath)
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
|
|
@ -2273,7 +2273,7 @@ class WM_OT_owner_disable(Operator):
|
|||
|
||||
|
||||
class WM_OT_tool_set_by_id(Operator):
|
||||
"""Set the tool by name (for keymaps)"""
|
||||
"""Set the tool by name (for key-maps)"""
|
||||
bl_idname = "wm.tool_set_by_id"
|
||||
bl_label = "Set Tool by Name"
|
||||
|
||||
|
@ -2319,7 +2319,7 @@ class WM_OT_tool_set_by_id(Operator):
|
|||
|
||||
|
||||
class WM_OT_tool_set_by_index(Operator):
|
||||
"""Set the tool by index (for keymaps)"""
|
||||
"""Set the tool by index (for key-maps)"""
|
||||
bl_idname = "wm.tool_set_by_index"
|
||||
bl_label = "Set Tool by Index"
|
||||
index: IntProperty(
|
||||
|
@ -2798,7 +2798,7 @@ class WM_OT_batch_rename(Operator):
|
|||
'ARMATURE': ("armatures", iface_("Armature(s)"), bpy.types.Armature),
|
||||
'LATTICE': ("lattices", iface_("Lattice(s)"), bpy.types.Lattice),
|
||||
'LIGHT': ("lights", iface_("Light(s)"), bpy.types.Light),
|
||||
'LIGHT_PROBE': ("light_probes", iface_("Light Probe(s)"), bpy.types.LightProbe),
|
||||
'LIGHT_PROBE': ("lightprobes", iface_("Light Probe(s)"), bpy.types.LightProbe),
|
||||
'CAMERA': ("cameras", iface_("Camera(s)"), bpy.types.Camera),
|
||||
'SPEAKER': ("speakers", iface_("Speaker(s)"), bpy.types.Speaker),
|
||||
}
|
||||
|
|
|
@ -103,6 +103,10 @@ class DATA_PT_lightprobe_eevee_next(DataButtonsPanel, Panel):
|
|||
|
||||
col.separator()
|
||||
|
||||
col.prop(probe, "intensity")
|
||||
|
||||
col.separator()
|
||||
|
||||
col.operator("object.lightprobe_cache_bake").subset = "ACTIVE"
|
||||
col.operator("object.lightprobe_cache_free").subset = "ACTIVE"
|
||||
|
||||
|
@ -113,6 +117,11 @@ class DATA_PT_lightprobe_eevee_next(DataButtonsPanel, Panel):
|
|||
|
||||
col.separator()
|
||||
|
||||
col.prop(probe, "grid_clamp_direct")
|
||||
col.prop(probe, "grid_clamp_indirect")
|
||||
|
||||
col.separator()
|
||||
|
||||
col.prop(probe, "grid_normal_bias")
|
||||
col.prop(probe, "grid_view_bias")
|
||||
col.prop(probe, "grid_irradiance_smoothing")
|
||||
|
|
|
@ -517,7 +517,7 @@ class GreasePencilMaterialsPanel:
|
|||
|
||||
row.template_list("GPENCIL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
|
||||
|
||||
# if topbar popover and brush pinned, disable
|
||||
# if top-bar popover and brush pinned, disable.
|
||||
if is_view3d and brush is not None:
|
||||
gp_settings = brush.gpencil_settings
|
||||
if gp_settings.use_material_pin:
|
||||
|
|
|
@ -878,7 +878,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
|
|||
col.prop(domain, "mesh_concave_upper", text="Concavity Upper")
|
||||
col.prop(domain, "mesh_concave_lower", text="Lower")
|
||||
|
||||
# TODO (sebbas): for now just interpolate any upres grids, ie not sampling highres grids
|
||||
# TODO(@sebbas): for now just interpolate any up-resolution grids, ie not sampling high-resolution grids
|
||||
# col.prop(domain, "highres_sampling", text="Flow Sampling:")
|
||||
|
||||
if domain.cache_type == 'MODULAR':
|
||||
|
|
|
@ -328,7 +328,7 @@ class PHYSICS_PT_rigid_body_dynamics_deactivation(PHYSICS_PT_rigidbody_panel, Pa
|
|||
col = flow.column()
|
||||
col.prop(rbo, "deactivate_linear_velocity", text="Velocity Linear")
|
||||
col.prop(rbo, "deactivate_angular_velocity", text="Angular")
|
||||
# TODO: other params such as time?
|
||||
# TODO: other parameters such as time?
|
||||
|
||||
|
||||
classes = (
|
||||
|
|
|
@ -1900,7 +1900,7 @@ class CLIP_MT_view_pie(Menu):
|
|||
def poll(cls, context):
|
||||
space = context.space_data
|
||||
|
||||
# View operators are not yet implemented in Dopesheet mode.
|
||||
# View operators are not yet implemented in Dope-sheet mode.
|
||||
return space.view != 'DOPESHEET'
|
||||
|
||||
def draw(self, context):
|
||||
|
|
|
@ -39,7 +39,7 @@ def dopesheet_filter(layout, context):
|
|||
row.prop(dopesheet, "show_only_errors", text="")
|
||||
|
||||
#######################################
|
||||
# Dopesheet Filtering Popovers
|
||||
# Dope-sheet Filtering Popovers
|
||||
|
||||
# Generic Layout - Used as base for filtering popovers used in all animation editors
|
||||
# Used for DopeSheet, NLA, and Graph Editors
|
||||
|
@ -62,7 +62,7 @@ class DopesheetFilterPopoverBase:
|
|||
|
||||
if is_nla:
|
||||
col.prop(dopesheet, "show_missing_nla", icon='NONE')
|
||||
else: # graph and dopesheet editors - F-Curves and drivers only
|
||||
else: # Graph and dope-sheet editors - F-Curves and drivers only.
|
||||
col.prop(dopesheet, "show_only_errors", icon='NONE')
|
||||
|
||||
# Name/Membership Filters
|
||||
|
@ -277,7 +277,14 @@ class DOPESHEET_HT_editor_buttons:
|
|||
|
||||
# Grease Pencil mode doesn't need snapping, as it's frame-aligned only
|
||||
if st.mode != 'GPENCIL':
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_snap_anim", text="")
|
||||
sub = row.row(align=True)
|
||||
sub.popover(
|
||||
panel="DOPESHEET_PT_snapping",
|
||||
icon='NONE',
|
||||
text="Modes",
|
||||
)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_proportional_action", text="", icon_only=True)
|
||||
|
@ -292,6 +299,21 @@ class DOPESHEET_HT_editor_buttons:
|
|||
)
|
||||
|
||||
|
||||
class DOPESHEET_PT_snapping(Panel):
|
||||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Snapping"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
col.label(text="Snap To")
|
||||
tool_settings = context.tool_settings
|
||||
col.prop(tool_settings, "snap_anim_element", expand=True)
|
||||
if tool_settings.snap_anim_element not in ('MARKER', ):
|
||||
col.prop(tool_settings, "use_snap_time_absolute")
|
||||
|
||||
|
||||
class DOPESHEET_PT_proportional_edit(Panel):
|
||||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
|
@ -872,6 +894,7 @@ classes = (
|
|||
DOPESHEET_PT_gpencil_layer_relations,
|
||||
DOPESHEET_PT_gpencil_layer_display,
|
||||
DOPESHEET_PT_custom_props_action,
|
||||
DOPESHEET_PT_snapping
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
|
|
@ -49,7 +49,14 @@ class GRAPH_HT_header(Header):
|
|||
|
||||
layout.prop(st, "pivot_point", icon_only=True)
|
||||
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_snap_anim", text="")
|
||||
sub = row.row(align=True)
|
||||
sub.popover(
|
||||
panel="GRAPH_PT_snapping",
|
||||
icon='NONE',
|
||||
text="Modes",
|
||||
)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_proportional_fcurve", text="", icon_only=True)
|
||||
|
@ -94,6 +101,20 @@ class GRAPH_PT_filters(DopesheetFilterPopoverBase, Panel):
|
|||
layout.separator()
|
||||
DopesheetFilterPopoverBase.draw_standard_filters(context, layout)
|
||||
|
||||
class GRAPH_PT_snapping(Panel):
|
||||
bl_space_type = 'GRAPH_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Snapping"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
col.label(text="Snap To")
|
||||
tool_settings = context.tool_settings
|
||||
col.prop(tool_settings, "snap_anim_element", expand=True)
|
||||
if tool_settings.snap_anim_element not in ('MARKER', ):
|
||||
col.prop(tool_settings, "use_snap_time_absolute")
|
||||
|
||||
|
||||
class GRAPH_MT_editor_menus(Menu):
|
||||
bl_idname = "GRAPH_MT_editor_menus"
|
||||
|
@ -527,6 +548,7 @@ classes = (
|
|||
GRAPH_MT_snap_pie,
|
||||
GRAPH_MT_view_pie,
|
||||
GRAPH_PT_filters,
|
||||
GRAPH_PT_snapping,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
|
|
@ -1335,7 +1335,7 @@ class IMAGE_PT_uv_sculpt_brush_settings(Panel, ImagePaintPanel, UVSculptPanel):
|
|||
|
||||
|
||||
class IMAGE_PT_uv_sculpt_curve(Panel, FalloffPanel, ImagePaintPanel, UVSculptPanel):
|
||||
bl_context = ".uv_sculpt" # dot on purpose (access from topbar)
|
||||
bl_context = ".uv_sculpt" # Dot on purpose (access from top-bar).
|
||||
bl_parent_id = "IMAGE_PT_uv_sculpt_brush_settings"
|
||||
bl_category = "Tool"
|
||||
bl_label = "Falloff"
|
||||
|
@ -1343,7 +1343,7 @@ class IMAGE_PT_uv_sculpt_curve(Panel, FalloffPanel, ImagePaintPanel, UVSculptPan
|
|||
|
||||
|
||||
class IMAGE_PT_uv_sculpt_options(Panel, ImagePaintPanel, UVSculptPanel):
|
||||
bl_context = ".uv_sculpt" # dot on purpose (access from topbar)
|
||||
bl_context = ".uv_sculpt" # Dot on purpose (access from top-bar).
|
||||
bl_category = "Tool"
|
||||
bl_label = "Options"
|
||||
|
||||
|
|
|
@ -33,7 +33,30 @@ class NLA_HT_header(Header):
|
|||
icon='FILTER',
|
||||
)
|
||||
|
||||
layout.prop(st, "auto_snap", text="")
|
||||
row = layout.row(align=True)
|
||||
tool_settings = context.tool_settings
|
||||
row.prop(tool_settings, "use_snap_anim", text="")
|
||||
sub = row.row(align=True)
|
||||
sub.popover(
|
||||
panel="NLA_PT_snapping",
|
||||
icon='NONE',
|
||||
text="Modes",
|
||||
)
|
||||
|
||||
|
||||
class NLA_PT_snapping(Panel):
|
||||
bl_space_type = 'NLA_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Snapping"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
col.label(text="Snap To")
|
||||
tool_settings = context.tool_settings
|
||||
col.prop(tool_settings, "snap_anim_element", expand=True)
|
||||
if tool_settings.snap_anim_element not in ('MARKER', ):
|
||||
col.prop(tool_settings, "use_snap_time_absolute")
|
||||
|
||||
|
||||
class NLA_PT_filters(DopesheetFilterPopoverBase, Panel):
|
||||
|
@ -350,6 +373,7 @@ classes = (
|
|||
NLA_MT_channel_context_menu,
|
||||
NLA_PT_filters,
|
||||
NLA_PT_action,
|
||||
NLA_PT_snapping,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
|
|
@ -56,7 +56,7 @@ class NODE_HT_header(Header):
|
|||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
# No shader nodes for Eevee lights
|
||||
# No shader nodes for EEVEE lights.
|
||||
if snode_id and not (context.engine == 'BLENDER_EEVEE' and ob_type == 'LIGHT'):
|
||||
row = layout.row()
|
||||
row.prop(snode_id, "use_nodes")
|
||||
|
|
|
@ -1893,12 +1893,6 @@ class SEQUENCER_PT_time(SequencerButtonsPanel, Panel):
|
|||
split.label(text="Channel")
|
||||
split.prop(strip, "channel", text="")
|
||||
|
||||
if strip.type == 'SOUND':
|
||||
split = layout.split(factor=0.5 + max_factor)
|
||||
split.alignment = 'RIGHT'
|
||||
split.label(text="Speed Factor")
|
||||
split.prop(strip, "speed_factor", text="")
|
||||
|
||||
sub = layout.column(align=True)
|
||||
split = sub.split(factor=0.5 + max_factor, align=True)
|
||||
split.alignment = 'RIGHT'
|
||||
|
|
|
@ -266,7 +266,7 @@ class ToolSelectPanelHelper:
|
|||
# so if item is still a function (e.g._defs_XXX.generate_from_brushes)
|
||||
# seems like we cannot expand here (have no context yet)
|
||||
# if we yield None here, this will risk running into duplicate tool bl_idname [in register_tool()]
|
||||
# but still better than erroring out
|
||||
# but still better than raising an error to the user.
|
||||
@staticmethod
|
||||
def _tools_flatten(tools):
|
||||
for item_parent in tools:
|
||||
|
@ -534,7 +534,7 @@ class ToolSelectPanelHelper:
|
|||
def keymap_ui_hierarchy(cls, context_mode):
|
||||
# See: bpy_extras.keyconfig_utils
|
||||
|
||||
# Keymaps may be shared, don't show them twice.
|
||||
# Key-maps may be shared, don't show them twice.
|
||||
visited = set()
|
||||
|
||||
for context_mode_test, tools in cls.tools_all():
|
||||
|
|
|
@ -503,10 +503,10 @@ class TOPBAR_MT_file_export(Menu):
|
|||
"wm.usd_export", text="Universal Scene Description (.usd*)")
|
||||
|
||||
if bpy.app.build_options.io_gpencil:
|
||||
# Pugixml lib dependency
|
||||
# PUGIXML library dependency.
|
||||
if bpy.app.build_options.pugixml:
|
||||
self.layout.operator("wm.gpencil_export_svg", text="Grease Pencil as SVG")
|
||||
# Haru lib dependency
|
||||
# HARU library dependency.
|
||||
if bpy.app.build_options.haru:
|
||||
self.layout.operator("wm.gpencil_export_pdf", text="Grease Pencil as PDF")
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ class VIEW3D_HT_header(Header):
|
|||
# (because internal RNA array iterator will free everything immediately...).
|
||||
# XXX This is an RNA internal issue, not sure how to fix it.
|
||||
# Note: Tried to add an accessor to get translated UI strings instead of manual call
|
||||
# to pgettext_iface below, but this fails because translated enumitems
|
||||
# to pgettext_iface below, but this fails because translated enum-items
|
||||
# are always dynamically allocated.
|
||||
act_mode_item = bpy.types.Object.bl_rna.properties["mode"].enum_items[object_mode]
|
||||
act_mode_i18n_context = bpy.types.Object.bl_rna.properties["mode"].translation_context
|
||||
|
@ -795,7 +795,7 @@ class VIEW3D_HT_header(Header):
|
|||
subrow.enabled = not gpd.use_curve_edit
|
||||
subrow.prop_enum(tool_settings, "gpencil_selectmode_edit", text="", value='SEGMENT')
|
||||
|
||||
# Curve edit submode
|
||||
# Curve edit sub-mode.
|
||||
row = layout.row(align=True)
|
||||
row.prop(gpd, "use_curve_edit", text="",
|
||||
icon='IPO_BEZIER')
|
||||
|
@ -866,7 +866,7 @@ class VIEW3D_HT_header(Header):
|
|||
|
||||
if object_mode == 'PAINT_GPENCIL':
|
||||
# FIXME: this is bad practice!
|
||||
# Tool options are to be displayed in the topbar.
|
||||
# Tool options are to be displayed in the top-bar.
|
||||
if context.workspace.tools.from_space_view3d_mode(object_mode).idname == "builtin_brush.Draw":
|
||||
settings = tool_settings.gpencil_sculpt.guide
|
||||
row = layout.row(align=True)
|
||||
|
@ -6224,7 +6224,7 @@ class VIEW3D_PT_shading_lighting(Panel):
|
|||
system = prefs.system
|
||||
|
||||
if not system.use_studio_light_edit:
|
||||
sub.scale_y = 0.6 # smaller studiolight preview
|
||||
sub.scale_y = 0.6 # Smaller studio-light preview.
|
||||
sub.template_icon_view(shading, "studio_light", scale_popup=3.0)
|
||||
else:
|
||||
sub.prop(
|
||||
|
|
|
@ -743,7 +743,7 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
|
|||
# `bl_context = ".weightpaint"` # dot on purpose (access from top-bar)
|
||||
bl_label = "Falloff"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
# also dont draw as an extra panel in the sidebar (already included in the Brush settings)
|
||||
# Also don't draw as an extra panel in the sidebar (already included in the Brush settings).
|
||||
bl_space_type = 'TOPBAR'
|
||||
bl_region_type = 'HEADER'
|
||||
|
||||
|
@ -1455,7 +1455,7 @@ class GreasePencilPaintPanel:
|
|||
if context.gpencil_data is None:
|
||||
return False
|
||||
|
||||
# Hide for tools not using bruhses
|
||||
# Hide for tools not using brushes.
|
||||
if tool_use_brush(context) is False:
|
||||
return False
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class ExportSomeData(Operator, ExportHelper):
|
|||
bl_idname = "export_test.some_data" # important since its how bpy.ops.import_test.some_data is constructed
|
||||
bl_label = "Export Some Data"
|
||||
|
||||
# ExportHelper mixin class uses this
|
||||
# ExportHelper mix-in class uses this.
|
||||
filename_ext = ".txt"
|
||||
|
||||
filter_glob: StringProperty(
|
||||
|
|
|
@ -25,7 +25,7 @@ class ImportSomeData(Operator, ImportHelper):
|
|||
bl_idname = "import_test.some_data" # important since its how bpy.ops.import_test.some_data is constructed
|
||||
bl_label = "Import Some Data"
|
||||
|
||||
# ImportHelper mixin class uses this
|
||||
# ImportHelper mix-in class uses this.
|
||||
filename_ext = ".txt"
|
||||
|
||||
filter_glob: StringProperty(
|
||||
|
|
|
@ -64,7 +64,7 @@ def main(context, event):
|
|||
# we could do lots of stuff but for the example just select.
|
||||
if best_obj is not None:
|
||||
# for selection etc. we need the original object,
|
||||
# evaluated objects are not in viewlayer
|
||||
# evaluated objects are not in view-layer.
|
||||
best_original = best_obj.original
|
||||
best_original.select_set(True)
|
||||
context.view_layer.objects.active = best_original
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef void (*ConstraintIDFunc)(struct bConstraint *con,
|
|||
* structs.
|
||||
*/
|
||||
typedef struct bConstraintTypeInfo {
|
||||
/* admin/ident */
|
||||
/* Admin/identity. */
|
||||
/** CONSTRAINT_TYPE_### */
|
||||
short type;
|
||||
/** size in bytes of the struct */
|
||||
|
|
|
@ -47,7 +47,7 @@ struct bContext;
|
|||
* as you'll have to edit quite a few (#FMODIFIER_NUM_TYPES) of these structs.
|
||||
*/
|
||||
typedef struct FModifierTypeInfo {
|
||||
/* admin/ident */
|
||||
/* Admin/identity. */
|
||||
/** #FMODIFIER_TYPE_* */
|
||||
short type;
|
||||
/** size in bytes of the struct. */
|
||||
|
|
|
@ -129,12 +129,12 @@ void BKE_libblock_remap_multiple(struct Main *bmain,
|
|||
const int remap_flags);
|
||||
|
||||
/**
|
||||
* Bare raw remapping of IDs, with no other processing than actually updating the ID pointers. No
|
||||
* usercount, direct vs indirect linked status update, depsgraph tagging, etc.
|
||||
* Bare raw remapping of IDs, with no other processing than actually updating the ID pointers.
|
||||
* No user-count, direct vs indirect linked status update, depsgraph tagging, etc.
|
||||
*
|
||||
* This is way more efficient than regular remapping from #BKE_libblock_remap_multiple & co, but it
|
||||
* implies that calling code handles all the other aspects described above. This is typically the
|
||||
* case e.g. in readfile process.
|
||||
* case e.g. in read-file process.
|
||||
*
|
||||
* WARNING: This call will likely leave the given BMain in invalid state in many aspects. */
|
||||
void BKE_libblock_remap_multiple_raw(struct Main *bmain,
|
||||
|
|
|
@ -462,7 +462,6 @@ void BKE_pbvh_face_sets_color_set(PBVH *pbvh, int seed, int color_default);
|
|||
|
||||
/* Vertex Deformer. */
|
||||
|
||||
float (*BKE_pbvh_vert_coords_alloc(PBVH *pbvh))[3];
|
||||
void BKE_pbvh_vert_coords_apply(PBVH *pbvh, const float (*vertCos)[3], int totvert);
|
||||
bool BKE_pbvh_is_deformed(PBVH *pbvh);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ typedef struct SpaceType {
|
|||
/* called when the mouse moves out of the area */
|
||||
void (*deactivate)(struct ScrArea *area);
|
||||
|
||||
/* refresh context, called after filereads, ED_area_tag_refresh() */
|
||||
/** Refresh context, called after file-reads, #ED_area_tag_refresh(). */
|
||||
void (*refresh)(const struct bContext *C, struct ScrArea *area);
|
||||
|
||||
/* after a spacedata copy, an init should result in exact same situation */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue