Fix T61761: Randomize Transform is an object mode operator
authorJacques Lucke <mail@jlucke.com>
Thu, 7 Mar 2019 14:54:08 +0000 (15:54 +0100)
committerJacques Lucke <mail@jlucke.com>
Thu, 7 Mar 2019 14:55:59 +0000 (15:55 +0100)
Reviewers: brecht, billreynish

Differential Revision: https://developer.blender.org/D4467

release/scripts/startup/bl_operators/object_randomize_transform.py

index 1e6aea45d89c2c8eb0949390b7fd63b364015110..bfac9ccb75168a57ddbdf5db2b5a11f5e906cfcb 100644 (file)
@@ -169,6 +169,10 @@ class RandomizeLocRotSize(Operator):
         default=(1.0, 1.0, 1.0),
     )
 
+    @classmethod
+    def poll(cls, context):
+        return context.mode == 'OBJECT'
+
     def execute(self, context):
         seed = self.random_seed