forked from bartvdbraak/blender
Merge with trunk r 37746.
This commit is contained in:
commit
2afa7e4944
@ -23,61 +23,16 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/decimate_glut_test/",
|
||||
"/BSP_GhostTest/",
|
||||
"/release/",
|
||||
"/xembed/",
|
||||
"/decimation/intern/future/",
|
||||
"/TerraplayNetwork/",
|
||||
"/ik_glut_test/",
|
||||
|
||||
# specific source files
|
||||
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.cpp",
|
||||
"extern/eltopo/common/meshes/meshloader.cpp",
|
||||
"extern/eltopo/common/openglutils.cpp",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
|
||||
"source/blender/imbuf/intern/imbuf_cocoa.m",
|
||||
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
|
||||
"extern/eltopo/common/meshes/Edge.hpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.hpp",
|
||||
"extern/eltopo/common/meshes/TriangleIndex.hpp",
|
||||
"extern/eltopo/common/meshes/meshloader.h",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
|
||||
)
|
||||
|
||||
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, abspath, splitext
|
||||
|
||||
base = join(os.path.dirname(__file__), "..", "..")
|
||||
base = normpath(base)
|
||||
base = abspath(base)
|
||||
|
||||
print("Scanning:", base)
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
|
||||
global_h = set()
|
||||
global_c = set()
|
||||
global_refs = {}
|
||||
|
||||
|
||||
def source_list(path, filename_check=None):
|
||||
@ -180,11 +135,17 @@ def cmake_get_src(f):
|
||||
|
||||
if is_c_header(new_file):
|
||||
sources_h.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif is_c(new_file):
|
||||
sources_c.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif l in ("PARENT_SCOPE", ):
|
||||
# cmake var, ignore
|
||||
pass
|
||||
elif new_file.endswith(".list"):
|
||||
pass
|
||||
elif new_file.endswith(".def"):
|
||||
pass
|
||||
else:
|
||||
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
|
||||
|
||||
@ -209,7 +170,7 @@ def cmake_get_src(f):
|
||||
filen.close()
|
||||
|
||||
|
||||
for cmake in source_list(base, is_cmake):
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
|
||||
@ -219,39 +180,75 @@ def is_ignore(f):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# First do stupid check, do these files exist?
|
||||
print("\nChecking for missing references:")
|
||||
import sys
|
||||
is_err = False
|
||||
errs = []
|
||||
for f in (global_h | global_c):
|
||||
if f.endswith("dna.c"):
|
||||
continue
|
||||
|
||||
if not os.path.exists(f):
|
||||
raise Exception("CMake referenced file missing: " + f)
|
||||
refs = global_refs[f]
|
||||
if refs:
|
||||
for cf, i in refs:
|
||||
errs.append((cf, i))
|
||||
else:
|
||||
raise Exception("CMake referenecs missing, internal error, aborting!")
|
||||
is_err = True
|
||||
|
||||
errs.sort()
|
||||
errs.reverse()
|
||||
for cf, i in errs:
|
||||
print("%s:%d" % (cf, i))
|
||||
# Write a 'sed' script, useful if we get a lot of these
|
||||
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
|
||||
|
||||
|
||||
if is_err:
|
||||
raise Exception("CMake referenecs missing files, aborting!")
|
||||
del is_err
|
||||
del errs
|
||||
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake doesnt know about...")
|
||||
for cf in sorted(source_list(base, is_c)):
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore(cf):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
|
||||
# check if automake builds a corrasponding .o file.
|
||||
'''
|
||||
if cf in global_c:
|
||||
out1 = os.path.splitext(cf)[0] + ".o"
|
||||
out2 = os.path.splitext(cf)[0] + ".Po"
|
||||
out2_dir, out2_file = out2 = os.path.split(out2)
|
||||
out2 = os.path.join(out2_dir, ".deps", out2_file)
|
||||
if not os.path.exists(out1) and not os.path.exists(out2):
|
||||
print("bad_c: ", cf)
|
||||
'''
|
||||
|
||||
print("\nC/C++ Headers CMake doesnt know about...")
|
||||
for hf in sorted(source_list(base, is_c_header)):
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore(hf):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
|
||||
# test encoding
|
||||
import traceback
|
||||
for files in (global_c, global_h):
|
||||
for f in sorted(files):
|
||||
if os.path.exists(f):
|
||||
# ignore outside of our source tree
|
||||
if "extern" not in f:
|
||||
i = 1
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
if UTF8_CHECK:
|
||||
# test encoding
|
||||
import traceback
|
||||
for files in (global_c, global_h):
|
||||
for f in sorted(files):
|
||||
if os.path.exists(f):
|
||||
# ignore outside of our source tree
|
||||
if "extern" not in f:
|
||||
i = 1
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
|
48
build_files/cmake/cmake_consistency_check_config.py
Normal file
48
build_files/cmake/cmake_consistency_check_config.py
Normal file
@ -0,0 +1,48 @@
|
||||
import os
|
||||
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/decimate_glut_test/",
|
||||
"/BSP_GhostTest/",
|
||||
"/release/",
|
||||
"/xembed/",
|
||||
"/decimation/intern/future/",
|
||||
"/TerraplayNetwork/",
|
||||
"/ik_glut_test/",
|
||||
|
||||
# specific source files
|
||||
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
|
||||
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.cpp",
|
||||
"extern/eltopo/common/meshes/meshloader.cpp",
|
||||
"extern/eltopo/common/openglutils.cpp",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
|
||||
"source/blender/imbuf/intern/imbuf_cocoa.m",
|
||||
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
|
||||
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
|
||||
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
|
||||
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
|
||||
"extern/eltopo/common/meshes/Edge.hpp",
|
||||
"extern/eltopo/common/meshes/ObjLoader.hpp",
|
||||
"extern/eltopo/common/meshes/TriangleIndex.hpp",
|
||||
"extern/eltopo/common/meshes/meshloader.h",
|
||||
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
|
@ -696,3 +696,199 @@ Renamed
|
||||
* **force** -> :class:`bpy.types.MaterialPhysics.fh_force`
|
||||
* **use_normal_align** -> :class:`bpy.types.MaterialPhysics.use_fh_normal`
|
||||
|
||||
|
||||
2.57 to 2.58
|
||||
============
|
||||
|
||||
bpy.types.RenderSettings
|
||||
------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.RenderSettings.use_bake_lores_mesh`
|
||||
* :class:`bpy.types.RenderSettings.use_bake_multires`
|
||||
|
||||
bpy.types.Camera
|
||||
----------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Camera.show_guide`
|
||||
|
||||
bpy.types.SpaceImageEditor
|
||||
--------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.SpaceImageEditor.zoom`
|
||||
|
||||
bpy.types.SpaceView3D
|
||||
---------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.SpaceView3D.lock_camera`
|
||||
|
||||
bpy.types.RegionView3D
|
||||
----------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.RegionView3D.is_perspective`
|
||||
|
||||
bpy.types.Scene
|
||||
---------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Scene.frame_subframe`
|
||||
|
||||
bpy.types.Area
|
||||
--------------
|
||||
|
||||
Removed
|
||||
^^^^^^^
|
||||
|
||||
* **active_space**
|
||||
|
||||
bpy.types.DisplaceModifier
|
||||
--------------------------
|
||||
|
||||
Renamed
|
||||
^^^^^^^
|
||||
|
||||
* **texture_coordinate_object** -> :class:`bpy.types.DisplaceModifier.texture_coords_object`
|
||||
|
||||
bpy.types.UserPreferencesView
|
||||
-----------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.UserPreferencesView.use_camera_lock_parent`
|
||||
|
||||
bpy.types.DomainFluidSettings
|
||||
-----------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.DomainFluidSettings.fluid_mesh_vertices`
|
||||
* :class:`bpy.types.DomainFluidSettings.surface_noobs`
|
||||
|
||||
bpy.types.Sculpt
|
||||
----------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Sculpt.use_deform_only`
|
||||
|
||||
bpy.types.ClothCollisionSettings
|
||||
--------------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.ClothCollisionSettings.distance_repel`
|
||||
* :class:`bpy.types.ClothCollisionSettings.repel_force`
|
||||
|
||||
bpy.types.UILayout
|
||||
------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.UILayout.template_edit_mode_selection`
|
||||
|
||||
bpy.types.ToolSettings
|
||||
----------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.ToolSettings.use_snap_project_self`
|
||||
|
||||
bpy.types.Mesh
|
||||
--------------
|
||||
|
||||
Removed
|
||||
^^^^^^^
|
||||
|
||||
* **edge_face_count**
|
||||
* **edge_face_count_dict**
|
||||
* **edge_loops_from_edges**
|
||||
* **edge_loops_from_faces**
|
||||
|
||||
bpy.types.PointDensity
|
||||
----------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.PointDensity.falloff_curve`
|
||||
* :class:`bpy.types.PointDensity.falloff_speed_scale`
|
||||
* :class:`bpy.types.PointDensity.use_falloff_curve`
|
||||
|
||||
bpy.types.SpaceTextEditor
|
||||
-------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.SpaceTextEditor.use_match_case`
|
||||
|
||||
bpy.types.CameraActuator
|
||||
------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.CameraActuator.damping`
|
||||
|
||||
bpy.types.Property
|
||||
------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Property.is_skip_save`
|
||||
|
||||
bpy.types.UserPreferencesSystem
|
||||
-------------------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.UserPreferencesSystem.anisotropic_filter`
|
||||
|
||||
bpy.types.Object
|
||||
----------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Object.empty_image_offset`
|
||||
|
||||
bpy.types.Image
|
||||
---------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.Image.resolution`
|
||||
|
||||
bpy.types.SceneGameData
|
||||
-----------------------
|
||||
|
||||
Added
|
||||
^^^^^
|
||||
|
||||
* :class:`bpy.types.SceneGameData.use_glsl_color_management`
|
||||
|
||||
|
@ -24,17 +24,17 @@ Dump the python API into a text file so we can generate changelogs.
|
||||
output from this tool should be added into "doc/python_api/rst/change_log.rst"
|
||||
|
||||
# dump api blender_version.py in CWD
|
||||
blender --background --python intern/tools/rna_api_dump.py -- --dump
|
||||
blender --background --python doc/python_api/sphinx_changelog_gen.py -- --dump
|
||||
|
||||
# create changelog
|
||||
blender --background --python intern/tools/rna_api_dump.py -- \
|
||||
blender --background --python doc/python_api/sphinx_changelog_gen.py -- \
|
||||
--api_from blender_2_56_1.py \
|
||||
--api_to blender_2_57_0.py \
|
||||
--api_out changes.rst
|
||||
|
||||
|
||||
# Api comparison can also run without blender
|
||||
python intern/tools/rna_api_dump.py
|
||||
python doc/python_api/sphinx_changelog_gen.py \
|
||||
--api_from blender_api_2_56_6.py \
|
||||
--api_to blender_api_2_57.py \
|
||||
--api_out changes.rst
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define FFMPEG_HAVE_AVIO 1
|
||||
#endif
|
||||
|
||||
#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1))
|
||||
#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1)) || ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR >= 122))
|
||||
#define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
|
||||
#endif
|
||||
|
||||
|
@ -1279,7 +1279,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot)
|
||||
ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
|
||||
|
||||
/* props */
|
||||
RNA_def_int(ot->srna, "increment", 1, 0, 100, "Increment", "", 0,100);
|
||||
RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100,100);
|
||||
}
|
||||
|
||||
static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
@ -644,6 +644,25 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
return func;
|
||||
}
|
||||
|
||||
/* defined min/max variables to be used by rna_clamp_value() */
|
||||
static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
|
||||
{
|
||||
if(prop->type == PROP_FLOAT) {
|
||||
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
|
||||
if(fprop->range) {
|
||||
fprintf(f, " float prop_clamp_min, prop_clamp_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(fprop->range));
|
||||
}
|
||||
}
|
||||
else if(prop->type == PROP_INT) {
|
||||
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
|
||||
if(iprop->range) {
|
||||
fprintf(f, " int prop_clamp_min, prop_clamp_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(iprop->range));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
|
||||
{
|
||||
if(prop->type == PROP_INT) {
|
||||
@ -652,8 +671,13 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
|
||||
if(iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
|
||||
if(array) fprintf(f, "CLAMPIS(values[i], ");
|
||||
else fprintf(f, "CLAMPIS(value, ");
|
||||
rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
|
||||
rna_int_print(f, iprop->hardmax); fprintf(f, ");\n");
|
||||
if(iprop->range) {
|
||||
fprintf(f, "prop_clamp_min, prop_clamp_max);");
|
||||
}
|
||||
else {
|
||||
rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
|
||||
rna_int_print(f, iprop->hardmax); fprintf(f, ");\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -663,8 +687,13 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
|
||||
if(fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
|
||||
if(array) fprintf(f, "CLAMPIS(values[i], ");
|
||||
else fprintf(f, "CLAMPIS(value, ");
|
||||
rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
|
||||
rna_float_print(f, fprop->hardmax); fprintf(f, ");\n");
|
||||
if(fprop->range) {
|
||||
fprintf(f, "prop_clamp_min, prop_clamp_max);");
|
||||
}
|
||||
else {
|
||||
rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
|
||||
rna_float_print(f, fprop->hardmax); fprintf(f, ");\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -762,6 +791,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
}
|
||||
else {
|
||||
rna_print_data_get(f, dp);
|
||||
rna_clamp_value_range(f, prop);
|
||||
|
||||
if(prop->flag & PROP_DYNAMIC) {
|
||||
char *lenfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set_length");
|
||||
@ -833,6 +863,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
|
||||
fprintf(f, " data->%s |= value;\n", dp->dnaname);
|
||||
}
|
||||
else {
|
||||
rna_clamp_value_range(f, prop);
|
||||
fprintf(f, " data->%s= %s", dp->dnaname, (dp->booleannegative)? "!": "");
|
||||
rna_clamp_value(f, prop, 0);
|
||||
}
|
||||
|
@ -1603,6 +1603,8 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
|
||||
IDProperty *idprop;
|
||||
|
||||
BLI_assert(RNA_property_type(prop) == PROP_INT);
|
||||
/* useful to check on bad values but set function should clamp */
|
||||
/* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
|
||||
|
||||
if((idprop=rna_idproperty_check(&prop, ptr)))
|
||||
IDP_Int(idprop)= value;
|
||||
@ -1825,6 +1827,8 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
|
||||
IDProperty *idprop;
|
||||
|
||||
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
|
||||
/* useful to check on bad values but set function should clamp */
|
||||
/* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */
|
||||
|
||||
if((idprop=rna_idproperty_check(&prop, ptr))) {
|
||||
if(idprop->type == IDP_FLOAT)
|
||||
|
@ -233,6 +233,7 @@ static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
*min= 0;
|
||||
*max= cu->totcol-1;
|
||||
*max= MAX2(0, *max);
|
||||
}
|
||||
|
||||
static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
@ -240,6 +241,7 @@ static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
*min= 0;
|
||||
*max= cu->totbox-1;
|
||||
*max= MAX2(0, *max);
|
||||
}
|
||||
|
||||
|
||||
|
@ -305,6 +305,7 @@ static void rna_MeshFace_material_index_range(PointerRNA *ptr, int *min, int *ma
|
||||
Mesh *me= (Mesh*)ptr->id.data;
|
||||
*min= 0;
|
||||
*max= me->totcol-1;
|
||||
*max= MAX2(0, *max);
|
||||
}
|
||||
|
||||
static CustomData *rna_mesh_fdata(Mesh *me)
|
||||
|
@ -404,7 +404,8 @@ static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max
|
||||
MultiresModifierData *mmd = (MultiresModifierData*)ptr->data;
|
||||
|
||||
*min = 0;
|
||||
*max = mmd->totlvl;
|
||||
*max = mmd->totlvl; /* intentionally _not_ -1 */
|
||||
*max= MAX2(0, *max);
|
||||
}
|
||||
|
||||
static int rna_MultiresModifier_external_get(PointerRNA *ptr)
|
||||
|
@ -1024,8 +1024,13 @@ static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, i
|
||||
Key *key= ob_get_key(ob);
|
||||
|
||||
*min= 0;
|
||||
*max= (key)? BLI_countlist(&key->block)-1: 0;
|
||||
*max= MAX2(0, *max);
|
||||
if(key) {
|
||||
*max= BLI_countlist(&key->block)-1;
|
||||
if(*max < 0) *max= 0;
|
||||
}
|
||||
else {
|
||||
*max= 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int rna_Object_active_shape_key_index_get(PointerRNA *ptr)
|
||||
|
@ -700,7 +700,7 @@ static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *m
|
||||
ConsoleLine *ci= (ConsoleLine*)ptr->data;
|
||||
|
||||
*min= 0;
|
||||
*max= ci->len;
|
||||
*max= ci->len; /* intentionally _not_ -1 */
|
||||
}
|
||||
|
||||
/* Space Dopesheet */
|
||||
|
@ -340,13 +340,13 @@ if(UNIX AND NOT APPLE)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
|
||||
DESTINATION ${TARGETDIR_VER}/config
|
||||
DESTINATION ${TARGETDIR_VER}
|
||||
)
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
|
||||
DESTINATION ${TARGETDIR_VER}/config
|
||||
DESTINATION ${TARGETDIR_VER}
|
||||
)
|
||||
|
||||
install(
|
||||
@ -416,13 +416,13 @@ elseif(WIN32)
|
||||
|
||||
install( # same as linux!, deduplicate
|
||||
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
|
||||
DESTINATION ${TARGETDIR_VER}/config
|
||||
DESTINATION ${TARGETDIR_VER}
|
||||
)
|
||||
|
||||
if(WITH_INTERNATIONAL) # same as linux!, deduplicate
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
|
||||
DESTINATION ${TARGETDIR_VER}/config
|
||||
DESTINATION ${TARGETDIR_VER}
|
||||
)
|
||||
install(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
|
||||
@ -647,7 +647,7 @@ elseif(APPLE)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
|
||||
DESTINATION ${TARGETDIR_VER}/datafiles
|
||||
DESTINATION ${TARGETDIR_VER}
|
||||
)
|
||||
|
||||
# localization
|
||||
|
Loading…
Reference in New Issue
Block a user