Page Menu
Home
Search
Configure Global Search
Log In
Files
F21628
normal.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Alexander Trum (atrum)
Nov 13 2013, 4:38 PM
Size
2 KB
Subscribers
None
normal.patch
View Options
diff -ur ./blender_orig/release/scripts/startup/bl_ui/space_userpref.py ./blender_patched/release/scripts/startup/bl_ui/space_userpref.py
--- ./blender_orig/release/scripts/startup/bl_ui/space_userpref.py 2012-07-20 19:15:21.920851312 +0200
+++ ./blender_patched/release/scripts/startup/bl_ui/space_userpref.py 2012-07-20 19:38:07.299603518 +0200
@@ -839,6 +839,7 @@
col.label(text="Scripts:")
col.prop(system, "use_scripts_auto_execute")
col.prop(system, "use_tabs_as_spaces")
+ col.prop(system, "user_preserve_normals")
from bl_ui.space_userpref_keymap import InputKeyMapPanel
diff -ur ./blender_orig/source/blender/editors/mesh/mesh_data.c ./blender_patched/source/blender/editors/mesh/mesh_data.c
--- ./blender_orig/source/blender/editors/mesh/mesh_data.c 2012-07-20 19:15:22.180851725 +0200
+++ ./blender_patched/source/blender/editors/mesh/mesh_data.c 2012-07-20 19:38:07.299603518 +0200
@@ -799,6 +799,7 @@
BKE_mesh_tessface_clear(mesh);
}
+ if(!(U.flag & USER_PRESERVE_NORMALS)) {
/* note on this if/else - looks like these layers are not needed
* so rather then add poly-index layer and calculate normals for it
* calculate normals only for the mvert's. - campbell */
@@ -821,6 +822,9 @@
(void)polyindex;
(void)face_nors;
#endif
+ } else {
+ printf("no normal update\n");
+ }
DAG_id_tag_update(&mesh->id, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, mesh);
diff -ur ./blender_orig/source/blender/makesdna/DNA_userdef_types.h ./blender_patched/source/blender/makesdna/DNA_userdef_types.h
--- ./blender_orig/source/blender/makesdna/DNA_userdef_types.h 2012-07-20 19:15:22.150851904 +0200
+++ ./blender_patched/source/blender/makesdna/DNA_userdef_types.h 2012-07-20 19:40:39.399133755 +0200
@@ -468,6 +468,7 @@
#define USER_NONEGFRAMES (1 << 24)
#define USER_TXT_TABSTOSPACES_DISABLE (1 << 25)
#define USER_TOOLTIPS_PYTHON (1 << 26)
+#define USER_PRESERVE_NORMALS (1 << 27)
/* helper macro for checking frame clamping */
#define FRAMENUMBER_MIN_CLAMP(cfra) \
diff -ur ./blender_orig/source/blender/makesrna/intern/rna_userdef.c ./blender_patched/source/blender/makesrna/intern/rna_userdef.c
--- ./blender_orig/source/blender/makesrna/intern/rna_userdef.c 2012-07-20 19:15:22.280852861 +0200
+++ ./blender_patched/source/blender/makesrna/intern/rna_userdef.c 2012-07-20 19:38:07.299603518 +0200
@@ -3000,6 +3000,10 @@
RNA_def_property_ui_text(prop, "Tabs as Spaces",
"Automatically convert all new tabs into spaces for new and loaded text files");
+ prop= RNA_def_property(srna, "user_preserve_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_PRESERVE_NORMALS);
+ RNA_def_property_ui_text(prop, "Preserve Imported Normals", "Do not recalculate normals when rendering or editing");
+
prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
RNA_def_property_range(prop, 0, 500);
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
49/b3/490774a2496ca4edcb9fe8d31386
Event Timeline
Log In to Comment