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
2a19fa8f
Commit
2a19fa8f
authored
13 years ago
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
Hide 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
...
...
@@ -38,25 +38,20 @@ def object_osc_futurism (self, context,STEP, HOLD):
OBJLIST
=
[]
# LISTA PARA OBJETOS ????
FC
=
FS
# FRAME CURRENT
OBJNUMBER
=
1
# SUFIJO DE NUMERO PARA OBJETOS
STEPINC
=
0
# NUMERO PARA EVALUAR LOS PASOS
# SETEO EL FRAME CURRENT
bpy
.
context
.
scene
.
frame_set
(
FS
)
OBACT
=
bpy
.
context
.
active_object
STEPINC
=
0
# NUMERO PARA EVALUAR LOS PASOS
bpy
.
context
.
scene
.
frame_set
(
FS
)
# SETEO EL FRAME CURRENT
OBACT
=
bpy
.
context
.
active_object
# SETEO EL OBJETO ACTIVO
## CREO EMPTY
bpy
.
ops
.
object
.
add
()
bpy
.
context
.
active_object
.
name
=
"
FuturismContainer
"
EMPTY
=
bpy
.
context
.
active_object
EMPTY
=
bpy
.
context
.
active_object
# SUMO PARAMETERS AL
OBJECT
# SUMO PARAMETERS AL
EMPTY
EMPTY
[
"
FUTURISM_HOLDIN
"
]
=
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
):
if
STEPINC
==
STEP
:
...
...
@@ -84,22 +79,21 @@ def object_osc_futurism (self, context,STEP, HOLD):
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
# 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
()
# MARCO EXPRESIONES PARA 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
.
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
=
bpy
.
context
.
scene
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
[
0
].
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
[
0
].
driver
.
variables
[
2
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
0
].
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
[
1
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
1
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
1
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDIN
"
]
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
id_type
=
'
OBJECT
'
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
id
=
EMPTY
OBJECT
.
animation_data
.
drivers
[
1
].
driver
.
variables
[
2
].
targets
[
0
].
data_path
=
'
[
"
FUTURISM_HOLDOUT
"
]
'
# RESETEO STEPINC
STEPINC
=
0
# COPIAMOS S R T
...
...
@@ -108,9 +102,7 @@ def object_osc_futurism (self, context,STEP, HOLD):
OBJECT
.
parent
=
EMPTY
# AVANZO STEP Y FRAME
FC
+=
1
STEPINC
+=
1
STEPINC
+=
1
# CLASE PARA OPERADOR
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
)
@classmethod
def
poll
(
cls
,
context
):
return
(
bpy
.
context
.
active_object
.
type
==
"
MESH
"
)
def
execute
(
self
,
context
):
object_osc_futurism
(
self
,
context
,
self
.
scale
,
self
.
hold
)
...
...
@@ -149,4 +145,4 @@ def unregister():
if
__name__
==
'
__main__
'
:
register
()
register
()
\ No newline at end of file
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