[Bf-blender-cvs] [4e33a12185e] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object

Campbell Barton noreply at git.blender.org
Tue Oct 17 07:06:27 CEST 2017


Commit: 4e33a12185eca990d01734fd73ed20f5a0db4900
Author: Campbell Barton
Date:   Tue Oct 17 16:07:48 2017 +1100
Branches: greasepencil-object
https://developer.blender.org/rB4e33a12185eca990d01734fd73ed20f5a0db4900

Merge branch 'blender2.8' into greasepencil-object

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



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

diff --cc release/scripts/startup/bl_ui/properties_material.py
index 4e991239d7d,42a132004d4..b977bfef7f3
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@@ -113,11 -113,9 +113,11 @@@ class MATERIAL_PT_context_material(Mate
      def poll(cls, context):
          # An exception, don't call the parent poll func because
          # this manages materials for all engine types
 -
 -        engine = context.engine
 -        return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
 +        if context.active_object and context.active_object.type == 'GPENCIL':
 +            return False
 +        else:
-             engine = context.scene.render.engine
++            engine = context.engine
 +            return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
  
      def draw(self, context):
          layout = self.layout
@@@ -1063,11 -1061,8 +1063,11 @@@ class EEVEE_MATERIAL_PT_context_materia
  
      @classmethod
      def poll(cls, context):
 -        engine = context.engine
 -        return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
 +        if context.active_object and context.active_object.type == 'GPENCIL':
 +            return False
 +        else:
-             engine = context.scene.render.engine
++            engine = context.engine
 +            return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
  
      def draw(self, context):
          layout = self.layout
diff --cc release/scripts/startup/bl_ui/properties_scene.py
index 3529ba0e8cc,3356222fb1f..81dabf8a7e3
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@@ -78,9 -75,8 +78,9 @@@ class SCENE_PT_scene(SceneButtonsPanel
  
          layout.prop(scene, "camera")
          layout.prop(scene, "background_set", text="Background")
-         if context.scene.render.engine != 'BLENDER_GAME':
+         if context.engine != 'BLENDER_GAME':
              layout.prop(scene, "active_clip", text="Active Clip")
 +        layout.prop(scene, "gpencil_object")
  
  
  class SCENE_PT_unit(SceneButtonsPanel, Panel):
diff --cc source/blender/editors/gpencil/gpencil_select.c
index 690b538a224,3d9689ab54f..3b2446d3fa9
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@@ -950,16 -837,9 +946,15 @@@ void GPENCIL_OT_select_circle(wmOperato
  
  static int gpencil_border_select_exec(bContext *C, wmOperator *op)
  {
 +	bGPdata *gpd = ED_gpencil_data_get_active(C);
 +	/* if not edit/sculpt mode, the event is catched but not processed */
 +	if (GPENCIL_NONE_EDIT_MODE(gpd)) {
 +		return OPERATOR_CANCELLED;
 +	}
 +
  	ScrArea *sa = CTX_wm_area(C);
  	
- 	const int gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
- 	const bool select = (gesture_mode == GESTURE_MODAL_SELECT);
+ 	const bool select = !RNA_boolean_get(op->ptr, "deselect");
  	const bool extend = RNA_boolean_get(op->ptr, "extend");
  	
  	GP_SpaceConversion gsc = {NULL};
diff --cc source/blender/editors/space_buttons/buttons_context.c
index c5416b83837,8aa4e674d11..9324b4f0465
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@@ -562,39 -587,10 +587,11 @@@ static bool buttons_context_linestyle_p
  static int buttons_context_path(const bContext *C, ButsContextPath *path, int mainb, int flag)
  {
  	SpaceButs *sbuts = CTX_wm_space_buts(C);
+ 	Scene *scene = CTX_data_scene(C);
+ 	WorkSpace *workspace = CTX_wm_workspace(C);
  	ID *id;
  	int found;
 +	Object *ob = CTX_data_active_object(C);
  
  	memset(path, 0, sizeof(*path));
  	path->flag = flag;



More information about the Bf-blender-cvs mailing list