[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4698: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4700: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4701: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4702: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Blenderlounge • Consulter le sujet - Addon Display Solid+Wireframe aaaaajnjcbdjhc

Addon Display Solid+Wireframe

Ici on parle des scripts

Modérateurs : frez, Yadoob, stilobique, Matpi, ModSquad

Addon Display Solid+Wireframe

Message par GameL » 11 Nov 2014, 22:21

Salut tout le monde.

Je souhaiterai réaliser un petit addon blender pour moi et peut être à ceux qui le souhaiterons. Je suis en ancien utilisateur de 3dsmax et j'adore la modé. J'aime d'autant plus pouvoir regarder le maillage très souvent. :D
Le viewport de 3dsmax propose trois modes de visualisations solid, wireframe et solid+wireframe.
Dans blender, il faut sélectionner l'objet puis cocher dans Object>Display "Wire" et "Draw all edges". Bref un calvaire si j'ai deux cents objets dans ma scène.

J'aimerai donc réaliser un petit script python qui parcourt ma scène afin de détecter tous les mesh et activer/desactiver ses deux options.

bpy.context.object.show_wire = True
bpy.context.object.show_all_edges = True

Auriez-vous des liens à me faire partager pour que je comprenne un peu mieux l'API blender. Je ne parviens pas à créer une liste de mes mesh afin de leur affecter ses options dans une boucle. -_-

merci d'avance ;)
Avatar de l’utilisateur
GameL
 
Message(s) : 80
Inscription : 06 Sep 2014, 05:12

Re: Addon Display Solid+Wireframe

Message par lapineige » 11 Nov 2014, 22:43

Mon terrier/blog: https://lapineige.fr/wp (l'ancien: le-terrier-de-lapineige.over-blog.com) | Mon GitHub: https://github.com/lapineige/Blender_add-ons | Lapineige's Tools: http://cgcookiemarkets.com/blender/all- ... ompilation
Avatar de l’utilisateur
lapineige
 
Message(s) : 3717
Inscription : 25 Juin 2014, 07:06

Re: Addon Display Solid+Wireframe

Message par GameL » 11 Nov 2014, 23:09

mais comment tu fais ce test du coup?

Désolé, je galère un max avec la syntaxe du python Blender. Je viens de celle de maya... je ne comprends pas les différences entre context, obj data, etc.
Avatar de l’utilisateur
GameL
 
Message(s) : 80
Inscription : 06 Sep 2014, 05:12

Re: Addon Display Solid+Wireframe

Message par lapineige » 11 Nov 2014, 23:35

Mon terrier/blog: https://lapineige.fr/wp (l'ancien: le-terrier-de-lapineige.over-blog.com) | Mon GitHub: https://github.com/lapineige/Blender_add-ons | Lapineige's Tools: http://cgcookiemarkets.com/blender/all- ... ompilation
Avatar de l’utilisateur
lapineige
 
Message(s) : 3717
Inscription : 25 Juin 2014, 07:06

Re: Addon Display Solid+Wireframe

Message par GameL » 12 Nov 2014, 07:07

Avatar de l’utilisateur
GameL
 
Message(s) : 80
Inscription : 06 Sep 2014, 05:12

Re: Addon Display Solid+Wireframe

Message par lapineige » 12 Nov 2014, 07:51

Tu n'as pas besoin de sélectionner l'objet. Au lieu de faire ta modif sur context.object, tu la fait simplement sur obj.

A la fin la commande marche, mais pour être sûr (et c'est plus propre), à la place de TOGGLE mets DESELECT.
Mon terrier/blog: https://lapineige.fr/wp (l'ancien: le-terrier-de-lapineige.over-blog.com) | Mon GitHub: https://github.com/lapineige/Blender_add-ons | Lapineige's Tools: http://cgcookiemarkets.com/blender/all- ... ompilation
Avatar de l’utilisateur
lapineige
 
Message(s) : 3717
Inscription : 25 Juin 2014, 07:06

Re: Addon Display Solid+Wireframe

Message par GameL » 12 Nov 2014, 07:58

Avatar de l’utilisateur
GameL
 
Message(s) : 80
Inscription : 06 Sep 2014, 05:12

Re: Addon Display Solid+Wireframe

Message par GameL » 12 Nov 2014, 09:49

Avatar de l’utilisateur
GameL
 
Message(s) : 80
Inscription : 06 Sep 2014, 05:12

Re: Addon Display Solid+Wireframe

Message par cedric » 12 Nov 2014, 09:53

En gros, tu dois faire une class pour ton def et ensuite dans ta classe panel tu appel ton BL_idname.

Sinon, regarde mon addon pie menu, c'est dedans ^^
Cédric Lepiller, Freelance 3D , , ,
Avatar de l’utilisateur
cedric
Administrateur
 
Message(s) : 7084
Inscription : 03 Août 2013, 21:36

Re: Addon Display Solid+Wireframe

Message par lapineige » 12 Nov 2014, 12:52

Mon terrier/blog: https://lapineige.fr/wp (l'ancien: le-terrier-de-lapineige.over-blog.com) | Mon GitHub: https://github.com/lapineige/Blender_add-ons | Lapineige's Tools: http://cgcookiemarkets.com/blender/all- ... ompilation
Avatar de l’utilisateur
lapineige
 
Message(s) : 3717
Inscription : 25 Juin 2014, 07:06


Retour vers Scripts - Python - OSL

Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 1 invité

cron