[Bf-blender-cvs] [d0ea6e306cd] soc-2019-npr: LANPR: filter GP targets only.

YimingWu noreply at git.blender.org
Tue Jun 25 07:26:07 CEST 2019


Commit: d0ea6e306cd601c994d25d0942f372e5e17200f3
Author: YimingWu
Date:   Tue Jun 25 13:24:35 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBd0ea6e306cd601c994d25d0942f372e5e17200f3

LANPR: filter GP targets only.

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

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/makesrna/intern/rna_modifier.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index e2416de1410..ac661430d74 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1682,13 +1682,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             row.prop(md,'enable_material',toggle=True)
             row.prop(md,'enable_intersection',toggle=True)
             row.prop(md,'enable_modifier_mark',toggle=True)
-            layout.label(text='Result GP:')
-            layout.prop(md,'target')
-            layout.prop(md,'replace', text='Replace existing frames')
-
-            row = layout.row()
-            row.prop(md,'layer')
-            row.prop(md,'material')
 
             row = layout.row(align=True)
             row.prop(md,'use_multiple_levels', icon='GP_MULTIFRAME_EDITING', icon_only=True)
@@ -1696,6 +1689,16 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
             if md.use_multiple_levels:
                 row.prop(md,'level_end')
 
+            layout.label(text='Result GP:')
+            layout.prop(md,'target')
+            if not md.target:
+                layout.label(text="You have to specify a target GP Object")
+            else:
+                layout.prop(md,'replace', text='Replace existing frames')
+                row = layout.row()
+                row.prop(md,'layer')
+                row.prop(md,'material')
+
 class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
 
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index acc916eeee6..03c9dea9db9 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -6051,6 +6051,7 @@ static void rna_def_modifier_featureline(BlenderRNA *brna)
   prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
   RNA_def_property_pointer_sdna(prop, NULL, "target");
   RNA_def_property_ui_text(prop, "Target", "GPencil object to put the stroke result");
+  RNA_def_property_pointer_funcs(prop,NULL,NULL,NULL,"rna_GPencil_object_poll");
   RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
   RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");



More information about the Bf-blender-cvs mailing list