Merging trunk up to revision 40571
This commit is contained in:
@@ -1272,7 +1272,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEFINED -Wundef)
|
||||
|
||||
# # this causes too many warnings, disable
|
||||
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEFINED -Wundef)
|
||||
|
||||
# disable because it gives warnings for printf() & friends.
|
||||
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
|
||||
@@ -1280,7 +1283,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
|
||||
|
||||
# # this causes too many warnings, disable
|
||||
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@ macro(get_blender_version)
|
||||
if(${_out_version_char_empty})
|
||||
set(BLENDER_VERSION_CHAR_INDEX "0")
|
||||
else()
|
||||
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w q y z)
|
||||
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z)
|
||||
list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index)
|
||||
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1")
|
||||
unset(_char_ls)
|
||||
|
||||
@@ -1396,7 +1396,7 @@ Moved
|
||||
* **hide** -> :class:`bpy.types.Material.game_settings.invisible`
|
||||
* **use_collision** -> :class:`bpy.types.Material.game_settings.physics`
|
||||
* **use_light** -> :class:`bpy.types.Material.game_settings.use_shadeless`
|
||||
* **use_twoside** -> :class:`bpy.types.Material.game_settings.back_culling`
|
||||
* **use_twoside** -> :class:`bpy.types.Material.game_settings.backface_culling`
|
||||
* **use_bitmap_text** -> :class:`bpy.types.Material.game_settings.text`
|
||||
* **blend_type** -> :class:`bpy.types.Material.game_settings.alpha_blend`
|
||||
* **use_alpha_sort** -> :class:`bpy.types.Material.game_settings.alpha_blend`
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
#define DEFAULT_STREAM \
|
||||
m[dC] = RAC(ccel,dC); \
|
||||
\
|
||||
if(!(nbored & CFBnd)) { \
|
||||
if((!nbored & CFBnd)) { \
|
||||
\
|
||||
m[dN ] = CSRC_N ; m[dS ] = CSRC_S ; \
|
||||
m[dE ] = CSRC_E ; m[dW ] = CSRC_W ; \
|
||||
|
||||
@@ -711,6 +711,10 @@ static void rem_memblock(MemHead *memh)
|
||||
static void MemorY_ErroR(const char *block, const char *error)
|
||||
{
|
||||
print_error("Memoryblock %s: %s\n",block, error);
|
||||
|
||||
#ifdef WITH_ASSERT_ABORT
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
static const char *check_memlist(MemHead *memh)
|
||||
|
||||
@@ -27,6 +27,7 @@ __all__ = (
|
||||
"object_utils",
|
||||
"io_utils",
|
||||
"image_utils",
|
||||
"keyconfig_utils",
|
||||
"mesh_utils",
|
||||
"view3d_utils",
|
||||
)
|
||||
|
||||
305
release/scripts/modules/bpy_extras/keyconfig_utils.py
Normal file
305
release/scripts/modules/bpy_extras/keyconfig_utils.py
Normal file
@@ -0,0 +1,305 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
KM_HIERARCHY = [
|
||||
('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
|
||||
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
|
||||
('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
|
||||
]),
|
||||
|
||||
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
|
||||
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
|
||||
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
|
||||
('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
|
||||
|
||||
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
|
||||
('Object Mode', 'EMPTY', 'WINDOW', []),
|
||||
('Mesh', 'EMPTY', 'WINDOW', []),
|
||||
('Curve', 'EMPTY', 'WINDOW', []),
|
||||
('Armature', 'EMPTY', 'WINDOW', []),
|
||||
('Metaball', 'EMPTY', 'WINDOW', []),
|
||||
('Lattice', 'EMPTY', 'WINDOW', []),
|
||||
('Font', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Pose', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Vertex Paint', 'EMPTY', 'WINDOW', []),
|
||||
('Weight Paint', 'EMPTY', 'WINDOW', []),
|
||||
('Face Mask', 'EMPTY', 'WINDOW', []),
|
||||
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
|
||||
('Sculpt', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Armature Sketch', 'EMPTY', 'WINDOW', []),
|
||||
('Particle', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
|
||||
|
||||
('3D View Generic', 'VIEW_3D', 'WINDOW', []) # toolbar and properties
|
||||
]),
|
||||
|
||||
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
|
||||
('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
|
||||
('Animation', 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
|
||||
('Animation Channels', 'EMPTY', 'WINDOW', []),
|
||||
('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
|
||||
('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', []),
|
||||
('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
|
||||
('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
|
||||
('NLA Generic', 'NLA_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Image', 'IMAGE_EDITOR', 'WINDOW', [
|
||||
('UV Editor', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
|
||||
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
|
||||
('Image Generic', 'IMAGE_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Timeline', 'TIMELINE', 'WINDOW', []),
|
||||
('Outliner', 'OUTLINER', 'WINDOW', []),
|
||||
|
||||
('Node Editor', 'NODE_EDITOR', 'WINDOW', [
|
||||
('Node Generic', 'NODE_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', []),
|
||||
('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
|
||||
|
||||
('File Browser', 'FILE_BROWSER', 'WINDOW', [
|
||||
('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
|
||||
('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Property Editor', 'PROPERTIES', 'WINDOW', []), # align context menu
|
||||
|
||||
('Script', 'SCRIPTS_WINDOW', 'WINDOW', []),
|
||||
('Text', 'TEXT_EDITOR', 'WINDOW', []),
|
||||
('Console', 'CONSOLE', 'WINDOW', []),
|
||||
('Clip Editor', 'CLIP_EDITOR', 'WINDOW', []),
|
||||
('Clip Globals', 'CLIP_EDITOR', 'WINDOW', []),
|
||||
|
||||
('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
|
||||
('Gesture Border', 'EMPTY', 'WINDOW', []),
|
||||
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
|
||||
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Move Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Zoom Modal', 'EMPTY', 'WINDOW', []),
|
||||
]
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Utility functions
|
||||
|
||||
def km_exists_in(km, export_keymaps):
|
||||
for km2, kc in export_keymaps:
|
||||
if km2.name == km.name:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def keyconfig_merge(kc1, kc2):
|
||||
""" note: kc1 takes priority over kc2
|
||||
"""
|
||||
merged_keymaps = [(km, kc1) for km in kc1.keymaps]
|
||||
if kc1 != kc2:
|
||||
merged_keymaps.extend((km, kc2) for km in kc2.keymaps if not _km_exists_in(km, merged_keymaps))
|
||||
|
||||
return merged_keymaps
|
||||
|
||||
|
||||
def keyconfig_export(wm, kc, filepath):
|
||||
from bpy.types import OperatorProperties
|
||||
|
||||
def string_value(value):
|
||||
if isinstance(value, str) or isinstance(value, bool) or isinstance(value, float) or isinstance(value, int):
|
||||
result = repr(value)
|
||||
elif getattr(value, '__len__', False):
|
||||
return repr(list(value))
|
||||
else:
|
||||
print("Export key configuration: can't write ", value)
|
||||
|
||||
return result
|
||||
|
||||
def export_properties(prefix, properties, lines=None):
|
||||
if lines is None:
|
||||
lines = []
|
||||
|
||||
for pname in properties.bl_rna.properties.keys():
|
||||
if pname != "rna_type" and not properties.is_property_hidden(pname):
|
||||
value = getattr(properties, pname)
|
||||
if isinstance(value, OperatorProperties):
|
||||
export_properties(prefix + "." + pname, value, lines)
|
||||
elif properties.is_property_set(pname):
|
||||
value = string_value(value)
|
||||
if value != "":
|
||||
lines.append("%s.%s = %s\n" % (prefix, pname, value))
|
||||
return lines
|
||||
|
||||
f = open(filepath, "w")
|
||||
|
||||
f.write("import bpy\n")
|
||||
f.write("import os\n\n")
|
||||
f.write("wm = bpy.context.window_manager\n")
|
||||
f.write("kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])\n\n") # keymap must be created by caller
|
||||
|
||||
# Generate a list of keymaps to export:
|
||||
#
|
||||
# First add all user_modified keymaps (found in keyconfigs.user.keymaps list),
|
||||
# then add all remaining keymaps from the currently active custom keyconfig.
|
||||
#
|
||||
# This will create a final list of keymaps that can be used as a 'diff' against
|
||||
# the default blender keyconfig, recreating the current setup from a fresh blender
|
||||
# without needing to export keymaps which haven't been edited.
|
||||
|
||||
class FakeKeyConfig():
|
||||
keymaps = []
|
||||
edited_kc = FakeKeyConfig()
|
||||
for km in wm.keyconfigs.user.keymaps:
|
||||
if km.is_user_modified:
|
||||
edited_kc.keymaps.append(km)
|
||||
# merge edited keymaps with non-default keyconfig, if it exists
|
||||
if kc != wm.keyconfigs.default:
|
||||
export_keymaps = keyconfig_merge(edited_kc, kc)
|
||||
else:
|
||||
export_keymaps = keyconfig_merge(edited_kc, edited_kc)
|
||||
|
||||
for km, kc_x in export_keymaps:
|
||||
|
||||
km = km.active()
|
||||
|
||||
f.write("# Map %s\n" % km.name)
|
||||
f.write("km = kc.keymaps.new('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.is_modal))
|
||||
for kmi in km.keymap_items:
|
||||
if km.is_modal:
|
||||
f.write("kmi = km.keymap_items.new_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value))
|
||||
else:
|
||||
f.write("kmi = km.keymap_items.new('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value))
|
||||
if kmi.any:
|
||||
f.write(", any=True")
|
||||
else:
|
||||
if kmi.shift:
|
||||
f.write(", shift=True")
|
||||
if kmi.ctrl:
|
||||
f.write(", ctrl=True")
|
||||
if kmi.alt:
|
||||
f.write(", alt=True")
|
||||
if kmi.oskey:
|
||||
f.write(", oskey=True")
|
||||
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
||||
f.write(", key_modifier='%s'" % kmi.key_modifier)
|
||||
f.write(")\n")
|
||||
|
||||
props = kmi.properties
|
||||
|
||||
if props is not None:
|
||||
f.write("".join(export_properties("kmi.properties", props)))
|
||||
|
||||
f.write("\n")
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
def keyconfig_test(kc):
|
||||
|
||||
def testEntry(self, kc, entry, src=None, parent=None):
|
||||
result = False
|
||||
|
||||
def kmistr(kmi):
|
||||
if km.is_modal:
|
||||
s = ["kmi = km.keymap_items.new_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)]
|
||||
else:
|
||||
s = ["kmi = km.keymap_items.new(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)]
|
||||
|
||||
if kmi.any:
|
||||
s.append(", any=True")
|
||||
else:
|
||||
if kmi.shift:
|
||||
s.append(", shift=True")
|
||||
if kmi.ctrl:
|
||||
s.append(", ctrl=True")
|
||||
if kmi.alt:
|
||||
s.append(", alt=True")
|
||||
if kmi.oskey:
|
||||
s.append(", oskey=True")
|
||||
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
||||
s.append(", key_modifier=\'%s\'" % kmi.key_modifier)
|
||||
|
||||
s.append(")\n")
|
||||
|
||||
props = kmi.properties
|
||||
|
||||
if props is not None:
|
||||
export_properties("kmi.properties", props, s)
|
||||
|
||||
return "".join(s).strip()
|
||||
|
||||
idname, spaceid, regionid, children = entry
|
||||
|
||||
km = kc.keymaps.find(idname, space_type=spaceid, region_type=regionid)
|
||||
|
||||
if km:
|
||||
km = km.active()
|
||||
|
||||
if src:
|
||||
for item in km.keymap_items:
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(parent.name)
|
||||
print(kmistr(src))
|
||||
print(km.name)
|
||||
print(kmistr(item))
|
||||
result = True
|
||||
|
||||
for child in children:
|
||||
if testEntry(kc, child, src, parent):
|
||||
result = True
|
||||
else:
|
||||
for i in range(len(km.keymap_items)):
|
||||
src = km.keymap_items[i]
|
||||
|
||||
for child in children:
|
||||
if testEntry(kc, child, src, km):
|
||||
result = True
|
||||
|
||||
for j in range(len(km.keymap_items) - i - 1):
|
||||
item = km.keymap_items[j + i + 1]
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(km.name)
|
||||
print(kmistr(src))
|
||||
print(kmistr(item))
|
||||
result = True
|
||||
|
||||
for child in children:
|
||||
if testEntry(kc, child):
|
||||
result = True
|
||||
|
||||
return result
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Function body
|
||||
|
||||
result = False
|
||||
for entry in KM_HIERARCHY:
|
||||
if testEntry(kc, entry):
|
||||
result = True
|
||||
return result
|
||||
@@ -1186,109 +1186,18 @@ class WM_OT_keyconfig_test(Operator):
|
||||
bl_idname = "wm.keyconfig_test"
|
||||
bl_label = "Test Key Configuration for Conflicts"
|
||||
|
||||
def testEntry(self, kc, entry, src=None, parent=None):
|
||||
result = False
|
||||
|
||||
def kmistr(kmi):
|
||||
if km.is_modal:
|
||||
s = ["kmi = km.keymap_items.new_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)]
|
||||
else:
|
||||
s = ["kmi = km.keymap_items.new(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)]
|
||||
|
||||
if kmi.any:
|
||||
s.append(", any=True")
|
||||
else:
|
||||
if kmi.shift:
|
||||
s.append(", shift=True")
|
||||
if kmi.ctrl:
|
||||
s.append(", ctrl=True")
|
||||
if kmi.alt:
|
||||
s.append(", alt=True")
|
||||
if kmi.oskey:
|
||||
s.append(", oskey=True")
|
||||
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
||||
s.append(", key_modifier=\'%s\'" % kmi.key_modifier)
|
||||
|
||||
s.append(")\n")
|
||||
|
||||
props = kmi.properties
|
||||
|
||||
if props is not None:
|
||||
export_properties("kmi.properties", props, s)
|
||||
|
||||
return "".join(s).strip()
|
||||
|
||||
idname, spaceid, regionid, children = entry
|
||||
|
||||
km = kc.keymaps.find(idname, space_type=spaceid, region_type=regionid)
|
||||
|
||||
if km:
|
||||
km = km.active()
|
||||
|
||||
if src:
|
||||
for item in km.keymap_items:
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(parent.name)
|
||||
print(kmistr(src))
|
||||
print(km.name)
|
||||
print(kmistr(item))
|
||||
result = True
|
||||
|
||||
for child in children:
|
||||
if self.testEntry(kc, child, src, parent):
|
||||
result = True
|
||||
else:
|
||||
for i in range(len(km.keymap_items)):
|
||||
src = km.keymap_items[i]
|
||||
|
||||
for child in children:
|
||||
if self.testEntry(kc, child, src, km):
|
||||
result = True
|
||||
|
||||
for j in range(len(km.keymap_items) - i - 1):
|
||||
item = km.keymap_items[j + i + 1]
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(km.name)
|
||||
print(kmistr(src))
|
||||
print(kmistr(item))
|
||||
result = True
|
||||
|
||||
for child in children:
|
||||
if self.testEntry(kc, child):
|
||||
result = True
|
||||
|
||||
return result
|
||||
|
||||
def testConfig(self, kc):
|
||||
result = False
|
||||
for entry in KM_HIERARCHY:
|
||||
if self.testEntry(kc, entry):
|
||||
result = True
|
||||
return result
|
||||
|
||||
def execute(self, context):
|
||||
from bpy_extras import keyconfig_utils
|
||||
|
||||
wm = context.window_manager
|
||||
kc = wm.keyconfigs.default
|
||||
|
||||
if self.testConfig(kc):
|
||||
if keyconfig_utils.keyconfig_test(kc):
|
||||
print("CONFLICT")
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def _string_value(value):
|
||||
if isinstance(value, str) or isinstance(value, bool) or isinstance(value, float) or isinstance(value, int):
|
||||
result = repr(value)
|
||||
elif getattr(value, '__len__', False):
|
||||
return repr(list(value))
|
||||
else:
|
||||
print("Export key configuration: can't write ", value)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
class WM_OT_keyconfig_import(Operator):
|
||||
"Import key configuration from a python script"
|
||||
bl_idname = "wm.keyconfig_import"
|
||||
@@ -1321,6 +1230,7 @@ class WM_OT_keyconfig_import(Operator):
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
import os
|
||||
from os.path import basename
|
||||
import shutil
|
||||
|
||||
@@ -1382,79 +1292,20 @@ class WM_OT_keyconfig_export(Operator):
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
from bpy_extras import keyconfig_utils
|
||||
|
||||
if not self.filepath:
|
||||
raise Exception("Filepath not set")
|
||||
|
||||
if not self.filepath.endswith('.py'):
|
||||
self.filepath += '.py'
|
||||
|
||||
f = open(self.filepath, "w")
|
||||
if not f:
|
||||
raise Exception("Could not open file")
|
||||
|
||||
wm = context.window_manager
|
||||
kc = wm.keyconfigs.active
|
||||
|
||||
f.write("import bpy\n")
|
||||
f.write("import os\n\n")
|
||||
f.write("wm = bpy.context.window_manager\n")
|
||||
f.write("kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])\n\n") # keymap must be created by caller
|
||||
|
||||
# Generate a list of keymaps to export:
|
||||
#
|
||||
# First add all user_modified keymaps (found in keyconfigs.user.keymaps list),
|
||||
# then add all remaining keymaps from the currently active custom keyconfig.
|
||||
#
|
||||
# This will create a final list of keymaps that can be used as a 'diff' against
|
||||
# the default blender keyconfig, recreating the current setup from a fresh blender
|
||||
# without needing to export keymaps which haven't been edited.
|
||||
|
||||
class FakeKeyConfig():
|
||||
keymaps = []
|
||||
edited_kc = FakeKeyConfig()
|
||||
for km in wm.keyconfigs.user.keymaps:
|
||||
if km.is_user_modified:
|
||||
edited_kc.keymaps.append(km)
|
||||
# merge edited keymaps with non-default keyconfig, if it exists
|
||||
if kc != wm.keyconfigs.default:
|
||||
export_keymaps = _merge_keymaps(edited_kc, kc)
|
||||
else:
|
||||
export_keymaps = _merge_keymaps(edited_kc, edited_kc)
|
||||
|
||||
for km, kc_x in export_keymaps:
|
||||
|
||||
km = km.active()
|
||||
|
||||
f.write("# Map %s\n" % km.name)
|
||||
f.write("km = kc.keymaps.new('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.is_modal))
|
||||
for kmi in km.keymap_items:
|
||||
if km.is_modal:
|
||||
f.write("kmi = km.keymap_items.new_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value))
|
||||
else:
|
||||
f.write("kmi = km.keymap_items.new('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value))
|
||||
if kmi.any:
|
||||
f.write(", any=True")
|
||||
else:
|
||||
if kmi.shift:
|
||||
f.write(", shift=True")
|
||||
if kmi.ctrl:
|
||||
f.write(", ctrl=True")
|
||||
if kmi.alt:
|
||||
f.write(", alt=True")
|
||||
if kmi.oskey:
|
||||
f.write(", oskey=True")
|
||||
if kmi.key_modifier and kmi.key_modifier != 'NONE':
|
||||
f.write(", key_modifier='%s'" % kmi.key_modifier)
|
||||
f.write(")\n")
|
||||
|
||||
props = kmi.properties
|
||||
|
||||
if props is not None:
|
||||
f.write("".join(export_properties("kmi.properties", props)))
|
||||
|
||||
f.write("\n")
|
||||
|
||||
f.close()
|
||||
keyconfig_utils.keyconfig_export(wm,
|
||||
wm.keyconfigs.active,
|
||||
self.filepath,
|
||||
)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
@@ -1683,6 +1534,7 @@ class WM_OT_addon_install(Operator):
|
||||
|
||||
@staticmethod
|
||||
def _module_remove(path_addons, module):
|
||||
import os
|
||||
module = os.path.splitext(module)[0]
|
||||
for f in os.listdir(path_addons):
|
||||
f_base = os.path.splitext(f)[0]
|
||||
@@ -1699,6 +1551,7 @@ class WM_OT_addon_install(Operator):
|
||||
import traceback
|
||||
import zipfile
|
||||
import shutil
|
||||
import os
|
||||
|
||||
pyfile = self.filepath
|
||||
|
||||
@@ -1824,6 +1677,7 @@ class WM_OT_addon_remove(Operator):
|
||||
|
||||
@staticmethod
|
||||
def path_from_addon(module):
|
||||
import os
|
||||
import addon_utils
|
||||
|
||||
for mod in addon_utils.modules(addon_utils.addons_fake_modules):
|
||||
@@ -1838,6 +1692,7 @@ class WM_OT_addon_remove(Operator):
|
||||
|
||||
def execute(self, context):
|
||||
import addon_utils
|
||||
import os
|
||||
|
||||
path, isdir = WM_OT_addon_remove.path_from_addon(self.module)
|
||||
if path is None:
|
||||
|
||||
@@ -625,7 +625,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
|
||||
game = context.material.game_settings # dont use node material
|
||||
|
||||
row = layout.row()
|
||||
row.prop(game, "back_culling")
|
||||
row.prop(game, "use_backface_culling")
|
||||
row.prop(game, "invisible")
|
||||
row.prop(game, "text")
|
||||
|
||||
|
||||
@@ -22,112 +22,6 @@ from bpy.types import Menu, OperatorProperties
|
||||
import os
|
||||
|
||||
|
||||
KM_HIERARCHY = [
|
||||
('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
|
||||
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
|
||||
('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
|
||||
]),
|
||||
|
||||
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
|
||||
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
|
||||
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
|
||||
('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
|
||||
|
||||
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
|
||||
('Object Mode', 'EMPTY', 'WINDOW', []),
|
||||
('Mesh', 'EMPTY', 'WINDOW', []),
|
||||
('Curve', 'EMPTY', 'WINDOW', []),
|
||||
('Armature', 'EMPTY', 'WINDOW', []),
|
||||
('Metaball', 'EMPTY', 'WINDOW', []),
|
||||
('Lattice', 'EMPTY', 'WINDOW', []),
|
||||
('Font', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Pose', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Vertex Paint', 'EMPTY', 'WINDOW', []),
|
||||
('Weight Paint', 'EMPTY', 'WINDOW', []),
|
||||
('Face Mask', 'EMPTY', 'WINDOW', []),
|
||||
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
|
||||
('Sculpt', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Armature Sketch', 'EMPTY', 'WINDOW', []),
|
||||
('Particle', 'EMPTY', 'WINDOW', []),
|
||||
|
||||
('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
|
||||
|
||||
('3D View Generic', 'VIEW_3D', 'WINDOW', []) # toolbar and properties
|
||||
]),
|
||||
|
||||
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
|
||||
('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
|
||||
('Animation', 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
|
||||
('Animation Channels', 'EMPTY', 'WINDOW', []),
|
||||
('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
|
||||
('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', []),
|
||||
('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
|
||||
('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
|
||||
('NLA Generic', 'NLA_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Image', 'IMAGE_EDITOR', 'WINDOW', [
|
||||
('UV Editor', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
|
||||
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
|
||||
('Image Generic', 'IMAGE_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Timeline', 'TIMELINE', 'WINDOW', []),
|
||||
('Outliner', 'OUTLINER', 'WINDOW', []),
|
||||
|
||||
('Node Editor', 'NODE_EDITOR', 'WINDOW', [
|
||||
('Node Generic', 'NODE_EDITOR', 'WINDOW', [])
|
||||
]),
|
||||
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', []),
|
||||
('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
|
||||
|
||||
('File Browser', 'FILE_BROWSER', 'WINDOW', [
|
||||
('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
|
||||
('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', [])
|
||||
]),
|
||||
|
||||
('Property Editor', 'PROPERTIES', 'WINDOW', []), # align context menu
|
||||
|
||||
('Script', 'SCRIPTS_WINDOW', 'WINDOW', []),
|
||||
('Text', 'TEXT_EDITOR', 'WINDOW', []),
|
||||
('Console', 'CONSOLE', 'WINDOW', []),
|
||||
('Console', 'CONSOLE', 'WINDOW', []),
|
||||
('Clip Editor', 'CLIP_EDITOR', 'WINDOW', []),
|
||||
('Clip Globals', 'CLIP_EDITOR', 'WINDOW', []),
|
||||
|
||||
('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
|
||||
('Gesture Border', 'EMPTY', 'WINDOW', []),
|
||||
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
|
||||
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Move Modal', 'EMPTY', 'WINDOW', []),
|
||||
('View3D Zoom Modal', 'EMPTY', 'WINDOW', []),
|
||||
]
|
||||
|
||||
|
||||
def _km_exists_in(km, export_keymaps):
|
||||
for km2, kc in export_keymaps:
|
||||
if km2.name == km.name:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _merge_keymaps(kc1, kc2):
|
||||
""" note: kc1 takes priority over kc2
|
||||
"""
|
||||
merged_keymaps = [(km, kc1) for km in kc1.keymaps]
|
||||
if kc1 != kc2:
|
||||
merged_keymaps.extend((km, kc2) for km in kc2.keymaps if not _km_exists_in(km, merged_keymaps))
|
||||
|
||||
return merged_keymaps
|
||||
|
||||
|
||||
class USERPREF_MT_keyconfigs(Menu):
|
||||
bl_label = "KeyPresets"
|
||||
preset_subdir = "keyconfig"
|
||||
@@ -366,10 +260,13 @@ class InputKeyMapPanel:
|
||||
subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
|
||||
|
||||
def draw_hierarchy(self, display_keymaps, layout):
|
||||
for entry in KM_HIERARCHY:
|
||||
from bpy_extras import keyconfig_utils
|
||||
for entry in keyconfig_utils.KM_HIERARCHY:
|
||||
self.draw_entry(display_keymaps, entry, layout)
|
||||
|
||||
def draw_keymaps(self, context, layout):
|
||||
from bpy_extras import keyconfig_utils
|
||||
|
||||
wm = context.window_manager
|
||||
kc = wm.keyconfigs.user
|
||||
|
||||
@@ -396,7 +293,7 @@ class InputKeyMapPanel:
|
||||
|
||||
col.separator()
|
||||
|
||||
display_keymaps = _merge_keymaps(kc, kc)
|
||||
display_keymaps = keyconfig_utils.keyconfig_merge(kc, kc)
|
||||
if context.space_data.filter_text != "":
|
||||
filter_text = context.space_data.filter_text.lower()
|
||||
self.draw_filtered(display_keymaps, filter_text, col)
|
||||
@@ -404,20 +301,5 @@ class InputKeyMapPanel:
|
||||
self.draw_hierarchy(display_keymaps, col)
|
||||
|
||||
|
||||
def export_properties(prefix, properties, lines=None):
|
||||
if lines is None:
|
||||
lines = []
|
||||
|
||||
for pname in properties.bl_rna.properties.keys():
|
||||
if pname != "rna_type" and not properties.is_property_hidden(pname):
|
||||
value = getattr(properties, pname)
|
||||
if isinstance(value, OperatorProperties):
|
||||
export_properties(prefix + "." + pname, value, lines)
|
||||
elif properties.is_property_set(pname):
|
||||
value = _string_value(value)
|
||||
if value != "":
|
||||
lines.append("%s.%s = %s\n" % (prefix, pname, value))
|
||||
return lines
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/* blf_translation.c */
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
unsigned char *BLF_get_unifont(int *unifont_size);
|
||||
void BLF_free_unifont(void);
|
||||
#endif
|
||||
|
||||
@@ -55,7 +55,7 @@ if(WITH_INTERNATIONAL)
|
||||
list(APPEND INC_SYS
|
||||
${GETTEXT_INC}
|
||||
)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
@@ -15,6 +15,6 @@ if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross':
|
||||
defs.append('_WIN32')
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[210,210] )
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "BLF_api.h"
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
@@ -209,7 +209,7 @@ void BLF_lang_encoding(const char *str)
|
||||
/* bind_textdomain_codeset(DOMAIN_NAME, encoding_name); */
|
||||
}
|
||||
|
||||
#else /* ! INTERNATIONAL */
|
||||
#else /* ! WITH_INTERNATIONAL */
|
||||
|
||||
void BLF_lang_init(void)
|
||||
{
|
||||
@@ -228,4 +228,4 @@ void BLF_lang_set(const char *str)
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* INTERNATIONAL */
|
||||
#endif /* WITH_INTERNATIONAL */
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "BLF_translation.h"
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
const char unifont_filename[]="droidsans.ttf.gz";
|
||||
static unsigned char *unifont_ttf= NULL;
|
||||
static int unifont_size= 0;
|
||||
@@ -76,7 +76,7 @@ void BLF_free_unifont(void)
|
||||
|
||||
const char* BLF_gettext(const char *msgid)
|
||||
{
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if( msgid[0] )
|
||||
return gettext( msgid );
|
||||
return "";
|
||||
|
||||
@@ -353,7 +353,7 @@ void BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) {
|
||||
|
||||
BME_TransData *vtd;
|
||||
|
||||
EditVert *eve1, *eve2, *eve3, *eve4, **evlist;
|
||||
EditVert *eve1, /* *eve2, *eve3, *eve4, */ /* UNUSED */ **evlist;
|
||||
EditEdge *eed;
|
||||
EditFace *efa;
|
||||
|
||||
@@ -410,14 +410,14 @@ void BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) {
|
||||
len = BME_cycle_length(f->loopbase);
|
||||
if (len==3 || len==4) {
|
||||
eve1= evlist[f->loopbase->v->tflag1];
|
||||
eve2= evlist[f->loopbase->next->v->tflag1];
|
||||
eve3= evlist[f->loopbase->next->next->v->tflag1];
|
||||
if (len == 4) {
|
||||
/* eve2= evlist[f->loopbase->next->v->tflag1]; */ /* UNUSED */
|
||||
/* eve3= evlist[f->loopbase->next->next->v->tflag1]; */ /* UNUSED */
|
||||
/* if (len == 4) {
|
||||
eve4= evlist[f->loopbase->prev->v->tflag1];
|
||||
}
|
||||
else {
|
||||
eve4= NULL;
|
||||
}
|
||||
} */ /* UNUSED */
|
||||
|
||||
efa = NULL; //XXX addfacelist(eve1, eve2, eve3, eve4, NULL, NULL);
|
||||
efa->mat_nr = (unsigned char)f->mat_nr;
|
||||
@@ -539,7 +539,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
|
||||
MEdge *medge, *me;
|
||||
MVert *mvert, *mv;
|
||||
int *origindex;
|
||||
int totface,totedge,totvert,i,bmeshok,len, numTex, numCol;
|
||||
int totface, totedge, totvert, i, /* bmeshok, */ /* UNUSED */ len, numTex, numCol;
|
||||
|
||||
BME_Vert *v1=NULL;
|
||||
BME_Edge *e=NULL, *oe=NULL;
|
||||
@@ -567,7 +567,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm)
|
||||
|
||||
/*count quads and tris*/
|
||||
totface = 0;
|
||||
bmeshok = 1;
|
||||
/* bmeshok = 1; */ /* UNUSED */
|
||||
for(f=bm->polys.first;f;f=f->next){
|
||||
len = BME_cycle_length(f->loopbase);
|
||||
if(len == 3 || len == 4) totface++;
|
||||
|
||||
@@ -193,7 +193,7 @@ void init_material(Material *ma)
|
||||
ma->vol.ms_diff = 1.f;
|
||||
ma->vol.ms_intensity = 1.f;
|
||||
|
||||
ma->game.flag=0;
|
||||
ma->game.flag = GEMAT_BACKCULL;
|
||||
ma->game.alpha_blend=0;
|
||||
ma->game.face_orientation=0;
|
||||
|
||||
|
||||
@@ -1353,11 +1353,11 @@ static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs)
|
||||
|
||||
if (end_node && start_node)
|
||||
{
|
||||
ReebArc *start_arc, *end_arc;
|
||||
ReebArc *start_arc /* , *end_arc */ /* UNUSED */;
|
||||
int merging = 0;
|
||||
|
||||
start_arc = start_node->arcs[0];
|
||||
end_arc = end_node->arcs[0];
|
||||
/* end_arc = end_node->arcs[0]; */ /* UNUSED */
|
||||
|
||||
if (start_arc->tail == start_node)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ set(SRC
|
||||
)
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
if(WITH_HEADLESS)
|
||||
|
||||
@@ -14,7 +14,7 @@ incs += ' ../../python/' # python button eval
|
||||
defs = []
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
defs.append('WITH_PYTHON')
|
||||
|
||||
@@ -96,7 +96,7 @@ static void ui_free_but(const bContext *C, uiBut *but);
|
||||
|
||||
int UI_translate_iface(void)
|
||||
{
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
|
||||
#else
|
||||
return 0;
|
||||
@@ -105,7 +105,7 @@ int UI_translate_iface(void)
|
||||
|
||||
int UI_translate_tooltips(void)
|
||||
{
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
|
||||
#else
|
||||
return 0;
|
||||
@@ -114,7 +114,7 @@ int UI_translate_tooltips(void)
|
||||
|
||||
const char *UI_translate_do_iface(const char *msgid)
|
||||
{
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if(UI_translate_iface())
|
||||
return BLF_gettext(msgid);
|
||||
else
|
||||
@@ -126,7 +126,7 @@ const char *UI_translate_do_iface(const char *msgid)
|
||||
|
||||
const char *UI_translate_do_tooltip(const char *msgid)
|
||||
{
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if(UI_translate_tooltips())
|
||||
return BLF_gettext(msgid);
|
||||
else
|
||||
@@ -2741,7 +2741,7 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname,
|
||||
if ((!tip || tip[0]=='\0') && ot && ot->description) {
|
||||
tip= ot->description;
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if(UI_translate_tooltips())
|
||||
tip= BLF_gettext(tip);
|
||||
#endif
|
||||
|
||||
@@ -501,7 +501,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
static void ui_draw_but_CHARTAB(uiBut *but)
|
||||
{
|
||||
/* XXX 2.50 bad global access */
|
||||
@@ -671,7 +671,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // INTERNATIONAL
|
||||
#endif // WITH_INTERNATIONAL
|
||||
#endif
|
||||
|
||||
static void draw_scope_end(rctf *rect, GLint *scissor)
|
||||
|
||||
@@ -632,7 +632,7 @@ static void ui_apply_but_IDPOIN(bContext *C, uiBut *but, uiHandleButtonData *dat
|
||||
data->applied= 1;
|
||||
}
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
static void ui_apply_but_CHARTAB(bContext *C, uiBut *but, uiHandleButtonData *data)
|
||||
{
|
||||
ui_apply_but_func(C, but);
|
||||
@@ -1031,7 +1031,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
|
||||
case IDPOIN:
|
||||
ui_apply_but_IDPOIN(C, but, data);
|
||||
break;
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
case CHARTAB:
|
||||
ui_apply_but_CHARTAB(C, but, data);
|
||||
break;
|
||||
@@ -3935,7 +3935,7 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand
|
||||
return WM_UI_HANDLER_CONTINUE;
|
||||
}
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut *UNUSED(but), uiHandleButtonData *UNUSED(data), wmEvent *UNUSED(event))
|
||||
{
|
||||
/* XXX 2.50 bad global and state access */
|
||||
@@ -4677,7 +4677,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
|
||||
case HSVCIRCLE:
|
||||
retval= ui_do_but_HSVCIRCLE(C, block, but, data, event);
|
||||
break;
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
case CHARTAB:
|
||||
retval= ui_do_but_CHARTAB(C, block, but, data, event);
|
||||
break;
|
||||
|
||||
@@ -639,7 +639,7 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
|
||||
if(!name) {
|
||||
name= ot->name;
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
name= UI_translate_do_iface(name);
|
||||
#endif
|
||||
}
|
||||
@@ -1432,7 +1432,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
|
||||
if(!name) {
|
||||
name= mt->label;
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
name= UI_translate_do_iface(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
|
||||
int pnl_icons;
|
||||
const char *activename= panel->drawname[0]?panel->drawname:panel->panelname;
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
activename= UI_translate_do_iface(activename);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ void uiStyleInit(void)
|
||||
for(font= U.uifonts.first; font; font= font->next) {
|
||||
|
||||
if(font->uifont_id==UIFONT_DEFAULT) {
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
int font_size= datatoc_bfont_ttf_size;
|
||||
unsigned char *font_ttf= (unsigned char*)datatoc_bfont_ttf;
|
||||
static int last_font_size = 0;
|
||||
|
||||
@@ -939,7 +939,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
|
||||
int totweight = dvert->totweight;
|
||||
float oldw = 0;
|
||||
float oldPos[3] = {0};
|
||||
float vc, hc, dist;
|
||||
float vc, hc, dist = 0.0f /* Not necessary, but quites down gcc warnings! */;
|
||||
int i, k;
|
||||
float (*changes)[2] = MEM_mallocN(sizeof(float *)*totweight*2, "vertHorzChange");
|
||||
float *dists = MEM_mallocN(sizeof(float)*totweight, "distance");
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
int text_do_suggest_select(SpaceText *st, ARegion *ar)
|
||||
{
|
||||
SuggItem *item, *first, *last, *sel;
|
||||
SuggItem *item, *first, *last /* , *sel */ /* UNUSED */;
|
||||
TextLine *tmp;
|
||||
int l, x, y, w, h, i;
|
||||
int tgti, *top;
|
||||
@@ -62,7 +62,7 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
|
||||
|
||||
first = texttool_suggest_first();
|
||||
last = texttool_suggest_last();
|
||||
sel = texttool_suggest_selected();
|
||||
/* sel = texttool_suggest_selected(); */ /* UNUSED */
|
||||
top = texttool_suggest_top();
|
||||
|
||||
if(!last || !first)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_camera_types.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
@@ -199,6 +200,10 @@ typedef struct FlyInfo {
|
||||
float rot_backup[4]; /* backup the views quat incase the user cancels flying in non camera mode. (quat for view, eul for camera) */
|
||||
short persp_backup; /* remember if were ortho or not, only used for restoring the view if it was a ortho view */
|
||||
|
||||
short is_ortho_cam; /* are we flying an ortho camera in perspective view,
|
||||
* which was originall in ortho view?
|
||||
* could probably figure it out but better be explicit */
|
||||
|
||||
void *obtfm; /* backup the objects transform */
|
||||
|
||||
/* compare between last state */
|
||||
@@ -330,6 +335,17 @@ static int initFlyInfo (bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *even
|
||||
|
||||
fly->persp_backup= fly->rv3d->persp;
|
||||
fly->dist_backup= fly->rv3d->dist;
|
||||
|
||||
/* check for flying ortho camera - which we cant support well
|
||||
* we _could_ also check for an ortho camera but this is easier */
|
||||
if( (fly->rv3d->persp == RV3D_CAMOB) &&
|
||||
(fly->v3d->camera != NULL) &&
|
||||
(fly->rv3d->is_persp == FALSE))
|
||||
{
|
||||
((Camera *)fly->v3d->camera->data)->type= CAM_PERSP;
|
||||
fly->is_ortho_cam= TRUE;
|
||||
}
|
||||
|
||||
if (fly->rv3d->persp==RV3D_CAMOB) {
|
||||
Object *ob_back;
|
||||
if ((U.uiflag & USER_CAM_LOCK_NO_PARENT)==0 && (fly->root_parent=fly->v3d->camera->parent)) {
|
||||
@@ -433,6 +449,10 @@ static int flyEnd(bContext *C, FlyInfo *fly)
|
||||
/*Done with correcting for the dist */
|
||||
}
|
||||
|
||||
if(fly->is_ortho_cam) {
|
||||
((Camera *)fly->v3d->camera->data)->type= CAM_ORTHO;
|
||||
}
|
||||
|
||||
rv3d->rflag &= ~RV3D_NAVIGATING;
|
||||
//XXX2.5 BIF_view3d_previewrender_signal(fly->sa, PR_DBASE|PR_DISPRECT); /* not working at the moment not sure why */
|
||||
|
||||
|
||||
@@ -5246,6 +5246,11 @@ static void createTransNodeData(bContext *C, TransInfo *t)
|
||||
SpaceNode *snode= t->sa->spacedata.first;
|
||||
bNode *node;
|
||||
|
||||
if(!snode->edittree) {
|
||||
t->total= 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* set transform flags on nodes */
|
||||
for (node=snode->edittree->nodes.first; node; node=node->next) {
|
||||
if ((node->flag & NODE_SELECT) || (node->parent && (node->parent->flag & NODE_TRANSFORM)))
|
||||
|
||||
@@ -471,7 +471,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
|
||||
if(totitem > 0) {
|
||||
uiPopupMenu *pup= uiPupMenuBegin(C, op->type->name, ICON_NONE);
|
||||
uiLayout *layout= uiPupMenuLayout(pup);
|
||||
uiLayout *split= uiLayoutSplit(layout, 0, 0), *column;
|
||||
uiLayout *split= uiLayoutSplit(layout, 0, 0), *column = NULL;
|
||||
int i, c;
|
||||
|
||||
for(c=0, i=totitem-1; i >= 0; i--, c++) {
|
||||
|
||||
@@ -2624,7 +2624,7 @@ static PBool p_chart_abf_solve(PChart *chart)
|
||||
PEdge *e, *e1, *e2, *e3;
|
||||
PAbfSystem sys;
|
||||
int i;
|
||||
float lastnorm, limit = (chart->nfaces > 100)? 1.0f: 0.001f;
|
||||
float /* lastnorm, */ /* UNUSED */ limit = (chart->nfaces > 100)? 1.0f: 0.001f;
|
||||
|
||||
/* setup id's */
|
||||
sys.ninterior = sys.nfaces = sys.nangles = 0;
|
||||
@@ -2703,12 +2703,12 @@ static PBool p_chart_abf_solve(PChart *chart)
|
||||
p_abf_compute_sines(&sys);
|
||||
|
||||
/* iteration */
|
||||
lastnorm = 1e10;
|
||||
/* lastnorm = 1e10; */ /* UNUSED */
|
||||
|
||||
for (i = 0; i < ABF_MAX_ITER; i++) {
|
||||
float norm = p_abf_compute_gradient(&sys, chart);
|
||||
|
||||
lastnorm = norm;
|
||||
/* lastnorm = norm; */ /* UNUSED */
|
||||
|
||||
if (norm < limit)
|
||||
break;
|
||||
@@ -3609,7 +3609,7 @@ static SmoothNode *p_node_new(MemArena *arena, SmoothTriangle **tri, int ntri, f
|
||||
{
|
||||
SmoothNode *node = BLI_memarena_alloc(arena, sizeof *node);
|
||||
int axis, i, t1size = 0, t2size = 0;
|
||||
float split, mi, mx;
|
||||
float split, /* mi, */ /* UNUSED */ mx;
|
||||
SmoothTriangle **t1, **t2, *t;
|
||||
|
||||
node->tri = tri;
|
||||
@@ -3650,7 +3650,7 @@ static SmoothNode *p_node_new(MemArena *arena, SmoothTriangle **tri, int ntri, f
|
||||
node->axis = axis;
|
||||
node->split = split;
|
||||
|
||||
mi = bmin[axis];
|
||||
/* mi = bmin[axis]; */ /* UNUSED */
|
||||
mx = bmax[axis];
|
||||
bmax[axis] = split;
|
||||
node->c1 = p_node_new(arena, t1, t1size, bmin, bmax, depth+1);
|
||||
|
||||
@@ -63,6 +63,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
|
||||
incs += ' ' + env['BF_PTHREADS_INC']
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
|
||||
|
||||
@@ -222,7 +222,7 @@ if(WITH_OPENCOLLADA)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
# Build makesrna executable
|
||||
|
||||
@@ -99,7 +99,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
|
||||
incs += ' ' + env['BF_PTHREADS_INC']
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
makesrna_tool.Append(CPPDEFINES=defs)
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ static const char *rna_ensure_property_description(PropertyRNA *prop)
|
||||
description= ((IDProperty*)prop)->name; /* XXX - not correct */
|
||||
}
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS))
|
||||
description= BLF_gettext(description);
|
||||
#endif
|
||||
@@ -487,7 +487,7 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
|
||||
else
|
||||
name= ((IDProperty*)prop)->name;
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE))
|
||||
name= BLF_gettext(name);
|
||||
#endif
|
||||
@@ -1160,7 +1160,7 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
|
||||
{
|
||||
RNA_property_enum_items(C, ptr, prop, item, totitem, free);
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
|
||||
int i;
|
||||
EnumPropertyItem *nitem;
|
||||
|
||||
@@ -767,9 +767,9 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
|
||||
RNA_def_struct_nested(brna, srna, "Material");
|
||||
RNA_def_struct_ui_text(srna, "Material Game Settings", "Game Engine settings for a Material datablock");
|
||||
|
||||
prop= RNA_def_property(srna, "back_culling", PROP_BOOLEAN, PROP_NONE);
|
||||
prop= RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_BACKCULL); /* use bitflags */
|
||||
RNA_def_property_ui_text(prop, "Back Culling", "Hide Back of the face in Game Engine ");
|
||||
RNA_def_property_ui_text(prop, "Backface Culling", "Hide Back of the face in Game Engine ");
|
||||
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
|
||||
|
||||
prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -2068,7 +2068,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "courant_target", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 0.01, 10);
|
||||
RNA_def_property_float_default(prop, 0.2);
|
||||
RNA_def_property_ui_text(prop, "Adaptive Subframe Threshold", "The relative distance a particle can move before requiring more subframes (target Courant number). 0.1-0.3 is the recommended range.");
|
||||
RNA_def_property_ui_text(prop, "Adaptive Subframe Threshold", "The relative distance a particle can move before requiring more subframes (target Courant number). 0.1-0.3 is the recommended range");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
||||
|
||||
prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
|
||||
@@ -2881,7 +2881,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
|
||||
* ParticleSettings.courant_target instead. */
|
||||
prop= RNA_def_property(srna, "dt_frac", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 1.0f/101.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Timestep", "The current simulation time step size, as a fraction of a frame.");
|
||||
RNA_def_property_ui_text(prop, "Timestep", "The current simulation time step size, as a fraction of a frame");
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
|
||||
RNA_def_struct_path_func(srna, "rna_ParticleSystem_path");
|
||||
@@ -2903,4 +2903,3 @@ void RNA_def_particle(BlenderRNA *brna)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -628,7 +628,8 @@ static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, in
|
||||
rd->qtcodecsettings.codecType = quicktime_videocodecType_from_rnatmpvalue(value);
|
||||
}
|
||||
|
||||
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
|
||||
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr,
|
||||
PropertyRNA *UNUSED(prop), int *free)
|
||||
{
|
||||
EnumPropertyItem *item= NULL;
|
||||
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
||||
@@ -669,7 +670,8 @@ static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *pt
|
||||
rd->qtcodecsettings.audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
|
||||
}
|
||||
|
||||
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
|
||||
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr,
|
||||
PropertyRNA *UNUSED(prop), int *free)
|
||||
{
|
||||
EnumPropertyItem *item= NULL;
|
||||
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
||||
@@ -740,7 +742,8 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
|
||||
BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
|
||||
}
|
||||
|
||||
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
|
||||
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
|
||||
PropertyRNA *UNUSED(prop), int *free)
|
||||
{
|
||||
RenderEngineType *type;
|
||||
EnumPropertyItem *item= NULL;
|
||||
@@ -1119,7 +1122,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
static EnumPropertyItem sketch_convert_items[] = {
|
||||
{SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"},
|
||||
{SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"},
|
||||
{SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive", "Subdivide stroke adaptively, with more subdivision in curvier parts"},
|
||||
{SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive",
|
||||
"Subdivide stroke adaptively, with more subdivision in curvier parts"},
|
||||
{SK_CONVERT_RETARGET, "RETARGET", 0, "Retarget", "Retarget template bone chain to stroke"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
@@ -1172,7 +1176,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "proportional");
|
||||
RNA_def_property_enum_items(prop, proportional_editing_items);
|
||||
RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional Editing mode, allows transforms with distance fall-off");
|
||||
RNA_def_property_ui_text(prop, "Proportional Editing",
|
||||
"Proportional Editing mode, allows transforms with distance fall-off");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
|
||||
|
||||
prop= RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -1235,7 +1240,8 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
|
||||
RNA_def_property_ui_text(prop, "Project Individual Elements", "Project individual elements on the surface of other objects");
|
||||
RNA_def_property_ui_text(prop, "Project Individual Elements",
|
||||
"Project individual elements on the surface of other objects");
|
||||
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
|
||||
|
||||
@@ -1264,11 +1270,14 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
|
||||
RNA_def_property_ui_text(prop, "Layered", "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking");
|
||||
RNA_def_property_ui_text(prop, "Layered",
|
||||
"Add a new NLA Track + Strip for every loop/pass made over the animation "
|
||||
"to allow non-destructive tweaking");
|
||||
|
||||
prop= RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
|
||||
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", "Automatic keyframe insertion using active Keying Set only");
|
||||
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set",
|
||||
"Automatic keyframe insertion using active Keying Set only");
|
||||
RNA_def_property_ui_icon(prop, ICON_KEYINGSET, 0);
|
||||
|
||||
/* UV */
|
||||
@@ -1379,11 +1388,13 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "sculpt_paint_use_unified_size", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_SIZE);
|
||||
RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Radius", "Instead of per brush radius, the radius is shared across brushes");
|
||||
RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Radius",
|
||||
"Instead of per brush radius, the radius is shared across brushes");
|
||||
|
||||
prop= RNA_def_property(srna, "sculpt_paint_use_unified_strength", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "sculpt_paint_settings", SCULPT_PAINT_USE_UNIFIED_ALPHA);
|
||||
RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Strength", "Instead of per brush strength, the strength is shared across brushes");
|
||||
RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Strength",
|
||||
"Instead of per brush strength, the strength is shared across brushes");
|
||||
}
|
||||
|
||||
|
||||
@@ -1797,8 +1808,10 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
PropertyRNA *prop;
|
||||
|
||||
static EnumPropertyItem framing_types_items[] ={
|
||||
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"},
|
||||
{SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"},
|
||||
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
|
||||
"Show the entire viewport in the display window, using bar horizontally or vertically"},
|
||||
{SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend",
|
||||
"Show the entire viewport in the display window, viewing more horizontally or vertically"},
|
||||
{SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
@@ -1911,7 +1924,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "stereo_eye_separation", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "eyeseparation");
|
||||
RNA_def_property_range(prop, 0.01, 5.0);
|
||||
RNA_def_property_ui_text(prop, "Eye Separation", "Set the distance between the eyes - the camera focal length/30 should be fine");
|
||||
RNA_def_property_ui_text(prop, "Eye Separation",
|
||||
"Set the distance between the eyes - the camera focal length/30 should be fine");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
/* Dome */
|
||||
@@ -1969,35 +1983,44 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "occlusionRes");
|
||||
RNA_def_property_range(prop, 128.0, 1024.0);
|
||||
RNA_def_property_ui_text(prop, "Occlusion Resolution", "The size of the occlusion buffer in pixel, use higher value for better precision (slower)");
|
||||
RNA_def_property_ui_text(prop, "Occlusion Resolution",
|
||||
"The size of the occlusion buffer in pixel, use higher value for better precision (slower)");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "ticrate");
|
||||
RNA_def_property_ui_range(prop, 1, 60, 1, 1);
|
||||
RNA_def_property_range(prop, 1, 250);
|
||||
RNA_def_property_ui_text(prop, "Frames Per Second", "The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate");
|
||||
RNA_def_property_ui_text(prop, "Frames Per Second",
|
||||
"The nominal number of game frames per second "
|
||||
"(physics fixed timestep = 1/fps, independently of actual frame rate)");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
|
||||
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
|
||||
RNA_def_property_range(prop, 1, 5);
|
||||
RNA_def_property_ui_text(prop, "Max Logic Steps", "Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics");
|
||||
RNA_def_property_ui_text(prop, "Max Logic Steps",
|
||||
"Sets the maximum number of logic frame per game frame if graphics slows down the game, "
|
||||
"higher value allows better synchronization with physics");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "maxphystep");
|
||||
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
|
||||
RNA_def_property_range(prop, 1, 5);
|
||||
RNA_def_property_ui_text(prop, "Max Physics Steps", "Sets the maximum number of physics step per game frame if graphics slows down the game, higher value allows physics to keep up with realtime");
|
||||
RNA_def_property_ui_text(prop, "Max Physics Steps",
|
||||
"Sets the maximum number of physics step per game frame if graphics slows down the game, "
|
||||
"higher value allows physics to keep up with realtime");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "physubstep");
|
||||
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
|
||||
RNA_def_property_range(prop, 1, 5);
|
||||
RNA_def_property_ui_text(prop, "Physics Sub Steps", "Sets the number of simulation substep per physic timestep, higher value give better physics precision");
|
||||
RNA_def_property_ui_text(prop, "Physics Sub Steps",
|
||||
"Sets the number of simulation substep per physic timestep, "
|
||||
"higher value give better physics precision");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
/* mode */
|
||||
@@ -2014,7 +2037,9 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
|
||||
RNA_def_property_range(prop, 0.0, 1000.0);
|
||||
RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
|
||||
RNA_def_property_ui_text(prop, "box radius",
|
||||
"Radius of the activity bubble, in Manhattan length "
|
||||
"(objects outside the box are activity-culled)");
|
||||
|
||||
/* booleans */
|
||||
prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2023,7 +2048,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
|
||||
RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs");
|
||||
RNA_def_property_ui_text(prop, "Show Framerate and Profile",
|
||||
"Show framerate and profiling information while the game runs");
|
||||
|
||||
prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
|
||||
@@ -2156,13 +2182,15 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
|
||||
prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "actlay");
|
||||
RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range");
|
||||
RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set",
|
||||
"rna_RenderSettings_active_layer_index_range");
|
||||
RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
|
||||
RNA_def_property_struct_type(prop, "SceneRenderLayer");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get", "rna_RenderSettings_active_layer_set", NULL, NULL);
|
||||
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get",
|
||||
"rna_RenderSettings_active_layer_set", NULL, NULL);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
|
||||
RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
@@ -2699,21 +2727,22 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
RNA_def_property_int_sdna(prop, NULL, "framapto");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_range(prop, 1, 900);
|
||||
RNA_def_property_ui_text(prop, "Frame Map Old", "Specify old mapping value in frames");
|
||||
RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
|
||||
|
||||
prop= RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "images");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_range(prop, 1, 900);
|
||||
RNA_def_property_ui_text(prop, "Frame Map New", "Specify how many frames the Map Old will last");
|
||||
RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map Old will last");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
|
||||
|
||||
|
||||
prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
|
||||
RNA_def_property_range(prop, 0.0f, 2.0f);
|
||||
RNA_def_property_ui_text(prop, "Dither Intensity", "Amount of dithering noise added to the rendered image to break up banding");
|
||||
RNA_def_property_ui_text(prop, "Dither Intensity",
|
||||
"Amount of dithering noise added to the rendered image to break up banding");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
|
||||
@@ -2737,7 +2766,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "ocres");
|
||||
RNA_def_property_enum_items(prop, octree_resolution_items);
|
||||
RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes");
|
||||
RNA_def_property_ui_text(prop, "Octree Resolution",
|
||||
"Resolution of raytrace accelerator, use higher resolutions for larger scenes");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
|
||||
@@ -2748,12 +2778,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
|
||||
RNA_def_property_ui_text(prop, "Use Instances", "Instance support leads to effective memory reduction when using duplicates");
|
||||
RNA_def_property_ui_text(prop, "Use Instances",
|
||||
"Instance support leads to effective memory reduction when using duplicates");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
|
||||
RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed");
|
||||
RNA_def_property_ui_text(prop, "Use Local Coords",
|
||||
"Vertex coordinates are stored localy on each primitive "
|
||||
"(increases memory usage, but may have impact on speed)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2775,7 +2808,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
|
||||
RNA_def_property_enum_items(prop, field_order_items);
|
||||
RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output");
|
||||
RNA_def_property_ui_text(prop, "Field Order",
|
||||
"Order of video fields (select which lines get rendered first, "
|
||||
"to create smooth motion for TV output)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2836,7 +2871,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
RNA_def_property_int_sdna(prop, NULL, "threads");
|
||||
RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS);
|
||||
RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
|
||||
RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
|
||||
RNA_def_property_ui_text(prop, "Threads",
|
||||
"Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
|
||||
@@ -2867,31 +2903,33 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
/* border */
|
||||
prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
|
||||
RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample");
|
||||
RNA_def_property_ui_text(prop, "Border",
|
||||
"Render a user-defined border region, within the frame size "
|
||||
"(note that this disables save_buffers and full_sample)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Border Minimum X", "Sets minimum X value to for the render border");
|
||||
RNA_def_property_ui_text(prop, "Border Minimum X", "Minimum X value to for the render border");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "border.ymin");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Border Minimum Y", "Sets minimum Y value for the render border");
|
||||
RNA_def_property_ui_text(prop, "Border Minimum Y", "Minimum Y value for the render border");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "border.xmax");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Border Maximum X", "Sets maximum X value for the render border");
|
||||
RNA_def_property_ui_text(prop, "Border Maximum X", "Maximum X value for the render border");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "border.ymax");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Border Maximum Y", "Sets maximum Y value for the render border");
|
||||
RNA_def_property_ui_text(prop, "Border Maximum Y", "Maximum Y value for the render border");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2901,7 +2939,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
|
||||
RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch')");
|
||||
RNA_def_property_ui_text(prop, "Placeholders",
|
||||
"Create empty placeholder files while rendering frames (similar to Unix 'touch')");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2911,12 +2950,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
|
||||
RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if compositing nodes are enabled");
|
||||
RNA_def_property_ui_text(prop, "Compositing",
|
||||
"Process the render result through the compositing pipeline, if compositing nodes are enabled");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
|
||||
RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist");
|
||||
RNA_def_property_ui_text(prop, "Sequencer",
|
||||
"Process the render (and composited) result through the video sequence "
|
||||
"editor pipeline, if sequencer strips exist");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_color_management", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2927,7 +2969,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
|
||||
RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
|
||||
RNA_def_property_ui_text(prop, "File Extensions",
|
||||
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
|
||||
@@ -2949,7 +2992,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
|
||||
RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing");
|
||||
RNA_def_property_ui_text(prop, "Free Image Textures",
|
||||
"Free all image texture from memory after render, to save memory before compositing");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -2960,13 +3004,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
|
||||
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL);
|
||||
RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)");
|
||||
RNA_def_property_ui_text(prop, "Save Buffers",
|
||||
"Save tiles for all RenderLayers and SceneNodes to files in the temp directory "
|
||||
"(saves memory, required for Full Sample)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
|
||||
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL);
|
||||
RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing");
|
||||
RNA_def_property_ui_text(prop, "Full Sample",
|
||||
"Save for every anti-aliasing sample the entire RenderLayer results "
|
||||
"(this solves anti-aliasing issues with compositing)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
|
||||
@@ -2977,7 +3025,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
||||
RNA_def_property_string_sdna(prop, NULL, "pic");
|
||||
RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers");
|
||||
RNA_def_property_ui_text(prop, "Output Path",
|
||||
"Directory/name to save animations, # characters defines the position "
|
||||
"and length of frame numbers");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
/* Bake */
|
||||
@@ -3003,11 +3053,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
|
||||
RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object");
|
||||
RNA_def_property_ui_text(prop, "Selected to Active",
|
||||
"Bake shading on the surface of selected objects to the active object");
|
||||
|
||||
prop= RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
|
||||
RNA_def_property_ui_text(prop, "Normalized", "With displacement normalize to the distance, with ambient occlusion normalize without using material settings");
|
||||
RNA_def_property_ui_text(prop, "Normalized",
|
||||
"With displacement normalize to the distance, with ambient occlusion "
|
||||
"normalize without using material settings");
|
||||
|
||||
prop= RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
|
||||
@@ -3025,7 +3078,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
|
||||
RNA_def_property_range(prop, 0.0, 1000.0);
|
||||
RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units");
|
||||
RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units)");
|
||||
|
||||
prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
|
||||
@@ -3044,7 +3097,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
|
||||
RNA_def_property_ui_text(prop, "Stamp Time", "Include the render frame as HH:MM:SS.FF in image metadata");
|
||||
RNA_def_property_ui_text(prop, "Stamp Time", "Include the rendered frame timecode as HH:MM:SS.FF in image metadata");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -3064,7 +3117,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS);
|
||||
RNA_def_property_ui_text(prop, "Stamp Lens", "Include the name of the active cameras lens in image metadata");
|
||||
RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera's lens in image metadata");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -3084,17 +3137,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
|
||||
RNA_def_property_ui_text(prop, "Stamp Filename", "Include the filename of the .blend file in image metadata");
|
||||
RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend filename in image metadata");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
|
||||
RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
|
||||
RNA_def_property_ui_text(prop, "Stamp Sequence Strip",
|
||||
"Include the name of the foreground sequence strip in image metadata");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME);
|
||||
RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in the stamp image");
|
||||
RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
|
||||
@@ -3149,14 +3203,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
|
||||
|
||||
/* layers */
|
||||
|
||||
prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
|
||||
RNA_def_property_struct_type(prop, "SceneRenderLayer");
|
||||
RNA_def_property_ui_text(prop, "Render Layers", "");
|
||||
rna_def_render_layers(brna, prop);
|
||||
|
||||
|
||||
|
||||
prop= RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
|
||||
RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer");
|
||||
@@ -3166,7 +3219,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
/* engine */
|
||||
prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, engine_items);
|
||||
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set", "rna_RenderSettings_engine_itemf");
|
||||
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set",
|
||||
"rna_RenderSettings_engine_itemf");
|
||||
RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering");
|
||||
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
||||
|
||||
@@ -3205,7 +3259,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, NULL, "simplify_aosss");
|
||||
RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AA and SSS quality factor");
|
||||
RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AO and SSS quality factor");
|
||||
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
||||
|
||||
prop= RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -3341,7 +3395,8 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
|
||||
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL);
|
||||
RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
||||
RNA_def_property_ui_text(prop, "Active Keying Set Index",
|
||||
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
|
||||
}
|
||||
|
||||
@@ -3367,7 +3422,8 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
|
||||
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL);
|
||||
RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
||||
RNA_def_property_ui_text(prop, "Active Keying Set Index",
|
||||
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
|
||||
}
|
||||
|
||||
@@ -3395,7 +3451,8 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
|
||||
/* Struct definition */
|
||||
srna= RNA_def_struct(brna, "Scene", "ID");
|
||||
RNA_def_struct_ui_text(srna, "Scene", "Scene consisting objects and defining time and render related settings");
|
||||
RNA_def_struct_ui_text(srna, "Scene",
|
||||
"Scene data block, consisting in objects and defining time and render related settings");
|
||||
RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
|
||||
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
|
||||
|
||||
@@ -3403,7 +3460,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
|
||||
RNA_def_property_ui_text(prop, "Camera", "Active camera used for rendering the scene");
|
||||
RNA_def_property_ui_text(prop, "Camera", "Active camera, used for rendering the scene");
|
||||
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_view3d_update");
|
||||
|
||||
prop= RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
|
||||
@@ -3492,7 +3549,8 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE);
|
||||
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set");
|
||||
RNA_def_property_ui_text(prop, "Use Preview Range", "Use an alternative start/end frame for UI playback, rather than the scene start/end frame");
|
||||
RNA_def_property_ui_text(prop, "Use Preview Range",
|
||||
"Use an alternative start/end frame for UI playback, rather than the scene start/end frame");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
|
||||
RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0);
|
||||
|
||||
@@ -3513,7 +3571,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
/* Stamp */
|
||||
prop= RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
|
||||
RNA_def_property_ui_text(prop, "Stamp Note", "User define note for the render stamping");
|
||||
RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the render stamping");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
/* Animation Data (for Scene) */
|
||||
@@ -3523,7 +3581,8 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
prop= RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
|
||||
RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only");
|
||||
RNA_def_property_ui_text(prop, "NLA TweakMode",
|
||||
"Whether there is any action referenced by NLA being edited (strictly read-only)");
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
||||
|
||||
/* Frame dropping flag for playback and sync enum */
|
||||
@@ -3565,9 +3624,11 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
rna_def_scene_keying_sets(brna, prop);
|
||||
|
||||
prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
|
||||
RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next",
|
||||
"rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
|
||||
RNA_def_property_struct_type(prop, "KeyingSet");
|
||||
RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
|
||||
RNA_def_property_ui_text(prop, "All Keying Sets",
|
||||
"All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
|
||||
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
|
||||
rna_def_scene_keying_sets_all(brna, prop);
|
||||
|
||||
@@ -3620,7 +3681,8 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
|
||||
prop= RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
|
||||
RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio clock, dropping frames if frame display is too slow");
|
||||
RNA_def_property_ui_text(prop, "Audio Sync",
|
||||
"Play back and sync with audio clock, dropping frames if frame display is too slow");
|
||||
RNA_def_property_update(prop, NC_SCENE, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -661,7 +661,7 @@ static void rna_def_panel(BlenderRNA *brna)
|
||||
"class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
|
||||
"script, then bl_idname = \"OBJECT_PT_hello\"");
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->label");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
RNA_def_property_ui_text(prop, "Label",
|
||||
@@ -785,7 +785,7 @@ static void rna_def_menu(BlenderRNA *brna)
|
||||
"class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
|
||||
"script, then bl_idname = \"OBJECT_MT_hello\"");
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->label");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
RNA_def_property_ui_text(prop, "Label", "The menu label");
|
||||
|
||||
@@ -1188,7 +1188,7 @@ static void rna_def_operator(BlenderRNA *brna)
|
||||
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
|
||||
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "type->name");
|
||||
RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */
|
||||
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
|
||||
|
||||
@@ -41,7 +41,7 @@ if env['BF_BUILDINFO']:
|
||||
defs.append('BUILD_DATE')
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
sources = env.Glob('intern/*.c')
|
||||
env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])
|
||||
|
||||
@@ -96,7 +96,7 @@ if(WITH_AUDASPACE)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
#include "../generic/IDProp.h" /* for IDprop lookups */
|
||||
#include "../generic/py_capi_utils.h"
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
#include "UI_interface.h" /* bad level call into editors */
|
||||
#endif
|
||||
|
||||
@@ -1523,11 +1523,11 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
|
||||
}
|
||||
else {
|
||||
param= _PyUnicode_AsString(value);
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if(subtype == PROP_TRANSLATE) {
|
||||
param= UI_translate_do_iface(param);
|
||||
}
|
||||
#endif // INTERNATIONAL
|
||||
#endif // WITH_INTERNATIONAL
|
||||
|
||||
}
|
||||
#else // USE_STRING_COERCE
|
||||
|
||||
@@ -4852,8 +4852,13 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
|
||||
* NULL is just for init */
|
||||
set_dupli_tex_mat(NULL, NULL, NULL);
|
||||
|
||||
for(SETLOOPER(re->scene, sce_iter, base)) {
|
||||
ob= base->object;
|
||||
/* loop over all objects rather then using SETLOOPER because we may
|
||||
* reference an mtex-mapped object which isnt rendered or is an
|
||||
* empty in a dupli group. We could scan all render material/lamp/world
|
||||
* mtex's for mapto objects but its easier just to set the
|
||||
* 'imat' / 'imat_ren' on all and unlikely to be a performance hit
|
||||
* See bug: [#28744] - campbell */
|
||||
for(ob= re->main->object.first; ob; ob= ob->id.next) {
|
||||
/* imat objects has to be done here, since displace can have texture using Object map-input */
|
||||
mul_m4_m4m4(mat, ob->obmat, re->viewmat);
|
||||
invert_m4_m4(ob->imat_ren, mat);
|
||||
|
||||
@@ -82,7 +82,7 @@ set(SRC
|
||||
add_definitions(-DGLEW_STATIC)
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLLADA)
|
||||
|
||||
@@ -40,6 +40,6 @@ if env['BF_BUILDINFO']:
|
||||
defs.append('WITH_BUILDINFO')
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] )
|
||||
|
||||
@@ -403,7 +403,7 @@ void WM_exit_ext(bContext *C, const short do_python)
|
||||
|
||||
BLF_exit();
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
BLF_free_unifont();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ if(WIN32 AND NOT UNIX)
|
||||
endif()
|
||||
|
||||
add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
|
||||
elseif(APPLE)
|
||||
add_executable(blenderplayer MACOSX_BUNDLE ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
||||
else()
|
||||
add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
||||
endif()
|
||||
|
||||
@@ -714,6 +714,61 @@ elseif(APPLE)
|
||||
\${TARGETDIR_VER}
|
||||
)
|
||||
endif()
|
||||
|
||||
# install blenderplayer bundle - copy of blender.app above. re-using macros et al
|
||||
# note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
|
||||
if(WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
|
||||
set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
|
||||
set(TARGETDIR_VER ${TARGETDIR}/blenderplayer.app/Contents/MacOS/${BLENDER_VERSION})
|
||||
|
||||
# setup Info.plist
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set_target_properties(blender PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${SOURCEINFO}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
|
||||
|
||||
# important to make a clean install each time else old scripts get loaded.
|
||||
install(
|
||||
CODE
|
||||
"file(REMOVE_RECURSE ${TARGETDIR_VER})"
|
||||
)
|
||||
|
||||
# message after building.
|
||||
add_custom_command(
|
||||
TARGET blender POST_BUILD MAIN_DEPENDENCY blender
|
||||
COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${TARGETDIR_VER}'
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${SOURCEDIR}/Contents/PkgInfo
|
||||
DESTINATION ${TARGETDIR}/blenderplayer.app/Contents
|
||||
)
|
||||
|
||||
install_dir(
|
||||
${SOURCEDIR}/Contents/Resources
|
||||
\${TARGETDIR}/blenderplayer.app/Contents/
|
||||
)
|
||||
|
||||
# python
|
||||
if(WITH_PYTHON)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
|
||||
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/
|
||||
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
|
||||
COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
|
||||
DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
|
||||
|
||||
# copy extracted python files
|
||||
install_dir(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/python
|
||||
\${TARGETDIR_VER}
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(BLENDER_TEXT_FILES)
|
||||
|
||||
@@ -79,7 +79,7 @@ if(WITH_CODEC_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
add_definitions(-DWITH_INTERNATIONAL)
|
||||
endif()
|
||||
|
||||
blender_add_lib_nolist(ge_player_ghost "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
@@ -999,7 +999,7 @@ int main(int argc, char** argv)
|
||||
RNA_exit();
|
||||
BLF_exit();
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
BLF_free_unifont();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,6 +52,6 @@ if env['WITH_BF_FFMPEG']:
|
||||
defs.append('WITH_FFMPEG')
|
||||
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs.append('INTERNATIONAL')
|
||||
defs.append('WITH_INTERNATIONAL')
|
||||
|
||||
env.BlenderLib (libname='ge_player_ghost', sources=source_files, includes = incs, defines = defs, libtype=['player'],priority=[0], cxx_compileflags=env['BGE_CXXFLAGS'])
|
||||
|
||||
Reference in New Issue
Block a user