Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons-contrib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons-contrib
Commits
16a6b444
Commit
16a6b444
authored
6 years ago
by
NBurn
Browse files
Options
Downloads
Patches
Plain Diff
automat/AdjOp - code cleanup
parent
efa3c016
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
automat/AdjOp.py
+13
-13
13 additions, 13 deletions
automat/AdjOp.py
with
13 additions
and
13 deletions
automat/AdjOp.py
+
13
−
13
View file @
16a6b444
...
@@ -10,11 +10,10 @@ import bpy
...
@@ -10,11 +10,10 @@ import bpy
import
os
import
os
class
AdjustableOperatorFromTexture
(
bpy
.
types
.
Operator
):
class
AdjustableOperatorFromTexture
(
bpy
.
types
.
Operator
):
"""
"""
This operator generates adjustable materials from textures in Cycles.
This operator generates adjustable materials from textures in Cycles.
This is a subclass from bpy.types.Operator.
This is a subclass from bpy.types.Operator.
"""
"""
# Metadata of the operator
# Metadata of the operator
...
@@ -32,10 +31,10 @@ This is a subclass from bpy.types.Operator.
...
@@ -32,10 +31,10 @@ This is a subclass from bpy.types.Operator.
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
"""
"""
This is the main runnable method of the operator.
This is the main runnable method of the operator.
This creates all the node setup.
This creates all the node setup.
"""
"""
# Create the material
# Create the material
...
@@ -104,10 +103,11 @@ This creates all the node setup."""
...
@@ -104,10 +103,11 @@ This creates all the node setup."""
return
{
"
FINISHED
"
}
return
{
"
FINISHED
"
}
def
invoke
(
self
,
context
,
event
):
def
invoke
(
self
,
context
,
event
):
"""
"""
This method opens the file browser. After that, the
This method opens the file browser. After that, the
execute(...) method gets ran, creating the node setup.
execute(...) method gets ran, creating the node setup.
It also checks that the render engine is Cycles.
"""
It also checks that the render engine is Cycles.
"""
if
bpy
.
context
.
scene
.
render
.
engine
==
'
CYCLES
'
:
if
bpy
.
context
.
scene
.
render
.
engine
==
'
CYCLES
'
:
self
.
filename
=
""
self
.
filename
=
""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment