[Bf-blender-cvs] [bdf3927] gooseberry: Disallow duplis when drawing motion paths, also make it so draw option is on by default

Antony Riakiotakis noreply at git.blender.org
Fri Feb 20 16:06:18 CET 2015


Commit: bdf39274cdf6fe4316f41008e4571d0a99a203ef
Author: Antony Riakiotakis
Date:   Fri Feb 20 16:05:45 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBbdf39274cdf6fe4316f41008e4571d0a99a203ef

Disallow duplis when drawing motion paths, also make it so draw option
is on by default

===================================================================

M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 3154ec6..1b3676d 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7759,7 +7759,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
 	bool zbufoff = false, is_paint = false, empty_object = false;
 	const bool is_obact = (ob == OBACT);
 	const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0;
-	const bool show_motionpaths = (v3d->flag3 & V3D_SHOW_MOTIONPATHS) != 0;
+	const bool show_motionpaths = !(v3d->flag3 & V3D_HIDE_MOTIONPATHS) != 0;
 	const bool is_picking = (G.f & G_PICKSEL) != 0;
 	const bool has_particles = (ob->particlesystem.first != NULL);
 	const bool is_wire_color = V3D_IS_WIRECOLOR_OBJECT(scene, v3d, ob);
@@ -7828,7 +7828,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
 	view3d_cached_text_draw_begin();
 	
 	/* draw motion paths (in view space) */
-	if (ob->mpath && show_motionpaths) {
+	if (ob->mpath && show_motionpaths && !(base->flag & OB_FROMDUPLI)) {
 		ED_view3d_after_add(&v3d->afterdraw_nodepth, base, 0);
 	}
 
@@ -8043,7 +8043,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
 				/* draw motion paths if forced */
 				if (show_motionpaths && !(dflag & DRAW_SCENESET)) {
 					bArmature *arm = ob->data;
-					if (!arm->edbo)
+					if (!arm->edbo && !(base->flag & OB_FROMDUPLI))
 						ED_view3d_after_add(&v3d->afterdraw_nodepth, base, 0);
 				}
 				break;
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index bb006c7..d4d1bcd 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -300,7 +300,7 @@ typedef struct View3D {
 
 /* View3d->flag3 (short) */
 #define V3D_SHOW_WORLD			(1 << 0)
-#define V3D_SHOW_MOTIONPATHS	(1 << 1)
+#define V3D_HIDE_MOTIONPATHS	(1 << 1)
 
 /* View3D->around */
 #define V3D_CENTER		 0
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 4805e8a..2c8bfd3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2331,7 +2331,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
 	prop = RNA_def_property(srna, "show_motionpaths", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_SHOW_MOTIONPATHS);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "flag3", V3D_HIDE_MOTIONPATHS);
 	RNA_def_property_ui_text(prop, "Motion Paths", "Display animation motion paths -even in only render mode");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);




More information about the Bf-blender-cvs mailing list