AttributeError: 'GreasePencil' object has no attribute 'draw_mode' #47166

Closed
opened 2016-01-12 10:56:03 +01:00 by Mickaël Guédon · 8 comments

System Information
Ubuntu 15.10 x86_64 / i7 5820k / 16GB RAM / GTX 980 Ti

Blender Version
Broken: 2.76.5 90250f8
Worked: 2.76.2

Short description of error
When I try to use the Ice Tools addon, I got this error in the API regarding GreasePencil not having attribute draw_mode.

Traceback (most recent call last):
  File "/home/ebrain/.config/blender/2.76/scripts/addons/ice_tools.py", line 157, in execute
    context.object.grease_pencil.draw_mode = 'SURFACE'
AttributeError: 'GreasePencil' object has no attribute 'draw_mode'

Exact steps for others to reproduce the error
Just use the addon Ice tools, and the first button Set Up Retopo Mesh will produce this bug.

**System Information** Ubuntu 15.10 x86_64 / i7 5820k / 16GB RAM / GTX 980 Ti **Blender Version** Broken: 2.76.5 90250f8 Worked: 2.76.2 **Short description of error** When I try to use the Ice Tools addon, I got this error in the API regarding GreasePencil not having attribute draw_mode. ``` Traceback (most recent call last): File "/home/ebrain/.config/blender/2.76/scripts/addons/ice_tools.py", line 157, in execute context.object.grease_pencil.draw_mode = 'SURFACE' AttributeError: 'GreasePencil' object has no attribute 'draw_mode' ``` **Exact steps for others to reproduce the error** Just use the addon Ice tools, and the first button **Set Up Retopo Mesh** will produce this bug.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @MickaelGuedon

Added subscriber: @MickaelGuedon
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

This setting is no longer a per-datablock setting, but is instead stored in the per-scene "Tool Settings" instead. Specifically, old addons need to be modified to use:

   context.tool_settings.gpencil_stroke_placement_view3d

I've updated the release notes to draw attention to this fact so that other addon authors can make suitable changes. In the meantime, we'll look into patching up the addons bundled in the official releases.

This setting is no longer a per-datablock setting, but is instead stored in the per-scene "Tool Settings" instead. Specifically, old addons need to be modified to use: ``` context.tool_settings.gpencil_stroke_placement_view3d ``` I've updated the release notes to draw attention to this fact so that other addon authors can make suitable changes. In the meantime, we'll look into patching up the addons bundled in the official releases.
Member

Ok, just found out that this addon isn't actually one that's bundled with Blender. Officially, we don't support external addons in the bug tracker. I've left a note on the BlenderArtists thread for this addon about these issues so that the author can update the addon.

In the meantime, to resolve this error, open the ice_tools.py file in a text editor, and change line 157 from:

   context.object.grease_pencil.draw_mode = 'SURFACE'

to:

   context.tool_settings.gpencil_stroke_placement_view3d = 'SURFACE'

Sorry for the inconvenience, but we'll just have to wait for the addon developer to update the tool in response to these changes.

Ok, just found out that this addon isn't actually one that's bundled with Blender. Officially, we don't support external addons in the bug tracker. I've left a note on the BlenderArtists thread for this addon about these issues so that the author can update the addon. In the meantime, to resolve this error, open the ice_tools.py file in a text editor, and change line 157 from: ``` context.object.grease_pencil.draw_mode = 'SURFACE' ``` to: ``` context.tool_settings.gpencil_stroke_placement_view3d = 'SURFACE' ``` Sorry for the inconvenience, but we'll just have to wait for the addon developer to update the tool in response to these changes.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Joshua Leung self-assigned this 2016-01-12 12:36:40 +01:00

This issue was referenced by blender/blender-addons-contrib@878f9773d3

This issue was referenced by blender/blender-addons-contrib@878f9773d3dc2365f12a57f683e754b968239848
Member

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#47166
No description provided.