[Bf-blender-cvs] [4052d68a00e] soc-2019-npr: LANPR: Discard source object stroke update functions.

YimingWu noreply at git.blender.org
Fri Jul 5 03:57:36 CEST 2019


Commit: 4052d68a00eb9a5ebdb9f4b9d2be5e3f6ec94e39
Author: YimingWu
Date:   Fri Jul 5 09:57:13 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB4052d68a00eb9a5ebdb9f4b9d2be5e3f6ec94e39

LANPR: Discard source object stroke update functions.

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

M	release/scripts/startup/bl_ui/properties_object.py
M	source/blender/draw/engines/lanpr/lanpr_ops.c
M	source/blender/editors/render/render_ops.c

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

diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index a5663460de5..de2717bbbbc 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -413,12 +413,14 @@ class OBJECT_PT_lanpr(ObjectButtonsPanel, Panel):
     def draw(self, context):
         layout=self.layout
         lanpr = context.object.lanpr
-        layout.label(text='Usage:')
-        row = layout.row()
-        row.prop(lanpr,'usage',expand=True)
         if context.object.type == 'MESH':
-            layout.operator("object.lanpr_update_gp_source")
-        elif context.object.type == 'GPENCIL':
+            layout.label(text='Usage:')
+            row = layout.row()
+            row.prop(lanpr,'usage',expand=True)
+        #if context.object.type == 'MESH':
+        #    layout.operator("object.lanpr_update_gp_source")
+        if context.object.type == 'GPENCIL':
+            layout.prop(context.scene.lanpr,"gpencil_overwrite", text="Overwrite Frame", toggle=True)
             layout.operator("object.lanpr_update_gp_target")
         
 
diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index 17d12fef90d..d13109c5a95 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -4710,8 +4710,8 @@ void lanpr_update_gp_strokes_recursive(Depsgraph *dg, struct Collection *col, in
   CollectionObject *co;
   CollectionChild *cc;
 
-  for (co = source_only ? source_only : col->gobject.first; co; co = co->next) {
-    ob = co->ob;
+  for (co = col->gobject.first; co||source_only; co = co->next) {
+    ob = source_only ? source_only : co->ob;
     for (md = ob->modifiers.first; md; md = md->next) {
       if (md->type == eModifierType_FeatureLine) {
         FeatureLineModifierData *flmd = (FeatureLineModifierData *)md;
@@ -5055,6 +5055,7 @@ void OBJECT_OT_lanpr_update_gp_target(struct wmOperatorType *ot)
   ot->exec = lanpr_update_gp_target_exec;
 }
 
+/* Not working due to lack of GP flags for the object */
 void OBJECT_OT_lanpr_update_gp_source(struct wmOperatorType *ot)
 {
   ot->name = "Update Strokes";
diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c
index 8bd1bead1cf..622d9795bb0 100644
--- a/source/blender/editors/render/render_ops.c
+++ b/source/blender/editors/render/render_ops.c
@@ -44,7 +44,8 @@ void ED_operatortypes_render(void)
   WM_operatortype_append(OBJECT_OT_material_slot_move);
 
   WM_operatortype_append(OBJECT_OT_lanpr_update_gp_target);
-  WM_operatortype_append(OBJECT_OT_lanpr_update_gp_source);
+  /* Not working */
+  /* WM_operatortype_append(OBJECT_OT_lanpr_update_gp_source); */
 
   WM_operatortype_append(MATERIAL_OT_new);
   WM_operatortype_append(TEXTURE_OT_new);



More information about the Bf-blender-cvs mailing list