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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons-contrib
Commits
2a19fa8f
Commit
2a19fa8f
authored
May 26, 2012
by
Oscurart Eugenio Pignataro
Browse files
Options
Downloads
Patches
Plain Diff
Bug Fix in drivers
parent
87d0d5b9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
oscurart_futurism.py
+21
-25
21 additions, 25 deletions
oscurart_futurism.py
with
21 additions
and
25 deletions
oscurart_futurism.py
+
21
−
25
View file @
2a19fa8f
...
@@ -39,24 +39,19 @@ def object_osc_futurism (self, context,STEP, HOLD):
...
@@ -39,24 +39,19 @@ def object_osc_futurism (self, context,STEP, HOLD):
FC
=
FS
# FRAME CURRENT
FC
=
FS
# FRAME CURRENT
OBJNUMBER
=
1
# SUFIJO DE NUMERO PARA OBJETOS
OBJNUMBER
=
1
# SUFIJO DE NUMERO PARA OBJETOS
STEPINC
=
0
# NUMERO PARA EVALUAR LOS PASOS
STEPINC
=
0
# NUMERO PARA EVALUAR LOS PASOS
# SETEO EL FRAME CURRENT
bpy
.
context
.
scene
.
frame_set
(
FS
)
# SETEO EL FRAME CURRENT
bpy
.
context
.
scene
.
frame_set
(
FS
)
OBACT
=
bpy
.
context
.
active_object
# SETEO EL OBJETO ACTIVO
OBACT
=
bpy
.
context
.
active_object
## CREO EMPTY
## CREO EMPTY
bpy
.
ops
.
object
.
add
()
bpy
.
ops
.
object
.
add
()
bpy
.
context
.
active_object
.
name
=
"
FuturismContainer
"
bpy
.
context
.
active_object
.
name
=
"
FuturismContainer
"
EMPTY
=
bpy
.
context
.
active_object
EMPTY
=
bpy
.
context
.
active_object
# SUMO PARAMETERS AL EMPTY
# SUMO PARAMETERS AL OBJECT
EMPTY
[
"
FUTURISM_HOLDIN
"
]
=
0
EMPTY
[
"
FUTURISM_HOLDIN
"
]
=
0
EMPTY
[
"
FUTURISM_HOLDOUT
"
]
=
0
EMPTY
[
"
FUTURISM_HOLDOUT
"
]
=
0
bpy
.
context
.
scene
.
objects
.
active
=
OBACT
bpy
.
context
.
scene
.
objects
.
active
=
OBACT
# RECUPERO OBJETO ACTIVO
for
OBJETO
in
range
((
FE
+
1
)
-
FS
):
for
OBJETO
in
range
((
FE
+
1
)
-
FS
):
if
STEPINC
==
STEP
:
if
STEPINC
==
STEP
:
...
@@ -85,21 +80,20 @@ def object_osc_futurism (self, context,STEP, HOLD):
...
@@ -85,21 +80,20 @@ def object_osc_futurism (self, context,STEP, HOLD):
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
# MARCO EXPRESIONES PARA RENDER
# MARCO EXPRESIONES PARA RENDER
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
.
new
()
OBJECT
.
driver_add
(
"
hide_render
"
)
OBJECT
.
driver_add
(
"
hide_render
"
)
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
.
new
()
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
expression
=
"
False if frame >= %s+5 and frame <= %s else True
"
%
(
str
(
FC
),
str
(
FC
+
HOLD
))
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
expression
=
"
False if frame >= %s+5 and frame <= %s else True
"
%
(
str
(
FC
),
str
(
FC
+
HOLD
))
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
id_type
=
'
SCENE
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
id_type
=
'
SCENE
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
id
=
bpy
.
context
.
scene
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
id
=
bpy
.
context
.
scene
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
data_path
=
"
current_frame
"
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
0
].
targets
[
0
].
data_path
=
"
current_frame
"
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
1
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
1
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
1
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
1
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
1
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDIN
"
]
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
1
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDIN
"
]
'
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
# RESETEO STEPINC
# RESETEO STEPINC
STEPINC
=
0
STEPINC
=
0
# COPIAMOS S R T
# COPIAMOS S R T
...
@@ -110,8 +104,6 @@ def object_osc_futurism (self, context,STEP, HOLD):
...
@@ -110,8 +104,6 @@ def object_osc_futurism (self, context,STEP, HOLD):
FC
+=
1
FC
+=
1
STEPINC
+=
1
STEPINC
+=
1
# CLASE PARA OPERADOR
# CLASE PARA OPERADOR
class
Oscurart_futurism
(
bpy
.
types
.
Operator
):
class
Oscurart_futurism
(
bpy
.
types
.
Operator
):
bl_idname
=
"
object.duplicate_futurism
"
bl_idname
=
"
object.duplicate_futurism
"
...
@@ -123,6 +115,10 @@ class Oscurart_futurism (bpy.types.Operator):
...
@@ -123,6 +115,10 @@ class Oscurart_futurism (bpy.types.Operator):
hold
=
bpy
.
props
.
IntProperty
(
name
=
'
Hold
'
,
default
=
0
,
min
=
0
)
hold
=
bpy
.
props
.
IntProperty
(
name
=
'
Hold
'
,
default
=
0
,
min
=
0
)
@classmethod
def
poll
(
cls
,
context
):
return
(
bpy
.
context
.
active_object
.
type
==
"
MESH
"
)
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
object_osc_futurism
(
self
,
context
,
self
.
scale
,
self
.
hold
)
object_osc_futurism
(
self
,
context
,
self
.
scale
,
self
.
hold
)
...
...
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
sign in
to comment