GPv3: Rename mode enum names and python identifiers
This renames the mode identifiers to be consistent with e.g. the context mode identifiers and other names used for the new Grease Pencil. For `object.mode`: * `PAINT_GPENCIL` -> `PAINT_GREASE_PENCIL` * `SCULPT_GPENCIL` -> `SCULPT_GREASE_PENCIL` * `VERTEX_GPENCIL` -> `VERTEX_GREASE_PENCIL` * `WEIGHT_GPENCIL` -> `WEIGHT_GREASE_PENCIL` For the internal `ob->mode` flag: * `OB_MODE_PAINT_GPENCIL_LEGACY` -> `OB_MODE_PAINT_GREASE_PENCIL` * `OB_MODE_SCULPT_GPENCIL_LEGACY` -> `OB_MODE_SCULPT_GREASE_PENCIL` * `OB_MODE_VERTEX_GPENCIL_LEGACY` -> `OB_MODE_VERTEX_GREASE_PENCIL` * `OB_MODE_WEIGHT_GPENCIL_LEGACY` -> `OB_MODE_WEIGHT_GREASE_PENCIL` Resolves #127374. Pull Request: https://projects.blender.org/blender/blender/pulls/128604
This commit is contained in:
@@ -480,23 +480,23 @@ def ctx_gpencil_edit():
|
||||
|
||||
|
||||
def ctx_gpencil_sculpt():
|
||||
bpy.ops.object.gpencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='SCULPT_GPENCIL')
|
||||
bpy.ops.object.grease_pencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='SCULPT_GREASE_PENCIL')
|
||||
|
||||
|
||||
def ctx_gpencil_paint_weight():
|
||||
bpy.ops.object.gpencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='WEIGHT_GPENCIL')
|
||||
bpy.ops.object.grease_pencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='WEIGHT_GREASE_PENCIL')
|
||||
|
||||
|
||||
def ctx_gpencil_paint_vertex():
|
||||
bpy.ops.object.gpencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='VERTEX_GPENCIL')
|
||||
bpy.ops.object.grease_pencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='VERTEX_GREASE_PENCIL')
|
||||
|
||||
|
||||
def ctx_gpencil_paint_draw():
|
||||
bpy.ops.object.gpencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='PAINT_GPENCIL')
|
||||
bpy.ops.object.grease_pencil_add(type='STROKE')
|
||||
bpy.ops.object.mode_set(mode='PAINT_GREASE_PENCIL')
|
||||
|
||||
|
||||
# ------------
|
||||
|
||||
Reference in New Issue
Block a user