Skip to content

PLUGIN: Multiple - De-hardcode throughout #23

Description

@Danweel

For OP9, OP10, OP13, OP14, define these as constants at the top:

# --- CONSTANTS ---
BRUSH_ERASER_POINT = "Eraser Point"
BRUSH_ERASER_STROKE = "Eraser Stroke"
LAYER_BODY_LINES = "[BODY] Lines"
LAYER_HIGHLIGHTS = "[HIGHLIGHTS]"
MATERIAL_LINE = "1 I LINE"

This is mostly for longevity:

  • If you rename a brush in Blender, you have to find and replace it in the code.
  • If you rename a layer, you have to find and replace it in the code.

This is what that would look like, in theory:

# In OP9:
bpy.context.scene.tool_settings.gpencil_paint.brush = bpy.data.brushes[BRUSH_ERASER_POINT]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

B issueB-class issues indicate a functionality-related problem that does not fully stop use.MildLow Severity issues that only causes light visible issues or inconvenience within its class.more info neededMore information surrounding the circumstances of issue or environment is neededmore testing neededThis issue needs more people to test its parameters, scope or repeatability.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions