Skip to content

Commit

Permalink
Added previous seed code to operators execute similar to other panels
Browse files Browse the repository at this point in the history
  • Loading branch information
ruaridhg committed Oct 4, 2023
1 parent ebf9420 commit f9605ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions randomiser/define_prop/operators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import random
from random import seed

import bpy
import numpy as np
Expand Down Expand Up @@ -315,6 +316,13 @@ def execute(self, context):
"""
cs = context.scene

previous_seed = cs.seed_properties.seed_previous
current_seed = cs.seed_properties.seed
seed_enabled = cs.seed_properties.seed_toggle
if (previous_seed != current_seed) and (seed_enabled is True):
seed(current_seed)
cs.seed_properties.seed_previous = current_seed

# For every GNG with a subpanel - REFACTORING BASED ON NEW CODE
print(
"EXECUTE list_subpanel_prop_names ==== ",
Expand Down

0 comments on commit f9605ec

Please sign in to comment.