diff --git a/CMakeLists.txt b/CMakeLists.txt index 70ec8952ce1..bec1353a8cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,10 +55,6 @@ PROJECT(Blender) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) -# Note! - Could create this from the blender version string -# ...but thats quite involved, make sure this matches the blender version. -SET(BLENDER_VERSION 2.5) - #----------------------------------------------------------------------------- # Load some macros. INCLUDE(build_files/cmake/macros.cmake) @@ -66,6 +62,8 @@ INCLUDE(build_files/cmake/macros.cmake) #----------------------------------------------------------------------------- # Set default config options +GET_BLENDER_VERSION() + # Blender internal features OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) OPTION(WITH_LCMS "Enable color correction with lcms" OFF) diff --git a/build_files/cmake/example_scripts/cmake_linux_install.sh b/build_files/cmake/example_scripts/cmake_linux_install.sh new file mode 100755 index 00000000000..7770efcf392 --- /dev/null +++ b/build_files/cmake/example_scripts/cmake_linux_install.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +# This shell script checks out and compiles blender, tested on ubuntu 10.04 +# assumes you have dependancies installed alredy + +# See this page for more info: +# http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Generic_Distro/CMake + +# grab blender +mkdir ~/blender-svn +cd ~/blender-svn +svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender + +# create cmake dir +mkdir ~/blender-svn/build-cmake +cd ~/blender-svn/build-cmake + +# cmake without copying files for fast rebuilds +# the files from svn will be used in place +cmake ../blender -DWITH_INSTALL:BOOL=FALSE + +# make blender, will take some time +make + +# link the binary to blenders source directory to run quickly +ln -s ~/blender-svn/build-cmake/bin/blender ~/blender-svn/blender/blender.bin + +# useful info +echo "" +echo "* Useful Commands *" +echo " Run Blender: ~/blender-svn/blender/blender.bin" +echo " Update Blender: svn up ~/blender-svn/blender" +echo " Reconfigure Blender: cd ~/blender-svn/build-cmake ; cmake ." +echo " Build Blender: cd ~/blender-svn/build-cmake ; make" +echo "" + + diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index aec86f7467a..84e6b788dc0 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -198,3 +198,36 @@ MACRO(TEST_SSE_SUPPORT) SUPPORT_SSE_BUILD) ENDMACRO(TEST_SSE_SUPPORT) +MACRO(GET_BLENDER_VERSION) + FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT) + STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}") + STRING(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}") + STRING(REGEX REPLACE " " ";" CONTENT "${CONTENT}") + + FOREACH(ITEM ${CONTENT}) + IF(LASTITEM MATCHES "BLENDER_VERSION") + MATH(EXPR BLENDER_VERSION_MAJOR "${ITEM} / 100") + MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100") + SET(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}") + ENDIF(LASTITEM MATCHES "BLENDER_VERSION") + + IF(LASTITEM MATCHES "BLENDER_SUBVERSION") + SET(BLENDER_SUBVERSION ${ITEM}) + ENDIF(LASTITEM MATCHES "BLENDER_SUBVERSION") + + IF(LASTITEM MATCHES "BLENDER_MINVERSION") + MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100") + MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100") + SET(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}") + ENDIF(LASTITEM MATCHES "BLENDER_MINVERSION") + + IF(LASTITEM MATCHES "BLENDER_MINSUBVERSION") + SET(BLENDER_MINSUBVERSION ${ITEM}) + ENDIF(LASTITEM MATCHES "BLENDER_MINSUBVERSION") + + SET(LASTITEM ${ITEM}) + ENDFOREACH(ITEM ${CONTENT}) + + MESSAGE(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}") + MESSAGE(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}") +ENDMACRO(GET_BLENDER_VERSION) diff --git a/doc/blender.1 b/doc/blender.1 index 43ac5638765..dd5e60ff900 100644 --- a/doc/blender.1 +++ b/doc/blender.1 @@ -1,4 +1,4 @@ -.TH "BLENDER" "1" "June 27, 2010" "Blender Blender 2\&.52 (sub 5) " +.TH "BLENDER" "1" "July 15, 2010" "Blender Blender 2\&.52 (sub 5) " .SH NAME blender \- a 3D modelling and rendering package @@ -317,11 +317,13 @@ Arguments are executed in the order they are given. eg .br .br .SH "ENVIRONMENT VARIABLES" - \fIHOME\fR Store files such as .blender/ .B.blend .Bfs .Blog here. - \fIBLENDERPATH\fR System directory to use for data files and scripts. - For this build of blender the default \fIBLENDERPATH\fR is... - "/usr/local/share/blender/2.5" - setting the \fIBLENDERPATH\fR will override this + \fIBLENDER_USER_CONFIG\fR Directory for user configuration files. + \fIBLENDER_SYSTEM_CONFIG\fR Directory for system wide configuration files. + \fIBLENDER_USER_SCRIPTS\fR Directory for user scripts. + \fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts. + \fIBLENDER_USER_DATAFILES\fR Directory for user data files (icons, translations, ..). + \fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files. + \fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries. \fITMP\fR or \fITMPDIR\fR Store temporary files here. \fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python. .br diff --git a/doc/blender.1.py b/doc/blender.1.py index 05b491cf21e..7c7fc987c64 100644 --- a/doc/blender.1.py +++ b/doc/blender.1.py @@ -53,7 +53,7 @@ blender_version = blender_version.split("Build")[0] date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y") -filepath = os.path.splitext(__file__)[0] + ".1" +filepath = os.path.splitext(__file__)[0] file = open(filepath, "w") @@ -132,3 +132,5 @@ This manpage was written for a Debian GNU/Linux system by Daniel Mester and updated by Cyril Brulebois and Dan Eicher . ''') + +print("written:", filepath) diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 1a7627c9099..c262ea8aadd 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -85,6 +85,9 @@ ELSEIF(UNIX) ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp ) + + ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}") + ENDIF(APPLE) BLENDERLIB(bf_ghost "${SRC}" "${INC}") diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index c9228e68e54..961a637e616 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -67,6 +67,10 @@ #include // for fprintf only #include // for exit +#ifndef PREFIX +# define PREFIX "/usr/local" +#endif + typedef struct NDOFPlatformInfo { Display *display; Window window; @@ -1461,7 +1465,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const const GHOST_TUns8* GHOST_SystemX11::getSystemDir() const { - return (GHOST_TUns8*)"/usr/share"; + return (GHOST_TUns8*) PREFIX "/share"; } const GHOST_TUns8* GHOST_SystemX11::getUserDir() const diff --git a/projectfiles_vc9/blender/editors/ED_editors.vcproj b/projectfiles_vc9/blender/editors/ED_editors.vcproj index 819d0ca1042..cda69b46f5e 100644 --- a/projectfiles_vc9/blender/editors/ED_editors.vcproj +++ b/projectfiles_vc9/blender/editors/ED_editors.vcproj @@ -355,10 +355,6 @@ Name="datafiles" Filter="c" > - - @@ -387,6 +383,10 @@ RelativePath="..\..\..\source\blender\editors\datafiles\splash.png.c" > + + + + """ -This module contains utility functions spesific to blender but +This module contains utility functions specific to blender but not assosiated with blenders internal data. """ @@ -27,7 +27,8 @@ import bpy as _bpy import os as _os import sys as _sys -from _bpy import home_paths, blend_paths +from _bpy import blend_paths +from _bpy import script_paths as _bpy_script_paths def _test_import(module_name, loaded_modules): @@ -313,7 +314,7 @@ def script_paths(subdir=None, user=True): else: user_script_path = None - for path in home_paths("scripts") + (user_script_path, ): + for path in _bpy_script_paths() + (user_script_path, ): if path: path = _os.path.normpath(path) if path not in scripts and _os.path.isdir(path): diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index b1c5429d4ba..8cbb2bf4e80 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -444,7 +444,7 @@ class Mesh(bpy_types.ID): if not hasattr(edges, "pop"): edges = edges[:] - edge_dict = dict((ed.key, ed) for ed in self.edges if ed.selected) + edge_dict = {ed.key: ed for ed in self.edges if ed.select} while edges: current_edge = edges.pop() diff --git a/release/scripts/modules/rigify/__init__.py b/release/scripts/modules/rigify/__init__.py index ef8f62ad058..095229016e9 100644 --- a/release/scripts/modules/rigify/__init__.py +++ b/release/scripts/modules/rigify/__init__.py @@ -191,8 +191,8 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True): obj.animation_data_clear() # Select generated rig object - obj_orig.selected = False - obj.selected = True + obj_orig.select = False + obj.select = True scene.objects.active = obj # Remove all bones from the generated rig armature. @@ -212,9 +212,9 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True): # Select the temp rigs for merging for objt in scene.objects: - objt.selected = False # deselect all objects - temp_rig_1.selected = True - temp_rig_2.selected = True + objt.select = False # deselect all objects + temp_rig_1.select = True + temp_rig_2.select = True scene.objects.active = temp_rig_2 # Merge the temporary rigs @@ -225,8 +225,8 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True): # Select the generated rig for objt in scene.objects: - objt.selected = False # deselect all objects - obj.selected = True + objt.select = False # deselect all objects + obj.select = True scene.objects.active = obj # Copy over the pose_bone properties @@ -464,7 +464,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True): arm.layer = layer_show - # obj.restrict_view = True + # obj.hide = True obj.data.draw_axes = False bpy.ops.object.mode_set(mode=mode_orig) @@ -490,8 +490,8 @@ def generate_test(context, metarig_type="", GENERATE_FINAL=True): scene.objects.link(obj_new) scene.objects.active = obj_new for obj in scene.objects: - obj.selected = False - obj_new.selected = True + obj.select = False + obj_new.select = True for module_name in get_submodule_types(): if (metarig_type and module_name != metarig_type): @@ -551,8 +551,8 @@ def generate_test_all(context, GRAPH=False): obj.data.drawtype = 'STICK' obj.location[1] += i obj_new.location[1] += i - obj_new.selected = False - obj.selected = True + obj_new.select = False + obj.select = True i += 4 diff --git a/release/scripts/modules/rigify/arm_biped.py b/release/scripts/modules/rigify/arm_biped.py index 7a99eb5d80a..f80a617df47 100644 --- a/release/scripts/modules/rigify/arm_biped.py +++ b/release/scripts/modules/rigify/arm_biped.py @@ -137,8 +137,8 @@ def ik(obj, definitions, base_names, options): ik.pole_vis = add_stretch_to(obj, mt.forearm, ik.pole, "VIS-%s_ik" % base_names[mt.forearm]) ik.update() - ik.hand_vis_e.restrict_select = True - ik.pole_vis_e.restrict_select = True + ik.hand_vis_e.hide_select = True + ik.pole_vis_e.hide_select = True bpy.ops.object.mode_set(mode='OBJECT') diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 3fd70fedd8c..71895a25446 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -631,8 +631,8 @@ if __name__ == "__main__": props = [(prop.identifier, prop) for prop in v.properties] for prop_id, prop in sorted(props): - if prop.type == 'boolean': - continue + # if prop.type == 'boolean': + # continue data += "%s.%s -> %s: %s%s %s\n" % (struct_id_str, prop.identifier, prop.identifier, prop.type, ", (read-only)" if prop.is_readonly else "", prop.description) if bpy.app.background: diff --git a/release/scripts/op/fcurve_euler_filter.py b/release/scripts/op/fcurve_euler_filter.py index bba4576ef73..39c226294ee 100644 --- a/release/scripts/op/fcurve_euler_filter.py +++ b/release/scripts/op/fcurve_euler_filter.py @@ -40,7 +40,7 @@ def main(context): flist = bpy.context.active_object.animation_data.action.fcurves for f in flist: - if f.selected and f.data_path.endswith("rotation_euler"): + if f.select and f.data_path.endswith("rotation_euler"): cleanupEulCurve(f) class DiscontFilterOp(bpy.types.Operator): diff --git a/release/scripts/op/mesh.py b/release/scripts/op/mesh.py index 78ca9a18cdc..b63997b8eba 100644 --- a/release/scripts/op/mesh.py +++ b/release/scripts/op/mesh.py @@ -54,9 +54,9 @@ class MeshSelectInteriorFaces(bpy.types.Operator): for index, face in enumerate(face_list): if(test_interior(index)): - face.selected = True + face.select = True else: - face.selected = False + face.select = False if is_editmode: bpy.ops.object.mode_set(mode='EDIT', toggle=False) @@ -122,7 +122,7 @@ class MeshMirrorUV(bpy.types.Operator): # as a list faces = mesh.faces[:] - fuvsel = [(False not in uv.uv_selected) for uv in active_uv_layer] + fuvsel = [(False not in uv.select_uv) for uv in active_uv_layer] fcents = [f.center for f in faces] # find mirror faces diff --git a/release/scripts/op/nla.py b/release/scripts/op/nla.py index d0c53758ba9..ceb4621d643 100644 --- a/release/scripts/op/nla.py +++ b/release/scripts/op/nla.py @@ -100,7 +100,7 @@ def bake(frame_start, frame_end, step=1, only_selected=False): pose_items = pose.bones.items() for name, pbone in pose_items: - if only_selected and not pbone.selected: + if only_selected and not pbone.select: continue for f in frame_range: diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index b16d2b0dcf2..2df1250251e 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -52,9 +52,9 @@ class SelectPattern(bpy.types.Operator): # Can be pose bones or objects for item in items: if pattern_match(item.name, self.properties.pattern): - item.selected = True + item.select = True elif not self.properties.extend: - item.selected = False + item.select = False return {'FINISHED'} @@ -90,7 +90,7 @@ class SelectCamera(bpy.types.Operator): self.report({'WARNING'}, "Active camera is not in this scene") context.scene.objects.active = camera - camera.selected = True + camera.select = True return {'FINISHED'} @@ -121,7 +121,7 @@ class SelectHierarchy(bpy.types.Operator): if not self.properties.extend: # for obj in objs: - # obj.selected = False + # obj.select = False bpy.ops.object.select_all(action='DESELECT') if self.properties.direction == 'PARENT': @@ -135,7 +135,7 @@ class SelectHierarchy(bpy.types.Operator): if obj_act == obj: context.scene.objects.active = parent - parent.selected = True + parent.select = True if parents: return {'CANCELLED'} @@ -145,7 +145,7 @@ class SelectHierarchy(bpy.types.Operator): for obj in objs: children += list(obj.children) for obj_iter in children: - obj_iter.selected = True + obj_iter.select = True children.sort(key=lambda obj_iter: obj_iter.name) context.scene.objects.active = children[0] @@ -536,11 +536,11 @@ class IsolateTypeRender(bpy.types.Operator): for obj in context.visible_objects: - if obj.selected: - obj.restrict_render = False + if obj.select: + obj.hide_render = False else: if obj.type == act_type: - obj.restrict_render = True + obj.hide_render = True return {'FINISHED'} diff --git a/release/scripts/op/sequencer.py b/release/scripts/op/sequencer.py index 13668498aae..cf876189907 100644 --- a/release/scripts/op/sequencer.py +++ b/release/scripts/op/sequencer.py @@ -40,7 +40,7 @@ class SequencerCrossfadeSounds(bpy.types.Operator): seq1 = None seq2 = None for s in context.scene.sequence_editor.sequences: - if s.selected and s.type == 'SOUND': + if s.select and s.type == 'SOUND': if seq1 == None: seq1 = s elif seq2 == None: @@ -97,13 +97,13 @@ class SequencerCutMulticam(bpy.types.Operator): if s.multicam_source == camera: return {'FINISHED'} - if not s.selected: - s.selected = True + if not s.select: + s.select = True cfra = context.scene.frame_current bpy.ops.sequencer.cut(frame=cfra, type='SOFT', side='RIGHT') for s in context.scene.sequence_editor.sequences_all: - if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end: + if s.select and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end: context.scene.sequence_editor.active_strip = s context.scene.sequence_editor.active_strip.multicam_source = camera @@ -125,7 +125,7 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator): def execute(self, context): for s in context.scene.sequence_editor.sequences_all: - if s.selected and s.type == 'MOVIE': + if s.select and s.type == 'MOVIE': s.de_interlace = True return {'FINISHED'} diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index 51c1695677b..a7abd475b8d 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -85,9 +85,9 @@ class ExportUVLayout(bpy.types.Operator): for i in range(uv_layer_len): uv_elem = uv_layer[i] # context checks - if faces[i].selected and (local_image is Ellipsis or local_image == uv_elem.image): + if faces[i].select and (local_image is Ellipsis or local_image == uv_elem.image): #~ uv = uv_elem.uv - #~ if False not in uv_elem.uv_selected[:len(uv)]: + #~ if False not in uv_elem.select_uv[:len(uv)]: #~ yield (i, uv) # just write what we see. diff --git a/release/scripts/op/uvcalc_follow_active.py b/release/scripts/op/uvcalc_follow_active.py index 81229f73461..6466d48a9fe 100644 --- a/release/scripts/op/uvcalc_follow_active.py +++ b/release/scripts/op/uvcalc_follow_active.py @@ -65,9 +65,9 @@ def extend(obj, operator, EXTEND_MODE): # vertex index is the key, uv is the value - uvs_vhash_source = dict([(vindex, uvs_source[i]) for i, vindex in enumerate(vidx_source)]) + uvs_vhash_source = {vindex: uvs_source[i] for i, vindex in enumerate(vidx_source)} - uvs_vhash_target = dict([(vindex, uvs_target[i]) for i, vindex in enumerate(vidx_target)]) + uvs_vhash_target = {vindex: uvs_target[i] for i, vindex in enumerate(vidx_target)} edge_idxs_source = face_edge_vs(vidx_source) edge_idxs_target = face_edge_vs(vidx_target) @@ -146,7 +146,7 @@ def extend(obj, operator, EXTEND_MODE): operator.report({'ERROR'}, "No active face.") return - face_sel = [f for f in me.faces if len(f.verts) == 4 and f.selected] + face_sel = [f for f in me.faces if len(f.verts) == 4 and f.select] face_act_local_index = -1 for i, f in enumerate(face_sel): diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py index 13bf6244f4d..a7ef980e8c5 100644 --- a/release/scripts/op/uvcalc_smart_project.py +++ b/release/scripts/op/uvcalc_smart_project.py @@ -821,7 +821,7 @@ def main(context, island_margin, projection_limit): #XXX ob = objects.active ob= objects[0] - if ob and ob.selected == 0 and ob.type == 'MESH': + if ob and (not ob.select) and ob.type == 'MESH': # Add to the list obList =[ob] del objects @@ -899,7 +899,7 @@ def main(context, island_margin, projection_limit): me_verts = list(me.verts) if USER_ONLY_SELECTED_FACES: - meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.selected] + meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select] #else: # meshFaces = map(thickface, me.faces) diff --git a/release/scripts/op/vertexpaint_dirt.py b/release/scripts/op/vertexpaint_dirt.py index c1521866a56..63a3aa3896b 100644 --- a/release/scripts/op/vertexpaint_dirt.py +++ b/release/scripts/op/vertexpaint_dirt.py @@ -127,7 +127,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean, return('CANCELLED', ) for i, f in enumerate(me.faces): - if not me.use_paint_mask or f.selected: + if not me.use_paint_mask or f.select: f_col = active_col_layer[i] diff --git a/release/scripts/presets/interaction/maya.py b/release/scripts/presets/interaction/maya.py index 31652035dff..777dee1e563 100644 --- a/release/scripts/presets/interaction/maya.py +++ b/release/scripts/presets/interaction/maya.py @@ -244,9 +244,9 @@ kmi = km.items.add('object.location_clear', 'G', 'PRESS', alt=True) kmi = km.items.add('object.rotation_clear', 'R', 'PRESS', alt=True) kmi = km.items.add('object.scale_clear', 'S', 'PRESS', alt=True) kmi = km.items.add('object.origin_clear', 'O', 'PRESS', alt=True) -kmi = km.items.add('object.restrictview_clear', 'H', 'PRESS', alt=True) -kmi = km.items.add('object.restrictview_set', 'H', 'PRESS') -kmi = km.items.add('object.restrictview_set', 'H', 'PRESS', shift=True) +kmi = km.items.add('object.hide_clear', 'H', 'PRESS', alt=True) +kmi = km.items.add('object.hide_set', 'H', 'PRESS') +kmi = km.items.add('object.hide_set', 'H', 'PRESS', shift=True) kmi.properties.unselected = True kmi = km.items.add('object.move_to_layer', 'M', 'PRESS') kmi = km.items.add('object.delete', 'X', 'PRESS') diff --git a/release/scripts/templates/operator_uv.py b/release/scripts/templates/operator_uv.py index 1003bd6c58b..9327de33312 100644 --- a/release/scripts/templates/operator_uv.py +++ b/release/scripts/templates/operator_uv.py @@ -16,7 +16,7 @@ def main(context): for i, uv in enumerate(mesh.active_uv_texture.data): uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4 for j, v_idx in enumerate(mesh.faces[i].verts): - if uv.uv_selected[j]: + if uv.select_uv[j]: # apply the location of the vertex as a UV uvs[j][:] = mesh.verts[v_idx].co.xy diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index b6b638ef380..a4be7b31042 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -81,13 +81,13 @@ class BONE_PT_transform(BoneButtonsPanel): sub.label(text="Roll:") sub.prop(bone, "roll", text="") sub.label() - sub.prop(bone, "locked") + sub.prop(bone, "lock") else: col = layout.column() col.prop(bone, "head") col.prop(bone, "tail") col.prop(bone, "roll") - col.prop(bone, "locked") + col.prop(bone, "lock") else: pchan = ob.pose.bones[context.bone.name] @@ -231,7 +231,7 @@ class BONE_PT_display(BoneButtonsPanel): col = split.column() col.prop(bone, "draw_wire", text="Wireframe") - col.prop(bone, "hidden", text="Hide") + col.prop(bone, "hide", text="Hide") if wide_ui: col = split.column() diff --git a/release/scripts/ui/properties_game.py b/release/scripts/ui/properties_game.py index 9ec7168f834..88803993c92 100644 --- a/release/scripts/ui/properties_game.py +++ b/release/scripts/ui/properties_game.py @@ -58,7 +58,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col = split.column() col.prop(game, "actor") col.prop(game, "ghost") - col.prop(ob, "restrict_render", text="Invisible") # out of place but useful + col.prop(ob, "hide_render", text="Invisible") # out of place but useful if wide_ui: col = split.column() @@ -120,7 +120,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col = layout.column() col.prop(game, "actor") col.prop(game, "ghost") - col.prop(ob, "restrict_render", text="Invisible") + col.prop(ob, "hide_render", text="Invisible") layout.separator() @@ -156,10 +156,10 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel): col = layout.column() col.prop(game, "actor") col.prop(game, "ghost") - col.prop(ob, "restrict_render", text="Invisible") + col.prop(ob, "hide_render", text="Invisible") elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'): - layout.prop(ob, "restrict_render", text="Invisible") + layout.prop(ob, "hide_render", text="Invisible") class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel): diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index 335bd25b501..edeadb9326b 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -523,7 +523,7 @@ class ConstraintButtonsPanel(bpy.types.Panel): row = layout.row() if wide_ui: row.label(text="Lock:") - row.prop(con, "locked", expand=True) + row.prop(con, "lock", expand=True) def LIMIT_DISTANCE(self, context, layout, con, wide_ui): self.target_template(layout, con, wide_ui) diff --git a/release/scripts/ui/space_time.py b/release/scripts/ui/space_time.py index 042e4dbc015..8c24dbc2d9c 100644 --- a/release/scripts/ui/space_time.py +++ b/release/scripts/ui/space_time.py @@ -141,7 +141,7 @@ class TIME_MT_frame(bpy.types.Menu): # it was ok for riscos... ok TODO, operator for marker in context.scene.timeline_markers: - if marker.selected: + if marker.select: layout.separator() layout.prop(marker, "name", text="", icon='MARKER_HLT') break diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index bab3695a0b6..3ad945cd19d 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -859,9 +859,9 @@ class VIEW3D_MT_object_showhide(bpy.types.Menu): def draw(self, context): layout = self.layout - layout.operator("object.restrictview_clear", text="Show Hidden") - layout.operator("object.restrictview_set", text="Hide Selected") - layout.operator("object.restrictview_set", text="Hide Unselected").unselected = True + layout.operator("object.hide_view_clear", text="Show Hidden") + layout.operator("object.hide_view_set", text="Hide Selected") + layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True class VIEW3D_MT_make_single_user(bpy.types.Menu): diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 5936805765d..baec6ecfe6a 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -45,7 +45,7 @@ struct Scene; struct Main; #define BLENDER_VERSION 252 -#define BLENDER_SUBVERSION 6 // XXX: this shouldn't be merged with trunk, this is so Sculpt branch can detect old files +#define BLENDER_SUBVERSION 5 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index 316b850805d..57e6d0b16d7 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -41,31 +41,6 @@ struct ListBase; struct direntry; char *BLI_gethome(void); -char *BLI_gethome_folder(char *folder_name, int flag); - -/* BLI_gethome_folder flag */ -#define BLI_GETHOME_LOCAL 1<<1 /* relative location for portable binaries */ -#define BLI_GETHOME_SYSTEM 1<<2 /* system location, or set from the BLENDERPATH env variable (UNIX only) */ -#define BLI_GETHOME_USER 1<<3 /* home folder ~/.blender */ -#define BLI_GETHOME_ALL (BLI_GETHOME_SYSTEM|BLI_GETHOME_LOCAL|BLI_GETHOME_USER) - - -#ifdef __APPLE__ -typedef enum { - BasePath_Temporary = 1, - BasePath_BlenderShared, - BasePath_BlenderUser, - BasePath_ApplicationBundle -} basePathesTypes; - -/** - * Gets the base path. The path may not exist. - * Note that return string must be copied as its persistence is not guaranteed - * - * @return base path of pathType - */ -const char* BLI_osx_getBasePath(basePathesTypes pathType); -#endif char *BLI_get_folder(int folder_id, char *subfolder); char *BLI_get_folder_create(int folder_id, char *subfolder); diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 957fdb2b017..e8689895735 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -74,10 +74,10 @@ extern "C" { #define MAXPATHLEN MAX_PATH #ifndef S_ISREG -#define S_ISREG(x) ((x&S_IFMT) == S_IFREG) +#define S_ISREG(x) (((x)&_S_IFREG) == _S_IFREG) #endif #ifndef S_ISDIR -#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR) +#define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) #endif /* defines for using ISO C++ conformant names */ diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index a543f4623f1..7a24d9b36b1 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -205,6 +205,10 @@ int BLI_touch(const char *file) return 0; } +int BLI_exists(char *file) { + return BLI_exist(file); +} + #ifdef WIN32 static char str[MAXPATHLEN+12]; @@ -282,10 +286,6 @@ int BLI_link(char *file, char *to) { return 1; } -int BLI_exists(char *file) { - return (GetFileAttributes(file) != 0xFFFFFFFF); -} - void BLI_recurdir_fileops(char *dirname) { char *lslash; char tmp[MAXPATHLEN]; @@ -326,10 +326,10 @@ int BLI_rename(char *from, char *to) { return rename(from, to); } -#else /* The sane UNIX world */ +#else /* The weirdo UNIX world */ /* - * but the sane UNIX world is tied to the interface, and the system + * but the UNIX world is tied to the interface, and the system * timer, and... We implement a callback mechanism. The system will * have to initialise the callback before the functions will work! * */ @@ -374,10 +374,6 @@ int BLI_link(char *file, char *to) { return system(str); } -int BLI_exists(char *file) { - return BLI_exist(file); -} - void BLI_recurdir_fileops(char *dirname) { char *lslash; char tmp[MAXPATHLEN]; diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 423bf452a4d..6ab7ba2a7a5 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -364,7 +364,7 @@ void BLI_path_rel(char *file, const char *relfile) if (strlen(relfile) > 2 && relfile[1] != ':') { char* ptemp; /* fix missing volume name in relative base, - can happen with old .Blog files */ + can happen with old recent-files.txt files */ get_default_root(temp); ptemp = &temp[2]; if (relfile[0] != '\\' && relfile[0] != '/') { @@ -795,121 +795,6 @@ char *BLI_gethome(void) { #endif } -/* this function returns the path to a blender folder, if it exists - * utility functions for BLI_gethome_folder */ - -// #define PATH_DEBUG /* for testing paths that are checked */ - -static int test_data_path(char *targetpath, char *path_base, char *path_sep, char *folder_name) -{ - char tmppath[FILE_MAXDIR]; - - if(path_sep) BLI_join_dirfile(tmppath, path_base, path_sep); - else BLI_strncpy(tmppath, path_base, sizeof(tmppath)); - - BLI_make_file_string("/", targetpath, tmppath, folder_name); - - if (BLI_is_dir(targetpath)) { -#ifdef PATH_DEBUG - printf("\tpath found: %s\n", targetpath); -#endif - return 1; - } - else { -#ifdef PATH_DEBUG - printf("\tpath missing: %s\n", targetpath); -#endif - targetpath[0] = '\0'; - return 0; - } -} - -static int gethome_path_local(char *targetpath, char *folder_name) -{ - extern char bprogname[]; /* argv[0] from creator.c */ - char bprogdir[FILE_MAXDIR]; - char cwd[FILE_MAXDIR]; - char *s; - int i; - -#ifdef PATH_DEBUG - printf("gethome_path_local...\n"); -#endif - - /* try release/folder_name (binary relative) */ - /* use argv[0] (bprogname) to get the path to the executable */ - s = BLI_last_slash(bprogname); - i = s - bprogname + 1; - BLI_strncpy(bprogdir, bprogname, i); - - /* try release/folder_name (BIN relative) */ - if(test_data_path(targetpath, bprogdir, "release", folder_name)) - return 1; - - /* try release/folder_name (CWD relative) */ - if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name)) - return 1; - - /* try ./.blender/folder_name */ - if(test_data_path(targetpath, bprogdir, ".blender", folder_name)) - return 1; - - return 0; -} - -static int gethome_path_user(char *targetpath, char *folder_name) -{ - char *home_path= BLI_gethome(); - -#ifdef PATH_DEBUG - printf("gethome_path_user...\n"); -#endif - - /* try $HOME/folder_name */ - return test_data_path(targetpath, home_path, ".blender", folder_name); -} - -static int gethome_path_system(char *targetpath, char *folder_name) -{ - extern char blender_path[]; /* unix prefix eg. /usr/share/blender/2.5 creator.c */ - - if(!blender_path[0]) - return 0; - -#ifdef PATH_DEBUG - printf("gethome_path_system...\n"); -#endif - - /* try $BLENDERPATH/folder_name */ - return test_data_path(targetpath, blender_path, NULL, folder_name); -} - -char *BLI_gethome_folder(char *folder_name, int flag) -{ - static char fulldir[FILE_MAXDIR] = ""; - - /* first check if this is a redistributable bundle */ - if(flag & BLI_GETHOME_LOCAL) { - if (gethome_path_local(fulldir, folder_name)) - return fulldir; - } - - /* then check if the OS has blender data files installed in a global location */ - if(flag & BLI_GETHOME_SYSTEM) { - if (gethome_path_system(fulldir, folder_name)) - return fulldir; - } - - /* now check the users home dir for data files */ - if(flag & BLI_GETHOME_USER) { - if (gethome_path_user(fulldir, folder_name)) - return fulldir; - } - - return NULL; -} - - /* NEW stuff, to be cleaned up when fully migrated */ /* ************************************************************* */ /* ************************************************************* */ @@ -961,10 +846,11 @@ static int test_env_path(char *path, char *envvar) } } -static int get_path_local(char *targetpath, char *folder_name) +static int get_path_local(char *targetpath, char *folder_name, char *subfolder_name) { extern char bprogname[]; /* argv[0] from creator.c */ char bprogdir[FILE_MAX]; + char relfolder[FILE_MAX]; char cwd[FILE_MAX]; char *s; int i; @@ -973,6 +859,11 @@ static int get_path_local(char *targetpath, char *folder_name) printf("get_path_local...\n"); #endif + if (subfolder_name) { + BLI_join_dirfile(relfolder, folder_name, subfolder_name); + } else { + BLI_strncpy(relfolder, folder_name, FILE_MAX); + } /* use argv[0] (bprogname) to get the path to the executable */ s = BLI_last_slash(bprogname); @@ -980,38 +871,44 @@ static int get_path_local(char *targetpath, char *folder_name) BLI_strncpy(bprogdir, bprogname, i); /* try EXECUTABLE_DIR/folder_name */ - if(test_path(targetpath, bprogdir, "", folder_name)) + if(test_path(targetpath, bprogdir, "", relfolder)) return 1; /* try CWD/release/folder_name */ - if(test_path(targetpath, BLI_getwdN(cwd), "release", folder_name)) + if(test_path(targetpath, BLI_getwdN(cwd), "release", relfolder)) return 1; /* try EXECUTABLE_DIR/release/folder_name */ - if(test_path(targetpath, bprogdir, "release", folder_name)) + if(test_path(targetpath, bprogdir, "release", relfolder)) return 1; /* try EXECUTABLE_DIR/2.5/folder_name - new default directory for local blender installed files */ - if(test_path(targetpath, bprogdir, blender_version_decimal(), folder_name)) + if(test_path(targetpath, bprogdir, blender_version_decimal(), relfolder)) return 1; /* try ./.blender/folder_name -- DEPRECATED, need to update build systems */ - if(test_path(targetpath, bprogdir, ".blender", folder_name)) + if(test_path(targetpath, bprogdir, ".blender", relfolder)) return 1; return 0; } -static int get_path_user(char *targetpath, char *folder_name, char *envvar) +static int get_path_user(char *targetpath, char *folder_name, char *subfolder_name, char *envvar) { char user_path[FILE_MAX]; const char *user_base_path; user_path[0] = '\0'; - if (test_env_path(targetpath, envvar)) - return 1; - + if (test_env_path(user_path, envvar)) { + if (subfolder_name) { + return test_path(targetpath, user_path, NULL, subfolder_name); + } else { + BLI_strncpy(targetpath, user_path, FILE_MAX); + return 1; + } + } + user_base_path = (const char *)GHOST_getUserDir(); if (user_base_path) { BLI_snprintf(user_path, FILE_MAX, BLENDER_USER_FORMAT, user_base_path, blender_version_decimal()); @@ -1024,19 +921,30 @@ static int get_path_user(char *targetpath, char *folder_name, char *envvar) printf("get_path_user: %s\n", user_path); #endif - /* try $HOME/folder_name */ - return test_path(targetpath, user_path, NULL, folder_name); + if (subfolder_name) { + /* try $HOME/folder_name/subfolder_name */ + return test_path(targetpath, user_path, folder_name, subfolder_name); + } else { + /* try $HOME/folder_name */ + return test_path(targetpath, user_path, NULL, folder_name); + } } -static int get_path_system(char *targetpath, char *folder_name, char *envvar) +static int get_path_system(char *targetpath, char *folder_name, char *subfolder_name, char *envvar) { char system_path[FILE_MAX]; const char *system_base_path; system_path[0] = '\0'; - if (test_env_path(targetpath, envvar)) - return 1; + if (test_env_path(system_path, envvar)) { + if (subfolder_name) { + return test_path(targetpath, system_path, NULL, subfolder_name); + } else { + BLI_strncpy(targetpath, system_path, FILE_MAX); + return 1; + } + } system_base_path = (const char *)GHOST_getSystemDir(); if (system_base_path) { @@ -1050,8 +958,13 @@ static int get_path_system(char *targetpath, char *folder_name, char *envvar) printf("get_path_system: %s\n", system_path); #endif - /* try $BLENDERPATH/folder_name */ - return test_path(targetpath, system_path, NULL, folder_name); + if (subfolder_name) { + /* try $BLENDERPATH/folder_name/subfolder_name */ + return test_path(targetpath, system_path, folder_name, subfolder_name); + } else { + /* try $BLENDERPATH/folder_name */ + return test_path(targetpath, system_path, NULL, folder_name); + } } /* get a folder out of the 'folder_id' presets for paths */ @@ -1059,72 +972,60 @@ static int get_path_system(char *targetpath, char *folder_name, char *envvar) char *BLI_get_folder(int folder_id, char *subfolder) { static char path[FILE_MAX] = ""; - char search_path[FILE_MAX]; switch (folder_id) { case BLENDER_DATAFILES: /* general case */ - BLI_join_dirfile(search_path, "datafiles", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES")) break; - if (get_path_system(path, search_path, "BLENDER_SYSTEM_DATAFILES")) break; + if (get_path_local(path, "datafiles", subfolder)) break; + if (get_path_user(path, "datafiles", subfolder, "BLENDER_USER_DATAFILES")) break; + if (get_path_system(path, "datafiles", subfolder, "BLENDER_SYSTEM_DATAFILES")) break; return NULL; case BLENDER_USER_DATAFILES: - BLI_join_dirfile(search_path, "datafiles", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES")) break; + if (get_path_local(path, "datafiles", subfolder)) break; + if (get_path_user(path, "datafiles", subfolder, "BLENDER_USER_DATAFILES")) break; return NULL; case BLENDER_SYSTEM_DATAFILES: - BLI_join_dirfile(search_path, "datafiles", subfolder); - if (get_path_system(path, search_path, "BLENDER_SYSTEM_DATAFILES")) break; + if (get_path_system(path, "datafiles", subfolder, "BLENDER_SYSTEM_DATAFILES")) break; return NULL; case BLENDER_CONFIG: /* general case */ - BLI_join_dirfile(search_path, "config", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break; - if (get_path_system(path, search_path, "BLENDER_SYSTEM_CONFIG")) break; + if (get_path_local(path, "config", subfolder)) break; + if (get_path_user(path, "config", subfolder, "BLENDER_USER_CONFIG")) break; + if (get_path_system(path, "config", subfolder, "BLENDER_SYSTEM_CONFIG")) break; return NULL; case BLENDER_USER_CONFIG: - BLI_join_dirfile(search_path, "config", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break; + if (get_path_local(path, "config", subfolder)) break; + if (get_path_user(path, "config", subfolder, "BLENDER_USER_CONFIG")) break; return NULL; case BLENDER_SYSTEM_CONFIG: - BLI_join_dirfile(search_path, "config", subfolder); - if (get_path_system(path, search_path, "BLENDER_SYSTEM_CONFIG")) break; + if (get_path_system(path, "config", subfolder, "BLENDER_SYSTEM_CONFIG")) break; return NULL; case BLENDER_SCRIPTS: /* general case */ - BLI_join_dirfile(search_path, "scripts", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break; - if (get_path_system(path, search_path, "BLENDER_SYSTEM_SCRIPTS")) break; + if (get_path_local(path, "scripts", subfolder)) break; + if (get_path_user(path, "scripts", subfolder, "BLENDER_USER_SCRIPTS")) break; + if (get_path_system(path, "scripts", subfolder, "BLENDER_SYSTEM_SCRIPTS")) break; return NULL; case BLENDER_USER_SCRIPTS: - BLI_join_dirfile(search_path, "scripts", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break; + if (get_path_local(path, "scripts", subfolder)) break; + if (get_path_user(path, "scripts", subfolder, "BLENDER_USER_SCRIPTS")) break; return NULL; case BLENDER_SYSTEM_SCRIPTS: - BLI_join_dirfile(search_path, "scripts", subfolder); - if (get_path_system(path, search_path, "BLENDER_SYSTEM_SCRIPTS")) break; + if (get_path_system(path, "scripts", subfolder, "BLENDER_SYSTEM_SCRIPTS")) break; return NULL; case BLENDER_PYTHON: /* general case */ - BLI_join_dirfile(search_path, "python", subfolder); - if (get_path_local(path, search_path)) break; - if (get_path_system(path, search_path, "BLENDER_SYSTEM_PYTHON")) break; + if (get_path_local(path, "python", subfolder)) break; + if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON")) break; return NULL; case BLENDER_SYSTEM_PYTHON: - BLI_join_dirfile(search_path, "python", subfolder); - if (get_path_system(path, search_path, "BLENDER_SYSTEM_PYTHON")) break; + if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON")) break; return NULL; } @@ -1139,11 +1040,11 @@ static char *BLI_get_user_folder_notest(int folder_id, char *subfolder) switch (folder_id) { case BLENDER_USER_DATAFILES: BLI_join_dirfile(search_path, "datafiles", subfolder); - get_path_user(path, search_path, "BLENDER_USER_DATAFILES"); + get_path_user(path, search_path, subfolder, "BLENDER_USER_DATAFILES"); break; case BLENDER_USER_CONFIG: BLI_join_dirfile(search_path, "config", subfolder); - get_path_user(path, search_path, "BLENDER_USER_CONFIG"); + get_path_user(path, search_path, subfolder, "BLENDER_USER_CONFIG"); break; } if ('\0' == path[0]) { diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 51d5f0354f9..4fb5ca77989 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -29,6 +29,11 @@ * Some really low-level file thingies. */ +/* needed for mingw & _stat64i32 */ +#ifdef FREE_WINDOWS +# define __MSVCRT_VERSION__ 0x0800 +#endif + #include #include #include @@ -76,7 +81,6 @@ #endif #ifdef WIN32 -#include #include #include #include "BLI_winstuff.h" @@ -433,18 +437,20 @@ int BLI_filepathsize(const char *path) int BLI_exist(char *name) { - struct stat st; #ifdef WIN32 + struct _stat64i32 st; /* in Windows stat doesn't recognize dir ending on a slash To not break code where the ending slash is expected we don't mess with the argument name directly here - elubie */ char tmp[FILE_MAXDIR+FILE_MAXFILE]; - int len; + int len, res; BLI_strncpy(tmp, name, FILE_MAXDIR+FILE_MAXFILE); len = strlen(tmp); if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; - if (stat(tmp,&st)) return(0); + res = _stat(tmp, &st); + if (res == -1) return(0); #else + struct stat st; if (stat(name,&st)) return(0); #endif return(st.st_mode); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 86f4fa0b103..516515ba014 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -174,7 +174,7 @@ READ - read associated 'direct data' - link direct data (internal and to LibBlock) - read FileGlobal -- read USER data, only when indicated (file is ~/.B.blend or .B25.blend) +- read USER data, only when indicated (file is ~/X.XX/startup.blend) - free file - per Library (per Main) - read file @@ -11044,7 +11044,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) brush->rate = 0.1f; /* New Settings */ - if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 6)) { + if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) { brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space // spacing was originally in pixels, convert it to percentage for new version diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index f873dca4011..27832243ceb 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -65,7 +65,7 @@ Any case: direct data is ALWAYS after the lib block - write TEST (128x128, blend file preview, optional) - write FileGlobal (some global vars) - write SDNA -- write USER if filename is ~/.B.blend +- write USER if filename is ~/X.XX/config/startup.blend */ @@ -2506,7 +2506,7 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report file = open(tempname,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666); if(file == -1) { - BKE_reportf(reports, RPT_ERROR, "Can't open file for writing: %s.", strerror(errno)); + BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s.", tempname, strerror(errno)); return 0; } diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index cd6714ec51f..8c6a81bddf4 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -633,7 +633,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie /* 'mute' button */ - uiItemR(subrow, &ptr, "muted", UI_ITEM_R_ICON_ONLY, "", 0); + uiItemR(subrow, &ptr, "mute", UI_ITEM_R_ICON_ONLY, "", 0); uiBlockSetEmboss(block, UI_EMBOSSN); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 186f3f20082..659ee7b9cea 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4737,7 +4737,7 @@ static int delete_invoke(bContext *C, wmOperator *op, wmEvent *event) void CURVE_OT_delete(wmOperatorType *ot) { static EnumPropertyItem type_items[] = { - {0, "SELECTED", 0, "Selected", ""}, + {0, "SELECTED", 0, "Select", ""}, {1, "SEGMENT", 0, "Segment", ""}, {2, "ALL", 0, "All", ""}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 17bafa3d399..c1ac863b362 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -126,7 +126,7 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl) /* locked */ icon= (gpl->flag & GP_LAYER_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED; - uiItemR(subrow, &ptr, "locked", 0, "", icon); + uiItemR(subrow, &ptr, "lock", 0, "", icon); /* when layer is locked or hidden, only draw header */ if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_HIDE)) { diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index f17a3371df1..2f19ab6698a 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1745,11 +1745,11 @@ static void circle_picker(uiBlock *block, PointerRNA *ptr, const char *propname) uiBut *bt; /* HS circle */ - bt= uiDefButR(block, HSVCIRCLE, 0, "", 0, 0, PICKER_H, PICKER_W, ptr, propname, 0, 0.0, 0.0, 0, 0, ""); + bt= uiDefButR(block, HSVCIRCLE, 0, "", 0, 0, PICKER_H, PICKER_W, ptr, propname, 0, 0.0, 0.0, 0, 0, "Color"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); /* value */ - bt= uiDefButR(block, HSVCUBE, 0, "", PICKER_W+PICKER_SPACE,0,PICKER_BAR,PICKER_H, ptr, propname, 0, 0.0, 0.0, UI_GRAD_V_ALT, 0, ""); + bt= uiDefButR(block, HSVCUBE, 0, "", PICKER_W+PICKER_SPACE,0,PICKER_BAR,PICKER_H, ptr, propname, 0, 0.0, 0.0, UI_GRAD_V_ALT, 0, "Value"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } @@ -1760,11 +1760,11 @@ static void square_picker(uiBlock *block, PointerRNA *ptr, const char *propname, int bartype = type + 3; /* HS square */ - bt= uiDefButR(block, HSVCUBE, 0, "", 0, PICKER_BAR+PICKER_SPACE, PICKER_TOTAL_W, PICKER_H, ptr, propname, 0, 0.0, 0.0, type, 0, ""); + bt= uiDefButR(block, HSVCUBE, 0, "", 0, PICKER_BAR+PICKER_SPACE, PICKER_TOTAL_W, PICKER_H, ptr, propname, 0, 0.0, 0.0, type, 0, "Color"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); /* value */ - bt= uiDefButR(block, HSVCUBE, 0, "", 0, 0, PICKER_TOTAL_W, PICKER_BAR, ptr, propname, 0, 0.0, 0.0, bartype, 0, ""); + bt= uiDefButR(block, HSVCUBE, 0, "", 0, 0, PICKER_TOTAL_W, PICKER_BAR, ptr, propname, 0, 0.0, 0.0, bartype, 0, "Value"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } @@ -1832,11 +1832,11 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR /* RGB values */ uiBlockBeginAlign(block); - bt= uiDefButR(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, propname, 0, 0.0, 0.0, 0, 3, ""); + bt= uiDefButR(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, propname, 0, 0.0, 0.0, 0, 3, "Red"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); - bt= uiDefButR(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, propname, 1, 0.0, 0.0, 0, 3, ""); + bt= uiDefButR(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, propname, 1, 0.0, 0.0, 0, 3, "Green"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); - bt= uiDefButR(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, propname, 2, 0.0, 0.0, 0, 3, ""); + bt= uiDefButR(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, propname, 2, 0.0, 0.0, 0, 3, "Blue"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", 0); @@ -1844,16 +1844,16 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR /* HSV values */ uiBlockBeginAlign(block); - bt= uiDefButF(block, NUMSLI, 0, "H ", 0, -60, butwidth, UI_UNIT_Y, hsv, 0.0, 1.0, 10, 3, ""); + bt= uiDefButF(block, NUMSLI, 0, "H ", 0, -60, butwidth, UI_UNIT_Y, hsv, 0.0, 1.0, 10, 3, "Hue"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); - bt= uiDefButF(block, NUMSLI, 0, "S ", 0, -80, butwidth, UI_UNIT_Y, hsv+1, 0.0, 1.0, 10, 3, ""); + bt= uiDefButF(block, NUMSLI, 0, "S ", 0, -80, butwidth, UI_UNIT_Y, hsv+1, 0.0, 1.0, 10, 3, "Saturation"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); - bt= uiDefButF(block, NUMSLI, 0, "V ", 0, -100, butwidth, UI_UNIT_Y, hsv+2, 0.0, max, 10, 3, ""); + bt= uiDefButF(block, NUMSLI, 0, "V ", 0, -100, butwidth, UI_UNIT_Y, hsv+2, 0.0, max, 10, 3, "Value"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); uiBlockEndAlign(block); if(rgb[3] != FLT_MAX) { - bt= uiDefButR(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, propname, 3, 0.0, 0.0, 0, 0, ""); + bt= uiDefButR(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, propname, 3, 0.0, 0.0, 0, 0, "Alpha"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } else { diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index e3317e5598f..f12b8aeeca5 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -264,7 +264,7 @@ void UI_DrawString(float x, float y, char *str) /* ************** init exit ************************ */ -/* called on each .B.blend read */ +/* called on each startup.blend read */ /* reading without uifont will create one */ void uiStyleInit(void) { diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index f8e94b87ea9..d2b8b5018ad 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -199,7 +199,7 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea if (RNA_function_call(C, &reports, &ptr, func, &parms) == 0) { int* ret; - RNA_parameter_get_lookup(&parms, "ret", &ret); + RNA_parameter_get_lookup(&parms, "ret", (void **)&ret); if (!(*ret)) { RNA_parameter_list_free(&parms); @@ -2051,7 +2051,7 @@ void uiTemplateTriColorSet(uiLayout *layout, PointerRNA *ptr, char *propname) csPtr= RNA_property_pointer_get(ptr, prop); uiItemR(row, &csPtr, "normal", 0, "", 0); - uiItemR(row, &csPtr, "selected", 0, "", 0); + uiItemR(row, &csPtr, "select", 0, "", 0); uiItemR(row, &csPtr, "active", 0, "", 0); } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index bea8d3bd1f6..b5f2a59dedd 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -999,7 +999,7 @@ void init_userdef_do_versions(void) } if (U.savetime <= 0) { U.savetime = 1; -// XXX error(".B.blend is buggy, please consider removing it.\n"); +// XXX error("startup.blend is buggy, please consider removing it.\n"); } /* transform widget settings */ if(U.tw_hotspot==0) { @@ -1138,7 +1138,7 @@ void init_userdef_do_versions(void) } /* set defaults for 3D View rotating axis indicator */ - /* since size can't be set to 0, this indicates it's not saved in .B.blend */ + /* since size can't be set to 0, this indicates it's not saved in startup.blend */ if (U.rvisize == 0) { U.rvisize = 15; U.rvibright = 8; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 5fe09f0083e..78f8e0e11d3 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -135,7 +135,7 @@ Object *ED_object_active_context(bContext *C) /* ********* clear/set restrict view *********/ -static int object_restrictview_clear_exec(bContext *C, wmOperator *op) +static int object_hide_view_clear_exec(bContext *C, wmOperator *op) { ScrArea *sa= CTX_wm_area(C); View3D *v3d= sa->spacedata.first; @@ -160,23 +160,23 @@ static int object_restrictview_clear_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void OBJECT_OT_restrictview_clear(wmOperatorType *ot) +void OBJECT_OT_hide_view_clear(wmOperatorType *ot) { /* identifiers */ ot->name= "Clear Restrict View"; - ot->description = "Reveal the object by setting the restrictview flag"; - ot->idname= "OBJECT_OT_restrictview_clear"; + ot->description = "Reveal the object by setting the hide flag"; + ot->idname= "OBJECT_OT_hide_view_clear"; /* api callbacks */ - ot->exec= object_restrictview_clear_exec; + ot->exec= object_hide_view_clear_exec; ot->poll= ED_operator_view3d_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int object_restrictview_set_exec(bContext *C, wmOperator *op) +static int object_hide_view_set_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); short changed = 0; @@ -213,15 +213,15 @@ static int object_restrictview_set_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void OBJECT_OT_restrictview_set(wmOperatorType *ot) +void OBJECT_OT_hide_view_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Restrict View"; - ot->description = "Hide the object by setting the restrictview flag"; - ot->idname= "OBJECT_OT_restrictview_set"; + ot->description = "Hide the object by setting the hide flag"; + ot->idname= "OBJECT_OT_hide_view_set"; /* api callbacks */ - ot->exec= object_restrictview_set_exec; + ot->exec= object_hide_view_set_exec; ot->poll= ED_operator_view3d_active; /* flags */ @@ -232,7 +232,7 @@ void OBJECT_OT_restrictview_set(wmOperatorType *ot) } /* 99% same as above except no need for scene refreshing (TODO, update render preview) */ -static int object_restrictrender_clear_exec(bContext *C, wmOperator *op) +static int object_hide_render_clear_exec(bContext *C, wmOperator *op) { short changed= 0; @@ -251,23 +251,23 @@ static int object_restrictrender_clear_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void OBJECT_OT_restrictrender_clear(wmOperatorType *ot) +void OBJECT_OT_hide_render_clear(wmOperatorType *ot) { /* identifiers */ ot->name= "Clear Restrict Render"; - ot->description = "Reveal the render object by setting the restrictrender flag"; - ot->idname= "OBJECT_OT_restrictrender_clear"; + ot->description = "Reveal the render object by setting the hide render flag"; + ot->idname= "OBJECT_OT_hide_render_clear"; /* api callbacks */ - ot->exec= object_restrictrender_clear_exec; + ot->exec= object_hide_render_clear_exec; ot->poll= ED_operator_view3d_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -static int object_restrictrender_set_exec(bContext *C, wmOperator *op) +static int object_hide_render_set_exec(bContext *C, wmOperator *op) { int unselected= RNA_boolean_get(op->ptr, "unselected"); @@ -288,15 +288,15 @@ static int object_restrictrender_set_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void OBJECT_OT_restrictrender_set(wmOperatorType *ot) +void OBJECT_OT_hide_render_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Restrict Render"; - ot->description = "Hide the render object by setting the restrictrender flag"; - ot->idname= "OBJECT_OT_restrictrender_set"; + ot->description = "Hide the render object by setting the hide render flag"; + ot->idname= "OBJECT_OT_hide_render_set"; /* api callbacks */ - ot->exec= object_restrictrender_set_exec; + ot->exec= object_hide_render_set_exec; ot->poll= ED_operator_view3d_active; /* flags */ diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 8bd0da3b43f..3c22ccdad8f 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -75,10 +75,10 @@ void OBJECT_OT_drop_named_material(struct wmOperatorType *ot); void OBJECT_OT_mode_set(struct wmOperatorType *ot); void OBJECT_OT_editmode_toggle(struct wmOperatorType *ot); void OBJECT_OT_posemode_toggle(struct wmOperatorType *ot); -void OBJECT_OT_restrictview_set(struct wmOperatorType *ot); -void OBJECT_OT_restrictview_clear(struct wmOperatorType *ot); -void OBJECT_OT_restrictrender_set(struct wmOperatorType *ot); -void OBJECT_OT_restrictrender_clear(struct wmOperatorType *ot); +void OBJECT_OT_hide_view_set(struct wmOperatorType *ot); +void OBJECT_OT_hide_view_clear(struct wmOperatorType *ot); +void OBJECT_OT_hide_render_set(struct wmOperatorType *ot); +void OBJECT_OT_hide_render_clear(struct wmOperatorType *ot); void OBJECT_OT_proxy_make(struct wmOperatorType *ot); void OBJECT_OT_shade_smooth(struct wmOperatorType *ot); void OBJECT_OT_shade_flat(struct wmOperatorType *ot); diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index ba706a0d4b9..804f4dd7704 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -72,10 +72,10 @@ void ED_operatortypes_object(void) WM_operatortype_append(OBJECT_OT_editmode_toggle); WM_operatortype_append(OBJECT_OT_posemode_toggle); WM_operatortype_append(OBJECT_OT_proxy_make); - WM_operatortype_append(OBJECT_OT_restrictview_clear); - WM_operatortype_append(OBJECT_OT_restrictview_set); - WM_operatortype_append(OBJECT_OT_restrictrender_clear); - WM_operatortype_append(OBJECT_OT_restrictrender_set); + WM_operatortype_append(OBJECT_OT_hide_view_clear); + WM_operatortype_append(OBJECT_OT_hide_view_set); + WM_operatortype_append(OBJECT_OT_hide_render_clear); + WM_operatortype_append(OBJECT_OT_hide_render_set); WM_operatortype_append(OBJECT_OT_shade_smooth); WM_operatortype_append(OBJECT_OT_shade_flat); WM_operatortype_append(OBJECT_OT_paths_calculate); @@ -318,14 +318,14 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "OBJECT_OT_scale_clear", SKEY, KM_PRESS, KM_ALT, 0); WM_keymap_verify_item(keymap, "OBJECT_OT_origin_clear", OKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_clear", HKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); + WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); /* same as above but for rendering */ - WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_clear", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); - WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_set", HKEY, KM_PRESS, KM_CTRL, 0); -// RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictrender_set", HKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "unselected", 1); // conflicts, removing + WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_CTRL, 0); +// RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "unselected", 1); // conflicts, removing WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index e373a254c3e..7b8d7c4b7ef 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -243,8 +243,8 @@ static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) } else { snap->brush_map_mode = -1; - snap->ofs[0]= snap->ofs[0]= snap->ofs[0]= -1; - snap->size[0]= snap->size[0]= snap->size[0]= -1; + snap->ofs[0]= snap->ofs[1]= snap->ofs[2]= -1; + snap->size[0]= snap->size[1]= snap->size[2]= -1; snap->rot = -1; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index eee0d520747..9577eb4eea2 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -229,8 +229,6 @@ typedef struct StrokeCache { int alt_smooth; float plane_trim_squared; - - float autosmooth_overlap; } StrokeCache; /* ===== OPENGL ===== @@ -580,7 +578,7 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache) /* Return modified brush strength. Includes the direction of the brush, positive values pull vertices, negative values push. Uses tablet pressure and a special multiplier found experimentally to scale the strength factor. */ -static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather, float overlap) +static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) { Brush *brush = paint_brush(&sd->paint); @@ -590,6 +588,8 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather, float float pressure = brush->flag & BRUSH_ALPHA_PRESSURE ? cache->pressure : 1; float pen_flip = cache->pen_flip ? -1 : 1; float invert = cache->invert ? -1 : 1; + float accum = integrate_overlap(brush); + float overlap = (brush->flag & BRUSH_SPACE_ATTEN && brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100) ? 1.0f/accum : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter float flip = dir * invert * pen_flip; switch(brush->sculpt_tool){ @@ -912,7 +912,7 @@ static void calc_area_normal(Sculpt *sd, SculptSession *ss, float an[3], PBVHNod BLI_pbvh_vertex_iter_end; } - //#pragma omp critical + #pragma omp critical { add_v3_v3(an, private_an); add_v3_v3(out_flip, private_out_flip); @@ -1065,7 +1065,7 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no BLI_pbvh_node_get_grids(ss->pbvh, node, &grid_indices, &totgrid, NULL, &gridsize, &griddata, &gridadj); - //#pragma omp critical + #pragma omp critical { tmpgrid= MEM_mallocN(sizeof(float)*3*gridsize*gridsize, "tmpgrid"); tmprow= MEM_mallocN(sizeof(float)*3*gridsize, "tmprow"); @@ -1150,7 +1150,7 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no } } - //#pragma omp critical + #pragma omp critical { MEM_freeN(tmpgrid); MEM_freeN(tmprow); @@ -1169,7 +1169,7 @@ static void smooth(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int totnode, count = (int)(bstrength*max_iterations); last = max_iterations*(bstrength - count*fract); - for(iteration = 1; iteration <= count; ++iteration) { + for(iteration = 0; iteration <= count; ++iteration) { #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for(n=0; nmultires) { @@ -2403,10 +2403,10 @@ static void do_brush_action(Sculpt *sd, SculptSession *ss, Brush *brush) if (brush->sculpt_tool != SCULPT_TOOL_SMOOTH && brush->autosmooth_factor > 0) { if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) { - smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*(1-ss->cache->pressure)*ss->cache->autosmooth_overlap); + smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*(1-ss->cache->pressure)); } else { - smooth(sd, ss, nodes, totnode, brush->autosmooth_factor*ss->cache->autosmooth_overlap); + smooth(sd, ss, nodes, totnode, brush->autosmooth_factor); } } @@ -2580,12 +2580,8 @@ static void do_symmetrical_brush_actions(Sculpt *sd, SculptSession *ss) int i; float feather = calc_symmetry_feather(sd, ss->cache); - float accum = integrate_overlap(brush); - float overlap = (brush->flag & BRUSH_SPACE_ATTEN && brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100) ? 1.0f/accum : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter - ss->cache->autosmooth_overlap = overlap; - - cache->bstrength= brush_strength(sd, cache, feather, overlap); + cache->bstrength= brush_strength(sd, cache, feather); cache->symmetry= symm; diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 005ebfb5b88..c4a42d89758 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -644,17 +644,17 @@ static char *controller_name(int type) { switch (type) { case CONT_LOGIC_AND: - return "AND"; + return "And"; case CONT_LOGIC_OR: - return "OR"; + return "Or"; case CONT_LOGIC_NAND: - return "NAND"; + return "Nand"; case CONT_LOGIC_NOR: - return "NOR"; + return "Nor"; case CONT_LOGIC_XOR: - return "XOR"; + return "Xor"; case CONT_LOGIC_XNOR: - return "XNOR"; + return "Xnor"; case CONT_EXPRESSION: return "Expression"; case CONT_PYTHON: @@ -3537,7 +3537,8 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i uiLayout *box, *row, *subrow; bController *cont= (bController *)ptr->data; - char name[3]; //XXX provisorly for state number + char state[3]; + sprintf(state, "%d", RNA_int_get(ptr, "state")); box= uiLayoutBox(layout); row= uiLayoutRow(box, 0); @@ -3546,15 +3547,14 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i if(RNA_boolean_get(ptr, "expanded")) { uiItemR(row, ptr, "type", 0, "", 0); uiItemR(row, ptr, "name", 0, "", 0); + /* XXX provisory for Blender 2.50Beta */ + uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, state, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); } else { uiItemL(row, controller_name(cont->type), 0); uiItemL(row, cont->name, 0); + uiItemL(row, state, 0); } - /* XXX provisory for Blender 2.50Beta */ - sprintf(name, "%d", RNA_int_get(ptr, "state")); - uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); - uiItemR(row, ptr, "priority", 0, "", 0); if(RNA_boolean_get(ptr, "expanded")==0) { diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 81d4e8b6b01..494e42ea2c8 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -322,7 +322,7 @@ static void nla_panel_properties(const bContext *C, Panel *pa) column= uiLayoutColumn(layout, 1); uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "animated_influence") || RNA_boolean_get(&strip_ptr, "animated_time"))); uiItemL(column, "Playback Settings:", 0); - uiItemR(column, &strip_ptr, "muted", 0, NULL, 0); + uiItemR(column, &strip_ptr, "mute", 0, NULL, 0); uiItemR(column, &strip_ptr, "reversed", 0, NULL, 0); } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 60cd768de12..fc85d2a80bb 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -5110,17 +5110,17 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, - &ptr, "restrict_view", -1, 0, 0, -1, -1, NULL); + &ptr, "hide", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_view_cb, scene, ob); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, - &ptr, "restrict_select", -1, 0, 0, -1, -1, NULL); + &ptr, "hide_select", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, - &ptr, "restrict_render", -1, 0, 0, -1, -1, NULL); + &ptr, "hide_render", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_rend_cb, scene, ob); uiBlockSetEmboss(block, UI_EMBOSS); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 9ac3d7cacdd..9a58536d029 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -490,9 +490,11 @@ void viewrotate_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, LEFTALTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_ENABLE); WM_modalkeymap_add_item(keymap, LEFTALTKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_DISABLE); + /* disabled mode switching for now, can re-implement better, later on WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_MOVE); + */ /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_rotate"); @@ -796,9 +798,11 @@ void viewmove_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); + /* disabled mode switching for now, can re-implement better, later on WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); + */ /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_move"); @@ -936,9 +940,11 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); + /* disabled mode switching for now, can re-implement better, later on WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_MOVE); + */ /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom"); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index a0969979817..9b68e0e45eb 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -267,6 +267,8 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags) if(ibuf->profile == IB_PROFILE_LINEAR_RGB) { for (int i = ibuf->y-1; i >= 0; i--) { + from= (unsigned char *)ibuf->rect + channels*i*width; + for (int j = ibuf->x; j > 0; j--) { to->r = (float)(from[0])/255.0; @@ -280,6 +282,8 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags) else { for (int i = ibuf->y-1; i >= 0; i--) { + from= (unsigned char *)ibuf->rect + channels*i*width; + for (int j = ibuf->x; j > 0; j--) { to->r = srgb_to_linearrgb((float)from[0] / 255.0); diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c index c5c853f0c93..7f1c903e9de 100644 --- a/source/blender/imbuf/intern/thumbs_blend.c +++ b/source/blender/imbuf/intern/thumbs_blend.c @@ -37,54 +37,60 @@ /* extracts the thumbnail from between the 'REND' and the 'GLOB' * chunks of the header, dont use typical blend loader because its too slow */ -ImBuf *IMB_loadblend_thumb(const char *path) + +static ImBuf *loadblend_thumb(gzFile gzfile) { char buf[8]; int code= 0; char endian, pointer_size; char endian_switch; int len, im_len, x, y; - int *rect= NULL; + ImBuf *img= NULL; - gzFile gzfile; - - ImBuf *img; - - /* not necessarily a gzip */ - gzfile = gzopen(path, "rb"); - if (NULL == gzfile ) { - return NULL; - } - /* read the blend file header */ - if(gzread(gzfile, buf, 8) != 8) goto thumb_error; - if(strncmp(buf, "BLENDER", 7)) goto thumb_error; - - if(buf[7]=='-') pointer_size= 8; - else if(buf[7]=='_') pointer_size= 4; - else goto thumb_error; - + if(gzread(gzfile, buf, 8) != 8) + return NULL; + if(strncmp(buf, "BLENDER", 7)) + return NULL; + + if(buf[7]=='-') + pointer_size= 8; + else if(buf[7]=='_') + pointer_size= 4; + else + return NULL; + /* read the next 4 bytes, only need the first char, ignore the version */ /* endian and vertsion (ignored) */ - if(gzread(gzfile, buf, 4) != 4) goto thumb_error; - - if(buf[0]=='V') endian= B_ENDIAN; /* big: PPC */ - else if(buf[0]=='v') endian= L_ENDIAN; /* little: x86 */ - else goto thumb_error; + if(gzread(gzfile, buf, 4) != 4) + return NULL; + + if(buf[0]=='V') + endian= B_ENDIAN; /* big: PPC */ + else if(buf[0]=='v') + endian= L_ENDIAN; /* little: x86 */ + else + return NULL; while(gzread(gzfile, &code, sizeof(int)) == sizeof(int)) { endian_switch = ((ENDIAN_ORDER != endian)) ? 1 : 0; - - if(gzread(gzfile, buf, sizeof(int)) != sizeof(int)) goto thumb_error; + + if(gzread(gzfile, buf, sizeof(int)) != sizeof(int)) + return NULL; + len = *( (int *)((void *)buf) ); - if(endian_switch) SWITCH_INT(len); - + + if(endian_switch) + SWITCH_INT(len); + /* finally read the rest of the bhead struct, pointer and 2 ints */ - if(gzread(gzfile, buf, pointer_size) != pointer_size) goto thumb_error; - if(gzread(gzfile, buf, sizeof(int) * 2) != sizeof(int) * 2) goto thumb_error; + if(gzread(gzfile, buf, pointer_size) != pointer_size) + return NULL; + if(gzread(gzfile, buf, sizeof(int) * 2) != sizeof(int) * 2) + return NULL; + /* we dont actually care whats in the bhead */ - if (code==REND) { gzseek(gzfile, len, SEEK_CUR); /* skip to the next */ } @@ -92,40 +98,57 @@ ImBuf *IMB_loadblend_thumb(const char *path) break; } } - + /* using 'TEST' since new names segfault when loading in old blenders */ - if(code != TEST) goto thumb_error; - - if(gzread(gzfile, &x, sizeof(int)) != sizeof(int)) goto thumb_error; - if(gzread(gzfile, &y, sizeof(int)) != sizeof(int)) goto thumb_error; + if(code != TEST) + return NULL; + + if(gzread(gzfile, &x, sizeof(int)) != sizeof(int)) + return NULL; + if(gzread(gzfile, &y, sizeof(int)) != sizeof(int)) + return NULL; + len -= sizeof(int) * 2; - if(endian_switch) { SWITCH_INT(x); SWITCH_INT(y); } + if(endian_switch) { + SWITCH_INT(x); + SWITCH_INT(y); + } /* inconsistant image size, quit early */ im_len = x * y * sizeof(int); - if(im_len != len) goto thumb_error; + if(im_len != len) + return NULL; /* finally malloc and read the data */ - rect= MEM_mallocN(len, "imb_loadblend_thumb"); + img= IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata, 0); - if(gzread(gzfile, rect, len) != len) goto thumb_error; + if(gzread(gzfile, img->rect, len) != len) { + IMB_freeImBuf(img); + img= NULL; + } - /* read ok! */ - gzclose(gzfile); + return img; +} - img = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata, 0); +ImBuf *IMB_loadblend_thumb(const char *path) +{ + gzFile gzfile; - memcpy(img->rect, rect, im_len); + /* not necessarily a gzip */ + gzfile = gzopen(path, "rb"); - MEM_freeN(rect); - - return img; + if (NULL == gzfile ) { + return NULL; + } + else { + ImBuf *img= loadblend_thumb(gzfile); -thumb_error: - gzclose(gzfile); - if(rect) MEM_freeN(rect); - return NULL; + /* read ok! */ + gzclose(gzfile); + + return img; + } } /* add a fake passepartout overlay to a byte buffer, use for blend file thumbnails */ diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 1f542e2babe..64adb16c9c7 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -326,14 +326,14 @@ static void rna_def_action_group(BlenderRNA *brna) RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", 0, 0, 0, 0, 0); RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED); - RNA_def_property_ui_text(prop, "Selected", "Action Group is selected"); + RNA_def_property_ui_text(prop, "Select", "Action Group is selected"); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED); - RNA_def_property_ui_text(prop, "Locked", "Action Group is locked"); + RNA_def_property_ui_text(prop, "Lock", "Action Group is locked"); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c index 985521fe2c6..a85f19e7be4 100644 --- a/source/blender/makesrna/intern/rna_animviz.c +++ b/source/blender/makesrna/intern/rna_animviz.c @@ -104,9 +104,9 @@ static void rna_def_animviz_motionpath_vert(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Coordinates", ""); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_VERT_SEL); - RNA_def_property_ui_text(prop, "Selected", "Path point is selected for editing"); + RNA_def_property_ui_text(prop, "Select", "Path point is selected for editing"); } static void rna_def_animviz_motion_path(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 9239378f496..437a22b6692 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -443,7 +443,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects"); RNA_def_property_update(prop, 0, "rna_Armature_update_data"); - prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_UNSELECTABLE); RNA_def_property_ui_text(prop, "Selectable", "Bone is able to be selected"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); @@ -523,14 +523,14 @@ static void rna_def_bone(BlenderRNA *brna) rna_def_bone_common(srna, 0); // XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here... - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P); - RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)"); + RNA_def_property_ui_text(prop, "Hide", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); /* XXX better matrix descriptions possible (Arystan) */ @@ -604,29 +604,29 @@ static void rna_def_edit_bone(BlenderRNA *brna) rna_def_bone_common(srna, 1); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_A); - RNA_def_property_ui_text(prop, "Hidden", "Bone is not visible when in Edit Mode"); + RNA_def_property_ui_text(prop, "Hide", "Bone is not visible when in Edit Mode"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); - prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_EDITMODE_LOCKED); - RNA_def_property_ui_text(prop, "Locked", "Bone is not able to be transformed when in Edit Mode"); + RNA_def_property_ui_text(prop, "Lock", "Bone is not able to be transformed when in Edit Mode"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); - prop= RNA_def_property(srna, "selected_head", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_head", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ROOTSEL); - RNA_def_property_ui_text(prop, "Head Selected", ""); + RNA_def_property_ui_text(prop, "Head Select", ""); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); - prop= RNA_def_property(srna, "selected_tail", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_tail", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_TIPSEL); - RNA_def_property_ui_text(prop, "Tail Selected", ""); + RNA_def_property_ui_text(prop, "Tail Select", ""); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); /* calculated and read only, not actual data access */ diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 218ca55e72d..9e004cd5946 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -305,9 +305,9 @@ static void rna_def_curvemappoint(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: bezier or vector"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_SELECT); - RNA_def_property_ui_text(prop, "Selected", "Selection state of the curve point"); + RNA_def_property_ui_text(prop, "Select", "Selection state of the curve point"); } static void rna_def_curvemap(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index fb19e8976c3..1c6c35a88de 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1034,7 +1034,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - prop= RNA_def_property(srna, "locked", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "lockflag"); RNA_def_property_enum_items(prop, lock_items); RNA_def_property_ui_text(prop, "Locked Axis", "Axis that points upward"); diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index 6307c39be52..c66ce532351 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -32,12 +32,12 @@ #include "DNA_controller_types.h" EnumPropertyItem controller_type_items[] ={ - {CONT_LOGIC_AND, "LOGIC_AND", 0, "AND", "Logic And"}, - {CONT_LOGIC_OR, "LOGIC_OR", 0, "OR", "Logic Or"}, - {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "NAND", "Logic Nand"}, - {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "NOR", "Logic Nor"}, - {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "XOR", "Logic Xor"}, - {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "XNOR", "Logic Xnor"}, + {CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"}, + {CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"}, + {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"}, + {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "Nor", "Logic Nor"}, + {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Xor", "Logic Xor"}, + {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Xnor", "Logic Xnor"}, {CONT_EXPRESSION, "EXPRESSION", 0, "Expression", ""}, {CONT_PYTHON, "PYTHON", 0, "Python Script", ""}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index d8bc683ae12..9301e8dd142 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -525,14 +525,14 @@ static void rna_def_bpoint(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "SplinePoint", "Spline point without handles"); /* Boolean values */ - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f1", 0); - RNA_def_property_ui_text(prop, "Selected", "Selection status"); + RNA_def_property_ui_text(prop, "Select", "Selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "hide", 0); - RNA_def_property_ui_text(prop, "Hidden", "Visibility status"); + RNA_def_property_ui_text(prop, "Hide", "Visibility status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); /* Vector value */ @@ -578,24 +578,24 @@ static void rna_def_beztriple(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles"); /* Boolean values */ - prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f1", 0); RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - prop= RNA_def_property(srna, "selected_handle2", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f3", 0); RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - prop= RNA_def_property(srna, "selected_control_point", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f2", 0); RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "hide", 0); - RNA_def_property_ui_text(prop, "Hidden", "Visibility status"); + RNA_def_property_ui_text(prop, "Hide", "Visibility status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); /* Enums */ diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index d798753d123..cd58b6574be 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -940,7 +940,7 @@ static void rna_def_fmodifier(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI"); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); - prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED); RNA_def_property_ui_text(prop, "Muted", "F-Curve Modifier will not be evaluated"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL); @@ -1156,9 +1156,9 @@ static void rna_def_fpoint(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "F-Curve Sample", "Sample point for F-Curve"); /* Boolean values */ - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 1); - RNA_def_property_ui_text(prop, "Selected", "Selection status"); + RNA_def_property_ui_text(prop, "Select", "Selection status"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); /* Vector value */ @@ -1183,19 +1183,19 @@ static void rna_def_fkeyframe(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Keyframe", "Bezier curve point with two handles defining a Keyframe on an F-Curve"); /* Boolean values */ - prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f1", 0); RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "selected_handle2", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f3", 0); RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "f2", 0); - RNA_def_property_ui_text(prop, "Selected", "Control point selection status"); + RNA_def_property_ui_text(prop, "Select", "Control point selection status"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); /* Enums */ @@ -1384,17 +1384,17 @@ static void rna_def_fcurve(BlenderRNA *brna) RNA_def_property_update(prop, NC_ANIMATION, NULL); /* Flags */ - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_SELECTED); - RNA_def_property_ui_text(prop, "Selected", "F-Curve is selected for editing"); + RNA_def_property_ui_text(prop, "Select", "F-Curve is selected for editing"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_PROTECTED); - RNA_def_property_ui_text(prop, "Locked", "F-Curve's settings cannot be edited"); + RNA_def_property_ui_text(prop, "Lock", "F-Curve's settings cannot be edited"); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); - prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_MUTED); RNA_def_property_ui_text(prop, "Muted", "F-Curve is not evaluated"); RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); @@ -1404,15 +1404,15 @@ static void rna_def_fcurve(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Auto Clamped Handles", "All auto-handles for F-Curve are clamped"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL); - prop= RNA_def_property(srna, "visible", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_VISIBLE); - RNA_def_property_ui_text(prop, "Visible", "F-Curve and its keyframes are shown in the Graph Editor graphs"); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FCURVE_VISIBLE); + RNA_def_property_ui_text(prop, "Hide", "F-Curve and its keyframes are hidden in the Graph Editor graphs"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL); - + /* State Info (for Debugging) */ - prop= RNA_def_property(srna, "disabled", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_DISABLED); - RNA_def_property_ui_text(prop, "Disabled", "F-Curve could not be evaluated in past, so should be skipped when evaluating"); + prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FCURVE_DISABLED); + RNA_def_property_ui_text(prop, "Enabled", "False when F-Curve could not be evaluated in past, so should be skipped when evaluating"); RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL); /* Collections */ diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index a503eab4ba9..0994f67879e 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -135,9 +135,9 @@ static void rna_def_gpencil_frame(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_PAINT); // XXX should it be editable? RNA_def_property_ui_text(prop, "Paint Lock", "Frame is being edited (painted on)"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_SELECT); - RNA_def_property_ui_text(prop, "Selected", "Frame is selected for editing in the DopeSheet"); + RNA_def_property_ui_text(prop, "Select", "Frame is selected for editing in the DopeSheet"); } static void rna_def_gpencil_layer(BlenderRNA *brna) @@ -203,7 +203,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Hide", "Set layer Visibility"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); - prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_LOCKED); RNA_def_property_ui_text(prop, "Locked", "Protect layer from further editing and/or frame changes"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); @@ -219,9 +219,9 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active", "Set active layer for editing"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT); - RNA_def_property_ui_text(prop, "Selected", "Layer is selected for editing in the DopeSheet"); + RNA_def_property_ui_text(prop, "Select", "Layer is selected for editing in the DopeSheet"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); // XXX keep this option? diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index b289373f349..8330e0dc32c 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1106,14 +1106,14 @@ static void rna_def_mvert(BlenderRNA *brna) RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", "rna_MeshVertex_normal_set", NULL); RNA_def_property_ui_text(prop, "Normal", "Vertex Normal"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE); @@ -1159,14 +1159,14 @@ static void rna_def_medge(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); prop= RNA_def_property(srna, "seam", PROP_BOOLEAN, PROP_NONE); @@ -1226,14 +1226,14 @@ static void rna_def_mface(BlenderRNA *brna) RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE); @@ -1383,7 +1383,7 @@ static void rna_def_mtface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "uv_selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_uv", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "UV Selected", ""); diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index accb40d2223..59c7607e930 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -422,11 +422,11 @@ static void rna_def_nlastrip(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_ACTIVE); RNA_def_property_ui_text(prop, "Active", "NLA Strip is active"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_SELECT); - RNA_def_property_ui_text(prop, "Selected", "NLA Strip is selected"); + RNA_def_property_ui_text(prop, "Select", "NLA Strip is selected"); - prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_MUTED); RNA_def_property_ui_text(prop, "Muted", "NLA Strip is not evaluated"); @@ -468,15 +468,15 @@ static void rna_def_nlatrack(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SOLO); RNA_def_property_ui_text(prop, "Solo", "NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled)"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SELECTED); - RNA_def_property_ui_text(prop, "Selected", "NLA Track is selected"); + RNA_def_property_ui_text(prop, "Select", "NLA Track is selected"); - prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_MUTED); RNA_def_property_ui_text(prop, "Muted", "NLA Track is not evaluated"); - prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_PROTECTED); RNA_def_property_ui_text(prop, "Locked", "NLA Track is locked"); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e45a776eea2..8b285c42e11 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1538,9 +1538,9 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_layer_update"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", "Object selection state"); + RNA_def_property_ui_text(prop, "Select", "Object selection state"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update"); /* for data access */ @@ -1842,19 +1842,19 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_particle_update"); /* restrict */ - prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW); RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); - prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT); RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 1); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); - prop= RNA_def_property(srna, "restrict_render", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER); RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability"); RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); @@ -2111,9 +2111,9 @@ static void rna_def_object_base(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_layer_update"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT); - RNA_def_property_ui_text(prop, "Selected", "Object base selection state"); + RNA_def_property_ui_text(prop, "Select", "Object base selection state"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_select_update"); RNA_api_object_base(srna); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 211583e3df6..21ece0ac4a9 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -698,9 +698,9 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); RNA_def_struct_name_property(srna, prop); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); /* Baked Bone Path cache data */ rna_def_motionpath_common(srna); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index f46efb675ca..7adf4e7d35d 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -776,17 +776,17 @@ static void rna_def_sequence(BlenderRNA *brna) /* flags */ - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "left_handle_selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL); RNA_def_property_ui_text(prop, "Left Handle Selected", ""); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL); - prop= RNA_def_property(srna, "right_handle_selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL); RNA_def_property_ui_text(prop, "Right Handle Selected", ""); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL); diff --git a/source/blender/makesrna/intern/rna_timeline.c b/source/blender/makesrna/intern/rna_timeline.c index afc1d087cf2..a436c746910 100644 --- a/source/blender/makesrna/intern/rna_timeline.c +++ b/source/blender/makesrna/intern/rna_timeline.c @@ -55,9 +55,9 @@ static void rna_def_timeline_marker(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears"); RNA_def_property_update(prop, NC_ANIMATION, NULL); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", 1 /*SELECT*/); - RNA_def_property_ui_text(prop, "Selected", "Marker selection state"); + RNA_def_property_ui_text(prop, "Select", "Marker selection state"); RNA_def_property_update(prop, NC_ANIMATION, NULL); #ifdef DURIAN_CAMERA_SWITCH diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a03488d3878..32d69e48adf 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1622,10 +1622,10 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop= RNA_def_property(srna, "selected", PROP_FLOAT, PROP_COLOR); + prop= RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "select"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Selected", "Color used for selected bones"); + RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"); RNA_def_property_update(prop, 0, "rna_userdef_update"); prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR); diff --git a/source/blender/makesrna/rna_cleanup/rna_booleans.txt b/source/blender/makesrna/rna_cleanup/rna_booleans.txt index 614db736d64..51be6427c88 100644 --- a/source/blender/makesrna/rna_cleanup/rna_booleans.txt +++ b/source/blender/makesrna/rna_cleanup/rna_booleans.txt @@ -1,7 +1,6 @@ ActionActuator.continue_last_frame -> use_continue_last_frame: boolean Restore last frame when switching on/off, otherwise play from the start each time ActionGroup.expanded -> show_expanded: boolean Action Group is expanded -ActionGroup.locked -> lock: boolean Action Group is locked -ActionGroup.selected -> select: boolean Action Group is selected + Actuator.expanded -> show_expanded: boolean Set actuator expanded in the user interface AnimData.nla_enabled -> use_nla: boolean NLA stack is evaluated when evaluating this block AnimVizMotionPaths.highlight_keyframes -> show_keyframe_highlight: boolean Emphasize position of keyframes on Motion Paths @@ -25,8 +24,8 @@ Armature.draw_custom_bone_shapes -> show_bone_custom_shapes: boolean Draw Armature.draw_group_colors -> show_group_colors: boolean Draw bone group colors Armature.draw_names -> show_names: boolean Draw bone names Armature.show_ghost_only_selected -> show_only_ghost_selected: boolean -Armature.layer -> layer: boolean Armature layer visibility -Armature.layer_protection -> layer_protected: boolean Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo +Armature.layer -> layers: boolean Armature layer visibility +Armature.layer_protection -> layers_protected: boolean Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo Armature.x_axis_mirror -> use_mirror_x: boolean Apply changes to matching bone on opposite side of X-Axis ArmatureModifier.invert -> invert_vertex_group: boolean Invert vertex group influence ArmatureModifier.multi_modifier -> use_multi_modifier: boolean Use same input as previous modifier, and mix results using overall vgroup @@ -40,10 +39,7 @@ ArrayModifier.merge_end_vertices -> use_merge_end_vertices: boolean Merge ArrayModifier.relative_offset -> use_relative_offset: boolean Add an offset relative to the object's bounding box BackgroundImage.show_expanded -> show_expanded: boolean Show the expanded in the user interface BevelModifier.only_vertices -> use_only_vertices: boolean Bevel verts/corners, not edges -BezierSplinePoint.hidden -> hide: boolean Visibility status -BezierSplinePoint.selected_control_point -> select_control_point: boolean Control point selection status -BezierSplinePoint.selected_handle1 -> select_left_handle: boolean Handle 1 selection status -BezierSplinePoint.selected_handle2 -> select_right_handle: boolean Handle 2 selection status + BoidRule.in_air -> use_in_air: boolean Use rule when boid is flying BoidRule.on_land -> use_on_land: boolean Use rule when boid is on land BoidRuleAvoid.predict -> use_predict: boolean Predict target movement @@ -58,14 +54,12 @@ Bone.connected -> use_connect: boolean, (read-only) When bone has a parent Bone.cyclic_offset -> use_cyclic_offset: boolean When bone doesn't have a parent, it receives cyclic offset effects Bone.deform -> use_deform: boolean Bone does not deform any geometry Bone.draw_wire -> show_wire: boolean Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes -Bone.hidden -> hide: boolean Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes) + Bone.hinge -> use_hinge: boolean Bone inherits rotation or scale from parent bone Bone.inherit_scale -> use_inherit_scale: boolean Bone inherits scaling from parent bone -Bone.layer -> layer: boolean Layers bone exists in +Bone.layer -> layers: boolean Layers bone exists in Bone.local_location -> use_local_location: boolean Bone location is set in local space Bone.multiply_vertexgroup_with_envelope -> use_envelope_multiply: boolean When deforming bone, multiply effects of Vertex Group weights with Envelope influence -Bone.restrict_select -> restrict_select: boolean Bone is able to be selected -Bone.selected -> select: boolean BooleanProperty.default -> default: boolean, (read-only) Default value for this number BooleanProperty.default_array -> default_array: boolean, (read-only) Default value for this array Brush.use_accumulate -> use_accumulate: boolean Accumulate stroke dabs on top of each other @@ -149,7 +143,7 @@ ControlFluidSettings.active -> use: boolean Object contributes to the flui ControlFluidSettings.reverse_frames -> use_reverse_frames: boolean Reverse control object movement Controller.expanded -> show_expanded: boolean Set controller expanded in the user interface Controller.priority -> use_priority: boolean Mark controller for execution before all non-marked controllers (good for startup scripts) -Controller.state -> state: boolean, (read-only) Set Controller state index (1 to 30) +Controller.state -> states: boolean, (read-only) Set Controller state index (1 to 30) CopyLocationConstraint.invert_x -> invert_x: boolean Invert the X location CopyLocationConstraint.invert_y -> invert_y: boolean Invert the Y location CopyLocationConstraint.invert_z -> invert_z: boolean Invert the Z location @@ -180,7 +174,7 @@ Curve.use_path_follow -> use_path_follow: boolean Make curve path children Curve.use_radius -> use_radius: boolean Option for paths: apply the curve radius with path following it and deforming Curve.use_stretch -> use_stretch: boolean Option for curve-deform: makes deformed child to stretch along entire path Curve.use_time_offset -> use_time_offset: boolean Children will use Time Offset value as path distance offset -CurveMapPoint.selected -> select: boolean Selection state of the curve point + CurveMapping.clip -> use_clip: boolean Force the curve view to fit a defined boundary DelaySensor.repeat -> use_repeat: boolean Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics DomainFluidSettings.generate_speed_vectors -> use_speed_vectors: boolean Generate speed vectors for vector blur @@ -214,17 +208,13 @@ EditBone.connected -> use_connect: boolean When bone has a parent, bone's EditBone.cyclic_offset -> use_cyclic_offset: boolean When bone doesn't have a parent, it receives cyclic offset effects EditBone.deform -> use_deform: boolean Bone does not deform any geometry EditBone.draw_wire -> show_wire: boolean Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes -EditBone.hidden -> hide: boolean Bone is not visible when in Edit Mode + EditBone.hinge -> use_hinge: boolean Bone inherits rotation or scale from parent bone EditBone.inherit_scale -> use_inherit_scale: boolean Bone inherits scaling from parent bone -EditBone.layer -> layer: boolean Layers bone exists in +EditBone.layer -> layers: boolean Layers bone exists in EditBone.local_location -> use_local_location: boolean Bone location is set in local space -EditBone.locked -> lock: boolean Bone is not able to be transformed when in Edit Mode EditBone.multiply_vertexgroup_with_envelope -> use_envelope_multiply: boolean When deforming bone, multiply effects of Vertex Group weights with Envelope influence -EditBone.restrict_select -> restrict_select: boolean Bone is able to be selected -EditBone.selected -> select: boolean -EditBone.selected_head -> select_head: boolean -EditBone.selected_tail -> select_tail: boolean + EditObjectActuator.enable_3d_tracking -> use_3d_tracking: boolean Enable 3D tracking EditObjectActuator.local_angular_velocity -> use_local_angular_velocity: boolean Apply the rotation locally EditObjectActuator.local_linear_velocity -> use_local_linear_velocity: boolean Apply the transformation locally @@ -243,30 +233,23 @@ EffectSequence.use_crop -> use_crop: boolean Crop image before processing EffectSequence.use_proxy -> use_proxy: boolean Use a preview proxy for this strip EffectSequence.use_translation -> use_translation: boolean Translate image before processing EffectorWeights.do_growing_hair -> apply_to_hair_growing: boolean Use force fields when growing hair -EnvironmentMap.ignore_layers -> layer_ignore: boolean Hide objects on these layers when generating the Environment Map -EnvironmentMapTexture.use_filter_size_min -> filter_size_min: boolean Use Filter Size as a minimal filter value in pixels +EnvironmentMap.ignore_layers -> layers_ignore: boolean Hide objects on these layers when generating the Environment Map +EnvironmentMapTexture.use_filter_size_min -> use_minimum_filter_size: boolean Use Filter Size as a minimal filter value in pixels EnvironmentMapTexture.mipmap -> use_mipmap: boolean Uses auto-generated MIP maps for the image EnvironmentMapTexture.mipmap_gauss -> use_mipmap_gauss: boolean Uses Gauss filter to sample down MIP maps -Event.alt -> alt: boolean, (read-only) True when the Alt/Option key is held -Event.ctrl -> ctrl: boolean, (read-only) True when the Ctrl key is held -Event.oskey -> oskey: boolean, (read-only) True when the Cmd key is held -Event.shift -> shift: boolean, (read-only) True when the Shift key is held +Event.alt -> is_pressed_alt: boolean, (read-only) True when the Alt/Option key is held +Event.ctrl -> is_pressed_ctrl: boolean, (read-only) True when the Ctrl key is held +Event.oskey -> is_pressed_cmd: boolean, (read-only) True when the Cmd key is held +Event.shift -> is_pressed_shift: boolean, (read-only) True when the Shift key is held ExplodeModifier.alive -> show_alive: boolean Show mesh when particles are alive ExplodeModifier.dead -> show_dead: boolean Show mesh when particles are dead ExplodeModifier.size -> use_size: boolean Use particle size for the shrapnel ExplodeModifier.split_edges -> use_edge_split: boolean Split face edges for nicer shrapnel ExplodeModifier.unborn -> show_unborn: boolean Show mesh when particles are unborn FCurve.auto_clamped_handles -> use_auto_handle_clamp: boolean All auto-handles for F-Curve are clamped -NEGATE * FCurve.disabled -> enabled: boolean F-Curve could not be evaluated in past, so should be skipped when evaluating -FCurve.locked -> lock: boolean F-Curve's settings cannot be edited -FCurve.muted -> mute: boolean F-Curve is not evaluated -FCurve.selected -> select: boolean F-Curve is selected for editing -NEGATE * FCurve.visible -> hide: boolean F-Curve and its keyframes are shown in the Graph Editor graphs -FCurveSample.selected -> select: boolean Selection status FModifier.active -> active: boolean F-Curve Modifier is the one being edited -NEGATE * FModifier.disabled -> enabled: boolean, (read-only) F-Curve Modifier has invalid settings and will not be evaluated +NEGATE * FModifier.disabled -> use: boolean, (read-only) F-Curve Modifier has invalid settings and will not be evaluated FModifier.expanded -> show_expanded: boolean F-Curve Modifier's panel is expanded in UI -FModifier.muted -> mute: boolean F-Curve Modifier will not be evaluated FModifierFunctionGenerator.additive -> use_additive: boolean Values generated by this modifier are applied on top of the existing values instead of overwriting them FModifierGenerator.additive -> use_additive: boolean Values generated by this modifier are applied on top of the existing values instead of overwriting them FModifierLimits.use_maximum_x -> use_max_x: boolean Use the maximum X value @@ -314,12 +297,10 @@ FollowPathConstraint.use_fixed_position -> use_fixed_location: boolean Obj Function.registered -> is_registered: boolean, (read-only) Function is registered as callback as part of type registration Function.registered_optional -> is_registered_optional: boolean, (read-only) Function is optionally registered as callback part of type registration GPencilFrame.paint_lock -> is_edited: boolean Frame is being edited (painted on) -GPencilFrame.selected -> select: boolean Frame is selected for editing in the DopeSheet GPencilLayer.active -> active: boolean Set active layer for editing GPencilLayer.frame_lock -> lock_frame: boolean Lock current frame displayed by layer GPencilLayer.hide -> hide: boolean Set layer Visibility -GPencilLayer.locked -> lock: boolean Protect layer from further editing and/or frame changes -GPencilLayer.selected -> select: boolean Layer is selected for editing in the DopeSheet + GPencilLayer.show_points -> show_points: boolean Draw the points which make up the strokes (for debugging purposes) GPencilLayer.use_onion_skinning -> use_onion_skinning: boolean Ghost frames on either side of frame GameBooleanProperty.value -> value: boolean Property value @@ -329,7 +310,7 @@ GameObjectSettings.anisotropic_friction -> use_anisotropic_friction: boolean GameObjectSettings.collision_compound -> use_collision_compound: boolean Add children to form a compound collision object GameObjectSettings.debug_state -> show_debug_state: boolean Print state debug info in the game engine GameObjectSettings.ghost -> use_ghost: boolean Object does not restitute collisions, like a ghost -GameObjectSettings.initial_state -> state_initial: boolean Initial state when the game starts +GameObjectSettings.initial_state -> states_initial: boolean Initial state when the game starts GameObjectSettings.lock_x_axis -> lock_location_x: boolean Disable simulation of linear motion along the X axis GameObjectSettings.lock_x_rot_axis -> lock_rotation_x: boolean Disable simulation of angular motion along the X axis GameObjectSettings.lock_y_axis -> lock_location_y: boolean Disable simulation of linear motion along the Y axis @@ -345,8 +326,8 @@ GameObjectSettings.show_sensors -> show_sensors: boolean Shows sensors for GameObjectSettings.show_state_panel -> show_state_panel: boolean Show state panel GameObjectSettings.use_activity_culling -> use_activity_culling: boolean Disable simulation of angular motion along the Z axis GameObjectSettings.use_collision_bounds -> use_collision_bounds: boolean Specify a collision bounds type other than the default -GameObjectSettings.used_state -> state_used: boolean, (read-only) States which are being used by controllers -GameObjectSettings.visible_state -> state_visible: boolean State determining which controllers are displayed +GameObjectSettings.used_state -> states_used: boolean, (read-only) States which are being used by controllers +GameObjectSettings.visible_state -> states_visible: boolean State determining which controllers are displayed GameProperty.debug -> show_debug: boolean Print debug information for this property GameSoftBodySettings.bending_const -> use_bending_constraints: boolean Enable bending constraints GameSoftBodySettings.cluster_rigid_to_softbody -> use_cluster_rigid_to_softbody: boolean Enable cluster collision between soft and rigid body @@ -354,7 +335,7 @@ GameSoftBodySettings.cluster_soft_to_softbody -> use_cluster_soft_to_softbody: GameSoftBodySettings.shape_match -> use_shape_match: boolean Enable soft body shape matching goal GlowSequence.only_boost -> use_only_boost: boolean Show the glow buffer only GreasePencil.use_stroke_endpoints -> use_stroke_endpoints: boolean Only use the first and last parts of the stroke for snapping -Group.layer -> layer: boolean Layers visible when this groups is instanced as a dupli +Group.layer -> layers: boolean Layers visible when this groups is instanced as a dupli ID.fake_user -> use_fake_user: boolean Saves this datablock even if it has no users ID.tag -> tag: boolean Tools can use this to tag data, (initial state is undefined) Image.animated -> use_animation: boolean Use as animated texture in the game engine @@ -413,16 +394,13 @@ KeyMap.items_expanded -> show_expanded_items: boolean Expanded in the user KeyMap.modal -> is_modal: boolean, (read-only) Indicates that a keymap is used for translate modal events for an operator KeyMap.user_defined -> is_user_defined: boolean Keymap is defined by the user KeyMapItem.active -> active: boolean Activate or deactivate item -KeyMapItem.alt -> alt: boolean Alt key pressed -KeyMapItem.any -> any: boolean Any modifier keys pressed -KeyMapItem.ctrl -> ctrl: boolean Control key pressed +KeyMapItem.alt -> pressed_alt: boolean Alt key pressed +KeyMapItem.any -> pressed_any: boolean Any modifier keys pressed +KeyMapItem.ctrl -> pressed_ctrl: boolean Control key pressed KeyMapItem.expanded -> show_expanded: boolean Show key map event and property details in the user interface -KeyMapItem.oskey -> oskey: boolean Operating system key pressed -KeyMapItem.shift -> shift: boolean Shift key pressed +KeyMapItem.oskey -> pressed_cmd: boolean Operating system key pressed +KeyMapItem.shift -> pressed_shift: boolean Shift key pressed KeyboardSensor.all_keys -> use_all_keys: boolean Trigger this sensor on any keystroke -Keyframe.selected -> select: boolean Control point selection status -Keyframe.selected_handle1 -> select_left_handle: boolean Handle 1 selection status -Keyframe.selected_handle2 -> select_right_handle: boolean Handle 2 selection status KeyingSet.absolute -> use_absolute: boolean Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info) KeyingSet.insertkey_needed -> use_insertkey_needed: boolean Only insert keyframes where they're needed in the relevant F-Curves KeyingSet.insertkey_visual -> use_insertkey_visual: boolean Insert keyframes based on 'visual transforms' @@ -564,17 +542,14 @@ Mesh.use_paint_mask -> use_paint_mask: boolean Face selection masking for Mesh.vertex_normal_flip -> use_vertex_normal_flip: boolean Flip vertex normals towards the camera during render MeshColorLayer.active -> active: boolean Sets the layer as active for display and editing MeshColorLayer.active_render -> active_render: boolean Sets the layer as active for rendering -MeshDeformModifier.dynamic -> dynamic: boolean Recompute binding dynamically on top of other deformers (slower and more memory consuming.) +MeshDeformModifier.dynamic -> use_dynamic_bind: boolean Recompute binding dynamically on top of other deformers (slower and more memory consuming.) MeshDeformModifier.invert -> invert_vertex_group: boolean Invert vertex group influence MeshDeformModifier.is_bound -> is_bound: boolean, (read-only) Whether geometry has been bound to control cage MeshEdge.fgon -> is_fgon: boolean, (read-only) Fgon edge -MeshEdge.hidden -> hide: boolean MeshEdge.loose -> is_loose: boolean, (read-only) Loose edge MeshEdge.seam -> use_seam: boolean Seam edge for UV unwrapping -MeshEdge.selected -> select: boolean MeshEdge.sharp -> use_sharp: boolean Sharp edge for the EdgeSplit modifier -MeshFace.hidden -> hide: boolean -MeshFace.selected -> select: boolean + MeshFace.smooth -> use_smooth: boolean MeshTextureFace.alpha_sort -> use_alpha_sort: boolean Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible) MeshTextureFace.billboard -> use_billboard: boolean Billboard with Z-axis constraint @@ -588,13 +563,11 @@ MeshTextureFace.shared -> use_blend_shared: boolean Blend vertex colors ac MeshTextureFace.tex -> use_texture: boolean Render face with texture MeshTextureFace.text -> use_bitmap_text: boolean Enable bitmap text on face MeshTextureFace.twoside -> use_twoside: boolean Render face two-sided -MeshTextureFace.uv_pinned -> uv_pin: boolean -MeshTextureFace.uv_selected -> uv_select: boolean +MeshTextureFace.uv_pinned -> pin_uv: boolean +MeshTextureFace.uv_selected -> select_uv: boolean MeshTextureFaceLayer.active -> active: boolean Sets the layer as active for display and editing MeshTextureFaceLayer.active_clone -> active_clone: boolean Sets the layer as active for cloning MeshTextureFaceLayer.active_render -> active_render: boolean Sets the layer as active for rendering -MeshVertex.hidden -> hide: boolean -MeshVertex.selected -> select: boolean MetaBall.auto_texspace -> use_auto_texspace: boolean Adjusts active object's texture space automatically when transforming object MetaElement.hide -> hide: boolean Hide element MetaElement.negative -> use_negative: boolean Set metaball as negative one @@ -624,7 +597,6 @@ Modifier.realtime -> show_realtime: boolean Realtime display of a modifier Modifier.render -> use_render: boolean Use modifier during rendering MotionPath.editing -> is_edited: boolean Path is being edited MotionPath.use_bone_head -> use_bone_head: boolean, (read-only) For PoseBone paths, use the bone head location when calculating this path -MotionPathVert.selected -> select: boolean Path point is selected for editing MovieSequence.convert_float -> use_float: boolean Convert input to float data MovieSequence.de_interlace -> use_deinterlace: boolean For video movies to remove fields MovieSequence.flip_x -> use_flip_x: boolean Flip on the X axis @@ -663,11 +635,7 @@ NlaStrip.animated_time_cyclic -> use_animated_time_cyclic: boolean Cycle t NlaStrip.auto_blending -> use_auto_blend: boolean Number of frames for Blending In/Out is automatically determined from overlapping strips NlaStrip.muted -> mute: boolean NLA Strip is not evaluated NlaStrip.reversed -> use_reverse: boolean NLA Strip is played back in reverse order (only when timing is automatically determined) -NlaStrip.selected -> select: boolean NLA Strip is selected NlaTrack.active -> active: boolean, (read-only) NLA Track is active -NlaTrack.locked -> lock: boolean NLA Track is locked -NlaTrack.muted -> mute: boolean NLA Track is not evaluated -NlaTrack.selected -> select: boolean NLA Track is selected NlaTrack.solo -> is_solo: boolean, (read-only) NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled) Object.draw_axis -> show_axis: boolean Displays the object's origin and axis Object.draw_bounds -> show_bounds: boolean Displays the object's bounds @@ -676,16 +644,13 @@ Object.draw_texture_space -> show_texture_space: boolean Displays the obje Object.draw_transparent -> show_transparent: boolean Enables transparent materials for the object (Mesh only) Object.draw_wire -> show_wire: boolean Adds the object's wireframe over solid drawing Object.duplis_used -> is_duplicator: boolean, (read-only) -Object.layers -> layer: boolean Layers the object is on +Object.layers -> layers: boolean Layers the object is on Object.lock_location -> lock_location: boolean Lock editing of location in the interface Object.lock_rotation -> lock_rotation: boolean Lock editing of rotation in the interface Object.lock_rotation_w -> lock_rotation_w: boolean Lock editing of 'angle' component of four-component rotations in the interface Object.lock_rotations_4d -> lock_rotations_4d: boolean Lock editing of four component rotations by components (instead of as Eulers) Object.lock_scale -> lock_scale: boolean Lock editing of scale in the interface -Object.restrict_render -> restrict_render: boolean Restrict renderability -Object.restrict_select -> restrict_select: boolean Restrict selection in the viewport -Object.restrict_view -> restrict_view: boolean Restrict visibility in the viewport -Object.selected -> select: boolean Object selection state + Object.shape_key_edit_mode -> use_shape_key_edit_mode: boolean Apply shape keys in edit mode (for Meshes only) Object.shape_key_lock -> show_shape_key: boolean Always show the current Shape for this Object Object.slow_parent -> use_slow_parent: boolean Create a delay in the parent relationship @@ -707,8 +672,7 @@ ObjectActuator.local_torque -> use_local_torque: boolean Torque is defined ObjectActuator.servo_limit_x -> use_servo_limit_x: boolean Set limit to force along the X axis ObjectActuator.servo_limit_y -> use_servo_limit_y: boolean Set limit to force along the Y axis ObjectActuator.servo_limit_z -> use_servo_limit_z: boolean Set limit to force along the Z axis -ObjectBase.layers -> layer: boolean Layers the object base is on -ObjectBase.selected -> select: boolean Object base selection state +ObjectBase.layers -> layers: boolean Layers the object base is on ObstacleFluidSettings.active -> use: boolean Object contributes to the fluid simulation ObstacleFluidSettings.export_animated_mesh -> use_animated_mesh: boolean Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it Operator.has_reports -> has_reports: boolean, (read-only) Operator has a set of reports (warnings and errors) from last execution @@ -803,7 +767,7 @@ PointCache.baked -> is_baked: boolean, (read-only) PointCache.baking -> is_baking: boolean, (read-only) PointCache.disk_cache -> use_disk_cache: boolean Save cache files to disk (.blend file must be saved first) PointCache.external -> use_external: boolean Read cache from an external location -PointCache.has_skipped_frames-> frames_skipped: boolean, (read-only) +PointCache.has_skipped_frames-> has_skipped_frames: boolean, (read-only) PointCache.outdated -> is_outdated: boolean, (read-only) PointCache.quick_cache -> use_quick_cache: boolean Update simulation with cache steps PointCache.use_library_path -> use_library_path: boolean Use this files path when library linked into another file. @@ -825,7 +789,7 @@ PoseBone.lock_rotation -> lock_rotation: boolean Lock editing of rotation PoseBone.lock_rotation_w -> lock_rotation_w: boolean Lock editing of 'angle' component of four-component rotations in the interface PoseBone.lock_rotations_4d -> lock_rotations_4d: boolean Lock editing of four component rotations by components (instead of as Eulers) PoseBone.lock_scale -> lock_scale: boolean Lock editing of scale in the interface -PoseBone.selected -> select: boolean + PoseTemplateSettings.generate_def_rig -> use_generate_deform_rig: boolean Create a copy of the metarig, constrainted by the generated rig Property.is_never_none -> is_never_none: boolean, (read-only) True when this value can't be set to None Property.is_readonly -> is_readonly: boolean, (read-only) Property is editable through RNA @@ -875,9 +839,9 @@ RenderLayer.pass_z -> use_pass_z: boolean, (read-only) Deliver Z values pa RenderLayer.sky -> use_sky: boolean, (read-only) Render Sky in this Layer RenderLayer.solid -> use_solid: boolean, (read-only) Render Solid faces in this Layer RenderLayer.strand -> use_strand: boolean, (read-only) Render Strands in this Layer -RenderLayer.visible_layers -> layer: boolean, (read-only) Scene layers included in this render layer +RenderLayer.visible_layers -> layers: boolean, (read-only) Scene layers included in this render layer RenderLayer.zmask -> use_zmask: boolean, (read-only) Only render what's in front of the solid z values -RenderLayer.zmask_layers -> layer_zmask: boolean, (read-only) Zmask scene layers +RenderLayer.zmask_layers -> layers_zmask: boolean, (read-only) Zmask scene layers RenderLayer.zmask_negate -> invert_zmask: boolean, (read-only) For Zmask, only render what is behind solid z values instead of in front RenderLayer.ztransp -> use_ztransp: boolean, (read-only) Render Z-Transparent faces in this Layer (On top of Solid and Halos) RenderSettings.backbuf -> use_backbuf: boolean Render backbuffer image @@ -939,7 +903,7 @@ RenderSettings.use_textures -> use_textures: boolean Use textures to affec NEGATE * RigidBodyJointConstraint.disable_linked_collision -> use_linked_collision: boolean Disable collision between linked bodies RigidBodyJointConstraint.draw_pivot -> show_pivot: boolean Display the pivot point and rotation in 3D view Scene.frame_drop -> use_frame_drop: boolean Play back dropping frames if frame display is too slow -Scene.layers -> layer: boolean Layers visible when rendering the scene +Scene.layers -> layers: boolean Layers visible when rendering the scene Scene.mute_audio -> mute_audio: boolean Play back of audio from Sequence Editor will be muted Scene.nla_tweakmode_on -> use_nla_tweakmode: boolean, (read-only) Indicates whether there is any action referenced by NLA being edited. Strictly read-only Scene.pov_radio_always_sample -> use_pov_radio_always_sample: boolean Only use the data from the pretrace step and not gather any new samples during the final radiosity pass @@ -1001,9 +965,9 @@ SceneRenderLayer.pass_z -> use_pass_z: boolean Deliver Z values pass SceneRenderLayer.sky -> use_sky: boolean Render Sky in this Layer SceneRenderLayer.solid -> use_solid: boolean Render Solid faces in this Layer SceneRenderLayer.strand -> use_strand: boolean Render Strands in this Layer -SceneRenderLayer.visible_layers -> layer: boolean Scene layers included in this render layer +SceneRenderLayer.visible_layers -> layers: boolean Scene layers included in this render layer SceneRenderLayer.zmask -> use_zmask: boolean Only render what's in front of the solid z values -SceneRenderLayer.zmask_layers -> layer_zmask: boolean Zmask scene layers +SceneRenderLayer.zmask_layers -> layers_zmask: boolean Zmask scene layers SceneRenderLayer.zmask_negate -> invert_zmask: boolean For Zmask, only render what is behind solid z values instead of in front SceneRenderLayer.ztransp -> use_ztransp: boolean Render Z-Transparent faces in this Layer (On top of Solid and Halos) SceneSequence.convert_float -> use_float: boolean Convert input to float data @@ -1037,11 +1001,8 @@ Sensor.pulse_false_level -> use_pulse_false_level: boolean Activate FALSE Sensor.pulse_true_level -> use_pulse_true_level: boolean Activate TRUE level triggering (pulse mode) Sensor.tap -> use_tap: boolean Trigger controllers only for an instant, even while the sensor remains true Sequence.frame_locked -> use_frame_lock: boolean Lock the animation curve to the global frame counter -Sequence.left_handle_selected -> select_left_handle: boolean Sequence.lock -> lock: boolean Lock strip so that it can't be transformed Sequence.mute -> mute: boolean -Sequence.right_handle_selected -> select_right_handle: boolean -Sequence.selected -> select: boolean Sequence.use_effect_default_fade -> use_default_fade: boolean Fade effect using the built-in default (usually make transition as long as effect strip) SequenceColorBalance.inverse_gain -> invert_gain: boolean SequenceColorBalance.inverse_gamma -> invert_gamma: boolean @@ -1181,7 +1142,7 @@ SpaceView3D.display_render_override -> show_only_render: boolean Display o SpaceView3D.display_x_axis -> show_axis_x: boolean Show the X axis line in perspective view SpaceView3D.display_y_axis -> show_axis_y: boolean Show the Y axis line in perspective view SpaceView3D.display_z_axis -> show_axis_z: boolean Show the Z axis line in perspective view -SpaceView3D.layers -> layer: boolean Layers visible in this 3D View +SpaceView3D.layers -> layers: boolean Layers visible in this 3D View SpaceView3D.lock_camera_and_layers -> lock_camera_and_layers: boolean Use the scene's active camera and layers in this view, rather than local layers SpaceView3D.manipulator -> use_manipulator: boolean Use a 3D manipulator widget for controlling transforms SpaceView3D.manipulator_rotate -> use_manipulator_rotate: boolean Use the manipulator for rotation transformations @@ -1192,7 +1153,7 @@ SpaceView3D.outline_selected -> show_outline_selected: boolean Show an out SpaceView3D.pivot_point_align -> use_pivot_point_align: boolean Manipulate object centers only SpaceView3D.relationship_lines -> show_relationship_lines: boolean Show dashed lines indicating parent or constraint relationships SpaceView3D.textured_solid -> show_textured_solid: boolean Display face-assigned textures in solid view -SpaceView3D.used_layers -> layer_used: boolean, (read-only) Layers that contain something +SpaceView3D.used_layers -> layers_used: boolean, (read-only) Layers that contain something SpeedControlSequence.curve_compress_y -> use_curve_compress_y: boolean Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0 SpeedControlSequence.curve_velocity -> use_curve_velocity: boolean Interpret the F-Curve value as a velocity instead of a frame number SpeedControlSequence.frame_blending -> use_frame_blend: boolean Blend two frames into the target for a smoother result @@ -1208,8 +1169,7 @@ SplineIKConstraint.chain_offset -> use_chain_offset: boolean Offset the en SplineIKConstraint.even_divisions -> use_even_divisions: boolean Ignore the relative lengths of the bones when fitting to the curve SplineIKConstraint.use_curve_radius -> use_curve_radius: boolean Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, on top of XZ Scale mode SplineIKConstraint.y_stretch -> use_y_stretch: boolean Stretch the Y axis of the bones to fit the curve -SplinePoint.hidden -> hide: boolean Visibility status -SplinePoint.selected -> select_control_point: boolean Selection status + SpotLamp.auto_clip_end -> use_auto_clip_end: boolean Automatic calculation of clipping-end, based on visible vertices SpotLamp.auto_clip_start -> use_auto_clip_start: boolean Automatic calculation of clipping-start, based on visible vertices SpotLamp.halo -> use_halo: boolean Renders spotlight with a volumetric halo (Buffer Shadows) @@ -1218,7 +1178,7 @@ SpotLamp.shadow_layer -> use_shadow_layer: boolean Causes only objects on SpotLamp.show_cone -> show_cone: boolean Draw transparent cone in 3D view to visualize which objects are contained in it SpotLamp.sphere -> use_sphere: boolean Sets light intensity to zero beyond lamp distance SpotLamp.square -> use_square: boolean Casts a square spot light shape -StateActuator.state -> state: boolean +StateActuator.state -> states: boolean SubsurfModifier.optimal_display -> show_only_control_edges: boolean Skip drawing/rendering of interior subdivided edges SubsurfModifier.subsurf_uv -> use_subsurf_uv: boolean Use subsurf to subdivide UVs SunLamp.only_shadow -> use_only_shadow: boolean Causes light to cast shadows only without illuminating objects @@ -1251,7 +1211,6 @@ TextureSlot.rgb_to_intensity -> use_rgb_to_intensity: boolean Converts tex TextureSlot.stencil -> use_stencil: boolean Use this texture as a blending value on the next texture ThemeBoneColorSet.colored_constraints -> show_colored_constraints: boolean Allow the use of colors indicating constraints/keyed status ThemeWidgetColors.shaded -> show_shaded: boolean -TimelineMarker.selected -> select: boolean Marker selection state ToolSettings.auto_normalize -> use_auto_normalize: boolean Ensure all bone-deforming vertex groups add up to 1.0 while weight painting ToolSettings.automerge_editing -> use_automerge_editing: boolean Automatically merge vertices moved to the same location ToolSettings.bone_sketching -> use_bone_sketching: boolean DOC BROKEN diff --git a/source/blender/makesrna/rna_cleanup/rna_cleaner.py b/source/blender/makesrna/rna_cleanup/rna_cleaner.py index f39ee586237..dbc27c8e5d5 100755 --- a/source/blender/makesrna/rna_cleanup/rna_cleaner.py +++ b/source/blender/makesrna/rna_cleanup/rna_cleaner.py @@ -268,10 +268,9 @@ def main(): sort_choices = ['note','changed','class','from','to','kw'] default_sort_choice = sort_choices[0] - #kw_prefixes = ['invert','is','lock','show','show_only','use','use_only'] - #kw = ['hide','select','layer','state'] - kw_prefixes = ['has','invert','is','lock','layers','show','show_only','states','use','use_only'] - kw = ['layers','states','value'] + kw_prefixes = [ 'active','apply','bl','exclude','has','invert','is','lock', \ + 'pressed','show','show_only','use','use_only','layers','states'] + kw = ['active','hide','invert','select','layers','mute','states','use','lock'] input_filename, sort_priority = check_commandline() props_list,props_length_max = get_props(input_filename) diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py index 9e667a4b7b2..7e4043c75ca 100644 --- a/source/blender/python/doc/sphinx_doc_gen.py +++ b/source/blender/python/doc/sphinx_doc_gen.py @@ -565,10 +565,9 @@ def rna2sphinx(BASEPATH): fw(" %s\n\n" % struct.description) # properties sorted in alphabetical order - zip_props_ids = zip(struct.properties, [prop.identifier for prop in struct.properties]) - zip_props_ids = sorted(zip_props_ids, key=lambda p: p[1]) - sorted_struct_properties = [x[0] for x in zip_props_ids] - + sorted_struct_properties = struct.properties[:] + sorted_struct_properties.sort(key=lambda prop: prop.identifier) + for prop in sorted_struct_properties: type_descr = prop.get_type_description(class_fmt=":class:`%s`") # readonly properties use "data" directive, variables properties use "attribute" directive diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index ae19db28011..bb0b3a43186 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -27,9 +27,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -/* This file is the Blender.BGL part of opy_draw.c, from the old - * bpython/intern dir, with minor changes to adapt it to the new Python - * implementation. The BGL submodule "wraps" OpenGL functions and constants, +/* This file is the 'bgl' module. + * The BGL submodule "wraps" OpenGL functions and constants, * allowing script writers to make OpenGL calls in their Python scripts. */ #include "bgl.h" /*This must come first */ diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 4763f555937..4b54f5c6416 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -43,33 +43,23 @@ #include "BPy_Freestyle.h" -static char bpy_home_paths_doc[] = -".. function:: home_paths(subfolder)\n" +static char bpy_script_paths_doc[] = +".. function:: script_paths()\n" "\n" -" Return 3 paths to blender home directories.\n" +" Return 2 paths to blender scripts directories.\n" "\n" -" :arg subfolder: The name of a subfolder to find within the blenders home directory.\n" -" :type subfolder: string\n" -" :return: (system, local, user) strings will be empty when not found.\n" +" :return: (system, user) strings will be empty when not found.\n" " :rtype: tuple of strigs\n"; -PyObject *bpy_home_paths(PyObject *self, PyObject *args) +PyObject *bpy_script_paths(PyObject *self) { - PyObject *ret= PyTuple_New(3); + PyObject *ret= PyTuple_New(2); char *path; - char *subfolder= ""; - if (!PyArg_ParseTuple(args, "|s:blender_homes", &subfolder)) - return NULL; - - path= BLI_gethome_folder(subfolder, BLI_GETHOME_SYSTEM); + path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL); PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:"")); - - path= BLI_gethome_folder(subfolder, BLI_GETHOME_LOCAL); + path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL); PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:"")); - - path= BLI_gethome_folder(subfolder, BLI_GETHOME_USER); - PyTuple_SET_ITEM(ret, 2, PyUnicode_FromString(path?path:"")); return ret; } @@ -122,7 +112,7 @@ static PyObject *bpy_blend_paths(PyObject * self, PyObject *args, PyObject *kw) return list; } -static PyMethodDef meth_bpy_home_paths[] = {{ "home_paths", (PyCFunction)bpy_home_paths, METH_VARARGS, bpy_home_paths_doc}}; +static PyMethodDef meth_bpy_script_paths[] = {{ "script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc}}; static PyMethodDef meth_bpy_blend_paths[] = {{ "blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}}; static void bpy_import_test(char *modname) @@ -194,7 +184,7 @@ void BPy_init_modules( void ) PyModule_AddObject(mod, "context", (PyObject *)bpy_context_module); /* utility func's that have nowhere else to go */ - PyModule_AddObject(mod, meth_bpy_home_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_home_paths, NULL)); + PyModule_AddObject(mod, meth_bpy_script_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_script_paths, NULL)); PyModule_AddObject(mod, meth_bpy_blend_paths->ml_name, (PyObject *)PyCFunction_New(meth_bpy_blend_paths, NULL)); /* add our own modules dir, this is a python package */ diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 8a05e6c4916..ff859ebe166 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -382,7 +382,7 @@ int WM_read_homefile(bContext *C, wmOperator *op) /* XXX */ G.save_over = 0; // start with save preference untitled.blend - G.fileflags &= ~G_FILE_AUTOPLAY; /* disable autoplay in .B.blend... */ + G.fileflags &= ~G_FILE_AUTOPLAY; /* disable autoplay in startup.blend... */ // mainwindow_set_filename_to_title(""); // empty string re-initializes title to "Blender" // refresh_interface_font(); @@ -418,7 +418,7 @@ void read_history(void) G.recent_files.first = G.recent_files.last = NULL; - /* read list of recent opend files from .Blog to memory */ + /* read list of recent opend files from recent-files.txt to memory */ for (l= lines, num= 0; l && (numnext) { line = l->link; if (line[0] && BLI_exists(line)) { @@ -452,7 +452,7 @@ static void write_history(void) BLI_make_file_string("/", name, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_HISTORY_FILE); recent = G.recent_files.first; - /* refresh .Blog of recent opened files, when current file was changed */ + /* refresh recent-files.txt of recent opened files, when current file was changed */ if(!(recent) || (strcmp(recent->filepath, G.sce)!=0)) { fp= fopen(name, "w"); if (fp) { @@ -462,11 +462,11 @@ static void write_history(void) recent->filepath[0] = '\0'; strcpy(recent->filepath, G.sce); BLI_addhead(&(G.recent_files), recent); - /* write current file to .Blog */ + /* write current file to recent-files.txt */ fprintf(fp, "%s\n", recent->filepath); recent = recent->next; i=1; - /* write rest of recent opened files to .Blog */ + /* write rest of recent opened files to recent-files.txt */ while((ifilepath, G.sce)!=0) { @@ -616,11 +616,12 @@ int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports) ED_object_exit_editmode(C, EM_DO_UNDO); ED_sculpt_force_update(C); - do_history(di, reports); - /* blend file thumbnail */ ibuf_thumb= blend_file_thumb(di, CTX_data_scene(C), &thumb); + /* rename to .blend1, do this as last before write */ + do_history(di, reports); + if (BLO_write_file(CTX_data_main(C), di, fileflags, reports, thumb)) { strcpy(G.sce, di); G.relbase_valid = 1; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 78e1c7d87a3..09c11bcfda5 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2611,7 +2611,7 @@ static void wm_radial_control_paint(bContext *C, int x, int y, void *customdata) ViewContext vc; - int hit = 0; + // int hit = 0; int flip; int sign; @@ -2779,7 +2779,7 @@ int WM_radial_control_modal(bContext *C, wmOperator *op, wmEvent *event) int WM_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) { wmRadialControl *rc = MEM_callocN(sizeof(wmRadialControl), "radial control"); - wmWindow *win = CTX_wm_window(C); + // wmWindow *win = CTX_wm_window(C); int mode = RNA_int_get(op->ptr, "mode"); float initial_value = RNA_float_get(op->ptr, "initial_value"); //float initial_size = RNA_float_get(op->ptr, "initial_size"); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 6d01620dae8..e4bb5b797d3 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -258,7 +258,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) } else { - /* this is set to 1 if you don't have .B.blend open */ + /* this is set to 1 if you don't have startup.blend open */ if(G.save_over) { char *str= MEM_mallocN(strlen(G.sce) + 16, "title"); diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index fe524b6cfcc..798f98cf78c 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -193,9 +193,35 @@ IF(WITH_INSTALL) ENDIF(WITH_GAMEENGINE AND WITH_PLAYER) INSTALL( - DIRECTORY ${TARGETDIR}/.blender/ - DESTINATION ${BLENDERPATH} - ) + FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications + ) + INSTALL( + FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/blender.svg + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps + ) + INSTALL( + FILES ${CMAKE_SOURCE_DIR}/doc/blender.1 + DESTINATION ${CMAKE_INSTALL_PREFIX}/man + ) + INSTALL( + DIRECTORY ${CMAKE_SOURCE_DIR}/release/text/ + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender + PATTERN ".svn" EXCLUDE + ) + INSTALL( + DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/ + DESTINATION ${BLENDERPATH}/scripts + PATTERN ".svn" EXCLUDE + ) + IF(WITH_INTERNATIONAL) + INSTALL( + DIRECTORY ${CMAKE_SOURCE_DIR}/bin/.blender/locale/ + DESTINATION ${BLENDERPATH}/datafiles/locale + PATTERN ".svn" EXCLUDE + ) + ENDIF(WITH_INTERNATIONAL) + # end "make install" ENDIF(UNIX AND NOT APPLE) diff --git a/source/creator/creator.c b/source/creator/creator.c index 4a502355579..fbe9d100b14 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -133,14 +133,6 @@ extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */ char btempdir[FILE_MAXDIR+FILE_MAXFILE]; -/* unix path support. - * defined by the compiler. eg "/usr/share/blender/2.5" "/opt/blender/2.5" */ -#ifndef BLENDERPATH -#define BLENDERPATH "" -#endif - -char blender_path[FILE_MAXDIR+FILE_MAXFILE] = BLENDERPATH; - /* Initialise callbacks for the modules that need them */ static void setCallbacks(void); @@ -291,20 +283,22 @@ static int print_help(int argc, char **argv, void *data) printf ("\t\t\"blender --background test.blend --render-output /tmp --render-frame 1\" works as expected.\n\n"); printf ("\nEnvironment Variables:\n"); - printf (" $HOME\t\t\tStore files such as .blender/ .B.blend .Bfs .Blog here.\n"); - printf (" $BLENDERPATH System directory to use for data files and scripts.\n"); - printf (" For this build of blender the default $BLENDERPATH is...\n"); - printf (" \"%s\"\n", blender_path); - printf (" setting the $BLENDERPATH will override this\n"); + printf (" $BLENDER_USER_CONFIG Directory for user configuration files.\n"); + printf (" $BLENDER_SYSTEM_CONFIG Directory for system wide configuration files.\n"); + printf (" $BLENDER_USER_SCRIPTS Directory for user scripts.\n"); + printf (" $BLENDER_SYSTEM_SCRIPTS Directory for system wide scripts.\n"); + printf (" $BLENDER_USER_DATAFILES Directory for user data files (icons, translations, ..).\n"); + printf (" $BLENDER_SYSTEM_DATAFILES Directory for system wide data files.\n"); + printf (" $BLENDER_SYSTEM_PYTHON Directory for system python libraries.\n"); #ifdef WIN32 - printf (" $TEMP Store temporary files here.\n"); + printf (" $TEMP Store temporary files here.\n"); #else - printf (" $TMP or $TMPDIR Store temporary files here.\n"); + printf (" $TMP or $TMPDIR Store temporary files here.\n"); #endif #ifndef DISABLE_SDL - printf (" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, alsa, dma.\n"); + printf (" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, dma.\n"); #endif - printf (" $PYTHONHOME Path to the python directory, eg. /usr/lib/python.\n\n"); + printf (" $PYTHONHOME Path to the python directory, eg. /usr/lib/python.\n\n"); exit(0); @@ -1040,12 +1034,6 @@ int main(int argc, char **argv) BLI_where_am_i(bprogname, argv[0]); - { /* override the hard coded blender path */ - char *blender_path_env = getenv("BLENDERPATH"); - if(blender_path_env) - BLI_strncpy(blender_path, blender_path_env, sizeof(blender_path)); - } - #ifdef BUILD_DATE strip_quotes(build_date); strip_quotes(build_time); @@ -1103,7 +1091,7 @@ int main(int argc, char **argv) WM_init(C, argc, argv); /* this is properly initialized with user defs, but this is default */ - BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */ + BLI_where_is_temp( btempdir, 1 ); /* call after loading the startup.blend so we can read U.tempdir */ #ifndef DISABLE_SDL BLI_setenv("SDL_VIDEODRIVER", "dummy"); @@ -1121,7 +1109,7 @@ int main(int argc, char **argv) WM_init(C, argc, argv); - BLI_where_is_temp( btempdir, 0 ); /* call after loading the .B.blend so we can read U.tempdir */ + BLI_where_is_temp( btempdir, 0 ); /* call after loading the startup.blend so we can read U.tempdir */ } #ifndef DISABLE_PYTHON /** diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index bba3b2219ed..36b90411e1f 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -499,6 +499,7 @@ PyAttributeDef KX_Camera::Attributes[] = { KX_PYATTRIBUTE_RW_FUNCTION("perspective", KX_Camera, pyattr_get_perspective, pyattr_set_perspective), KX_PYATTRIBUTE_RW_FUNCTION("lens", KX_Camera, pyattr_get_lens, pyattr_set_lens), + KX_PYATTRIBUTE_RW_FUNCTION("ortho_scale", KX_Camera, pyattr_get_ortho_scale, pyattr_set_ortho_scale), KX_PYATTRIBUTE_RW_FUNCTION("near", KX_Camera, pyattr_get_near, pyattr_set_near), KX_PYATTRIBUTE_RW_FUNCTION("far", KX_Camera, pyattr_get_far, pyattr_set_far), @@ -728,6 +729,26 @@ int KX_Camera::pyattr_set_lens(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, return PY_SET_ATTR_SUCCESS; } +PyObject* KX_Camera::pyattr_get_ortho_scale(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_Camera* self= static_cast(self_v); + return PyFloat_FromDouble(self->m_camdata.m_scale); +} + +int KX_Camera::pyattr_set_ortho_scale(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) +{ + KX_Camera* self= static_cast(self_v); + float param = PyFloat_AsDouble(value); + if (param == -1) { + PyErr_SetString(PyExc_AttributeError, "camera.ortho_scale = float: KX_Camera, expected a float greater then zero"); + return PY_SET_ATTR_FAIL; + } + + self->m_camdata.m_scale= param; + self->m_set_projection_matrix = false; + return PY_SET_ATTR_SUCCESS; +} + PyObject* KX_Camera::pyattr_get_near(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_Camera* self= static_cast(self_v); diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index e209f0461b9..406ee1d0764 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -289,6 +289,8 @@ public: static PyObject* pyattr_get_lens(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_lens(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); + static PyObject* pyattr_get_ortho_scale(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_ortho_scale(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); static PyObject* pyattr_get_near(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_near(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); static PyObject* pyattr_get_far(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); diff --git a/source/gameengine/PyDoc/bge.types.rst b/source/gameengine/PyDoc/bge.types.rst index 935d3e7e00e..e0ace6ad85b 100644 --- a/source/gameengine/PyDoc/bge.types.rst +++ b/source/gameengine/PyDoc/bge.types.rst @@ -4185,6 +4185,12 @@ Game Engine bge.types Module :type: float + .. attribute:: ortho_scale + + The camera's view scale when in orthographic mode. + + :type: float + .. attribute:: near The camera's near clip distance.