"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer1/Setting.cpp" between
pymol-open-source-2.2.0.tar.gz and pymol-open-source-2.3.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

Setting.cpp  (pymol-open-source-2.2.0):Setting.cpp  (pymol-open-source-2.3.0)
skipping to change at line 749 skipping to change at line 749
ov_size b; ov_size b;
for(b = 0; b < n_set; b++) { for(b = 0; b < n_set; b++) {
PyObject *entry_list = PyList_GetItem(setting_list, b); PyObject *entry_list = PyList_GetItem(setting_list, b);
if(ok) if(ok)
ok = PyList_Check(entry_list); ok = PyList_Check(entry_list);
if(ok) if(ok)
ok = (PyList_Size(entry_list) > 2); ok = (PyList_Size(entry_list) > 2);
if(ok) { if(ok) {
int setting_id; int setting_id;
int setting_type; int setting_type;
float val_3f[3];
union { union {
int int_; int int_;
float float_; float float_;
float * float3_;
} value_store; } value_store;
if(ok) if(ok)
ok = PConvPyIntToInt(PyList_GetItem(entry_list, 0), &setting_i d); ok = PConvPyIntToInt(PyList_GetItem(entry_list, 0), &setting_i d);
if(ok) if(ok)
ok = PConvPyIntToInt(PyList_GetItem(entry_list, 1), &setting_t ype); ok = PConvPyIntToInt(PyList_GetItem(entry_list, 1), &setting_t ype);
if(ok) if(ok)
switch (setting_type) { switch (setting_type) {
case cSetting_int: case cSetting_int:
case cSetting_color: case cSetting_color:
case cSetting_boolean: case cSetting_boolean:
ok = PConvPyIntToInt(PyList_GetItem(entry_list, 2), ok = PConvPyIntToInt(PyList_GetItem(entry_list, 2),
&value_store.int_); &value_store.int_);
break; break;
case cSetting_float: case cSetting_float:
ok = PConvPyFloatToFloat(PyList_GetItem(entry_list, 2), ok = PConvPyFloatToFloat(PyList_GetItem(entry_list, 2),
&value_store.float_); &value_store.float_);
break; break;
case cSetting_float3:
{
CPythonVal *el = CPythonVal_PyList_GetItem(G, entry_list, 2
);
value_store.float3_ = val_3f;
ok = PConvPyListToFloatArrayInPlace(el, value_store.float3_
, 3);
CPythonVal_Free(el);
}
break;
} }
if(ok) { if(ok) {
SettingUniqueSetTypedValue(G, unique_id, setting_id, SettingUniqueSetTypedValue(G, unique_id, setting_id,
setting_type, &value_store); setting_type, &value_store);
} }
} }
} }
} }
} }
} }
skipping to change at line 1920 skipping to change at line 1930
case cSetting_defer_builds_mode: case cSetting_defer_builds_mode:
ExecutiveRebuildAll(G); ExecutiveRebuildAll(G);
break; break;
case cSetting_seq_view: case cSetting_seq_view:
case cSetting_seq_view_label_spacing: case cSetting_seq_view_label_spacing:
case cSetting_seq_view_label_mode: case cSetting_seq_view_label_mode:
case cSetting_seq_view_label_start: case cSetting_seq_view_label_start:
case cSetting_seq_view_format: case cSetting_seq_view_format:
case cSetting_seq_view_color: case cSetting_seq_view_color:
case cSetting_seq_view_unaligned_mode: case cSetting_seq_view_unaligned_mode:
case cSetting_seq_view_gap_mode:
SeqChanged(G); SeqChanged(G);
break; break;
case cSetting_seq_view_fill_color: case cSetting_seq_view_fill_color:
case cSetting_seq_view_fill_char: case cSetting_seq_view_fill_char:
case cSetting_seq_view_label_color: case cSetting_seq_view_label_color:
OrthoDirty(G); OrthoDirty(G);
break; break;
case cSetting_show_frame_rate: case cSetting_show_frame_rate:
OrthoDirty(G); OrthoDirty(G);
break; break;
skipping to change at line 2725 skipping to change at line 2736
case cSetting_bg_image_tilesize: case cSetting_bg_image_tilesize:
OrthoBackgroundTextureNeedsUpdate(G); OrthoBackgroundTextureNeedsUpdate(G);
SceneChanged(G); SceneChanged(G);
break; break;
case cSetting_bg_rgb_top: case cSetting_bg_rgb_top:
case cSetting_bg_rgb_bottom: case cSetting_bg_rgb_bottom:
{ {
/* clamp this value */ /* clamp this value */
const char * bg_image_filename = SettingGet_s(G, NULL, NULL, cSetting_bg_i mage_filename); const char * bg_image_filename = SettingGet_s(G, NULL, NULL, cSetting_bg_i mage_filename);
if(!(bg_image_filename && bg_image_filename[0]) && if(!(bg_image_filename && bg_image_filename[0]) &&
SettingGetGlobal_b(G, cSetting_bg_gradient) && !OrthoBackgroundDataIsS et(G)) { SettingGetGlobal_b(G, cSetting_bg_gradient) && !OrthoBackgroundDataIsS et(*G->Ortho)) {
ColorUpdateFrontFromSettings(G); ColorUpdateFrontFromSettings(G);
ExecutiveInvalidateRep(G, inv_sele, cRepAll, cRepInvColor); ExecutiveInvalidateRep(G, inv_sele, cRepAll, cRepInvColor);
OrthoBackgroundTextureNeedsUpdate(G); OrthoBackgroundTextureNeedsUpdate(G);
} }
} }
SceneChanged(G); SceneChanged(G);
break; break;
case cSetting_bg_rgb: case cSetting_bg_rgb:
{ {
/* clamp this value */ /* clamp this value */
const float *v = ColorGet(G, SettingGet_color(G, NULL, NULL, cSetting_bg_r gb)); const float *v = ColorGet(G, SettingGet_color(G, NULL, NULL, cSetting_bg_r gb));
{ {
const char * bg_image_filename = SettingGet_s(G, NULL, NULL, cSetting_bg _image_filename); const char * bg_image_filename = SettingGet_s(G, NULL, NULL, cSetting_bg _image_filename);
if(!(bg_image_filename && bg_image_filename[0]) && !OrthoBackgroundDataI sSet(G)) { if(!(bg_image_filename && bg_image_filename[0]) && !OrthoBackgroundDataI sSet(*G->Ortho)) {
ColorUpdateFront(G, v); ColorUpdateFront(G, v);
ExecutiveInvalidateRep(G, inv_sele, cRepAll, cRepInvColor); ExecutiveInvalidateRep(G, inv_sele, cRepAll, cRepInvColor);
} }
} }
} }
SceneChanged(G); SceneChanged(G);
break; break;
case cSetting_selection_width: case cSetting_selection_width:
case cSetting_selection_width_scale: case cSetting_selection_width_scale:
case cSetting_selection_width_max: case cSetting_selection_width_max:
skipping to change at line 3027 skipping to change at line 3038
557.00000 kT*A Q 557.00000 kT*A Q
ePot = -------------- * --- which will give kT/e units when applied ePot = -------------- * --- which will give kT/e units when applied
e^2 Dr e^2 Dr
*/ */
#ifdef WIN32 #ifdef WIN32
/* BEGIN PROPRIETARY CODE SEGMENT (see disclaimer in "os_proprietary.h") */ /* BEGIN PROPRIETARY CODE SEGMENT (see disclaimer in "os_proprietary.h") */
set_b(I, cSetting_cache_display, 0); set_b(I, cSetting_cache_display, 0);
// PYMOL-3143/PYMOL-3181 Intel HD Graphics
// 4.5.0 - Build *.20.100.*
// Driver update breaks lighting
set_b(I, cSetting_precomputed_lighting, 1);
#ifndef _PYMOL_ACTIVEX #ifndef _PYMOL_ACTIVEX
{ {
SYSTEM_INFO SysInfo; SYSTEM_INFO SysInfo;
GetSystemInfo(&SysInfo); GetSystemInfo(&SysInfo);
{ {
DWORD count = SysInfo.dwNumberOfProcessors; DWORD count = SysInfo.dwNumberOfProcessors;
if(count > 1) { if(count > 1) {
set_i(I, cSetting_max_threads, count); set_i(I, cSetting_max_threads, count);
} }
} }
 End of changes. 7 change blocks. 
2 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)